mainstack-design-system 1.9.3 → 1.11.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 (594) hide show
  1. package/dist/{DayPickerExtended-DPYl2tUU.js → DayPickerExtended-C4tJiQVi.js} +3 -3
  2. package/dist/{DayPickerExtended-CHWYr922.cjs → DayPickerExtended-Co8gBZ5d.cjs} +1 -1
  3. package/dist/assets/styles.css +1 -1
  4. package/dist/assets/theme/tokenTheme.css +18 -0
  5. package/dist/{format-QHX11ZBv.js → format-DFTAxHWl.js} +1 -1
  6. package/dist/{format-ujjsp00N.cjs → format-DszcydN9.cjs} +1 -1
  7. package/dist/index-6WEiHZQh.js +194 -0
  8. package/dist/{index-C-QbrvHb.cjs → index-B2stzA9r.cjs} +1 -1
  9. package/dist/index-Bpm2I_hv.cjs +20 -0
  10. package/dist/{index-DgoIvfC-.js → index-TvlNIcEt.js} +1 -1
  11. package/dist/index.d.ts +33 -0
  12. package/dist/mainstack-design-system.cjs +1 -1
  13. package/dist/mainstack-design-system.js +447 -437
  14. package/dist/mainstack-design-system16.cjs +1 -1
  15. package/dist/mainstack-design-system16.js +1 -1
  16. package/dist/mainstack-design-system17.cjs +1 -1
  17. package/dist/mainstack-design-system17.js +1 -1
  18. package/dist/mainstack-design-system18.cjs +1 -1
  19. package/dist/mainstack-design-system18.js +8 -7
  20. package/dist/mainstack-design-system19.cjs +1 -1
  21. package/dist/mainstack-design-system19.js +14 -13
  22. package/dist/mainstack-design-system2.cjs +1 -1
  23. package/dist/mainstack-design-system2.js +1 -1
  24. package/dist/mainstack-design-system20.cjs +1 -1
  25. package/dist/mainstack-design-system20.js +13 -12
  26. package/dist/mainstack-design-system21.cjs +1 -1
  27. package/dist/mainstack-design-system21.js +5 -5
  28. package/dist/mainstack-design-system22.cjs +1 -1
  29. package/dist/mainstack-design-system22.js +1 -1
  30. package/dist/mainstack-design-system23.cjs +1 -1
  31. package/dist/mainstack-design-system23.js +1 -1
  32. package/dist/mainstack-design-system24.cjs +1 -1
  33. package/dist/mainstack-design-system24.js +3 -3
  34. package/dist/mainstack-design-system27.cjs +1 -1
  35. package/dist/mainstack-design-system27.js +1 -1
  36. package/dist/mainstack-design-system28.cjs +1 -1
  37. package/dist/mainstack-design-system28.js +11 -10
  38. package/dist/mainstack-design-system29.cjs +1 -1
  39. package/dist/mainstack-design-system29.js +1 -1
  40. package/dist/mainstack-design-system30.cjs +1 -1
  41. package/dist/mainstack-design-system30.js +5 -5
  42. package/dist/mainstack-design-system31.cjs +1 -1
  43. package/dist/mainstack-design-system31.js +1 -1
  44. package/dist/mainstack-design-system32.cjs +1 -1
  45. package/dist/mainstack-design-system32.js +1 -1
  46. package/dist/mainstack-design-system33.cjs +1 -1
  47. package/dist/mainstack-design-system33.js +11 -10
  48. package/dist/mainstack-design-system34.cjs +1 -1
  49. package/dist/mainstack-design-system34.js +3 -3
  50. package/dist/mainstack-design-system357.cjs +1 -1
  51. package/dist/mainstack-design-system357.js +1 -1
  52. package/dist/mainstack-design-system358.cjs +1 -1
  53. package/dist/mainstack-design-system358.js +2 -2
  54. package/dist/mainstack-design-system359.cjs +1 -1
  55. package/dist/mainstack-design-system359.js +3 -3
  56. package/dist/mainstack-design-system36.cjs +1 -1
  57. package/dist/mainstack-design-system36.js +13 -10
  58. package/dist/mainstack-design-system360.cjs +1 -1
  59. package/dist/mainstack-design-system360.js +4 -4
  60. package/dist/mainstack-design-system361.cjs +1 -1
  61. package/dist/mainstack-design-system361.js +9 -9
  62. package/dist/mainstack-design-system362.cjs +1 -1
  63. package/dist/mainstack-design-system362.js +9 -9
  64. package/dist/mainstack-design-system363.cjs +1 -1
  65. package/dist/mainstack-design-system363.js +1 -1
  66. package/dist/mainstack-design-system364.cjs +1 -1
  67. package/dist/mainstack-design-system364.js +1 -1
  68. package/dist/mainstack-design-system365.cjs +1 -1
  69. package/dist/mainstack-design-system365.js +6 -6
  70. package/dist/mainstack-design-system366.cjs +1 -1
  71. package/dist/mainstack-design-system366.js +5 -5
  72. package/dist/mainstack-design-system367.cjs +1 -1
  73. package/dist/mainstack-design-system367.js +9 -9
  74. package/dist/mainstack-design-system368.cjs +1 -1
  75. package/dist/mainstack-design-system368.js +4 -4
  76. package/dist/mainstack-design-system369.cjs +1 -1
  77. package/dist/mainstack-design-system369.js +5 -5
  78. package/dist/mainstack-design-system37.cjs +1 -1
  79. package/dist/mainstack-design-system37.js +3 -3
  80. package/dist/mainstack-design-system370.cjs +1 -1
  81. package/dist/mainstack-design-system370.js +3 -3
  82. package/dist/mainstack-design-system371.cjs +1 -1
  83. package/dist/mainstack-design-system371.js +18 -18
  84. package/dist/mainstack-design-system372.cjs +1 -1
  85. package/dist/mainstack-design-system372.js +7 -7
  86. package/dist/mainstack-design-system373.cjs +1 -1
  87. package/dist/mainstack-design-system373.js +7 -7
  88. package/dist/mainstack-design-system374.cjs +1 -1
  89. package/dist/mainstack-design-system374.js +7 -7
  90. package/dist/mainstack-design-system375.cjs +1 -1
  91. package/dist/mainstack-design-system375.js +5 -5
  92. package/dist/mainstack-design-system376.cjs +1 -1
  93. package/dist/mainstack-design-system376.js +5 -5
  94. package/dist/mainstack-design-system377.cjs +1 -1
  95. package/dist/mainstack-design-system377.js +6 -6
  96. package/dist/mainstack-design-system378.cjs +1 -1
  97. package/dist/mainstack-design-system378.js +12 -12
  98. package/dist/mainstack-design-system379.cjs +1 -1
  99. package/dist/mainstack-design-system379.js +1 -1
  100. package/dist/mainstack-design-system38.cjs +1 -1
  101. package/dist/mainstack-design-system38.js +8 -8
  102. package/dist/mainstack-design-system380.cjs +1 -1
  103. package/dist/mainstack-design-system380.js +1 -1
  104. package/dist/mainstack-design-system381.cjs +1 -1
  105. package/dist/mainstack-design-system381.js +1 -1
  106. package/dist/mainstack-design-system382.cjs +1 -1
  107. package/dist/mainstack-design-system382.js +5 -5
  108. package/dist/mainstack-design-system383.cjs +1 -1
  109. package/dist/mainstack-design-system383.js +10 -10
  110. package/dist/mainstack-design-system384.cjs +1 -1
  111. package/dist/mainstack-design-system384.js +5 -5
  112. package/dist/mainstack-design-system385.cjs +1 -1
  113. package/dist/mainstack-design-system385.js +9 -9
  114. package/dist/mainstack-design-system386.cjs +1 -1
  115. package/dist/mainstack-design-system386.js +11 -27
  116. package/dist/mainstack-design-system387.cjs +1 -1
  117. package/dist/mainstack-design-system387.js +26 -15
  118. package/dist/mainstack-design-system388.cjs +1 -1
  119. package/dist/mainstack-design-system388.js +16 -21
  120. package/dist/mainstack-design-system389.cjs +1 -1
  121. package/dist/mainstack-design-system389.js +15 -14
  122. package/dist/mainstack-design-system39.cjs +1 -1
  123. package/dist/mainstack-design-system39.js +7 -7
  124. package/dist/mainstack-design-system390.cjs +1 -1
  125. package/dist/mainstack-design-system390.js +19 -68
  126. package/dist/mainstack-design-system391.cjs +1 -1
  127. package/dist/mainstack-design-system391.js +71 -7
  128. package/dist/mainstack-design-system392.cjs +1 -87
  129. package/dist/mainstack-design-system392.js +18 -236
  130. package/dist/mainstack-design-system393.cjs +1 -1
  131. package/dist/mainstack-design-system393.js +11 -20
  132. package/dist/mainstack-design-system394.cjs +87 -1
  133. package/dist/mainstack-design-system394.js +238 -5
  134. package/dist/mainstack-design-system395.cjs +1 -2
  135. package/dist/mainstack-design-system395.js +20 -32
  136. package/dist/mainstack-design-system396.cjs +1 -2
  137. package/dist/mainstack-design-system396.js +5 -24
  138. package/dist/mainstack-design-system397.cjs +2 -1
  139. package/dist/mainstack-design-system397.js +32 -7
  140. package/dist/mainstack-design-system398.cjs +2 -1
  141. package/dist/mainstack-design-system398.js +24 -32
  142. package/dist/mainstack-design-system399.cjs +1 -1
  143. package/dist/mainstack-design-system399.js +6 -6
  144. package/dist/mainstack-design-system40.cjs +1 -1
  145. package/dist/mainstack-design-system40.js +6 -6
  146. package/dist/mainstack-design-system400.cjs +1 -1
  147. package/dist/mainstack-design-system400.js +29 -16
  148. package/dist/mainstack-design-system401.cjs +1 -1
  149. package/dist/mainstack-design-system401.js +7 -16
  150. package/dist/mainstack-design-system402.cjs +1 -1
  151. package/dist/mainstack-design-system402.js +12 -12
  152. package/dist/mainstack-design-system403.cjs +1 -1
  153. package/dist/mainstack-design-system403.js +14 -24
  154. package/dist/mainstack-design-system404.cjs +1 -1
  155. package/dist/mainstack-design-system404.js +15 -14
  156. package/dist/mainstack-design-system405.cjs +1 -1
  157. package/dist/mainstack-design-system405.js +26 -20
  158. package/dist/mainstack-design-system406.cjs +1 -1
  159. package/dist/mainstack-design-system406.js +13 -19
  160. package/dist/mainstack-design-system407.cjs +1 -1
  161. package/dist/mainstack-design-system407.js +15 -15
  162. package/dist/mainstack-design-system408.cjs +1 -1
  163. package/dist/mainstack-design-system408.js +18 -29
  164. package/dist/mainstack-design-system409.cjs +1 -1
  165. package/dist/mainstack-design-system409.js +14 -12
  166. package/dist/mainstack-design-system41.cjs +1 -1
  167. package/dist/mainstack-design-system41.js +5 -5
  168. package/dist/mainstack-design-system410.cjs +1 -1
  169. package/dist/mainstack-design-system410.js +35 -17
  170. package/dist/mainstack-design-system411.cjs +1 -1
  171. package/dist/mainstack-design-system411.js +14 -13
  172. package/dist/mainstack-design-system412.cjs +1 -1
  173. package/dist/mainstack-design-system412.js +17 -20
  174. package/dist/mainstack-design-system413.cjs +1 -1
  175. package/dist/mainstack-design-system413.js +18 -15
  176. package/dist/mainstack-design-system414.cjs +1 -1
  177. package/dist/mainstack-design-system414.js +16 -12
  178. package/dist/mainstack-design-system415.cjs +1 -1
  179. package/dist/mainstack-design-system415.js +14 -15
  180. package/dist/mainstack-design-system416.cjs +1 -1
  181. package/dist/mainstack-design-system416.js +11 -10
  182. package/dist/mainstack-design-system417.cjs +1 -1
  183. package/dist/mainstack-design-system417.js +12 -24
  184. package/dist/mainstack-design-system418.cjs +1 -1
  185. package/dist/mainstack-design-system418.js +10 -15
  186. package/dist/mainstack-design-system419.cjs +1 -1
  187. package/dist/mainstack-design-system419.js +22 -14
  188. package/dist/mainstack-design-system42.cjs +1 -1
  189. package/dist/mainstack-design-system42.js +6 -6
  190. package/dist/mainstack-design-system420.cjs +1 -1
  191. package/dist/mainstack-design-system420.js +20 -18
  192. package/dist/mainstack-design-system421.cjs +1 -1
  193. package/dist/mainstack-design-system421.js +19 -68
  194. package/dist/mainstack-design-system422.cjs +1 -1
  195. package/dist/mainstack-design-system422.js +18 -21
  196. package/dist/mainstack-design-system423.cjs +1 -1
  197. package/dist/mainstack-design-system423.js +68 -20
  198. package/dist/mainstack-design-system424.cjs +1 -1
  199. package/dist/mainstack-design-system424.js +16 -16
  200. package/dist/mainstack-design-system425.cjs +1 -1
  201. package/dist/mainstack-design-system425.js +21 -14
  202. package/dist/mainstack-design-system426.cjs +1 -1
  203. package/dist/mainstack-design-system426.js +20 -37
  204. package/dist/mainstack-design-system427.cjs +1 -1
  205. package/dist/mainstack-design-system427.js +14 -30
  206. package/dist/mainstack-design-system428.cjs +1 -1
  207. package/dist/mainstack-design-system428.js +37 -14
  208. package/dist/mainstack-design-system429.cjs +1 -1
  209. package/dist/mainstack-design-system429.js +26 -12
  210. package/dist/mainstack-design-system43.cjs +1 -1
  211. package/dist/mainstack-design-system43.js +9 -9
  212. package/dist/mainstack-design-system430.cjs +1 -1
  213. package/dist/mainstack-design-system430.js +14 -20
  214. package/dist/mainstack-design-system431.cjs +1 -1
  215. package/dist/mainstack-design-system431.js +13 -12
  216. package/dist/mainstack-design-system432.cjs +1 -1
  217. package/dist/mainstack-design-system432.js +14 -14
  218. package/dist/mainstack-design-system433.cjs +1 -1
  219. package/dist/mainstack-design-system433.js +14 -14
  220. package/dist/mainstack-design-system434.cjs +1 -1
  221. package/dist/mainstack-design-system434.js +20 -14
  222. package/dist/mainstack-design-system435.cjs +1 -1
  223. package/dist/mainstack-design-system435.js +14 -7
  224. package/dist/mainstack-design-system436.cjs +1 -1
  225. package/dist/mainstack-design-system436.js +11 -18
  226. package/dist/mainstack-design-system437.cjs +1 -1
  227. package/dist/mainstack-design-system437.js +7 -28
  228. package/dist/mainstack-design-system438.cjs +1 -2
  229. package/dist/mainstack-design-system438.js +18 -46
  230. package/dist/mainstack-design-system439.cjs +1 -2
  231. package/dist/mainstack-design-system439.js +28 -26
  232. package/dist/mainstack-design-system440.cjs +1 -1
  233. package/dist/mainstack-design-system440.js +48 -32
  234. package/dist/mainstack-design-system441.cjs +1 -1
  235. package/dist/mainstack-design-system441.js +20 -14
  236. package/dist/mainstack-design-system442.cjs +1 -1
  237. package/dist/mainstack-design-system442.js +28 -42
  238. package/dist/mainstack-design-system443.cjs +1 -1
  239. package/dist/mainstack-design-system443.js +10 -11
  240. package/dist/mainstack-design-system444.cjs +1 -1
  241. package/dist/mainstack-design-system444.js +42 -35
  242. package/dist/mainstack-design-system445.cjs +1 -1
  243. package/dist/mainstack-design-system445.js +16 -37
  244. package/dist/mainstack-design-system446.cjs +1 -1
  245. package/dist/mainstack-design-system446.js +38 -47
  246. package/dist/mainstack-design-system447.cjs +1 -1
  247. package/dist/mainstack-design-system447.js +37 -37
  248. package/dist/mainstack-design-system448.cjs +1 -1
  249. package/dist/mainstack-design-system448.js +48 -25
  250. package/dist/mainstack-design-system449.cjs +1 -1
  251. package/dist/mainstack-design-system449.js +37 -28
  252. package/dist/mainstack-design-system450.cjs +1 -1
  253. package/dist/mainstack-design-system450.js +20 -14
  254. package/dist/mainstack-design-system451.cjs +1 -1
  255. package/dist/mainstack-design-system451.js +28 -41
  256. package/dist/mainstack-design-system452.cjs +1 -1
  257. package/dist/mainstack-design-system452.js +13 -14
  258. package/dist/mainstack-design-system453.cjs +1 -1
  259. package/dist/mainstack-design-system453.js +41 -35
  260. package/dist/mainstack-design-system454.cjs +1 -1
  261. package/dist/mainstack-design-system454.js +16 -37
  262. package/dist/mainstack-design-system455.cjs +2 -1
  263. package/dist/mainstack-design-system455.js +40 -18
  264. package/dist/mainstack-design-system456.cjs +2 -1
  265. package/dist/mainstack-design-system456.js +42 -18
  266. package/dist/mainstack-design-system457.cjs +1 -1
  267. package/dist/mainstack-design-system457.js +14 -15
  268. package/dist/mainstack-design-system458.cjs +1 -1
  269. package/dist/mainstack-design-system458.js +13 -15
  270. package/dist/mainstack-design-system459.cjs +1 -1
  271. package/dist/mainstack-design-system459.js +12 -12
  272. package/dist/mainstack-design-system460.cjs +1 -1
  273. package/dist/mainstack-design-system460.js +20 -17
  274. package/dist/mainstack-design-system461.cjs +1 -2
  275. package/dist/mainstack-design-system461.js +16 -49
  276. package/dist/mainstack-design-system462.cjs +1 -2
  277. package/dist/mainstack-design-system462.js +18 -55
  278. package/dist/mainstack-design-system463.cjs +1 -1
  279. package/dist/mainstack-design-system463.js +49 -103
  280. package/dist/mainstack-design-system464.cjs +1 -1
  281. package/dist/mainstack-design-system464.js +52 -33
  282. package/dist/mainstack-design-system465.cjs +1 -1
  283. package/dist/mainstack-design-system465.js +87 -72
  284. package/dist/mainstack-design-system466.cjs +1 -1
  285. package/dist/mainstack-design-system466.js +31 -87
  286. package/dist/mainstack-design-system467.cjs +1 -1
  287. package/dist/mainstack-design-system467.js +86 -40
  288. package/dist/mainstack-design-system468.cjs +1 -1
  289. package/dist/mainstack-design-system468.js +86 -76
  290. package/dist/mainstack-design-system469.cjs +2 -1
  291. package/dist/mainstack-design-system469.js +46 -8
  292. package/dist/mainstack-design-system470.cjs +2 -1
  293. package/dist/mainstack-design-system470.js +82 -13
  294. package/dist/mainstack-design-system471.cjs +1 -1
  295. package/dist/mainstack-design-system471.js +8 -17
  296. package/dist/mainstack-design-system472.cjs +1 -1
  297. package/dist/mainstack-design-system472.js +13 -13
  298. package/dist/mainstack-design-system473.cjs +1 -1
  299. package/dist/mainstack-design-system473.js +15 -19
  300. package/dist/mainstack-design-system474.cjs +1 -1
  301. package/dist/mainstack-design-system474.js +13 -30
  302. package/dist/mainstack-design-system475.cjs +1 -1
  303. package/dist/mainstack-design-system475.js +20 -34
  304. package/dist/mainstack-design-system476.cjs +1 -1
  305. package/dist/mainstack-design-system476.js +30 -7
  306. package/dist/mainstack-design-system477.cjs +1 -1
  307. package/dist/mainstack-design-system477.js +32 -82
  308. package/dist/mainstack-design-system478.cjs +1 -1
  309. package/dist/mainstack-design-system478.js +7 -28
  310. package/dist/mainstack-design-system479.cjs +1 -1
  311. package/dist/mainstack-design-system479.js +83 -20
  312. package/dist/mainstack-design-system480.cjs +1 -1
  313. package/dist/mainstack-design-system480.js +27 -21
  314. package/dist/mainstack-design-system481.cjs +1 -2
  315. package/dist/mainstack-design-system481.js +21 -32
  316. package/dist/mainstack-design-system482.cjs +1 -2
  317. package/dist/mainstack-design-system482.js +20 -31
  318. package/dist/mainstack-design-system483.cjs +1 -1
  319. package/dist/mainstack-design-system483.js +21 -33
  320. package/dist/mainstack-design-system484.cjs +1 -1
  321. package/dist/mainstack-design-system484.js +26 -28
  322. package/dist/mainstack-design-system485.cjs +1 -1
  323. package/dist/mainstack-design-system485.js +37 -57
  324. package/dist/mainstack-design-system486.cjs +1 -1
  325. package/dist/mainstack-design-system486.js +28 -26
  326. package/dist/mainstack-design-system487.cjs +1 -1
  327. package/dist/mainstack-design-system487.js +59 -98
  328. package/dist/mainstack-design-system488.cjs +1 -1
  329. package/dist/mainstack-design-system488.js +24 -24
  330. package/dist/mainstack-design-system489.cjs +1 -1
  331. package/dist/mainstack-design-system489.js +99 -27
  332. package/dist/mainstack-design-system490.cjs +1 -1
  333. package/dist/mainstack-design-system490.js +28 -76
  334. package/dist/mainstack-design-system491.cjs +1 -1
  335. package/dist/mainstack-design-system491.js +31 -20
  336. package/dist/mainstack-design-system492.cjs +1 -1
  337. package/dist/mainstack-design-system492.js +57 -125
  338. package/dist/mainstack-design-system493.cjs +1 -1
  339. package/dist/mainstack-design-system493.js +19 -35
  340. package/dist/mainstack-design-system494.cjs +1 -1
  341. package/dist/mainstack-design-system494.js +144 -28
  342. package/dist/mainstack-design-system495.cjs +1 -1
  343. package/dist/mainstack-design-system495.js +32 -26
  344. package/dist/mainstack-design-system496.cjs +1 -1
  345. package/dist/mainstack-design-system496.js +25 -31
  346. package/dist/mainstack-design-system497.cjs +2 -3
  347. package/dist/mainstack-design-system497.js +31 -16
  348. package/dist/mainstack-design-system498.cjs +2 -1
  349. package/dist/mainstack-design-system498.js +39 -18
  350. package/dist/mainstack-design-system499.cjs +3 -1
  351. package/dist/mainstack-design-system499.js +11 -10
  352. package/dist/mainstack-design-system500.cjs +1 -1
  353. package/dist/mainstack-design-system500.js +15 -13
  354. package/dist/mainstack-design-system501.cjs +1 -1
  355. package/dist/mainstack-design-system501.js +12 -15
  356. package/dist/mainstack-design-system502.cjs +1 -1
  357. package/dist/mainstack-design-system502.js +12 -12
  358. package/dist/mainstack-design-system503.cjs +1 -1
  359. package/dist/mainstack-design-system503.js +18 -8
  360. package/dist/mainstack-design-system504.cjs +1 -1
  361. package/dist/mainstack-design-system504.js +12 -14
  362. package/dist/mainstack-design-system505.cjs +1 -1
  363. package/dist/mainstack-design-system505.js +8 -18
  364. package/dist/mainstack-design-system506.cjs +1 -1
  365. package/dist/mainstack-design-system506.js +14 -13
  366. package/dist/mainstack-design-system507.cjs +1 -1
  367. package/dist/mainstack-design-system507.js +14 -13
  368. package/dist/mainstack-design-system508.cjs +1 -1
  369. package/dist/mainstack-design-system508.js +15 -30
  370. package/dist/mainstack-design-system509.cjs +1 -1
  371. package/dist/mainstack-design-system509.js +17 -16
  372. package/dist/mainstack-design-system510.cjs +1 -1
  373. package/dist/mainstack-design-system510.js +29 -33
  374. package/dist/mainstack-design-system511.cjs +1 -1
  375. package/dist/mainstack-design-system511.js +16 -43
  376. package/dist/mainstack-design-system512.cjs +1 -2
  377. package/dist/mainstack-design-system512.js +32 -28
  378. package/dist/mainstack-design-system513.cjs +1 -1
  379. package/dist/mainstack-design-system513.js +36 -88
  380. package/dist/mainstack-design-system514.cjs +2 -1
  381. package/dist/mainstack-design-system514.js +30 -21
  382. package/dist/mainstack-design-system515.cjs +1 -2
  383. package/dist/mainstack-design-system515.js +97 -14
  384. package/dist/mainstack-design-system516.cjs +1 -2
  385. package/dist/mainstack-design-system516.js +23 -38
  386. package/dist/mainstack-design-system517.cjs +1 -1
  387. package/dist/mainstack-design-system517.js +13 -33
  388. package/dist/mainstack-design-system518.cjs +1 -1
  389. package/dist/mainstack-design-system518.js +33 -35
  390. package/dist/mainstack-design-system519.cjs +1 -1
  391. package/dist/mainstack-design-system519.js +31 -44
  392. package/dist/mainstack-design-system520.cjs +1 -1
  393. package/dist/mainstack-design-system520.js +38 -12
  394. package/dist/mainstack-design-system521.cjs +1 -1
  395. package/dist/mainstack-design-system521.js +44 -31
  396. package/dist/mainstack-design-system522.cjs +1 -1
  397. package/dist/mainstack-design-system522.js +12 -38
  398. package/dist/mainstack-design-system523.cjs +1 -1
  399. package/dist/mainstack-design-system523.js +31 -44
  400. package/dist/mainstack-design-system524.cjs +2 -1
  401. package/dist/mainstack-design-system524.js +41 -17
  402. package/dist/mainstack-design-system525.cjs +2 -1
  403. package/dist/mainstack-design-system525.js +47 -21
  404. package/dist/mainstack-design-system526.cjs +1 -1
  405. package/dist/mainstack-design-system526.js +12 -44
  406. package/dist/mainstack-design-system527.cjs +1 -1
  407. package/dist/mainstack-design-system527.js +21 -26
  408. package/dist/mainstack-design-system528.cjs +1 -2
  409. package/dist/mainstack-design-system528.js +47 -24
  410. package/dist/mainstack-design-system529.cjs +1 -2
  411. package/dist/mainstack-design-system529.js +25 -35
  412. package/dist/mainstack-design-system530.cjs +2 -1
  413. package/dist/mainstack-design-system530.js +22 -15
  414. package/dist/mainstack-design-system531.cjs +2 -1
  415. package/dist/mainstack-design-system531.js +34 -15
  416. package/dist/mainstack-design-system532.cjs +1 -1
  417. package/dist/mainstack-design-system532.js +11 -11
  418. package/dist/mainstack-design-system533.cjs +1 -1
  419. package/dist/mainstack-design-system533.js +13 -11
  420. package/dist/mainstack-design-system534.cjs +1 -1
  421. package/dist/mainstack-design-system534.js +14 -11
  422. package/dist/mainstack-design-system535.cjs +1 -2
  423. package/dist/mainstack-design-system535.js +11 -15
  424. package/dist/mainstack-design-system536.cjs +1 -2
  425. package/dist/mainstack-design-system536.js +16 -5
  426. package/dist/mainstack-design-system537.cjs +1 -1
  427. package/dist/mainstack-design-system537.js +19 -7
  428. package/dist/mainstack-design-system538.cjs +1 -1
  429. package/dist/mainstack-design-system538.js +3 -3
  430. package/dist/mainstack-design-system539.cjs +2 -1
  431. package/dist/mainstack-design-system539.js +8 -15
  432. package/dist/mainstack-design-system540.cjs +2 -1
  433. package/dist/mainstack-design-system540.js +5 -14
  434. package/dist/mainstack-design-system541.cjs +1 -2
  435. package/dist/mainstack-design-system541.js +14 -28
  436. package/dist/mainstack-design-system542.cjs +1 -2
  437. package/dist/mainstack-design-system542.js +13 -23
  438. package/dist/mainstack-design-system543.cjs +1 -1
  439. package/dist/mainstack-design-system543.js +29 -16
  440. package/dist/mainstack-design-system544.cjs +1 -1
  441. package/dist/mainstack-design-system544.js +20 -29
  442. package/dist/mainstack-design-system545.cjs +2 -1
  443. package/dist/mainstack-design-system545.js +17 -29
  444. package/dist/mainstack-design-system546.cjs +2 -1
  445. package/dist/mainstack-design-system546.js +29 -18
  446. package/dist/mainstack-design-system547.cjs +1 -1
  447. package/dist/mainstack-design-system547.js +29 -12
  448. package/dist/mainstack-design-system548.cjs +1 -1
  449. package/dist/mainstack-design-system548.js +18 -18
  450. package/dist/mainstack-design-system549.cjs +1 -1
  451. package/dist/mainstack-design-system549.js +10 -17
  452. package/dist/mainstack-design-system550.cjs +1 -1
  453. package/dist/mainstack-design-system550.js +18 -15
  454. package/dist/mainstack-design-system551.cjs +1 -1
  455. package/dist/mainstack-design-system551.js +16 -18
  456. package/dist/mainstack-design-system552.cjs +1 -1
  457. package/dist/mainstack-design-system552.js +15 -11
  458. package/dist/mainstack-design-system553.cjs +1 -1
  459. package/dist/mainstack-design-system553.js +17 -11
  460. package/dist/mainstack-design-system554.cjs +1 -1
  461. package/dist/mainstack-design-system554.js +15 -57
  462. package/dist/mainstack-design-system555.cjs +1 -1
  463. package/dist/mainstack-design-system555.js +12 -34
  464. package/dist/mainstack-design-system556.cjs +1 -1
  465. package/dist/mainstack-design-system556.js +53 -19
  466. package/dist/mainstack-design-system557.cjs +1 -1
  467. package/dist/mainstack-design-system557.js +37 -23
  468. package/dist/mainstack-design-system558.cjs +1 -5
  469. package/dist/mainstack-design-system558.js +20 -50
  470. package/dist/mainstack-design-system559.cjs +1 -1
  471. package/dist/mainstack-design-system559.js +21 -31
  472. package/dist/mainstack-design-system560.cjs +5 -1
  473. package/dist/mainstack-design-system560.js +51 -17
  474. package/dist/mainstack-design-system561.cjs +1 -1
  475. package/dist/mainstack-design-system561.js +33 -17
  476. package/dist/mainstack-design-system562.cjs +1 -1
  477. package/dist/mainstack-design-system562.js +20 -68
  478. package/dist/mainstack-design-system563.cjs +1 -2
  479. package/dist/mainstack-design-system563.js +15 -11
  480. package/dist/mainstack-design-system564.cjs +1 -1
  481. package/dist/mainstack-design-system564.js +69 -18
  482. package/dist/mainstack-design-system565.cjs +2 -1
  483. package/dist/mainstack-design-system565.js +13 -14
  484. package/dist/mainstack-design-system566.cjs +1 -1
  485. package/dist/mainstack-design-system566.js +17 -14
  486. package/dist/mainstack-design-system567.cjs +1 -1
  487. package/dist/mainstack-design-system567.js +10 -11
  488. package/dist/mainstack-design-system568.cjs +1 -1
  489. package/dist/mainstack-design-system568.js +14 -15
  490. package/dist/mainstack-design-system569.cjs +1 -1
  491. package/dist/mainstack-design-system569.js +16 -7
  492. package/dist/mainstack-design-system570.cjs +1 -2
  493. package/dist/mainstack-design-system570.js +15 -88
  494. package/dist/mainstack-design-system571.cjs +2 -1
  495. package/dist/mainstack-design-system571.js +18 -255
  496. package/dist/mainstack-design-system572.cjs +2 -1
  497. package/dist/mainstack-design-system572.js +23 -11
  498. package/dist/mainstack-design-system573.cjs +2 -1
  499. package/dist/mainstack-design-system573.js +37 -4
  500. package/dist/mainstack-design-system574.cjs +1 -1
  501. package/dist/mainstack-design-system574.js +7 -23
  502. package/dist/mainstack-design-system575.cjs +2 -1
  503. package/dist/mainstack-design-system575.js +89 -9
  504. package/dist/mainstack-design-system576.cjs +1 -1
  505. package/dist/mainstack-design-system576.js +255 -43
  506. package/dist/mainstack-design-system577.cjs +1 -1
  507. package/dist/mainstack-design-system577.js +11 -14
  508. package/dist/mainstack-design-system578.cjs +1 -1
  509. package/dist/mainstack-design-system578.js +4 -49
  510. package/dist/mainstack-design-system579.cjs +1 -1
  511. package/dist/mainstack-design-system579.js +21 -17
  512. package/dist/mainstack-design-system580.cjs +1 -1
  513. package/dist/mainstack-design-system580.js +9 -107
  514. package/dist/mainstack-design-system581.cjs +1 -1
  515. package/dist/mainstack-design-system581.js +41 -37
  516. package/dist/mainstack-design-system582.cjs +1 -1
  517. package/dist/mainstack-design-system582.js +4 -4
  518. package/dist/mainstack-design-system583.cjs +1 -1
  519. package/dist/mainstack-design-system583.js +50 -12
  520. package/dist/mainstack-design-system584.cjs +1 -1
  521. package/dist/mainstack-design-system584.js +19 -9
  522. package/dist/mainstack-design-system585.cjs +1 -1
  523. package/dist/mainstack-design-system585.js +104 -44
  524. package/dist/mainstack-design-system586.cjs +1 -1
  525. package/dist/mainstack-design-system586.js +38 -13
  526. package/dist/mainstack-design-system587.cjs +1 -1
  527. package/dist/mainstack-design-system587.js +13 -21
  528. package/dist/mainstack-design-system588.cjs +1 -1
  529. package/dist/mainstack-design-system588.js +5 -7
  530. package/dist/mainstack-design-system589.cjs +1 -1
  531. package/dist/mainstack-design-system589.js +8 -13
  532. package/dist/mainstack-design-system590.cjs +1 -1
  533. package/dist/mainstack-design-system590.js +47 -12
  534. package/dist/mainstack-design-system591.cjs +1 -1
  535. package/dist/mainstack-design-system591.js +7 -7
  536. package/dist/mainstack-design-system592.cjs +1 -1
  537. package/dist/mainstack-design-system592.js +21 -13
  538. package/dist/mainstack-design-system593.cjs +1 -1
  539. package/dist/mainstack-design-system593.js +14 -16
  540. package/dist/mainstack-design-system594.cjs +1 -1
  541. package/dist/mainstack-design-system594.js +13 -19
  542. package/dist/mainstack-design-system595.cjs +1 -1
  543. package/dist/mainstack-design-system595.js +10 -9
  544. package/dist/mainstack-design-system596.cjs +1 -2
  545. package/dist/mainstack-design-system596.js +11 -9
  546. package/dist/mainstack-design-system597.cjs +1 -1
  547. package/dist/mainstack-design-system597.js +14 -25
  548. package/dist/mainstack-design-system598.cjs +1 -2
  549. package/dist/mainstack-design-system598.js +13 -257
  550. package/dist/mainstack-design-system599.cjs +1 -2
  551. package/dist/mainstack-design-system599.js +19 -151
  552. package/dist/mainstack-design-system600.cjs +1 -1
  553. package/dist/mainstack-design-system600.js +11 -57
  554. package/dist/mainstack-design-system601.cjs +2 -1
  555. package/dist/mainstack-design-system601.js +11 -23
  556. package/dist/mainstack-design-system602.cjs +1 -2
  557. package/dist/mainstack-design-system602.js +24 -98
  558. package/dist/mainstack-design-system603.cjs +1 -2
  559. package/dist/mainstack-design-system603.js +246 -376
  560. package/dist/mainstack-design-system604.cjs +1 -1
  561. package/dist/mainstack-design-system604.js +145 -126
  562. package/dist/mainstack-design-system605.cjs +1 -5
  563. package/dist/mainstack-design-system605.js +52 -2156
  564. package/dist/mainstack-design-system606.cjs +1 -10
  565. package/dist/mainstack-design-system606.js +20 -180
  566. package/dist/mainstack-design-system607.cjs +1 -41
  567. package/dist/mainstack-design-system607.js +89 -23724
  568. package/dist/mainstack-design-system608.cjs +2 -3
  569. package/dist/mainstack-design-system608.js +342 -7391
  570. package/dist/mainstack-design-system609.cjs +1 -1
  571. package/dist/mainstack-design-system609.js +127 -2844
  572. package/dist/mainstack-design-system610.cjs +5 -1
  573. package/dist/mainstack-design-system610.js +2160 -58
  574. package/dist/mainstack-design-system611.cjs +10 -1
  575. package/dist/mainstack-design-system611.js +186 -1
  576. package/dist/mainstack-design-system612.cjs +42 -1
  577. package/dist/mainstack-design-system612.js +23734 -19
  578. package/dist/mainstack-design-system613.cjs +4 -1
  579. package/dist/mainstack-design-system613.js +7438 -10
  580. package/dist/mainstack-design-system614.cjs +2 -0
  581. package/dist/mainstack-design-system614.js +2853 -0
  582. package/dist/mainstack-design-system615.cjs +1 -0
  583. package/dist/mainstack-design-system615.js +61 -0
  584. package/dist/mainstack-design-system616.cjs +1 -0
  585. package/dist/mainstack-design-system616.js +1 -0
  586. package/dist/mainstack-design-system617.cjs +1 -0
  587. package/dist/mainstack-design-system617.js +21 -0
  588. package/dist/mainstack-design-system618.cjs +1 -0
  589. package/dist/mainstack-design-system618.js +13 -0
  590. package/dist/{player-DgtZYZny.cjs → player-8drl4TJX.cjs} +1 -1
  591. package/dist/{player-DTiOvJS-.js → player-C7Vjl1Lb.js} +1 -1
  592. package/dist/{utils-bFB19i-d.js → utils-BuJ7DVbu.js} +1 -1
  593. package/dist/{utils-DLtLUJsL.cjs → utils-sX9NhwD-.cjs} +1 -1
  594. package/package.json +2 -1
