@servicetitan/anvil2 0.9.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. package/{Alert-ac9a1bcd.js → Alert-6c7fe683.js} +34 -31
  2. package/Alert-6c7fe683.js.map +1 -0
  3. package/Alert-d282381d.cjs +2 -0
  4. package/Alert-d282381d.cjs.map +1 -0
  5. package/Alert.cjs +1 -1
  6. package/Alert.js +1 -1
  7. package/Announcement-0d1097c0.cjs +2 -0
  8. package/Announcement-0d1097c0.cjs.map +1 -0
  9. package/{Announcement-b9468739.js → Announcement-fa1a5266.js} +34 -31
  10. package/Announcement-fa1a5266.js.map +1 -0
  11. package/Announcement.cjs +1 -1
  12. package/Announcement.js +1 -1
  13. package/{Avatar-97b575d8.js → Avatar-2bbf623d.js} +18 -18
  14. package/Avatar-2bbf623d.js.map +1 -0
  15. package/Avatar-d474138f.cjs +2 -0
  16. package/Avatar-d474138f.cjs.map +1 -0
  17. package/Avatar.cjs +1 -1
  18. package/Avatar.js +1 -1
  19. package/{Badge-dbafadd5.js → Badge-2c63f232.js} +11 -10
  20. package/Badge-2c63f232.js.map +1 -0
  21. package/Badge-a5267e61.cjs +2 -0
  22. package/Badge-a5267e61.cjs.map +1 -0
  23. package/Badge.cjs +1 -1
  24. package/Badge.js +1 -1
  25. package/{Button-dc48bb3a.js → Button-1837beaf.js} +85 -83
  26. package/Button-1837beaf.js.map +1 -0
  27. package/Button-d7338178.cjs +2 -0
  28. package/Button-d7338178.cjs.map +1 -0
  29. package/Button.cjs +1 -1
  30. package/Button.js +1 -1
  31. package/ButtonCompound.cjs +1 -1
  32. package/ButtonCompound.js +1 -1
  33. package/ButtonLink.cjs +1 -1
  34. package/ButtonLink.js +1 -1
  35. package/ButtonToggle.cjs +1 -1
  36. package/ButtonToggle.js +1 -1
  37. package/Calendar-6170a262.cjs +2 -0
  38. package/Calendar-6170a262.cjs.map +1 -0
  39. package/{Calendar-83436bb1.js → Calendar-94a2af59.js} +528 -539
  40. package/Calendar-94a2af59.js.map +1 -0
  41. package/Calendar.cjs +1 -1
  42. package/Calendar.js +1 -1
  43. package/Card-9ee8218c.cjs +2 -0
  44. package/Card-9ee8218c.cjs.map +1 -0
  45. package/Card-cc1e0def.js +52 -0
  46. package/Card-cc1e0def.js.map +1 -0
  47. package/Card.cjs +1 -1
  48. package/Card.d.ts +7 -1
  49. package/Card.js +1 -1
  50. package/Checkbox-49324efd.cjs +2 -0
  51. package/Checkbox-49324efd.cjs.map +1 -0
  52. package/{Checkbox-a250869f.js → Checkbox-74836b15.js} +22 -20
  53. package/Checkbox-74836b15.js.map +1 -0
  54. package/Checkbox.cjs +1 -1
  55. package/Checkbox.js +1 -1
  56. package/Chip-2c19dfc4.cjs +2 -0
  57. package/Chip-2c19dfc4.cjs.map +1 -0
  58. package/Chip-c309468f.js +71 -0
  59. package/Chip-c309468f.js.map +1 -0
  60. package/Chip.cjs +1 -1
  61. package/Chip.css +1 -1
  62. package/Chip.d.ts +1 -0
  63. package/Chip.js +1 -1
  64. package/Combobox.cjs +1 -1
  65. package/Combobox.js +7 -7
  66. package/{Details-c6f10fa4.js → Details-2730bddb.js} +47 -45
  67. package/Details-2730bddb.js.map +1 -0
  68. package/Details-fdd49b05.cjs +2 -0
  69. package/Details-fdd49b05.cjs.map +1 -0
  70. package/Details.cjs +1 -1
  71. package/Details.js +1 -1
  72. package/Dialog-2a957ffe.cjs +2 -0
  73. package/Dialog-2a957ffe.cjs.map +1 -0
  74. package/{Dialog-fd3430f5.js → Dialog-da7cf1ae.js} +56 -55
  75. package/Dialog-da7cf1ae.js.map +1 -0
  76. package/Dialog.cjs +1 -1
  77. package/Dialog.cjs.map +1 -1
  78. package/Dialog.d.ts +6 -0
  79. package/Dialog.js +21 -17
  80. package/Dialog.js.map +1 -1
  81. package/Divider-7ef2a224.cjs +2 -0
  82. package/Divider-7ef2a224.cjs.map +1 -0
  83. package/{Divider-394d2459.js → Divider-a686c1f1.js} +7 -6
  84. package/Divider-a686c1f1.js.map +1 -0
  85. package/Divider.cjs +1 -1
  86. package/Divider.d.ts +1 -1
  87. package/Divider.js +1 -1
  88. package/{Drawer-99157473.cjs → Drawer-150c1703.cjs} +2 -2
  89. package/{Drawer-99157473.cjs.map → Drawer-150c1703.cjs.map} +1 -1
  90. package/{Drawer-46932ce0.js → Drawer-de9f3da9.js} +3 -3
  91. package/{Drawer-46932ce0.js.map → Drawer-de9f3da9.js.map} +1 -1
  92. package/Drawer.cjs +1 -1
  93. package/Drawer.js +1 -1
  94. package/Flex-29c4ffce.cjs +2 -0
  95. package/Flex-29c4ffce.cjs.map +1 -0
  96. package/{Flex-12077c9d.js → Flex-9956f1b3.js} +16 -15
  97. package/Flex-9956f1b3.js.map +1 -0
  98. package/Flex.cjs +1 -1
  99. package/Flex.js +1 -1
  100. package/Grid-5fbf04d4.cjs +2 -0
  101. package/Grid-5fbf04d4.cjs.map +1 -0
  102. package/{Grid-107fc6b6.js → Grid-9c813cf7.js} +9 -8
  103. package/Grid-9c813cf7.js.map +1 -0
  104. package/Grid.cjs +1 -1
  105. package/Grid.js +1 -1
  106. package/Helper-74a1f07f-12dff0ad.js +91 -0
  107. package/Helper-74a1f07f-12dff0ad.js.map +1 -0
  108. package/Helper-74a1f07f-1bd5ec70.cjs +2 -0
  109. package/Helper-74a1f07f-1bd5ec70.cjs.map +1 -0
  110. package/{Label.css → Helper-74a1f07f.css} +1 -1
  111. package/Icon-38342b79.cjs +2 -0
  112. package/Icon-38342b79.cjs.map +1 -0
  113. package/Icon-4fb5288e.js +48 -0
  114. package/Icon-4fb5288e.js.map +1 -0
  115. package/Icon.cjs +2 -0
  116. package/Icon.cjs.map +1 -0
  117. package/{index-cb7af0c9.css → Icon.css} +1 -1
  118. package/Icon.d.ts +21 -0
  119. package/Icon.js +11 -0
  120. package/Icon.js.map +1 -0
  121. package/Layout.cjs +1 -1
  122. package/Layout.js +109 -109
  123. package/Link-0ee242d1.cjs +2 -0
  124. package/Link-0ee242d1.cjs.map +1 -0
  125. package/{Link-c6b4090e.js → Link-3d4ebd58.js} +20 -18
  126. package/Link-3d4ebd58.js.map +1 -0
  127. package/Link.cjs +1 -1
  128. package/Link.js +1 -1
  129. package/ListView-3f377300.cjs +2 -0
  130. package/ListView-3f377300.cjs.map +1 -0
  131. package/{ListView-e895e6a8.js → ListView-6652d49f.js} +32 -31
  132. package/ListView-6652d49f.js.map +1 -0
  133. package/ListView.cjs +1 -1
  134. package/ListView.js +4 -4
  135. package/{Listbox-39c32ced.js → Listbox-97e11191.js} +35 -33
  136. package/Listbox-97e11191.js.map +1 -0
  137. package/Listbox-b5f4e327.cjs +2 -0
  138. package/Listbox-b5f4e327.cjs.map +1 -0
  139. package/Listbox.cjs +1 -1
  140. package/Listbox.js +5 -5
  141. package/Menu-d5956ea2.cjs +2 -0
  142. package/Menu-d5956ea2.cjs.map +1 -0
  143. package/{Menu-cc458844.js → Menu-dbe0fd3a.js} +30 -30
  144. package/Menu-dbe0fd3a.js.map +1 -0
  145. package/Menu.cjs +1 -1
  146. package/Menu.js +1 -1
  147. package/Overflow.cjs +1 -1
  148. package/Overflow.cjs.map +1 -1
  149. package/Overflow.js +24 -23
  150. package/Overflow.js.map +1 -1
  151. package/Page.cjs +1 -1
  152. package/Page.cjs.map +1 -1
  153. package/Page.js +64 -64
  154. package/{Popover-16e123eb.cjs → Popover-20b9a021.cjs} +2 -2
  155. package/{Popover-16e123eb.cjs.map → Popover-20b9a021.cjs.map} +1 -1
  156. package/{Popover-bbf3a937.js → Popover-5d8c0428.js} +2 -2
  157. package/{Popover-bbf3a937.js.map → Popover-5d8c0428.js.map} +1 -1
  158. package/Popover.cjs +1 -1
  159. package/Popover.js +1 -1
  160. package/{ProgressBar-b002f299.js → ProgressBar-8bc6ae09.js} +30 -28
  161. package/ProgressBar-8bc6ae09.js.map +1 -0
  162. package/ProgressBar-df4d363c.cjs +2 -0
  163. package/ProgressBar-df4d363c.cjs.map +1 -0
  164. package/ProgressBar.cjs +1 -1
  165. package/ProgressBar.js +1 -1
  166. package/{Radio-45648d07.js → Radio-bab9334f.js} +14 -12
  167. package/Radio-bab9334f.js.map +1 -0
  168. package/Radio-c14a8ea0.cjs +2 -0
  169. package/Radio-c14a8ea0.cjs.map +1 -0
  170. package/Radio.cjs +1 -1
  171. package/Radio.js +1 -1
  172. package/{SideNav-430e523d.js → SideNav-2760a049.js} +45 -43
  173. package/SideNav-2760a049.js.map +1 -0
  174. package/SideNav-3e46e3c4.cjs +2 -0
  175. package/SideNav-3e46e3c4.cjs.map +1 -0
  176. package/SideNav.cjs +5 -5
  177. package/SideNav.cjs.map +1 -1
  178. package/SideNav.js +63 -62
  179. package/SideNav.js.map +1 -1
  180. package/Spinner-e6a0837b-9a5e00e0.js +17 -0
  181. package/Spinner-e6a0837b-9a5e00e0.js.map +1 -0
  182. package/Spinner-e6a0837b-a4cbf304.cjs +2 -0
  183. package/Spinner-e6a0837b-a4cbf304.cjs.map +1 -0
  184. package/Spinner.css +1 -0
  185. package/Stepper-114de1c0.js +388 -0
  186. package/Stepper-114de1c0.js.map +1 -0
  187. package/Stepper-26ff6dd3.cjs +2 -0
  188. package/Stepper-26ff6dd3.cjs.map +1 -0
  189. package/Stepper.cjs +1 -1
  190. package/Stepper.css +1 -1
  191. package/Stepper.js +4 -4
  192. package/{Switch-681bcdd4.js → Switch-48443bc7.js} +20 -18
  193. package/Switch-48443bc7.js.map +1 -0
  194. package/Switch-c6a36b99.cjs +2 -0
  195. package/Switch-c6a36b99.cjs.map +1 -0
  196. package/Switch.cjs +1 -1
  197. package/Switch.js +1 -1
  198. package/Tab-51af7435.cjs +10 -0
  199. package/Tab-51af7435.cjs.map +1 -0
  200. package/{Tab-93702f1d.js → Tab-a5d9cec6.js} +24 -21
  201. package/Tab-a5d9cec6.js.map +1 -0
  202. package/Tab.cjs +1 -1
  203. package/Tab.js +1 -1
  204. package/Text-317031b1.cjs +2 -0
  205. package/Text-317031b1.cjs.map +1 -0
  206. package/{Text-dbff9cb7.js → Text-796fd2cb.js} +29 -28
  207. package/Text-796fd2cb.js.map +1 -0
  208. package/Text.cjs +1 -1
  209. package/Text.js +1 -1
  210. package/TextField-57bb98f0.cjs +2 -0
  211. package/TextField-57bb98f0.cjs.map +1 -0
  212. package/{TextField-0b30ba31.js → TextField-7823e2ff.js} +23 -22
  213. package/TextField-7823e2ff.js.map +1 -0
  214. package/TextField.cjs +1 -1
  215. package/TextField.js +1 -1
  216. package/Textarea-03f882d5.cjs +2 -0
  217. package/Textarea-03f882d5.cjs.map +1 -0
  218. package/Textarea-6ca5ebf5.js +244 -0
  219. package/Textarea-6ca5ebf5.js.map +1 -0
  220. package/Textarea.cjs +1 -1
  221. package/Textarea.js +6 -6
  222. package/Toast-c7f439ad.cjs +9 -0
  223. package/Toast-c7f439ad.cjs.map +1 -0
  224. package/Toast-e171c00b.js +551 -0
  225. package/Toast-e171c00b.js.map +1 -0
  226. package/Toast.cjs +2 -0
  227. package/Toast.cjs.map +1 -0
  228. package/Toast.d.ts +41 -0
  229. package/Toast.js +12 -0
  230. package/Toast.js.map +1 -0
  231. package/anvil2.cjs +1 -1
  232. package/anvil2.d.ts +112 -57
  233. package/anvil2.js +175 -167
  234. package/anvil2.js.map +1 -1
  235. package/extends-135d7828.js +23 -0
  236. package/extends-135d7828.js.map +1 -0
  237. package/extends-fcb402fe.cjs +2 -0
  238. package/extends-fcb402fe.cjs.map +1 -0
  239. package/index-09d89a47.js +678 -0
  240. package/index-09d89a47.js.map +1 -0
  241. package/index-67ae73fa-45a2ebfb.cjs +23 -0
  242. package/{index-56139b56-2d7be688.cjs.map → index-67ae73fa-45a2ebfb.cjs.map} +1 -1
  243. package/{index-56139b56-cfb3b366.js → index-67ae73fa-8e31624a.js} +18 -15
  244. package/{index-56139b56-cfb3b366.js.map → index-67ae73fa-8e31624a.js.map} +1 -1
  245. package/index-92baae54.cjs +21 -0
  246. package/index-92baae54.cjs.map +1 -0
  247. package/index.css +1 -1
  248. package/index3.css +1 -1
  249. package/{use-reduced-motion-68bea567.js → motion-1dee7c9a.js} +1217 -1234
  250. package/motion-1dee7c9a.js.map +1 -0
  251. package/motion-f7215751.cjs +2 -0
  252. package/motion-f7215751.cjs.map +1 -0
  253. package/package.json +30 -30
  254. package/use-reduced-motion-00575ab2.cjs +2 -0
  255. package/use-reduced-motion-00575ab2.cjs.map +1 -0
  256. package/use-reduced-motion-fa02c531.js +28 -0
  257. package/use-reduced-motion-fa02c531.js.map +1 -0
  258. package/useAccessibleColor.cjs +1 -8
  259. package/useAccessibleColor.cjs.map +1 -1
  260. package/useAccessibleColor.js +41 -577
  261. package/useAccessibleColor.js.map +1 -1
  262. package/useLayoutPropsUtil-4361a49d-a262cd66.cjs +2 -0
  263. package/useLayoutPropsUtil-4361a49d-a262cd66.cjs.map +1 -0
  264. package/useLayoutPropsUtil-4361a49d-f9f6e64c.js +99 -0
  265. package/useLayoutPropsUtil-4361a49d-f9f6e64c.js.map +1 -0
  266. package/usePrefersColorScheme.cjs +1 -1
  267. package/usePrefersColorScheme.js +33 -33
  268. package/useSwipe-82769b09-835234e6.js +17 -0
  269. package/useSwipe-82769b09-835234e6.js.map +1 -0
  270. package/useSwipe-82769b09-dba26ed2.cjs +2 -0
  271. package/useSwipe-82769b09-dba26ed2.cjs.map +1 -0
  272. package/useSwipe.cjs +1 -1
  273. package/useSwipe.js +36 -35
  274. package/useSwipe.js.map +1 -1
  275. package/warning-412414f5-31461705.cjs +2 -0
  276. package/warning-412414f5-31461705.cjs.map +1 -0
  277. package/warning-412414f5-36733091.js +6 -0
  278. package/warning-412414f5-36733091.js.map +1 -0
  279. package/Alert-ac9a1bcd.js.map +0 -1
  280. package/Alert-c7461f76.cjs +0 -2
  281. package/Alert-c7461f76.cjs.map +0 -1
  282. package/Announcement-546f0bd9.cjs +0 -2
  283. package/Announcement-546f0bd9.cjs.map +0 -1
  284. package/Announcement-b9468739.js.map +0 -1
  285. package/Avatar-97b575d8.js.map +0 -1
  286. package/Avatar-97f653b7.cjs +0 -2
  287. package/Avatar-97f653b7.cjs.map +0 -1
  288. package/Badge-3adb51a5.cjs +0 -2
  289. package/Badge-3adb51a5.cjs.map +0 -1
  290. package/Badge-dbafadd5.js.map +0 -1
  291. package/Button-1a56b573.cjs +0 -2
  292. package/Button-1a56b573.cjs.map +0 -1
  293. package/Button-dc48bb3a.js.map +0 -1
  294. package/Calendar-0659f8b4.cjs +0 -2
  295. package/Calendar-0659f8b4.cjs.map +0 -1
  296. package/Calendar-83436bb1.js.map +0 -1
  297. package/Card-67e4a72d.js +0 -48
  298. package/Card-67e4a72d.js.map +0 -1
  299. package/Card-da5a5c50.cjs +0 -2
  300. package/Card-da5a5c50.cjs.map +0 -1
  301. package/Checkbox-92a6dd20.cjs +0 -2
  302. package/Checkbox-92a6dd20.cjs.map +0 -1
  303. package/Checkbox-a250869f.js.map +0 -1
  304. package/Chip-467cb19a.js +0 -59
  305. package/Chip-467cb19a.js.map +0 -1
  306. package/Chip-e7800a85.cjs +0 -2
  307. package/Chip-e7800a85.cjs.map +0 -1
  308. package/Details-44527230.cjs +0 -2
  309. package/Details-44527230.cjs.map +0 -1
  310. package/Details-c6f10fa4.js.map +0 -1
  311. package/Dialog-fbc91a0e.cjs +0 -2
  312. package/Dialog-fbc91a0e.cjs.map +0 -1
  313. package/Dialog-fd3430f5.js.map +0 -1
  314. package/Divider-063f94ad.cjs +0 -2
  315. package/Divider-063f94ad.cjs.map +0 -1
  316. package/Divider-394d2459.js.map +0 -1
  317. package/Flex-12077c9d.js.map +0 -1
  318. package/Flex-d3632e09.cjs +0 -2
  319. package/Flex-d3632e09.cjs.map +0 -1
  320. package/Grid-107fc6b6.js.map +0 -1
  321. package/Grid-f506406d.cjs +0 -2
  322. package/Grid-f506406d.cjs.map +0 -1
  323. package/Label-cc07cfc5.js +0 -47
  324. package/Label-cc07cfc5.js.map +0 -1
  325. package/Label-de03a1de.cjs +0 -2
  326. package/Label-de03a1de.cjs.map +0 -1
  327. package/Link-3b673823.cjs +0 -2
  328. package/Link-3b673823.cjs.map +0 -1
  329. package/Link-c6b4090e.js.map +0 -1
  330. package/ListView-2b4699a6.cjs +0 -2
  331. package/ListView-2b4699a6.cjs.map +0 -1
  332. package/ListView-e895e6a8.js.map +0 -1
  333. package/Listbox-39c32ced.js.map +0 -1
  334. package/Listbox-5ffb93f8.cjs +0 -2
  335. package/Listbox-5ffb93f8.cjs.map +0 -1
  336. package/Menu-3d2a2077.cjs +0 -2
  337. package/Menu-3d2a2077.cjs.map +0 -1
  338. package/Menu-cc458844.js.map +0 -1
  339. package/ProgressBar-b002f299.js.map +0 -1
  340. package/ProgressBar-dfd1189e.cjs +0 -2
  341. package/ProgressBar-dfd1189e.cjs.map +0 -1
  342. package/Radio-45648d07.js.map +0 -1
  343. package/Radio-941f3286.cjs +0 -2
  344. package/Radio-941f3286.cjs.map +0 -1
  345. package/SideNav-430e523d.js.map +0 -1
  346. package/SideNav-7228b784.cjs +0 -2
  347. package/SideNav-7228b784.cjs.map +0 -1
  348. package/Spinner-2bb1850c-00c03d61.cjs +0 -2
  349. package/Spinner-2bb1850c-00c03d61.cjs.map +0 -1
  350. package/Spinner-2bb1850c-d70e6345.js +0 -13
  351. package/Spinner-2bb1850c-d70e6345.js.map +0 -1
  352. package/Stepper-7182de9a.cjs +0 -2
  353. package/Stepper-7182de9a.cjs.map +0 -1
  354. package/Stepper-a9bc37e2.js +0 -373
  355. package/Stepper-a9bc37e2.js.map +0 -1
  356. package/Switch-5007f230.cjs +0 -2
  357. package/Switch-5007f230.cjs.map +0 -1
  358. package/Switch-681bcdd4.js.map +0 -1
  359. package/Tab-920f6aad.cjs +0 -10
  360. package/Tab-920f6aad.cjs.map +0 -1
  361. package/Tab-93702f1d.js.map +0 -1
  362. package/Text-96a3b0cb.cjs +0 -2
  363. package/Text-96a3b0cb.cjs.map +0 -1
  364. package/Text-dbff9cb7.js.map +0 -1
  365. package/TextField-0b30ba31.js.map +0 -1
  366. package/TextField-58320cef.cjs +0 -2
  367. package/TextField-58320cef.cjs.map +0 -1
  368. package/Textarea-6573a847.cjs +0 -2
  369. package/Textarea-6573a847.cjs.map +0 -1
  370. package/Textarea-b387b2d7.js +0 -114
  371. package/Textarea-b387b2d7.js.map +0 -1
  372. package/index-064ddc3d.js +0 -698
  373. package/index-064ddc3d.js.map +0 -1
  374. package/index-56139b56-2d7be688.cjs +0 -23
  375. package/index-910707bd.cjs +0 -21
  376. package/index-910707bd.cjs.map +0 -1
  377. package/index-cb7af0c9-2d919802.cjs +0 -2
  378. package/index-cb7af0c9-2d919802.cjs.map +0 -1
  379. package/index-cb7af0c9-4f28e075.js +0 -193
  380. package/index-cb7af0c9-4f28e075.js.map +0 -1
  381. package/use-reduced-motion-162cddef.cjs +0 -2
  382. package/use-reduced-motion-162cddef.cjs.map +0 -1
  383. package/use-reduced-motion-68bea567.js.map +0 -1
  384. /package/{index4.css → Toast.css} +0 -0
  385. /package/{index-56139b56.css → index-67ae73fa.css} +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";const P=require("react"),X=require("./use-reduced-motion-00575ab2.cjs");function Ri(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Je=Ri(P),Se=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),$t=P.createContext({}),_t=P.createContext(null),us=X.isBrowser?P.useLayoutEffect:P.useEffect,cs=P.createContext({strict:!1}),Ve=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Ei="framerAppearId",hs="data-"+Ve(Ei),Li={skipAnimations:!1,useManualTiming:!1};class Qe{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Fi(t){let e=new Qe,n=new Qe,s=0,i=!1,r=!1;const o=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const h=c&&i,f=h?e:n;return u&&o.add(l),f.add(l)&&h&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(i){r=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let u=0;u<s;u++){const c=e.order[u];o.has(c)&&(a.schedule(c),t()),c(l)}i=!1,r&&(r=!1,a.process(l))}};return a}const Mt=["read","resolveKeyframes","update","preRender","render","postRender"],Bi=40;function fs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=Mt.reduce((h,f)=>(h[f]=Fi(()=>n=!0),h),{}),o=h=>{r[h].process(i)},a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,Bi),1),i.timestamp=h,i.isProcessing=!0,Mt.forEach(o),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Mt.reduce((h,f)=>{const d=r[f];return h[f]=(m,p=!1,y=!1)=>(n||l(),d.schedule(m,p,y)),h},{}),cancel:h=>Mt.forEach(f=>r[f].cancel(h)),state:i,steps:r}}const{schedule:we,cancel:Ul}=fs(queueMicrotask,!1);function ki(t,e,n,s){const{visualElement:i}=P.useContext($t),r=P.useContext(cs),o=P.useContext(_t),a=P.useContext(Se).reducedMotion,l=P.useRef();s=s||r.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;P.useInsertionEffect(()=>{u&&u.update(n,o)});const c=P.useRef(!!(n[hs]&&!window.HandoffComplete));return us(()=>{u&&(we.postRender(u.render),c.current&&u.animationState&&u.animationState.animateChanges())}),P.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),c.current&&(c.current=!1,window.HandoffComplete=!0))}),u}function lt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Oi(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):lt(n)&&(n.current=s))},[e])}function Tt(t){return typeof t=="string"||Array.isArray(t)}function Wt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Ae=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ce=["initial",...Ae];function Gt(t){return Wt(t.animate)||Ce.some(e=>Tt(t[e]))}function ds(t){return!!(Gt(t)||t.variants)}function ji(t,e){if(Gt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Tt(n)?n:void 0,animate:Tt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Ii(t){const{initial:e,animate:n}=ji(t,P.useContext($t));return P.useMemo(()=>({initial:e,animate:n}),[tn(e),tn(n)])}function tn(t){return Array.isArray(t)?t.join(" "):t}const en={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Pt={};for(const t in en)Pt[t]={isEnabled:e=>en[t].some(n=>!!e[n])};function Ni(t){for(const e in t)Pt[e]={...Pt[e],...t[e]}}const De=P.createContext({}),ms=P.createContext({}),Ui=Symbol.for("motionComponentSymbol");function Ki({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Ni(t);function r(a,l){let u;const c={...P.useContext(Se),...a,layoutId:$i(a)},{isStatic:h}=c,f=Ii(a),d=s(a,h);if(!h&&X.isBrowser){f.visualElement=ki(i,d,c,e);const m=P.useContext(ms),p=P.useContext(cs).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,p,t,m))}return Je.createElement($t.Provider,{value:f},u&&f.visualElement?Je.createElement(u,{visualElement:f.visualElement,...c}):null,n(i,a,Oi(d,f.visualElement,l),d,h,f.visualElement))}const o=P.forwardRef(r);return o[Ui]=i,o}function $i({layoutId:t}){const e=P.useContext(De).id;return e&&t!==void 0?e+"-"+t:t}function _i(t){function e(s,i={}){return Ki(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Wi=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Me(t){return typeof t!="string"||t.includes("-")?!1:!!(Wi.indexOf(t)>-1||/[A-Z]/u.test(t))}const kt={};function Gi(t){Object.assign(kt,t)}const Vt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],rt=new Set(Vt);function ps(t,{layout:e,layoutId:n}){return rt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!kt[t]||t==="opacity")}const L=t=>!!(t&&t.getVelocity),Hi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zi=Vt.length;function Yi(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let r="";for(let o=0;o<zi;o++){const a=Vt[o];if(t[a]!==void 0){const l=Hi[a]||a;r+=`${l}(${t[a]}) `}}return e&&!t.z&&(r+="translateZ(0)"),r=r.trim(),i?r=i(t,s?"":r):n&&s&&(r="none"),r}const gs=t=>e=>typeof e=="string"&&e.startsWith(t),ys=gs("--"),Xi=gs("var(--"),Re=t=>Xi(t)?qi.test(t.split("/*")[0].trim()):!1,qi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Zi=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Z=(t,e,n)=>n>e?e:n<t?t:n,dt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},gt={...dt,transform:t=>Z(0,1,t)},Rt={...dt,default:1},yt=t=>Math.round(t*1e5)/1e5,Ee=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Ji=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Qi=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function wt(t){return typeof t=="string"}const At=t=>({test:e=>wt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),z=At("deg"),N=At("%"),x=At("px"),to=At("vh"),eo=At("vw"),nn={...N,parse:t=>N.parse(t)/100,transform:t=>N.transform(t*100)},sn={...dt,transform:Math.round},vs={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,size:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:Rt,scaleX:Rt,scaleY:Rt,scaleZ:Rt,skew:z,skewX:z,skewY:z,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:gt,originX:nn,originY:nn,originZ:x,zIndex:sn,backgroundPositionX:x,backgroundPositionY:x,fillOpacity:gt,strokeOpacity:gt,numOctaves:sn};function Le(t,e,n,s){const{style:i,vars:r,transform:o,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const h in e){const f=e[h];if(ys(h)){r[h]=f;continue}const d=vs[h],m=Zi(f,d);if(rt.has(h)){if(l=!0,o[h]=m,!c)continue;f!==(d.default||0)&&(c=!1)}else h.startsWith("origin")?(u=!0,a[h]=m):i[h]=m}if(e.transform||(l||s?i.transform=Yi(t.transform,n,c,s):i.transform&&(i.transform="none")),u){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const Fe=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function xs(t,e,n){for(const s in e)!L(e[s])&&!ps(s,n)&&(t[s]=e[s])}function no({transformTemplate:t},e,n){return P.useMemo(()=>{const s=Fe();return Le(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function so(t,e,n){const s=t.style||{},i={};return xs(i,s,t),Object.assign(i,no(t,e,n)),i}function io(t,e,n){const s={},i=so(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const oo=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ot(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||oo.has(t)}let Ts=t=>!Ot(t);function ro(t){t&&(Ts=e=>e.startsWith("on")?!Ot(e):t(e))}try{ro(require("@emotion/is-prop-valid").default)}catch{}function ao(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ts(i)||n===!0&&Ot(i)||!e&&!Ot(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function on(t,e,n){return typeof t=="string"?t:x.transform(e+n*t)}function lo(t,e,n){const s=on(e,t.x,t.width),i=on(n,t.y,t.height);return`${s} ${i}`}const uo={offset:"stroke-dashoffset",array:"stroke-dasharray"},co={offset:"strokeDashoffset",array:"strokeDasharray"};function ho(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?uo:co;t[r.offset]=x.transform(-s);const o=x.transform(e),a=x.transform(n);t[r.array]=`${o} ${a}`}function Be(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h,f){if(Le(t,u,c,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:m,dimensions:p}=t;d.transform&&(p&&(m.transform=d.transform),delete d.transform),p&&(i!==void 0||r!==void 0||m.transform)&&(m.transformOrigin=lo(p,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),o!==void 0&&ho(d,o,a,l,!1)}const Ps=()=>({...Fe(),attrs:{}}),ke=t=>typeof t=="string"&&t.toLowerCase()==="svg";function fo(t,e,n,s){const i=P.useMemo(()=>{const r=Ps();return Be(r,e,{enableHardwareAcceleration:!1},ke(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};xs(r,t.style,t),i.style={...r,...i.style}}return i}function mo(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(Me(n)?fo:io)(s,r,o,n),u=ao(s,typeof n=="string",t),c=n!==P.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=P.useMemo(()=>L(h)?h.get():h,[h]);return P.createElement(n,{...c,children:f})}}function bs(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const Ss=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Vs(t,e,n,s){bs(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ss.has(i)?i:Ve(i),e.attrs[i])}function Oe(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(L(i[o])||e.style&&L(e.style[o])||ps(o,t)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function ws(t,e,n){const s=Oe(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const r=Vt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function je(t,e,n,s={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,s,i)),e}function As(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const ce=t=>Array.isArray(t),po=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),go=t=>ce(t)?t[t.length-1]||0:t;function Lt(t){const e=L(t)?t.get():t;return po(e)?e.toValue():e}function yo({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,r){const o={latestValues:vo(s,i,r,t),renderState:e()};return n&&(o.mount=a=>n(s,a,o)),o}const Cs=t=>(e,n)=>{const s=P.useContext($t),i=P.useContext(_t),r=()=>yo(t,e,s,i);return n?r():As(r)};function vo(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Lt(r[f]);let{initial:o,animate:a}=t;const l=Gt(t),u=ds(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;return h&&typeof h!="boolean"&&!Wt(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const m=je(t,d);if(!m)return;const{transitionEnd:p,transition:y,...v}=m;for(const T in v){let g=v[T];if(Array.isArray(g)){const b=c?g.length-1:0;g=g[b]}g!==null&&(i[T]=g)}for(const T in p)i[T]=p[T]}),i}const M=t=>t,{schedule:C,cancel:J,state:D,steps:Zt}=fs(typeof requestAnimationFrame<"u"?requestAnimationFrame:M,!0),xo={useVisualState:Cs({scrapeMotionValuesFromProps:ws,createRenderState:Ps,onMount:(t,e,{renderState:n,latestValues:s})=>{C.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),C.render(()=>{Be(n,s,{enableHardwareAcceleration:!1},ke(e.tagName),t.transformTemplate),Vs(e,n)})}})},To={useVisualState:Cs({scrapeMotionValuesFromProps:Oe,createRenderState:Fe})};function Po(t,{forwardMotionProps:e=!1},n,s){return{...Me(t)?xo:To,preloadedFeatures:n,useRender:mo(e),createVisualElement:s,Component:t}}function K(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ds=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ht(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const bo=t=>e=>Ds(e)&&t(e,Ht(e));function $(t,e,n,s){return K(t,e,bo(n),s)}const So=(t,e)=>n=>e(t(n)),_=(...t)=>t.reduce(So);function Ms(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const rn=Ms("dragHorizontal"),an=Ms("dragVertical");function Rs(t){let e=!1;if(t==="y")e=an();else if(t==="x")e=rn();else{const n=rn(),s=an();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Es(){const t=Rs(!0);return t?(t(),!1):!0}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function ln(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(r,o)=>{if(r.pointerType==="touch"||Es())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&a[s](r,o)};return $(t.current,n,i,{passive:!t.getProps()[s]})}class Vo extends tt{mount(){this.unmount=_(ln(this.node,!0),ln(this.node,!1))}unmount(){}}class wo extends tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_(K(this.node.current,"focus",()=>this.onFocus()),K(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ls=(t,e)=>e?t===e?!0:Ls(t,e.parentElement):!1;function Jt(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Ht(n))}class Ao extends tt{constructor(){super(...arguments),this.removeStartListeners=M,this.removeEndListeners=M,this.removeAccessibleListeners=M,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),r=$(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:h}=this.node.getProps();!h&&!Ls(this.node.current,a.target)?c&&c(a,l):u&&u(a,l)},{passive:!(s.onTap||s.onPointerUp)}),o=$(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=_(r,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Jt("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&c(l,u)})};this.removeEndListeners(),this.removeEndListeners=K(this.node.current,"keyup",o),Jt("down",(a,l)=>{this.startPress(a,l)})},n=K(this.node.current,"keydown",e),s=()=>{this.isPressing&&Jt("cancel",(r,o)=>this.cancelPress(r,o))},i=K(this.node.current,"blur",s);this.removeAccessibleListeners=_(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&s(e,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Es()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&s(e,n)}mount(){const e=this.node.getProps(),n=$(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=K(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=_(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const he=new WeakMap,Qt=new WeakMap,Co=t=>{const e=he.get(t.target);e&&e(t)},Do=t=>{t.forEach(Co)};function Mo({root:t,...e}){const n=t||document;Qt.has(n)||Qt.set(n,{});const s=Qt.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Do,{root:t,...e})),s[i]}function Ro(t,e,n){const s=Mo(e);return he.set(t,n),s.observe(t),()=>{he.delete(t),s.unobserve(t)}}const Eo={some:0,all:1};class Lo extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Eo[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return Ro(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Fo(e,n))&&this.startObserver()}unmount(){}}function Fo({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Bo={inView:{Feature:Lo},tap:{Feature:Ao},focus:{Feature:wo},hover:{Feature:Vo}};function Fs(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function ko(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function Oo(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function zt(t,e,n){const s=t.getProps();return je(s,e,n!==void 0?n:s.custom,ko(t),Oo(t))}const W=t=>t*1e3,G=t=>t/1e3,jo={type:"spring",stiffness:500,damping:25,restSpeed:10},Io=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),No={type:"keyframes",duration:.8},Uo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ko=(t,{keyframes:e})=>e.length>2?No:rt.has(t)?t.startsWith("scale")?Io(e[1]):jo:Uo;function $o({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function Ie(t,e){return t[e]||t.default||t}const _o=t=>t!==null;function Yt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(_o),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}let Ft;function Wo(){Ft=void 0}const q={now:()=>(Ft===void 0&&q.set(D.isProcessing||Li.useManualTiming?D.timestamp:performance.now()),Ft),set:t=>{Ft=t,queueMicrotask(Wo)}},Bs=t=>/^0[^.\s]+$/u.test(t);function Go(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Bs(t):!0}let Ct=M;exports.invariant=M;process.env.NODE_ENV!=="production"&&(Ct=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},exports.invariant=(t,e)=>{if(!t)throw new Error(e)});const ks=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ho=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function zo(t){const e=Ho.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const Yo=4;function Os(t,e,n=1){exports.invariant(n<=Yo,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[s,i]=zo(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return ks(o)?parseFloat(o):o}return Re(i)?Os(i,e,n+1):i}const Xo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),un=t=>t===dt||t===x,cn=(t,e)=>parseFloat(t.split(", ")[e]),hn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return cn(i[1],e);{const r=s.match(/^matrix\((.+)\)$/u);return r?cn(r[1],t):0}},qo=new Set(["x","y","z"]),Zo=Vt.filter(t=>!qo.has(t));function fn(t){const e=[];return Zo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ft={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:hn(4,13),y:hn(5,14)};ft.translateX=ft.x;ft.translateY=ft.y;const js=t=>e=>e.test(t),Jo={test:t=>t==="auto",parse:t=>t},Is=[dt,x,N,z,eo,to,Jo],dn=t=>Is.find(js(t)),ot=new Set;let fe=!1,de=!1;function Ns(){if(de){const t=Array.from(ot).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{fn(s).length&&(n.set(s,fn(s)),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render()}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}de=!1,fe=!1,ot.forEach(t=>t.complete()),ot.clear()}function Us(){ot.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(de=!0)})}function Qo(){Us(),Ns()}class Ne{constructor(e,n,s,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ot.add(this),fe||(fe=!0,C.read(Us),C.resolveKeyframes(Ns))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let r=0;r<e.length;r++)if(e[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ot.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ot.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Ue=(t,e)=>n=>!!(wt(n)&&Qi.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ks=(t,e,n)=>s=>{if(!wt(s))return s;const[i,r,o,a]=s.match(Ee);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},tr=t=>Z(0,255,t),te={...dt,transform:t=>Math.round(tr(t))},it={test:Ue("rgb","red"),parse:Ks("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+te.transform(t)+", "+te.transform(e)+", "+te.transform(n)+", "+yt(gt.transform(s))+")"};function er(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const me={test:Ue("#"),parse:er,transform:it.transform},ut={test:Ue("hsl","hue"),parse:Ks("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+N.transform(yt(e))+", "+N.transform(yt(n))+", "+yt(gt.transform(s))+")"},E={test:t=>it.test(t)||me.test(t)||ut.test(t),parse:t=>it.test(t)?it.parse(t):ut.test(t)?ut.parse(t):me.parse(t),transform:t=>wt(t)?t:t.hasOwnProperty("red")?it.transform(t):ut.transform(t)};function nr(t){var e,n;return isNaN(t)&&wt(t)&&(((e=t.match(Ee))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(Ji))===null||n===void 0?void 0:n.length)||0)>0}const $s="number",_s="color",sr="var",ir="var(",mn="${}",or=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function jt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(or,l=>(E.test(l)?(s.color.push(r),i.push(_s),n.push(E.parse(l))):l.startsWith(ir)?(s.var.push(r),i.push(sr),n.push(l)):(s.number.push(r),i.push($s),n.push(parseFloat(l))),++r,mn)).split(mn);return{values:n,split:a,indexes:s,types:i}}function Ws(t){return jt(t).values}function Gs(t){const{split:e,types:n}=jt(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===$s?r+=yt(i[o]):a===_s?r+=E.transform(i[o]):r+=i[o]}return r}}const rr=t=>typeof t=="number"?0:t;function ar(t){const e=Ws(t);return Gs(t)(e.map(rr))}const Q={test:nr,parse:Ws,createTransformer:Gs,getAnimatableNone:ar},lr=new Set(["brightness","contrast","saturate","opacity"]);function ur(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Ee)||[];if(!s)return t;const i=n.replace(s,"");let r=lr.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const cr=/\b([a-z-]*)\(.*?\)/gu,pe={...Q,getAnimatableNone:t=>{const e=t.match(cr);return e?e.map(ur).join(" "):t}},hr={...vs,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:pe,WebkitFilter:pe},Ke=t=>hr[t];function Hs(t,e){let n=Ke(t);return n!==pe&&(n=Q),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function fr(t,e,n){let s=0,i;for(;s<t.length&&!i;)typeof t[s]=="string"&&t[s]!=="none"&&t[s]!=="0"&&(i=t[s]),s++;if(i&&n)for(const r of e)t[r]=Hs(n,i)}class zs extends Ne{constructor(e,n,s,i){super(e,n,s,i,i==null?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){const u=e[l];if(typeof u=="string"&&Re(u)){const c=Os(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(!Xo.has(s)||e.length!==2)return this.resolveNoneKeyframes();const[i,r]=e,o=dn(i),a=dn(r);if(o!==a)if(un(o)&&un(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)Go(e[i])&&s.push(i);s.length&&fr(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ft[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ft[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function dr(t){let e;return()=>(e===void 0&&(e=t()),e)}const pn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Q.test(t)||t==="0")&&!t.startsWith("url("));function mr(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function pr(t,e,n,s){const i=t[0];if(i===null)return!1;const r=t[t.length-1],o=pn(i,e),a=pn(r,e);return Ct(o===a,`You are trying to animate ${e} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`),!o||!a?!1:mr(t)||n==="spring"&&s}class Ys{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Qo(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!pr(e,s,i,r))if(o)this.options.duration=0;else{l==null||l(Yt(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function Xs(t,e){return e?t*(1e3/e):0}const gr=5;function qs(t,e,n){const s=Math.max(e-gr,0);return Xs(n-t(s),e-s)}const ee=.001,yr=.01,gn=10,vr=.05,xr=1;function Tr({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,r;Ct(t<=W(gn),"Spring duration must be 10 seconds or less");let o=1-e;o=Z(vr,xr,o),t=Z(yr,gn,G(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=ge(u,o),m=Math.exp(-h);return ee-f/d*m},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,m=Math.exp(-h),p=ge(Math.pow(u,2),o);return(-i(u)+ee>0?-1:1)*((f-d)*m)/p}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-ee+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=br(i,r,a);if(t=W(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Pr=12;function br(t,e,n){let s=n;for(let i=1;i<Pr;i++)s=s-t(s)/e(s);return s}function ge(t,e){return t*Math.sqrt(1-e*e)}const Sr=["duration","bounce"],Vr=["stiffness","damping","mass"];function yn(t,e){return e.some(n=>t[n]!==void 0)}function wr(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!yn(t,Vr)&&yn(t,Sr)){const n=Tr(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function Zs({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],r=t[t.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:f}=wr({...s,velocity:-G(s.velocity||0)}),d=h||0,m=l/(2*Math.sqrt(a*u)),p=r-i,y=G(Math.sqrt(a/u)),v=Math.abs(p)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let T;if(m<1){const g=ge(y,m);T=b=>{const V=Math.exp(-m*y*b);return r-V*((d+m*y*p)/g*Math.sin(g*b)+p*Math.cos(g*b))}}else if(m===1)T=g=>r-Math.exp(-y*g)*(p+(d+y*p)*g);else{const g=y*Math.sqrt(m*m-1);T=b=>{const V=Math.exp(-m*y*b),R=Math.min(g*b,300);return r-V*((d+m*y*p)*Math.sinh(R)+g*p*Math.cosh(R))/g}}return{calculatedDuration:f&&c||null,next:g=>{const b=T(g);if(f)o.done=g>=c;else{let V=d;g!==0&&(m<1?V=qs(T,g,b):V=0);const R=Math.abs(V)<=n,H=Math.abs(r-b)<=e;o.done=R&&H}return o.value=o.done?r:b,o}}}function vn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=S=>a!==void 0&&S<a||l!==void 0&&S>l,m=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let p=n*e;const y=h+p,v=o===void 0?y:o(y);v!==y&&(p=v-h);const T=S=>-p*Math.exp(-S/s),g=S=>v+T(S),b=S=>{const k=T(S),O=g(S);f.done=Math.abs(k)<=u,f.value=f.done?v:O};let V,R;const H=S=>{d(f.value)&&(V=S,R=Zs({keyframes:[f.value,m(f.value)],velocity:qs(g,S,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return H(0),{calculatedDuration:null,next:S=>{let k=!1;return!R&&V===void 0&&(k=!0,b(S),H(S)),V!==void 0&&S>=V?R.next(S-V):(!k&&b(S),f)}}}const Js=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ar=1e-7,Cr=12;function Dr(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Js(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Ar&&++a<Cr);return o}function Dt(t,e,n,s){if(t===e&&n===s)return M;const i=r=>Dr(r,0,1,t,n);return r=>r===0||r===1?r:Js(i(r),e,s)}const Mr=Dt(.42,0,1,1),Rr=Dt(0,0,.58,1),Qs=Dt(.42,0,.58,1),Er=t=>Array.isArray(t)&&typeof t[0]!="number",ti=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ei=t=>e=>1-t(1-e),$e=t=>1-Math.sin(Math.acos(t)),ni=ei($e),Lr=ti($e),si=Dt(.33,1.53,.69,.99),_e=ei(si),Fr=ti(_e),Br=t=>(t*=2)<1?.5*_e(t):.5*(2-Math.pow(2,-10*(t-1))),xn={linear:M,easeIn:Mr,easeInOut:Qs,easeOut:Rr,circIn:$e,circInOut:Lr,circOut:ni,backIn:_e,backInOut:Fr,backOut:si,anticipate:Br},Tn=t=>{if(Array.isArray(t)){exports.invariant(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,s,i]=t;return Dt(e,n,s,i)}else if(typeof t=="string")return exports.invariant(xn[t]!==void 0,`Invalid easing type '${t}'`),xn[t];return t},bt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},w=(t,e,n)=>t+(e-t)*n;function ne(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function kr({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ne(l,a,t+1/3),r=ne(l,a,t),o=ne(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}const se=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Or=[me,it,ut],jr=t=>Or.find(e=>e.test(t));function Pn(t){const e=jr(t);exports.invariant(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let n=e.parse(t);return e===ut&&(n=kr(n)),n}const bn=(t,e)=>{const n=Pn(t),s=Pn(e),i={...n};return r=>(i.red=se(n.red,s.red,r),i.green=se(n.green,s.green,r),i.blue=se(n.blue,s.blue,r),i.alpha=w(n.alpha,s.alpha,r),it.transform(i))};function ye(t,e){return n=>n>0?e:t}function Ir(t,e){return n=>w(t,e,n)}function We(t){return typeof t=="number"?Ir:typeof t=="string"?Re(t)?ye:E.test(t)?bn:Kr:Array.isArray(t)?ii:typeof t=="object"?E.test(t)?bn:Nr:ye}function ii(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>We(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Nr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=We(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function Ur(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[r]=l,i[o]++}return s}const Kr=(t,e)=>{const n=Q.createTransformer(e),s=jt(t),i=jt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?_(ii(Ur(s,i),i.values),n):(Ct(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ye(t,e))};function oi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?w(t,e,n):We(t)(t,e)}function $r(t,e,n){const s=[],i=n||oi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||M:e;a=_(l,a)}s.push(a)}return s}function _r(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(exports.invariant(r===e.length,"Both input and output ranges must be the same length"),r===1)return()=>e[0];if(r===2&&t[0]===t[1])return()=>e[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=$r(e,s,i),a=o.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const h=bt(t[c],t[c+1],u);return o[c](h)};return n?u=>l(Z(t[0],t[r-1],u)):l}function Wr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=bt(0,e,s);t.push(w(n,1,i))}}function Gr(t){const e=[0];return Wr(e,t.length-1),e}function Hr(t,e){return t.map(n=>n*e)}function zr(t,e){return t.map(()=>e||Qs).splice(0,t.length-1)}function It({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Er(s)?s.map(Tn):Tn(s),r={done:!1,value:e[0]},o=Hr(n&&n.length===e.length?n:Gr(e),t),a=_r(o,e,{ease:Array.isArray(i)?i:zr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Sn=2e4;function Yr(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Sn;)e+=n,s=t.next(e);return e>=Sn?1/0:e}const Xr=t=>{const e=({timestamp:n})=>t(n);return{start:()=>C.update(e,!0),stop:()=>J(e),now:()=>D.isProcessing?D.timestamp:q.now()}},qr={decay:vn,inertia:vn,tween:It,keyframes:It,spring:Zs},Zr=t=>t/100;class Ge extends Ys{constructor({KeyframeResolver:e=Ne,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle";const{name:s,motionValue:i,keyframes:r}=this.options,o=(a,l)=>this.onKeyframesResolved(a,l);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(r,o,s,i):this.resolver=new e(r,o,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=qr[n]||It;let l,u;a!==It&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&exports.invariant(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=_(Zr,oi(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});r==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Yr(c));const{calculatedDuration:h}=c,f=h+i,d=f*(s+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=s;if(this.startTime===null)return r.next(0);const{delay:f,repeat:d,repeatType:m,repeatDelay:p,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),T=this.speed>=0?v<0:v>c;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let g=this.currentTime,b=r;if(d){const S=Math.min(this.currentTime,c)/h;let k=Math.floor(S),O=S%1;!O&&S>=1&&(O=1),O===1&&k--,k=Math.min(k,d+1),!!(k%2)&&(m==="reverse"?(O=1-O,p&&(O-=p/h)):m==="mirror"&&(b=o)),g=Z(0,1,O)*h}const V=T?{done:!1,value:l[0]}:b.next(g);a&&(V.value=a(V.value));let{done:R}=V;!T&&u!==null&&(R=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return H&&i!==void 0&&(V.value=Yt(l,this.options,i)),y&&y(V.value),H&&this.finish(),V}get duration(){const{resolved:e}=this;return e?G(e.calculatedDuration):0}get time(){return G(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=G(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=Xr,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=s),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:e}=this.options;e&&e()}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const ri=t=>Array.isArray(t)&&typeof t[0]=="number";function ai(t){return!!(!t||typeof t=="string"&&li[t]||ri(t)||Array.isArray(t)&&t.every(ai))}const pt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,li={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:pt([0,.65,.55,1]),circOut:pt([.55,0,1,.45]),backIn:pt([.31,.01,.66,-.59]),backOut:pt([.33,1.53,.69,.99])};function ui(t){if(t)return ri(t)?pt(t):Array.isArray(t)?t.map(ui):li[t]}function Jr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=ui(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}const Qr=dr(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ta=new Set(["opacity","clipPath","filter","transform"]),Nt=10,ea=2e4;function na(t){return t.type==="spring"||t.name==="backgroundColor"||!ai(t.ease)}function sa(t,e){const n=new Ge({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<ea;)s=n.sample(r),i.push(s.value),r+=Nt;return{times:void 0,keyframes:i,duration:r-Nt,ease:"linear"}}class Vn extends Ys{constructor(e){super(e);const{name:n,motionValue:s,keyframes:i}=this.options;this.resolver=new zs(i,(r,o)=>this.onKeyframesResolved(r,o),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:r,ease:o,type:a,motionValue:l,name:u}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(na(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,...m}=this.options,p=sa(e,m);e=p.keyframes,e.length===1&&(e[1]=e[0]),i=p.duration,r=p.times,o=p.ease,a="keyframes"}const c=Jr(l.owner.current,u,e,{...this.options,duration:i,times:r,ease:o});return c.startTime=q.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:h}=this.options;l.set(Yt(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:r,type:a,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return G(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return G(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=W(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return M;const{animation:s}=n;s.timeline=e,s.onfinish=null}return M}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:r,ease:o,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:u,onComplete:c,...h}=this.options,f=new Ge({...h,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),d=W(this.time);l.setWithVelocity(f.sample(d-Nt).value,f.sample(d).value,Nt)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=e;return Qr()&&s&&ta.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const He=(t,e,n,s={},i,r)=>o=>{const a=Ie(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-W(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};$o(a)||(c={...c,...Ko(t,c)}),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!r&&e.get()!==void 0){const f=Yt(c.keyframes,a);if(f!==void 0){C.update(()=>{c.onUpdate(f),c.onComplete()});return}}return!r&&Vn.supports(c)?new Vn(c):new Ge(c)};function Ut(t){return!!(L(t)&&t.add)}function ze(t,e){t.indexOf(e)===-1&&t.push(e)}function Ye(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Xe{constructor(){this.subscriptions=[]}add(e){return ze(this.subscriptions,e),()=>Ye(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const wn=30,ia=t=>!isNaN(parseFloat(t));class oa{constructor(e,n={}){this.version="11.0.28",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=q.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.canTrackVelocity=ia(this.current),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=q.now()}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&X.warnOnce(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Xe);const s=this.events[e].add(n);return e==="change"?()=>{s(),C.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=q.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>wn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,wn);return Xs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function St(t,e){return new oa(t,e)}function ra(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,St(n))}function aa(t,e){const n=zt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=go(r[o]);ra(t,o,a)}}function la({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function ci(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;const u=t.getValue("willChange");s&&(o=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in l){const d=t.getValue(f,(r=t.latestValues[f])!==null&&r!==void 0?r:null),m=l[f];if(m===void 0||h&&la(h,f))continue;const p={delay:n,elapsed:0,...Ie(o||{},f)};let y=!1;if(window.HandoffAppearAnimations){const T=t.getProps()[hs];if(T){const g=window.HandoffAppearAnimations(T,f);g!==null&&(p.elapsed=g,y=!0)}}d.start(He(f,d,m,t.shouldReduceMotion&&rt.has(f)?{type:!1}:p,t,y));const v=d.animation;v&&(Ut(u)&&(u.add(f),v.then(()=>u.remove(f))),c.push(v))}return a&&Promise.all(c).then(()=>{C.update(()=>{a&&aa(t,a)})}),c}function ve(t,e,n={}){var s;const i=zt(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(ci(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=r;return ua(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function ua(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(ca).forEach((u,c)=>{u.notify("AnimationStart",e),o.push(ve(u,e,{...r,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function ca(t,e){return t.sortNodePosition(e)}function ha(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>ve(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=ve(t,e,n);else{const i=typeof e=="function"?zt(t,e,n.custom):e;s=Promise.all(ci(t,i,n))}return s.then(()=>{C.postRender(()=>{t.notify("AnimationComplete",e)})})}const fa=[...Ae].reverse(),da=Ae.length;function ma(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ha(t,n,s)))}function pa(t){let e=ma(t);const n=ya();let s=!0;const i=l=>(u,c)=>{var h;const f=zt(t,c,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function r(l){e=l(t)}function o(l){const u=t.getProps(),c=t.getVariantContext(!0)||{},h=[],f=new Set;let d={},m=1/0;for(let y=0;y<da;y++){const v=fa[y],T=n[v],g=u[v]!==void 0?u[v]:c[v],b=Tt(g),V=v===l?T.isActive:null;V===!1&&(m=y);let R=g===c[v]&&g!==u[v]&&b;if(R&&s&&t.manuallyAnimateOnMount&&(R=!1),T.protectedKeys={...d},!T.isActive&&V===null||!g&&!T.prevProp||Wt(g)||typeof g=="boolean")continue;let S=ga(T.prevProp,g)||v===l&&T.isActive&&!R&&b||y>m&&b,k=!1;const O=Array.isArray(g)?g:[g];let at=O.reduce(i(v),{});V===!1&&(at={});const{prevResolvedValues:qe={}}=T,Mi={...qe,...at},Ze=F=>{S=!0,f.has(F)&&(k=!0,f.delete(F)),T.needsAnimating[F]=!0;const U=t.getValue(F);U&&(U.liveStyle=!1)};for(const F in Mi){const U=at[F],Xt=qe[F];if(d.hasOwnProperty(F))continue;let qt=!1;ce(U)&&ce(Xt)?qt=!Fs(U,Xt):qt=U!==Xt,qt?U!=null?Ze(F):f.add(F):U!==void 0&&f.has(F)?Ze(F):T.protectedKeys[F]=!0}T.prevProp=g,T.prevResolvedValues=at,T.isActive&&(d={...d,...at}),s&&t.blockInitialAnimation&&(S=!1),S&&(!R||k)&&h.push(...O.map(F=>({animation:F,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const T=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=T===void 0?null:T}),h.push({animation:y})}let p=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(h):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n}}function ga(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Fs(e,t):!1}function et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ya(){return{animate:et(!0),whileInView:et(),whileHover:et(),whileTap:et(),whileDrag:et(),whileFocus:et(),exit:et()}}class va extends tt{constructor(e){super(e),e.animationState||(e.animationState=pa(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Wt(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let xa=0;class Ta extends tt{constructor(){super(...arguments),this.id=xa++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Pa={animation:{Feature:va},exit:{Feature:Ta}},An=(t,e)=>Math.abs(t-e);function ba(t,e){const n=An(t.x,e.x),s=An(t.y,e.y);return Math.sqrt(n**2+s**2)}class hi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=oe(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=ba(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:p}=D;this.history.push({...m,timestamp:p});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ie(f,this.transformPagePoint),C.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=oe(h.type==="pointercancel"?this.lastMoveEventInfo:ie(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),m&&m(h,y)},!Ds(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=Ht(e),a=ie(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=D;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,oe(a,this.history)),this.removeListeners=_($(this.contextWindow,"pointermove",this.handlePointerMove),$(this.contextWindow,"pointerup",this.handlePointerUp),$(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),J(this.updatePoint)}}function ie(t,e){return e?{point:e(t.point)}:t}function Cn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function oe({point:t},e){return{point:t,delta:Cn(t,fi(e)),offset:Cn(t,Sa(e)),velocity:Va(e,.1)}}function Sa(t){return t[0]}function fi(t){return t[t.length-1]}function Va(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=fi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};const r=G(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function B(t){return t.max-t.min}function xe(t,e=0,n=.01){return Math.abs(t-e)<=n}function Dn(t,e,n,s=.5){t.origin=s,t.originPoint=w(e.min,e.max,t.origin),t.scale=B(n)/B(e),(xe(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=w(n.min,n.max,t.origin)-t.originPoint,(xe(t.translate)||isNaN(t.translate))&&(t.translate=0)}function vt(t,e,n,s){Dn(t.x,e.x,n.x,s?s.originX:void 0),Dn(t.y,e.y,n.y,s?s.originY:void 0)}function Mn(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function wa(t,e,n){Mn(t.x,e.x,n.x),Mn(t.y,e.y,n.y)}function Rn(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function xt(t,e,n){Rn(t.x,e.x,n.x),Rn(t.y,e.y,n.y)}function Aa(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?w(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?w(n,t,s.max):Math.min(t,n)),t}function En(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Ca(t,{top:e,left:n,bottom:s,right:i}){return{x:En(t.x,n,i),y:En(t.y,e,s)}}function Ln(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Da(t,e){return{x:Ln(t.x,e.x),y:Ln(t.y,e.y)}}function Ma(t,e){let n=.5;const s=B(t),i=B(e);return i>s?n=bt(e.min,e.max-s,t.min):s>i&&(n=bt(t.min,t.max-i,e.min)),Z(0,1,n)}function Ra(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Te=.35;function Ea(t=Te){return t===!1?t=0:t===!0&&(t=Te),{x:Fn(t,"left","right"),y:Fn(t,"top","bottom")}}function Fn(t,e,n){return{min:Bn(t,e),max:Bn(t,n)}}function Bn(t,e){return typeof t=="number"?t:t[e]||0}const kn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ct=()=>({x:kn(),y:kn()}),On=()=>({min:0,max:0}),A=()=>({x:On(),y:On()});function I(t){return[t("x"),t("y")]}function di({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function La({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Fa(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function re(t){return t===void 0||t===1}function Pe({scale:t,scaleX:e,scaleY:n}){return!re(t)||!re(e)||!re(n)}function nt(t){return Pe(t)||mi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function mi(t){return jn(t.x)||jn(t.y)}function jn(t){return t&&t!=="0%"}function Kt(t,e,n){const s=t-n,i=e*s;return n+i}function In(t,e,n,s,i){return i!==void 0&&(t=Kt(t,i,s)),Kt(t,n,s)+e}function be(t,e=0,n=1,s,i){t.min=In(t.min,e,n,s,i),t.max=In(t.max,e,n,s,i)}function pi(t,{x:e,y:n}){be(t.x,e.translate,e.scale,e.originPoint),be(t.y,n.translate,n.scale,n.originPoint)}function Ba(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const l=r.instance;l&&l.style&&l.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ht(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,pi(t,o)),s&&nt(r.latestValues)&&ht(t,r.latestValues))}e.x=Nn(e.x),e.y=Nn(e.y)}function Nn(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Y(t,e){t.min=t.min+e,t.max=t.max+e}function Un(t,e,[n,s,i]){const r=e[i]!==void 0?e[i]:.5,o=w(t.min,t.max,r);be(t,e[n],e[s],o,e.scale)}const ka=["x","scaleX","originX"],Oa=["y","scaleY","originY"];function ht(t,e){Un(t.x,e,ka),Un(t.y,e,Oa)}function gi(t,e){return di(Fa(t.getBoundingClientRect(),e))}function ja(t,e,n){const s=gi(t,n),{scroll:i}=e;return i&&(Y(s.x,i.offset.x),Y(s.y,i.offset.y)),s}const yi=({current:t})=>t?t.ownerDocument.defaultView:null,Ia=new WeakMap;class Na{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=A(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ht(c,"page").point)},r=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Rs(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),I(y=>{let v=this.getAxisMotionValue(y).get()||0;if(N.test(v)){const{projection:T}=this.visualElement;if(T&&T.layout){const g=T.layout.layoutBox[y];g&&(v=B(g)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&m(c,h);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},o=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Ua(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),p&&p(c,h)},a=(c,h)=>this.stop(c,h),l=()=>I(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new hi(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:yi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&r(e,n)}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Et(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Aa(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,r=this.constraints;n&&lt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Ca(i.layoutBox,n):this.constraints=!1,this.elastic=Ea(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&I(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Ra(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lt(e))return!1;const s=e.current;exports.invariant(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ja(s,i.root,this.visualElement.getTransformPagePoint());let o=Da(i.layout.layoutBox,r);if(n){const a=n(La(o));this.hasMutatedConstraints=!!a,a&&(o=di(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=I(c=>{if(!Et(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(He(e,s,0,n,this.visualElement))}stopAnimation(){I(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){I(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){I(n=>{const{drag:s}=this.getProps();if(!Et(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-w(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!lt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};I(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();i[o]=Ma({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),I(o=>{if(!Et(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(w(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;Ia.set(this.visualElement,this);const e=this.visualElement.current,n=$(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();lt(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const o=K(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(I(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Te,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Et(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ua(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ka extends tt{constructor(e){super(e),this.removeGroupControls=M,this.removeListeners=M,this.controls=new Na(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||M}unmount(){this.removeGroupControls(),this.removeListeners()}}const Kn=t=>(e,n)=>{t&&t(e,n)};class $a extends tt{constructor(){super(...arguments),this.removePointerDownListener=M}onPointerDown(e){this.session=new hi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Kn(e),onStart:Kn(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&i(r,o)}}}mount(){this.removePointerDownListener=$(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function _a(){const t=P.useContext(_t);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const Bt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $n(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const mt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=$n(t,e.target.x),s=$n(t,e.target.y);return`${n}% ${s}%`}},Wa={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Q.parse(t);if(i.length>5)return s;const r=Q.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=w(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}};class Ga extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;Gi(Ha),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Bt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||C.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),we.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function vi(t){const[e,n]=_a(),s=P.useContext(De);return P.createElement(Ga,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(ms),isPresent:e,safeToRemove:n})}const Ha={borderRadius:{...mt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:mt,borderTopRightRadius:mt,borderBottomLeftRadius:mt,borderBottomRightRadius:mt,boxShadow:Wa},xi=["TopLeft","TopRight","BottomLeft","BottomRight"],za=xi.length,_n=t=>typeof t=="string"?parseFloat(t):t,Wn=t=>typeof t=="number"||x.test(t);function Ya(t,e,n,s,i,r){i?(t.opacity=w(0,n.opacity!==void 0?n.opacity:1,Xa(s)),t.opacityExit=w(e.opacity!==void 0?e.opacity:1,0,qa(s))):r&&(t.opacity=w(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<za;o++){const a=`border${xi[o]}Radius`;let l=Gn(e,a),u=Gn(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Wn(l)===Wn(u)?(t[a]=Math.max(w(_n(l),_n(u),s),0),(N.test(u)||N.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=w(e.rotate||0,n.rotate||0,s))}function Gn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Xa=Ti(0,.5,ni),qa=Ti(.5,.95,M);function Ti(t,e,n){return s=>s<t?0:s>e?1:n(bt(t,e,s))}function Hn(t,e){t.min=e.min,t.max=e.max}function j(t,e){Hn(t.x,e.x),Hn(t.y,e.y)}function zn(t,e,n,s,i){return t-=e,t=Kt(t,1/n,s),i!==void 0&&(t=Kt(t,1/i,s)),t}function Za(t,e=0,n=1,s=.5,i,r=t,o=t){if(N.test(e)&&(e=parseFloat(e),e=w(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=w(r.min,r.max,s);t===r&&(a-=e),t.min=zn(t.min,e,n,a,i),t.max=zn(t.max,e,n,a,i)}function Yn(t,e,[n,s,i],r,o){Za(t,e[n],e[s],e[i],e.scale,r,o)}const Ja=["x","scaleX","originX"],Qa=["y","scaleY","originY"];function Xn(t,e,n,s){Yn(t.x,e,Ja,n?n.x:void 0,s?s.x:void 0),Yn(t.y,e,Qa,n?n.y:void 0,s?s.y:void 0)}function qn(t){return t.translate===0&&t.scale===1}function Pi(t){return qn(t.x)&&qn(t.y)}function tl(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function bi(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Zn(t){return B(t.x)/B(t.y)}class el{constructor(){this.members=[]}add(e){ze(this.members,e),e.scheduleRender()}remove(e){if(Ye(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Jn(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const nl=(t,e)=>t.depth-e.depth;class sl{constructor(){this.children=[],this.isDirty=!1}add(e){ze(this.children,e),this.isDirty=!0}remove(e){Ye(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(nl),this.isDirty=!1,this.children.forEach(e)}}function il(t,e){const n=q.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(J(s),t(r-e))};return C.read(s,!0),()=>J(s)}function ol(t){window.MotionDebug&&window.MotionDebug.record(t)}function rl(t){return t instanceof SVGElement&&t.tagName!=="svg"}function al(t,e,n){const s=L(t)?t:St(t);return s.start(He("",s,e,n)),s.animation}const ae=["","X","Y","Z"],ll={visibility:"hidden"},Qn=1e3;let ul=0;const st={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function le(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Si({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=ul++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,st.totalNodes=st.resolvedTargetDeltas=st.recalculatedProjection=0,this.nodes.forEach(fl),this.nodes.forEach(yl),this.nodes.forEach(vl),this.nodes.forEach(dl),ol(st)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new sl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Xe),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=rl(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=il(f,250),Bt.hasAnimatedSinceResize&&(Bt.hasAnimatedSinceResize=!1,this.nodes.forEach(es))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||Sl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=c.getProps(),T=!this.targetLayout||!bi(this.targetLayout,m)||d,g=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const b={...Ie(p,"layout"),onPlay:y,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||es(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,J(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(xl),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ts);return}this.isUpdating||this.nodes.forEach(pl),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(gl),this.nodes.forEach(cl),this.nodes.forEach(hl),this.clearAllSnapshots();const a=q.now();D.delta=Z(0,1e3/60,a-D.timestamp),D.timestamp=a,D.isProcessing=!0,Zt.update.process(D),Zt.preRender.process(D),Zt.render.process(D),D.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,we.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(ml),this.sharedNodes.forEach(Tl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=A(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:o,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!Pi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||nt(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Vl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return A();const a=o.measureViewportBox(),{scroll:l}=this.root;return l&&(Y(a.x,l.offset.x),Y(a.y,l.offset.y)),a}removeElementScroll(o){const a=A();j(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;if(u!==this.root&&c&&h.layoutScroll){if(c.isRoot){j(a,o);const{scroll:f}=this.root;f&&(Y(a.x,-f.offset.x),Y(a.y,-f.offset.y))}Y(a.x,c.offset.x),Y(a.y,c.offset.y)}}return a}applyTransform(o,a=!1){const l=A();j(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ht(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),nt(c.latestValues)&&ht(l,c.latestValues)}return nt(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(o){const a=A();j(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!nt(u.latestValues))continue;Pe(u.latestValues)&&u.updateSnapshot();const c=A(),h=u.measurePageBox();j(c,h),Xn(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return nt(this.latestValues)&&Xn(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==D.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=D.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=A(),this.relativeTargetOrigin=A(),xt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),j(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=A(),this.targetWithTransforms=A()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),wa(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):j(this.target,this.layout.layoutBox),pi(this.target,this.targetDelta)):j(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=A(),this.relativeTargetOrigin=A(),xt(this.relativeTargetOrigin,this.target,d.target),j(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}st.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Pe(this.parent.latestValues)||mi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===D.timestamp&&(u=!1),u)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;j(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Ba(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=A());const{target:m}=a;if(!m){this.projectionTransform&&(this.projectionDelta=ct(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=ct(),this.projectionDeltaWithTransform=ct());const p=this.projectionTransform;vt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=Jn(this.projectionDelta,this.treeScale),(this.projectionTransform!==p||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),st.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=A(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,y=this.getStack(),v=!y||y.members.length<=1,T=!!(p&&!v&&this.options.crossfade===!0&&!this.path.some(bl));this.animationProgress=0;let g;this.mixTargetDelta=b=>{const V=b/1e3;ns(h.x,o.x,V),ns(h.y,o.y,V),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(xt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Pl(this.relativeTarget,this.relativeTargetOrigin,f,V),g&&tl(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=A()),j(g,this.relativeTarget)),p&&(this.animationValues=c,Ya(c,u,this.latestValues,V,T,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(J(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{Bt.hasAnimatedSinceResize=!0,this.currentAnimation=al(0,Qn,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Qn),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Vi(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||A();const h=B(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=B(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}j(a,l),ht(a,c),vt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new el),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&le("z",o,u,this.animationValues);for(let c=0;c<ae.length;c++)le(`rotate${ae[c]}`,o,u,this.animationValues),le(`skew${ae[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return ll;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Lt(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Lt(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(p.transform=c?c({},""):"none",this.hasProjected=!1),p}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=Jn(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:m}=this.projectionDelta;u.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,h.animationValues?u.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const p in kt){if(f[p]===void 0)continue;const{correct:y,applyTo:v}=kt[p],T=u.transform==="none"?f[p]:y(f[p],h);if(v){const g=v.length;for(let b=0;b<g;b++)u[v[b]]=T}else u[p]=T}return this.options.layoutId&&(u.pointerEvents=h===this?Lt(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(ts),this.root.sharedNodes.clear()}}}function cl(t){t.updateLayout()}function hl(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?I(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=B(f);f.min=s[h].min,f.max=f.min+d}):Vi(r,n.layoutBox,s)&&I(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=B(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ct();vt(a,s,n.layoutBox);const l=ct();o?vt(l,t.applyTransform(i,!0),n.measuredBox):vt(l,s,n.layoutBox);const u=!Pi(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=A();xt(m,n.layoutBox,f.layoutBox);const p=A();xt(p,s,d.layoutBox),bi(m,p)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function fl(t){st.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function dl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ml(t){t.clearSnapshot()}function ts(t){t.clearMeasurements()}function pl(t){t.isLayoutDirty=!1}function gl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function es(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function yl(t){t.resolveTargetDelta()}function vl(t){t.calcProjection()}function xl(t){t.resetSkewAndRotation()}function Tl(t){t.removeLeadSnapshot()}function ns(t,e,n){t.translate=w(e.translate,0,n),t.scale=w(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ss(t,e,n,s){t.min=w(e.min,n.min,s),t.max=w(e.max,n.max,s)}function Pl(t,e,n,s){ss(t.x,e.x,n.x,s),ss(t.y,e.y,n.y,s)}function bl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Sl={duration:.45,ease:[.4,0,.1,1]},is=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),os=is("applewebkit/")&&!is("chrome/")?Math.round:M;function rs(t){t.min=os(t.min),t.max=os(t.max)}function Vl(t){rs(t.x),rs(t.y)}function Vi(t,e,n){return t==="position"||t==="preserve-aspect"&&!xe(Zn(e),Zn(n),.2)}const wl=Si({attachResizeListener:(t,e)=>K(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ue={current:void 0},wi=Si({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ue.current){const t=new wl({});t.mount(window),t.setOptions({layoutScroll:!0}),ue.current=t}return ue.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Al={pan:{Feature:$a},drag:{Feature:Ka,ProjectionNode:wi,MeasureLayout:vi}};function Cl(t,e,n){const{willChange:s}=e;for(const i in e){const r=e[i],o=n[i];if(L(r))t.addValue(i,r),Ut(s)&&s.add(i),process.env.NODE_ENV==="development"&&X.warnOnce(r.version==="11.0.28",`Attempting to mix Framer Motion versions ${r.version} with 11.0.28 may not work as expected.`);else if(L(o))t.addValue(i,St(r,{owner:t})),Ut(s)&&s.remove(i);else if(o!==r)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=t.getStaticValue(i);t.addValue(i,St(a!==void 0?a:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const as=new WeakMap,Dl=[...Is,E,Q],Ml=t=>Dl.find(js(t)),Ai=Object.keys(Pt),Rl=Ai.length,ls=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],El=Ce.length;function Ci(t){if(t)return t.options.allowProjection!==!1?t.projection:Ci(t.parent)}class Ll{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.resolveKeyframes=(f,d,m,p)=>new this.KeyframeResolver(f,d,m,p,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ne,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>C.render(this.render,!1,!0);const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=Gt(n),this.isVariantNode=ds(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&L(d)&&(d.set(l[f],!1),Ut(c)&&c.add(f))}}scrapeMotionValuesFromProps(e,n,s){return{}}mount(e){this.current=e,as.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),X.hasReducedMotionListener.current||X.initPrefersReducedMotion(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:X.prefersReducedMotion.current,process.env.NODE_ENV!=="production"&&X.warnOnce(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){as.delete(this.current),this.projection&&this.projection.unmount(),J(this.notifyUpdate),J(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=rt.has(e),i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&C.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,r){let o,a;if(process.env.NODE_ENV!=="production"&&i&&s){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?Ct(!1,l):exports.invariant(!1,l)}for(let l=0;l<Rl;l++){const u=Ai[l],{isEnabled:c,Feature:h,ProjectionNode:f,MeasureLayout:d}=Pt[u];f&&(o=f),c(n)&&(!this.features[u]&&h&&(this.features[u]=new h(this)),d&&(a=d))}if((this.type==="html"||this.type==="svg")&&!this.projection&&o){this.projection=new o(this.latestValues,Ci(this.parent));const{layoutId:l,layout:u,drag:c,dragConstraints:h,layoutScroll:f,layoutRoot:d}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||h&&lt(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:r,layoutScroll:f,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):A()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ls.length;s++){const i=ls[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r=e["on"+i];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Cl(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<El;s++){const i=Ce[s],r=this.props[i];(Tt(r)||r===!1)&&(n[i]=r)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=St(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(ks(i)||Bs(i))?i=parseFloat(i):!Ml(i)&&Q.test(n)&&(i=Hs(e,n)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n,s;const{initial:i}=this.props,r=typeof i=="string"||typeof i=="object"?(s=je(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom))===null||s===void 0?void 0:s[e]:void 0;if(i&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!L(o)?o:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Xe),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Di extends Ll{constructor(){super(...arguments),this.KeyframeResolver=zs}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function Fl(t){return window.getComputedStyle(t)}class Bl extends Di{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(rt.has(n)){const s=Ke(n);return s&&s.default||0}else{const s=Fl(e),i=(ys(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return gi(e,n)}build(e,n,s,i){Le(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Oe(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){bs(e,n,s,i)}}class kl extends Di{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(rt.has(n)){const s=Ke(n);return s&&s.default||0}return n=Ss.has(n)?n:Ve(n),e.getAttribute(n)}measureInstanceViewportBox(){return A()}scrapeMotionValuesFromProps(e,n,s){return ws(e,n,s)}build(e,n,s,i){Be(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Vs(e,n,s,i)}mount(e){this.isSVGTag=ke(e.tagName),super.mount(e)}}const Ol=(t,e)=>Me(t)?new kl(e,{enableHardwareAcceleration:!1}):new Bl(e,{allowProjection:t!==P.Fragment,enableHardwareAcceleration:!0}),jl={layout:{ProjectionNode:wi,MeasureLayout:vi}},Il={...Pa,...Bo,...Al,...jl},Nl=_i((t,e)=>Po(t,e,Il,Ol));exports.LayoutGroupContext=De;exports.MotionConfigContext=Se;exports.PresenceContext=_t;exports.frame=C;exports.motion=Nl;exports.useConstant=As;exports.useIsomorphicLayoutEffect=us;
2
+ //# sourceMappingURL=motion-f7215751.cjs.map