@lanaco/lnc-react-ui 3.11.35 → 4.0.2

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 (218) hide show
  1. package/README.md +0 -3
  2. package/dist/Accordion.cjs +6 -0
  3. package/dist/Accordion.js +65 -0
  4. package/dist/AccordionDetails.cjs +7 -0
  5. package/dist/AccordionDetails.js +32 -0
  6. package/dist/AccordionSummary.cjs +12 -0
  7. package/dist/AccordionSummary.js +78 -0
  8. package/dist/ActionsToolbar.cjs +19 -0
  9. package/dist/ActionsToolbar.js +225 -0
  10. package/dist/Alert.cjs +40 -0
  11. package/dist/Alert.js +138 -0
  12. package/dist/Avatar.cjs +16 -0
  13. package/dist/Avatar.js +114 -0
  14. package/dist/Badge.cjs +17 -0
  15. package/dist/Badge.js +70 -0
  16. package/dist/Breadcrumbs.cjs +8 -0
  17. package/dist/Breadcrumbs.js +131 -0
  18. package/dist/Button.cjs +127 -0
  19. package/dist/Button.js +542 -0
  20. package/dist/ButtonGroup.cjs +44 -0
  21. package/dist/ButtonGroup.js +112 -0
  22. package/dist/CheckBoxInput.cjs +118 -0
  23. package/dist/CheckBoxInput.js +348 -0
  24. package/dist/Chip.cjs +27 -0
  25. package/dist/Chip.js +189 -0
  26. package/dist/ColorInput.cjs +60 -0
  27. package/dist/ColorInput.js +256 -0
  28. package/dist/ConfirmationForm.cjs +22 -0
  29. package/dist/ConfirmationForm.js +169 -0
  30. package/dist/Content.cjs +1 -0
  31. package/dist/Content.js +18 -0
  32. package/dist/CustomStyles-CqlCjTgU.cjs +8 -0
  33. package/dist/CustomStyles-nfD3J1mi.js +2881 -0
  34. package/dist/DataView.cjs +1 -0
  35. package/dist/DataView.js +62 -0
  36. package/dist/DateInput.cjs +296 -0
  37. package/dist/DateInput.js +7042 -0
  38. package/dist/DecimalInput.cjs +54 -0
  39. package/dist/DecimalInput.js +697 -0
  40. package/dist/DetailsView.cjs +18 -0
  41. package/dist/DetailsView.js +243 -0
  42. package/dist/DoubleRangeSlider.cjs +114 -0
  43. package/dist/DoubleRangeSlider.js +289 -0
  44. package/dist/DragAndDropFile.cjs +31 -0
  45. package/dist/DragAndDropFile.js +2331 -0
  46. package/dist/DragDropFiles.cjs +14 -0
  47. package/dist/DragDropFiles.js +175 -0
  48. package/dist/Drawer.cjs +6 -0
  49. package/dist/Drawer.js +206 -0
  50. package/dist/Dropdown.cjs +1 -0
  51. package/dist/Dropdown.js +266 -0
  52. package/dist/DropdownItem.cjs +36 -0
  53. package/dist/DropdownItem.js +241 -0
  54. package/dist/DropdownLookup.cjs +1 -0
  55. package/dist/DropdownLookup.js +325 -0
  56. package/dist/DropdownMenu-B6qr13ik.cjs +19 -0
  57. package/dist/DropdownMenu-DZi3TJ8Q.js +1547 -0
  58. package/dist/DropdownMenu.cjs +1 -0
  59. package/dist/DropdownMenu.js +12 -0
  60. package/dist/EditableTable.cjs +21 -0
  61. package/dist/EditableTable.js +462 -0
  62. package/dist/FileInput.cjs +47 -0
  63. package/dist/FileInput.js +206 -0
  64. package/dist/FlexBox.cjs +9 -0
  65. package/dist/FlexBox.js +97 -0
  66. package/dist/FlexGrid.cjs +1 -0
  67. package/dist/FlexGrid.js +78 -0
  68. package/dist/FlexGridItem.cjs +7 -0
  69. package/dist/FlexGridItem.js +97 -0
  70. package/dist/Footer.cjs +1 -0
  71. package/dist/Footer.js +18 -0
  72. package/dist/FormField.cjs +11 -0
  73. package/dist/FormField.js +65 -0
  74. package/dist/FormView.cjs +13 -0
  75. package/dist/FormView.js +354 -0
  76. package/dist/Grid.cjs +13 -0
  77. package/dist/Grid.js +62 -0
  78. package/dist/GridItem.cjs +15 -0
  79. package/dist/GridItem.js +72 -0
  80. package/dist/Header.cjs +1 -0
  81. package/dist/Header.js +18 -0
  82. package/dist/Icon.cjs +8 -0
  83. package/dist/Icon.js +59 -0
  84. package/dist/IconButton.cjs +122 -0
  85. package/dist/IconButton.js +481 -0
  86. package/dist/Kanban.cjs +85 -0
  87. package/dist/Kanban.js +4793 -0
  88. package/dist/KanbanActionsToolbar.cjs +19 -0
  89. package/dist/KanbanActionsToolbar.js +152 -0
  90. package/dist/KanbanCard-ConTmu3w.cjs +30 -0
  91. package/dist/KanbanCard-D9OhU8C6.js +175 -0
  92. package/dist/KanbanCard.cjs +1 -0
  93. package/dist/KanbanCard.js +12 -0
  94. package/dist/KanbanFooter.cjs +5 -0
  95. package/dist/KanbanFooter.js +84 -0
  96. package/dist/KanbanHeader.cjs +15 -0
  97. package/dist/KanbanHeader.js +127 -0
  98. package/dist/KanbanView.cjs +8 -0
  99. package/dist/KanbanView.js +255 -0
  100. package/dist/Link.cjs +15 -0
  101. package/dist/Link.js +62 -0
  102. package/dist/MenuItem.cjs +36 -0
  103. package/dist/MenuItem.js +230 -0
  104. package/dist/Modal.cjs +84 -0
  105. package/dist/Modal.js +372 -0
  106. package/dist/MultiSelectDropdown.cjs +1 -0
  107. package/dist/MultiSelectDropdown.js +261 -0
  108. package/dist/MultiSelectDropdownLookup.cjs +1 -0
  109. package/dist/MultiSelectDropdownLookup.js +274 -0
  110. package/dist/NestedDropdownItem.cjs +6 -0
  111. package/dist/NestedDropdownItem.js +102 -0
  112. package/dist/NestedMenuItem.cjs +6 -0
  113. package/dist/NestedMenuItem.js +115 -0
  114. package/dist/Notification.cjs +83 -0
  115. package/dist/Notification.js +1079 -0
  116. package/dist/NumberInput.cjs +45 -0
  117. package/dist/NumberInput.js +241 -0
  118. package/dist/PageLayout.cjs +26 -0
  119. package/dist/PageLayout.js +92 -0
  120. package/dist/PasswordInput.cjs +47 -0
  121. package/dist/PasswordInput.js +230 -0
  122. package/dist/ProgressBar.cjs +22 -0
  123. package/dist/ProgressBar.js +92 -0
  124. package/dist/RadioGroup.cjs +7 -0
  125. package/dist/RadioGroup.js +104 -0
  126. package/dist/RadioInput.cjs +117 -0
  127. package/dist/RadioInput.js +362 -0
  128. package/dist/RangeSlider.cjs +72 -0
  129. package/dist/RangeSlider.js +253 -0
  130. package/dist/SearchBar.cjs +100 -0
  131. package/dist/SearchBar.js +994 -0
  132. package/dist/Separator.cjs +6 -0
  133. package/dist/Separator.js +37 -0
  134. package/dist/Sidebar.cjs +39 -0
  135. package/dist/Sidebar.js +123 -0
  136. package/dist/Spinner.cjs +38 -0
  137. package/dist/Spinner.js +114 -0
  138. package/dist/Surface.cjs +7 -0
  139. package/dist/Surface.js +60 -0
  140. package/dist/SwipeableDrawer.cjs +33 -0
  141. package/dist/SwipeableDrawer.js +213 -0
  142. package/dist/Table.cjs +170 -0
  143. package/dist/Table.js +1408 -0
  144. package/dist/TableView-Cj5_fbSR.js +481 -0
  145. package/dist/TableView-D8ex512p.cjs +19 -0
  146. package/dist/TableView.cjs +1 -0
  147. package/dist/TableView.js +11 -0
  148. package/dist/Tabs.cjs +7 -0
  149. package/dist/Tabs.js +72 -0
  150. package/dist/TextAreaInput.cjs +33 -0
  151. package/dist/TextAreaInput.js +320 -0
  152. package/dist/TextInput.cjs +45 -0
  153. package/dist/TextInput.js +227 -0
  154. package/dist/ThemeProvider.cjs +113 -0
  155. package/dist/ThemeProvider.js +1340 -0
  156. package/dist/TimeInput.cjs +31 -0
  157. package/dist/TimeInput.js +133 -0
  158. package/dist/Toggle.cjs +151 -0
  159. package/dist/Toggle.js +421 -0
  160. package/dist/TreeMenu.cjs +15 -0
  161. package/dist/TreeMenu.js +108 -0
  162. package/dist/TreeMenuSeparator.cjs +6 -0
  163. package/dist/TreeMenuSeparator.js +40 -0
  164. package/dist/UploadedFile.cjs +39 -0
  165. package/dist/UploadedFile.js +192 -0
  166. package/dist/defineProperty-BHpTtkhC.js +110 -0
  167. package/dist/defineProperty-DHvxLH8G.cjs +1 -0
  168. package/dist/emotion-element-5486c51c.browser.esm-CSejtOeT.js +886 -0
  169. package/dist/emotion-element-5486c51c.browser.esm-QRQ5FSjv.cjs +1 -0
  170. package/dist/emotion-is-prop-valid.esm-BzFBwmJz.js +10 -0
  171. package/dist/emotion-is-prop-valid.esm-CMrshNb7.cjs +1 -0
  172. package/dist/emotion-react.browser.esm-DQBL7Wls.cjs +1 -0
  173. package/dist/emotion-react.browser.esm-OWM-uG8Q.js +94 -0
  174. package/dist/emotion-styled.browser.esm-BZSYYThs.js +210 -0
  175. package/dist/emotion-styled.browser.esm-Cbp_XsK4.cjs +1 -0
  176. package/dist/floating-ui.dom-1F2mTXOe.cjs +1 -0
  177. package/dist/floating-ui.dom-BdUovkEr.js +938 -0
  178. package/dist/hoist-non-react-statics.cjs-B8r9S_ak.cjs +15 -0
  179. package/dist/hoist-non-react-statics.cjs-Drf1aBlk.js +235 -0
  180. package/dist/index-BLQWNy78.js +109 -0
  181. package/dist/index-BP5r5zGN.cjs +1 -0
  182. package/dist/index-B_da1uvD.js +451 -0
  183. package/dist/index-BjdOz5Ok.cjs +1 -0
  184. package/dist/index-BklgDeu4.js +42 -0
  185. package/dist/index-C29T0m2a.cjs +174 -0
  186. package/dist/index-CZJEA84h.js +19069 -0
  187. package/dist/index-Cdkz-XH-.js +127 -0
  188. package/dist/index-D5vEbKUT.js +81 -0
  189. package/dist/index-DXnSjbfJ.cjs +20 -0
  190. package/dist/index-Ds9PUTwb.js +667 -0
  191. package/dist/index-Dzkd2i4n.cjs +1 -0
  192. package/dist/index-IO9v6o0I.cjs +5 -0
  193. package/dist/index-P-naJISQ.cjs +1 -0
  194. package/dist/index.cjs +26 -0
  195. package/dist/index.js +378 -0
  196. package/dist/motion-CtkUpWEn.js +3785 -0
  197. package/dist/motion-Oud-wpUz.cjs +1 -0
  198. package/dist/objectWithoutPropertiesLoose-Bz3hwpmU.cjs +1 -0
  199. package/dist/objectWithoutPropertiesLoose-DwEN6RBQ.js +12 -0
  200. package/dist/setPrototypeOf-4aSEnBDm.cjs +1 -0
  201. package/dist/setPrototypeOf-a891FLQJ.js +13 -0
  202. package/dist/style.css +5 -0
  203. package/dist/tslib.es6-ZNVz5r_T.js +90 -0
  204. package/dist/tslib.es6-fPwcSa2V.cjs +1 -0
  205. package/dist/use-isomorphic-layout-effect.browser.esm-CkGv31zs.cjs +1 -0
  206. package/dist/use-isomorphic-layout-effect.browser.esm-DERp5kr6.js +5 -0
  207. package/dist/useUpdateEffect-BtMgpgIV.cjs +1 -0
  208. package/dist/useUpdateEffect-CuYWz7EA.js +15 -0
  209. package/dist/utils-DEke8iwo.js +10196 -0
  210. package/dist/utils-hdRGTsQ7.cjs +13 -0
  211. package/eslint.config.js +38 -0
  212. package/package.json +137 -58
  213. package/vite.config.js +135 -0
  214. package/jest.config.js +0 -7
  215. package/lib/index.esm.js +0 -84028
  216. package/lib/index.js +0 -84165
  217. package/rc1 +0 -0
  218. package/test/jest/__mocks__/styleMock.js +0 -1