@@ -0,0 +1,2853 @@
1
+ 'use client';
2
+ import { jsx as W, jsxs as Tt } from "react/jsx-runtime";
3
+ import { D as Ae } from "./index-eeqUt-Tb.js";
4
+ import { c as ns } from "./index-RoCFhqzC.js";
5
+ import { useEffect as qt } from "react";
6
+ import { useResponsivePopoverDrawerContext as ss } from "./mainstack-design-system595.js";
7
+ import { V as vt } from "./index-DJT9m8v7.js";
8
+ import { c as Vt } from "./utils-BuJ7DVbu.js";
9
+ import "./mainstack-design-system389.js";
10
+ import "./mainstack-design-system390.js";
11
+ import "./mainstack-design-system391.js";
12
+ import "./mainstack-design-system392.js";
13
+ import { Button as is } from "./mainstack-design-system393.js";
14
+ import { a as rs, i as as, u as wt, b as os } from "./use-presence-Dept-wE7.js";
15
+ function ls(e, t) {
16
+ e.indexOf(t) === -1 && e.push(t);
17
+ }
18
+ function ze(e, t) {
19
+ const n = e.indexOf(t);
20
+ n > -1 && e.splice(n, 1);
21
+ }
22
+ const Y = (e, t, n) => n > t ? t : n < e ? e : n;
23
+ function Ee(e, t) {
24
+ return t ? `${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}` : e;
25
+ }
26
+ let he = () => {
27
+ }, I = () => {
28
+ };
29
+ process.env.NODE_ENV !== "production" && (he = (e, t, n) => {
30
+ !e && typeof console < "u" && console.warn(Ee(t, n));
31
+ }, I = (e, t, n) => {
32
+ if (!e)
33
+ throw new Error(Ee(t, n));
34
+ });
35
+ const K = {}, Ht = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e), Zt = (e) => /^0[^.\s]+$/u.test(e);
36
+ // @__NO_SIDE_EFFECTS__
37
+ function Xe(e) {
38
+ let t;
39
+ return () => (t === void 0 && (t = e()), t);
40
+ }
41
+ const Z = /* @__NO_SIDE_EFFECTS__ */ (e) => e, us = (e, t) => (n) => t(e(n)), qe = (...e) => e.reduce(us), He = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
42
+ const s = t - e;
43
+ return s === 0 ? 1 : (n - e) / s;
44
+ };
45
+ class Jt {
46
+ constructor() {
47
+ this.subscriptions = [];
48
+ }
49
+ add(t) {
50
+ return ls(this.subscriptions, t), () => ze(this.subscriptions, t);
51
+ }
52
+ notify(t, n, s) {
53
+ const i = this.subscriptions.length;
54
+ if (i)
55
+ if (i === 1)
56
+ this.subscriptions[0](t, n, s);
57
+ else
58
+ for (let r = 0; r < i; r++) {
59
+ const a = this.subscriptions[r];
60
+ a && a(t, n, s);
61
+ }
62
+ }
63
+ getSize() {
64
+ return this.subscriptions.length;
65
+ }
66
+ clear() {
67
+ this.subscriptions.length = 0;
68
+ }
69
+ }
70
+ const O = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, R = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
71
+ function Qt(e, t) {
72
+ return t ? e * (1e3 / t) : 0;
73
+ }
74
+ const St = /* @__PURE__ */ new Set();
75
+ function en(e, t, n) {
76
+ e || St.has(t) || (console.warn(Ee(t, n)), St.add(t));
77
+ }
78
+ const cs = (e, t, n) => {
79
+ const s = t - e;
80
+ return ((n - e) % s + s) % s + e;
81
+ }, tn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, fs = 1e-7, hs = 12;
82
+ function ds(e, t, n, s, i) {
83
+ let r, a, o = 0;
84
+ do
85
+ a = t + (n - t) / 2, r = tn(a, s, i) - e, r > 0 ? n = a : t = a;
86
+ while (Math.abs(r) > fs && ++o < hs);
87
+ return a;
88
+ }
89
+ function de(e, t, n, s) {
90
+ if (e === t && n === s)
91
+ return Z;
92
+ const i = (r) => ds(r, 0, 1, e, n);
93
+ return (r) => r === 0 || r === 1 ? r : tn(i(r), t, s);
94
+ }
95
+ const nn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, sn = (e) => (t) => 1 - e(1 - t), rn = /* @__PURE__ */ de(0.33, 1.53, 0.69, 0.99), Ze = /* @__PURE__ */ sn(rn), an = /* @__PURE__ */ nn(Ze), on = (e) => (e *= 2) < 1 ? 0.5 * Ze(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), Je = (e) => 1 - Math.sin(Math.acos(e)), ms = sn(Je), ln = nn(Je), ps = /* @__PURE__ */ de(0.42, 0, 1, 1), gs = /* @__PURE__ */ de(0, 0, 0.58, 1), un = /* @__PURE__ */ de(0.42, 0, 0.58, 1), cn = (e) => Array.isArray(e) && typeof e[0] != "number";
96
+ function fn(e, t) {
97
+ return cn(e) ? e[cs(0, e.length, t)] : e;
98
+ }
99
+ const hn = (e) => Array.isArray(e) && typeof e[0] == "number", xt = {
100
+ linear: Z,
101
+ easeIn: ps,
102
+ easeInOut: un,
103
+ easeOut: gs,
104
+ circIn: Je,
105
+ circInOut: ln,
106
+ circOut: ms,
107
+ backIn: Ze,
108
+ backInOut: an,
109
+ backOut: rn,
110
+ anticipate: on
111
+ }, ys = (e) => typeof e == "string", At = (e) => {
112
+ if (hn(e)) {
113
+ I(e.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
114
+ const [t, n, s, i] = e;
115
+ return de(t, n, s, i);
116
+ } else if (ys(e))
117
+ return I(xt[e] !== void 0, `Invalid easing type '${e}'`, "invalid-easing-type"), xt[e];
118
+ return e;
119
+ }, be = [
120
+ "setup",
121
+ // Compute
122
+ "read",
123
+ // Read
124
+ "resolveKeyframes",
125
+ // Write/Read/Write/Read
126
+ "preUpdate",
127
+ // Compute
128
+ "update",
129
+ // Compute
130
+ "preRender",
131
+ // Compute
132
+ "render",
133
+ // Write
134
+ "postRender"
135
+ // Compute
136
+ ];
137
+ function bs(e, t) {
138
+ let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), i = !1, r = !1;
139
+ const a = /* @__PURE__ */ new WeakSet();
140
+ let o = {
141
+ delta: 0,
142
+ timestamp: 0,
143
+ isProcessing: !1
144
+ };
145
+ function u(l) {
146
+ a.has(l) && (c.schedule(l), e()), l(o);
147
+ }
148
+ const c = {
149
+ /**
150
+ * Schedule a process to run on the next frame.
151
+ */
152
+ schedule: (l, f = !1, h = !1) => {
153
+ const y = h && i ? n : s;
154
+ return f && a.add(l), y.has(l) || y.add(l), l;
155
+ },
156
+ /**
157
+ * Cancel the provided callback from running on the next frame.
158
+ */
159
+ cancel: (l) => {
160
+ s.delete(l), a.delete(l);
161
+ },
162
+ /**
163
+ * Execute all schedule callbacks.
164
+ */
165
+ process: (l) => {
166
+ if (o = l, i) {
167
+ r = !0;
168
+ return;
169
+ }
170
+ i = !0, [n, s] = [s, n], n.forEach(u), n.clear(), i = !1, r && (r = !1, c.process(l));
171
+ }
172
+ };
173
+ return c;
174
+ }
175
+ const Ts = 40;
176
+ function dn(e, t) {
177
+ let n = !1, s = !0;
178
+ const i = {
179
+ delta: 0,
180
+ timestamp: 0,
181
+ isProcessing: !1
182
+ }, r = () => n = !0, a = be.reduce((w, S) => (w[S] = bs(r), w), {}), { setup: o, read: u, resolveKeyframes: c, preUpdate: l, update: f, preRender: h, render: p, postRender: y } = a, b = () => {
183
+ const w = K.useManualTiming ? i.timestamp : performance.now();
184
+ n = !1, K.useManualTiming || (i.delta = s ? 1e3 / 60 : Math.max(Math.min(w - i.timestamp, Ts), 1)), i.timestamp = w, i.isProcessing = !0, o.process(i), u.process(i), c.process(i), l.process(i), f.process(i), h.process(i), p.process(i), y.process(i), i.isProcessing = !1, n && t && (s = !1, e(b));
185
+ }, v = () => {
186
+ n = !0, s = !0, i.isProcessing || e(b);
187
+ };
188
+ return { schedule: be.reduce((w, S) => {
189
+ const m = a[S];
190
+ return w[S] = (V, C = !1, g = !1) => (n || v(), m.schedule(V, C, g)), w;
191
+ }, {}), cancel: (w) => {
192
+ for (let S = 0; S < be.length; S++)
193
+ a[be[S]].cancel(w);
194
+ }, state: i, steps: a };
195
+ }
196
+ const { schedule: B, cancel: Pe, state: Ve } = /* @__PURE__ */ dn(typeof requestAnimationFrame < "u" ? requestAnimationFrame : Z, !0);
197
+ let ve;
198
+ function vs() {
199
+ ve = void 0;
200
+ }
201
+ const P = {
202
+ now: () => (ve === void 0 && P.set(Ve.isProcessing || K.useManualTiming ? Ve.timestamp : performance.now()), ve),
203
+ set: (e) => {
204
+ ve = e, queueMicrotask(vs);
205
+ }
206
+ }, mn = (e) => (t) => typeof t == "string" && t.startsWith(e), pn = /* @__PURE__ */ mn("--"), Vs = /* @__PURE__ */ mn("var(--"), Qe = (e) => Vs(e) ? ws.test(e.split("/*")[0].trim()) : !1, ws = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, J = {
207
+ test: (e) => typeof e == "number",
208
+ parse: parseFloat,
209
+ transform: (e) => e
210
+ }, le = {
211
+ ...J,
212
+ transform: (e) => Y(0, 1, e)
213
+ }, Te = {
214
+ ...J,
215
+ default: 1
216
+ }, oe = (e) => Math.round(e * 1e5) / 1e5, et = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
217
+ function Ss(e) {
218
+ return e == null;
219
+ }
220
+ const xs = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, tt = (e, t) => (n) => !!(typeof n == "string" && xs.test(n) && n.startsWith(e) || t && !Ss(n) && Object.prototype.hasOwnProperty.call(n, t)), gn = (e, t, n) => (s) => {
221
+ if (typeof s != "string")
222
+ return s;
223
+ const [i, r, a, o] = s.match(et);
224
+ return {
225
+ [e]: parseFloat(i),
226
+ [t]: parseFloat(r),
227
+ [n]: parseFloat(a),
228
+ alpha: o !== void 0 ? parseFloat(o) : 1
229
+ };
230
+ }, As = (e) => Y(0, 255, e), Me = {
231
+ ...J,
232
+ transform: (e) => Math.round(As(e))
233
+ }, j = {
234
+ test: /* @__PURE__ */ tt("rgb", "red"),
235
+ parse: /* @__PURE__ */ gn("red", "green", "blue"),
236
+ transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Me.transform(e) + ", " + Me.transform(t) + ", " + Me.transform(n) + ", " + oe(le.transform(s)) + ")"
237
+ };
238
+ function Ms(e) {
239
+ let t = "", n = "", s = "", i = "";
240
+ return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), i = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), i = e.substring(4, 5), t += t, n += n, s += s, i += i), {
241
+ red: parseInt(t, 16),
242
+ green: parseInt(n, 16),
243
+ blue: parseInt(s, 16),
244
+ alpha: i ? parseInt(i, 16) / 255 : 1
245
+ };
246
+ }
247
+ const Re = {
248
+ test: /* @__PURE__ */ tt("#"),
249
+ parse: Ms,
250
+ transform: j.transform
251
+ }, me = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
252
+ test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
253
+ parse: parseFloat,
254
+ transform: (t) => `${t}${e}`
255
+ }), L = /* @__PURE__ */ me("deg"), q = /* @__PURE__ */ me("%"), d = /* @__PURE__ */ me("px"), Cs = /* @__PURE__ */ me("vh"), Ds = /* @__PURE__ */ me("vw"), Mt = {
256
+ ...q,
257
+ parse: (e) => q.parse(e) / 100,
258
+ transform: (e) => q.transform(e * 100)
259
+ }, z = {
260
+ test: /* @__PURE__ */ tt("hsl", "hue"),
261
+ parse: /* @__PURE__ */ gn("hue", "saturation", "lightness"),
262
+ transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + q.transform(oe(t)) + ", " + q.transform(oe(n)) + ", " + oe(le.transform(s)) + ")"
263
+ }, D = {
264
+ test: (e) => j.test(e) || Re.test(e) || z.test(e),
265
+ parse: (e) => j.test(e) ? j.parse(e) : z.test(e) ? z.parse(e) : Re.parse(e),
266
+ transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? j.transform(e) : z.transform(e),
267
+ getAnimatableNone: (e) => {
268
+ const t = D.parse(e);
269
+ return t.alpha = 0, D.transform(t);
270
+ }
271
+ }, Fs = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
272
+ function Es(e) {
273
+ return isNaN(e) && typeof e == "string" && (e.match(et)?.length || 0) + (e.match(Fs)?.length || 0) > 0;
274
+ }
275
+ const yn = "number", bn = "color", Ps = "var", Rs = "var(", Ct = "${}", Os = /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;
276
+ function ue(e) {
277
+ const t = e.toString(), n = [], s = {
278
+ color: [],
279
+ number: [],
280
+ var: []
281
+ }, i = [];
282
+ let r = 0;
283
+ const o = t.replace(Os, (u) => (D.test(u) ? (s.color.push(r), i.push(bn), n.push(D.parse(u))) : u.startsWith(Rs) ? (s.var.push(r), i.push(Ps), n.push(u)) : (s.number.push(r), i.push(yn), n.push(parseFloat(u))), ++r, Ct)).split(Ct);
284
+ return { values: n, split: o, indexes: s, types: i };
285
+ }
286
+ function Tn(e) {
287
+ return ue(e).values;
288
+ }
289
+ function vn(e) {
290
+ const { split: t, types: n } = ue(e), s = t.length;
291
+ return (i) => {
292
+ let r = "";
293
+ for (let a = 0; a < s; a++)
294
+ if (r += t[a], i[a] !== void 0) {
295
+ const o = n[a];
296
+ o === yn ? r += oe(i[a]) : o === bn ? r += D.transform(i[a]) : r += i[a];
297
+ }
298
+ return r;
299
+ };
300
+ }
301
+ const Ns = (e) => typeof e == "number" ? 0 : D.test(e) ? D.getAnimatableNone(e) : e;
302
+ function Is(e) {
303
+ const t = Tn(e);
304
+ return vn(e)(t.map(Ns));
305
+ }
306
+ const Q = {
307
+ test: Es,
308
+ parse: Tn,
309
+ createTransformer: vn,
310
+ getAnimatableNone: Is
311
+ };
312
+ function Ce(e, t, n) {
313
+ return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
314
+ }
315
+ function ks({ hue: e, saturation: t, lightness: n, alpha: s }) {
316
+ e /= 360, t /= 100, n /= 100;
317
+ let i = 0, r = 0, a = 0;
318
+ if (!t)
319
+ i = r = a = n;
320
+ else {
321
+ const o = n < 0.5 ? n * (1 + t) : n + t - n * t, u = 2 * n - o;
322
+ i = Ce(u, o, e + 1 / 3), r = Ce(u, o, e), a = Ce(u, o, e - 1 / 3);
323
+ }
324
+ return {
325
+ red: Math.round(i * 255),
326
+ green: Math.round(r * 255),
327
+ blue: Math.round(a * 255),
328
+ alpha: s
329
+ };
330
+ }
331
+ function we(e, t) {
332
+ return (n) => n > 0 ? t : e;
333
+ }
334
+ const pe = (e, t, n) => e + (t - e) * n, De = (e, t, n) => {
335
+ const s = e * e, i = n * (t * t - s) + s;
336
+ return i < 0 ? 0 : Math.sqrt(i);
337
+ }, Ks = [Re, j, z], Bs = (e) => Ks.find((t) => t.test(e));
338
+ function Dt(e) {
339
+ const t = Bs(e);
340
+ if (he(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !t)
341
+ return !1;
342
+ let n = t.parse(e);
343
+ return t === z && (n = ks(n)), n;
344
+ }
345
+ const Ft = (e, t) => {
346
+ const n = Dt(e), s = Dt(t);
347
+ if (!n || !s)
348
+ return we(e, t);
349
+ const i = { ...n };
350
+ return (r) => (i.red = De(n.red, s.red, r), i.green = De(n.green, s.green, r), i.blue = De(n.blue, s.blue, r), i.alpha = pe(n.alpha, s.alpha, r), j.transform(i));
351
+ }, Oe = /* @__PURE__ */ new Set(["none", "hidden"]);
352
+ function $s(e, t) {
353
+ return Oe.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
354
+ }
355
+ function Ls(e, t) {
356
+ return (n) => pe(e, t, n);
357
+ }
358
+ function nt(e) {
359
+ return typeof e == "number" ? Ls : typeof e == "string" ? Qe(e) ? we : D.test(e) ? Ft : _s : Array.isArray(e) ? Vn : typeof e == "object" ? D.test(e) ? Ft : Ws : we;
360
+ }
361
+ function Vn(e, t) {
362
+ const n = [...e], s = n.length, i = e.map((r, a) => nt(r)(r, t[a]));
363
+ return (r) => {
364
+ for (let a = 0; a < s; a++)
365
+ n[a] = i[a](r);
366
+ return n;
367
+ };
368
+ }
369
+ function Ws(e, t) {
370
+ const n = { ...e, ...t }, s = {};
371
+ for (const i in n)
372
+ e[i] !== void 0 && t[i] !== void 0 && (s[i] = nt(e[i])(e[i], t[i]));
373
+ return (i) => {
374
+ for (const r in s)
375
+ n[r] = s[r](i);
376
+ return n;
377
+ };
378
+ }
379
+ function js(e, t) {
380
+ const n = [], s = { color: 0, var: 0, number: 0 };
381
+ for (let i = 0; i < t.values.length; i++) {
382
+ const r = t.types[i], a = e.indexes[r][s[r]], o = e.values[a] ?? 0;
383
+ n[i] = o, s[r]++;
384
+ }
385
+ return n;
386
+ }
387
+ const _s = (e, t) => {
388
+ const n = Q.createTransformer(t), s = ue(e), i = ue(t);
389
+ 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 ? Oe.has(e) && !i.values.length || Oe.has(t) && !s.values.length ? $s(e, t) : qe(Vn(js(s, i), i.values), n) : (he(!0, `Complex values '${e}' and '${t}' 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.`, "complex-values-different"), we(e, t));
390
+ };
391
+ function wn(e, t, n) {
392
+ return typeof e == "number" && typeof t == "number" && typeof n == "number" ? pe(e, t, n) : nt(e)(e, t);
393
+ }
394
+ const Us = (e) => {
395
+ const t = ({ timestamp: n }) => e(n);
396
+ return {
397
+ start: (n = !0) => B.update(t, n),
398
+ stop: () => Pe(t),
399
+ /**
400
+ * If we're processing this frame we can use the
401
+ * framelocked timestamp to keep things in sync.
402
+ */
403
+ now: () => Ve.isProcessing ? Ve.timestamp : P.now()
404
+ };
405
+ }, Sn = (e, t, n = 10) => {
406
+ let s = "";
407
+ const i = Math.max(Math.round(t / n), 2);
408
+ for (let r = 0; r < i; r++)
409
+ s += Math.round(e(r / (i - 1)) * 1e4) / 1e4 + ", ";
410
+ return `linear(${s.substring(0, s.length - 2)})`;
411
+ }, Se = 2e4;
412
+ function st(e) {
413
+ let t = 0;
414
+ const n = 50;
415
+ let s = e.next(t);
416
+ for (; !s.done && t < Se; )
417
+ t += n, s = e.next(t);
418
+ return t >= Se ? 1 / 0 : t;
419
+ }
420
+ function xn(e, t = 100, n) {
421
+ const s = n({ ...e, keyframes: [0, t] }), i = Math.min(st(s), Se);
422
+ return {
423
+ type: "keyframes",
424
+ ease: (r) => s.next(i * r).value / t,
425
+ duration: /* @__PURE__ */ R(i)
426
+ };
427
+ }
428
+ const Gs = 5;
429
+ function An(e, t, n) {
430
+ const s = Math.max(t - Gs, 0);
431
+ return Qt(n - e(s), t - s);
432
+ }
433
+ const M = {
434
+ // Default spring physics
435
+ stiffness: 100,
436
+ damping: 10,
437
+ mass: 1,
438
+ velocity: 0,
439
+ // Default duration/bounce-based options
440
+ duration: 800,
441
+ // in ms
442
+ bounce: 0.3,
443
+ visualDuration: 0.3,
444
+ // in seconds
445
+ // Rest thresholds
446
+ restSpeed: {
447
+ granular: 0.01,
448
+ default: 2
449
+ },
450
+ restDelta: {
451
+ granular: 5e-3,
452
+ default: 0.5
453
+ },
454
+ // Limits
455
+ minDuration: 0.01,
456
+ // in seconds
457
+ maxDuration: 10,
458
+ // in seconds
459
+ minDamping: 0.05,
460
+ maxDamping: 1
461
+ }, Fe = 1e-3;
462
+ function Ys({ duration: e = M.duration, bounce: t = M.bounce, velocity: n = M.velocity, mass: s = M.mass }) {
463
+ let i, r;
464
+ he(e <= /* @__PURE__ */ O(M.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
465
+ let a = 1 - t;
466
+ a = Y(M.minDamping, M.maxDamping, a), e = Y(M.minDuration, M.maxDuration, /* @__PURE__ */ R(e)), a < 1 ? (i = (c) => {
467
+ const l = c * a, f = l * e, h = l - n, p = Ne(c, a), y = Math.exp(-f);
468
+ return Fe - h / p * y;
469
+ }, r = (c) => {
470
+ const f = c * a * e, h = f * n + n, p = Math.pow(a, 2) * Math.pow(c, 2) * e, y = Math.exp(-f), b = Ne(Math.pow(c, 2), a);
471
+ return (-i(c) + Fe > 0 ? -1 : 1) * ((h - p) * y) / b;
472
+ }) : (i = (c) => {
473
+ const l = Math.exp(-c * e), f = (c - n) * e + 1;
474
+ return -Fe + l * f;
475
+ }, r = (c) => {
476
+ const l = Math.exp(-c * e), f = (n - c) * (e * e);
477
+ return l * f;
478
+ });
479
+ const o = 5 / e, u = Xs(i, r, o);
480
+ if (e = /* @__PURE__ */ O(e), isNaN(u))
481
+ return {
482
+ stiffness: M.stiffness,
483
+ damping: M.damping,
484
+ duration: e
485
+ };
486
+ {
487
+ const c = Math.pow(u, 2) * s;
488
+ return {
489
+ stiffness: c,
490
+ damping: a * 2 * Math.sqrt(s * c),
491
+ duration: e
492
+ };
493
+ }
494
+ }
495
+ const zs = 12;
496
+ function Xs(e, t, n) {
497
+ let s = n;
498
+ for (let i = 1; i < zs; i++)
499
+ s = s - e(s) / t(s);
500
+ return s;
501
+ }
502
+ function Ne(e, t) {
503
+ return e * Math.sqrt(1 - t * t);
504
+ }
505
+ const qs = ["duration", "bounce"], Hs = ["stiffness", "damping", "mass"];
506
+ function Et(e, t) {
507
+ return t.some((n) => e[n] !== void 0);
508
+ }
509
+ function Zs(e) {
510
+ let t = {
511
+ velocity: M.velocity,
512
+ stiffness: M.stiffness,
513
+ damping: M.damping,
514
+ mass: M.mass,
515
+ isResolvedFromDuration: !1,
516
+ ...e
517
+ };
518
+ if (!Et(e, Hs) && Et(e, qs))
519
+ if (e.visualDuration) {
520
+ const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), i = s * s, r = 2 * Y(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(i);
521
+ t = {
522
+ ...t,
523
+ mass: M.mass,
524
+ stiffness: i,
525
+ damping: r
526
+ };
527
+ } else {
528
+ const n = Ys(e);
529
+ t = {
530
+ ...t,
531
+ ...n,
532
+ mass: M.mass
533
+ }, t.isResolvedFromDuration = !0;
534
+ }
535
+ return t;
536
+ }
537
+ function H(e = M.visualDuration, t = M.bounce) {
538
+ const n = typeof e != "object" ? {
539
+ visualDuration: e,
540
+ keyframes: [0, 1],
541
+ bounce: t
542
+ } : e;
543
+ let { restSpeed: s, restDelta: i } = n;
544
+ const r = n.keyframes[0], a = n.keyframes[n.keyframes.length - 1], o = { done: !1, value: r }, { stiffness: u, damping: c, mass: l, duration: f, velocity: h, isResolvedFromDuration: p } = Zs({
545
+ ...n,
546
+ velocity: -/* @__PURE__ */ R(n.velocity || 0)
547
+ }), y = h || 0, b = c / (2 * Math.sqrt(u * l)), v = a - r, T = /* @__PURE__ */ R(Math.sqrt(u / l)), A = Math.abs(v) < 5;
548
+ s || (s = A ? M.restSpeed.granular : M.restSpeed.default), i || (i = A ? M.restDelta.granular : M.restDelta.default);
549
+ let w;
550
+ if (b < 1) {
551
+ const m = Ne(T, b);
552
+ w = (V) => {
553
+ const C = Math.exp(-b * T * V);
554
+ return a - C * ((y + b * T * v) / m * Math.sin(m * V) + v * Math.cos(m * V));
555
+ };
556
+ } else if (b === 1)
557
+ w = (m) => a - Math.exp(-T * m) * (v + (y + T * v) * m);
558
+ else {
559
+ const m = T * Math.sqrt(b * b - 1);
560
+ w = (V) => {
561
+ const C = Math.exp(-b * T * V), g = Math.min(m * V, 300);
562
+ return a - C * ((y + b * T * v) * Math.sinh(g) + m * v * Math.cosh(g)) / m;
563
+ };
564
+ }
565
+ const S = {
566
+ calculatedDuration: p && f || null,
567
+ next: (m) => {
568
+ const V = w(m);
569
+ if (p)
570
+ o.done = m >= f;
571
+ else {
572
+ let C = m === 0 ? y : 0;
573
+ b < 1 && (C = m === 0 ? /* @__PURE__ */ O(y) : An(w, m, V));
574
+ const g = Math.abs(C) <= s, x = Math.abs(a - V) <= i;
575
+ o.done = g && x;
576
+ }
577
+ return o.value = o.done ? a : V, o;
578
+ },
579
+ toString: () => {
580
+ const m = Math.min(st(S), Se), V = Sn((C) => S.next(m * C).value, m, 30);
581
+ return m + "ms " + V;
582
+ },
583
+ toTransition: () => {
584
+ }
585
+ };
586
+ return S;
587
+ }
588
+ H.applyToOptions = (e) => {
589
+ const t = xn(e, 100, H);
590
+ return e.ease = t.ease, e.duration = /* @__PURE__ */ O(t.duration), e.type = "keyframes", e;
591
+ };
592
+ function Ie({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: r = 500, modifyTarget: a, min: o, max: u, restDelta: c = 0.5, restSpeed: l }) {
593
+ const f = e[0], h = {
594
+ done: !1,
595
+ value: f
596
+ }, p = (g) => o !== void 0 && g < o || u !== void 0 && g > u, y = (g) => o === void 0 ? u : u === void 0 || Math.abs(o - g) < Math.abs(u - g) ? o : u;
597
+ let b = n * t;
598
+ const v = f + b, T = a === void 0 ? v : a(v);
599
+ T !== v && (b = T - f);
600
+ const A = (g) => -b * Math.exp(-g / s), w = (g) => T + A(g), S = (g) => {
601
+ const x = A(g), E = w(g);
602
+ h.done = Math.abs(x) <= c, h.value = h.done ? T : E;
603
+ };
604
+ let m, V;
605
+ const C = (g) => {
606
+ p(h.value) && (m = g, V = H({
607
+ keyframes: [h.value, y(h.value)],
608
+ velocity: An(w, g, h.value),
609
+ // TODO: This should be passing * 1000
610
+ damping: i,
611
+ stiffness: r,
612
+ restDelta: c,
613
+ restSpeed: l
614
+ }));
615
+ };
616
+ return C(0), {
617
+ calculatedDuration: null,
618
+ next: (g) => {
619
+ let x = !1;
620
+ return !V && m === void 0 && (x = !0, S(g), C(g)), m !== void 0 && g >= m ? V.next(g - m) : (!x && S(g), h);
621
+ }
622
+ };
623
+ }
624
+ function Js(e, t, n) {
625
+ const s = [], i = n || K.mix || wn, r = e.length - 1;
626
+ for (let a = 0; a < r; a++) {
627
+ let o = i(e[a], e[a + 1]);
628
+ if (t) {
629
+ const u = Array.isArray(t) ? t[a] || Z : t;
630
+ o = qe(u, o);
631
+ }
632
+ s.push(o);
633
+ }
634
+ return s;
635
+ }
636
+ function Qs(e, t, { clamp: n = !0, ease: s, mixer: i } = {}) {
637
+ const r = e.length;
638
+ if (I(r === t.length, "Both input and output ranges must be the same length", "range-length"), r === 1)
639
+ return () => t[0];
640
+ if (r === 2 && t[0] === t[1])
641
+ return () => t[1];
642
+ const a = e[0] === e[1];
643
+ e[0] > e[r - 1] && (e = [...e].reverse(), t = [...t].reverse());
644
+ const o = Js(t, s, i), u = o.length, c = (l) => {
645
+ if (a && l < e[0])
646
+ return t[0];
647
+ let f = 0;
648
+ if (u > 1)
649
+ for (; f < e.length - 2 && !(l < e[f + 1]); f++)
650
+ ;
651
+ const h = /* @__PURE__ */ He(e[f], e[f + 1], l);
652
+ return o[f](h);
653
+ };
654
+ return n ? (l) => c(Y(e[0], e[r - 1], l)) : c;
655
+ }
656
+ function Mn(e, t) {
657
+ const n = e[e.length - 1];
658
+ for (let s = 1; s <= t; s++) {
659
+ const i = /* @__PURE__ */ He(0, t, s);
660
+ e.push(pe(n, 1, i));
661
+ }
662
+ }
663
+ function Cn(e) {
664
+ const t = [0];
665
+ return Mn(t, e.length - 1), t;
666
+ }
667
+ function ei(e, t) {
668
+ return e.map((n) => n * t);
669
+ }
670
+ function ti(e, t) {
671
+ return e.map(() => t || un).splice(0, e.length - 1);
672
+ }
673
+ function X({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
674
+ const i = cn(s) ? s.map(At) : At(s), r = {
675
+ done: !1,
676
+ value: t[0]
677
+ }, a = ei(
678
+ // Only use the provided offsets if they're the correct length
679
+ // TODO Maybe we should warn here if there's a length mismatch
680
+ n && n.length === t.length ? n : Cn(t),
681
+ e
682
+ ), o = Qs(a, t, {
683
+ ease: Array.isArray(i) ? i : ti(t, i)
684
+ });
685
+ return {
686
+ calculatedDuration: e,
687
+ next: (u) => (r.value = o(u), r.done = u >= e, r)
688
+ };
689
+ }
690
+ const ni = (e) => e !== null;
691
+ function it(e, { repeat: t, repeatType: n = "loop" }, s, i = 1) {
692
+ const r = e.filter(ni), o = i < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
693
+ return !o || s === void 0 ? r[o] : s;
694
+ }
695
+ const si = {
696
+ decay: Ie,
697
+ inertia: Ie,
698
+ tween: X,
699
+ keyframes: X,
700
+ spring: H
701
+ };
702
+ function Dn(e) {
703
+ typeof e.type == "string" && (e.type = si[e.type]);
704
+ }
705
+ class rt {
706
+ constructor() {
707
+ this.updateFinished();
708
+ }
709
+ get finished() {
710
+ return this._finished;
711
+ }
712
+ updateFinished() {
713
+ this._finished = new Promise((t) => {
714
+ this.resolve = t;
715
+ });
716
+ }
717
+ notifyFinished() {
718
+ this.resolve();
719
+ }
720
+ /**
721
+ * Allows the animation to be awaited.
722
+ *
723
+ * @deprecated Use `finished` instead.
724
+ */
725
+ then(t, n) {
726
+ return this.finished.then(t, n);
727
+ }
728
+ }
729
+ const ii = (e) => e / 100;
730
+ class at extends rt {
731
+ constructor(t) {
732
+ super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
733
+ const { motionValue: n } = this.options;
734
+ n && n.updatedAt !== P.now() && this.tick(P.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
735
+ }, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
736
+ }
737
+ initAnimation() {
738
+ const { options: t } = this;
739
+ Dn(t);
740
+ const { type: n = X, repeat: s = 0, repeatDelay: i = 0, repeatType: r, velocity: a = 0 } = t;
741
+ let { keyframes: o } = t;
742
+ const u = n || X;
743
+ process.env.NODE_ENV !== "production" && u !== X && I(o.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${o}`, "spring-two-frames"), u !== X && typeof o[0] != "number" && (this.mixKeyframes = qe(ii, wn(o[0], o[1])), o = [0, 100]);
744
+ const c = u({ ...t, keyframes: o });
745
+ r === "mirror" && (this.mirroredGenerator = u({
746
+ ...t,
747
+ keyframes: [...o].reverse(),
748
+ velocity: -a
749
+ })), c.calculatedDuration === null && (c.calculatedDuration = st(c));
750
+ const { calculatedDuration: l } = c;
751
+ this.calculatedDuration = l, this.resolvedDuration = l + i, this.totalDuration = this.resolvedDuration * (s + 1) - i, this.generator = c;
752
+ }
753
+ updateTime(t) {
754
+ const n = Math.round(t - this.startTime) * this.playbackSpeed;
755
+ this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
756
+ }
757
+ tick(t, n = !1) {
758
+ const { generator: s, totalDuration: i, mixKeyframes: r, mirroredGenerator: a, resolvedDuration: o, calculatedDuration: u } = this;
759
+ if (this.startTime === null)
760
+ return s.next(0);
761
+ const { delay: c = 0, keyframes: l, repeat: f, repeatType: h, repeatDelay: p, type: y, onUpdate: b, finalKeyframe: v } = this.options;
762
+ this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - i / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
763
+ const T = this.currentTime - c * (this.playbackSpeed >= 0 ? 1 : -1), A = this.playbackSpeed >= 0 ? T < 0 : T > i;
764
+ this.currentTime = Math.max(T, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = i);
765
+ let w = this.currentTime, S = s;
766
+ if (f) {
767
+ const g = Math.min(this.currentTime, i) / o;
768
+ let x = Math.floor(g), E = g % 1;
769
+ !E && g >= 1 && (E = 1), E === 1 && x--, x = Math.min(x, f + 1), !!(x % 2) && (h === "reverse" ? (E = 1 - E, p && (E -= p / o)) : h === "mirror" && (S = a)), w = Y(0, 1, E) * o;
770
+ }
771
+ const m = A ? { done: !1, value: l[0] } : S.next(w);
772
+ r && (m.value = r(m.value));
773
+ let { done: V } = m;
774
+ !A && u !== null && (V = this.playbackSpeed >= 0 ? this.currentTime >= i : this.currentTime <= 0);
775
+ const C = this.holdTime === null && (this.state === "finished" || this.state === "running" && V);
776
+ return C && y !== Ie && (m.value = it(l, this.options, v, this.speed)), b && b(m.value), C && this.finish(), m;
777
+ }
778
+ /**
779
+ * Allows the returned animation to be awaited or promise-chained. Currently
780
+ * resolves when the animation finishes at all but in a future update could/should
781
+ * reject if its cancels.
782
+ */
783
+ then(t, n) {
784
+ return this.finished.then(t, n);
785
+ }
786
+ get duration() {
787
+ return /* @__PURE__ */ R(this.calculatedDuration);
788
+ }
789
+ get iterationDuration() {
790
+ const { delay: t = 0 } = this.options || {};
791
+ return this.duration + /* @__PURE__ */ R(t);
792
+ }
793
+ get time() {
794
+ return /* @__PURE__ */ R(this.currentTime);
795
+ }
796
+ set time(t) {
797
+ t = /* @__PURE__ */ O(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver?.start(!1);
798
+ }
799
+ get speed() {
800
+ return this.playbackSpeed;
801
+ }
802
+ set speed(t) {
803
+ this.updateTime(P.now());
804
+ const n = this.playbackSpeed !== t;
805
+ this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ R(this.currentTime));
806
+ }
807
+ play() {
808
+ if (this.isStopped)
809
+ return;
810
+ const { driver: t = Us, startTime: n } = this.options;
811
+ this.driver || (this.driver = t((i) => this.tick(i))), this.options.onPlay?.();
812
+ const s = this.driver.now();
813
+ this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
814
+ }
815
+ pause() {
816
+ this.state = "paused", this.updateTime(P.now()), this.holdTime = this.currentTime;
817
+ }
818
+ complete() {
819
+ this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
820
+ }
821
+ finish() {
822
+ this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
823
+ }
824
+ cancel() {
825
+ this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
826
+ }
827
+ teardown() {
828
+ this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
829
+ }
830
+ stopDriver() {
831
+ this.driver && (this.driver.stop(), this.driver = void 0);
832
+ }
833
+ sample(t) {
834
+ return this.startTime = 0, this.tick(t, !0);
835
+ }
836
+ attachTimeline(t) {
837
+ return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), t.observe(this);
838
+ }
839
+ }
840
+ function ri(e) {
841
+ for (let t = 1; t < e.length; t++)
842
+ e[t] ?? (e[t] = e[t - 1]);
843
+ }
844
+ const _ = (e) => e * 180 / Math.PI, ke = (e) => {
845
+ const t = _(Math.atan2(e[1], e[0]));
846
+ return Ke(t);
847
+ }, ai = {
848
+ x: 4,
849
+ y: 5,
850
+ translateX: 4,
851
+ translateY: 5,
852
+ scaleX: 0,
853
+ scaleY: 3,
854
+ scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
855
+ rotate: ke,
856
+ rotateZ: ke,
857
+ skewX: (e) => _(Math.atan(e[1])),
858
+ skewY: (e) => _(Math.atan(e[2])),
859
+ skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
860
+ }, Ke = (e) => (e = e % 360, e < 0 && (e += 360), e), Pt = ke, Rt = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), Ot = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), oi = {
861
+ x: 12,
862
+ y: 13,
863
+ z: 14,
864
+ translateX: 12,
865
+ translateY: 13,
866
+ translateZ: 14,
867
+ scaleX: Rt,
868
+ scaleY: Ot,
869
+ scale: (e) => (Rt(e) + Ot(e)) / 2,
870
+ rotateX: (e) => Ke(_(Math.atan2(e[6], e[5]))),
871
+ rotateY: (e) => Ke(_(Math.atan2(-e[2], e[0]))),
872
+ rotateZ: Pt,
873
+ rotate: Pt,
874
+ skewX: (e) => _(Math.atan(e[4])),
875
+ skewY: (e) => _(Math.atan(e[1])),
876
+ skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
877
+ };
878
+ function Be(e) {
879
+ return e.includes("scale") ? 1 : 0;
880
+ }
881
+ function $e(e, t) {
882
+ if (!e || e === "none")
883
+ return Be(t);
884
+ const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
885
+ let s, i;
886
+ if (n)
887
+ s = oi, i = n;
888
+ else {
889
+ const o = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
890
+ s = ai, i = o;
891
+ }
892
+ if (!i)
893
+ return Be(t);
894
+ const r = s[t], a = i[1].split(",").map(ui);
895
+ return typeof r == "function" ? r(a) : a[r];
896
+ }
897
+ const li = (e, t) => {
898
+ const { transform: n = "none" } = getComputedStyle(e);
899
+ return $e(n, t);
900
+ };
901
+ function ui(e) {
902
+ return parseFloat(e.trim());
903
+ }
904
+ const ee = [
905
+ "transformPerspective",
906
+ "x",
907
+ "y",
908
+ "z",
909
+ "translateX",
910
+ "translateY",
911
+ "translateZ",
912
+ "scale",
913
+ "scaleX",
914
+ "scaleY",
915
+ "rotate",
916
+ "rotateX",
917
+ "rotateY",
918
+ "rotateZ",
919
+ "skew",
920
+ "skewX",
921
+ "skewY"
922
+ ], te = new Set(ee), Nt = (e) => e === J || e === d, ci = /* @__PURE__ */ new Set(["x", "y", "z"]), fi = ee.filter((e) => !ci.has(e));
923
+ function hi(e) {
924
+ const t = [];
925
+ return fi.forEach((n) => {
926
+ const s = e.getValue(n);
927
+ s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
928
+ }), t;
929
+ }
930
+ const U = {
931
+ // Dimensions
932
+ width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
933
+ height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
934
+ top: (e, { top: t }) => parseFloat(t),
935
+ left: (e, { left: t }) => parseFloat(t),
936
+ bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
937
+ right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
938
+ // Transform
939
+ x: (e, { transform: t }) => $e(t, "x"),
940
+ y: (e, { transform: t }) => $e(t, "y")
941
+ };
942
+ U.translateX = U.x;
943
+ U.translateY = U.y;
944
+ const G = /* @__PURE__ */ new Set();
945
+ let Le = !1, We = !1, je = !1;
946
+ function Fn() {
947
+ if (We) {
948
+ const e = Array.from(G).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
949
+ t.forEach((s) => {
950
+ const i = hi(s);
951
+ i.length && (n.set(s, i), s.render());
952
+ }), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
953
+ s.render();
954
+ const i = n.get(s);
955
+ i && i.forEach(([r, a]) => {
956
+ s.getValue(r)?.set(a);
957
+ });
958
+ }), e.forEach((s) => s.measureEndState()), e.forEach((s) => {
959
+ s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
960
+ });
961
+ }
962
+ We = !1, Le = !1, G.forEach((e) => e.complete(je)), G.clear();
963
+ }
964
+ function En() {
965
+ G.forEach((e) => {
966
+ e.readKeyframes(), e.needsMeasurement && (We = !0);
967
+ });
968
+ }
969
+ function di() {
970
+ je = !0, En(), Fn(), je = !1;
971
+ }
972
+ class ot {
973
+ constructor(t, n, s, i, r, a = !1) {
974
+ this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = i, this.element = r, this.isAsync = a;
975
+ }
976
+ scheduleResolve() {
977
+ this.state = "scheduled", this.isAsync ? (G.add(this), Le || (Le = !0, B.read(En), B.resolveKeyframes(Fn))) : (this.readKeyframes(), this.complete());
978
+ }
979
+ readKeyframes() {
980
+ const { unresolvedKeyframes: t, name: n, element: s, motionValue: i } = this;
981
+ if (t[0] === null) {
982
+ const r = i?.get(), a = t[t.length - 1];
983
+ if (r !== void 0)
984
+ t[0] = r;
985
+ else if (s && n) {
986
+ const o = s.readValue(n, a);
987
+ o != null && (t[0] = o);
988
+ }
989
+ t[0] === void 0 && (t[0] = a), i && r === void 0 && i.set(t[0]);
990
+ }
991
+ ri(t);
992
+ }
993
+ setFinalKeyframe() {
994
+ }
995
+ measureInitialState() {
996
+ }
997
+ renderEndStyles() {
998
+ }
999
+ measureEndState() {
1000
+ }
1001
+ complete(t = !1) {
1002
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), G.delete(this);
1003
+ }
1004
+ cancel() {
1005
+ this.state === "scheduled" && (G.delete(this), this.state = "pending");
1006
+ }
1007
+ resume() {
1008
+ this.state === "pending" && this.scheduleResolve();
1009
+ }
1010
+ }
1011
+ const mi = (e) => e.startsWith("--");
1012
+ function pi(e, t, n) {
1013
+ mi(t) ? e.style.setProperty(t, n) : e.style[t] = n;
1014
+ }
1015
+ const gi = /* @__PURE__ */ Xe(() => window.ScrollTimeline !== void 0), yi = {};
1016
+ function bi(e, t) {
1017
+ const n = /* @__PURE__ */ Xe(e);
1018
+ return () => yi[t] ?? n();
1019
+ }
1020
+ const Pn = /* @__PURE__ */ bi(() => {
1021
+ try {
1022
+ document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1023
+ } catch {
1024
+ return !1;
1025
+ }
1026
+ return !0;
1027
+ }, "linearEasing"), ae = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, It = {
1028
+ linear: "linear",
1029
+ ease: "ease",
1030
+ easeIn: "ease-in",
1031
+ easeOut: "ease-out",
1032
+ easeInOut: "ease-in-out",
1033
+ circIn: /* @__PURE__ */ ae([0, 0.65, 0.55, 1]),
1034
+ circOut: /* @__PURE__ */ ae([0.55, 0, 1, 0.45]),
1035
+ backIn: /* @__PURE__ */ ae([0.31, 0.01, 0.66, -0.59]),
1036
+ backOut: /* @__PURE__ */ ae([0.33, 1.53, 0.69, 0.99])
1037
+ };
1038
+ function Rn(e, t) {
1039
+ if (e)
1040
+ return typeof e == "function" ? Pn() ? Sn(e, t) : "ease-out" : hn(e) ? ae(e) : Array.isArray(e) ? e.map((n) => Rn(n, t) || It.easeOut) : It[e];
1041
+ }
1042
+ function Ti(e, t, n, { delay: s = 0, duration: i = 300, repeat: r = 0, repeatType: a = "loop", ease: o = "easeOut", times: u } = {}, c = void 0) {
1043
+ const l = {
1044
+ [t]: n
1045
+ };
1046
+ u && (l.offset = u);
1047
+ const f = Rn(o, i);
1048
+ Array.isArray(f) && (l.easing = f);
1049
+ const h = {
1050
+ delay: s,
1051
+ duration: i,
1052
+ easing: Array.isArray(f) ? "linear" : f,
1053
+ fill: "both",
1054
+ iterations: r + 1,
1055
+ direction: a === "reverse" ? "alternate" : "normal"
1056
+ };
1057
+ return c && (h.pseudoElement = c), e.animate(l, h);
1058
+ }
1059
+ function lt(e) {
1060
+ return typeof e == "function" && "applyToOptions" in e;
1061
+ }
1062
+ function vi({ type: e, ...t }) {
1063
+ return lt(e) && Pn() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
1064
+ }
1065
+ class Vi extends rt {
1066
+ constructor(t) {
1067
+ if (super(), this.finishedTime = null, this.isStopped = !1, !t)
1068
+ return;
1069
+ const { element: n, name: s, keyframes: i, pseudoElement: r, allowFlatten: a = !1, finalKeyframe: o, onComplete: u } = t;
1070
+ this.isPseudoElement = !!r, this.allowFlatten = a, this.options = t, I(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
1071
+ const c = vi(t);
1072
+ this.animation = Ti(n, s, i, c, r), c.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1073
+ if (this.finishedTime = this.time, !r) {
1074
+ const l = it(i, this.options, o, this.speed);
1075
+ this.updateMotionValue ? this.updateMotionValue(l) : pi(n, s, l), this.animation.cancel();
1076
+ }
1077
+ u?.(), this.notifyFinished();
1078
+ };
1079
+ }
1080
+ play() {
1081
+ this.isStopped || (this.animation.play(), this.state === "finished" && this.updateFinished());
1082
+ }
1083
+ pause() {
1084
+ this.animation.pause();
1085
+ }
1086
+ complete() {
1087
+ this.animation.finish?.();
1088
+ }
1089
+ cancel() {
1090
+ try {
1091
+ this.animation.cancel();
1092
+ } catch {
1093
+ }
1094
+ }
1095
+ stop() {
1096
+ if (this.isStopped)
1097
+ return;
1098
+ this.isStopped = !0;
1099
+ const { state: t } = this;
1100
+ t === "idle" || t === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
1101
+ }
1102
+ /**
1103
+ * WAAPI doesn't natively have any interruption capabilities.
1104
+ *
1105
+ * In this method, we commit styles back to the DOM before cancelling
1106
+ * the animation.
1107
+ *
1108
+ * This is designed to be overridden by NativeAnimationExtended, which
1109
+ * will create a renderless JS animation and sample it twice to calculate
1110
+ * its current value, "previous" value, and therefore allow
1111
+ * Motion to also correctly calculate velocity for any subsequent animation
1112
+ * while deferring the commit until the next animation frame.
1113
+ */
1114
+ commitStyles() {
1115
+ this.isPseudoElement || this.animation.commitStyles?.();
1116
+ }
1117
+ get duration() {
1118
+ const t = this.animation.effect?.getComputedTiming?.().duration || 0;
1119
+ return /* @__PURE__ */ R(Number(t));
1120
+ }
1121
+ get iterationDuration() {
1122
+ const { delay: t = 0 } = this.options || {};
1123
+ return this.duration + /* @__PURE__ */ R(t);
1124
+ }
1125
+ get time() {
1126
+ return /* @__PURE__ */ R(Number(this.animation.currentTime) || 0);
1127
+ }
1128
+ set time(t) {
1129
+ this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ O(t);
1130
+ }
1131
+ /**
1132
+ * The playback speed of the animation.
1133
+ * 1 = normal speed, 2 = double speed, 0.5 = half speed.
1134
+ */
1135
+ get speed() {
1136
+ return this.animation.playbackRate;
1137
+ }
1138
+ set speed(t) {
1139
+ t < 0 && (this.finishedTime = null), this.animation.playbackRate = t;
1140
+ }
1141
+ get state() {
1142
+ return this.finishedTime !== null ? "finished" : this.animation.playState;
1143
+ }
1144
+ get startTime() {
1145
+ return Number(this.animation.startTime);
1146
+ }
1147
+ set startTime(t) {
1148
+ this.animation.startTime = t;
1149
+ }
1150
+ /**
1151
+ * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
1152
+ */
1153
+ attachTimeline({ timeline: t, observe: n }) {
1154
+ return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && gi() ? (this.animation.timeline = t, Z) : n(this);
1155
+ }
1156
+ }
1157
+ const On = {
1158
+ anticipate: on,
1159
+ backInOut: an,
1160
+ circInOut: ln
1161
+ };
1162
+ function wi(e) {
1163
+ return e in On;
1164
+ }
1165
+ function Si(e) {
1166
+ typeof e.ease == "string" && wi(e.ease) && (e.ease = On[e.ease]);
1167
+ }
1168
+ const kt = 10;
1169
+ class xi extends Vi {
1170
+ constructor(t) {
1171
+ Si(t), Dn(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1172
+ }
1173
+ /**
1174
+ * WAAPI doesn't natively have any interruption capabilities.
1175
+ *
1176
+ * Rather than read commited styles back out of the DOM, we can
1177
+ * create a renderless JS animation and sample it twice to calculate
1178
+ * its current value, "previous" value, and therefore allow
1179
+ * Motion to calculate velocity for any subsequent animation.
1180
+ */
1181
+ updateMotionValue(t) {
1182
+ const { motionValue: n, onUpdate: s, onComplete: i, element: r, ...a } = this.options;
1183
+ if (!n)
1184
+ return;
1185
+ if (t !== void 0) {
1186
+ n.set(t);
1187
+ return;
1188
+ }
1189
+ const o = new at({
1190
+ ...a,
1191
+ autoplay: !1
1192
+ }), u = /* @__PURE__ */ O(this.finishedTime ?? this.time);
1193
+ n.setWithVelocity(o.sample(u - kt).value, o.sample(u).value, kt), o.stop();
1194
+ }
1195
+ }
1196
+ const Kt = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1197
+ (Q.test(e) || e === "0") && // And it contains numbers and/or colors
1198
+ !e.startsWith("url("));
1199
+ function Ai(e) {
1200
+ const t = e[0];
1201
+ if (e.length === 1)
1202
+ return !0;
1203
+ for (let n = 0; n < e.length; n++)
1204
+ if (e[n] !== t)
1205
+ return !0;
1206
+ }
1207
+ function Mi(e, t, n, s) {
1208
+ const i = e[0];
1209
+ if (i === null)
1210
+ return !1;
1211
+ if (t === "display" || t === "visibility")
1212
+ return !0;
1213
+ const r = e[e.length - 1], a = Kt(i, t), o = Kt(r, t);
1214
+ return he(a === o, `You are trying to animate ${t} from "${i}" to "${r}". "${a ? r : i}" is not an animatable value.`, "value-not-animatable"), !a || !o ? !1 : Ai(e) || (n === "spring" || lt(n)) && s;
1215
+ }
1216
+ function _e(e) {
1217
+ e.duration = 0, e.type = "keyframes";
1218
+ }
1219
+ const Ci = /* @__PURE__ */ new Set([
1220
+ "opacity",
1221
+ "clipPath",
1222
+ "filter",
1223
+ "transform"
1224
+ // TODO: Could be re-enabled now we have support for linear() easing
1225
+ // "background-color"
1226
+ ]), Di = /* @__PURE__ */ Xe(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1227
+ function Fi(e) {
1228
+ const { motionValue: t, name: n, repeatDelay: s, repeatType: i, damping: r, type: a } = e;
1229
+ if (!(t?.owner?.current instanceof HTMLElement))
1230
+ return !1;
1231
+ const { onUpdate: u, transformTemplate: c } = t.owner.getProps();
1232
+ return Di() && n && Ci.has(n) && (n !== "transform" || !c) && /**
1233
+ * If we're outputting values to onUpdate then we can't use WAAPI as there's
1234
+ * no way to read the value from WAAPI every frame.
1235
+ */
1236
+ !u && !s && i !== "mirror" && r !== 0 && a !== "inertia";
1237
+ }
1238
+ const Ei = 40;
1239
+ class Pi extends rt {
1240
+ constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: r = 0, repeatType: a = "loop", keyframes: o, name: u, motionValue: c, element: l, ...f }) {
1241
+ super(), this.stop = () => {
1242
+ this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
1243
+ }, this.createdAt = P.now();
1244
+ const h = {
1245
+ autoplay: t,
1246
+ delay: n,
1247
+ type: s,
1248
+ repeat: i,
1249
+ repeatDelay: r,
1250
+ repeatType: a,
1251
+ name: u,
1252
+ motionValue: c,
1253
+ element: l,
1254
+ ...f
1255
+ }, p = l?.KeyframeResolver || ot;
1256
+ this.keyframeResolver = new p(o, (y, b, v) => this.onKeyframesResolved(y, b, h, !v), u, c, l), this.keyframeResolver?.scheduleResolve();
1257
+ }
1258
+ onKeyframesResolved(t, n, s, i) {
1259
+ this.keyframeResolver = void 0;
1260
+ const { name: r, type: a, velocity: o, delay: u, isHandoff: c, onUpdate: l } = s;
1261
+ this.resolvedAt = P.now(), Mi(t, r, a, o) || ((K.instantAnimations || !u) && l?.(it(t, s, n)), t[0] = t[t.length - 1], _e(s), s.repeat = 0);
1262
+ const h = {
1263
+ startTime: i ? this.resolvedAt ? this.resolvedAt - this.createdAt > Ei ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1264
+ finalKeyframe: n,
1265
+ ...s,
1266
+ keyframes: t
1267
+ }, p = !c && Fi(h) ? new xi({
1268
+ ...h,
1269
+ element: h.motionValue.owner.current
1270
+ }) : new at(h);
1271
+ p.finished.then(() => this.notifyFinished()).catch(Z), this.pendingTimeline && (this.stopTimeline = p.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = p;
1272
+ }
1273
+ get finished() {
1274
+ return this._animation ? this.animation.finished : this._finished;
1275
+ }
1276
+ then(t, n) {
1277
+ return this.finished.finally(t).then(() => {
1278
+ });
1279
+ }
1280
+ get animation() {
1281
+ return this._animation || (this.keyframeResolver?.resume(), di()), this._animation;
1282
+ }
1283
+ get duration() {
1284
+ return this.animation.duration;
1285
+ }
1286
+ get iterationDuration() {
1287
+ return this.animation.iterationDuration;
1288
+ }
1289
+ get time() {
1290
+ return this.animation.time;
1291
+ }
1292
+ set time(t) {
1293
+ this.animation.time = t;
1294
+ }
1295
+ get speed() {
1296
+ return this.animation.speed;
1297
+ }
1298
+ get state() {
1299
+ return this.animation.state;
1300
+ }
1301
+ set speed(t) {
1302
+ this.animation.speed = t;
1303
+ }
1304
+ get startTime() {
1305
+ return this.animation.startTime;
1306
+ }
1307
+ attachTimeline(t) {
1308
+ return this._animation ? this.stopTimeline = this.animation.attachTimeline(t) : this.pendingTimeline = t, () => this.stop();
1309
+ }
1310
+ play() {
1311
+ this.animation.play();
1312
+ }
1313
+ pause() {
1314
+ this.animation.pause();
1315
+ }
1316
+ complete() {
1317
+ this.animation.complete();
1318
+ }
1319
+ cancel() {
1320
+ this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
1321
+ }
1322
+ }
1323
+ class Ri {
1324
+ constructor(t) {
1325
+ this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
1326
+ }
1327
+ get finished() {
1328
+ return Promise.all(this.animations.map((t) => t.finished));
1329
+ }
1330
+ /**
1331
+ * TODO: Filter out cancelled or stopped animations before returning
1332
+ */
1333
+ getAll(t) {
1334
+ return this.animations[0][t];
1335
+ }
1336
+ setAll(t, n) {
1337
+ for (let s = 0; s < this.animations.length; s++)
1338
+ this.animations[s][t] = n;
1339
+ }
1340
+ attachTimeline(t) {
1341
+ const n = this.animations.map((s) => s.attachTimeline(t));
1342
+ return () => {
1343
+ n.forEach((s, i) => {
1344
+ s && s(), this.animations[i].stop();
1345
+ });
1346
+ };
1347
+ }
1348
+ get time() {
1349
+ return this.getAll("time");
1350
+ }
1351
+ set time(t) {
1352
+ this.setAll("time", t);
1353
+ }
1354
+ get speed() {
1355
+ return this.getAll("speed");
1356
+ }
1357
+ set speed(t) {
1358
+ this.setAll("speed", t);
1359
+ }
1360
+ get state() {
1361
+ return this.getAll("state");
1362
+ }
1363
+ get startTime() {
1364
+ return this.getAll("startTime");
1365
+ }
1366
+ get duration() {
1367
+ return Bt(this.animations, "duration");
1368
+ }
1369
+ get iterationDuration() {
1370
+ return Bt(this.animations, "iterationDuration");
1371
+ }
1372
+ runAll(t) {
1373
+ this.animations.forEach((n) => n[t]());
1374
+ }
1375
+ play() {
1376
+ this.runAll("play");
1377
+ }
1378
+ pause() {
1379
+ this.runAll("pause");
1380
+ }
1381
+ cancel() {
1382
+ this.runAll("cancel");
1383
+ }
1384
+ complete() {
1385
+ this.runAll("complete");
1386
+ }
1387
+ }
1388
+ function Bt(e, t) {
1389
+ let n = 0;
1390
+ for (let s = 0; s < e.length; s++) {
1391
+ const i = e[s][t];
1392
+ i !== null && i > n && (n = i);
1393
+ }
1394
+ return n;
1395
+ }
1396
+ class Oi extends Ri {
1397
+ then(t, n) {
1398
+ return this.finished.finally(t).then(() => {
1399
+ });
1400
+ }
1401
+ }
1402
+ const Ni = (
1403
+ // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1404
+ /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1405
+ );
1406
+ function Ii(e) {
1407
+ const t = Ni.exec(e);
1408
+ if (!t)
1409
+ return [,];
1410
+ const [, n, s, i] = t;
1411
+ return [`--${n ?? s}`, i];
1412
+ }
1413
+ const ki = 4;
1414
+ function Nn(e, t, n = 1) {
1415
+ I(n <= ki, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1416
+ const [s, i] = Ii(e);
1417
+ if (!s)
1418
+ return;
1419
+ const r = window.getComputedStyle(t).getPropertyValue(s);
1420
+ if (r) {
1421
+ const a = r.trim();
1422
+ return Ht(a) ? parseFloat(a) : a;
1423
+ }
1424
+ return Qe(i) ? Nn(i, t, n + 1) : i;
1425
+ }
1426
+ function In(e, t) {
1427
+ return e?.[t] ?? e?.default ?? e;
1428
+ }
1429
+ const kn = /* @__PURE__ */ new Set([
1430
+ "width",
1431
+ "height",
1432
+ "top",
1433
+ "left",
1434
+ "right",
1435
+ "bottom",
1436
+ ...ee
1437
+ ]), Ki = {
1438
+ test: (e) => e === "auto",
1439
+ parse: (e) => e
1440
+ }, Kn = (e) => (t) => t.test(e), Bn = [J, d, q, L, Ds, Cs, Ki], $t = (e) => Bn.find(Kn(e));
1441
+ function Bi(e) {
1442
+ return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Zt(e) : !0;
1443
+ }
1444
+ const $i = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1445
+ function Li(e) {
1446
+ const [t, n] = e.slice(0, -1).split("(");
1447
+ if (t === "drop-shadow")
1448
+ return e;
1449
+ const [s] = n.match(et) || [];
1450
+ if (!s)
1451
+ return e;
1452
+ const i = n.replace(s, "");
1453
+ let r = $i.has(t) ? 1 : 0;
1454
+ return s !== n && (r *= 100), t + "(" + r + i + ")";
1455
+ }
1456
+ const Wi = /\b([a-z-]*)\(.*?\)/gu, Ue = {
1457
+ ...Q,
1458
+ getAnimatableNone: (e) => {
1459
+ const t = e.match(Wi);
1460
+ return t ? t.map(Li).join(" ") : e;
1461
+ }
1462
+ }, Lt = {
1463
+ ...J,
1464
+ transform: Math.round
1465
+ }, ji = {
1466
+ rotate: L,
1467
+ rotateX: L,
1468
+ rotateY: L,
1469
+ rotateZ: L,
1470
+ scale: Te,
1471
+ scaleX: Te,
1472
+ scaleY: Te,
1473
+ scaleZ: Te,
1474
+ skew: L,
1475
+ skewX: L,
1476
+ skewY: L,
1477
+ distance: d,
1478
+ translateX: d,
1479
+ translateY: d,
1480
+ translateZ: d,
1481
+ x: d,
1482
+ y: d,
1483
+ z: d,
1484
+ perspective: d,
1485
+ transformPerspective: d,
1486
+ opacity: le,
1487
+ originX: Mt,
1488
+ originY: Mt,
1489
+ originZ: d
1490
+ }, ut = {
1491
+ // Border props
1492
+ borderWidth: d,
1493
+ borderTopWidth: d,
1494
+ borderRightWidth: d,
1495
+ borderBottomWidth: d,
1496
+ borderLeftWidth: d,
1497
+ borderRadius: d,
1498
+ radius: d,
1499
+ borderTopLeftRadius: d,
1500
+ borderTopRightRadius: d,
1501
+ borderBottomRightRadius: d,
1502
+ borderBottomLeftRadius: d,
1503
+ // Positioning props
1504
+ width: d,
1505
+ maxWidth: d,
1506
+ height: d,
1507
+ maxHeight: d,
1508
+ top: d,
1509
+ right: d,
1510
+ bottom: d,
1511
+ left: d,
1512
+ // Spacing props
1513
+ padding: d,
1514
+ paddingTop: d,
1515
+ paddingRight: d,
1516
+ paddingBottom: d,
1517
+ paddingLeft: d,
1518
+ margin: d,
1519
+ marginTop: d,
1520
+ marginRight: d,
1521
+ marginBottom: d,
1522
+ marginLeft: d,
1523
+ // Misc
1524
+ backgroundPositionX: d,
1525
+ backgroundPositionY: d,
1526
+ ...ji,
1527
+ zIndex: Lt,
1528
+ // SVG
1529
+ fillOpacity: le,
1530
+ strokeOpacity: le,
1531
+ numOctaves: Lt
1532
+ }, _i = {
1533
+ ...ut,
1534
+ // Color props
1535
+ color: D,
1536
+ backgroundColor: D,
1537
+ outlineColor: D,
1538
+ fill: D,
1539
+ stroke: D,
1540
+ // Border props
1541
+ borderColor: D,
1542
+ borderTopColor: D,
1543
+ borderRightColor: D,
1544
+ borderBottomColor: D,
1545
+ borderLeftColor: D,
1546
+ filter: Ue,
1547
+ WebkitFilter: Ue
1548
+ }, $n = (e) => _i[e];
1549
+ function Ln(e, t) {
1550
+ let n = $n(e);
1551
+ return n !== Ue && (n = Q), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1552
+ }
1553
+ const Ui = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1554
+ function Gi(e, t, n) {
1555
+ let s = 0, i;
1556
+ for (; s < e.length && !i; ) {
1557
+ const r = e[s];
1558
+ typeof r == "string" && !Ui.has(r) && ue(r).values.length && (i = e[s]), s++;
1559
+ }
1560
+ if (i && n)
1561
+ for (const r of t)
1562
+ e[r] = Ln(n, i);
1563
+ }
1564
+ class Yi extends ot {
1565
+ constructor(t, n, s, i, r) {
1566
+ super(t, n, s, i, r, !0);
1567
+ }
1568
+ readKeyframes() {
1569
+ const { unresolvedKeyframes: t, element: n, name: s } = this;
1570
+ if (!n || !n.current)
1571
+ return;
1572
+ super.readKeyframes();
1573
+ for (let u = 0; u < t.length; u++) {
1574
+ let c = t[u];
1575
+ if (typeof c == "string" && (c = c.trim(), Qe(c))) {
1576
+ const l = Nn(c, n.current);
1577
+ l !== void 0 && (t[u] = l), u === t.length - 1 && (this.finalKeyframe = c);
1578
+ }
1579
+ }
1580
+ if (this.resolveNoneKeyframes(), !kn.has(s) || t.length !== 2)
1581
+ return;
1582
+ const [i, r] = t, a = $t(i), o = $t(r);
1583
+ if (a !== o)
1584
+ if (Nt(a) && Nt(o))
1585
+ for (let u = 0; u < t.length; u++) {
1586
+ const c = t[u];
1587
+ typeof c == "string" && (t[u] = parseFloat(c));
1588
+ }
1589
+ else U[s] && (this.needsMeasurement = !0);
1590
+ }
1591
+ resolveNoneKeyframes() {
1592
+ const { unresolvedKeyframes: t, name: n } = this, s = [];
1593
+ for (let i = 0; i < t.length; i++)
1594
+ (t[i] === null || Bi(t[i])) && s.push(i);
1595
+ s.length && Gi(t, s, n);
1596
+ }
1597
+ measureInitialState() {
1598
+ const { element: t, unresolvedKeyframes: n, name: s } = this;
1599
+ if (!t || !t.current)
1600
+ return;
1601
+ s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = U[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
1602
+ const i = n[n.length - 1];
1603
+ i !== void 0 && t.getValue(s, i).jump(i, !1);
1604
+ }
1605
+ measureEndState() {
1606
+ const { element: t, name: n, unresolvedKeyframes: s } = this;
1607
+ if (!t || !t.current)
1608
+ return;
1609
+ const i = t.getValue(n);
1610
+ i && i.jump(this.measuredOrigin, !1);
1611
+ const r = s.length - 1, a = s[r];
1612
+ s[r] = U[n](t.measureViewportBox(), window.getComputedStyle(t.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), this.removedTransforms?.length && this.removedTransforms.forEach(([o, u]) => {
1613
+ t.getValue(o).set(u);
1614
+ }), this.resolveNoneKeyframes();
1615
+ }
1616
+ }
1617
+ function zi(e, t, n) {
1618
+ if (e instanceof EventTarget)
1619
+ return [e];
1620
+ if (typeof e == "string") {
1621
+ let s = document;
1622
+ t && (s = t.current);
1623
+ const i = n?.[e] ?? s.querySelectorAll(e);
1624
+ return i ? Array.from(i) : [];
1625
+ }
1626
+ return Array.from(e);
1627
+ }
1628
+ const Wn = (e, t) => t && typeof e == "number" ? t.transform(e) : e, Wt = 30, Xi = (e) => !isNaN(parseFloat(e));
1629
+ class qi {
1630
+ /**
1631
+ * @param init - The initiating value
1632
+ * @param config - Optional configuration options
1633
+ *
1634
+ * - `transformer`: A function to transform incoming values with.
1635
+ */
1636
+ constructor(t, n = {}) {
1637
+ this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s) => {
1638
+ const i = P.now();
1639
+ if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
1640
+ for (const r of this.dependents)
1641
+ r.dirty();
1642
+ }, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
1643
+ }
1644
+ setCurrent(t) {
1645
+ this.current = t, this.updatedAt = P.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = Xi(this.current));
1646
+ }
1647
+ setPrevFrameValue(t = this.current) {
1648
+ this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
1649
+ }
1650
+ /**
1651
+ * Adds a function that will be notified when the `MotionValue` is updated.
1652
+ *
1653
+ * It returns a function that, when called, will cancel the subscription.
1654
+ *
1655
+ * When calling `onChange` inside a React component, it should be wrapped with the
1656
+ * `useEffect` hook. As it returns an unsubscribe function, this should be returned
1657
+ * from the `useEffect` function to ensure you don't add duplicate subscribers..
1658
+ *
1659
+ * ```jsx
1660
+ * export const MyComponent = () => {
1661
+ * const x = useMotionValue(0)
1662
+ * const y = useMotionValue(0)
1663
+ * const opacity = useMotionValue(1)
1664
+ *
1665
+ * useEffect(() => {
1666
+ * function updateOpacity() {
1667
+ * const maxXY = Math.max(x.get(), y.get())
1668
+ * const newOpacity = transform(maxXY, [0, 100], [1, 0])
1669
+ * opacity.set(newOpacity)
1670
+ * }
1671
+ *
1672
+ * const unsubscribeX = x.on("change", updateOpacity)
1673
+ * const unsubscribeY = y.on("change", updateOpacity)
1674
+ *
1675
+ * return () => {
1676
+ * unsubscribeX()
1677
+ * unsubscribeY()
1678
+ * }
1679
+ * }, [])
1680
+ *
1681
+ * return <motion.div style={{ x }} />
1682
+ * }
1683
+ * ```
1684
+ *
1685
+ * @param subscriber - A function that receives the latest value.
1686
+ * @returns A function that, when called, will cancel this subscription.
1687
+ *
1688
+ * @deprecated
1689
+ */
1690
+ onChange(t) {
1691
+ return process.env.NODE_ENV !== "production" && en(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
1692
+ }
1693
+ on(t, n) {
1694
+ this.events[t] || (this.events[t] = new Jt());
1695
+ const s = this.events[t].add(n);
1696
+ return t === "change" ? () => {
1697
+ s(), B.read(() => {
1698
+ this.events.change.getSize() || this.stop();
1699
+ });
1700
+ } : s;
1701
+ }
1702
+ clearListeners() {
1703
+ for (const t in this.events)
1704
+ this.events[t].clear();
1705
+ }
1706
+ /**
1707
+ * Attaches a passive effect to the `MotionValue`.
1708
+ */
1709
+ attach(t, n) {
1710
+ this.passiveEffect = t, this.stopPassiveEffect = n;
1711
+ }
1712
+ /**
1713
+ * Sets the state of the `MotionValue`.
1714
+ *
1715
+ * @remarks
1716
+ *
1717
+ * ```jsx
1718
+ * const x = useMotionValue(0)
1719
+ * x.set(10)
1720
+ * ```
1721
+ *
1722
+ * @param latest - Latest value to set.
1723
+ * @param render - Whether to notify render subscribers. Defaults to `true`
1724
+ *
1725
+ * @public
1726
+ */
1727
+ set(t) {
1728
+ this.passiveEffect ? this.passiveEffect(t, this.updateAndNotify) : this.updateAndNotify(t);
1729
+ }
1730
+ setWithVelocity(t, n, s) {
1731
+ this.set(n), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - s;
1732
+ }
1733
+ /**
1734
+ * Set the state of the `MotionValue`, stopping any active animations,
1735
+ * effects, and resets velocity to `0`.
1736
+ */
1737
+ jump(t, n = !0) {
1738
+ this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1739
+ }
1740
+ dirty() {
1741
+ this.events.change?.notify(this.current);
1742
+ }
1743
+ addDependent(t) {
1744
+ this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(t);
1745
+ }
1746
+ removeDependent(t) {
1747
+ this.dependents && this.dependents.delete(t);
1748
+ }
1749
+ /**
1750
+ * Returns the latest state of `MotionValue`
1751
+ *
1752
+ * @returns - The latest state of `MotionValue`
1753
+ *
1754
+ * @public
1755
+ */
1756
+ get() {
1757
+ return this.current;
1758
+ }
1759
+ /**
1760
+ * @public
1761
+ */
1762
+ getPrevious() {
1763
+ return this.prev;
1764
+ }
1765
+ /**
1766
+ * Returns the latest velocity of `MotionValue`
1767
+ *
1768
+ * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
1769
+ *
1770
+ * @public
1771
+ */
1772
+ getVelocity() {
1773
+ const t = P.now();
1774
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Wt)
1775
+ return 0;
1776
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, Wt);
1777
+ return Qt(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1778
+ }
1779
+ /**
1780
+ * Registers a new animation to control this `MotionValue`. Only one
1781
+ * animation can drive a `MotionValue` at one time.
1782
+ *
1783
+ * ```jsx
1784
+ * value.start()
1785
+ * ```
1786
+ *
1787
+ * @param animation - A function that starts the provided animation
1788
+ */
1789
+ start(t) {
1790
+ return this.stop(), new Promise((n) => {
1791
+ this.hasAnimated = !0, this.animation = t(n), this.events.animationStart && this.events.animationStart.notify();
1792
+ }).then(() => {
1793
+ this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
1794
+ });
1795
+ }
1796
+ /**
1797
+ * Stop the currently active animation.
1798
+ *
1799
+ * @public
1800
+ */
1801
+ stop() {
1802
+ this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
1803
+ }
1804
+ /**
1805
+ * Returns `true` if this value is currently animating.
1806
+ *
1807
+ * @public
1808
+ */
1809
+ isAnimating() {
1810
+ return !!this.animation;
1811
+ }
1812
+ clearAnimation() {
1813
+ delete this.animation;
1814
+ }
1815
+ /**
1816
+ * Destroy and clean up subscribers to this `MotionValue`.
1817
+ *
1818
+ * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
1819
+ * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
1820
+ * created a `MotionValue` via the `motionValue` function.
1821
+ *
1822
+ * @public
1823
+ */
1824
+ destroy() {
1825
+ this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1826
+ }
1827
+ }
1828
+ function ce(e, t) {
1829
+ return new qi(e, t);
1830
+ }
1831
+ const { schedule: Hi } = /* @__PURE__ */ dn(queueMicrotask, !1);
1832
+ function jn(e) {
1833
+ return rs(e) && "ownerSVGElement" in e;
1834
+ }
1835
+ function Zi(e) {
1836
+ return jn(e) && e.tagName === "svg";
1837
+ }
1838
+ const F = (e) => !!(e && e.getVelocity), Ji = [...Bn, D, Q], Qi = (e) => Ji.find(Kn(e)), jt = {
1839
+ animation: [
1840
+ "animate",
1841
+ "variants",
1842
+ "whileHover",
1843
+ "whileTap",
1844
+ "exit",
1845
+ "whileInView",
1846
+ "whileFocus",
1847
+ "whileDrag"
1848
+ ],
1849
+ exit: ["exit"],
1850
+ drag: ["drag", "dragControls"],
1851
+ focus: ["whileFocus"],
1852
+ hover: ["whileHover", "onHoverStart", "onHoverEnd"],
1853
+ tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
1854
+ pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
1855
+ inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
1856
+ layout: ["layout", "layoutId"]
1857
+ }, Ge = {};
1858
+ for (const e in jt)
1859
+ Ge[e] = {
1860
+ isEnabled: (t) => jt[e].some((n) => !!t[n])
1861
+ };
1862
+ function er(e) {
1863
+ return e !== null && typeof e == "object" && typeof e.start == "function";
1864
+ }
1865
+ function tr(e) {
1866
+ return typeof e == "string" || Array.isArray(e);
1867
+ }
1868
+ const nr = [
1869
+ "animate",
1870
+ "whileInView",
1871
+ "whileFocus",
1872
+ "whileHover",
1873
+ "whileTap",
1874
+ "whileDrag",
1875
+ "exit"
1876
+ ], sr = ["initial", ...nr];
1877
+ function _n(e) {
1878
+ return er(e.animate) || sr.some((t) => tr(e[t]));
1879
+ }
1880
+ function ir(e) {
1881
+ return !!(_n(e) || e.variants);
1882
+ }
1883
+ const rr = {};
1884
+ function ar(e, { layout: t, layoutId: n }) {
1885
+ return te.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!rr[e] || e === "opacity");
1886
+ }
1887
+ const or = {
1888
+ x: "translateX",
1889
+ y: "translateY",
1890
+ z: "translateZ",
1891
+ transformPerspective: "perspective"
1892
+ }, lr = ee.length;
1893
+ function ur(e, t, n) {
1894
+ let s = "", i = !0;
1895
+ for (let r = 0; r < lr; r++) {
1896
+ const a = ee[r], o = e[a];
1897
+ if (o === void 0)
1898
+ continue;
1899
+ let u = !0;
1900
+ if (typeof o == "number" ? u = o === (a.startsWith("scale") ? 1 : 0) : u = parseFloat(o) === 0, !u || n) {
1901
+ const c = Wn(o, ut[a]);
1902
+ if (!u) {
1903
+ i = !1;
1904
+ const l = or[a] || a;
1905
+ s += `${l}(${c}) `;
1906
+ }
1907
+ n && (t[a] = c);
1908
+ }
1909
+ }
1910
+ return s = s.trim(), n ? s = n(t, i ? "" : s) : i && (s = "none"), s;
1911
+ }
1912
+ function Un(e, t, n) {
1913
+ const { style: s, vars: i, transformOrigin: r } = e;
1914
+ let a = !1, o = !1;
1915
+ for (const u in t) {
1916
+ const c = t[u];
1917
+ if (te.has(u)) {
1918
+ a = !0;
1919
+ continue;
1920
+ } else if (pn(u)) {
1921
+ i[u] = c;
1922
+ continue;
1923
+ } else {
1924
+ const l = Wn(c, ut[u]);
1925
+ u.startsWith("origin") ? (o = !0, r[u] = l) : s[u] = l;
1926
+ }
1927
+ }
1928
+ if (t.transform || (a || n ? s.transform = ur(t, e.transform, n) : s.transform && (s.transform = "none")), o) {
1929
+ const { originX: u = "50%", originY: c = "50%", originZ: l = 0 } = r;
1930
+ s.transformOrigin = `${u} ${c} ${l}`;
1931
+ }
1932
+ }
1933
+ const cr = {
1934
+ offset: "stroke-dashoffset",
1935
+ array: "stroke-dasharray"
1936
+ }, fr = {
1937
+ offset: "strokeDashoffset",
1938
+ array: "strokeDasharray"
1939
+ };
1940
+ function hr(e, t, n = 1, s = 0, i = !0) {
1941
+ e.pathLength = 1;
1942
+ const r = i ? cr : fr;
1943
+ e[r.offset] = d.transform(-s);
1944
+ const a = d.transform(t), o = d.transform(n);
1945
+ e[r.array] = `${a} ${o}`;
1946
+ }
1947
+ function dr(e, {
1948
+ attrX: t,
1949
+ attrY: n,
1950
+ attrScale: s,
1951
+ pathLength: i,
1952
+ pathSpacing: r = 1,
1953
+ pathOffset: a = 0,
1954
+ // This is object creation, which we try to avoid per-frame.
1955
+ ...o
1956
+ }, u, c, l) {
1957
+ if (Un(e, o, c), u) {
1958
+ e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
1959
+ return;
1960
+ }
1961
+ e.attrs = e.style, e.style = {};
1962
+ const { attrs: f, style: h } = e;
1963
+ f.transform && (h.transform = f.transform, delete f.transform), (h.transform || f.transformOrigin) && (h.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), h.transform && (h.transformBox = l?.transformBox ?? "fill-box", delete f.transformBox), t !== void 0 && (f.x = t), n !== void 0 && (f.y = n), s !== void 0 && (f.scale = s), i !== void 0 && hr(f, i, r, a, !1);
1964
+ }
1965
+ const mr = (e) => typeof e == "string" && e.toLowerCase() === "svg";
1966
+ function _t(e) {
1967
+ const t = [{}, {}];
1968
+ return e?.values.forEach((n, s) => {
1969
+ t[0][s] = n.get(), t[1][s] = n.getVelocity();
1970
+ }), t;
1971
+ }
1972
+ function Gn(e, t, n, s) {
1973
+ if (typeof t == "function") {
1974
+ const [i, r] = _t(s);
1975
+ t = t(n !== void 0 ? n : e.custom, i, r);
1976
+ }
1977
+ if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
1978
+ const [i, r] = _t(s);
1979
+ t = t(n !== void 0 ? n : e.custom, i, r);
1980
+ }
1981
+ return t;
1982
+ }
1983
+ function Yn(e, t, n) {
1984
+ const { style: s } = e, i = {};
1985
+ for (const r in s)
1986
+ (F(s[r]) || t.style && F(t.style[r]) || ar(r, e) || n?.getValue(r)?.liveStyle !== void 0) && (i[r] = s[r]);
1987
+ return i;
1988
+ }
1989
+ function pr(e, t, n) {
1990
+ const s = Yn(e, t, n);
1991
+ for (const i in e)
1992
+ if (F(e[i]) || F(t[i])) {
1993
+ const r = ee.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
1994
+ s[r] = e[i];
1995
+ }
1996
+ return s;
1997
+ }
1998
+ const ct = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), gr = "framerAppearId", yr = "data-" + ct(gr);
1999
+ function br({ top: e, left: t, right: n, bottom: s }) {
2000
+ return {
2001
+ x: { min: t, max: n },
2002
+ y: { min: e, max: s }
2003
+ };
2004
+ }
2005
+ function Tr(e, t) {
2006
+ if (!t)
2007
+ return e;
2008
+ const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
2009
+ return {
2010
+ top: n.y,
2011
+ left: n.x,
2012
+ bottom: s.y,
2013
+ right: s.x
2014
+ };
2015
+ }
2016
+ function vr(e, t) {
2017
+ return br(Tr(e.getBoundingClientRect(), t));
2018
+ }
2019
+ const Ut = () => ({ min: 0, max: 0 }), ft = () => ({
2020
+ x: Ut(),
2021
+ y: Ut()
2022
+ }), Ye = { current: null }, zn = { current: !1 };
2023
+ function Vr() {
2024
+ if (zn.current = !0, !!as)
2025
+ if (window.matchMedia) {
2026
+ const e = window.matchMedia("(prefers-reduced-motion)"), t = () => Ye.current = e.matches;
2027
+ e.addEventListener("change", t), t();
2028
+ } else
2029
+ Ye.current = !1;
2030
+ }
2031
+ const fe = /* @__PURE__ */ new WeakMap();
2032
+ function wr(e, t, n) {
2033
+ for (const s in t) {
2034
+ const i = t[s], r = n[s];
2035
+ if (F(i))
2036
+ e.addValue(s, i);
2037
+ else if (F(r))
2038
+ e.addValue(s, ce(i, { owner: e }));
2039
+ else if (r !== i)
2040
+ if (e.hasValue(s)) {
2041
+ const a = e.getValue(s);
2042
+ a.liveStyle === !0 ? a.jump(i) : a.hasAnimated || a.set(i);
2043
+ } else {
2044
+ const a = e.getStaticValue(s);
2045
+ e.addValue(s, ce(a !== void 0 ? a : i, { owner: e }));
2046
+ }
2047
+ }
2048
+ for (const s in n)
2049
+ t[s] === void 0 && e.removeValue(s);
2050
+ return t;
2051
+ }
2052
+ const Gt = [
2053
+ "AnimationStart",
2054
+ "AnimationComplete",
2055
+ "Update",
2056
+ "BeforeLayoutMeasure",
2057
+ "LayoutMeasure",
2058
+ "LayoutAnimationStart",
2059
+ "LayoutAnimationComplete"
2060
+ ];
2061
+ class Xn {
2062
+ /**
2063
+ * This method takes React props and returns found MotionValues. For example, HTML
2064
+ * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
2065
+ *
2066
+ * This isn't an abstract method as it needs calling in the constructor, but it is
2067
+ * intended to be one.
2068
+ */
2069
+ scrapeMotionValuesFromProps(t, n, s) {
2070
+ return {};
2071
+ }
2072
+ constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: r, visualState: a }, o = {}) {
2073
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = ot, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2074
+ this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2075
+ }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2076
+ const h = P.now();
2077
+ this.renderScheduledAt < h && (this.renderScheduledAt = h, B.render(this.render, !1, !0));
2078
+ };
2079
+ const { latestValues: u, renderState: c } = a;
2080
+ this.latestValues = u, this.baseTarget = { ...u }, this.initialValues = n.initial ? { ...u } : {}, this.renderState = c, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = i, this.options = o, this.blockInitialAnimation = !!r, this.isControllingVariants = _n(n), this.isVariantNode = ir(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2081
+ const { willChange: l, ...f } = this.scrapeMotionValuesFromProps(n, {}, this);
2082
+ for (const h in f) {
2083
+ const p = f[h];
2084
+ u[h] !== void 0 && F(p) && p.set(u[h]);
2085
+ }
2086
+ }
2087
+ mount(t) {
2088
+ this.current = t, fe.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), zn.current || Vr(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : Ye.current, process.env.NODE_ENV !== "production" && en(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.parent?.addChild(this), this.update(this.props, this.presenceContext);
2089
+ }
2090
+ unmount() {
2091
+ this.projection && this.projection.unmount(), Pe(this.notifyUpdate), Pe(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
2092
+ for (const t in this.events)
2093
+ this.events[t].clear();
2094
+ for (const t in this.features) {
2095
+ const n = this.features[t];
2096
+ n && (n.unmount(), n.isMounted = !1);
2097
+ }
2098
+ this.current = null;
2099
+ }
2100
+ addChild(t) {
2101
+ this.children.add(t), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(t);
2102
+ }
2103
+ removeChild(t) {
2104
+ this.children.delete(t), this.enteringChildren && this.enteringChildren.delete(t);
2105
+ }
2106
+ bindToMotionValue(t, n) {
2107
+ this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
2108
+ const s = te.has(t);
2109
+ s && this.onBindTransform && this.onBindTransform();
2110
+ const i = n.on("change", (a) => {
2111
+ this.latestValues[t] = a, this.props.onUpdate && B.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
2112
+ });
2113
+ let r;
2114
+ window.MotionCheckAppearSync && (r = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
2115
+ i(), r && r(), n.owner && n.stop();
2116
+ });
2117
+ }
2118
+ sortNodePosition(t) {
2119
+ return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
2120
+ }
2121
+ updateFeatures() {
2122
+ let t = "animation";
2123
+ for (t in Ge) {
2124
+ const n = Ge[t];
2125
+ if (!n)
2126
+ continue;
2127
+ const { isEnabled: s, Feature: i } = n;
2128
+ if (!this.features[t] && i && s(this.props) && (this.features[t] = new i(this)), this.features[t]) {
2129
+ const r = this.features[t];
2130
+ r.isMounted ? r.update() : (r.mount(), r.isMounted = !0);
2131
+ }
2132
+ }
2133
+ }
2134
+ triggerBuild() {
2135
+ this.build(this.renderState, this.latestValues, this.props);
2136
+ }
2137
+ /**
2138
+ * Measure the current viewport box with or without transforms.
2139
+ * Only measures axis-aligned boxes, rotate and skew must be manually
2140
+ * removed with a re-render to work.
2141
+ */
2142
+ measureViewportBox() {
2143
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : ft();
2144
+ }
2145
+ getStaticValue(t) {
2146
+ return this.latestValues[t];
2147
+ }
2148
+ setStaticValue(t, n) {
2149
+ this.latestValues[t] = n;
2150
+ }
2151
+ /**
2152
+ * Update the provided props. Ensure any newly-added motion values are
2153
+ * added to our map, old ones removed, and listeners updated.
2154
+ */
2155
+ update(t, n) {
2156
+ (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2157
+ for (let s = 0; s < Gt.length; s++) {
2158
+ const i = Gt[s];
2159
+ this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
2160
+ const r = "on" + i, a = t[r];
2161
+ a && (this.propEventSubscriptions[i] = this.on(i, a));
2162
+ }
2163
+ this.prevMotionValues = wr(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2164
+ }
2165
+ getProps() {
2166
+ return this.props;
2167
+ }
2168
+ /**
2169
+ * Returns the variant definition with a given name.
2170
+ */
2171
+ getVariant(t) {
2172
+ return this.props.variants ? this.props.variants[t] : void 0;
2173
+ }
2174
+ /**
2175
+ * Returns the defined default transition on this component.
2176
+ */
2177
+ getDefaultTransition() {
2178
+ return this.props.transition;
2179
+ }
2180
+ getTransformPagePoint() {
2181
+ return this.props.transformPagePoint;
2182
+ }
2183
+ getClosestVariantNode() {
2184
+ return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
2185
+ }
2186
+ /**
2187
+ * Add a child visual element to our set of children.
2188
+ */
2189
+ addVariantChild(t) {
2190
+ const n = this.getClosestVariantNode();
2191
+ if (n)
2192
+ return n.variantChildren && n.variantChildren.add(t), () => n.variantChildren.delete(t);
2193
+ }
2194
+ /**
2195
+ * Add a motion value and bind it to this visual element.
2196
+ */
2197
+ addValue(t, n) {
2198
+ const s = this.values.get(t);
2199
+ n !== s && (s && this.removeValue(t), this.bindToMotionValue(t, n), this.values.set(t, n), this.latestValues[t] = n.get());
2200
+ }
2201
+ /**
2202
+ * Remove a motion value and unbind any active subscriptions.
2203
+ */
2204
+ removeValue(t) {
2205
+ this.values.delete(t);
2206
+ const n = this.valueSubscriptions.get(t);
2207
+ n && (n(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
2208
+ }
2209
+ /**
2210
+ * Check whether we have a motion value for this key
2211
+ */
2212
+ hasValue(t) {
2213
+ return this.values.has(t);
2214
+ }
2215
+ getValue(t, n) {
2216
+ if (this.props.values && this.props.values[t])
2217
+ return this.props.values[t];
2218
+ let s = this.values.get(t);
2219
+ return s === void 0 && n !== void 0 && (s = ce(n === null ? void 0 : n, { owner: this }), this.addValue(t, s)), s;
2220
+ }
2221
+ /**
2222
+ * If we're trying to animate to a previously unencountered value,
2223
+ * we need to check for it in our state and as a last resort read it
2224
+ * directly from the instance (which might have performance implications).
2225
+ */
2226
+ readValue(t, n) {
2227
+ let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
2228
+ return s != null && (typeof s == "string" && (Ht(s) || Zt(s)) ? s = parseFloat(s) : !Qi(s) && Q.test(n) && (s = Ln(t, n)), this.setBaseTarget(t, F(s) ? s.get() : s)), F(s) ? s.get() : s;
2229
+ }
2230
+ /**
2231
+ * Set the base target to later animate back to. This is currently
2232
+ * only hydrated on creation and when we first read a value.
2233
+ */
2234
+ setBaseTarget(t, n) {
2235
+ this.baseTarget[t] = n;
2236
+ }
2237
+ /**
2238
+ * Find the base target for a value thats been removed from all animation
2239
+ * props.
2240
+ */
2241
+ getBaseTarget(t) {
2242
+ const { initial: n } = this.props;
2243
+ let s;
2244
+ if (typeof n == "string" || typeof n == "object") {
2245
+ const r = Gn(this.props, n, this.presenceContext?.custom);
2246
+ r && (s = r[t]);
2247
+ }
2248
+ if (n && s !== void 0)
2249
+ return s;
2250
+ const i = this.getBaseTargetFromProps(this.props, t);
2251
+ return i !== void 0 && !F(i) ? i : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
2252
+ }
2253
+ on(t, n) {
2254
+ return this.events[t] || (this.events[t] = new Jt()), this.events[t].add(n);
2255
+ }
2256
+ notify(t, ...n) {
2257
+ this.events[t] && this.events[t].notify(...n);
2258
+ }
2259
+ scheduleRenderMicrotask() {
2260
+ Hi.render(this.render);
2261
+ }
2262
+ }
2263
+ class qn extends Xn {
2264
+ constructor() {
2265
+ super(...arguments), this.KeyframeResolver = Yi;
2266
+ }
2267
+ sortInstanceNodePosition(t, n) {
2268
+ return t.compareDocumentPosition(n) & 2 ? 1 : -1;
2269
+ }
2270
+ getBaseTargetFromProps(t, n) {
2271
+ return t.style ? t.style[n] : void 0;
2272
+ }
2273
+ removeValueFromRenderState(t, { vars: n, style: s }) {
2274
+ delete n[t], delete s[t];
2275
+ }
2276
+ handleChildMotionValue() {
2277
+ this.childSubscription && (this.childSubscription(), delete this.childSubscription);
2278
+ const { children: t } = this.props;
2279
+ F(t) && (this.childSubscription = t.on("change", (n) => {
2280
+ this.current && (this.current.textContent = `${n}`);
2281
+ }));
2282
+ }
2283
+ }
2284
+ function Hn(e, { style: t, vars: n }, s, i) {
2285
+ const r = e.style;
2286
+ let a;
2287
+ for (a in t)
2288
+ r[a] = t[a];
2289
+ i?.applyProjectionStyles(r, s);
2290
+ for (a in n)
2291
+ r.setProperty(a, n[a]);
2292
+ }
2293
+ function Sr(e) {
2294
+ return window.getComputedStyle(e);
2295
+ }
2296
+ class xr extends qn {
2297
+ constructor() {
2298
+ super(...arguments), this.type = "html", this.renderInstance = Hn;
2299
+ }
2300
+ readValueFromInstance(t, n) {
2301
+ if (te.has(n))
2302
+ return this.projection?.isProjecting ? Be(n) : li(t, n);
2303
+ {
2304
+ const s = Sr(t), i = (pn(n) ? s.getPropertyValue(n) : s[n]) || 0;
2305
+ return typeof i == "string" ? i.trim() : i;
2306
+ }
2307
+ }
2308
+ measureInstanceViewportBox(t, { transformPagePoint: n }) {
2309
+ return vr(t, n);
2310
+ }
2311
+ build(t, n, s) {
2312
+ Un(t, n, s.transformTemplate);
2313
+ }
2314
+ scrapeMotionValuesFromProps(t, n, s) {
2315
+ return Yn(t, n, s);
2316
+ }
2317
+ }
2318
+ const Zn = /* @__PURE__ */ new Set([
2319
+ "baseFrequency",
2320
+ "diffuseConstant",
2321
+ "kernelMatrix",
2322
+ "kernelUnitLength",
2323
+ "keySplines",
2324
+ "keyTimes",
2325
+ "limitingConeAngle",
2326
+ "markerHeight",
2327
+ "markerWidth",
2328
+ "numOctaves",
2329
+ "targetX",
2330
+ "targetY",
2331
+ "surfaceScale",
2332
+ "specularConstant",
2333
+ "specularExponent",
2334
+ "stdDeviation",
2335
+ "tableValues",
2336
+ "viewBox",
2337
+ "gradientTransform",
2338
+ "pathLength",
2339
+ "startOffset",
2340
+ "textLength",
2341
+ "lengthAdjust"
2342
+ ]);
2343
+ function Ar(e, t, n, s) {
2344
+ Hn(e, t, void 0, s);
2345
+ for (const i in t.attrs)
2346
+ e.setAttribute(Zn.has(i) ? i : ct(i), t.attrs[i]);
2347
+ }
2348
+ class Mr extends qn {
2349
+ constructor() {
2350
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = ft;
2351
+ }
2352
+ getBaseTargetFromProps(t, n) {
2353
+ return t[n];
2354
+ }
2355
+ readValueFromInstance(t, n) {
2356
+ if (te.has(n)) {
2357
+ const s = $n(n);
2358
+ return s && s.default || 0;
2359
+ }
2360
+ return n = Zn.has(n) ? n : ct(n), t.getAttribute(n);
2361
+ }
2362
+ scrapeMotionValuesFromProps(t, n, s) {
2363
+ return pr(t, n, s);
2364
+ }
2365
+ build(t, n, s) {
2366
+ dr(t, n, this.isSVGTag, s.transformTemplate, s.style);
2367
+ }
2368
+ renderInstance(t, n, s, i) {
2369
+ Ar(t, n, s, i);
2370
+ }
2371
+ mount(t) {
2372
+ this.isSVGTag = mr(t.tagName), super.mount(t);
2373
+ }
2374
+ }
2375
+ function Cr(e, t, n) {
2376
+ const s = e.getProps();
2377
+ return Gn(s, t, s.custom, e);
2378
+ }
2379
+ const Dr = (e) => Array.isArray(e);
2380
+ function Fr(e, t, n) {
2381
+ e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, ce(n));
2382
+ }
2383
+ function Er(e) {
2384
+ return Dr(e) ? e[e.length - 1] || 0 : e;
2385
+ }
2386
+ function Pr(e, t) {
2387
+ const n = Cr(e, t);
2388
+ let { transitionEnd: s = {}, transition: i = {}, ...r } = n || {};
2389
+ r = { ...r, ...s };
2390
+ for (const a in r) {
2391
+ const o = Er(r[a]);
2392
+ Fr(e, a, o);
2393
+ }
2394
+ }
2395
+ function Rr(e) {
2396
+ return !!(F(e) && e.add);
2397
+ }
2398
+ function Or(e, t) {
2399
+ const n = e.getValue("willChange");
2400
+ if (Rr(n))
2401
+ return n.add(t);
2402
+ if (!n && K.WillChange) {
2403
+ const s = new K.WillChange("auto");
2404
+ e.addValue("willChange", s), s.add(t);
2405
+ }
2406
+ }
2407
+ function Nr(e) {
2408
+ return e.props[yr];
2409
+ }
2410
+ const Ir = (e) => e !== null;
2411
+ function kr(e, { repeat: t, repeatType: n = "loop" }, s) {
2412
+ const i = e.filter(Ir), r = t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
2413
+ return i[r];
2414
+ }
2415
+ const Kr = {
2416
+ type: "spring",
2417
+ stiffness: 500,
2418
+ damping: 25,
2419
+ restSpeed: 10
2420
+ }, Br = (e) => ({
2421
+ type: "spring",
2422
+ stiffness: 550,
2423
+ damping: e === 0 ? 2 * Math.sqrt(550) : 30,
2424
+ restSpeed: 10
2425
+ }), $r = {
2426
+ type: "keyframes",
2427
+ duration: 0.8
2428
+ }, Lr = {
2429
+ type: "keyframes",
2430
+ ease: [0.25, 0.1, 0.35, 1],
2431
+ duration: 0.3
2432
+ }, Wr = (e, { keyframes: t }) => t.length > 2 ? $r : te.has(e) ? e.startsWith("scale") ? Br(t[1]) : Kr : Lr;
2433
+ function jr({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: r, repeatType: a, repeatDelay: o, from: u, elapsed: c, ...l }) {
2434
+ return !!Object.keys(l).length;
2435
+ }
2436
+ const Jn = (e, t, n, s = {}, i, r) => (a) => {
2437
+ const o = In(s, e) || {}, u = o.delay || s.delay || 0;
2438
+ let { elapsed: c = 0 } = s;
2439
+ c = c - /* @__PURE__ */ O(u);
2440
+ const l = {
2441
+ keyframes: Array.isArray(n) ? n : [null, n],
2442
+ ease: "easeOut",
2443
+ velocity: t.getVelocity(),
2444
+ ...o,
2445
+ delay: -c,
2446
+ onUpdate: (h) => {
2447
+ t.set(h), o.onUpdate && o.onUpdate(h);
2448
+ },
2449
+ onComplete: () => {
2450
+ a(), o.onComplete && o.onComplete();
2451
+ },
2452
+ name: e,
2453
+ motionValue: t,
2454
+ element: r ? void 0 : i
2455
+ };
2456
+ jr(o) || Object.assign(l, Wr(e, l)), l.duration && (l.duration = /* @__PURE__ */ O(l.duration)), l.repeatDelay && (l.repeatDelay = /* @__PURE__ */ O(l.repeatDelay)), l.from !== void 0 && (l.keyframes[0] = l.from);
2457
+ let f = !1;
2458
+ if ((l.type === !1 || l.duration === 0 && !l.repeatDelay) && (_e(l), l.delay === 0 && (f = !0)), (K.instantAnimations || K.skipAnimations) && (f = !0, _e(l), l.delay = 0), l.allowFlatten = !o.type && !o.ease, f && !r && t.get() !== void 0) {
2459
+ const h = kr(l.keyframes, o);
2460
+ if (h !== void 0) {
2461
+ B.update(() => {
2462
+ l.onUpdate(h), l.onComplete();
2463
+ });
2464
+ return;
2465
+ }
2466
+ }
2467
+ return o.isSync ? new at(l) : new Pi(l);
2468
+ };
2469
+ function _r({ protectedKeys: e, needsAnimating: t }, n) {
2470
+ const s = e.hasOwnProperty(n) && t[n] !== !0;
2471
+ return t[n] = !1, s;
2472
+ }
2473
+ function Ur(e, t, { delay: n = 0, transitionOverride: s, type: i } = {}) {
2474
+ let { transition: r = e.getDefaultTransition(), transitionEnd: a, ...o } = t;
2475
+ s && (r = s);
2476
+ const u = [], c = i && e.animationState && e.animationState.getState()[i];
2477
+ for (const l in o) {
2478
+ const f = e.getValue(l, e.latestValues[l] ?? null), h = o[l];
2479
+ if (h === void 0 || c && _r(c, l))
2480
+ continue;
2481
+ const p = {
2482
+ delay: n,
2483
+ ...In(r || {}, l)
2484
+ }, y = f.get();
2485
+ if (y !== void 0 && !f.isAnimating && !Array.isArray(h) && h === y && !p.velocity)
2486
+ continue;
2487
+ let b = !1;
2488
+ if (window.MotionHandoffAnimation) {
2489
+ const T = Nr(e);
2490
+ if (T) {
2491
+ const A = window.MotionHandoffAnimation(T, l, B);
2492
+ A !== null && (p.startTime = A, b = !0);
2493
+ }
2494
+ }
2495
+ Or(e, l), f.start(Jn(l, f, h, e.shouldReduceMotion && kn.has(l) ? { type: !1 } : p, e, b));
2496
+ const v = f.animation;
2497
+ v && u.push(v);
2498
+ }
2499
+ return a && Promise.all(u).then(() => {
2500
+ B.update(() => {
2501
+ a && Pr(e, a);
2502
+ });
2503
+ }), u;
2504
+ }
2505
+ function Gr(e, t, n) {
2506
+ const s = F(e) ? e : ce(e);
2507
+ return s.start(Jn("", s, t, n)), s.animation;
2508
+ }
2509
+ function Yr(e) {
2510
+ return qt(() => () => e(), []);
2511
+ }
2512
+ function ht(e) {
2513
+ return typeof e == "object" && !Array.isArray(e);
2514
+ }
2515
+ function Qn(e, t, n, s) {
2516
+ return typeof e == "string" && ht(t) ? zi(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
2517
+ }
2518
+ function zr(e, t, n) {
2519
+ return e * (t + 1);
2520
+ }
2521
+ function Yt(e, t, n, s) {
2522
+ return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : t.startsWith("<") ? Math.max(0, n + parseFloat(t.slice(1))) : s.get(t) ?? e;
2523
+ }
2524
+ function Xr(e, t, n) {
2525
+ for (let s = 0; s < e.length; s++) {
2526
+ const i = e[s];
2527
+ i.at > t && i.at < n && (ze(e, i), s--);
2528
+ }
2529
+ }
2530
+ function qr(e, t, n, s, i, r) {
2531
+ Xr(e, i, r);
2532
+ for (let a = 0; a < t.length; a++)
2533
+ e.push({
2534
+ value: t[a],
2535
+ at: pe(i, r, s[a]),
2536
+ easing: fn(n, a)
2537
+ });
2538
+ }
2539
+ function Hr(e, t) {
2540
+ for (let n = 0; n < e.length; n++)
2541
+ e[n] = e[n] / (t + 1);
2542
+ }
2543
+ function Zr(e, t) {
2544
+ return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
2545
+ }
2546
+ const Jr = "easeInOut", Qr = 20;
2547
+ function ea(e, { defaultTransition: t = {}, ...n } = {}, s, i) {
2548
+ const r = t.duration || 0.3, a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), u = {}, c = /* @__PURE__ */ new Map();
2549
+ let l = 0, f = 0, h = 0;
2550
+ for (let p = 0; p < e.length; p++) {
2551
+ const y = e[p];
2552
+ if (typeof y == "string") {
2553
+ c.set(y, f);
2554
+ continue;
2555
+ } else if (!Array.isArray(y)) {
2556
+ c.set(y.name, Yt(f, y.at, l, c));
2557
+ continue;
2558
+ }
2559
+ let [b, v, T = {}] = y;
2560
+ T.at !== void 0 && (f = Yt(f, T.at, l, c));
2561
+ let A = 0;
2562
+ const w = (S, m, V, C = 0, g = 0) => {
2563
+ const x = ta(S), { delay: E = 0, times: N = Cn(x), type: xe = "keyframes", repeat: ne, repeatType: ma, repeatDelay: pa = 0, ...ts } = m;
2564
+ let { ease: $ = t.ease || "easeOut", duration: k } = m;
2565
+ const dt = typeof E == "function" ? E(C, g) : E, mt = x.length, pt = lt(xe) ? xe : i?.[xe || "keyframes"];
2566
+ if (mt <= 2 && pt) {
2567
+ let se = 100;
2568
+ if (mt === 2 && ia(x)) {
2569
+ const ie = x[1] - x[0];
2570
+ se = Math.abs(ie);
2571
+ }
2572
+ const ge = { ...ts };
2573
+ k !== void 0 && (ge.duration = /* @__PURE__ */ O(k));
2574
+ const ye = xn(ge, se, pt);
2575
+ $ = ye.ease, k = ye.duration;
2576
+ }
2577
+ k ?? (k = r);
2578
+ const gt = f + dt;
2579
+ N.length === 1 && N[0] === 0 && (N[1] = 1);
2580
+ const yt = N.length - x.length;
2581
+ if (yt > 0 && Mn(N, yt), x.length === 1 && x.unshift(null), ne) {
2582
+ I(ne < Qr, "Repeat count too high, must be less than 20", "repeat-count-high"), k = zr(k, ne);
2583
+ const se = [...x], ge = [...N];
2584
+ $ = Array.isArray($) ? [...$] : [$];
2585
+ const ye = [...$];
2586
+ for (let ie = 0; ie < ne; ie++) {
2587
+ x.push(...se);
2588
+ for (let re = 0; re < se.length; re++)
2589
+ N.push(ge[re] + (ie + 1)), $.push(re === 0 ? "linear" : fn(ye, re - 1));
2590
+ }
2591
+ Hr(N, ne);
2592
+ }
2593
+ const bt = gt + k;
2594
+ qr(V, x, $, N, gt, bt), A = Math.max(dt + k, A), h = Math.max(bt, h);
2595
+ };
2596
+ if (F(b)) {
2597
+ const S = zt(b, o);
2598
+ w(v, T, Xt("default", S));
2599
+ } else {
2600
+ const S = Qn(b, v, s, u), m = S.length;
2601
+ for (let V = 0; V < m; V++) {
2602
+ v = v, T = T;
2603
+ const C = S[V], g = zt(C, o);
2604
+ for (const x in v)
2605
+ w(v[x], na(T, x), Xt(x, g), V, m);
2606
+ }
2607
+ }
2608
+ l = f, f += A;
2609
+ }
2610
+ return o.forEach((p, y) => {
2611
+ for (const b in p) {
2612
+ const v = p[b];
2613
+ v.sort(Zr);
2614
+ const T = [], A = [], w = [];
2615
+ for (let m = 0; m < v.length; m++) {
2616
+ const { at: V, value: C, easing: g } = v[m];
2617
+ T.push(C), A.push(/* @__PURE__ */ He(0, h, V)), w.push(g || "easeOut");
2618
+ }
2619
+ A[0] !== 0 && (A.unshift(0), T.unshift(T[0]), w.unshift(Jr)), A[A.length - 1] !== 1 && (A.push(1), T.push(null)), a.has(y) || a.set(y, {
2620
+ keyframes: {},
2621
+ transition: {}
2622
+ });
2623
+ const S = a.get(y);
2624
+ S.keyframes[b] = T, S.transition[b] = {
2625
+ ...t,
2626
+ duration: h,
2627
+ ease: w,
2628
+ times: A,
2629
+ ...n
2630
+ };
2631
+ }
2632
+ }), a;
2633
+ }
2634
+ function zt(e, t) {
2635
+ return !t.has(e) && t.set(e, {}), t.get(e);
2636
+ }
2637
+ function Xt(e, t) {
2638
+ return t[e] || (t[e] = []), t[e];
2639
+ }
2640
+ function ta(e) {
2641
+ return Array.isArray(e) ? e : [e];
2642
+ }
2643
+ function na(e, t) {
2644
+ return e && e[t] ? {
2645
+ ...e,
2646
+ ...e[t]
2647
+ } : { ...e };
2648
+ }
2649
+ const sa = (e) => typeof e == "number", ia = (e) => e.every(sa);
2650
+ function ra(e, t) {
2651
+ return e in t;
2652
+ }
2653
+ class aa extends Xn {
2654
+ constructor() {
2655
+ super(...arguments), this.type = "object";
2656
+ }
2657
+ readValueFromInstance(t, n) {
2658
+ if (ra(n, t)) {
2659
+ const s = t[n];
2660
+ if (typeof s == "string" || typeof s == "number")
2661
+ return s;
2662
+ }
2663
+ }
2664
+ getBaseTargetFromProps() {
2665
+ }
2666
+ removeValueFromRenderState(t, n) {
2667
+ delete n.output[t];
2668
+ }
2669
+ measureInstanceViewportBox() {
2670
+ return ft();
2671
+ }
2672
+ build(t, n) {
2673
+ Object.assign(t.output, n);
2674
+ }
2675
+ renderInstance(t, { output: n }) {
2676
+ Object.assign(t, n);
2677
+ }
2678
+ sortInstanceNodePosition() {
2679
+ return 0;
2680
+ }
2681
+ }
2682
+ function oa(e) {
2683
+ const t = {
2684
+ presenceContext: null,
2685
+ props: {},
2686
+ visualState: {
2687
+ renderState: {
2688
+ transform: {},
2689
+ transformOrigin: {},
2690
+ style: {},
2691
+ vars: {},
2692
+ attrs: {}
2693
+ },
2694
+ latestValues: {}
2695
+ }
2696
+ }, n = jn(e) && !Zi(e) ? new Mr(t) : new xr(t);
2697
+ n.mount(e), fe.set(e, n);
2698
+ }
2699
+ function la(e) {
2700
+ const t = {
2701
+ presenceContext: null,
2702
+ props: {},
2703
+ visualState: {
2704
+ renderState: {
2705
+ output: {}
2706
+ },
2707
+ latestValues: {}
2708
+ }
2709
+ }, n = new aa(t);
2710
+ n.mount(e), fe.set(e, n);
2711
+ }
2712
+ function ua(e, t) {
2713
+ return F(e) || typeof e == "number" || typeof e == "string" && !ht(t);
2714
+ }
2715
+ function es(e, t, n, s) {
2716
+ const i = [];
2717
+ if (ua(e, t))
2718
+ i.push(Gr(e, ht(t) && t.default || t, n && (n.default || n)));
2719
+ else {
2720
+ const r = Qn(e, t, s), a = r.length;
2721
+ I(!!a, "No valid elements provided.", "no-valid-elements");
2722
+ for (let o = 0; o < a; o++) {
2723
+ const u = r[o];
2724
+ I(u !== null, "You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.", "animate-null");
2725
+ const c = u instanceof Element ? oa : la;
2726
+ fe.has(u) || c(u);
2727
+ const l = fe.get(u), f = { ...n };
2728
+ "delay" in f && typeof f.delay == "function" && (f.delay = f.delay(o, a)), i.push(...Ur(l, { ...t, transition: f }, {}));
2729
+ }
2730
+ }
2731
+ return i;
2732
+ }
2733
+ function ca(e, t, n) {
2734
+ const s = [];
2735
+ return ea(e, t, n, { spring: H }).forEach(({ keyframes: r, transition: a }, o) => {
2736
+ s.push(...es(o, r, a));
2737
+ }), s;
2738
+ }
2739
+ function fa(e) {
2740
+ return Array.isArray(e) && e.some(Array.isArray);
2741
+ }
2742
+ function ha(e) {
2743
+ function t(n, s, i) {
2744
+ let r = [], a;
2745
+ if (fa(n))
2746
+ r = ca(n, s, e);
2747
+ else {
2748
+ const { onComplete: u, ...c } = i || {};
2749
+ typeof u == "function" && (a = u), r = es(n, s, c, e);
2750
+ }
2751
+ const o = new Oi(r);
2752
+ return a && o.finished.then(a), e && (e.animations.push(o), o.finished.then(() => {
2753
+ ze(e.animations, o);
2754
+ })), o;
2755
+ }
2756
+ return t;
2757
+ }
2758
+ function da() {
2759
+ const e = wt(() => ({
2760
+ current: null,
2761
+ // Will be hydrated by React
2762
+ animations: []
2763
+ })), t = wt(() => ha(e));
2764
+ return Yr(() => {
2765
+ e.animations.forEach((n) => n.stop()), e.animations.length = 0;
2766
+ }), [e, t];
2767
+ }
2768
+ const Fa = ({
2769
+ sideOffset: e = 6,
2770
+ side: t,
2771
+ sticky: n,
2772
+ className: s,
2773
+ children: i,
2774
+ showCloseButton: r = !0,
2775
+ ...a
2776
+ }) => {
2777
+ const { open: o, isDesktop: u, onOpenChange: c } = ss(), [l, f] = os(), [h, p] = da();
2778
+ return qt(() => {
2779
+ o && l ? (async () => await p(
2780
+ h.current,
2781
+ {
2782
+ opacity: [0, 1],
2783
+ scale: [0, 1]
2784
+ },
2785
+ { type: H, bounce: 0.4, duration: 0.8 }
2786
+ ))() : (async () => (await p(
2787
+ h.current,
2788
+ {
2789
+ opacity: 0,
2790
+ scale: [1, 0]
2791
+ },
2792
+ { duration: 0.4 }
2793
+ ), f && f()))();
2794
+ }, [p, o, l, f, h]), u ? /* @__PURE__ */ W(
2795
+ ns,
2796
+ {
2797
+ "data-slot": "responsive-popover-drawer-content",
2798
+ sideOffset: e,
2799
+ side: t,
2800
+ sticky: n,
2801
+ ...a,
2802
+ children: /* @__PURE__ */ W(
2803
+ "div",
2804
+ {
2805
+ className: Vt(
2806
+ "mds:origin-(--radix-popover-content-transform-origin) mds:p-8 mds:rounded-18 mds:bg-surface-neutral-l1 mds:border-border-interactive-neutral mds:border mds:shadow-200",
2807
+ s
2808
+ ),
2809
+ ref: h,
2810
+ children: i
2811
+ }
2812
+ )
2813
+ }
2814
+ ) : /* @__PURE__ */ Tt(
2815
+ Ae.Content,
2816
+ {
2817
+ "data-slot": "responsive-popover-drawer-content",
2818
+ className: "mds:group/drawer-content mds:w-full mds:fixed mds:left-0 mds:bottom-0 mds:z-100 mds:overflow-hidden",
2819
+ ...a,
2820
+ children: [
2821
+ /* @__PURE__ */ Tt(
2822
+ "div",
2823
+ {
2824
+ className: Vt(
2825
+ "mds:m-20 mds:flex mds:h-auto mds:flex-col mds:p-8 mds:rounded-18 mds:bg-surface-neutral-l1 mds:border-border-interactive-neutral mds:border mds:shadow-200",
2826
+ s
2827
+ ),
2828
+ ref: h,
2829
+ children: [
2830
+ i,
2831
+ r && /* @__PURE__ */ W(
2832
+ is,
2833
+ {
2834
+ variant: "secondary",
2835
+ rounded: "sm",
2836
+ onClick: () => {
2837
+ c && c(!1);
2838
+ },
2839
+ children: "Close"
2840
+ }
2841
+ )
2842
+ ]
2843
+ }
2844
+ ),
2845
+ /* @__PURE__ */ W(vt, { children: /* @__PURE__ */ W(Ae.Title, {}) }),
2846
+ /* @__PURE__ */ W(vt, { children: /* @__PURE__ */ W(Ae.Description, {}) })
2847
+ ]
2848
+ }
2849
+ );
2850
+ };
2851
+ export {
2852
+ Fa as ResponsivePopoverDrawerContent
2853
+ };