@rankingcoach/vanguard 1.10.0 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/dist/index-Accordion2.js +5 -5
  2. package/dist/index-AccordionDetails.js +5 -5
  3. package/dist/index-AccordionSummary.js +2 -2
  4. package/dist/index-AppBar2.js +1 -1
  5. package/dist/index-Autocomplete2.js +3 -3
  6. package/dist/index-Backdrop.js +1 -1
  7. package/dist/index-BasePopper.js +2 -2
  8. package/dist/index-BenchmarkGauge.js +1 -1
  9. package/dist/index-BenchmarkGaugeMarker.js +1 -1
  10. package/dist/index-Box.js +1 -1
  11. package/dist/index-Button2.js +1 -1
  12. package/dist/index-ButtonBase.js +1 -1
  13. package/dist/index-CSSTransition.js +1 -1
  14. package/dist/index-CalendarOrClockPicker.js +1 -1
  15. package/dist/index-CalendarPicker.js +2 -2
  16. package/dist/index-Chip.js +1 -1
  17. package/dist/index-ClickAwayListener.js +1 -1
  18. package/dist/index-Clock3.js +1 -1
  19. package/dist/index-ClockNumber.js +4 -4
  20. package/dist/index-ClockPicker.js +2 -2
  21. package/dist/index-ClockPointer.js +1 -1
  22. package/dist/index-Collapse2.js +1 -1
  23. package/dist/index-ColorPicker.js +1 -1
  24. package/dist/index-CreditCard.js +1 -1
  25. package/dist/index-Cropper.js +1 -1
  26. package/dist/index-DateInput.js +4 -4
  27. package/dist/index-DatePicker2.js +1 -1
  28. package/dist/index-DatePickerToolbar.js +1 -1
  29. package/dist/index-DayCell.js +2 -2
  30. package/dist/index-DayPicker.js +1 -1
  31. package/dist/index-DefaultPropsProvider.js +1 -1
  32. package/dist/index-DefaultPropsProvider2.js +1 -1
  33. package/dist/index-DesktopDatePicker.js +1 -1
  34. package/dist/index-Dialog.js +1 -1
  35. package/dist/index-DialogActions.js +1 -1
  36. package/dist/index-DialogContent.js +1 -1
  37. package/dist/index-Drawer2.js +1 -1
  38. package/dist/index-Fade.js +2 -2
  39. package/dist/index-FilledInput.js +1 -1
  40. package/dist/index-FocusTrap.js +1 -1
  41. package/dist/index-FormControl2.js +1 -1
  42. package/dist/index-FormHelperText.js +1 -1
  43. package/dist/index-FormLabel.js +1 -1
  44. package/dist/index-GlobalStyles.js +1 -1
  45. package/dist/index-GlobalStyles2.js +1 -1
  46. package/dist/index-GlobalStyles3.js +1 -1
  47. package/dist/index-Grid.js +1 -1
  48. package/dist/index-Grow.js +2 -2
  49. package/dist/index-IconButton2.js +1 -1
  50. package/dist/index-Input2.js +1 -1
  51. package/dist/index-InputAdornment.js +1 -1
  52. package/dist/index-InputBase2.js +1 -1
  53. package/dist/index-InputLabel.js +5 -5
  54. package/dist/index-InputRangeField.js +1 -1
  55. package/dist/index-LinearProgress.js +1 -1
  56. package/dist/index-List2.js +1 -1
  57. package/dist/index-ListSubheader.js +1 -1
  58. package/dist/index-LocalizationProvider.js +1 -1
  59. package/dist/index-Menu2.js +1 -1
  60. package/dist/index-MenuItem2.js +1 -1
  61. package/dist/index-MenuList.js +1 -1
  62. package/dist/index-MobileDatePicker.js +1 -1
  63. package/dist/index-Modal2.js +1 -1
  64. package/dist/index-ModalContext.js +3 -3
  65. package/dist/index-Month.js +3 -3
  66. package/dist/index-MonthPicker.js +7 -7
  67. package/dist/index-NativeSelectInput.js +1 -1
  68. package/dist/index-NotchedOutline.js +1 -1
  69. package/dist/index-OutlinedInput.js +1 -1
  70. package/dist/index-Paper.js +1 -1
  71. package/dist/index-Parser2.js +3 -2
  72. package/dist/index-PickersArrowSwitcher.js +1 -1
  73. package/dist/index-PickersCalendarHeader.js +1 -1
  74. package/dist/index-PickersDay.js +2 -2
  75. package/dist/index-PickersFadeTransitionGroup.js +6 -6
  76. package/dist/index-PickersMonth.js +4 -4
  77. package/dist/index-PickersPopper.js +1 -1
  78. package/dist/index-PickersSlideTransition.js +6 -6
  79. package/dist/index-PickersToolbar.js +1 -1
  80. package/dist/index-PickersYear.js +1 -1
  81. package/dist/index-Popover2.js +7 -7
  82. package/dist/index-Popper.js +1 -1
  83. package/dist/index-Portal.js +1 -1
  84. package/dist/index-Profile.js +0 -3
  85. package/dist/index-PropTypes.js +1 -1
  86. package/dist/index-QuoteContainer.js +5 -6
  87. package/dist/index-Ripple.js +1 -1
  88. package/dist/index-RtlProvider.js +1 -1
  89. package/dist/index-ScrollbarSize.js +1 -1
  90. package/dist/index-Select2.js +6 -6
  91. package/dist/index-SelectInput2.js +1 -1
  92. package/dist/index-Skeleton2.js +1 -1
  93. package/dist/index-Slide.js +6 -6
  94. package/dist/index-Slider2.js +2 -2
  95. package/dist/index-SliderValueLabel.js +1 -1
  96. package/dist/index-Snackbar2.js +7 -7
  97. package/dist/index-SnackbarContent.js +1 -1
  98. package/dist/index-StyledEngineProvider.js +1 -1
  99. package/dist/index-StyledSVG2.js +2 -2
  100. package/dist/index-SvgIcon.js +1 -1
  101. package/dist/index-Switch.js +17 -22
  102. package/dist/index-Tab2.js +1 -1
  103. package/dist/index-TabScrollButton.js +1 -1
  104. package/dist/index-Table.js +3 -3
  105. package/dist/index-Tabs2.js +5 -5
  106. package/dist/index-TextField.js +1 -1
  107. package/dist/index-TextareaAutosize.js +1 -1
  108. package/dist/index-ToggleButton2.js +1 -1
  109. package/dist/index-ToggleButtonGroup2.js +1 -1
  110. package/dist/index-Toolbar2.js +1 -1
  111. package/dist/index-Tooltip.js +3 -3
  112. package/dist/index-TouchRipple.js +1 -1
  113. package/dist/index-Transition.js +1 -1
  114. package/dist/index-TransitionGroup.js +1 -1
  115. package/dist/index-Typography.js +1 -1
  116. package/dist/index-YearPicker.js +7 -7
  117. package/dist/index-_virtual16.js +5 -3
  118. package/dist/index-_virtual17.js +3 -5
  119. package/dist/index-_virtual66.js +2 -2
  120. package/dist/index-_virtual67.js +2 -4
  121. package/dist/index-_virtual68.js +4 -2
  122. package/dist/index-_virtual69.js +2 -4
  123. package/dist/index-_virtual70.js +2 -2
  124. package/dist/index-_virtual71.js +1 -1
  125. package/dist/index-_virtual72.js +2 -4
  126. package/dist/index-_virtual73.js +1 -1
  127. package/dist/index-_virtual74.js +4 -2
  128. package/dist/index-_virtual75.js +4 -2
  129. package/dist/index-_virtual76.js +2 -2
  130. package/dist/index-accessibility.js +1 -1
  131. package/dist/index-accordionClasses.js +4 -4
  132. package/dist/index-accordionSummaryClasses.js +4 -4
  133. package/dist/index-autocompleteClasses.js +4 -4
  134. package/dist/index-buttonBaseClasses.js +4 -4
  135. package/dist/index-buttonClasses.js +4 -4
  136. package/dist/index-chipClasses.js +4 -4
  137. package/dist/index-cjs.js +1 -1
  138. package/dist/index-clockNumberClasses.js +4 -4
  139. package/dist/index-elementAcceptingRef.js +1 -1
  140. package/dist/index-elementTypeAcceptingRef.js +1 -1
  141. package/dist/index-emotion-is-prop-valid.esm.js +1 -1
  142. package/dist/index-esm.js +1 -1
  143. package/dist/index-esm4.js +293 -128
  144. package/dist/index-esm5.js +128 -293
  145. package/dist/index-esm7.js +0 -1
  146. package/dist/index-formHelperTextClasses.js +4 -4
  147. package/dist/index-generate-error-boundary-data.js +13 -11
  148. package/dist/index-helpers2.js +43 -393
  149. package/dist/index-helpers3.js +393 -43
  150. package/dist/index-iconButtonClasses.js +4 -4
  151. package/dist/index-inputAdornmentClasses.js +4 -4
  152. package/dist/index-lib5.js +1 -1
  153. package/dist/index-menuItemClasses.js +4 -4
  154. package/dist/index-nativeSelectClasses.js +4 -4
  155. package/dist/index-pickersMonthClasses.js +4 -4
  156. package/dist/index-pickersToolbarClasses.js +4 -4
  157. package/dist/index-pickersYearClasses.js +4 -4
  158. package/dist/index-react-spring_animated.modern.js +3 -3
  159. package/dist/index-react-spring_core.modern.js +445 -422
  160. package/dist/index-react-spring_web.modern.js +70 -69
  161. package/dist/index-refType.js +1 -1
  162. package/dist/index-responsivePropType.js +1 -1
  163. package/dist/index-sanitize-html.js +16 -17
  164. package/dist/index-selectClasses.js +4 -4
  165. package/dist/index-sliderClasses.js +4 -4
  166. package/dist/index-styled-engine.js +4 -4
  167. package/dist/index-tabClasses.js +4 -4
  168. package/dist/index-tabScrollButtonClasses.js +4 -4
  169. package/dist/index-tabsClasses.js +4 -4
  170. package/dist/index-toggleButtonClasses.js +4 -4
  171. package/dist/index-toggleButtonGroupClasses.js +4 -4
  172. package/dist/index-tooltipClasses.js +4 -4
  173. package/dist/index-use-benchmark-gauge-render-state.js +1 -1
  174. package/dist/index-utils2.js +47 -67
  175. package/dist/index-utils3.js +67 -47
  176. package/dist/index.js +426 -426
  177. package/dist/types/core/CardMotion/CardMotion.config.d.ts +87 -55
  178. package/dist/types/core/Switch/stories/SwitchChecked.story.d.ts +2 -0
  179. package/dist/types/core/Switch/stories/SwitchDefault.story.d.ts +2 -0
  180. package/dist/types/core/Switch/stories/SwitchDisabled.story.d.ts +2 -0
  181. package/dist/types/core/Switch/stories/SwitchLabelLeft.story.d.ts +2 -0
  182. package/dist/types/core/Switch/stories/SwitchLoading.story.d.ts +2 -0
  183. package/dist/types/core/Switch/stories/SwitchSizes.story.d.ts +2 -0
  184. package/dist/types/core/Switch/stories/_Switch.default.d.ts +32 -0
  185. package/dist/vanguard-asset-analysis.json +1 -1
  186. package/dist/vanguard.css +1 -1
  187. package/dist-wordpress/index.js +9681 -9655
  188. package/dist-wordpress/vanguard.css +1 -1
  189. package/package.json +44 -42
  190. package/scripts/verify-storybook-tsgo.js +0 -0
  191. package/scripts/verify-tsgo.js +0 -0
