@harperfast/harper 5.2.14 → 5.2.15

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 (179) hide show
  1. package/dist/resources/analytics/write.d.ts +3 -0
  2. package/dist/resources/analytics/write.js +39 -13
  3. package/dist/resources/analytics/write.js.map +1 -1
  4. package/dist/security/keys.js +258 -66
  5. package/dist/security/keys.js.map +1 -1
  6. package/dist/server/threads/threadServer.d.ts +3 -0
  7. package/dist/server/threads/threadServer.js +24 -6
  8. package/dist/server/threads/threadServer.js.map +1 -1
  9. package/npm-shrinkwrap.json +2 -2
  10. package/package.json +1 -1
  11. package/resources/analytics/write.ts +40 -14
  12. package/security/keys.ts +251 -66
  13. package/server/threads/threadServer.js +24 -6
  14. package/studio/web/assets/{Chat-C97PMlIn.js → Chat-CeEDA28S.js} +13 -13
  15. package/studio/web/assets/FloatingChat-J_P5KaR4.js +23 -0
  16. package/studio/web/assets/SearchDialog-BWMGseDd.js +1 -0
  17. package/studio/web/assets/{abnfDiagram-O67JEVCF-DpPZWMOf.js → abnfDiagram-O67JEVCF-raXE027J.js} +1 -1
  18. package/studio/web/assets/alertDialog-BbWD9Xxa.js +1 -0
  19. package/studio/web/assets/apiToken-BKot-xR5.js +1 -0
  20. package/studio/web/assets/applications-BlJChLsS.js +296 -0
  21. package/studio/web/assets/architecture-7GRP2DOG-DDmz3hpI.js +1 -0
  22. package/studio/web/assets/{architectureDiagram-NJMV4G6O-OmgLraID.js → architectureDiagram-NJMV4G6O-C8_Eet7w.js} +1 -1
  23. package/studio/web/assets/arrow-up-D2g_57vT.js +1 -0
  24. package/studio/web/assets/authStore-CJCaADw9.js +3 -0
  25. package/studio/web/assets/{blockDiagram-BEXU5L5S-Cv7CD3Ai.js → blockDiagram-BEXU5L5S-DR6S5-1D.js} +1 -1
  26. package/studio/web/assets/{button-MFP9n8Ck.js → button-DWwfgGWI.js} +2 -2
  27. package/studio/web/assets/{c4Diagram-YGBWAQC7-Ds1vKYnN.js → c4Diagram-YGBWAQC7-BAfZ1G01.js} +1 -1
  28. package/studio/web/assets/channel-D0AkPjJ8.js +1 -0
  29. package/studio/web/assets/{chevron-up-CFe8x5Bp.js → chevron-up-CFxbMGv2.js} +1 -1
  30. package/studio/web/assets/{chunk-3FUC2YCW-DpnBPH8B.js → chunk-3FUC2YCW-DuRp-j19.js} +1 -1
  31. package/studio/web/assets/{chunk-5DYCD2WN-LLLCQSzg.js → chunk-5DYCD2WN-BceBfIHT.js} +1 -1
  32. package/studio/web/assets/{chunk-742MDFTN-BL8J_pIO.js → chunk-742MDFTN-CIkt8ijt.js} +1 -1
  33. package/studio/web/assets/{chunk-7INBJB4K-C-hJHiiK.js → chunk-7INBJB4K-BpeAXyOi.js} +1 -1
  34. package/studio/web/assets/{chunk-7M6MHVWA-C6ZqkFbA.js → chunk-7M6MHVWA-h6WlaTzO.js} +1 -1
  35. package/studio/web/assets/{chunk-7PRAP22T-CUXM8BG6.js → chunk-7PRAP22T-KyqX6x3f.js} +1 -1
  36. package/studio/web/assets/{chunk-GTNCS2PH-DJ2BFvS1.js → chunk-GTNCS2PH-DGHLXyow.js} +1 -1
  37. package/studio/web/assets/{chunk-GWA4HPMP-C42bSqLL.js → chunk-GWA4HPMP-DsejB6gA.js} +1 -1
  38. package/studio/web/assets/{chunk-MBY4JIJT-C-5jz6Lo.js → chunk-MBY4JIJT-BwSGweQP.js} +1 -1
  39. package/studio/web/assets/{chunk-NETBCI7D-D-bzlN4r.js → chunk-NETBCI7D-C8UnOw_f.js} +1 -1
  40. package/studio/web/assets/{chunk-O7XYJQB3-ep14zA23.js → chunk-O7XYJQB3-CBS3nZYV.js} +1 -1
  41. package/studio/web/assets/{chunk-UA2S7LBM-BMRWRHED.js → chunk-UA2S7LBM-BHpEdH8D.js} +1 -1
  42. package/studio/web/assets/{chunk-WEXAMYUT-DdLYVdX1.js → chunk-WEXAMYUT-BAIhTwyh.js} +1 -1
  43. package/studio/web/assets/{chunk-Z7XXMR3K-BmKEDjcP.js → chunk-Z7XXMR3K-DSHbImdf.js} +1 -1
  44. package/studio/web/assets/{chunk-ZIGJFQKS-DLZgdNxA.js → chunk-ZIGJFQKS-Cs8fUn7y.js} +1 -1
  45. package/studio/web/assets/{classDiagram-v2-NBCMYWYE-DOI5vgKT.js → classDiagram-v2-NBCMYWYE-DmDPkt2u.js} +1 -1
  46. package/studio/web/assets/cn-6T8VranJ.js +1 -0
  47. package/studio/web/assets/{codicon-Brq4_Ui5.ttf → codicon-DF1abBS2.ttf} +0 -0
  48. package/studio/web/assets/{createLucideIcon-bziYxJli.js → createLucideIcon-fO5dL7D5.js} +1 -1
  49. package/studio/web/assets/{css.worker-l1psR_wG.js → css.worker-DoT-OOzx.js} +36 -36
  50. package/studio/web/assets/{cssMode-DyLZPMjo.js → cssMode-DjeA9Hx_.js} +1 -1
  51. package/studio/web/assets/{cynefin-OW5HDTMX-BSW-DB7S.js → cynefin-OW5HDTMX-DIvbXLSj.js} +1 -1
  52. package/studio/web/assets/{cynefinDiagram-VND7K2PF-CbAHEwxt.js → cynefinDiagram-VND7K2PF-BdtaXiCE.js} +1 -1
  53. package/studio/web/assets/{dagre-6A5THRUB-Csxewgs4.js → dagre-6A5THRUB-C7RUWHyz.js} +1 -1
  54. package/studio/web/assets/{diagram-22UHCM2B-a0rt8tY4.js → diagram-22UHCM2B-DJCvcaWP.js} +1 -1
  55. package/studio/web/assets/{diagram-3UASUU5V-lEj2SVNh.js → diagram-3UASUU5V-Du6VKWln.js} +1 -1
  56. package/studio/web/assets/{diagram-ATOU4E4O-HcrAeB-q.js → diagram-ATOU4E4O-dxRfeG4B.js} +1 -1
  57. package/studio/web/assets/{diagram-CDSNMT55-CYxiuyEx.js → diagram-CDSNMT55-l5Ga0u-W.js} +1 -1
  58. package/studio/web/assets/{diagram-MLGK6HIB-ChbCJTgJ.js → diagram-MLGK6HIB-CNQY47LA.js} +1 -1
  59. package/studio/web/assets/{diagram-MPIPVDR6-DaX9Y-N3.js → diagram-MPIPVDR6-7prveD1B.js} +1 -1
  60. package/studio/web/assets/{dist-Cz2Y6-6G.js → dist-BrRuMUzt.js} +1 -1
  61. package/studio/web/assets/{download-CtostjYn.js → download-Cn6tPG4L.js} +1 -1
  62. package/studio/web/assets/{ebnfDiagram-ZINNZB2B-CwAsENB1.js → ebnfDiagram-ZINNZB2B-5OnkTpfi.js} +1 -1
  63. package/studio/web/assets/{editor-CFQ5kbiT.js → editor-DKwRNgor.js} +1 -1
  64. package/studio/web/assets/editor.worker-Yd1NR0QT.js +33 -0
  65. package/studio/web/assets/{elk-276RUBZZ-Hexg9E4D.js → elk-276RUBZZ-DxDQPjQT.js} +1 -1
  66. package/studio/web/assets/{erDiagram-OPXOYQCR-CeC-wwO1.js → erDiagram-OPXOYQCR-CQlCX84D.js} +1 -1
  67. package/studio/web/assets/eventmodeling-NTZA5JFV-DONQf5aG.js +1 -0
  68. package/studio/web/assets/flowDiagram-KWPJA3E3-BoZ8_QR1.js +1 -0
  69. package/studio/web/assets/{ganttDiagram-FUAMR5RP-C2_Hhl1-.js → ganttDiagram-FUAMR5RP-bloX3Voy.js} +1 -1
  70. package/studio/web/assets/{getAnalytics-CjthMQqF.js → getAnalytics-C0FHjtdQ.js} +1 -1
  71. package/studio/web/assets/{gitGraph-4MIJSDKK-xIk5Vuew.js → gitGraph-4MIJSDKK-BrXWmJt2.js} +1 -1
  72. package/studio/web/assets/{gitGraphDiagram-X574FWY7-CMxJ34up.js → gitGraphDiagram-X574FWY7-C2KnnZeY.js} +1 -1
  73. package/studio/web/assets/{html-DdMBJEGu.js → html-KzEcNmGL.js} +1 -1
  74. package/studio/web/assets/{html.worker-DdwM4IrA.js → html.worker-B1dwY0Ay.js} +27 -27
  75. package/studio/web/assets/{htmlMode-DNtBx3OV.js → htmlMode-Bipij2Sy.js} +1 -1
  76. package/studio/web/assets/index-DMUQ34Jl.js +828 -0
  77. package/studio/web/assets/index-QLZw6xrU.css +1 -0
  78. package/studio/web/assets/index.lazy-D5_uqR4Q.js +2 -0
  79. package/studio/web/assets/{info-A6RAGUB7-o49TEbj-.js → info-A6RAGUB7-BhzBHe4U.js} +1 -1
  80. package/studio/web/assets/{infoDiagram-VRGFBTTK-Cjhh7yzZ.js → infoDiagram-VRGFBTTK-B0J1132p.js} +1 -1
  81. package/studio/web/assets/{ishikawaDiagram-OU5B5YK6-C63aXRmh.js → ishikawaDiagram-OU5B5YK6-BNk0tuQx.js} +1 -1
  82. package/studio/web/assets/{javascript-Dy6KbeHT.js → javascript-QytBwXUJ.js} +1 -1
  83. package/studio/web/assets/{journeyDiagram-ZHPQQLJL-D_o0P5Mu.js → journeyDiagram-ZHPQQLJL-Be79RMQM.js} +1 -1
  84. package/studio/web/assets/json.worker-BQqXGI3X.js +65 -0
  85. package/studio/web/assets/{jsonMode-BiuDVrzl.js → jsonMode-CIoh4zwS.js} +1 -1
  86. package/studio/web/assets/{kanban-definition-PNTS6WVX-CTI9SSxY.js → kanban-definition-PNTS6WVX-4uuoQP9W.js} +1 -1
  87. package/studio/web/assets/{languageServices-Dk8_6B25.js → languageServices-BvFCul4Y.js} +1 -1
  88. package/studio/web/assets/localStorageKeys-etzFY_xV.js +1 -0
  89. package/studio/web/assets/{lspLanguageFeatures-DwJKXzQa.js → lspLanguageFeatures-BvDuJHGH.js} +1 -1
  90. package/studio/web/assets/{mermaid-parser.core-C2lcH_jP.js → mermaid-parser.core-V1UYMeXV.js} +3 -3
  91. package/studio/web/assets/{mermaid.core-BG5bjfIG.js → mermaid.core-1PX6R49U.js} +4 -4
  92. package/studio/web/assets/{mindmap-definition-NLK3R4M7-BK7ho6JD.js → mindmap-definition-NLK3R4M7-C70Ctm0J.js} +1 -1
  93. package/studio/web/assets/notifications-C5EZskVd.js +1 -0
  94. package/studio/web/assets/notifications-jQfsyiVJ.js +1 -0
  95. package/studio/web/assets/{packet-AYTQ26CC-BHPy6KBV.js → packet-AYTQ26CC-DWbXHx5g.js} +1 -1
  96. package/studio/web/assets/{pegDiagram-GJSIUBJH-DzjwG3jO.js → pegDiagram-GJSIUBJH-d6z1cc7W.js} +1 -1
  97. package/studio/web/assets/{pie-WAS4IAKB-D0cP-DTU.js → pie-WAS4IAKB-DjoTm3yr.js} +1 -1
  98. package/studio/web/assets/{pieDiagram-5QR66LMP-C_hOP9Lv.js → pieDiagram-5QR66LMP-Dz3RHpDA.js} +1 -1
  99. package/studio/web/assets/profile-CkLzjQm2.js +1 -0
  100. package/studio/web/assets/{quadrantDiagram-O4NWA36T-CZW8PbV1.js → quadrantDiagram-O4NWA36T-CIF5Qkou.js} +1 -1
  101. package/studio/web/assets/{radar-RG4KPBEZ-C8fk0U81.js → radar-RG4KPBEZ-CVBgjCOj.js} +1 -1
  102. package/studio/web/assets/{railroad-74A4TZTK-B60FWm17.js → railroad-74A4TZTK-BdhXw10Q.js} +1 -1
  103. package/studio/web/assets/railroad-abnf-HS5TGJTU-BcoQPN39.js +1 -0
  104. package/studio/web/assets/railroad-ebnf-LZEXJU2U-B1Lke2JN.js +1 -0
  105. package/studio/web/assets/railroad-peg-WCYAUIDC-D-oJFkiV.js +1 -0
  106. package/studio/web/assets/{railroadDiagram-XR7U4H2S-DyyNmgbU.js → railroadDiagram-XR7U4H2S-y3Jv2U6N.js} +1 -1
  107. package/studio/web/assets/regions-b7HODz0P.js +1 -0
  108. package/studio/web/assets/register-DGmUOJc1.js +909 -0
  109. package/studio/web/assets/register-DjpsE8to.css +1 -0
  110. package/studio/web/assets/{requirementDiagram-PLB6GJNP-C4H-mLKu.js → requirementDiagram-PLB6GJNP-ChINZEmu.js} +1 -1
  111. package/studio/web/assets/restartGate-nHAFLDh-.js +1 -0
  112. package/studio/web/assets/{sankeyDiagram-IPEJSGJF-DHDyga4c.js → sankeyDiagram-IPEJSGJF-D9AyLce2.js} +1 -1
  113. package/studio/web/assets/{sequenceDiagram-PO4LG4MO-CdNcHXRI.js → sequenceDiagram-PO4LG4MO-hfk4aIEm.js} +1 -1
  114. package/studio/web/assets/{setComponentFile-BavlhfY0.js → setComponentFile-DlUcJ4Y0.js} +1 -1
  115. package/studio/web/assets/{setup-04yVzr2I.js → setup-D1jywSGk.js} +2 -2
  116. package/studio/web/assets/{stateDiagram-v2-GCMORJYK-CpKuXq15.js → stateDiagram-v2-GCMORJYK-Bs8RIb9K.js} +1 -1
  117. package/studio/web/assets/status-CjVoPieo.js +61 -0
  118. package/studio/web/assets/{swimlanes-2SLR337P-NRHa2D8I.js → swimlanes-2SLR337P-B52xrf6t.js} +1 -1
  119. package/studio/web/assets/swimlanesDiagram-TC7HE7FX-DfN7BAP5.js +8 -0
  120. package/studio/web/assets/tabs-BCTQzoQK.js +1 -0
  121. package/studio/web/assets/{timeline-definition-EJHVYXUP-D39Y-xpq.js → timeline-definition-EJHVYXUP-DJSITpQX.js} +1 -1
  122. package/studio/web/assets/toggleHighContrast-C9CKwOn9.js +51 -0
  123. package/studio/web/assets/toggleHighContrast-n7clI0si.css +1 -0
  124. package/studio/web/assets/{treeView-Q6P3EWNA-CRWR9OqD.js → treeView-Q6P3EWNA-C-epdxRo.js} +1 -1
  125. package/studio/web/assets/{treemap-WGGIJYW6-ZfXyJgLO.js → treemap-WGGIJYW6-DOVyp_zw.js} +1 -1
  126. package/studio/web/assets/{ts.worker-DDMUrpqh.js → ts.worker-Clm12uY6.js} +131 -131
  127. package/studio/web/assets/{tsMode-DGeWfx0W.js → tsMode-CRibSU_y.js} +1 -1
  128. package/studio/web/assets/{typescript-62_1FUbs.js → typescript-BRCpg8By.js} +1 -1
  129. package/studio/web/assets/{useEntityRestURL-DSVwev9J.js → useEntityRestURL-pPVmpjIi.js} +1 -1
  130. package/studio/web/assets/{usecaseDiagram-POWQR4AR-jf-zIDZ_.js → usecaseDiagram-POWQR4AR-B6252cbq.js} +1 -1
  131. package/studio/web/assets/{vendor-core-BdkdbUek.js → vendor-core-6LhfJlRC.js} +1 -1
  132. package/studio/web/assets/vendor-datadog-ozKf-pts.js +6 -0
  133. package/studio/web/assets/{vendor-react-izWchTRL.js → vendor-react-BOliS0BL.js} +1 -1
  134. package/studio/web/assets/vendor-tanstack-Bntfka-M.js +2 -0
  135. package/studio/web/assets/vendor-ui-9EYYDgoN.js +41 -0
  136. package/studio/web/assets/{vennDiagram-UO4OBE2U-BKYAZUh_.js → vennDiagram-UO4OBE2U-DZTsDA4k.js} +1 -1
  137. package/studio/web/assets/{wardley-WFR3VGLG-BO7f36ci.js → wardley-WFR3VGLG-Cfqoe6z4.js} +1 -1
  138. package/studio/web/assets/{wardleyDiagram-VNRHLVJA-Djb0JDQc.js → wardleyDiagram-VNRHLVJA-qu_f7Tvl.js} +1 -1
  139. package/studio/web/assets/{workers-Cs52GyHv.js → workers-BBDZZ4qw.js} +3 -3
  140. package/studio/web/assets/{xml-Co5ow_Ix.js → xml-tWNEwt7n.js} +1 -1
  141. package/studio/web/assets/{xychartDiagram-PMCCYNJV-BQh9ubvb.js → xychartDiagram-PMCCYNJV-UrOKRsmR.js} +1 -1
  142. package/studio/web/assets/{yaml-BcngpXye.js → yaml-BZgmBIf5.js} +1 -1
  143. package/studio/web/assets/{yaml.worker-DAK2o_H1.js → yaml.worker-D9JekGdp.js} +183 -183
  144. package/studio/web/index.html +15 -15
  145. package/studio/web/assets/FloatingChat-BUlsFGMV.js +0 -23
  146. package/studio/web/assets/alertDialog-UrbiMgQt.js +0 -1
  147. package/studio/web/assets/apiToken-CPhbc_zN.js +0 -1
  148. package/studio/web/assets/applications-D3Z6BVDl.js +0 -296
  149. package/studio/web/assets/architecture-7GRP2DOG-11l4Ny1l.js +0 -1
  150. package/studio/web/assets/authStore-5jSS5pTW.js +0 -3
  151. package/studio/web/assets/channel-BDtouPd6.js +0 -1
  152. package/studio/web/assets/dialog-DTepachC.js +0 -1
  153. package/studio/web/assets/editor.worker-CkkvdXvO.js +0 -33
  154. package/studio/web/assets/eventmodeling-NTZA5JFV-CFb03e0o.js +0 -1
  155. package/studio/web/assets/flowDiagram-KWPJA3E3-Cidi00_Y.js +0 -1
  156. package/studio/web/assets/index-CPoDzQTe.css +0 -1
  157. package/studio/web/assets/index-zZCxAIEb.js +0 -824
  158. package/studio/web/assets/index.lazy-CKbsHbSN.js +0 -2
  159. package/studio/web/assets/json.worker-CSi2hF-a.js +0 -65
  160. package/studio/web/assets/notifications-DJqAtWxD.js +0 -1
  161. package/studio/web/assets/notifications-DsDtb41c.js +0 -1
  162. package/studio/web/assets/profile-zTGUN51x.js +0 -1
  163. package/studio/web/assets/railroad-abnf-HS5TGJTU-CLMVZvH0.js +0 -1
  164. package/studio/web/assets/railroad-ebnf-LZEXJU2U--tlwFoVB.js +0 -1
  165. package/studio/web/assets/railroad-peg-WCYAUIDC-Dpuslblm.js +0 -1
  166. package/studio/web/assets/regions-SOtABPB9.js +0 -1
  167. package/studio/web/assets/register-7JezVakc.js +0 -848
  168. package/studio/web/assets/register-jjEx9u7D.css +0 -1
  169. package/studio/web/assets/setLocalStorage-D_kflv4U.js +0 -1
  170. package/studio/web/assets/status-g_mNYE7j.js +0 -61
  171. package/studio/web/assets/swimlanesDiagram-TC7HE7FX-BBk4t4hO.js +0 -8
  172. package/studio/web/assets/tabs-CnQ_zenf.js +0 -1
  173. package/studio/web/assets/toggleHighContrast--ixms01u.css +0 -1
  174. package/studio/web/assets/toggleHighContrast-i2FjCrzO.js +0 -49
  175. package/studio/web/assets/useLocalStorage-BYoZF60G.js +0 -1
  176. package/studio/web/assets/vendor-datadog-fCQhBHGk.js +0 -6
  177. package/studio/web/assets/vendor-tanstack-CQ1aRjVa.js +0 -2
  178. package/studio/web/assets/vendor-ui-aE1tHcW7.js +0 -41
  179. package/studio/web/assets/x-vYntCxm4.js +0 -1
