@lunora/studio 1.0.0-alpha.360 → 1.0.0-alpha.362

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 (327) hide show
  1. package/dist/index.d.mts +4 -1
  2. package/dist/index.d.ts +4 -1
  3. package/dist/index.mjs +1 -1
  4. package/dist/mount.mjs +1 -1
  5. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -1
  6. package/dist/packem_chunks/ApiTab.mjs +1 -1
  7. package/dist/packem_chunks/AuditPanel.mjs +1 -1
  8. package/dist/packem_chunks/ExportImportPanel.mjs +1 -1
  9. package/dist/packem_chunks/FileBrowser.mjs +1 -1
  10. package/dist/packem_chunks/FunctionRunner.mjs +1 -1
  11. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -1
  12. package/dist/packem_chunks/HealthPanel.mjs +1 -1
  13. package/dist/packem_chunks/InsightsPanel.mjs +1 -1
  14. package/dist/packem_chunks/LogsPanel.mjs +1 -1
  15. package/dist/packem_chunks/MailPanel.mjs +1 -1
  16. package/dist/packem_chunks/MetricsPanel.mjs +1 -1
  17. package/dist/packem_chunks/NotificationsPanel.mjs +1 -1
  18. package/dist/packem_chunks/PitrPanel.mjs +1 -1
  19. package/dist/packem_chunks/SchemaViewer.mjs +1 -1
  20. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -1
  21. package/dist/packem_chunks/SettingsPanel.mjs +1 -1
  22. package/dist/packem_chunks/SqlEditorPanel.mjs +24 -9
  23. package/dist/packem_chunks/TableEditor.mjs +1 -1
  24. package/dist/packem_chunks/agents-panel.mjs +1 -1
  25. package/dist/packem_chunks/ai-knowledge.mjs +1 -0
  26. package/dist/packem_chunks/ai-usage-panel.mjs +1 -1
  27. package/dist/packem_chunks/assistant-panel.mjs +3 -0
  28. package/dist/packem_chunks/auth-audit-panel.mjs +1 -1
  29. package/dist/packem_chunks/containers-panel.mjs +1 -1
  30. package/dist/packem_chunks/dashboards-panel.mjs +1 -1
  31. package/dist/packem_chunks/evals-panel.mjs +1 -1
  32. package/dist/packem_chunks/fanout-panel.mjs +1 -1
  33. package/dist/packem_chunks/flags-panel.mjs +1 -1
  34. package/dist/packem_chunks/issues-panel.mjs +1 -1
  35. package/dist/packem_chunks/kv-browser.mjs +1 -1
  36. package/dist/packem_chunks/log-drains-panel.mjs +1 -1
  37. package/dist/packem_chunks/migrations-route.mjs +1 -1
  38. package/dist/packem_chunks/payments-panel.mjs +1 -1
  39. package/dist/packem_chunks/permissions-panel.mjs +1 -1
  40. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -1
  41. package/dist/packem_chunks/queues-panel.mjs +1 -1
  42. package/dist/packem_chunks/reactors-panel.mjs +1 -1
  43. package/dist/packem_chunks/rls-panel.mjs +1 -1
  44. package/dist/packem_chunks/schedule-panel.mjs +1 -1
  45. package/dist/packem_chunks/storage-rules-panel.mjs +1 -1
  46. package/dist/packem_chunks/subscriptions-panel.mjs +1 -1
  47. package/dist/packem_chunks/traces-panel.mjs +1 -1
  48. package/dist/packem_chunks/workflows-panel.mjs +1 -1
  49. package/dist/packem_shared/ADMIN_FUNCTIONS-DUXsXId1.mjs +1 -0
  50. package/dist/packem_shared/{ApiDocsPanel-DD2Uns6b.mjs → ApiDocsPanel-B9S9l1Ce.mjs} +1 -1
  51. package/dist/packem_shared/{DataBrowser-CVRWnNWu.mjs → DataBrowser-Dm-jhIUP.mjs} +2 -2
  52. package/dist/packem_shared/{GlobalDataBrowser-DC47T6Zl.mjs → GlobalDataBrowser-C1Y8GUhe.mjs} +1 -1
  53. package/dist/packem_shared/{HomePanel-D12HxHQo.mjs → HomePanel-B5ytwPIo.mjs} +1 -1
  54. package/dist/packem_shared/{MigrationsPanel-DMkxSXNl.mjs → MigrationsPanel-CwLikxDT.mjs} +1 -1
  55. package/dist/packem_shared/Studio-B89ZNMOD.mjs +1 -0
  56. package/dist/packem_shared/{StudioApp-isdWpF9P.mjs → StudioApp-C9l1a3A8.mjs} +1 -1
  57. package/dist/packem_shared/advisor-view-CzieqKMe.mjs +5 -0
  58. package/dist/packem_shared/assistant-provider-Bp72uWsq.mjs +1 -0
  59. package/dist/packem_shared/assistant-reason-D6EwMCxT.mjs +1 -0
  60. package/dist/packem_shared/{cf-links-CBJ5SywP.mjs → cf-links-C4DVTr8A.mjs} +1 -1
  61. package/dist/packem_shared/error-alert-DKXm5h19.mjs +6 -0
  62. package/dist/packem_shared/{home-panel-CDVTuTF8.mjs → home-panel-5fGktYeD.mjs} +1 -1
  63. package/dist/packem_shared/recording-client-z4CBi0y8.mjs +1 -0
  64. package/dist/packem_shared/studio-gZfpz1wC.mjs +2 -0
  65. package/dist/packem_shared/{table-list-sidebar-CNadcIgG.mjs → table-list-sidebar-kpHaDWjy.mjs} +1 -1
  66. package/dist/packem_shared/use-assistant-rpc-GCUK2zPa.mjs +1 -0
  67. package/dist/standalone/chunk-2DT3QG6Q.js +1 -0
  68. package/dist/standalone/chunk-2EB7FN5S.js +1 -0
  69. package/dist/standalone/chunk-2FTGLXYA.js +1 -0
  70. package/dist/standalone/chunk-2H6VLY2M.js +1 -0
  71. package/dist/standalone/chunk-2NGKUO32.js +1 -0
  72. package/dist/standalone/chunk-2SNHKJXK.js +1 -0
  73. package/dist/standalone/chunk-2W4UO5BC.js +1 -0
  74. package/dist/standalone/{chunk-SLIDAWNX.js → chunk-3D67ZJRW.js} +1 -1
  75. package/dist/standalone/chunk-3RZD6VJ7.js +1 -0
  76. package/dist/standalone/chunk-3X3NXJBR.js +1 -0
  77. package/dist/standalone/chunk-4EPW63HS.js +1 -0
  78. package/dist/standalone/{chunk-WS36BO4R.js → chunk-4NKJV7YX.js} +1 -1
  79. package/dist/standalone/chunk-4PI2OSSP.js +1 -0
  80. package/dist/standalone/chunk-53CGUTRT.js +1 -0
  81. package/dist/standalone/chunk-5EWIOOBI.js +1 -0
  82. package/dist/standalone/chunk-5GYHGDIF.js +8 -0
  83. package/dist/standalone/chunk-5NIQHOPN.js +1 -0
  84. package/dist/standalone/chunk-5O7ICPWV.js +1 -0
  85. package/dist/standalone/chunk-5PEAXTYQ.js +1 -0
  86. package/dist/standalone/{chunk-O2NMPIV2.js → chunk-5WNGRT7N.js} +1 -1
  87. package/dist/standalone/chunk-66BMMNUR.js +1 -0
  88. package/dist/standalone/chunk-66LYVBXB.js +1 -0
  89. package/dist/standalone/chunk-6FPV3EK2.js +1 -0
  90. package/dist/standalone/chunk-6G3E4PJ2.js +1 -0
  91. package/dist/standalone/chunk-6KE7ILEZ.js +1 -0
  92. package/dist/standalone/chunk-7KJCRT4B.js +1 -0
  93. package/dist/standalone/chunk-7O5SGABV.js +1 -0
  94. package/dist/standalone/chunk-7QEZ2SFW.js +1 -0
  95. package/dist/standalone/chunk-7WV3EPE6.js +1 -0
  96. package/dist/standalone/chunk-A2Q3TGIQ.js +1 -0
  97. package/dist/standalone/chunk-ABMHWBYA.js +1 -0
  98. package/dist/standalone/chunk-AEU3EF4T.js +1 -0
  99. package/dist/standalone/chunk-ALQHMFOC.js +1 -0
  100. package/dist/standalone/chunk-AZIKM5BA.js +1 -0
  101. package/dist/standalone/chunk-BCUOQNI2.js +1 -0
  102. package/dist/standalone/chunk-BG2CJOVS.js +1 -0
  103. package/dist/standalone/chunk-BKI3JMXQ.js +1 -0
  104. package/dist/standalone/chunk-BO5NNWMO.js +1 -0
  105. package/dist/standalone/chunk-BX7TFVCC.js +1 -0
  106. package/dist/standalone/chunk-CKEQX655.js +1 -0
  107. package/dist/standalone/{chunk-DX55P3KZ.js → chunk-CL3JOU6F.js} +1 -1
  108. package/dist/standalone/chunk-COLSZPCE.js +1 -0
  109. package/dist/standalone/chunk-CVSIFPI5.js +1 -0
  110. package/dist/standalone/chunk-D65UVZIA.js +1 -0
  111. package/dist/standalone/{chunk-DBVJ5VLI.js → chunk-DA2CAFXI.js} +1 -1
  112. package/dist/standalone/chunk-DB6QX4X6.js +1 -0
  113. package/dist/standalone/{chunk-7ZIYHKLX.js → chunk-E2FFHKGI.js} +3 -3
  114. package/dist/standalone/chunk-EE2COWFF.js +1 -0
  115. package/dist/standalone/chunk-ELSQ4FVH.js +1 -0
  116. package/dist/standalone/chunk-EXFERMUT.js +1 -0
  117. package/dist/standalone/chunk-FACXM2UB.js +7 -0
  118. package/dist/standalone/chunk-FBDIQ67D.js +1 -0
  119. package/dist/standalone/chunk-FHLODLBC.js +1 -0
  120. package/dist/standalone/chunk-FQEZUQ36.js +1 -0
  121. package/dist/standalone/{chunk-VEWQWS3J.js → chunk-FWM5Z6CH.js} +1 -1
  122. package/dist/standalone/chunk-GC3GKGWD.js +1 -0
  123. package/dist/standalone/chunk-GJXCPZDN.js +1 -0
  124. package/dist/standalone/chunk-GNI37YCV.js +33 -0
  125. package/dist/standalone/chunk-GVZ3VFGG.js +1 -0
  126. package/dist/standalone/chunk-GWNGVKLG.js +1 -0
  127. package/dist/standalone/chunk-GXTSE66Z.js +1 -0
  128. package/dist/standalone/chunk-H7BQUL7D.js +1 -0
  129. package/dist/standalone/chunk-HCCQTUHS.js +1 -0
  130. package/dist/standalone/chunk-HCOF7HOM.js +1 -0
  131. package/dist/standalone/chunk-HZDLUAWS.js +1 -0
  132. package/dist/standalone/chunk-IDZLHZIA.js +1 -0
  133. package/dist/standalone/{chunk-SU5DTRGK.js → chunk-IHGRWY3Y.js} +1 -1
  134. package/dist/standalone/chunk-IUGNIG6L.js +6 -0
  135. package/dist/standalone/chunk-J3BZWYJQ.js +1 -0
  136. package/dist/standalone/chunk-J45HAKBU.js +1 -0
  137. package/dist/standalone/chunk-J4PQAVOF.js +1 -0
  138. package/dist/standalone/chunk-J6FR2B77.js +1 -0
  139. package/dist/standalone/chunk-J6XQKD2F.js +1 -0
  140. package/dist/standalone/chunk-JCRFMCNP.js +1 -0
  141. package/dist/standalone/chunk-JD6PRRFO.js +1 -0
  142. package/dist/standalone/chunk-JENPPZFV.js +1 -0
  143. package/dist/standalone/chunk-JHTL3QHW.js +1 -0
  144. package/dist/standalone/chunk-JOPNP4EO.js +1 -0
  145. package/dist/standalone/chunk-JVP3TR3A.js +1 -0
  146. package/dist/standalone/chunk-KGLIQIZU.js +1 -0
  147. package/dist/standalone/{chunk-ONWGX5Y4.js → chunk-KH6OXCG3.js} +1 -1
  148. package/dist/standalone/{chunk-3FS22LNI.js → chunk-L26RMC2W.js} +3 -3
  149. package/dist/standalone/chunk-L2FYX4FN.js +1 -0
  150. package/dist/standalone/{chunk-XIRKBJPD.js → chunk-LPFUEJZ4.js} +5 -5
  151. package/dist/standalone/chunk-LSEUUZN4.js +1 -0
  152. package/dist/standalone/{chunk-BYOGQ2IV.js → chunk-MJTVTUNI.js} +2 -2
  153. package/dist/standalone/chunk-MQTI3STP.js +1 -0
  154. package/dist/standalone/chunk-N7WQJPOM.js +1 -0
  155. package/dist/standalone/chunk-NF2Q75WM.js +1 -0
  156. package/dist/standalone/chunk-NGZNXNRD.js +1 -0
  157. package/dist/standalone/chunk-O3AZ7JKE.js +1 -0
  158. package/dist/standalone/chunk-OK2QU2EV.js +1 -0
  159. package/dist/standalone/{chunk-IH2CJZF2.js → chunk-ONTGYVAN.js} +1 -1
  160. package/dist/standalone/chunk-OP4QEV27.js +1 -0
  161. package/dist/standalone/chunk-OPIMGKWU.js +1 -0
  162. package/dist/standalone/chunk-OWRKSQPE.js +1 -0
  163. package/dist/standalone/chunk-P5EVJEGC.js +1 -0
  164. package/dist/standalone/chunk-PAZKX7I6.js +1 -0
  165. package/dist/standalone/chunk-PDBW6GTJ.js +1 -0
  166. package/dist/standalone/chunk-PJUVJTDR.js +1 -0
  167. package/dist/standalone/chunk-Q2J73V2C.js +2 -0
  168. package/dist/standalone/chunk-Q2KL457J.js +1 -0
  169. package/dist/standalone/chunk-QAOZXPLU.js +1 -0
  170. package/dist/standalone/{chunk-3PAYDWHN.js → chunk-QEFLZBT7.js} +2 -2
  171. package/dist/standalone/chunk-QKUVJIRX.js +1 -0
  172. package/dist/standalone/chunk-QNM2J7MG.js +1 -0
  173. package/dist/standalone/chunk-QRA7AKYO.js +1 -0
  174. package/dist/standalone/chunk-RCXNYW7P.js +1 -0
  175. package/dist/standalone/chunk-RE7GRXBM.js +1 -0
  176. package/dist/standalone/{chunk-TDVDZ7XQ.js → chunk-RIAOZECW.js} +1 -1
  177. package/dist/standalone/{chunk-LUHXNZI4.js → chunk-RTS5G3ET.js} +1 -1
  178. package/dist/standalone/chunk-S36FVTKK.js +1 -0
  179. package/dist/standalone/chunk-SR6CPTRT.js +1 -0
  180. package/dist/standalone/chunk-T3ZCW3RG.js +1 -0
  181. package/dist/standalone/chunk-TKBTZX4K.js +1 -0
  182. package/dist/standalone/chunk-TMWKF4XM.js +5 -0
  183. package/dist/standalone/chunk-TW4O2BA5.js +159 -0
  184. package/dist/standalone/chunk-UD5REVU2.js +1 -0
  185. package/dist/standalone/{chunk-PQH2LSJX.js → chunk-UQA2AJGI.js} +1 -1
  186. package/dist/standalone/chunk-UW6QNC74.js +3 -0
  187. package/dist/standalone/chunk-UXBNXITB.js +1 -0
  188. package/dist/standalone/chunk-UZ2ZXB74.js +1 -0
  189. package/dist/standalone/chunk-V3BE427M.js +1 -0
  190. package/dist/standalone/chunk-VHPTPEZ4.js +1 -0
  191. package/dist/standalone/chunk-W4LJQYCI.js +1 -0
  192. package/dist/standalone/chunk-WADY55J2.js +30 -0
  193. package/dist/standalone/chunk-WCWP4EAW.js +1 -0
  194. package/dist/standalone/chunk-X54WR7FF.js +1 -0
  195. package/dist/standalone/chunk-XWWQIAF6.js +1 -0
  196. package/dist/standalone/{chunk-SYGCASPT.js → chunk-Y2YLTUMD.js} +1 -1
  197. package/dist/standalone/chunk-YEVTA35E.js +1 -0
  198. package/dist/standalone/{chunk-R36QXQZX.js → chunk-YORPLSI5.js} +1 -1
  199. package/dist/standalone/chunk-YX2N5PJW.js +1 -0
  200. package/dist/standalone/chunk-Z57KMMOK.js +1 -0
  201. package/dist/standalone/chunk-ZFQ253FX.js +1 -0
  202. package/dist/standalone/chunk-ZG3IUVQ2.js +1 -0
  203. package/dist/standalone/chunk-ZKEYRU5C.js +1 -0
  204. package/dist/standalone/{chunk-5R2YO7HF.js → chunk-ZOKSVUID.js} +4 -4
  205. package/dist/standalone/{chunk-H7HZ42JY.js → chunk-ZPQBVYNN.js} +1 -1
  206. package/dist/standalone/chunk-ZSLKFLWE.js +1 -0
  207. package/dist/standalone/chunk-ZSWW2UGP.js +1 -0
  208. package/dist/standalone/studio.js +2 -2
  209. package/dist/styles.css +1 -1
  210. package/package.json +7 -6
  211. package/dist/packem_shared/ADMIN_FUNCTIONS-4aGsMs95.mjs +0 -1
  212. package/dist/packem_shared/Studio-MA8kKZLu.mjs +0 -1
  213. package/dist/packem_shared/advisor-view-tBumWci_.mjs +0 -1
  214. package/dist/packem_shared/error-alert-C0R39DO1.mjs +0 -1
  215. package/dist/packem_shared/recording-client-DAipTA_n.mjs +0 -1
  216. package/dist/packem_shared/studio-UhUrPz5J.mjs +0 -2
  217. package/dist/packem_shared/use-sql-assistant-rZPs3LC3.mjs +0 -1
  218. package/dist/standalone/chunk-2AH4ABE5.js +0 -1
  219. package/dist/standalone/chunk-2G57ENH5.js +0 -1
  220. package/dist/standalone/chunk-3GXPALXG.js +0 -1
  221. package/dist/standalone/chunk-3GYLOE4V.js +0 -1
  222. package/dist/standalone/chunk-473JK2PQ.js +0 -1
  223. package/dist/standalone/chunk-4C4THJUD.js +0 -1
  224. package/dist/standalone/chunk-4DAKKAK7.js +0 -1
  225. package/dist/standalone/chunk-4M57OYFX.js +0 -1
  226. package/dist/standalone/chunk-4SQBAPY6.js +0 -1
  227. package/dist/standalone/chunk-5DNGK3NT.js +0 -1
  228. package/dist/standalone/chunk-5GIQ6C5N.js +0 -1
  229. package/dist/standalone/chunk-5WJG7FMH.js +0 -1
  230. package/dist/standalone/chunk-63KDHS3H.js +0 -1
  231. package/dist/standalone/chunk-6B6ARRMI.js +0 -1
  232. package/dist/standalone/chunk-6LMO2D54.js +0 -1
  233. package/dist/standalone/chunk-6M7FLLMT.js +0 -1
  234. package/dist/standalone/chunk-6QEXGYWH.js +0 -1
  235. package/dist/standalone/chunk-6UTZXEW3.js +0 -1
  236. package/dist/standalone/chunk-6VAY6L4J.js +0 -1
  237. package/dist/standalone/chunk-7PADVGQX.js +0 -1
  238. package/dist/standalone/chunk-7RGYCU6F.js +0 -1
  239. package/dist/standalone/chunk-7UM5ROG6.js +0 -1
  240. package/dist/standalone/chunk-A566HCBX.js +0 -1
  241. package/dist/standalone/chunk-A5JISKHE.js +0 -1
  242. package/dist/standalone/chunk-ADNRFCMZ.js +0 -1
  243. package/dist/standalone/chunk-AP4PC2M4.js +0 -1
  244. package/dist/standalone/chunk-BFE2DRP6.js +0 -33
  245. package/dist/standalone/chunk-BPEB4KFE.js +0 -1
  246. package/dist/standalone/chunk-BVX45MU5.js +0 -7
  247. package/dist/standalone/chunk-C6GN7ZXJ.js +0 -1
  248. package/dist/standalone/chunk-CL2VZNDI.js +0 -1
  249. package/dist/standalone/chunk-CNA3TVUK.js +0 -1
  250. package/dist/standalone/chunk-CZ6HBDIL.js +0 -1
  251. package/dist/standalone/chunk-D6S7MXW4.js +0 -1
  252. package/dist/standalone/chunk-E26OT26O.js +0 -1
  253. package/dist/standalone/chunk-FCAXVYAX.js +0 -1
  254. package/dist/standalone/chunk-FXPAJDES.js +0 -1
  255. package/dist/standalone/chunk-HHRYM6UW.js +0 -1
  256. package/dist/standalone/chunk-HPRF5LMA.js +0 -1
  257. package/dist/standalone/chunk-IB22LETR.js +0 -1
  258. package/dist/standalone/chunk-IBJVVHV5.js +0 -1
  259. package/dist/standalone/chunk-IENQRRQT.js +0 -1
  260. package/dist/standalone/chunk-IQ4TTHQT.js +0 -1
  261. package/dist/standalone/chunk-ITH5LRWM.js +0 -1
  262. package/dist/standalone/chunk-J6VFG6M5.js +0 -1
  263. package/dist/standalone/chunk-JSDKOE4U.js +0 -1
  264. package/dist/standalone/chunk-JTGGWF7R.js +0 -1
  265. package/dist/standalone/chunk-JZD7ZN3F.js +0 -1
  266. package/dist/standalone/chunk-K3CWB3AM.js +0 -1
  267. package/dist/standalone/chunk-KNFB3FGW.js +0 -1
  268. package/dist/standalone/chunk-KNXWDE4N.js +0 -1
  269. package/dist/standalone/chunk-KRPXOSBL.js +0 -1
  270. package/dist/standalone/chunk-KRY7BYHT.js +0 -1
  271. package/dist/standalone/chunk-KYAG2YMF.js +0 -1
  272. package/dist/standalone/chunk-KZCEJFZF.js +0 -1
  273. package/dist/standalone/chunk-KZILJQX3.js +0 -8
  274. package/dist/standalone/chunk-LEYUH5TS.js +0 -1
  275. package/dist/standalone/chunk-LFM672WN.js +0 -1
  276. package/dist/standalone/chunk-LIGOLZND.js +0 -1
  277. package/dist/standalone/chunk-LPU6YTSU.js +0 -1
  278. package/dist/standalone/chunk-MWJC3S62.js +0 -1
  279. package/dist/standalone/chunk-NP2AQOLE.js +0 -1
  280. package/dist/standalone/chunk-NVKLYDOH.js +0 -1
  281. package/dist/standalone/chunk-O2X2XYCM.js +0 -1
  282. package/dist/standalone/chunk-O3MDWYXF.js +0 -1
  283. package/dist/standalone/chunk-ONG4JEZD.js +0 -1
  284. package/dist/standalone/chunk-OS26JXYA.js +0 -1
  285. package/dist/standalone/chunk-OXFKZ4BM.js +0 -1
  286. package/dist/standalone/chunk-PGTEGUAB.js +0 -1
  287. package/dist/standalone/chunk-PTBUWRBY.js +0 -1
  288. package/dist/standalone/chunk-Q6HA3L2H.js +0 -1
  289. package/dist/standalone/chunk-QGV5ARD2.js +0 -1
  290. package/dist/standalone/chunk-QWRK4ESB.js +0 -1
  291. package/dist/standalone/chunk-RL2ITK2N.js +0 -1
  292. package/dist/standalone/chunk-RTJO3AR4.js +0 -1
  293. package/dist/standalone/chunk-SFY646MC.js +0 -1
  294. package/dist/standalone/chunk-T5UMHPAB.js +0 -1
  295. package/dist/standalone/chunk-T6HV2FQP.js +0 -2
  296. package/dist/standalone/chunk-T7ZKNNGX.js +0 -1
  297. package/dist/standalone/chunk-TCYPNSTV.js +0 -1
  298. package/dist/standalone/chunk-TQM6XHBA.js +0 -1
  299. package/dist/standalone/chunk-TRMWBRRU.js +0 -1
  300. package/dist/standalone/chunk-TW7KJSMR.js +0 -15
  301. package/dist/standalone/chunk-TYD3V4NB.js +0 -1
  302. package/dist/standalone/chunk-TZKLK52W.js +0 -1
  303. package/dist/standalone/chunk-U4RXQSQ7.js +0 -1
  304. package/dist/standalone/chunk-UNZ2UBVL.js +0 -1
  305. package/dist/standalone/chunk-VJRNOSRY.js +0 -1
  306. package/dist/standalone/chunk-W2BCSK5S.js +0 -1
  307. package/dist/standalone/chunk-W7MRISE3.js +0 -1
  308. package/dist/standalone/chunk-WM72PRE3.js +0 -1
  309. package/dist/standalone/chunk-X4WHMCOZ.js +0 -1
  310. package/dist/standalone/chunk-X74GEPSG.js +0 -1
  311. package/dist/standalone/chunk-XKPD4SFN.js +0 -1
  312. package/dist/standalone/chunk-XMSNLMWU.js +0 -1
  313. package/dist/standalone/chunk-XOPFDWXX.js +0 -1
  314. package/dist/standalone/chunk-XQLOVFPP.js +0 -1
  315. package/dist/standalone/chunk-XSHYZPGF.js +0 -1
  316. package/dist/standalone/chunk-XST3UEHU.js +0 -1
  317. package/dist/standalone/chunk-XYR5NST4.js +0 -1
  318. package/dist/standalone/chunk-Y74LIFSL.js +0 -1
  319. package/dist/standalone/chunk-YHTHRYP5.js +0 -1
  320. package/dist/standalone/chunk-YMEKCV27.js +0 -1
  321. package/dist/standalone/chunk-Z5EV64KS.js +0 -1
  322. package/dist/standalone/chunk-ZBON5T5A.js +0 -1
  323. package/dist/standalone/chunk-ZGSL4DPP.js +0 -1
  324. package/dist/standalone/chunk-ZOQTXWPK.js +0 -1
  325. package/dist/standalone/chunk-ZTOREMGH.js +0 -1
  326. package/dist/standalone/chunk-ZZ5GICTF.js +0 -1
  327. /package/dist/standalone/{chunk-UYEZR3BI.js → chunk-P6VNMPWR.js} +0 -0