@@ -1,12 +1,12 @@
1
- import { is as o, useIsomorphicLayoutEffect as ue, useOnce as Xe, each as I, toArray as M, useForceUpdate as Ze, usePrev as we, createInterpolator as It, isEqual as K, getFluidValue as z, Globals as H, frameLoop as Oe, FluidValue as wt, deprecateInterpolate as At, callFluidObservers as ye, hasFluidValue as W, addFluidObserver as ve, removeFluidObserver as et, eachProp as se, flush as _e, deprecateDirectCall as Ct, flushCalls as ce, isAnimatedString as tt, getFluidObservers as Qe, easings as Rt, noop as Ne, createStringInterpolator as xt } from "./index-react-spring_shared.modern.js";
1
+ import { useIsomorphicLayoutEffect as ue, useOnce as Xe, each as S, is as o, useForceUpdate as Ze, usePrev as we, toArray as j, createInterpolator as It, isEqual as K, getFluidValue as Q, Globals as W, frameLoop as Oe, hasFluidValue as Y, addFluidObserver as ye, removeFluidObserver as et, deprecateDirectCall as wt, eachProp as se, flush as pe, FluidValue as At, deprecateInterpolate as Rt, callFluidObservers as _e, flushCalls as ce, isAnimatedString as tt, getFluidObservers as Ne, easings as Ct, noop as Qe, createStringInterpolator as Tt } from "./index-react-spring_shared.modern.js";
2
2
  import * as fe from "react";