@@ -0,0 +1,23 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Chat-CeEDA28S.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/vendor-core-6LhfJlRC.js","assets/cn-6T8VranJ.js","assets/vendor-datadog-ozKf-pts.js","assets/vendor-react-BOliS0BL.js","assets/vendor-tanstack-Bntfka-M.js","assets/setSessionStorage-B0bf71m4.js","assets/safeParse-DeaoCCWH.js","assets/button-DWwfgGWI.js","assets/vendor-ui-9EYYDgoN.js","assets/createLucideIcon-fO5dL7D5.js","assets/chevron-up-CFxbMGv2.js","assets/setComponentFile-DlUcJ4Y0.js","assets/index-DMUQ34Jl.js","assets/authStore-CJCaADw9.js","assets/restartGate-nHAFLDh-.js","assets/arrow-up-D2g_57vT.js","assets/errorText-NpBmvk9I.js","assets/localStorageKeys-etzFY_xV.js","assets/index-QLZw6xrU.css","assets/useEntityRestURL-pPVmpjIi.js","assets/getAnalytics-C0FHjtdQ.js","assets/Chat-B-7kW9XZ.css"])))=>i.map(i=>d[i]);
2
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{a as t,i as n}from"./vendor-datadog-ozKf-pts.js";import{r}from"./vendor-react-BOliS0BL.js";import{t as i}from"./createLucideIcon-fO5dL7D5.js";import{t as a}from"./localStorageKeys-etzFY_xV.js";import{ir as o,jt as s,or as c}from"./index-DMUQ34Jl.js";var l={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};l.node;var u=i(l),d=e(t(),1),f=(0,d.createContext)({});function p(e){let t=(0,d.useRef)(null);return t.current===null&&(t.current=e()),t.current}var m=typeof window<`u`?d.useLayoutEffect:d.useEffect,h=(0,d.createContext)(null);function g(e,t){e.indexOf(t)===-1&&e.push(t)}function _(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var v=(e,t,n)=>n>t?t:n<e?e:n,y={},b=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),x=e=>typeof e==`object`&&!!e,S=e=>/^0[^.\s]+$/u.test(e);function C(e){let t;return()=>(t===void 0&&(t=e()),t)}var w=e=>e,T=(...e)=>e.reduce((e,t)=>n=>t(e(n))),E=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},D=class{constructor(){this.subscriptions=[]}add(e){return g(this.subscriptions,e),()=>this.remove(e)}remove(e){_(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},O=e=>e*1e3,k=e=>e/1e3,ee=(e,t)=>t?1e3/t*e:0,te=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ne=1e-7,re=12;function ie(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=te(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ne&&++s<re);return o}function ae(e,t,n,r){if(e===t&&n===r)return w;let i=t=>ie(t,0,1,e,n);return e=>e===0||e===1?e:te(i(e),t,r)}var oe=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,se=e=>t=>1-e(1-t),ce=ae(.33,1.53,.69,.99),le=se(ce),ue=oe(le),de=e=>e>=1?1:(e*=2)<1?.5*le(e):.5*(2-2**(-10*(e-1))),fe=e=>1-Math.sin(Math.acos(e)),pe=se(fe),me=oe(fe),he=ae(.42,0,1,1),ge=ae(0,0,.58,1),_e=ae(.42,0,.58,1),ve=e=>Array.isArray(e)&&typeof e[0]!=`number`,ye=e=>Array.isArray(e)&&typeof e[0]==`number`,be={linear:w,easeIn:he,easeInOut:_e,easeOut:ge,circIn:fe,circInOut:me,circOut:pe,backIn:le,backInOut:ue,backOut:ce,anticipate:de},xe=e=>typeof e==`string`,Se=e=>{if(ye(e)){e.length;let[t,n,r,i]=e;return ae(t,n,r,i)}return xe(e)?(be[e],`${e}`,be[e]):e},Ce=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function we(e){let t=new Set,n=new Set,r=!1,i=!1,a=new Set,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(n.add(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Te=40;function Ee(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ce.reduce((e,t)=>(e[t]=we(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=y.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Te),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Ce.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Ce.length;t++)o[Ce[t]].cancel(e)},state:i,steps:o}}var{schedule:A,cancel:j,state:M,steps:De}=Ee(typeof requestAnimationFrame<`u`?requestAnimationFrame:w,!0),Oe;function ke(){Oe=void 0}var N={now:()=>(Oe===void 0&&N.set(M.isProcessing||y.useManualTiming?M.timestamp:performance.now()),Oe),set:e=>{Oe=e,queueMicrotask(ke)}},Ae=e=>Math.round(e*1e5)/1e5,je=e=>t=>typeof t==`string`&&t.startsWith(e),Me=je(`--`),Ne=je(`var(--`),Pe=e=>Ne(e)?Fe.test(e.split(`/*`)[0].trim()):!1,Fe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ie(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Le={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Re={...Le,transform:e=>v(0,1,e)},ze={...Le,default:1},Be=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ve(e){return e==null}var He=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ue=(e,t)=>n=>!!(typeof n==`string`&&He.test(n)&&n.startsWith(e)||t&&!Ve(n)&&Object.prototype.hasOwnProperty.call(n,t)),We=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Be);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ge=e=>v(0,255,e),Ke={...Le,transform:e=>Math.round(Ge(e))},P={test:Ue(`rgb`,`red`),parse:We(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ke.transform(e)+`, `+Ke.transform(t)+`, `+Ke.transform(n)+`, `+Ae(Re.transform(r))+`)`};function qe(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Je={test:Ue(`#`),parse:qe,transform:P.transform},Ye=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),F=Ye(`deg`),I=Ye(`%`),L=Ye(`px`),Xe=Ye(`vh`),Ze=Ye(`vw`),Qe={...I,parse:e=>I.parse(e)/100,transform:e=>I.transform(e*100)},$e={test:Ue(`hsl`,`hue`),parse:We(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+I.transform(Ae(t))+`, `+I.transform(Ae(n))+`, `+Ae(Re.transform(r))+`)`},R={test:e=>P.test(e)||Je.test(e)||$e.test(e),parse:e=>P.test(e)?P.parse(e):$e.test(e)?$e.parse(e):Je.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?P.transform(e):$e.transform(e),getAnimatableNone:e=>{let t=R.parse(e);return t.alpha=0,R.transform(t)}},et=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,tt=new RegExp(Be.source),nt=new RegExp(et.source,`i`);function rt(e){return isNaN(e)&&typeof e==`string`&&(tt.test(e)||nt.test(e))}var it=`number`,at=`color`,ot=`var`,st=`var(`,ct="${}",lt=/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 ut(e){let t=e.toString();return tt.test(t)||nt.test(t)}function dt(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(lt,e=>(R.test(e)?(r.color.push(a),i.push(at),n.push(R.parse(e))):e.startsWith(st)?(r.var.push(a),i.push(ot),n.push(e)):(r.number.push(a),i.push(it),n.push(parseFloat(e))),++a,ct)).split(ct),indexes:r,types:i}}function ft(e){return dt(e).values}function pt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===it?Ae(r[a]):e===at?R.transform(r[a]):r[a]}return i}}function mt(e){return pt(dt(e))}var ht=e=>typeof e==`number`?0:R.test(e)?R.getAnimatableNone(e):e,gt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:ht(e);function _t(e){let t=dt(e);return pt(t)(t.values.map((e,n)=>gt(e,t.split[n])))}var z={test:rt,parse:ft,createTransformer:mt,getAnimatableNone:_t};function vt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yt({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=vt(s,r,e+1/3),a=vt(s,r,e),o=vt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function bt(e,t){return n=>n>0?t:e}var B=(e,t,n)=>e+(t-e)*n,xt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},St=[Je,P,$e],Ct=e=>St.find(t=>t.test(e));function wt(e){let t=Ct(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===$e&&(n=yt(n)),n}var Tt=(e,t)=>{let n=wt(e),r=wt(t);if(!n||!r)return bt(e,t);let i={...n};return e=>(i.red=xt(n.red,r.red,e),i.green=xt(n.green,r.green,e),i.blue=xt(n.blue,r.blue,e),i.alpha=B(n.alpha,r.alpha,e),P.transform(i))},Et=new Set([`none`,`hidden`]);function Dt(e,t){return Et.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Ot(e,t){return n=>B(e,t,n)}function kt(e){return typeof e==`number`?Ot:typeof e==`string`?Pe(e)?bt:R.test(e)?Tt:Nt:Array.isArray(e)?At:typeof e==`object`?R.test(e)?Tt:jt:bt}function At(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>kt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function jt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=kt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Mt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Nt=(e,t)=>{let n=z.createTransformer(t),r=dt(e),i=dt(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Et.has(e)&&!i.values.length||Et.has(t)&&!r.values.length?Dt(e,t):T(At(Mt(r,i),i.values),n):(`${e}${t}`,bt(e,t))},Pt=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function Ft(e,t){let n=Pt.exec(e);if(!n)return;let r=Pt.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Ae(B(a,o,e))+i}function It(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return B(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=Ft(e,t);if(n)return n}return kt(e)(e,t)}var Lt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>A.update(t,e),stop:()=>j(t),now:()=>M.isProcessing?M.timestamp:N.now()}},Rt=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},zt=2e4;function Bt(e,t=50,n=zt,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function Vt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Bt(r),zt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:k(i)}}var V={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ht(e,t){return e*Math.sqrt(1-t*t)}var Ut=12;function Wt(e,t,n){let r=n;for(let n=1;n<Ut;n++)r-=e(r)/t(r);return r}var Gt=.001;function Kt({duration:e=V.duration,bounce:t=V.bounce,velocity:n=V.velocity,mass:r=V.mass}){let i,a;V.maxDuration;let o=1-t;o=v(V.minDamping,V.maxDamping,o),e=v(V.minDuration,V.maxDuration,k(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Ht(t,o),c=Math.exp(-i);return Gt-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o*o*t*t*e,c=Math.exp(-r),l=Ht(t*t,o);return(-i(t)+Gt>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Wt(i,a,s);if(e=O(e),isNaN(c))return{stiffness:V.stiffness,damping:V.damping,duration:e};{let t=c*c*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var qt=[`duration`,`bounce`];function Jt(e,t){return t.some(t=>e[t]!==void 0)}var Yt=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Xt(e,t){if(Yt(e,t))return e}function Zt(e){let t=Xt(e.stiffness),n=Xt(e.damping,!0),r=Xt(e.mass),i={...e,stiffness:t??V.stiffness,damping:n??V.damping,mass:r??V.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&Jt(e,qt)};if(i.isTimeDefined){if(i.velocity=0,e.visualDuration){let t=e.visualDuration,n=2*Math.PI/(t*1.2),r=n*n,a=2*v(.05,1,1-(e.bounce||0))*Math.sqrt(r);i={...i,mass:V.mass,stiffness:r,damping:a}}else{let e=Kt(i);i={...i,...e,mass:V.mass},i.isResolvedFromDuration=!0}(!Yt(i.stiffness)||!Yt(i.damping,!0))&&(i.stiffness=V.stiffness,i.damping=V.damping)}return i}function Qt(e=V.visualDuration,t=V.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,velocity:u,isResolvedFromDuration:d,isTimeDefined:f}=Zt({...n,velocity:-k(n.velocity||0)}),p=s/(2*Math.sqrt(o*c)),m=k(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:u||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?V.restSpeed.granular:V.restSpeed.default),g.restDelta=n.restDelta||(e?V.restDelta.granular:V.restDelta.default)};_();let v,y,b;if(p<1){let e=Ht(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1);v=t=>{let n=Math.exp(-h*t),r=Math.min(e*t,300);return g.target-n*((g.velocity+h*g.delta)*Math.sinh(r)+e*g.delta*Math.cosh(r))/e};let t={P:0,sinh:0,cosh:0};b=()=>{t.P=(g.velocity+h*g.delta)/e,t.sinh=h*t.P-g.delta*e,t.cosh=h*g.delta-t.P*e},y=n=>{let r=Math.exp(-h*n),i=Math.min(e*n,300);return r*(t.sinh*Math.sinh(i)+t.cosh*Math.cosh(i))}}b();let x=d&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f?0:-k(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>O(y(e)),next:e=>{let t=v(e);if(d)a.done=e>=l;else{let n=O(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(Bt(S),zt),t=Rt(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}Qt.applyToOptions=e=>{let t=Vt(e,100,Qt);return e.ease=t.ease,e.duration=O(t.duration),e.type=`keyframes`,e};function $t({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=Qt({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function en(e,t,n){let r=[],i=n||y.mix||It,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=T(Array.isArray(t)?t[n]||w:t,a)),r.push(a)}return r}function tn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=en(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=E(e[r],e[r+1],n);return s[r](i)};return n?t=>l(v(e[0],e[a-1],t)):l}function nn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=E(0,t,r);e.push(B(n,1,i))}}function rn(e){let t=[0];return nn(t,e.length-1),t}function an(e,t){return e.map(e=>e*t)}function on(e,t){return e.map(()=>t||_e).splice(0,e.length-1)}function sn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ve(r)?r.map(Se):Se(r)||_e,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(y.mix||It)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?v(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=tn(an(n&&n.length===t.length?n:rn(t),e),t,{ease:Array.isArray(i)?i:on(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var cn=5;function ln(e,t,n){let r=Math.max(t-cn,0);return ee(n-e(r),t-r)}function un(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):ln(t=>e.next(t).value,t,e.next(t).value)}var dn=e=>e!==null;function fn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(dn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var pn={decay:$t,inertia:$t,tween:sn,keyframes:sn,spring:Qt};function mn(e){typeof e.type==`string`&&(e.type=pn[e.type])}function hn(e,t){return{kind:e,animation:t,timestamp:N.now(),frameTimestamp:M.timestamp,frameIsProcessing:M.isProcessing}}function gn(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...hn(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function _n(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...hn(`layout-animation-start`,e),node:t})}catch{}}var vn=class{constructor(){this.isResolved=!1}get finished(){return 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,t){return this.finished.then(e,t)}},yn=e=>e/100,bn=class extends vn{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:e}=this.options;e&&e.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),gn(this,this.options)}initAnimation(){let{options:e}=this;mn(e);let{type:t=sn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||sn;s!==sn&&typeof o[0]!=`number`&&(this.mixKeyframes=T(yn,It(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=Bt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,b=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(b=a)),y=v(0,1,n)*o}let x;_?(this.delayState.value=l[0],x=this.delayState):x=b.next(y),i&&!_&&(x.value=i(x.value));let{done:S}=x;!_&&s!==null&&(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&S);return C&&p!==$t&&(x.value=fn(l,this.options,h,this.speed)),m&&m(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}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=O(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 un(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=k(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Lt,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,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(N.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(),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)}},xn=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Sn(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Be)||[];if(!r)return e;let i=n.replace(r,``),a=+!!xn.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Cn=/\b([a-z-]*)\(.*?\)/gu,wn={...z,getAnimatableNone:e=>{let t=e.match(Cn);return t?t.map(Sn).join(` `):e}},Tn={...z,getAnimatableNone:e=>{let t=z.parse(e);return z.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},En={...Le,transform:Math.round},Dn={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,rotate:F,pathRotation:F,rotateX:F,rotateY:F,rotateZ:F,scale:ze,scaleX:ze,scaleY:ze,scaleZ:ze,skew:F,skewX:F,skewY:F,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:Re,originX:Qe,originY:Qe,originZ:L,zIndex:En,fillOpacity:Re,strokeOpacity:Re,numOctaves:En},On={...Dn,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:wn,WebkitFilter:wn,mask:Tn,WebkitMask:Tn},kn=e=>On[e],An=new Set([wn,Tn]);function jn(e,t){let n=kn(e);return An.has(n)||(n=z),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function Mn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Nn=e=>e*180/Math.PI,Pn=e=>In(Nn(Math.atan2(e[1],e[0]))),Fn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Pn,rotateZ:Pn,skewX:e=>Nn(Math.atan(e[1])),skewY:e=>Nn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},In=e=>(e%=360,e<0&&(e+=360),e),Ln=Pn,Rn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),zn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Bn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Rn,scaleY:zn,scale:e=>(Rn(e)+zn(e))/2,rotateX:e=>In(Nn(Math.atan2(e[6],e[5]))),rotateY:e=>In(Nn(Math.atan2(-e[2],e[0]))),rotateZ:Ln,rotate:Ln,skewX:e=>Nn(Math.atan(e[4])),skewY:e=>Nn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Vn(e){return+!!e.includes(`scale`)}function Hn(e,t){if(!e||e===`none`)return Vn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Bn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Fn,i=t}if(!i)return Vn(t);let a=r[t],o=i[1].split(`,`).map(Wn);return typeof a==`function`?a(o):o[a]}var Un=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Hn(n,t)};function Wn(e){return parseFloat(e.trim())}var Gn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Kn=new Set([...Gn,`pathRotation`]),qn=e=>e===Le||e===L,Jn=new Set([`x`,`y`,`z`]),Yn=Gn.filter(e=>!Jn.has(e));function Xn(e){let t=[];return Yn.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var Zn=new Set([`bottom`,`right`]);function Qn(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var $n={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>Qn(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>Qn(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:({transform:e})=>Hn(e,`x`),y:({transform:e})=>Hn(e,`y`)};$n.translateX=$n.x,$n.translateY=$n.y;var er=new Set,tr=!1,nr=!1,rr=!1;function ir(){if(nr){let e=[],t=new Set,n=new Set;er.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Zn.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Xn(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}nr=!1,tr=!1,er.forEach(e=>e.complete(rr)),er.clear()}function ar(){er.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(nr=!0)})}function or(){rr=!0,ar(),ir(),rr=!1}function sr(e,t,n){if(typeof e==`string`){if(b(e)||S(e))return parseFloat(e);if(!z.test(e)&&z.test(n))return jn(t,n)}return e??void 0}var cr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(er.add(this),tr||(tr=!0,A.read(ar),A.resolveKeyframes(ir))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=sr(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}Mn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),er.delete(this)}cancel(){this.state===`scheduled`&&(er.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},lr=e=>e.startsWith(`--`);function ur(e,t,n){lr(t)?e.style.setProperty(t,n):e.style[t]=n}var dr={};function fr(e,t){let n=C(e);return()=>dr[t]??n()}var pr=fr(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),mr=fr(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),hr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gr={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:hr([0,.65,.55,1]),circOut:hr([.55,0,1,.45]),backIn:hr([.31,.01,.66,-.59]),backOut:hr([.33,1.53,.69,.99])};function _r(e,t){if(e)return typeof e==`function`?mr()?Rt(e,t):`ease-out`:ye(e)?hr(e):Array.isArray(e)?e.map(e=>_r(e,t)||gr.easeOut):gr[e]}function vr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=_r(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function yr(e){return typeof e==`function`&&`applyToOptions`in e}function br({type:e,...t}){return yr(e)&&mr()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var xr=class extends vn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=br(e);this.animation=vr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=fn(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),ur(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},gn(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 t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=O(e),t&&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?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&pr()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),w):r(this)}},Sr={anticipate:de,backInOut:ue,circInOut:me};function Cr(e){return e in Sr}function wr(e){typeof e.ease==`string`&&Cr(e.ease)&&(e.ease=Sr[e.ease])}var Tr=10,Er=class extends xr{constructor(e){wr(e),mn(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new bn({...a,autoplay:!1}),s=Math.max(Tr,N.now()-this.startTime),c=v(0,Tr,s-Tr),l=o.sample(s).value,{name:u}=this.options;i&&u&&ur(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},Dr=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(z.test(e)||e===`0`)&&!e.startsWith(`url(`));function Or(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function kr(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=Dr(i,t),s=Dr(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):Or(e)||(n===`spring`||yr(n))&&r}function Ar(e){e.duration=0,e.type=`keyframes`}var jr=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),Mr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Nr(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&Mr.test(e[t]))return!0;return!1}var Pr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Fr=C(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Ir(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(jr.has(n)||Pr.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Fr()&&(jr.has(n)||Pr.has(n)&&Nr(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Lr=40,Rr=class extends vn{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=N.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||cr;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=N.now();let u=!0;kr(e,i,a,o)||(u=!1,(y.instantAnimations||!s)&&l?.(fn(e,n,t)),e[0]=e[e.length-1],Ar(n),n.repeat=0);let d=r?this.resolvedAt&&this.resolvedAt-this.createdAt>Lr?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=n;n.startTime??=d,n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{f?.(),this.notifyFinished()};let p=u&&!c&&Ir(n),m;if(p){n.element=n.motionValue?.owner?.current;try{m=new Er(n)}catch{m=new bn(n)}}else m=new bn(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),or()),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 zr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Br=30,Vr=e=>!isNaN(parseFloat(e)),Hr={current:void 0},Ur=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=N.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=N.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Vr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new D)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new D,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){A.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,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Hr.current&&Hr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Br)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Br);return ee(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),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 Wr(e,t){return new Ur(e,t)}function Gr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Kr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Gr(n,e)}var qr={type:`spring`,stiffness:500,damping:25,restSpeed:10},Jr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Yr={type:`keyframes`,duration:.8},Xr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Zr=(e,{keyframes:t})=>t.length>2?Yr:Kn.has(e)?e.startsWith(`scale`)?Jr(t[1]):qr:Xr,Qr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function $r(e){for(let t in e)if(!Qr.has(t))return!0;return!1}var ei=(e,t,n,r={},i,a)=>o=>{let s=Kr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=O(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};$r(s)||Object.assign(u,Zr(e,u)),u.duration&&=O(u.duration),u.repeatDelay&&=O(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ar(u),u.delay===0&&(d=!0)),(y.instantAnimations||y.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Ar(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=fn(u.keyframes,s);if(e!==void 0){A.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new bn(u):new Rr(u)},ti=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ni(e){let t=ti.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function ri(e,t,n=1){`${e}`;let[r,i]=ni(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return b(e)?parseFloat(e):e}return Pe(i)?ri(i,t,n+1):i}function ii(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ai(e,t,n,r){if(typeof t==`function`){let[i,a]=ii(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=ii(r);t=t(n===void 0?e.custom:n,i,a)}return t}function H(e,t,n){let r=e.getProps();return ai(r,t,n===void 0?r.custom:n,e)}var oi=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Gn]),si=e=>Array.isArray(e);function ci(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Wr(n))}function li(e){return si(e)?e[e.length-1]||0:e}function ui(e,t){let{transitionEnd:n={},transition:r={},...i}=H(e,t)||{};i={...i,...n};for(let t in i)ci(e,t,li(i[t]))}var U=e=>!!(e&&e.getVelocity);function di(e){return!!(U(e)&&e.add)}function fi(e,t){let n=e.getValue(`willChange`);if(di(n))return n.add(t);if(!n&&y.WillChange){let n=new y.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function pi(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var mi=`data-`+pi(`framerAppearId`);function hi(e){return e.props[mi]}var gi=typeof window<`u`;function _i({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function vi(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Gr(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&_i(f,t))continue;let o={delay:n,...Kr(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){A.update(()=>r.set(i));continue}let p=!1;if(gi&&window.MotionHandoffAnimation){let n=hi(e);if(n){let e=window.MotionHandoffAnimation(n,t,A);e!==null&&(o.startTime=e,p=!0)}}fi(e,t);let m=l??e.shouldReduceMotion;r.start(ei(t,r,i,m&&oi.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>A.update(()=>{o&&ui(e,o)});d.length?Promise.all(d).then(t):t()}return d}function yi(e,t,n={}){let r=H(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(vi(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return bi(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}function bi(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(yi(c,t,{...o,delay:n+(typeof r==`function`?0:r)+zr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function xi(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>yi(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=yi(e,t,n);else{let i=typeof t==`function`?H(e,t,n.custom):t;r=Promise.all(vi(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Si={test:e=>e===`auto`,parse:e=>e},Ci=e=>t=>t.test(e),wi=[Le,L,I,F,Ze,Xe,Si],Ti=e=>wi.find(Ci(e));function Ei(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||S(e)}var Di=new Set([`auto`,`none`,`0`]);function Oi(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Di.has(t)&&ut(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=jn(n,i))}var ki=class extends cr{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Pe(r))){let i=ri(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!oi.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=Ti(r),o=Ti(i);if(Ie(r)!==Ie(i)&&$n[n]){this.needsMeasurement=!0;return}if(a!==o){if(qn(a)&&qn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else $n[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Ei(e[t]))&&n.push(t);n.length&&Oi(e,n,t)}measure(){let{element:e,name:t}=this;return $n[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},Ai=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function ji(e){return x(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function Mi(e){return x(e)&&`ownerSVGElement`in e}var Ni=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Pi(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Fi={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ii=Gn.length;function Li(e,t,n){let r=``,i=!0;for(let a=0;a<Ii;a++){let o=Gn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Ni(s,Dn[o]);if(!c){i=!1;let t=Fi[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${Ni(a,Dn.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ri(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Kn.has(e)){o=!0;continue}if(Me(e)){i[e]=n;continue}{let t=Ni(n,Dn[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Li(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var zi={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Bi={offset:`strokeDashoffset`,array:`strokeDasharray`};function Vi(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?zi:Bi;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Hi=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Ui(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ri(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Hi)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Vi(d,i,a,o,!1)}function Wi({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Gi({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ki(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function qi(e){return e===void 0||e===1}function Ji({scale:e,scaleX:t,scaleY:n}){return!qi(e)||!qi(t)||!qi(n)}function W(e){return Ji(e)||Yi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Yi(e){return Xi(e.x)||Xi(e.y)}function Xi(e){return e&&e!==`0%`}function Zi(e,t,n){return n+t*(e-n)}function Qi(e,t,n,r,i){return i!==void 0&&(e=Zi(e,i,r)),Zi(e,n,r)+t}function $i(e,t=0,n=1,r,i){e.min=Qi(e.min,t,n,r,i),e.max=Qi(e.max,t,n,r,i)}function ea(e,{x:t,y:n}){$i(e.x,t.translate,t.scale,t.originPoint),$i(e.y,n.translate,n.scale,n.originPoint)}var ta=.999999999999,na=1.0000000000001;function ra(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(G(e.x,-a.scroll.offset.x),G(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ea(e,o)),r&&W(a.latestValues)&&oa(e,a.latestValues,a.layout?.layoutBox))}t.x<na&&t.x>ta&&(t.x=1),t.y<na&&t.y>ta&&(t.y=1)}function G(e,t){e.min+=t,e.max+=t}function ia(e,t,n,r,i=.5){$i(e,t,n,B(e.min,e.max,i),r)}function aa(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function oa(e,t,n){let r=n??e;ia(e.x,aa(t.x,r.x),t.scaleX,t.scale,t.originX),ia(e.y,aa(t.y,r.y),t.scaleY,t.scale,t.originY)}function sa(e,t){return Wi(Ki(e.getBoundingClientRect(),t))}function ca(e,t,n){let r=sa(e,n),{scroll:i}=t;return i&&(G(r.x,i.offset.x),G(r.y,i.offset.y)),r}var{schedule:la,cancel:ua}=Ee(queueMicrotask,!1),K={x:!1,y:!1};function da(){return K.x||K.y}function fa(e){return e===`x`||e===`y`?K[e]?null:(K[e]=!0,()=>{K[e]=!1}):K.x||K.y?null:(K.x=K.y=!0,()=>{K.x=K.y=!1})}function pa(e,t){let n=Pi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ma(e){return!(e.pointerType===`touch`||da())}function ha(e,t,n={}){let[r,i,a]=pa(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!ma(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var ga=(e,t)=>t?e===t||ga(e,t.parentElement):!1,_a=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,va=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function ya(e){return va.has(e.tagName)||e.isContentEditable===!0}var ba=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function xa(e){return ba.has(e.tagName)||e.isContentEditable===!0}var Sa=new WeakSet;function Ca(e){return t=>{t.key===`Enter`&&e(t)}}function wa(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Ta=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Ca(()=>{if(Sa.has(n))return;wa(n,`down`);let e=Ca(()=>{wa(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>wa(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Ea(e){return _a(e)&&!da()}var Da=new WeakSet;function Oa(e,t,n={}){let[r,i,a]=pa(e,n),o=e=>{let r=e.currentTarget;if(!Ea(e)||Da.has(e))return;Sa.add(r),n.stopPropagation&&Da.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),Sa.has(r)&&Sa.delete(r),Ea(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||ga(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),ji(e)&&(e.addEventListener(`focus`,e=>Ta(e,i)),!ya(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var ka=new WeakMap,Aa,ja=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Mi(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ma=ja(`inline`,`width`,`offsetWidth`),Na=ja(`block`,`height`,`offsetHeight`);function Pa({target:e,borderBoxSize:t}){ka.get(e)?.forEach(n=>{n(e,{get width(){return Ma(e,t)},get height(){return Na(e,t)}})})}function Fa(e){e.forEach(Pa)}function Ia(){typeof ResizeObserver<`u`&&(Aa=new ResizeObserver(Fa))}function La(e,t){Aa||Ia();let n=Pi(e);return n.forEach(e=>{let n=ka.get(e);n||(n=new Set,ka.set(e,n)),n.add(t),Aa?.observe(e)}),()=>{n.forEach(e=>{let n=ka.get(e);n?.delete(t),n?.size||Aa?.unobserve(e)})}}var Ra=new Set,za;function Ba(){za=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ra.forEach(t=>t(e))},window.addEventListener(`resize`,za)}function Va(e){return Ra.add(e),za||Ba(),()=>{Ra.delete(e),!Ra.size&&typeof za==`function`&&(window.removeEventListener(`resize`,za),za=void 0)}}function Ha(e,t){return typeof e==`function`?Va(e):La(e,t)}var Ua={value:null,addProjectionMetrics:null};function Wa(e){return Mi(e)&&e.tagName===`svg`}var Ga=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ka=()=>({x:Ga(),y:Ga()}),qa=()=>({min:0,max:0}),q=()=>({x:qa(),y:qa()}),Ja=new WeakMap;function Ya(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function Xa(e){return typeof e==`string`||Array.isArray(e)}var Za=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Qa=[`initial`,...Za];function $a(e){if(Ya(e.animate))return!0;for(let t=0;t<Qa.length;t++)if(Xa(e[Qa[t]]))return!0;return!1}function eo(e){return!!($a(e)||e.variants)}function to(e,t,n){for(let r in t){let i=t[r],a=n[r];if(U(i))e.addValue(r,i);else if(U(a))e.addValue(r,Wr(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Wr(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var no={current:null},ro={current:!1},io=typeof window<`u`;function ao(){if(ro.current=!0,io){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>no.current=e.matches;e.addEventListener(`change`,t),t()}else no.current=!1}}var oo=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],so={};function co(e){so=e}function lo(){return so}var uo=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){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=cr,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 e=N.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,A.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=$a(t),this.isVariantNode=eo(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&U(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Ja.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ro.current||ao(),this.shouldReduceMotion=no.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 t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&jr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new xr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:O(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Kn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&A.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in so){let t=so[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):q()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<oo.length;t++){let n=oo[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=to(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Wr(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(b(n)||S(n))?n=parseFloat(n):typeof n!=`number`&&!z.test(n)&&z.test(t)&&(n=jn(e,t)),this.setBaseTarget(e,U(n)?n.get():n)),U(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=ai(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!U(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new D),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){la.render(this.render)}},fo=class extends uo{constructor(){super(...arguments),this.KeyframeResolver=ki}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;U(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},J=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function po(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function mo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ho={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(L.test(e))e=parseFloat(e);else return e}return`${mo(e,t.target.x)}% ${mo(e,t.target.y)}%`}},go={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=z.parse(e);if(i.length>5)return r;let a=z.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=B(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},_o={borderRadius:{...ho,applyTo:[...Ai]},borderTopLeftRadius:ho,borderTopRightRadius:ho,borderBottomLeftRadius:ho,borderBottomRightRadius:ho,boxShadow:go};function vo(e,{layout:t,layoutId:n}){return Kn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!_o[e]||e===`opacity`)}function yo(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(U(r[t])||i&&U(i[t])||vo(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function bo(e){return window.getComputedStyle(e)}var xo=class extends fo{constructor(){super(...arguments),this.type=`html`,this.renderInstance=po}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(Kn.has(t))return this.projection?.isProjecting?Vn(t):Un(e,t);{let n=bo(e),r=(Me(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return sa(e,t)}build(e,t,n){Ri(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return yo(e,t,n)}},So=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`]),Co=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function wo(e,t,n,r){po(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(So.has(n)?n:pi(n),t.attrs[n])}function To(e,t,n){let r=yo(e,t,n);for(let n in e)if(U(e[n])||U(t[n])){let t=Gn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Eo=class extends fo{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=q}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Kn.has(t)){let e=kn(t);return e&&e.default||0}if(Hi.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=So.has(t)?t:pi(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return To(e,t,n)}build(e,t,n){Ui(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){wo(e,t,n,r)}mount(e){this.isSVGTag=Co(e.tagName),super.mount(e)}},Do=Qa.length;function Oo(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Oo(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<Do;n++){let r=Qa[n],i=e.props[r];(Xa(i)||i===!1)&&(t[r]=i)}return t}function ko(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Ao=[...Za].reverse(),jo=Za.length;function Mo(e){return t=>Promise.all(t.map(({animation:t,options:n})=>xi(e,t,n)))}function No(e){let t=Mo(e),n=Fo(),r=!0,i=!1,a=t=>(n,r)=>{let i=H(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=Oo(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<jo;t++){let p=Ao[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=Xa(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||Ya(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=Po(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=si(t)&&si(n)?!ko(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=H(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=zr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=H(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Fo(),i=!0}}}function Po(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!ko(t,e):!1}function Y(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fo(){return{animate:Y(!0),whileInView:Y(),whileHover:Y(),whileTap:Y(),whileDrag:Y(),whileFocus:Y(),exit:Y()}}function Io(e,t){e.min=t.min,e.max=t.max}function X(e,t){Io(e.x,t.x),Io(e.y,t.y)}function Lo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ro=.9999,zo=1.0001,Bo=-.01,Vo=.01;function Z(e){return e.max-e.min}function Ho(e,t,n){return Math.abs(e-t)<=n}function Uo(e,t,n,r=.5){e.origin=r,e.originPoint=B(t.min,t.max,e.origin),e.scale=Z(n)/Z(t),e.translate=B(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ro&&e.scale<=zo||isNaN(e.scale))&&(e.scale=1),(e.translate>=Bo&&e.translate<=Vo||isNaN(e.translate))&&(e.translate=0)}function Wo(e,t,n,r){Uo(e.x,t.x,n.x,r?r.originX:void 0),Uo(e.y,t.y,n.y,r?r.originY:void 0)}function Go(e,t,n,r=0){e.min=(r?B(n.min,n.max,r):n.min)+t.min,e.max=e.min+Z(t)}function Ko(e,t,n,r){Go(e.x,t.x,n.x,r?.x),Go(e.y,t.y,n.y,r?.y)}function qo(e,t,n,r=0){let i=r?B(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Z(t)}function Jo(e,t,n,r){qo(e.x,t.x,n.x,r?.x),qo(e.y,t.y,n.y,r?.y)}function Yo(e,t,n,r,i){return e-=t,e=Zi(e,1/n,r),i!==void 0&&(e=Zi(e,1/i,r)),e}function Xo(e,t=0,n=1,r=.5,i,a=e,o=e){if(I.test(t)&&(t=parseFloat(t),t=B(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=B(a.min,a.max,r);e===a&&(s-=t),e.min=Yo(e.min,t,n,s,i),e.max=Yo(e.max,t,n,s,i)}function Zo(e,t,[n,r,i],a,o){Xo(e,t[n],t[r],t[i],t.scale,a,o)}var Qo=[`x`,`scaleX`,`originX`],$o=[`y`,`scaleY`,`originY`];function es(e,t,n,r){Zo(e.x,t,Qo,n?n.x:void 0,r?r.x:void 0),Zo(e.y,t,$o,n?n.y:void 0,r?r.y:void 0)}function ts(e){return e.translate===0&&e.scale===1}function ns(e){return ts(e.x)&&ts(e.y)}function rs(e,t){return e.min===t.min&&e.max===t.max}function is(e,t){return rs(e.x,t.x)&&rs(e.y,t.y)}function as(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function os(e,t){return as(e.x,t.x)&&as(e.y,t.y)}function ss(e){return Z(e.x)/Z(e.y)}function cs(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Q(e){return[e(`x`),e(`y`)]}function ls(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var us=Ai.length,ds=e=>typeof e==`string`?parseFloat(e):e,fs=e=>typeof e==`number`||L.test(e);function ps(e,t,n,r,i,a){i?(e.opacity=B(0,n.opacity??1,hs(r)),e.opacityExit=B(t.opacity??1,0,gs(r))):a&&(e.opacity=B(t.opacity??1,n.opacity??1,r));for(let i=0;i<us;i++){let a=Ai[i],o=ms(t,a),s=ms(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||fs(o)===fs(s)?(e[a]=Math.max(B(ds(o),ds(s),r),0),(I.test(s)||I.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=B(t.rotate||0,n.rotate||0,r))}function ms(e,t){return e[t]===void 0?e.borderRadius:e[t]}var hs=_s(0,.5,pe),gs=_s(.5,.95,w);function _s(e,t,n){return r=>r<e?0:r>t?1:n(E(e,t,r))}function vs(e,t,n){let r=U(e)?e:Wr(e);return r.start(ei(``,r,t,n)),r.animation}function ys(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var bs=(e,t)=>e.depth-t.depth,xs=class{constructor(){this.children=[],this.isDirty=!1}add(e){g(this.children,e),this.isDirty=!0}remove(e){_(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(bs),this.isDirty=!1,this.children.forEach(e)}};function Ss(e,t){let n=N.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(j(r),e(a-t))};return A.setup(r,!0),()=>j(r)}function Cs(e){return U(e)?e.get():e}var ws=class{constructor(){this.members=[]}add(e){g(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(_(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(_(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.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)}},Ts={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Es={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Ds=[``,`X`,`Y`,`Z`],Os=1e3,ks=0;function As(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function js(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=hi(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,A,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&js(r)}function Ms({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=ks++,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.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ua.value&&(Es.nodes=Es.calculatedTargetDeltas=Es.calculatedProjections=0),this.nodes.forEach(Fs),this.nodes.forEach(Ws),this.nodes.forEach(Gs),this.nodes.forEach(Is),Ua.addProjectionMetrics&&Ua.addProjectionMetrics(Es)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new xs)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new D),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Mi(t)&&!Wa(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;A.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Ss(i,250),Ts.hasAnimatedSinceResize&&(Ts.hasAnimatedSinceResize=!1,this.nodes.forEach(Us)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Qs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!os(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Kr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Us(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.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(Ks),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&js(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(zs),this.nodes.forEach(Rs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Bs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Vs),this.nodes.forEach(Hs),this.nodes.forEach(Ns),this.nodes.forEach(Ps)):this.nodes.forEach(Bs),this.clearAllSnapshots();let e=N.now();M.delta=v(0,1e3/60,e-M.timestamp),M.timestamp=e,M.isProcessing=!0,De.update.process(M),De.preRender.process(M),De.render.process(M),M.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,la.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ls),this.sharedNodes.forEach(qs)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,A.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){A.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Z(this.snapshot.measuredBox.x)&&!Z(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 e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=q(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!ns(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||W(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),nc(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return q();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ic))){let{scroll:e}=this.root;e&&(G(t.x,e.offset.x),G(t.y,e.offset.y))}return t}removeElementScroll(e){let t=q();if(X(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&X(t,e),G(t.x,i.offset.x),G(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||q();X(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(G(r.x,-n.scroll.offset.x),G(r.y,-n.scroll.offset.y)),W(n.latestValues)&&oa(r,n.latestValues,n.layout?.layoutBox)}return W(this.latestValues)&&oa(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=q();X(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!W(n.latestValues))continue;let r;n.instance&&(Ji(n.latestValues)&&n.updateSnapshot(),r=q(),X(r,n.measurePageBox())),es(t,n.latestValues,n.snapshot?.layoutBox,r)}return W(this.latestValues)&&es(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}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!==M.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=M.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=q(),this.targetWithTransforms=q()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ko(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):X(this.target,this.layout.layoutBox),ea(this.target,this.targetDelta)):X(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Ua.value&&Es.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Ji(this.parent.latestValues)||Yi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=q(),this.relativeTargetOrigin=q(),Jo(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),X(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===M.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;X(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;ra(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=q());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Lo(this.prevProjectionDelta.x,this.projectionDelta.x),Lo(this.prevProjectionDelta.y,this.projectionDelta.y)),Wo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!cs(this.projectionDelta.x,this.prevProjectionDelta.x)||!cs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Ua.value&&Es.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ka(),this.projectionDelta=Ka(),this.projectionDeltaWithTransform=Ka()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=Ka();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=q(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(Zs));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=B(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=B(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Js(o.x,e.x,n),Js(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jo(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Xs(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&is(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=q(),X(f,this.relativeTarget)),c&&(this.animationValues=a,ps(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(j(this.pendingAnimation),void 0),this.pendingAnimation=A.update(()=>{Ts.hasAnimatedSinceResize=!0,this.motionValue||=Wr(0),this.motionValue.jump(0,!1),this.currentAnimation=vs(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),_n(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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Os),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&rc(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||q();let t=Z(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=Z(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}X(t,i),oa(t,r),Wo(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ws),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&As(`z`,e,r,this.animationValues);for(let t=0;t<Ds.length;t++)As(`rotate${Ds[t]}`,e,r,this.animationValues),As(`skew${Ds[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Cs(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Cs(t?.pointerEvents)||``),this.hasProjected&&!W(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=ls(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in _o){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=_o[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Cs(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Rs),this.root.sharedNodes.clear()}}}function Ns(e){e.updateLayout()}function Ps(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)Q(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Z(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Io(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else rc(i,t.layoutBox,n)&&Q(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Z(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=Ka();Wo(o,n,t.layoutBox);let s=Ka();a?Wo(s,e.applyTransform(r,!0),t.measuredBox):Wo(s,n,t.layoutBox);let c=!ns(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=q();Jo(s,t.layoutBox,i.layoutBox,o);let c=q();Jo(c,n,a.layoutBox,o),os(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Fs(e){Ua.value&&Es.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Is(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ls(e){e.clearSnapshot()}function Rs(e){e.clearMeasurements()}function zs(e){e.isLayoutDirty=!0,e.updateLayout()}function Bs(e){e.isLayoutDirty=!1}function Vs(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Hs(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Us(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ws(e){e.resolveTargetDelta()}function Gs(e){e.calcProjection()}function Ks(e){e.resetSkewAndRotation()}function qs(e){e.removeLeadSnapshot()}function Js(e,t,n){e.translate=B(t.translate,0,n),e.scale=B(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ys(e,t,n,r){e.min=B(t.min,n.min,r),e.max=B(t.max,n.max,r)}function Xs(e,t,n,r){Ys(e.x,t.x,n.x,r),Ys(e.y,t.y,n.y,r)}function Zs(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Qs={duration:.45,ease:[.4,0,.1,1]},$s=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ec=$s(`applewebkit/`)&&!$s(`chrome/`)?Math.round:w;function tc(e){e.min=ec(e.min),e.max=ec(e.max)}function nc(e){tc(e.x),tc(e.y)}function rc(e,t,n){return e===`position`||e===`preserve-aspect`&&!Ho(ss(t),ss(n),.2)}function ic(e){return e!==e.root&&e.scroll?.wasRoot}var ac=Ms({attachResizeListener:(e,t)=>ys(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),oc={current:void 0},sc=Ms({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!oc.current){let e=new ac({});e.mount(window),e.setOptions({layoutScroll:!0}),oc.current=e}return oc.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),cc=(0,d.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function lc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function uc(...e){return t=>{let n=!1,r=e.map(e=>{let r=lc(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():lc(e[t],null)}}}}function dc(...e){return d.useCallback(uc(...e),e)}var $=r(),fc=class extends d.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(ji(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=ji(e)&&e.offsetWidth||0,r=ji(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function pc({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,d.useId)(),s=(0,d.useRef)(null),c=(0,d.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:l}=(0,d.useContext)(cc),u=dc(s,a===!1?void 0:e.props?.ref??e?.ref);return(0,d.useInsertionEffect)(()=>{let{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!u)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);l&&(y.nonce=l);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
3
+ [data-motion-pop-id="${o}"] {
4
+ position: absolute !important;
5
+ width: ${e}px !important;
6
+ height: ${u}px !important;
7
+ ${_}px !important;
8
+ ${v}px !important;
9
+ }
10
+ `),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,$.jsx)(fc,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:d.cloneElement(e,{ref:u})})}var mc=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=p(hc),f=(0,d.useId)(),g=(0,d.useRef)(n),_=(0,d.useRef)(r);m(()=>{g.current=n,_.current=r});let v=!0,y=(0,d.useMemo)(()=>(v=!1,{id:f,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!g.current&&!u.size&&_.current?.()})}),[n,u,r]);return a&&v&&(y={...y}),(0,d.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),d.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,$.jsx)(pc,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,$.jsx)(h.Provider,{value:y,children:e})};function hc(){return new Map}function gc(e=!0){let t=(0,d.useContext)(h);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,d.useId)();(0,d.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,d.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var _c=e=>e.key||``;function vc(e){let t=[];return d.Children.forEach(e,e=>{(0,d.isValidElement)(e)&&t.push(e)}),t}var yc=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,h]=gc(o),g=(0,d.useMemo)(()=>vc(e),[e]),_=o&&!u?[]:g.map(_c),v=(0,d.useRef)(!0),y=(0,d.useRef)(g),b=p(()=>new Map),x=(0,d.useRef)(new Set),[S,C]=(0,d.useState)(g),[w,T]=(0,d.useState)(g);m(()=>{o&&!u&&!w.length&&h?.()},[u,o,w.length,h]),m(()=>{v.current=!1,y.current=g;for(let e=0;e<w.length;e++){let t=_c(w[e]);_.includes(t)?(b.delete(t),x.current.delete(t)):b.get(t)!==!0&&b.set(t,!1)}},[w,_.length,_.join(`-`)]);let E=[];if(g!==S){let e=[...g],t=0;for(let n of w){let r=_.indexOf(_c(n));r===-1?(e.splice(t++,0,n),E.push(n)):t=r+E.length+1}return a===`wait`&&E.length&&(e=E),T(vc(e)),C(g),null}let{forceRender:D}=(0,d.useContext)(f);return(0,$.jsx)($.Fragment,{children:w.map(e=>{let d=_c(e),f=o&&!u?!1:g===w||_.includes(d);return(0,$.jsx)(mc,{isPresent:f,initial:!v.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:f?void 0:()=>{if(x.current.has(d))return;if(b.has(d))x.current.add(d),b.set(d,!0);else return;let e=!0;b.forEach(t=>{t||(e=!1)}),e&&(D?.(),T(y.current),o&&h?.(),r&&r())},anchorX:s,anchorY:c,children:e},d)})})},bc=(0,d.createContext)({strict:!1}),xc={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`]},Sc=!1;function Cc(){if(Sc)return;let e={};for(let t in xc)e[t]={isEnabled:e=>xc[t].some(t=>!!e[t])};co(e),Sc=!0}function wc(){return Cc(),lo()}function Tc(e){let t=wc();for(let n in e)t[n]={...t[n],...e[n]};co(t)}var Ec=(0,d.createContext)({});function Dc(e,t){if($a(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Xa(t)?t:void 0,animate:Xa(n)?n:void 0}}return e.inherit===!1?{}:t}function Oc(e){let{initial:t,animate:n}=Dc(e,(0,d.useContext)(Ec));return(0,d.useMemo)(()=>({initial:t,animate:n}),[kc(t),kc(n)])}function kc(e){return Array.isArray(e)?e.join(` `):e}var Ac=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jc(e,t,n){for(let r in t)!U(t[r])&&!vo(r,n)&&(e[r]=t[r])}function Mc({transformTemplate:e},t){return(0,d.useMemo)(()=>{let n=Ac();return Ri(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Nc(e,t){let n=e.style||{},r={};return jc(r,n,e),Object.assign(r,Mc(e,t)),r}function Pc(e,t){let n={},r=Nc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Fc=()=>({...Ac(),attrs:{}});function Ic(e,t,n,r){let i=(0,d.useMemo)(()=>{let n=Fc();return Ui(n,t,Co(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};jc(t,e.style,e),i.style={...t,...i.style}}return i}var Lc=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Rc(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Lc.has(e)}function zc(e,t){return e.startsWith(`on`)?!Rc(e):t?.(e)??!Rc(e)}function Bc(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(U(e[a])||(zc(a,r)||n===!0&&Rc(a)||!t&&!Rc(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var Vc=[`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 Hc(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Vc.indexOf(e)>-1||/[A-Z]/u.test(e))}function Uc(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Hc(e)?Ic:Pc)(t,r,i,e),l=Bc(t,typeof e==`string`,a,s),u=e===d.Fragment?{}:{...l,...c,ref:n},{children:f}=t,p=(0,d.useMemo)(()=>U(f)?f.get():f,[f]);return(0,d.createElement)(e,{...u,children:p})}function Wc({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Gc(n,r,i,e),renderState:t()}}function Gc(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Cs(a[e]);let{initial:o,animate:s}=e,c=$a(e),l=eo(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Ya(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=ai(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Kc=e=>(t,n)=>{let r=(0,d.useContext)(Ec),i=(0,d.useContext)(h),a=()=>Wc(e,t,r,i);return n?a():p(a)},qc=Kc({scrapeMotionValuesFromProps:yo,createRenderState:Ac}),Jc=Kc({scrapeMotionValuesFromProps:To,createRenderState:Fc}),Yc=Symbol.for(`motionComponentSymbol`);function Xc(e,t,n){let r=(0,d.useRef)(n);(0,d.useInsertionEffect)(()=>{r.current=n});let i=(0,d.useRef)(null);return(0,d.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var Zc=(0,d.createContext)({});function Qc(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function $c(e,t,n,r,i,a){let{visualElement:o}=(0,d.useContext)(Ec),s=(0,d.useContext)(bc),c=(0,d.useContext)(h),l=(0,d.useContext)(cc),u=l.reducedMotion,f=l.skipAnimations,p=(0,d.useRef)(null),g=(0,d.useRef)(!1);r||=s.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:f,isSVG:a}),g.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let _=p.current,v=(0,d.useContext)(Zc);_&&!_.projection&&i&&(_.type===`html`||_.type===`svg`)&&el(p.current,n,i,v);let y=(0,d.useRef)(!1);(0,d.useInsertionEffect)(()=>{_&&y.current&&_.update(n,c)});let b=n[mi],x=(0,d.useRef)(!!b&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return m(()=>{g.current&&_&&(_.animationState?.animateChanges(),_.enteringChildren=void 0)},[]),m(()=>{g.current=!0,_&&(y.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),x.current&&_.animationState&&_.animationState.animateChanges())}),(0,d.useEffect)(()=>{_&&(!x.current&&_.animationState&&_.animationState.animateChanges(),x.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),!1),_.enteringChildren=void 0)}),_}function el(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:tl(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Qc(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function tl(e){if(e)return e.options.allowProjection===!1?tl(e.parent):e.projection}function nl(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Tc(r);let a=n?n===`svg`:Hc(e),o=a?Jc:qc;function s(n,s){let c,l={...(0,d.useContext)(cc),...n,layoutId:rl(n)},{isStatic:u,isValidProp:f}=l,p=Oc(n),m=o(n,u);if(!u&&typeof window<`u`){il(l,r);let t=al(l);c=t.MeasureLayout,p.visualElement=$c(e,m,l,i,t.ProjectionNode,a)}return(0,$.jsxs)(Ec.Provider,{value:p,children:[c&&p.visualElement?(0,$.jsx)(c,{visualElement:p.visualElement,...l}):null,Uc(e,n,Xc(m,p.visualElement,s),m,u,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,d.forwardRef)(s);return c[Yc]=e,c}function rl({layoutId:e}){let t=(0,d.useContext)(f).id;return t&&e!==void 0?t+`-`+e:e}function il(e,t){(0,d.useContext)(bc).strict}function al(e){let{drag:t,layout:n}=wc();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function ol(e,t){if(typeof Proxy>`u`)return nl;let n=new Map,r=(n,r)=>nl(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,nl(a,void 0,e,t)),n.get(a))})}var sl=(e,t)=>t.isSVG??Hc(e)?new Eo(t):new xo(t,{allowProjection:e!==d.Fragment}),cl=class extends J{constructor(e){super(e),e.animationState||=No(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ya(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},ll=0,ul={animation:{Feature:cl},exit:{Feature:class extends J{constructor(){super(...arguments),this.id=ll++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=H(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.blockInitialAnimation=!1,this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1,this.exitAnimation=void 0;return}let r=this.exitAnimation=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.exitAnimation===r&&(this.isExitComplete=!0,t(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function dl(e){return{point:{x:e.pageX,y:e.pageY}}}var fl=e=>t=>_a(t)&&e(t,dl(t));function pl(e,t,n,r){return ys(e,t,fl(n),r)}var ml=({current:e})=>e?e.ownerDocument.defaultView:null,hl=(e,t)=>Math.abs(e-t);function gl(e,t){let n=hl(e.x,t.x),r=hl(e.y,t.y);return Math.sqrt(n**2+r**2)}var _l=new Set([`auto`,`scroll`]),vl=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){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=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=yl(this.lastRawMoveEventInfo,this.transformPagePoint));let e=xl(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=gl(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:N.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=yl(t,this.transformPagePoint),this.hasPendingMove=!0,A.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=xl(e.type===`pointercancel`?this.lastMoveEventInfo:yl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!_a(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=yl(dl(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=M;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,xl(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=T(pl(this.contextWindow,`pointermove`,this.handlePointerMove,d),pl(this.contextWindow,`pointerup`,this.handlePointerUp,d),pl(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(_l.has(e.overflowX)||_l.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.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 t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),A.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 yl(e,t){return t?{point:t(e.point)}:e}function bl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xl({point:e},t){return{point:e,delta:bl(e,Cl(t)),offset:bl(e,Sl(t)),velocity:wl(t,.1)}}function Sl(e){return e[0]}function Cl(e){return e[e.length-1]}function wl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Cl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>O(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>O(t)*2&&(r=e[1]);let a=k(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Tl(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?B(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?B(n,e,r.max):Math.min(e,n)),e}function El(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Dl(e,{top:t,left:n,bottom:r,right:i}){return{x:El(e.x,n,i),y:El(e.y,t,r)}}function Ol(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function kl(e,t){return{x:Ol(e.x,t.x),y:Ol(e.y,t.y)}}function Al(e,t){let n=.5,r=Z(e),i=Z(t);return i>r?n=E(t.min,t.max-r,e.min):r>i&&(n=E(e.min,e.max-i,t.min)),v(0,1,n)}function jl(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var Ml=.35;function Nl(e=Ml){return e===!1?e=0:e===!0&&(e=Ml),{x:Pl(e,`left`,`right`),y:Pl(e,`top`,`bottom`)}}function Pl(e,t,n){return{min:Fl(e,t),max:Fl(e,n)}}function Fl(e,t){return typeof e==`number`?e:e[t]||0}var Il=new WeakMap,Ll=class{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=q(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=fa(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Q(e=>{let t=this.getAxisMotionValue(e).get()||0;if(I.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Z(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&A.update(()=>i(e,t),!1,!0),fi(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Vl(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&A.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new vl(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:ml(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&A.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Bl(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Tl(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Qc(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?Dl(n.layoutBox,e):!1,this.elastic=Nl(t),r!==this.constraints&&!Qc(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Q(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=jl(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Qc(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=ca(n,r.root,this.visualElement.getTransformPagePoint()),a=kl(r.layout.layoutBox,i);if(t){let e=t(Gi(a));this.hasMutatedConstraints=!!e,e&&(a=Wi(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Q(o=>{if(!Bl(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return fi(this.visualElement,e),n.start(ei(e,n,0,t,this.visualElement,!1))}stopAnimation(){Q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();Q(e=>{if(!Bl(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-B(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Qc(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};Q(e=>{let t=this.getAxisMotionValue(e).get();i[e]=Al({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Q(t=>{let n=this.getAxisMotionValue(t);if(!Bl(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(B(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Il.set(this.visualElement,this);let e=this.visualElement.current,t=pl(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&xa(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Qc(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=zl(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),A.read(r);let o=ys(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Q(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Ml,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Rl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function zl(e,t,n){let r=Ha(e,Rl(n)),i=Ha(t,Rl(n));return()=>{r(),i()}}function Bl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Vl(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Hl=class extends J{constructor(e){super(e),this.removeGroupControls=w,this.removeListeners=w,this.controls=new Ll(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||w}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Ul=e=>(t,n)=>{e&&A.update(()=>e(t,n),!1,!0)},Wl=class extends J{constructor(){super(...arguments),this.removePointerDownListener=w}onPointerDown(e){this.session=new vl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ml(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ul(e),onStart:Ul(t),onMove:Ul(n),onEnd:(e,t)=>{delete this.session,r&&A.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=pl(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Gl=!1,Kl=class extends d.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Gl&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Ts.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Gl=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||A.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),la.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Gl=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function ql(e){let[t,n]=gc(),r=(0,d.useContext)(f);return(0,$.jsx)(Kl,{...e,layoutGroup:r,switchLayoutGroup:(0,d.useContext)(Zc),isPresent:t,safeToRemove:n})}var Jl={pan:{Feature:Wl},drag:{Feature:Hl,ProjectionNode:sc,MeasureLayout:ql}};function Yl(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&A.postRender(()=>i(t,dl(t)))}var Xl=class extends J{mount(){let{current:e}=this.node;e&&(this.unmount=ha(e,(e,t)=>(Yl(this.node,t,`Start`),e=>Yl(this.node,e,`End`))))}unmount(){}},Zl=class extends J{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=T(ys(this.node.current,`focus`,()=>this.onFocus()),ys(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Ql(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&A.postRender(()=>i(t,dl(t)))}var $l=class extends J{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Oa(e,(e,t)=>(Ql(this.node,t,`Start`),(e,{success:t})=>Ql(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},eu=new WeakMap,tu=new WeakMap,nu=e=>{let t=eu.get(e.target);t&&t(e)},ru=e=>{e.forEach(nu)};function iu({root:e,...t}){let n=e||document;tu.has(n)||tu.set(n,{});let r=tu.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ru,{root:e,...t})),r[i]}function au(e,t,n){let r=iu(t);return eu.set(e,n),r.observe(e),()=>{eu.delete(e),r.unobserve(e)}}var ou={some:0,all:1},su=class extends J{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:ou[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=au(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(cu(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function cu({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var lu={inView:{Feature:su},tap:{Feature:$l},focus:{Feature:Zl},hover:{Feature:Xl}},uu={layout:{ProjectionNode:sc,MeasureLayout:ql}},du=ol({...ul,...lu,...Jl,...uu},sl),fu=(0,d.lazy)(()=>n(()=>import(`./Chat-CeEDA28S.js`).then(e=>({default:e.Chat})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]))),pu=56,mu=24;function hu(){let[e,t]=(0,d.useState)(!1),[n,r]=(0,d.useState)(!1),[i,l]=(0,d.useState)(!1),[f,p]=s(`ApplicationChatOpen`,!1),[m,h]=o(a.ApplicationChatPosition,{x:-40,y:-40}),[g,_]=o(a.ApplicationChatWidth,600),v=(0,d.useRef)(null);(0,d.useEffect)(()=>{let e=()=>{let e=window.innerWidth<768;t(e),!e&&g>window.innerWidth&&_(window.innerWidth)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[g,_]);let y=(0,d.useCallback)(e=>{e.preventDefault(),l(!0)},[]);(0,d.useEffect)(()=>{if(!i)return;let e=e=>{let t=window.innerWidth-e.clientX,n=Math.min(Math.max(t,300),window.innerWidth);_(n)},t=()=>{l(!1)};return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t)}},[i,_]);let b=(0,d.useCallback)(()=>{n||p(e=>!e)},[n]),x=(0,d.useCallback)(()=>{p(!1)},[]);return(0,d.useEffect)(()=>{if(f){let e=e=>{e.key===`Escape`&&x()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)}},[f,x]),(0,$.jsxs)(`div`,{className:`fixed inset-0 pointer-events-none z-50`,ref:v,children:[(0,$.jsx)(yc,{children:f&&(0,$.jsxs)(du.div,{initial:e?{opacity:0,y:`100%`}:{opacity:0,x:`100%`},animate:e?{opacity:1,y:0}:{opacity:1,x:0},exit:e?{opacity:0,y:`100%`}:{opacity:0,x:`100%`},transition:{type:`spring`,damping:25,stiffness:200},style:e?{}:{top:0,bottom:0,right:0,width:g,maxWidth:`100vw`},className:`
11
+ pointer-events-auto
12
+ fixed bg-background shadow-2xl border-l border-border overflow-visible
13
+ ${e?`inset-0 w-full h-full rounded-none`:`h-full`}
14
+ `,children:[!e&&(0,$.jsx)(`div`,{onMouseDown:y,className:`
15
+ absolute left-0 top-0 bottom-0 w-1 cursor-ew-resize
16
+ hover:bg-primary transition-colors z-50
17
+ ${i?`bg-primary`:``}
18
+ `}),(0,$.jsx)(d.Suspense,{fallback:(0,$.jsx)(c,{centered:!0,text:`Loading chat…`}),children:(0,$.jsx)(fu,{autoFocus:!0,closeChat:x})})]})}),!f&&(0,$.jsx)(du.button,{drag:!0,dragMomentum:!1,dragConstraints:v,onDragStart:()=>{r(!1)},onDrag:(e,t)=>{(Math.abs(t.offset.x)>5||Math.abs(t.offset.y)>5)&&r(!0)},onDragEnd:(t,n)=>{if(setTimeout(()=>{r(!1)},100),e)return;let{innerWidth:i,innerHeight:a}=window,o=m.x+n.offset.x,s=m.y+n.offset.y,c=n.point.x,l=i-n.point.x,u=n.point.y,d=a-n.point.y,f=o,p=s;c<100?f=-(i-pu-48):l<100&&(f=0),u<100?p=-(a-pu-48):d<100&&(p=0),h({x:f,y:p})},initial:{x:m.x,y:m.y},whileHover:{scale:1.1},whileTap:{scale:.9},onClick:b,style:{bottom:mu,right:mu},className:`
19
+ pointer-events-auto
20
+ fixed w-14 h-14 rounded-full bg-primary
21
+ text-primary-foreground shadow-lg flex items-center justify-center cursor-pointer
22
+ hover:bg-primary/90 transition-colors
23
+ `,children:(0,$.jsx)(u,{size:28})})]})}export{hu as FloatingChat,u as n,du as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{a as t}from"./vendor-datadog-ozKf-pts.js";import{r as n}from"./vendor-react-BOliS0BL.js";import{D as r,Y as i,k as a}from"./vendor-tanstack-Bntfka-M.js";import{Ar as o,Jr as s,Zr as c,ar as l,bn as u,kr as d,ln as f,wn as p,xn as m,yn as h}from"./index-DMUQ34Jl.js";var g=e(t(),1);function _(e,t){return c(e).filter(e=>!e.locked).flatMap(n=>{let r=t.get(n.id);return[{key:`org:${n.id}`,name:n.name,kind:`Organization`,organizationName:n.name,organizationId:n.id,to:`/${n.id}`},...(r?.clusters??[]).filter(t=>t.status!==`TERMINATED`&&t.status!==`REMOVED`&&f(e,n.id,t.id).view).map(e=>({key:`cluster:${n.id}:${e.id}`,name:e.name||e.id,kind:`Cluster`,organizationName:n.name,organizationId:n.id,to:`/${n.id}/${e.id}`}))]}).map(e=>({...e,searchName:e.name.toLocaleLowerCase(),searchText:`${e.name} ${e.organizationName}`.toLocaleLowerCase(),searchWords:e.name.toLocaleLowerCase().split(/\s+/)}))}function v(e,t,n){let r=t.toLocaleLowerCase().trim().replace(/\s+/g,` `),i=r.split(` `).filter(Boolean);return e.flatMap(e=>{let t=e.searchName;return i.every(t=>e.searchText.includes(t))?[{target:e,rank:r?t===r?0:t.startsWith(r)?1:i.every(t=>e.searchWords.some(e=>e.startsWith(t)))?2:i.every(e=>t.includes(e))?3:4:e.kind===`Organization`?0:1}]:[]}).sort((e,t)=>e.rank-t.rank||Number(t.target.organizationId===n)-Number(e.target.organizationId===n)||Number(t.target.kind===`Organization`)-Number(e.target.kind===`Organization`)||e.target.name.localeCompare(t.target.name)||e.target.organizationName.localeCompare(t.target.organizationName)||e.target.key.localeCompare(t.target.key)).map(e=>e.target)}async function y(e,t,n,r){let i=0;await Promise.all(Array.from({length:Math.min(4,e.length)},async()=>{for(;!r()&&i<e.length;){let a=e[i++],o=null;try{o=await t(a)}catch{}r()||n(a,o)}}))}var b=n();function x({user:e,onClose:t,restoreFocus:n}){let f=i(),x=r(),{organizationId:S}=a({strict:!1}),[C,w]=(0,g.useState)(``),[T,E]=(0,g.useState)(null),[D,O]=(0,g.useState)(new Map),[k,A]=(0,g.useState)(0),[j,M]=(0,g.useState)(!0),[N,P]=(0,g.useState)(0),F=(0,g.useId)(),I=(0,g.useRef)(null),L=(0,g.useMemo)(()=>c(e).filter(e=>!e.locked),[e]),R=(0,g.useMemo)(()=>JSON.stringify(L.map(e=>e.id)),[L]);(0,g.useEffect)(()=>{let e=!1;return A(0),M(!0),y(JSON.parse(R),e=>f.fetchQuery({...l(e),staleTime:6e4,meta:{inlineSearchError:!0}}),(e,t)=>{t?O(n=>new Map(n).set(e,t)):(A(e=>e+1),O(t=>{let n=new Map(t);return n.delete(e),n}))},()=>e).then(()=>{e||M(!1)}),()=>{e=!0}},[f,R,N]);let z=(0,g.useMemo)(()=>_(e,D),[e,D]),B=(0,g.useMemo)(()=>v(z,C,S),[z,C,S]),V=B.slice(0,40),H=T===null?0:V.findIndex(e=>e.key===T);(0,g.useEffect)(()=>{I.current?.children[H]?.scrollIntoView({block:`nearest`})},[H]);let U=e=>{t(),x({to:e.to})};return(0,b.jsx)(h,{open:!0,onOpenChange:e=>{e||t()},children:(0,b.jsxs)(u,{className:`top-[18vh] translate-y-0 gap-0 overflow-hidden rounded-2xl p-0 lg:max-w-2xl`,onCloseAutoFocus:e=>{e.preventDefault(),n()},children:[(0,b.jsxs)(`div`,{className:`border-b border-border px-5 pt-5 pb-4`,children:[(0,b.jsx)(p,{className:`pr-8`,children:`Search your organizations`}),(0,b.jsx)(m,{className:`mt-2 text-xs`,children:`Jump to an organization or cluster by name.`}),(0,b.jsxs)(`div`,{className:`mt-4 flex items-center gap-3`,children:[(0,b.jsx)(o,{className:`size-5 shrink-0 text-muted-foreground`,"aria-hidden":`true`}),(0,b.jsx)(`input`,{autoFocus:!0,role:`combobox`,"aria-label":`Search organizations and clusters`,"aria-expanded":`true`,"aria-autocomplete":`list`,"aria-controls":F,"aria-activedescendant":V.length&&H>=0?`${F}-${H}`:void 0,placeholder:`Search organizations or clusters…`,value:C,onChange:e=>{w(e.target.value),E(null)},className:`w-full bg-transparent py-1 text-base outline-none`,onKeyDown:e=>{e.nativeEvent.isComposing||(e.key===`ArrowDown`||e.key===`ArrowUp`?(e.preventDefault(),E(V.length?V[H<0?e.key===`ArrowDown`?0:V.length-1:(H+(e.key===`ArrowDown`?1:-1)+V.length)%V.length].key:null)):e.key===`Enter`&&V[H]&&(e.preventDefault(),U(V[H])))}})]})]}),(0,b.jsx)(`div`,{role:`listbox`,"aria-label":`Search results`,id:F,ref:I,className:`max-h-[45vh] overflow-y-auto p-2`,children:V.map((e,t)=>{let n=e.kind===`Organization`?s:d;return(0,b.jsxs)(`div`,{id:`${F}-${t}`,role:`option`,"aria-selected":H===t,onMouseEnter:()=>E(e.key),onMouseDown:e=>e.preventDefault(),onClick:()=>U(e),className:`flex cursor-pointer items-center gap-3 rounded-lg px-3 py-3 ${H===t?`bg-primary/15 text-foreground`:`text-muted-foreground hover:bg-muted`}`,children:[(0,b.jsx)(`span`,{className:`rounded-lg border border-primary/20 bg-primary/10 p-2`,children:(0,b.jsx)(n,{className:`size-4`,"aria-hidden":`true`})}),(0,b.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,b.jsx)(`span`,{className:`block truncate text-sm font-medium text-foreground`,children:e.name}),(0,b.jsx)(`span`,{className:`block truncate text-xs`,children:e.kind===`Cluster`?`Cluster · ${e.organizationName}`:`Organization`})]}),(0,b.jsx)(`span`,{className:`text-xs opacity-50`,"aria-hidden":`true`,children:`↵`})]},e.key)})}),(0,b.jsxs)(`div`,{role:`status`,className:`border-t border-border px-5 py-3 text-xs text-muted-foreground`,children:[j?`Loading cluster names…`:V.length?`Showing ${V.length} of ${B.length} results`:L.length?`No matching organizations or clusters.`:`No organizations available to search.`,k>0&&(0,b.jsxs)(`p`,{className:`mt-2`,children:[`Some organizations could not be loaded. Results may be incomplete.`,` `,(0,b.jsx)(`button`,{type:`button`,className:`cursor-pointer underline`,disabled:j,onClick:()=>P(e=>e+1),children:`Retry`})]}),(0,b.jsx)(`p`,{className:`mt-2 opacity-70`,children:`↑ ↓ to choose · Enter to open · Esc to close`})]})]})})}export{x as SearchDialog};
@@ -1 +1 @@
1
- import{m as e,t}from"./mermaid-parser.core-C2lcH_jP.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as r}from"./src-D0vMJQRr.js";import"./chunk-O7XYJQB3-ep14zA23.js";import{n as i,r as a,t as o}from"./chunk-GTNCS2PH-DJ2BFvS1.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-BG5bjfIG.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
1
+ import{m as e,t}from"./mermaid-parser.core-V1UYMeXV.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{n as r}from"./src-D0vMJQRr.js";import"./chunk-O7XYJQB3-CBS3nZYV.js";import{n as i,r as a,t as o}from"./chunk-GTNCS2PH-DGHLXyow.js";import{t as s}from"./chunk-JWPE2WC7-DVXcaiue.js";import"./mermaid.core-1PX6R49U.js";var c=e().RailroadAbnf.parser.LangiumParser,l=n(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=n(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=n(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=n(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=n(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=n(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=n(e=>{s(e,o),e.title&&o.setTitle(e.title),e.rules.map(e=>o.addRule(m(e)))},`populateDb`),g={parser:{parse:n(e=>{o.clear(),r.debug(`[ABNF Parser] Starting Langium parse`);let n=c.parse(e);if(n.lexerErrors.length>0||n.parserErrors.length>0)throw new t(n);let i=n.value;r.debug(`[ABNF Parser] Parsed rules:`,i.rules.length),h(i),r.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:o}},db:o,renderer:a,styles:i};export{g as diagram};
@@ -0,0 +1 @@
1
+ import"./rolldown-runtime-Dd_uD5pT.js";import{t as e}from"./cn-6T8VranJ.js";import{a as t}from"./vendor-datadog-ozKf-pts.js";import{r as n}from"./vendor-react-BOliS0BL.js";import{n as r}from"./button-DWwfgGWI.js";import{_ as i,d as a,f as o,g as s,h as c,m as l,p as u,u as d}from"./vendor-ui-9EYYDgoN.js";t();var f=n();function p({...e}){return(0,f.jsx)(s,{"data-slot":`alert-dialog`,...e})}function m({...e}){return(0,f.jsx)(c,{"data-slot":`alert-dialog-portal`,...e})}function h({className:t,...n}){return(0,f.jsx)(l,{"data-slot":`alert-dialog-overlay`,className:e(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-white/80 backdrop-blur-xs dark:bg-black/50 dark:backdrop-blur-none`,t),...n})}function g({className:t,...n}){return(0,f.jsxs)(m,{children:[(0,f.jsx)(h,{}),(0,f.jsx)(o,{"data-slot":`alert-dialog-content`,className:e(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`,t),...n})]})}function _({className:t,...n}){return(0,f.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:e(`flex flex-col gap-2 text-center sm:text-left`,t),...n})}function v({className:t,...n}){return(0,f.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:e(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,t),...n})}function y({className:t,...n}){return(0,f.jsx)(i,{"data-slot":`alert-dialog-title`,className:e(`text-lg font-semibold`,t),...n})}function b({className:t,...n}){return(0,f.jsx)(u,{"data-slot":`alert-dialog-description`,className:e(`text-muted-foreground text-sm`,t),...n})}function x({className:t,...n}){return(0,f.jsx)(d,{className:e(r(),t),...n})}function S({className:t,...n}){return(0,f.jsx)(a,{className:e(r({variant:`outline`}),t),...n})}export{b as a,y as c,g as i,x as n,v as o,S as r,_ as s,p as t};
@@ -0,0 +1 @@
1
+ import{i as e}from"./rolldown-runtime-Dd_uD5pT.js";import{n as t}from"./cn-6T8VranJ.js";import{a as n}from"./vendor-datadog-ozKf-pts.js";import{r}from"./vendor-react-BOliS0BL.js";import{L as i}from"./vendor-tanstack-Bntfka-M.js";import{t as a}from"./button-DWwfgGWI.js";import{$r as o,Dn as s,Qr as c,Vr as l,Wr as u,ei as d,ni as f,sn as p,ti as m}from"./index-DMUQ34Jl.js";async function h(){let{data:e}=await t.post(`/Admin/ApiToken`,{});return e}function g(){return i({mutationFn:h,gcTime:0})}var _=e(n(),1),v=r();function y(){let{mutate:e,isPending:t,reset:n}=g(),[r,i]=(0,_.useState)(null),h=p();return(0,v.jsxs)(`div`,{className:`max-w-2xl`,children:[(0,v.jsx)(`h1`,{className:`text-2xl font-light`,children:`API Token`}),(0,v.jsxs)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:[`Generate a short-lived token for programmatic API access. It authenticates as you, with your permissions. Send it as a bearer token:`,` `,(0,v.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 text-xs`,children:`Authorization: Bearer <token>`})]}),(0,v.jsxs)(a,{className:`mt-4`,variant:`submit`,onClick:()=>{e(void 0,{onSuccess:e=>{i(e),n()}})},disabled:t,children:[(0,v.jsx)(l,{}),t?`Generating…`:`Generate token`]}),r&&(0,v.jsxs)(c,{className:`mt-6`,children:[(0,v.jsxs)(m,{children:[(0,v.jsx)(f,{children:`Your API token`}),(0,v.jsxs)(d,{children:[`Copy it now — it won't be shown again. Expires `,new Date(r.expiresAt).toLocaleString(),`.`]})]}),(0,v.jsxs)(o,{className:`flex items-center gap-2`,children:[(0,v.jsx)(s,{readOnly:!0,value:r.operationToken,className:`font-mono text-xs`,onClick:()=>h(r.operationToken)}),(0,v.jsx)(a,{type:`button`,size:`icon`,variant:`ghost`,className:`shrink-0`,"aria-label":`Copy token`,onClick:()=>h(r.operationToken),children:(0,v.jsx)(u,{})})]})]})]})}export{y as ApiTokenIndex};