@@ -0,0 +1 @@
1
+ import{G as ve,H as Ce,c as Z,d as fe,f as he,fa as Pe,g as ge,ga as G,h as ye,ha as Re,i as Se,ia as we,ja as be,ka as Ee,ta as xe}from"./chunk-P5EVJEGC.js";import{b as Y}from"./chunk-D65UVZIA.js";import{a as Ye}from"./chunk-QRA7AKYO.js";import{F as U,H as j,M as V,N,e as de}from"./chunk-OWRKSQPE.js";import{a as ue}from"./chunk-4EPW63HS.js";import{a as v,c as E,e as le,i as pe,r as me,w as W}from"./chunk-UD5REVU2.js";import{c as ce,g as w,i as D}from"./chunk-T3ZCW3RG.js";import{a as B,b as je}from"./chunk-6G3E4PJ2.js";import{a as n,d as R}from"./chunk-5PEAXTYQ.js";var Te=class{static{n(this,"BasePopupHandle")}attachedStores=[];attachedStoreValue=null;storeListeners=new Set;constructor(t,o,r=!0){this.fallbackStore=t,this.componentName=o,this.throwOnMissingTrigger=r}get attachedStore(){return this.attachedStoreValue}get store(){return this.attachedStoreValue??this.fallbackStore}get serverStore(){return this.fallbackStore}subscribeStore(t){return this.storeListeners.add(t),()=>{this.storeListeners.delete(t)}}attachStore(t){return this.attachedStores.push(t),this.setActiveStore(t),()=>{let o=this.attachedStores.lastIndexOf(t);o!==-1&&this.attachedStores.splice(o,1),this.setActiveStore(this.attachedStores[this.attachedStores.length-1]??null)}}setActiveStore(t){this.attachedStoreValue!==t&&(this.attachedStoreValue=t,this.storeListeners.forEach(o=>{o()}))}openByTrigger(t){let o=this.attachedStore;if(o===null)return;let r;if(t){for(let s=this.attachedStores.length-1;s>=0&&!r;s-=1)r=this.attachedStores[s].context.triggerElements.getById(t);r??=this.fallbackStore.context.triggerElements.getById(t)}if(t&&!r&&this.throwOnMissingTrigger)throw new Error(ce(99,this.componentName,t,this.componentName));o.setOpen(!0,N(V.imperativeAction,void 0,r))}closePopup(){let t=this.attachedStore;t!==null&&t.setOpen(!1,N(V.imperativeAction))}};var ee=R(B(),1),Oe=R(Ye(),1);function rt(e){let t=ee.useCallback(r=>e===void 0?w:e.subscribeStore(r),[e]),o=ee.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,Oe.useSyncExternalStore)(t,o,()=>e?.serverStore)}n(rt,"usePopupHandleStore");var Ae=R(B(),1),te=R(ue(),1);function lt(e,t){let o=Ae.useRef(null);function r(i){te.flushSync(()=>{e.setOpen(!1,N(V.focusOut,i.nativeEvent,i.currentTarget))}),ye(o.current)?.focus()}n(r,"handlePreFocusGuardFocus");function s(i){let u=e.select("positionerElement");if(u&&Se(i,u))e.context.beforeContentFocusGuardRef.current?.focus();else{te.flushSync(()=>{e.setOpen(!1,N(V.focusOut,i.nativeEvent,i.currentTarget))});let a=ge(e.context.triggerFocusTargetRef.current||t.current);for(;a!==null&&de(u,a);){let l=a;if(a=he(a),a===l)break}a?.focus()}}return n(s,"handleFocusTargetFocus"),{preFocusGuardRef:o,handlePreFocusGuardFocus:r,handleFocusTargetFocus:s}}n(lt,"useTriggerFocusGuards");var c=R(B(),1),Le=R(ue(),1);var F=R(B(),1);function oe(e){let t=me(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,s=pe(e),i=s?e.offsetWidth:o,u=s?e.offsetHeight:r;return(Z(o)!==i||Z(r)!==u)&&(o=i,r=u),{width:o,height:r}}n(oe,"getCssDimensions");var H="--popup-width",_="--popup-height";function Ne(e){let{popupElement:t,positionerElement:o,content:r,mounted:s,onMeasureLayout:i,onMeasureLayoutComplete:u,side:a,direction:l}=e,g=j(t,!0),C=U(),p=F.useRef(null),d=F.useRef(!0),m=F.useRef(w),y=E(i),h=E(u),b=F.useMemo(()=>Ge(a,l),[a,l]);v(()=>{if(!s){m.current=w,d.current=!0,p.current=null;return}if(!t||!o)return;m.current=Ve(t,b),ne(t,"auto");let I=q(t,"position","static"),x=q(t,"transform","none"),S=q(t,"scale","1"),T=Ve(o,{[Re]:"max-content",[we]:"max-content"});function X(){I(),x(),T()}n(X,"restoreMeasurementOverrides");function L(){X(),S()}if(n(L,"restoreMeasurementOverridesIncludingScale"),y?.(),d.current||p.current===null){K(o,"max-content");let A=oe(t);return p.current=A,K(o,A),L(),h?.(null,A),d.current=!1,()=>{m.current(),m.current=w}}K(o,"max-content");let O=p.current,P=oe(t);p.current=P,ne(t,O),L(),h?.(O,P),K(o,P);let $=new AbortController;return C.request(()=>{ne(t,P),g(()=>{t.style.setProperty(H,"auto"),t.style.setProperty(_,"auto")},$.signal)}),()=>{$.abort(),C.cancel(),m.current(),m.current=w}},[r,t,o,g,C,s,y,h,b])}n(Ne,"usePopupAutoResize");function Ge(e,t){let o=e==="top",r=e==="left"||e===(t==="rtl"?"inline-end":"inline-start");return!o&&!r?D:{position:"absolute",[o?"bottom":"top"]:"0",[r?"right":"left"]:"0"}}n(Ge,"getPopupAnchoringStyles");function q(e,t,o){let r=e.style.getPropertyValue(t);return e.style.setProperty(t,o),()=>{e.style.setProperty(t,r)}}n(q,"overrideElementStyle");function Ve(e,t){let o=[];for(let[r,s]of Object.entries(t))o.push(q(e,r,s));return o.length?()=>{o.forEach(r=>r())}:w}n(Ve,"applyElementStyles");function ne(e,t){let o=t==="auto"?"auto":`${t.width}px`,r=t==="auto"?"auto":`${t.height}px`;e.style.setProperty(H,o),e.style.setProperty(_,r)}n(ne,"setPopupCssSize");function K(e,t){let o=t==="max-content"?"max-content":`${t.width}px`,r=t==="max-content"?"max-content":`${t.height}px`;e.style.setProperty(be,o),e.style.setProperty(Ee,r)}n(K,"setPositionerCssSize");var Fe={name:"adaptiveOrigin",async fn(e){let{x:t,y:o,rects:{floating:r},elements:{floating:s},platform:i,strategy:u,placement:a}=e,l=le(s),g=l.getComputedStyle(s);if(!(g.transitionDuration!=="0s"&&g.transitionDuration!==""))return{x:t,y:o,data:G};let p=await i.getOffsetParent?.(s),d={width:0,height:0};if(u==="fixed"&&l?.visualViewport)d={width:l.visualViewport.width,height:l.visualViewport.height};else if(p===l){let x=W(s);d={width:x.documentElement.clientWidth,height:x.documentElement.clientHeight}}else await i.isElement?.(p)&&(d=await i.getDimensions(p));let m=fe(a),y=t,h=o;m==="left"&&(y=d.width-(t+r.width)),m==="top"&&(h=d.height-(o+r.height));let b=m==="left"?"right":G.sideX,I=m==="top"?"bottom":G.sideY;return{x:y,y:h,data:{sideX:b,sideY:I}}}};var Me="data-activation-direction";var M=R(je(),1);var Yt={activationDirection:n(e=>e?{[Me]:e}:null,"activationDirection")};function Gt(e){let{store:t,side:o,children:r}=e,s=Y(),i=t.useState("activeTriggerElement"),u=t.useState("activeTriggerId"),a=t.useState("open"),l=t.useState("payload"),g=t.useState("mounted"),C=t.useState("popupElement"),p=t.useState("positionerElement"),d=xe(a?i:null),m=Je(u,l),y=c.useRef(null),[h,b]=c.useState(null),[I,x]=c.useState(null),S=c.useRef(null),T=c.useRef(null),X=j(S,!0),L=U(),O=c.useRef(null),[P,$]=c.useState(null),[A,J]=c.useState(!1);v(()=>(t.set("adaptiveOrigin",Fe),()=>{t.set("adaptiveOrigin",void 0)}),[t]);let ke=E(()=>{S.current?.style.setProperty("animation","none"),S.current?.style.setProperty("transition","none"),T.current?.style.setProperty("display","none")}),Be=E(f=>{S.current?.style.removeProperty("animation"),S.current?.style.removeProperty("transition"),T.current?.style.removeProperty("display"),f&&$(f)}),ie=E(()=>{O.current?.abort();let f=new AbortController;O.current=f,X(()=>{b(null),$(null),y.current=null},f.signal)}),z=c.useRef(null);v(()=>{(!a||!g)&&(z.current=null)},[a,g]),v(()=>{if(i&&d&&i!==d&&z.current!==i&&y.current){b(y.current),J(!0);let f=Xe(d,i);x(f),z.current=i}},[i,d]),v(()=>{h!=null&&(O.current?.abort(),J(!0),L.request(()=>{Le.flushSync(()=>{J(!1)}),ie()}))},[m,h,ie,L]),v(()=>{let f=S.current;if(!f)return;let ae=W(f).createElement("div");for(let Ue of Array.from(f.childNodes))ae.appendChild(Ue.cloneNode(!0));y.current=ae});let se=h!=null,Q;se?Q=(0,M.jsxs)(c.Fragment,{children:[(0,M.jsx)("div",{"data-previous":!0,inert:Pe(!0),ref:T,style:{...P?{[H]:`${P.width}px`,[_]:`${P.height}px`}:null,position:"absolute"},"data-ending-style":A?void 0:""},"previous"),(0,M.jsx)("div",{"data-current":!0,ref:S,"data-starting-style":A?"":void 0,children:r},m)]}):Q=(0,M.jsx)("div",{"data-current":!0,ref:S,children:r},m),v(()=>{let f=T.current;!f||!h||f.replaceChildren(...Array.from(h.childNodes))},[h]),Ne({popupElement:C,positionerElement:p,mounted:g,content:l,onMeasureLayout:ke,onMeasureLayoutComplete:Be,side:o,direction:s});let We={activationDirection:qe(I),transitioning:se};return{children:Q,state:We}}n(Gt,"usePopupViewport");function qe(e){if(e)return`${Ie(e.horizontal,5,"right","left")} ${Ie(e.vertical,5,"down","up")}`}n(qe,"getActivationDirection");function Ie(e,t,o,r){return e>t?o:e<-t?r:""}n(Ie,"getValueWithTolerance");function Xe(e,t){let o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),s={x:o.left+o.width/2,y:o.top+o.height/2},i={x:r.left+r.width/2,y:r.top+r.height/2};return{horizontal:i.x-s.x,vertical:i.y-s.y}}n(Xe,"calculateRelativePosition");function Je(e,t){let[o,r]=c.useState(0),s=c.useRef(e),i=c.useRef(t),u=c.useRef(!1);return v(()=>{let a=s.current,l=i.current,g=e!==a,C=t!==l;g?(r(p=>p+1),u.current=!C):u.current&&C&&(r(p=>p+1),u.current=!1),s.current=e,i.current=t},[e,t]),`${e??"current"}-${o}`}n(Je,"usePopupContentKey");function zt(e,t,o=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Ce({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:o,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:D,inactiveTriggerProps:D,popupProps:D}}n(zt,"createInitialPopupStoreState");var k=n(e=>e.triggerIdProp??e.activeTriggerId,"activeTriggerIdSelector"),re=n(e=>e.openProp??e.open,"openSelector"),$e=n(e=>(e.popupElement?.id??e.floatingId)||void 0,"popupIdSelector");function He(e,t){return t!==void 0&&re(e)&&k(e)===t}n(He,"triggerOwnsOpenPopup");function ze(e,t){return He(e,t)?!0:t!==void 0&&re(e)&&k(e)==null&&e.triggerCount===1}n(ze,"triggerOwnsOpenPopupOrIsOnlyTrigger");var Qt={open:re,mounted:n(e=>e.mounted,"mounted"),transitionStatus:n(e=>e.transitionStatus,"transitionStatus"),floatingRootContext:n(e=>e.floatingRootContext,"floatingRootContext"),triggerCount:n(e=>e.triggerCount,"triggerCount"),preventUnmountingOnClose:n(e=>e.preventUnmountingOnClose,"preventUnmountingOnClose"),payload:n(e=>e.payload,"payload"),activeTriggerId:k,activeTriggerElement:n(e=>e.mounted?e.activeTriggerElement:null,"activeTriggerElement"),popupId:$e,isTriggerActive:n((e,t)=>t!==void 0&&k(e)===t,"isTriggerActive"),isOpenedByTrigger:n((e,t)=>He(e,t),"isOpenedByTrigger"),isMountedByTrigger:n((e,t)=>t!==void 0&&k(e)===t&&e.mounted,"isMountedByTrigger"),triggerProps:n((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,"triggerProps"),triggerPopupId:n((e,t)=>ze(e,t)?$e(e):void 0,"triggerPopupId"),popupProps:n(e=>e.popupProps,"popupProps"),popupElement:n(e=>e.popupElement,"popupElement"),positionerElement:n(e=>e.positionerElement,"positionerElement")};var _e=class extends ve{static{n(this,"NullStore")}setState(t){}update(t){}set(t,o){}notifyAll(){}};export{Te as a,zt as b,Qt as c,rt as d,_e as e,lt as f,Yt as g,Gt as h};
@@ -0,0 +1 @@
1
+ import{a as N,b as fn}from"./chunk-6G3E4PJ2.js";import{a as r,d as B}from"./chunk-5PEAXTYQ.js";var pn=B(N(),1),bo=(0,pn.createContext)({});var hn=B(N(),1);function dn(t){let e=(0,hn.useRef)(null);return e.current===null&&(e.current=t()),e.current}r(dn,"useConstant");var wo=B(N(),1);var gn=typeof window<"u";var zr=gn?wo.useLayoutEffect:wo.useEffect;var yn=B(N(),1),ue=(0,yn.createContext)(null);function Nt(t,e){t.indexOf(e)===-1&&t.push(e)}r(Nt,"addUniqueItem");function bt(t,e){let o=t.indexOf(e);o>-1&&t.splice(o,1)}r(bt,"removeItem");var W=r((t,e,o)=>o>e?e:o<t?t:o,"clamp");var xt=r(()=>{},"warning"),Z=r(()=>{},"invariant");var $={};var Gt=r(t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),"isNumericalString");var Oe=r(t=>typeof t=="object"&&t!==null,"isObject");var Ut=r(t=>/^0[^.\s]+$/u.test(t),"isZeroValueString");function je(t){let e;return()=>(e===void 0&&(e=t()),e)}r(je,"memo");var O=r(t=>t,"noop");var st=r((...t)=>t.reduce((e,o)=>i=>o(e(i))),"pipe");var ct=r((t,e,o)=>{let i=e-t;return i?(o-t)/i:1},"progress");var ut=class{static{r(this,"SubscriptionManager")}constructor(){this.subscriptions=[]}add(e){return Nt(this.subscriptions,e),()=>this.remove(e)}remove(e){bt(this.subscriptions,e)}notify(e,o,i){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](e,o,i);else for(let a=0;a<n;a++){let s=this.subscriptions[a];s&&s(e,o,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var G=r(t=>t*1e3,"secondsToMilliseconds"),K=r(t=>t/1e3,"millisecondsToSeconds");var Ne=r((t,e)=>e?t*(1e3/e):0,"velocityPerSecond");var xn=r((t,e,o)=>(((1-3*o+3*e)*t+(3*o-6*e))*t+3*e)*t,"calcBezier"),Rl=1e-7,Ll=12;function Il(t,e,o,i,n){let a,s,l=0;do s=e+(o-e)/2,a=xn(s,i,n)-t,a>0?o=s:e=s;while(Math.abs(a)>Rl&&++l<Ll);return s}r(Il,"binarySubdivide");function wt(t,e,o,i){if(t===e&&o===i)return O;let n=r(a=>Il(a,0,1,t,o),"getTForX");return a=>a===0||a===1?a:xn(n(a),e,i)}r(wt,"cubicBezier");var Ao=r(t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,"mirrorEasing");var Co=r(t=>e=>1-t(1-e),"reverseEasing");var Mo=wt(.33,1.53,.69,.99),me=Co(Mo),Ge=Ao(me);var Ue=r(t=>t>=1?1:(t*=2)<1?.5*me(t):.5*(2-Math.pow(2,-10*(t-1))),"anticipate");var We=r(t=>1-Math.sin(Math.acos(t)),"circIn"),ze=Co(We),Ke=Ao(We);var Kr=wt(.42,0,1,1),Hr=wt(0,0,.58,1),fe=wt(.42,0,.58,1);var $r=r(t=>Array.isArray(t)&&typeof t[0]!="number","isEasingArray");var He=r(t=>Array.isArray(t)&&typeof t[0]=="number","isBezierDefinition");var vn={linear:O,easeIn:Kr,easeInOut:fe,easeOut:Hr,circIn:We,circInOut:Ke,circOut:ze,backIn:me,backInOut:Ge,backOut:Mo,anticipate:Ue},Bl=r(t=>typeof t=="string","isValidEasing"),Do=r(t=>{if(He(t)){Z(t.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[e,o,i,n]=t;return wt(e,o,i,n)}else if(Bl(t))return Z(vn[t]!==void 0,`Invalid easing type '${t}'`,"invalid-easing-type"),vn[t];return t},"easingDefinitionToFunction");var E={delta:0,timestamp:0,isProcessing:!1};var Eo;function kl(){Eo=void 0}r(kl,"clearTime");var D={now:r(()=>(Eo===void 0&&D.set(E.isProcessing||$.useManualTiming?E.timestamp:performance.now()),Eo),"now"),set:r(t=>{Eo=t,queueMicrotask(kl)},"set")};var mt=r(t=>Math.round(t*1e5)/1e5,"sanitize");var Tn=r(t=>e=>typeof e=="string"&&e.startsWith(t),"checkStringStartsWith"),Ro=Tn("--"),Fl=Tn("var(--"),pe=r(t=>Fl(t)?Ol.test(t.split("/*")[0].trim()):!1,"isCSSVariableToken"),Ol=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function _r(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}r(_r,"containsCSSVariable");var ft={test:r(t=>typeof t=="number","test"),parse:parseFloat,transform:r(t=>t,"transform")},vt={...ft,transform:r(t=>W(0,1,t),"transform")},$e={...ft,default:1};var he=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Sn(t){return t==null}r(Sn,"isNullish");var Vn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var de=r((t,e)=>o=>!!(typeof o=="string"&&Vn.test(o)&&o.startsWith(t)||e&&!Sn(o)&&Object.prototype.hasOwnProperty.call(o,e)),"isColorString"),Lo=r((t,e,o)=>i=>{if(typeof i!="string")return i;let[n,a,s,l]=i.match(he);return{[t]:parseFloat(n),[e]:parseFloat(a),[o]:parseFloat(s),alpha:l!==void 0?parseFloat(l):1}},"splitColor");var jl=r(t=>W(0,255,t),"clampRgbUnit"),Yr={...ft,transform:r(t=>Math.round(jl(t)),"transform")},pt={test:de("rgb","red"),parse:Lo("red","green","blue"),transform:r(({red:t,green:e,blue:o,alpha:i=1})=>"rgba("+Yr.transform(t)+", "+Yr.transform(e)+", "+Yr.transform(o)+", "+mt(vt.transform(i))+")","transform")};function Nl(t){let e="",o="",i="",n="";return t.length>5?(e=t.substring(1,3),o=t.substring(3,5),i=t.substring(5,7),n=t.substring(7,9)):(e=t.substring(1,2),o=t.substring(2,3),i=t.substring(3,4),n=t.substring(4,5),e+=e,o+=o,i+=i,n+=n),{red:parseInt(e,16),green:parseInt(o,16),blue:parseInt(i,16),alpha:n?parseInt(n,16)/255:1}}r(Nl,"parseHex");var _e={test:de("#"),parse:Nl,transform:pt.transform};var Ye=r(t=>({test:r(e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,"test"),parse:parseFloat,transform:r(e=>`${e}${t}`,"transform")}),"createUnitType"),ot=Ye("deg"),_=Ye("%"),v=Ye("px"),Xr=Ye("vh"),qr=Ye("vw"),Io={..._,parse:r(t=>_.parse(t)/100,"parse"),transform:r(t=>_.transform(t*100),"transform")};var At={test:de("hsl","hue"),parse:Lo("hue","saturation","lightness"),transform:r(({hue:t,saturation:e,lightness:o,alpha:i=1})=>"hsla("+Math.round(t)+", "+_.transform(mt(e))+", "+_.transform(mt(o))+", "+mt(vt.transform(i))+")","transform")};var k={test:r(t=>pt.test(t)||_e.test(t)||At.test(t),"test"),parse:r(t=>pt.test(t)?pt.parse(t):At.test(t)?At.parse(t):_e.parse(t),"parse"),transform:r(t=>typeof t=="string"?t:t.hasOwnProperty("red")?pt.transform(t):At.transform(t),"transform"),getAnimatableNone:r(t=>{let e=k.parse(t);return e.alpha=0,k.transform(e)},"getAnimatableNone")};var Pn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;var wn=new RegExp(he.source),An=new RegExp(Pn.source,"i");function Gl(t){return isNaN(t)&&typeof t=="string"&&(wn.test(t)||An.test(t))}r(Gl,"test");var Cn="number",Mn="color",Ul="var",Wl="var(",bn="${}",zl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Dn(t){let e=t.toString();return wn.test(e)||An.test(e)}r(Dn,"hasComplexValues");function ge(t){let e=t.toString(),o=[],i={color:[],number:[],var:[]},n=[],a=0,l=e.replace(zl,u=>(k.test(u)?(i.color.push(a),n.push(Mn),o.push(k.parse(u))):u.startsWith(Wl)?(i.var.push(a),n.push(Ul),o.push(u)):(i.number.push(a),n.push(Cn),o.push(parseFloat(u))),++a,bn)).split(bn);return{values:o,split:l,indexes:i,types:n}}r(ge,"analyseComplexValue");function Kl(t){return ge(t).values}r(Kl,"parseComplexValue");function En({split:t,types:e}){let o=t.length;return i=>{let n="";for(let a=0;a<o;a++)if(n+=t[a],i[a]!==void 0){let s=e[a];s===Cn?n+=mt(i[a]):s===Mn?n+=k.transform(i[a]):n+=i[a]}return n}}r(En,"buildTransformer");function Hl(t){return En(ge(t))}r(Hl,"createTransformer");var $l=r(t=>typeof t=="number"?0:k.test(t)?k.getAnimatableNone(t):t,"convertNumbersToZero"),_l=r((t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:$l(t),"convertToZero");function Yl(t){let e=ge(t);return En(e)(e.values.map((i,n)=>_l(i,e.split[n])))}r(Yl,"getAnimatableNone");var j={test:Gl,parse:Kl,createTransformer:Hl,getAnimatableNone:Yl};function Zr(t,e,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?t+(e-t)*6*o:o<1/2?e:o<2/3?t+(e-t)*(2/3-o)*6:t}r(Zr,"hueToRgb");function Rn({hue:t,saturation:e,lightness:o,alpha:i}){t/=360,e/=100,o/=100;let n=0,a=0,s=0;if(!e)n=a=s=o;else{let l=o<.5?o*(1+e):o+e-o*e,u=2*o-l;n=Zr(u,l,t+1/3),a=Zr(u,l,t),s=Zr(u,l,t-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(s*255),alpha:i}}r(Rn,"hslaToRgba");function ye(t,e){return o=>o>0?e:t}r(ye,"mixImmediate");var A=r((t,e,o)=>t+(e-t)*o,"mixNumber");var Jr=r((t,e,o)=>{let i=t*t,n=o*(e*e-i)+i;return n<0?0:Math.sqrt(n)},"mixLinearColor"),Xl=[_e,pt,At],ql=r(t=>Xl.find(e=>e.test(t)),"getColorType");function Ln(t){let e=ql(t);if(!e)return xt(!1,`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!1;let o=e.parse(t);return e===At&&(o=Rn(o)),o}r(Ln,"asRGBA");var Qr=r((t,e)=>{let o=Ln(t),i=Ln(e);if(!o||!i)return ye(t,e);let n={...o};return a=>(n.red=Jr(o.red,i.red,a),n.green=Jr(o.green,i.green,a),n.blue=Jr(o.blue,i.blue,a),n.alpha=A(o.alpha,i.alpha,a),pt.transform(n))},"mixColor");var Bo=new Set(["none","hidden"]);function In(t,e){return Bo.has(t)?o=>o<=0?t:e:o=>o>=1?e:t}r(In,"mixVisibility");function Zl(t,e){return o=>A(t,e,o)}r(Zl,"mixNumber");function ko(t){return typeof t=="number"?Zl:typeof t=="string"?pe(t)?ye:k.test(t)?Qr:tc:Array.isArray(t)?Bn:typeof t=="object"?k.test(t)?Qr:Jl:ye}r(ko,"getMixer");function Bn(t,e){let o=[...t],i=o.length,n=t.map((a,s)=>ko(a)(a,e[s]));return a=>{for(let s=0;s<i;s++)o[s]=n[s](a);return o}}r(Bn,"mixArray");function Jl(t,e){let o={...t,...e},i={};for(let n in o)t[n]!==void 0&&e[n]!==void 0&&(i[n]=ko(t[n])(t[n],e[n]));return n=>{for(let a in i)o[a]=i[a](n);return o}}r(Jl,"mixObject");function Ql(t,e){let o=[],i={color:0,var:0,number:0};for(let n=0;n<e.values.length;n++){let a=e.types[n],s=t.indexes[a][i[a]],l=t.values[s]??0;o[n]=l,i[a]++}return o}r(Ql,"matchOrder");var tc=r((t,e)=>{let o=j.createTransformer(e),i=ge(t),n=ge(e);return i.indexes.var.length===n.indexes.var.length&&i.indexes.color.length===n.indexes.color.length&&i.indexes.number.length>=n.indexes.number.length?Bo.has(t)&&!n.values.length||Bo.has(e)&&!i.values.length?In(t,e):st(Bn(Ql(i,n),n.values),o):(xt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ye(t,e))},"mixComplex");var kn=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function ec(t,e){let o=kn.exec(t);if(!o)return;let i=kn.exec(e);if(!i||o[2]!==i[2])return;let n=o[2],a=parseFloat(o[1]),s=parseFloat(i[1]);return l=>mt(A(a,s,l))+n}r(ec,"mixUnit");function xe(t,e,o){if(typeof t=="number"&&typeof e=="number"&&typeof o=="number")return A(t,e,o);if(typeof t=="string"&&typeof e=="string"){let n=ec(t,e);if(n)return n}return ko(t)(t,e)}r(xe,"mix");var Xe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Fn(t){let e=new Set,o=new Set,i=!1,n=!1,a=new Set,s={delta:0,timestamp:0,isProcessing:!1};function l(c){a.has(c)&&(o.add(c),t()),c(s)}r(l,"triggerCallback");let u={schedule:r((c,m=!1,f=!1)=>{let d=f&&i?e:o;return m&&a.add(c),d.add(c),c},"schedule"),cancel:r(c=>{o.delete(c),a.delete(c)},"cancel"),process:r(c=>{if(s=c,i){n=!0;return}i=!0;let m=e;e=o,o=m,e.forEach(l),e.clear(),i=!1,n&&(n=!1,u.process(c))},"process")};return u}r(Fn,"createRenderStep");var oc=40;function Fo(t,e,o={delta:0,timestamp:0,isProcessing:!1}){let i=!1,n=!0,a=r(()=>i=!0,"flagRunNextFrame"),s=Xe.reduce((P,T)=>(P[T]=Fn(a),P),{}),{setup:l,read:u,resolveKeyframes:c,preUpdate:m,update:f,preRender:p,render:d,postRender:h}=s,x=r(()=>{let P=$.useManualTiming,T=P?o.timestamp:performance.now();i=!1,P||(o.delta=n?1e3/60:Math.max(Math.min(T-o.timestamp,oc),1)),o.timestamp=T,o.isProcessing=!0,l.process(o),u.process(o),c.process(o),m.process(o),f.process(o),p.process(o),d.process(o),h.process(o),o.isProcessing=!1,i&&e&&(n=!1,t(x))},"processBatch"),g=r(()=>{i=!0,n=!0,o.isProcessing||t(x)},"wake");return{schedule:Xe.reduce((P,T)=>{let C=s[T];return P[T]=(R,y=!1,S=!1)=>(i||g(),C.schedule(R,y,S)),P},{}),cancel:r(P=>{for(let T=0;T<Xe.length;T++)s[Xe[T]].cancel(P)},"cancel"),state:o,steps:s}}r(Fo,"createRenderBatcher");var{schedule:w,cancel:J,steps:qe}=Fo(typeof requestAnimationFrame<"u"?requestAnimationFrame:O,!0,E);var On=r(t=>{let e=r(({timestamp:o})=>t(o),"passTimestamp");return{start:r((o=!0)=>w.update(e,o),"start"),stop:r(()=>J(e),"stop"),now:r(()=>E.isProcessing?E.timestamp:D.now(),"now")}},"frameloopDriver");var Oo=r((t,e,o=10)=>{let i="",n=Math.max(Math.round(e/o),2);for(let a=0;a<n;a++)i+=Math.round(t(a/(n-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},"generateLinearEasing");function ve(t,e=50,o=2e4,i){let n=0,a=t.next(n);for(i?.push(a.value);!a.done&&n<o;)n+=e,a=t.next(n),i?.push(a.value);return n>=o?1/0:n}r(ve,"calcGeneratorDuration");function jn(t,e=100,o){let i=o({...t,keyframes:[0,e]}),n=Math.min(ve(i),2e4);return{type:"keyframes",ease:r(a=>i.next(n*a).value/e,"ease"),duration:K(n)}}r(jn,"createGeneratorEasing");var H={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},Nn=r(t=>t<0?1/Math.max(1+t,H.minDamping):Math.max(1-t,H.minDamping),"bounceToDampingRatio");function Gn(t,e){if(!(t>1))return 1;let o=Math.sqrt(t*t-1),i=t-o,n=t+o,a=2*o*Math.exp(-e)*(1+e);return Un(s=>n*Math.exp(-i*s)-i*Math.exp(-n*s)-a,s=>Math.exp(-n*s)-Math.exp(-i*s),e)/e}r(Gn,"overdampedFreqScale");function ri(t,e){return t*Math.sqrt(1-e*e)}r(ri,"calcAngularFreq");var rc=12;function Un(t,e,o){let i=o;for(let n=1;n<rc;n++)i=i-t(i)/e(i);return i}r(Un,"approximateRoot");var ei=.001;function ic({duration:t=H.duration,bounce:e=H.bounce}){let o,i;xt(t<=G(H.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let n=Nn(e);t=W(H.minDuration,H.maxDuration,K(t)),n<1?(o=r(c=>{let m=c*n,f=m*t,p=ri(c,n),d=Math.exp(-f);return ei-m/p*d},"envelope"),i=r(c=>{let f=c*n*t,p=n*n*c*c*t,d=Math.exp(-f),h=ri(c*c,n);return(-o(c)+ei>0?-1:1)*-p*d/h},"derivative")):(o=r(c=>{let m=Math.exp(-c*t),f=c*t+1;return-ei+m*f},"envelope"),i=r(c=>{let m=Math.exp(-c*t),f=-c*(t*t);return m*f},"derivative"));let a=5/t,s=Un(o,i,a),l=s*Gn(n,s*t),u=l*l;return{stiffness:u,damping:n*2*Math.sqrt(u),duration:G(t)}}r(ic,"findSpring");var ii=r((t,e)=>(e?t>=0:t>0)&&t<1/0,"isValidPhysics");function oi(t,e){if(ii(t,e))return t}r(oi,"resolvePhysics");function nc(t){let e=oi(t.stiffness),o=oi(t.damping,!0),i=oi(t.mass),n={...t,stiffness:e??H.stiffness,damping:o??H.damping,mass:i??H.mass,isResolvedFromDuration:!1,isTimeDefined:(e??o??i)===void 0&&(t.duration!==void 0||t.bounce!==void 0)};if(n.isTimeDefined){if(t.visualDuration){let a=Nn(t.bounce||0),s=2*Math.PI/(t.visualDuration*1.2)*Gn(a,2*Math.PI/1.2);n.stiffness=s*s,n.damping=2*a*Math.sqrt(n.stiffness)}else Object.assign(n,ic(n)),n.isResolvedFromDuration=!0;(!ii(n.stiffness)||!ii(n.damping,!0))&&(n.stiffness=H.stiffness,n.damping=H.damping)}return n}r(nc,"getSpringOptions");function Te(t=H.visualDuration,e=H.bounce){let o=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t,i=o.keyframes[0],n=o.keyframes[o.keyframes.length-1],a={done:!1,value:i},{stiffness:s,damping:l,mass:u,duration:c,isResolvedFromDuration:m,isTimeDefined:f}=nc({...o}),p=r(y=>f?0:-K(y),"inheritVelocity"),d=l/(2*Math.sqrt(s*u)),h=K(Math.sqrt(s/u)),x=d*h,g={target:n,delta:n-i,velocity:p(o.velocity||0)||0,restSpeed:0,restDelta:0},b=r(()=>{let y=Math.abs(g.delta)<5;g.restSpeed=o.restSpeed||(y?H.restSpeed.granular:H.restSpeed.default),g.restDelta=o.restDelta||(y?H.restDelta.granular:H.restDelta.default)},"setRestThresholds");b();let V,P,T;if(d<1){let y=ri(h,d),S={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};T=r(()=>{S.A=(g.velocity+x*g.delta)/y,S.sinC=x*S.A+g.delta*y,S.cosC=x*g.delta-S.A*y},"update");let F=r(L=>{L!==S.t&&(S.t=L,S.env=Math.exp(-x*L),S.sin=Math.sin(y*L),S.cos=Math.cos(y*L))},"sample");V=r(L=>(F(L),g.target-S.env*(S.A*S.sin+g.delta*S.cos)),"resolveSpring"),P=r(L=>(F(L),S.env*(S.sinC*S.sin+S.cosC*S.cos)),"resolveVelocity")}else if(d===1){V=r(S=>g.target-Math.exp(-h*S)*(g.delta+(g.velocity+h*g.delta)*S),"resolveSpring");let y={C:0};T=r(()=>{y.C=g.velocity+h*g.delta},"update"),P=r(S=>Math.exp(-h*S)*(h*y.C*S-g.velocity),"resolveVelocity")}else{let y=h*Math.sqrt(d*d-1),S=x-y,F=x+y,L=f?1/0:300/y,gt=r((q,le)=>Math.exp(le>L?-q*L-x*(le-L):-q*le),"decayAt"),yt={S:0,F:0};T=r(()=>{let q=(g.velocity+x*g.delta)/y;yt.S=(g.delta+q)/2,yt.F=(g.delta-q)/2},"update"),V=r(q=>g.target-yt.S*gt(S,q)-yt.F*gt(F,q),"resolveSpring"),P=r(q=>S*yt.S*gt(S,q)+F*yt.F*gt(F,q),"resolveVelocity")}T();let C=m&&c||null,R={calculatedDuration:C,retarget:r((y,S)=>{g.target=y[y.length-1],g.delta=g.target-y[0],g.velocity=p(S),o.restSpeed&&o.restDelta||b(),R.calculatedDuration=C,a.done=!1,T()},"retarget"),velocity:r(y=>G(P(y)),"velocity"),next:r(y=>{let S=V(y);if(m)a.done=y>=c;else{let F=G(P(y));a.done=Math.abs(F)<=g.restSpeed&&Math.abs(g.target-S)<=g.restDelta}return a.value=a.done?g.target:S,a},"next"),toString:r(()=>{let y=Math.min(ve(R),2e4),S=Oo(F=>R.next(y*F).value,y,30);return y+"ms "+S},"toString"),toTransition:r(()=>{},"toTransition")};return R}r(Te,"spring");Te.applyToOptions=t=>{let e=jn(t,100,Te);return t.ease=e.ease,t.duration=G(e.duration),t.type="keyframes",t};function Ze({keyframes:t,velocity:e=0,power:o=.8,timeConstant:i=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:s,min:l,max:u,restDelta:c=.5,restSpeed:m}){let f=t[0],p={done:!1,value:f},d=r(y=>y<l||y>u,"isOutOfBounds"),h=r(y=>l===void 0?u:u===void 0||Math.abs(l-y)<Math.abs(u-y)?l:u,"nearestBoundary"),x=o*e,g=f+x,b=s===void 0?g:s(g);b!==g&&(x=b-f);let V=r(y=>-x*Math.exp(-y/i),"calcDelta"),P=r(y=>{let S=V(y);p.done=Math.abs(S)<=c,p.value=p.done?b:b+S},"applyFriction"),T,C,R=r(y=>{d(p.value)&&(T=y,C=Te({keyframes:[p.value,h(p.value)],velocity:-V(y)/i*1e3,damping:n,stiffness:a,restDelta:c,restSpeed:m}))},"checkCatchBoundary");return R(0),{calculatedDuration:null,next:r(y=>{let S=!1;return!C&&T===void 0&&(S=!0,P(y),R(y)),T!==void 0&&y>=T?C.next(y-T):(!S&&P(y),p)},"next")}}r(Ze,"inertia");function sc(t,e,o){let i=[],n=o||$.mix||xe,a=t.length-1;for(let s=0;s<a;s++){let l=n(t[s],t[s+1]);if(e){let u=Array.isArray(e)?e[s]||O:e;l=st(u,l)}i.push(l)}return i}r(sc,"createMixers");function Wn(t,e,{clamp:o=!0,ease:i,mixer:n}={}){let a=t.length;if(Z(a===e.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>e[0];if(a===2&&e[0]===e[1])return()=>e[1];let s=t[0]===t[1];t[0]>t[a-1]&&(t=[...t].reverse(),e=[...e].reverse());let l=sc(e,i,n),u=l.length,c=r(m=>{if(s&&m<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(m<t[f+1]);f++);let p=ct(t[f],t[f+1],m);return l[f](p)},"interpolator");return o?m=>c(W(t[0],t[a-1],m)):c}r(Wn,"interpolate");function zn(t,e){let o=t[t.length-1];for(let i=1;i<=e;i++){let n=ct(0,e,i);t.push(A(o,1,n))}}r(zn,"fillOffset");function Kn(t){let e=[0];return zn(e,t.length-1),e}r(Kn,"defaultOffset");function Hn(t,e){return t.map(o=>o*e)}r(Hn,"convertOffsetToTimes");function ac(t,e){return t.map(()=>e||fe).splice(0,t.length-1)}r(ac,"defaultEasing");function Wt({duration:t=300,keyframes:e,times:o,ease:i="easeInOut"}){let n=$r(i)?i.map(Do):Do(i)||fe,a={done:!1,value:e[0]};if(e.length===2&&!Array.isArray(n)&&(!o||o.length!==2||o[0]===0&&o[1]===1)){let[u,c]=e,m=u===c?void 0:($.mix||xe)(u,c);return{calculatedDuration:t,next:r(f=>(a.value=m?m(n(t>0?W(0,1,f/t):1)):c,a.done=f>=t,a),"next")}}let s=Hn(o&&o.length===e.length?o:Kn(e),t),l=Wn(s,e,{ease:Array.isArray(n)?n:ac(e,n)});return{calculatedDuration:t,next:r(u=>(a.value=l(u),a.done=u>=t,a),"next")}}r(Wt,"keyframes");var lc=5;function cc(t,e,o){let i=Math.max(e-lc,0);return Ne(o-t(i),e-i)}r(cc,"getGeneratorVelocity");function $n(t,e,o=0){return e<=0?o:t.velocity?t.velocity(e):cc(i=>t.next(i).value,e,t.next(e).value)}r($n,"calcGeneratorVelocity");var uc=r(t=>t!==null,"isNotNull");function Ct(t,{repeat:e,repeatType:o="loop"},i,n=1){let a=t.filter(uc),l=n<0||e&&o!=="loop"&&e%2===1?0:a.length-1;return!l||i===void 0?a[l]:i}r(Ct,"getFinalKeyframe");var mc={decay:Ze,inertia:Ze,tween:Wt,keyframes:Wt,spring:Te};function jo(t){typeof t.type=="string"&&(t.type=mc[t.type])}r(jo,"replaceTransitionType");function _n(t,e){return{kind:t,animation:e,timestamp:D.now(),frameTimestamp:E.timestamp,frameIsProcessing:E.isProcessing}}r(_n,"baseRecord");function No(t,e,o){let i=globalThis.__MOTION_INSPECT__;if(i)try{i({..._n("animation-start",t),options:o?{...e,...o}:e})}catch{}}r(No,"notifyAnimationStart");function Yn(t,e){let o=globalThis.__MOTION_INSPECT__;if(o)try{o({..._n("layout-animation-start",t),node:e})}catch{}}r(Yn,"notifyLayoutAnimationStart");var Mt=class{static{r(this,"WithPromise")}constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,o){return this.finished.then(e,o)}};var fc=r(t=>t/100,"percentToProgress"),Tt=class extends Mt{static{r(this,"JSAnimation")}constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:o}=this.options;o&&o.updatedAt!==D.now()&&this.tick(D.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),No(this,this.options)}initAnimation(){let{options:e}=this;jo(e);let{type:o=Wt,repeat:i=0,repeatDelay:n=0,repeatType:a,velocity:s=0}=e,{keyframes:l}=e,u=o||Wt;u!==Wt&&typeof l[0]!="number"&&(this.mixKeyframes=st(fc,xe(l[0],l[1])),l=[0,100]);let c=u(l===e.keyframes?e:{...e,keyframes:l});a==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...l].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=ve(c));let{calculatedDuration:m}=c;this.calculatedDuration=m,this.resolvedDuration=m+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=c}updateTime(e){let o=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o}tick(e,o=!1){let{generator:i,totalDuration:n,mixKeyframes:a,mirroredGenerator:s,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return i.next(0);let{delay:c=0,keyframes:m,repeat:f,repeatType:p,repeatDelay:d,type:h,onUpdate:x,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),o?this.currentTime=e:this.updateTime(e);let b=this.currentTime-c*(this.playbackSpeed>=0?1:-1),V=this.playbackSpeed>=0?b<0:b>n;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let P=this.currentTime,T=i;if(f){let S=Math.min(this.currentTime,n)/l,F=Math.floor(S),L=S%1;!L&&S>=1&&(L=1),L===1&&F--,F=Math.min(F,f+1),F%2&&(p==="reverse"?(L=1-L,d&&(L-=d/l)):p==="mirror"&&(T=s)),P=W(0,1,L)*l}let C;V?(this.delayState.value=m[0],C=this.delayState):C=T.next(P),a&&!V&&(C.value=a(C.value));let{done:R}=C;!V&&u!==null&&(R=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let y=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return y&&h!==Ze&&(C.value=Ct(m,this.options,g,this.speed)),x&&x(C.value),y&&this.finish(),C}then(e,o){return this.finished.then(e,o)}get duration(){return K(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+K(e)}get time(){return K(this.currentTime)}set time(e){e=G(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return $n(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let o=this.playbackSpeed!==e;o&&this.driver&&this.updateTime(D.now()),this.playbackSpeed=e,o&&this.driver&&(this.time=K(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=On,startTime:o}=this.options;this.driver||(this.driver=e(n=>this.tick(n))),this.options.onPlay?.();let i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=o??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(D.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}};var pc=new Set(["brightness","contrast","saturate","opacity"]);function hc(t){let[e,o]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;let[i]=o.match(he)||[];if(!i)return t;let n=o.replace(i,""),a=pc.has(e)?1:0;return i!==o&&(a*=100),e+"("+a+n+")"}r(hc,"applyDefaultFilter");var dc=/\b([a-z-]*)\(.*?\)/gu,Je={...j,getAnimatableNone:r(t=>{let e=t.match(dc);return e?e.map(hc).join(" "):t},"getAnimatableNone")};var Qe={...j,getAnimatableNone:r(t=>{let e=j.parse(t);return j.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))},"getAnimatableNone")};var ni={...ft,transform:Math.round};var Xn={rotate:ot,pathRotation:ot,rotateX:ot,rotateY:ot,rotateZ:ot,scale:$e,scaleX:$e,scaleY:$e,scaleZ:$e,skew:ot,skewX:ot,skewY:ot,distance:v,translateX:v,translateY:v,translateZ:v,x:v,y:v,z:v,perspective:v,transformPerspective:v,opacity:vt,originX:Io,originY:Io,originZ:v};var zt={borderWidth:v,borderTopWidth:v,borderRightWidth:v,borderBottomWidth:v,borderLeftWidth:v,borderRadius:v,borderTopLeftRadius:v,borderTopRightRadius:v,borderBottomRightRadius:v,borderBottomLeftRadius:v,width:v,maxWidth:v,height:v,maxHeight:v,top:v,right:v,bottom:v,left:v,inset:v,insetBlock:v,insetBlockStart:v,insetBlockEnd:v,insetInline:v,insetInlineStart:v,insetInlineEnd:v,padding:v,paddingTop:v,paddingRight:v,paddingBottom:v,paddingLeft:v,paddingBlock:v,paddingBlockStart:v,paddingBlockEnd:v,paddingInline:v,paddingInlineStart:v,paddingInlineEnd:v,margin:v,marginTop:v,marginRight:v,marginBottom:v,marginLeft:v,marginBlock:v,marginBlockStart:v,marginBlockEnd:v,marginInline:v,marginInlineStart:v,marginInlineEnd:v,fontSize:v,backgroundPositionX:v,backgroundPositionY:v,...Xn,zIndex:ni,fillOpacity:vt,strokeOpacity:vt,numOctaves:ni};var gc={...zt,color:k,backgroundColor:k,outlineColor:k,fill:k,stroke:k,borderColor:k,borderTopColor:k,borderRightColor:k,borderBottomColor:k,borderLeftColor:k,filter:Je,WebkitFilter:Je,mask:Qe,WebkitMask:Qe},Go=r(t=>gc[t],"getDefaultValueType");var yc=new Set([Je,Qe]);function Se(t,e){let o=Go(t);return yc.has(o)||(o=j),o.getAnimatableNone?o.getAnimatableNone(e):void 0}r(Se,"getAnimatableNone");function qn(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}r(qn,"fillWildcards");var Kt=r(t=>t*180/Math.PI,"radToDeg"),si=r(t=>{let e=Kt(Math.atan2(t[1],t[0]));return ai(e)},"rotate"),xc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:r(t=>(Math.abs(t[0])+Math.abs(t[3]))/2,"scale"),rotate:si,rotateZ:si,skewX:r(t=>Kt(Math.atan(t[1])),"skewX"),skewY:r(t=>Kt(Math.atan(t[2])),"skewY"),skew:r(t=>(Math.abs(t[1])+Math.abs(t[2]))/2,"skew")},ai=r(t=>(t=t%360,t<0&&(t+=360),t),"rebaseAngle"),Zn=si,Jn=r(t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),"scaleX"),Qn=r(t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),"scaleY"),vc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Jn,scaleY:Qn,scale:r(t=>(Jn(t)+Qn(t))/2,"scale"),rotateX:r(t=>ai(Kt(Math.atan2(t[6],t[5]))),"rotateX"),rotateY:r(t=>ai(Kt(Math.atan2(-t[2],t[0]))),"rotateY"),rotateZ:Zn,rotate:Zn,skewX:r(t=>Kt(Math.atan(t[4])),"skewX"),skewY:r(t=>Kt(Math.atan(t[1])),"skewY"),skew:r(t=>(Math.abs(t[1])+Math.abs(t[4]))/2,"skew")};function Ht(t){return t.includes("scale")?1:0}r(Ht,"defaultTransformValue");function Uo(t,e){if(!t||t==="none")return Ht(e);let o=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),i,n;if(o)i=vc,n=o;else{let l=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=xc,n=l}if(!n)return Ht(e);let a=i[e],s=n[1].split(",").map(Tc);return typeof a=="function"?a(s):s[a]}r(Uo,"parseValueFromTransform");var ts=r((t,e)=>{let{transform:o="none"}=getComputedStyle(t);return Uo(o,e)},"readTransformValue");function Tc(t){return parseFloat(t.trim())}r(Tc,"convertTransformToNumber");var ht=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Q=new Set([...ht,"pathRotation"]);var li=r(t=>t===ft||t===v,"isNumOrPxType"),Sc=new Set(["x","y","z"]),Vc=ht.filter(t=>!Sc.has(t));function os(t){let e=[];return Vc.forEach(o=>{let i=t.getValue(o);if(i!==void 0){let n=i.get(),a=o.startsWith("scale")?1:0;if(n===a)return;e.push([o,n]),i.set(a)}}),e}r(os,"removeNonTranslationalTransform");var rs=new Set(["bottom","right"]);function es(t,e,o,i,n,a){let s=parseFloat(t);if(!isNaN(s))return s;let{min:l,max:u}=e()[o],c=u-l;return a==="border-box"?c:c-parseFloat(i)-parseFloat(n)}r(es,"measureDimension");var Dt={width:r(({width:t,paddingLeft:e="0",paddingRight:o="0",boxSizing:i},n)=>es(t,n,"x",e,o,i),"width"),height:r(({height:t,paddingTop:e="0",paddingBottom:o="0",boxSizing:i},n)=>es(t,n,"y",e,o,i),"height"),top:r(({top:t})=>parseFloat(t),"top"),left:r(({left:t})=>parseFloat(t),"left"),bottom:r(({top:t},e)=>{let{y:o}=e();return parseFloat(t)+(o.max-o.min)},"bottom"),right:r(({left:t},e)=>{let{x:o}=e();return parseFloat(t)+(o.max-o.min)},"right"),x:r(({transform:t})=>Uo(t,"x"),"x"),y:r(({transform:t})=>Uo(t,"y"),"y")};Dt.translateX=Dt.x;Dt.translateY=Dt.y;var $t=new Set,ci=!1,ui=!1,mi=!1;function is(){if(ui){let t=[],e=new Set,o=new Set;$t.forEach(n=>{n.needsMeasurement&&(t.push(n),e.add(n.element),rs.has(n.name)&&o.add(n.element))});let i=new Map;o.forEach(n=>{let a=os(n);a.length&&(i.set(n,a),n.render())}),t.forEach(n=>n.measureInitialState()),e.forEach(n=>{n.render();let a=i.get(n);a&&a.forEach(([s,l])=>{n.getValue(s)?.set(l)})}),t.forEach(n=>n.measureEndState()),t.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}ui=!1,ci=!1,$t.forEach(t=>t.complete(mi)),$t.clear()}r(is,"measureAllKeyframes");function ns(){$t.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ui=!0)})}r(ns,"readAllKeyframes");function ss(){mi=!0,ns(),is(),mi=!1}r(ss,"flushKeyframeResolvers");function Pc(t,e,o){if(typeof t=="string"){if(Gt(t)||Ut(t))return parseFloat(t);if(!j.test(t)&&j.test(o))return Se(e,o)}return t??void 0}r(Pc,"readOrigin");var Et=class{static{r(this,"KeyframeResolver")}constructor(e,o,i,n,a,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=o,this.name=i,this.motionValue=n,this.element=a,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?($t.add(this),ci||(ci=!0,w.read(ns),w.resolveKeyframes(is))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:o,element:i,motionValue:n}=this;if(e[0]===null){let a=n?.get(),s=e[e.length-1];if(a!==void 0)e[0]=a;else if(i&&o){let l=Pc(i.readValue(o,s),o,s);l!==void 0&&(e[0]=l)}e[0]===void 0&&(e[0]=s),n&&a===void 0&&n.set(e[0])}qn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),$t.delete(this)}cancel(){this.state==="scheduled"&&($t.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var as=r(t=>t.startsWith("--"),"isCSSVar");function Wo(t,e,o){as(e)?t.style.setProperty(e,o):t.style[e]=o}r(Wo,"setStyle");var ls={};function zo(t,e){let o=je(t);return()=>ls[e]??o()}r(zo,"memoSupports");var cs=zo(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var Ko=zo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var _t=r(([t,e,o,i])=>`cubic-bezier(${t}, ${e}, ${o}, ${i})`,"cubicBezierAsString");var fi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:_t([0,.65,.55,1]),circOut:_t([.55,0,1,.45]),backIn:_t([.31,.01,.66,-.59]),backOut:_t([.33,1.53,.69,.99])};function pi(t,e){if(t)return typeof t=="function"?Ko()?Oo(t,e):"ease-out":He(t)?_t(t):Array.isArray(t)?t.map(o=>pi(o,e)||fi.easeOut):fi[t]}r(pi,"mapEasingToNativeEasing");function us(t,e,o,{delay:i=0,duration:n=300,repeat:a=0,repeatType:s="loop",ease:l="easeOut",times:u}={},c=void 0){let m={[e]:o};u&&(m.offset=u);let f=pi(l,n);Array.isArray(f)&&(m.easing=f);let p={delay:i,duration:n,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:a+1,direction:s==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),t.animate(m,p)}r(us,"startWaapiAnimation");function Ho(t){return typeof t=="function"&&"applyToOptions"in t}r(Ho,"isGenerator");function ms({type:t,...e}){return Ho(t)&&Ko()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}r(ms,"applyGeneratorOptions");var Ve=class extends Mt{static{r(this,"NativeAnimation")}constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:o,name:i,keyframes:n,pseudoElement:a,allowFlatten:s=!1,finalKeyframe:l,onComplete:u}=e;this.isPseudoElement=!!a,this.allowFlatten=s,this.options=e,Z(typeof e.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=ms(e);this.animation=us(o,i,n,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let m=Ct(n,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(m),Wo(o,i,m),this.animation.cancel()}u?.(),this.notifyFinished()},No(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return K(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+K(e)}get time(){return K(Number(this.animation.currentTime)||0)}set time(e){let o=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=G(e),o&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:o,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&cs()?(this.animation.timeline=e,o?.(this.animation),O):i(this)}};var fs={anticipate:Ue,backInOut:Ge,circInOut:Ke};function bc(t){return t in fs}r(bc,"isUnsupportedEase");function ps(t){typeof t.ease=="string"&&bc(t.ease)&&(t.ease=fs[t.ease])}r(ps,"replaceStringEasing");var hi=10,$o=class extends Ve{static{r(this,"NativeAnimationExtended")}constructor(e){ps(e),jo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:o,onUpdate:i,onComplete:n,element:a,...s}=this.options;if(!o)return;if(e!==void 0){o.set(e);return}let l=new Tt({...s,autoplay:!1}),u=Math.max(hi,D.now()-this.startTime),c=W(0,hi,u-hi),m=l.sample(u).value,{name:f}=this.options;a&&f&&Wo(a,f,m),o.setWithVelocity(l.sample(Math.max(0,u-c)).value,m,c),l.stop()}};var di=r((t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(j.test(t)||t==="0")&&!t.startsWith("url(")),"isAnimatable");function wc(t){let e=t[0];if(t.length===1)return!0;for(let o=0;o<t.length;o++)if(t[o]!==e)return!0}r(wc,"hasKeyframesChanged");function hs(t,e,o,i){let n=t[0];if(n===null)return!1;if(e==="display"||e==="visibility")return!0;let a=t[t.length-1],s=di(n,e),l=di(a,e);return!s||!l?(s!==l&&xt(!1,`You are trying to animate ${e} from "${n}" to "${a}". "${s?a:n}" is not an animatable value.`,"value-not-animatable"),!1):wc(t)||(o==="spring"||Ho(o))&&i}r(hs,"canAnimate");function to(t){t.duration=0,t.type="keyframes"}r(to,"makeAnimationInstant");var eo=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);var Ac=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ds(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Ac.test(t[e]))return!0;return!1}r(ds,"hasBrowserOnlyColors");var gs=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Cc=je(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ys(t){let{motionValue:e,name:o,repeatDelay:i,repeatType:n,damping:a,type:s,keyframes:l}=t;if(!o||!(eo.has(o)||gs.has(o)))return!1;let u=e?.owner?.current;if(!(u instanceof HTMLElement)&&!(u instanceof SVGElement))return!1;let{onUpdate:c,transformTemplate:m}=e.owner.getProps();return Cc()&&(eo.has(o)||gs.has(o)&&ds(l))&&(o!=="transform"||!m)&&!c&&!i&&n!=="mirror"&&a!==0&&s!=="inertia"}r(ys,"supportsBrowserAnimation");var Mc=40,_o=class extends Mt{static{r(this,"AsyncMotionValueAnimation")}constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=D.now();let{keyframes:o,name:i,motionValue:n,element:a}=e,s=e;s.autoplay??(s.autoplay=!0),s.delay??(s.delay=0),s.type??(s.type="keyframes"),s.repeat??(s.repeat=0),s.repeatDelay??(s.repeatDelay=0),s.repeatType??(s.repeatType="loop");let l=a?.KeyframeResolver||Et;this.keyframeResolver=new l(o,(u,c,m)=>this.onKeyframesResolved(u,c,s,!m),i,n,a),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,o,i,n){this.keyframeResolver=void 0;let{name:a,type:s,velocity:l,delay:u,isHandoff:c,onUpdate:m}=i;this.resolvedAt=D.now();let f=!0;hs(e,a,s,l)||(f=!1,($.instantAnimations||!u)&&m?.(Ct(e,i,o)),e[0]=e[e.length-1],to(i),i.repeat=0);let p=n?this.resolvedAt?this.resolvedAt-this.createdAt>Mc?this.resolvedAt:this.createdAt:this.createdAt:void 0,{onComplete:d}=i;i.startTime??(i.startTime=p),i.finalKeyframe=o,i.keyframes=e,i.onComplete=()=>{d?.(),this.notifyFinished()};let h=f&&!c&&ys(i),x;if(h){i.element=i.motionValue?.owner?.current;try{x=new $o(i)}catch{x=new Tt(i)}}else x=new Tt(i);this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this._animation.finished:super.finished}then(e,o){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ss()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Yo(t,e,o,i=0,n=1){let a=Array.from(t).sort((c,m)=>c.sortNodePosition(m)).indexOf(e),s=t.size,l=(s-1)*i;return typeof o=="function"?o(a,s):n===1?a*i:l-a*i}r(Yo,"calcChildStagger");var xs=30,Dc=r(t=>!isNaN(parseFloat(t)),"isFloat"),vs={current:void 0},gi=class{static{r(this,"MotionValue")}constructor(e,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{let n=D.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=o.owner}setCurrent(e){this.current=e,this.updatedAt=D.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Dc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,o){var i;return e==="change"?this.onChangeSubscribe(o):((i=this.events)[e]||(i[e]=new ut)).add(o)}onChangeSubscribe(e){let{events:o}=this;return!o.change&&!this.changeSubscriber?this.changeSubscriber=e:(o.change||(o.change=new ut,o.change.add(this.changeSubscriber),this.changeSubscriber=void 0),o.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:o.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){w.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,o){this.passiveEffect=e,this.stopPassiveEffect=o}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,o,i){this.set(o),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,o=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:o}=this;o?o(e):this.events.change?.notify(e)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return vs.current&&vs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=D.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>xs)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,xs);return Ne(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(e){return this.stop(),new Promise(o=>{this.hasAnimated=!0;let i=!1,n;n=e(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===n&&this.clearAnimation(),o()}),i||(this.animation=n),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function at(t,e){return new gi(t,e)}r(at,"motionValue");function Xo(t,e){if(t?.inherit&&e){let{inherit:o,...i}=t;return{...e,...i}}return t}r(Xo,"resolveTransition");function Pe(t,e){let o=t?.[e]??t?.default??t;return o!==t?Xo(o,t):o}r(Pe,"getValueTransition");var Ec={type:"spring",stiffness:500,damping:25,restSpeed:10},Rc=r(t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),"criticallyDampedSpring"),Lc={type:"keyframes",duration:.8},Ic={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ts=r((t,{keyframes:e})=>e.length>2?Lc:Q.has(t)?t.startsWith("scale")?Rc(e[1]):Ec:Ic,"getDefaultTransition");var Bc=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function Ss(t){for(let e in t)if(!Bc.has(e))return!0;return!1}r(Ss,"isTransitionDefined");var Yt=r((t,e,o,i={},n,a)=>s=>{let l=Pe(i,t)||{},u=l.delay||i.delay||0,{elapsed:c=0}=i;c=c-G(u);let m={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:e.getVelocity(),...l,delay:-c,onUpdate:r(p=>{e.set(p),l.onUpdate&&l.onUpdate(p)},"onUpdate"),onComplete:r(()=>{s(),l.onComplete&&l.onComplete()},"onComplete"),name:t,motionValue:e,element:a?void 0:n};Ss(l)||Object.assign(m,Ts(t,m)),m.duration&&(m.duration=G(m.duration)),m.repeatDelay&&(m.repeatDelay=G(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let f=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(to(m),m.delay===0&&(f=!0)),($.instantAnimations||$.skipAnimations||n?.shouldSkipAnimations||l.skipAnimations)&&(f=!0,to(m),m.delay=0),m.allowFlatten=!l.type&&!l.ease,f&&!a&&e.get()!==void 0){let p=Ct(m.keyframes,l);if(p!==void 0){w.update(()=>{m.onUpdate(p),m.onComplete()});return}}return l.isSync?new Tt(m):new _o(m)},"animateMotionValue");var kc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fc(t){let e=kc.exec(t);if(!e)return[,];let[,o,i,n]=e;return[`--${o??i}`,n]}r(Fc,"parseCSSVariable");var Oc=4;function yi(t,e,o=1){Z(o<=Oc,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[i,n]=Fc(t);if(!i)return;let a=window.getComputedStyle(e).getPropertyValue(i);if(a){let s=a.trim();return Gt(s)?parseFloat(s):s}return pe(n)?yi(n,e,o+1):n}r(yi,"getVariableValue");function jc(t){let e=[{},{}];return t?.values.forEach((o,i)=>{e[0][i]=o.get(),e[1][i]=o.getVelocity()}),e}r(jc,"getValueState");function oo(t,e,o,i){let n=r(a=>typeof a=="function"?a(o!==void 0?o:t.custom,...jc(i)):a,"resolveFunction");return e=n(e),typeof e=="string"&&(e=t.variants&&t.variants[e]),n(e)}r(oo,"resolveVariantFromProps");function tt(t,e,o){return oo(t.getProps(),e,o,t)}r(tt,"resolveVariant");var qo=r((t,e)=>e==="exit"?t.presenceContext?.custom:void 0,"getTypeCustom");var Zo=new Set(["width","height","top","left","right","bottom",...ht]);var Vs=r(t=>Array.isArray(t),"isKeyframesTarget");function Nc(t,e,o){t.hasValue(e)?t.getValue(e).set(o):t.addValue(e,at(o))}r(Nc,"setMotionValue");function Gc(t){return Vs(t)?t[t.length-1]||0:t}r(Gc,"resolveFinalValueInKeyframes");function Ps(t,e){let o=tt(t,e),{transitionEnd:i={},transition:n={},...a}=o||{};a={...a,...i};for(let s in a){let l=Gc(a[s]);Nc(t,s,l)}}r(Ps,"setTarget");var M=r(t=>!!(t&&t.getVelocity),"isMotionValue");function bs(t){return!!(M(t)&&t.add)}r(bs,"isWillChangeMotionValue");function be(t,e){let o=t.getValue("willChange");if(bs(o))return o.add(e);if(!o&&$.WillChange){let i=new $.WillChange("auto");t.addValue("willChange",i),i.add(e)}}r(be,"addValueToWillChange");function we(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}r(we,"camelToDash");var ws="framerAppearId",ro="data-"+we(ws);function Jo(t){return t.props[ro]}r(Jo,"getOptimisedAppearId");var Uc=typeof window<"u";function Wc({protectedKeys:t,needsAnimating:e},o){let i=o in t&&!e[o];return e[o]=!1,i}r(Wc,"shouldBlockAnimation");function Qo(t,e,{delay:o=0,transitionOverride:i,type:n}={}){let{transition:a,transitionEnd:s,...l}=e,u=t.getDefaultTransition();a=a?Xo(a,u):u;let c=a?.reduceMotion,m=a?.skipAnimations;i&&(a=i);let f=[],p=n&&t.animationState?.getState()[n],d=a?.path;d&&d.animateVisualElement(t,l,a,o,f);for(let h in l){let x=t.getValue(h,t.latestValues[h]??null),g=l[h];if(g===void 0||p&&Wc(p,h))continue;let b={delay:o,...Pe(a||{},h)};m&&(b.skipAnimations=!0);let V=x.get();if(V!==void 0&&!x.isAnimating()&&!Array.isArray(g)&&g===V&&!b.velocity){w.update(()=>x.set(g));continue}let P=!1;if(Uc&&window.MotionHandoffAnimation){let R=Jo(t);if(R){let y=window.MotionHandoffAnimation(R,h,w);y!==null&&(b.startTime=y,P=!0)}}be(t,h);let T=c??t.shouldReduceMotion;x.start(Yt(h,x,g,T&&Zo.has(h)?{type:!1}:b,t,P));let C=x.animation;C&&f.push(C)}if(s){let h=r(()=>w.update(()=>{s&&Ps(t,s)}),"applyTransitionEnd");f.length?Promise.all(f).then(h):h()}return f}r(Qo,"animateTarget");function tr(t,e,o={}){let i=tt(t,e,qo(t,o.type)),n=o.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),a=r(()=>Promise.all(i?Qo(t,i,o):[]),"getAnimation"),s=r((u=0)=>{let{variantChildren:c}=t,{delayChildren:m=0,staggerChildren:f,staggerDirection:p}=n,d=[];return c?.forEach(h=>{h.notify("AnimationStart",e),d.push(tr(h,e,{...o,delay:u+(typeof m=="function"?0:m)+Yo(c,h,m,f,p)}).then(()=>h.notify("AnimationComplete",e)))}),Promise.all(d)},"getChildAnimations"),{when:l}=n;return l?l==="beforeChildren"?a().then(()=>s()):s().then(a):Promise.all([a(),s(o.delay)])}r(tr,"animateVariant");function As(t,e,o={}){return t.notify("AnimationStart",e),(Array.isArray(e)?Promise.all(e.map(n=>tr(t,n,o))):typeof e=="string"?tr(t,e,o):Promise.all(Qo(t,tt(t,e,o.custom),o))).then(()=>{t.notify("AnimationComplete",e)})}r(As,"animateVisualElement");var Cs={test:r(t=>t==="auto","test"),parse:r(t=>t,"parse")};var Ms=r(t=>e=>e.test(t),"testValueType");var zc=[ft,v,_,ot,qr,Xr,Cs],xi=r(t=>zc.find(Ms(t)),"findDimensionValueType");function Ds(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ut(t):!0}r(Ds,"isNone");var Kc=new Set(["auto","none","0"]);function Es(t,e,o){let i=0,n;for(;i<t.length&&!n;){let a=t[i];typeof a=="string"&&!Kc.has(a)&&Dn(a)&&(n=t[i]),i++}if(n&&o)for(let a of e)t[a]!==n&&(t[a]=Se(o,n))}r(Es,"makeNoneKeyframesAnimatable");var er=class extends Et{static{r(this,"DOMKeyframesResolver")}constructor(e,o,i,n,a){super(e,o,i,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:o,name:i}=this;if(!o||!o.current)return;super.readKeyframes();for(let m=0;m<e.length;m++){let f=e[m];if(typeof f=="string"&&(f=f.trim(),pe(f))){let p=yi(f,o.current);p!==void 0&&(e[m]=p),m===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Zo.has(i)||e.length!==2)return;let[n,a]=e;if(typeof n=="number"&&typeof a=="number")return;let s=xi(n),l=xi(a),u=_r(n),c=_r(a);if(u!==c&&Dt[i]){this.needsMeasurement=!0;return}if(s!==l)if(li(s)&&li(l))for(let m=0;m<e.length;m++){let f=e[m];typeof f=="string"&&(e[m]=parseFloat(f))}else Dt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:o}=this,i=[];for(let n=0;n<e.length;n++)(e[n]===null||Ds(e[n]))&&i.push(n);i.length&&Es(e,i,o)}measure(){let{element:e,name:o}=this;return Dt[o](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:o,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),o[0]=this.measuredOrigin;let n=o[o.length-1];n!==void 0&&this.motionValue?.jump(n,!1)}measureEndState(){let{element:e,unresolvedKeyframes:o}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let i=o.length-1,n=o[i];o[i]=this.measure(),n!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=n),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,s])=>{e.getValue(a).set(s)}),this.resolveNoneKeyframes()}};var io=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Rs(t){return Oe(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}r(Rs,"isHTMLElement");function Ae(t){return Oe(t)&&"ownerSVGElement"in t}r(Ae,"isSVGElement");var no=r((t,e)=>e&&typeof t=="number"?e.transform(t):t,"getValueAsType");function or(t,e,o){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);let n=o?.[t]??i.querySelectorAll(t);return n?Array.from(n):[]}return Array.from(t).filter(i=>i!=null)}r(or,"resolveElements");var Hc={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$c=ht.length;function Ls(t,e,o){let i="",n=!0;for(let s=0;s<$c;s++){let l=ht[s],u=t[l];if(u===void 0)continue;let c=!0;if(typeof u=="number")c=u===(l.startsWith("scale")?1:0);else{let m=parseFloat(u);c=l.startsWith("scale")?m===1:m===0}if(!c||o){let m=no(u,zt[l]);if(!c){n=!1;let f=Hc[l]||l;i+=`${f}(${m}) `}o&&(e[l]=m)}}let a=t.pathRotation;return a&&(n=!1,i+=`rotate(${no(a,zt.pathRotation)}) `),i=i.trim(),o?i=o(e,n?"":i):n&&(i="none"),i}r(Ls,"buildTransform");function Xt(t,e,o){let{style:i,vars:n,transformOrigin:a}=t,s=!1,l=!1;for(let u in e){let c=e[u];if(Q.has(u)){s=!0;continue}else if(Ro(u)){n[u]=c;continue}else{let m=no(c,zt[u]);u.startsWith("origin")?(l=!0,a[u]=m):i[u]=m}}if(e.transform||(s||o?i.transform=Ls(e,t.transform,o):i.transform&&(i.transform="none")),l){let{originX:u="50%",originY:c="50%",originZ:m=0}=a;i.transformOrigin=`${u} ${c} ${m}`}}r(Xt,"buildHTMLStyles");var _c={offset:"stroke-dashoffset",array:"stroke-dasharray"},Yc={offset:"strokeDashoffset",array:"strokeDasharray"};function Is(t,e,o=1,i=0,n=!0){t.pathLength=1;let a=n?_c:Yc;t[a.offset]=`${-i}`,t[a.array]=`${e} ${o}`}r(Is,"buildSVGPath");var vi=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function so(t,{attrX:e,attrY:o,attrScale:i,pathLength:n,pathSpacing:a=1,pathOffset:s=0,...l},u,c,m){if(Xt(t,l,c),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};let{attrs:f,style:p}=t;for(let d of vi)f[d]!==void 0&&(p[d]=f[d],delete f[d]);(p.transform||f.transformOrigin)&&(p.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),p.transform&&(p.transformBox=m?.transformBox??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),o!==void 0&&(f.y=o),i!==void 0&&(f.scale=i),n!==void 0&&Is(f,n,a,s,!1)}r(so,"buildSVGAttrs");function ao({top:t,left:e,right:o,bottom:i}){return{x:{min:e,max:o},y:{min:t,max:i}}}r(ao,"convertBoundingBoxToBox");function Ti({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}r(Ti,"convertBoxToBoundingBox");function Si(t,e){if(!e)return t;let o=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:o.y,left:o.x,bottom:i.y,right:i.x}}r(Si,"transformBoxPoints");function Vi(t){return t===void 0||t===1}r(Vi,"isIdentityScale");function rr({scale:t,scaleX:e,scaleY:o}){return!Vi(t)||!Vi(e)||!Vi(o)}r(rr,"hasScale");function St(t){return rr(t)||Pi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}r(St,"hasTransform");function Pi(t){return Bs(t.x)||Bs(t.y)}r(Pi,"has2DTranslate");function Bs(t){return t&&t!=="0%"}r(Bs,"is2DTranslate");function lo(t,e,o){let i=t-o,n=e*i;return o+n}r(lo,"scalePoint");function ks(t,e,o,i,n){return n!==void 0&&(t=lo(t,n,i)),lo(t,o,i)+e}r(ks,"applyPointDelta");function bi(t,e=0,o=1,i,n){t.min=ks(t.min,e,o,i,n),t.max=ks(t.max,e,o,i,n)}r(bi,"applyAxisDelta");function wi(t,{x:e,y:o}){bi(t.x,e.translate,e.scale,e.originPoint),bi(t.y,o.translate,o.scale,o.originPoint)}r(wi,"applyBoxDelta");var Fs=.999999999999,Os=1.0000000000001;function Gs(t,e,o,i=!1){let n=o.length;if(!n)return;e.x=e.y=1;let a,s;for(let l=0;l<n;l++){a=o[l],s=a.projectionDelta;let{visualElement:u}=a.options;u&&u.props.style&&u.props.style.display==="contents"||(i&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(rt(t.x,-a.scroll.offset.x),rt(t.y,-a.scroll.offset.y)),s&&(e.x*=s.x.scale,e.y*=s.y.scale,wi(t,s)),i&&St(a.latestValues)&&co(t,a.latestValues,a.layout?.layoutBox))}e.x<Os&&e.x>Fs&&(e.x=1),e.y<Os&&e.y>Fs&&(e.y=1)}r(Gs,"applyTreeDeltas");function rt(t,e){t.min+=e,t.max+=e}r(rt,"translateAxis");function js(t,e,o,i,n=.5){let a=A(t.min,t.max,n);bi(t,e,o,a,i)}r(js,"transformAxis");function Ns(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}r(Ns,"resolveAxisTranslate");function co(t,e,o){let i=o??t;js(t.x,Ns(e.x,i.x),e.scaleX,e.scale,e.originX),js(t.y,Ns(e.y,i.y),e.scaleY,e.scale,e.originY)}r(co,"transformBox");function ir(t,e){return ao(Si(t.getBoundingClientRect(),e))}r(ir,"measureViewportBox");function Ai(t,e,o){let i=ir(t,o),{scroll:n}=e;return n&&(rt(i.x,n.offset.x),rt(i.y,n.offset.y)),i}r(Ai,"measurePageBox");var{schedule:qt,cancel:Xc}=Fo(queueMicrotask,!1);var it={x:!1,y:!1};function nr(){return it.x||it.y}r(nr,"isDragActive");function Ci(t){return t==="x"||t==="y"?it[t]?null:(it[t]=!0,()=>{it[t]=!1}):it.x||it.y?null:(it.x=it.y=!0,()=>{it.x=it.y=!1})}r(Ci,"setDragLock");function sr(t,e){let o=or(t),i=new AbortController,n={passive:!0,...e,signal:i.signal};return[o,n,r(()=>i.abort(),"cancel")]}r(sr,"setupGesture");function qc(t){return!(t.pointerType==="touch"||nr())}r(qc,"isValidHover");function Mi(t,e,o={}){let[i,n,a]=sr(t,o);return i.forEach(s=>{let l=!1,u=!1,c,m=r(()=>{s.removeEventListener("pointerleave",h)},"removePointerLeave"),f=r(g=>{c&&(c(g),c=void 0),m()},"endHover"),p=r(g=>{l=!1,window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),u&&(u=!1,f(g))},"onPointerUp"),d=r(()=>{l=!0,window.addEventListener("pointerup",p,n),window.addEventListener("pointercancel",p,n)},"onPointerDown"),h=r(g=>{if(g.pointerType!=="touch"){if(l){u=!0;return}f(g)}},"onPointerLeave"),x=r(g=>{if(!qc(g))return;u=!1;let b=e(s,g);typeof b=="function"&&(c=b,s.addEventListener("pointerleave",h,n))},"onPointerEnter");s.addEventListener("pointerenter",x,n),s.addEventListener("pointerdown",d,n)}),a}r(Mi,"hover");var Di=r((t,e)=>e?t===e?!0:Di(t,e.parentElement):!1,"isNodeOrChild");var Zt=r(t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,"isPrimaryPointer");var Zc=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ei(t){return Zc.has(t.tagName)||t.isContentEditable===!0}r(Ei,"isElementKeyboardAccessible");var Jc=new Set(["INPUT","SELECT","TEXTAREA"]);function Ri(t){return Jc.has(t.tagName)||t.isContentEditable===!0}r(Ri,"isElementTextInput");var Ce=new WeakSet;function Us(t){return e=>{e.key==="Enter"&&t(e)}}r(Us,"filterEvents");function Li(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}r(Li,"firePointerEvent");var Ws=r((t,e)=>{let o=t.currentTarget;if(!o)return;let i=Us(()=>{if(Ce.has(o))return;Li(o,"down");let n=Us(()=>{Li(o,"up")}),a=r(()=>Li(o,"cancel"),"handleBlur");o.addEventListener("keyup",n,e),o.addEventListener("blur",a,e)});o.addEventListener("keydown",i,e),o.addEventListener("blur",()=>o.removeEventListener("keydown",i),e)},"enableKeyboardPress");function zs(t){return Zt(t)&&!nr()}r(zs,"isValidPressEvent");var Ks=new WeakSet;function Ii(t,e,o={}){let[i,n,a]=sr(t,o),s=r(l=>{let u=l.currentTarget;if(!zs(l)||Ks.has(l))return;Ce.add(u),o.stopPropagation&&Ks.add(l);let c=e(u,l),m={...n,capture:!0},f=r((h,x)=>{window.removeEventListener("pointerup",p,m),window.removeEventListener("pointercancel",d,m),Ce.has(u)&&Ce.delete(u),zs(h)&&typeof c=="function"&&c(h,{success:x})},"onPointerEnd"),p=r(h=>{f(h,u===window||u===document||o.useGlobalTarget||Di(u,h.target))},"onPointerUp"),d=r(h=>{f(h,!1)},"onPointerCancel");window.addEventListener("pointerup",p,m),window.addEventListener("pointercancel",d,m)},"startPress");return i.forEach(l=>{(o.useGlobalTarget?window:l).addEventListener("pointerdown",s,n),Rs(l)&&(l.addEventListener("focus",c=>Ws(c,n)),!Ei(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}r(Ii,"press");var ar=new WeakMap,lr,Hs=r((t,e,o)=>(i,n)=>n&&n[0]?n[0][t+"Size"]:Ae(i)&&"getBBox"in i?i.getBBox()[e]:i[o],"getSize"),Qc=Hs("inline","width","offsetWidth"),tu=Hs("block","height","offsetHeight");function eu({target:t,borderBoxSize:e}){ar.get(t)?.forEach(o=>{o(t,{get width(){return Qc(t,e)},get height(){return tu(t,e)}})})}r(eu,"notifyTarget");function ou(t){t.forEach(eu)}r(ou,"notifyAll");function ru(){typeof ResizeObserver>"u"||(lr=new ResizeObserver(ou))}r(ru,"createResizeObserver");function $s(t,e){lr||ru();let o=or(t);return o.forEach(i=>{let n=ar.get(i);n||(n=new Set,ar.set(i,n)),n.add(e),lr?.observe(i)}),()=>{o.forEach(i=>{let n=ar.get(i);n?.delete(e),n?.size||lr?.unobserve(i)})}}r($s,"resizeElement");var cr=new Set,Me;function iu(){Me=r(()=>{let t={get width(){return window.innerWidth},get height(){return window.innerHeight}};cr.forEach(e=>e(t))},"windowResizeHandler"),window.addEventListener("resize",Me)}r(iu,"createWindowResizeHandler");function _s(t){return cr.add(t),Me||iu(),()=>{cr.delete(t),!cr.size&&typeof Me=="function"&&(window.removeEventListener("resize",Me),Me=void 0)}}r(_s,"resizeWindow");function ur(t,e){return typeof t=="function"?_s(t):$s(t,e)}r(ur,"resize");var Jt={value:null,addProjectionMetrics:null};function Ys(t){return Ae(t)&&t.tagName==="svg"}r(Ys,"isSVGSVGElement");var Bi=r(t=>typeof t=="number"?t:parseFloat(t),"asNumber");var ki=r(()=>({translate:0,scale:1,origin:0,originPoint:0}),"createAxisDelta"),Rt=r(()=>({x:ki(),y:ki()}),"createDelta"),Fi=r(()=>({min:0,max:0}),"createAxis"),I=r(()=>({x:Fi(),y:Fi()}),"createBox");var Xs=new WeakMap;function Vt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}r(Vt,"isAnimationControls");function Pt(t){return typeof t=="string"||Array.isArray(t)}r(Pt,"isVariantLabel");var mr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Oi=["initial",...mr];function Lt(t){if(Vt(t.animate))return!0;for(let e=0;e<Oi.length;e++)if(Pt(t[Oi[e]]))return!0;return!1}r(Lt,"isControllingVariants");function uo(t){return!!(Lt(t)||t.variants)}r(uo,"isVariantNode");function qs(t,e,o){for(let i in e){let n=e[i],a=o[i];if(M(n))t.addValue(i,n);else if(M(a))t.addValue(i,at(n,{owner:t}));else if(a!==n)if(t.hasValue(i)){let s=t.getValue(i);s.liveStyle===!0?s.jump(n):s.hasAnimated||s.set(n)}else{let s=t.getStaticValue(i);t.addValue(i,at(s!==void 0?s:n,{owner:t}))}}for(let i in o)e[i]===void 0&&t.removeValue(i);return e}r(qs,"updateMotionValuesFromProps");var It={current:null},Qt={current:!1};var nu=typeof window<"u";function mo(){if(Qt.current=!0,!!nu)if(window.matchMedia){let t=window.matchMedia("(prefers-reduced-motion)"),e=r(()=>It.current=t.matches,"setReducedMotionPreferences");t.addEventListener("change",e),e()}else It.current=!1}r(mo,"initPrefersReducedMotion");var Zs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fr={};function po(t){fr=t}r(po,"setFeatureDefinitions");function ji(){return fr}r(ji,"getFeatureDefinitions");var fo=class{static{r(this,"VisualElement")}scrapeMotionValuesFromProps(e,o,i){return{}}constructor({parent:e,props:o,presenceContext:i,reducedMotionConfig:n,skipAnimations:a,blockInitialAnimation:s,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Et,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let d=D.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,w.render(this.render,!1,!0))};let{latestValues:c,renderState:m}=l;this.latestValues=c,this.baseTarget={...c},this.initialValues=o.initial?{...c}:{},this.renderState=m,this.parent=e,this.props=o,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=a,this.options=u,this.blockInitialAnimation=!!s,this.isControllingVariants=Lt(o),this.isVariantNode=uo(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:f,...p}=this.scrapeMotionValuesFromProps(o,{},this);for(let d in p){let h=p[d];c[d]!==void 0&&M(h)&&h.set(c[d])}}mount(e){if(this.hasBeenMounted)for(let o in this.initialValues)this.values.get(o)?.jump(this.initialValues[o]),this.latestValues[o]=this.initialValues[o];if(this.current=e,Xs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let o=this;do o=o.props.inherit!==!1&&o.parent;while(o&&!o.isVariantNode);if(o){let{variantChildren:i}=o;i.add(this),this.removeFromVariantTree=()=>i.delete(this)}}this.values.forEach((o,i)=>this.bindToMotionValue(i,o)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Qt.current||mo(),this.shouldReduceMotion=It.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),J(this.notifyUpdate),J(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let o=this.features[e];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,o){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),o.accelerate&&eo.has(e)&&this.current instanceof HTMLElement){let{factory:s,keyframes:l,times:u,ease:c,duration:m}=o.accelerate,f=new Ve({element:this.current,name:e,keyframes:l,times:u,ease:c,duration:G(m)}),p=s(f);this.valueSubscriptions.set(e,()=>{p(),f.cancel()});return}let i=Q.has(e);i&&this.onBindTransform&&this.onBindTransform();let n=o.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&w.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,o)),this.valueSubscriptions.set(e,()=>{n(),a&&a()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in fr){let o=fr[e];if(!o)continue;let{isEnabled:i,Feature:n}=o;if(!this.features[e]&&n&&i(this.props)&&(this.features[e]=new n(this)),this.features[e]){let a=this.features[e];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):I()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,o){this.latestValues[e]=o}update(e,o){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let i=0;i<Zs.length;i++){let n=Zs[i];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let a="on"+n,s=e[a];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=qs(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,o){let i=this.values.get(e);if(o!==i){i&&this.removeValue(e),this.bindToMotionValue(e,o),this.values.set(e,o);let n=o.get();n!==void 0&&(this.latestValues[e]=n)}}removeValue(e){this.values.delete(e);let o=this.valueSubscriptions.get(e);o&&(o(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,o){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&o!==void 0&&(i=at(o??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,i)),i}readValue(e,o){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Gt(i)||Ut(i))?i=parseFloat(i):typeof i!="number"&&!j.test(i)&&j.test(o)&&(i=Se(e,o)),this.setBaseTarget(e,M(i)?i.get():i)),M(i)?i.get():i}setBaseTarget(e,o){this.baseTarget[e]=o}on(e,o){return this.events[e]||(this.events[e]=new ut),this.events[e].add(o)}notify(e,...o){this.events[e]&&this.events[e].notify(...o)}scheduleRenderMicrotask(){qt.render(this.render)}};var De=class extends fo{static{r(this,"DOMVisualElement")}constructor(){super(...arguments),this.KeyframeResolver=er}sortInstanceNodePosition(e,o){return e.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(e,o){let i=e.style;return i?i[o]:void 0}removeValueFromRenderState(e,{vars:o,style:i}){delete o[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;M(e)&&(this.childSubscription=e.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};var z=class{static{r(this,"Feature")}constructor(e){this.isMounted=!1,this.node=e}update(){}};function pr(t,{style:e,vars:o},i,n){let a=t.style,s;for(s in e)a[s]=e[s];n?.applyProjectionStyles(a,i);for(s in o)a.setProperty(s,o[s])}r(pr,"renderHTML");var te={};function ho(t,{layout:e,layoutId:o}){return Q.has(t)||t.startsWith("origin")||(e||o!==void 0)&&(!!te[t]||t==="opacity")}r(ho,"isForcedMotionValue");function ee(t,e,o){let i=t.style,n=e?.style,a={};if(!i)return a;for(let s in i)(M(i[s])||n&&M(n[s])||ho(s,t)||o?.getValue(s)?.liveStyle!==void 0)&&(a[s]=i[s]);return a}r(ee,"scrapeMotionValuesFromProps");function su(t){return window.getComputedStyle(t)}r(su,"getComputedStyle");var go=class extends De{static{r(this,"HTMLVisualElement")}constructor(){super(...arguments),this.type="html",this.renderInstance=pr}mount(e){Z(!!e.style,"motion.create() components must forward their ref to a HTML or SVG element","custom-component-ref"),super.mount(e)}readValueFromInstance(e,o){if(Q.has(o))return this.projection?.isProjecting?Ht(o):ts(e,o);{let i=su(e),n=(Ro(o)?i.getPropertyValue(o):i[o])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(e,{transformPagePoint:o}){return ir(e,o)}build(e,o,i){Xt(e,o,i.transformTemplate)}scrapeMotionValuesFromProps(e,o,i){return ee(e,o,i)}};var hr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var yo=r(t=>typeof t=="string"&&t.toLowerCase()==="svg","isSVGTag");function Js(t,e,o,i){pr(t,e,void 0,i);for(let n in e.attrs)t.setAttribute(hr.has(n)?n:we(n),e.attrs[n])}r(Js,"renderSVG");function xo(t,e,o){let i=ee(t,e,o);for(let n in t)if(M(t[n])||M(e[n])){let a=ht.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;i[a]=t[n]}return i}r(xo,"scrapeMotionValuesFromProps");var vo=class extends De{static{r(this,"SVGVisualElement")}constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=I}getBaseTargetFromProps(e,o){return Q.has(o)?super.getBaseTargetFromProps(e,o)??Ht(o):e[o]}getDefaultValue(e){return Q.has(e)?this.latestValues[e]??Ht(e):void 0}readValueFromInstance(e,o){if(Q.has(o)){let i=Go(o);return i&&i.default||0}if(vi.includes(o)){let n=getComputedStyle(e)[o];if(typeof n=="string"&&n)return n.trim()}return o=hr.has(o)?o:we(o),e.getAttribute(o)}scrapeMotionValuesFromProps(e,o,i){return xo(e,o,i)}build(e,o,i){so(e,o,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,o,i,n){Js(e,o,i,n)}mount(e){this.isSVGTag=yo(e.tagName),super.mount(e)}};function Ni(t,e){if(!Array.isArray(e))return!1;let o=e.length;if(o!==t.length)return!1;for(let i=0;i<o;i++)if(e[i]!==t[i])return!1;return!0}r(Ni,"shallowCompare");var au=[...mr].reverse();function Gi(t){let e=r(l=>Promise.all(l.map(({animation:u,options:c})=>As(t,u,c))),"animate"),o=Qs(),i=!0,n=!1;function a(l){let{props:u,parent:c,manuallyAnimateOnMount:m}=t,f=i||n,p=[],d=new Set,h={},x=1/0,g=t;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);if(au.forEach((V,P)=>{let T=o[V],C=u[V],R=g&&g.props[V],y=C!==void 0?C:Pt(R)||R===!1?R:void 0,S=Pt(y),F=V===l?T.isActive:null;F===!1&&(x=P);let L=S&&C===void 0&&!(f&&m);if(T.protectedKeys={...h},!T.isActive&&F===null||!y&&!T.prevProp||Vt(y)||typeof y=="boolean")return;if(V==="exit"&&T.isActive&&F!==!0){h={...h,...T.prevResolvedValues};return}let gt=ta(T.prevProp,y),yt=gt||S&&(F&&!L||P>x),q=!1,le=Array.isArray(y)?y:[y],ce={};if(F!==!1)for(let Y of le){let{transition:lt,transitionEnd:jt,...Po}=tt(t,Y,qo(t,V))||{};ce={...ce,...Po,...jt}}let{prevResolvedValues:un}=T;for(let Y in{...un,...ce}){if(Y in h)continue;let lt=ce[Y],jt=un[Y],Po=Array.isArray(lt)&&Array.isArray(jt)?!Ni(lt,jt)||gt:lt!==jt;if(Po&&lt==null)d.add(Y);else if(Po||lt!==void 0&&d.has(Y)){yt=!0,d.delete(Y)&&(q=!0),T.needsAnimating[Y]=!0;let mn=t.getValue(Y);mn&&(mn.liveStyle=!1)}else T.protectedKeys[Y]=!0}if(T.prevProp=y,T.prevResolvedValues=ce,T.isActive&&(h={...h,...ce}),yt&&(!(L&&gt)||q))for(let Y of le){let lt={type:V};if(typeof Y=="string"&&f&&m&&c?.enteringChildren){let jt=tt(c,Y)?.transition?.delayChildren;lt.delay=Yo(c.enteringChildren,t,jt)}p.push({animation:Y,options:lt})}}),d.size){let{initial:V}=u,P={},T=typeof V!="boolean"&&tt(t,Array.isArray(V)?V[0]:V,t.presenceContext?.custom);T&&T.transition&&(P.transition=T.transition),d.forEach(C=>{let R=t.getValue(C);R&&(R.liveStyle=!0);let y=T&&!Array.isArray(V)?T[C]:void 0,S=t.getBaseTargetFromProps(u,C);P[C]=(y!==void 0?y:S!==void 0&&!M(S)?S:t.initialValues[C]===void 0?t.baseTarget[C]:void 0)??null}),p.push({animation:P})}let b=f&&t.blockInitialAnimation||i&&!m&&(u.initial===!1||u.initial===u.animate);return i=n=!1,!b&&p.length?e(p):Promise.resolve()}r(a,"animateChanges");function s(l,u){if(o[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(m=>m.animationState?.setActive(l,u)),o[l].isActive=u;let c=a(l);for(let m in o)o[m].protectedKeys={};return c}return r(s,"setActive"),{animateChanges:a,setActive:s,setAnimateFunction:r(l=>{e=l(t)},"setAnimateFunction"),getState:r(()=>o,"getState"),reset:r(()=>{o=Qs(),n=!0},"reset")}}r(Gi,"createAnimationState");function ta(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ni(e,t):!1}r(ta,"checkVariantsDidChange");function Qs(){let t={};for(let e of mr)t[e]={isActive:e==="animate",protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return t}r(Qs,"createState");function dr(t,e){t.min=e.min,t.max=e.max}r(dr,"copyAxisInto");function nt(t,e){dr(t.x,e.x),dr(t.y,e.y)}r(nt,"copyBoxInto");function Ui(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}r(Ui,"copyAxisDeltaInto");var ea=1e-4,lu=1-ea,cu=1+ea,oa=.01,uu=0-oa,mu=0+oa;function U(t){return t.max-t.min}r(U,"calcLength");function Hi(t,e,o){return Math.abs(t-e)<=o}r(Hi,"isNear");function Wi(t,e,o,i=.5){t.origin=i,t.originPoint=A(e.min,e.max,t.origin),t.scale=U(o)/U(e),t.translate=A(o.min,o.max,t.origin)-t.originPoint,(t.scale>=lu&&t.scale<=cu||isNaN(t.scale))&&(t.scale=1),(t.translate>=uu&&t.translate<=mu||isNaN(t.translate))&&(t.translate=0)}r(Wi,"calcAxisDelta");function oe(t,e,o,i){Wi(t.x,e.x,o.x,i?i.originX:void 0),Wi(t.y,e.y,o.y,i?i.originY:void 0)}r(oe,"calcBoxDelta");function zi(t,e,o,i=0){let n=i?A(o.min,o.max,i):o.min;t.min=n+e.min,t.max=t.min+U(e)}r(zi,"calcRelativeAxis");function $i(t,e,o,i){zi(t.x,e.x,o.x,i?.x),zi(t.y,e.y,o.y,i?.y)}r($i,"calcRelativeBox");function Ki(t,e,o,i=0){let n=i?A(o.min,o.max,i):o.min;t.min=e.min-n,t.max=t.min+U(e)}r(Ki,"calcRelativeAxisPosition");function Ee(t,e,o,i){Ki(t.x,e.x,o.x,i?.x),Ki(t.y,e.y,o.y,i?.y)}r(Ee,"calcRelativePosition");function ra(t,e,o,i,n){return t-=e,t=lo(t,1/o,i),n!==void 0&&(t=lo(t,1/n,i)),t}r(ra,"removePointDelta");function fu(t,e=0,o=1,i=.5,n,a=t,s=t){if(_.test(e)&&(e=parseFloat(e),e=A(s.min,s.max,e/100)-s.min),typeof e!="number")return;let l=A(a.min,a.max,i);t===a&&(l-=e),t.min=ra(t.min,e,o,l,n),t.max=ra(t.max,e,o,l,n)}r(fu,"removeAxisDelta");function ia(t,e,[o,i,n],a,s){fu(t,e[o],e[i],e[n],e.scale,a,s)}r(ia,"removeAxisTransforms");var pu=["x","scaleX","originX"],hu=["y","scaleY","originY"];function _i(t,e,o,i){ia(t.x,e,pu,o?o.x:void 0,i?i.x:void 0),ia(t.y,e,hu,o?o.y:void 0,i?i.y:void 0)}r(_i,"removeBoxTransforms");function na(t){return t.translate===0&&t.scale===1}r(na,"isAxisDeltaZero");function Yi(t){return na(t.x)&&na(t.y)}r(Yi,"isDeltaZero");function sa(t,e){return t.min===e.min&&t.max===e.max}r(sa,"axisEquals");function la(t,e){return sa(t.x,e.x)&&sa(t.y,e.y)}r(la,"boxEquals");function aa(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}r(aa,"axisEqualsRounded");function Xi(t,e){return aa(t.x,e.x)&&aa(t.y,e.y)}r(Xi,"boxEqualsRounded");function qi(t){return U(t.x)/U(t.y)}r(qi,"aspectRatio");function Zi(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}r(Zi,"axisDeltaEquals");function et(t){return[t("x"),t("y")]}r(et,"eachAxis");function ca(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}r(ca,"pixelsToPercent");var Re={correct:r((t,e)=>{if(!e.target)return t;if(typeof t=="string")if(v.test(t))t=parseFloat(t);else return t;let o=ca(t,e.target.x),i=ca(t,e.target.y);return`${o}% ${i}%`},"correct")};var ua={correct:r((t,{treeScale:e,projectionDelta:o})=>{let i=t,n=j.parse(t);if(n.length>5)return i;let a=j.createTransformer(t),s=typeof n[0]!="number"?1:0,l=o.x.scale*e.x,u=o.y.scale*e.y;n[0+s]/=l,n[1+s]/=u;let c=A(l,u,.5);return typeof n[2+s]=="number"&&(n[2+s]/=c),typeof n[3+s]=="number"&&(n[3+s]/=c),a(n)},"correct")};function ma(t,e,o){let i="",n=t.x.translate/e.x,a=t.y.translate/e.y,s=o?.z||0;if((n||a||s)&&(i=`translate3d(${n}px, ${a}px, ${s}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),o){let{transformPerspective:c,rotate:m,pathRotation:f,rotateX:p,rotateY:d,skewX:h,skewY:x}=o;c&&(i=`perspective(${c}px) ${i}`),m&&(i+=`rotate(${m}deg) `),f&&(i+=`rotate(${f}deg) `),p&&(i+=`rotateX(${p}deg) `),d&&(i+=`rotateY(${d}deg) `),h&&(i+=`skewX(${h}deg) `),x&&(i+=`skewY(${x}deg) `)}let l=t.x.scale*e.x,u=t.y.scale*e.y;return(l!==1||u!==1)&&(i+=`scale(${l}, ${u})`),i||"none"}r(ma,"buildProjectionTransform");var du=io.length,fa=r(t=>typeof t=="number"||v.test(t),"isPx");function ha(t,e,o,i,n,a){n?(t.opacity=A(0,o.opacity??1,gu(i)),t.opacityExit=A(e.opacity??1,0,yu(i))):a&&(t.opacity=A(e.opacity??1,o.opacity??1,i));for(let s=0;s<du;s++){let l=io[s],u=pa(e,l),c=pa(o,l);if(u===void 0&&c===void 0)continue;u||(u=0),c||(c=0),u===0||c===0||fa(u)===fa(c)?(t[l]=Math.max(A(Bi(u),Bi(c),i),0),(_.test(c)||_.test(u))&&(t[l]+="%")):t[l]=c}(e.rotate||o.rotate)&&(t.rotate=A(e.rotate||0,o.rotate||0,i))}r(ha,"mixValues");function pa(t,e){return t[e]!==void 0?t[e]:t.borderRadius}r(pa,"getRadius");var gu=da(0,.5,ze),yu=da(.5,.95,O);function da(t,e,o){return i=>i<t?0:i>e?1:o(ct(t,e,i))}r(da,"compress");function ga(t,e,o){let i=M(t)?t:at(t);return i.start(Yt("",i,e,o)),i.animation}r(ga,"animateSingleValue");function dt(t,e,o,i={passive:!0}){return t.addEventListener(e,o,i),()=>t.removeEventListener(e,o,i)}r(dt,"addDomEvent");var ya=r((t,e)=>t.depth-e.depth,"compareByDepth");var gr=class{static{r(this,"FlatTree")}constructor(){this.children=[],this.isDirty=!1}add(e){Nt(this.children,e),this.isDirty=!0}remove(e){bt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ya),this.isDirty=!1,this.children.forEach(e)}};function xa(t,e){let o=D.now(),i=r(({timestamp:n})=>{let a=n-o;a>=e&&(J(i),t(a-e))},"checkElapsed");return w.setup(i,!0),()=>J(i)}r(xa,"delay");function re(t){return M(t)?t.get():t}r(re,"resolveMotionValue");var yr=class{static{r(this,"NodeStack")}constructor(){this.members=[]}add(e){Nt(this.members,e);for(let o=this.members.length-1;o>=0;o--){let i=this.members[o];if(i===e||i===this.lead||i===this.prevLead)continue;let n=i.instance;(!n||n.isConnected===!1)&&!i.snapshot&&(bt(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(bt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(e){for(let o=this.members.indexOf(e)-1;o>=0;o--){let i=this.members[o];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,o){let i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();let{layoutDependency:n}=i.options,{layoutDependency:a}=e.options;(n===void 0||n!==a)&&(e.resumeFrom=i,o&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};var va={borderRadius:{...Re,applyTo:[...io]},borderTopLeftRadius:Re,borderTopRightRadius:Re,borderBottomLeftRadius:Re,borderBottomRightRadius:Re,boxShadow:ua};var ie={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(te,{...va,...te});var ne={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ji=["","X","Y","Z"],xu=1e3,vu=0;function Qi(t,e,o,i){let{latestValues:n}=e;n[t]&&(o[t]=n[t],e.setStaticValue(t,0),i&&(i[t]=0))}r(Qi,"resetDistortingTransform");function Ma(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;let{visualElement:e}=t.options;if(!e)return;let o=Jo(e);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:n,layoutId:a}=t.options;window.MotionCancelOptimisedAnimation(o,"transform",w,!(n||a))}let{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Ma(i)}r(Ma,"cancelTreeOptimisedTransformAnimations");function xr({attachResizeListener:t,defaultParent:e,measureScroll:o,checkIsScrollRoot:i,resetTransform:n}){return class{static{r(this,"ProjectionNode")}constructor(s={},l=e?.()){this.id=vu++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Jt.value&&(ne.nodes=ne.calculatedTargetDeltas=ne.calculatedProjections=0),this.nodes.forEach(Vu),this.nodes.forEach(Du),this.nodes.forEach(Eu),this.nodes.forEach(Pu),Jt.addProjectionMetrics&&Jt.addProjectionMetrics(ne)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new gr)}addEventListener(s,l){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new ut),this.eventHandlers.get(s).add(l)}notifyListeners(s,...l){let u=this.eventHandlers.get(s);u&&u.notify(...l)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Ae(s)&&!Ys(s),this.instance=s;let{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),t){let m,f=0,p=r(()=>this.root.updateBlockedByResize=!1,"resizeUnblockUpdate");w.read(()=>{f=window.innerWidth}),t(s,()=>{let d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,m&&m(),m=xa(p,250),ie.hasAnimatedSinceResize&&(ie.hasAnimatedSinceResize=!1,this.nodes.forEach(Va)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:f,hasRelativeLayoutChanged:p,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||c.getDefaultTransition()||ku,{onLayoutAnimationStart:x,onLayoutAnimationComplete:g}=c.getProps(),b=!this.targetLayout||!Xi(this.targetLayout,d),V=!f&&p;if(this.options.layoutRoot||this.resumeFrom||V||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let P={...Pe(h,"layout"),onPlay:x,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P),this.setAnimationOrigin(m,V,P.path)}else f||Va(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),J(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ru),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ma(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){let f=this.path[m];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}let{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;let c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(wu),this.nodes.forEach(Ta);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Sa);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Au),this.nodes.forEach(Cu),this.nodes.forEach(Mu),this.nodes.forEach(Tu),this.nodes.forEach(Su)):this.nodes.forEach(Sa),this.clearAllSnapshots();let l=D.now();E.delta=W(0,1e3/60,l-E.timestamp),E.timestamp=l,E.isProcessing=!0,qe.update.process(E),qe.preRender.process(E),qe.render.process(E),E.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,qt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(bu),this.sharedNodes.forEach(Lu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,w.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){w.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!U(this.snapshot.measuredBox.x)&&!U(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();let s=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected=I()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(l=!1),l&&this.instance){let u=i(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:u,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!n)return;let s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Yi(this.projectionDelta),u=this.getTransformTemplate(),c=u?u(this.latestValues,""):void 0,m=c!==this.prevTransformTemplateValue;s&&this.instance&&(l||St(this.latestValues)||m)&&(n(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){let l=this.measurePageBox(),u=this.removeElementScroll(l);return s&&(u=this.removeTransform(u)),Fu(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:s}=this.options;if(!s)return I();let l=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ou))){let{scroll:c}=this.root;c&&(rt(l.x,c.offset.x),rt(l.y,c.offset.y))}return l}removeElementScroll(s){let l=I();if(nt(l,s),this.scroll?.wasRoot)return l;for(let u=0;u<this.path.length;u++){let c=this.path[u],{scroll:m,options:f}=c;c!==this.root&&m&&f.layoutScroll&&(m.wasRoot&&nt(l,s),rt(l.x,m.offset.x),rt(l.y,m.offset.y))}return l}applyTransform(s,l=!1,u){let c=u||I();nt(c,s);for(let m=0;m<this.path.length;m++){let f=this.path[m];!l&&f.options.layoutScroll&&f.scroll&&f!==f.root&&(rt(c.x,-f.scroll.offset.x),rt(c.y,-f.scroll.offset.y)),St(f.latestValues)&&co(c,f.latestValues,f.layout?.layoutBox)}return St(this.latestValues)&&co(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(s){let l=I();nt(l,s);for(let u=0;u<this.path.length;u++){let c=this.path[u];if(!St(c.latestValues))continue;let m;c.instance&&(rr(c.latestValues)&&c.updateSnapshot(),m=I(),nt(m,c.measurePageBox())),_i(l,c.latestValues,c.snapshot?.layoutBox,m)}return St(this.latestValues)&&_i(l,this.latestValues),l}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==E.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){let l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);let u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:m,layoutId:f}=this.options;if(!this.layout||!(m||f))return;this.resolvedRelativeTargetAt=E.timestamp;let p=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&p&&p.layout?this.createRelativeTarget(p,this.layout.layoutBox,p.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=I(),this.targetWithTransforms=I()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$i(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):nt(this.target,this.layout.layoutBox),wi(this.target,this.targetDelta)):nt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?this.createRelativeTarget(p,this.target,p.target):this.relativeParent=this.relativeTarget=void 0),Jt.value&&ne.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||rr(this.parent.latestValues)||Pi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(s,l,u){this.relativeParent=s,this.forceRelativeParentToResolveTarget(),this.relativeTarget=I(),this.relativeTargetOrigin=I(),Ee(this.relativeTargetOrigin,l,u,this.options.layoutAnchor||void 0),nt(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let s=this.getLead(),l=!!this.resumingFrom||this!==s,u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===E.timestamp&&(u=!1),u)return;let{layout:c,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||m))return;nt(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,p=this.treeScale.y;Gs(this.layoutCorrected,this.treeScale,this.path,l),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=I());let{target:d}=s;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ui(this.prevProjectionDelta.x,this.projectionDelta.x),Ui(this.prevProjectionDelta.y,this.projectionDelta.y)),oe(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!Zi(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zi(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d)),Jt.value&&ne.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Rt(),this.projectionDelta=Rt(),this.projectionDeltaWithTransform=Rt()}setAnimationOrigin(s,l=!1,u){let c=this.snapshot,m=c?c.latestValues:{},f={...this.latestValues},p=Rt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;let d=I(),h=c?c.source:void 0,x=this.layout?this.layout.source:void 0,g=h!==x,b=this.getStack(),V=!b||b.members.length<=1,P=!!(g&&!V&&this.options.crossfade===!0&&!this.path.some(Bu));this.animationProgress=0;let T,C=u?.interpolateProjection(s);this.mixTargetDelta=R=>{let y=R/1e3,S=C?.(y);S?(p.x.translate=S.x,p.x.scale=A(s.x.scale,1,y),p.x.origin=s.x.origin,p.x.originPoint=s.x.originPoint,p.y.translate=S.y,p.y.scale=A(s.y.scale,1,y),p.y.origin=s.y.origin,p.y.originPoint=s.y.originPoint):(Pa(p.x,s.x,y),Pa(p.y,s.y,y)),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ee(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Iu(this.relativeTarget,this.relativeTargetOrigin,d,y),T&&la(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=I()),nt(T,this.relativeTarget)),g&&(this.animationValues=f,ha(f,m,this.latestValues,y,P,V)),S&&S.rotate!==void 0&&(this.animationValues||(this.animationValues=f),this.animationValues.pathRotation=S.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(J(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=w.update(()=>{ie.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=at(0)),this.motionValue.jump(0,!1),this.currentAnimation=ga(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:r(l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},"onUpdate"),onComplete:r(()=>{s.onComplete&&s.onComplete(),this.completeAnimation()},"onComplete")}),Yn(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(xu),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:l,layout:u,latestValues:c}=s,{target:m}=s;if(!(!l||!m||!u)){if(this!==s&&this.layout&&u&&Da(this.options.animationType,this.layout.layoutBox,u.layoutBox)){m=this.target||I();let f=U(this.layout.layoutBox.x);m.x.min=s.target.x.min,m.x.max=m.x.min+f;let p=U(this.layout.layoutBox.y);m.y.min=s.target.y.min,m.y.max=m.y.min+p}nt(l,m),co(l,c),oe(this.projectionDeltaWithTransform,this.layoutCorrected,l,c)}}registerSharedNode(s,l){this.sharedNodes.has(s)||this.sharedNodes.set(s,new yr),this.sharedNodes.get(s).add(l);let c=l.options.initialPromotionConfig;l.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(l):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){let{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:l,preserveFollowOpacity:u}={}){let c=this.getStack();c&&c.promote(this,u),s&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let l=!1,{latestValues:u}=s;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;let c={};u.z&&Qi("z",s,c,this.animationValues);for(let m=0;m<Ji.length;m++)Qi(`rotate${Ji[m]}`,s,c,this.animationValues),Qi(`skew${Ji[m]}`,s,c,this.animationValues);s.render();for(let m in c)s.setStaticValue(m,c[m]),this.animationValues&&(this.animationValues[m]=c[m]);s.scheduleRender()}applyProjectionStyles(s,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}let u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=re(l?.pointerEvents)||"",s.transform=u?u(this.latestValues,""):"none";return}let c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=re(l?.pointerEvents)||""),this.hasProjected&&!St(this.latestValues)&&(s.transform=u?u({},""):"none",this.hasProjected=!1);return}s.visibility="";let m=c.animationValues||c.latestValues;this.applyTransformsToTarget();let f=ma(this.projectionDeltaWithTransform,this.treeScale,m);u&&(f=u(m,f)),s.transform=f;let{x:p,y:d}=this.projectionDelta;s.transformOrigin=`${p.origin*100}% ${d.origin*100}% 0`,c.animationValues?s.opacity=c===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:s.opacity=c===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(let h in te){if(m[h]===void 0)continue;let{correct:x,applyTo:g,isCSSVariable:b}=te[h],V=f==="none"?m[h]:x(m[h],c);if(g){let P=g.length;for(let T=0;T<P;T++)s[g[T]]=V}else b?this.options.visualElement.renderState.vars[h]=V:s[h]=V}this.options.layoutId&&(s.pointerEvents=c===this?re(l?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(Ta),this.root.sharedNodes.clear()}}}r(xr,"createProjectionNode");function Tu(t){t.updateLayout()}r(Tu,"updateLayout");function Su(t){let e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){let{layoutBox:o,measuredBox:i}=t.layout,{animationType:n}=t.options,a=e.source!==t.layout.source;if(n==="size")et(m=>{let f=a?e.measuredBox[m]:e.layoutBox[m],p=U(f);f.min=o[m].min,f.max=f.min+p});else if(n==="x"||n==="y"){let m=n==="x"?"y":"x";dr(a?e.measuredBox[m]:e.layoutBox[m],o[m])}else Da(n,e.layoutBox,o)&&et(m=>{let f=a?e.measuredBox[m]:e.layoutBox[m],p=U(o[m]);f.max=f.min+p,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[m].max=t.relativeTarget[m].min+p)});let s=Rt();oe(s,o,e.layoutBox);let l=Rt();a?oe(l,t.applyTransform(i,!0),e.measuredBox):oe(l,o,e.layoutBox);let u=!Yi(s),c=!1;if(!t.resumeFrom){let m=t.getClosestProjectingParent();if(m&&!m.resumeFrom){let{snapshot:f,layout:p}=m;if(f&&p){let d=t.options.layoutAnchor||void 0,h=I();Ee(h,e.layoutBox,f.layoutBox,d);let x=I();Ee(x,o,p.layoutBox,d),Xi(h,x)||(c=!0),m.options.layoutRoot&&(t.relativeTarget=x,t.relativeTargetOrigin=h,t.relativeParent=m)}}}t.notifyListeners("didUpdate",{layout:o,snapshot:e,delta:l,layoutDelta:s,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){let{onExitComplete:o}=t.options;o&&o()}t.options.transition=void 0}r(Su,"notifyLayoutUpdate");function Vu(t){Jt.value&&ne.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}r(Vu,"propagateDirtyNodes");function Pu(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}r(Pu,"cleanDirtyNodes");function bu(t){t.clearSnapshot()}r(bu,"clearSnapshot");function Ta(t){t.clearMeasurements()}r(Ta,"clearMeasurements");function wu(t){t.isLayoutDirty=!0,t.updateLayout()}r(wu,"forceLayoutMeasure");function Sa(t){t.isLayoutDirty=!1}r(Sa,"clearIsLayoutDirty");function Au(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}r(Au,"ensureDraggedNodesSnapshotted");function Cu(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}r(Cu,"syncRelativeLayout");function Mu(t){let{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}r(Mu,"resetTransformStyle");function Va(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}r(Va,"finishAnimation");function Du(t){t.resolveTargetDelta()}r(Du,"resolveTargetDelta");function Eu(t){t.calcProjection()}r(Eu,"calcProjection");function Ru(t){t.resetSkewAndRotation()}r(Ru,"resetSkewAndRotation");function Lu(t){t.removeLeadSnapshot()}r(Lu,"removeLeadSnapshots");function Pa(t,e,o){t.translate=A(e.translate,0,o),t.scale=A(e.scale,1,o),t.origin=e.origin,t.originPoint=e.originPoint}r(Pa,"mixAxisDeltaLinear");function ba(t,e,o,i){t.min=A(e.min,o.min,i),t.max=A(e.max,o.max,i)}r(ba,"mixAxis");function Iu(t,e,o,i){ba(t.x,e.x,o.x,i),ba(t.y,e.y,o.y,i)}r(Iu,"mixBox");function Bu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}r(Bu,"hasOpacityCrossfade");var ku={duration:.45,ease:[.4,0,.1,1]},wa=r(t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),"userAgentContains"),Aa=wa("applewebkit/")&&!wa("chrome/")?Math.round:O;function Ca(t){t.min=Aa(t.min),t.max=Aa(t.max)}r(Ca,"roundAxis");function Fu(t){Ca(t.x),Ca(t.y)}r(Fu,"roundBox");function Da(t,e,o){return t==="position"||t==="preserve-aspect"&&!Hi(qi(e),qi(o),.2)}r(Da,"shouldAnimatePositionOnly");function Ou(t){return t!==t.root&&t.scroll?.wasRoot}r(Ou,"checkNodeWasScrollRoot");var Ea=xr({attachResizeListener:r((t,e)=>dt(t,"resize",e),"attachResizeListener"),measureScroll:r(()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),"measureScroll"),checkIsScrollRoot:r(()=>!0,"checkIsScrollRoot")});var vr={current:void 0},To=xr({measureScroll:r(t=>({x:t.scrollLeft,y:t.scrollTop}),"measureScroll"),defaultParent:r(()=>{if(!vr.current){let t=new Ea({});t.mount(window),t.setOptions({layoutScroll:!0}),vr.current=t}return vr.current},"defaultParent"),resetTransform:r((t,e)=>{t.style.transform=e!==void 0?e:"none"},"resetTransform"),checkIsScrollRoot:r(t=>window.getComputedStyle(t).position==="fixed","checkIsScrollRoot")});var Ra=B(N(),1);var Tr=(0,Ra.createContext)({transformPagePoint:r(t=>t,"transformPagePoint"),isStatic:!1,reducedMotion:"never"});var Bt=B(N(),1);function La(t=!0){let e=(0,Bt.useContext)(ue);if(e===null)return[!0,null];let{isPresent:o,onExitComplete:i,register:n}=e,a=(0,Bt.useId)();(0,Bt.useEffect)(()=>{if(t)return n(a)},[t]);let s=(0,Bt.useCallback)(()=>t&&i&&i(a),[a,i,t]);return!o&&i?[!1,s]:[!0]}r(La,"usePresence");var Ia=B(N(),1),Sr=(0,Ia.createContext)({strict:!1});var Ba={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ka=!1;function ju(){if(ka)return;let t={};for(let e in Ba)t[e]={isEnabled:r(o=>Ba[e].some(i=>!!o[i]),"isEnabled")};po(t),ka=!0}r(ju,"initFeatureDefinitions");function Vr(){return ju(),ji()}r(Vr,"getInitializedFeatureDefinitions");function Fa(t){let e=Vr();for(let o in t)e[o]={...e[o],...t[o]};po(e)}r(Fa,"loadFeatures");var Cr=B(fn(),1);var ke=B(N(),1);var Oa=B(N(),1),kt=(0,Oa.createContext)({});var Pr=B(N(),1);function ja(t,e){if(Lt(t)){let{initial:o,animate:i}=t;return{initial:o===!1||Pt(o)?o:void 0,animate:Pt(i)?i:void 0}}return t.inherit!==!1?e:{}}r(ja,"getCurrentTreeVariants");function Ga(t){let{initial:e,animate:o}=ja(t,(0,Pr.useContext)(kt));return(0,Pr.useMemo)(()=>({initial:e,animate:o}),[Na(e),Na(o)])}r(Ga,"useCreateMotionContext");function Na(t){return Array.isArray(t)?t.join(" "):t}r(Na,"variantLabelsAsDependency");var Be=B(N(),1);var Ua=B(N(),1);var Le=r(()=>({style:{},transform:{},transformOrigin:{},vars:{}}),"createHtmlRenderState");function tn(t,e,o){for(let i in e)!M(e[i])&&!ho(i,o)&&(t[i]=e[i])}r(tn,"copyRawValuesOnly");function Nu({transformTemplate:t},e){return(0,Ua.useMemo)(()=>{let o=Le();return Xt(o,e,t),Object.assign({},o.vars,o.style)},[e])}r(Nu,"useInitialMotionValues");function Gu(t,e){let o=t.style||{},i={};return tn(i,o,t),Object.assign(i,Nu(t,e)),i}r(Gu,"useStyle");function Wa(t,e){let o={},i=Gu(t,e);return t.drag&&t.dragListener!==!1&&(o.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(o.tabIndex=0),o.style=i,o}r(Wa,"useHTMLProps");var za=B(N(),1);var br=r(()=>({...Le(),attrs:{}}),"createSvgRenderState");function Ka(t,e,o,i){let n=(0,za.useMemo)(()=>{let a=br();return so(a,e,yo(i),t.transformTemplate,t.style),{...a.attrs,style:{...a.style}}},[e]);if(t.style){let a={};tn(a,t.style,t),n.style={...a,...n.style}}return n}r(Ka,"useSVGProps");var Uu=new Set(["animate","exit","variants","initial","style","values","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function So(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Uu.has(t)}r(So,"isValidMotionProp");function Wu(t,e){return t.startsWith("on")?!So(t):e?.(t)??!So(t)}r(Wu,"shouldForward");function Ha(t,e,o,i){let n={};for(let a in t)a==="values"&&typeof t.values=="object"||M(t[a])||(Wu(a,i)||o===!0&&So(a)||!e&&!So(a)||t.draggable&&a.startsWith("onDrag"))&&(n[a]=t[a]);return n}r(Ha,"filterProps");var $a=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ie(t){return typeof t!="string"||t.includes("-")?!1:!!($a.indexOf(t)>-1||/[A-Z]/u.test(t))}r(Ie,"isSVGComponent");function _a(t,e,o,{latestValues:i},n,a=!1,s,l){let c=(s??Ie(t)?Ka:Wa)(e,i,n,t),m=Ha(e,typeof t=="string",a,l),f=t!==Be.Fragment?{...m,...c,ref:o}:{},{children:p}=e,d=(0,Be.useMemo)(()=>M(p)?p.get():p,[p]);return(0,Be.createElement)(t,{...f,children:d})}r(_a,"useRender");var en=B(N(),1);function zu({scrapeMotionValuesFromProps:t,createRenderState:e},o,i,n){return{latestValues:Ku(o,i,n,t),renderState:e()}}r(zu,"makeState");function Ku(t,e,o,i){let n={},a=i(t,{});for(let p in a)n[p]=re(a[p]);let{initial:s,animate:l}=t,u=Lt(t),c=uo(t);e&&c&&!u&&t.inherit!==!1&&(s===void 0&&(s=e.initial),l===void 0&&(l=e.animate));let m=o?o.initial===!1:!1;m=m||s===!1;let f=m?l:s;if(f&&typeof f!="boolean"&&!Vt(f)){let p=Array.isArray(f)?f:[f];for(let d=0;d<p.length;d++){let h=oo(t,p[d]);if(h){let{transitionEnd:x,transition:g,...b}=h;for(let V in b){let P=b[V];if(Array.isArray(P)){let T=m?P.length-1:0;P=P[T]}P!==null&&(n[V]=P)}for(let V in x)n[V]=x[V]}}}return n}r(Ku,"makeLatestValues");var wr=r(t=>(e,o)=>{let i=(0,en.useContext)(kt),n=(0,en.useContext)(ue),a=r(()=>zu(t,e,i,n),"make");return o?a():dn(a)},"makeUseVisualState");var Ya=wr({scrapeMotionValuesFromProps:ee,createRenderState:Le});var Xa=wr({scrapeMotionValuesFromProps:xo,createRenderState:br});var qa=Symbol.for("motionComponentSymbol");var se=B(N(),1);function Za(t,e,o){let i=(0,se.useRef)(o);(0,se.useInsertionEffect)(()=>{i.current=o});let n=(0,se.useRef)(null);return(0,se.useCallback)(a=>{a&&t.onMount?.(a),e&&(a?e.mount(a):e.unmount());let s=i.current;if(typeof s=="function")if(a){let l=s(a);typeof l=="function"&&(n.current=l)}else n.current?(n.current(),n.current=null):s(a);else s&&(s.current=a)},[e])}r(Za,"useMotionRef");var X=B(N(),1);var Ja=B(N(),1),Ar=(0,Ja.createContext)({});function Ft(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}r(Ft,"isRefObject");function Qa(t,e,o,i,n,a){let{visualElement:s}=(0,X.useContext)(kt),l=(0,X.useContext)(Sr),u=(0,X.useContext)(ue),c=(0,X.useContext)(Tr),m=c.reducedMotion,f=c.skipAnimations,p=(0,X.useRef)(null),d=(0,X.useRef)(!1);i=i||l.renderer,!p.current&&i&&(p.current=i(t,{visualState:e,parent:s,props:o,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:m,skipAnimations:f,isSVG:a}),d.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let h=p.current,x=(0,X.useContext)(Ar);h&&!h.projection&&n&&(h.type==="html"||h.type==="svg")&&Hu(p.current,o,n,x);let g=(0,X.useRef)(!1);(0,X.useInsertionEffect)(()=>{h&&g.current&&h.update(o,u)});let b=o[ro],V=(0,X.useRef)(!!b&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return zr(()=>{!d.current||!h||(h.animationState?.animateChanges(),h.enteringChildren=void 0)},[]),zr(()=>{d.current=!0,h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),h.scheduleRenderMicrotask(),V.current&&h.animationState&&h.animationState.animateChanges())}),(0,X.useEffect)(()=>{h&&(!V.current&&h.animationState&&h.animationState.animateChanges(),V.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),V.current=!1),h.enteringChildren=void 0)}),h}r(Qa,"useVisualElement");function Hu(t,e,o,i){let{layoutId:n,layout:a,drag:s,dragConstraints:l,layoutScroll:u,layoutRoot:c,layoutAnchor:m,layoutCrossfade:f}=e;t.projection=new o(t.latestValues,e["data-framer-portal-id"]?void 0:tl(t.parent)),t.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!s||l&&Ft(l),visualElement:t,animationType:typeof a=="string"?a:"both",initialPromotionConfig:i,crossfade:f,layoutScroll:u,layoutRoot:c,layoutAnchor:m})}r(Hu,"createProjectionNode");function tl(t){if(t)return t.options.allowProjection!==!1?t.projection:tl(t.parent)}r(tl,"getClosestProjectingNode");function Mr(t,{forwardMotionProps:e=!1,type:o}={},i,n){i&&Fa(i);let a=o?o==="svg":Ie(t),s=a?Xa:Ya;function l(c,m){let f,p={...(0,ke.useContext)(Tr),...c,layoutId:$u(c)},{isStatic:d,isValidProp:h}=p,x=Ga(c),g=s(c,d);if(!d&&typeof window<"u"){_u(p,i);let b=Yu(p);f=b.MeasureLayout,x.visualElement=Qa(t,g,p,n,b.ProjectionNode,a)}return(0,Cr.jsxs)(kt.Provider,{value:x,children:[f&&x.visualElement?(0,Cr.jsx)(f,{visualElement:x.visualElement,...p}):null,_a(t,c,Za(g,x.visualElement,m),g,d,e,a,h)]})}r(l,"MotionDOMComponent"),l.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;let u=(0,ke.forwardRef)(l);return u[qa]=t,u}r(Mr,"createMotionComponent");function $u({layoutId:t}){let e=(0,ke.useContext)(bo).id;return e&&t!==void 0?e+"-"+t:t}r($u,"useLayoutId");function _u(t,e){let o=(0,ke.useContext)(Sr).strict}r(_u,"useStrictMode");function Yu(t){let e=Vr(),{drag:o,layout:i}=e;if(!o&&!i)return{};let n={...o,...i};return{MeasureLayout:o?.isEnabled(t)||i?.isEnabled(t)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}r(Yu,"getProjectionFunctionality");function el(t,e){if(typeof Proxy>"u")return Mr;let o=new Map,i=r((a,s)=>Mr(a,s,t,e),"factory"),n=r((a,s)=>i(a,s),"deprecatedFactoryFunction");return new Proxy(n,{get:r((a,s)=>s==="create"?i:(o.has(s)||o.set(s,Mr(s,void 0,t,e)),o.get(s)),"get")})}r(el,"createMotionProxy");var ol=B(N(),1);var rl=r((t,e)=>e.isSVG??Ie(t)?new vo(e):new go(e,{allowProjection:t!==ol.Fragment}),"createDomVisualElement");var Dr=class extends z{static{r(this,"AnimationFeature")}constructor(e){super(e),e.animationState||(e.animationState=Gi(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Vt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:o}=this.node.prevProps||{};e!==o&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var Xu=0,Er=class extends z{static{r(this,"ExitAnimationFeature")}constructor(){super(...arguments),this.id=Xu++}update(){let{presenceContext:e,prevPresenceContext:o,animationState:i}=this.node;if(!e||!i)return;let{isPresent:n,onExitComplete:a}=e,s=o?.isPresent;if(n===s)return;if(n&&s===!1){if(this.exit===!0){let{initial:u}=this.node.getProps();if(u&&!Array.isArray(u)){let{transition:c,transitionEnd:m,...f}=tt(this.node,u)||{};for(let p in f)this.node.getValue(p)?.jump(f[p])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);this.exit=void 0;return}let l=this.exit=i.setActive("exit",!n);a&&!n&&l.then(()=>{this.exit===l&&(this.exit=!0,a(this.id))})}mount(){let{register:e,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),e&&(this.unmount=e(this.id))}unmount(){}};var il={animation:{Feature:Dr},exit:{Feature:Er}};function ae(t){return{point:{x:t.pageX,y:t.pageY}}}r(ae,"extractEventInfo");var nl=r(t=>e=>Zt(e)&&t(e,ae(e)),"addPointerInfo");function Ot(t,e,o,i){return dt(t,e,nl(o),i)}r(Ot,"addPointerEvent");var Rr=r(({current:t})=>t?t.ownerDocument.defaultView:null,"getContextWindow");var sl=r((t,e)=>Math.abs(t-e),"distance");function al(t,e){let o=sl(t.x,e.x),i=sl(t.y,e.y);return Math.sqrt(o**2+i**2)}r(al,"distance2D");var ll=new Set(["auto","scroll"]),Fe=class{static{r(this,"PanSession")}constructor(e,o,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:a=!1,distanceThreshold:s=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=h=>{this.handleScroll(h.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Lr(this.lastRawMoveEventInfo,this.transformPagePoint));let h=on(this.lastMoveEventInfo,this.history),x=this.startEvent!==null,g=al(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!x&&!g)return;let{point:b}=h;this.history.push({...b,timestamp:D.now()});let{onStart:V,onMove:P}=this.handlers;x||(V&&V(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),P&&P(this.lastMoveEvent,h)},this.handlePointerMove=(h,x)=>{this.lastMoveEvent=h,this.lastRawMoveEventInfo=x,this.lastMoveEventInfo=Lr(x,this.transformPagePoint),this.hasPendingMove=!0,w.update(this.updatePoint,!0)},this.handlePointerUp=(h,x)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:g,onSessionEnd:b,resumeAnimation:V}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&V&&V(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let P=on(h.type==="pointercancel"?this.lastMoveEventInfo:Lr(x,this.transformPagePoint),this.history);this.startEvent&&g&&g(h,P),b&&b(h,P)},!Zt(e))return;this.dragSnapToOrigin=a,this.handlers=o,this.transformPagePoint=i,this.distanceThreshold=s,this.contextWindow=n||window;let u=ae(e),c=Lr(u,this.transformPagePoint),{point:m}=c,{timestamp:f}=E;this.history=[{...m,timestamp:f}];let{onSessionStart:p}=o;p&&p(e,on(c,this.history));let d={passive:!0,capture:!0};this.removeListeners=st(Ot(this.contextWindow,"pointermove",this.handlePointerMove,d),Ot(this.contextWindow,"pointerup",this.handlePointerUp,d),Ot(this.contextWindow,"pointercancel",this.handlePointerUp,d)),l&&this.startScrollTracking(l)}startScrollTracking(e){let o=e.parentElement;for(;o;){let i=getComputedStyle(o);(ll.has(i.overflowX)||ll.has(i.overflowY))&&this.scrollPositions.set(o,{x:o.scrollLeft,y:o.scrollTop}),o=o.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){let o=this.scrollPositions.get(e);if(!o)return;let i=e===window,n=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a={x:n.x-o.x,y:n.y-o.y};a.x===0&&a.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(e,n),w.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),J(this.updatePoint)}};function Lr(t,e){return e?{point:e(t.point)}:t}r(Lr,"transformPoint");function cl(t,e){return{x:t.x-e.x,y:t.y-e.y}}r(cl,"subtractPoint");function on({point:t},e){return{point:t,delta:cl(t,ul(e)),offset:cl(t,qu(e)),velocity:Zu(e,.1)}}r(on,"getPanInfo");function qu(t){return t[0]}r(qu,"startDevicePoint");function ul(t){return t[t.length-1]}r(ul,"lastDevicePoint");function Zu(t,e){if(t.length<2)return{x:0,y:0};let o=t.length-1,i=null,n=ul(t);for(;o>=0&&(i=t[o],!(n.timestamp-i.timestamp>G(e)));)o--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&n.timestamp-i.timestamp>G(e)*2&&(i=t[1]);let a=K(n.timestamp-i.timestamp);if(a===0)return{x:0,y:0};let s={x:(n.x-i.x)/a,y:(n.y-i.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}r(Zu,"getVelocity");function dl(t,{min:e,max:o},i){return e!==void 0&&t<e?t=i?A(e,t,i.min):Math.max(t,e):o!==void 0&&t>o&&(t=i?A(o,t,i.max):Math.min(t,o)),t}r(dl,"applyConstraints");function ml(t,e,o){return{min:e!==void 0?t.min+e:void 0,max:o!==void 0?t.max+o-(t.max-t.min):void 0}}r(ml,"calcRelativeAxisConstraints");function gl(t,{top:e,left:o,bottom:i,right:n}){return{x:ml(t.x,o,n),y:ml(t.y,e,i)}}r(gl,"calcRelativeConstraints");function fl(t,e){let o=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([o,i]=[i,o]),{min:o,max:i}}r(fl,"calcViewportAxisConstraints");function yl(t,e){return{x:fl(t.x,e.x),y:fl(t.y,e.y)}}r(yl,"calcViewportConstraints");function xl(t,e){let o=.5,i=U(t),n=U(e);return n>i?o=ct(e.min,e.max-i,t.min):i>n&&(o=ct(t.min,t.max-n,e.min)),W(0,1,o)}r(xl,"calcOrigin");function vl(t,e){let o={};return e.min!==void 0&&(o.min=e.min-t.min),e.max!==void 0&&(o.max=e.max-t.min),o}r(vl,"rebaseAxisConstraints");var Ir=.35;function Tl(t=Ir){return t===!1?t=0:t===!0&&(t=Ir),{x:pl(t,"left","right"),y:pl(t,"top","bottom")}}r(Tl,"resolveDragElastic");function pl(t,e,o){return{min:hl(t,e),max:hl(t,o)}}r(pl,"resolveAxisElastic");function hl(t,e){return typeof t=="number"?t:t[e]||0}r(hl,"resolvePointElastic");var Ju=new WeakMap,kr=class{static{r(this,"VisualElementDragControls")}constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=I(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:o=!1,distanceThreshold:i}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=r(f=>{o&&this.snapToCursor(f),this.stopAnimation()},"onSessionStart"),s=r((f,p)=>{let{drag:d,dragPropagation:h,onDragStart:x}=this.getProps();if(d&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ci(d),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),et(b=>{let V=this.getAxisMotionValue(b).get()||0;if(_.test(V)){let{projection:P}=this.visualElement;if(P&&P.layout){let T=P.layout.layoutBox[b];T&&(V=U(T)*(parseFloat(V)/100))}}this.originPoint[b]=V}),x&&w.update(()=>x(f,p),!1,!0),be(this.visualElement,"transform");let{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},"onStart"),l=r((f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p;let{dragPropagation:d,dragDirectionLock:h,onDirectionLock:x,onDrag:g}=this.getProps();if(!d&&!this.openDragLock)return;let{offset:b}=p;if(h&&this.currentDirection===null){this.currentDirection=tm(b),this.currentDirection!==null&&x&&x(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),g&&w.update(()=>g(f,p),!1,!0)},"onMove"),u=r((f,p)=>{this.latestPointerEvent=f,this.latestPanInfo=p,this.stop(f,p),this.latestPointerEvent=null,this.latestPanInfo=null},"onSessionEnd"),c=r(()=>{let{dragSnapToOrigin:f}=this.getProps();(f||this.constraints)&&this.startAnimation({x:0,y:0})},"resumeAnimation"),{dragSnapToOrigin:m}=this.getProps();this.panSession=new Fe(e,{onSessionStart:a,onStart:s,onMove:l,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:Rr(this.visualElement),element:this.visualElement.current})}stop(e,o){let i=e||this.latestPointerEvent,n=o||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!i)return;let{velocity:s}=n;this.startAnimation(s);let{onDragEnd:l}=this.getProps();l&&w.postRender(()=>l(i,n))}cancel(){this.isDragging=!1;let{projection:e,animationState:o}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,o,i){let{drag:n}=this.getProps();if(!i||!Br(e,n,this.currentDirection))return;let a=this.getAxisMotionValue(e),s=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(s=dl(s,this.constraints[e],this.elastic[e])),a.set(s)}resolveConstraints(){let{dragConstraints:e,dragElastic:o}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;e&&Ft(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=gl(i.layoutBox,e):this.constraints=!1,this.elastic=Tl(o),n!==this.constraints&&!Ft(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&et(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=vl(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:o}=this.getProps();if(!e||!Ft(e))return!1;let i=e.current;Z(i!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;n.root&&(n.root.scroll=void 0,n.root.updateScroll());let a=Ai(i,n.root,this.visualElement.getTransformPagePoint()),s=yl(n.layout.layoutBox,a);if(o){let l=o(Ti(s));this.hasMutatedConstraints=!!l,l&&(s=ao(l))}return s}startAnimation(e){let{drag:o,dragMomentum:i,dragElastic:n,dragTransition:a,dragSnapToOrigin:s,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},c=et(m=>{if(!Br(m,o,this.currentDirection))return;let f=u&&u[m]||{};(s===!0||s===m)&&(f={min:0,max:0});let p=n?200:1e6,d=n?40:1e7,h={type:"inertia",velocity:i?e[m]:0,bounceStiffness:p,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(m,h)});return Promise.all(c).then(l)}startAxisValueAnimation(e,o){let i=this.getAxisMotionValue(e);return be(this.visualElement,e),i.start(Yt(e,i,0,o,this.visualElement,!1))}stopAnimation(){et(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let o=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps()[o];return n||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:o}){let{drag:i}=this.getProps(),n={x:e,y:o},a=this.visualElement.getTransformPagePoint()?.(n)||n,s=this.visualElement.measureViewportBox();et(l=>{if(!Br(l,i,this.currentDirection))return;let u=this.getAxisMotionValue(l),{min:c,max:m}=s[l];u.set((u.get()||0)+a[l]-A(c,m,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:o}=this.getProps(),{projection:i}=this.visualElement;if(!Ft(o)||!i||!this.constraints)return;this.stopAnimation();let n=this.constraints,a={x:0,y:0};et(l=>{let u=this.getAxisMotionValue(l).get();a[l]=xl({min:u,max:u},n[l])});let{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),et(l=>{let u=this.getAxisMotionValue(l);if(!Br(l,e,null)||!u.get())return;let{min:c,max:m}=this.constraints[l];u.set(A(c,m,a[l]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ju.set(this.visualElement,this);let e=this.visualElement.current,o=Ot(e,"pointerdown",c=>{let{drag:m,dragListener:f=!0}=this.getProps(),p=c.target,d=p!==e&&Ri(p);m&&f&&!d&&this.start(c)}),i,n=r(()=>{let{dragConstraints:c}=this.getProps();Ft(c)&&c.current&&(this.constraints=this.resolveRefConstraints(),i||(i=Qu(e,c.current,()=>this.scalePositionWithinConstraints())))},"measureDragConstraints"),{projection:a}=this.visualElement,s=a.addEventListener("measure",n);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),w.read(n);let l=dt(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:m})=>{this.isDragging&&m&&(et(f=>{let p=this.getAxisMotionValue(f);p&&(this.originPoint[f]+=c[f].translate,p.set(p.get()+c[f].translate))}),this.visualElement.render())}));return()=>{l(),o(),s(),u&&u(),i&&i()}}getProps(){let e=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:s=Ir,dragMomentum:l=!0}=e;return{...e,drag:o,dragDirectionLock:i,dragPropagation:n,dragConstraints:a,dragElastic:s,dragMomentum:l}}};function Sl(t){let e=!0;return()=>{if(e){e=!1;return}t()}}r(Sl,"skipFirstCall");function Qu(t,e,o){let i=ur(t,Sl(o)),n=ur(e,Sl(o));return()=>{i(),n()}}r(Qu,"startResizeObservers");function Br(t,e,o){return(e===!0||e===t)&&(o===null||o===t)}r(Br,"shouldDrag");function tm(t,e=10){let o=null;return Math.abs(t.y)>e?o="y":Math.abs(t.x)>e&&(o="x"),o}r(tm,"getCurrentDirection");var Fr=class extends z{static{r(this,"DragGesture")}constructor(e){super(e),this.removeGroupControls=O,this.removeListeners=O,this.controls=new kr(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||O}update(){let{dragControls:e}=this.node.getProps(),{dragControls:o}=this.node.prevProps||{};e!==o&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};var rn=r(t=>(e,o)=>{t&&w.update(()=>t(e,o),!1,!0)},"asyncHandler"),Or=class extends z{static{r(this,"PanGesture")}constructor(){super(...arguments),this.removePointerDownListener=O}onPointerDown(e){this.session=new Fe(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Rr(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:o,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:rn(e),onStart:rn(o),onMove:rn(i),onEnd:r((a,s)=>{delete this.session,n&&w.postRender(()=>n(a,s))},"onEnd")}}mount(){this.removePointerDownListener=Ot(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var Vl=B(fn(),1);var Vo=B(N(),1);var nn=!1,sn=class extends Vo.Component{static{r(this,"MeasureLayoutWithContext")}componentDidMount(){let{visualElement:e,layoutGroup:o,switchLayoutGroup:i,layoutId:n}=this.props,{projection:a}=e;a&&(o.group&&o.group.add(a),i&&i.register&&n&&i.register(a),nn&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:r(()=>this.safeToRemove(),"onExitComplete")})),ie.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:o,visualElement:i,drag:n,isPresent:a}=this.props,{projection:s}=i;return s&&(s.isPresent=a,e.layoutDependency!==o&&s.setOptions({...s.options,layoutDependency:o}),nn=!0,n||e.layoutDependency!==o||o===void 0||e.isPresent!==a?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||w.postRender(()=>{let l=s.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:e,layoutAnchor:o}=this.props,{projection:i}=e;i&&(i.options.layoutAnchor=o,i.root.didUpdate(),qt.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:o,switchLayoutGroup:i}=this.props,{projection:n}=e;nn=!0,n&&(n.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function jr(t){let[e,o]=La(),i=(0,Vo.useContext)(bo);return(0,Vl.jsx)(sn,{...t,layoutGroup:i,switchLayoutGroup:(0,Vo.useContext)(Ar),isPresent:e,safeToRemove:o})}r(jr,"MeasureLayout");var Pl={pan:{Feature:Or},drag:{Feature:Fr,ProjectionNode:To,MeasureLayout:jr}};function bl(t,e,o){let{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",o==="Start");let n="onHover"+o,a=i[n];a&&w.postRender(()=>a(e,ae(e)))}r(bl,"handleHoverEvent");var Nr=class extends z{static{r(this,"HoverGesture")}mount(){let{current:e}=this.node;e&&(this.unmount=Mi(e,(o,i)=>(bl(this.node,i,"Start"),n=>bl(this.node,n,"End"))))}unmount(){}};var Gr=class extends z{static{r(this,"FocusGesture")}constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=st(dt(this.node.current,"focus",()=>this.onFocus()),dt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function wl(t,e,o){let{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",o==="Start");let n="onTap"+(o==="End"?"":o),a=i[n];a&&w.postRender(()=>a(e,ae(e)))}r(wl,"handlePressEvent");var Ur=class extends z{static{r(this,"PressGesture")}mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:o,propagate:i}=this.node.props;this.unmount=Ii(e,(n,a)=>(wl(this.node,a,"Start"),(s,{success:l})=>wl(this.node,s,l?"End":"Cancel")),{useGlobalTarget:o,stopPropagation:i?.tap===!1})}unmount(){}};var ln=new WeakMap,an=new WeakMap,em=r(t=>{let e=ln.get(t.target);e&&e(t)},"fireObserverCallback"),om=r(t=>{t.forEach(em)},"fireAllObserverCallbacks");function rm({root:t,...e}){let o=t||document;an.has(o)||an.set(o,{});let i=an.get(o),n=JSON.stringify(e);return i[n]||(i[n]=new IntersectionObserver(om,{root:t,...e})),i[n]}r(rm,"initIntersectionObserver");function Al(t,e,o){let i=rm(e);return ln.set(t,o),i.observe(t),()=>{ln.delete(t),i.unobserve(t)}}r(Al,"observeIntersection");var im={some:0,all:1},Wr=class extends z{static{r(this,"InViewFeature")}constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:o,margin:i,amount:n="some",once:a}=e,s={root:o?o.current:void 0,rootMargin:i,threshold:typeof n=="number"?n:im[n]},l=r(u=>{let{isIntersecting:c}=u;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:m,onViewportLeave:f}=this.node.getProps(),p=c?m:f;p&&p(u)},"onIntersectionUpdate");this.stopObserver=Al(this.node.current,s,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:e,prevProps:o}=this.node;["amount","margin","root"].some(nm(e,o))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function nm({viewport:t={}},{viewport:e={}}={}){return o=>t[o]!==e[o]}r(nm,"hasViewportOptionChanged");var Cl={inView:{Feature:Wr},tap:{Feature:Ur},focus:{Feature:Gr},hover:{Feature:Nr}};var Ml={layout:{ProjectionNode:To,MeasureLayout:jr}};var Dl={...il,...Cl,...Pl,...Ml};var cn=el(Dl,rl);var El=B(N(),1);function sm(){!Qt.current&&mo();let[t]=(0,El.useState)(It.current);return t}r(sm,"useReducedMotion");var KD=cn;export{sm as a,KD as b};
@@ -0,0 +1 @@
1
+ import{a as Z}from"./chunk-4EPW63HS.js";import{a as Q}from"./chunk-6G3E4PJ2.js";import{a as c,d as P}from"./chunk-5PEAXTYQ.js";function B(r){return typeof r=="object"?r.key:r}c(B,"getMeasurementKey");function H(r,a){let t=r.length;return new Proxy(r,{get(s,e,n){if(typeof e=="string"){let o=e.charCodeAt(0);if(o>=48&&o<=57){let i=+e;if(Number.isInteger(i)&&i>=0&&i<t){let l=s[i];if(typeof l!="object"){let u=a[i*2];l=s[i]={index:i,key:l,start:u,size:a[i*2+1],end:u+a[i*2+1],lane:0}}return l}}if(e==="length")return t}return Reflect.get(s,e,n)}})}c(H,"createLazyMeasurementsView");function z(r,a,t){let s=t.initialDeps??[],e,n=!0;function o(){var i;let u=0,g=r();if(!(g.length!==s.length||g.some((d,S)=>s[S]!==d)))return e;s=g;let f=0;return e=a(...g),t?.onChange&&!(n&&t.skipInitialOnChange)&&t.onChange(e),n=!1,e}return c(o,"memoizedFunction"),o.updateDeps=i=>{s=i},o}c(z,"memo");function W(r,a){if(r===void 0)throw new Error(`Unexpected undefined${a?`: ${a}`:""}`);return r}c(W,"notUndefined");var k=c((r,a)=>Math.abs(r-a)<1.01,"approxEqual"),$=c((r,a,t)=>{let s;return Object.assign(function(...e){r.clearTimeout(s),s=r.setTimeout(()=>a.apply(this,e),t)},{cancel:c(()=>{r.clearTimeout(s)},"cancel")})},"debounce");var j,V=c(()=>{if(j!==void 0)return j;if(typeof navigator>"u")return j=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return j=!0;let r=navigator.maxTouchPoints;return j=navigator.platform==="MacIntel"&&r!==void 0&&r>0},"isIOSWebKit");var J=c(r=>{let{offsetWidth:a,offsetHeight:t}=r;return{width:a,height:t}},"getRect"),tt=c(r=>r,"defaultKeyExtractor"),et=c(r=>{let a=Math.max(r.startIndex-r.overscan,0),s=Math.min(r.endIndex+r.overscan,r.count-1)-a+1,e=new Array(s);for(let n=0;n<s;n++)e[n]=a+n;return e},"defaultRangeExtractor"),q=c((r,a)=>{let t=r.scrollElement;if(!t)return;let s=r.targetWindow;if(!s)return;let e=c(o=>{let{width:i,height:l}=o;a({width:Math.round(i),height:Math.round(l)})},"handler");if(e(J(t)),!s.ResizeObserver)return()=>{};let n=new s.ResizeObserver(o=>{let i=c(()=>{let l=o[0];if(l?.borderBoxSize){let u=l.borderBoxSize[0];if(u){e({width:u.inlineSize,height:u.blockSize});return}}e(J(t))},"run");r.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return n.observe(t,{box:"border-box"}),()=>{n.unobserve(t)}},"observeElementRect"),F={passive:!0};var st=typeof window>"u"?!0:"onscrollend"in window,nt=c((r,a,t)=>{let s=r.scrollElement;if(!s)return;let e=r.targetWindow;if(!e)return;let n=r.options.useScrollendEvent&&st,o=0,i=n?null:$(e,()=>a(t(s),!1),r.options.isScrollingResetDelay),l=c(h=>()=>{o=t(s),i?.(),a(o,h)},"createHandler"),u=l(!0),g=l(!1);return s.addEventListener("scroll",u,F),n&&s.addEventListener("scrollend",g,F),()=>{s.removeEventListener("scroll",u),n&&s.removeEventListener("scrollend",g),i?.cancel()}},"observeOffset"),U=c((r,a)=>nt(r,a,t=>{let{horizontal:s,isRtl:e}=r.options;return s?t.scrollLeft*(e&&-1||1):t.scrollTop}),"observeElementOffset");var it=c((r,a,t)=>{if(t.options.useCachedMeasurements){let s=t.indexFromElement(r),e=t.options.getItemKey(s);return t.itemSizeCache.get(e)??t.options.estimateSize(s)}if(a?.borderBoxSize){let s=a.borderBoxSize[0];if(s)return Math.round(s[t.options.horizontal?"inlineSize":"blockSize"])}if(!a){let s=t.indexFromElement(r),e=t.options.getItemKey(s),n=t.itemSizeCache.get(e);if(n!==void 0)return n}return r[t.options.horizontal?"offsetWidth":"offsetHeight"]},"measureElement"),ot=c((r,{adjustments:a=0,behavior:t},s)=>{var e,n;(n=(e=s.scrollElement)==null?void 0:e.scrollTo)==null||n.call(e,{[s.options.horizontal?"left":"top"]:r+a,behavior:t})},"scrollWithAdjustments");var X=ot;function lt(r,a,t,s){if(a===0)return!1;let e=s(0),n=new Set,o=0;for(;o<r;){let l=t(o);if(l===e)break;n.add(l),o++}let i=r-o;if(i===0||i>=a)return!1;for(let l=0;l<i;l++)if(s(l)!==t(o+l))return!1;for(let l=i;l<a;l++)if(n.has(s(l)))return!1;return!0}c(lt,"isAppendWithTrim");var D=class{static{c(this,"Virtualizer")}constructor(a){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this._clampedAdjustment=null,this.elementsCache=new Map,this.now=()=>{var t,s,e;return((e=(s=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:s.now)==null?void 0:e.call(s))??Date.now()},this.observer=(()=>{let t=null,s=c(()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(e=>{e.forEach(n=>{let o=c(()=>{let i=n.target,l=this.indexFromElement(i);if(!i.isConnected){this.observer.unobserve(i);for(let[u,g]of this.elementsCache)if(g===i){this.elementsCache.delete(u);break}return}this.isIndexInRange(l)&&this.shouldMeasureDuringScroll(l)&&this.resizeItem(l,this.options.measureElement(i,n,this))},"run");this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()})})),"get");return{disconnect:c(()=>{var e;(e=s())==null||e.disconnect(),t=null},"disconnect"),observe:c(e=>{var n;return(n=s())==null?void 0:n.observe(e,{box:"border-box"})},"observe"),unobserve:c(e=>{var n;return(n=s())==null?void 0:n.unobserve(e)},"unobserve")}})(),this.range=null,this.setOptions=t=>{var s;let e={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:tt,rangeExtractor:et,onChange:c(()=>{},"onChange"),measureElement:it,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(let h in t){let f=t[h];f!==void 0&&(e[h]=f)}let n=this.options,o=null,i=null,l=!1;if(n!==void 0&&n.enabled&&e.enabled&&e.anchorTo==="end"&&this.scrollElement!==null){let h=n.count,f=e.count,d=this.getMeasurements(),S=((s=this._singleLaneMeasurements)==null?void 0:s.items)??d,v=c(O=>B(S[O]),"getPreviousKey"),E=h>0?v(0):null,b=h>0?v(h-1):null;if(f!==h||h>0&&f>0&&(e.getItemKey(0)!==E||e.getItemKey(f-1)!==b)){l=!0;let O=h>0?this.getVirtualItemForOffset(this.getScrollOffset())??d[0]:null;O&&(o=[O.key,this.getScrollOffset()-O.start]);let _=e.followOnAppend===!0?"auto":e.followOnAppend||null;_&&f>0&&this.isAtEnd(n.scrollEndThreshold)&&(h===0||e.getItemKey(f-1)!==b)&&(f>h||lt(h,f,v,e.getItemKey))&&(i=_)}}this.options=e,l&&(this.pendingMin=0,this.itemSizeCacheVersion++);let u=!1,g=0;if(o&&this.scrollOffset!==null){let[h,f]=o,d=this.getMeasurements(),{count:S,getItemKey:v}=this.options,E=0;for(;E<S&&v(E)!==h;)E++;if(E<S){let b=d[E];if(b){let m=Math.max(0,b.start+f);!i&&m!==this.scrollOffset&&(g=m-this.scrollOffset,this.scrollOffset=m,u=!0)}}}(u||i)&&(this.pendingScrollAnchor=[u?o[0]:null,u?o[1]:0,i,g])},this.notify=t=>{var s,e;(e=(s=this.options).onChange)==null||e.call(s,this,t)},this.maybeNotify=z(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:c(()=>this.options.debug,"debug"),initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._clampedAdjustment=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t,s;let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(o=>{this.observer.observe(o)}),this.unsubs.push(this.options.observeElementRect(this,o=>{this.scrollRect=o,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(o,i)=>{if(i&&this._intendedScrollOffset===null&&o===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(o-this._intendedScrollOffset)<1.5&&(o=this._intendedScrollOffset),this._intendedScrollOffset=null,this._clampedAdjustment!==null&&Math.abs(o-this._clampedAdjustment.maxAtWrite)>=1.5&&(this._clampedAdjustment=null),this.scrollAdjustments=0;let l=this.getScrollOffset();this.scrollDirection=i?l===o?this.scrollDirection:l<o?"forward":"backward":null,this.scrollOffset=o,this.isScrolling=i,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){let o=this.scrollElement,i=c(()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},"onTouchStart"),l=c(()=>{this._iosTouching=!1,!(!V()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))},"onTouchEnd");o.addEventListener("touchstart",i,F),o.addEventListener("touchend",l,F),this.unsubs.push(()=>{o.removeEventListener("touchstart",i),o.removeEventListener("touchend",l),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let n=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,n&&this.scrollElement&&this.options.enabled){let[o,i,l,u]=n;o!==null&&!l&&(V()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?u!==0&&(this._iosDeferredAdjustment+=u):((s=this.scrollState)==null?void 0:s.behavior)==="smooth"&&!k(this.getScrollOffset()-u,this.scrollState.lastTargetOffset)||this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),l&&this.scrollToEnd({behavior:l})}this._retryClampedAdjustment()},this._retryClampedAdjustment=()=>{if(this._clampedAdjustment===null||!this.scrollElement||!this.options.enabled)return;let{target:t,maxAtWrite:s}=this._clampedAdjustment,e=this.getMaxScrollOffset();e>s+.5&&(this._clampedAdjustment=t>e+.5?{target:t,maxAtWrite:e}:null,this._scrollToOffset(t,{adjustments:void 0,behavior:void 0}))},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let t=this.getScrollOffset(),s=this.getMaxScrollOffset();if(t<0||t>s)return;if(this._iosDeferredAdjustment<0&&t>=s-1){this._iosDeferredAdjustment=0;return}let e=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=e,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=z(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,s,e,n,o,i,l,u)=>(this.prevLanes!==void 0&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:t,paddingStart:s,scrollMargin:e,getItemKey:n,enabled:o,lanes:i,laneAssignmentMode:l,gap:u}),{key:!1}),this.isIndexInRange=t=>t>=0&&t<this.options.count,this.getMeasurements=z(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:s,scrollMargin:e,getItemKey:n,enabled:o,lanes:i,laneAssignmentMode:l,gap:u},g)=>{var h;let f=this.itemSizeCache;if(!o)return this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(let m of this.laneAssignments.keys())m>=t&&this.laneAssignments.delete(m);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this._singleLaneMeasurements=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(m=>{this.itemSizeCache.set(m.key,m.size)}));let d=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),i===1){let m=t*2,p=(h=this._singleLaneMeasurements)==null?void 0:h.flat;if(!p||p.length<m){let x=new Float64Array(m);p&&d>0&&x.set(p.subarray(0,d*2)),p=x}let O=d===0?new Array(t):this._singleLaneMeasurements.items.slice(),_;if(d===0)_=s+e;else{let x=d-1;_=p[x*2]+p[x*2+1]+u}for(let x=d;x<t;x++){let M=n(x);O[x]=M;let T=f.get(M),C=typeof T=="number"?T:this.options.estimateSize(x);p[x*2]=_,p[x*2+1]=C,_+=C+u}this._singleLaneMeasurements={flat:p,items:O};let y=H(O,p);return this.measurementsCache=y,y}let S=this.measurementsCache.slice(0,d),v=new Array(i).fill(void 0),E=new Float64Array(i),b=0;for(let m=0;m<d;m++){let p=S[m];p&&(v[p.lane]===void 0&&b++,v[p.lane]=m,E[p.lane]=p.end)}for(let m=d;m<t;m++){let p=n(m),O=this.laneAssignments.get(m),_,y,x=l==="estimate"||f.has(p);if(O!==void 0&&this.options.lanes>1){_=O;let R=v[_],w=R!==void 0?S[R]:void 0;y=w?w.end+u:s+e}else if(b===i){let R=0,w=E[0],K=v[0];for(let A=1;A<i;A++){let L=E[A];(L<w||L===w&&v[A]<K)&&(R=A,w=L,K=v[A])}_=R,y=w+u,x&&this.laneAssignments.set(m,_)}else _=m%this.options.lanes,y=s+e,x&&this.laneAssignments.set(m,_);let M=f.get(p),T=typeof M=="number"?M:this.options.estimateSize(m),C=y+T;S[m]={index:m,start:y,size:T,end:C,key:p,lane:_},v[_]===void 0&&b++,v[_]=m,E[_]=C}return this.measurementsCache=S,S},{key:!1,debug:c(()=>this.options.debug,"debug")}),this.calculateRange=z(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,s,e,n)=>t.length===0||s===0?(this.range=null,null):(this.range=at(t,s,e,n,n===1&&this._singleLaneMeasurements!==null?this._singleLaneMeasurements.flat:null),this.range),{key:!1,debug:c(()=>this.options.debug,"debug")}),this.getVirtualIndexes=z(()=>{let t=null,s=null,e=this.calculateRange();return e&&(t=e.startIndex,s=e.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,s]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,s]},(t,s,e,n,o)=>n===null||o===null?[]:t({startIndex:n,endIndex:o,overscan:s,count:e}),{key:!1,debug:c(()=>this.options.debug,"debug")}),this.indexFromElement=t=>{let s=this.options.indexAttribute,e=t.getAttribute(s);return e?parseInt(e,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var s;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;let e=this.scrollState.index??((s=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:s.index);if(e!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),o=Math.max(0,e-n),i=Math.min(this.options.count-1,e+n);return t>=o&&t<=i}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((o,i)=>{o.isConnected||(this.observer.unobserve(o),this.elementsCache.delete(i))});return}let s=this.indexFromElement(t);if(!this.isIndexInRange(s))return;let e=this.options.getItemKey(s),n=this.elementsCache.get(e);n!==t&&(n&&this.observer.unobserve(n),this.observer.observe(t),this.elementsCache.set(e,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,s)=>{var e,n,o;if(!this.isIndexInRange(t))return;let i,l,u,g=(e=this._singleLaneMeasurements)==null?void 0:e.flat;if(this.options.lanes===1&&g!=null)u=this.options.getItemKey(t),l=g[t*2],i=g[t*2+1];else{let d=this.measurementsCache[t];if(!d)return;u=d.key,l=d.start,i=d.size}let h=this.itemSizeCache.get(u)??i,f=s-h;if(f!==0){let d=this.options.anchorTo==="end"&&((n=this.scrollState)==null?void 0:n.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,S=d?this.getTotalSize():0,v=this.getScrollOffset()+this.scrollAdjustments,b=!this.itemSizeCache.has(u)?l<v:l+h<=v&&this.scrollDirection!=="backward",m=((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[t]??{index:t,key:u,start:l,size:i,end:l+i,lane:0},f,this):b);(this.pendingMin===null||t<this.pendingMin)&&(this.pendingMin=t),this.itemSizeCache.set(u,s),this.itemSizeCacheVersion++;let p=!1;d?p=this.applyScrollAdjustment(this.getTotalSize()-S):m&&(p=this.applyScrollAdjustment(f)),this.notify(p),this._retryClampedAdjustment()}},this.getVirtualItems=z(()=>[this.getVirtualIndexes(),this.getMeasurements()],(t,s)=>{let e=[];for(let n=0,o=t.length;n<o;n++){let i=t[n],l=s[i];e.push(l)}return e},{key:!1,debug:c(()=>this.options.debug,"debug")}),this.getVirtualItemForOffset=t=>{var s;let e=this.getMeasurements();if(e.length===0)return;let n=(s=this._singleLaneMeasurements)==null?void 0:s.flat,o=this.options.lanes===1&&n!=null,i=Y(0,e.length-1,o?l=>n[l*2]:l=>W(e[l]).start,t);return W(e[i])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,s,e=0)=>{if(!this.scrollElement)return 0;let n=this.getSize(),o=this.getScrollOffset();s==="auto"&&(s=t>=o+n?"end":"start"),s==="center"?t+=(e-n)/2:s==="end"&&(t-=n);let i=this.getMaxScrollOffset();return Math.max(Math.min(i,t),0)},this.getOffsetForIndex=(t,s="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));let e=this.getSize(),n=this.getScrollOffset(),o=this.measurementsCache[t];if(!o)return;if(s==="auto")if(o.end>=n+e-this.options.scrollPaddingEnd)s="end";else if(o.start<=n+this.options.scrollPaddingStart)s="start";else return[n,s];if(s==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),s];let i=s==="end"?o.end+this.options.scrollPaddingEnd:o.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,s,o.size),s]},this.scrollToOffset=(t,{align:s="start",behavior:e="auto"}={})=>{this._iosDeferredAdjustment=0;let n=this.getOffsetForAlignment(t,s),o=this.now();this.scrollState={index:null,align:s,behavior:e,startedAt:o,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:s="auto",behavior:e="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));let n=this.getOffsetForIndex(t,s);if(!n)return;let[o,i]=n,l=this.now();this.scrollState={index:t,align:i,behavior:e,startedAt:l,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:s="auto"}={})=>{let e=this.getScrollOffset()+t,n=this.now();this.scrollState={index:null,align:"start",behavior:s,startedAt:n,lastTargetOffset:e,stableFrames:0},this._scrollToOffset(e,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t,s;let e=this.getMeasurements(),n;if(e.length===0)n=this.options.paddingStart;else if(this.options.lanes===1){let o=e.length-1,i=(t=this._singleLaneMeasurements)==null?void 0:t.flat;i!=null?n=i[o*2]+i[o*2+1]:n=((s=e[o])==null?void 0:s.end)??0}else{let o=Array(this.options.lanes).fill(null),i=e.length-1;for(;i>=0&&o.some(l=>l===null);){let l=e[i];o[l.lane]===null&&(o[l.lane]=l.end),i--}n=Math.max(...o.filter(l=>l!==null))}return Math.max(n-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let t=[];if(this.itemSizeCache.size===0)return t;let s=this.getMeasurements();for(let e of s)e&&this.itemSizeCache.has(e.key)&&t.push({index:e.index,key:e.key,start:e.start,size:e.size,end:e.end,lane:e.lane});return t},this._scrollToOffset=(t,{adjustments:s,behavior:e})=>{this._intendedScrollOffset=t+(s??0),this.options.scrollToFn(t,{behavior:e,adjustments:s},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(a)}applyScrollAdjustment(a,t){if(a===0)return!1;if(V()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded))return this._iosDeferredAdjustment+=a,!1;{let s=this.getScrollOffset()+this.scrollAdjustments+a,e=this.scrollElement,n=e!==null&&("scrollHeight"in e||"document"in e)?this.getMaxScrollOffset():null;return this._clampedAdjustment=n!==null&&s>n+.5?{target:s,maxAtWrite:n}:null,this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0}}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let s=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,e=s?s[0]:this.scrollState.lastTargetOffset,n=1,o=e!==this.scrollState.lastTargetOffset;if(!o&&k(e,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=n){this.getScrollOffset()!==e&&this._scrollToOffset(e,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,o){let i=this.getSize()||600,l=Math.abs(e-this.getScrollOffset()),u=this.scrollState.behavior==="smooth"&&l>i;this.scrollState.lastTargetOffset=e,u||(this.scrollState.behavior="auto"),this._scrollToOffset(e,{adjustments:void 0,behavior:u?"smooth":"auto"})}this.scheduleScrollReconcile()}},Y=c((r,a,t,s)=>{for(;r<=a;){let e=(r+a)/2|0,n=t(e);if(n<s)r=e+1;else if(n>s)a=e-1;else return e}return r>0?r-1:0},"findNearestBinarySearch");function rt(r,a,t){let s=0;for(;s<=a;){let e=(s+a)/2|0,n=r[e*2];if(n<t)s=e+1;else if(n>t)a=e-1;else return e}return s>0?s-1:0}c(rt,"findNearestBinarySearchFlat");function at(r,a,t,s,e){let n=r.length-1;if(r.length<=s)return{startIndex:0,endIndex:n};if(s===1&&e!==null){let u=rt(e,n,t),g=u,h=t+a;for(;g<n&&e[g*2]+e[g*2+1]<h;)g++;return{startIndex:u,endIndex:g}}let i=Y(0,n,c(u=>r[u].start,"getStart"),t),l=i;if(s===1)for(;l<n&&r[l].end<t+a;)l++;else if(s>1){let u=Array(s).fill(0);for(;l<n&&u.some(h=>h<t+a);){let h=r[l];u[h.lane]=h.end,l++}let g=Array(s).fill(t+a);for(;i>=0&&g.some(h=>h>=t);){let h=r[i];g[h.lane]=h.start,i--}i=Math.max(0,i-i%s),l=Math.min(n,l+(s-1-l%s))}return{startIndex:i,endIndex:l}}c(at,"calculateRangeImpl");var I=P(Q(),1),G=P(Z(),1);var N=typeof document<"u"?I.useLayoutEffect:I.useEffect;function ht({useFlushSync:r=!0,directDomUpdates:a=!1,directDomUpdatesMode:t="transform",...s}){let e=I.useReducer(h=>h+1,0)[1],n=I.useRef({enabled:a,mode:t,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});n.current.enabled=a,n.current.mode=t;let o=I.useRef(!1),i=c(h=>{let f=n.current;if(!f.enabled||!f.container)return;let d=h.getTotalSize();if(d!==f.lastSize){f.lastSize=d;let S=h.options.horizontal?"width":"height";f.container.style[S]=`${d}px`}},"applyContainerSize"),l=c(h=>{let f=n.current;if(!f.enabled||!f.container)return;i(h);let d=!!h.options.horizontal,S=f.mode==="transform",v=d?"left":"top",E=h.options.scrollMargin,b=h.getVirtualItems();for(let m of b){let p=m.start-E,O=h.elementsCache.get(m.key);O&&f.lastPositions.get(O)!==p&&(f.lastPositions.set(O,p),S?O.style.transform=d?`translate3d(${p}px, 0, 0)`:`translate3d(0, ${p}px, 0)`:O.style[v]=`${p}px`)}},"applyDirectStyles"),u={...s,onChange:c((h,f)=>{var d;let S=n.current,v=!0;if(S.enabled){l(h);let E=h.range,b=S.prevRange;v=!b||b.isScrolling!==h.isScrolling||b.startIndex!==E?.startIndex||b.endIndex!==E?.endIndex,v&&(S.prevRange=E?{startIndex:E.startIndex,endIndex:E.endIndex,isScrolling:h.isScrolling}:null)}v&&(r&&f&&!o.current?(0,G.flushSync)(e):e()),(d=s.onChange)==null||d.call(s,h,f)},"onChange")},[g]=I.useState(()=>{let h=new D(u),f=h.measureElement;return h.measureElement=d=>{o.current=!0;try{f(d)}finally{o.current=!1}},Object.assign(h,{containerRef:c(d=>{let S=n.current;if(S.container=d,S.lastSize=null,d&&S.enabled){let v=h.getTotalSize();S.lastSize=v;let E=h.options.horizontal?"width":"height";d.style[E]=`${v}px`}},"containerRef")})});return g.setOptions(u),N(()=>g._didMount(),[]),N(()=>(i(g),g._willUpdate())),N(()=>{l(g)}),g}c(ht,"useVirtualizerBase");function _t(r){return ht({observeElementRect:q,observeElementOffset:U,scrollToFn:X,...r})}c(_t,"useVirtualizer");export{q as a,U as b,_t as c};
@@ -0,0 +1 @@
1
+ import{a as st}from"./chunk-2NGKUO32.js";import{a as tt}from"./chunk-J3BZWYJQ.js";import"./chunk-O3AZ7JKE.js";import{a as et}from"./chunk-PJUVJTDR.js";import"./chunk-D65UVZIA.js";import{a as Ze}from"./chunk-YEVTA35E.js";import{i as Ve}from"./chunk-IHGRWY3Y.js";import"./chunk-OWRKSQPE.js";import"./chunk-4EPW63HS.js";import{a as fe}from"./chunk-V3BE427M.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import{a as xe}from"./chunk-RCXNYW7P.js";import{b as ge}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as Ye}from"./chunk-IUGNIG6L.js";import{a as Xe}from"./chunk-LSEUUZN4.js";import{a as Re,b as _e,c as Je,d as H,e as L,f as S}from"./chunk-7QEZ2SFW.js";import"./chunk-WCWP4EAW.js";import"./chunk-BX7TFVCC.js";import"./chunk-4PI2OSSP.js";import{a as G}from"./chunk-2W4UO5BC.js";import{c as ke}from"./chunk-FBDIQ67D.js";import{a as Be,e as Oe}from"./chunk-OK2QU2EV.js";import{m as Ke}from"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as O,h as me,i as pe,j as K,p as Ge,s as he,w as He}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as ut}from"./chunk-GWNGVKLG.js";import{a as it,b as ct}from"./chunk-6G3E4PJ2.js";import{a as c,d as $e}from"./chunk-5PEAXTYQ.js";var $=$e(ut(),1),M=$e(it(),1);var s=$e(ct(),1);var mt=c((n,e)=>{let t=new Set(n.map(a=>a.deadLetterQueue).filter(a=>typeof a=="string"&&a!=="")),o=n.filter(a=>(a.deadLetterQueue===void 0||a.deadLetterQueue==="")&&!t.has(a.name)),r=e.filter(a=>a.deadLettered).length;return{deadLetteredCount:r,queuesWithoutDlq:o,showReliabilityWarning:o.length>0||r>0}},"ct"),We="topic:",je=c(n=>{let e=[],t=new Map;for(let o of n)o.topic===void 0?e.push(o):t.set(o.topic,[...t.get(o.topic)??[],o]);return{plain:e,topics:t}},"Be"),rt=c(n=>`${We}${n}`,"He"),pt=c((n,e)=>n.startsWith(We)?(e.get(n.slice(We.length))??[]).map(t=>t.exportName):[n],"ut"),ht=200,gt=me(G.sendQueueMessage),ft=c(async(n,e,t)=>{let o=(await Promise.allSettled(e.map(async a=>n.query(gt,a,pe(""))))).flatMap((a,l)=>a.status==="rejected"?[{exportName:e[l]?.exportName??"",message:K(a.reason)}]:[]),[r]=o;return r===void 0?null:e.length===1?r.message:t("Not sent to {failed}",{failed:o.map(a=>`${a.exportName}: ${a.message}`).join("; ")})},"ft"),xt=me(G.replayQueueMessage),yt=me(G.clearQueueMessages),at=96,Nt=c(n=>{if(n===void 0)return"\u2014";try{return JSON.stringify(n,Ge)}catch{return"[unserializable]"}},"xt"),bt=c(n=>n.length>at?`${n.slice(0,at)}\u2026`:n,"yt"),qt=c(n=>n==="error"?"destructive":n==="retry"?"outline":"secondary","bt"),vt=c((n,e)=>e(n==="messages"?"Messages":n==="send"?"Send":"Declared"),"Nt"),nt=c(n=>{let e=(0,$.c)(17),{queue:t}=n,o=`queues-row-${t.exportName}`,r;e[0]!==t.exportName?(r=(0,s.jsx)(S,{className:"font-mono text-xs",children:t.exportName}),e[0]=t.exportName,e[1]=r):r=e[1];let a;e[2]!==t.name?(a=(0,s.jsx)(S,{className:"font-mono text-xs text-muted-foreground",children:t.name}),e[2]=t.name,e[3]=a):a=e[3];let l;e[4]!==t.mode?(l=(0,s.jsx)(S,{className:"font-mono text-xs text-muted-foreground",children:t.mode}),e[4]=t.mode,e[5]=l):l=e[5];let d;e[6]!==t.binding?(d=(0,s.jsx)(S,{className:"font-mono text-xs text-muted-foreground",children:t.binding}),e[6]=t.binding,e[7]=d):d=e[7];let i=t.deadLetterQueue??"\u2014",u;e[8]!==i?(u=(0,s.jsx)(S,{className:"font-mono text-xs text-muted-foreground",children:i}),e[8]=i,e[9]=u):u=e[9];let p;return e[10]!==o||e[11]!==r||e[12]!==a||e[13]!==l||e[14]!==d||e[15]!==u?(p=(0,s.jsxs)(H,{"data-testid":o,children:[r,a,l,d,u]}),e[10]=o,e[11]=r,e[12]=a,e[13]=l,e[14]=d,e[15]=u,e[16]=p):p=e[16],p},"Ve"),St=c(n=>{let e=(0,$.c)(8),{loaded:t,queues:o}=n,r=O(),a;if(e[0]!==t||e[1]!==o||e[2]!==r){let{plain:l,topics:d}=je(o),i;e[4]!==r?(i=r("Queues are declared in code with defineQueue. Enqueue from a mutation or action with ctx.queues.<name>.send(...); push consumers process batches in the worker."),e[4]=r,e[5]=i):i=e[5];let u;e[6]!==i?(u=(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:i}),e[6]=i,e[7]=u):u=e[7],a=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"queues-declared",children:[u,t&&o.length===0?(0,s.jsx)(xe,{description:r("No defineQueue is declared in lunora/queues.ts in this deployment. Add one to offload async work to a Cloudflare Queue."),testId:"queues-empty",title:r("No queues defined")}):(0,s.jsx)(Be,{className:"overflow-hidden py-0",children:(0,s.jsx)(Oe,{className:"px-0",children:(0,s.jsxs)(Re,{"data-testid":"queues-table",children:[(0,s.jsx)(_e,{children:(0,s.jsxs)(H,{children:[(0,s.jsx)(L,{children:r("Export")}),(0,s.jsx)(L,{children:r("Queue")}),(0,s.jsx)(L,{children:r("Mode")}),(0,s.jsx)(L,{children:r("Binding")}),(0,s.jsx)(L,{children:r("Dead-letter")})]})}),(0,s.jsxs)(Je,{children:[l.map(Et),[...d].map(p=>{let[f,x]=p;return(0,s.jsxs)(M.Fragment,{children:[(0,s.jsx)(H,{className:"bg-muted/40","data-testid":`queues-topic-${f}`,children:(0,s.jsx)(S,{className:"text-xs font-medium",colSpan:5,children:r("Topic {topic} \xB7 {count} subscriptions",{count:x.length,topic:f})})}),x.map(Mt)]},f)})]})]})})})]}),e[0]=t,e[1]=o,e[2]=r,e[3]=a}else a=e[3];return a},"qt"),Ct=c(n=>{let e=(0,$.c)(67),{message:t,onReplay:o,replayingId:r}=n,a=O(),l,d,i,u,p,f,x,m,h,N;if(e[0]!==t.attempts||e[1]!==t.body||e[2]!==t.deadLettered||e[3]!==t.exportName||e[4]!==t.id||e[5]!==t.messageId||e[6]!==t.outcome||e[7]!==t.queue||e[8]!==a){let R=Nt(t.body);d=H,f=`queues-message-${t.id}`;let _=t.exportName??t.queue;e[19]!==_?(x=(0,s.jsx)(S,{className:"font-mono text-xs",children:_}),e[19]=_,e[20]=x):x=e[20],e[21]!==t.messageId?(m=(0,s.jsx)(S,{className:"max-w-[16ch] truncate font-mono text-xs text-muted-foreground",title:t.messageId,children:t.messageId}),e[21]=t.messageId,e[22]=m):m=e[22],e[23]!==t.attempts?(h=(0,s.jsx)(S,{className:"font-mono text-xs tabular-nums",children:t.attempts}),e[23]=t.attempts,e[24]=h):h=e[24];let k=`queues-outcome-${t.id}`,w;e[25]!==t.outcome?(w=qt(t.outcome),e[25]=t.outcome,e[26]=w):w=e[26];let T;e[27]!==t.outcome||e[28]!==k||e[29]!==w?(T=(0,s.jsx)(ge,{"data-testid":k,variant:w,children:t.outcome}),e[27]=t.outcome,e[28]=k,e[29]=w,e[30]=T):T=e[30];let I;e[31]!==t.deadLettered||e[32]!==t.id||e[33]!==a?(I=t.deadLettered&&(0,s.jsx)(ge,{"data-testid":`queues-dlq-${t.id}`,variant:"destructive",children:a("DLQ")}),e[31]=t.deadLettered,e[32]=t.id,e[33]=a,e[34]=I):I=e[34],e[35]!==T||e[36]!==I?(N=(0,s.jsx)(S,{children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:[T,I]})}),e[35]=T,e[36]=I,e[37]=N):N=e[37],l=S,i="max-w-[32ch] truncate font-mono text-xs text-muted-foreground",u=R,p=bt(R),e[0]=t.attempts,e[1]=t.body,e[2]=t.deadLettered,e[3]=t.exportName,e[4]=t.id,e[5]=t.messageId,e[6]=t.outcome,e[7]=t.queue,e[8]=a,e[9]=l,e[10]=d,e[11]=i,e[12]=u,e[13]=p,e[14]=f,e[15]=x,e[16]=m,e[17]=h,e[18]=N}else l=e[9],d=e[10],i=e[11],u=e[12],p=e[13],f=e[14],x=e[15],m=e[16],h=e[17],N=e[18];let y;e[38]!==l||e[39]!==i||e[40]!==u||e[41]!==p?(y=(0,s.jsx)(l,{className:i,title:u,children:p}),e[38]=l,e[39]=i,e[40]=u,e[41]=p,e[42]=y):y=e[42];let b;e[43]!==t.capturedAt?(b=He(t.capturedAt,"\u2014"),e[43]=t.capturedAt,e[44]=b):b=e[44];let C;e[45]!==b?(C=(0,s.jsx)(S,{className:"text-xs text-muted-foreground tabular-nums",children:b}),e[45]=b,e[46]=C):C=e[46];let q=`queues-replay-${t.id}`,v=r!==null,E;e[47]!==t.id||e[48]!==r||e[49]!==a?(E=r===t.id?a("Replaying\u2026"):a("Replay"),e[47]=t.id,e[48]=r,e[49]=a,e[50]=E):E=e[50];let A;e[51]!==t.id||e[52]!==o||e[53]!==q||e[54]!==v||e[55]!==E?(A=(0,s.jsx)(S,{children:(0,s.jsx)(fe,{"data-id":t.id,"data-testid":q,disabled:v,onClick:o,size:"xs",type:"button",variant:"outline",children:E})}),e[51]=t.id,e[52]=o,e[53]=q,e[54]=v,e[55]=E,e[56]=A):A=e[56];let D;return e[57]!==d||e[58]!==C||e[59]!==A||e[60]!==f||e[61]!==x||e[62]!==m||e[63]!==h||e[64]!==N||e[65]!==y?(D=(0,s.jsxs)(d,{"data-testid":f,children:[x,m,h,N,y,C,A]}),e[57]=d,e[58]=C,e[59]=A,e[60]=f,e[61]=x,e[62]=m,e[63]=h,e[64]=N,e[65]=y,e[66]=D):D=e[66],D},"St"),wt=c(n=>{let e=(0,$.c)(29),{hasError:t,messages:o,onClear:r,onReplay:a,replayingId:l}=n,d=O(),i;e[0]!==d?(i=d("Cloudflare Queues have no peek API, so this is what push consumers actually processed \u2014 not pending depth."),e[0]=d,e[1]=i):i=e[1];let u;e[2]!==i?(u=(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:i}),e[2]=i,e[3]=u):u=e[3];let p;e[4]!==d?(p=d("Clear the whole message log?"),e[4]=d,e[5]=p):p=e[5];let f=o.length===0,x;e[6]!==d?(x=d("Clear log"),e[6]=d,e[7]=x):x=e[7];let m;e[8]!==r||e[9]!==p||e[10]!==f||e[11]!==x?(m=(0,s.jsx)("div",{className:"ml-auto",children:(0,s.jsx)(Ze,{confirmLabel:p,disabled:f,onConfirm:r,testId:"queues-clear",children:x})}),e[8]=r,e[9]=p,e[10]=f,e[11]=x,e[12]=m):m=e[12];let h;e[13]!==o.length||e[14]!==d?(h=o.length>0&&(0,s.jsx)(ge,{"data-testid":"queues-count",variant:"secondary",children:d("{count} messages",{count:o.length})}),e[13]=o.length,e[14]=d,e[15]=h):h=e[15];let N;e[16]!==u||e[17]!==m||e[18]!==h?(N=(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[u,m,h]}),e[16]=u,e[17]=m,e[18]=h,e[19]=N):N=e[19];let y;e[20]!==t||e[21]!==o||e[22]!==a||e[23]!==l||e[24]!==d?(y=!t&&o.length===0?(0,s.jsx)(xe,{description:d("Consumed messages appear here once a push consumer processes a batch in dev. Send one from the Send tab to see it captured."),testId:"queues-messages-empty",title:d("No consumed messages yet.")}):(0,s.jsx)(Be,{className:"overflow-hidden py-0",children:(0,s.jsx)(Oe,{className:"px-0",children:(0,s.jsx)(st,{className:"max-h-[32rem]","data-testid":"queues-messages-scroll",children:(0,s.jsxs)(Re,{"data-testid":"queues-messages-table",children:[(0,s.jsx)(_e,{children:(0,s.jsxs)(H,{children:[(0,s.jsx)(L,{children:d("Export")}),(0,s.jsx)(L,{children:d("Message")}),(0,s.jsx)(L,{children:d("Attempts")}),(0,s.jsx)(L,{children:d("Outcome")}),(0,s.jsx)(L,{children:d("Body")}),(0,s.jsx)(L,{children:d("Captured")}),(0,s.jsx)(L,{})]})}),(0,s.jsx)(Je,{children:o.map(C=>(0,s.jsx)(Ct,{message:C,onReplay:a,replayingId:l},C.id))})]})})})}),e[20]=t,e[21]=o,e[22]=a,e[23]=l,e[24]=d,e[25]=y):y=e[25];let b;return e[26]!==N||e[27]!==y?(b=(0,s.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"queues-messages",children:[N,y]}),e[26]=N,e[27]=y,e[28]=b):b=e[28],b},"Et"),It=c(n=>{let e=(0,$.c)(20),{batchMode:t,bodyText:o,delayText:r,onBatchModeChange:a,onBodyChange:l,onDelayChange:d,onSelectExport:i,onSend:u,queues:p,selectedExportName:f,sending:x}=n,m=O(),h;e[0]!==m?(h=m("Enqueue a JSON message to a declared producer to exercise its consumer. Nothing is captured until the consumer processes it."),e[0]=m,e[1]=h):h=e[1];let N;e[2]!==h?(N=(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:h}),e[2]=h,e[3]=N):N=e[3];let y;e[4]!==t||e[5]!==o||e[6]!==r||e[7]!==a||e[8]!==l||e[9]!==d||e[10]!==i||e[11]!==u||e[12]!==p||e[13]!==f||e[14]!==x||e[15]!==m?(y=p.length===0?(0,s.jsx)(xe,{description:m("Declare a queue with defineQueue in lunora/queues.ts to enqueue a test message."),testId:"queues-send-empty",title:m("No queues to send to")}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)("select",{"aria-label":m("Queue"),className:"h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50","data-testid":"queues-send-select",onChange:i,value:f,children:[p.map(At),[...je(p).topics].map(C=>{let[q,v]=C;return(0,s.jsx)("option",{value:rt(q),children:m("{topic} (topic \u2192 {count} subscriptions)",{count:v.length,topic:q})},q)})]}),(0,s.jsx)(Ve,{"aria-label":m("Delay (seconds)"),className:"max-w-36","data-testid":"queues-send-delay",min:0,onChange:d,placeholder:m("Delay (s)"),type:"number",value:r}),(0,s.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",htmlFor:"queues-send-batch",children:[(0,s.jsx)("input",{checked:t,"data-testid":"queues-send-batch",id:"queues-send-batch",onChange:a,type:"checkbox"}),m("Send as batch (JSON array)")]}),(0,s.jsx)(fe,{className:"ml-auto","data-testid":"queues-send-button",disabled:x||f==="",onClick:u,type:"button",children:m(x?"Sending\u2026":"Send message")})]}),(0,s.jsx)(et,{"aria-label":m("Message body (JSON)"),className:"font-mono","data-testid":"queues-send-body",onChange:l,placeholder:t?'[ { "hello": "world" } ]':'{ "hello": "world" }',value:o})]}),e[4]=t,e[5]=o,e[6]=r,e[7]=a,e[8]=l,e[9]=d,e[10]=i,e[11]=u,e[12]=p,e[13]=f,e[14]=x,e[15]=m,e[16]=y):y=e[16];let b;return e[17]!==N||e[18]!==y?(b=(0,s.jsxs)("div",{className:"flex flex-col gap-3","data-testid":"queues-send",children:[N,y]}),e[17]=N,e[18]=y,e[19]=b):b=e[19],b},"Tt"),Qt=c((n,e,t,o)=>{let r=null,a=n.trim();if(a!=="")try{r=JSON.parse(a)}catch{return{error:o("Body must be valid JSON.")}}let l,d=e.trim();if(d!==""){let i=Number(d);if(!Number.isFinite(i)||i<0)return{error:o("Delay must be a non-negative number of seconds.")};l=i}return t&&!Array.isArray(r)?{error:o("Batch mode needs a JSON array body \u2014 each element is enqueued as one message.")}:{body:r,delaySeconds:l}},"Ct"),Lt=c(n=>{let e=(0,$.c)(11),{deadLetteredCount:t,queuesWithoutDlq:o}=n,r=O(),a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,s.jsx)("span",{"aria-hidden":"true",className:"text-base leading-none",children:"\u26A0"}),e[0]=a):a=e[0];let l;e[1]!==o||e[2]!==r?(l=o.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"font-medium",children:r("No dead-letter queue on {queues}.",{queues:o.map(Tt).join(", ")})}),(0,s.jsx)("p",{className:"text-muted-foreground",children:r("Exhausted messages are dropped after retries. Add a deadLetterQueue to capture them.")})]}),e[1]=o,e[2]=r,e[3]=l):l=e[3];let d;e[4]!==t||e[5]!==o.length||e[6]!==r?(d=t>0&&(0,s.jsx)("p",{className:o.length>0?"text-muted-foreground":"font-medium",children:t===1?r("1 message was recently dead-lettered."):r("{count} messages were recently dead-lettered.",{count:t})}),e[4]=t,e[5]=o.length,e[6]=r,e[7]=d):d=e[7];let i;return e[8]!==l||e[9]!==d?(i=(0,s.jsx)(Xe,{icon:a,testId:"queues-dlq-warning",variant:"warning",children:(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[l,d]})}),e[8]=l,e[9]=d,e[10]=i):i=e[10],i},"_t"),Zt=c(n=>{let e=(0,$.c)(76),{limit:t}=n,o=t??ht,r=Ke(),a=O(),[l,d]=(0,M.useState)("declared"),[i,u]=(0,M.useState)(null),p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={},e[0]=p):p=e[0];let{data:f,error:x,errorSource:m}=ke(G.listQueues,p),h;e[1]!==o?(h={limit:o},e[1]=o,e[2]=h):h=e[2];let{data:N,error:y,errorSource:b,poll:C,refetch:q}=ke(G.getQueueMessages,h),v=Array.isArray(f?.queues)?[...f.queues].toSorted(Dt):[],E=N?.entries??[],{deadLetteredCount:A,queuesWithoutDlq:D,showReliabilityWarning:R}=mt(v,E),[_,k]=(0,M.useState)(""),[w,T]=(0,M.useState)(""),[I,ye]=(0,M.useState)(""),[B,Ne]=(0,M.useState)(!1),[be,V]=(0,M.useState)(!1),[qe,X]=(0,M.useState)(null),{topics:Y}=je(v),Fe=[...v.map($t),...[...Y.keys()].map(kt)],J=Fe.includes(_)?_:Fe[0]??"",ze=l==="messages"?y:x,ot=l==="messages"?b:m,ve=ze??i,Se=ze===null?i:ot;tt(C,l==="messages");let Z;e[3]!==B||e[4]!==w||e[5]!==r||e[6]!==I||e[7]!==q||e[8]!==J||e[9]!==V||e[10]!==a||e[11]!==Y?(Z=c(async()=>{u(null);let g=J;if(g==="")return;let Q=Qt(w,I,B,a);if("error"in Q){u(Q.error);return}let{body:Pe,delaySeconds:Ue}=Q;V(!0);let lt=pt(g,Y).map(ce=>B?{batch:Pe,delaySeconds:Ue,exportName:ce}:{body:Pe,delaySeconds:Ue,exportName:ce});try{u(await ft(r,lt,a)),q()}catch(ce){u(K(ce))}V(!1)},"K"),e[3]=B,e[4]=w,e[5]=r,e[6]=I,e[7]=q,e[8]=J,e[9]=V,e[10]=a,e[11]=Y,e[12]=Z):Z=e[12];let Ce=Z,ee;e[13]!==r||e[14]!==q||e[15]!==X?(ee=c(async g=>{u(null),X(g);try{await r.query(xt,{id:g},pe("")),q()}catch(Q){u(K(Q))}X(null)},"Z"),e[13]=r,e[14]=q,e[15]=X,e[16]=ee):ee=e[16];let we=ee,te;e[17]!==r||e[18]!==q?(te=c(async()=>{u(null);try{await r.query(yt,{},pe("")),q()}catch(g){u(K(g))}},"ee"),e[17]=r,e[18]=q,e[19]=te):te=e[19];let Ie=te,se;e[20]===Symbol.for("react.memo_cache_sentinel")?(se=c(g=>{let Q=g.currentTarget.dataset.tab;(Q==="declared"||Q==="messages"||Q==="send")&&d(Q)},"te"),e[20]=se):se=e[20];let dt=se,ae;e[21]!==k?(ae=c(g=>{k(g.currentTarget.value)},"se"),e[21]=k,e[22]=ae):ae=e[22];let Qe=ae,re;e[23]!==T?(re=c(g=>{T(g.currentTarget.value)},"re"),e[23]=T,e[24]=re):re=e[24];let Le=re,ne;e[25]!==ye?(ne=c(g=>{ye(g.currentTarget.value)},"ae"),e[25]=ye,e[26]=ne):ne=e[26];let Ee=ne,oe;e[27]!==Ne?(oe=c(g=>{Ne(g.currentTarget.checked)},"ne"),e[27]=Ne,e[28]=oe):oe=e[28];let Me=oe,de;e[29]!==Ce?(de=c(()=>{he(Ce())},"oe"),e[29]=Ce,e[30]=de):de=e[30];let Ae=de,le;e[31]!==we?(le=c(g=>{let{id:Q}=g.currentTarget.dataset;Q!==void 0&&he(we(Q))},"le"),e[31]=we,e[32]=le):le=e[32];let Te=le,ie;e[33]!==Ie?(ie=c(()=>{he(Ie())},"ie"),e[33]=Ie,e[34]=ie):ie=e[34];let De=ie,W;e[35]!==a||e[36]!==l?(W=(0,s.jsx)("div",{className:"flex items-center gap-1","data-testid":"queues-tabs",role:"tablist",children:["declared","messages","send"].map(g=>(0,s.jsx)(fe,{"aria-selected":l===g,"data-tab":g,"data-testid":`queues-tab-${g}`,onClick:dt,role:"tab",size:"sm",type:"button",variant:l===g?"secondary":"ghost",children:vt(g,a)},g))}),e[35]=a,e[36]=l,e[37]=W):W=e[37];let j;e[38]!==ve||e[39]!==Se?(j=ve!==null&&(0,s.jsx)(Ye,{error:Se,testId:"queues-error"}),e[38]=ve,e[39]=Se,e[40]=j):j=e[40];let F;e[41]!==A||e[42]!==D||e[43]!==R?(F=R&&(0,s.jsx)(Lt,{deadLetteredCount:A,queuesWithoutDlq:D}),e[41]=A,e[42]=D,e[43]=R,e[44]=F):F=e[44];let z;e[45]!==v||e[46]!==f||e[47]!==l?(z=l==="declared"&&(0,s.jsx)(St,{loaded:f!==void 0,queues:v}),e[45]=v,e[46]=f,e[47]=l,e[48]=z):z=e[48];let P;e[49]!==E||e[50]!==y||e[51]!==De||e[52]!==Te||e[53]!==qe||e[54]!==l?(P=l==="messages"&&(0,s.jsx)(wt,{hasError:y!==null,messages:E,onClear:De,onReplay:Te,replayingId:qe}),e[49]=E,e[50]=y,e[51]=De,e[52]=Te,e[53]=qe,e[54]=l,e[55]=P):P=e[55];let U;e[56]!==B||e[57]!==w||e[58]!==I||e[59]!==Me||e[60]!==Le||e[61]!==Ee||e[62]!==Qe||e[63]!==Ae||e[64]!==v||e[65]!==J||e[66]!==be||e[67]!==l?(U=l==="send"&&(0,s.jsx)(It,{batchMode:B,bodyText:w,delayText:I,onBatchModeChange:Me,onBodyChange:Le,onDelayChange:Ee,onSelectExport:Qe,onSend:Ae,queues:v,selectedExportName:J,sending:be}),e[56]=B,e[57]=w,e[58]=I,e[59]=Me,e[60]=Le,e[61]=Ee,e[62]=Qe,e[63]=Ae,e[64]=v,e[65]=J,e[66]=be,e[67]=l,e[68]=U):U=e[68];let ue;return e[69]!==W||e[70]!==j||e[71]!==F||e[72]!==z||e[73]!==P||e[74]!==U?(ue=(0,s.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-queues-panel",children:[W,j,F,z,P,U]}),e[69]=W,e[70]=j,e[71]=F,e[72]=z,e[73]=P,e[74]=U,e[75]=ue):ue=e[75],ue},"ts");function Et(n){return(0,s.jsx)(nt,{queue:n},n.exportName)}c(Et,"vt");function Mt(n){return(0,s.jsx)(nt,{queue:n},n.exportName)}c(Mt,"wt");function At(n){return(0,s.jsx)("option",{value:n.exportName,children:n.exportName},n.exportName)}c(At,"Qt");function Tt(n){return n.name}c(Tt,"At");function Dt(n,e){return n.exportName.localeCompare(e.exportName)}c(Dt,"It");function $t(n){return n.exportName}c($t,"Mt");function kt(n){return rt(n)}c(kt,"Lt");export{Zt as default};
@@ -0,0 +1 @@
1
+ import{a as R}from"./chunk-2W4UO5BC.js";import{c as K}from"./chunk-FBDIQ67D.js";import{a as N}from"./chunk-GWNGVKLG.js";import{a as C,b as F}from"./chunk-6G3E4PJ2.js";import{a as o,d as A}from"./chunk-5PEAXTYQ.js";var b=A(N(),1),u=A(C(),1);var S=A(F(),1);var x=(0,u.createContext)(void 0),w={},T="New chat",j=o((n,s)=>({id:n,name:s?.title??T,schema:s?.schema??[],shardKey:s?.shardKey,suggestions:s?.suggestions??[],turns:[]}),"F"),D=o((n,s)=>[...n.sessions,s].slice(-10),"T"),m=o((n,s)=>{let a=`chat-${String(n.seq+1)}`;return{activeId:a,draft:s?.draft===void 0?void 0:{id:n.seq+1,text:s.draft},hasEditor:n.hasEditor,insertRequest:void 0,open:!0,pendingAsk:s?.ask===void 0?void 0:{id:n.seq+1,sessionId:a,text:s.ask},seq:n.seq+1,sessions:D(n,j(a,s))}},"f"),v=o((n,s)=>n.find(a=>a.id===s),"l"),O=o((n,s,a)=>n.map(c=>c.id===s?{...c,schema:a}:c),"D"),U=o((n,s,a)=>n.map(c=>c.id===s?{...c,schema:[],shardKey:a}:c),"O"),$=o((n,s)=>n.filter(a=>a.id!==s),"U"),E=o((n,s,a)=>n.map(c=>c.id===s?{...c,turns:a}:c),"y"),z=o(n=>{let s=(0,b.c)(16),{children:a}=n,c;s[0]===Symbol.for("react.memo_cache_sentinel")?(c={shardKey:""},s[0]=c):c=s[0];let _=K(R.aiAvailable,w,c),l;s[1]===Symbol.for("react.memo_cache_sentinel")?(l={activeId:void 0,draft:void 0,hasEditor:!1,insertRequest:void 0,open:!1,pendingAsk:void 0,seq:0,sessions:[]},s[1]=l):l=s[1];let[d,h]=(0,u.useState)(l),p;s[2]===Symbol.for("react.memo_cache_sentinel")?(p=o(()=>({close:o(()=>{h(H)},"close"),deleteChat:o(t=>{h(e=>{let i=$(e.sessions,t);return{...e,activeId:e.activeId===t?i.at(-1)?.id:e.activeId,open:i.length===0?!1:e.open,sessions:i}})},"deleteChat"),newChat:o(t=>{h(e=>m(e,t))},"newChat"),openAssistant:o(t=>{h(e=>{let i=e.activeId===void 0?void 0:v(e.sessions,e.activeId);return t?.ask!==void 0||i===void 0||(t?.shardKey??"")!==(i.shardKey??"")?m(e,t):{...e,draft:t?.draft===void 0?e.draft:{id:e.seq+1,text:t.draft},open:!0,sessions:t?.schema===void 0?e.sessions:O(e.sessions,i.id,t.schema),seq:e.seq+1}})},"openAssistant"),rebindShard:o((t,e)=>{h(i=>{let r=i.activeId===void 0?void 0:v(i.sessions,i.activeId);return!i.open||r===void 0||(r.shardKey??"")!==t||t===e?i:r.turns.length===0?{...i,sessions:U(i.sessions,r.id,e)}:m(i,{shardKey:e,title:r.name})})},"rebindShard"),requestInsert:o(t=>{h(e=>({...e,insertRequest:{id:e.seq+1,sql:t},seq:e.seq+1}))},"requestInsert"),setHasEditor:o(t=>{h(e=>e.hasEditor===t?e:{...e,hasEditor:t})},"setHasEditor"),takeInsert:o(t=>{h(e=>e.insertRequest?.id===t?{...e,insertRequest:void 0}:e)},"takeInsert"),selectChat:o(t=>{h(e=>({...e,activeId:t,open:!0}))},"selectChat"),branchFrom:o((t,e)=>{h(i=>{let r=v(i.sessions,t);if(r===void 0)return i;let y=m(i,{schema:r.schema,shardKey:r.shardKey,title:r.name});return{...y,sessions:E(y.sessions,y.activeId??"",r.turns.slice(0,e+1))}})},"branchFrom"),setTurns:o((t,e)=>{h(i=>{let r=v(i.sessions,t);return r===void 0?i:{...i,sessions:E(i.sessions,t,typeof e=="function"?e(r.turns):e)}})},"setTurns"),toggle:o(()=>{h(M)},"toggle"),truncateFrom:o((t,e)=>{h(i=>{let r=v(i.sessions,t);return r===void 0?i:{...i,sessions:E(i.sessions,t,r.turns.slice(0,e))}})},"truncateFrom"),takeAsk:o(t=>{h(e=>e.pendingAsk?.id===t?{...e,pendingAsk:void 0}:e)},"takeAsk")}),"c"),s[2]=p):p=s[2];let[I]=(0,u.useState)(p),g=_.data?.available!==!0,f;s[3]!==I||s[4]!==d.activeId||s[5]!==d.draft||s[6]!==d.hasEditor||s[7]!==d.insertRequest||s[8]!==d.open||s[9]!==d.pendingAsk||s[10]!==d.sessions||s[11]!==g?(f={...I,activeId:d.activeId,draft:d.draft,hasEditor:d.hasEditor,insertRequest:d.insertRequest,open:d.open,pendingAsk:d.pendingAsk,sessions:d.sessions,unavailable:g},s[3]=I,s[4]=d.activeId,s[5]=d.draft,s[6]=d.hasEditor,s[7]=d.insertRequest,s[8]=d.open,s[9]=d.pendingAsk,s[10]=d.sessions,s[11]=g,s[12]=f):f=s[12];let k=f,q;return s[13]!==a||s[14]!==k?(q=(0,S.jsx)(x,{value:k,children:a}),s[13]=a,s[14]=k,s[15]=q):q=s[15],q},"P"),B=o(()=>(0,u.use)(x),"Q");function H(n){return{...n,open:!1}}o(H,"$");function M(n){return!n.open&&n.activeId===void 0?m(n,void 0):{...n,open:!n.open}}o(M,"j");export{z as a,B as b};
@@ -0,0 +1 @@
1
+ import{a as M,c as O,e as S,i as E}from"./chunk-UD5REVU2.js";import{a as I,b as B,c as U}from"./chunk-T3ZCW3RG.js";import{a as w}from"./chunk-6G3E4PJ2.js";import{a as s,d as k}from"./chunk-5PEAXTYQ.js";var f=k(w(),1);var g=k(w(),1);var z=g.createContext(void 0);function W(o=!1){let t=g.useContext(z);if(t===void 0&&!o)throw new Error(U(16));return t}s(W,"useCompositeRootContext");var H=k(w(),1);function A(o){let{focusableWhenDisabled:t,disabled:r,composite:l=!1,tabIndex:n=0,isNativeButton:u}=o,d=l&&t!==!1,b=l&&t===!1;return{props:H.useMemo(()=>{let a={onKeyDown(p){r&&t&&p.key!=="Tab"&&p.preventDefault()}};return l||(a.tabIndex=n,!u&&r&&(a.tabIndex=t?n:-1)),(u&&(t||d)||!u&&r)&&(a["aria-disabled"]=r),u&&(!t||b)&&(a.disabled=r),a},[l,r,t,d,b,u,n])}}s(A,"useFocusableWhenDisabled");function h(o,t,{detail:r=0}={}){o.dispatchEvent(new(S(o)).PointerEvent("click",{bubbles:!0,cancelable:!0,composed:!0,detail:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}s(h,"dispatchClickWithModifiers");function le(o={}){let{disabled:t=!1,focusableWhenDisabled:r,tabIndex:l=0,native:n=!0,composite:u}=o,d=f.useRef(null),b=W(!0),i=u??b!==void 0,{props:a}=A({focusableWhenDisabled:r,disabled:t,composite:i,tabIndex:l,isNativeButton:n}),p=f.useCallback(()=>{let c=d.current;K(c)&&i&&t&&a.disabled===void 0&&c.disabled&&(c.disabled=!1)},[t,a.disabled,i]);M(p,[p]);let F=f.useCallback((c={})=>{let{onClick:x,onMouseDown:C,onKeyUp:V,onKeyDown:_,onPointerDown:$,...v}=c;return I({onClick(e){if(t){e.preventDefault();return}x?.(e)},onMouseDown(e){t||C?.(e)},onKeyDown(e){if(t||(B(e),_?.(e),e.baseUIHandlerPrevented))return;let R=e.target===e.currentTarget,m=e.currentTarget,P=K(m),N=!n&&G(m),j=R&&(n?P:!N),T=e.key==="Enter",y=e.key===" ",D=m.getAttribute("role"),q=D?.startsWith("menuitem")||D==="option"||D==="gridcell";if(R&&i&&y){if(e.defaultPrevented&&q)return;e.preventDefault(),(!n||P)&&(e.preventBaseUIHandler(),h(m,e));return}if(!j||n||!y&&!T){R&&N&&y&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),T&&(e.preventBaseUIHandler(),h(m,e)))},onKeyUp(e){if(!t){if(B(e),V?.(e),e.target===e.currentTarget&&n&&i&&K(e.currentTarget)&&e.key===" "){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!n&&!i&&!e.defaultPrevented&&e.key===" "&&(e.preventBaseUIHandler(),h(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}$?.(e)}},n?{type:"button"}:{role:"button"},a,v)},[t,a,i,n]),L=O(c=>{d.current=c,p()});return{getButtonProps:F,buttonRef:L}}s(le,"useButton");function K(o){return E(o)&&o.tagName==="BUTTON"}s(K,"isButtonElement");function G(o){return E(o)&&o.tagName==="A"&&!!o.href}s(G,"isValidLinkElement");export{W as a,h as b,le as c};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-OXFKZ4BM.js";var v=new Set(["contains","eq","gt","gte","has","lt","lte","ne"]),a=s(r=>typeof r=="number"&&Number.isSafeInteger(r)?String(r):r,"i"),n=s(r=>{if(typeof r!="string")return;let e=r.trim();return e===""?void 0:e},"s"),p=s(r=>{if(r===null||typeof r!="object")return!1;let e=r,o=e.path===void 0||Array.isArray(e.path)&&e.path.every(i=>typeof i=="string");return typeof e.column=="string"&&typeof e.operator=="string"&&v.has(e.operator)&&o},"g"),f=s(r=>{if(typeof r!="string"||r==="")return[];try{let e=JSON.parse(r);return Array.isArray(e)?e.filter(p):[]}catch{return[]}},"f"),g=s(r=>{if(typeof r!="string"||r==="")return;let e=r.lastIndexOf(":");if(e<=0)return;let o=r.slice(0,e),i=r.slice(e+1);if(!(i!=="asc"&&i!=="desc"))return{column:o,direction:i}},"p"),u=/^[\da-f]{16}$/u,y=s(r=>{let e={};if(typeof r.pins=="string"&&r.pins!==""){let c=r.pins.split(",").filter(h=>h!==""&&h.length<=64).slice(0,12);c.length>0&&(e.pins=c.join(","))}r.schema==="global"&&(e.schema="global");let o=n(r.table);o!==void 0&&(e.table=o);let i=n(a(r.shard));i!==void 0&&(e.shard=i);let d=n(a(r.search));d!==void 0&&(e.search=d);let t=n(r.order);t!==void 0&&g(t)!==void 0&&(e.order=t);let l=n(r.filters);return l!==void 0&&f(l).length>0&&(e.filters=l),e},"y"),b=s(r=>{let e=f(r.filters),o=g(r.order);return{filters:e.length>0?e:void 0,orderBy:o,search:n(a(r.search)),shard:n(a(r.shard)),table:n(r.table),tier:r.schema==="global"?"global":"shard"}},"b"),m=s(r=>{let e=r.filters??[];return{filters:e.length>0?JSON.stringify(e):void 0,order:r.orderBy===void 0?void 0:`${r.orderBy.column}:${r.orderBy.direction}`,schema:r.tier==="global"?"global":void 0,search:r.search!==void 0&&r.search!==""?r.search:void 0,shard:r.shard!==void 0&&r.shard!==""?r.shard:void 0,table:r.table!==void 0&&r.table!==""?r.table:void 0}},"v"),S=s(r=>{let{version:e}=r;return typeof e=="string"&&u.test(e)?{version:e}:{}},"S");export{y as a,b,m as c,S as d};
1
+ import{a as s}from"./chunk-5PEAXTYQ.js";var v=new Set(["contains","eq","gt","gte","has","lt","lte","ne"]),a=s(r=>typeof r=="number"&&Number.isSafeInteger(r)?String(r):r,"i"),n=s(r=>{if(typeof r!="string")return;let e=r.trim();return e===""?void 0:e},"s"),p=s(r=>{if(r===null||typeof r!="object")return!1;let e=r,o=e.path===void 0||Array.isArray(e.path)&&e.path.every(i=>typeof i=="string");return typeof e.column=="string"&&typeof e.operator=="string"&&v.has(e.operator)&&o},"g"),f=s(r=>{if(typeof r!="string"||r==="")return[];try{let e=JSON.parse(r);return Array.isArray(e)?e.filter(p):[]}catch{return[]}},"f"),g=s(r=>{if(typeof r!="string"||r==="")return;let e=r.lastIndexOf(":");if(e<=0)return;let o=r.slice(0,e),i=r.slice(e+1);if(!(i!=="asc"&&i!=="desc"))return{column:o,direction:i}},"p"),u=/^[\da-f]{16}$/u,y=s(r=>{let e={};if(typeof r.pins=="string"&&r.pins!==""){let c=r.pins.split(",").filter(h=>h!==""&&h.length<=64).slice(0,12);c.length>0&&(e.pins=c.join(","))}r.schema==="global"&&(e.schema="global");let o=n(r.table);o!==void 0&&(e.table=o);let i=n(a(r.shard));i!==void 0&&(e.shard=i);let d=n(a(r.search));d!==void 0&&(e.search=d);let t=n(r.order);t!==void 0&&g(t)!==void 0&&(e.order=t);let l=n(r.filters);return l!==void 0&&f(l).length>0&&(e.filters=l),e},"y"),b=s(r=>{let e=f(r.filters),o=g(r.order);return{filters:e.length>0?e:void 0,orderBy:o,search:n(a(r.search)),shard:n(a(r.shard)),table:n(r.table),tier:r.schema==="global"?"global":"shard"}},"b"),m=s(r=>{let e=r.filters??[];return{filters:e.length>0?JSON.stringify(e):void 0,order:r.orderBy===void 0?void 0:`${r.orderBy.column}:${r.orderBy.direction}`,schema:r.tier==="global"?"global":void 0,search:r.search!==void 0&&r.search!==""?r.search:void 0,shard:r.shard!==void 0&&r.shard!==""?r.shard:void 0,table:r.table!==void 0&&r.table!==""?r.table:void 0}},"v"),S=s(r=>{let{version:e}=r;return typeof e=="string"&&u.test(e)?{version:e}:{}},"S");export{y as a,b,m as c,S as d};
@@ -0,0 +1 @@
1
+ import{i as D}from"./chunk-IHGRWY3Y.js";import"./chunk-OWRKSQPE.js";import"./chunk-4EPW63HS.js";import{a as B}from"./chunk-V3BE427M.js";import"./chunk-CKEQX655.js";import"./chunk-UD5REVU2.js";import{a as U}from"./chunk-RCXNYW7P.js";import{b as S}from"./chunk-UQA2AJGI.js";import"./chunk-T3ZCW3RG.js";import{a as q}from"./chunk-IUGNIG6L.js";import"./chunk-LSEUUZN4.js";import{a as G,b as J,c as K,d as F,e as s,f as o}from"./chunk-7QEZ2SFW.js";import"./chunk-WCWP4EAW.js";import"./chunk-BX7TFVCC.js";import"./chunk-4PI2OSSP.js";import{a as V}from"./chunk-2W4UO5BC.js";import{c as R}from"./chunk-FBDIQ67D.js";import{a as H,e as O}from"./chunk-OK2QU2EV.js";import"./chunk-FACXM2UB.js";import"./chunk-ZPQBVYNN.js";import{B as W,w as P}from"./chunk-GNI37YCV.js";import"./chunk-PDBW6GTJ.js";import{a as ae}from"./chunk-GWNGVKLG.js";import{a as re,b as ie}from"./chunk-6G3E4PJ2.js";import{a as n,d as j}from"./chunk-5PEAXTYQ.js";var X=j(ae(),1),M=j(re(),1);var t=j(ie(),1);var ne=n(e=>e==="ok"?"success":e==="failed"?"destructive":e==="expired"?"warning":"secondary","te"),Q=n(e=>e.endpoint??e.id,"M"),ve=n(()=>{let e=(0,X.c)(38),r=W(),[i,Y]=(0,M.useState)("all"),[l,Z]=(0,M.useState)(""),g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={},e[0]=g):g=e[0];let{data:I,error:d,errorSource:x,isLoading:_,refetch:v}=R(V.listPushSubscriptions,g),N;if(e[1]!==I?.subscriptions||e[2]!==d||e[3]!==x||e[4]!==_||e[5]!==i||e[6]!==v||e[7]!==l||e[8]!==r){let L=I?.subscriptions??[],T=l.trim().toLowerCase(),A=L.filter(a=>i!=="all"&&a.kind!==i?!1:T===""?!0:`${Q(a)} ${a.userId??""}`.toLowerCase().includes(T)),b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b=n(a=>{Z(a.target.value)},"w"),e[10]=b):b=e[10];let ee=b,w;e[11]!==v?(w=n(()=>{v()},"y"),e[11]=v,e[12]=w):w=e[12];let E=w,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k=["all","web-push","fcm"],e[13]=k):k=e[13];let te=k,c;e[14]!==i||e[15]!==r?(c=(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"nt-kind-filter",role:"tablist",children:te.map(a=>(0,t.jsx)(B,{"aria-selected":i===a,"data-testid":`nt-kind-${a}`,onClick:n(()=>{Y(a)},"onClick"),role:"tab",size:"sm",type:"button",variant:i===a?"secondary":"ghost",children:a==="all"?r("All"):a},a))}),e[14]=i,e[15]=r,e[16]=c):c=e[16];let m;e[17]!==r?(m=r("Filter devices"),e[17]=r,e[18]=m):m=e[18];let h;e[19]!==r?(h=r("filter endpoint, user"),e[19]=r,e[20]=h):h=e[20];let u;e[21]!==l||e[22]!==m||e[23]!==h?(u=(0,t.jsx)(D,{"aria-label":m,className:"h-8 w-56","data-testid":"nt-search",onChange:ee,placeholder:h,value:l}),e[21]=l,e[22]=m,e[23]=h,e[24]=u):u=e[24];let f;e[25]!==r?(f=r("Refresh"),e[25]=r,e[26]=f):f=e[26];let p;e[27]!==E||e[28]!==f?(p=(0,t.jsx)(B,{className:"ml-auto","data-testid":"nt-refresh",onClick:E,size:"sm",type:"button",variant:"outline",children:f}),e[27]=E,e[28]=f,e[29]=p):p=e[29];let $=L.length>0&&(0,t.jsx)(S,{"data-testid":"nt-count",variant:"secondary",children:r("{count} devices",{count:L.length})}),y;e[30]!==p||e[31]!==$||e[32]!==c||e[33]!==u?(y=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c,u,p,$]}),e[30]=p,e[31]=$,e[32]=c,e[33]=u,e[34]=y):y=e[34];let C;e[35]!==d||e[36]!==x?(C=d!==null&&(0,t.jsx)(q,{error:x,testId:"nt-error"}),e[35]=d,e[36]=x,e[37]=C):C=e[37],N=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"lunora-notifications",children:[y,C,d===null&&!_&&A.length===0&&(0,t.jsx)(U,{description:r("Registered Web Push / FCM devices appear here. Configure lunora/notify.ts with defineNotify({ store }) and register a device with ctx.push.register(...)."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"})}),testId:"nt-empty",title:r("No registered devices.")}),A.length>0&&(0,t.jsx)(H,{className:"overflow-hidden py-0",children:(0,t.jsx)(O,{className:"max-h-[30rem] overflow-auto px-0",children:(0,t.jsxs)(G,{"data-testid":"nt-table",children:[(0,t.jsx)(J,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(s,{children:r("kind")}),(0,t.jsx)(s,{children:r("endpoint")}),(0,t.jsx)(s,{children:r("user")}),(0,t.jsx)(s,{children:r("last seen")}),(0,t.jsx)(s,{children:r("status")}),(0,t.jsx)(s,{children:r("error")})]})}),(0,t.jsx)(K,{children:A.map(a=>{let z=Q(a);return(0,t.jsxs)(F,{"data-testid":"nt-row",children:[(0,t.jsx)(o,{children:(0,t.jsx)(S,{variant:"outline",children:a.kind})}),(0,t.jsx)(o,{className:"max-w-[28ch] truncate font-mono text-xs",title:z,children:z}),(0,t.jsx)(o,{className:"max-w-[16ch] truncate font-mono text-xs",children:a.userId??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})}),(0,t.jsx)(o,{className:"text-muted-foreground tabular-nums",children:P(a.lastSeenAt,"\u2014")}),(0,t.jsx)(o,{children:(0,t.jsx)(S,{"data-testid":`nt-status-${a.id}`,variant:ne(a.lastStatus),children:a.lastStatus??r("n/a")})}),(0,t.jsx)(o,{className:"max-w-[28ch] truncate font-mono text-xs text-muted-foreground",title:a.lastError??void 0,children:a.lastError??(0,t.jsx)("span",{className:"text-muted-foreground",children:"\u2014"})})]},a.id)})})]})})})]}),e[1]=I?.subscriptions,e[2]=d,e[3]=x,e[4]=_,e[5]=i,e[6]=v,e[7]=l,e[8]=r,e[9]=N}else N=e[9];return N},"ge");export{ve as default};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-5PEAXTYQ.js";var s=o((e,t)=>t(e==="unsafe-response"?"The model returned a statement that is not read-only, so it was discarded.":e==="too-long"?"The statement is too long to rewrite. Select a shorter part of it.":e==="empty-response"?"The model returned nothing usable.":"The model could not be reached."),"o");export{s as a};
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk-6G3E4PJ2.js";import{a as e,d as c}from"./chunk-5PEAXTYQ.js";function d(n,o,r,i){return n.addEventListener(o,r,i),()=>{n.removeEventListener(o,r,i)}}e(d,"addEventListener");var t=c(s(),1);var x=t.createContext(void 0);function f(){return t.useContext(x)?.direction??"ltr"}e(f,"useDirection");export{d as a,f as b};