3
- import { useMemo as le, useRef as te, useContext as it } from "react";
4
- import { getAnimatedType as Ae, setAnimated as st, getAnimated as $, getPayload as qe, AnimatedValue as Tt, AnimatedString as ze } from "./index-react-spring_animated.modern.js";
5
- import { raf as U } from "./index-react-spring_rafz.modern.js";
6
- function E(e, ...t) {
3
+ import { useMemo as le, useRef as Z, useContext as it } from "react";
4
+ import { getAnimatedType as Ae, setAnimated as st, getAnimated as $, getPayload as je, AnimatedValue as xt, AnimatedString as ze } from "./index-react-spring_animated.modern.js";
5
+ import { raf as N } from "./index-react-spring_rafz.modern.js";
6
+ function O(e, ...t) {
7
7
  return o.fun(e) ? e(...t) : e;
8
8
  }
9
- var he = (e, t) => e === !0 || !!(t && e && (o.fun(e) ? e(t) : M(e).includes(t))), nt = (e, t) => o.obj(e) ? t && e[t] : e, at = (e, t) => e.default === !0 ? e[t] : e.default ? e.default[t] : void 0, Vt = (e) => e, Pe = (e, t = Vt) => {
9
+ var he = (e, t) => e === !0 || !!(t && e && (o.fun(e) ? e(t) : j(e).includes(t))), nt = (e, t) => o.obj(e) ? t && e[t] : e, at = (e, t) => e.default === !0 ? e[t] : e.default ? e.default[t] : void 0, Vt = (e) => e, ve = (e, t = Vt) => {
10
10
  let i = Ft;
11
11
  e.default && e.default !== !0 && (e = e.default, i = Object.keys(e));
12
12
  const s = {};
@@ -23,7 +23,7 @@ var he = (e, t) => e === !0 || !!(t && e && (o.fun(e) ? e(t) : M(e).includes(t))
23
23
  "onPause",
24
24
  "onResume",
25
25
  "onRest"
26
- ], Et = {
26
+ ], Mt = {
27
27
  config: 1,
28
28
  from: 1,
29
29
  to: 1,
@@ -59,16 +59,16 @@ var he = (e, t) => e === !0 || !!(t && e && (o.fun(e) ? e(t) : M(e).includes(t))
59
59
  callId: 1,
60
60
  parentId: 1
61
61
  };
62
- function Mt(e) {
62
+ function Et(e) {
63
63
  const t = {};
64
64
  let i = 0;
65
65
  if (se(e, (s, n) => {
66
- Et[n] || (t[n] = s, i++);
66
+ Mt[n] || (t[n] = s, i++);
67
67
  }), i)
68
68
  return t;
69
69
  }
70
- function je(e) {
71
- const t = Mt(e);
70
+ function qe(e) {
71
+ const t = Et(e);
72
72
  if (t) {
73
73
  const i = { to: t };
74
74
  return se(e, (s, n) => n in t || (i[n] = s)), i;
@@ -76,7 +76,7 @@ function je(e) {
76
76
  return { ...e };
77
77
  }
78
78
  function de(e) {
79
- return e = z(e), o.arr(e) ? e.map(de) : tt(e) ? H.createStringInterpolator({
79
+ return e = Q(e), o.arr(e) ? e.map(de) : tt(e) ? W.createStringInterpolator({
80
80
  range: [0, 1],
81
81
  output: [e, e]
82
82
  })(1) : e;
@@ -85,10 +85,10 @@ function ot(e) {
85
85
  for (const t in e) return !0;
86
86
  return !1;
87
87
  }
88
- function Ce(e) {
88
+ function Re(e) {
89
89
  return o.fun(e) || o.arr(e) && o.obj(e[0]);
90
90
  }
91
- function Re(e, t) {
91
+ function Ce(e, t) {
92
92
  var i;
93
93
  (i = e.ref) == null || i.delete(e), t == null || t.delete(e);
94
94
  }
@@ -99,26 +99,26 @@ function rt(e, t) {
99
99
  var Ot = {
100
100
  default: { tension: 170, friction: 26 },
101
101
  wobbly: { tension: 180, friction: 12 }
102
- }, xe = {
102
+ }, Te = {
103
103
  ...Ot.default,
104
104
  mass: 1,
105
105
  damping: 1,
106
- easing: Rt.linear,
106
+ easing: Ct.linear,
107
107
  clamp: !1
108
- }, qt = class {
108
+ }, jt = class {
109
109
  constructor() {
110
- this.velocity = 0, Object.assign(this, xe);
110
+ this.velocity = 0, Object.assign(this, Te);
111
111
  }
112
112
  };
113
- function jt(e, t, i) {
114
- i && (i = { ...i }, Be(i, t), t = { ...i, ...t }), Be(e, t), Object.assign(e, t);
115
- for (const u in xe)
116
- e[u] == null && (e[u] = xe[u]);
113
+ function qt(e, t, i) {
114
+ i && (i = { ...i }, Le(i, t), t = { ...i, ...t }), Le(e, t), Object.assign(e, t);
115
+ for (const c in Te)
116
+ e[c] == null && (e[c] = Te[c]);
117
117
  let { frequency: s, damping: n } = e;
118
118
  const { mass: a } = e;
119
119
  return o.und(s) || (s < 0.01 && (s = 0.01), n < 0 && (n = 0), e.tension = Math.pow(2 * Math.PI / s, 2) * a, e.friction = 4 * Math.PI * n * a / s), e;
120
120
  }
121
- function Be(e, t) {
121
+ function Le(e, t) {
122
122
  if (!o.und(t.decay))
123
123
  e.duration = void 0;
124
124
  else {
@@ -126,38 +126,38 @@ function Be(e, t) {
126
126
  (i || !o.und(t.frequency) || !o.und(t.damping) || !o.und(t.mass)) && (e.duration = void 0, e.decay = void 0), i && (e.frequency = void 0);
127
127
  }
128
128
  }
129
- var Le = [], kt = class {
129
+ var Be = [], Ut = class {
130
130
  constructor() {
131
- this.changed = !1, this.values = Le, this.toValues = null, this.fromValues = Le, this.config = new qt(), this.immediate = !1;
131
+ this.changed = !1, this.values = Be, this.toValues = null, this.fromValues = Be, this.config = new jt(), this.immediate = !1;
132
132
  }
133
133
  };
134
134
  function ut(e, { key: t, props: i, defaultProps: s, state: n, actions: a }) {
135
- return new Promise((u, r) => {
136
- let p, f, S = he(i.cancel ?? (s == null ? void 0 : s.cancel), t);
137
- if (S)
135
+ return new Promise((c, u) => {
136
+ let g, f, b = he(i.cancel ?? (s == null ? void 0 : s.cancel), t);
137
+ if (b)
138
138
  y();
139
139
  else {
140
140
  o.und(i.pause) || (n.paused = he(i.pause, t));
141
- let _ = s == null ? void 0 : s.pause;
142
- _ !== !0 && (_ = n.paused || he(_, t)), p = E(i.delay || 0, t), _ ? (n.resumeQueue.add(P), a.pause()) : (a.resume(), P());
141
+ let d = s == null ? void 0 : s.pause;
142
+ d !== !0 && (d = n.paused || he(d, t)), g = O(i.delay || 0, t), d ? (n.resumeQueue.add(_), a.pause()) : (a.resume(), _());
143
143
  }
144
- function l() {
145
- n.resumeQueue.add(P), n.timeouts.delete(f), f.cancel(), p = f.time - U.now();
144
+ function h() {
145
+ n.resumeQueue.add(_), n.timeouts.delete(f), f.cancel(), g = f.time - N.now();
146
146
  }
147
- function P() {
148
- p > 0 && !H.skipAnimation ? (n.delayed = !0, f = U.setTimeout(y, p), n.pauseQueue.add(l), n.timeouts.add(f)) : y();
147
+ function _() {
148
+ g > 0 && !W.skipAnimation ? (n.delayed = !0, f = N.setTimeout(y, g), n.pauseQueue.add(h), n.timeouts.add(f)) : y();
149
149
  }
150
150
  function y() {
151
- n.delayed && (n.delayed = !1), n.pauseQueue.delete(l), n.timeouts.delete(f), e <= (n.cancelId || 0) && (S = !0);
151
+ n.delayed && (n.delayed = !1), n.pauseQueue.delete(h), n.timeouts.delete(f), e <= (n.cancelId || 0) && (b = !0);
152
152
  try {
153
- a.start({ ...i, callId: e, cancel: S }, u);
154
- } catch (_) {
155
- r(_);
153
+ a.start({ ...i, callId: e, cancel: b }, c);
154
+ } catch (d) {
155
+ u(d);
156
156
  }
157
157
  }
158
158
  });
159
159
  }
160
- var ke = (e, t) => t.length == 1 ? t[0] : t.some((i) => i.cancelled) ? ie(e.get()) : t.every((i) => i.noop) ? ct(e.get()) : D(
160
+ var Ue = (e, t) => t.length == 1 ? t[0] : t.some((i) => i.cancelled) ? ie(e.get()) : t.every((i) => i.noop) ? ct(e.get()) : z(
161
161
  e.get(),
162
162
  t.every((i) => i.finished)
163
163
  ), ct = (e) => ({
@@ -165,7 +165,7 @@ var ke = (e, t) => t.length == 1 ? t[0] : t.some((i) => i.cancelled) ? ie(e.get(
165
165
  noop: !0,
166
166
  finished: !0,
167
167
  cancelled: !1
168
- }), D = (e, t, i = !1) => ({
168
+ }), z = (e, t, i = !1) => ({
169
169
  value: e,
170
170
  finished: t,
171
171
  cancelled: i
@@ -175,69 +175,71 @@ var ke = (e, t) => t.length == 1 ? t[0] : t.some((i) => i.cancelled) ? ie(e.get(
175
175
  finished: !1
176
176
  });
177
177
  function ft(e, t, i, s) {
178
- const { callId: n, parentId: a, onRest: u } = t, { asyncTo: r, promise: p } = i;
179
- return !a && e === r && !t.reset ? p : i.promise = (async () => {
178
+ const { callId: n, parentId: a, onRest: c } = t, { asyncTo: u, promise: g } = i;
179
+ return !a && e === u && !t.reset ? g : i.promise = (async () => {
180
180
  i.asyncId = n, i.asyncTo = e;
181
- const f = Pe(
181
+ const f = ve(
182
182
  t,
183
- (m, c) => (
183
+ (r, l) => (
184
184
  // The `onRest` prop is only called when the `runAsync` promise is resolved.
185
- c === "onRest" ? void 0 : m
185
+ l === "onRest" ? void 0 : r
186
186
  )
187
187
  );
188
- let S, l;
189
- const P = new Promise(
190
- (m, c) => (S = m, l = c)
191
- ), y = (m) => {
192
- const c = (
188
+ let b, h;
189
+ const _ = new Promise(
190
+ (r, l) => (b = r, h = l)
191
+ ), y = (r) => {
192
+ const l = (
193
193
  // The `cancel` prop or `stop` method was used.
194
194
  n <= (i.cancelId || 0) && ie(s) || // The async `to` prop was replaced.
195
- n !== i.asyncId && D(s, !1)
195
+ n !== i.asyncId && z(s, !1)
196
196
  );
197
- if (c)
198
- throw m.result = c, l(m), m;
199
- }, _ = (m, c) => {
200
- const v = new Ge(), h = new Ke();
197
+ if (l)
198
+ throw r.result = l, h(r), r;
199
+ };
200
+ let d = 0;
201
+ const A = 1024, I = (r, l) => {
202
+ const p = new Ge(), R = new Ke();
201
203
  return (async () => {
202
- if (H.skipAnimation)
203
- throw me(i), h.result = D(s, !1), l(h), h;
204
- y(v);
205
- const w = o.obj(m) ? { ...m } : { ...c, to: m };
206
- w.parentId = n, se(f, (Q, R) => {
207
- o.und(w[R]) && (w[R] = Q);
208
- });
209
- const C = await s.start(w);
210
- return y(v), i.paused && await new Promise((Q) => {
211
- i.resumeQueue.add(Q);
212
- }), C;
204
+ y(p);
205
+ const w = o.obj(r) ? { ...r } : { ...l, to: r };
206
+ if (w.parentId = n, se(f, (E, T) => {
207
+ o.und(w[T]) && (w[T] = E);
208
+ }), W.skipAnimation) {
209
+ if (++d > A)
210
+ throw Pe(i), R.result = z(s, !1), h(R), R;
211
+ return w.immediate = !0, await s.start(w);
212
+ }
213
+ const x = await s.start(w);
214
+ return y(p), i.paused && await new Promise((E) => {
215
+ i.resumeQueue.add(E);
216
+ }), x;
213
217
  })();
214
218
  };
215
- let d;
216
- if (H.skipAnimation)
217
- return me(i), D(s, !1);
219
+ let v;
218
220
  try {
219
- let m;
220
- o.arr(e) ? m = (async (c) => {
221
- for (const v of c)
222
- await _(v);
223
- })(e) : m = Promise.resolve(e(_, s.stop.bind(s))), await Promise.all([m.then(S), P]), d = D(s.get(), !0, !1);
224
- } catch (m) {
225
- if (m instanceof Ge)
226
- d = m.result;
227
- else if (m instanceof Ke)
228
- d = m.result;
221
+ let r;
222
+ o.arr(e) ? r = (async (l) => {
223
+ for (const p of l)
224
+ await I(p);
225
+ })(e) : r = Promise.resolve(e(I, s.stop.bind(s))), await Promise.all([r.then(b), _]), v = z(s.get(), !0, !1);
226
+ } catch (r) {
227
+ if (r instanceof Ge)
228
+ v = r.result;
229
+ else if (r instanceof Ke)
230
+ v = r.result;
229
231
  else
230
- throw m;
232
+ throw r;
231
233
  } finally {
232
- n == i.asyncId && (i.asyncId = a, i.asyncTo = a ? r : void 0, i.promise = a ? p : void 0);
234
+ n == i.asyncId && (i.asyncId = a, i.asyncTo = a ? u : void 0, i.promise = a ? g : void 0);
233
235
  }
234
- return o.fun(u) && U.batchedUpdates(() => {
235
- u(d, s, s.item);
236
- }), d;
236
+ return o.fun(c) && N.batchedUpdates(() => {
237
+ c(v, s, s.item);
238
+ }), v;
237
239
  })();
238
240
  }
239
- function me(e, t) {
240
- _e(e.timeouts, (i) => i.cancel()), e.pauseQueue.clear(), e.resumeQueue.clear(), e.asyncId = e.asyncTo = e.promise = void 0, t && (e.cancelId = t);
241
+ function Pe(e, t) {
242
+ pe(e.timeouts, (i) => i.cancel()), e.pauseQueue.clear(), e.resumeQueue.clear(), e.asyncId = e.asyncTo = e.promise = void 0, t && (e.cancelId = t);
241
243
  }
242
244
  var Ge = class extends Error {
243
245
  constructor() {
@@ -249,9 +251,9 @@ var Ge = class extends Error {
249
251
  constructor() {
250
252
  super("SkipAnimationSignal");
251
253
  }
252
- }, Te = (e) => e instanceof De, Dt = 1, De = class extends wt {
254
+ }, xe = (e) => e instanceof ke, kt = 1, ke = class extends At {
253
255
  constructor() {
254
- super(...arguments), this.id = Dt++, this._priority = 0;
256
+ super(...arguments), this.id = kt++, this._priority = 0;
255
257
  }
256
258
  get priority() {
257
259
  return this._priority;
@@ -266,11 +268,11 @@ var Ge = class extends Error {
266
268
  }
267
269
  /** Create a spring that maps our value to another value */
268
270
  to(...e) {
269
- return H.to(this, e);
271
+ return W.to(this, e);
270
272
  }
271
273
  /** @deprecated Use the `to` method instead. */
272
274
  interpolate(...e) {
273
- return At(), H.to(this, e);
275
+ return Rt(), W.to(this, e);
274
276
  }
275
277
  toJSON() {
276
278
  return this.get();
@@ -289,7 +291,7 @@ var Ge = class extends Error {
289
291
  }
290
292
  /** Tell our children about our new value */
291
293
  _onChange(e, t = !1) {
292
- ye(this, {
294
+ _e(this, {
293
295
  type: "change",
294
296
  parent: this,
295
297
  value: e,
@@ -298,15 +300,15 @@ var Ge = class extends Error {
298
300
  }
299
301
  /** Tell our children about our new priority */
300
302
  _onPriorityChange(e) {
301
- this.idle || Oe.sort(this), ye(this, {
303
+ this.idle || Oe.sort(this), _e(this, {
302
304
  type: "priority",
303
305
  parent: this,
304
306
  priority: e
305
307
  });
306
308
  }
307
- }, Z = Symbol.for("SpringPhase"), lt = 1, Ve = 2, Fe = 4, Se = (e) => (e[Z] & lt) > 0, Y = (e) => (e[Z] & Ve) > 0, ae = (e) => (e[Z] & Fe) > 0, $e = (e, t) => t ? e[Z] |= Ve | lt : e[Z] &= ~Ve, He = (e, t) => t ? e[Z] |= Fe : e[Z] &= ~Fe, Ut = class extends De {
309
+ }, ee = Symbol.for("SpringPhase"), lt = 1, Ve = 2, Fe = 4, Se = (e) => (e[ee] & lt) > 0, J = (e) => (e[ee] & Ve) > 0, ae = (e) => (e[ee] & Fe) > 0, $e = (e, t) => t ? e[ee] |= Ve | lt : e[ee] &= ~Ve, He = (e, t) => t ? e[ee] |= Fe : e[ee] &= ~Fe, Dt = class extends ke {
308
310
  constructor(e, t) {
309
- if (super(), this.animation = new kt(), this.defaultProps = {}, this._state = {
311
+ if (super(), this.animation = new Ut(), this.defaultProps = {}, this._state = {
310
312
  paused: !1,
311
313
  delayed: !1,
312
314
  pauseQueue: /* @__PURE__ */ new Set(),
@@ -319,14 +321,14 @@ var Ge = class extends Error {
319
321
  }
320
322
  /** Equals true when not advancing on each frame. */
321
323
  get idle() {
322
- return !(Y(this) || this._state.asyncTo) || ae(this);
324
+ return !(J(this) || this._state.asyncTo) || ae(this);
323
325
  }
324
326
  get goal() {
325
- return z(this.animation.to);
327
+ return Q(this.animation.to);
326
328
  }
327
329
  get velocity() {
328
330
  const e = $(this);
329
- return e instanceof Tt ? e.lastVelocity || 0 : e.getPayload().map((t) => t.lastVelocity || 0);
331
+ return e instanceof xt ? e.lastVelocity || 0 : e.getPayload().map((t) => t.lastVelocity || 0);
330
332
  }
331
333
  /**
332
334
  * When true, this value has been animated at least once.
@@ -339,7 +341,7 @@ var Ge = class extends Error {
339
341
  * which is either active or paused.
340
342
  */
341
343
  get isAnimating() {
342
- return Y(this);
344
+ return J(this);
343
345
  }
344
346
  /**
345
347
  * When true, all current and future animations are paused.
@@ -359,55 +361,55 @@ var Ge = class extends Error {
359
361
  let t = !0, i = !1;
360
362
  const s = this.animation;
361
363
  let { toValues: n } = s;
362
- const { config: a } = s, u = qe(s.to);
363
- !u && W(s.to) && (n = M(z(s.to))), s.values.forEach((f, S) => {
364
+ const { config: a } = s, c = je(s.to);
365
+ !c && Y(s.to) && (n = j(Q(s.to))), s.values.forEach((f, b) => {
364
366
  if (f.done) return;
365
- const l = (
367
+ const h = (
366
368
  // Animated strings always go from 0 to 1.
367
- f.constructor == ze ? 1 : u ? u[S].lastPosition : n[S]
369
+ f.constructor == ze ? 1 : c ? c[b].lastPosition : n[b]
368
370
  );
369
- let P = s.immediate, y = l;
370
- if (!P) {
371
+ let _ = s.immediate, y = h;
372
+ if (!_) {
371
373
  if (y = f.lastPosition, a.tension <= 0) {
372
374
  f.done = !0;
373
375
  return;
374
376
  }
375
- let _ = f.elapsedTime += e;
376
- const d = s.fromValues[S], m = f.v0 != null ? f.v0 : f.v0 = o.arr(a.velocity) ? a.velocity[S] : a.velocity;
377
- let c;
378
- const v = a.precision || (d == l ? 5e-3 : Math.min(1, Math.abs(l - d) * 1e-3));
377
+ let d = f.elapsedTime += e;
378
+ const A = s.fromValues[b], I = f.v0 != null ? f.v0 : f.v0 = o.arr(a.velocity) ? a.velocity[b] : a.velocity;
379
+ let v;
380
+ const r = a.precision || (A == h ? 5e-3 : Math.min(1, Math.abs(h - A) * 1e-3));
379
381
  if (o.und(a.duration))
380
382
  if (a.decay) {
381
- const h = a.decay === !0 ? 0.998 : a.decay, w = Math.exp(-(1 - h) * _);
382
- y = d + m / (1 - h) * (1 - w), P = Math.abs(f.lastPosition - y) <= v, c = m * w;
383
+ const l = a.decay === !0 ? 0.998 : a.decay, p = Math.exp(-(1 - l) * d);
384
+ y = A + I / (1 - l) * (1 - p), _ = Math.abs(f.lastPosition - y) <= r, v = I * p;
383
385
  } else {
384
- c = f.lastVelocity == null ? m : f.lastVelocity;
385
- const h = a.restVelocity || v / 10, w = a.clamp ? 0 : a.bounce, C = !o.und(w), Q = d == l ? f.v0 > 0 : d < l;
386
- let R, N = !1;
387
- const x = 1, q = Math.ceil(e / x);
388
- for (let O = 0; O < q && (R = Math.abs(c) > h, !(!R && (P = Math.abs(l - y) <= v, P))); ++O) {
389
- C && (N = y == l || y > l == Q, N && (c = -c * w, y = l));
390
- const B = -a.tension * 1e-6 * (y - l), L = -a.friction * 1e-3 * c, g = (B + L) / a.mass;
391
- c = c + g * x, y = y + c * x;
386
+ v = f.lastVelocity == null ? I : f.lastVelocity;
387
+ const l = a.restVelocity || r / 10, p = a.clamp ? 0 : a.bounce, R = !o.und(p), w = A == h ? f.v0 > 0 : A < h;
388
+ let x, E = !1;
389
+ const T = 1, U = Math.ceil(e / T);
390
+ for (let q = 0; q < U && (x = Math.abs(v) > l, !(!x && (_ = Math.abs(h - y) <= r, _))); ++q) {
391
+ R && (E = y == h || y > h == w, E && (v = -v * p, y = h));
392
+ const L = -a.tension * 1e-6 * (y - h), B = -a.friction * 1e-3 * v, m = (L + B) / a.mass;
393
+ v = v + m * T, y = y + v * T;
392
394
  }
393
395
  }
394
396
  else {
395
- let h = 1;
396
- a.duration > 0 && (this._memoizedDuration !== a.duration && (this._memoizedDuration = a.duration, f.durationProgress > 0 && (f.elapsedTime = a.duration * f.durationProgress, _ = f.elapsedTime += e)), h = (a.progress || 0) + _ / this._memoizedDuration, h = h > 1 ? 1 : h < 0 ? 0 : h, f.durationProgress = h), y = d + a.easing(h) * (l - d), c = (y - f.lastPosition) / e, P = h == 1;
397
+ let l = 1;
398
+ a.duration > 0 && (this._memoizedDuration !== a.duration && (this._memoizedDuration = a.duration, f.durationProgress > 0 && (f.elapsedTime = a.duration * f.durationProgress, d = f.elapsedTime += e)), l = (a.progress || 0) + d / this._memoizedDuration, l = l > 1 ? 1 : l < 0 ? 0 : l, f.durationProgress = l), y = A + a.easing(l) * (h - A), v = (y - f.lastPosition) / e, _ = l == 1;
397
399
  }
398
- f.lastVelocity = c, Number.isNaN(y) && (P = !0);
400
+ f.lastVelocity = v, Number.isNaN(y) && (_ = !0);
399
401
  }
400
- u && !u[S].done && (P = !1), P ? f.done = !0 : t = !1, f.setValue(y, a.round) && (i = !0);
402
+ c && !c[b].done && (_ = !1), _ ? f.done = !0 : t = !1, f.setValue(y, a.round) && (i = !0);
401
403
  });
402
- const r = $(this), p = r.getValue();
404
+ const u = $(this), g = u.getValue();
403
405
  if (t) {
404
- const f = z(s.to);
405
- (p !== f || i) && !a.decay ? (r.setValue(f), this._onChange(f)) : i && a.decay && this._onChange(p), this._stop();
406
- } else i && this._onChange(p);
406
+ const f = Q(s.to);
407
+ (g !== f || i) && !a.decay ? (u.setValue(f), this._onChange(f)) : i && a.decay && this._onChange(g), this._stop();
408
+ } else i && this._onChange(g);
407
409
  }
408
410
  /** Set the current value, while stopping the current animation */
409
411
  set(e) {
410
- return U.batchedUpdates(() => {
412
+ return N.batchedUpdates(() => {
411
413
  this._stop(), this._focus(e), this._set(e);
412
414
  }), this;
413
415
  }
@@ -424,9 +426,9 @@ var Ge = class extends Error {
424
426
  }
425
427
  /** Skip to the end of the current animation. */
426
428
  finish() {
427
- if (Y(this)) {
429
+ if (J(this)) {
428
430
  const { to: e, config: t } = this.animation;
429
- U.batchedUpdates(() => {
431
+ N.batchedUpdates(() => {
430
432
  this._onStart(), t.decay || this._set(e, !1), this._stop();
431
433
  });
432
434
  }
@@ -440,7 +442,7 @@ var Ge = class extends Error {
440
442
  let i;
441
443
  return o.und(e) ? (i = this.queue || [], this.queue = []) : i = [o.obj(e) ? e : { ...t, to: e }], Promise.all(
442
444
  i.map((s) => this._update(s))
443
- ).then((s) => ke(this, s));
445
+ ).then((s) => Ue(this, s));
444
446
  }
445
447
  /**
446
448
  * Stop the current animation, and cancel any delayed updates.
@@ -449,7 +451,7 @@ var Ge = class extends Error {
449
451
  */
450
452
  stop(e) {
451
453
  const { to: t } = this.animation;
452
- return this._focus(this.get()), me(this._state, e && this._lastCallId), U.batchedUpdates(() => this._stop(t, e)), this;
454
+ return o.und(t) || this._focus(this.get()), Pe(this._state, e && this._lastCallId), N.batchedUpdates(() => this._stop(t, e)), this;
453
455
  }
454
456
  /** Restart the animation. */
455
457
  reset() {
@@ -468,18 +470,18 @@ var Ge = class extends Error {
468
470
  _prepareNode(e) {
469
471
  const t = this.key || "";
470
472
  let { to: i, from: s } = e;
471
- i = o.obj(i) ? i[t] : i, (i == null || Ce(i)) && (i = void 0), s = o.obj(s) ? s[t] : s, s == null && (s = void 0);
473
+ i = o.obj(i) ? i[t] : i, (i == null || Re(i)) && (i = void 0), s = o.obj(s) ? s[t] : s, s == null && (s = void 0);
472
474
  const n = { to: i, from: s };
473
- return Se(this) || (e.reverse && ([i, s] = [s, i]), s = z(s), o.und(s) ? $(this) || this._set(i) : this._set(s)), n;
475
+ return Se(this) || (e.reverse && ([i, s] = [s, i]), s = Q(s), o.und(s) ? $(this) || this._set(i) : this._set(s)), n;
474
476
  }
475
477
  /** Every update is processed by this method before merging. */
476
478
  _update({ ...e }, t) {
477
479
  const { key: i, defaultProps: s } = this;
478
480
  e.default && Object.assign(
479
481
  s,
480
- Pe(
482
+ ve(
481
483
  e,
482
- (u, r) => /^on/.test(r) ? nt(u, i) : u
484
+ (c, u) => /^on/.test(u) ? nt(c, i) : c
483
485
  )
484
486
  ), Ye(this, e, "onProps"), re(this, "onProps", e, this);
485
487
  const n = this._prepareNode(e);
@@ -498,27 +500,27 @@ var Ge = class extends Error {
498
500
  ae(this) || (He(this, !0), ce(a.pauseQueue), re(
499
501
  this,
500
502
  "onPause",
501
- D(this, oe(this, this.animation.to)),
503
+ z(this, oe(this, this.animation.to)),
502
504
  this
503
505
  ));
504
506
  },
505
507
  resume: () => {
506
- ae(this) && (He(this, !1), Y(this) && this._resume(), ce(a.resumeQueue), re(
508
+ ae(this) && (He(this, !1), J(this) && this._resume(), ce(a.resumeQueue), re(
507
509
  this,
508
510
  "onResume",
509
- D(this, oe(this, this.animation.to)),
511
+ z(this, oe(this, this.animation.to)),
510
512
  this
511
513
  ));
512
514
  },
513
515
  start: this._merge.bind(this, n)
514
516
  }
515
- }).then((u) => {
516
- if (e.loop && u.finished && !(t && u.noop)) {
517
- const r = ht(e);
518
- if (r)
519
- return this._update(r, !0);
517
+ }).then((c) => {
518
+ if (e.loop && c.finished && !(t && c.noop)) {
519
+ const u = ht(e);
520
+ if (u)
521
+ return this._update(u, !0);
520
522
  }
521
- return u;
523
+ return c;
522
524
  });
523
525
  }
524
526
  /** Merge props into the current animation */
@@ -531,81 +533,81 @@ var Ge = class extends Error {
531
533
  this._lastToId = t.callId;
532
534
  else
533
535
  return i(ie(this));
534
- const { key: a, defaultProps: u, animation: r } = this, { to: p, from: f } = r;
535
- let { to: S = p, from: l = f } = e;
536
- n && !s && (!t.default || o.und(S)) && (S = l), t.reverse && ([S, l] = [l, S]);
537
- const P = !K(l, f);
538
- P && (r.from = l), l = z(l);
539
- const y = !K(S, p);
540
- y && this._focus(S);
541
- const _ = Ce(t.to), { config: d } = r, { decay: m, velocity: c } = d;
542
- (s || n) && (d.velocity = 0), t.config && !_ && jt(
543
- d,
544
- E(t.config, a),
536
+ const { key: a, defaultProps: c, animation: u } = this, { to: g, from: f } = u;
537
+ let { to: b = g, from: h = f } = e;
538
+ n && !s && (!t.default || o.und(b)) && (b = h), t.reverse && ([b, h] = [h, b]);
539
+ const _ = !K(h, f);
540
+ _ && (u.from = h), h = Q(h);
541
+ const y = !K(b, g);
542
+ y && this._focus(b);
543
+ const d = Re(t.to), { config: A } = u, { decay: I, velocity: v } = A;
544
+ (s || n) && (A.velocity = 0), t.config && !d && qt(
545
+ A,
546
+ O(t.config, a),
545
547
  // Avoid calling the same "config" prop twice.
546
- t.config !== u.config ? E(u.config, a) : void 0
548
+ t.config !== c.config ? O(c.config, a) : void 0
547
549
  );
548
- let v = $(this);
549
- if (!v || o.und(S))
550
- return i(D(this, !0));
551
- const h = (
550
+ let r = $(this);
551
+ if (!r || o.und(b))
552
+ return i(z(this, !0));
553
+ const l = (
552
554
  // When `reset` is undefined, the `from` prop implies `reset: true`,
553
555
  // except for declarative updates. When `reset` is defined, there
554
556
  // must exist a value to animate from.
555
- o.und(t.reset) ? n && !t.default : !o.und(l) && he(t.reset, a)
556
- ), w = h ? l : this.get(), C = de(S), Q = o.num(C) || o.arr(C) || tt(C), R = !_ && (!Q || he(u.immediate || t.immediate, a));
557
+ o.und(t.reset) ? n && !t.default : !o.und(h) && he(t.reset, a)
558
+ ), p = l ? h : this.get(), R = de(b), w = o.num(R) || o.arr(R) || tt(R), x = !d && (!w || he(c.immediate || t.immediate, a));
557
559
  if (y) {
558
- const O = Ae(S);
559
- if (O !== v.constructor)
560
- if (R)
561
- v = this._set(C);
560
+ const q = Ae(b);
561
+ if (q !== r.constructor)
562
+ if (x)
563
+ r = this._set(R);
562
564
  else
563
565
  throw Error(
564
- `Cannot animate between ${v.constructor.name} and ${O.name}, as the "to" prop suggests`
566
+ `Cannot animate between ${r.constructor.name} and ${q.name}, as the "to" prop suggests`
565
567
  );
566
568
  }
567
- const N = v.constructor;
568
- let x = W(S), q = !1;
569
- if (!x) {
570
- const O = h || !Se(this) && P;
571
- (y || O) && (q = K(de(w), C), x = !q), (!K(r.immediate, R) && !R || !K(d.decay, m) || !K(d.velocity, c)) && (x = !0);
569
+ const E = r.constructor;
570
+ let T = Y(b), U = !1;
571
+ if (!T) {
572
+ const q = l || !Se(this) && _;
573
+ (y || q) && (U = K(de(p), R), T = !U), (!K(u.immediate, x) && !x || !K(A.decay, I) || !K(A.velocity, v)) && (T = !0);
572
574
  }
573
- if (q && Y(this) && (r.changed && !h ? x = !0 : x || this._stop(p)), !_ && ((x || W(p)) && (r.values = v.getPayload(), r.toValues = W(S) ? null : N == ze ? [1] : M(C)), r.immediate != R && (r.immediate = R, !R && !h && this._set(p)), x)) {
574
- const { onRest: O } = r;
575
- I(Nt, (L) => Ye(this, t, L));
576
- const B = D(this, oe(this, p));
577
- ce(this._pendingCalls, B), this._pendingCalls.add(i), r.changed && U.batchedUpdates(() => {
578
- var L;
579
- r.changed = !h, O == null || O(B, this), h ? E(u.onRest, B) : (L = r.onStart) == null || L.call(r, B, this);
575
+ if (U && J(this) && (u.changed && !l ? T = !0 : T || this._stop(g)), !d && ((T || Y(g)) && (u.values = r.getPayload(), u.toValues = Y(b) ? null : E == ze ? [1] : j(R)), u.immediate != x && (u.immediate = x, !x && !l && this._set(g)), T)) {
576
+ const { onRest: q } = u;
577
+ S(Qt, (B) => Ye(this, t, B));
578
+ const L = z(this, oe(this, g));
579
+ ce(this._pendingCalls, L), this._pendingCalls.add(i), u.changed && N.batchedUpdates(() => {
580
+ var B;
581
+ u.changed = !l, q == null || q(L, this), l ? O(c.onRest, L) : (B = u.onStart) == null || B.call(u, L, this);
580
582
  });
581
583
  }
582
- h && this._set(w), _ ? i(ft(t.to, t, this._state, this)) : x ? this._start() : Y(this) && !y ? this._pendingCalls.add(i) : i(ct(w));
584
+ l && this._set(p), d ? i(ft(t.to, t, this._state, this)) : T ? this._start() : J(this) && !y ? this._pendingCalls.add(i) : i(ct(p));
583
585
  }
584
586
  /** Update the `animation.to` value, which might be a `FluidValue` */
585
587
  _focus(e) {
586
588
  const t = this.animation;
587
- e !== t.to && (Qe(this) && this._detach(), t.to = e, Qe(this) && this._attach());
589
+ e !== t.to && (Ne(this) && this._detach(), t.to = e, Ne(this) && this._attach());
588
590
  }
589
591
  _attach() {
590
592
  let e = 0;
591
593
  const { to: t } = this.animation;
592
- W(t) && (ve(t, this), Te(t) && (e = t.priority + 1)), this.priority = e;
594
+ Y(t) && (ye(t, this), xe(t) && (e = t.priority + 1)), this.priority = e;
593
595
  }
594
596
  _detach() {
595
597
  const { to: e } = this.animation;
596
- W(e) && et(e, this);
598
+ Y(e) && et(e, this);
597
599
  }
598
600
  /**
599
601
  * Update the current value from outside the frameloop,
600
602
  * and return the `Animated` node.
601
603
  */
602
604
  _set(e, t = !0) {
603
- const i = z(e);
605
+ const i = Q(e);
604
606
  if (!o.und(i)) {
605
607
  const s = $(this);
606
608
  if (!s || !K(i, s.getValue())) {
607
609
  const n = Ae(i);
608
- !s || s.constructor != n ? st(this, n.create(i)) : s.setValue(i), s && U.batchedUpdates(() => {
610
+ !s || s.constructor != n ? st(this, n.create(i)) : s.setValue(i), s && N.batchedUpdates(() => {
609
611
  this._onChange(i, t);
610
612
  });
611
613
  }
@@ -617,22 +619,22 @@ var Ge = class extends Error {
617
619
  e.changed || (e.changed = !0, re(
618
620
  this,
619
621
  "onStart",
620
- D(this, oe(this, e.to)),
622
+ z(this, oe(this, e.to)),
621
623
  this
622
624
  ));
623
625
  }
624
626
  _onChange(e, t) {
625
- t || (this._onStart(), E(this.animation.onChange, e, this)), E(this.defaultProps.onChange, e, this), super._onChange(e, t);
627
+ t || (this._onStart(), O(this.animation.onChange, e, this)), O(this.defaultProps.onChange, e, this), super._onChange(e, t);
626
628
  }
627
629
  // This method resets the animation state (even if already animating) to
628
630
  // ensure the latest from/to range is used, and it also ensures this spring
629
631
  // is added to the frameloop.
630
632
  _start() {
631
633
  const e = this.animation;
632
- $(this).reset(z(e.to)), e.immediate || (e.fromValues = e.values.map((t) => t.lastPosition)), Y(this) || ($e(this, !0), ae(this) || this._resume());
634
+ $(this).reset(Q(e.to)), e.immediate || (e.fromValues = e.values.map((t) => t.lastPosition)), J(this) || ($e(this, !0), ae(this) || this._resume());
633
635
  }
634
636
  _resume() {
635
- H.skipAnimation ? this.finish() : Oe.start(this);
637
+ W.skipAnimation ? this.finish() : Oe.start(this);
636
638
  }
637
639
  /**
638
640
  * Exit the frameloop and notify `onRest` listeners.
@@ -640,16 +642,16 @@ var Ge = class extends Error {
640
642
  * Always wrap `_stop` calls with `batchedUpdates`.
641
643
  */
642
644
  _stop(e, t) {
643
- if (Y(this)) {
645
+ if (J(this)) {
644
646
  $e(this, !1);
645
647
  const i = this.animation;
646
- I(i.values, (n) => {
648
+ S(i.values, (n) => {
647
649
  n.done = !0;
648
- }), i.toValues && (i.onChange = i.onPause = i.onResume = void 0), ye(this, {
650
+ }), i.toValues && (i.onChange = i.onPause = i.onResume = void 0), _e(this, {
649
651
  type: "idle",
650
652
  parent: this
651
653
  });
652
- const s = t ? ie(this.get()) : D(this.get(), oe(this, e ?? i.to));
654
+ const s = t ? ie(this.get()) : z(this.get(), oe(this, e ?? i.to));
653
655
  ce(this._pendingCalls, s), i.changed && (i.changed = !1, re(this, "onRest", s, this));
654
656
  }
655
657
  }
@@ -659,10 +661,10 @@ function oe(e, t) {
659
661
  return K(s, i);
660
662
  }
661
663
  function ht(e, t = e.loop, i = e.to) {
662
- const s = E(t);
664
+ const s = O(t);
663
665
  if (s) {
664
- const n = s !== !0 && je(s), a = (n || e).reverse, u = !n || n.reset;
665
- return ge({
666
+ const n = s !== !0 && qe(s), a = (n || e).reverse, c = !n || n.reset;
667
+ return me({
666
668
  ...e,
667
669
  loop: t,
668
670
  // Avoid updating default props when looping.
@@ -672,28 +674,28 @@ function ht(e, t = e.loop, i = e.to) {
672
674
  // For the "reverse" prop to loop as expected, the "to" prop
673
675
  // must be undefined. The "reverse" prop is ignored when the
674
676
  // "to" prop is an array or function.
675
- to: !a || Ce(i) ? i : void 0,
677
+ to: !a || Re(i) ? i : void 0,
676
678
  // Ignore the "from" prop except on reset.
677
- from: u ? e.from : void 0,
678
- reset: u,
679
+ from: c ? e.from : void 0,
680
+ reset: c,
679
681
  // The "loop" prop can return a "useSpring" props object to
680
682
  // override any of the original props.
681
683
  ...n
682
684
  });
683
685
  }
684
686
  }
685
- function ge(e) {
686
- const { to: t, from: i } = e = je(e), s = /* @__PURE__ */ new Set();
687
+ function me(e) {
688
+ const { to: t, from: i } = e = qe(e), s = /* @__PURE__ */ new Set();
687
689
  return o.obj(t) && Je(t, s), o.obj(i) && Je(i, s), e.keys = s.size ? Array.from(s) : null, e;
688
690
  }
689
- function Qt(e) {
690
- const t = ge(e);
691
- return o.und(t.default) && (t.default = Pe(t)), t;
691
+ function Nt(e) {
692
+ const t = me(e);
693
+ return o.und(t.default) && (t.default = ve(t)), t;
692
694
  }
693
695
  function Je(e, t) {
694
696
  se(e, (i, s) => i != null && t.add(s));
695
697
  }
696
- var Nt = [
698
+ var Qt = [
697
699
  "onStart",
698
700
  "onRest",
699
701
  "onChange",
@@ -704,12 +706,12 @@ function Ye(e, t, i) {
704
706
  e.animation[i] = t[i] !== at(t, i) ? nt(t[i], e.key) : void 0;
705
707
  }
706
708
  function re(e, t, ...i) {
707
- var s, n, a, u;
708
- (n = (s = e.animation)[t]) == null || n.call(s, ...i), (u = (a = e.defaultProps)[t]) == null || u.call(a, ...i);
709
+ var s, n, a, c;
710
+ (n = (s = e.animation)[t]) == null || n.call(s, ...i), (c = (a = e.defaultProps)[t]) == null || c.call(a, ...i);
709
711
  }
710
- var zt = ["onStart", "onChange", "onRest"], Bt = 1, dt = class {
712
+ var zt = ["onStart", "onChange", "onRest"], Lt = 1, dt = class {
711
713
  constructor(e, t) {
712
- this.id = Bt++, this.springs = {}, this.queue = [], this._lastAsyncId = 0, this._active = /* @__PURE__ */ new Set(), this._changed = /* @__PURE__ */ new Set(), this._started = !1, this._state = {
714
+ this.id = Lt++, this.springs = {}, this.queue = [], this._lastAsyncId = 0, this._active = /* @__PURE__ */ new Set(), this._changed = /* @__PURE__ */ new Set(), this._started = !1, this._state = {
713
715
  paused: !1,
714
716
  pauseQueue: /* @__PURE__ */ new Set(),
715
717
  resumeQueue: /* @__PURE__ */ new Set(),
@@ -747,7 +749,7 @@ var zt = ["onStart", "onChange", "onRest"], Bt = 1, dt = class {
747
749
  }
748
750
  /** Push an update onto the queue of each value. */
749
751
  update(e) {
750
- return e && this.queue.push(ge(e)), this;
752
+ return e && this.queue.push(me(e)), this;
751
753
  }
752
754
  /**
753
755
  * Start the queued animations for every spring, and resolve the returned
@@ -758,15 +760,15 @@ var zt = ["onStart", "onChange", "onRest"], Bt = 1, dt = class {
758
760
  */
759
761
  start(e) {
760
762
  let { queue: t } = this;
761
- return e ? t = M(e).map(ge) : this.queue = [], this._flush ? this._flush(this, t) : (yt(this, t), Ee(this, t));
763
+ return e ? t = j(e).map(me) : this.queue = [], this._flush ? this._flush(this, t) : (yt(this, t), Me(this, t));
762
764
  }
763
765
  /** @internal */
764
766
  stop(e, t) {
765
767
  if (e !== !!e && (t = e), t) {
766
768
  const i = this.springs;
767
- I(M(t), (s) => i[s].stop(!!e));
769
+ S(j(t), (s) => i[s].stop(!!e));
768
770
  } else
769
- me(this._state, this._lastAsyncId), this.each((i) => i.stop(!!e));
771
+ Pe(this._state, this._lastAsyncId), this.each((i) => i.stop(!!e));
770
772
  return this;
771
773
  }
772
774
  /** Freeze the active animation in time */
@@ -775,7 +777,7 @@ var zt = ["onStart", "onChange", "onRest"], Bt = 1, dt = class {
775
777
  this.start({ pause: !0 });
776
778
  else {
777
779
  const t = this.springs;
778
- I(M(e), (i) => t[i].pause());
780
+ S(j(e), (i) => t[i].pause());
779
781
  }
780
782
  return this;
781
783
  }
@@ -785,7 +787,7 @@ var zt = ["onStart", "onChange", "onRest"], Bt = 1, dt = class {
785
787
  this.start({ pause: !1 });
786
788
  else {
787
789
  const t = this.springs;
788
- I(M(e), (i) => t[i].resume());
790
+ S(j(e), (i) => t[i].resume());
789
791
  }
790
792
  return this;
791
793
  }
@@ -793,17 +795,29 @@ var zt = ["onStart", "onChange", "onRest"], Bt = 1, dt = class {
793
795
  each(e) {
794
796
  se(this.springs, e);
795
797
  }
798
+ /**
799
+ * Subscribe to loop iteration restarts on this controller. Returns an
800
+ * unsubscribe function. Listeners fire synchronously inside `flushUpdate`
801
+ * just before the next iteration is dispatched.
802
+ * @internal
803
+ */
804
+ onLoopReset(e) {
805
+ const t = this._onLoopReset ?? (this._onLoopReset = /* @__PURE__ */ new Set());
806
+ return t.add(e), () => {
807
+ t.delete(e);
808
+ };
809
+ }
796
810
  /** @internal Called at the end of every animation frame */
797
811
  _onFrame() {
798
812
  const { onStart: e, onChange: t, onRest: i } = this._events, s = this._active.size > 0, n = this._changed.size > 0;
799
- (s && !this._started || n && !this._started) && (this._started = !0, _e(e, ([r, p]) => {
800
- p.value = this.get(), r(p, this, this._item);
813
+ (s && !this._started || n && !this._started) && (this._started = !0, pe(e, ([u, g]) => {
814
+ g.value = this.get(), u(g, this, this._item);
801
815
  }));
802
- const a = !s && this._started, u = n || a && i.size ? this.get() : null;
803
- n && t.size && _e(t, ([r, p]) => {
804
- p.value = u, r(p, this, this._item);
805
- }), a && (this._started = !1, _e(i, ([r, p]) => {
806
- p.value = u, r(p, this, this._item);
816
+ const a = !s && this._started, c = n || a && i.size ? this.get() : null;
817
+ n && t.size && pe(t, ([u, g]) => {
818
+ g.value = c, u(g, this, this._item);
819
+ }), a && (this._started = !1, pe(i, ([u, g]) => {
820
+ g.value = c, u(g, this, this._item);
807
821
  }));
808
822
  }
809
823
  /** @internal */
@@ -813,89 +827,90 @@ var zt = ["onStart", "onChange", "onRest"], Bt = 1, dt = class {
813
827
  else if (e.type == "idle")
814
828
  this._active.delete(e.parent);
815
829
  else return;
816
- U.onFrame(this._onFrame);
830
+ N.onFrame(this._onFrame);
817
831
  }
818
832
  };
819
- function Ee(e, t) {
833
+ function Me(e, t) {
820
834
  return Promise.all(t.map((i) => mt(e, i))).then(
821
- (i) => ke(e, i)
835
+ (i) => Ue(e, i)
822
836
  );
823
837
  }
824
838
  async function mt(e, t, i) {
825
- const { keys: s, to: n, from: a, loop: u, onRest: r, onResolve: p } = t, f = o.obj(t.default) && t.default;
826
- u && (t.loop = !1), n === !1 && (t.to = null), a === !1 && (t.from = null);
827
- const S = o.arr(n) || o.fun(n) ? n : void 0;
828
- S ? (t.to = void 0, t.onRest = void 0, f && (f.onRest = void 0)) : I(zt, (d) => {
829
- const m = t[d];
830
- if (o.fun(m)) {
831
- const c = e._events[d];
832
- t[d] = ({ finished: v, cancelled: h }) => {
833
- const w = c.get(m);
834
- w ? (v || (w.finished = !1), h && (w.cancelled = !0)) : c.set(m, {
839
+ var A;
840
+ const { keys: s, to: n, from: a, loop: c, onRest: u, onResolve: g } = t, f = o.obj(t.default) && t.default;
841
+ c && (t.loop = !1), n === !1 && (t.to = null), a === !1 && (t.from = null);
842
+ const b = o.arr(n) || o.fun(n) ? n : void 0;
843
+ b ? (t.to = void 0, t.onRest = void 0, f && (f.onRest = void 0)) : S(zt, (I) => {
844
+ const v = t[I];
845
+ if (o.fun(v)) {
846
+ const r = e._events[I];
847
+ t[I] = ({ finished: l, cancelled: p }) => {
848
+ const R = r.get(v);
849
+ R ? (l || (R.finished = !1), p && (R.cancelled = !0)) : r.set(v, {
835
850
  value: null,
836
- finished: v || !1,
837
- cancelled: h || !1
851
+ finished: l || !1,
852
+ cancelled: p || !1
838
853
  });
839
- }, f && (f[d] = t[d]);
854
+ }, f && (f[I] = t[I]);
840
855
  }
841
856
  });
842
- const l = e._state;
843
- t.pause === !l.paused ? (l.paused = t.pause, ce(t.pause ? l.pauseQueue : l.resumeQueue)) : l.paused && (t.pause = !0);
844
- const P = (s || Object.keys(e.springs)).map(
845
- (d) => e.springs[d].start(t)
857
+ const h = e._state;
858
+ t.pause === !h.paused ? (h.paused = t.pause, ce(t.pause ? h.pauseQueue : h.resumeQueue)) : h.paused && (t.pause = !0);
859
+ const _ = (s || Object.keys(e.springs)).map(
860
+ (I) => e.springs[I].start(t)
846
861
  ), y = t.cancel === !0 || at(t, "cancel") === !0;
847
- (S || y && l.asyncId) && P.push(
862
+ (b || y && h.asyncId) && _.push(
848
863
  ut(++e._lastAsyncId, {
849
864
  props: t,
850
- state: l,
865
+ state: h,
851
866
  actions: {
852
- pause: Ne,
853
- resume: Ne,
854
- start(d, m) {
855
- y ? (me(l, e._lastAsyncId), m(ie(e))) : (d.onRest = r, m(
867
+ pause: Qe,
868
+ resume: Qe,
869
+ start(I, v) {
870
+ y ? (Pe(h, e._lastAsyncId), v(ie(e))) : (I.onRest = u, v(
856
871
  ft(
857
- S,
858
- d,
859
- l,
872
+ b,
873
+ I,
874
+ h,
860
875
  e
861
876
  )
862
877
  ));
863
878
  }
864
879
  }
865
880
  })
866
- ), l.paused && await new Promise((d) => {
867
- l.resumeQueue.add(d);
881
+ ), h.paused && await new Promise((I) => {
882
+ h.resumeQueue.add(I);
868
883
  });
869
- const _ = ke(e, await Promise.all(P));
870
- if (u && _.finished && !(i && _.noop)) {
871
- const d = ht(t, u, n);
872
- if (d)
873
- return yt(e, [d]), mt(e, d, !0);
884
+ const d = Ue(e, await Promise.all(_));
885
+ if (c && d.finished && !(i && d.noop)) {
886
+ const I = ht(t, c, n);
887
+ if (I)
888
+ return (A = e._onLoopReset) == null || A.forEach((v) => v()), yt(e, [I]), mt(e, I, !0);
874
889
  }
875
- return p && U.batchedUpdates(() => p(_, e, e.item)), _;
890
+ return g && N.batchedUpdates(() => g(d, e, e.item)), d;
876
891
  }
877
- function Me(e, t) {
892
+ function Ee(e, t) {
878
893
  const i = { ...e.springs };
879
- return t && I(M(t), (s) => {
880
- o.und(s.keys) && (s = ge(s)), o.obj(s.to) || (s = { ...s, to: void 0 }), _t(i, s, (n) => pt(n));
894
+ return t && S(j(t), (s) => {
895
+ o.und(s.keys) && (s = me(s)), o.obj(s.to) || (s = { ...s, to: void 0 }), _t(i, s, (n) => pt(n));
881
896
  }), gt(e, i), i;
882
897
  }
883
898
  function gt(e, t) {
884
899
  se(t, (i, s) => {
885
- e.springs[s] || (e.springs[s] = i, ve(i, e));
900
+ e.springs[s] || (e.springs[s] = i, ye(i, e));
886
901
  });
887
902
  }
888
903
  function pt(e, t) {
889
- const i = new Ut();
890
- return i.key = e, t && ve(i, t), i;
904
+ const i = new Dt();
905
+ return i.key = e, t && ye(i, t), i;
891
906
  }
892
907
  function _t(e, t, i) {
893
- t.keys && I(t.keys, (s) => {
908
+ t.keys && S(t.keys, (s) => {
894
909
  (e[s] || (e[s] = i(s)))._prepareNode(t);
895
910
  });
896
911
  }
897
912
  function yt(e, t) {
898
- I(t, (i) => {
913
+ S(t, (i) => {
899
914
  _t(e.springs, i, (s) => pt(s, e));
900
915
  });
901
916
  }
@@ -904,14 +919,14 @@ var vt = fe.createContext({
904
919
  immediate: !1
905
920
  }), Pt = () => {
906
921
  const e = [], t = function(s) {
907
- Ct();
922
+ wt();
908
923
  const n = [];
909
- return I(e, (a, u) => {
924
+ return S(e, (a, c) => {
910
925
  if (o.und(s))
911
926
  n.push(a.start());
912
927
  else {
913
- const r = i(s, a, u);
914
- r && n.push(a.start(r));
928
+ const u = i(s, a, c);
929
+ u && n.push(a.start(u));
915
930
  }
916
931
  }), n;
917
932
  };
@@ -921,87 +936,94 @@ var vt = fe.createContext({
921
936
  const n = e.indexOf(s);
922
937
  ~n && e.splice(n, 1);
923
938
  }, t.pause = function() {
924
- return I(e, (s) => s.pause(...arguments)), this;
939
+ return S(e, (s) => s.pause(...arguments)), this;
925
940
  }, t.resume = function() {
926
- return I(e, (s) => s.resume(...arguments)), this;
941
+ return S(e, (s) => s.resume(...arguments)), this;
927
942
  }, t.set = function(s) {
928
- I(e, (n, a) => {
929
- const u = o.fun(s) ? s(a, n) : s;
930
- u && n.set(u);
943
+ S(e, (n, a) => {
944
+ const c = o.fun(s) ? s(a, n) : s;
945
+ c && n.set(c);
931
946
  });
932
947
  }, t.start = function(s) {
933
948
  const n = [];
934
- return I(e, (a, u) => {
949
+ return S(e, (a, c) => {
935
950
  if (o.und(s))
936
951
  n.push(a.start());
937
952
  else {
938
- const r = this._getProps(s, a, u);
939
- r && n.push(a.start(r));
953
+ const u = this._getProps(s, a, c);
954
+ u && n.push(a.start(u));
940
955
  }
941
956
  }), n;
942
957
  }, t.stop = function() {
943
- return I(e, (s) => s.stop(...arguments)), this;
958
+ return S(e, (s) => s.stop(...arguments)), this;
944
959
  }, t.update = function(s) {
945
- return I(e, (n, a) => n.update(this._getProps(s, n, a))), this;
960
+ return S(e, (n, a) => n.update(this._getProps(s, n, a))), this;
946
961
  };
947
962
  const i = function(s, n, a) {
948
963
  return o.fun(s) ? s(a, n) : s;
949
964
  };
950
965
  return t._getProps = i, t;
951
966
  };
952
- function Lt(e, t, i) {
967
+ function Bt(e, t, i) {
953
968
  const s = o.fun(t) && t;
954
969
  s && !i && (i = []);
955
970
  const n = le(
956
971
  () => s || arguments.length == 3 ? Pt() : void 0,
957
972
  []
958
- ), a = te(0), u = Ze(), r = le(
973
+ ), a = Z(0), c = Ze(), u = le(
959
974
  () => ({
960
975
  ctrls: [],
961
976
  queue: [],
962
- flush(c, v) {
963
- const h = Me(c, v);
964
- return a.current > 0 && !r.queue.length && !Object.keys(h).some((C) => !c.springs[C]) ? Ee(c, v) : new Promise((C) => {
965
- gt(c, h), r.queue.push(() => {
966
- C(Ee(c, v));
967
- }), u();
977
+ flush(r, l) {
978
+ const p = Ee(r, l);
979
+ return a.current > 0 && !u.queue.length && !Object.keys(p).some((w) => !r.springs[w]) ? Me(r, l) : new Promise((w) => {
980
+ gt(r, p), u.queue.push(() => {
981
+ w(Me(r, l));
982
+ }), c();
968
983
  });
969
984
  }
970
985
  }),
971
986
  []
972
- ), p = te([...r.ctrls]), f = te([]), S = we(e) || 0;
987
+ ), g = Z([...u.ctrls]), f = Z([]), b = Z([]);
988
+ b.current = [];
989
+ const h = we(e) || 0;
973
990
  le(() => {
974
- I(p.current.slice(e, S), (c) => {
975
- Re(c, n), c.stop(!0);
976
- }), p.current.length = e, l(S, e);
991
+ S(g.current.slice(e, h), (r) => {
992
+ Ce(r, n), r.stop(!0);
993
+ }), g.current.length = e, _(h, e);
977
994
  }, [e]), le(() => {
978
- l(0, Math.min(S, e));
995
+ _(0, Math.min(h, e));
979
996
  }, i);
980
- function l(c, v) {
981
- for (let h = c; h < v; h++) {
982
- const w = p.current[h] || (p.current[h] = new dt(null, r.flush)), C = s ? s(h, w) : t[h];
983
- C && (f.current[h] = Qt(C));
997
+ function _(r, l) {
998
+ for (let p = r; p < l; p++) {
999
+ const R = g.current[p] || (g.current[p] = new dt(null, u.flush)), w = s ? s(p, R) : t[p];
1000
+ w && (f.current[p] = Nt(w));
984
1001
  }
985
1002
  }
986
- const P = p.current.map(
987
- (c, v) => Me(c, f.current[v])
988
- ), y = it(vt), _ = we(y), d = y !== _ && ot(y);
1003
+ const y = g.current.map(
1004
+ (r, l) => Ee(r, f.current[l])
1005
+ ), d = it(vt), A = we(d), I = d !== A && ot(d);
989
1006
  ue(() => {
990
- a.current++, r.ctrls = p.current;
991
- const { queue: c } = r;
992
- c.length && (r.queue = [], I(c, (v) => v())), I(p.current, (v, h) => {
993
- n == null || n.add(v), d && v.start({ default: y });
994
- const w = f.current[h];
995
- w && (rt(v, w.ref), v.ref ? v.queue.push(w) : v.start(w));
996
- });
1007
+ a.current++, u.ctrls = g.current;
1008
+ const { queue: r } = u;
1009
+ r.length && (u.queue = [], S(r, (p) => p()));
1010
+ const l = f.current.length > 0 ? f.current : b.current;
1011
+ S(g.current, (p, R) => {
1012
+ n == null || n.add(p), I && p.start({ default: d });
1013
+ const w = l[R];
1014
+ w && (rt(p, w.ref), p.ref ? p.queue.push({
1015
+ ...w,
1016
+ default: o.obj(w.default) ? { ...w.default } : w.default
1017
+ }) : p.start(w));
1018
+ }), f.current.length > 0 && (b.current = f.current), f.current = [];
997
1019
  }), Xe(() => () => {
998
- I(r.ctrls, (c) => c.stop(!0));
1020
+ S(u.ctrls, (r) => r.stop(!0));
999
1021
  });
1000
- const m = P.map((c) => ({ ...c }));
1001
- return n ? [m, n] : m;
1022
+ const v = y.map((r) => ({ ...r }));
1023
+ return n ? [v, n] : v;
1002
1024
  }
1003
1025
  function Xt(e, t) {
1004
- const i = o.fun(e), [[s], n] = Lt(
1026
+ const i = o.fun(e), [[s], n] = Bt(
1005
1027
  1,
1006
1028
  i ? e : [e],
1007
1029
  i ? [] : t
@@ -1012,154 +1034,155 @@ function Zt(e, t, i) {
1012
1034
  const s = o.fun(t) && t, {
1013
1035
  reset: n,
1014
1036
  sort: a,
1015
- trail: u = 0,
1016
- expires: r = !0,
1017
- exitBeforeEnter: p = !1,
1037
+ trail: c = 0,
1038
+ expires: u = !0,
1039
+ exitBeforeEnter: g = !1,
1018
1040
  onDestroyed: f,
1019
- ref: S,
1020
- config: l
1021
- } = s ? s() : t, P = le(
1041
+ ref: b,
1042
+ config: h
1043
+ } = s ? s() : t, _ = le(
1022
1044
  () => s || arguments.length == 3 ? Pt() : void 0,
1023
1045
  []
1024
- ), y = M(e), _ = [], d = te(null), m = n ? null : d.current;
1046
+ ), y = j(e), d = [], A = Z(null), I = n ? null : A.current;
1025
1047
  ue(() => {
1026
- d.current = _;
1027
- }), Xe(() => (I(_, (g) => {
1028
- P == null || P.add(g.ctrl), g.ctrl.ref = P;
1048
+ A.current = d;
1049
+ }), Xe(() => (S(d, (m) => {
1050
+ _ == null || _.add(m.ctrl), m.ctrl.ref = _;
1029
1051
  }), () => {
1030
- I(d.current, (g) => {
1031
- g.expired && clearTimeout(g.expirationId), Re(g.ctrl, P), g.ctrl.stop(!0);
1052
+ S(A.current, (m) => {
1053
+ m.expired && clearTimeout(m.expirationId), Ce(m.ctrl, _), m.ctrl.stop(!0);
1032
1054
  });
1033
1055
  }));
1034
- const c = Kt(y, s ? s() : t, m), v = n && d.current || [];
1056
+ const v = Kt(y, s ? s() : t, I), r = n && A.current || [];
1035
1057
  ue(
1036
- () => I(v, ({ ctrl: g, item: b, key: T }) => {
1037
- Re(g, P), E(f, b, T);
1058
+ () => S(r, ({ ctrl: m, item: P, key: V }) => {
1059
+ Ce(m, _), O(f, P, V);
1038
1060
  })
1039
1061
  );
1040
- const h = [];
1041
- if (m && I(m, (g, b) => {
1042
- g.expired ? (clearTimeout(g.expirationId), v.push(g)) : (b = h[b] = c.indexOf(g.key), ~b && (_[b] = g));
1043
- }), I(y, (g, b) => {
1044
- _[b] || (_[b] = {
1045
- key: c[b],
1046
- item: g,
1062
+ const l = [];
1063
+ if (I && S(I, (m, P) => {
1064
+ m.expired ? (clearTimeout(m.expirationId), r.push(m)) : (P = l[P] = v.indexOf(m.key), ~P && (d[P] = m));
1065
+ }), S(y, (m, P) => {
1066
+ d[P] || (d[P] = {
1067
+ key: v[P],
1068
+ item: m,
1047
1069
  phase: "mount",
1048
1070
  ctrl: new dt()
1049
- }, _[b].ctrl.item = g);
1050
- }), h.length) {
1051
- let g = -1;
1052
- const { leave: b } = s ? s() : t;
1053
- I(h, (T, V) => {
1054
- const A = m[V];
1055
- ~T ? (g = _.indexOf(A), _[g] = { ...A, item: y[T] }) : b && _.splice(++g, 0, A);
1071
+ }, d[P].ctrl.item = m);
1072
+ }), l.length) {
1073
+ let m = -1;
1074
+ const { leave: P } = s ? s() : t;
1075
+ S(l, (V, F) => {
1076
+ const C = I[F];
1077
+ ~V ? (m = d.indexOf(C), d[m] = { ...C, item: y[V] }) : P && d.splice(++m, 0, C);
1056
1078
  });
1057
1079
  }
1058
- o.fun(a) && _.sort((g, b) => a(g.item, b.item));
1059
- let w = -u;
1060
- const C = Ze(), Q = Pe(t), R = /* @__PURE__ */ new Map(), N = te(/* @__PURE__ */ new Map()), x = te(!1);
1061
- I(_, (g, b) => {
1062
- const T = g.key, V = g.phase, A = s ? s() : t;
1063
- let F, j;
1064
- const ee = E(A.delay || 0, T);
1065
- if (V == "mount")
1066
- F = A.enter, j = "enter";
1080
+ o.fun(a) && d.sort((m, P) => a(m.item, P.item));
1081
+ let p = -c;
1082
+ const R = Ze(), w = ve(t), x = /* @__PURE__ */ new Map(), E = Z(/* @__PURE__ */ new Map()), T = Z(!1);
1083
+ S(d, (m, P) => {
1084
+ const V = m.key, F = m.phase, C = s ? s() : t;
1085
+ let M, k;
1086
+ const te = O(C.delay || 0, V);
1087
+ if (F == "mount")
1088
+ M = C.enter, k = "enter";
1067
1089
  else {
1068
- const k = c.indexOf(T) < 0;
1069
- if (V != "leave")
1070
- if (k)
1071
- F = A.leave, j = "leave";
1072
- else if (F = A.update)
1073
- j = "update";
1090
+ const D = v.indexOf(V) < 0;
1091
+ if (F != "leave")
1092
+ if (D)
1093
+ M = C.leave, k = "leave";
1094
+ else if (M = C.update)
1095
+ k = "update";
1074
1096
  else return;
1075
- else if (!k)
1076
- F = A.enter, j = "enter";
1097
+ else if (!D)
1098
+ M = C.enter, k = "enter";
1077
1099
  else return;
1078
1100
  }
1079
- if (F = E(F, g.item, b), F = o.obj(F) ? je(F) : { to: F }, !F.config) {
1080
- const k = l || Q.config;
1081
- F.config = E(k, g.item, b, j);
1101
+ if (M = O(M, m.item, P), M = o.obj(M) ? qe(M) : { to: M }, !M.config) {
1102
+ const D = h || w.config;
1103
+ M.config = O(D, m.item, P, k);
1082
1104
  }
1083
- w += u;
1105
+ p += c;
1084
1106
  const G = {
1085
- ...Q,
1107
+ ...w,
1086
1108
  // we need to add our props.delay value you here.
1087
- delay: ee + w,
1088
- ref: S,
1089
- immediate: A.immediate,
1109
+ delay: te + p,
1110
+ ref: b,
1111
+ immediate: C.immediate,
1090
1112
  // This prevents implied resets.
1091
1113
  reset: !1,
1092
1114
  // Merge any phase-specific props.
1093
- ...F
1115
+ ...M
1094
1116
  };
1095
- if (j == "enter" && o.und(G.from)) {
1096
- const k = s ? s() : t, ne = o.und(k.initial) || m ? k.from : k.initial;
1097
- G.from = E(ne, g.item, b);
1117
+ if (k == "enter" && o.und(G.from)) {
1118
+ const D = s ? s() : t, ne = o.und(D.initial) || I ? D.from : D.initial;
1119
+ G.from = O(ne, m.item, P);
1098
1120
  }
1099
1121
  const { onResolve: St } = G;
1100
- G.onResolve = (k) => {
1101
- E(St, k);
1102
- const ne = d.current, J = ne.find((pe) => pe.key === T);
1103
- if (J && !(k.cancelled && J.phase != "update") && J.ctrl.idle) {
1104
- const pe = ne.every((X) => X.ctrl.idle);
1105
- if (J.phase == "leave") {
1106
- const X = E(r, J.item);
1122
+ G.onResolve = (D) => {
1123
+ O(St, D);
1124
+ const ne = A.current, H = ne.find((ge) => ge.key === V);
1125
+ if (H && !(D.cancelled && H.phase != "update") && H.ctrl.idle) {
1126
+ const ge = ne.every((X) => X.ctrl.idle);
1127
+ if (H.phase == "leave") {
1128
+ E.current.delete(H);
1129
+ const X = O(u, H.item);
1107
1130
  if (X !== !1) {
1108
1131
  const be = X === !0 ? 0 : X;
1109
- if (J.expired = !0, !pe && be > 0) {
1110
- be <= 2147483647 && (J.expirationId = setTimeout(C, be));
1132
+ if (H.expired = !0, !ge && be > 0) {
1133
+ be <= 2147483647 && (H.expirationId = setTimeout(R, be));
1111
1134
  return;
1112
1135
  }
1113
1136
  }
1114
1137
  }
1115
- pe && ne.some((X) => X.expired) && (N.current.delete(J), p && (x.current = !0), C());
1138
+ ge && ne.some((X) => X.expired) && (g && (T.current = !0), R());
1116
1139
  }
1117
1140
  };
1118
- const Ue = Me(g.ctrl, G);
1119
- j === "leave" && p ? N.current.set(g, { phase: j, springs: Ue, payload: G }) : R.set(g, { phase: j, springs: Ue, payload: G });
1141
+ const De = Ee(m.ctrl, G);
1142
+ k === "leave" && g ? E.current.set(m, { phase: k, springs: De, payload: G }) : x.set(m, { phase: k, springs: De, payload: G });
1120
1143
  });
1121
- const q = it(vt), O = we(q), B = q !== O && ot(q);
1144
+ const U = it(vt), q = we(U), L = U !== q && ot(U);
1122
1145
  ue(() => {
1123
- B && I(_, (g) => {
1124
- g.ctrl.start({ default: q });
1146
+ L && S(d, (m) => {
1147
+ m.ctrl.start({ default: U });
1125
1148
  });
1126
- }, [q]), I(R, (g, b) => {
1127
- if (N.current.size) {
1128
- const T = _.findIndex((V) => V.key === b.key);
1129
- _.splice(T, 1);
1149
+ }, [U]), S(x, (m, P) => {
1150
+ if (E.current.size) {
1151
+ const V = d.findIndex((F) => F.key === P.key);
1152
+ d.splice(V, 1);
1130
1153
  }
1131
1154
  }), ue(
1132
1155
  () => {
1133
- I(
1134
- N.current.size ? N.current : R,
1135
- ({ phase: g, payload: b }, T) => {
1136
- const { ctrl: V } = T;
1137
- T.phase = g, P == null || P.add(V), B && g == "enter" && V.start({ default: q }), b && (rt(V, b.ref), (V.ref || P) && !x.current ? V.update(b) : (V.start(b), x.current && (x.current = !1)));
1156
+ S(
1157
+ E.current.size ? E.current : x,
1158
+ ({ phase: m, payload: P }, V) => {
1159
+ const { ctrl: F } = V;
1160
+ V.phase = m, _ == null || _.add(F), L && m == "enter" && F.start({ default: U }), P && (rt(F, P.ref), (F.ref || _) && !T.current ? F.update(P) : (F.start(P), T.current && (T.current = !1)));
1138
1161
  }
1139
1162
  );
1140
1163
  },
1141
1164
  n ? void 0 : i
1142
1165
  );
1143
- const L = (g) => /* @__PURE__ */ fe.createElement(fe.Fragment, null, _.map((b, T) => {
1144
- const { springs: V } = R.get(b) || b.ctrl, A = g({ ...V }, b.item, b, T), F = o.str(b.key) || o.num(b.key) ? b.key : b.ctrl.id, j = fe.version < "19.0.0", ee = (A == null ? void 0 : A.props) ?? {}, G = j ? A == null ? void 0 : A.ref : ee == null ? void 0 : ee.ref;
1145
- return A && A.type ? /* @__PURE__ */ fe.createElement(A.type, { ...ee, key: F, ref: G }) : A;
1166
+ const B = (m) => /* @__PURE__ */ fe.createElement(fe.Fragment, null, d.map((P, V) => {
1167
+ const { springs: F } = x.get(P) || P.ctrl, C = m({ ...F }, P.item, P, V), M = o.str(P.key) || o.num(P.key) ? P.key : P.ctrl.id, k = fe.version < "19.0.0", te = (C == null ? void 0 : C.props) ?? {}, G = k ? C == null ? void 0 : C.ref : te == null ? void 0 : te.ref;
1168
+ return C && C.type ? /* @__PURE__ */ fe.createElement(C.type, { ...te, key: M, ref: G }) : C;
1146
1169
  }));
1147
- return P ? [L, P] : L;
1170
+ return _ ? [B, _] : B;
1148
1171
  }
1149
1172
  var Gt = 1;
1150
1173
  function Kt(e, { key: t, keys: i = t }, s) {
1151
1174
  if (i === null) {
1152
1175
  const n = /* @__PURE__ */ new Set();
1153
1176
  return e.map((a) => {
1154
- const u = s && s.find(
1155
- (r) => r.item === a && r.phase !== "leave" && !n.has(r)
1177
+ const c = s && s.find(
1178
+ (u) => u.item === a && u.phase !== "leave" && !n.has(u)
1156
1179
  );
1157
- return u ? (n.add(u), u.key) : Gt++;
1180
+ return c ? (n.add(c), c.key) : Gt++;
1158
1181
  });
1159
1182
  }
1160
- return o.und(i) ? e : o.fun(i) ? e.map(i) : M(i);
1183
+ return o.und(i) ? e : o.fun(i) ? e.map(i) : j(i);
1161
1184
  }
1162
- var bt = class extends De {
1185
+ var bt = class extends ke {
1163
1186
  constructor(e, t) {
1164
1187
  super(), this.source = e, this.idle = !0, this._active = /* @__PURE__ */ new Set(), this.calc = It(...t);
1165
1188
  const i = this._get(), s = Ae(i);
@@ -1170,31 +1193,31 @@ var bt = class extends De {
1170
1193
  K(t, i) || ($(this).setValue(t), this._onChange(t, this.idle)), !this.idle && We(this._active) && Ie(this);
1171
1194
  }
1172
1195
  _get() {
1173
- const e = o.arr(this.source) ? this.source.map(z) : M(z(this.source));
1196
+ const e = o.arr(this.source) ? this.source.map(Q) : j(Q(this.source));
1174
1197
  return this.calc(...e);
1175
1198
  }
1176
1199
  _start() {
1177
- this.idle && !We(this._active) && (this.idle = !1, I(qe(this), (e) => {
1200
+ this.idle && !We(this._active) && (this.idle = !1, S(je(this), (e) => {
1178
1201
  e.done = !1;
1179
- }), H.skipAnimation ? (U.batchedUpdates(() => this.advance()), Ie(this)) : Oe.start(this));
1202
+ }), W.skipAnimation ? (N.batchedUpdates(() => this.advance()), Ie(this)) : Oe.start(this));
1180
1203
  }
1181
1204
  // Observe our sources only when we're observed.
1182
1205
  _attach() {
1183
1206
  let e = 1;
1184
- I(M(this.source), (t) => {
1185
- W(t) && ve(t, this), Te(t) && (t.idle || this._active.add(t), e = Math.max(e, t.priority + 1));
1207
+ S(j(this.source), (t) => {
1208
+ Y(t) && ye(t, this), xe(t) && (t.idle || this._active.add(t), e = Math.max(e, t.priority + 1));
1186
1209
  }), this.priority = e, this._start();
1187
1210
  }
1188
1211
  // Stop observing our sources once we have no observers.
1189
1212
  _detach() {
1190
- I(M(this.source), (e) => {
1191
- W(e) && et(e, this);
1213
+ S(j(this.source), (e) => {
1214
+ Y(e) && et(e, this);
1192
1215
  }), this._active.clear(), Ie(this);
1193
1216
  }
1194
1217
  /** @internal */
1195
1218
  eventObserved(e) {
1196
- e.type == "change" ? e.idle ? this.advance() : (this._active.add(e.parent), this._start()) : e.type == "idle" ? this._active.delete(e.parent) : e.type == "priority" && (this.priority = M(this.source).reduce(
1197
- (t, i) => Math.max(t, (Te(i) ? i.priority : 0) + 1),
1219
+ e.type == "change" ? e.idle ? this.advance() : (this._active.add(e.parent), this._start()) : e.type == "idle" ? this._active.delete(e.parent) : e.type == "priority" && (this.priority = j(this.source).reduce(
1220
+ (t, i) => Math.max(t, (xe(i) ? i.priority : 0) + 1),
1198
1221
  0
1199
1222
  ));
1200
1223
  }
@@ -1206,34 +1229,34 @@ function We(e) {
1206
1229
  return !e.size || Array.from(e).every($t);
1207
1230
  }
1208
1231
  function Ie(e) {
1209
- e.idle || (e.idle = !0, I(qe(e), (t) => {
1232
+ e.idle || (e.idle = !0, S(je(e), (t) => {
1210
1233
  t.done = !0;
1211
- }), ye(e, {
1234
+ }), _e(e, {
1212
1235
  type: "idle",
1213
1236
  parent: e
1214
1237
  }));
1215
1238
  }
1216
1239
  var ei = (e, ...t) => new bt(e, t);
1217
- H.assign({
1218
- createStringInterpolator: xt,
1240
+ W.assign({
1241
+ createStringInterpolator: Tt,
1219
1242
  to: (e, t) => new bt(e, t)
1220
1243
  });
1221
1244
  export {
1222
1245
  Ge as BailSignal,
1223
1246
  dt as Controller,
1224
- De as FrameValue,
1225
- H as Globals,
1247
+ ke as FrameValue,
1248
+ W as Globals,
1226
1249
  bt as Interpolation,
1227
1250
  vt as SpringContext,
1228
1251
  Pt as SpringRef,
1229
- Ut as SpringValue,
1252
+ Dt as SpringValue,
1230
1253
  Ot as config,
1231
1254
  It as createInterpolator,
1232
- Rt as easings,
1233
- je as inferTo,
1255
+ Ct as easings,
1256
+ qe as inferTo,
1234
1257
  ei as to,
1235
1258
  ue as useIsomorphicLayoutEffect,
1236
1259
  Xt as useSpring,
1237
- Lt as useSprings,
1260
+ Bt as useSprings,
1238
1261
  Zt as useTransition
1239
1262
  };