@@ -0,0 +1,3785 @@
1
+ import { a as h, b as J, c as W, d as H, e as Ln } from "./tslib.es6-ZNVz5r_T.js";
2
+ import * as St from "react";
3
+ import wn, { createContext as pt, useContext as z, useRef as It, useEffect as at, useLayoutEffect as fo, useCallback as lo, useMemo as re, forwardRef as co, createElement as vo } from "react";
4
+ var ot = function(t) {
5
+ return {
6
+ isEnabled: function(r) {
7
+ return t.some(function(e) {
8
+ return !!r[e];
9
+ });
10
+ }
11
+ };
12
+ }, ee = {
13
+ measureLayout: ot([
14
+ "layout",
15
+ "layoutId",
16
+ "drag",
17
+ "_layoutResetTransform"
18
+ ]),
19
+ animation: ot([
20
+ "animate",
21
+ "exit",
22
+ "variants",
23
+ "whileHover",
24
+ "whileTap",
25
+ "whileFocus",
26
+ "whileDrag"
27
+ ]),
28
+ exit: ot(["exit"]),
29
+ drag: ot(["drag", "dragControls"]),
30
+ focus: ot(["whileFocus"]),
31
+ hover: ot(["whileHover", "onHoverStart", "onHoverEnd"]),
32
+ tap: ot(["whileTap", "onTap", "onTapStart", "onTapCancel"]),
33
+ pan: ot([
34
+ "onPan",
35
+ "onPanStart",
36
+ "onPanSessionStart",
37
+ "onPanEnd"
38
+ ]),
39
+ layoutAnimation: ot(["layout", "layoutId"])
40
+ };
41
+ function mo(t) {
42
+ for (var r in t) {
43
+ var e = t[r];
44
+ e !== null && (ee[r].Component = e);
45
+ }
46
+ }
47
+ var br = function() {
48
+ }, X = function() {
49
+ };
50
+ process.env.NODE_ENV !== "production" && (br = function(t, r) {
51
+ !t && typeof console < "u" && console.warn(r);
52
+ }, X = function(t, r) {
53
+ if (!t)
54
+ throw new Error(r);
55
+ });
56
+ var En = pt({ strict: !1 }), Mn = Object.keys(ee), po = Mn.length;
57
+ function go(t, r, e) {
58
+ var n = [], a = z(En);
59
+ if (!r)
60
+ return null;
61
+ process.env.NODE_ENV !== "production" && e && a.strict && X(!1, "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.");
62
+ for (var o = 0; o < po; o++) {
63
+ var i = Mn[o], u = ee[i], f = u.isEnabled, s = u.Component;
64
+ f(t) && s && n.push(St.createElement(s, h({ key: i }, t, { visualElement: r })));
65
+ }
66
+ return n;
67
+ }
68
+ var Pr = pt({
69
+ transformPagePoint: function(t) {
70
+ return t;
71
+ },
72
+ isStatic: !1
73
+ }), xr = pt({});
74
+ function ho() {
75
+ return z(xr).visualElement;
76
+ }
77
+ var Tr = pt(null);
78
+ function ne(t) {
79
+ var r = It(null);
80
+ return r.current === null && (r.current = t()), r.current;
81
+ }
82
+ function Dn() {
83
+ var t = z(Tr);
84
+ if (t === null)
85
+ return [!0, null];
86
+ var r = t.isPresent, e = t.onExitComplete, n = t.register, a = xo();
87
+ at(function() {
88
+ return n(a);
89
+ }, []);
90
+ var o = function() {
91
+ return e == null ? void 0 : e(a);
92
+ };
93
+ return !r && e ? [!1, o] : [!0];
94
+ }
95
+ function yo(t) {
96
+ return t === null ? !0 : t.isPresent;
97
+ }
98
+ var bo = 0, Po = function() {
99
+ return bo++;
100
+ }, xo = function() {
101
+ return ne(Po);
102
+ }, To = pt(null), zt = typeof window < "u", Ce = zt ? fo : at;
103
+ function So(t) {
104
+ var r = t.layoutId, e = z(To);
105
+ return e && r !== void 0 ? e + "-" + r : r;
106
+ }
107
+ function Ao(t, r, e, n) {
108
+ var a = z(Pr), o = z(En), i = ho(), u = z(Tr), f = So(e), s = It(void 0);
109
+ n || (n = o.renderer), !s.current && n && (s.current = n(t, {
110
+ visualState: r,
111
+ parent: i,
112
+ props: h(h({}, e), { layoutId: f }),
113
+ presenceId: u == null ? void 0 : u.id,
114
+ blockInitialAnimation: (u == null ? void 0 : u.initial) === !1
115
+ }));
116
+ var l = s.current;
117
+ return Ce(function() {
118
+ l && (l.setProps(h(h(h({}, a), e), { layoutId: f })), l.isPresent = yo(u), l.isPresenceRoot = !i || i.presenceId !== (u == null ? void 0 : u.id), l.syncRender());
119
+ }), at(function() {
120
+ var m;
121
+ l && ((m = l.animationState) === null || m === void 0 || m.animateChanges());
122
+ }), Ce(function() {
123
+ return function() {
124
+ return l == null ? void 0 : l.notifyUnmount();
125
+ };
126
+ }, []), l;
127
+ }
128
+ function jr(t) {
129
+ return typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
130
+ }
131
+ function Vo(t, r, e) {
132
+ return lo(
133
+ function(n) {
134
+ var a;
135
+ n && ((a = t.mount) === null || a === void 0 || a.call(t, n)), r && (n ? r.mount(n) : r.unmount()), e && (typeof e == "function" ? e(n) : jr(e) && (e.current = n));
136
+ },
137
+ /**
138
+ * Only pass a new ref callback to React if we've received a visual element
139
+ * factory. Otherwise we'll be mounting/remounting every time externalRef
140
+ * or other dependencies change.
141
+ */
142
+ [r]
143
+ );
144
+ }
145
+ function Rn(t) {
146
+ return Array.isArray(t);
147
+ }
148
+ function rt(t) {
149
+ return typeof t == "string" || Rn(t);
150
+ }
151
+ function Co(t) {
152
+ var r = {};
153
+ return t.forEachValue(function(e, n) {
154
+ return r[n] = e.get();
155
+ }), r;
156
+ }
157
+ function Lo(t) {
158
+ var r = {};
159
+ return t.forEachValue(function(e, n) {
160
+ return r[n] = e.getVelocity();
161
+ }), r;
162
+ }
163
+ function On(t, r, e, n, a) {
164
+ var o;
165
+ return n === void 0 && (n = {}), a === void 0 && (a = {}), typeof r == "string" && (r = (o = t.variants) === null || o === void 0 ? void 0 : o[r]), typeof r == "function" ? r(e ?? t.custom, n, a) : r;
166
+ }
167
+ function Sr(t, r, e) {
168
+ var n = t.getProps();
169
+ return On(n, r, e ?? n.custom, Co(t), Lo(t));
170
+ }
171
+ function Ar(t) {
172
+ var r;
173
+ return typeof ((r = t.animate) === null || r === void 0 ? void 0 : r.start) == "function" || rt(t.initial) || rt(t.animate) || rt(t.whileHover) || rt(t.whileDrag) || rt(t.whileTap) || rt(t.whileFocus) || rt(t.exit);
174
+ }
175
+ function In(t) {
176
+ return !!(Ar(t) || t.variants);
177
+ }
178
+ function wo(t, r) {
179
+ if (Ar(t)) {
180
+ var e = t.initial, n = t.animate;
181
+ return {
182
+ initial: e === !1 || rt(e) ? e : void 0,
183
+ animate: rt(n) ? n : void 0
184
+ };
185
+ }
186
+ return t.inherit !== !1 ? r : {};
187
+ }
188
+ function Eo(t, r) {
189
+ var e = wo(t, z(xr)), n = e.initial, a = e.animate;
190
+ return re(
191
+ function() {
192
+ return { initial: n, animate: a };
193
+ },
194
+ /**
195
+ * Only break memoisation in static mode
196
+ */
197
+ r ? [
198
+ Le(n),
199
+ Le(a)
200
+ ] : []
201
+ );
202
+ }
203
+ function Le(t) {
204
+ return Array.isArray(t) ? t.join(" ") : t;
205
+ }
206
+ function Mo(t) {
207
+ var r = t.preloadedFeatures, e = t.createVisualElement, n = t.useRender, a = t.useVisualState, o = t.Component;
208
+ r && mo(r);
209
+ function i(u, f) {
210
+ var s = z(Pr).isStatic, l = null, m = Eo(u, s), v = a(u, s);
211
+ return !s && zt && (m.visualElement = Ao(o, v, u, e), l = go(u, m.visualElement, r)), St.createElement(
212
+ St.Fragment,
213
+ null,
214
+ St.createElement(xr.Provider, { value: m }, n(o, u, Vo(v, m.visualElement, f), v, s)),
215
+ l
216
+ );
217
+ }
218
+ return co(i);
219
+ }
220
+ function Do(t) {
221
+ function r(n, a) {
222
+ return a === void 0 && (a = {}), Mo(t(n, a));
223
+ }
224
+ var e = /* @__PURE__ */ new Map();
225
+ return new Proxy(r, {
226
+ /**
227
+ * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
228
+ * The prop name is passed through as `key` and we can use that to generate a `motion`
229
+ * DOM component with that name.
230
+ */
231
+ get: function(n, a) {
232
+ return e.has(a) || e.set(a, r(a)), e.get(a);
233
+ }
234
+ });
235
+ }
236
+ var Ro = [
237
+ "animate",
238
+ "circle",
239
+ "defs",
240
+ "desc",
241
+ "ellipse",
242
+ "g",
243
+ "image",
244
+ "line",
245
+ "filter",
246
+ "marker",
247
+ "mask",
248
+ "metadata",
249
+ "path",
250
+ "pattern",
251
+ "polygon",
252
+ "polyline",
253
+ "rect",
254
+ "stop",
255
+ "svg",
256
+ "switch",
257
+ "symbol",
258
+ "text",
259
+ "tspan",
260
+ "use",
261
+ "view"
262
+ ];
263
+ function ae(t) {
264
+ return (
265
+ /**
266
+ * If it's not a string, it's a custom React component. Currently we only support
267
+ * HTML custom React components.
268
+ */
269
+ typeof t != "string" || /**
270
+ * If it contains a dash, the element is a custom HTML webcomponent.
271
+ */
272
+ t.includes("-") ? !1 : (
273
+ /**
274
+ * If it's in our list of lowercase SVG tags, it's an SVG component
275
+ */
276
+ !!(Ro.indexOf(t) > -1 || /**
277
+ * If it contains a capital letter, it's an SVG component
278
+ */
279
+ /[A-Z]/.test(t))
280
+ )
281
+ );
282
+ }
283
+ var Et = {};
284
+ function Oo(t) {
285
+ for (var r in t)
286
+ Et[r] = t[r];
287
+ }
288
+ var Io = ["", "X", "Y", "Z"], Bo = ["translate", "scale", "rotate", "skew"], Bt = ["transformPerspective", "x", "y", "z"];
289
+ Bo.forEach(function(t) {
290
+ return Io.forEach(function(r) {
291
+ return Bt.push(t + r);
292
+ });
293
+ });
294
+ function Fo(t, r) {
295
+ return Bt.indexOf(t) - Bt.indexOf(r);
296
+ }
297
+ var jo = new Set(Bt);
298
+ function Vr(t) {
299
+ return jo.has(t);
300
+ }
301
+ var Ho = /* @__PURE__ */ new Set(["originX", "originY", "originZ"]);
302
+ function Bn(t) {
303
+ return Ho.has(t);
304
+ }
305
+ function Fn(t, r) {
306
+ var e = r.layout, n = r.layoutId;
307
+ return Vr(t) || Bn(t) || (e || n !== void 0) && (!!Et[t] || t === "opacity");
308
+ }
309
+ var st = function(t) {
310
+ return t !== null && typeof t == "object" && t.getVelocity;
311
+ }, Uo = {
312
+ x: "translateX",
313
+ y: "translateY",
314
+ z: "translateZ",
315
+ transformPerspective: "perspective"
316
+ };
317
+ function No(t, r, e, n) {
318
+ var a = t.transform, o = t.transformKeys, i = r.enableHardwareAcceleration, u = i === void 0 ? !0 : i, f = r.allowTransformNone, s = f === void 0 ? !0 : f, l = "";
319
+ o.sort(Fo);
320
+ for (var m = !1, v = o.length, d = 0; d < v; d++) {
321
+ var c = o[d];
322
+ l += (Uo[c] || c) + "(" + a[c] + ") ", c === "z" && (m = !0);
323
+ }
324
+ return !m && u ? l += "translateZ(0)" : l = l.trim(), n ? l = n(a, e ? "" : l) : s && e && (l = "none"), l;
325
+ }
326
+ function _o(t) {
327
+ var r = t.originX, e = r === void 0 ? "50%" : r, n = t.originY, a = n === void 0 ? "50%" : n, o = t.originZ, i = o === void 0 ? 0 : o;
328
+ return e + " " + a + " " + i;
329
+ }
330
+ function jn(t) {
331
+ return t.startsWith("--");
332
+ }
333
+ var Ko = function(t, r) {
334
+ return r && typeof t == "number" ? r.transform(t) : t;
335
+ }, Hn = function(t, r) {
336
+ return function(e) {
337
+ return Math.max(Math.min(e, r), t);
338
+ };
339
+ }, Mt = function(t) {
340
+ return t % 1 ? Number(t.toFixed(5)) : t;
341
+ }, Ft = /(-)?([\d]*\.?[\d])+/g, Hr = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi, zo = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;
342
+ function Yt(t) {
343
+ return typeof t == "string";
344
+ }
345
+ var gt = {
346
+ test: function(t) {
347
+ return typeof t == "number";
348
+ },
349
+ parse: parseFloat,
350
+ transform: function(t) {
351
+ return t;
352
+ }
353
+ }, Dt = h(h({}, gt), { transform: Hn(0, 1) }), Jt = h(h({}, gt), { default: 1 }), Gt = function(t) {
354
+ return {
355
+ test: function(r) {
356
+ return Yt(r) && r.endsWith(t) && r.split(" ").length === 1;
357
+ },
358
+ parse: parseFloat,
359
+ transform: function(r) {
360
+ return "" + r + t;
361
+ }
362
+ };
363
+ }, ut = Gt("deg"), At = Gt("%"), E = Gt("px"), Yo = Gt("vh"), Go = Gt("vw"), we = h(h({}, At), { parse: function(t) {
364
+ return At.parse(t) / 100;
365
+ }, transform: function(t) {
366
+ return At.transform(t * 100);
367
+ } }), oe = function(t, r) {
368
+ return function(e) {
369
+ return !!(Yt(e) && zo.test(e) && e.startsWith(t) || r && Object.prototype.hasOwnProperty.call(e, r));
370
+ };
371
+ }, Un = function(t, r, e) {
372
+ return function(n) {
373
+ var a;
374
+ if (!Yt(n))
375
+ return n;
376
+ var o = n.match(Ft), i = o[0], u = o[1], f = o[2], s = o[3];
377
+ return a = {}, a[t] = parseFloat(i), a[r] = parseFloat(u), a[e] = parseFloat(f), a.alpha = s !== void 0 ? parseFloat(s) : 1, a;
378
+ };
379
+ }, Pt = {
380
+ test: oe("hsl", "hue"),
381
+ parse: Un("hue", "saturation", "lightness"),
382
+ transform: function(t) {
383
+ var r = t.hue, e = t.saturation, n = t.lightness, a = t.alpha, o = a === void 0 ? 1 : a;
384
+ return "hsla(" + Math.round(r) + ", " + At.transform(Mt(e)) + ", " + At.transform(Mt(n)) + ", " + Mt(Dt.transform(o)) + ")";
385
+ }
386
+ }, Xo = Hn(0, 255), Dr = h(h({}, gt), { transform: function(t) {
387
+ return Math.round(Xo(t));
388
+ } }), xt = {
389
+ test: oe("rgb", "red"),
390
+ parse: Un("red", "green", "blue"),
391
+ transform: function(t) {
392
+ var r = t.red, e = t.green, n = t.blue, a = t.alpha, o = a === void 0 ? 1 : a;
393
+ return "rgba(" + Dr.transform(r) + ", " + Dr.transform(e) + ", " + Dr.transform(n) + ", " + Mt(Dt.transform(o)) + ")";
394
+ }
395
+ };
396
+ function Wo(t) {
397
+ var r = "", e = "", n = "", a = "";
398
+ return t.length > 5 ? (r = t.substr(1, 2), e = t.substr(3, 2), n = t.substr(5, 2), a = t.substr(7, 2)) : (r = t.substr(1, 1), e = t.substr(2, 1), n = t.substr(3, 1), a = t.substr(4, 1), r += r, e += e, n += n, a += a), {
399
+ red: parseInt(r, 16),
400
+ green: parseInt(e, 16),
401
+ blue: parseInt(n, 16),
402
+ alpha: a ? parseInt(a, 16) / 255 : 1
403
+ };
404
+ }
405
+ var Ur = {
406
+ test: oe("#"),
407
+ parse: Wo,
408
+ transform: xt.transform
409
+ }, Y = {
410
+ test: function(t) {
411
+ return xt.test(t) || Ur.test(t) || Pt.test(t);
412
+ },
413
+ parse: function(t) {
414
+ return xt.test(t) ? xt.parse(t) : Pt.test(t) ? Pt.parse(t) : Ur.parse(t);
415
+ },
416
+ transform: function(t) {
417
+ return Yt(t) ? t : t.hasOwnProperty("red") ? xt.transform(t) : Pt.transform(t);
418
+ }
419
+ }, Nn = "${c}", _n = "${n}";
420
+ function Zo(t) {
421
+ var r, e, n, a;
422
+ return isNaN(t) && Yt(t) && ((e = (r = t.match(Ft)) === null || r === void 0 ? void 0 : r.length) !== null && e !== void 0 ? e : 0) + ((a = (n = t.match(Hr)) === null || n === void 0 ? void 0 : n.length) !== null && a !== void 0 ? a : 0) > 0;
423
+ }
424
+ function Kn(t) {
425
+ var r = [], e = 0, n = t.match(Hr);
426
+ n && (e = n.length, t = t.replace(Hr, Nn), r.push.apply(r, n.map(Y.parse)));
427
+ var a = t.match(Ft);
428
+ return a && (t = t.replace(Ft, _n), r.push.apply(r, a.map(gt.parse))), { values: r, numColors: e, tokenised: t };
429
+ }
430
+ function zn(t) {
431
+ return Kn(t).values;
432
+ }
433
+ function Yn(t) {
434
+ var r = Kn(t), e = r.values, n = r.numColors, a = r.tokenised, o = e.length;
435
+ return function(i) {
436
+ for (var u = a, f = 0; f < o; f++)
437
+ u = u.replace(f < n ? Nn : _n, f < n ? Y.transform(i[f]) : Mt(i[f]));
438
+ return u;
439
+ };
440
+ }
441
+ var $o = function(t) {
442
+ return typeof t == "number" ? 0 : t;
443
+ };
444
+ function qo(t) {
445
+ var r = zn(t), e = Yn(t);
446
+ return e(r.map($o));
447
+ }
448
+ var it = { test: Zo, parse: zn, createTransformer: Yn, getAnimatableNone: qo }, Jo = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
449
+ function Qo(t) {
450
+ var r = t.slice(0, -1).split("("), e = r[0], n = r[1];
451
+ if (e === "drop-shadow")
452
+ return t;
453
+ var a = (n.match(Ft) || [])[0];
454
+ if (!a)
455
+ return t;
456
+ var o = n.replace(a, ""), i = Jo.has(e) ? 1 : 0;
457
+ return a !== n && (i *= 100), e + "(" + i + o + ")";
458
+ }
459
+ var ko = /([a-z-]*)\(.*?\)/g, Nr = h(h({}, it), { getAnimatableNone: function(t) {
460
+ var r = t.match(ko);
461
+ return r ? r.map(Qo).join(" ") : t;
462
+ } }), Ee = h(h({}, gt), { transform: Math.round }), Gn = {
463
+ // Border props
464
+ borderWidth: E,
465
+ borderTopWidth: E,
466
+ borderRightWidth: E,
467
+ borderBottomWidth: E,
468
+ borderLeftWidth: E,
469
+ borderRadius: E,
470
+ radius: E,
471
+ borderTopLeftRadius: E,
472
+ borderTopRightRadius: E,
473
+ borderBottomRightRadius: E,
474
+ borderBottomLeftRadius: E,
475
+ // Positioning props
476
+ width: E,
477
+ maxWidth: E,
478
+ height: E,
479
+ maxHeight: E,
480
+ size: E,
481
+ top: E,
482
+ right: E,
483
+ bottom: E,
484
+ left: E,
485
+ // Spacing props
486
+ padding: E,
487
+ paddingTop: E,
488
+ paddingRight: E,
489
+ paddingBottom: E,
490
+ paddingLeft: E,
491
+ margin: E,
492
+ marginTop: E,
493
+ marginRight: E,
494
+ marginBottom: E,
495
+ marginLeft: E,
496
+ // Transform props
497
+ rotate: ut,
498
+ rotateX: ut,
499
+ rotateY: ut,
500
+ rotateZ: ut,
501
+ scale: Jt,
502
+ scaleX: Jt,
503
+ scaleY: Jt,
504
+ scaleZ: Jt,
505
+ skew: ut,
506
+ skewX: ut,
507
+ skewY: ut,
508
+ distance: E,
509
+ translateX: E,
510
+ translateY: E,
511
+ translateZ: E,
512
+ x: E,
513
+ y: E,
514
+ z: E,
515
+ perspective: E,
516
+ transformPerspective: E,
517
+ opacity: Dt,
518
+ originX: we,
519
+ originY: we,
520
+ originZ: E,
521
+ // Misc
522
+ zIndex: Ee,
523
+ // SVG
524
+ fillOpacity: Dt,
525
+ strokeOpacity: Dt,
526
+ numOctaves: Ee
527
+ };
528
+ function ie(t, r, e, n, a, o, i, u) {
529
+ var f, s = t.style, l = t.vars, m = t.transform, v = t.transformKeys, d = t.transformOrigin;
530
+ v.length = 0;
531
+ var c = !1, y = !1, p = !0;
532
+ for (var g in r) {
533
+ var S = r[g];
534
+ if (jn(g)) {
535
+ l[g] = S;
536
+ continue;
537
+ }
538
+ var M = Gn[g], L = Ko(S, M);
539
+ if (Vr(g)) {
540
+ if (c = !0, m[g] = L, v.push(g), !p)
541
+ continue;
542
+ S !== ((f = M.default) !== null && f !== void 0 ? f : 0) && (p = !1);
543
+ } else if (Bn(g))
544
+ d[g] = L, y = !0;
545
+ else if (e != null && e.isHydrated && (n != null && n.isHydrated) && Et[g]) {
546
+ var x = Et[g].process(S, n, e), T = Et[g].applyTo;
547
+ if (T)
548
+ for (var w = T.length, C = 0; C < w; C++)
549
+ s[T[C]] = x;
550
+ else
551
+ s[g] = x;
552
+ } else
553
+ s[g] = L;
554
+ }
555
+ n && e && i && u ? (s.transform = i(n.deltaFinal, n.treeScale, c ? m : void 0), o && (s.transform = o(m, s.transform)), s.transformOrigin = u(n)) : (c && (s.transform = No(t, a, p, o)), y && (s.transformOrigin = _o(d)));
556
+ }
557
+ var ue = function() {
558
+ return {
559
+ style: {},
560
+ transform: {},
561
+ transformKeys: [],
562
+ transformOrigin: {},
563
+ vars: {}
564
+ };
565
+ };
566
+ function Xn(t, r, e) {
567
+ for (var n in r)
568
+ !st(r[n]) && !Fn(n, e) && (t[n] = r[n]);
569
+ }
570
+ function ti(t, r, e) {
571
+ var n = t.transformTemplate;
572
+ return re(function() {
573
+ var a = ue();
574
+ ie(a, r, void 0, void 0, { enableHardwareAcceleration: !e }, n);
575
+ var o = a.vars, i = a.style;
576
+ return h(h({}, o), i);
577
+ }, [r]);
578
+ }
579
+ function ri(t, r, e) {
580
+ var n = t.style || {}, a = {};
581
+ return Xn(a, n, t), Object.assign(a, ti(t, r, e)), t.transformValues && (a = t.transformValues(a)), a;
582
+ }
583
+ function ei(t, r, e) {
584
+ var n = {}, a = ri(t, r, e);
585
+ return t.drag && (n.draggable = !1, a.userSelect = a.WebkitUserSelect = a.WebkitTouchCallout = "none", a.touchAction = t.drag === !0 ? "none" : "pan-" + (t.drag === "x" ? "y" : "x")), n.style = a, n;
586
+ }
587
+ var ni = /* @__PURE__ */ new Set([
588
+ "initial",
589
+ "animate",
590
+ "exit",
591
+ "style",
592
+ "variants",
593
+ "transition",
594
+ "transformTemplate",
595
+ "transformValues",
596
+ "custom",
597
+ "inherit",
598
+ "layout",
599
+ "layoutId",
600
+ "_layoutResetTransform",
601
+ "onLayoutAnimationComplete",
602
+ "onViewportBoxUpdate",
603
+ "onLayoutMeasure",
604
+ "onBeforeLayoutMeasure",
605
+ "onAnimationStart",
606
+ "onAnimationComplete",
607
+ "onUpdate",
608
+ "onDragStart",
609
+ "onDrag",
610
+ "onDragEnd",
611
+ "onMeasureDragConstraints",
612
+ "onDirectionLock",
613
+ "onDragTransitionEnd",
614
+ "drag",
615
+ "dragControls",
616
+ "dragListener",
617
+ "dragConstraints",
618
+ "dragDirectionLock",
619
+ "_dragX",
620
+ "_dragY",
621
+ "dragElastic",
622
+ "dragMomentum",
623
+ "dragPropagation",
624
+ "dragTransition",
625
+ "whileDrag",
626
+ "onPan",
627
+ "onPanStart",
628
+ "onPanEnd",
629
+ "onPanSessionStart",
630
+ "onTap",
631
+ "onTapStart",
632
+ "onTapCancel",
633
+ "onHoverStart",
634
+ "onHoverEnd",
635
+ "whileFocus",
636
+ "whileTap",
637
+ "whileHover"
638
+ ]);
639
+ function fr(t) {
640
+ return ni.has(t);
641
+ }
642
+ var Wn = function(t) {
643
+ return !fr(t);
644
+ };
645
+ try {
646
+ var ai = require("@emotion/is-prop-valid").default;
647
+ Wn = function(t) {
648
+ return t.startsWith("on") ? !fr(t) : ai(t);
649
+ };
650
+ } catch {
651
+ }
652
+ function oi(t, r, e) {
653
+ var n = {};
654
+ for (var a in t)
655
+ (Wn(a) || e === !0 && fr(a) || !r && !fr(a)) && (n[a] = t[a]);
656
+ return n;
657
+ }
658
+ function Me(t, r, e) {
659
+ return typeof t == "string" ? t : E.transform(r + e * t);
660
+ }
661
+ function ii(t, r, e) {
662
+ var n = Me(r, t.x, t.width), a = Me(e, t.y, t.height);
663
+ return n + " " + a;
664
+ }
665
+ var Rr = function(t, r) {
666
+ return E.transform(t * r);
667
+ }, ui = {
668
+ offset: "strokeDashoffset",
669
+ array: "strokeDasharray"
670
+ };
671
+ function si(t, r, e, n, a, o) {
672
+ n === void 0 && (n = 1), a === void 0 && (a = 0);
673
+ var i = ui;
674
+ t[i.offset] = Rr(-a, r);
675
+ var u = Rr(e, r), f = Rr(n, r);
676
+ t[i.array] = u + " " + f;
677
+ }
678
+ function se(t, r, e, n, a, o, i, u) {
679
+ var f = r.attrX, s = r.attrY, l = r.originX, m = r.originY, v = r.pathLength, d = r.pathSpacing, c = d === void 0 ? 1 : d, y = r.pathOffset, p = y === void 0 ? 0 : y, g = J(r, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
680
+ ie(t, g, e, n, a, o, i, u), t.attrs = t.style, t.style = {};
681
+ var S = t.attrs, M = t.style, L = t.dimensions, x = t.totalPathLength;
682
+ S.transform && (L && (M.transform = S.transform), delete S.transform), L && (l !== void 0 || m !== void 0 || M.transform) && (M.transformOrigin = ii(L, l !== void 0 ? l : 0.5, m !== void 0 ? m : 0.5)), f !== void 0 && (S.x = f), s !== void 0 && (S.y = s), x !== void 0 && v !== void 0 && si(S, x, v, c, p);
683
+ }
684
+ var Zn = function() {
685
+ return h(h({}, ue()), { attrs: {} });
686
+ };
687
+ function fi(t, r) {
688
+ var e = re(function() {
689
+ var a = Zn();
690
+ return se(a, r, void 0, void 0, { enableHardwareAcceleration: !1 }, t.transformTemplate), h(h({}, a.attrs), { style: h({}, a.style) });
691
+ }, [r]);
692
+ if (t.style) {
693
+ var n = {};
694
+ Xn(n, t.style, t), e.style = h(h({}, n), e.style);
695
+ }
696
+ return e;
697
+ }
698
+ function li(t) {
699
+ t === void 0 && (t = !1);
700
+ var r = function(e, n, a, o, i) {
701
+ var u = o.latestValues, f = ae(e) ? fi : ei, s = f(n, u, i), l = oi(n, typeof e == "string", t), m = h(h(h({}, l), s), { ref: a });
702
+ return vo(e, m);
703
+ };
704
+ return r;
705
+ }
706
+ var ci = /([a-z])([A-Z])/g, vi = "$1-$2", $n = function(t) {
707
+ return t.replace(ci, vi).toLowerCase();
708
+ };
709
+ function qn(t, r) {
710
+ var e = r.style, n = r.vars;
711
+ Object.assign(t.style, e);
712
+ for (var a in n)
713
+ t.style.setProperty(a, n[a]);
714
+ }
715
+ var Jn = /* @__PURE__ */ new Set([
716
+ "baseFrequency",
717
+ "diffuseConstant",
718
+ "kernelMatrix",
719
+ "kernelUnitLength",
720
+ "keySplines",
721
+ "keyTimes",
722
+ "limitingConeAngle",
723
+ "markerHeight",
724
+ "markerWidth",
725
+ "numOctaves",
726
+ "targetX",
727
+ "targetY",
728
+ "surfaceScale",
729
+ "specularConstant",
730
+ "specularExponent",
731
+ "stdDeviation",
732
+ "tableValues",
733
+ "viewBox",
734
+ "gradientTransform"
735
+ ]);
736
+ function Qn(t, r) {
737
+ qn(t, r);
738
+ for (var e in r.attrs)
739
+ t.setAttribute(Jn.has(e) ? e : $n(e), r.attrs[e]);
740
+ }
741
+ function fe(t) {
742
+ var r = t.style, e = {};
743
+ for (var n in r)
744
+ (st(r[n]) || Fn(n, t)) && (e[n] = r[n]);
745
+ return e;
746
+ }
747
+ function kn(t) {
748
+ var r = fe(t);
749
+ for (var e in t)
750
+ if (st(t[e])) {
751
+ var n = e === "x" || e === "y" ? "attr" + e.toUpperCase() : e;
752
+ r[n] = t[e];
753
+ }
754
+ return r;
755
+ }
756
+ function le(t) {
757
+ return typeof t == "object" && typeof t.start == "function";
758
+ }
759
+ var jt = function(t) {
760
+ return Array.isArray(t);
761
+ }, di = function(t) {
762
+ return !!(t && typeof t == "object" && t.mix && t.toValue);
763
+ }, mi = function(t) {
764
+ return jt(t) ? t[t.length - 1] || 0 : t;
765
+ };
766
+ function pi(t) {
767
+ var r = st(t) ? t.get() : t;
768
+ return di(r) ? r.toValue() : r;
769
+ }
770
+ function De(t, r, e, n) {
771
+ var a = t.scrapeMotionValuesFromProps, o = t.createRenderState, i = t.onMount, u = {
772
+ latestValues: gi(r, e, n, a),
773
+ renderState: o()
774
+ };
775
+ return i && (u.mount = function(f) {
776
+ return i(r, f, u);
777
+ }), u;
778
+ }
779
+ var ta = function(t) {
780
+ return function(r, e) {
781
+ var n = z(xr), a = z(Tr);
782
+ return e ? De(t, r, n, a) : ne(function() {
783
+ return De(t, r, n, a);
784
+ });
785
+ };
786
+ };
787
+ function gi(t, r, e, n) {
788
+ var a = {}, o = (e == null ? void 0 : e.initial) === !1, i = n(t);
789
+ for (var u in i)
790
+ a[u] = pi(i[u]);
791
+ var f = t.initial, s = t.animate, l = Ar(t), m = In(t);
792
+ r && m && !l && t.inherit !== !1 && (f ?? (f = r.initial), s ?? (s = r.animate));
793
+ var v = o || f === !1 ? s : f;
794
+ if (v && typeof v != "boolean" && !le(v)) {
795
+ var d = Array.isArray(v) ? v : [v];
796
+ d.forEach(function(c) {
797
+ var y = On(t, c);
798
+ if (y) {
799
+ var p = y.transitionEnd;
800
+ y.transition;
801
+ var g = J(y, ["transitionEnd", "transition"]);
802
+ for (var S in g)
803
+ a[S] = g[S];
804
+ for (var S in p)
805
+ a[S] = p[S];
806
+ }
807
+ });
808
+ }
809
+ return a;
810
+ }
811
+ var hi = {
812
+ useVisualState: ta({
813
+ scrapeMotionValuesFromProps: kn,
814
+ createRenderState: Zn,
815
+ onMount: function(t, r, e) {
816
+ var n = e.renderState, a = e.latestValues;
817
+ try {
818
+ n.dimensions = typeof r.getBBox == "function" ? r.getBBox() : r.getBoundingClientRect();
819
+ } catch {
820
+ n.dimensions = {
821
+ x: 0,
822
+ y: 0,
823
+ width: 0,
824
+ height: 0
825
+ };
826
+ }
827
+ yi(r) && (n.totalPathLength = r.getTotalLength()), se(n, a, void 0, void 0, { enableHardwareAcceleration: !1 }, t.transformTemplate), Qn(r, n);
828
+ }
829
+ })
830
+ };
831
+ function yi(t) {
832
+ return t.tagName === "path";
833
+ }
834
+ var bi = {
835
+ useVisualState: ta({
836
+ scrapeMotionValuesFromProps: fe,
837
+ createRenderState: ue
838
+ })
839
+ };
840
+ function Pi(t, r, e, n) {
841
+ var a = r.forwardMotionProps, o = a === void 0 ? !1 : a, i = ae(t) ? hi : bi;
842
+ return h(h({}, i), {
843
+ preloadedFeatures: e,
844
+ useRender: li(o),
845
+ createVisualElement: n,
846
+ Component: t
847
+ });
848
+ }
849
+ var F;
850
+ (function(t) {
851
+ t.Animate = "animate", t.Hover = "whileHover", t.Tap = "whileTap", t.Drag = "whileDrag", t.Focus = "whileFocus", t.Exit = "exit";
852
+ })(F || (F = {}));
853
+ function ce(t, r, e, n) {
854
+ return t.addEventListener(r, e, n), function() {
855
+ return t.removeEventListener(r, e, n);
856
+ };
857
+ }
858
+ function _r(t, r, e, n) {
859
+ at(function() {
860
+ var a = t.current;
861
+ if (e && a)
862
+ return ce(a, r, e, n);
863
+ }, [t, r, e, n]);
864
+ }
865
+ function xi(t) {
866
+ var r = t.whileFocus, e = t.visualElement, n = function() {
867
+ var o;
868
+ (o = e.animationState) === null || o === void 0 || o.setActive(F.Focus, !0);
869
+ }, a = function() {
870
+ var o;
871
+ (o = e.animationState) === null || o === void 0 || o.setActive(F.Focus, !1);
872
+ };
873
+ _r(e, "focus", r ? n : void 0), _r(e, "blur", r ? a : void 0);
874
+ }
875
+ function ra(t) {
876
+ return typeof PointerEvent < "u" && t instanceof PointerEvent ? t.pointerType === "mouse" : t instanceof MouseEvent;
877
+ }
878
+ function ea(t) {
879
+ var r = !!t.touches;
880
+ return r;
881
+ }
882
+ function Ti(t) {
883
+ return function(r) {
884
+ var e = r instanceof MouseEvent, n = !e || e && r.button === 0;
885
+ n && t(r);
886
+ };
887
+ }
888
+ var Si = { pageX: 0, pageY: 0 };
889
+ function Ai(t, r) {
890
+ r === void 0 && (r = "page");
891
+ var e = t.touches[0] || t.changedTouches[0], n = e || Si;
892
+ return {
893
+ x: n[r + "X"],
894
+ y: n[r + "Y"]
895
+ };
896
+ }
897
+ function Vi(t, r) {
898
+ return r === void 0 && (r = "page"), {
899
+ x: t[r + "X"],
900
+ y: t[r + "Y"]
901
+ };
902
+ }
903
+ function ve(t, r) {
904
+ return r === void 0 && (r = "page"), {
905
+ point: ea(t) ? Ai(t, r) : Vi(t, r)
906
+ };
907
+ }
908
+ function Ci(t) {
909
+ return ve(t, "client");
910
+ }
911
+ var na = function(t, r) {
912
+ r === void 0 && (r = !1);
913
+ var e = function(n) {
914
+ return t(n, ve(n));
915
+ };
916
+ return r ? Ti(e) : e;
917
+ }, Li = function() {
918
+ return zt && window.onpointerdown === null;
919
+ }, wi = function() {
920
+ return zt && window.ontouchstart === null;
921
+ }, Ei = function() {
922
+ return zt && window.onmousedown === null;
923
+ }, Mi = {
924
+ pointerdown: "mousedown",
925
+ pointermove: "mousemove",
926
+ pointerup: "mouseup",
927
+ pointercancel: "mousecancel",
928
+ pointerover: "mouseover",
929
+ pointerout: "mouseout",
930
+ pointerenter: "mouseenter",
931
+ pointerleave: "mouseleave"
932
+ }, Di = {
933
+ pointerdown: "touchstart",
934
+ pointermove: "touchmove",
935
+ pointerup: "touchend",
936
+ pointercancel: "touchcancel"
937
+ };
938
+ function aa(t) {
939
+ return Li() ? t : wi() ? Di[t] : Ei() ? Mi[t] : t;
940
+ }
941
+ function Vt(t, r, e, n) {
942
+ return ce(t, aa(r), na(e, r === "pointerdown"), n);
943
+ }
944
+ function lr(t, r, e, n) {
945
+ return _r(t, aa(r), e && na(e, r === "pointerdown"), n);
946
+ }
947
+ function oa(t) {
948
+ var r = null;
949
+ return function() {
950
+ var e = function() {
951
+ r = null;
952
+ };
953
+ return r === null ? (r = t, e) : !1;
954
+ };
955
+ }
956
+ var Re = oa("dragHorizontal"), Oe = oa("dragVertical");
957
+ function ia(t) {
958
+ var r = !1;
959
+ if (t === "y")
960
+ r = Oe();
961
+ else if (t === "x")
962
+ r = Re();
963
+ else {
964
+ var e = Re(), n = Oe();
965
+ e && n ? r = function() {
966
+ e(), n();
967
+ } : (e && e(), n && n());
968
+ }
969
+ return r;
970
+ }
971
+ function ua() {
972
+ var t = ia(!0);
973
+ return t ? (t(), !1) : !0;
974
+ }
975
+ function Ie(t, r, e) {
976
+ return function(n, a) {
977
+ var o;
978
+ !ra(n) || ua() || (e == null || e(n, a), (o = t.animationState) === null || o === void 0 || o.setActive(F.Hover, r));
979
+ };
980
+ }
981
+ function Ri(t) {
982
+ var r = t.onHoverStart, e = t.onHoverEnd, n = t.whileHover, a = t.visualElement;
983
+ lr(a, "pointerenter", r || n ? Ie(a, !0, r) : void 0), lr(a, "pointerleave", e || n ? Ie(a, !1, e) : void 0);
984
+ }
985
+ var sa = function(t, r) {
986
+ return r ? t === r ? !0 : sa(t, r.parentElement) : !1;
987
+ };
988
+ function fa(t) {
989
+ return at(function() {
990
+ return function() {
991
+ return t();
992
+ };
993
+ }, []);
994
+ }
995
+ var cr = function(t, r, e) {
996
+ return Math.min(Math.max(e, t), r);
997
+ }, Or = 1e-3, Oi = 0.01, Be = 10, Ii = 0.05, Bi = 1;
998
+ function Fi(t) {
999
+ var r = t.duration, e = r === void 0 ? 800 : r, n = t.bounce, a = n === void 0 ? 0.25 : n, o = t.velocity, i = o === void 0 ? 0 : o, u = t.mass, f = u === void 0 ? 1 : u, s, l;
1000
+ br(e <= Be * 1e3, "Spring duration must be 10 seconds or less");
1001
+ var m = 1 - a;
1002
+ m = cr(Ii, Bi, m), e = cr(Oi, Be, e / 1e3), m < 1 ? (s = function(y) {
1003
+ var p = y * m, g = p * e, S = p - i, M = Kr(y, m), L = Math.exp(-g);
1004
+ return Or - S / M * L;
1005
+ }, l = function(y) {
1006
+ var p = y * m, g = p * e, S = g * i + i, M = Math.pow(m, 2) * Math.pow(y, 2) * e, L = Math.exp(-g), x = Kr(Math.pow(y, 2), m), T = -s(y) + Or > 0 ? -1 : 1;
1007
+ return T * ((S - M) * L) / x;
1008
+ }) : (s = function(y) {
1009
+ var p = Math.exp(-y * e), g = (y - i) * e + 1;
1010
+ return -Or + p * g;
1011
+ }, l = function(y) {
1012
+ var p = Math.exp(-y * e), g = (i - y) * (e * e);
1013
+ return p * g;
1014
+ });
1015
+ var v = 5 / e, d = Hi(s, l, v);
1016
+ if (e = e * 1e3, isNaN(d))
1017
+ return {
1018
+ stiffness: 100,
1019
+ damping: 10,
1020
+ duration: e
1021
+ };
1022
+ var c = Math.pow(d, 2) * f;
1023
+ return {
1024
+ stiffness: c,
1025
+ damping: m * 2 * Math.sqrt(f * c),
1026
+ duration: e
1027
+ };
1028
+ }
1029
+ var ji = 12;
1030
+ function Hi(t, r, e) {
1031
+ for (var n = e, a = 1; a < ji; a++)
1032
+ n = n - t(n) / r(n);
1033
+ return n;
1034
+ }
1035
+ function Kr(t, r) {
1036
+ return t * Math.sqrt(1 - r * r);
1037
+ }
1038
+ var Ui = ["duration", "bounce"], Ni = ["stiffness", "damping", "mass"];
1039
+ function Fe(t, r) {
1040
+ return r.some(function(e) {
1041
+ return t[e] !== void 0;
1042
+ });
1043
+ }
1044
+ function _i(t) {
1045
+ var r = h({ velocity: 0, stiffness: 100, damping: 10, mass: 1, isResolvedFromDuration: !1 }, t);
1046
+ if (!Fe(t, Ni) && Fe(t, Ui)) {
1047
+ var e = Fi(t);
1048
+ r = h(h(h({}, r), e), { velocity: 0, mass: 1 }), r.isResolvedFromDuration = !0;
1049
+ }
1050
+ return r;
1051
+ }
1052
+ function de(t) {
1053
+ var r = t.from, e = r === void 0 ? 0 : r, n = t.to, a = n === void 0 ? 1 : n, o = t.restSpeed, i = o === void 0 ? 2 : o, u = t.restDelta, f = J(t, ["from", "to", "restSpeed", "restDelta"]), s = { done: !1, value: e }, l = _i(f), m = l.stiffness, v = l.damping, d = l.mass, c = l.velocity, y = l.duration, p = l.isResolvedFromDuration, g = je, S = je;
1054
+ function M() {
1055
+ var L = c ? -(c / 1e3) : 0, x = a - e, T = v / (2 * Math.sqrt(m * d)), w = Math.sqrt(m / d) / 1e3;
1056
+ if (u ?? (u = Math.abs(a - e) <= 1 ? 0.01 : 0.4), T < 1) {
1057
+ var C = Kr(w, T);
1058
+ g = function(D) {
1059
+ var R = Math.exp(-T * w * D);
1060
+ return a - R * ((L + T * w * x) / C * Math.sin(C * D) + x * Math.cos(C * D));
1061
+ }, S = function(D) {
1062
+ var R = Math.exp(-T * w * D);
1063
+ return T * w * R * (Math.sin(C * D) * (L + T * w * x) / C + x * Math.cos(C * D)) - R * (Math.cos(C * D) * (L + T * w * x) - C * x * Math.sin(C * D));
1064
+ };
1065
+ } else if (T === 1)
1066
+ g = function(D) {
1067
+ return a - Math.exp(-w * D) * (x + (L + w * x) * D);
1068
+ };
1069
+ else {
1070
+ var A = w * Math.sqrt(T * T - 1);
1071
+ g = function(D) {
1072
+ var R = Math.exp(-T * w * D), j = Math.min(A * D, 300);
1073
+ return a - R * ((L + T * w * x) * Math.sinh(j) + A * x * Math.cosh(j)) / A;
1074
+ };
1075
+ }
1076
+ }
1077
+ return M(), {
1078
+ next: function(L) {
1079
+ var x = g(L);
1080
+ if (p)
1081
+ s.done = L >= y;
1082
+ else {
1083
+ var T = S(L) * 1e3, w = Math.abs(T) <= i, C = Math.abs(a - x) <= u;
1084
+ s.done = w && C;
1085
+ }
1086
+ return s.value = s.done ? a : x, s;
1087
+ },
1088
+ flipTarget: function() {
1089
+ var L;
1090
+ c = -c, L = [a, e], e = L[0], a = L[1], M();
1091
+ }
1092
+ };
1093
+ }
1094
+ de.needsInterpolation = function(t, r) {
1095
+ return typeof t == "string" || typeof r == "string";
1096
+ };
1097
+ var je = function(t) {
1098
+ return 0;
1099
+ }, Ht = function(t, r, e) {
1100
+ var n = r - t;
1101
+ return n === 0 ? 1 : (e - t) / n;
1102
+ }, Z = function(t, r, e) {
1103
+ return -e * t + e * r + t;
1104
+ }, Ki = function(t, r, e) {
1105
+ var n = t * t, a = r * r;
1106
+ return Math.sqrt(Math.max(0, e * (a - n) + n));
1107
+ }, zi = [Ur, xt, Pt], He = function(t) {
1108
+ return zi.find(function(r) {
1109
+ return r.test(t);
1110
+ });
1111
+ }, Ue = function(t) {
1112
+ return "'" + t + "' is not an animatable color. Use the equivalent color code instead.";
1113
+ }, la = function(t, r) {
1114
+ var e = He(t), n = He(r);
1115
+ X(!!e, Ue(t)), X(!!n, Ue(r)), X(e.transform === n.transform, "Both colors must be hex/RGBA, OR both must be HSLA.");
1116
+ var a = e.parse(t), o = n.parse(r), i = h({}, a), u = e === Pt ? Z : Ki;
1117
+ return function(f) {
1118
+ for (var s in i)
1119
+ s !== "alpha" && (i[s] = u(a[s], o[s], f));
1120
+ return i.alpha = Z(a.alpha, o.alpha, f), e.transform(i);
1121
+ };
1122
+ }, zr = function(t) {
1123
+ return typeof t == "number";
1124
+ }, Yi = function(t, r) {
1125
+ return function(e) {
1126
+ return r(t(e));
1127
+ };
1128
+ }, Xt = function() {
1129
+ for (var t = [], r = 0; r < arguments.length; r++)
1130
+ t[r] = arguments[r];
1131
+ return t.reduce(Yi);
1132
+ };
1133
+ function ca(t, r) {
1134
+ return zr(t) ? function(e) {
1135
+ return Z(t, r, e);
1136
+ } : Y.test(t) ? la(t, r) : da(t, r);
1137
+ }
1138
+ var va = function(t, r) {
1139
+ var e = W([], t), n = e.length, a = t.map(function(o, i) {
1140
+ return ca(o, r[i]);
1141
+ });
1142
+ return function(o) {
1143
+ for (var i = 0; i < n; i++)
1144
+ e[i] = a[i](o);
1145
+ return e;
1146
+ };
1147
+ }, Gi = function(t, r) {
1148
+ var e = h(h({}, t), r), n = {};
1149
+ for (var a in e)
1150
+ t[a] !== void 0 && r[a] !== void 0 && (n[a] = ca(t[a], r[a]));
1151
+ return function(o) {
1152
+ for (var i in n)
1153
+ e[i] = n[i](o);
1154
+ return e;
1155
+ };
1156
+ };
1157
+ function Ne(t) {
1158
+ for (var r = it.parse(t), e = r.length, n = 0, a = 0, o = 0, i = 0; i < e; i++)
1159
+ n || typeof r[i] == "number" ? n++ : r[i].hue !== void 0 ? o++ : a++;
1160
+ return { parsed: r, numNumbers: n, numRGB: a, numHSL: o };
1161
+ }
1162
+ var da = function(t, r) {
1163
+ var e = it.createTransformer(r), n = Ne(t), a = Ne(r);
1164
+ return X(n.numHSL === a.numHSL && n.numRGB === a.numRGB && n.numNumbers >= a.numNumbers, "Complex values '" + t + "' and '" + r + "' too different to mix. Ensure all colors are of the same type."), Xt(va(n.parsed, a.parsed), e);
1165
+ }, Xi = function(t, r) {
1166
+ return function(e) {
1167
+ return Z(t, r, e);
1168
+ };
1169
+ };
1170
+ function Wi(t) {
1171
+ if (typeof t == "number")
1172
+ return Xi;
1173
+ if (typeof t == "string")
1174
+ return Y.test(t) ? la : da;
1175
+ if (Array.isArray(t))
1176
+ return va;
1177
+ if (typeof t == "object")
1178
+ return Gi;
1179
+ }
1180
+ function Zi(t, r, e) {
1181
+ for (var n = [], a = e || Wi(t[0]), o = t.length - 1, i = 0; i < o; i++) {
1182
+ var u = a(t[i], t[i + 1]);
1183
+ if (r) {
1184
+ var f = Array.isArray(r) ? r[i] : r;
1185
+ u = Xt(f, u);
1186
+ }
1187
+ n.push(u);
1188
+ }
1189
+ return n;
1190
+ }
1191
+ function $i(t, r) {
1192
+ var e = t[0], n = t[1], a = r[0];
1193
+ return function(o) {
1194
+ return a(Ht(e, n, o));
1195
+ };
1196
+ }
1197
+ function qi(t, r) {
1198
+ var e = t.length, n = e - 1;
1199
+ return function(a) {
1200
+ var o = 0, i = !1;
1201
+ if (a <= t[0] ? i = !0 : a >= t[n] && (o = n - 1, i = !0), !i) {
1202
+ for (var u = 1; u < e && !(t[u] > a || u === n); u++)
1203
+ ;
1204
+ o = u - 1;
1205
+ }
1206
+ var f = Ht(t[o], t[o + 1], a);
1207
+ return r[o](f);
1208
+ };
1209
+ }
1210
+ function ma(t, r, e) {
1211
+ var n = e === void 0 ? {} : e, a = n.clamp, o = a === void 0 ? !0 : a, i = n.ease, u = n.mixer, f = t.length;
1212
+ X(f === r.length, "Both input and output ranges must be the same length"), X(!i || !Array.isArray(i) || i.length === f - 1, "Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."), t[0] > t[f - 1] && (t = [].concat(t), r = [].concat(r), t.reverse(), r.reverse());
1213
+ var s = Zi(r, i, u), l = f === 2 ? $i(t, s) : qi(t, s);
1214
+ return o ? function(m) {
1215
+ return l(cr(t[0], t[f - 1], m));
1216
+ } : l;
1217
+ }
1218
+ var Cr = function(t) {
1219
+ return function(r) {
1220
+ return 1 - t(1 - r);
1221
+ };
1222
+ }, me = function(t) {
1223
+ return function(r) {
1224
+ return r <= 0.5 ? t(2 * r) / 2 : (2 - t(2 * (1 - r))) / 2;
1225
+ };
1226
+ }, Ji = function(t) {
1227
+ return function(r) {
1228
+ return Math.pow(r, t);
1229
+ };
1230
+ }, pa = function(t) {
1231
+ return function(r) {
1232
+ return r * r * ((t + 1) * r - t);
1233
+ };
1234
+ }, Qi = function(t) {
1235
+ var r = pa(t);
1236
+ return function(e) {
1237
+ return (e *= 2) < 1 ? 0.5 * r(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1)));
1238
+ };
1239
+ }, ga = 1.525, ki = 4 / 11, tu = 8 / 11, ru = 9 / 10, ha = function(t) {
1240
+ return t;
1241
+ }, pe = Ji(2), eu = Cr(pe), ya = me(pe), ba = function(t) {
1242
+ return 1 - Math.sin(Math.acos(t));
1243
+ }, Pa = Cr(ba), nu = me(Pa), ge = pa(ga), au = Cr(ge), ou = me(ge), iu = Qi(ga), uu = 4356 / 361, su = 35442 / 1805, fu = 16061 / 1805, vr = function(t) {
1244
+ if (t === 1 || t === 0)
1245
+ return t;
1246
+ var r = t * t;
1247
+ return t < ki ? 7.5625 * r : t < tu ? 9.075 * r - 9.9 * t + 3.4 : t < ru ? uu * r - su * t + fu : 10.8 * t * t - 20.52 * t + 10.72;
1248
+ }, lu = Cr(vr), cu = function(t) {
1249
+ return t < 0.5 ? 0.5 * (1 - vr(1 - t * 2)) : 0.5 * vr(t * 2 - 1) + 0.5;
1250
+ };
1251
+ function vu(t, r) {
1252
+ return t.map(function() {
1253
+ return r || ya;
1254
+ }).splice(0, t.length - 1);
1255
+ }
1256
+ function du(t) {
1257
+ var r = t.length;
1258
+ return t.map(function(e, n) {
1259
+ return n !== 0 ? n / (r - 1) : 0;
1260
+ });
1261
+ }
1262
+ function mu(t, r) {
1263
+ return t.map(function(e) {
1264
+ return e * r;
1265
+ });
1266
+ }
1267
+ function or(t) {
1268
+ var r = t.from, e = r === void 0 ? 0 : r, n = t.to, a = n === void 0 ? 1 : n, o = t.ease, i = t.offset, u = t.duration, f = u === void 0 ? 300 : u, s = { done: !1, value: e }, l = Array.isArray(a) ? a : [e, a], m = mu(i && i.length === l.length ? i : du(l), f);
1269
+ function v() {
1270
+ return ma(m, l, {
1271
+ ease: Array.isArray(o) ? o : vu(l, o)
1272
+ });
1273
+ }
1274
+ var d = v();
1275
+ return {
1276
+ next: function(c) {
1277
+ return s.value = d(c), s.done = c >= f, s;
1278
+ },
1279
+ flipTarget: function() {
1280
+ l.reverse(), d = v();
1281
+ }
1282
+ };
1283
+ }
1284
+ function pu(t) {
1285
+ var r = t.velocity, e = r === void 0 ? 0 : r, n = t.from, a = n === void 0 ? 0 : n, o = t.power, i = o === void 0 ? 0.8 : o, u = t.timeConstant, f = u === void 0 ? 350 : u, s = t.restDelta, l = s === void 0 ? 0.5 : s, m = t.modifyTarget, v = { done: !1, value: a }, d = i * e, c = a + d, y = m === void 0 ? c : m(c);
1286
+ return y !== c && (d = y - a), {
1287
+ next: function(p) {
1288
+ var g = -d * Math.exp(-p / f);
1289
+ return v.done = !(g > l || g < -l), v.value = v.done ? y : y + g, v;
1290
+ },
1291
+ flipTarget: function() {
1292
+ }
1293
+ };
1294
+ }
1295
+ var _e = { keyframes: or, spring: de, decay: pu };
1296
+ function gu(t) {
1297
+ if (Array.isArray(t.to))
1298
+ return or;
1299
+ if (_e[t.type])
1300
+ return _e[t.type];
1301
+ var r = new Set(Object.keys(t));
1302
+ return r.has("ease") || r.has("duration") && !r.has("dampingRatio") ? or : r.has("dampingRatio") || r.has("stiffness") || r.has("mass") || r.has("damping") || r.has("restSpeed") || r.has("restDelta") ? de : or;
1303
+ }
1304
+ var xa = 1 / 60 * 1e3, hu = typeof performance < "u" ? function() {
1305
+ return performance.now();
1306
+ } : function() {
1307
+ return Date.now();
1308
+ }, Ta = typeof window < "u" ? function(t) {
1309
+ return window.requestAnimationFrame(t);
1310
+ } : function(t) {
1311
+ return setTimeout(function() {
1312
+ return t(hu());
1313
+ }, xa);
1314
+ };
1315
+ function yu(t) {
1316
+ var r = [], e = [], n = 0, a = !1, o = /* @__PURE__ */ new WeakSet(), i = {
1317
+ schedule: function(u, f, s) {
1318
+ f === void 0 && (f = !1), s === void 0 && (s = !1);
1319
+ var l = s && a, m = l ? r : e;
1320
+ return f && o.add(u), m.indexOf(u) === -1 && (m.push(u), l && a && (n = r.length)), u;
1321
+ },
1322
+ cancel: function(u) {
1323
+ var f = e.indexOf(u);
1324
+ f !== -1 && e.splice(f, 1), o.delete(u);
1325
+ },
1326
+ process: function(u) {
1327
+ var f;
1328
+ if (a = !0, f = [e, r], r = f[0], e = f[1], e.length = 0, n = r.length, n)
1329
+ for (var s = 0; s < n; s++) {
1330
+ var l = r[s];
1331
+ l(u), o.has(l) && (i.schedule(l), t());
1332
+ }
1333
+ a = !1;
1334
+ }
1335
+ };
1336
+ return i;
1337
+ }
1338
+ var bu = 40, Yr = !0, Ut = !1, Gr = !1, Ct = {
1339
+ delta: 0,
1340
+ timestamp: 0
1341
+ }, Wt = ["read", "update", "preRender", "render", "postRender"], Lr = /* @__PURE__ */ Wt.reduce(function(t, r) {
1342
+ return t[r] = yu(function() {
1343
+ return Ut = !0;
1344
+ }), t;
1345
+ }, {}), nt = /* @__PURE__ */ Wt.reduce(function(t, r) {
1346
+ var e = Lr[r];
1347
+ return t[r] = function(n, a, o) {
1348
+ return a === void 0 && (a = !1), o === void 0 && (o = !1), Ut || xu(), e.schedule(n, a, o);
1349
+ }, t;
1350
+ }, {}), Rt = /* @__PURE__ */ Wt.reduce(function(t, r) {
1351
+ return t[r] = Lr[r].cancel, t;
1352
+ }, {}), Tt = /* @__PURE__ */ Wt.reduce(function(t, r) {
1353
+ return t[r] = function() {
1354
+ return Lr[r].process(Ct);
1355
+ }, t;
1356
+ }, {}), Pu = function(t) {
1357
+ return Lr[t].process(Ct);
1358
+ }, Sa = function(t) {
1359
+ Ut = !1, Ct.delta = Yr ? xa : Math.max(Math.min(t - Ct.timestamp, bu), 1), Ct.timestamp = t, Gr = !0, Wt.forEach(Pu), Gr = !1, Ut && (Yr = !1, Ta(Sa));
1360
+ }, xu = function() {
1361
+ Ut = !0, Yr = !0, Gr || Ta(Sa);
1362
+ }, dr = function() {
1363
+ return Ct;
1364
+ };
1365
+ function Aa(t, r, e) {
1366
+ return e === void 0 && (e = 0), t - r - e;
1367
+ }
1368
+ function Tu(t, r, e, n) {
1369
+ return e === void 0 && (e = 0), n === void 0 && (n = !0), n ? Aa(r + -t, r, e) : r - (t - r) + e;
1370
+ }
1371
+ function Su(t, r, e, n) {
1372
+ return n ? t >= r + e : t <= -e;
1373
+ }
1374
+ var Au = function(t) {
1375
+ var r = function(e) {
1376
+ var n = e.delta;
1377
+ return t(n);
1378
+ };
1379
+ return {
1380
+ start: function() {
1381
+ return nt.update(r, !0);
1382
+ },
1383
+ stop: function() {
1384
+ return Rt.update(r);
1385
+ }
1386
+ };
1387
+ };
1388
+ function Va(t) {
1389
+ var r, e, n = t.from, a = t.autoplay, o = a === void 0 ? !0 : a, i = t.driver, u = i === void 0 ? Au : i, f = t.elapsed, s = f === void 0 ? 0 : f, l = t.repeat, m = l === void 0 ? 0 : l, v = t.repeatType, d = v === void 0 ? "loop" : v, c = t.repeatDelay, y = c === void 0 ? 0 : c, p = t.onPlay, g = t.onStop, S = t.onComplete, M = t.onRepeat, L = t.onUpdate, x = J(t, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]), T = x.to, w, C = 0, A = x.duration, D, R = !1, j = !0, U, B = gu(x);
1390
+ !((e = (r = B).needsInterpolation) === null || e === void 0) && e.call(r, n, T) && (U = ma([0, 100], [n, T], {
1391
+ clamp: !1
1392
+ }), n = 0, T = 100);
1393
+ var Q = B(h(h({}, x), { from: n, to: T }));
1394
+ function O() {
1395
+ C++, d === "reverse" ? (j = C % 2 === 0, s = Tu(s, A, y, j)) : (s = Aa(s, A, y), d === "mirror" && Q.flipTarget()), R = !1, M && M();
1396
+ }
1397
+ function $() {
1398
+ w.stop(), S && S();
1399
+ }
1400
+ function q(tt) {
1401
+ if (j || (tt = -tt), s += tt, !R) {
1402
+ var _ = Q.next(Math.max(0, s));
1403
+ D = _.value, U && (D = U(D)), R = j ? _.done : s <= 0;
1404
+ }
1405
+ L == null || L(D), R && (C === 0 && (A ?? (A = s)), C < m ? Su(s, A, y, j) && O() : $());
1406
+ }
1407
+ function ht() {
1408
+ p == null || p(), w = u(q), w.start();
1409
+ }
1410
+ return o && ht(), {
1411
+ stop: function() {
1412
+ g == null || g(), w.stop();
1413
+ }
1414
+ };
1415
+ }
1416
+ function Ca(t, r) {
1417
+ return r ? t * (1e3 / r) : 0;
1418
+ }
1419
+ function Vu(t) {
1420
+ var r = t.from, e = r === void 0 ? 0 : r, n = t.velocity, a = n === void 0 ? 0 : n, o = t.min, i = t.max, u = t.power, f = u === void 0 ? 0.8 : u, s = t.timeConstant, l = s === void 0 ? 750 : s, m = t.bounceStiffness, v = m === void 0 ? 500 : m, d = t.bounceDamping, c = d === void 0 ? 10 : d, y = t.restDelta, p = y === void 0 ? 1 : y, g = t.modifyTarget, S = t.driver, M = t.onUpdate, L = t.onComplete, x;
1421
+ function T(O) {
1422
+ return o !== void 0 && O < o || i !== void 0 && O > i;
1423
+ }
1424
+ function w(O) {
1425
+ return o === void 0 ? i : i === void 0 || Math.abs(o - O) < Math.abs(i - O) ? o : i;
1426
+ }
1427
+ function C(O) {
1428
+ x == null || x.stop(), x = Va(h(h({}, O), { driver: S, onUpdate: function($) {
1429
+ var q;
1430
+ M == null || M($), (q = O.onUpdate) === null || q === void 0 || q.call(O, $);
1431
+ }, onComplete: L }));
1432
+ }
1433
+ function A(O) {
1434
+ C(h({ type: "spring", stiffness: v, damping: c, restDelta: p }, O));
1435
+ }
1436
+ if (T(e))
1437
+ A({ from: e, velocity: a, to: w(e) });
1438
+ else {
1439
+ var D = f * a + e;
1440
+ typeof g < "u" && (D = g(D));
1441
+ var R = w(D), j = R === o ? -1 : 1, U, B, Q = function(O) {
1442
+ U = B, B = O, a = Ca(O - U, dr().delta), (j === 1 && O > R || j === -1 && O < R) && A({ from: O, to: R, velocity: a });
1443
+ };
1444
+ C({
1445
+ type: "decay",
1446
+ from: e,
1447
+ velocity: a,
1448
+ timeConstant: l,
1449
+ power: f,
1450
+ restDelta: p,
1451
+ modifyTarget: g,
1452
+ onUpdate: T(D) ? Q : void 0
1453
+ });
1454
+ }
1455
+ return {
1456
+ stop: function() {
1457
+ return x == null ? void 0 : x.stop();
1458
+ }
1459
+ };
1460
+ }
1461
+ var Xr = function(t) {
1462
+ return t.hasOwnProperty("x") && t.hasOwnProperty("y");
1463
+ }, Ke = function(t) {
1464
+ return Xr(t) && t.hasOwnProperty("z");
1465
+ }, Qt = function(t, r) {
1466
+ return Math.abs(t - r);
1467
+ };
1468
+ function La(t, r) {
1469
+ if (zr(t) && zr(r))
1470
+ return Qt(t, r);
1471
+ if (Xr(t) && Xr(r)) {
1472
+ var e = Qt(t.x, r.x), n = Qt(t.y, r.y), a = Ke(t) && Ke(r) ? Qt(t.z, r.z) : 0;
1473
+ return Math.sqrt(Math.pow(e, 2) + Math.pow(n, 2) + Math.pow(a, 2));
1474
+ }
1475
+ }
1476
+ var wa = function(t, r) {
1477
+ return 1 - 3 * r + 3 * t;
1478
+ }, Ea = function(t, r) {
1479
+ return 3 * r - 6 * t;
1480
+ }, Ma = function(t) {
1481
+ return 3 * t;
1482
+ }, mr = function(t, r, e) {
1483
+ return ((wa(r, e) * t + Ea(r, e)) * t + Ma(r)) * t;
1484
+ }, Da = function(t, r, e) {
1485
+ return 3 * wa(r, e) * t * t + 2 * Ea(r, e) * t + Ma(r);
1486
+ }, Cu = 1e-7, Lu = 10;
1487
+ function wu(t, r, e, n, a) {
1488
+ var o, i, u = 0;
1489
+ do
1490
+ i = r + (e - r) / 2, o = mr(i, n, a) - t, o > 0 ? e = i : r = i;
1491
+ while (Math.abs(o) > Cu && ++u < Lu);
1492
+ return i;
1493
+ }
1494
+ var Eu = 8, Mu = 1e-3;
1495
+ function Du(t, r, e, n) {
1496
+ for (var a = 0; a < Eu; ++a) {
1497
+ var o = Da(r, e, n);
1498
+ if (o === 0)
1499
+ return r;
1500
+ var i = mr(r, e, n) - t;
1501
+ r -= i / o;
1502
+ }
1503
+ return r;
1504
+ }
1505
+ var ir = 11, kt = 1 / (ir - 1);
1506
+ function Ru(t, r, e, n) {
1507
+ if (t === r && e === n)
1508
+ return ha;
1509
+ for (var a = new Float32Array(ir), o = 0; o < ir; ++o)
1510
+ a[o] = mr(o * kt, t, e);
1511
+ function i(u) {
1512
+ for (var f = 0, s = 1, l = ir - 1; s !== l && a[s] <= u; ++s)
1513
+ f += kt;
1514
+ --s;
1515
+ var m = (u - a[s]) / (a[s + 1] - a[s]), v = f + m * kt, d = Da(v, t, e);
1516
+ return d >= Mu ? Du(u, v, t, e) : d === 0 ? v : wu(u, f, f + kt, t, e);
1517
+ }
1518
+ return function(u) {
1519
+ return u === 0 || u === 1 ? u : mr(i(u), r, n);
1520
+ };
1521
+ }
1522
+ function Ou(t) {
1523
+ var r = t.onTap, e = t.onTapStart, n = t.onTapCancel, a = t.whileTap, o = t.visualElement, i = r || e || n || a, u = It(!1), f = It(null);
1524
+ function s() {
1525
+ var c;
1526
+ (c = f.current) === null || c === void 0 || c.call(f), f.current = null;
1527
+ }
1528
+ function l() {
1529
+ var c;
1530
+ return s(), u.current = !1, (c = o.animationState) === null || c === void 0 || c.setActive(F.Tap, !1), !ua();
1531
+ }
1532
+ function m(c, y) {
1533
+ l() && (sa(o.getInstance(), c.target) ? r == null || r(c, y) : n == null || n(c, y));
1534
+ }
1535
+ function v(c, y) {
1536
+ l() && (n == null || n(c, y));
1537
+ }
1538
+ function d(c, y) {
1539
+ var p;
1540
+ s(), !u.current && (u.current = !0, f.current = Xt(Vt(window, "pointerup", m), Vt(window, "pointercancel", v)), e == null || e(c, y), (p = o.animationState) === null || p === void 0 || p.setActive(F.Tap, !0));
1541
+ }
1542
+ lr(o, "pointerdown", i ? d : void 0), fa(s);
1543
+ }
1544
+ var dt = function(t) {
1545
+ return function(r) {
1546
+ return t(r), null;
1547
+ };
1548
+ }, Iu = {
1549
+ tap: dt(Ou),
1550
+ focus: dt(xi),
1551
+ hover: dt(Ri)
1552
+ };
1553
+ function Ra(t, r) {
1554
+ if (!Array.isArray(r))
1555
+ return !1;
1556
+ var e = r.length;
1557
+ if (e !== t.length)
1558
+ return !1;
1559
+ for (var n = 0; n < e; n++)
1560
+ if (r[n] !== t[n])
1561
+ return !1;
1562
+ return !0;
1563
+ }
1564
+ var pr = function(t) {
1565
+ return t * 1e3;
1566
+ }, ze = {
1567
+ linear: ha,
1568
+ easeIn: pe,
1569
+ easeInOut: ya,
1570
+ easeOut: eu,
1571
+ circIn: ba,
1572
+ circInOut: nu,
1573
+ circOut: Pa,
1574
+ backIn: ge,
1575
+ backInOut: ou,
1576
+ backOut: au,
1577
+ anticipate: iu,
1578
+ bounceIn: lu,
1579
+ bounceInOut: cu,
1580
+ bounceOut: vr
1581
+ }, Ye = function(t) {
1582
+ if (Array.isArray(t)) {
1583
+ X(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
1584
+ var r = H(t, 4), e = r[0], n = r[1], a = r[2], o = r[3];
1585
+ return Ru(e, n, a, o);
1586
+ } else if (typeof t == "string")
1587
+ return X(ze[t] !== void 0, "Invalid easing type '" + t + "'"), ze[t];
1588
+ return t;
1589
+ }, Bu = function(t) {
1590
+ return Array.isArray(t) && typeof t[0] != "number";
1591
+ }, Ge = function(t, r) {
1592
+ return t === "zIndex" ? !1 : !!(typeof r == "number" || Array.isArray(r) || typeof r == "string" && // It's animatable if we have a string
1593
+ it.test(r) && // And it contains numbers and/or colors
1594
+ !r.startsWith("url("));
1595
+ }, vt = function() {
1596
+ return {
1597
+ type: "spring",
1598
+ stiffness: 500,
1599
+ damping: 25,
1600
+ restDelta: 0.5,
1601
+ restSpeed: 10
1602
+ };
1603
+ }, tr = function(t) {
1604
+ return {
1605
+ type: "spring",
1606
+ stiffness: 550,
1607
+ damping: t === 0 ? 2 * Math.sqrt(550) : 30,
1608
+ restDelta: 0.01,
1609
+ restSpeed: 10
1610
+ };
1611
+ }, Ir = function() {
1612
+ return {
1613
+ type: "keyframes",
1614
+ ease: "linear",
1615
+ duration: 0.3
1616
+ };
1617
+ }, Fu = function(t) {
1618
+ return {
1619
+ type: "keyframes",
1620
+ duration: 0.8,
1621
+ values: t
1622
+ };
1623
+ }, Xe = {
1624
+ x: vt,
1625
+ y: vt,
1626
+ z: vt,
1627
+ rotate: vt,
1628
+ rotateX: vt,
1629
+ rotateY: vt,
1630
+ rotateZ: vt,
1631
+ scaleX: tr,
1632
+ scaleY: tr,
1633
+ scale: tr,
1634
+ opacity: Ir,
1635
+ backgroundColor: Ir,
1636
+ color: Ir,
1637
+ default: tr
1638
+ }, ju = function(t, r) {
1639
+ var e;
1640
+ return jt(r) ? e = Fu : e = Xe[t] || Xe.default, h({ to: r }, e(r));
1641
+ }, Hu = h(h({}, Gn), {
1642
+ // Color props
1643
+ color: Y,
1644
+ backgroundColor: Y,
1645
+ outlineColor: Y,
1646
+ fill: Y,
1647
+ stroke: Y,
1648
+ // Border props
1649
+ borderColor: Y,
1650
+ borderTopColor: Y,
1651
+ borderRightColor: Y,
1652
+ borderBottomColor: Y,
1653
+ borderLeftColor: Y,
1654
+ filter: Nr,
1655
+ WebkitFilter: Nr
1656
+ }), he = function(t) {
1657
+ return Hu[t];
1658
+ };
1659
+ function ye(t, r) {
1660
+ var e, n = he(t);
1661
+ return n !== Nr && (n = it), (e = n.getAnimatableNone) === null || e === void 0 ? void 0 : e.call(n, r);
1662
+ }
1663
+ function Uu(t) {
1664
+ t.when, t.delay, t.delayChildren, t.staggerChildren, t.staggerDirection, t.repeat, t.repeatType, t.repeatDelay, t.from;
1665
+ var r = J(t, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from"]);
1666
+ return !!Object.keys(r).length;
1667
+ }
1668
+ var We = !1;
1669
+ function Nu(t) {
1670
+ var r = t.ease, e = t.times, n = t.yoyo, a = t.flip, o = t.loop, i = J(t, ["ease", "times", "yoyo", "flip", "loop"]), u = h({}, i);
1671
+ return e && (u.offset = e), i.duration && (u.duration = pr(i.duration)), i.repeatDelay && (u.repeatDelay = pr(i.repeatDelay)), r && (u.ease = Bu(r) ? r.map(Ye) : Ye(r)), i.type === "tween" && (u.type = "keyframes"), (n || o || a) && (br(!We, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."), We = !0, n ? u.repeatType = "reverse" : o ? u.repeatType = "loop" : a && (u.repeatType = "mirror"), u.repeat = o || n || a || i.repeat), i.type !== "spring" && (u.type = "keyframes"), u;
1672
+ }
1673
+ function _u(t, r) {
1674
+ var e, n = be(t, r) || {};
1675
+ return (e = n.delay) !== null && e !== void 0 ? e : 0;
1676
+ }
1677
+ function Ku(t) {
1678
+ return Array.isArray(t.to) && t.to[0] === null && (t.to = W([], H(t.to)), t.to[0] = t.from), t;
1679
+ }
1680
+ function zu(t, r, e) {
1681
+ var n;
1682
+ return Array.isArray(r.to) && ((n = t.duration) !== null && n !== void 0 || (t.duration = 0.8)), Ku(r), Uu(t) || (t = h(h({}, t), ju(e, r.to))), h(h({}, r), Nu(t));
1683
+ }
1684
+ function Yu(t, r, e, n, a) {
1685
+ var o, i = be(n, t), u = (o = i.from) !== null && o !== void 0 ? o : r.get(), f = Ge(t, e);
1686
+ u === "none" && f && typeof e == "string" ? u = ye(t, e) : Ze(u) && typeof e == "string" ? u = $e(e) : !Array.isArray(e) && Ze(e) && typeof u == "string" && (e = $e(u));
1687
+ var s = Ge(t, u);
1688
+ br(s === f, "You are trying to animate " + t + ' from "' + u + '" to "' + e + '". ' + u + " is not an animatable value - to enable this animation set " + u + " to a value animatable to " + e + " via the `style` property.");
1689
+ function l() {
1690
+ var v = {
1691
+ from: u,
1692
+ to: e,
1693
+ velocity: r.getVelocity(),
1694
+ onComplete: a,
1695
+ onUpdate: function(d) {
1696
+ return r.set(d);
1697
+ }
1698
+ };
1699
+ return i.type === "inertia" || i.type === "decay" ? Vu(h(h({}, v), i)) : Va(h(h({}, zu(i, v, t)), { onUpdate: function(d) {
1700
+ var c;
1701
+ v.onUpdate(d), (c = i.onUpdate) === null || c === void 0 || c.call(i, d);
1702
+ }, onComplete: function() {
1703
+ var d;
1704
+ v.onComplete(), (d = i.onComplete) === null || d === void 0 || d.call(i);
1705
+ } }));
1706
+ }
1707
+ function m() {
1708
+ var v;
1709
+ return r.set(e), a(), (v = i == null ? void 0 : i.onComplete) === null || v === void 0 || v.call(i), { stop: function() {
1710
+ } };
1711
+ }
1712
+ return !s || !f || i.type === !1 ? m : l;
1713
+ }
1714
+ function Ze(t) {
1715
+ return t === 0 || typeof t == "string" && parseFloat(t) === 0 && t.indexOf(" ") === -1;
1716
+ }
1717
+ function $e(t) {
1718
+ return typeof t == "number" ? 0 : ye("", t);
1719
+ }
1720
+ function be(t, r) {
1721
+ return t[r] || t.default || t;
1722
+ }
1723
+ function gr(t, r, e, n) {
1724
+ return n === void 0 && (n = {}), r.start(function(a) {
1725
+ var o, i, u = Yu(t, r, e, n, a), f = _u(n, t), s = function() {
1726
+ return i = u();
1727
+ };
1728
+ return f ? o = setTimeout(s, pr(f)) : s(), function() {
1729
+ clearTimeout(o), i == null || i.stop();
1730
+ };
1731
+ });
1732
+ }
1733
+ var Gu = function(t) {
1734
+ return /^\-?\d*\.?\d+$/.test(t);
1735
+ };
1736
+ function Oa(t, r) {
1737
+ t.indexOf(r) === -1 && t.push(r);
1738
+ }
1739
+ function Ia(t, r) {
1740
+ var e = t.indexOf(r);
1741
+ e > -1 && t.splice(e, 1);
1742
+ }
1743
+ var ur = (
1744
+ /** @class */
1745
+ function() {
1746
+ function t() {
1747
+ this.subscriptions = [];
1748
+ }
1749
+ return t.prototype.add = function(r) {
1750
+ var e = this;
1751
+ return Oa(this.subscriptions, r), function() {
1752
+ return Ia(e.subscriptions, r);
1753
+ };
1754
+ }, t.prototype.notify = function(r, e, n) {
1755
+ var a = this.subscriptions.length;
1756
+ if (a)
1757
+ if (a === 1)
1758
+ this.subscriptions[0](r, e, n);
1759
+ else
1760
+ for (var o = 0; o < a; o++) {
1761
+ var i = this.subscriptions[o];
1762
+ i && i(r, e, n);
1763
+ }
1764
+ }, t.prototype.getSize = function() {
1765
+ return this.subscriptions.length;
1766
+ }, t.prototype.clear = function() {
1767
+ this.subscriptions.length = 0;
1768
+ }, t;
1769
+ }()
1770
+ ), Xu = function(t) {
1771
+ return !isNaN(parseFloat(t));
1772
+ }, Wu = (
1773
+ /** @class */
1774
+ function() {
1775
+ function t(r) {
1776
+ var e = this;
1777
+ this.timeDelta = 0, this.lastUpdated = 0, this.updateSubscribers = new ur(), this.velocityUpdateSubscribers = new ur(), this.renderSubscribers = new ur(), this.canTrackVelocity = !1, this.updateAndNotify = function(n, a) {
1778
+ a === void 0 && (a = !0), e.prev = e.current, e.current = n;
1779
+ var o = dr(), i = o.delta, u = o.timestamp;
1780
+ e.lastUpdated !== u && (e.timeDelta = i, e.lastUpdated = u, nt.postRender(e.scheduleVelocityCheck)), e.prev !== e.current && e.updateSubscribers.notify(e.current), e.velocityUpdateSubscribers.getSize() && e.velocityUpdateSubscribers.notify(e.getVelocity()), a && e.renderSubscribers.notify(e.current);
1781
+ }, this.scheduleVelocityCheck = function() {
1782
+ return nt.postRender(e.velocityCheck);
1783
+ }, this.velocityCheck = function(n) {
1784
+ var a = n.timestamp;
1785
+ a !== e.lastUpdated && (e.prev = e.current, e.velocityUpdateSubscribers.notify(e.getVelocity()));
1786
+ }, this.hasAnimated = !1, this.prev = this.current = r, this.canTrackVelocity = Xu(this.current);
1787
+ }
1788
+ return t.prototype.onChange = function(r) {
1789
+ return this.updateSubscribers.add(r);
1790
+ }, t.prototype.clearListeners = function() {
1791
+ this.updateSubscribers.clear();
1792
+ }, t.prototype.onRenderRequest = function(r) {
1793
+ return r(this.get()), this.renderSubscribers.add(r);
1794
+ }, t.prototype.attach = function(r) {
1795
+ this.passiveEffect = r;
1796
+ }, t.prototype.set = function(r, e) {
1797
+ e === void 0 && (e = !0), !e || !this.passiveEffect ? this.updateAndNotify(r, e) : this.passiveEffect(r, this.updateAndNotify);
1798
+ }, t.prototype.get = function() {
1799
+ return this.current;
1800
+ }, t.prototype.getPrevious = function() {
1801
+ return this.prev;
1802
+ }, t.prototype.getVelocity = function() {
1803
+ return this.canTrackVelocity ? (
1804
+ // These casts could be avoided if parseFloat would be typed better
1805
+ Ca(parseFloat(this.current) - parseFloat(this.prev), this.timeDelta)
1806
+ ) : 0;
1807
+ }, t.prototype.start = function(r) {
1808
+ var e = this;
1809
+ return this.stop(), new Promise(function(n) {
1810
+ e.hasAnimated = !0, e.stopAnimation = r(n);
1811
+ }).then(function() {
1812
+ return e.clearAnimation();
1813
+ });
1814
+ }, t.prototype.stop = function() {
1815
+ this.stopAnimation && this.stopAnimation(), this.clearAnimation();
1816
+ }, t.prototype.isAnimating = function() {
1817
+ return !!this.stopAnimation;
1818
+ }, t.prototype.clearAnimation = function() {
1819
+ this.stopAnimation = null;
1820
+ }, t.prototype.destroy = function() {
1821
+ this.updateSubscribers.clear(), this.renderSubscribers.clear(), this.stop();
1822
+ }, t;
1823
+ }()
1824
+ );
1825
+ function mt(t) {
1826
+ return new Wu(t);
1827
+ }
1828
+ var Ba = function(t) {
1829
+ return function(r) {
1830
+ return r.test(t);
1831
+ };
1832
+ }, Zu = {
1833
+ test: function(t) {
1834
+ return t === "auto";
1835
+ },
1836
+ parse: function(t) {
1837
+ return t;
1838
+ }
1839
+ }, Fa = [gt, E, At, ut, Go, Yo, Zu], rr = function(t) {
1840
+ return Fa.find(Ba(t));
1841
+ }, $u = W(W([], H(Fa)), [Y, it]), qu = function(t) {
1842
+ return $u.find(Ba(t));
1843
+ };
1844
+ function Ju(t, r, e) {
1845
+ t.hasValue(r) ? t.getValue(r).set(e) : t.addValue(r, mt(e));
1846
+ }
1847
+ function Qu(t, r) {
1848
+ var e = Sr(t, r), n = e ? t.makeTargetAnimatable(e, !1) : {}, a = n.transitionEnd, o = a === void 0 ? {} : a;
1849
+ n.transition;
1850
+ var i = J(n, ["transitionEnd", "transition"]);
1851
+ i = h(h({}, i), o);
1852
+ for (var u in i) {
1853
+ var f = mi(i[u]);
1854
+ Ju(t, u, f);
1855
+ }
1856
+ }
1857
+ function ku(t, r, e) {
1858
+ var n, a, o, i, u = Object.keys(r).filter(function(d) {
1859
+ return !t.hasValue(d);
1860
+ }), f = u.length;
1861
+ if (f)
1862
+ for (var s = 0; s < f; s++) {
1863
+ var l = u[s], m = r[l], v = null;
1864
+ Array.isArray(m) && (v = m[0]), v === null && (v = (a = (n = e[l]) !== null && n !== void 0 ? n : t.readValue(l)) !== null && a !== void 0 ? a : r[l]), v != null && (typeof v == "string" && Gu(v) ? v = parseFloat(v) : !qu(v) && it.test(m) && (v = ye(l, m)), t.addValue(l, mt(v)), (o = (i = e)[l]) !== null && o !== void 0 || (i[l] = v), t.setBaseTarget(l, v));
1865
+ }
1866
+ }
1867
+ function ts(t, r) {
1868
+ if (r) {
1869
+ var e = r[t] || r.default || r;
1870
+ return e.from;
1871
+ }
1872
+ }
1873
+ function rs(t, r, e) {
1874
+ var n, a, o = {};
1875
+ for (var i in t)
1876
+ o[i] = (n = ts(i, r)) !== null && n !== void 0 ? n : (a = e.getValue(i)) === null || a === void 0 ? void 0 : a.get();
1877
+ return o;
1878
+ }
1879
+ function es(t, r, e) {
1880
+ e === void 0 && (e = {}), t.notifyAnimationStart();
1881
+ var n;
1882
+ if (Array.isArray(r)) {
1883
+ var a = r.map(function(i) {
1884
+ return Wr(t, i, e);
1885
+ });
1886
+ n = Promise.all(a);
1887
+ } else if (typeof r == "string")
1888
+ n = Wr(t, r, e);
1889
+ else {
1890
+ var o = typeof r == "function" ? Sr(t, r, e.custom) : r;
1891
+ n = ja(t, o, e);
1892
+ }
1893
+ return n.then(function() {
1894
+ return t.notifyAnimationComplete(r);
1895
+ });
1896
+ }
1897
+ function Wr(t, r, e) {
1898
+ var n;
1899
+ e === void 0 && (e = {});
1900
+ var a = Sr(t, r, e.custom), o = (a || {}).transition, i = o === void 0 ? t.getDefaultTransition() || {} : o;
1901
+ e.transitionOverride && (i = e.transitionOverride);
1902
+ var u = a ? function() {
1903
+ return ja(t, a, e);
1904
+ } : function() {
1905
+ return Promise.resolve();
1906
+ }, f = !((n = t.variantChildren) === null || n === void 0) && n.size ? function(d) {
1907
+ d === void 0 && (d = 0);
1908
+ var c = i.delayChildren, y = c === void 0 ? 0 : c, p = i.staggerChildren, g = i.staggerDirection;
1909
+ return ns(t, r, y + d, p, g, e);
1910
+ } : function() {
1911
+ return Promise.resolve();
1912
+ }, s = i.when;
1913
+ if (s) {
1914
+ var l = H(s === "beforeChildren" ? [u, f] : [f, u], 2), m = l[0], v = l[1];
1915
+ return m().then(v);
1916
+ } else
1917
+ return Promise.all([u(), f(e.delay)]);
1918
+ }
1919
+ function ja(t, r, e) {
1920
+ var n, a = e === void 0 ? {} : e, o = a.delay, i = o === void 0 ? 0 : o, u = a.transitionOverride, f = a.type, s = t.makeTargetAnimatable(r), l = s.transition, m = l === void 0 ? t.getDefaultTransition() : l, v = s.transitionEnd, d = J(s, ["transition", "transitionEnd"]);
1921
+ u && (m = u);
1922
+ var c = [], y = f && ((n = t.animationState) === null || n === void 0 ? void 0 : n.getState()[f]);
1923
+ for (var p in d) {
1924
+ var g = t.getValue(p), S = d[p];
1925
+ if (!(!g || S === void 0 || y && os(y, p))) {
1926
+ var M = gr(p, g, S, h({ delay: i }, m));
1927
+ c.push(M);
1928
+ }
1929
+ }
1930
+ return Promise.all(c).then(function() {
1931
+ v && Qu(t, v);
1932
+ });
1933
+ }
1934
+ function ns(t, r, e, n, a, o) {
1935
+ e === void 0 && (e = 0), n === void 0 && (n = 0), a === void 0 && (a = 1);
1936
+ var i = [], u = (t.variantChildren.size - 1) * n, f = a === 1 ? function(s) {
1937
+ return s === void 0 && (s = 0), s * n;
1938
+ } : function(s) {
1939
+ return s === void 0 && (s = 0), u - s * n;
1940
+ };
1941
+ return Array.from(t.variantChildren).sort(as).forEach(function(s, l) {
1942
+ i.push(Wr(s, r, h(h({}, o), { delay: e + f(l) })).then(function() {
1943
+ return s.notifyAnimationComplete(r);
1944
+ }));
1945
+ }), Promise.all(i);
1946
+ }
1947
+ function as(t, r) {
1948
+ return t.sortNodePosition(r);
1949
+ }
1950
+ function os(t, r) {
1951
+ var e = t.protectedKeys, n = t.needsAnimating, a = e.hasOwnProperty(r) && n[r] !== !0;
1952
+ return n[r] = !1, a;
1953
+ }
1954
+ var Pe = [
1955
+ F.Animate,
1956
+ F.Hover,
1957
+ F.Tap,
1958
+ F.Drag,
1959
+ F.Focus,
1960
+ F.Exit
1961
+ ], is = W([], H(Pe)).reverse(), us = Pe.length;
1962
+ function ss(t) {
1963
+ return function(r) {
1964
+ return Promise.all(r.map(function(e) {
1965
+ var n = e.animation, a = e.options;
1966
+ return es(t, n, a);
1967
+ }));
1968
+ };
1969
+ }
1970
+ function fs(t) {
1971
+ var r = ss(t), e = cs(), n = {}, a = !0, o = function(l, m) {
1972
+ var v = Sr(t, m);
1973
+ if (v) {
1974
+ v.transition;
1975
+ var d = v.transitionEnd, c = J(v, ["transition", "transitionEnd"]);
1976
+ l = h(h(h({}, l), c), d);
1977
+ }
1978
+ return l;
1979
+ };
1980
+ function i(l) {
1981
+ return n[l] !== void 0;
1982
+ }
1983
+ function u(l) {
1984
+ r = l(t);
1985
+ }
1986
+ function f(l, m) {
1987
+ for (var v, d = t.getProps(), c = t.getVariantContext(!0) || {}, y = [], p = /* @__PURE__ */ new Set(), g = {}, S = 1 / 0, M = function(w) {
1988
+ var C = is[w], A = e[C], D = (v = d[C]) !== null && v !== void 0 ? v : c[C], R = rt(D), j = C === m ? A.isActive : null;
1989
+ j === !1 && (S = w);
1990
+ var U = D === c[C] && D !== d[C] && R;
1991
+ if (U && a && t.manuallyAnimateOnMount && (U = !1), A.protectedKeys = h({}, g), // If it isn't active and hasn't *just* been set as inactive
1992
+ !A.isActive && j === null || // If we didn't and don't have any defined prop for this animation type
1993
+ !D && !A.prevProp || // Or if the prop doesn't define an animation
1994
+ le(D) || typeof D == "boolean")
1995
+ return "continue";
1996
+ var B = ls(A.prevProp, D) || // If we're making this variant active, we want to always make it active
1997
+ C === m && A.isActive && !U && R || // If we removed a higher-priority variant (i is in reverse order)
1998
+ w > S && R, Q = Array.isArray(D) ? D : [D], O = Q.reduce(o, {});
1999
+ j === !1 && (O = {});
2000
+ var $ = A.prevResolvedValues, q = $ === void 0 ? {} : $, ht = h(h({}, q), O), tt = function(ct) {
2001
+ B = !0, p.delete(ct), A.needsAnimating[ct] = !0;
2002
+ };
2003
+ for (var _ in ht) {
2004
+ var et = O[_], lt = q[_];
2005
+ g.hasOwnProperty(_) || (et !== lt ? jt(et) && jt(lt) ? Ra(et, lt) ? A.protectedKeys[_] = !0 : tt(_) : et !== void 0 ? tt(_) : p.add(_) : et !== void 0 && p.has(_) ? tt(_) : A.protectedKeys[_] = !0);
2006
+ }
2007
+ A.prevProp = D, A.prevResolvedValues = O, A.isActive && (g = h(h({}, g), O)), a && t.blockInitialAnimation && (B = !1), B && !U && y.push.apply(y, W([], H(Q.map(function(ct) {
2008
+ return {
2009
+ animation: ct,
2010
+ options: h({ type: C }, l)
2011
+ };
2012
+ }))));
2013
+ }, L = 0; L < us; L++)
2014
+ M(L);
2015
+ if (n = h({}, g), p.size) {
2016
+ var x = {};
2017
+ p.forEach(function(w) {
2018
+ var C = t.getBaseTarget(w);
2019
+ C !== void 0 && (x[w] = C);
2020
+ }), y.push({ animation: x });
2021
+ }
2022
+ var T = !!y.length;
2023
+ return a && d.initial === !1 && !t.manuallyAnimateOnMount && (T = !1), a = !1, T ? r(y) : Promise.resolve();
2024
+ }
2025
+ function s(l, m, v) {
2026
+ var d;
2027
+ return e[l].isActive === m ? Promise.resolve() : ((d = t.variantChildren) === null || d === void 0 || d.forEach(function(c) {
2028
+ var y;
2029
+ return (y = c.animationState) === null || y === void 0 ? void 0 : y.setActive(l, m);
2030
+ }), e[l].isActive = m, f(v, l));
2031
+ }
2032
+ return {
2033
+ isAnimated: i,
2034
+ animateChanges: f,
2035
+ setActive: s,
2036
+ setAnimateFunction: u,
2037
+ getState: function() {
2038
+ return e;
2039
+ }
2040
+ };
2041
+ }
2042
+ function ls(t, r) {
2043
+ return typeof r == "string" ? r !== t : Rn(r) ? !Ra(r, t) : !1;
2044
+ }
2045
+ function yt(t) {
2046
+ return t === void 0 && (t = !1), {
2047
+ isActive: t,
2048
+ protectedKeys: {},
2049
+ needsAnimating: {},
2050
+ prevResolvedValues: {}
2051
+ };
2052
+ }
2053
+ function cs() {
2054
+ var t;
2055
+ return t = {}, t[F.Animate] = yt(!0), t[F.Hover] = yt(), t[F.Tap] = yt(), t[F.Drag] = yt(), t[F.Focus] = yt(), t[F.Exit] = yt(), t;
2056
+ }
2057
+ var vs = {
2058
+ animation: dt(function(t) {
2059
+ var r = t.visualElement, e = t.animate;
2060
+ r.animationState || (r.animationState = fs(r)), le(e) && at(function() {
2061
+ return e.subscribe(r);
2062
+ }, [e]);
2063
+ }),
2064
+ exit: dt(function(t) {
2065
+ var r = t.custom, e = t.visualElement, n = H(Dn(), 2), a = n[0], o = n[1], i = z(Tr);
2066
+ at(function() {
2067
+ var u, f, s = (u = e.animationState) === null || u === void 0 ? void 0 : u.setActive(F.Exit, !a, { custom: (f = i == null ? void 0 : i.custom) !== null && f !== void 0 ? f : r });
2068
+ !a && (s == null || s.then(o));
2069
+ }, [a]);
2070
+ })
2071
+ }, Ha = (
2072
+ /** @class */
2073
+ function() {
2074
+ function t(r, e, n) {
2075
+ var a = this, o = n === void 0 ? {} : n, i = o.transformPagePoint;
2076
+ if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.updatePoint = function() {
2077
+ if (a.lastMoveEvent && a.lastMoveEventInfo) {
2078
+ var v = Fr(a.lastMoveEventInfo, a.history), d = a.startEvent !== null, c = La(v.offset, { x: 0, y: 0 }) >= 3;
2079
+ if (!(!d && !c)) {
2080
+ var y = v.point, p = dr().timestamp;
2081
+ a.history.push(h(h({}, y), { timestamp: p }));
2082
+ var g = a.handlers, S = g.onStart, M = g.onMove;
2083
+ d || (S && S(a.lastMoveEvent, v), a.startEvent = a.lastMoveEvent), M && M(a.lastMoveEvent, v);
2084
+ }
2085
+ }
2086
+ }, this.handlePointerMove = function(v, d) {
2087
+ if (a.lastMoveEvent = v, a.lastMoveEventInfo = Br(d, a.transformPagePoint), ra(v) && v.buttons === 0) {
2088
+ a.handlePointerUp(v, d);
2089
+ return;
2090
+ }
2091
+ nt.update(a.updatePoint, !0);
2092
+ }, this.handlePointerUp = function(v, d) {
2093
+ a.end();
2094
+ var c = a.handlers, y = c.onEnd, p = c.onSessionEnd, g = Fr(Br(d, a.transformPagePoint), a.history);
2095
+ a.startEvent && y && y(v, g), p && p(v, g);
2096
+ }, !(ea(r) && r.touches.length > 1)) {
2097
+ this.handlers = e, this.transformPagePoint = i;
2098
+ var u = ve(r), f = Br(u, this.transformPagePoint), s = f.point, l = dr().timestamp;
2099
+ this.history = [h(h({}, s), { timestamp: l })];
2100
+ var m = e.onSessionStart;
2101
+ m && m(r, Fr(f, this.history)), this.removeListeners = Xt(Vt(window, "pointermove", this.handlePointerMove), Vt(window, "pointerup", this.handlePointerUp), Vt(window, "pointercancel", this.handlePointerUp));
2102
+ }
2103
+ }
2104
+ return t.prototype.updateHandlers = function(r) {
2105
+ this.handlers = r;
2106
+ }, t.prototype.end = function() {
2107
+ this.removeListeners && this.removeListeners(), Rt.update(this.updatePoint);
2108
+ }, t;
2109
+ }()
2110
+ );
2111
+ function Br(t, r) {
2112
+ return r ? { point: r(t.point) } : t;
2113
+ }
2114
+ function qe(t, r) {
2115
+ return { x: t.x - r.x, y: t.y - r.y };
2116
+ }
2117
+ function Fr(t, r) {
2118
+ var e = t.point;
2119
+ return {
2120
+ point: e,
2121
+ delta: qe(e, Ua(r)),
2122
+ offset: qe(e, ds(r)),
2123
+ velocity: ms(r, 0.1)
2124
+ };
2125
+ }
2126
+ function ds(t) {
2127
+ return t[0];
2128
+ }
2129
+ function Ua(t) {
2130
+ return t[t.length - 1];
2131
+ }
2132
+ function ms(t, r) {
2133
+ if (t.length < 2)
2134
+ return { x: 0, y: 0 };
2135
+ for (var e = t.length - 1, n = null, a = Ua(t); e >= 0 && (n = t[e], !(a.timestamp - n.timestamp > pr(r))); )
2136
+ e--;
2137
+ if (!n)
2138
+ return { x: 0, y: 0 };
2139
+ var o = (a.timestamp - n.timestamp) / 1e3;
2140
+ if (o === 0)
2141
+ return { x: 0, y: 0 };
2142
+ var i = {
2143
+ x: (a.x - n.x) / o,
2144
+ y: (a.y - n.y) / o
2145
+ };
2146
+ return i.x === 1 / 0 && (i.x = 0), i.y === 1 / 0 && (i.y = 0), i;
2147
+ }
2148
+ function ps(t) {
2149
+ return t;
2150
+ }
2151
+ function Na(t) {
2152
+ var r = t.top, e = t.left, n = t.right, a = t.bottom;
2153
+ return {
2154
+ x: { min: e, max: n },
2155
+ y: { min: r, max: a }
2156
+ };
2157
+ }
2158
+ function gs(t) {
2159
+ var r = t.x, e = t.y;
2160
+ return {
2161
+ top: e.min,
2162
+ bottom: e.max,
2163
+ left: r.min,
2164
+ right: r.max
2165
+ };
2166
+ }
2167
+ function hs(t, r) {
2168
+ var e = t.top, n = t.left, a = t.bottom, o = t.right;
2169
+ r === void 0 && (r = ps);
2170
+ var i = r({ x: n, y: e }), u = r({ x: o, y: a });
2171
+ return {
2172
+ top: i.y,
2173
+ left: i.x,
2174
+ bottom: u.y,
2175
+ right: u.x
2176
+ };
2177
+ }
2178
+ function ft() {
2179
+ return { x: { min: 0, max: 1 }, y: { min: 0, max: 1 } };
2180
+ }
2181
+ function ys(t) {
2182
+ return {
2183
+ x: h({}, t.x),
2184
+ y: h({}, t.y)
2185
+ };
2186
+ }
2187
+ var Je = {
2188
+ translate: 0,
2189
+ scale: 1,
2190
+ origin: 0,
2191
+ originPoint: 0
2192
+ };
2193
+ function Qe() {
2194
+ return {
2195
+ x: h({}, Je),
2196
+ y: h({}, Je)
2197
+ };
2198
+ }
2199
+ function G(t) {
2200
+ return [t("x"), t("y")];
2201
+ }
2202
+ function _a(t, r, e) {
2203
+ var n = r.min, a = r.max;
2204
+ return n !== void 0 && t < n ? t = e ? Z(n, t, e.min) : Math.max(t, n) : a !== void 0 && t > a && (t = e ? Z(a, t, e.max) : Math.min(t, a)), t;
2205
+ }
2206
+ function bs(t, r, e, n, a) {
2207
+ var o = t - r * e;
2208
+ return n ? _a(o, n, a) : o;
2209
+ }
2210
+ function ke(t, r, e) {
2211
+ return {
2212
+ min: r !== void 0 ? t.min + r : void 0,
2213
+ max: e !== void 0 ? t.max + e - (t.max - t.min) : void 0
2214
+ };
2215
+ }
2216
+ function Ps(t, r) {
2217
+ var e = r.top, n = r.left, a = r.bottom, o = r.right;
2218
+ return {
2219
+ x: ke(t.x, n, o),
2220
+ y: ke(t.y, e, a)
2221
+ };
2222
+ }
2223
+ function tn(t, r) {
2224
+ var e, n = r.min - t.min, a = r.max - t.max;
2225
+ return r.max - r.min < t.max - t.min && (e = H([a, n], 2), n = e[0], a = e[1]), {
2226
+ min: t.min + n,
2227
+ max: t.min + a
2228
+ };
2229
+ }
2230
+ function xs(t, r) {
2231
+ return {
2232
+ x: tn(t.x, r.x),
2233
+ y: tn(t.y, r.y)
2234
+ };
2235
+ }
2236
+ function Ts(t, r, e) {
2237
+ var n = t.max - t.min, a = Z(r.min, r.max - n, e);
2238
+ return { min: a, max: a + n };
2239
+ }
2240
+ function Ss(t, r) {
2241
+ var e = {};
2242
+ return r.min !== void 0 && (e.min = r.min - t.min), r.max !== void 0 && (e.max = r.max - t.min), e;
2243
+ }
2244
+ var Ka = 0.35;
2245
+ function As(t) {
2246
+ return t === !1 ? t = 0 : t === !0 && (t = Ka), {
2247
+ x: rn(t, "left", "right"),
2248
+ y: rn(t, "top", "bottom")
2249
+ };
2250
+ }
2251
+ function rn(t, r, e) {
2252
+ return {
2253
+ min: en(t, r),
2254
+ max: en(t, e)
2255
+ };
2256
+ }
2257
+ function en(t, r) {
2258
+ var e;
2259
+ return typeof t == "number" ? t : (e = t[r]) !== null && e !== void 0 ? e : 0;
2260
+ }
2261
+ function za(t, r) {
2262
+ var e = t.getBoundingClientRect();
2263
+ return Na(hs(e, r));
2264
+ }
2265
+ var Vs = function(t) {
2266
+ return cr(0, 1, t);
2267
+ };
2268
+ function nn(t, r, e) {
2269
+ return r === void 0 && (r = 0), e === void 0 && (e = 0.01), La(t, r) < e;
2270
+ }
2271
+ function Nt(t) {
2272
+ return t.max - t.min;
2273
+ }
2274
+ function Cs(t, r) {
2275
+ var e = 0.5, n = Nt(t), a = Nt(r);
2276
+ return a > n ? e = Ht(r.min, r.max - n, t.min) : n > a && (e = Ht(t.min, t.max - a, r.min)), Vs(e);
2277
+ }
2278
+ function an(t, r, e, n) {
2279
+ n === void 0 && (n = 0.5), t.origin = n, t.originPoint = Z(r.min, r.max, t.origin), t.scale = Nt(e) / Nt(r), nn(t.scale, 1, 1e-4) && (t.scale = 1), t.translate = Z(e.min, e.max, t.origin) - t.originPoint, nn(t.translate) && (t.translate = 0);
2280
+ }
2281
+ function Ya(t, r, e, n) {
2282
+ an(t.x, r.x, e.x, on(n.originX)), an(t.y, r.y, e.y, on(n.originY));
2283
+ }
2284
+ function on(t) {
2285
+ return typeof t == "number" ? t : 0.5;
2286
+ }
2287
+ function un(t, r, e) {
2288
+ t.min = e.min + r.min, t.max = t.min + Nt(r);
2289
+ }
2290
+ function Ls(t, r) {
2291
+ un(t.target.x, t.relativeTarget.x, r.target.x), un(t.target.y, t.relativeTarget.y, r.target.y);
2292
+ }
2293
+ var xe = function(t, r) {
2294
+ return t.depth - r.depth;
2295
+ };
2296
+ function Ga(t) {
2297
+ var r = t.projection.isEnabled;
2298
+ return r || t.shouldResetTransform();
2299
+ }
2300
+ function hr(t, r) {
2301
+ r === void 0 && (r = []);
2302
+ var e = t.parent;
2303
+ return e && hr(e, r), Ga(t) && r.push(t), r;
2304
+ }
2305
+ function ws(t) {
2306
+ var r = [], e = function(n) {
2307
+ Ga(n) && r.push(n), n.children.forEach(e);
2308
+ };
2309
+ return t.children.forEach(e), r.sort(xe);
2310
+ }
2311
+ function sr(t) {
2312
+ if (!t.shouldResetTransform()) {
2313
+ var r = t.getLayoutState();
2314
+ t.notifyBeforeLayoutMeasure(r.layout), r.isHydrated = !0, r.layout = t.measureViewportBox(), r.layoutCorrected = ys(r.layout), t.notifyLayoutMeasure(r.layout, t.prevViewportBox || r.layout), nt.update(function() {
2315
+ return t.rebaseProjectionTarget();
2316
+ });
2317
+ }
2318
+ }
2319
+ function Es(t) {
2320
+ t.shouldResetTransform() || (t.prevViewportBox = t.measureViewportBox(!1), t.rebaseProjectionTarget(!1, t.prevViewportBox));
2321
+ }
2322
+ function Ms(t, r, e, n) {
2323
+ t.min = Z(r.min, e.min, n), t.max = Z(r.max, e.max, n);
2324
+ }
2325
+ function sn(t, r) {
2326
+ return {
2327
+ min: r.min - t.min,
2328
+ max: r.max - t.min
2329
+ };
2330
+ }
2331
+ function Lt(t, r) {
2332
+ return {
2333
+ x: sn(t.x, r.x),
2334
+ y: sn(t.y, r.y)
2335
+ };
2336
+ }
2337
+ function Ds(t, r) {
2338
+ var e = t.getLayoutId(), n = r.getLayoutId();
2339
+ return e !== n || n === void 0 && t !== r;
2340
+ }
2341
+ function Xa(t) {
2342
+ var r = t.getProps(), e = r.drag, n = r._dragX;
2343
+ return e && !n;
2344
+ }
2345
+ function fn(t, r) {
2346
+ t.min = r.min, t.max = r.max;
2347
+ }
2348
+ function Rs(t, r) {
2349
+ fn(t.x, r.x), fn(t.y, r.y);
2350
+ }
2351
+ function yr(t, r, e) {
2352
+ var n = t - e, a = r * n;
2353
+ return e + a;
2354
+ }
2355
+ function ln(t, r, e, n, a) {
2356
+ return a !== void 0 && (t = yr(t, a, n)), yr(t, e, n) + r;
2357
+ }
2358
+ function Zr(t, r, e, n, a) {
2359
+ r === void 0 && (r = 0), e === void 0 && (e = 1), t.min = ln(t.min, r, e, n, a), t.max = ln(t.max, r, e, n, a);
2360
+ }
2361
+ function Os(t, r) {
2362
+ var e = r.x, n = r.y;
2363
+ Zr(t.x, e.translate, e.scale, e.originPoint), Zr(t.y, n.translate, n.scale, n.originPoint);
2364
+ }
2365
+ function cn(t, r, e, n) {
2366
+ var a = H(n, 3), o = a[0], i = a[1], u = a[2];
2367
+ t.min = r.min, t.max = r.max;
2368
+ var f = e[u] !== void 0 ? e[u] : 0.5, s = Z(r.min, r.max, f);
2369
+ Zr(t, e[o], e[i], s, e.scale);
2370
+ }
2371
+ var Wa = ["x", "scaleX", "originX"], Za = ["y", "scaleY", "originY"];
2372
+ function $r(t, r, e) {
2373
+ cn(t.x, r.x, e, Wa), cn(t.y, r.y, e, Za);
2374
+ }
2375
+ function vn(t, r, e, n, a) {
2376
+ return t -= r, t = yr(t, 1 / e, n), a !== void 0 && (t = yr(t, 1 / a, n)), t;
2377
+ }
2378
+ function Is(t, r, e, n, a) {
2379
+ r === void 0 && (r = 0), e === void 0 && (e = 1), n === void 0 && (n = 0.5);
2380
+ var o = Z(t.min, t.max, n) - r;
2381
+ t.min = vn(t.min, r, e, o, a), t.max = vn(t.max, r, e, o, a);
2382
+ }
2383
+ function dn(t, r, e) {
2384
+ var n = H(e, 3), a = n[0], o = n[1], i = n[2];
2385
+ Is(t, r[a], r[o], r[i], r.scale);
2386
+ }
2387
+ function $a(t, r) {
2388
+ dn(t.x, r, Wa), dn(t.y, r, Za);
2389
+ }
2390
+ function Bs(t, r, e) {
2391
+ var n = e.length;
2392
+ if (n) {
2393
+ r.x = r.y = 1;
2394
+ for (var a, o, i = 0; i < n; i++)
2395
+ a = e[i], o = a.getLayoutState().delta, r.x *= o.x.scale, r.y *= o.y.scale, Os(t, o), Xa(a) && $r(t, t, a.getLatestValues());
2396
+ }
2397
+ }
2398
+ function Fs(t, r) {
2399
+ r === void 0 && (r = !0);
2400
+ var e = t.getProjectionParent();
2401
+ if (!e)
2402
+ return !1;
2403
+ var n;
2404
+ return r ? (n = Lt(e.projection.target, t.projection.target), $a(n, e.getLatestValues())) : n = Lt(e.getLayoutState().layout, t.getLayoutState().layout), G(function(a) {
2405
+ return t.setProjectionTargetAxis(a, n[a].min, n[a].max, !0);
2406
+ }), !0;
2407
+ }
2408
+ var Ot = /* @__PURE__ */ new Set();
2409
+ function mn(t, r, e) {
2410
+ t[e] || (t[e] = []), t[e].push(r);
2411
+ }
2412
+ function qr(t) {
2413
+ return Ot.add(t), function() {
2414
+ return Ot.delete(t);
2415
+ };
2416
+ }
2417
+ function Jr() {
2418
+ if (Ot.size) {
2419
+ var t = 0, r = [[]], e = [], n = function(u) {
2420
+ return mn(r, u, t);
2421
+ }, a = function(u) {
2422
+ mn(e, u, t), t++;
2423
+ };
2424
+ Ot.forEach(function(u) {
2425
+ u(n, a), t = 0;
2426
+ }), Ot.clear();
2427
+ for (var o = e.length, i = 0; i <= o; i++)
2428
+ r[i] && r[i].forEach(pn), e[i] && e[i].forEach(pn);
2429
+ }
2430
+ }
2431
+ var pn = function(t) {
2432
+ return t();
2433
+ }, js = /* @__PURE__ */ new WeakMap(), gn, Hs = (
2434
+ /** @class */
2435
+ function() {
2436
+ function t(r) {
2437
+ var e = r.visualElement;
2438
+ this.isDragging = !1, this.currentDirection = null, this.constraints = !1, this.elastic = ft(), this.props = {}, this.hasMutatedConstraints = !1, this.cursorProgress = {
2439
+ x: 0.5,
2440
+ y: 0.5
2441
+ }, this.originPoint = {}, this.openGlobalLock = null, this.panSession = null, this.visualElement = e, this.visualElement.enableLayoutProjection(), js.set(e, this);
2442
+ }
2443
+ return t.prototype.start = function(r, e) {
2444
+ var n = this, a = e === void 0 ? {} : e, o = a.snapToCursor, i = o === void 0 ? !1 : o, u = a.cursorProgress, f = function(d) {
2445
+ var c;
2446
+ n.stopMotion();
2447
+ var y = Ci(d).point;
2448
+ (c = n.cancelLayout) === null || c === void 0 || c.call(n), n.cancelLayout = qr(function(p, g) {
2449
+ var S = hr(n.visualElement), M = ws(n.visualElement), L = W(W([], H(S)), H(M)), x = !1;
2450
+ n.isLayoutDrag() && n.visualElement.lockProjectionTarget(), g(function() {
2451
+ L.forEach(function(T) {
2452
+ return T.resetTransform();
2453
+ });
2454
+ }), p(function() {
2455
+ sr(n.visualElement), M.forEach(sr);
2456
+ }), g(function() {
2457
+ L.forEach(function(T) {
2458
+ return T.restoreTransform();
2459
+ }), i && (x = n.snapToCursor(y));
2460
+ }), p(function() {
2461
+ var T = !!(n.getAxisMotionValue("x") && !n.isExternalDrag());
2462
+ T || n.visualElement.rebaseProjectionTarget(!0, n.visualElement.measureViewportBox(!1)), n.visualElement.scheduleUpdateLayoutProjection();
2463
+ var w = n.visualElement.projection;
2464
+ G(function(C) {
2465
+ if (!x) {
2466
+ var A = w.target[C], D = A.min, R = A.max;
2467
+ n.cursorProgress[C] = u ? u[C] : Ht(D, R, y[C]);
2468
+ }
2469
+ var j = n.getAxisMotionValue(C);
2470
+ j && (n.originPoint[C] = j.get());
2471
+ });
2472
+ }), g(function() {
2473
+ Tt.update(), Tt.preRender(), Tt.render(), Tt.postRender();
2474
+ }), p(function() {
2475
+ return n.resolveDragConstraints();
2476
+ });
2477
+ });
2478
+ }, s = function(d, c) {
2479
+ var y, p, g, S = n.props, M = S.drag, L = S.dragPropagation;
2480
+ M && !L && (n.openGlobalLock && n.openGlobalLock(), n.openGlobalLock = ia(M), !n.openGlobalLock) || (Jr(), n.isDragging = !0, n.currentDirection = null, (p = (y = n.props).onDragStart) === null || p === void 0 || p.call(y, d, c), (g = n.visualElement.animationState) === null || g === void 0 || g.setActive(F.Drag, !0));
2481
+ }, l = function(d, c) {
2482
+ var y, p, g, S, M = n.props, L = M.dragPropagation, x = M.dragDirectionLock;
2483
+ if (!(!L && !n.openGlobalLock)) {
2484
+ var T = c.offset;
2485
+ if (x && n.currentDirection === null) {
2486
+ n.currentDirection = Us(T), n.currentDirection !== null && ((p = (y = n.props).onDirectionLock) === null || p === void 0 || p.call(y, n.currentDirection));
2487
+ return;
2488
+ }
2489
+ n.updateAxis("x", c.point, T), n.updateAxis("y", c.point, T), (S = (g = n.props).onDrag) === null || S === void 0 || S.call(g, d, c), gn = d;
2490
+ }
2491
+ }, m = function(d, c) {
2492
+ return n.stop(d, c);
2493
+ }, v = this.props.transformPagePoint;
2494
+ this.panSession = new Ha(r, {
2495
+ onSessionStart: f,
2496
+ onStart: s,
2497
+ onMove: l,
2498
+ onSessionEnd: m
2499
+ }, { transformPagePoint: v });
2500
+ }, t.prototype.resolveDragConstraints = function() {
2501
+ var r = this, e = this.props, n = e.dragConstraints, a = e.dragElastic, o = this.visualElement.getLayoutState().layoutCorrected;
2502
+ n ? this.constraints = jr(n) ? this.resolveRefConstraints(o, n) : Ps(o, n) : this.constraints = !1, this.elastic = As(a), this.constraints && !this.hasMutatedConstraints && G(function(i) {
2503
+ r.getAxisMotionValue(i) && (r.constraints[i] = Ss(o[i], r.constraints[i]));
2504
+ });
2505
+ }, t.prototype.resolveRefConstraints = function(r, e) {
2506
+ var n = this.props, a = n.onMeasureDragConstraints, o = n.transformPagePoint, i = e.current;
2507
+ X(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop."), this.constraintsBox = za(i, o);
2508
+ var u = xs(r, this.constraintsBox);
2509
+ if (a) {
2510
+ var f = a(gs(u));
2511
+ this.hasMutatedConstraints = !!f, f && (u = Na(f));
2512
+ }
2513
+ return u;
2514
+ }, t.prototype.cancelDrag = function() {
2515
+ var r, e;
2516
+ this.visualElement.unlockProjectionTarget(), (r = this.cancelLayout) === null || r === void 0 || r.call(this), this.isDragging = !1, this.panSession && this.panSession.end(), this.panSession = null, !this.props.dragPropagation && this.openGlobalLock && (this.openGlobalLock(), this.openGlobalLock = null), (e = this.visualElement.animationState) === null || e === void 0 || e.setActive(F.Drag, !1);
2517
+ }, t.prototype.stop = function(r, e) {
2518
+ var n, a, o;
2519
+ (n = this.panSession) === null || n === void 0 || n.end(), this.panSession = null;
2520
+ var i = this.isDragging;
2521
+ if (this.cancelDrag(), !!i) {
2522
+ var u = e.velocity;
2523
+ this.animateDragEnd(u), (o = (a = this.props).onDragEnd) === null || o === void 0 || o.call(a, r, e);
2524
+ }
2525
+ }, t.prototype.snapToCursor = function(r) {
2526
+ var e = this;
2527
+ return G(function(n) {
2528
+ var a = e.props.drag;
2529
+ if (er(n, a, e.currentDirection)) {
2530
+ var o = e.getAxisMotionValue(n);
2531
+ if (o) {
2532
+ var i = e.visualElement.getLayoutState().layout, u = i[n].max - i[n].min, f = i[n].min + u / 2, s = r[n] - f;
2533
+ e.originPoint[n] = r[n], o.set(s);
2534
+ } else
2535
+ return e.cursorProgress[n] = 0.5, !0;
2536
+ }
2537
+ }).includes(!0);
2538
+ }, t.prototype.updateAxis = function(r, e, n) {
2539
+ var a = this.props.drag;
2540
+ if (er(r, a, this.currentDirection))
2541
+ return this.getAxisMotionValue(r) ? this.updateAxisMotionValue(r, n) : this.updateVisualElementAxis(r, e);
2542
+ }, t.prototype.updateAxisMotionValue = function(r, e) {
2543
+ var n = this.getAxisMotionValue(r);
2544
+ if (!(!e || !n)) {
2545
+ var a = this.originPoint[r] + e[r], o = this.constraints ? _a(a, this.constraints[r], this.elastic[r]) : a;
2546
+ n.set(o);
2547
+ }
2548
+ }, t.prototype.updateVisualElementAxis = function(r, e) {
2549
+ var n, a = this.visualElement.getLayoutState().layout[r], o = a.max - a.min, i = this.cursorProgress[r], u = bs(e[r], o, i, (n = this.constraints) === null || n === void 0 ? void 0 : n[r], this.elastic[r]);
2550
+ this.visualElement.setProjectionTargetAxis(r, u, u + o);
2551
+ }, t.prototype.setProps = function(r) {
2552
+ var e = r.drag, n = e === void 0 ? !1 : e, a = r.dragDirectionLock, o = a === void 0 ? !1 : a, i = r.dragPropagation, u = i === void 0 ? !1 : i, f = r.dragConstraints, s = f === void 0 ? !1 : f, l = r.dragElastic, m = l === void 0 ? Ka : l, v = r.dragMomentum, d = v === void 0 ? !0 : v, c = J(r, ["drag", "dragDirectionLock", "dragPropagation", "dragConstraints", "dragElastic", "dragMomentum"]);
2553
+ this.props = h({
2554
+ drag: n,
2555
+ dragDirectionLock: o,
2556
+ dragPropagation: u,
2557
+ dragConstraints: s,
2558
+ dragElastic: m,
2559
+ dragMomentum: d
2560
+ }, c);
2561
+ }, t.prototype.getAxisMotionValue = function(r) {
2562
+ var e = this.props, n = e.layout, a = e.layoutId, o = "_drag" + r.toUpperCase();
2563
+ if (this.props[o])
2564
+ return this.props[o];
2565
+ if (!n && a === void 0)
2566
+ return this.visualElement.getValue(r, 0);
2567
+ }, t.prototype.isLayoutDrag = function() {
2568
+ return !this.getAxisMotionValue("x");
2569
+ }, t.prototype.isExternalDrag = function() {
2570
+ var r = this.props, e = r._dragX, n = r._dragY;
2571
+ return e || n;
2572
+ }, t.prototype.animateDragEnd = function(r) {
2573
+ var e = this, n = this.props, a = n.drag, o = n.dragMomentum, i = n.dragElastic, u = n.dragTransition, f = Fs(this.visualElement, this.isLayoutDrag() && !this.isExternalDrag()), s = this.constraints || {};
2574
+ if (f && Object.keys(s).length && this.isLayoutDrag()) {
2575
+ var l = this.visualElement.getProjectionParent();
2576
+ if (l) {
2577
+ var m = Lt(l.projection.targetFinal, s);
2578
+ G(function(d) {
2579
+ var c = m[d], y = c.min, p = c.max;
2580
+ s[d] = {
2581
+ min: isNaN(y) ? void 0 : y,
2582
+ max: isNaN(p) ? void 0 : p
2583
+ };
2584
+ });
2585
+ }
2586
+ }
2587
+ var v = G(function(d) {
2588
+ var c;
2589
+ if (er(d, a, e.currentDirection)) {
2590
+ var y = (c = s == null ? void 0 : s[d]) !== null && c !== void 0 ? c : {}, p = i ? 200 : 1e6, g = i ? 40 : 1e7, S = h(h({
2591
+ type: "inertia",
2592
+ velocity: o ? r[d] : 0,
2593
+ bounceStiffness: p,
2594
+ bounceDamping: g,
2595
+ timeConstant: 750,
2596
+ restDelta: 1,
2597
+ restSpeed: 10
2598
+ }, u), y);
2599
+ return e.getAxisMotionValue(d) ? e.startAxisValueAnimation(d, S) : e.visualElement.startLayoutAnimation(d, S, f);
2600
+ }
2601
+ });
2602
+ return Promise.all(v).then(function() {
2603
+ var d, c;
2604
+ (c = (d = e.props).onDragTransitionEnd) === null || c === void 0 || c.call(d);
2605
+ });
2606
+ }, t.prototype.stopMotion = function() {
2607
+ var r = this;
2608
+ G(function(e) {
2609
+ var n = r.getAxisMotionValue(e);
2610
+ n ? n.stop() : r.visualElement.stopLayoutAnimation();
2611
+ });
2612
+ }, t.prototype.startAxisValueAnimation = function(r, e) {
2613
+ var n = this.getAxisMotionValue(r);
2614
+ if (n) {
2615
+ var a = n.get();
2616
+ return n.set(a), n.set(a), gr(r, n, 0, e);
2617
+ }
2618
+ }, t.prototype.scalePoint = function() {
2619
+ var r = this, e = this.props, n = e.drag, a = e.dragConstraints;
2620
+ if (!(!jr(a) || !this.constraintsBox)) {
2621
+ this.stopMotion();
2622
+ var o = { x: 0, y: 0 };
2623
+ G(function(i) {
2624
+ o[i] = Cs(r.visualElement.projection.target[i], r.constraintsBox[i]);
2625
+ }), this.updateConstraints(function() {
2626
+ G(function(i) {
2627
+ if (er(i, n, null)) {
2628
+ var u = Ts(r.visualElement.projection.target[i], r.constraintsBox[i], o[i]), f = u.min, s = u.max;
2629
+ r.visualElement.setProjectionTargetAxis(i, f, s);
2630
+ }
2631
+ });
2632
+ }), setTimeout(Jr, 1);
2633
+ }
2634
+ }, t.prototype.updateConstraints = function(r) {
2635
+ var e = this;
2636
+ this.cancelLayout = qr(function(n, a) {
2637
+ var o = hr(e.visualElement);
2638
+ a(function() {
2639
+ return o.forEach(function(i) {
2640
+ return i.resetTransform();
2641
+ });
2642
+ }), n(function() {
2643
+ return sr(e.visualElement);
2644
+ }), a(function() {
2645
+ return o.forEach(function(i) {
2646
+ return i.restoreTransform();
2647
+ });
2648
+ }), n(function() {
2649
+ e.resolveDragConstraints();
2650
+ }), r && a(r);
2651
+ });
2652
+ }, t.prototype.mount = function(r) {
2653
+ var e = this, n = r.getInstance(), a = Vt(n, "pointerdown", function(f) {
2654
+ var s = e.props, l = s.drag, m = s.dragListener, v = m === void 0 ? !0 : m;
2655
+ l && v && e.start(f);
2656
+ }), o = ce(window, "resize", function() {
2657
+ e.scalePoint();
2658
+ }), i = r.onLayoutUpdate(function() {
2659
+ e.isDragging && e.resolveDragConstraints();
2660
+ }), u = r.prevDragCursor;
2661
+ return u && this.start(gn, { cursorProgress: u }), function() {
2662
+ a == null || a(), o == null || o(), i == null || i(), e.cancelDrag();
2663
+ };
2664
+ }, t;
2665
+ }()
2666
+ );
2667
+ function er(t, r, e) {
2668
+ return (r === !0 || r === t) && (e === null || e === t);
2669
+ }
2670
+ function Us(t, r) {
2671
+ r === void 0 && (r = 10);
2672
+ var e = null;
2673
+ return Math.abs(t.y) > r ? e = "y" : Math.abs(t.x) > r && (e = "x"), e;
2674
+ }
2675
+ function Ns(t) {
2676
+ var r = t.dragControls, e = t.visualElement, n = z(Pr).transformPagePoint, a = ne(function() {
2677
+ return new Hs({
2678
+ visualElement: e
2679
+ });
2680
+ });
2681
+ a.setProps(h(h({}, t), { transformPagePoint: n })), at(function() {
2682
+ return r && r.subscribe(a);
2683
+ }, [a]), at(function() {
2684
+ return a.mount(e);
2685
+ }, []);
2686
+ }
2687
+ function _s(t) {
2688
+ var r = t.onPan, e = t.onPanStart, n = t.onPanEnd, a = t.onPanSessionStart, o = t.visualElement, i = r || e || n || a, u = It(null), f = z(Pr).transformPagePoint, s = {
2689
+ onSessionStart: a,
2690
+ onStart: e,
2691
+ onMove: r,
2692
+ onEnd: function(m, v) {
2693
+ u.current = null, n && n(m, v);
2694
+ }
2695
+ };
2696
+ at(function() {
2697
+ u.current !== null && u.current.updateHandlers(s);
2698
+ });
2699
+ function l(m) {
2700
+ u.current = new Ha(m, s, {
2701
+ transformPagePoint: f
2702
+ });
2703
+ }
2704
+ lr(o, "pointerdown", i && l), fa(function() {
2705
+ return u.current && u.current.end();
2706
+ });
2707
+ }
2708
+ var Ks = {
2709
+ pan: dt(_s),
2710
+ drag: dt(Ns)
2711
+ }, _t;
2712
+ (function(t) {
2713
+ t[t.Entering = 0] = "Entering", t[t.Present = 1] = "Present", t[t.Exiting = 2] = "Exiting";
2714
+ })(_t || (_t = {}));
2715
+ var Qr;
2716
+ (function(t) {
2717
+ t[t.Hide = 0] = "Hide", t[t.Show = 1] = "Show";
2718
+ })(Qr || (Qr = {}));
2719
+ function kr(t) {
2720
+ return typeof t == "string" && t.startsWith("var(--");
2721
+ }
2722
+ var qa = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
2723
+ function zs(t) {
2724
+ var r = qa.exec(t);
2725
+ if (!r)
2726
+ return [,];
2727
+ var e = H(r, 3), n = e[1], a = e[2];
2728
+ return [n, a];
2729
+ }
2730
+ var Ys = 4;
2731
+ function te(t, r, e) {
2732
+ e === void 0 && (e = 1), X(e <= Ys, 'Max CSS variable fallback depth detected in property "' + t + '". This may indicate a circular fallback dependency.');
2733
+ var n = H(zs(t), 2), a = n[0], o = n[1];
2734
+ if (a) {
2735
+ var i = window.getComputedStyle(r).getPropertyValue(a);
2736
+ return i ? i.trim() : kr(o) ? te(o, r, e + 1) : o;
2737
+ }
2738
+ }
2739
+ function Gs(t, r, e) {
2740
+ var n, a = J(r, []), o = t.getInstance();
2741
+ if (!(o instanceof HTMLElement))
2742
+ return { target: a, transitionEnd: e };
2743
+ e && (e = h({}, e)), t.forEachValue(function(s) {
2744
+ var l = s.get();
2745
+ if (kr(l)) {
2746
+ var m = te(l, o);
2747
+ m && s.set(m);
2748
+ }
2749
+ });
2750
+ for (var i in a) {
2751
+ var u = a[i];
2752
+ if (kr(u)) {
2753
+ var f = te(u, o);
2754
+ f && (a[i] = f, e && ((n = e[i]) !== null && n !== void 0 || (e[i] = u)));
2755
+ }
2756
+ }
2757
+ return { target: a, transitionEnd: e };
2758
+ }
2759
+ function hn(t, r) {
2760
+ return t / (r.max - r.min) * 100;
2761
+ }
2762
+ function Xs(t, r, e) {
2763
+ var n = e.target;
2764
+ if (typeof t == "string")
2765
+ if (E.test(t))
2766
+ t = parseFloat(t);
2767
+ else
2768
+ return t;
2769
+ var a = hn(t, n.x), o = hn(t, n.y);
2770
+ return a + "% " + o + "%";
2771
+ }
2772
+ var yn = "_$css";
2773
+ function Ws(t, r) {
2774
+ var e = r.delta, n = r.treeScale, a = t, o = t.includes("var("), i = [];
2775
+ o && (t = t.replace(qa, function(y) {
2776
+ return i.push(y), yn;
2777
+ }));
2778
+ var u = it.parse(t);
2779
+ if (u.length > 5)
2780
+ return a;
2781
+ var f = it.createTransformer(t), s = typeof u[0] != "number" ? 1 : 0, l = e.x.scale * n.x, m = e.y.scale * n.y;
2782
+ u[0 + s] /= l, u[1 + s] /= m;
2783
+ var v = Z(l, m, 0.5);
2784
+ typeof u[2 + s] == "number" && (u[2 + s] /= v), typeof u[3 + s] == "number" && (u[3 + s] /= v);
2785
+ var d = f(u);
2786
+ if (o) {
2787
+ var c = 0;
2788
+ d = d.replace(yn, function() {
2789
+ var y = i[c];
2790
+ return c++, y;
2791
+ });
2792
+ }
2793
+ return d;
2794
+ }
2795
+ var wt = {
2796
+ process: Xs
2797
+ }, Zs = {
2798
+ borderRadius: h(h({}, wt), { applyTo: [
2799
+ "borderTopLeftRadius",
2800
+ "borderTopRightRadius",
2801
+ "borderBottomLeftRadius",
2802
+ "borderBottomRightRadius"
2803
+ ] }),
2804
+ borderTopLeftRadius: wt,
2805
+ borderTopRightRadius: wt,
2806
+ borderBottomLeftRadius: wt,
2807
+ borderBottomRightRadius: wt,
2808
+ boxShadow: {
2809
+ process: Ws
2810
+ }
2811
+ }, bn = 1e3, $s = (
2812
+ /** @class */
2813
+ function(t) {
2814
+ Ln(r, t);
2815
+ function r() {
2816
+ var e = t !== null && t.apply(this, arguments) || this;
2817
+ return e.frameTarget = ft(), e.currentAnimationTarget = ft(), e.isAnimating = {
2818
+ x: !1,
2819
+ y: !1
2820
+ }, e.stopAxisAnimation = {
2821
+ x: void 0,
2822
+ y: void 0
2823
+ }, e.isAnimatingTree = !1, e.animate = function(n, a, o) {
2824
+ o === void 0 && (o = {});
2825
+ var i = o.originBox, u = o.targetBox, f = o.visibilityAction, s = o.shouldStackAnimate, l = o.onComplete, m = o.prevParent, v = J(o, ["originBox", "targetBox", "visibilityAction", "shouldStackAnimate", "onComplete", "prevParent"]), d = e.props, c = d.visualElement, y = d.layout;
2826
+ if (s === !1)
2827
+ return e.isAnimatingTree = !1, e.safeToRemove();
2828
+ if (!(e.isAnimatingTree && s !== !0)) {
2829
+ s && (e.isAnimatingTree = !0), a = i || a, n = u || n;
2830
+ var p = !1, g = c.getProjectionParent();
2831
+ if (g) {
2832
+ var S = g.prevViewportBox, M = g.getLayoutState().layout;
2833
+ m && (u && (M = m.getLayoutState().layout), i && !Ds(m, g) && m.prevViewportBox && (S = m.prevViewportBox)), S && ks(m, i, u) && (p = !0, a = Lt(S, a), n = Lt(M, n));
2834
+ }
2835
+ var L = Js(a, n), x = G(function(T) {
2836
+ var w, C;
2837
+ if (y === "position") {
2838
+ var A = n[T].max - n[T].min;
2839
+ a[T].max = a[T].min + A;
2840
+ }
2841
+ if (!c.projection.isTargetLocked)
2842
+ if (f !== void 0)
2843
+ c.setVisibility(f === Qr.Show);
2844
+ else return L ? e.animateAxis(T, n[T], a[T], h(h({}, v), { isRelative: p })) : ((C = (w = e.stopAxisAnimation)[T]) === null || C === void 0 || C.call(w), c.setProjectionTargetAxis(T, n[T].min, n[T].max, p));
2845
+ });
2846
+ return c.syncRender(), Promise.all(x).then(function() {
2847
+ e.isAnimatingTree = !1, l && l(), c.notifyLayoutAnimationComplete();
2848
+ });
2849
+ }
2850
+ }, e;
2851
+ }
2852
+ return r.prototype.componentDidMount = function() {
2853
+ var e = this, n = this.props.visualElement;
2854
+ n.animateMotionValue = gr, n.enableLayoutProjection(), this.unsubLayoutReady = n.onLayoutUpdate(this.animate), n.layoutSafeToRemove = function() {
2855
+ return e.safeToRemove();
2856
+ }, Oo(Zs);
2857
+ }, r.prototype.componentWillUnmount = function() {
2858
+ var e = this;
2859
+ this.unsubLayoutReady(), G(function(n) {
2860
+ var a, o;
2861
+ return (o = (a = e.stopAxisAnimation)[n]) === null || o === void 0 ? void 0 : o.call(a);
2862
+ });
2863
+ }, r.prototype.animateAxis = function(e, n, a, o) {
2864
+ var i = this, u, f, s = o === void 0 ? {} : o, l = s.transition, m = s.isRelative;
2865
+ if (!(this.isAnimating[e] && Kt(n, this.currentAnimationTarget[e]))) {
2866
+ (f = (u = this.stopAxisAnimation)[e]) === null || f === void 0 || f.call(u), this.isAnimating[e] = !0;
2867
+ var v = this.props.visualElement, d = this.frameTarget[e], c = v.getProjectionAnimationProgress()[e];
2868
+ c.clearListeners(), c.set(0), c.set(0);
2869
+ var y = function() {
2870
+ var M = c.get() / bn;
2871
+ Ms(d, a, n, M), v.setProjectionTargetAxis(e, d.min, d.max, m);
2872
+ };
2873
+ y();
2874
+ var p = c.onChange(y);
2875
+ this.stopAxisAnimation[e] = function() {
2876
+ i.isAnimating[e] = !1, c.stop(), p();
2877
+ }, this.currentAnimationTarget[e] = n;
2878
+ var g = l || v.getDefaultTransition() || Qs, S = gr(e === "x" ? "layoutX" : "layoutY", c, bn, g && be(g, "layout")).then(this.stopAxisAnimation[e]);
2879
+ return S;
2880
+ }
2881
+ }, r.prototype.safeToRemove = function() {
2882
+ var e, n;
2883
+ (n = (e = this.props).safeToRemove) === null || n === void 0 || n.call(e);
2884
+ }, r.prototype.render = function() {
2885
+ return null;
2886
+ }, r;
2887
+ }(St.Component)
2888
+ );
2889
+ function qs(t) {
2890
+ var r = H(Dn(), 2), e = r[1];
2891
+ return St.createElement($s, h({}, t, { safeToRemove: e }));
2892
+ }
2893
+ function Js(t, r) {
2894
+ return !xn(t) && !xn(r) && (!Kt(t.x, r.x) || !Kt(t.y, r.y));
2895
+ }
2896
+ var Pn = { min: 0, max: 0 };
2897
+ function xn(t) {
2898
+ return Kt(t.x, Pn) && Kt(t.y, Pn);
2899
+ }
2900
+ function Kt(t, r) {
2901
+ return t.min === r.min && t.max === r.max;
2902
+ }
2903
+ var Qs = {
2904
+ duration: 0.45,
2905
+ ease: [0.4, 0, 0.1, 1]
2906
+ };
2907
+ function ks(t, r, e) {
2908
+ return t || !t && !(r || e);
2909
+ }
2910
+ var tf = {
2911
+ layoutReady: function(t) {
2912
+ return t.notifyLayoutReady();
2913
+ }
2914
+ };
2915
+ function Ja() {
2916
+ var t = /* @__PURE__ */ new Set();
2917
+ return {
2918
+ add: function(r) {
2919
+ return t.add(r);
2920
+ },
2921
+ flush: function(r) {
2922
+ var e = r === void 0 ? tf : r, n = e.layoutReady, a = e.parent;
2923
+ qr(function(o, i) {
2924
+ var u = Array.from(t).sort(xe), f = a ? hr(a) : [];
2925
+ i(function() {
2926
+ var s = W(W([], H(f)), H(u));
2927
+ s.forEach(function(l) {
2928
+ return l.resetTransform();
2929
+ });
2930
+ }), o(function() {
2931
+ u.forEach(sr);
2932
+ }), i(function() {
2933
+ f.forEach(function(s) {
2934
+ return s.restoreTransform();
2935
+ }), u.forEach(n);
2936
+ }), o(function() {
2937
+ u.forEach(function(s) {
2938
+ s.isPresent && (s.presence = _t.Present);
2939
+ });
2940
+ }), i(function() {
2941
+ Tt.preRender(), Tt.render();
2942
+ }), o(function() {
2943
+ nt.postRender(function() {
2944
+ return u.forEach(rf);
2945
+ }), t.clear();
2946
+ });
2947
+ }), Jr();
2948
+ }
2949
+ };
2950
+ }
2951
+ function rf(t) {
2952
+ t.prevViewportBox = t.projection.target;
2953
+ }
2954
+ var ef = pt(Ja()), nf = pt(Ja());
2955
+ function bt(t) {
2956
+ return !!t.forceUpdate;
2957
+ }
2958
+ var af = (
2959
+ /** @class */
2960
+ function(t) {
2961
+ Ln(r, t);
2962
+ function r() {
2963
+ return t !== null && t.apply(this, arguments) || this;
2964
+ }
2965
+ return r.prototype.componentDidMount = function() {
2966
+ var e = this.props, n = e.syncLayout, a = e.framerSyncLayout, o = e.visualElement;
2967
+ bt(n) && n.register(o), bt(a) && a.register(o), o.onUnmount(function() {
2968
+ bt(n) && n.remove(o), bt(a) && a.remove(o);
2969
+ });
2970
+ }, r.prototype.getSnapshotBeforeUpdate = function() {
2971
+ var e = this.props, n = e.syncLayout, a = e.visualElement;
2972
+ return bt(n) ? n.syncUpdate() : (Es(a), n.add(a)), null;
2973
+ }, r.prototype.componentDidUpdate = function() {
2974
+ var e = this.props.syncLayout;
2975
+ bt(e) || e.flush();
2976
+ }, r.prototype.render = function() {
2977
+ return null;
2978
+ }, r;
2979
+ }(wn.Component)
2980
+ );
2981
+ function of(t) {
2982
+ var r = z(ef), e = z(nf);
2983
+ return wn.createElement(af, h({}, t, { syncLayout: r, framerSyncLayout: e }));
2984
+ }
2985
+ var uf = {
2986
+ measureLayout: of,
2987
+ layoutAnimation: qs
2988
+ }, sf = function() {
2989
+ return {
2990
+ isEnabled: !1,
2991
+ isHydrated: !1,
2992
+ isTargetLocked: !1,
2993
+ target: ft(),
2994
+ targetFinal: ft()
2995
+ };
2996
+ };
2997
+ function Qa() {
2998
+ return {
2999
+ isHydrated: !1,
3000
+ layout: ft(),
3001
+ layoutCorrected: ft(),
3002
+ treeScale: { x: 1, y: 1 },
3003
+ delta: Qe(),
3004
+ deltaFinal: Qe(),
3005
+ deltaTransform: ""
3006
+ };
3007
+ }
3008
+ var Tn = Qa();
3009
+ function wr(t, r, e) {
3010
+ var n = t.x, a = t.y, o = n.translate / r.x, i = a.translate / r.y, u = "translate3d(" + o + "px, " + i + "px, 0) ";
3011
+ if (e) {
3012
+ var f = e.rotate, s = e.rotateX, l = e.rotateY;
3013
+ f && (u += "rotate(" + f + ") "), s && (u += "rotateX(" + s + ") "), l && (u += "rotateY(" + l + ") ");
3014
+ }
3015
+ return u += "scale(" + n.scale + ", " + a.scale + ")", !e && u === ff ? "" : u;
3016
+ }
3017
+ function ka(t) {
3018
+ var r = t.deltaFinal;
3019
+ return r.x.origin * 100 + "% " + r.y.origin * 100 + "% 0";
3020
+ }
3021
+ var ff = wr(Tn.delta, Tn.treeScale, { x: 1, y: 1 }), nr = [
3022
+ "LayoutMeasure",
3023
+ "BeforeLayoutMeasure",
3024
+ "LayoutUpdate",
3025
+ "ViewportBoxUpdate",
3026
+ "Update",
3027
+ "Render",
3028
+ "AnimationComplete",
3029
+ "LayoutAnimationComplete",
3030
+ "AnimationStart",
3031
+ "SetAxisTarget",
3032
+ "Unmount"
3033
+ ];
3034
+ function lf() {
3035
+ var t = nr.map(function() {
3036
+ return new ur();
3037
+ }), r = {}, e = {
3038
+ clearAllListeners: function() {
3039
+ return t.forEach(function(n) {
3040
+ return n.clear();
3041
+ });
3042
+ },
3043
+ updatePropListeners: function(n) {
3044
+ return nr.forEach(function(a) {
3045
+ var o;
3046
+ (o = r[a]) === null || o === void 0 || o.call(r);
3047
+ var i = "on" + a, u = n[i];
3048
+ u && (r[a] = e[i](u));
3049
+ });
3050
+ }
3051
+ };
3052
+ return t.forEach(function(n, a) {
3053
+ e["on" + nr[a]] = function(o) {
3054
+ return n.add(o);
3055
+ }, e["notify" + nr[a]] = function() {
3056
+ for (var o = [], i = 0; i < arguments.length; i++)
3057
+ o[i] = arguments[i];
3058
+ return n.notify.apply(n, W([], H(o)));
3059
+ };
3060
+ }), e;
3061
+ }
3062
+ function cf(t, r, e) {
3063
+ var n;
3064
+ for (var a in r) {
3065
+ var o = r[a], i = e[a];
3066
+ if (st(o))
3067
+ t.addValue(a, o);
3068
+ else if (st(i))
3069
+ t.addValue(a, mt(o));
3070
+ else if (i !== o)
3071
+ if (t.hasValue(a)) {
3072
+ var u = t.getValue(a);
3073
+ !u.hasAnimated && u.set(o);
3074
+ } else
3075
+ t.addValue(a, mt((n = t.getStaticValue(a)) !== null && n !== void 0 ? n : o));
3076
+ }
3077
+ for (var a in e)
3078
+ r[a] === void 0 && t.removeValue(a);
3079
+ return r;
3080
+ }
3081
+ function vf(t, r, e, n) {
3082
+ var a = t.delta, o = t.layout, i = t.layoutCorrected, u = t.treeScale, f = r.target;
3083
+ Rs(i, o), Bs(i, u, e), Ya(a, i, f, n);
3084
+ }
3085
+ var df = (
3086
+ /** @class */
3087
+ function() {
3088
+ function t() {
3089
+ this.children = [], this.isDirty = !1;
3090
+ }
3091
+ return t.prototype.add = function(r) {
3092
+ Oa(this.children, r), this.isDirty = !0;
3093
+ }, t.prototype.remove = function(r) {
3094
+ Ia(this.children, r), this.isDirty = !0;
3095
+ }, t.prototype.forEach = function(r) {
3096
+ this.isDirty && this.children.sort(xe), this.isDirty = !1, this.children.forEach(r);
3097
+ }, t;
3098
+ }()
3099
+ );
3100
+ function mf(t) {
3101
+ var r = t.getProjectionParent();
3102
+ if (!r) {
3103
+ t.rebaseProjectionTarget();
3104
+ return;
3105
+ }
3106
+ var e = Lt(r.getLayoutState().layout, t.getLayoutState().layout);
3107
+ G(function(n) {
3108
+ t.setProjectionTargetAxis(n, e[n].min, e[n].max, !0);
3109
+ });
3110
+ }
3111
+ var to = function(t) {
3112
+ var r = t.treeType, e = r === void 0 ? "" : r, n = t.build, a = t.getBaseTarget, o = t.makeTargetAnimatable, i = t.measureViewportBox, u = t.render, f = t.readValueFromInstance, s = t.resetTransform, l = t.restoreTransform, m = t.removeValueFromRenderState, v = t.sortNodePosition, d = t.scrapeMotionValuesFromProps;
3113
+ return function(c, y) {
3114
+ var p = c.parent, g = c.props, S = c.presenceId, M = c.blockInitialAnimation, L = c.visualState;
3115
+ y === void 0 && (y = {});
3116
+ var x = L.latestValues, T = L.renderState, w, C = lf(), A = sf(), D, R = A, j = x, U, B = Qa(), Q, O = !1, $ = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), ht = {}, tt, _ = h({}, x), et;
3117
+ function lt() {
3118
+ w && (V.isProjectionReady() && ($r(R.targetFinal, R.target, j), Ya(B.deltaFinal, B.layoutCorrected, R.targetFinal, x)), ct(), u(w, T));
3119
+ }
3120
+ function ct() {
3121
+ var b = x;
3122
+ if (Q && Q.isActive()) {
3123
+ var P = Q.getCrossfadeState(V);
3124
+ P && (b = P);
3125
+ }
3126
+ n(V, T, b, R, B, y, g);
3127
+ }
3128
+ function Te() {
3129
+ C.notifyUpdate(x);
3130
+ }
3131
+ function oo() {
3132
+ if (V.isProjectionReady()) {
3133
+ var b = B.delta, P = B.treeScale, I = P.x, N = P.y, K = B.deltaTransform;
3134
+ vf(B, R, V.path, x), O && V.notifyViewportBoxUpdate(R.target, b), O = !1;
3135
+ var k = wr(b, P);
3136
+ (k !== K || // Also compare calculated treeScale, for values that rely on this only for scale correction
3137
+ I !== P.x || N !== P.y) && V.scheduleRender(), B.deltaTransform = k;
3138
+ }
3139
+ }
3140
+ function io() {
3141
+ V.layoutTree.forEach(gf);
3142
+ }
3143
+ function uo(b, P) {
3144
+ var I = P.onChange(function(K) {
3145
+ x[b] = K, g.onUpdate && nt.update(Te, !1, !0);
3146
+ }), N = P.onRenderRequest(V.scheduleRender);
3147
+ q.set(b, function() {
3148
+ I(), N();
3149
+ });
3150
+ }
3151
+ var Se = d(g);
3152
+ for (var Er in Se) {
3153
+ var Ae = Se[Er];
3154
+ x[Er] !== void 0 && st(Ae) && Ae.set(x[Er], !1);
3155
+ }
3156
+ var Ve = Ar(g), Mr = In(g), V = h(h({
3157
+ treeType: e,
3158
+ /**
3159
+ * This is a mirror of the internal instance prop, which keeps
3160
+ * VisualElement type-compatible with React's RefObject.
3161
+ */
3162
+ current: null,
3163
+ /**
3164
+ * The depth of this visual element within the visual element tree.
3165
+ */
3166
+ depth: p ? p.depth + 1 : 0,
3167
+ parent: p,
3168
+ children: /* @__PURE__ */ new Set(),
3169
+ /**
3170
+ * An ancestor path back to the root visual element. This is used
3171
+ * by layout projection to quickly recurse back up the tree.
3172
+ */
3173
+ path: p ? W(W([], H(p.path)), [p]) : [],
3174
+ layoutTree: p ? p.layoutTree : new df(),
3175
+ /**
3176
+ *
3177
+ */
3178
+ presenceId: S,
3179
+ projection: A,
3180
+ /**
3181
+ * If this component is part of the variant tree, it should track
3182
+ * any children that are also part of the tree. This is essentially
3183
+ * a shadow tree to simplify logic around how to stagger over children.
3184
+ */
3185
+ variantChildren: Mr ? /* @__PURE__ */ new Set() : void 0,
3186
+ /**
3187
+ * Whether this instance is visible. This can be changed imperatively
3188
+ * by AnimateSharedLayout, is analogous to CSS's visibility in that
3189
+ * hidden elements should take up layout, and needs enacting by the configured
3190
+ * render function.
3191
+ */
3192
+ isVisible: void 0,
3193
+ /**
3194
+ * Normally, if a component is controlled by a parent's variants, it can
3195
+ * rely on that ancestor to trigger animations further down the tree.
3196
+ * However, if a component is created after its parent is mounted, the parent
3197
+ * won't trigger that mount animation so the child needs to.
3198
+ *
3199
+ * TODO: This might be better replaced with a method isParentMounted
3200
+ */
3201
+ manuallyAnimateOnMount: !!(p != null && p.isMounted()),
3202
+ /**
3203
+ * This can be set by AnimatePresence to force components that mount
3204
+ * at the same time as it to mount as if they have initial={false} set.
3205
+ */
3206
+ blockInitialAnimation: M,
3207
+ /**
3208
+ * Determine whether this component has mounted yet. This is mostly used
3209
+ * by variant children to determine whether they need to trigger their
3210
+ * own animations on mount.
3211
+ */
3212
+ isMounted: function() {
3213
+ return !!w;
3214
+ },
3215
+ mount: function(b) {
3216
+ w = V.current = b, V.pointTo(V), Mr && p && !Ve && (et = p == null ? void 0 : p.addVariantChild(V)), p == null || p.children.add(V);
3217
+ },
3218
+ /**
3219
+ *
3220
+ */
3221
+ unmount: function() {
3222
+ Rt.update(Te), Rt.render(lt), Rt.preRender(V.updateLayoutProjection), q.forEach(function(b) {
3223
+ return b();
3224
+ }), V.stopLayoutAnimation(), V.layoutTree.remove(V), et == null || et(), p == null || p.children.delete(V), U == null || U(), C.clearAllListeners();
3225
+ },
3226
+ /**
3227
+ * Add a child visual element to our set of children.
3228
+ */
3229
+ addVariantChild: function(b) {
3230
+ var P, I = V.getClosestVariantNode();
3231
+ if (I)
3232
+ return (P = I.variantChildren) === null || P === void 0 || P.add(b), function() {
3233
+ return I.variantChildren.delete(b);
3234
+ };
3235
+ },
3236
+ sortNodePosition: function(b) {
3237
+ return !v || e !== b.treeType ? 0 : v(V.getInstance(), b.getInstance());
3238
+ },
3239
+ /**
3240
+ * Returns the closest variant node in the tree starting from
3241
+ * this visual element.
3242
+ */
3243
+ getClosestVariantNode: function() {
3244
+ return Mr ? V : p == null ? void 0 : p.getClosestVariantNode();
3245
+ },
3246
+ /**
3247
+ * A method that schedules an update to layout projections throughout
3248
+ * the tree. We inherit from the parent so there's only ever one
3249
+ * job scheduled on the next frame - that of the root visual element.
3250
+ */
3251
+ scheduleUpdateLayoutProjection: p ? p.scheduleUpdateLayoutProjection : function() {
3252
+ return nt.preRender(V.updateTreeLayoutProjection, !1, !0);
3253
+ },
3254
+ /**
3255
+ * Expose the latest layoutId prop.
3256
+ */
3257
+ getLayoutId: function() {
3258
+ return g.layoutId;
3259
+ },
3260
+ /**
3261
+ * Returns the current instance.
3262
+ */
3263
+ getInstance: function() {
3264
+ return w;
3265
+ },
3266
+ /**
3267
+ * Get/set the latest static values.
3268
+ */
3269
+ getStaticValue: function(b) {
3270
+ return x[b];
3271
+ },
3272
+ setStaticValue: function(b, P) {
3273
+ return x[b] = P;
3274
+ },
3275
+ /**
3276
+ * Returns the latest motion value state. Currently only used to take
3277
+ * a snapshot of the visual element - perhaps this can return the whole
3278
+ * visual state
3279
+ */
3280
+ getLatestValues: function() {
3281
+ return x;
3282
+ },
3283
+ /**
3284
+ * Set the visiblity of the visual element. If it's changed, schedule
3285
+ * a render to reflect these changes.
3286
+ */
3287
+ setVisibility: function(b) {
3288
+ V.isVisible !== b && (V.isVisible = b, V.scheduleRender());
3289
+ },
3290
+ /**
3291
+ * Make a target animatable by Popmotion. For instance, if we're
3292
+ * trying to animate width from 100px to 100vw we need to measure 100vw
3293
+ * in pixels to determine what we really need to animate to. This is also
3294
+ * pluggable to support Framer's custom value types like Color,
3295
+ * and CSS variables.
3296
+ */
3297
+ makeTargetAnimatable: function(b, P) {
3298
+ return P === void 0 && (P = !0), o(V, b, g, P);
3299
+ },
3300
+ // Motion values ========================
3301
+ /**
3302
+ * Add a motion value and bind it to this visual element.
3303
+ */
3304
+ addValue: function(b, P) {
3305
+ V.hasValue(b) && V.removeValue(b), $.set(b, P), x[b] = P.get(), uo(b, P);
3306
+ },
3307
+ /**
3308
+ * Remove a motion value and unbind any active subscriptions.
3309
+ */
3310
+ removeValue: function(b) {
3311
+ var P;
3312
+ $.delete(b), (P = q.get(b)) === null || P === void 0 || P(), q.delete(b), delete x[b], m(b, T);
3313
+ },
3314
+ /**
3315
+ * Check whether we have a motion value for this key
3316
+ */
3317
+ hasValue: function(b) {
3318
+ return $.has(b);
3319
+ },
3320
+ /**
3321
+ * Get a motion value for this key. If called with a default
3322
+ * value, we'll create one if none exists.
3323
+ */
3324
+ getValue: function(b, P) {
3325
+ var I = $.get(b);
3326
+ return I === void 0 && P !== void 0 && (I = mt(P), V.addValue(b, I)), I;
3327
+ },
3328
+ /**
3329
+ * Iterate over our motion values.
3330
+ */
3331
+ forEachValue: function(b) {
3332
+ return $.forEach(b);
3333
+ },
3334
+ /**
3335
+ * If we're trying to animate to a previously unencountered value,
3336
+ * we need to check for it in our state and as a last resort read it
3337
+ * directly from the instance (which might have performance implications).
3338
+ */
3339
+ readValue: function(b) {
3340
+ var P;
3341
+ return (P = x[b]) !== null && P !== void 0 ? P : f(w, b, y);
3342
+ },
3343
+ /**
3344
+ * Set the base target to later animate back to. This is currently
3345
+ * only hydrated on creation and when we first read a value.
3346
+ */
3347
+ setBaseTarget: function(b, P) {
3348
+ _[b] = P;
3349
+ },
3350
+ /**
3351
+ * Find the base target for a value thats been removed from all animation
3352
+ * props.
3353
+ */
3354
+ getBaseTarget: function(b) {
3355
+ if (a) {
3356
+ var P = a(g, b);
3357
+ if (P !== void 0 && !st(P))
3358
+ return P;
3359
+ }
3360
+ return _[b];
3361
+ }
3362
+ }, C), {
3363
+ /**
3364
+ * Build the renderer state based on the latest visual state.
3365
+ */
3366
+ build: function() {
3367
+ return ct(), T;
3368
+ },
3369
+ /**
3370
+ * Schedule a render on the next animation frame.
3371
+ */
3372
+ scheduleRender: function() {
3373
+ nt.render(lt, !1, !0);
3374
+ },
3375
+ /**
3376
+ * Synchronously fire render. It's prefered that we batch renders but
3377
+ * in many circumstances, like layout measurement, we need to run this
3378
+ * synchronously. However in those instances other measures should be taken
3379
+ * to batch reads/writes.
3380
+ */
3381
+ syncRender: lt,
3382
+ /**
3383
+ * Update the provided props. Ensure any newly-added motion values are
3384
+ * added to our map, old ones removed, and listeners updated.
3385
+ */
3386
+ setProps: function(b) {
3387
+ g = b, C.updatePropListeners(b), ht = cf(V, d(g), ht);
3388
+ },
3389
+ getProps: function() {
3390
+ return g;
3391
+ },
3392
+ // Variants ==============================
3393
+ /**
3394
+ * Returns the variant definition with a given name.
3395
+ */
3396
+ getVariant: function(b) {
3397
+ var P;
3398
+ return (P = g.variants) === null || P === void 0 ? void 0 : P[b];
3399
+ },
3400
+ /**
3401
+ * Returns the defined default transition on this component.
3402
+ */
3403
+ getDefaultTransition: function() {
3404
+ return g.transition;
3405
+ },
3406
+ /**
3407
+ * Used by child variant nodes to get the closest ancestor variant props.
3408
+ */
3409
+ getVariantContext: function(b) {
3410
+ if (b === void 0 && (b = !1), b)
3411
+ return p == null ? void 0 : p.getVariantContext();
3412
+ if (!Ve) {
3413
+ var P = (p == null ? void 0 : p.getVariantContext()) || {};
3414
+ return g.initial !== void 0 && (P.initial = g.initial), P;
3415
+ }
3416
+ for (var I = {}, N = 0; N < hf; N++) {
3417
+ var K = ro[N], k = g[K];
3418
+ (rt(k) || k === !1) && (I[K] = k);
3419
+ }
3420
+ return I;
3421
+ },
3422
+ // Layout projection ==============================
3423
+ /**
3424
+ * Enable layout projection for this visual element. Won't actually
3425
+ * occur until we also have hydrated layout measurements.
3426
+ */
3427
+ enableLayoutProjection: function() {
3428
+ A.isEnabled = !0, V.layoutTree.add(V);
3429
+ },
3430
+ /**
3431
+ * Lock the projection target, for instance when dragging, so
3432
+ * nothing else can try and animate it.
3433
+ */
3434
+ lockProjectionTarget: function() {
3435
+ A.isTargetLocked = !0;
3436
+ },
3437
+ unlockProjectionTarget: function() {
3438
+ V.stopLayoutAnimation(), A.isTargetLocked = !1;
3439
+ },
3440
+ getLayoutState: function() {
3441
+ return B;
3442
+ },
3443
+ setCrossfader: function(b) {
3444
+ Q = b;
3445
+ },
3446
+ isProjectionReady: function() {
3447
+ return A.isEnabled && A.isHydrated && B.isHydrated;
3448
+ },
3449
+ /**
3450
+ * Start a layout animation on a given axis.
3451
+ */
3452
+ startLayoutAnimation: function(b, P, I) {
3453
+ I === void 0 && (I = !1);
3454
+ var N = V.getProjectionAnimationProgress()[b], K = I ? A.relativeTarget[b] : A.target[b], k = K.min, Zt = K.max, $t = Zt - k;
3455
+ return N.clearListeners(), N.set(k), N.set(k), N.onChange(function(qt) {
3456
+ V.setProjectionTargetAxis(b, qt, qt + $t, I);
3457
+ }), V.animateMotionValue(b, N, 0, P);
3458
+ },
3459
+ /**
3460
+ * Stop layout animations.
3461
+ */
3462
+ stopLayoutAnimation: function() {
3463
+ G(function(b) {
3464
+ return V.getProjectionAnimationProgress()[b].stop();
3465
+ });
3466
+ },
3467
+ /**
3468
+ * Measure the current viewport box with or without transforms.
3469
+ * Only measures axis-aligned boxes, rotate and skew must be manually
3470
+ * removed with a re-render to work.
3471
+ */
3472
+ measureViewportBox: function(b) {
3473
+ b === void 0 && (b = !0);
3474
+ var P = i(w, y);
3475
+ return b || $a(P, x), P;
3476
+ },
3477
+ /**
3478
+ * Get the motion values tracking the layout animations on each
3479
+ * axis. Lazy init if not already created.
3480
+ */
3481
+ getProjectionAnimationProgress: function() {
3482
+ return tt || (tt = {
3483
+ x: mt(0),
3484
+ y: mt(0)
3485
+ }), tt;
3486
+ },
3487
+ /**
3488
+ * Update the projection of a single axis. Schedule an update to
3489
+ * the tree layout projection.
3490
+ */
3491
+ setProjectionTargetAxis: function(b, P, I, N) {
3492
+ N === void 0 && (N = !1);
3493
+ var K;
3494
+ N ? (A.relativeTarget || (A.relativeTarget = ft()), K = A.relativeTarget[b]) : (A.relativeTarget = void 0, K = A.target[b]), A.isHydrated = !0, K.min = P, K.max = I, O = !0, C.notifySetAxisTarget();
3495
+ },
3496
+ /**
3497
+ * Rebase the projection target on top of the provided viewport box
3498
+ * or the measured layout. This ensures that non-animating elements
3499
+ * don't fall out of sync differences in measurements vs projections
3500
+ * after a page scroll or other relayout.
3501
+ */
3502
+ rebaseProjectionTarget: function(b, P) {
3503
+ P === void 0 && (P = B.layout);
3504
+ var I = V.getProjectionAnimationProgress(), N = I.x, K = I.y, k = !A.relativeTarget && !A.isTargetLocked && !N.isAnimating() && !K.isAnimating();
3505
+ (b || k) && G(function(Zt) {
3506
+ var $t = P[Zt], qt = $t.min, so = $t.max;
3507
+ V.setProjectionTargetAxis(Zt, qt, so);
3508
+ });
3509
+ },
3510
+ /**
3511
+ * Notify the visual element that its layout is up-to-date.
3512
+ * Currently Animate.tsx uses this to check whether a layout animation
3513
+ * needs to be performed.
3514
+ */
3515
+ notifyLayoutReady: function(b) {
3516
+ mf(V), V.notifyLayoutUpdate(B.layout, V.prevViewportBox || B.layout, b);
3517
+ },
3518
+ /**
3519
+ * Temporarily reset the transform of the instance.
3520
+ */
3521
+ resetTransform: function() {
3522
+ return s(V, w, g);
3523
+ },
3524
+ restoreTransform: function() {
3525
+ return l(w, T);
3526
+ },
3527
+ updateLayoutProjection: oo,
3528
+ updateTreeLayoutProjection: function() {
3529
+ V.layoutTree.forEach(pf), nt.preRender(io, !1, !0);
3530
+ },
3531
+ getProjectionParent: function() {
3532
+ if (D === void 0) {
3533
+ for (var b = !1, P = V.path.length - 1; P >= 0; P--) {
3534
+ var I = V.path[P];
3535
+ if (I.projection.isEnabled) {
3536
+ b = I;
3537
+ break;
3538
+ }
3539
+ }
3540
+ D = b;
3541
+ }
3542
+ return D;
3543
+ },
3544
+ resolveRelativeTargetBox: function() {
3545
+ var b = V.getProjectionParent();
3546
+ if (!(!A.relativeTarget || !b) && (Ls(A, b.projection), Xa(b))) {
3547
+ var P = A.target;
3548
+ $r(P, P, b.getLatestValues());
3549
+ }
3550
+ },
3551
+ shouldResetTransform: function() {
3552
+ return !!g._layoutResetTransform;
3553
+ },
3554
+ /**
3555
+ *
3556
+ */
3557
+ pointTo: function(b) {
3558
+ R = b.projection, j = b.getLatestValues(), U == null || U(), U = Xt(b.onSetAxisTarget(V.scheduleUpdateLayoutProjection), b.onLayoutAnimationComplete(function() {
3559
+ var P;
3560
+ V.isPresent ? V.presence = _t.Present : (P = V.layoutSafeToRemove) === null || P === void 0 || P.call(V);
3561
+ }));
3562
+ },
3563
+ // TODO: Clean this up
3564
+ isPresent: !0,
3565
+ presence: _t.Entering
3566
+ });
3567
+ return V;
3568
+ };
3569
+ };
3570
+ function pf(t) {
3571
+ t.resolveRelativeTargetBox();
3572
+ }
3573
+ function gf(t) {
3574
+ t.updateLayoutProjection();
3575
+ }
3576
+ var ro = W(["initial"], H(Pe)), hf = ro.length, yf = /* @__PURE__ */ new Set([
3577
+ "width",
3578
+ "height",
3579
+ "top",
3580
+ "left",
3581
+ "right",
3582
+ "bottom",
3583
+ "x",
3584
+ "y"
3585
+ ]), eo = function(t) {
3586
+ return yf.has(t);
3587
+ }, bf = function(t) {
3588
+ return Object.keys(t).some(eo);
3589
+ }, no = function(t, r) {
3590
+ t.set(r, !1), t.set(r);
3591
+ }, ar = function(t) {
3592
+ return t === gt || t === E;
3593
+ }, Sn;
3594
+ (function(t) {
3595
+ t.width = "width", t.height = "height", t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom";
3596
+ })(Sn || (Sn = {}));
3597
+ var An = function(t, r) {
3598
+ return parseFloat(t.split(", ")[r]);
3599
+ }, Vn = function(t, r) {
3600
+ return function(e, n) {
3601
+ var a = n.transform;
3602
+ if (a === "none" || !a)
3603
+ return 0;
3604
+ var o = a.match(/^matrix3d\((.+)\)$/);
3605
+ if (o)
3606
+ return An(o[1], r);
3607
+ var i = a.match(/^matrix\((.+)\)$/);
3608
+ return i ? An(i[1], t) : 0;
3609
+ };
3610
+ }, Pf = /* @__PURE__ */ new Set(["x", "y", "z"]), xf = Bt.filter(function(t) {
3611
+ return !Pf.has(t);
3612
+ });
3613
+ function Tf(t) {
3614
+ var r = [];
3615
+ return xf.forEach(function(e) {
3616
+ var n = t.getValue(e);
3617
+ n !== void 0 && (r.push([e, n.get()]), n.set(e.startsWith("scale") ? 1 : 0));
3618
+ }), r.length && t.syncRender(), r;
3619
+ }
3620
+ var Cn = {
3621
+ // Dimensions
3622
+ width: function(t) {
3623
+ var r = t.x;
3624
+ return r.max - r.min;
3625
+ },
3626
+ height: function(t) {
3627
+ var r = t.y;
3628
+ return r.max - r.min;
3629
+ },
3630
+ top: function(t, r) {
3631
+ var e = r.top;
3632
+ return parseFloat(e);
3633
+ },
3634
+ left: function(t, r) {
3635
+ var e = r.left;
3636
+ return parseFloat(e);
3637
+ },
3638
+ bottom: function(t, r) {
3639
+ var e = t.y, n = r.top;
3640
+ return parseFloat(n) + (e.max - e.min);
3641
+ },
3642
+ right: function(t, r) {
3643
+ var e = t.x, n = r.left;
3644
+ return parseFloat(n) + (e.max - e.min);
3645
+ },
3646
+ // Transform
3647
+ x: Vn(4, 13),
3648
+ y: Vn(5, 14)
3649
+ }, Sf = function(t, r, e) {
3650
+ var n = r.measureViewportBox(), a = r.getInstance(), o = getComputedStyle(a), i = o.display, u = o.top, f = o.left, s = o.bottom, l = o.right, m = o.transform, v = { top: u, left: f, bottom: s, right: l, transform: m };
3651
+ i === "none" && r.setStaticValue("display", t.display || "block"), r.syncRender();
3652
+ var d = r.measureViewportBox();
3653
+ return e.forEach(function(c) {
3654
+ var y = r.getValue(c);
3655
+ no(y, Cn[c](n, v)), t[c] = Cn[c](d, o);
3656
+ }), t;
3657
+ }, Af = function(t, r, e, n) {
3658
+ e === void 0 && (e = {}), n === void 0 && (n = {}), r = h({}, r), n = h({}, n);
3659
+ var a = Object.keys(r).filter(eo), o = [], i = !1, u = [];
3660
+ if (a.forEach(function(s) {
3661
+ var l = t.getValue(s);
3662
+ if (t.hasValue(s)) {
3663
+ var m = e[s], v = r[s], d = rr(m), c;
3664
+ if (jt(v))
3665
+ for (var y = v.length, p = v[0] === null ? 1 : 0; p < y; p++)
3666
+ c ? X(rr(v[p]) === c, "All keyframes must be of the same type") : (c = rr(v[p]), X(c === d || ar(d) && ar(c), "Keyframes must be of the same dimension as the current value"));
3667
+ else
3668
+ c = rr(v);
3669
+ if (d !== c)
3670
+ if (ar(d) && ar(c)) {
3671
+ var g = l.get();
3672
+ typeof g == "string" && l.set(parseFloat(g)), typeof v == "string" ? r[s] = parseFloat(v) : Array.isArray(v) && c === E && (r[s] = v.map(parseFloat));
3673
+ } else d != null && d.transform && (c != null && c.transform) && (m === 0 || v === 0) ? m === 0 ? l.set(c.transform(m)) : r[s] = d.transform(v) : (i || (o = Tf(t), i = !0), u.push(s), n[s] = n[s] !== void 0 ? n[s] : r[s], no(l, v));
3674
+ }
3675
+ }), u.length) {
3676
+ var f = Sf(r, t, u);
3677
+ return o.length && o.forEach(function(s) {
3678
+ var l = H(s, 2), m = l[0], v = l[1];
3679
+ t.getValue(m).set(v);
3680
+ }), t.syncRender(), { target: f, transitionEnd: n };
3681
+ } else
3682
+ return { target: r, transitionEnd: n };
3683
+ };
3684
+ function Vf(t, r, e, n) {
3685
+ return bf(r) ? Af(t, r, e, n) : { target: r, transitionEnd: n };
3686
+ }
3687
+ var Cf = function(t, r, e, n) {
3688
+ var a = Gs(t, r, n);
3689
+ return r = a.target, n = a.transitionEnd, Vf(t, r, e, n);
3690
+ };
3691
+ function Lf(t) {
3692
+ return window.getComputedStyle(t);
3693
+ }
3694
+ var ao = {
3695
+ treeType: "dom",
3696
+ readValueFromInstance: function(t, r) {
3697
+ if (Vr(r)) {
3698
+ var e = he(r);
3699
+ return e && e.default || 0;
3700
+ } else {
3701
+ var n = Lf(t);
3702
+ return (jn(r) ? n.getPropertyValue(r) : n[r]) || 0;
3703
+ }
3704
+ },
3705
+ sortNodePosition: function(t, r) {
3706
+ return t.compareDocumentPosition(r) & 2 ? 1 : -1;
3707
+ },
3708
+ getBaseTarget: function(t, r) {
3709
+ var e;
3710
+ return (e = t.style) === null || e === void 0 ? void 0 : e[r];
3711
+ },
3712
+ measureViewportBox: function(t, r) {
3713
+ var e = r.transformPagePoint;
3714
+ return za(t, e);
3715
+ },
3716
+ /**
3717
+ * Reset the transform on the current Element. This is called as part
3718
+ * of a batched process across the entire layout tree. To remove this write
3719
+ * cycle it'd be interesting to see if it's possible to "undo" all the current
3720
+ * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms
3721
+ * works
3722
+ */
3723
+ resetTransform: function(t, r, e) {
3724
+ var n = e.transformTemplate;
3725
+ r.style.transform = n ? n({}, "") : "none", t.scheduleRender();
3726
+ },
3727
+ restoreTransform: function(t, r) {
3728
+ t.style.transform = r.style.transform;
3729
+ },
3730
+ removeValueFromRenderState: function(t, r) {
3731
+ var e = r.vars, n = r.style;
3732
+ delete e[t], delete n[t];
3733
+ },
3734
+ /**
3735
+ * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`
3736
+ * can be animated by Motion.
3737
+ */
3738
+ makeTargetAnimatable: function(t, r, e, n) {
3739
+ var a = e.transformValues;
3740
+ n === void 0 && (n = !0);
3741
+ var o = r.transition, i = r.transitionEnd, u = J(r, ["transition", "transitionEnd"]), f = rs(u, o || {}, t);
3742
+ if (a && (i && (i = a(i)), u && (u = a(u)), f && (f = a(f))), n) {
3743
+ ku(t, u, f);
3744
+ var s = Cf(t, u, f, i);
3745
+ i = s.transitionEnd, u = s.target;
3746
+ }
3747
+ return h({
3748
+ transition: o,
3749
+ transitionEnd: i
3750
+ }, u);
3751
+ },
3752
+ scrapeMotionValuesFromProps: fe,
3753
+ build: function(t, r, e, n, a, o, i) {
3754
+ t.isVisible !== void 0 && (r.style.visibility = t.isVisible ? "visible" : "hidden");
3755
+ var u = n.isEnabled && a.isHydrated;
3756
+ ie(r, e, n, a, o, i.transformTemplate, u ? wr : void 0, u ? ka : void 0);
3757
+ },
3758
+ render: qn
3759
+ }, wf = to(ao), Ef = to(h(h({}, ao), {
3760
+ getBaseTarget: function(t, r) {
3761
+ return t[r];
3762
+ },
3763
+ readValueFromInstance: function(t, r) {
3764
+ var e;
3765
+ return Vr(r) ? ((e = he(r)) === null || e === void 0 ? void 0 : e.default) || 0 : (r = Jn.has(r) ? r : $n(r), t.getAttribute(r));
3766
+ },
3767
+ scrapeMotionValuesFromProps: kn,
3768
+ build: function(t, r, e, n, a, o, i) {
3769
+ var u = n.isEnabled && a.isHydrated;
3770
+ se(r, e, n, a, o, i.transformTemplate, u ? wr : void 0, u ? ka : void 0);
3771
+ },
3772
+ render: Qn
3773
+ })), Mf = function(t, r) {
3774
+ return ae(t) ? Ef(r, { enableHardwareAcceleration: !1 }) : wf(r, { enableHardwareAcceleration: !0 });
3775
+ }, Df = h(h(h(h({}, vs), Iu), Ks), uf), If = /* @__PURE__ */ Do(function(t, r) {
3776
+ return Pi(t, r, Df, Mf);
3777
+ });
3778
+ export {
3779
+ Tr as P,
3780
+ ef as S,
3781
+ ne as a,
3782
+ bt as i,
3783
+ If as m,
3784
+ fa as u
3785
+ };