@ours.network/messenger-server 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/chunks/{chunk-AXRJUIIU.js → chunk-A6EDEGE5.js} +1 -1
  2. package/dist/chunks/{server-LACRIC6M.js → server-G5T4HDA5.js} +113 -16
  3. package/dist/cli.js +2 -2
  4. package/dist/web/assets/{abnfDiagram-N423BO3Z-pM7Mbmij.js → abnfDiagram-N423BO3Z-FTP7iXLd.js} +2 -2
  5. package/dist/web/assets/{abnfDiagram-N423BO3Z-pM7Mbmij.js.map → abnfDiagram-N423BO3Z-FTP7iXLd.js.map} +1 -1
  6. package/dist/web/assets/{arc-ClKVG6mD.js → arc-DTCrAE0Z.js} +2 -2
  7. package/dist/web/assets/{arc-ClKVG6mD.js.map → arc-DTCrAE0Z.js.map} +1 -1
  8. package/dist/web/assets/{architectureDiagram-T3A2C74G-C4SRzoCE.js → architectureDiagram-T3A2C74G-BtYt9uFP.js} +2 -2
  9. package/dist/web/assets/{architectureDiagram-T3A2C74G-C4SRzoCE.js.map → architectureDiagram-T3A2C74G-BtYt9uFP.js.map} +1 -1
  10. package/dist/web/assets/{blockDiagram-VBNYF7ZC-GAEDsTwc.js → blockDiagram-VBNYF7ZC-CTIc4s6f.js} +2 -2
  11. package/dist/web/assets/{blockDiagram-VBNYF7ZC-GAEDsTwc.js.map → blockDiagram-VBNYF7ZC-CTIc4s6f.js.map} +1 -1
  12. package/dist/web/assets/{browser-DvYJInDg.js → browser-B-oaR5rG.js} +2 -2
  13. package/dist/web/assets/{browser-DvYJInDg.js.map → browser-B-oaR5rG.js.map} +1 -1
  14. package/dist/web/assets/{c4Diagram-5PPSVZJV-CGMy6OgD.js → c4Diagram-5PPSVZJV-Dr6s49sP.js} +2 -2
  15. package/dist/web/assets/{c4Diagram-5PPSVZJV-CGMy6OgD.js.map → c4Diagram-5PPSVZJV-Dr6s49sP.js.map} +1 -1
  16. package/dist/web/assets/channel-aobBaQkI.js +2 -0
  17. package/dist/web/assets/{channel-BE1VFGzt.js.map → channel-aobBaQkI.js.map} +1 -1
  18. package/dist/web/assets/{chunk-2GRJ4B5K-CXtrZU7_.js → chunk-2GRJ4B5K-qBTNtUp-.js} +2 -2
  19. package/dist/web/assets/{chunk-2GRJ4B5K-CXtrZU7_.js.map → chunk-2GRJ4B5K-qBTNtUp-.js.map} +1 -1
  20. package/dist/web/assets/{chunk-2Q5K7J3B-DpzUrrLf.js → chunk-2Q5K7J3B-Dg1kKzxG.js} +2 -2
  21. package/dist/web/assets/{chunk-2Q5K7J3B-DpzUrrLf.js.map → chunk-2Q5K7J3B-Dg1kKzxG.js.map} +1 -1
  22. package/dist/web/assets/{chunk-5RXB4S5H-DXomNS62.js → chunk-5RXB4S5H-DBc_C_PR.js} +2 -2
  23. package/dist/web/assets/{chunk-5RXB4S5H-DXomNS62.js.map → chunk-5RXB4S5H-DBc_C_PR.js.map} +1 -1
  24. package/dist/web/assets/{chunk-5VM5RSS4-DO1pE55v.js → chunk-5VM5RSS4-pIE6TJHb.js} +2 -2
  25. package/dist/web/assets/{chunk-5VM5RSS4-DO1pE55v.js.map → chunk-5VM5RSS4-pIE6TJHb.js.map} +1 -1
  26. package/dist/web/assets/{chunk-6Q2QTUOP-VwCXFYQB.js → chunk-6Q2QTUOP-tdiSfDud.js} +2 -2
  27. package/dist/web/assets/{chunk-6Q2QTUOP-VwCXFYQB.js.map → chunk-6Q2QTUOP-tdiSfDud.js.map} +1 -1
  28. package/dist/web/assets/{chunk-GF5L2VYU-DXKpdibg.js → chunk-GF5L2VYU-B04kdLnK.js} +2 -2
  29. package/dist/web/assets/{chunk-GF5L2VYU-DXKpdibg.js.map → chunk-GF5L2VYU-B04kdLnK.js.map} +1 -1
  30. package/dist/web/assets/{chunk-JWPE2WC7-eLDeLJYU.js → chunk-JWPE2WC7-BGSN9LRk.js} +2 -2
  31. package/dist/web/assets/{chunk-JWPE2WC7-eLDeLJYU.js.map → chunk-JWPE2WC7-BGSN9LRk.js.map} +1 -1
  32. package/dist/web/assets/{chunk-KBJHAD2P-DbaKvO9I.js → chunk-KBJHAD2P-YT85jNEx.js} +2 -2
  33. package/dist/web/assets/{chunk-KBJHAD2P-DbaKvO9I.js.map → chunk-KBJHAD2P-YT85jNEx.js.map} +1 -1
  34. package/dist/web/assets/{chunk-RYQCIY6F-Di3XYSyf.js → chunk-RYQCIY6F-QNGoAoDo.js} +2 -2
  35. package/dist/web/assets/{chunk-RYQCIY6F-Di3XYSyf.js.map → chunk-RYQCIY6F-QNGoAoDo.js.map} +1 -1
  36. package/dist/web/assets/{chunk-XXDRQBXY-BKU_fO74.js → chunk-XXDRQBXY-B8gcKTKr.js} +2 -2
  37. package/dist/web/assets/{chunk-XXDRQBXY-BKU_fO74.js.map → chunk-XXDRQBXY-B8gcKTKr.js.map} +1 -1
  38. package/dist/web/assets/classDiagram-JCYQIIEL-Bu95XfLO.js +2 -0
  39. package/dist/web/assets/{classDiagram-JCYQIIEL-DstM1bxq.js.map → classDiagram-JCYQIIEL-Bu95XfLO.js.map} +1 -1
  40. package/dist/web/assets/classDiagram-v2-OCEON4UE-Bu95XfLO.js +2 -0
  41. package/dist/web/assets/{classDiagram-v2-OCEON4UE-DstM1bxq.js.map → classDiagram-v2-OCEON4UE-Bu95XfLO.js.map} +1 -1
  42. package/dist/web/assets/{cose-bilkent-JH36ORCC-CxJ8bzCn.js → cose-bilkent-JH36ORCC-Dluq8e7v.js} +2 -2
  43. package/dist/web/assets/{cose-bilkent-JH36ORCC-CxJ8bzCn.js.map → cose-bilkent-JH36ORCC-Dluq8e7v.js.map} +1 -1
  44. package/dist/web/assets/{cynefin-VYW2F7L2-X1MbqUu-.js → cynefin-VYW2F7L2-DSb9ThRI.js} +2 -2
  45. package/dist/web/assets/{cynefin-VYW2F7L2-X1MbqUu-.js.map → cynefin-VYW2F7L2-DSb9ThRI.js.map} +1 -1
  46. package/dist/web/assets/{cynefinDiagram-MW4NZA55-C8eEwynB.js → cynefinDiagram-MW4NZA55-BuFa7EpH.js} +2 -2
  47. package/dist/web/assets/{cynefinDiagram-MW4NZA55-C8eEwynB.js.map → cynefinDiagram-MW4NZA55-BuFa7EpH.js.map} +1 -1
  48. package/dist/web/assets/{dagre-VZM6K2ZE-DM3k1ZuP.js → dagre-VZM6K2ZE-DYF6RUTZ.js} +2 -2
  49. package/dist/web/assets/{dagre-VZM6K2ZE-DM3k1ZuP.js.map → dagre-VZM6K2ZE-DYF6RUTZ.js.map} +1 -1
  50. package/dist/web/assets/{diagram-7IWD3JNH-BCzpI5_-.js → diagram-7IWD3JNH-BhHiJoB6.js} +2 -2
  51. package/dist/web/assets/{diagram-7IWD3JNH-BCzpI5_-.js.map → diagram-7IWD3JNH-BhHiJoB6.js.map} +1 -1
  52. package/dist/web/assets/{diagram-B4RE2ZJO-6OAoYjPb.js → diagram-B4RE2ZJO-6SQTSZd8.js} +2 -2
  53. package/dist/web/assets/{diagram-B4RE2ZJO-6OAoYjPb.js.map → diagram-B4RE2ZJO-6SQTSZd8.js.map} +1 -1
  54. package/dist/web/assets/{diagram-LBJQPF4R-Ghwi6FSb.js → diagram-LBJQPF4R-dkhbaEWM.js} +2 -2
  55. package/dist/web/assets/{diagram-LBJQPF4R-Ghwi6FSb.js.map → diagram-LBJQPF4R-dkhbaEWM.js.map} +1 -1
  56. package/dist/web/assets/{diagram-Q27KOJAE-Bu6sUiqr.js → diagram-Q27KOJAE-EVp0Wv2s.js} +2 -2
  57. package/dist/web/assets/{diagram-Q27KOJAE-Bu6sUiqr.js.map → diagram-Q27KOJAE-EVp0Wv2s.js.map} +1 -1
  58. package/dist/web/assets/{diagram-UB23O5K3-Cmm_vyfK.js → diagram-UB23O5K3-DhcySrBv.js} +2 -2
  59. package/dist/web/assets/{diagram-UB23O5K3-Cmm_vyfK.js.map → diagram-UB23O5K3-DhcySrBv.js.map} +1 -1
  60. package/dist/web/assets/{ebnfDiagram-BXEA7PRR-BC4WgF-c.js → ebnfDiagram-BXEA7PRR-D8Efv4El.js} +2 -2
  61. package/dist/web/assets/{ebnfDiagram-BXEA7PRR-BC4WgF-c.js.map → ebnfDiagram-BXEA7PRR-D8Efv4El.js.map} +1 -1
  62. package/dist/web/assets/{erDiagram-JOGREHBK-DqdBEze-.js → erDiagram-JOGREHBK-EZ9l1D0e.js} +2 -2
  63. package/dist/web/assets/{erDiagram-JOGREHBK-DqdBEze-.js.map → erDiagram-JOGREHBK-EZ9l1D0e.js.map} +1 -1
  64. package/dist/web/assets/{flowDiagram-UKHOOZJN-BWwrYsT-.js → flowDiagram-UKHOOZJN-DwoYBQFO.js} +2 -2
  65. package/dist/web/assets/{flowDiagram-UKHOOZJN-BWwrYsT-.js.map → flowDiagram-UKHOOZJN-DwoYBQFO.js.map} +1 -1
  66. package/dist/web/assets/{ganttDiagram-PKOTCBZU-DA1yES44.js → ganttDiagram-PKOTCBZU-BQ1R8JUB.js} +2 -2
  67. package/dist/web/assets/{ganttDiagram-PKOTCBZU-DA1yES44.js.map → ganttDiagram-PKOTCBZU-BQ1R8JUB.js.map} +1 -1
  68. package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-CDNEFLgS.js → gitGraphDiagram-DS77QQ5N-DY121nCj.js} +2 -2
  69. package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-CDNEFLgS.js.map → gitGraphDiagram-DS77QQ5N-DY121nCj.js.map} +1 -1
  70. package/dist/web/assets/index-BGYPGRd5.js +317 -0
  71. package/dist/web/assets/index-BGYPGRd5.js.map +1 -0
  72. package/dist/web/assets/index-DbT3ggP7.css +1 -0
  73. package/dist/web/assets/{infoDiagram-6WML65LV-9RussiqY.js → infoDiagram-6WML65LV-CBJ1FZOP.js} +2 -2
  74. package/dist/web/assets/{infoDiagram-6WML65LV-9RussiqY.js.map → infoDiagram-6WML65LV-CBJ1FZOP.js.map} +1 -1
  75. package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-B3gRQq9e.js → ishikawaDiagram-WSZJBQD7-8E7q8J4H.js} +2 -2
  76. package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-B3gRQq9e.js.map → ishikawaDiagram-WSZJBQD7-8E7q8J4H.js.map} +1 -1
  77. package/dist/web/assets/{journeyDiagram-NVQOT4AX-DqAYGlaG.js → journeyDiagram-NVQOT4AX-CefHl4Ck.js} +2 -2
  78. package/dist/web/assets/{journeyDiagram-NVQOT4AX-DqAYGlaG.js.map → journeyDiagram-NVQOT4AX-CefHl4Ck.js.map} +1 -1
  79. package/dist/web/assets/{jsQR-Bn11mi_e.js → jsQR-CKtnWXY9.js} +2 -2
  80. package/dist/web/assets/{jsQR-Bn11mi_e.js.map → jsQR-CKtnWXY9.js.map} +1 -1
  81. package/dist/web/assets/{kanban-definition-27J2QSJJ-jdYm_LCl.js → kanban-definition-27J2QSJJ-BEM_WRcQ.js} +2 -2
  82. package/dist/web/assets/{kanban-definition-27J2QSJJ-jdYm_LCl.js.map → kanban-definition-27J2QSJJ-BEM_WRcQ.js.map} +1 -1
  83. package/dist/web/assets/{linear-BIB58tKJ.js → linear-BPE85kb0.js} +2 -2
  84. package/dist/web/assets/{linear-BIB58tKJ.js.map → linear-BPE85kb0.js.map} +1 -1
  85. package/dist/web/assets/{mermaid.core-D_k6Q_o7.js → mermaid.core-BvnI9y4f.js} +5 -5
  86. package/dist/web/assets/{mermaid.core-D_k6Q_o7.js.map → mermaid.core-BvnI9y4f.js.map} +1 -1
  87. package/dist/web/assets/{mindmap-definition-FAOFIHXS-DOSiw2OA.js → mindmap-definition-FAOFIHXS-rHE-FV-l.js} +2 -2
  88. package/dist/web/assets/{mindmap-definition-FAOFIHXS-DOSiw2OA.js.map → mindmap-definition-FAOFIHXS-rHE-FV-l.js.map} +1 -1
  89. package/dist/web/assets/{pegDiagram-VL7TDLO6-B_uxCfTq.js → pegDiagram-VL7TDLO6-DJDPXYfG.js} +2 -2
  90. package/dist/web/assets/{pegDiagram-VL7TDLO6-B_uxCfTq.js.map → pegDiagram-VL7TDLO6-DJDPXYfG.js.map} +1 -1
  91. package/dist/web/assets/{pieDiagram-7S7Q4E2Y-k7womKc2.js → pieDiagram-7S7Q4E2Y--06io01J.js} +2 -2
  92. package/dist/web/assets/{pieDiagram-7S7Q4E2Y-k7womKc2.js.map → pieDiagram-7S7Q4E2Y--06io01J.js.map} +1 -1
  93. package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-DDeP9GSy.js → quadrantDiagram-CIZ2JOQS-BmIbIWPR.js} +2 -2
  94. package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-DDeP9GSy.js.map → quadrantDiagram-CIZ2JOQS-BmIbIWPR.js.map} +1 -1
  95. package/dist/web/assets/{railroadDiagram-AXF67PYL-3w9OC7bK.js → railroadDiagram-AXF67PYL-DCiykxqq.js} +2 -2
  96. package/dist/web/assets/{railroadDiagram-AXF67PYL-3w9OC7bK.js.map → railroadDiagram-AXF67PYL-DCiykxqq.js.map} +1 -1
  97. package/dist/web/assets/{requirementDiagram-LRYGKXZP-Dd-jdyLp.js → requirementDiagram-LRYGKXZP-DMBtkFle.js} +2 -2
  98. package/dist/web/assets/{requirementDiagram-LRYGKXZP-Dd-jdyLp.js.map → requirementDiagram-LRYGKXZP-DMBtkFle.js.map} +1 -1
  99. package/dist/web/assets/{sankeyDiagram-W5VNT64P-nP6fnjRm.js → sankeyDiagram-W5VNT64P-jJaDHklw.js} +2 -2
  100. package/dist/web/assets/{sankeyDiagram-W5VNT64P-nP6fnjRm.js.map → sankeyDiagram-W5VNT64P-jJaDHklw.js.map} +1 -1
  101. package/dist/web/assets/{sequenceDiagram-SI44F4Z6-Db7yXsx7.js → sequenceDiagram-SI44F4Z6-C20cMMAE.js} +2 -2
  102. package/dist/web/assets/{sequenceDiagram-SI44F4Z6-Db7yXsx7.js.map → sequenceDiagram-SI44F4Z6-C20cMMAE.js.map} +1 -1
  103. package/dist/web/assets/{sizeCapture-X5ZJPWSS-7HSt6rUG.js → sizeCapture-X5ZJPWSS-BOf2j1fu.js} +2 -2
  104. package/dist/web/assets/{sizeCapture-X5ZJPWSS-7HSt6rUG.js.map → sizeCapture-X5ZJPWSS-BOf2j1fu.js.map} +1 -1
  105. package/dist/web/assets/{stateDiagram-OKZ733FA-DCDBYc8x.js → stateDiagram-OKZ733FA-DJyK9RQn.js} +2 -2
  106. package/dist/web/assets/{stateDiagram-OKZ733FA-DCDBYc8x.js.map → stateDiagram-OKZ733FA-DJyK9RQn.js.map} +1 -1
  107. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-DK52R9Wq.js +2 -0
  108. package/dist/web/assets/{stateDiagram-v2-UEYNNEHI-kDvyGBqZ.js.map → stateDiagram-v2-UEYNNEHI-DK52R9Wq.js.map} +1 -1
  109. package/dist/web/assets/{swimlanes-SLNWSIFB-yi3n69TK.js → swimlanes-SLNWSIFB-Bwgk8mMH.js} +3 -3
  110. package/dist/web/assets/{swimlanes-SLNWSIFB-yi3n69TK.js.map → swimlanes-SLNWSIFB-Bwgk8mMH.js.map} +1 -1
  111. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-Cf4ITl_O.js +9 -0
  112. package/dist/web/assets/{swimlanesDiagram-ULZ7WXOC-W_7yrf_B.js.map → swimlanesDiagram-ULZ7WXOC-Cf4ITl_O.js.map} +1 -1
  113. package/dist/web/assets/{timeline-definition-Z64GVDOM-BYpFsSUO.js → timeline-definition-Z64GVDOM-CnyZa63t.js} +2 -2
  114. package/dist/web/assets/{timeline-definition-Z64GVDOM-BYpFsSUO.js.map → timeline-definition-Z64GVDOM-CnyZa63t.js.map} +1 -1
  115. package/dist/web/assets/{vennDiagram-T6HMQDX7-NtAYbYGj.js → vennDiagram-T6HMQDX7-BRDyScfO.js} +2 -2
  116. package/dist/web/assets/{vennDiagram-T6HMQDX7-NtAYbYGj.js.map → vennDiagram-T6HMQDX7-BRDyScfO.js.map} +1 -1
  117. package/dist/web/assets/{wardleyDiagram-T6FBY63Y-DHyOX2kW.js → wardleyDiagram-T6FBY63Y-C9Eu8Rn5.js} +2 -2
  118. package/dist/web/assets/{wardleyDiagram-T6FBY63Y-DHyOX2kW.js.map → wardleyDiagram-T6FBY63Y-C9Eu8Rn5.js.map} +1 -1
  119. package/dist/web/assets/{xychartDiagram-ELKLHX3M-B2SyZu-1.js → xychartDiagram-ELKLHX3M-CfMWLiHv.js} +2 -2
  120. package/dist/web/assets/{xychartDiagram-ELKLHX3M-B2SyZu-1.js.map → xychartDiagram-ELKLHX3M-CfMWLiHv.js.map} +1 -1
  121. package/dist/web/index.html +2 -2
  122. package/dist/web/sw.js +1 -1
  123. package/dist/web/version.json +1 -1
  124. package/package.json +3 -3
  125. package/dist/web/assets/channel-BE1VFGzt.js +0 -2
  126. package/dist/web/assets/classDiagram-JCYQIIEL-DstM1bxq.js +0 -2
  127. package/dist/web/assets/classDiagram-v2-OCEON4UE-DstM1bxq.js +0 -2
  128. package/dist/web/assets/index-BmQXAad8.css +0 -1
  129. package/dist/web/assets/index-DQ7ZNp6t.js +0 -322
  130. package/dist/web/assets/index-DQ7ZNp6t.js.map +0 -1
  131. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-kDvyGBqZ.js +0 -2
  132. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-W_7yrf_B.js +0 -9
@@ -0,0 +1,317 @@
1
+ function zb(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function Td(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rc={exports:{}},Uo={},Ac={exports:{}},Ie={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Cg;function Vb(){if(Cg)return Ie;Cg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function y(_){return _===null||typeof _!="object"?null:(_=p&&_[p]||_["@@iterator"],typeof _=="function"?_:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,C={};function T(_,Q,R){this.props=_,this.context=Q,this.refs=C,this.updater=R||w}T.prototype.isReactComponent={},T.prototype.setState=function(_,Q){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,Q,"setState")},T.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function E(){}E.prototype=T.prototype;function M(_,Q,R){this.props=_,this.context=Q,this.refs=C,this.updater=R||w}var A=M.prototype=new E;A.constructor=M,k(A,T.prototype),A.isPureReactComponent=!0;var L=Array.isArray,U=Object.prototype.hasOwnProperty,D={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function W(_,Q,R){var Z,de={},re=null,Ee=null;if(Q!=null)for(Z in Q.ref!==void 0&&(Ee=Q.ref),Q.key!==void 0&&(re=""+Q.key),Q)U.call(Q,Z)&&!Y.hasOwnProperty(Z)&&(de[Z]=Q[Z]);var ge=arguments.length-2;if(ge===1)de.children=R;else if(1<ge){for(var xe=Array(ge),_e=0;_e<ge;_e++)xe[_e]=arguments[_e+2];de.children=xe}if(_&&_.defaultProps)for(Z in ge=_.defaultProps,ge)de[Z]===void 0&&(de[Z]=ge[Z]);return{$$typeof:e,type:_,key:re,ref:Ee,props:de,_owner:D.current}}function X(_,Q){return{$$typeof:e,type:_.type,key:Q,ref:_.ref,props:_.props,_owner:_._owner}}function j(_){return typeof _=="object"&&_!==null&&_.$$typeof===e}function G(_){var Q={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(R){return Q[R]})}var V=/\/+/g;function fe(_,Q){return typeof _=="object"&&_!==null&&_.key!=null?G(""+_.key):Q.toString(36)}function ie(_,Q,R,Z,de){var re=typeof _;(re==="undefined"||re==="boolean")&&(_=null);var Ee=!1;if(_===null)Ee=!0;else switch(re){case"string":case"number":Ee=!0;break;case"object":switch(_.$$typeof){case e:case t:Ee=!0}}if(Ee)return Ee=_,de=de(Ee),_=Z===""?"."+fe(Ee,0):Z,L(de)?(R="",_!=null&&(R=_.replace(V,"$&/")+"/"),ie(de,Q,R,"",function(_e){return _e})):de!=null&&(j(de)&&(de=X(de,R+(!de.key||Ee&&Ee.key===de.key?"":(""+de.key).replace(V,"$&/")+"/")+_)),Q.push(de)),1;if(Ee=0,Z=Z===""?".":Z+":",L(_))for(var ge=0;ge<_.length;ge++){re=_[ge];var xe=Z+fe(re,ge);Ee+=ie(re,Q,R,xe,de)}else if(xe=y(_),typeof xe=="function")for(_=xe.call(_),ge=0;!(re=_.next()).done;)re=re.value,xe=Z+fe(re,ge++),Ee+=ie(re,Q,R,xe,de);else if(re==="object")throw Q=String(_),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return Ee}function ee(_,Q,R){if(_==null)return _;var Z=[],de=0;return ie(_,Z,"","",function(re){return Q.call(R,re,de++)}),Z}function ve(_){if(_._status===-1){var Q=_._result;Q=Q(),Q.then(function(R){(_._status===0||_._status===-1)&&(_._status=1,_._result=R)},function(R){(_._status===0||_._status===-1)&&(_._status=2,_._result=R)}),_._status===-1&&(_._status=0,_._result=Q)}if(_._status===1)return _._result.default;throw _._result}var Te={current:null},q={transition:null},ue={ReactCurrentDispatcher:Te,ReactCurrentBatchConfig:q,ReactCurrentOwner:D};function P(){throw Error("act(...) is not supported in production builds of React.")}return Ie.Children={map:ee,forEach:function(_,Q,R){ee(_,function(){Q.apply(this,arguments)},R)},count:function(_){var Q=0;return ee(_,function(){Q++}),Q},toArray:function(_){return ee(_,function(Q){return Q})||[]},only:function(_){if(!j(_))throw Error("React.Children.only expected to receive a single React element child.");return _}},Ie.Component=T,Ie.Fragment=n,Ie.Profiler=s,Ie.PureComponent=M,Ie.StrictMode=i,Ie.Suspense=d,Ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ue,Ie.act=P,Ie.cloneElement=function(_,Q,R){if(_==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+_+".");var Z=k({},_.props),de=_.key,re=_.ref,Ee=_._owner;if(Q!=null){if(Q.ref!==void 0&&(re=Q.ref,Ee=D.current),Q.key!==void 0&&(de=""+Q.key),_.type&&_.type.defaultProps)var ge=_.type.defaultProps;for(xe in Q)U.call(Q,xe)&&!Y.hasOwnProperty(xe)&&(Z[xe]=Q[xe]===void 0&&ge!==void 0?ge[xe]:Q[xe])}var xe=arguments.length-2;if(xe===1)Z.children=R;else if(1<xe){ge=Array(xe);for(var _e=0;_e<xe;_e++)ge[_e]=arguments[_e+2];Z.children=ge}return{$$typeof:e,type:_.type,key:de,ref:re,props:Z,_owner:Ee}},Ie.createContext=function(_){return _={$$typeof:a,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},_.Provider={$$typeof:l,_context:_},_.Consumer=_},Ie.createElement=W,Ie.createFactory=function(_){var Q=W.bind(null,_);return Q.type=_,Q},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(_){return{$$typeof:c,render:_}},Ie.isValidElement=j,Ie.lazy=function(_){return{$$typeof:m,_payload:{_status:-1,_result:_},_init:ve}},Ie.memo=function(_,Q){return{$$typeof:h,type:_,compare:Q===void 0?null:Q}},Ie.startTransition=function(_){var Q=q.transition;q.transition={};try{_()}finally{q.transition=Q}},Ie.unstable_act=P,Ie.useCallback=function(_,Q){return Te.current.useCallback(_,Q)},Ie.useContext=function(_){return Te.current.useContext(_)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(_){return Te.current.useDeferredValue(_)},Ie.useEffect=function(_,Q){return Te.current.useEffect(_,Q)},Ie.useId=function(){return Te.current.useId()},Ie.useImperativeHandle=function(_,Q,R){return Te.current.useImperativeHandle(_,Q,R)},Ie.useInsertionEffect=function(_,Q){return Te.current.useInsertionEffect(_,Q)},Ie.useLayoutEffect=function(_,Q){return Te.current.useLayoutEffect(_,Q)},Ie.useMemo=function(_,Q){return Te.current.useMemo(_,Q)},Ie.useReducer=function(_,Q,R){return Te.current.useReducer(_,Q,R)},Ie.useRef=function(_){return Te.current.useRef(_)},Ie.useState=function(_){return Te.current.useState(_)},Ie.useSyncExternalStore=function(_,Q,R){return Te.current.useSyncExternalStore(_,Q,R)},Ie.useTransition=function(){return Te.current.useTransition()},Ie.version="18.3.1",Ie}var Eg;function Pd(){return Eg||(Eg=1,Ac.exports=Vb()),Ac.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Tg;function Bb(){if(Tg)return Uo;Tg=1;var e=Pd(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(c,d,h){var m,p={},y=null,w=null;h!==void 0&&(y=""+h),d.key!==void 0&&(y=""+d.key),d.ref!==void 0&&(w=d.ref);for(m in d)i.call(d,m)&&!l.hasOwnProperty(m)&&(p[m]=d[m]);if(c&&c.defaultProps)for(m in d=c.defaultProps,d)p[m]===void 0&&(p[m]=d[m]);return{$$typeof:t,type:c,key:y,ref:w,props:p,_owner:s.current}}return Uo.Fragment=n,Uo.jsx=a,Uo.jsxs=a,Uo}var Pg;function $b(){return Pg||(Pg=1,Rc.exports=Bb()),Rc.exports}var v=$b(),za={},Mc={exports:{}},Qt={},Nc={exports:{}},jc={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Rg;function Ub(){return Rg||(Rg=1,function(e){function t(q,ue){var P=q.length;q.push(ue);e:for(;0<P;){var _=P-1>>>1,Q=q[_];if(0<s(Q,ue))q[_]=ue,q[P]=Q,P=_;else break e}}function n(q){return q.length===0?null:q[0]}function i(q){if(q.length===0)return null;var ue=q[0],P=q.pop();if(P!==ue){q[0]=P;e:for(var _=0,Q=q.length,R=Q>>>1;_<R;){var Z=2*(_+1)-1,de=q[Z],re=Z+1,Ee=q[re];if(0>s(de,P))re<Q&&0>s(Ee,de)?(q[_]=Ee,q[re]=P,_=re):(q[_]=de,q[Z]=P,_=Z);else if(re<Q&&0>s(Ee,P))q[_]=Ee,q[re]=P,_=re;else break e}}return ue}function s(q,ue){var P=q.sortIndex-ue.sortIndex;return P!==0?P:q.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var d=[],h=[],m=1,p=null,y=3,w=!1,k=!1,C=!1,T=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(q){for(var ue=n(h);ue!==null;){if(ue.callback===null)i(h);else if(ue.startTime<=q)i(h),ue.sortIndex=ue.expirationTime,t(d,ue);else break;ue=n(h)}}function L(q){if(C=!1,A(q),!k)if(n(d)!==null)k=!0,ve(U);else{var ue=n(h);ue!==null&&Te(L,ue.startTime-q)}}function U(q,ue){k=!1,C&&(C=!1,E(W),W=-1),w=!0;var P=y;try{for(A(ue),p=n(d);p!==null&&(!(p.expirationTime>ue)||q&&!G());){var _=p.callback;if(typeof _=="function"){p.callback=null,y=p.priorityLevel;var Q=_(p.expirationTime<=ue);ue=e.unstable_now(),typeof Q=="function"?p.callback=Q:p===n(d)&&i(d),A(ue)}else i(d);p=n(d)}if(p!==null)var R=!0;else{var Z=n(h);Z!==null&&Te(L,Z.startTime-ue),R=!1}return R}finally{p=null,y=P,w=!1}}var D=!1,Y=null,W=-1,X=5,j=-1;function G(){return!(e.unstable_now()-j<X)}function V(){if(Y!==null){var q=e.unstable_now();j=q;var ue=!0;try{ue=Y(!0,q)}finally{ue?fe():(D=!1,Y=null)}}else D=!1}var fe;if(typeof M=="function")fe=function(){M(V)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,ee=ie.port2;ie.port1.onmessage=V,fe=function(){ee.postMessage(null)}}else fe=function(){T(V,0)};function ve(q){Y=q,D||(D=!0,fe())}function Te(q,ue){W=T(function(){q(e.unstable_now())},ue)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_continueExecution=function(){k||w||(k=!0,ve(U))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(q){switch(y){case 1:case 2:case 3:var ue=3;break;default:ue=y}var P=y;y=ue;try{return q()}finally{y=P}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,ue){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var P=y;y=q;try{return ue()}finally{y=P}},e.unstable_scheduleCallback=function(q,ue,P){var _=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?_+P:_):P=_,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=P+Q,q={id:m++,callback:ue,priorityLevel:q,startTime:P,expirationTime:Q,sortIndex:-1},P>_?(q.sortIndex=P,t(h,q),n(d)===null&&q===n(h)&&(C?(E(W),W=-1):C=!0,Te(L,P-_))):(q.sortIndex=Q,t(d,q),k||w||(k=!0,ve(U))),q},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(q){var ue=y;return function(){var P=y;y=ue;try{return q.apply(this,arguments)}finally{y=P}}}}(jc)),jc}var Ag;function Wb(){return Ag||(Ag=1,Nc.exports=Ub()),Nc.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Mg;function Hb(){if(Mg)return Qt;Mg=1;var e=Pd(),t=Wb();function n(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function l(r,o){a(r,o),a(r+"Capture",o)}function a(r,o){for(s[r]=o,r=0;r<o.length;r++)i.add(o[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},p={};function y(r){return d.call(p,r)?!0:d.call(m,r)?!1:h.test(r)?p[r]=!0:(m[r]=!0,!1)}function w(r,o,u,f){if(u!==null&&u.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,o,u,f){if(o===null||typeof o>"u"||w(r,o,u,f))return!0;if(f)return!1;if(u!==null)switch(u.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function C(r,o,u,f,g,x,b){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=f,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=r,this.type=o,this.sanitizeURL=x,this.removeEmptyString=b}var T={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){T[r]=new C(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];T[o]=new C(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){T[r]=new C(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){T[r]=new C(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){T[r]=new C(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){T[r]=new C(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){T[r]=new C(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){T[r]=new C(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){T[r]=new C(r,5,!1,r.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function M(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var o=r.replace(E,M);T[o]=new C(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(E,M);T[o]=new C(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(E,M);T[o]=new C(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){T[r]=new C(r,1,!1,r.toLowerCase(),null,!1,!1)}),T.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){T[r]=new C(r,1,!1,r.toLowerCase(),null,!0,!0)});function A(r,o,u,f){var g=T.hasOwnProperty(o)?T[o]:null;(g!==null?g.type!==0:f||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(k(o,u,g,f)&&(u=null),f||g===null?y(o)&&(u===null?r.removeAttribute(o):r.setAttribute(o,""+u)):g.mustUseProperty?r[g.propertyName]=u===null?g.type===3?!1:"":u:(o=g.attributeName,f=g.attributeNamespace,u===null?r.removeAttribute(o):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,f?r.setAttributeNS(f,o,u):r.setAttribute(o,u))))}var L=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,U=Symbol.for("react.element"),D=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),G=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),ie=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),Te=Symbol.for("react.offscreen"),q=Symbol.iterator;function ue(r){return r===null||typeof r!="object"?null:(r=q&&r[q]||r["@@iterator"],typeof r=="function"?r:null)}var P=Object.assign,_;function Q(r){if(_===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);_=o&&o[1]||""}return`
34
+ `+_+r}var R=!1;function Z(r,o){if(!r||R)return"";R=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(H){var f=H}Reflect.construct(r,[],o)}else{try{o.call()}catch(H){f=H}r.call(o.prototype)}else{try{throw Error()}catch(H){f=H}r()}}catch(H){if(H&&f&&typeof H.stack=="string"){for(var g=H.stack.split(`
35
+ `),x=f.stack.split(`
36
+ `),b=g.length-1,N=x.length-1;1<=b&&0<=N&&g[b]!==x[N];)N--;for(;1<=b&&0<=N;b--,N--)if(g[b]!==x[N]){if(b!==1||N!==1)do if(b--,N--,0>N||g[b]!==x[N]){var I=`
37
+ `+g[b].replace(" at new "," at ");return r.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",r.displayName)),I}while(1<=b&&0<=N);break}}}finally{R=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?Q(r):""}function de(r){switch(r.tag){case 5:return Q(r.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return r=Z(r.type,!1),r;case 11:return r=Z(r.type.render,!1),r;case 1:return r=Z(r.type,!0),r;default:return""}}function re(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Y:return"Fragment";case D:return"Portal";case X:return"Profiler";case W:return"StrictMode";case fe:return"Suspense";case ie:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case G:return(r.displayName||"Context")+".Consumer";case j:return(r._context.displayName||"Context")+".Provider";case V:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ee:return o=r.displayName||null,o!==null?o:re(r.type)||"Memo";case ve:o=r._payload,r=r._init;try{return re(r(o))}catch{}}return null}function Ee(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(o);case 8:return o===W?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function ge(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function xe(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function _e(r){var o=xe(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),f=""+r[o];if(!r.hasOwnProperty(o)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,x=u.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return g.call(this)},set:function(b){f=""+b,x.call(this,b)}}),Object.defineProperty(r,o,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(b){f=""+b},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function We(r){r._valueTracker||(r._valueTracker=_e(r))}function Pt(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var u=o.getValue(),f="";return r&&(f=xe(r)?r.checked?"true":"false":r.value),r=f,r!==u?(o.setValue(r),!0):!1}function ct(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function $t(r,o){var u=o.checked;return P({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function ln(r,o){var u=o.defaultValue==null?"":o.defaultValue,f=o.checked!=null?o.checked:o.defaultChecked;u=ge(o.value!=null?o.value:u),r._wrapperState={initialChecked:f,initialValue:u,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function St(r,o){o=o.checked,o!=null&&A(r,"checked",o,!1)}function ft(r,o){St(r,o);var u=ge(o.value),f=o.type;if(u!=null)f==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(f==="submit"||f==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?Le(r,o.type,u):o.hasOwnProperty("defaultValue")&&Le(r,o.type,ge(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function It(r,o,u){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var f=o.type;if(!(f!=="submit"&&f!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,u||o===r.value||(r.value=o),r.defaultValue=o}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function Le(r,o,u){(o!=="number"||ct(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Ut=Array.isArray;function Wt(r,o,u,f){if(r=r.options,o){o={};for(var g=0;g<u.length;g++)o["$"+u[g]]=!0;for(u=0;u<r.length;u++)g=o.hasOwnProperty("$"+r[u].value),r[u].selected!==g&&(r[u].selected=g),g&&f&&(r[u].defaultSelected=!0)}else{for(u=""+ge(u),o=null,g=0;g<r.length;g++){if(r[g].value===u){r[g].selected=!0,f&&(r[g].defaultSelected=!0);return}o!==null||r[g].disabled||(o=r[g])}o!==null&&(o.selected=!0)}}function wn(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return P({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function B(r,o){var u=o.value;if(u==null){if(u=o.children,o=o.defaultValue,u!=null){if(o!=null)throw Error(n(92));if(Ut(u)){if(1<u.length)throw Error(n(93));u=u[0]}o=u}o==null&&(o=""),u=o}r._wrapperState={initialValue:ge(u)}}function he(r,o){var u=ge(o.value),f=ge(o.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),o.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),f!=null&&(r.defaultValue=""+f)}function Ne(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function K(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ae(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?K(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var F,J=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,u,f,g){MSApp.execUnsafeLocalFunction(function(){return r(o,u,f,g)})}:r}(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(F=F||document.createElement("div"),F.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=F.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function se(r,o){if(o){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=o;return}}r.textContent=o}var Pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Fe=["Webkit","ms","Moz","O"];Object.keys(Pe).forEach(function(r){Fe.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),Pe[o]=Pe[r]})});function pe(r,o,u){return o==null||typeof o=="boolean"||o===""?"":u||typeof o!="number"||o===0||Pe.hasOwnProperty(r)&&Pe[r]?(""+o).trim():o+"px"}function Je(r,o){r=r.style;for(var u in o)if(o.hasOwnProperty(u)){var f=u.indexOf("--")===0,g=pe(u,o[u],f);u==="float"&&(u="cssFloat"),f?r.setProperty(u,g):r[u]=g}}var Ht=P({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nt(r,o){if(o){if(Ht[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Ke(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ue=null;function ir(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var oo=null,ci=null,fi=null;function Bh(r){if(r=Ro(r)){if(typeof oo!="function")throw Error(n(280));var o=r.stateNode;o&&(o=ea(o),oo(r.stateNode,r.type,o))}}function $h(r){ci?fi?fi.push(r):fi=[r]:ci=r}function Uh(){if(ci){var r=ci,o=fi;if(fi=ci=null,Bh(r),o)for(r=0;r<o.length;r++)Bh(o[r])}}function Wh(r,o){return r(o)}function Hh(){}var Hl=!1;function Kh(r,o,u){if(Hl)return r(o,u);Hl=!0;try{return Wh(r,o,u)}finally{Hl=!1,(ci!==null||fi!==null)&&(Hh(),Uh())}}function so(r,o){var u=r.stateNode;if(u===null)return null;var f=ea(u);if(f===null)return null;u=f[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(r=r.type,f=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!f;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,o,typeof u));return u}var Kl=!1;if(c)try{var ao={};Object.defineProperty(ao,"passive",{get:function(){Kl=!0}}),window.addEventListener("test",ao,ao),window.removeEventListener("test",ao,ao)}catch{Kl=!1}function Hk(r,o,u,f,g,x,b,N,I){var H=Array.prototype.slice.call(arguments,3);try{o.apply(u,H)}catch(ne){this.onError(ne)}}var lo=!1,js=null,Ds=!1,ql=null,Kk={onError:function(r){lo=!0,js=r}};function qk(r,o,u,f,g,x,b,N,I){lo=!1,js=null,Hk.apply(Kk,arguments)}function Xk(r,o,u,f,g,x,b,N,I){if(qk.apply(this,arguments),lo){if(lo){var H=js;lo=!1,js=null}else throw Error(n(198));Ds||(Ds=!0,ql=H)}}function _r(r){var o=r,u=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(u=o.return),r=o.return;while(r)}return o.tag===3?u:null}function qh(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function Xh(r){if(_r(r)!==r)throw Error(n(188))}function Yk(r){var o=r.alternate;if(!o){if(o=_r(r),o===null)throw Error(n(188));return o!==r?null:r}for(var u=r,f=o;;){var g=u.return;if(g===null)break;var x=g.alternate;if(x===null){if(f=g.return,f!==null){u=f;continue}break}if(g.child===x.child){for(x=g.child;x;){if(x===u)return Xh(g),r;if(x===f)return Xh(g),o;x=x.sibling}throw Error(n(188))}if(u.return!==f.return)u=g,f=x;else{for(var b=!1,N=g.child;N;){if(N===u){b=!0,u=g,f=x;break}if(N===f){b=!0,f=g,u=x;break}N=N.sibling}if(!b){for(N=x.child;N;){if(N===u){b=!0,u=x,f=g;break}if(N===f){b=!0,f=x,u=g;break}N=N.sibling}if(!b)throw Error(n(189))}}if(u.alternate!==f)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:o}function Yh(r){return r=Yk(r),r!==null?Gh(r):null}function Gh(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=Gh(r);if(o!==null)return o;r=r.sibling}return null}var Qh=t.unstable_scheduleCallback,Zh=t.unstable_cancelCallback,Gk=t.unstable_shouldYield,Qk=t.unstable_requestPaint,lt=t.unstable_now,Zk=t.unstable_getCurrentPriorityLevel,Xl=t.unstable_ImmediatePriority,Jh=t.unstable_UserBlockingPriority,Is=t.unstable_NormalPriority,Jk=t.unstable_LowPriority,ep=t.unstable_IdlePriority,_s=null,Dn=null;function eS(r){if(Dn&&typeof Dn.onCommitFiberRoot=="function")try{Dn.onCommitFiberRoot(_s,r,void 0,(r.current.flags&128)===128)}catch{}}var kn=Math.clz32?Math.clz32:rS,tS=Math.log,nS=Math.LN2;function rS(r){return r>>>=0,r===0?32:31-(tS(r)/nS|0)|0}var Ls=64,Os=4194304;function uo(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Fs(r,o){var u=r.pendingLanes;if(u===0)return 0;var f=0,g=r.suspendedLanes,x=r.pingedLanes,b=u&268435455;if(b!==0){var N=b&~g;N!==0?f=uo(N):(x&=b,x!==0&&(f=uo(x)))}else b=u&~g,b!==0?f=uo(b):x!==0&&(f=uo(x));if(f===0)return 0;if(o!==0&&o!==f&&(o&g)===0&&(g=f&-f,x=o&-o,g>=x||g===16&&(x&4194240)!==0))return o;if((f&4)!==0&&(f|=u&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=f;0<o;)u=31-kn(o),g=1<<u,f|=r[u],o&=~g;return f}function iS(r,o){switch(r){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oS(r,o){for(var u=r.suspendedLanes,f=r.pingedLanes,g=r.expirationTimes,x=r.pendingLanes;0<x;){var b=31-kn(x),N=1<<b,I=g[b];I===-1?((N&u)===0||(N&f)!==0)&&(g[b]=iS(N,o)):I<=o&&(r.expiredLanes|=N),x&=~N}}function Yl(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function tp(){var r=Ls;return Ls<<=1,(Ls&4194240)===0&&(Ls=64),r}function Gl(r){for(var o=[],u=0;31>u;u++)o.push(r);return o}function co(r,o,u){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-kn(o),r[o]=u}function sS(r,o){var u=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var f=r.eventTimes;for(r=r.expirationTimes;0<u;){var g=31-kn(u),x=1<<g;o[g]=0,f[g]=-1,r[g]=-1,u&=~x}}function Ql(r,o){var u=r.entangledLanes|=o;for(r=r.entanglements;u;){var f=31-kn(u),g=1<<f;g&o|r[f]&o&&(r[f]|=o),u&=~g}}var He=0;function np(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var rp,Zl,ip,op,sp,Jl=!1,zs=[],or=null,sr=null,ar=null,fo=new Map,ho=new Map,lr=[],aS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ap(r,o){switch(r){case"focusin":case"focusout":or=null;break;case"dragenter":case"dragleave":sr=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":fo.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ho.delete(o.pointerId)}}function po(r,o,u,f,g,x){return r===null||r.nativeEvent!==x?(r={blockedOn:o,domEventName:u,eventSystemFlags:f,nativeEvent:x,targetContainers:[g]},o!==null&&(o=Ro(o),o!==null&&Zl(o)),r):(r.eventSystemFlags|=f,o=r.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),r)}function lS(r,o,u,f,g){switch(o){case"focusin":return or=po(or,r,o,u,f,g),!0;case"dragenter":return sr=po(sr,r,o,u,f,g),!0;case"mouseover":return ar=po(ar,r,o,u,f,g),!0;case"pointerover":var x=g.pointerId;return fo.set(x,po(fo.get(x)||null,r,o,u,f,g)),!0;case"gotpointercapture":return x=g.pointerId,ho.set(x,po(ho.get(x)||null,r,o,u,f,g)),!0}return!1}function lp(r){var o=Lr(r.target);if(o!==null){var u=_r(o);if(u!==null){if(o=u.tag,o===13){if(o=qh(u),o!==null){r.blockedOn=o,sp(r.priority,function(){ip(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Vs(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var u=tu(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var f=new u.constructor(u.type,u);Ue=f,u.target.dispatchEvent(f),Ue=null}else return o=Ro(u),o!==null&&Zl(o),r.blockedOn=u,!1;o.shift()}return!0}function up(r,o,u){Vs(r)&&u.delete(o)}function uS(){Jl=!1,or!==null&&Vs(or)&&(or=null),sr!==null&&Vs(sr)&&(sr=null),ar!==null&&Vs(ar)&&(ar=null),fo.forEach(up),ho.forEach(up)}function mo(r,o){r.blockedOn===o&&(r.blockedOn=null,Jl||(Jl=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,uS)))}function go(r){function o(g){return mo(g,r)}if(0<zs.length){mo(zs[0],r);for(var u=1;u<zs.length;u++){var f=zs[u];f.blockedOn===r&&(f.blockedOn=null)}}for(or!==null&&mo(or,r),sr!==null&&mo(sr,r),ar!==null&&mo(ar,r),fo.forEach(o),ho.forEach(o),u=0;u<lr.length;u++)f=lr[u],f.blockedOn===r&&(f.blockedOn=null);for(;0<lr.length&&(u=lr[0],u.blockedOn===null);)lp(u),u.blockedOn===null&&lr.shift()}var di=L.ReactCurrentBatchConfig,Bs=!0;function cS(r,o,u,f){var g=He,x=di.transition;di.transition=null;try{He=1,eu(r,o,u,f)}finally{He=g,di.transition=x}}function fS(r,o,u,f){var g=He,x=di.transition;di.transition=null;try{He=4,eu(r,o,u,f)}finally{He=g,di.transition=x}}function eu(r,o,u,f){if(Bs){var g=tu(r,o,u,f);if(g===null)vu(r,o,f,$s,u),ap(r,f);else if(lS(g,r,o,u,f))f.stopPropagation();else if(ap(r,f),o&4&&-1<aS.indexOf(r)){for(;g!==null;){var x=Ro(g);if(x!==null&&rp(x),x=tu(r,o,u,f),x===null&&vu(r,o,f,$s,u),x===g)break;g=x}g!==null&&f.stopPropagation()}else vu(r,o,f,null,u)}}var $s=null;function tu(r,o,u,f){if($s=null,r=ir(f),r=Lr(r),r!==null)if(o=_r(r),o===null)r=null;else if(u=o.tag,u===13){if(r=qh(o),r!==null)return r;r=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return $s=r,null}function cp(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Zk()){case Xl:return 1;case Jh:return 4;case Is:case Jk:return 16;case ep:return 536870912;default:return 16}default:return 16}}var ur=null,nu=null,Us=null;function fp(){if(Us)return Us;var r,o=nu,u=o.length,f,g="value"in ur?ur.value:ur.textContent,x=g.length;for(r=0;r<u&&o[r]===g[r];r++);var b=u-r;for(f=1;f<=b&&o[u-f]===g[x-f];f++);return Us=g.slice(r,1<f?1-f:void 0)}function Ws(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Hs(){return!0}function dp(){return!1}function en(r){function o(u,f,g,x,b){this._reactName=u,this._targetInst=g,this.type=f,this.nativeEvent=x,this.target=b,this.currentTarget=null;for(var N in r)r.hasOwnProperty(N)&&(u=r[N],this[N]=u?u(x):x[N]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Hs:dp,this.isPropagationStopped=dp,this}return P(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Hs)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Hs)},persist:function(){},isPersistent:Hs}),o}var hi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ru=en(hi),yo=P({},hi,{view:0,detail:0}),dS=en(yo),iu,ou,vo,Ks=P({},yo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:au,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==vo&&(vo&&r.type==="mousemove"?(iu=r.screenX-vo.screenX,ou=r.screenY-vo.screenY):ou=iu=0,vo=r),iu)},movementY:function(r){return"movementY"in r?r.movementY:ou}}),hp=en(Ks),hS=P({},Ks,{dataTransfer:0}),pS=en(hS),mS=P({},yo,{relatedTarget:0}),su=en(mS),gS=P({},hi,{animationName:0,elapsedTime:0,pseudoElement:0}),yS=en(gS),vS=P({},hi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),xS=en(vS),wS=P({},hi,{data:0}),pp=en(wS),kS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function CS(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=bS[r])?!!o[r]:!1}function au(){return CS}var ES=P({},yo,{key:function(r){if(r.key){var o=kS[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=Ws(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?SS[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:au,charCode:function(r){return r.type==="keypress"?Ws(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ws(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),TS=en(ES),PS=P({},Ks,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mp=en(PS),RS=P({},yo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:au}),AS=en(RS),MS=P({},hi,{propertyName:0,elapsedTime:0,pseudoElement:0}),NS=en(MS),jS=P({},Ks,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),DS=en(jS),IS=[9,13,27,32],lu=c&&"CompositionEvent"in window,xo=null;c&&"documentMode"in document&&(xo=document.documentMode);var _S=c&&"TextEvent"in window&&!xo,gp=c&&(!lu||xo&&8<xo&&11>=xo),yp=" ",vp=!1;function xp(r,o){switch(r){case"keyup":return IS.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var pi=!1;function LS(r,o){switch(r){case"compositionend":return wp(o);case"keypress":return o.which!==32?null:(vp=!0,yp);case"textInput":return r=o.data,r===yp&&vp?null:r;default:return null}}function OS(r,o){if(pi)return r==="compositionend"||!lu&&xp(r,o)?(r=fp(),Us=nu=ur=null,pi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return gp&&o.locale!=="ko"?null:o.data;default:return null}}var FS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function kp(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!FS[r.type]:o==="textarea"}function Sp(r,o,u,f){$h(f),o=Qs(o,"onChange"),0<o.length&&(u=new ru("onChange","change",null,u,f),r.push({event:u,listeners:o}))}var wo=null,ko=null;function zS(r){Vp(r,0)}function qs(r){var o=xi(r);if(Pt(o))return r}function VS(r,o){if(r==="change")return o}var bp=!1;if(c){var uu;if(c){var cu="oninput"in document;if(!cu){var Cp=document.createElement("div");Cp.setAttribute("oninput","return;"),cu=typeof Cp.oninput=="function"}uu=cu}else uu=!1;bp=uu&&(!document.documentMode||9<document.documentMode)}function Ep(){wo&&(wo.detachEvent("onpropertychange",Tp),ko=wo=null)}function Tp(r){if(r.propertyName==="value"&&qs(ko)){var o=[];Sp(o,ko,r,ir(r)),Kh(zS,o)}}function BS(r,o,u){r==="focusin"?(Ep(),wo=o,ko=u,wo.attachEvent("onpropertychange",Tp)):r==="focusout"&&Ep()}function $S(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return qs(ko)}function US(r,o){if(r==="click")return qs(o)}function WS(r,o){if(r==="input"||r==="change")return qs(o)}function HS(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var Sn=typeof Object.is=="function"?Object.is:HS;function So(r,o){if(Sn(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var u=Object.keys(r),f=Object.keys(o);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var g=u[f];if(!d.call(o,g)||!Sn(r[g],o[g]))return!1}return!0}function Pp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Rp(r,o){var u=Pp(r);r=0;for(var f;u;){if(u.nodeType===3){if(f=r+u.textContent.length,r<=o&&f>=o)return{node:u,offset:o-r};r=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Pp(u)}}function Ap(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Ap(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Mp(){for(var r=window,o=ct();o instanceof r.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)r=o.contentWindow;else break;o=ct(r.document)}return o}function fu(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function KS(r){var o=Mp(),u=r.focusedElem,f=r.selectionRange;if(o!==u&&u&&u.ownerDocument&&Ap(u.ownerDocument.documentElement,u)){if(f!==null&&fu(u)){if(o=f.start,r=f.end,r===void 0&&(r=o),"selectionStart"in u)u.selectionStart=o,u.selectionEnd=Math.min(r,u.value.length);else if(r=(o=u.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var g=u.textContent.length,x=Math.min(f.start,g);f=f.end===void 0?x:Math.min(f.end,g),!r.extend&&x>f&&(g=f,f=x,x=g),g=Rp(u,x);var b=Rp(u,f);g&&b&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==b.node||r.focusOffset!==b.offset)&&(o=o.createRange(),o.setStart(g.node,g.offset),r.removeAllRanges(),x>f?(r.addRange(o),r.extend(b.node,b.offset)):(o.setEnd(b.node,b.offset),r.addRange(o)))}}for(o=[],r=u;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<o.length;u++)r=o[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var qS=c&&"documentMode"in document&&11>=document.documentMode,mi=null,du=null,bo=null,hu=!1;function Np(r,o,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;hu||mi==null||mi!==ct(f)||(f=mi,"selectionStart"in f&&fu(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),bo&&So(bo,f)||(bo=f,f=Qs(du,"onSelect"),0<f.length&&(o=new ru("onSelect","select",null,o,u),r.push({event:o,listeners:f}),o.target=mi)))}function Xs(r,o){var u={};return u[r.toLowerCase()]=o.toLowerCase(),u["Webkit"+r]="webkit"+o,u["Moz"+r]="moz"+o,u}var gi={animationend:Xs("Animation","AnimationEnd"),animationiteration:Xs("Animation","AnimationIteration"),animationstart:Xs("Animation","AnimationStart"),transitionend:Xs("Transition","TransitionEnd")},pu={},jp={};c&&(jp=document.createElement("div").style,"AnimationEvent"in window||(delete gi.animationend.animation,delete gi.animationiteration.animation,delete gi.animationstart.animation),"TransitionEvent"in window||delete gi.transitionend.transition);function Ys(r){if(pu[r])return pu[r];if(!gi[r])return r;var o=gi[r],u;for(u in o)if(o.hasOwnProperty(u)&&u in jp)return pu[r]=o[u];return r}var Dp=Ys("animationend"),Ip=Ys("animationiteration"),_p=Ys("animationstart"),Lp=Ys("transitionend"),Op=new Map,Fp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function cr(r,o){Op.set(r,o),l(o,[r])}for(var mu=0;mu<Fp.length;mu++){var gu=Fp[mu],XS=gu.toLowerCase(),YS=gu[0].toUpperCase()+gu.slice(1);cr(XS,"on"+YS)}cr(Dp,"onAnimationEnd"),cr(Ip,"onAnimationIteration"),cr(_p,"onAnimationStart"),cr("dblclick","onDoubleClick"),cr("focusin","onFocus"),cr("focusout","onBlur"),cr(Lp,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Co="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),GS=new Set("cancel close invalid load scroll toggle".split(" ").concat(Co));function zp(r,o,u){var f=r.type||"unknown-event";r.currentTarget=u,Xk(f,o,void 0,r),r.currentTarget=null}function Vp(r,o){o=(o&4)!==0;for(var u=0;u<r.length;u++){var f=r[u],g=f.event;f=f.listeners;e:{var x=void 0;if(o)for(var b=f.length-1;0<=b;b--){var N=f[b],I=N.instance,H=N.currentTarget;if(N=N.listener,I!==x&&g.isPropagationStopped())break e;zp(g,N,H),x=I}else for(b=0;b<f.length;b++){if(N=f[b],I=N.instance,H=N.currentTarget,N=N.listener,I!==x&&g.isPropagationStopped())break e;zp(g,N,H),x=I}}}if(Ds)throw r=ql,Ds=!1,ql=null,r}function et(r,o){var u=o[Cu];u===void 0&&(u=o[Cu]=new Set);var f=r+"__bubble";u.has(f)||(Bp(o,r,2,!1),u.add(f))}function yu(r,o,u){var f=0;o&&(f|=4),Bp(u,r,f,o)}var Gs="_reactListening"+Math.random().toString(36).slice(2);function Eo(r){if(!r[Gs]){r[Gs]=!0,i.forEach(function(u){u!=="selectionchange"&&(GS.has(u)||yu(u,!1,r),yu(u,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[Gs]||(o[Gs]=!0,yu("selectionchange",!1,o))}}function Bp(r,o,u,f){switch(cp(o)){case 1:var g=cS;break;case 4:g=fS;break;default:g=eu}u=g.bind(null,o,u,r),g=void 0,!Kl||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),f?g!==void 0?r.addEventListener(o,u,{capture:!0,passive:g}):r.addEventListener(o,u,!0):g!==void 0?r.addEventListener(o,u,{passive:g}):r.addEventListener(o,u,!1)}function vu(r,o,u,f,g){var x=f;if((o&1)===0&&(o&2)===0&&f!==null)e:for(;;){if(f===null)return;var b=f.tag;if(b===3||b===4){var N=f.stateNode.containerInfo;if(N===g||N.nodeType===8&&N.parentNode===g)break;if(b===4)for(b=f.return;b!==null;){var I=b.tag;if((I===3||I===4)&&(I=b.stateNode.containerInfo,I===g||I.nodeType===8&&I.parentNode===g))return;b=b.return}for(;N!==null;){if(b=Lr(N),b===null)return;if(I=b.tag,I===5||I===6){f=x=b;continue e}N=N.parentNode}}f=f.return}Kh(function(){var H=x,ne=ir(u),oe=[];e:{var te=Op.get(r);if(te!==void 0){var me=ru,we=r;switch(r){case"keypress":if(Ws(u)===0)break e;case"keydown":case"keyup":me=TS;break;case"focusin":we="focus",me=su;break;case"focusout":we="blur",me=su;break;case"beforeblur":case"afterblur":me=su;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=hp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=pS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=AS;break;case Dp:case Ip:case _p:me=yS;break;case Lp:me=NS;break;case"scroll":me=dS;break;case"wheel":me=DS;break;case"copy":case"cut":case"paste":me=xS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=mp}var be=(o&4)!==0,ut=!be&&r==="scroll",z=be?te!==null?te+"Capture":null:te;be=[];for(var O=H,$;O!==null;){$=O;var ce=$.stateNode;if($.tag===5&&ce!==null&&($=ce,z!==null&&(ce=so(O,z),ce!=null&&be.push(To(O,ce,$)))),ut)break;O=O.return}0<be.length&&(te=new me(te,we,null,u,ne),oe.push({event:te,listeners:be}))}}if((o&7)===0){e:{if(te=r==="mouseover"||r==="pointerover",me=r==="mouseout"||r==="pointerout",te&&u!==Ue&&(we=u.relatedTarget||u.fromElement)&&(Lr(we)||we[Kn]))break e;if((me||te)&&(te=ne.window===ne?ne:(te=ne.ownerDocument)?te.defaultView||te.parentWindow:window,me?(we=u.relatedTarget||u.toElement,me=H,we=we?Lr(we):null,we!==null&&(ut=_r(we),we!==ut||we.tag!==5&&we.tag!==6)&&(we=null)):(me=null,we=H),me!==we)){if(be=hp,ce="onMouseLeave",z="onMouseEnter",O="mouse",(r==="pointerout"||r==="pointerover")&&(be=mp,ce="onPointerLeave",z="onPointerEnter",O="pointer"),ut=me==null?te:xi(me),$=we==null?te:xi(we),te=new be(ce,O+"leave",me,u,ne),te.target=ut,te.relatedTarget=$,ce=null,Lr(ne)===H&&(be=new be(z,O+"enter",we,u,ne),be.target=$,be.relatedTarget=ut,ce=be),ut=ce,me&&we)t:{for(be=me,z=we,O=0,$=be;$;$=yi($))O++;for($=0,ce=z;ce;ce=yi(ce))$++;for(;0<O-$;)be=yi(be),O--;for(;0<$-O;)z=yi(z),$--;for(;O--;){if(be===z||z!==null&&be===z.alternate)break t;be=yi(be),z=yi(z)}be=null}else be=null;me!==null&&$p(oe,te,me,be,!1),we!==null&&ut!==null&&$p(oe,ut,we,be,!0)}}e:{if(te=H?xi(H):window,me=te.nodeName&&te.nodeName.toLowerCase(),me==="select"||me==="input"&&te.type==="file")var Ce=VS;else if(kp(te))if(bp)Ce=WS;else{Ce=$S;var Re=BS}else(me=te.nodeName)&&me.toLowerCase()==="input"&&(te.type==="checkbox"||te.type==="radio")&&(Ce=US);if(Ce&&(Ce=Ce(r,H))){Sp(oe,Ce,u,ne);break e}Re&&Re(r,te,H),r==="focusout"&&(Re=te._wrapperState)&&Re.controlled&&te.type==="number"&&Le(te,"number",te.value)}switch(Re=H?xi(H):window,r){case"focusin":(kp(Re)||Re.contentEditable==="true")&&(mi=Re,du=H,bo=null);break;case"focusout":bo=du=mi=null;break;case"mousedown":hu=!0;break;case"contextmenu":case"mouseup":case"dragend":hu=!1,Np(oe,u,ne);break;case"selectionchange":if(qS)break;case"keydown":case"keyup":Np(oe,u,ne)}var Ae;if(lu)e:{switch(r){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else pi?xp(r,u)&&(je="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(je="onCompositionStart");je&&(gp&&u.locale!=="ko"&&(pi||je!=="onCompositionStart"?je==="onCompositionEnd"&&pi&&(Ae=fp()):(ur=ne,nu="value"in ur?ur.value:ur.textContent,pi=!0)),Re=Qs(H,je),0<Re.length&&(je=new pp(je,r,null,u,ne),oe.push({event:je,listeners:Re}),Ae?je.data=Ae:(Ae=wp(u),Ae!==null&&(je.data=Ae)))),(Ae=_S?LS(r,u):OS(r,u))&&(H=Qs(H,"onBeforeInput"),0<H.length&&(ne=new pp("onBeforeInput","beforeinput",null,u,ne),oe.push({event:ne,listeners:H}),ne.data=Ae))}Vp(oe,o)})}function To(r,o,u){return{instance:r,listener:o,currentTarget:u}}function Qs(r,o){for(var u=o+"Capture",f=[];r!==null;){var g=r,x=g.stateNode;g.tag===5&&x!==null&&(g=x,x=so(r,u),x!=null&&f.unshift(To(r,x,g)),x=so(r,o),x!=null&&f.push(To(r,x,g))),r=r.return}return f}function yi(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function $p(r,o,u,f,g){for(var x=o._reactName,b=[];u!==null&&u!==f;){var N=u,I=N.alternate,H=N.stateNode;if(I!==null&&I===f)break;N.tag===5&&H!==null&&(N=H,g?(I=so(u,x),I!=null&&b.unshift(To(u,I,N))):g||(I=so(u,x),I!=null&&b.push(To(u,I,N)))),u=u.return}b.length!==0&&r.push({event:o,listeners:b})}var QS=/\r\n?/g,ZS=/\u0000|\uFFFD/g;function Up(r){return(typeof r=="string"?r:""+r).replace(QS,`
38
+ `).replace(ZS,"")}function Zs(r,o,u){if(o=Up(o),Up(r)!==o&&u)throw Error(n(425))}function Js(){}var xu=null,wu=null;function ku(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Su=typeof setTimeout=="function"?setTimeout:void 0,JS=typeof clearTimeout=="function"?clearTimeout:void 0,Wp=typeof Promise=="function"?Promise:void 0,eb=typeof queueMicrotask=="function"?queueMicrotask:typeof Wp<"u"?function(r){return Wp.resolve(null).then(r).catch(tb)}:Su;function tb(r){setTimeout(function(){throw r})}function bu(r,o){var u=o,f=0;do{var g=u.nextSibling;if(r.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(f===0){r.removeChild(g),go(o);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=g}while(u);go(o)}function fr(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function Hp(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(o===0)return r;o--}else u==="/$"&&o++}r=r.previousSibling}return null}var vi=Math.random().toString(36).slice(2),In="__reactFiber$"+vi,Po="__reactProps$"+vi,Kn="__reactContainer$"+vi,Cu="__reactEvents$"+vi,nb="__reactListeners$"+vi,rb="__reactHandles$"+vi;function Lr(r){var o=r[In];if(o)return o;for(var u=r.parentNode;u;){if(o=u[Kn]||u[In]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(r=Hp(r);r!==null;){if(u=r[In])return u;r=Hp(r)}return o}r=u,u=r.parentNode}return null}function Ro(r){return r=r[In]||r[Kn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function xi(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function ea(r){return r[Po]||null}var Eu=[],wi=-1;function dr(r){return{current:r}}function tt(r){0>wi||(r.current=Eu[wi],Eu[wi]=null,wi--)}function Qe(r,o){wi++,Eu[wi]=r.current,r.current=o}var hr={},Rt=dr(hr),Kt=dr(!1),Or=hr;function ki(r,o){var u=r.type.contextTypes;if(!u)return hr;var f=r.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===o)return f.__reactInternalMemoizedMaskedChildContext;var g={},x;for(x in u)g[x]=o[x];return f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=g),g}function qt(r){return r=r.childContextTypes,r!=null}function ta(){tt(Kt),tt(Rt)}function Kp(r,o,u){if(Rt.current!==hr)throw Error(n(168));Qe(Rt,o),Qe(Kt,u)}function qp(r,o,u){var f=r.stateNode;if(o=o.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var g in f)if(!(g in o))throw Error(n(108,Ee(r)||"Unknown",g));return P({},u,f)}function na(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||hr,Or=Rt.current,Qe(Rt,r),Qe(Kt,Kt.current),!0}function Xp(r,o,u){var f=r.stateNode;if(!f)throw Error(n(169));u?(r=qp(r,o,Or),f.__reactInternalMemoizedMergedChildContext=r,tt(Kt),tt(Rt),Qe(Rt,r)):tt(Kt),Qe(Kt,u)}var qn=null,ra=!1,Tu=!1;function Yp(r){qn===null?qn=[r]:qn.push(r)}function ib(r){ra=!0,Yp(r)}function pr(){if(!Tu&&qn!==null){Tu=!0;var r=0,o=He;try{var u=qn;for(He=1;r<u.length;r++){var f=u[r];do f=f(!0);while(f!==null)}qn=null,ra=!1}catch(g){throw qn!==null&&(qn=qn.slice(r+1)),Qh(Xl,pr),g}finally{He=o,Tu=!1}}return null}var Si=[],bi=0,ia=null,oa=0,un=[],cn=0,Fr=null,Xn=1,Yn="";function zr(r,o){Si[bi++]=oa,Si[bi++]=ia,ia=r,oa=o}function Gp(r,o,u){un[cn++]=Xn,un[cn++]=Yn,un[cn++]=Fr,Fr=r;var f=Xn;r=Yn;var g=32-kn(f)-1;f&=~(1<<g),u+=1;var x=32-kn(o)+g;if(30<x){var b=g-g%5;x=(f&(1<<b)-1).toString(32),f>>=b,g-=b,Xn=1<<32-kn(o)+g|u<<g|f,Yn=x+r}else Xn=1<<x|u<<g|f,Yn=r}function Pu(r){r.return!==null&&(zr(r,1),Gp(r,1,0))}function Ru(r){for(;r===ia;)ia=Si[--bi],Si[bi]=null,oa=Si[--bi],Si[bi]=null;for(;r===Fr;)Fr=un[--cn],un[cn]=null,Yn=un[--cn],un[cn]=null,Xn=un[--cn],un[cn]=null}var tn=null,nn=null,rt=!1,bn=null;function Qp(r,o){var u=pn(5,null,null,0);u.elementType="DELETED",u.stateNode=o,u.return=r,o=r.deletions,o===null?(r.deletions=[u],r.flags|=16):o.push(u)}function Zp(r,o){switch(r.tag){case 5:var u=r.type;return o=o.nodeType!==1||u.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,tn=r,nn=fr(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,tn=r,nn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(u=Fr!==null?{id:Xn,overflow:Yn}:null,r.memoizedState={dehydrated:o,treeContext:u,retryLane:1073741824},u=pn(18,null,null,0),u.stateNode=o,u.return=r,r.child=u,tn=r,nn=null,!0):!1;default:return!1}}function Au(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Mu(r){if(rt){var o=nn;if(o){var u=o;if(!Zp(r,o)){if(Au(r))throw Error(n(418));o=fr(u.nextSibling);var f=tn;o&&Zp(r,o)?Qp(f,u):(r.flags=r.flags&-4097|2,rt=!1,tn=r)}}else{if(Au(r))throw Error(n(418));r.flags=r.flags&-4097|2,rt=!1,tn=r}}}function Jp(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;tn=r}function sa(r){if(r!==tn)return!1;if(!rt)return Jp(r),rt=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!ku(r.type,r.memoizedProps)),o&&(o=nn)){if(Au(r))throw em(),Error(n(418));for(;o;)Qp(r,o),o=fr(o.nextSibling)}if(Jp(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(o===0){nn=fr(r.nextSibling);break e}o--}else u!=="$"&&u!=="$!"&&u!=="$?"||o++}r=r.nextSibling}nn=null}}else nn=tn?fr(r.stateNode.nextSibling):null;return!0}function em(){for(var r=nn;r;)r=fr(r.nextSibling)}function Ci(){nn=tn=null,rt=!1}function Nu(r){bn===null?bn=[r]:bn.push(r)}var ob=L.ReactCurrentBatchConfig;function Ao(r,o,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var f=u.stateNode}if(!f)throw Error(n(147,r));var g=f,x=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===x?o.ref:(o=function(b){var N=g.refs;b===null?delete N[x]:N[x]=b},o._stringRef=x,o)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function aa(r,o){throw r=Object.prototype.toString.call(o),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function tm(r){var o=r._init;return o(r._payload)}function nm(r){function o(z,O){if(r){var $=z.deletions;$===null?(z.deletions=[O],z.flags|=16):$.push(O)}}function u(z,O){if(!r)return null;for(;O!==null;)o(z,O),O=O.sibling;return null}function f(z,O){for(z=new Map;O!==null;)O.key!==null?z.set(O.key,O):z.set(O.index,O),O=O.sibling;return z}function g(z,O){return z=Sr(z,O),z.index=0,z.sibling=null,z}function x(z,O,$){return z.index=$,r?($=z.alternate,$!==null?($=$.index,$<O?(z.flags|=2,O):$):(z.flags|=2,O)):(z.flags|=1048576,O)}function b(z){return r&&z.alternate===null&&(z.flags|=2),z}function N(z,O,$,ce){return O===null||O.tag!==6?(O=Sc($,z.mode,ce),O.return=z,O):(O=g(O,$),O.return=z,O)}function I(z,O,$,ce){var Ce=$.type;return Ce===Y?ne(z,O,$.props.children,ce,$.key):O!==null&&(O.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ve&&tm(Ce)===O.type)?(ce=g(O,$.props),ce.ref=Ao(z,O,$),ce.return=z,ce):(ce=Na($.type,$.key,$.props,null,z.mode,ce),ce.ref=Ao(z,O,$),ce.return=z,ce)}function H(z,O,$,ce){return O===null||O.tag!==4||O.stateNode.containerInfo!==$.containerInfo||O.stateNode.implementation!==$.implementation?(O=bc($,z.mode,ce),O.return=z,O):(O=g(O,$.children||[]),O.return=z,O)}function ne(z,O,$,ce,Ce){return O===null||O.tag!==7?(O=qr($,z.mode,ce,Ce),O.return=z,O):(O=g(O,$),O.return=z,O)}function oe(z,O,$){if(typeof O=="string"&&O!==""||typeof O=="number")return O=Sc(""+O,z.mode,$),O.return=z,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case U:return $=Na(O.type,O.key,O.props,null,z.mode,$),$.ref=Ao(z,null,O),$.return=z,$;case D:return O=bc(O,z.mode,$),O.return=z,O;case ve:var ce=O._init;return oe(z,ce(O._payload),$)}if(Ut(O)||ue(O))return O=qr(O,z.mode,$,null),O.return=z,O;aa(z,O)}return null}function te(z,O,$,ce){var Ce=O!==null?O.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return Ce!==null?null:N(z,O,""+$,ce);if(typeof $=="object"&&$!==null){switch($.$$typeof){case U:return $.key===Ce?I(z,O,$,ce):null;case D:return $.key===Ce?H(z,O,$,ce):null;case ve:return Ce=$._init,te(z,O,Ce($._payload),ce)}if(Ut($)||ue($))return Ce!==null?null:ne(z,O,$,ce,null);aa(z,$)}return null}function me(z,O,$,ce,Ce){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return z=z.get($)||null,N(O,z,""+ce,Ce);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case U:return z=z.get(ce.key===null?$:ce.key)||null,I(O,z,ce,Ce);case D:return z=z.get(ce.key===null?$:ce.key)||null,H(O,z,ce,Ce);case ve:var Re=ce._init;return me(z,O,$,Re(ce._payload),Ce)}if(Ut(ce)||ue(ce))return z=z.get($)||null,ne(O,z,ce,Ce,null);aa(O,ce)}return null}function we(z,O,$,ce){for(var Ce=null,Re=null,Ae=O,je=O=0,wt=null;Ae!==null&&je<$.length;je++){Ae.index>je?(wt=Ae,Ae=null):wt=Ae.sibling;var $e=te(z,Ae,$[je],ce);if($e===null){Ae===null&&(Ae=wt);break}r&&Ae&&$e.alternate===null&&o(z,Ae),O=x($e,O,je),Re===null?Ce=$e:Re.sibling=$e,Re=$e,Ae=wt}if(je===$.length)return u(z,Ae),rt&&zr(z,je),Ce;if(Ae===null){for(;je<$.length;je++)Ae=oe(z,$[je],ce),Ae!==null&&(O=x(Ae,O,je),Re===null?Ce=Ae:Re.sibling=Ae,Re=Ae);return rt&&zr(z,je),Ce}for(Ae=f(z,Ae);je<$.length;je++)wt=me(Ae,z,je,$[je],ce),wt!==null&&(r&&wt.alternate!==null&&Ae.delete(wt.key===null?je:wt.key),O=x(wt,O,je),Re===null?Ce=wt:Re.sibling=wt,Re=wt);return r&&Ae.forEach(function(br){return o(z,br)}),rt&&zr(z,je),Ce}function be(z,O,$,ce){var Ce=ue($);if(typeof Ce!="function")throw Error(n(150));if($=Ce.call($),$==null)throw Error(n(151));for(var Re=Ce=null,Ae=O,je=O=0,wt=null,$e=$.next();Ae!==null&&!$e.done;je++,$e=$.next()){Ae.index>je?(wt=Ae,Ae=null):wt=Ae.sibling;var br=te(z,Ae,$e.value,ce);if(br===null){Ae===null&&(Ae=wt);break}r&&Ae&&br.alternate===null&&o(z,Ae),O=x(br,O,je),Re===null?Ce=br:Re.sibling=br,Re=br,Ae=wt}if($e.done)return u(z,Ae),rt&&zr(z,je),Ce;if(Ae===null){for(;!$e.done;je++,$e=$.next())$e=oe(z,$e.value,ce),$e!==null&&(O=x($e,O,je),Re===null?Ce=$e:Re.sibling=$e,Re=$e);return rt&&zr(z,je),Ce}for(Ae=f(z,Ae);!$e.done;je++,$e=$.next())$e=me(Ae,z,je,$e.value,ce),$e!==null&&(r&&$e.alternate!==null&&Ae.delete($e.key===null?je:$e.key),O=x($e,O,je),Re===null?Ce=$e:Re.sibling=$e,Re=$e);return r&&Ae.forEach(function(Fb){return o(z,Fb)}),rt&&zr(z,je),Ce}function ut(z,O,$,ce){if(typeof $=="object"&&$!==null&&$.type===Y&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case U:e:{for(var Ce=$.key,Re=O;Re!==null;){if(Re.key===Ce){if(Ce=$.type,Ce===Y){if(Re.tag===7){u(z,Re.sibling),O=g(Re,$.props.children),O.return=z,z=O;break e}}else if(Re.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===ve&&tm(Ce)===Re.type){u(z,Re.sibling),O=g(Re,$.props),O.ref=Ao(z,Re,$),O.return=z,z=O;break e}u(z,Re);break}else o(z,Re);Re=Re.sibling}$.type===Y?(O=qr($.props.children,z.mode,ce,$.key),O.return=z,z=O):(ce=Na($.type,$.key,$.props,null,z.mode,ce),ce.ref=Ao(z,O,$),ce.return=z,z=ce)}return b(z);case D:e:{for(Re=$.key;O!==null;){if(O.key===Re)if(O.tag===4&&O.stateNode.containerInfo===$.containerInfo&&O.stateNode.implementation===$.implementation){u(z,O.sibling),O=g(O,$.children||[]),O.return=z,z=O;break e}else{u(z,O);break}else o(z,O);O=O.sibling}O=bc($,z.mode,ce),O.return=z,z=O}return b(z);case ve:return Re=$._init,ut(z,O,Re($._payload),ce)}if(Ut($))return we(z,O,$,ce);if(ue($))return be(z,O,$,ce);aa(z,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,O!==null&&O.tag===6?(u(z,O.sibling),O=g(O,$),O.return=z,z=O):(u(z,O),O=Sc($,z.mode,ce),O.return=z,z=O),b(z)):u(z,O)}return ut}var Ei=nm(!0),rm=nm(!1),la=dr(null),ua=null,Ti=null,ju=null;function Du(){ju=Ti=ua=null}function Iu(r){var o=la.current;tt(la),r._currentValue=o}function _u(r,o,u){for(;r!==null;){var f=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,f!==null&&(f.childLanes|=o)):f!==null&&(f.childLanes&o)!==o&&(f.childLanes|=o),r===u)break;r=r.return}}function Pi(r,o){ua=r,ju=Ti=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&o)!==0&&(Xt=!0),r.firstContext=null)}function fn(r){var o=r._currentValue;if(ju!==r)if(r={context:r,memoizedValue:o,next:null},Ti===null){if(ua===null)throw Error(n(308));Ti=r,ua.dependencies={lanes:0,firstContext:r}}else Ti=Ti.next=r;return o}var Vr=null;function Lu(r){Vr===null?Vr=[r]:Vr.push(r)}function im(r,o,u,f){var g=o.interleaved;return g===null?(u.next=u,Lu(o)):(u.next=g.next,g.next=u),o.interleaved=u,Gn(r,f)}function Gn(r,o){r.lanes|=o;var u=r.alternate;for(u!==null&&(u.lanes|=o),u=r,r=r.return;r!==null;)r.childLanes|=o,u=r.alternate,u!==null&&(u.childLanes|=o),u=r,r=r.return;return u.tag===3?u.stateNode:null}var mr=!1;function Ou(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function om(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Qn(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function gr(r,o,u){var f=r.updateQueue;if(f===null)return null;if(f=f.shared,(Be&2)!==0){var g=f.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),f.pending=o,Gn(r,u)}return g=f.interleaved,g===null?(o.next=o,Lu(f)):(o.next=g.next,g.next=o),f.interleaved=o,Gn(r,u)}function ca(r,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194240)!==0)){var f=o.lanes;f&=r.pendingLanes,u|=f,o.lanes=u,Ql(r,u)}}function sm(r,o){var u=r.updateQueue,f=r.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var g=null,x=null;if(u=u.firstBaseUpdate,u!==null){do{var b={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};x===null?g=x=b:x=x.next=b,u=u.next}while(u!==null);x===null?g=x=o:x=x.next=o}else g=x=o;u={baseState:f.baseState,firstBaseUpdate:g,lastBaseUpdate:x,shared:f.shared,effects:f.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=o:r.next=o,u.lastBaseUpdate=o}function fa(r,o,u,f){var g=r.updateQueue;mr=!1;var x=g.firstBaseUpdate,b=g.lastBaseUpdate,N=g.shared.pending;if(N!==null){g.shared.pending=null;var I=N,H=I.next;I.next=null,b===null?x=H:b.next=H,b=I;var ne=r.alternate;ne!==null&&(ne=ne.updateQueue,N=ne.lastBaseUpdate,N!==b&&(N===null?ne.firstBaseUpdate=H:N.next=H,ne.lastBaseUpdate=I))}if(x!==null){var oe=g.baseState;b=0,ne=H=I=null,N=x;do{var te=N.lane,me=N.eventTime;if((f&te)===te){ne!==null&&(ne=ne.next={eventTime:me,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var we=r,be=N;switch(te=o,me=u,be.tag){case 1:if(we=be.payload,typeof we=="function"){oe=we.call(me,oe,te);break e}oe=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=be.payload,te=typeof we=="function"?we.call(me,oe,te):we,te==null)break e;oe=P({},oe,te);break e;case 2:mr=!0}}N.callback!==null&&N.lane!==0&&(r.flags|=64,te=g.effects,te===null?g.effects=[N]:te.push(N))}else me={eventTime:me,lane:te,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ne===null?(H=ne=me,I=oe):ne=ne.next=me,b|=te;if(N=N.next,N===null){if(N=g.shared.pending,N===null)break;te=N,N=te.next,te.next=null,g.lastBaseUpdate=te,g.shared.pending=null}}while(!0);if(ne===null&&(I=oe),g.baseState=I,g.firstBaseUpdate=H,g.lastBaseUpdate=ne,o=g.shared.interleaved,o!==null){g=o;do b|=g.lane,g=g.next;while(g!==o)}else x===null&&(g.shared.lanes=0);Ur|=b,r.lanes=b,r.memoizedState=oe}}function am(r,o,u){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var f=r[o],g=f.callback;if(g!==null){if(f.callback=null,f=u,typeof g!="function")throw Error(n(191,g));g.call(f)}}}var Mo={},_n=dr(Mo),No=dr(Mo),jo=dr(Mo);function Br(r){if(r===Mo)throw Error(n(174));return r}function Fu(r,o){switch(Qe(jo,o),Qe(No,r),Qe(_n,Mo),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ae(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=ae(o,r)}tt(_n),Qe(_n,o)}function Ri(){tt(_n),tt(No),tt(jo)}function lm(r){Br(jo.current);var o=Br(_n.current),u=ae(o,r.type);o!==u&&(Qe(No,r),Qe(_n,u))}function zu(r){No.current===r&&(tt(_n),tt(No))}var it=dr(0);function da(r){for(var o=r;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Vu=[];function Bu(){for(var r=0;r<Vu.length;r++)Vu[r]._workInProgressVersionPrimary=null;Vu.length=0}var ha=L.ReactCurrentDispatcher,$u=L.ReactCurrentBatchConfig,$r=0,ot=null,mt=null,vt=null,pa=!1,Do=!1,Io=0,sb=0;function At(){throw Error(n(321))}function Uu(r,o){if(o===null)return!1;for(var u=0;u<o.length&&u<r.length;u++)if(!Sn(r[u],o[u]))return!1;return!0}function Wu(r,o,u,f,g,x){if($r=x,ot=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ha.current=r===null||r.memoizedState===null?cb:fb,r=u(f,g),Do){x=0;do{if(Do=!1,Io=0,25<=x)throw Error(n(301));x+=1,vt=mt=null,o.updateQueue=null,ha.current=db,r=u(f,g)}while(Do)}if(ha.current=ya,o=mt!==null&&mt.next!==null,$r=0,vt=mt=ot=null,pa=!1,o)throw Error(n(300));return r}function Hu(){var r=Io!==0;return Io=0,r}function Ln(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?ot.memoizedState=vt=r:vt=vt.next=r,vt}function dn(){if(mt===null){var r=ot.alternate;r=r!==null?r.memoizedState:null}else r=mt.next;var o=vt===null?ot.memoizedState:vt.next;if(o!==null)vt=o,mt=r;else{if(r===null)throw Error(n(310));mt=r,r={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},vt===null?ot.memoizedState=vt=r:vt=vt.next=r}return vt}function _o(r,o){return typeof o=="function"?o(r):o}function Ku(r){var o=dn(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=mt,g=f.baseQueue,x=u.pending;if(x!==null){if(g!==null){var b=g.next;g.next=x.next,x.next=b}f.baseQueue=g=x,u.pending=null}if(g!==null){x=g.next,f=f.baseState;var N=b=null,I=null,H=x;do{var ne=H.lane;if(($r&ne)===ne)I!==null&&(I=I.next={lane:0,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),f=H.hasEagerState?H.eagerState:r(f,H.action);else{var oe={lane:ne,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null};I===null?(N=I=oe,b=f):I=I.next=oe,ot.lanes|=ne,Ur|=ne}H=H.next}while(H!==null&&H!==x);I===null?b=f:I.next=N,Sn(f,o.memoizedState)||(Xt=!0),o.memoizedState=f,o.baseState=b,o.baseQueue=I,u.lastRenderedState=f}if(r=u.interleaved,r!==null){g=r;do x=g.lane,ot.lanes|=x,Ur|=x,g=g.next;while(g!==r)}else g===null&&(u.lanes=0);return[o.memoizedState,u.dispatch]}function qu(r){var o=dn(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var f=u.dispatch,g=u.pending,x=o.memoizedState;if(g!==null){u.pending=null;var b=g=g.next;do x=r(x,b.action),b=b.next;while(b!==g);Sn(x,o.memoizedState)||(Xt=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),u.lastRenderedState=x}return[x,f]}function um(){}function cm(r,o){var u=ot,f=dn(),g=o(),x=!Sn(f.memoizedState,g);if(x&&(f.memoizedState=g,Xt=!0),f=f.queue,Xu(hm.bind(null,u,f,r),[r]),f.getSnapshot!==o||x||vt!==null&&vt.memoizedState.tag&1){if(u.flags|=2048,Lo(9,dm.bind(null,u,f,g,o),void 0,null),xt===null)throw Error(n(349));($r&30)!==0||fm(u,o,g)}return g}function fm(r,o,u){r.flags|=16384,r={getSnapshot:o,value:u},o=ot.updateQueue,o===null?(o={lastEffect:null,stores:null},ot.updateQueue=o,o.stores=[r]):(u=o.stores,u===null?o.stores=[r]:u.push(r))}function dm(r,o,u,f){o.value=u,o.getSnapshot=f,pm(o)&&mm(r)}function hm(r,o,u){return u(function(){pm(o)&&mm(r)})}function pm(r){var o=r.getSnapshot;r=r.value;try{var u=o();return!Sn(r,u)}catch{return!0}}function mm(r){var o=Gn(r,1);o!==null&&Pn(o,r,1,-1)}function gm(r){var o=Ln();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_o,lastRenderedState:r},o.queue=r,r=r.dispatch=ub.bind(null,ot,r),[o.memoizedState,r]}function Lo(r,o,u,f){return r={tag:r,create:o,destroy:u,deps:f,next:null},o=ot.updateQueue,o===null?(o={lastEffect:null,stores:null},ot.updateQueue=o,o.lastEffect=r.next=r):(u=o.lastEffect,u===null?o.lastEffect=r.next=r:(f=u.next,u.next=r,r.next=f,o.lastEffect=r)),r}function ym(){return dn().memoizedState}function ma(r,o,u,f){var g=Ln();ot.flags|=r,g.memoizedState=Lo(1|o,u,void 0,f===void 0?null:f)}function ga(r,o,u,f){var g=dn();f=f===void 0?null:f;var x=void 0;if(mt!==null){var b=mt.memoizedState;if(x=b.destroy,f!==null&&Uu(f,b.deps)){g.memoizedState=Lo(o,u,x,f);return}}ot.flags|=r,g.memoizedState=Lo(1|o,u,x,f)}function vm(r,o){return ma(8390656,8,r,o)}function Xu(r,o){return ga(2048,8,r,o)}function xm(r,o){return ga(4,2,r,o)}function wm(r,o){return ga(4,4,r,o)}function km(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function Sm(r,o,u){return u=u!=null?u.concat([r]):null,ga(4,4,km.bind(null,o,r),u)}function Yu(){}function bm(r,o){var u=dn();o=o===void 0?null:o;var f=u.memoizedState;return f!==null&&o!==null&&Uu(o,f[1])?f[0]:(u.memoizedState=[r,o],r)}function Cm(r,o){var u=dn();o=o===void 0?null:o;var f=u.memoizedState;return f!==null&&o!==null&&Uu(o,f[1])?f[0]:(r=r(),u.memoizedState=[r,o],r)}function Em(r,o,u){return($r&21)===0?(r.baseState&&(r.baseState=!1,Xt=!0),r.memoizedState=u):(Sn(u,o)||(u=tp(),ot.lanes|=u,Ur|=u,r.baseState=!0),o)}function ab(r,o){var u=He;He=u!==0&&4>u?u:4,r(!0);var f=$u.transition;$u.transition={};try{r(!1),o()}finally{He=u,$u.transition=f}}function Tm(){return dn().memoizedState}function lb(r,o,u){var f=wr(r);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},Pm(r))Rm(o,u);else if(u=im(r,o,u,f),u!==null){var g=Lt();Pn(u,r,f,g),Am(u,o,f)}}function ub(r,o,u){var f=wr(r),g={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(Pm(r))Rm(o,g);else{var x=r.alternate;if(r.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var b=o.lastRenderedState,N=x(b,u);if(g.hasEagerState=!0,g.eagerState=N,Sn(N,b)){var I=o.interleaved;I===null?(g.next=g,Lu(o)):(g.next=I.next,I.next=g),o.interleaved=g;return}}catch{}finally{}u=im(r,o,g,f),u!==null&&(g=Lt(),Pn(u,r,f,g),Am(u,o,f))}}function Pm(r){var o=r.alternate;return r===ot||o!==null&&o===ot}function Rm(r,o){Do=pa=!0;var u=r.pending;u===null?o.next=o:(o.next=u.next,u.next=o),r.pending=o}function Am(r,o,u){if((u&4194240)!==0){var f=o.lanes;f&=r.pendingLanes,u|=f,o.lanes=u,Ql(r,u)}}var ya={readContext:fn,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useInsertionEffect:At,useLayoutEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useMutableSource:At,useSyncExternalStore:At,useId:At,unstable_isNewReconciler:!1},cb={readContext:fn,useCallback:function(r,o){return Ln().memoizedState=[r,o===void 0?null:o],r},useContext:fn,useEffect:vm,useImperativeHandle:function(r,o,u){return u=u!=null?u.concat([r]):null,ma(4194308,4,km.bind(null,o,r),u)},useLayoutEffect:function(r,o){return ma(4194308,4,r,o)},useInsertionEffect:function(r,o){return ma(4,2,r,o)},useMemo:function(r,o){var u=Ln();return o=o===void 0?null:o,r=r(),u.memoizedState=[r,o],r},useReducer:function(r,o,u){var f=Ln();return o=u!==void 0?u(o):o,f.memoizedState=f.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},f.queue=r,r=r.dispatch=lb.bind(null,ot,r),[f.memoizedState,r]},useRef:function(r){var o=Ln();return r={current:r},o.memoizedState=r},useState:gm,useDebugValue:Yu,useDeferredValue:function(r){return Ln().memoizedState=r},useTransition:function(){var r=gm(!1),o=r[0];return r=ab.bind(null,r[1]),Ln().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,u){var f=ot,g=Ln();if(rt){if(u===void 0)throw Error(n(407));u=u()}else{if(u=o(),xt===null)throw Error(n(349));($r&30)!==0||fm(f,o,u)}g.memoizedState=u;var x={value:u,getSnapshot:o};return g.queue=x,vm(hm.bind(null,f,x,r),[r]),f.flags|=2048,Lo(9,dm.bind(null,f,x,u,o),void 0,null),u},useId:function(){var r=Ln(),o=xt.identifierPrefix;if(rt){var u=Yn,f=Xn;u=(f&~(1<<32-kn(f)-1)).toString(32)+u,o=":"+o+"R"+u,u=Io++,0<u&&(o+="H"+u.toString(32)),o+=":"}else u=sb++,o=":"+o+"r"+u.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},fb={readContext:fn,useCallback:bm,useContext:fn,useEffect:Xu,useImperativeHandle:Sm,useInsertionEffect:xm,useLayoutEffect:wm,useMemo:Cm,useReducer:Ku,useRef:ym,useState:function(){return Ku(_o)},useDebugValue:Yu,useDeferredValue:function(r){var o=dn();return Em(o,mt.memoizedState,r)},useTransition:function(){var r=Ku(_o)[0],o=dn().memoizedState;return[r,o]},useMutableSource:um,useSyncExternalStore:cm,useId:Tm,unstable_isNewReconciler:!1},db={readContext:fn,useCallback:bm,useContext:fn,useEffect:Xu,useImperativeHandle:Sm,useInsertionEffect:xm,useLayoutEffect:wm,useMemo:Cm,useReducer:qu,useRef:ym,useState:function(){return qu(_o)},useDebugValue:Yu,useDeferredValue:function(r){var o=dn();return mt===null?o.memoizedState=r:Em(o,mt.memoizedState,r)},useTransition:function(){var r=qu(_o)[0],o=dn().memoizedState;return[r,o]},useMutableSource:um,useSyncExternalStore:cm,useId:Tm,unstable_isNewReconciler:!1};function Cn(r,o){if(r&&r.defaultProps){o=P({},o),r=r.defaultProps;for(var u in r)o[u]===void 0&&(o[u]=r[u]);return o}return o}function Gu(r,o,u,f){o=r.memoizedState,u=u(f,o),u=u==null?o:P({},o,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var va={isMounted:function(r){return(r=r._reactInternals)?_r(r)===r:!1},enqueueSetState:function(r,o,u){r=r._reactInternals;var f=Lt(),g=wr(r),x=Qn(f,g);x.payload=o,u!=null&&(x.callback=u),o=gr(r,x,g),o!==null&&(Pn(o,r,g,f),ca(o,r,g))},enqueueReplaceState:function(r,o,u){r=r._reactInternals;var f=Lt(),g=wr(r),x=Qn(f,g);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=gr(r,x,g),o!==null&&(Pn(o,r,g,f),ca(o,r,g))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var u=Lt(),f=wr(r),g=Qn(u,f);g.tag=2,o!=null&&(g.callback=o),o=gr(r,g,f),o!==null&&(Pn(o,r,f,u),ca(o,r,f))}};function Mm(r,o,u,f,g,x,b){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(f,x,b):o.prototype&&o.prototype.isPureReactComponent?!So(u,f)||!So(g,x):!0}function Nm(r,o,u){var f=!1,g=hr,x=o.contextType;return typeof x=="object"&&x!==null?x=fn(x):(g=qt(o)?Or:Rt.current,f=o.contextTypes,x=(f=f!=null)?ki(r,g):hr),o=new o(u,x),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=va,r.stateNode=o,o._reactInternals=r,f&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=x),o}function jm(r,o,u,f){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,f),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,f),o.state!==r&&va.enqueueReplaceState(o,o.state,null)}function Qu(r,o,u,f){var g=r.stateNode;g.props=u,g.state=r.memoizedState,g.refs={},Ou(r);var x=o.contextType;typeof x=="object"&&x!==null?g.context=fn(x):(x=qt(o)?Or:Rt.current,g.context=ki(r,x)),g.state=r.memoizedState,x=o.getDerivedStateFromProps,typeof x=="function"&&(Gu(r,o,x,u),g.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(o=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),o!==g.state&&va.enqueueReplaceState(g,g.state,null),fa(r,u,g,f),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function Ai(r,o){try{var u="",f=o;do u+=de(f),f=f.return;while(f);var g=u}catch(x){g=`
39
+ Error generating stack: `+x.message+`
40
+ `+x.stack}return{value:r,source:o,stack:g,digest:null}}function Zu(r,o,u){return{value:r,source:null,stack:u??null,digest:o??null}}function Ju(r,o){try{console.error(o.value)}catch(u){setTimeout(function(){throw u})}}var hb=typeof WeakMap=="function"?WeakMap:Map;function Dm(r,o,u){u=Qn(-1,u),u.tag=3,u.payload={element:null};var f=o.value;return u.callback=function(){Ea||(Ea=!0,pc=f),Ju(r,o)},u}function Im(r,o,u){u=Qn(-1,u),u.tag=3;var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var g=o.value;u.payload=function(){return f(g)},u.callback=function(){Ju(r,o)}}var x=r.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(u.callback=function(){Ju(r,o),typeof f!="function"&&(vr===null?vr=new Set([this]):vr.add(this));var b=o.stack;this.componentDidCatch(o.value,{componentStack:b!==null?b:""})}),u}function _m(r,o,u){var f=r.pingCache;if(f===null){f=r.pingCache=new hb;var g=new Set;f.set(o,g)}else g=f.get(o),g===void 0&&(g=new Set,f.set(o,g));g.has(u)||(g.add(u),r=Pb.bind(null,r,o,u),o.then(r,r))}function Lm(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function Om(r,o,u,f,g){return(r.mode&1)===0?(r===o?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(o=Qn(-1,1),o.tag=2,gr(u,o,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var pb=L.ReactCurrentOwner,Xt=!1;function _t(r,o,u,f){o.child=r===null?rm(o,null,u,f):Ei(o,r.child,u,f)}function Fm(r,o,u,f,g){u=u.render;var x=o.ref;return Pi(o,g),f=Wu(r,o,u,f,x,g),u=Hu(),r!==null&&!Xt?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~g,Zn(r,o,g)):(rt&&u&&Pu(o),o.flags|=1,_t(r,o,f,g),o.child)}function zm(r,o,u,f,g){if(r===null){var x=u.type;return typeof x=="function"&&!kc(x)&&x.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(o.tag=15,o.type=x,Vm(r,o,x,f,g)):(r=Na(u.type,null,f,o,o.mode,g),r.ref=o.ref,r.return=o,o.child=r)}if(x=r.child,(r.lanes&g)===0){var b=x.memoizedProps;if(u=u.compare,u=u!==null?u:So,u(b,f)&&r.ref===o.ref)return Zn(r,o,g)}return o.flags|=1,r=Sr(x,f),r.ref=o.ref,r.return=o,o.child=r}function Vm(r,o,u,f,g){if(r!==null){var x=r.memoizedProps;if(So(x,f)&&r.ref===o.ref)if(Xt=!1,o.pendingProps=f=x,(r.lanes&g)!==0)(r.flags&131072)!==0&&(Xt=!0);else return o.lanes=r.lanes,Zn(r,o,g)}return ec(r,o,u,f,g)}function Bm(r,o,u){var f=o.pendingProps,g=f.children,x=r!==null?r.memoizedState:null;if(f.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Qe(Ni,rn),rn|=u;else{if((u&1073741824)===0)return r=x!==null?x.baseLanes|u:u,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,Qe(Ni,rn),rn|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=x!==null?x.baseLanes:u,Qe(Ni,rn),rn|=f}else x!==null?(f=x.baseLanes|u,o.memoizedState=null):f=u,Qe(Ni,rn),rn|=f;return _t(r,o,g,u),o.child}function $m(r,o){var u=o.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(o.flags|=512,o.flags|=2097152)}function ec(r,o,u,f,g){var x=qt(u)?Or:Rt.current;return x=ki(o,x),Pi(o,g),u=Wu(r,o,u,f,x,g),f=Hu(),r!==null&&!Xt?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~g,Zn(r,o,g)):(rt&&f&&Pu(o),o.flags|=1,_t(r,o,u,g),o.child)}function Um(r,o,u,f,g){if(qt(u)){var x=!0;na(o)}else x=!1;if(Pi(o,g),o.stateNode===null)wa(r,o),Nm(o,u,f),Qu(o,u,f,g),f=!0;else if(r===null){var b=o.stateNode,N=o.memoizedProps;b.props=N;var I=b.context,H=u.contextType;typeof H=="object"&&H!==null?H=fn(H):(H=qt(u)?Or:Rt.current,H=ki(o,H));var ne=u.getDerivedStateFromProps,oe=typeof ne=="function"||typeof b.getSnapshotBeforeUpdate=="function";oe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==f||I!==H)&&jm(o,b,f,H),mr=!1;var te=o.memoizedState;b.state=te,fa(o,f,b,g),I=o.memoizedState,N!==f||te!==I||Kt.current||mr?(typeof ne=="function"&&(Gu(o,u,ne,f),I=o.memoizedState),(N=mr||Mm(o,u,N,f,te,I,H))?(oe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(o.flags|=4194308)):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=f,o.memoizedState=I),b.props=f,b.state=I,b.context=H,f=N):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),f=!1)}else{b=o.stateNode,om(r,o),N=o.memoizedProps,H=o.type===o.elementType?N:Cn(o.type,N),b.props=H,oe=o.pendingProps,te=b.context,I=u.contextType,typeof I=="object"&&I!==null?I=fn(I):(I=qt(u)?Or:Rt.current,I=ki(o,I));var me=u.getDerivedStateFromProps;(ne=typeof me=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(N!==oe||te!==I)&&jm(o,b,f,I),mr=!1,te=o.memoizedState,b.state=te,fa(o,f,b,g);var we=o.memoizedState;N!==oe||te!==we||Kt.current||mr?(typeof me=="function"&&(Gu(o,u,me,f),we=o.memoizedState),(H=mr||Mm(o,u,H,f,te,we,I)||!1)?(ne||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(f,we,I),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(f,we,I)),typeof b.componentDidUpdate=="function"&&(o.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof b.componentDidUpdate!="function"||N===r.memoizedProps&&te===r.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===r.memoizedProps&&te===r.memoizedState||(o.flags|=1024),o.memoizedProps=f,o.memoizedState=we),b.props=f,b.state=we,b.context=I,f=H):(typeof b.componentDidUpdate!="function"||N===r.memoizedProps&&te===r.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||N===r.memoizedProps&&te===r.memoizedState||(o.flags|=1024),f=!1)}return tc(r,o,u,f,x,g)}function tc(r,o,u,f,g,x){$m(r,o);var b=(o.flags&128)!==0;if(!f&&!b)return g&&Xp(o,u,!1),Zn(r,o,x);f=o.stateNode,pb.current=o;var N=b&&typeof u.getDerivedStateFromError!="function"?null:f.render();return o.flags|=1,r!==null&&b?(o.child=Ei(o,r.child,null,x),o.child=Ei(o,null,N,x)):_t(r,o,N,x),o.memoizedState=f.state,g&&Xp(o,u,!0),o.child}function Wm(r){var o=r.stateNode;o.pendingContext?Kp(r,o.pendingContext,o.pendingContext!==o.context):o.context&&Kp(r,o.context,!1),Fu(r,o.containerInfo)}function Hm(r,o,u,f,g){return Ci(),Nu(g),o.flags|=256,_t(r,o,u,f),o.child}var nc={dehydrated:null,treeContext:null,retryLane:0};function rc(r){return{baseLanes:r,cachePool:null,transitions:null}}function Km(r,o,u){var f=o.pendingProps,g=it.current,x=!1,b=(o.flags&128)!==0,N;if((N=b)||(N=r!==null&&r.memoizedState===null?!1:(g&2)!==0),N?(x=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),Qe(it,g&1),r===null)return Mu(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((o.mode&1)===0?o.lanes=1:r.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(b=f.children,r=f.fallback,x?(f=o.mode,x=o.child,b={mode:"hidden",children:b},(f&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=b):x=ja(b,f,0,null),r=qr(r,f,u,null),x.return=o,r.return=o,x.sibling=r,o.child=x,o.child.memoizedState=rc(u),o.memoizedState=nc,r):ic(o,b));if(g=r.memoizedState,g!==null&&(N=g.dehydrated,N!==null))return mb(r,o,b,f,N,g,u);if(x){x=f.fallback,b=o.mode,g=r.child,N=g.sibling;var I={mode:"hidden",children:f.children};return(b&1)===0&&o.child!==g?(f=o.child,f.childLanes=0,f.pendingProps=I,o.deletions=null):(f=Sr(g,I),f.subtreeFlags=g.subtreeFlags&14680064),N!==null?x=Sr(N,x):(x=qr(x,b,u,null),x.flags|=2),x.return=o,f.return=o,f.sibling=x,o.child=f,f=x,x=o.child,b=r.child.memoizedState,b=b===null?rc(u):{baseLanes:b.baseLanes|u,cachePool:null,transitions:b.transitions},x.memoizedState=b,x.childLanes=r.childLanes&~u,o.memoizedState=nc,f}return x=r.child,r=x.sibling,f=Sr(x,{mode:"visible",children:f.children}),(o.mode&1)===0&&(f.lanes=u),f.return=o,f.sibling=null,r!==null&&(u=o.deletions,u===null?(o.deletions=[r],o.flags|=16):u.push(r)),o.child=f,o.memoizedState=null,f}function ic(r,o){return o=ja({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function xa(r,o,u,f){return f!==null&&Nu(f),Ei(o,r.child,null,u),r=ic(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function mb(r,o,u,f,g,x,b){if(u)return o.flags&256?(o.flags&=-257,f=Zu(Error(n(422))),xa(r,o,b,f)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(x=f.fallback,g=o.mode,f=ja({mode:"visible",children:f.children},g,0,null),x=qr(x,g,b,null),x.flags|=2,f.return=o,x.return=o,f.sibling=x,o.child=f,(o.mode&1)!==0&&Ei(o,r.child,null,b),o.child.memoizedState=rc(b),o.memoizedState=nc,x);if((o.mode&1)===0)return xa(r,o,b,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var N=f.dgst;return f=N,x=Error(n(419)),f=Zu(x,f,void 0),xa(r,o,b,f)}if(N=(b&r.childLanes)!==0,Xt||N){if(f=xt,f!==null){switch(b&-b){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|b))!==0?0:g,g!==0&&g!==x.retryLane&&(x.retryLane=g,Gn(r,g),Pn(f,r,g,-1))}return wc(),f=Zu(Error(n(421))),xa(r,o,b,f)}return g.data==="$?"?(o.flags|=128,o.child=r.child,o=Rb.bind(null,r),g._reactRetry=o,null):(r=x.treeContext,nn=fr(g.nextSibling),tn=o,rt=!0,bn=null,r!==null&&(un[cn++]=Xn,un[cn++]=Yn,un[cn++]=Fr,Xn=r.id,Yn=r.overflow,Fr=o),o=ic(o,f.children),o.flags|=4096,o)}function qm(r,o,u){r.lanes|=o;var f=r.alternate;f!==null&&(f.lanes|=o),_u(r.return,o,u)}function oc(r,o,u,f,g){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:g}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=f,x.tail=u,x.tailMode=g)}function Xm(r,o,u){var f=o.pendingProps,g=f.revealOrder,x=f.tail;if(_t(r,o,f.children,u),f=it.current,(f&2)!==0)f=f&1|2,o.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&qm(r,u,o);else if(r.tag===19)qm(r,u,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}f&=1}if(Qe(it,f),(o.mode&1)===0)o.memoizedState=null;else switch(g){case"forwards":for(u=o.child,g=null;u!==null;)r=u.alternate,r!==null&&da(r)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),oc(o,!1,g,u,x);break;case"backwards":for(u=null,g=o.child,o.child=null;g!==null;){if(r=g.alternate,r!==null&&da(r)===null){o.child=g;break}r=g.sibling,g.sibling=u,u=g,g=r}oc(o,!0,u,null,x);break;case"together":oc(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function wa(r,o){(o.mode&1)===0&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function Zn(r,o,u){if(r!==null&&(o.dependencies=r.dependencies),Ur|=o.lanes,(u&o.childLanes)===0)return null;if(r!==null&&o.child!==r.child)throw Error(n(153));if(o.child!==null){for(r=o.child,u=Sr(r,r.pendingProps),o.child=u,u.return=o;r.sibling!==null;)r=r.sibling,u=u.sibling=Sr(r,r.pendingProps),u.return=o;u.sibling=null}return o.child}function gb(r,o,u){switch(o.tag){case 3:Wm(o),Ci();break;case 5:lm(o);break;case 1:qt(o.type)&&na(o);break;case 4:Fu(o,o.stateNode.containerInfo);break;case 10:var f=o.type._context,g=o.memoizedProps.value;Qe(la,f._currentValue),f._currentValue=g;break;case 13:if(f=o.memoizedState,f!==null)return f.dehydrated!==null?(Qe(it,it.current&1),o.flags|=128,null):(u&o.child.childLanes)!==0?Km(r,o,u):(Qe(it,it.current&1),r=Zn(r,o,u),r!==null?r.sibling:null);Qe(it,it.current&1);break;case 19:if(f=(u&o.childLanes)!==0,(r.flags&128)!==0){if(f)return Xm(r,o,u);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),Qe(it,it.current),f)break;return null;case 22:case 23:return o.lanes=0,Bm(r,o,u)}return Zn(r,o,u)}var Ym,sc,Gm,Qm;Ym=function(r,o){for(var u=o.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},sc=function(){},Gm=function(r,o,u,f){var g=r.memoizedProps;if(g!==f){r=o.stateNode,Br(_n.current);var x=null;switch(u){case"input":g=$t(r,g),f=$t(r,f),x=[];break;case"select":g=P({},g,{value:void 0}),f=P({},f,{value:void 0}),x=[];break;case"textarea":g=wn(r,g),f=wn(r,f),x=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(r.onclick=Js)}nt(u,f);var b;u=null;for(H in g)if(!f.hasOwnProperty(H)&&g.hasOwnProperty(H)&&g[H]!=null)if(H==="style"){var N=g[H];for(b in N)N.hasOwnProperty(b)&&(u||(u={}),u[b]="")}else H!=="dangerouslySetInnerHTML"&&H!=="children"&&H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&H!=="autoFocus"&&(s.hasOwnProperty(H)?x||(x=[]):(x=x||[]).push(H,null));for(H in f){var I=f[H];if(N=g?.[H],f.hasOwnProperty(H)&&I!==N&&(I!=null||N!=null))if(H==="style")if(N){for(b in N)!N.hasOwnProperty(b)||I&&I.hasOwnProperty(b)||(u||(u={}),u[b]="");for(b in I)I.hasOwnProperty(b)&&N[b]!==I[b]&&(u||(u={}),u[b]=I[b])}else u||(x||(x=[]),x.push(H,u)),u=I;else H==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,N=N?N.__html:void 0,I!=null&&N!==I&&(x=x||[]).push(H,I)):H==="children"?typeof I!="string"&&typeof I!="number"||(x=x||[]).push(H,""+I):H!=="suppressContentEditableWarning"&&H!=="suppressHydrationWarning"&&(s.hasOwnProperty(H)?(I!=null&&H==="onScroll"&&et("scroll",r),x||N===I||(x=[])):(x=x||[]).push(H,I))}u&&(x=x||[]).push("style",u);var H=x;(o.updateQueue=H)&&(o.flags|=4)}},Qm=function(r,o,u,f){u!==f&&(o.flags|=4)};function Oo(r,o){if(!rt)switch(r.tailMode){case"hidden":o=r.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:f.sibling=null}}function Mt(r){var o=r.alternate!==null&&r.alternate.child===r.child,u=0,f=0;if(o)for(var g=r.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)u|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=f,r.childLanes=u,o}function yb(r,o,u){var f=o.pendingProps;switch(Ru(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(o),null;case 1:return qt(o.type)&&ta(),Mt(o),null;case 3:return f=o.stateNode,Ri(),tt(Kt),tt(Rt),Bu(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(r===null||r.child===null)&&(sa(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,bn!==null&&(yc(bn),bn=null))),sc(r,o),Mt(o),null;case 5:zu(o);var g=Br(jo.current);if(u=o.type,r!==null&&o.stateNode!=null)Gm(r,o,u,f,g),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!f){if(o.stateNode===null)throw Error(n(166));return Mt(o),null}if(r=Br(_n.current),sa(o)){f=o.stateNode,u=o.type;var x=o.memoizedProps;switch(f[In]=o,f[Po]=x,r=(o.mode&1)!==0,u){case"dialog":et("cancel",f),et("close",f);break;case"iframe":case"object":case"embed":et("load",f);break;case"video":case"audio":for(g=0;g<Co.length;g++)et(Co[g],f);break;case"source":et("error",f);break;case"img":case"image":case"link":et("error",f),et("load",f);break;case"details":et("toggle",f);break;case"input":ln(f,x),et("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!x.multiple},et("invalid",f);break;case"textarea":B(f,x),et("invalid",f)}nt(u,x),g=null;for(var b in x)if(x.hasOwnProperty(b)){var N=x[b];b==="children"?typeof N=="string"?f.textContent!==N&&(x.suppressHydrationWarning!==!0&&Zs(f.textContent,N,r),g=["children",N]):typeof N=="number"&&f.textContent!==""+N&&(x.suppressHydrationWarning!==!0&&Zs(f.textContent,N,r),g=["children",""+N]):s.hasOwnProperty(b)&&N!=null&&b==="onScroll"&&et("scroll",f)}switch(u){case"input":We(f),It(f,x,!0);break;case"textarea":We(f),Ne(f);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(f.onclick=Js)}f=g,o.updateQueue=f,f!==null&&(o.flags|=4)}else{b=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=K(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=b.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof f.is=="string"?r=b.createElement(u,{is:f.is}):(r=b.createElement(u),u==="select"&&(b=r,f.multiple?b.multiple=!0:f.size&&(b.size=f.size))):r=b.createElementNS(r,u),r[In]=o,r[Po]=f,Ym(r,o,!1,!1),o.stateNode=r;e:{switch(b=Ke(u,f),u){case"dialog":et("cancel",r),et("close",r),g=f;break;case"iframe":case"object":case"embed":et("load",r),g=f;break;case"video":case"audio":for(g=0;g<Co.length;g++)et(Co[g],r);g=f;break;case"source":et("error",r),g=f;break;case"img":case"image":case"link":et("error",r),et("load",r),g=f;break;case"details":et("toggle",r),g=f;break;case"input":ln(r,f),g=$t(r,f),et("invalid",r);break;case"option":g=f;break;case"select":r._wrapperState={wasMultiple:!!f.multiple},g=P({},f,{value:void 0}),et("invalid",r);break;case"textarea":B(r,f),g=wn(r,f),et("invalid",r);break;default:g=f}nt(u,g),N=g;for(x in N)if(N.hasOwnProperty(x)){var I=N[x];x==="style"?Je(r,I):x==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&J(r,I)):x==="children"?typeof I=="string"?(u!=="textarea"||I!=="")&&se(r,I):typeof I=="number"&&se(r,""+I):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(s.hasOwnProperty(x)?I!=null&&x==="onScroll"&&et("scroll",r):I!=null&&A(r,x,I,b))}switch(u){case"input":We(r),It(r,f,!1);break;case"textarea":We(r),Ne(r);break;case"option":f.value!=null&&r.setAttribute("value",""+ge(f.value));break;case"select":r.multiple=!!f.multiple,x=f.value,x!=null?Wt(r,!!f.multiple,x,!1):f.defaultValue!=null&&Wt(r,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=Js)}switch(u){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Mt(o),null;case 6:if(r&&o.stateNode!=null)Qm(r,o,r.memoizedProps,f);else{if(typeof f!="string"&&o.stateNode===null)throw Error(n(166));if(u=Br(jo.current),Br(_n.current),sa(o)){if(f=o.stateNode,u=o.memoizedProps,f[In]=o,(x=f.nodeValue!==u)&&(r=tn,r!==null))switch(r.tag){case 3:Zs(f.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Zs(f.nodeValue,u,(r.mode&1)!==0)}x&&(o.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[In]=o,o.stateNode=f}return Mt(o),null;case 13:if(tt(it),f=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(rt&&nn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)em(),Ci(),o.flags|=98560,x=!1;else if(x=sa(o),f!==null&&f.dehydrated!==null){if(r===null){if(!x)throw Error(n(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(n(317));x[In]=o}else Ci(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Mt(o),x=!1}else bn!==null&&(yc(bn),bn=null),x=!0;if(!x)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=u,o):(f=f!==null,f!==(r!==null&&r.memoizedState!==null)&&f&&(o.child.flags|=8192,(o.mode&1)!==0&&(r===null||(it.current&1)!==0?gt===0&&(gt=3):wc())),o.updateQueue!==null&&(o.flags|=4),Mt(o),null);case 4:return Ri(),sc(r,o),r===null&&Eo(o.stateNode.containerInfo),Mt(o),null;case 10:return Iu(o.type._context),Mt(o),null;case 17:return qt(o.type)&&ta(),Mt(o),null;case 19:if(tt(it),x=o.memoizedState,x===null)return Mt(o),null;if(f=(o.flags&128)!==0,b=x.rendering,b===null)if(f)Oo(x,!1);else{if(gt!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(b=da(r),b!==null){for(o.flags|=128,Oo(x,!1),f=b.updateQueue,f!==null&&(o.updateQueue=f,o.flags|=4),o.subtreeFlags=0,f=u,u=o.child;u!==null;)x=u,r=f,x.flags&=14680066,b=x.alternate,b===null?(x.childLanes=0,x.lanes=r,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=b.childLanes,x.lanes=b.lanes,x.child=b.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=b.memoizedProps,x.memoizedState=b.memoizedState,x.updateQueue=b.updateQueue,x.type=b.type,r=b.dependencies,x.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return Qe(it,it.current&1|2),o.child}r=r.sibling}x.tail!==null&&lt()>ji&&(o.flags|=128,f=!0,Oo(x,!1),o.lanes=4194304)}else{if(!f)if(r=da(b),r!==null){if(o.flags|=128,f=!0,u=r.updateQueue,u!==null&&(o.updateQueue=u,o.flags|=4),Oo(x,!0),x.tail===null&&x.tailMode==="hidden"&&!b.alternate&&!rt)return Mt(o),null}else 2*lt()-x.renderingStartTime>ji&&u!==1073741824&&(o.flags|=128,f=!0,Oo(x,!1),o.lanes=4194304);x.isBackwards?(b.sibling=o.child,o.child=b):(u=x.last,u!==null?u.sibling=b:o.child=b,x.last=b)}return x.tail!==null?(o=x.tail,x.rendering=o,x.tail=o.sibling,x.renderingStartTime=lt(),o.sibling=null,u=it.current,Qe(it,f?u&1|2:u&1),o):(Mt(o),null);case 22:case 23:return xc(),f=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==f&&(o.flags|=8192),f&&(o.mode&1)!==0?(rn&1073741824)!==0&&(Mt(o),o.subtreeFlags&6&&(o.flags|=8192)):Mt(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function vb(r,o){switch(Ru(o),o.tag){case 1:return qt(o.type)&&ta(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return Ri(),tt(Kt),tt(Rt),Bu(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return zu(o),null;case 13:if(tt(it),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ci()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return tt(it),null;case 4:return Ri(),null;case 10:return Iu(o.type._context),null;case 22:case 23:return xc(),null;case 24:return null;default:return null}}var ka=!1,Nt=!1,xb=typeof WeakSet=="function"?WeakSet:Set,ye=null;function Mi(r,o){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){st(r,o,f)}else u.current=null}function ac(r,o,u){try{u()}catch(f){st(r,o,f)}}var Zm=!1;function wb(r,o){if(xu=Bs,r=Mp(),fu(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var g=f.anchorOffset,x=f.focusNode;f=f.focusOffset;try{u.nodeType,x.nodeType}catch{u=null;break e}var b=0,N=-1,I=-1,H=0,ne=0,oe=r,te=null;t:for(;;){for(var me;oe!==u||g!==0&&oe.nodeType!==3||(N=b+g),oe!==x||f!==0&&oe.nodeType!==3||(I=b+f),oe.nodeType===3&&(b+=oe.nodeValue.length),(me=oe.firstChild)!==null;)te=oe,oe=me;for(;;){if(oe===r)break t;if(te===u&&++H===g&&(N=b),te===x&&++ne===f&&(I=b),(me=oe.nextSibling)!==null)break;oe=te,te=oe.parentNode}oe=me}u=N===-1||I===-1?null:{start:N,end:I}}else u=null}u=u||{start:0,end:0}}else u=null;for(wu={focusedElem:r,selectionRange:u},Bs=!1,ye=o;ye!==null;)if(o=ye,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,ye=r;else for(;ye!==null;){o=ye;try{var we=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var be=we.memoizedProps,ut=we.memoizedState,z=o.stateNode,O=z.getSnapshotBeforeUpdate(o.elementType===o.type?be:Cn(o.type,be),ut);z.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var $=o.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ce){st(o,o.return,ce)}if(r=o.sibling,r!==null){r.return=o.return,ye=r;break}ye=o.return}return we=Zm,Zm=!1,we}function Fo(r,o,u){var f=o.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&r)===r){var x=g.destroy;g.destroy=void 0,x!==void 0&&ac(o,u,x)}g=g.next}while(g!==f)}}function Sa(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&r)===r){var f=u.create;u.destroy=f()}u=u.next}while(u!==o)}}function lc(r){var o=r.ref;if(o!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof o=="function"?o(r):o.current=r}}function Jm(r){var o=r.alternate;o!==null&&(r.alternate=null,Jm(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[In],delete o[Po],delete o[Cu],delete o[nb],delete o[rb])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function eg(r){return r.tag===5||r.tag===3||r.tag===4}function tg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||eg(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function uc(r,o,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,o?u.nodeType===8?u.parentNode.insertBefore(r,o):u.insertBefore(r,o):(u.nodeType===8?(o=u.parentNode,o.insertBefore(r,u)):(o=u,o.appendChild(r)),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Js));else if(f!==4&&(r=r.child,r!==null))for(uc(r,o,u),r=r.sibling;r!==null;)uc(r,o,u),r=r.sibling}function cc(r,o,u){var f=r.tag;if(f===5||f===6)r=r.stateNode,o?u.insertBefore(r,o):u.appendChild(r);else if(f!==4&&(r=r.child,r!==null))for(cc(r,o,u),r=r.sibling;r!==null;)cc(r,o,u),r=r.sibling}var bt=null,En=!1;function yr(r,o,u){for(u=u.child;u!==null;)ng(r,o,u),u=u.sibling}function ng(r,o,u){if(Dn&&typeof Dn.onCommitFiberUnmount=="function")try{Dn.onCommitFiberUnmount(_s,u)}catch{}switch(u.tag){case 5:Nt||Mi(u,o);case 6:var f=bt,g=En;bt=null,yr(r,o,u),bt=f,En=g,bt!==null&&(En?(r=bt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):bt.removeChild(u.stateNode));break;case 18:bt!==null&&(En?(r=bt,u=u.stateNode,r.nodeType===8?bu(r.parentNode,u):r.nodeType===1&&bu(r,u),go(r)):bu(bt,u.stateNode));break;case 4:f=bt,g=En,bt=u.stateNode.containerInfo,En=!0,yr(r,o,u),bt=f,En=g;break;case 0:case 11:case 14:case 15:if(!Nt&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var x=g,b=x.destroy;x=x.tag,b!==void 0&&((x&2)!==0||(x&4)!==0)&&ac(u,o,b),g=g.next}while(g!==f)}yr(r,o,u);break;case 1:if(!Nt&&(Mi(u,o),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(N){st(u,o,N)}yr(r,o,u);break;case 21:yr(r,o,u);break;case 22:u.mode&1?(Nt=(f=Nt)||u.memoizedState!==null,yr(r,o,u),Nt=f):yr(r,o,u);break;default:yr(r,o,u)}}function rg(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new xb),o.forEach(function(f){var g=Ab.bind(null,r,f);u.has(f)||(u.add(f),f.then(g,g))})}}function Tn(r,o){var u=o.deletions;if(u!==null)for(var f=0;f<u.length;f++){var g=u[f];try{var x=r,b=o,N=b;e:for(;N!==null;){switch(N.tag){case 5:bt=N.stateNode,En=!1;break e;case 3:bt=N.stateNode.containerInfo,En=!0;break e;case 4:bt=N.stateNode.containerInfo,En=!0;break e}N=N.return}if(bt===null)throw Error(n(160));ng(x,b,g),bt=null,En=!1;var I=g.alternate;I!==null&&(I.return=null),g.return=null}catch(H){st(g,o,H)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)ig(o,r),o=o.sibling}function ig(r,o){var u=r.alternate,f=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(Tn(o,r),On(r),f&4){try{Fo(3,r,r.return),Sa(3,r)}catch(be){st(r,r.return,be)}try{Fo(5,r,r.return)}catch(be){st(r,r.return,be)}}break;case 1:Tn(o,r),On(r),f&512&&u!==null&&Mi(u,u.return);break;case 5:if(Tn(o,r),On(r),f&512&&u!==null&&Mi(u,u.return),r.flags&32){var g=r.stateNode;try{se(g,"")}catch(be){st(r,r.return,be)}}if(f&4&&(g=r.stateNode,g!=null)){var x=r.memoizedProps,b=u!==null?u.memoizedProps:x,N=r.type,I=r.updateQueue;if(r.updateQueue=null,I!==null)try{N==="input"&&x.type==="radio"&&x.name!=null&&St(g,x),Ke(N,b);var H=Ke(N,x);for(b=0;b<I.length;b+=2){var ne=I[b],oe=I[b+1];ne==="style"?Je(g,oe):ne==="dangerouslySetInnerHTML"?J(g,oe):ne==="children"?se(g,oe):A(g,ne,oe,H)}switch(N){case"input":ft(g,x);break;case"textarea":he(g,x);break;case"select":var te=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!x.multiple;var me=x.value;me!=null?Wt(g,!!x.multiple,me,!1):te!==!!x.multiple&&(x.defaultValue!=null?Wt(g,!!x.multiple,x.defaultValue,!0):Wt(g,!!x.multiple,x.multiple?[]:"",!1))}g[Po]=x}catch(be){st(r,r.return,be)}}break;case 6:if(Tn(o,r),On(r),f&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,x=r.memoizedProps;try{g.nodeValue=x}catch(be){st(r,r.return,be)}}break;case 3:if(Tn(o,r),On(r),f&4&&u!==null&&u.memoizedState.isDehydrated)try{go(o.containerInfo)}catch(be){st(r,r.return,be)}break;case 4:Tn(o,r),On(r);break;case 13:Tn(o,r),On(r),g=r.child,g.flags&8192&&(x=g.memoizedState!==null,g.stateNode.isHidden=x,!x||g.alternate!==null&&g.alternate.memoizedState!==null||(hc=lt())),f&4&&rg(r);break;case 22:if(ne=u!==null&&u.memoizedState!==null,r.mode&1?(Nt=(H=Nt)||ne,Tn(o,r),Nt=H):Tn(o,r),On(r),f&8192){if(H=r.memoizedState!==null,(r.stateNode.isHidden=H)&&!ne&&(r.mode&1)!==0)for(ye=r,ne=r.child;ne!==null;){for(oe=ye=ne;ye!==null;){switch(te=ye,me=te.child,te.tag){case 0:case 11:case 14:case 15:Fo(4,te,te.return);break;case 1:Mi(te,te.return);var we=te.stateNode;if(typeof we.componentWillUnmount=="function"){f=te,u=te.return;try{o=f,we.props=o.memoizedProps,we.state=o.memoizedState,we.componentWillUnmount()}catch(be){st(f,u,be)}}break;case 5:Mi(te,te.return);break;case 22:if(te.memoizedState!==null){ag(oe);continue}}me!==null?(me.return=te,ye=me):ag(oe)}ne=ne.sibling}e:for(ne=null,oe=r;;){if(oe.tag===5){if(ne===null){ne=oe;try{g=oe.stateNode,H?(x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(N=oe.stateNode,I=oe.memoizedProps.style,b=I!=null&&I.hasOwnProperty("display")?I.display:null,N.style.display=pe("display",b))}catch(be){st(r,r.return,be)}}}else if(oe.tag===6){if(ne===null)try{oe.stateNode.nodeValue=H?"":oe.memoizedProps}catch(be){st(r,r.return,be)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===r)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===r)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===r)break e;ne===oe&&(ne=null),oe=oe.return}ne===oe&&(ne=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Tn(o,r),On(r),f&4&&rg(r);break;case 21:break;default:Tn(o,r),On(r)}}function On(r){var o=r.flags;if(o&2){try{e:{for(var u=r.return;u!==null;){if(eg(u)){var f=u;break e}u=u.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(se(g,""),f.flags&=-33);var x=tg(r);cc(r,x,g);break;case 3:case 4:var b=f.stateNode.containerInfo,N=tg(r);uc(r,N,b);break;default:throw Error(n(161))}}catch(I){st(r,r.return,I)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function kb(r,o,u){ye=r,og(r)}function og(r,o,u){for(var f=(r.mode&1)!==0;ye!==null;){var g=ye,x=g.child;if(g.tag===22&&f){var b=g.memoizedState!==null||ka;if(!b){var N=g.alternate,I=N!==null&&N.memoizedState!==null||Nt;N=ka;var H=Nt;if(ka=b,(Nt=I)&&!H)for(ye=g;ye!==null;)b=ye,I=b.child,b.tag===22&&b.memoizedState!==null?lg(g):I!==null?(I.return=b,ye=I):lg(g);for(;x!==null;)ye=x,og(x),x=x.sibling;ye=g,ka=N,Nt=H}sg(r)}else(g.subtreeFlags&8772)!==0&&x!==null?(x.return=g,ye=x):sg(r)}}function sg(r){for(;ye!==null;){var o=ye;if((o.flags&8772)!==0){var u=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Nt||Sa(5,o);break;case 1:var f=o.stateNode;if(o.flags&4&&!Nt)if(u===null)f.componentDidMount();else{var g=o.elementType===o.type?u.memoizedProps:Cn(o.type,u.memoizedProps);f.componentDidUpdate(g,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&am(o,x,f);break;case 3:var b=o.updateQueue;if(b!==null){if(u=null,o.child!==null)switch(o.child.tag){case 5:u=o.child.stateNode;break;case 1:u=o.child.stateNode}am(o,b,u)}break;case 5:var N=o.stateNode;if(u===null&&o.flags&4){u=N;var I=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&u.focus();break;case"img":I.src&&(u.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var H=o.alternate;if(H!==null){var ne=H.memoizedState;if(ne!==null){var oe=ne.dehydrated;oe!==null&&go(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Nt||o.flags&512&&lc(o)}catch(te){st(o,o.return,te)}}if(o===r){ye=null;break}if(u=o.sibling,u!==null){u.return=o.return,ye=u;break}ye=o.return}}function ag(r){for(;ye!==null;){var o=ye;if(o===r){ye=null;break}var u=o.sibling;if(u!==null){u.return=o.return,ye=u;break}ye=o.return}}function lg(r){for(;ye!==null;){var o=ye;try{switch(o.tag){case 0:case 11:case 15:var u=o.return;try{Sa(4,o)}catch(I){st(o,u,I)}break;case 1:var f=o.stateNode;if(typeof f.componentDidMount=="function"){var g=o.return;try{f.componentDidMount()}catch(I){st(o,g,I)}}var x=o.return;try{lc(o)}catch(I){st(o,x,I)}break;case 5:var b=o.return;try{lc(o)}catch(I){st(o,b,I)}}}catch(I){st(o,o.return,I)}if(o===r){ye=null;break}var N=o.sibling;if(N!==null){N.return=o.return,ye=N;break}ye=o.return}}var Sb=Math.ceil,ba=L.ReactCurrentDispatcher,fc=L.ReactCurrentOwner,hn=L.ReactCurrentBatchConfig,Be=0,xt=null,dt=null,Ct=0,rn=0,Ni=dr(0),gt=0,zo=null,Ur=0,Ca=0,dc=0,Vo=null,Yt=null,hc=0,ji=1/0,Jn=null,Ea=!1,pc=null,vr=null,Ta=!1,xr=null,Pa=0,Bo=0,mc=null,Ra=-1,Aa=0;function Lt(){return(Be&6)!==0?lt():Ra!==-1?Ra:Ra=lt()}function wr(r){return(r.mode&1)===0?1:(Be&2)!==0&&Ct!==0?Ct&-Ct:ob.transition!==null?(Aa===0&&(Aa=tp()),Aa):(r=He,r!==0||(r=window.event,r=r===void 0?16:cp(r.type)),r)}function Pn(r,o,u,f){if(50<Bo)throw Bo=0,mc=null,Error(n(185));co(r,u,f),((Be&2)===0||r!==xt)&&(r===xt&&((Be&2)===0&&(Ca|=u),gt===4&&kr(r,Ct)),Gt(r,f),u===1&&Be===0&&(o.mode&1)===0&&(ji=lt()+500,ra&&pr()))}function Gt(r,o){var u=r.callbackNode;oS(r,o);var f=Fs(r,r===xt?Ct:0);if(f===0)u!==null&&Zh(u),r.callbackNode=null,r.callbackPriority=0;else if(o=f&-f,r.callbackPriority!==o){if(u!=null&&Zh(u),o===1)r.tag===0?ib(cg.bind(null,r)):Yp(cg.bind(null,r)),eb(function(){(Be&6)===0&&pr()}),u=null;else{switch(np(f)){case 1:u=Xl;break;case 4:u=Jh;break;case 16:u=Is;break;case 536870912:u=ep;break;default:u=Is}u=vg(u,ug.bind(null,r))}r.callbackPriority=o,r.callbackNode=u}}function ug(r,o){if(Ra=-1,Aa=0,(Be&6)!==0)throw Error(n(327));var u=r.callbackNode;if(Di()&&r.callbackNode!==u)return null;var f=Fs(r,r===xt?Ct:0);if(f===0)return null;if((f&30)!==0||(f&r.expiredLanes)!==0||o)o=Ma(r,f);else{o=f;var g=Be;Be|=2;var x=dg();(xt!==r||Ct!==o)&&(Jn=null,ji=lt()+500,Hr(r,o));do try{Eb();break}catch(N){fg(r,N)}while(!0);Du(),ba.current=x,Be=g,dt!==null?o=0:(xt=null,Ct=0,o=gt)}if(o!==0){if(o===2&&(g=Yl(r),g!==0&&(f=g,o=gc(r,g))),o===1)throw u=zo,Hr(r,0),kr(r,f),Gt(r,lt()),u;if(o===6)kr(r,f);else{if(g=r.current.alternate,(f&30)===0&&!bb(g)&&(o=Ma(r,f),o===2&&(x=Yl(r),x!==0&&(f=x,o=gc(r,x))),o===1))throw u=zo,Hr(r,0),kr(r,f),Gt(r,lt()),u;switch(r.finishedWork=g,r.finishedLanes=f,o){case 0:case 1:throw Error(n(345));case 2:Kr(r,Yt,Jn);break;case 3:if(kr(r,f),(f&130023424)===f&&(o=hc+500-lt(),10<o)){if(Fs(r,0)!==0)break;if(g=r.suspendedLanes,(g&f)!==f){Lt(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=Su(Kr.bind(null,r,Yt,Jn),o);break}Kr(r,Yt,Jn);break;case 4:if(kr(r,f),(f&4194240)===f)break;for(o=r.eventTimes,g=-1;0<f;){var b=31-kn(f);x=1<<b,b=o[b],b>g&&(g=b),f&=~x}if(f=g,f=lt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*Sb(f/1960))-f,10<f){r.timeoutHandle=Su(Kr.bind(null,r,Yt,Jn),f);break}Kr(r,Yt,Jn);break;case 5:Kr(r,Yt,Jn);break;default:throw Error(n(329))}}}return Gt(r,lt()),r.callbackNode===u?ug.bind(null,r):null}function gc(r,o){var u=Vo;return r.current.memoizedState.isDehydrated&&(Hr(r,o).flags|=256),r=Ma(r,o),r!==2&&(o=Yt,Yt=u,o!==null&&yc(o)),r}function yc(r){Yt===null?Yt=r:Yt.push.apply(Yt,r)}function bb(r){for(var o=r;;){if(o.flags&16384){var u=o.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var g=u[f],x=g.getSnapshot;g=g.value;try{if(!Sn(x(),g))return!1}catch{return!1}}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function kr(r,o){for(o&=~dc,o&=~Ca,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var u=31-kn(o),f=1<<u;r[u]=-1,o&=~f}}function cg(r){if((Be&6)!==0)throw Error(n(327));Di();var o=Fs(r,0);if((o&1)===0)return Gt(r,lt()),null;var u=Ma(r,o);if(r.tag!==0&&u===2){var f=Yl(r);f!==0&&(o=f,u=gc(r,f))}if(u===1)throw u=zo,Hr(r,0),kr(r,o),Gt(r,lt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Kr(r,Yt,Jn),Gt(r,lt()),null}function vc(r,o){var u=Be;Be|=1;try{return r(o)}finally{Be=u,Be===0&&(ji=lt()+500,ra&&pr())}}function Wr(r){xr!==null&&xr.tag===0&&(Be&6)===0&&Di();var o=Be;Be|=1;var u=hn.transition,f=He;try{if(hn.transition=null,He=1,r)return r()}finally{He=f,hn.transition=u,Be=o,(Be&6)===0&&pr()}}function xc(){rn=Ni.current,tt(Ni)}function Hr(r,o){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,JS(u)),dt!==null)for(u=dt.return;u!==null;){var f=u;switch(Ru(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&ta();break;case 3:Ri(),tt(Kt),tt(Rt),Bu();break;case 5:zu(f);break;case 4:Ri();break;case 13:tt(it);break;case 19:tt(it);break;case 10:Iu(f.type._context);break;case 22:case 23:xc()}u=u.return}if(xt=r,dt=r=Sr(r.current,null),Ct=rn=o,gt=0,zo=null,dc=Ca=Ur=0,Yt=Vo=null,Vr!==null){for(o=0;o<Vr.length;o++)if(u=Vr[o],f=u.interleaved,f!==null){u.interleaved=null;var g=f.next,x=u.pending;if(x!==null){var b=x.next;x.next=g,f.next=b}u.pending=f}Vr=null}return r}function fg(r,o){do{var u=dt;try{if(Du(),ha.current=ya,pa){for(var f=ot.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}pa=!1}if($r=0,vt=mt=ot=null,Do=!1,Io=0,fc.current=null,u===null||u.return===null){gt=1,zo=o,dt=null;break}e:{var x=r,b=u.return,N=u,I=o;if(o=Ct,N.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var H=I,ne=N,oe=ne.tag;if((ne.mode&1)===0&&(oe===0||oe===11||oe===15)){var te=ne.alternate;te?(ne.updateQueue=te.updateQueue,ne.memoizedState=te.memoizedState,ne.lanes=te.lanes):(ne.updateQueue=null,ne.memoizedState=null)}var me=Lm(b);if(me!==null){me.flags&=-257,Om(me,b,N,x,o),me.mode&1&&_m(x,H,o),o=me,I=H;var we=o.updateQueue;if(we===null){var be=new Set;be.add(I),o.updateQueue=be}else we.add(I);break e}else{if((o&1)===0){_m(x,H,o),wc();break e}I=Error(n(426))}}else if(rt&&N.mode&1){var ut=Lm(b);if(ut!==null){(ut.flags&65536)===0&&(ut.flags|=256),Om(ut,b,N,x,o),Nu(Ai(I,N));break e}}x=I=Ai(I,N),gt!==4&&(gt=2),Vo===null?Vo=[x]:Vo.push(x),x=b;do{switch(x.tag){case 3:x.flags|=65536,o&=-o,x.lanes|=o;var z=Dm(x,I,o);sm(x,z);break e;case 1:N=I;var O=x.type,$=x.stateNode;if((x.flags&128)===0&&(typeof O.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(vr===null||!vr.has($)))){x.flags|=65536,o&=-o,x.lanes|=o;var ce=Im(x,N,o);sm(x,ce);break e}}x=x.return}while(x!==null)}pg(u)}catch(Ce){o=Ce,dt===u&&u!==null&&(dt=u=u.return);continue}break}while(!0)}function dg(){var r=ba.current;return ba.current=ya,r===null?ya:r}function wc(){(gt===0||gt===3||gt===2)&&(gt=4),xt===null||(Ur&268435455)===0&&(Ca&268435455)===0||kr(xt,Ct)}function Ma(r,o){var u=Be;Be|=2;var f=dg();(xt!==r||Ct!==o)&&(Jn=null,Hr(r,o));do try{Cb();break}catch(g){fg(r,g)}while(!0);if(Du(),Be=u,ba.current=f,dt!==null)throw Error(n(261));return xt=null,Ct=0,gt}function Cb(){for(;dt!==null;)hg(dt)}function Eb(){for(;dt!==null&&!Gk();)hg(dt)}function hg(r){var o=yg(r.alternate,r,rn);r.memoizedProps=r.pendingProps,o===null?pg(r):dt=o,fc.current=null}function pg(r){var o=r;do{var u=o.alternate;if(r=o.return,(o.flags&32768)===0){if(u=yb(u,o,rn),u!==null){dt=u;return}}else{if(u=vb(u,o),u!==null){u.flags&=32767,dt=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{gt=6,dt=null;return}}if(o=o.sibling,o!==null){dt=o;return}dt=o=r}while(o!==null);gt===0&&(gt=5)}function Kr(r,o,u){var f=He,g=hn.transition;try{hn.transition=null,He=1,Tb(r,o,u,f)}finally{hn.transition=g,He=f}return null}function Tb(r,o,u,f){do Di();while(xr!==null);if((Be&6)!==0)throw Error(n(327));u=r.finishedWork;var g=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var x=u.lanes|u.childLanes;if(sS(r,x),r===xt&&(dt=xt=null,Ct=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Ta||(Ta=!0,vg(Is,function(){return Di(),null})),x=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||x){x=hn.transition,hn.transition=null;var b=He;He=1;var N=Be;Be|=4,fc.current=null,wb(r,u),ig(u,r),KS(wu),Bs=!!xu,wu=xu=null,r.current=u,kb(u),Qk(),Be=N,He=b,hn.transition=x}else r.current=u;if(Ta&&(Ta=!1,xr=r,Pa=g),x=r.pendingLanes,x===0&&(vr=null),eS(u.stateNode),Gt(r,lt()),o!==null)for(f=r.onRecoverableError,u=0;u<o.length;u++)g=o[u],f(g.value,{componentStack:g.stack,digest:g.digest});if(Ea)throw Ea=!1,r=pc,pc=null,r;return(Pa&1)!==0&&r.tag!==0&&Di(),x=r.pendingLanes,(x&1)!==0?r===mc?Bo++:(Bo=0,mc=r):Bo=0,pr(),null}function Di(){if(xr!==null){var r=np(Pa),o=hn.transition,u=He;try{if(hn.transition=null,He=16>r?16:r,xr===null)var f=!1;else{if(r=xr,xr=null,Pa=0,(Be&6)!==0)throw Error(n(331));var g=Be;for(Be|=4,ye=r.current;ye!==null;){var x=ye,b=x.child;if((ye.flags&16)!==0){var N=x.deletions;if(N!==null){for(var I=0;I<N.length;I++){var H=N[I];for(ye=H;ye!==null;){var ne=ye;switch(ne.tag){case 0:case 11:case 15:Fo(8,ne,x)}var oe=ne.child;if(oe!==null)oe.return=ne,ye=oe;else for(;ye!==null;){ne=ye;var te=ne.sibling,me=ne.return;if(Jm(ne),ne===H){ye=null;break}if(te!==null){te.return=me,ye=te;break}ye=me}}}var we=x.alternate;if(we!==null){var be=we.child;if(be!==null){we.child=null;do{var ut=be.sibling;be.sibling=null,be=ut}while(be!==null)}}ye=x}}if((x.subtreeFlags&2064)!==0&&b!==null)b.return=x,ye=b;else e:for(;ye!==null;){if(x=ye,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:Fo(9,x,x.return)}var z=x.sibling;if(z!==null){z.return=x.return,ye=z;break e}ye=x.return}}var O=r.current;for(ye=O;ye!==null;){b=ye;var $=b.child;if((b.subtreeFlags&2064)!==0&&$!==null)$.return=b,ye=$;else e:for(b=O;ye!==null;){if(N=ye,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:Sa(9,N)}}catch(Ce){st(N,N.return,Ce)}if(N===b){ye=null;break e}var ce=N.sibling;if(ce!==null){ce.return=N.return,ye=ce;break e}ye=N.return}}if(Be=g,pr(),Dn&&typeof Dn.onPostCommitFiberRoot=="function")try{Dn.onPostCommitFiberRoot(_s,r)}catch{}f=!0}return f}finally{He=u,hn.transition=o}}return!1}function mg(r,o,u){o=Ai(u,o),o=Dm(r,o,1),r=gr(r,o,1),o=Lt(),r!==null&&(co(r,1,o),Gt(r,o))}function st(r,o,u){if(r.tag===3)mg(r,r,u);else for(;o!==null;){if(o.tag===3){mg(o,r,u);break}else if(o.tag===1){var f=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(vr===null||!vr.has(f))){r=Ai(u,r),r=Im(o,r,1),o=gr(o,r,1),r=Lt(),o!==null&&(co(o,1,r),Gt(o,r));break}}o=o.return}}function Pb(r,o,u){var f=r.pingCache;f!==null&&f.delete(o),o=Lt(),r.pingedLanes|=r.suspendedLanes&u,xt===r&&(Ct&u)===u&&(gt===4||gt===3&&(Ct&130023424)===Ct&&500>lt()-hc?Hr(r,0):dc|=u),Gt(r,o)}function gg(r,o){o===0&&((r.mode&1)===0?o=1:(o=Os,Os<<=1,(Os&130023424)===0&&(Os=4194304)));var u=Lt();r=Gn(r,o),r!==null&&(co(r,o,u),Gt(r,u))}function Rb(r){var o=r.memoizedState,u=0;o!==null&&(u=o.retryLane),gg(r,u)}function Ab(r,o){var u=0;switch(r.tag){case 13:var f=r.stateNode,g=r.memoizedState;g!==null&&(u=g.retryLane);break;case 19:f=r.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(o),gg(r,u)}var yg;yg=function(r,o,u){if(r!==null)if(r.memoizedProps!==o.pendingProps||Kt.current)Xt=!0;else{if((r.lanes&u)===0&&(o.flags&128)===0)return Xt=!1,gb(r,o,u);Xt=(r.flags&131072)!==0}else Xt=!1,rt&&(o.flags&1048576)!==0&&Gp(o,oa,o.index);switch(o.lanes=0,o.tag){case 2:var f=o.type;wa(r,o),r=o.pendingProps;var g=ki(o,Rt.current);Pi(o,u),g=Wu(null,o,f,r,g,u);var x=Hu();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,qt(f)?(x=!0,na(o)):x=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Ou(o),g.updater=va,o.stateNode=g,g._reactInternals=o,Qu(o,f,r,u),o=tc(null,o,f,!0,x,u)):(o.tag=0,rt&&x&&Pu(o),_t(null,o,g,u),o=o.child),o;case 16:f=o.elementType;e:{switch(wa(r,o),r=o.pendingProps,g=f._init,f=g(f._payload),o.type=f,g=o.tag=Nb(f),r=Cn(f,r),g){case 0:o=ec(null,o,f,r,u);break e;case 1:o=Um(null,o,f,r,u);break e;case 11:o=Fm(null,o,f,r,u);break e;case 14:o=zm(null,o,f,Cn(f.type,r),u);break e}throw Error(n(306,f,""))}return o;case 0:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Cn(f,g),ec(r,o,f,g,u);case 1:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Cn(f,g),Um(r,o,f,g,u);case 3:e:{if(Wm(o),r===null)throw Error(n(387));f=o.pendingProps,x=o.memoizedState,g=x.element,om(r,o),fa(o,f,null,u);var b=o.memoizedState;if(f=b.element,x.isDehydrated)if(x={element:f,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){g=Ai(Error(n(423)),o),o=Hm(r,o,f,u,g);break e}else if(f!==g){g=Ai(Error(n(424)),o),o=Hm(r,o,f,u,g);break e}else for(nn=fr(o.stateNode.containerInfo.firstChild),tn=o,rt=!0,bn=null,u=rm(o,null,f,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ci(),f===g){o=Zn(r,o,u);break e}_t(r,o,f,u)}o=o.child}return o;case 5:return lm(o),r===null&&Mu(o),f=o.type,g=o.pendingProps,x=r!==null?r.memoizedProps:null,b=g.children,ku(f,g)?b=null:x!==null&&ku(f,x)&&(o.flags|=32),$m(r,o),_t(r,o,b,u),o.child;case 6:return r===null&&Mu(o),null;case 13:return Km(r,o,u);case 4:return Fu(o,o.stateNode.containerInfo),f=o.pendingProps,r===null?o.child=Ei(o,null,f,u):_t(r,o,f,u),o.child;case 11:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Cn(f,g),Fm(r,o,f,g,u);case 7:return _t(r,o,o.pendingProps,u),o.child;case 8:return _t(r,o,o.pendingProps.children,u),o.child;case 12:return _t(r,o,o.pendingProps.children,u),o.child;case 10:e:{if(f=o.type._context,g=o.pendingProps,x=o.memoizedProps,b=g.value,Qe(la,f._currentValue),f._currentValue=b,x!==null)if(Sn(x.value,b)){if(x.children===g.children&&!Kt.current){o=Zn(r,o,u);break e}}else for(x=o.child,x!==null&&(x.return=o);x!==null;){var N=x.dependencies;if(N!==null){b=x.child;for(var I=N.firstContext;I!==null;){if(I.context===f){if(x.tag===1){I=Qn(-1,u&-u),I.tag=2;var H=x.updateQueue;if(H!==null){H=H.shared;var ne=H.pending;ne===null?I.next=I:(I.next=ne.next,ne.next=I),H.pending=I}}x.lanes|=u,I=x.alternate,I!==null&&(I.lanes|=u),_u(x.return,u,o),N.lanes|=u;break}I=I.next}}else if(x.tag===10)b=x.type===o.type?null:x.child;else if(x.tag===18){if(b=x.return,b===null)throw Error(n(341));b.lanes|=u,N=b.alternate,N!==null&&(N.lanes|=u),_u(b,u,o),b=x.sibling}else b=x.child;if(b!==null)b.return=x;else for(b=x;b!==null;){if(b===o){b=null;break}if(x=b.sibling,x!==null){x.return=b.return,b=x;break}b=b.return}x=b}_t(r,o,g.children,u),o=o.child}return o;case 9:return g=o.type,f=o.pendingProps.children,Pi(o,u),g=fn(g),f=f(g),o.flags|=1,_t(r,o,f,u),o.child;case 14:return f=o.type,g=Cn(f,o.pendingProps),g=Cn(f.type,g),zm(r,o,f,g,u);case 15:return Vm(r,o,o.type,o.pendingProps,u);case 17:return f=o.type,g=o.pendingProps,g=o.elementType===f?g:Cn(f,g),wa(r,o),o.tag=1,qt(f)?(r=!0,na(o)):r=!1,Pi(o,u),Nm(o,f,g),Qu(o,f,g,u),tc(null,o,f,!0,r,u);case 19:return Xm(r,o,u);case 22:return Bm(r,o,u)}throw Error(n(156,o.tag))};function vg(r,o){return Qh(r,o)}function Mb(r,o,u,f){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pn(r,o,u,f){return new Mb(r,o,u,f)}function kc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Nb(r){if(typeof r=="function")return kc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===V)return 11;if(r===ee)return 14}return 2}function Sr(r,o){var u=r.alternate;return u===null?(u=pn(r.tag,o,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=o,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,o=r.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function Na(r,o,u,f,g,x){var b=2;if(f=r,typeof r=="function")kc(r)&&(b=1);else if(typeof r=="string")b=5;else e:switch(r){case Y:return qr(u.children,g,x,o);case W:b=8,g|=8;break;case X:return r=pn(12,u,o,g|2),r.elementType=X,r.lanes=x,r;case fe:return r=pn(13,u,o,g),r.elementType=fe,r.lanes=x,r;case ie:return r=pn(19,u,o,g),r.elementType=ie,r.lanes=x,r;case Te:return ja(u,g,x,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case j:b=10;break e;case G:b=9;break e;case V:b=11;break e;case ee:b=14;break e;case ve:b=16,f=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return o=pn(b,u,o,g),o.elementType=r,o.type=f,o.lanes=x,o}function qr(r,o,u,f){return r=pn(7,r,f,o),r.lanes=u,r}function ja(r,o,u,f){return r=pn(22,r,f,o),r.elementType=Te,r.lanes=u,r.stateNode={isHidden:!1},r}function Sc(r,o,u){return r=pn(6,r,null,o),r.lanes=u,r}function bc(r,o,u){return o=pn(4,r.children!==null?r.children:[],r.key,o),o.lanes=u,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function jb(r,o,u,f,g){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gl(0),this.expirationTimes=Gl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gl(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Cc(r,o,u,f,g,x,b,N,I){return r=new jb(r,o,u,N,I),o===1?(o=1,x===!0&&(o|=8)):o=0,x=pn(3,null,null,o),r.current=x,x.stateNode=r,x.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ou(x),r}function Db(r,o,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,key:f==null?null:""+f,children:r,containerInfo:o,implementation:u}}function xg(r){if(!r)return hr;r=r._reactInternals;e:{if(_r(r)!==r||r.tag!==1)throw Error(n(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(qt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(qt(u))return qp(r,u,o)}return o}function wg(r,o,u,f,g,x,b,N,I){return r=Cc(u,f,!0,r,g,x,b,N,I),r.context=xg(null),u=r.current,f=Lt(),g=wr(u),x=Qn(f,g),x.callback=o??null,gr(u,x,g),r.current.lanes=g,co(r,g,f),Gt(r,f),r}function Da(r,o,u,f){var g=o.current,x=Lt(),b=wr(g);return u=xg(u),o.context===null?o.context=u:o.pendingContext=u,o=Qn(x,b),o.payload={element:r},f=f===void 0?null:f,f!==null&&(o.callback=f),r=gr(g,o,b),r!==null&&(Pn(r,g,b,x),ca(r,g,b)),b}function Ia(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function kg(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<o?u:o}}function Ec(r,o){kg(r,o),(r=r.alternate)&&kg(r,o)}function Ib(){return null}var Sg=typeof reportError=="function"?reportError:function(r){console.error(r)};function Tc(r){this._internalRoot=r}_a.prototype.render=Tc.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));Da(r,o,null,null)},_a.prototype.unmount=Tc.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Wr(function(){Da(null,r,null,null)}),o[Kn]=null}};function _a(r){this._internalRoot=r}_a.prototype.unstable_scheduleHydration=function(r){if(r){var o=op();r={blockedOn:null,target:r,priority:o};for(var u=0;u<lr.length&&o!==0&&o<lr[u].priority;u++);lr.splice(u,0,r),u===0&&lp(r)}};function Pc(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function La(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function bg(){}function _b(r,o,u,f,g){if(g){if(typeof f=="function"){var x=f;f=function(){var H=Ia(b);x.call(H)}}var b=wg(o,f,r,0,null,!1,!1,"",bg);return r._reactRootContainer=b,r[Kn]=b.current,Eo(r.nodeType===8?r.parentNode:r),Wr(),b}for(;g=r.lastChild;)r.removeChild(g);if(typeof f=="function"){var N=f;f=function(){var H=Ia(I);N.call(H)}}var I=Cc(r,0,!1,null,null,!1,!1,"",bg);return r._reactRootContainer=I,r[Kn]=I.current,Eo(r.nodeType===8?r.parentNode:r),Wr(function(){Da(o,I,u,f)}),I}function Oa(r,o,u,f,g){var x=u._reactRootContainer;if(x){var b=x;if(typeof g=="function"){var N=g;g=function(){var I=Ia(b);N.call(I)}}Da(o,b,r,g)}else b=_b(u,o,r,g,f);return Ia(b)}rp=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var u=uo(o.pendingLanes);u!==0&&(Ql(o,u|1),Gt(o,lt()),(Be&6)===0&&(ji=lt()+500,pr()))}break;case 13:Wr(function(){var f=Gn(r,1);if(f!==null){var g=Lt();Pn(f,r,1,g)}}),Ec(r,1)}},Zl=function(r){if(r.tag===13){var o=Gn(r,134217728);if(o!==null){var u=Lt();Pn(o,r,134217728,u)}Ec(r,134217728)}},ip=function(r){if(r.tag===13){var o=wr(r),u=Gn(r,o);if(u!==null){var f=Lt();Pn(u,r,o,f)}Ec(r,o)}},op=function(){return He},sp=function(r,o){var u=He;try{return He=r,o()}finally{He=u}},oo=function(r,o,u){switch(o){case"input":if(ft(r,u),o=u.name,u.type==="radio"&&o!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<u.length;o++){var f=u[o];if(f!==r&&f.form===r.form){var g=ea(f);if(!g)throw Error(n(90));Pt(f),ft(f,g)}}}break;case"textarea":he(r,u);break;case"select":o=u.value,o!=null&&Wt(r,!!u.multiple,o,!1)}},Wh=vc,Hh=Wr;var Lb={usingClientEntryPoint:!1,Events:[Ro,xi,ea,$h,Uh,vc]},$o={findFiberByHostInstance:Lr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ob={bundleType:$o.bundleType,version:$o.version,rendererPackageName:$o.rendererPackageName,rendererConfig:$o.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:L.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Yh(r),r===null?null:r.stateNode},findFiberByHostInstance:$o.findFiberByHostInstance||Ib,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fa.isDisabled&&Fa.supportsFiber)try{_s=Fa.inject(Ob),Dn=Fa}catch{}}return Qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lb,Qt.createPortal=function(r,o){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Pc(o))throw Error(n(200));return Db(r,o,null,u)},Qt.createRoot=function(r,o){if(!Pc(r))throw Error(n(299));var u=!1,f="",g=Sg;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=Cc(r,1,!1,null,null,u,!1,f,g),r[Kn]=o.current,Eo(r.nodeType===8?r.parentNode:r),new Tc(o)},Qt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Yh(o),r=r===null?null:r.stateNode,r},Qt.flushSync=function(r){return Wr(r)},Qt.hydrate=function(r,o,u){if(!La(o))throw Error(n(200));return Oa(null,r,o,!0,u)},Qt.hydrateRoot=function(r,o,u){if(!Pc(r))throw Error(n(405));var f=u!=null&&u.hydratedSources||null,g=!1,x="",b=Sg;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onRecoverableError!==void 0&&(b=u.onRecoverableError)),o=wg(o,null,r,1,u??null,g,!1,x,b),r[Kn]=o.current,Eo(r),f)for(r=0;r<f.length;r++)u=f[r],g=u._getVersion,g=g(u._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[u,g]:o.mutableSourceEagerHydrationData.push(u,g);return new _a(o)},Qt.render=function(r,o,u){if(!La(o))throw Error(n(200));return Oa(null,r,o,!1,u)},Qt.unmountComponentAtNode=function(r){if(!La(r))throw Error(n(40));return r._reactRootContainer?(Wr(function(){Oa(null,null,r,!1,function(){r._reactRootContainer=null,r[Kn]=null})}),!0):!1},Qt.unstable_batchedUpdates=vc,Qt.unstable_renderSubtreeIntoContainer=function(r,o,u,f){if(!La(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Oa(r,o,u,!1,f)},Qt.version="18.3.1-next-f1338f8080-20240426",Qt}var Ng;function Tx(){if(Ng)return Mc.exports;Ng=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Mc.exports=Hb(),Mc.exports}var jg;function Kb(){if(jg)return za;jg=1;var e=Tx();return za.createRoot=e.createRoot,za.hydrateRoot=e.hydrateRoot,za}var qb=Kb(),S=Pd();const Xb=Td(S),ks=zb({__proto__:null,default:Xb},[S]);class kf extends Error{constructor(t,n){super(n),this.status=t}}function Yb(e){let t="";for(let i=0;i<e.length;i+=32768)t+=String.fromCharCode(...e.subarray(i,i+32768));return btoa(t)}function Gb(e=globalThis.fetch.bind(globalThis)){async function t(n,i){const s=(i?.method??"GET").toUpperCase(),a=await e(n,{...i,cache:"no-store",credentials:"same-origin",headers:s!=="GET"&&s!=="HEAD"?{"content-type":"application/json","X-Ours-Messenger-CSRF":"1",...i?.headers}:i?.headers}),c=await a.text();let d=null;if(c)try{d=JSON.parse(c)}catch{throw new kf(a.status,a.ok?"Server returned an invalid response":`HTTP ${a.status}`)}if(!a.ok){const h=d&&typeof d=="object"&&"error"in d&&d.error&&typeof d.error=="object"&&"message"in d.error&&typeof d.error.message=="string"?d.error.message:`HTTP ${a.status}`;throw new kf(a.status,h)}return d}return{identity:()=>t("/api/identity"),setBio:n=>t("/api/identity/bio",{method:"POST",body:JSON.stringify({bio:n})}),buildInfo:()=>t("/api/build-info"),identities:()=>t("/api/identities"),contacts:()=>t("/api/contacts"),invites:()=>t("/api/invites"),conversation:(n,i)=>t(`/api/conversations/${encodeURIComponent(n)}/page?limit=50${i?`&before=${encodeURIComponent(i)}`:""}`),markRead:n=>t(`/api/conversations/${encodeURIComponent(n)}/read`,{method:"POST"}),send:(n,i,s,l)=>t("/api/messages/send",{method:"POST",signal:l,body:JSON.stringify({contact:n,text:i,...s?{reply_to_wire_id:s}:{}})}),sendFile:async(n,i,s,l,a)=>t("/api/messages/send-file",{method:"POST",body:JSON.stringify({contact:n,data_base64:Yb(new Uint8Array(await i.arrayBuffer())),filename:s,mime:l,...a?{reply_to_wire_id:a}:{}})}),files:n=>t(`/api/conversations/${encodeURIComponent(n)}/files`),fetchFiles:n=>t("/api/files/fetch",{method:"POST",body:JSON.stringify({wire_ids:n})}),mediaUrl:n=>`/api/media/${encodeURIComponent(n)}`,createInvite:(n="one_time",i)=>t("/api/invites",{method:"POST",body:JSON.stringify({mode:n,...i?{name:i}:{}})}),addContact:(n,i)=>t("/api/contacts/add",{method:"POST",body:JSON.stringify({invite:n,...i?{name:i}:{}})}),renameContact:(n,i)=>t("/api/contacts/rename",{method:"POST",body:JSON.stringify({contact:n,name:i})}),removeContact:n=>t("/api/contacts/remove",{method:"POST",body:JSON.stringify({contact:n})}),revokeInvite:n=>t("/api/invites/revoke",{method:"POST",body:JSON.stringify({invite_id:n})}),respondToIntroduction:(n,i)=>t("/api/contacts/introductions",{method:"POST",body:JSON.stringify({contact:n,action:i})}),vapidPublicKey:()=>t("/api/push/vapid-public-key"),ensurePush:n=>t("/api/push/subscriptions/ensure",{method:"POST",body:JSON.stringify(n)}),deletePush:n=>t("/api/push/subscriptions/delete",{method:"POST",body:JSON.stringify({binding_id:n})})}}const Ze=Gb(),Sf="ours-messenger-live-event";function Px(e){window.dispatchEvent(new CustomEvent(Sf,{detail:e}))}function Qb(e){const t=n=>{const i=n.detail;i?.v===1&&e(i)};return window.addEventListener(Sf,t),()=>window.removeEventListener(Sf,t)}function Zb(e,t){const n=new EventSource("/api/events");let i=!1;t("connecting"),n.onopen=()=>{i=!0,t("live")},n.onerror=()=>t(i?"retrying":"connecting");const s=l=>{n.addEventListener(l,a=>{try{const c=JSON.parse(a.data);c&&c.v===1&&e({...c,type:l})}catch{}})};return s("sync_required"),s("message_received"),s("receipt_received"),s("file_received"),()=>n.close()}function Jb(e=window.location){return`${e.protocol==="https:"?"wss:":"ws:"}//${e.host}/api/presence`}function eC(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e;if(t.type!=="event"||!t.event||typeof t.event!="object")return null;const n=t.event;return n.v===1?n:null}function tC(e){let t=!1,n=null,i,s=1e3,l=0;const a=()=>{i!==void 0&&clearTimeout(i),i=void 0;const m=n;n=null,m&&m.readyState<WebSocket.CLOSING&&m.close(1e3,"hidden")},c=()=>{if(t||document.visibilityState!=="visible")return;e.onState?.("retrying");const m=s;s=Math.min(3e4,s*2),i=setTimeout(()=>{i=void 0,d()},m)},d=async()=>{if(a(),t||document.visibilityState!=="visible")return;const m=++l;e.onState?.("connecting");try{const[p,y]=await Promise.all([e.identity(),e.registration.pushManager.getSubscription()]);if(t||m!==l||document.visibilityState!=="visible")return;const w=y?.toJSON(),k=y?.endpoint,C=w?.keys?.auth;if(!k||!C)return;const T=new WebSocket(Jb());n=T,T.onopen=()=>T.send(JSON.stringify({identity:p.cid,endpoint:k,auth:C})),T.onmessage=E=>{let M;try{M=JSON.parse(String(E.data))}catch{return}if(M?.ok===!0){s=1e3,e.onState?.("live");return}const A=eC(M);A&&e.onEvent(A)},T.onclose=()=>{n===T&&(n=null),m===l&&c()},T.onerror=()=>T.close()}catch{m===l&&c()}},h=()=>{l++,document.visibilityState==="visible"?(s=1e3,d()):a()};return document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",a),d(),()=>{t=!0,l++,document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",a),a()}}function nC(e,t){return t.visibility==="visible"&&t.appRoute==="chats"&&t.selectedContactCid===e&&(t.desktopLayout||t.mobileDetailOpen)&&!t.conversationCoveringDialogOpen}class rC{#e=new Map;request(t,n){let i=this.#e.get(t);return i?.running?(i.rerun=!0,i.running):(i??={running:null,rerun:!1},this.#e.set(t,i),i.running=(async()=>{do i.rerun=!1,await n();while(i.rerun)})().finally(()=>{i.running=null,i.rerun||this.#e.delete(t)}),i.running)}}function Dg(e){if(e==="/"||e==="/chats"||e==="/chats/")return{name:"chats",contactCid:null};const t=/^\/chats\/([^/]+)\/?$/.exec(e);if(t)try{const n=decodeURIComponent(t[1]);if(n)return{name:"chats",contactCid:n}}catch{}return{name:"not_found",pathname:e}}function Wo(e){return e?`/chats/${encodeURIComponent(e)}`:"/chats"}const Ig={read:2,delivered:1};function _g(e){return e&&Object.hasOwn(Ig,e)?Ig[e]:0}function bf(e,t){return _g(t)>_g(e)?t:e}const iC=()=>({contacts:[],pending:[]});function oC(e){return{identity:null,contacts:iC(),route:e,pages:{},pendingSends:{},drafts:{},replies:{},connection:"connecting",search:"",mobileDetailOpen:e.name==="chats"&&e.contactCid!==null,coveringDialog:!1,dialogBusy:!1,generatedInvite:null,sendingDialog:null,error:null,loaded:!1}}function Qr(e,t){return`${e}:${t}`}function Xr(e){return e.route.name==="chats"?e.route.contactCid:null}function Zr(e,t){return e.identity?e.pages[Qr(e.identity.cid,t)]??null:null}function sC(e,t){const n=bf(e.receipt,t.receipt);return n===t.receipt?t:{...t,receipt:n}}function Ii(e,t){const n=[...e],i=new Map;n.forEach((s,l)=>{s.wire_id&&i.set(s.wire_id,l)});for(const s of t){const l=s.wire_id?i.get(s.wire_id):void 0;l===void 0?(s.wire_id&&i.set(s.wire_id,n.length),n.push(s)):n[l]=sC(n[l],s)}return n}function Lg(e,t){switch(t.type){case"snapshot":{const n=e.identity!==null&&e.identity.cid!==t.identity.cid;return{...e,identity:t.identity,contacts:t.contacts,loaded:!0,error:null,...n?{pages:{},pendingSends:{},drafts:{},replies:{},sendingDialog:null,generatedInvite:null,coveringDialog:!1,dialogBusy:!1}:{}}}case"contacts":return{...e,contacts:t.contacts};case"page":{if(!e.identity)return e;const n=Qr(e.identity.cid,t.contactCid),i=e.pages[n],s=e.pendingSends[n]??[],l=new Set(t.page.messages.map(y=>y.wire_id)),a=s.filter(y=>!l.has(y.wire_id)),c=new Map(i?.messages.map(y=>[y.wire_id,y.receipt])??[]),d=i?t.page.messages.map(y=>{const w=bf(c.get(y.wire_id)??null,y.receipt);return w===y.receipt?y:{...y,receipt:w}}):t.page.messages,h=i&&i.messages.length>50?{...t.page,messages:Ii(i.messages,d),hasMore:i.hasMore,nextBefore:i.nextBefore}:{...t.page,messages:d},m=Ii(h.messages,a),p={...h,messages:m,total:Math.max(h.total+a.length,m.length)};return{...e,pages:{...e.pages,[n]:p},pendingSends:{...e.pendingSends,[n]:a.length?a:void 0}}}case"sent_message":{if(!e.identity)return e;const n=Qr(e.identity.cid,t.contactCid),i=e.pages[n];if(i?.messages.some(a=>a.wire_id===t.message.wire_id))return e;const s=Ii(e.pendingSends[n]??[],[t.message]);if(!i)return{...e,pendingSends:{...e.pendingSends,[n]:s}};const l=Ii(i.messages,[t.message]);return{...e,pages:{...e.pages,[n]:{...i,messages:l,total:Math.max(i.total+1,l.length)}},pendingSends:{...e.pendingSends,[n]:s}}}case"receipt":{if(!e.identity)return e;const n=Qr(e.identity.cid,t.contactCid),i=e.pages[n],s=e.pendingSends[n],l=new Set(t.wireIds),a=h=>{let m=!1;const p=h.map(y=>{if(!y.wire_id||!l.has(y.wire_id))return y;const w=bf(y.receipt,t.kind);return w===y.receipt?y:(m=!0,{...y,receipt:w})});return m?p:h},c=i?a(i.messages):void 0,d=s?a(s):void 0;return c===i?.messages&&d===s?e:{...e,pages:i&&c?{...e.pages,[n]:{...i,messages:c}}:e.pages,pendingSends:s&&d?{...e.pendingSends,[n]:d}:e.pendingSends}}case"older_page":{if(!e.identity)return e;const n=Qr(e.identity.cid,t.contactCid),i=e.pages[n];if(!i)return e;const s=Ii(Ii(t.page.messages,t.newer),i.messages),l={...t.page,preview:i.preview,total:Math.max(t.page.total,i.total,s.length),messages:s};return{...e,pages:{...e.pages,[n]:l}}}case"route":return{...e,route:t.route,mobileDetailOpen:t.mobileDetailOpen??(t.route.name==="chats"&&t.route.contactCid!==null)};case"connection":return{...e,connection:t.connection};case"search":return{...e,search:t.search};case"draft":return e.identity?{...e,drafts:{...e.drafts,[Qr(e.identity.cid,t.contactCid)]:t.value}}:e;case"reply":return e.identity?{...e,replies:{...e.replies,[Qr(e.identity.cid,t.contactCid)]:t.wireId??void 0}}:e;case"sending":return{...e,sendingDialog:t.dialog};case"dialog":return{...e,coveringDialog:t.open,dialogBusy:t.open?e.dialogBusy:!1,generatedInvite:t.open?e.generatedInvite:null,error:null};case"dialog_busy":return{...e,dialogBusy:t.busy};case"generated_invite":return{...e,generatedInvite:t.blob};case"error":return{...e,error:t.message}}}function aC(e,t,n){return!e||t?"ignore":n?"defer":"reload"}function Ss(){return{api:Ze,notification:globalThis.Notification,navigator}}function Tr(e,t,n){return new Promise((i,s)=>{const l=setTimeout(()=>s(new Error(`${n} did not complete within ${t/1e3}s — try again`)),t);e.then(a=>{clearTimeout(l),i(a)},a=>{clearTimeout(l),s(a)})})}async function lC(e,t={}){let n=null,i=!1,s=!1;const l="serviceWorker"in navigator&&window.isSecureContext,a=()=>e({supported:l,offline:!navigator.onLine,updateAvailable:i,registration:n}),c=()=>a(),d=()=>a(),h=()=>{document.visibilityState==="visible"&&n?.update().catch(()=>{})},m=w=>{if(w.data?.type==="ours-push-repair-required"){window.dispatchEvent(new Event("ours-push-repair-required"));return}if(w.data?.type==="ours-push-foreground"){const k=w.data.contact_id,C=w.data.wire_id,T=w.data.kind;typeof k=="string"&&typeof C=="string"&&Px({v:1,type:T==="file"?"file_received":"message_received",contact_id:k,wire_id:C,date:new Date().toISOString()})}},p=l&&!!navigator.serviceWorker.controller,y=()=>{const w=aC(p,s,t.shouldDeferReload?.()??!1);if(w!=="ignore"){if(w==="defer"){i=!0,a();return}s=!0,(t.reload??(()=>location.reload()))()}};if(window.addEventListener("online",c),window.addEventListener("offline",d),document.addEventListener("visibilitychange",h),navigator.serviceWorker?.addEventListener("message",m),navigator.serviceWorker?.addEventListener("controllerchange",y),l){n=await navigator.serviceWorker.register("/sw.js",{scope:"/",updateViaCache:"none"}),await navigator.serviceWorker.ready;const w=k=>k?.addEventListener("statechange",()=>{k.state==="installed"&&navigator.serviceWorker.controller&&(i=!0,a())});w(n.installing),n.addEventListener("updatefound",()=>w(n?.installing??null)),n.update().catch(()=>{})}return a(),()=>{window.removeEventListener("online",c),window.removeEventListener("offline",d),document.removeEventListener("visibilitychange",h),navigator.serviceWorker?.removeEventListener("message",m),navigator.serviceWorker?.removeEventListener("controllerchange",y)}}async function Og(e,t=()=>location.reload(),n=navigator.serviceWorker){const i=e.waiting;if(!i){t();return}await Tr(new Promise(s=>{let l=!1;const a=()=>{l||(l=!0,n.removeEventListener("controllerchange",a),t(),s())};n.addEventListener("controllerchange",a),i.postMessage({type:"SKIP_WAITING"})}),1e4,"service-worker update")}function uC(e){const t="=".repeat((4-e.length%4)%4),n=atob((e+t).replaceAll("-","+").replaceAll("_","/")),i=new Uint8Array(n.length);for(let s=0;s<n.length;s++)i[s]=n.charCodeAt(s);return i}function cC(e){return e?e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength):null}function Fg(e,t){const n=cC(e);return!!n&&n.length===t.length&&n.every((i,s)=>i===t[s])}function Cf(e=navigator.userAgent){return/iP(?:hone|ad|od)/.test(e)}function Ef(e=navigator,t=window){return Cf(e.userAgent)&&(e.standalone===!0||t.matchMedia("(display-mode: standalone)").matches)}function fC(){return Cf()&&!Ef()?"On iPhone or iPad, tap Share → Add to Home Screen, then open messenger from its Home Screen icon (iOS 16.4 or later).":!("Notification"in window)||!window.PushManager||!("serviceWorker"in navigator)?"Notifications require a current secure browser with service-worker and Web Push support.":Notification.permission==="denied"?Cf()?"Allow messenger in iOS Settings → Notifications, then return and choose Repair.":"Allow notifications in this site’s browser settings, then return and choose Repair.":null}function dC(e={}){const t=e.notification??Ss().notification;if(!t)return Promise.reject(new Error("notification permission is unavailable"));const n=new Promise((i,s)=>{let l=!1;const a=c=>{if(l)return;const d=c??t.permission;d!=="granted"&&d!=="denied"&&d!=="default"||(l=!0,i(d))};try{const c=t.requestPermission(a);c&&typeof c.then=="function"&&c.then(a,s)}catch(c){s(c)}});return Tr(n,e.timeoutMs??15e3,"notification permission")}function Rx(e,t){return!!e&&!!e.pushManager&&!!t.notification&&!!t.navigator.serviceWorker}function ri(e,t={}){return{status:e,preview:"full",...t}}async function hC(e,t,n){let i=await Tr(e.pushManager.getSubscription(),5e3,"push subscription lookup");if((n||i?.options.applicationServerKey&&!Fg(i.options.applicationServerKey,t))&&(i&&await Tr(i.unsubscribe(),5e3,"stale push unsubscribe"),i=null),i&&Fg(i.options.applicationServerKey,t))return i;try{return await Tr(e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),15e3,"push subscribe")}catch(s){const l=await e.pushManager.getSubscription();if(!l)throw s;return await Tr(l.unsubscribe(),5e3,"stale push unsubscribe"),Tr(e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),15e3,"push repair")}}async function Ax(e,t,n,i){const s=await i.api.vapidPublicKey(),a=await Tr(Promise.resolve(i.navigator.serviceWorker.ready),1e4,"service-worker readiness")??e,c=uC(s.publicKey),h=(await hC(a,c,n)).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys.auth)throw new Error("browser returned an incomplete push subscription");const m=await i.api.ensurePush({...h,label:i.navigator.userAgent.slice(0,160),...t===void 0?{}:{preview:t}});if(m.status!=="on"||m.fingerprint!==s.fingerprint||m.configEpoch!==s.configEpoch)throw new Error("server did not acknowledge the current Web Push configuration");return ri("on",{bindingId:m.binding_id,fingerprint:m.fingerprint,configEpoch:m.configEpoch,preview:m.preview})}async function zg(e,t=Ss()){return Rx(e,t)?t.notification.permission!=="granted"?ri("needs-permission",{blocked:t.notification.permission==="denied"}):await e.pushManager.getSubscription()?Ax(e,void 0,!1,t):ri("off"):ri("unsupported")}async function Mx(e,t={},n=Ss()){if(!Rx(e,n))return ri("unsupported");const i=await dC({notification:n.notification});return i!=="granted"?ri("needs-permission",{blocked:i==="denied"}):Ax(e,t.preview??"full",t.forceFresh??!1,n)}const pC=(e,t,n=Ss())=>Mx(e,{preview:t,forceFresh:!0},n);async function mC(e,t,n=Ss()){const i=await e.pushManager.getSubscription(),s=[];if(t.bindingId)try{await n.api.deletePush(t.bindingId)}catch(l){s.push(l)}if(i)try{await i.unsubscribe()}catch(l){s.push(l)}if(s.length)throw new Error("notification disable did not fully converge — choose Repair and try again");return ri("off",{preview:t.preview})}function gC(e=15e3){if(!("serviceWorker"in navigator))return()=>{};let t;const n=()=>{const l={type:"ours-visibility",state:document.visibilityState,ts:Date.now(),iosStandalone:Ef()};navigator.serviceWorker.ready.then(a=>{(navigator.serviceWorker.controller??a.active)?.postMessage(l)}).catch(()=>{})},i=()=>{n(),t!==void 0&&clearInterval(t),t=document.visibilityState==="visible"?setInterval(n,e):void 0,document.visibilityState==="visible"&&Nx()},s=l=>{l.data?.type!=="ours-visibility-query"||!l.ports?.[0]||l.ports[0].postMessage({type:"ours-visibility-reply",state:document.visibilityState,iosStandalone:Ef()})};return document.addEventListener("visibilitychange",i),navigator.serviceWorker.addEventListener("message",s),i(),()=>{document.removeEventListener("visibilitychange",i),navigator.serviceWorker.removeEventListener("message",s),t!==void 0&&clearInterval(t)}}async function Nx(){try{if(!("serviceWorker"in navigator))return;const t=await(await navigator.serviceWorker.getRegistration())?.getNotifications()??[];for(const n of t)n.close();"clearAppBadge"in navigator&&await navigator.clearAppBadge()}catch{}}/**
41
+ * @license lucide-react v0.468.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const yC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jx=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/**
46
+ * @license lucide-react v0.468.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */var vC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
51
+ * @license lucide-react v0.468.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const xC=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:a,...c},d)=>S.createElement("svg",{ref:d,...vC,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:jx("lucide",s),...c},[...a.map(([h,m])=>S.createElement(h,m)),...Array.isArray(l)?l:[l]]));/**
56
+ * @license lucide-react v0.468.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const Ve=(e,t)=>{const n=S.forwardRef(({className:i,...s},l)=>S.createElement(xC,{ref:l,iconNode:t,className:jx(`lucide-${yC(e)}`,i),...s}));return n.displayName=`${e}`,n};/**
61
+ * @license lucide-react v0.468.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const wC=Ve("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
66
+ * @license lucide-react v0.468.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const kC=Ve("Bolt",[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
71
+ * @license lucide-react v0.468.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const SC=Ve("Bot",[["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"}]]);/**
76
+ * @license lucide-react v0.468.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const Vg=Ve("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
81
+ * @license lucide-react v0.468.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const bC=Ve("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
86
+ * @license lucide-react v0.468.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const CC=Ve("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
91
+ * @license lucide-react v0.468.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const EC=Ve("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
96
+ * @license lucide-react v0.468.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const TC=Ve("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);/**
101
+ * @license lucide-react v0.468.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const PC=Ve("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
106
+ * @license lucide-react v0.468.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const RC=Ve("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
111
+ * @license lucide-react v0.468.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const AC=Ve("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
116
+ * @license lucide-react v0.468.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const MC=Ve("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
121
+ * @license lucide-react v0.468.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const Bg=Ve("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
126
+ * @license lucide-react v0.468.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const NC=Ve("Grid2x2",[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);/**
131
+ * @license lucide-react v0.468.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const jC=Ve("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
136
+ * @license lucide-react v0.468.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const DC=Ve("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
141
+ * @license lucide-react v0.468.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const IC=Ve("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);/**
146
+ * @license lucide-react v0.468.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const _C=Ve("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
151
+ * @license lucide-react v0.468.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const LC=Ve("MessageCircleReply",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}],["path",{d:"M7 12h7a2 2 0 0 1 2 2v1",key:"1gheu4"}]]);/**
156
+ * @license lucide-react v0.468.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const OC=Ve("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/**
161
+ * @license lucide-react v0.468.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const FC=Ve("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
166
+ * @license lucide-react v0.468.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const zC=Ve("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
171
+ * @license lucide-react v0.468.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const VC=Ve("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
176
+ * @license lucide-react v0.468.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const BC=Ve("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
181
+ * @license lucide-react v0.468.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const $C=Ve("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
186
+ * @license lucide-react v0.468.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const UC=Ve("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
191
+ * @license lucide-react v0.468.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const WC=Ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
196
+ * @license lucide-react v0.468.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const HC=Ve("SendHorizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
201
+ * @license lucide-react v0.468.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const KC=Ve("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
206
+ * @license lucide-react v0.468.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const qC=Ve("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
211
+ * @license lucide-react v0.468.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const XC=Ve("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
216
+ * @license lucide-react v0.468.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const YC=Ve("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
221
+ * @license lucide-react v0.468.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const GC=Ve("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
226
+ * @license lucide-react v0.468.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const QC=Ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ZC={app:NC,back:wC,bolt:kC,chat:OC,check:bC,chevron:EC,chevronDown:CC,close:QC,clusters:Vg,copy:RC,download:AC,edit:BC,inbox:jC,link:DC,lock:IC,mic:FC,maximize:_C,minus:zC,monitor:Bg,monitorEye:Bg,more:MC,paperclip:VC,pause:TC,play:PC,plus:$C,refresh:UC,reply:LC,search:WC,send:HC,settings:KC,shield:qC,sliders:XC,trash:YC,user:GC,agent:SC,network:Vg};function Se(e){const{name:t,size:n=18,stroke:i=1.8,fill:s=!1,style:l,className:a}=e,c=ZC[t];return c?v.jsx(c,{className:"ic "+(a||""),width:n,height:n,strokeWidth:i,fill:s?"currentColor":"none",style:l,"aria-hidden":"true"}):null}function Dx(e){if(typeof e!="string")return null;const t=/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?/.exec(e.trim());if(!t)return null;const n=t[7]?t[7].slice(0,3).padEnd(3,"0"):"000";return`${t[1]}-${t[2]}-${t[3]}T${t[4]}:${t[5]}:${t[6]}.${n}Z`}function pl(e){const t=Dx(e);if(t){const i=Date.parse(t);if(!Number.isNaN(i))return i}const n=new Date(e).getTime();return Number.isNaN(n)?0:n}function JC(e){const t=Dx(e);if(t){const i=new Date(t);if(!Number.isNaN(i.getTime()))return i}const n=new Date(e);return Number.isNaN(n.getTime())?null:n}const Ho="room",eE="room_",ml="ours-cowork-room:",$g="ours-cowork:",Ug="ours-cowork-",Wg="cowork-room-",Tf=/^[0-7][0-9a-hjkmnp-tv-z]{25}$/,tE=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,nE=25,rE=64,iE=80,Hg=1e3,us=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ot=e=>typeof e=="string"&&e.length>0;function oE(e,t){if(typeof e!="string")return null;const n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return null;let i;try{i=JSON.parse(n)}catch{return null}return!us(i)||i.version!==1||!Ot(i.kind)||!i.kind.startsWith(eE)||!Ot(i.room_id)||t&&!Ot(i.signature)?null:i}function sE(e){const t=us(e.author)?e.author:{};return{name:Ot(t.display_name)?t.display_name:"",role:Ot(t.role)?t.role:""}}function Dc(e){const n=Array.from(String(e)).slice(0,iE).join("").replace(/^room_/,"").split("_").filter(Boolean);return n.length===0?"Room notice":n.join(" ").replace(/^./,i=>i.toUpperCase())}function aE(e){if(!us(e))return null;const t=Ot(e.kind)?e.kind:"",n=sE(e),i=typeof e.text=="string"?e.text:"",s=Number.isSafeInteger(e.briefing_version)&&e.briefing_version>0?e.briefing_version:null,l={roomName:Ix(e.room_name)??"",authoredAt:Ot(e.at)?e.at:""};switch(t){case"room_msg":return n.role===Ho?Er(t,"Room message",i||"Room notice",{...l,authoredBy:n.name}):{variant:"chat",kind:t,author:n.name||"Unknown member",role:n.role,label:"",text:i,...l};case"room_briefing":return Er(t,s===null?"Room briefing":`Room briefing · v${s}`,i||"The room briefing was updated.",{...l,authoredBy:n.name,presentation:"briefing"});case"room_role_briefing":{const a=Ot(e.briefing_role)?e.briefing_role:"",c=["Role briefing",a,s===null?"":`v${s}`].filter(Boolean).join(" · ");return Er(t,c,i||"Your role briefing was updated.",{...l,authoredBy:n.name,presentation:"role",details:a?[`Role: ${a}`]:[]})}case"room_membership":{const a=us(e.membership)?e.membership:{},c=[Ot(a.action)?`Status: ${cE(a.action)}`:"",Ot(a.alias)?`Member: ${a.alias}`:"",Ot(a.role)?`Role: ${a.role}`:"",Number.isSafeInteger(a.epoch)&&a.epoch>=0?`Epoch: ${a.epoch}`:""].filter(Boolean);return Er(t,"Membership",i||pE(a),{...l,authoredBy:n.name,presentation:"membership",details:c})}case"room_file":{const a=Ot(e.filename)?e.filename:"Shared file",c=[Ot(e.mime)?`Type: ${e.mime}`:"",Number.isSafeInteger(e.size)&&e.size>=0?`Size: ${fE(e.size)}`:"",Ot(e.sha256)?`SHA-256: ${dE(e.sha256)}`:""].filter(Boolean);return Er(t,"Room file",a,{...l,authoredBy:n.name,role:n.role,presentation:"file",details:c})}case"room_not_member":return Er(t,"Room access","You are no longer a member of this room.",{...l,presentation:"lifecycle",details:["Status: Removed"]});default:return i?{variant:n.role&&n.role!==Ho?"chat":"system",kind:t,author:n.role&&n.role!==Ho?n.name||"Unknown member":"",role:n.role&&n.role!==Ho?n.role:"",label:n.role&&n.role!==Ho?"":Dc(t),text:hE(i),...l}:Er(t,Dc(t),`${Dc(t)} from the room.`,l)}}function lE(e,t){if(!uE(e))return null;const n=Md(e)?.roomId??null,i=Rd(e),s=Ad(e),l=oE(t,n===null&&s===null);return l!==null&&n!==null&&l.room_id!==n||l!==null&&i!==null&&l.room_id!==i?Kg("Room provenance mismatch"):aE(l)}function Ix(e){if(typeof e!="string"||/[\p{Cc}\p{Cf}]/u.test(e))return null;const t=e.trim().normalize("NFC"),n=Array.from(t).length;return n>=1&&n<=rE?t:null}function Rd(e){if(typeof e!="string"||!e.startsWith(Wg))return null;const t=e.slice(Wg.length);return Tf.test(t)?t:null}function Ad(e){return typeof e!="string"||!e.startsWith($g)?null:Ix(e.slice($g.length))}function Md(e){if(typeof e!="string"||!e.startsWith(Ug))return null;const t=e.slice(Ug.length);if(Tf.test(t))return{roomId:t,slug:null};const n=t.slice(-26),i=t.at(-27),s=t.slice(0,-27);return i!=="-"||!Tf.test(n)||s.length<1||s.length>nE?null:tE.test(s)?{roomId:n,slug:s}:null}function uE(e){const t=String(e??"").trim();return t.startsWith(ml)&&t.slice(ml.length).trim().length>0||Ad(e)!==null||Md(e)!==null||Rd(e)!==null}function Er(e,t,n,i={}){return{variant:"system",kind:e,author:"",role:"",label:t,text:n,...i}}function cE(e){return String(e).replace(/_/g," ").replace(/^./,t=>t.toUpperCase())}function fE(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KiB`:`${(e/(1024*1024)).toFixed(1)} MiB`}function dE(e){const t=String(e);return t.length<=20?t:`${t.slice(0,12)}…${t.slice(-6)}`}function hE(e){const t=Array.from(String(e));return t.length<=Hg?t.join(""):`${t.slice(0,Hg).join("")}…`}function Kg(e){return Er("room_invalid","Room notice","This room envelope could not be displayed safely.",{presentation:"lifecycle",details:[`Status: ${e}`]})}function pE(e){if(!us(e))return"The room membership changed.";const t=Ot(e.alias)?e.alias:"A member";return e.action==="remove"?`${t} left the room.`:"The room membership changed."}function mE(e){if(!e)return"";const t=e.variant==="chat"?e.author:e.label,n=gE(e.text);return t?n?`${t} · ${n}`:t:n}function gE(e){return String(e??"").replace(/\s+/g," ").trim()}function yE(e){const t=String(e??"").trim();if(t.startsWith(ml))return t.slice(ml.length).trim()||null;const n=Ad(e);if(n!==null)return n;const i=Md(e);if(i?.slug)return i.slug.replace(/-/g," ").replace(/[a-z]/,a=>a.toUpperCase());if(i)return`Room ${i.roomId.slice(0,8)}`;const s=Rd(e);return s===null?null:`Room ${s.slice(0,8)}`}const Nd=JC;function cs(e){const t=e.trim().split(/\s+/).filter(Boolean);if(!t.length)return"?";const n=i=>Array.from(i).find(s=>/[\p{L}\p{N}]/u.test(s))??Array.from(i)[0]??"";if(t.length===1){const i=Array.from(t[0]),s=i.filter(l=>/[\p{L}\p{N}]/u.test(l));return(s.length?s.slice(0,2).join(""):i[0]??"?").toUpperCase()}return(n(t[0])+n(t.at(-1)??"")).toUpperCase()}function vE(e){const t=Nd(e);if(!t)return"";const n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"short",day:"numeric"})}function fs(e){const t=Nd(e);return t?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}function xE(e){const t=Nd(e);return t?t.toLocaleString():e}function jd(e){return e.length<=14?e:`${e.slice(0,8)}…${e.slice(-4)}`}function wE(e){return/^[0-9A-Fa-f]{40,}$/.test(e.trim())}function kE(e,t,n){const i=(e??"").trim(),s=yE(i);return s||(i&&!wE(i)?i:i?jd(i):"Unnamed")}function Jo(e){return e.display_name?.trim()||kE(e.name)}const SE="x-ours-kind=voice-message",_x="voice-message-",Qo=20*1024*1024;let ds=null,Pf=[];const Dd=new Map;function bE(e){ds=e;for(const t of Pf)t(e);Pf=[]}function qg(e){for(const t of e)Dd.set(t.wire_id,{id:t.wire_id,dir:t.dir,filename:t.filename,mime:t.mime,size:t.size,date:t.date,available:t.available,logicalName:t.logical_name,version:t.version,transcription:t.transcription})}function CE(){Dd.clear()}function Lx(e){return Dd.get(e)??null}function EE(e){return ds?.url(e)??null}function TE(e){return`${e}; ${SE}`}function qi(e,t){return/x-ours-kind\s*=\s*voice-message/i.test(e)||t.toLowerCase().startsWith(_x)&&e.toLowerCase().startsWith("audio/")}function PE(e,t){const n=e??"file",i=t??"";return qi(i,n)?"🎤 Voice message":i.toLowerCase().startsWith("image/")?"🖼 Photo":`📎 ${n}`}async function Nl(e){return(ds??await new Promise(n=>Pf.push(n))).bytes(e)}async function RE(e){if(!ds)throw new Error("Media provider is not ready");await ds.fetch(e)}function Ar(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function AE(e,t=!1){return e==="read"?{state:"read",label:"read",glyph:"✓✓"}:e==="delivered"?{state:"delivered",label:"delivered",glyph:"✓✓"}:t?{state:"untracked",label:"sent, and cannot report delivery",glyph:"✓"}:{state:"sent",label:"sent",glyph:"✓"}}function Ox({receipt:e,content:t="Message",receiptless:n=!1}){const i=AE(e,n);return v.jsx("span",{className:"ticks"+(i.state==="read"?" read":""),"data-receipt-status":i.state,role:"img","aria-label":`${t} ${i.label}`,title:i.label,children:i.glyph})}function Xg(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,s=n.indexOf(t);for(;s!==-1;)i++,s=n.indexOf(t,s+t.length);return i}const Ft=Dr(/[A-Za-z]/),jt=Dr(/[\dA-Za-z]/),ME=Dr(/[#-'*+\--9=?A-Z^-~]/);function gl(e){return e!==null&&(e<32||e===127)}const Rf=Dr(/\d/),NE=Dr(/[\dA-Fa-f]/),jE=Dr(/[!-/:-@[-`{-~]/);function Me(e){return e!==null&&e<-2}function Ge(e){return e!==null&&(e<0||e===32)}function Oe(e){return e===-2||e===-1||e===32}const jl=Dr(/\p{P}|\p{S}/u),ai=Dr(/\s/);function Dr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function DE(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Dl=function(e){if(e==null)return OE;if(typeof e=="function")return Il(e);if(typeof e=="object")return Array.isArray(e)?IE(e):_E(e);if(typeof e=="string")return LE(e);throw new Error("Expected function, string, or object as test")};function IE(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Dl(e[n]);return Il(i);function i(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function _E(e){const t=e;return Il(n);function n(i){const s=i;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function LE(e){return Il(t);function t(n){return n&&n.type===e}}function Il(e){return t;function t(n,i,s){return!!(FE(n)&&e.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function OE(){return!0}function FE(e){return e!==null&&typeof e=="object"&&"type"in e}const Fx=[],zE=!0,Af=!1,VE="skip";function zx(e,t,n,i){let s;typeof t=="function"&&typeof n!="function"?(i=n,n=t):s=t;const l=Dl(s),a=i?-1:1;c(e,void 0,[])();function c(d,h,m){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const w=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(d.type+(w?"<"+w+">":""))+")"})}return y;function y(){let w=Fx,k,C,T;if((!t||l(d,h,m[m.length-1]||void 0))&&(w=BE(n(d,m)),w[0]===Af))return w;if("children"in d&&d.children){const E=d;if(E.children&&w[0]!==VE)for(C=(i?E.children.length:-1)+a,T=m.concat(E);C>-1&&C<E.children.length;){const M=E.children[C];if(k=c(M,C,T)(),k[0]===Af)return k;C=typeof k[1]=="number"?k[1]:C+a}}return w}}}function BE(e){return Array.isArray(e)?e:typeof e=="number"?[zE,e]:e==null?Fx:[e]}function $E(e,t,n){const s=Dl((n||{}).ignore||[]),l=UE(t);let a=-1;for(;++a<l.length;)zx(e,"text",c);function c(h,m){let p=-1,y;for(;++p<m.length;){const w=m[p],k=y?y.children:void 0;if(s(w,k?k.indexOf(w):void 0,y))return;y=w}if(y)return d(h,m)}function d(h,m){const p=m[m.length-1],y=l[a][0],w=l[a][1];let k=0;const T=p.children.indexOf(h);let E=!1,M=[];y.lastIndex=0;let A=y.exec(h.value);for(;A;){const L=A.index,U={index:A.index,input:A.input,stack:[...m,h]};let D=w(...A,U);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?y.lastIndex=L+1:(k!==L&&M.push({type:"text",value:h.value.slice(k,L)}),Array.isArray(D)?M.push(...D):D&&M.push(D),k=L+A[0].length,E=!0),!y.global)break;A=y.exec(h.value)}return E?(k<h.value.length&&M.push({type:"text",value:h.value.slice(k)}),p.children.splice(T,1,...M)):M=[h],T+M.length}}function UE(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const s=n[i];t.push([WE(s[0]),HE(s[1])])}return t}function WE(e){return typeof e=="string"?new RegExp(DE(e),"g"):e}function HE(e){return typeof e=="function"?e:function(){return e}}const Ic="phrasing",_c=["autolink","link","image","label"];function KE(){return{transforms:[JE],enter:{literalAutolink:XE,literalAutolinkEmail:Lc,literalAutolinkHttp:Lc,literalAutolinkWww:Lc},exit:{literalAutolink:ZE,literalAutolinkEmail:QE,literalAutolinkHttp:YE,literalAutolinkWww:GE}}}function qE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ic,notInConstruct:_c},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ic,notInConstruct:_c},{character:":",before:"[ps]",after:"\\/",inConstruct:Ic,notInConstruct:_c}]}}function XE(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Lc(e){this.config.enter.autolinkProtocol.call(this,e)}function YE(e){this.config.exit.autolinkProtocol.call(this,e)}function GE(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function QE(e){this.config.exit.autolinkEmail.call(this,e)}function ZE(e){this.exit(e)}function JE(e){$E(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,eT],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,tT]],{ignore:["link","linkReference"]})}function eT(e,t,n,i,s){let l="";if(!Vx(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!nT(n)))return!1;const a=rT(n+i);if(!a[0])return!1;const c={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function tT(e,t,n,i){return!Vx(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function nT(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function rT(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const s=Xg(e,"(");let l=Xg(e,")");for(;i!==-1&&s>l;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[e,n]}function Vx(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ai(n)||jl(n))&&(!t||n!==47)}function Mn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}Bx.peek=dT;function iT(){this.buffer()}function oT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function sT(){this.buffer()}function aT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function lT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function uT(e){this.exit(e)}function cT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fT(e){this.exit(e)}function dT(){return"["}function Bx(e,t,n,i){const s=n.createTracker(i);let l=s.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),c(),a(),l+=s.move("]"),l}function hT(){return{enter:{gfmFootnoteCallString:iT,gfmFootnoteCall:oT,gfmFootnoteDefinitionLabelString:sT,gfmFootnoteDefinition:aT},exit:{gfmFootnoteCallString:lT,gfmFootnoteCall:uT,gfmFootnoteDefinitionLabelString:cT,gfmFootnoteDefinition:fT}}}function pT(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Bx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,s,l,a){const c=l.createTracker(a);let d=c.move("[^");const h=l.enter("footnoteDefinition"),m=l.enter("label");return d+=c.move(l.safe(l.associationId(i),{before:d,after:"]"})),m(),d+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),d+=c.move((t?`
231
+ `:" ")+l.indentLines(l.containerFlow(i,c.current()),t?$x:mT))),h(),d}}function mT(e,t,n){return t===0?e:$x(e,t,n)}function $x(e,t,n){return(n?"":" ")+e}const gT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ux.peek=kT;function yT(){return{canContainEols:["delete"],enter:{strikethrough:xT},exit:{strikethrough:wT}}}function vT(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:gT}],handlers:{delete:Ux}}}function xT(e){this.enter({type:"delete",children:[]},e)}function wT(e){this.exit(e)}function Ux(e,t,n,i){const s=n.createTracker(i),l=n.enter("strikethrough");let a=s.move("~~");return a+=n.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),l(),a}function kT(){return"~"}function ST(e){return e.length}function bT(e,t){const n=t||{},i=(n.align||[]).concat(),s=n.stringLength||ST,l=[],a=[],c=[],d=[];let h=0,m=-1;for(;++m<e.length;){const C=[],T=[];let E=-1;for(e[m].length>h&&(h=e[m].length);++E<e[m].length;){const M=CT(e[m][E]);if(n.alignDelimiters!==!1){const A=s(M);T[E]=A,(d[E]===void 0||A>d[E])&&(d[E]=A)}C.push(M)}a[m]=C,c[m]=T}let p=-1;if(typeof i=="object"&&"length"in i)for(;++p<h;)l[p]=Yg(i[p]);else{const C=Yg(i);for(;++p<h;)l[p]=C}p=-1;const y=[],w=[];for(;++p<h;){const C=l[p];let T="",E="";C===99?(T=":",E=":"):C===108?T=":":C===114&&(E=":");let M=n.alignDelimiters===!1?1:Math.max(1,d[p]-T.length-E.length);const A=T+"-".repeat(M)+E;n.alignDelimiters!==!1&&(M=T.length+M+E.length,M>d[p]&&(d[p]=M),w[p]=M),y[p]=A}a.splice(1,0,y),c.splice(1,0,w),m=-1;const k=[];for(;++m<a.length;){const C=a[m],T=c[m];p=-1;const E=[];for(;++p<h;){const M=C[p]||"";let A="",L="";if(n.alignDelimiters!==!1){const U=d[p]-(T[p]||0),D=l[p];D===114?A=" ".repeat(U):D===99?U%2?(A=" ".repeat(U/2+.5),L=" ".repeat(U/2-.5)):(A=" ".repeat(U/2),L=A):L=" ".repeat(U)}n.delimiterStart!==!1&&!p&&E.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&M==="")&&(n.delimiterStart!==!1||p)&&E.push(" "),n.alignDelimiters!==!1&&E.push(A),E.push(M),n.alignDelimiters!==!1&&E.push(L),n.padding!==!1&&E.push(" "),(n.delimiterEnd!==!1||p!==h-1)&&E.push("|")}k.push(n.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return k.join(`
232
+ `)}function CT(e){return e==null?"":String(e)}function Yg(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function ET(e,t,n,i){const s=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const a=n.indentLines(n.containerFlow(e,l.current()),TT);return s(),a}function TT(e,t,n){return">"+(n?"":" ")+e}function PT(e,t){return Gg(e,t.inConstruct,!0)&&!Gg(e,t.notInConstruct,!1)}function Gg(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function Qg(e,t,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
233
+ `&&PT(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
234
+ `}function RT(e,t){const n=String(e);let i=n.indexOf(t),s=i,l=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++l>a&&(a=l):l=1,s=i+t.length,i=n.indexOf(t,s);return a}function AT(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function MT(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function NT(e,t,n,i){const s=MT(n),l=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(AT(e,n)){const p=n.enter("codeIndented"),y=n.indentLines(l,jT);return p(),y}const c=n.createTracker(i),d=s.repeat(Math.max(RT(l,s)+1,3)),h=n.enter("codeFenced");let m=c.move(d);if(e.lang){const p=n.enter(`codeFencedLang${a}`);m+=c.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...c.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,{before:m,after:`
235
+ `,encode:["`"],...c.current()})),p()}return m+=c.move(`
236
+ `),l&&(m+=c.move(l+`
237
+ `)),m+=c.move(d),h(),m}function jT(e,t,n){return(n?"":" ")+e}function Id(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function DT(e,t,n,i){const s=Id(n),l=s==='"'?"Quote":"Apostrophe",a=n.enter("definition");let c=n.enter("label");const d=n.createTracker(i);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":`
238
+ `,...d.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),c()),a(),h}function IT(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function hs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Xi(e){if(e===null||Ge(e)||ai(e))return 1;if(jl(e))return 2}function yl(e,t,n){const i=Xi(e),s=Xi(t);return i===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Wx.peek=_T;function Wx(e,t,n,i){const s=IT(n),l=n.enter("emphasis"),a=n.createTracker(i),c=a.move(s);let d=a.move(n.containerPhrasing(e,{after:s,before:c,...a.current()}));const h=d.charCodeAt(0),m=yl(i.before.charCodeAt(i.before.length-1),h,s);m.inside&&(d=hs(h)+d.slice(1));const p=d.charCodeAt(d.length-1),y=yl(i.after.charCodeAt(0),p,s);y.inside&&(d=d.slice(0,-1)+hs(p));const w=a.move(s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+d+w}function _T(e,t,n){return n.options.emphasis||"*"}function _d(e,t,n,i){let s,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,s=n):(l=t,a=n,s=i),zx(e,l,c,s);function c(d,h){const m=h[h.length-1],p=m?m.children.indexOf(d):void 0;return a(d,p,m)}}const LT={};function Ld(e,t){const n=LT,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Hx(e,i,s)}function Hx(e,t,n){if(OT(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Zg(e.children,t,n)}return Array.isArray(e)?Zg(e,t,n):""}function Zg(e,t,n){const i=[];let s=-1;for(;++s<e.length;)i[s]=Hx(e[s],t,n);return i.join("")}function OT(e){return!!(e&&typeof e=="object")}function FT(e,t){let n=!1;return _d(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Af}),!!((!e.depth||e.depth<3)&&Ld(e)&&(t.options.setext||n))}function zT(e,t,n,i){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(i);if(FT(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),y=n.containerPhrasing(e,{...l.current(),before:`
239
+ `,after:`
240
+ `});return p(),m(),y+`
241
+ `+(s===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
242
+ `))+1))}const a="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");l.move(a+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
243
+ `,...l.current()});return/^[\t ]/.test(h)&&(h=hs(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),d(),c(),h}Kx.peek=VT;function Kx(e){return e.value||""}function VT(){return"<"}qx.peek=BT;function qx(e,t,n,i){const s=Id(n),l=s==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const d=n.createTracker(i);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),c()),h+=d.move(")"),a(),h}function BT(){return"!"}Xx.peek=$T;function Xx(e,t,n,i){const s=e.referenceType,l=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(i);let d=c.move("![");const h=n.safe(e.alt,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return a(),n.stack=m,l(),s==="full"||!h||h!==p?d+=c.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function $T(){return"!"}Yx.peek=UT;function Yx(e,t,n){let i=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const a=n.unsafe[l],c=n.compilePattern(a);let d;if(a.atBreak)for(;d=c.exec(i);){let h=d.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(d.index+1)}}return s+i+s}function UT(){return"`"}function Gx(e,t){const n=Ld(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Qx.peek=WT;function Qx(e,t,n,i){const s=Id(n),l=s==='"'?"Quote":"Apostrophe",a=n.createTracker(i);let c,d;if(Gx(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),c(),n.stack=m,p}c=n.enter("link"),d=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,{before:h,after:"](",...a.current()})),h+=a.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,{before:h,after:">",...a.current()})),h+=a.move(">")):(d=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,{before:h,after:e.title?" ":")",...a.current()}))),d(),e.title&&(d=n.enter(`title${l}`),h+=a.move(" "+s),h+=a.move(n.safe(e.title,{before:h,after:s,...a.current()})),h+=a.move(s),d()),h+=a.move(")"),c(),h}function WT(e,t,n){return Gx(e,n)?"<":"["}Zx.peek=HT;function Zx(e,t,n,i){const s=e.referenceType,l=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(i);let d=c.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...c.current()});d+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:d,after:"]",...c.current()});return a(),n.stack=m,l(),s==="full"||!h||h!==p?d+=c.move(p+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function HT(){return"["}function Od(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function KT(e){const t=Od(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function qT(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Jx(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function XT(e,t,n,i){const s=n.enter("list"),l=n.bulletCurrent;let a=e.ordered?qT(n):Od(n);const c=e.ordered?a==="."?")":".":KT(n);let d=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(d=!0),Jx(n)===a&&m){let p=-1;for(;++p<e.children.length;){const y=e.children[p];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,i);return n.bulletLastUsed=a,n.bulletCurrent=l,s(),h}function YT(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function GT(e,t,n,i){const s=YT(n);let l=n.bulletCurrent||Od(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let a=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(i);c.move(l+" ".repeat(a-l.length)),c.shift(a);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return d(),h;function m(p,y,w){return y?(w?"":" ".repeat(a))+p:(w?l:l+" ".repeat(a-l.length))+p}}function QT(e,t,n,i){const s=n.enter("paragraph"),l=n.enter("phrasing"),a=n.containerPhrasing(e,i);return l(),s(),a}const ZT=Dl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function JT(e,t,n,i){return(e.children.some(function(a){return ZT(a)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function eP(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}ew.peek=tP;function ew(e,t,n,i){const s=eP(n),l=n.enter("strong"),a=n.createTracker(i),c=a.move(s+s);let d=a.move(n.containerPhrasing(e,{after:s,before:c,...a.current()}));const h=d.charCodeAt(0),m=yl(i.before.charCodeAt(i.before.length-1),h,s);m.inside&&(d=hs(h)+d.slice(1));const p=d.charCodeAt(d.length-1),y=yl(i.after.charCodeAt(0),p,s);y.inside&&(d=d.slice(0,-1)+hs(p));const w=a.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+d+w}function tP(e,t,n){return n.options.strong||"*"}function nP(e,t,n,i){return n.safe(e.value,i)}function rP(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function iP(e,t,n){const i=(Jx(n)+(n.options.ruleSpaces?" ":"")).repeat(rP(n));return n.options.ruleSpaces?i.slice(0,-1):i}const tw={blockquote:ET,break:Qg,code:NT,definition:DT,emphasis:Wx,hardBreak:Qg,heading:zT,html:Kx,image:qx,imageReference:Xx,inlineCode:Yx,link:Qx,linkReference:Zx,list:XT,listItem:GT,paragraph:QT,root:JT,strong:ew,text:nP,thematicBreak:iP},Jg=document.createElement("i");function Fd(e){const t="&"+e+";";Jg.innerHTML=t;const n=Jg.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function nw(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const oP=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sP(e){return e.replace(oP,aP)}function aP(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return nw(n.slice(l?2:1),l?16:10)}return Fd(n)||e}function lP(){return{enter:{table:uP,tableData:ey,tableHeader:ey,tableRow:fP},exit:{codeText:dP,table:cP,tableData:Oc,tableHeader:Oc,tableRow:Oc}}}function uP(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function cP(e){this.exit(e),this.data.inTable=void 0}function fP(e){this.enter({type:"tableRow",children:[]},e)}function Oc(e){this.exit(e)}function ey(e){this.enter({type:"tableCell",children:[]},e)}function dP(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,hP));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function hP(e,t){return t==="|"?t:e}function pP(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
244
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:a,tableCell:d,tableRow:c}};function a(w,k,C,T){return h(m(w,C,T),w.align)}function c(w,k,C,T){const E=p(w,C,T),M=h([E]);return M.slice(0,M.indexOf(`
245
+ `))}function d(w,k,C,T){const E=C.enter("tableCell"),M=C.enter("phrasing"),A=C.containerPhrasing(w,{...T,before:l,after:l});return M(),E(),A}function h(w,k){return bT(w,{align:k,alignDelimiters:i,padding:n,stringLength:s})}function m(w,k,C){const T=w.children;let E=-1;const M=[],A=k.enter("table");for(;++E<T.length;)M[E]=p(T[E],k,C);return A(),M}function p(w,k,C){const T=w.children;let E=-1;const M=[],A=k.enter("tableRow");for(;++E<T.length;)M[E]=d(T[E],w,k,C);return A(),M}function y(w,k,C){let T=tw.inlineCode(w,k,C);return C.stack.includes("tableCell")&&(T=T.replace(/\|/g,"\\$&")),T}}function mP(){return{exit:{taskListCheckValueChecked:ty,taskListCheckValueUnchecked:ty,paragraph:yP}}}function gP(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:vP}}}function ty(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function yP(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const s=t.children;let l=-1,a;for(;++l<s.length;){const c=s[l];if(c.type==="paragraph"){a=c;break}}a===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function vP(e,t,n,i){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(i);l&&c.move(a);let d=tw.listItem(e,t,n,{...i,...c.current()});return l&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+a}}function rw(){return[KE(),hT(),yT(),lP(),mP()]}function xP(e){return{extensions:[qE(),pT(e),vT(),pP(e),gP()]}}function sn(e,t,n,i){const s=e.length;let l=0,a;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)a=Array.from(i),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<i.length;)a=i.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function mn(e,t){return e.length>0?(sn(e,e.length,0,t),e):t}const ny={}.hasOwnProperty;function iw(e){const t={};let n=-1;for(;++n<e.length;)wP(t,e[n]);return t}function wP(e,t){let n;for(n in t){const s=(ny.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){ny.call(s,a)||(s[a]=[]);const c=l[a];kP(s[a],Array.isArray(c)?c:c?[c]:[])}}}function kP(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);sn(e,0,0,i)}function Zi(e){const t=[];let n=-1,i=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&jt(e.charCodeAt(n+1))&&jt(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),s=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(i,n),encodeURIComponent(a)),i=n+s+1,a=""),s&&(n+=s,s=0)}return t.join("")+e.slice(i)}function ze(e,t,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(d){return Oe(d)?(e.enter(n),c(d)):t(d)}function c(d){return Oe(d)&&l++<s?(e.consume(d),c):(e.exit(n),t(d))}}const SP={tokenize:bP};function bP(e){const t=e.attempt(this.parser.constructs.contentInitial,i,s);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),ze(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),l(c)}function l(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Me(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const CP={tokenize:EP},ry={tokenize:TP};function EP(e){const t=this,n=[];let i=0,s,l,a;return c;function c(A){if(i<n.length){const L=n[i];return t.containerState=L[1],e.attempt(L[0].continuation,d,h)(A)}return h(A)}function d(A){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&M();const L=t.events.length;let U=L,D;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){D=t.events[U][1].end;break}E(i);let Y=L;for(;Y<t.events.length;)t.events[Y][1].end={...D},Y++;return sn(t.events,U+1,0,t.events.slice(L)),t.events.length=Y,h(A)}return c(A)}function h(A){if(i===n.length){if(!s)return y(A);if(s.currentConstruct&&s.currentConstruct.concrete)return k(A);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ry,m,p)(A)}function m(A){return s&&M(),E(i),y(A)}function p(A){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,k(A)}function y(A){return t.containerState={},e.attempt(ry,w,k)(A)}function w(A){return i++,n.push([t.currentConstruct,t.containerState]),y(A)}function k(A){if(A===null){s&&M(),E(0),e.consume(A);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),C(A)}function C(A){if(A===null){T(e.exit("chunkFlow"),!0),E(0),e.consume(A);return}return Me(A)?(e.consume(A),T(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(A),C)}function T(A,L){const U=t.sliceStream(A);if(L&&U.push(null),A.previous=l,l&&(l.next=A),l=A,s.defineSkip(A.start),s.write(U),t.parser.lazy[A.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<a&&(!s.events[D][1].end||s.events[D][1].end.offset>a))return;const Y=t.events.length;let W=Y,X,j;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){if(X){j=t.events[W][1].end;break}X=!0}for(E(i),D=Y;D<t.events.length;)t.events[D][1].end={...j},D++;sn(t.events,W+1,0,t.events.slice(Y)),t.events.length=D}}function E(A){let L=n.length;for(;L-- >A;){const U=n[L];t.containerState=U[1],U[0].exit.call(t,e)}n.length=A}function M(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function TP(e,t,n){return ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _l(e,t,n){const i=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!i.includes(l)&&(t=l(t,n),i.push(l))}return t}const Mf={name:"attention",resolveAll:PP,tokenize:RP};function PP(e,t){let n=-1,i,s,l,a,c,d,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[i][1].end},y={...e[n][1].start};iy(p,-d),iy(y,d),a={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[i][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},l={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[i][1].end={...a.start},e[n][1].start={...c.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=mn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=mn(h,[["enter",s,t],["enter",a,t],["exit",a,t],["enter",l,t]]),h=mn(h,_l(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=mn(h,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=mn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,sn(e,i-1,n-i+3,h),n=i+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function RP(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=Xi(i);let l;return a;function a(d){return l=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===l)return e.consume(d),c;const h=e.exit("attentionSequence"),m=Xi(d),p=!m||m===2&&s||n.includes(d),y=!s||s===2&&m||n.includes(i);return h._open=!!(l===42?p:p&&(s||!y)),h._close=!!(l===42?y:y&&(m||!p)),t(d)}}function iy(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const AP={name:"autolink",tokenize:MP};function MP(e,t,n){let i=0;return s;function s(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(w){return Ft(w)?(e.consume(w),a):w===64?n(w):h(w)}function a(w){return w===43||w===45||w===46||jt(w)?(i=1,c(w)):h(w)}function c(w){return w===58?(e.consume(w),i=0,d):(w===43||w===45||w===46||jt(w))&&i++<32?(e.consume(w),c):(i=0,h(w))}function d(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):w===null||w===32||w===60||gl(w)?n(w):(e.consume(w),d)}function h(w){return w===64?(e.consume(w),m):ME(w)?(e.consume(w),h):n(w)}function m(w){return jt(w)?p(w):n(w)}function p(w){return w===46?(e.consume(w),i=0,m):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):y(w)}function y(w){if((w===45||jt(w))&&i++<63){const k=w===45?y:p;return e.consume(w),k}return n(w)}}const bs={partial:!0,tokenize:NP};function NP(e,t,n){return i;function i(l){return Oe(l)?ze(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||Me(l)?t(l):n(l)}}const ow={continuation:{tokenize:DP},exit:IP,name:"blockQuote",tokenize:jP};function jP(e,t,n){const i=this;return s;function s(a){if(a===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return Oe(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function DP(e,t,n){const i=this;return s;function s(a){return Oe(a)?ze(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(ow,t,n)(a)}}function IP(e){e.exit("blockQuote")}const sw={name:"characterEscape",tokenize:_P};function _P(e,t,n){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return jE(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const aw={name:"characterReference",tokenize:LP};function LP(e,t,n){const i=this;let s=0,l,a;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,a=jt,m(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=NE,m):(e.enter("characterReferenceValue"),l=7,a=Rf,m(p))}function m(p){if(p===59&&s){const y=e.exit("characterReferenceValue");return a===jt&&!Fd(i.sliceSerialize(y))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&s++<l?(e.consume(p),m):n(p)}}const oy={partial:!0,tokenize:FP},sy={concrete:!0,name:"codeFenced",tokenize:OP};function OP(e,t,n){const i=this,s={partial:!0,tokenize:U};let l=0,a=0,c;return d;function d(D){return h(D)}function h(D){const Y=i.events[i.events.length-1];return l=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(D)}function m(D){return D===c?(a++,e.consume(D),m):a<3?n(D):(e.exit("codeFencedFenceSequence"),Oe(D)?ze(e,p,"whitespace")(D):p(D))}function p(D){return D===null||Me(D)?(e.exit("codeFencedFence"),i.interrupt?t(D):e.check(oy,C,L)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(D))}function y(D){return D===null||Me(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):Oe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ze(e,w,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),y)}function w(D){return D===null||Me(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(D))}function k(D){return D===null||Me(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(D)):D===96&&D===c?n(D):(e.consume(D),k)}function C(D){return e.attempt(s,L,T)(D)}function T(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),E}function E(D){return l>0&&Oe(D)?ze(e,M,"linePrefix",l+1)(D):M(D)}function M(D){return D===null||Me(D)?e.check(oy,C,L)(D):(e.enter("codeFlowValue"),A(D))}function A(D){return D===null||Me(D)?(e.exit("codeFlowValue"),M(D)):(e.consume(D),A)}function L(D){return e.exit("codeFenced"),t(D)}function U(D,Y,W){let X=0;return j;function j(ee){return D.enter("lineEnding"),D.consume(ee),D.exit("lineEnding"),G}function G(ee){return D.enter("codeFencedFence"),Oe(ee)?ze(D,V,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):V(ee)}function V(ee){return ee===c?(D.enter("codeFencedFenceSequence"),fe(ee)):W(ee)}function fe(ee){return ee===c?(X++,D.consume(ee),fe):X>=a?(D.exit("codeFencedFenceSequence"),Oe(ee)?ze(D,ie,"whitespace")(ee):ie(ee)):W(ee)}function ie(ee){return ee===null||Me(ee)?(D.exit("codeFencedFence"),Y(ee)):W(ee)}}}function FP(e,t,n){const i=this;return s;function s(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}const Fc={name:"codeIndented",tokenize:VP},zP={partial:!0,tokenize:BP};function VP(e,t,n){const i=this;return s;function s(h){return e.enter("codeIndented"),ze(e,l,"linePrefix",5)(h)}function l(h){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?d(h):Me(h)?e.attempt(zP,a,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Me(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function BP(e,t,n){const i=this;return s;function s(a){return i.parser.lazy[i.now().line]?n(a):Me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):ze(e,l,"linePrefix",5)(a)}function l(a){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):Me(a)?s(a):n(a)}}const $P={name:"codeText",previous:WP,resolve:UP,tokenize:HP};function UP(e){let t=e.length-4,n=3,i,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)s===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(s=i):(i===t||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),t-=i-s-2,i=s+2),s=void 0);return e}function WP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function HP(e,t,n){let i=0,s,l;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),i++,c):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(l=e.enter("codeTextSequence"),s=0,m(p)):Me(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Me(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),h)}function m(p){return p===96?(e.consume(p),s++,m):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(l.type="codeTextData",h(p))}}class KP{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&Ko(this.left,i),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ko(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ko(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ko(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ko(this.left,n.reverse())}}}function Ko(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function lw(e){const t={};let n=-1,i,s,l,a,c,d,h;const m=new KP(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(i=m.get(n),n&&i[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,l=0,l<d.length&&d[l][1].type==="lineEndingBlank"&&(l+=2),l<d.length&&d[l][1].type==="content"))for(;++l<d.length&&d[l][1].type!=="content";)d[l][1].type==="chunkText"&&(d[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,qP(m,n)),n=t[n],h=!0);else if(i[1]._container){for(l=n,s=void 0;l--;)if(a=m.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),a[1].type="lineEnding",s=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;s&&(i[1].end={...m.get(s)[1].start},c=m.slice(s,n),c.unshift(i),m.splice(s,n-s+1,c))}}return sn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function qP(e,t){const n=e.get(t)[1],i=e.get(t)[2];let s=t-1;const l=[];let a=n._tokenizer;a||(a=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,d=[],h={};let m,p,y=-1,w=n,k=0,C=0;const T=[C];for(;w;){for(;e.get(++s)[1]!==w;);l.push(s),w._tokenizer||(m=i.sliceStream(w),w.next||m.push(null),p&&a.defineSkip(w.start),w._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),w._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=w,w=w.next}for(w=n;++y<c.length;)c[y][0]==="exit"&&c[y-1][0]==="enter"&&c[y][1].type===c[y-1][1].type&&c[y][1].start.line!==c[y][1].end.line&&(C=y+1,T.push(C),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(a.events=[],w?(w._tokenizer=void 0,w.previous=void 0):T.pop(),y=T.length;y--;){const E=c.slice(T[y],T[y+1]),M=l.pop();d.push([M,M+E.length-1]),e.splice(M,2,E)}for(d.reverse(),y=-1;++y<d.length;)h[k+d[y][0]]=k+d[y][1],k+=d[y][1]-d[y][0]-1;return h}const XP={resolve:GP,tokenize:QP},YP={partial:!0,tokenize:ZP};function GP(e){return lw(e),e}function QP(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?l(c):Me(c)?e.check(YP,a,l)(c):(e.consume(c),s)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function ZP(e,t,n){const i=this;return s;function s(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ze(e,l,"linePrefix")}function l(a){if(a===null||Me(a))return n(a);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(i.parser.constructs.flow,n,t)(a)}}function uw(e,t,n,i,s,l,a,c,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return p;function p(E){return E===60?(e.enter(i),e.enter(s),e.enter(l),e.consume(E),e.exit(l),y):E===null||E===32||E===41||gl(E)?n(E):(e.enter(i),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),C(E))}function y(E){return E===62?(e.enter(l),e.consume(E),e.exit(l),e.exit(s),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),w(E))}function w(E){return E===62?(e.exit("chunkString"),e.exit(c),y(E)):E===null||E===60||Me(E)?n(E):(e.consume(E),E===92?k:w)}function k(E){return E===60||E===62||E===92?(e.consume(E),w):w(E)}function C(E){return!m&&(E===null||E===41||Ge(E))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(i),t(E)):m<h&&E===40?(e.consume(E),m++,C):E===41?(e.consume(E),m--,C):E===null||E===32||E===40||gl(E)?n(E):(e.consume(E),E===92?T:C)}function T(E){return E===40||E===41||E===92?(e.consume(E),C):C(E)}}function cw(e,t,n,i,s,l){const a=this;let c=0,d;return h;function h(w){return e.enter(i),e.enter(s),e.consume(w),e.exit(s),e.enter(l),m}function m(w){return c>999||w===null||w===91||w===93&&!d||w===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(w):w===93?(e.exit(l),e.enter(s),e.consume(w),e.exit(s),e.exit(i),t):Me(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||w===91||w===93||Me(w)||c++>999?(e.exit("chunkString"),m(w)):(e.consume(w),d||(d=!Oe(w)),w===92?y:p)}function y(w){return w===91||w===92||w===93?(e.consume(w),c++,p):p(w)}}function fw(e,t,n,i,s,l){let a;return c;function c(y){return y===34||y===39||y===40?(e.enter(i),e.enter(s),e.consume(y),e.exit(s),a=y===40?41:y,d):n(y)}function d(y){return y===a?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),t):(e.enter(l),h(y))}function h(y){return y===a?(e.exit(l),d(a)):y===null?n(y):Me(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),ze(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===a||y===null||Me(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?p:m)}function p(y){return y===a||y===92?(e.consume(y),m):m(y)}}function es(e,t){let n;return i;function i(s){return Me(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):Oe(s)?ze(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}const JP={name:"definition",tokenize:tR},eR={partial:!0,tokenize:nR};function tR(e,t,n){const i=this;let s;return l;function l(w){return e.enter("definition"),a(w)}function a(w){return cw.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function c(w){return s=Mn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),d):n(w)}function d(w){return Ge(w)?es(e,h)(w):h(w)}function h(w){return uw(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function m(w){return e.attempt(eR,p,p)(w)}function p(w){return Oe(w)?ze(e,y,"whitespace")(w):y(w)}function y(w){return w===null||Me(w)?(e.exit("definition"),i.parser.defined.push(s),t(w)):n(w)}}function nR(e,t,n){return i;function i(c){return Ge(c)?es(e,s)(c):n(c)}function s(c){return fw(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return Oe(c)?ze(e,a,"whitespace")(c):a(c)}function a(c){return c===null||Me(c)?t(c):n(c)}}const rR={name:"hardBreakEscape",tokenize:iR};function iR(e,t,n){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return Me(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const oR={name:"headingAtx",resolve:sR,tokenize:aR};function sR(e,t){let n=e.length-2,i=3,s,l;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},l={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},sn(e,i,n-i+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function aR(e,t,n){let i=0;return s;function s(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&i++<6?(e.consume(m),a):m===null||Ge(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||Me(m)?(e.exit("atxHeading"),t(m)):Oe(m)?ze(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||Ge(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const lR=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ay=["pre","script","style","textarea"],uR={concrete:!0,name:"htmlFlow",resolveTo:dR,tokenize:hR},cR={partial:!0,tokenize:mR},fR={partial:!0,tokenize:pR};function dR(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function hR(e,t,n){const i=this;let s,l,a,c,d;return h;function h(R){return m(R)}function m(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),y):R===47?(e.consume(R),l=!0,C):R===63?(e.consume(R),s=3,i.interrupt?t:P):Ft(R)?(e.consume(R),a=String.fromCharCode(R),T):n(R)}function y(R){return R===45?(e.consume(R),s=2,w):R===91?(e.consume(R),s=5,c=0,k):Ft(R)?(e.consume(R),s=4,i.interrupt?t:P):n(R)}function w(R){return R===45?(e.consume(R),i.interrupt?t:P):n(R)}function k(R){const Z="CDATA[";return R===Z.charCodeAt(c++)?(e.consume(R),c===Z.length?i.interrupt?t:V:k):n(R)}function C(R){return Ft(R)?(e.consume(R),a=String.fromCharCode(R),T):n(R)}function T(R){if(R===null||R===47||R===62||Ge(R)){const Z=R===47,de=a.toLowerCase();return!Z&&!l&&ay.includes(de)?(s=1,i.interrupt?t(R):V(R)):lR.includes(a.toLowerCase())?(s=6,Z?(e.consume(R),E):i.interrupt?t(R):V(R)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(R):l?M(R):A(R))}return R===45||jt(R)?(e.consume(R),a+=String.fromCharCode(R),T):n(R)}function E(R){return R===62?(e.consume(R),i.interrupt?t:V):n(R)}function M(R){return Oe(R)?(e.consume(R),M):j(R)}function A(R){return R===47?(e.consume(R),j):R===58||R===95||Ft(R)?(e.consume(R),L):Oe(R)?(e.consume(R),A):j(R)}function L(R){return R===45||R===46||R===58||R===95||jt(R)?(e.consume(R),L):U(R)}function U(R){return R===61?(e.consume(R),D):Oe(R)?(e.consume(R),U):A(R)}function D(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),d=R,Y):Oe(R)?(e.consume(R),D):W(R)}function Y(R){return R===d?(e.consume(R),d=null,X):R===null||Me(R)?n(R):(e.consume(R),Y)}function W(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Ge(R)?U(R):(e.consume(R),W)}function X(R){return R===47||R===62||Oe(R)?A(R):n(R)}function j(R){return R===62?(e.consume(R),G):n(R)}function G(R){return R===null||Me(R)?V(R):Oe(R)?(e.consume(R),G):n(R)}function V(R){return R===45&&s===2?(e.consume(R),ve):R===60&&s===1?(e.consume(R),Te):R===62&&s===4?(e.consume(R),_):R===63&&s===3?(e.consume(R),P):R===93&&s===5?(e.consume(R),ue):Me(R)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(cR,Q,fe)(R)):R===null||Me(R)?(e.exit("htmlFlowData"),fe(R)):(e.consume(R),V)}function fe(R){return e.check(fR,ie,Q)(R)}function ie(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),ee}function ee(R){return R===null||Me(R)?fe(R):(e.enter("htmlFlowData"),V(R))}function ve(R){return R===45?(e.consume(R),P):V(R)}function Te(R){return R===47?(e.consume(R),a="",q):V(R)}function q(R){if(R===62){const Z=a.toLowerCase();return ay.includes(Z)?(e.consume(R),_):V(R)}return Ft(R)&&a.length<8?(e.consume(R),a+=String.fromCharCode(R),q):V(R)}function ue(R){return R===93?(e.consume(R),P):V(R)}function P(R){return R===62?(e.consume(R),_):R===45&&s===2?(e.consume(R),P):V(R)}function _(R){return R===null||Me(R)?(e.exit("htmlFlowData"),Q(R)):(e.consume(R),_)}function Q(R){return e.exit("htmlFlow"),t(R)}}function pR(e,t,n){const i=this;return s;function s(a){return Me(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}function mR(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(bs,t,n)}}const gR={name:"htmlText",tokenize:yR};function yR(e,t,n){const i=this;let s,l,a;return c;function c(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),h):P===47?(e.consume(P),U):P===63?(e.consume(P),A):Ft(P)?(e.consume(P),W):n(P)}function h(P){return P===45?(e.consume(P),m):P===91?(e.consume(P),l=0,k):Ft(P)?(e.consume(P),M):n(P)}function m(P){return P===45?(e.consume(P),w):n(P)}function p(P){return P===null?n(P):P===45?(e.consume(P),y):Me(P)?(a=p,Te(P)):(e.consume(P),p)}function y(P){return P===45?(e.consume(P),w):p(P)}function w(P){return P===62?ve(P):P===45?y(P):p(P)}function k(P){const _="CDATA[";return P===_.charCodeAt(l++)?(e.consume(P),l===_.length?C:k):n(P)}function C(P){return P===null?n(P):P===93?(e.consume(P),T):Me(P)?(a=C,Te(P)):(e.consume(P),C)}function T(P){return P===93?(e.consume(P),E):C(P)}function E(P){return P===62?ve(P):P===93?(e.consume(P),E):C(P)}function M(P){return P===null||P===62?ve(P):Me(P)?(a=M,Te(P)):(e.consume(P),M)}function A(P){return P===null?n(P):P===63?(e.consume(P),L):Me(P)?(a=A,Te(P)):(e.consume(P),A)}function L(P){return P===62?ve(P):A(P)}function U(P){return Ft(P)?(e.consume(P),D):n(P)}function D(P){return P===45||jt(P)?(e.consume(P),D):Y(P)}function Y(P){return Me(P)?(a=Y,Te(P)):Oe(P)?(e.consume(P),Y):ve(P)}function W(P){return P===45||jt(P)?(e.consume(P),W):P===47||P===62||Ge(P)?X(P):n(P)}function X(P){return P===47?(e.consume(P),ve):P===58||P===95||Ft(P)?(e.consume(P),j):Me(P)?(a=X,Te(P)):Oe(P)?(e.consume(P),X):ve(P)}function j(P){return P===45||P===46||P===58||P===95||jt(P)?(e.consume(P),j):G(P)}function G(P){return P===61?(e.consume(P),V):Me(P)?(a=G,Te(P)):Oe(P)?(e.consume(P),G):X(P)}function V(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),s=P,fe):Me(P)?(a=V,Te(P)):Oe(P)?(e.consume(P),V):(e.consume(P),ie)}function fe(P){return P===s?(e.consume(P),s=void 0,ee):P===null?n(P):Me(P)?(a=fe,Te(P)):(e.consume(P),fe)}function ie(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||Ge(P)?X(P):(e.consume(P),ie)}function ee(P){return P===47||P===62||Ge(P)?X(P):n(P)}function ve(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function Te(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),q}function q(P){return Oe(P)?ze(e,ue,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):ue(P)}function ue(P){return e.enter("htmlTextData"),a(P)}}const zd={name:"labelEnd",resolveAll:kR,resolveTo:SR,tokenize:bR},vR={tokenize:CR},xR={tokenize:ER},wR={tokenize:TR};function kR(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",t+=s}}return e.length!==n.length&&sn(e,0,e.length,n),e}function SR(e,t){let n=e.length,i=0,s,l,a,c;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(a=n);const d={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},m={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=mn(c,e.slice(l+1,l+i+3)),c=mn(c,[["enter",m,t]]),c=mn(c,_l(t.parser.constructs.insideSpan.null,e.slice(l+i+4,a-3),t)),c=mn(c,[["exit",m,t],e[a-2],e[a-1],["exit",h,t]]),c=mn(c,e.slice(a+1)),c=mn(c,[["exit",d,t]]),sn(e,l,e.length,c),e}function bR(e,t,n){const i=this;let s=i.events.length,l,a;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){l=i.events[s][1];break}return c;function c(y){return l?l._inactive?p(y):(a=i.parser.defined.includes(Mn(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),d):n(y)}function d(y){return y===40?e.attempt(vR,m,a?m:p)(y):y===91?e.attempt(xR,m,a?h:p)(y):a?m(y):p(y)}function h(y){return e.attempt(wR,m,p)(y)}function m(y){return t(y)}function p(y){return l._balanced=!0,n(y)}}function CR(e,t,n){return i;function i(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return Ge(p)?es(e,l)(p):l(p)}function l(p){return p===41?m(p):uw(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Ge(p)?es(e,d)(p):m(p)}function c(p){return n(p)}function d(p){return p===34||p===39||p===40?fw(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function h(p){return Ge(p)?es(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function ER(e,t,n){const i=this;return s;function s(c){return cw.call(i,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return i.parser.defined.includes(Mn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function TR(e,t,n){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const PR={name:"labelStartImage",resolveAll:zd.resolveAll,tokenize:RR};function RR(e,t,n){const i=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const AR={name:"labelStartLink",resolveAll:zd.resolveAll,tokenize:MR};function MR(e,t,n){const i=this;return s;function s(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):t(a)}}const zc={name:"lineEnding",tokenize:NR};function NR(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),ze(e,t,"linePrefix")}}const tl={name:"thematicBreak",tokenize:jR};function jR(e,t,n){let i=0,s;return l;function l(h){return e.enter("thematicBreak"),a(h)}function a(h){return s=h,c(h)}function c(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):i>=3&&(h===null||Me(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),i++,d):(e.exit("thematicBreakSequence"),Oe(h)?ze(e,c,"whitespace")(h):c(h))}}const Zt={continuation:{tokenize:LR},exit:FR,name:"list",tokenize:_R},DR={partial:!0,tokenize:zR},IR={partial:!0,tokenize:OR};function _R(e,t,n){const i=this,s=i.events[i.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return c;function c(w){const k=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:Rf(w)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(tl,n,h)(w):h(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(w)}return n(w)}function d(w){return Rf(w)&&++a<10?(e.consume(w),d):(!i.interrupt||a<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),h(w)):n(w)}function h(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(bs,i.interrupt?n:m,e.attempt(DR,y,p))}function m(w){return i.containerState.initialBlankLine=!0,l++,y(w)}function p(w){return Oe(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),y):n(w)}function y(w){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(w)}}function LR(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(bs,s,l);function s(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,ze(e,t,"listItemIndent",i.containerState.size+1)(c)}function l(c){return i.containerState.furtherBlankLines||!Oe(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(IR,t,a)(c))}function a(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,ze(e,e.attempt(Zt,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function OR(e,t,n){const i=this;return ze(e,s,"listItemIndent",i.containerState.size+1);function s(l){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(l):n(l)}}function FR(e){e.exit(this.containerState.type)}function zR(e,t,n){const i=this;return ze(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const a=i.events[i.events.length-1];return!Oe(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const ly={name:"setextUnderline",resolveTo:VR,tokenize:BR};function VR(e,t){let n=e.length,i,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",a,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=a,e.push(["exit",a,t]),e}function BR(e,t,n){const i=this;let s;return l;function l(h){let m=i.events.length,p;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){p=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||p)?(e.enter("setextHeadingLine"),s=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===s?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Oe(h)?ze(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Me(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const $R={tokenize:UR};function UR(e){const t=this,n=e.attempt(bs,i,e.attempt(this.parser.constructs.flowInitial,s,ze(e,e.attempt(this.parser.constructs.flow,s,e.attempt(XP,s)),"linePrefix")));return n;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const WR={resolveAll:hw()},HR=dw("string"),KR=dw("text");function dw(e){return{resolveAll:hw(e==="text"?qR:void 0),tokenize:t};function t(n){const i=this,s=this.parser.constructs[e],l=n.attempt(s,a,c);return a;function a(m){return h(m)?l(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return h(m)?(n.exit("data"),l(m)):(n.consume(m),d)}function h(m){if(m===null)return!0;const p=s[m];let y=-1;if(p)for(;++y<p.length;){const w=p[y];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function hw(e){return t;function t(n,i){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,i):n}}function qR(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],s=t.sliceStream(i);let l=s.length,a=-1,c=0,d;for(;l--;){const h=s[l];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)d=!0,c++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const XR={42:Zt,43:Zt,45:Zt,48:Zt,49:Zt,50:Zt,51:Zt,52:Zt,53:Zt,54:Zt,55:Zt,56:Zt,57:Zt,62:ow},YR={91:JP},GR={[-2]:Fc,[-1]:Fc,32:Fc},QR={35:oR,42:tl,45:[ly,tl],60:uR,61:ly,95:tl,96:sy,126:sy},ZR={38:aw,92:sw},JR={[-5]:zc,[-4]:zc,[-3]:zc,33:PR,38:aw,42:Mf,60:[AP,gR],91:AR,92:[rR,sw],93:zd,95:Mf,96:$P},e2={null:[Mf,WR]},t2={null:[42,95]},n2={null:[]},r2=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:t2,contentInitial:YR,disable:n2,document:XR,flow:QR,flowInitial:GR,insideSpan:e2,string:ZR,text:JR},Symbol.toStringTag,{value:"Module"}));function i2(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let a=[],c=[];const d={attempt:Y(U),check:Y(D),consume:M,enter:A,exit:L,interrupt:Y(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:C,events:[],now:k,parser:e,previous:null,sliceSerialize:y,sliceStream:w,write:p};let m=t.tokenize.call(h,d);return t.resolveAll&&l.push(t),h;function p(G){return a=mn(a,G),T(),a[a.length-1]!==null?[]:(W(t,0),h.events=_l(l,h.events,h),h.events)}function y(G,V){return s2(w(G),V)}function w(G){return o2(a,G)}function k(){const{_bufferIndex:G,_index:V,line:fe,column:ie,offset:ee}=i;return{_bufferIndex:G,_index:V,line:fe,column:ie,offset:ee}}function C(G){s[G.line]=G.column,j()}function T(){let G;for(;i._index<a.length;){const V=a[i._index];if(typeof V=="string")for(G=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===G&&i._bufferIndex<V.length;)E(V.charCodeAt(i._bufferIndex));else E(V)}}function E(G){m=m(G)}function M(G){Me(G)?(i.line++,i.column=1,i.offset+=G===-3?2:1,j()):G!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===a[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=G}function A(G,V){const fe=V||{};return fe.type=G,fe.start=k(),h.events.push(["enter",fe,h]),c.push(fe),fe}function L(G){const V=c.pop();return V.end=k(),h.events.push(["exit",V,h]),V}function U(G,V){W(G,V.from)}function D(G,V){V.restore()}function Y(G,V){return fe;function fe(ie,ee,ve){let Te,q,ue,P;return Array.isArray(ie)?Q(ie):"tokenize"in ie?Q([ie]):_(ie);function _(re){return Ee;function Ee(ge){const xe=ge!==null&&re[ge],_e=ge!==null&&re.null,We=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(_e)?_e:_e?[_e]:[]];return Q(We)(ge)}}function Q(re){return Te=re,q=0,re.length===0?ve:R(re[q])}function R(re){return Ee;function Ee(ge){return P=X(),ue=re,re.partial||(h.currentConstruct=re),re.name&&h.parser.constructs.disable.null.includes(re.name)?de():re.tokenize.call(V?Object.assign(Object.create(h),V):h,d,Z,de)(ge)}}function Z(re){return G(ue,P),ee}function de(re){return P.restore(),++q<Te.length?R(Te[q]):ve}}}function W(G,V){G.resolveAll&&!l.includes(G)&&l.push(G),G.resolve&&sn(h.events,V,h.events.length-V,G.resolve(h.events.slice(V),h)),G.resolveTo&&(h.events=G.resolveTo(h.events,h))}function X(){const G=k(),V=h.previous,fe=h.currentConstruct,ie=h.events.length,ee=Array.from(c);return{from:ie,restore:ve};function ve(){i=G,h.previous=V,h.currentConstruct=fe,h.events.length=ie,c=ee,j()}}function j(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function o2(e,t){const n=t.start._index,i=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let a;if(n===s)a=[e[n].slice(i,l)];else{if(a=e.slice(n,s),i>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(i):a.shift()}l>0&&a.push(e[s].slice(0,l))}return a}function s2(e,t){let n=-1;const i=[];let s;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
246
+ `;break}case-3:{a=`\r
247
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&s)continue;a=" ";break}default:a=String.fromCharCode(l)}s=l===-2,i.push(a)}return i.join("")}function a2(e){const i={constructs:iw([r2,...(e||{}).extensions||[]]),content:s(SP),defined:[],document:s(CP),flow:s($R),lazy:{},string:s(HR),text:s(KR)};return i;function s(l){return a;function a(c){return i2(i,l,c)}}}function l2(e){for(;!lw(e););return e}const uy=/[\0\t\n\r]/g;function u2(){let e=1,t="",n=!0,i;return s;function s(l,a,c){const d=[];let h,m,p,y,w;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),p=0,t="",n&&(l.charCodeAt(0)===65279&&p++,n=void 0);p<l.length;){if(uy.lastIndex=p,h=uy.exec(l),y=h&&h.index!==void 0?h.index:l.length,w=l.charCodeAt(y),!h){t=l.slice(p);break}if(w===10&&p===y&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),p<y&&(d.push(l.slice(p,y)),e+=y-p),w){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}p=y+1}return c&&(i&&d.push(-5),t&&d.push(t),d.push(null)),d}}function ts(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?cy(e.position):"start"in e||"end"in e?cy(e):"line"in e||"column"in e?Nf(e):""}function Nf(e){return fy(e&&e.line)+":"+fy(e&&e.column)}function cy(e){return Nf(e&&e.start)+"-"+Nf(e&&e.end)}function fy(e){return e&&typeof e=="number"?e:1}const pw={}.hasOwnProperty;function mw(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),c2(n)(l2(a2(n).document().write(u2()(e,t,!0))))}function c2(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(Le),autolinkProtocol:X,autolinkEmail:X,atxHeading:l(ln),blockQuote:l(_e),characterEscape:X,characterReference:X,codeFenced:l(We),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(We,a),codeText:l(Pt,a),codeTextData:X,data:X,codeFlowValue:X,definition:l(ct),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l($t),hardBreakEscape:l(St),hardBreakTrailing:l(St),htmlFlow:l(ft,a),htmlFlowData:X,htmlText:l(ft,a),htmlTextData:X,image:l(It),label:a,link:l(Le),listItem:l(Wt),listItemValue:y,listOrdered:l(Ut,p),listUnordered:l(Ut),paragraph:l(wn),reference:R,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(ln),strong:l(B),thematicBreak:l(Ne)},exit:{atxHeading:d(),atxHeadingSequence:U,autolink:d(),autolinkEmail:xe,autolinkProtocol:ge,blockQuote:d(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:re,characterReference:Ee,codeFenced:d(T),codeFencedFence:C,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:j,codeIndented:d(E),codeText:d(ee),codeTextData:j,data:j,definition:d(),definitionDestinationString:L,definitionLabelString:M,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(V),hardBreakTrailing:d(V),htmlFlow:d(fe),htmlFlowData:j,htmlText:d(ie),htmlTextData:j,image:d(Te),label:ue,labelText:q,lineEnding:G,link:d(ve),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Z,resourceDestinationString:P,resourceTitleString:_,resource:Q,setextHeading:d(W),setextHeadingLineSequence:Y,setextHeadingText:D,strong:d(),thematicBreak:d()}};gw(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(K){let ae={type:"root",children:[]};const F={stack:[ae],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:m,data:n},J=[];let se=-1;for(;++se<K.length;)if(K[se][1].type==="listOrdered"||K[se][1].type==="listUnordered")if(K[se][0]==="enter")J.push(se);else{const Pe=J.pop();se=s(K,Pe,se)}for(se=-1;++se<K.length;){const Pe=t[K[se][0]];pw.call(Pe,K[se][1].type)&&Pe[K[se][1].type].call(Object.assign({sliceSerialize:K[se][2].sliceSerialize},F),K[se][1])}if(F.tokenStack.length>0){const Pe=F.tokenStack[F.tokenStack.length-1];(Pe[1]||dy).call(F,void 0,Pe[0])}for(ae.position={start:Cr(K.length>0?K[0][1].start:{line:1,column:1,offset:0}),end:Cr(K.length>0?K[K.length-2][1].end:{line:1,column:1,offset:0})},se=-1;++se<t.transforms.length;)ae=t.transforms[se](ae)||ae;return ae}function s(K,ae,F){let J=ae-1,se=-1,Pe=!1,Fe,pe,Je,Ht;for(;++J<=F;){const nt=K[J];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?se++:se--,Ht=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(Fe&&!Ht&&!se&&!Je&&(Je=J),Ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ht=void 0}if(!se&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||se===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(Fe){let Ke=J;for(pe=void 0;Ke--;){const Ue=K[Ke];if(Ue[1].type==="lineEnding"||Ue[1].type==="lineEndingBlank"){if(Ue[0]==="exit")continue;pe&&(K[pe][1].type="lineEndingBlank",Pe=!0),Ue[1].type="lineEnding",pe=Ke}else if(!(Ue[1].type==="linePrefix"||Ue[1].type==="blockQuotePrefix"||Ue[1].type==="blockQuotePrefixWhitespace"||Ue[1].type==="blockQuoteMarker"||Ue[1].type==="listItemIndent"))break}Je&&(!pe||Je<pe)&&(Fe._spread=!0),Fe.end=Object.assign({},pe?K[pe][1].start:nt[1].end),K.splice(pe||J,0,["exit",Fe,nt[2]]),J++,F++}if(nt[1].type==="listItemPrefix"){const Ke={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};Fe=Ke,K.splice(J,0,["enter",Ke,nt[2]]),J++,F++,Je=void 0,Ht=!0}}}return K[ae][1]._spread=Pe,F}function l(K,ae){return F;function F(J){c.call(this,K(J),J),ae&&ae.call(this,J)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(K,ae,F){this.stack[this.stack.length-1].children.push(K),this.stack.push(K),this.tokenStack.push([ae,F||void 0]),K.position={start:Cr(ae.start),end:void 0}}function d(K){return ae;function ae(F){K&&K.call(this,F),h.call(this,F)}}function h(K,ae){const F=this.stack.pop(),J=this.tokenStack.pop();if(J)J[0].type!==K.type&&(ae?ae.call(this,K,J[0]):(J[1]||dy).call(this,K,J[0]));else throw new Error("Cannot close `"+K.type+"` ("+ts({start:K.start,end:K.end})+"): it’s not open");F.position.end=Cr(K.end)}function m(){return Ld(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function y(K){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(K),10),this.data.expectingFirstListItemValue=void 0}}function w(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=K}function k(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=K}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function T(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.value=K.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.value=K.replace(/(\r?\n|\r)$/g,"")}function M(K){const ae=this.resume(),F=this.stack[this.stack.length-1];F.label=ae,F.identifier=Mn(this.sliceSerialize(K)).toLowerCase()}function A(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.title=K}function L(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.url=K}function U(K){const ae=this.stack[this.stack.length-1];if(!ae.depth){const F=this.sliceSerialize(K).length;ae.depth=F}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function Y(K){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(K).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function X(K){const F=this.stack[this.stack.length-1].children;let J=F[F.length-1];(!J||J.type!=="text")&&(J=he(),J.position={start:Cr(K.start),end:void 0},F.push(J)),this.stack.push(J)}function j(K){const ae=this.stack.pop();ae.value+=this.sliceSerialize(K),ae.position.end=Cr(K.end)}function G(K){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const F=ae.children[ae.children.length-1];F.position.end=Cr(K.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(X.call(this,K),j.call(this,K))}function V(){this.data.atHardBreak=!0}function fe(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.value=K}function ie(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.value=K}function ee(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.value=K}function ve(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=ae,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function Te(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=ae,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function q(K){const ae=this.sliceSerialize(K),F=this.stack[this.stack.length-2];F.label=sP(ae),F.identifier=Mn(ae).toLowerCase()}function ue(){const K=this.stack[this.stack.length-1],ae=this.resume(),F=this.stack[this.stack.length-1];if(this.data.inReference=!0,F.type==="link"){const J=K.children;F.children=J}else F.alt=ae}function P(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.url=K}function _(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.title=K}function Q(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function Z(K){const ae=this.resume(),F=this.stack[this.stack.length-1];F.label=ae,F.identifier=Mn(this.sliceSerialize(K)).toLowerCase(),this.data.referenceType="full"}function de(K){this.data.characterReferenceType=K.type}function re(K){const ae=this.sliceSerialize(K),F=this.data.characterReferenceType;let J;F?(J=nw(ae,F==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):J=Fd(ae);const se=this.stack[this.stack.length-1];se.value+=J}function Ee(K){const ae=this.stack.pop();ae.position.end=Cr(K.end)}function ge(K){j.call(this,K);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(K)}function xe(K){j.call(this,K);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(K)}function _e(){return{type:"blockquote",children:[]}}function We(){return{type:"code",lang:null,meta:null,value:""}}function Pt(){return{type:"inlineCode",value:""}}function ct(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $t(){return{type:"emphasis",children:[]}}function ln(){return{type:"heading",depth:0,children:[]}}function St(){return{type:"break"}}function ft(){return{type:"html",value:""}}function It(){return{type:"image",title:null,url:"",alt:null}}function Le(){return{type:"link",title:null,url:"",children:[]}}function Ut(K){return{type:"list",ordered:K.type==="listOrdered",start:null,spread:K._spread,children:[]}}function Wt(K){return{type:"listItem",spread:K._spread,checked:null,children:[]}}function wn(){return{type:"paragraph",children:[]}}function B(){return{type:"strong",children:[]}}function he(){return{type:"text",value:""}}function Ne(){return{type:"thematicBreak"}}}function Cr(e){return{line:e.line,column:e.column,offset:e.offset}}function gw(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?gw(e,i):f2(e,i)}}function f2(e,t){let n;for(n in t)if(pw.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function dy(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ts({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ts({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ts({start:t.start,end:t.end})+") is still open")}const d2={tokenize:v2,partial:!0},yw={tokenize:x2,partial:!0},vw={tokenize:w2,partial:!0},xw={tokenize:k2,partial:!0},h2={tokenize:S2,partial:!0},ww={name:"wwwAutolink",tokenize:g2,previous:Sw},kw={name:"protocolAutolink",tokenize:y2,previous:bw},rr={name:"emailAutolink",tokenize:m2,previous:Cw},Wn={};function p2(){return{text:Wn}}let Yr=48;for(;Yr<123;)Wn[Yr]=rr,Yr++,Yr===58?Yr=65:Yr===91&&(Yr=97);Wn[43]=rr;Wn[45]=rr;Wn[46]=rr;Wn[95]=rr;Wn[72]=[rr,kw];Wn[104]=[rr,kw];Wn[87]=[rr,ww];Wn[119]=[rr,ww];function m2(e,t,n){const i=this;let s,l;return a;function a(p){return!jf(p)||!Cw.call(i,i.previous)||Vd(i.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(p))}function c(p){return jf(p)?(e.consume(p),c):p===64?(e.consume(p),d):n(p)}function d(p){return p===46?e.check(h2,m,h)(p):p===45||p===95||jt(p)?(l=!0,e.consume(p),d):m(p)}function h(p){return e.consume(p),s=!0,d}function m(p){return l&&s&&Ft(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function g2(e,t,n){const i=this;return s;function s(a){return a!==87&&a!==119||!Sw.call(i,i.previous)||Vd(i.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(d2,e.attempt(yw,e.attempt(vw,l),n),n)(a))}function l(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function y2(e,t,n){const i=this;let s="",l=!1;return a;function a(p){return(p===72||p===104)&&bw.call(i,i.previous)&&!Vd(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),c):n(p)}function c(p){if(Ft(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),c;if(p===58){const y=s.toLowerCase();if(y==="http"||y==="https")return e.consume(p),d}return n(p)}function d(p){return p===47?(e.consume(p),l?h:(l=!0,d)):n(p)}function h(p){return p===null||gl(p)||Ge(p)||ai(p)||jl(p)?n(p):e.attempt(yw,e.attempt(vw,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function v2(e,t,n){let i=0;return s;function s(a){return(a===87||a===119)&&i<3?(i++,e.consume(a),s):a===46&&i===3?(e.consume(a),l):n(a)}function l(a){return a===null?n(a):t(a)}}function x2(e,t,n){let i,s,l;return a;function a(h){return h===46||h===95?e.check(xw,d,c)(h):h===null||Ge(h)||ai(h)||h!==45&&jl(h)?d(h):(l=!0,e.consume(h),a)}function c(h){return h===95?i=!0:(s=i,i=void 0),e.consume(h),a}function d(h){return s||i||!l?n(h):t(h)}}function w2(e,t){let n=0,i=0;return s;function s(a){return a===40?(n++,e.consume(a),s):a===41&&i<n?l(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(xw,t,l)(a):a===null||Ge(a)||ai(a)?t(a):(e.consume(a),s)}function l(a){return a===41&&i++,e.consume(a),s}}function k2(e,t,n){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),l):c===93?(e.consume(c),s):c===60||c===null||Ge(c)||ai(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||Ge(c)||ai(c)?t(c):i(c)}function l(c){return Ft(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),i):Ft(c)?(e.consume(c),a):n(c)}}function S2(e,t,n){return i;function i(l){return e.consume(l),s}function s(l){return jt(l)?n(l):t(l)}}function Sw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ge(e)}function bw(e){return!Ft(e)}function Cw(e){return!(e===47||jf(e))}function jf(e){return e===43||e===45||e===46||e===95||jt(e)}function Vd(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const b2={tokenize:N2,partial:!0};function C2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:R2,continuation:{tokenize:A2},exit:M2}},text:{91:{name:"gfmFootnoteCall",tokenize:P2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:E2,resolveTo:T2}}}}function E2(e,t,n){const i=this;let s=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;s--;){const d=i.events[s][1];if(d.type==="labelImage"){a=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!a||!a._balanced)return n(d);const h=Mn(i.sliceSerialize({start:a.end,end:i.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function T2(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function P2(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,a;return c;function c(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(l>999||p===93&&!a||p===null||p===91||Ge(p))return n(p);if(p===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(Mn(i.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Ge(p)||(a=!0),l++,e.consume(p),p===92?m:h}function m(p){return p===91||p===92||p===93?(e.consume(p),l++,h):h(p)}}function R2(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,a=0,c;return d;function d(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(k)}function m(k){if(a>999||k===93&&!c||k===null||k===91||Ge(k))return n(k);if(k===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return l=Mn(i.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Ge(k)||(c=!0),a++,e.consume(k),k===92?p:m}function p(k){return k===91||k===92||k===93?(e.consume(k),a++,m):m(k)}function y(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(l)||s.push(l),ze(e,w,"gfmFootnoteDefinitionWhitespace")):n(k)}function w(k){return t(k)}}function A2(e,t,n){return e.check(bs,t,e.attempt(b2,t,n))}function M2(e){e.exit("gfmFootnoteDefinition")}function N2(e,t,n){const i=this;return ze(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(l):n(l)}}function j2(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(a,c){let d=-1;for(;++d<a.length;)if(a[d][0]==="enter"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._close){let h=d;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[d][1].end.offset-a[d][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[d][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[d][1].end)},p={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[d][1].start)},y=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",p,c]],w=c.parser.constructs.insideSpan.null;w&&sn(y,y.length,0,_l(w,a.slice(h+1,d),c)),sn(y,y.length,0,[["exit",p,c],["enter",a[d][1],c],["exit",a[d][1],c],["exit",m,c]]),sn(a,h-1,d-h+3,y),d=h+y.length-2;break}}for(d=-1;++d<a.length;)a[d][1].type==="strikethroughSequenceTemporary"&&(a[d][1].type="data");return a}function l(a,c,d){const h=this.previous,m=this.events;let p=0;return y;function y(k){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(k):(a.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const C=Xi(h);if(k===126)return p>1?d(k):(a.consume(k),p++,w);if(p<2&&!n)return d(k);const T=a.exit("strikethroughSequenceTemporary"),E=Xi(k);return T._open=!E||E===2&&!!C,T._close=!C||C===2&&!!E,c(k)}}}class D2{constructor(){this.map=[]}add(t,n,i){I2(this,t,n,i)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let s=i.pop();for(;s;){for(const l of s)t.push(l);s=i.pop()}this.map.length=0}}function I2(e,t,n,i){let s=0;if(!(n===0&&i.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...i);return}s+=1}e.map.push([t,n,i])}}function _2(e,t){let n=!1;const i=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function L2(){return{flow:{null:{name:"table",tokenize:O2,resolveAll:F2}}}}function O2(e,t,n){const i=this;let s=0,l=0,a;return c;function c(j){let G=i.events.length-1;for(;G>-1;){const ie=i.events[G][1].type;if(ie==="lineEnding"||ie==="linePrefix")G--;else break}const V=G>-1?i.events[G][1].type:null,fe=V==="tableHead"||V==="tableRow"?D:d;return fe===D&&i.parser.lazy[i.now().line]?n(j):fe(j)}function d(j){return e.enter("tableHead"),e.enter("tableRow"),h(j)}function h(j){return j===124||(a=!0,l+=1),m(j)}function m(j){return j===null?n(j):Me(j)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),w):n(j):Oe(j)?ze(e,m,"whitespace")(j):(l+=1,a&&(a=!1,s+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),p(j)))}function p(j){return j===null||j===124||Ge(j)?(e.exit("data"),m(j)):(e.consume(j),j===92?y:p)}function y(j){return j===92||j===124?(e.consume(j),p):p(j)}function w(j){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(j):(e.enter("tableDelimiterRow"),a=!1,Oe(j)?ze(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):k(j))}function k(j){return j===45||j===58?T(j):j===124?(a=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),C):U(j)}function C(j){return Oe(j)?ze(e,T,"whitespace")(j):T(j)}function T(j){return j===58?(l+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),E):j===45?(l+=1,E(j)):j===null||Me(j)?L(j):U(j)}function E(j){return j===45?(e.enter("tableDelimiterFiller"),M(j)):U(j)}function M(j){return j===45?(e.consume(j),M):j===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(j))}function A(j){return Oe(j)?ze(e,L,"whitespace")(j):L(j)}function L(j){return j===124?k(j):j===null||Me(j)?!a||s!==l?U(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):U(j)}function U(j){return n(j)}function D(j){return e.enter("tableRow"),Y(j)}function Y(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),Y):j===null||Me(j)?(e.exit("tableRow"),t(j)):Oe(j)?ze(e,Y,"whitespace")(j):(e.enter("data"),W(j))}function W(j){return j===null||j===124||Ge(j)?(e.exit("data"),Y(j)):(e.consume(j),j===92?X:W)}function X(j){return j===92||j===124?(e.consume(j),W):W(j)}}function F2(e,t){let n=-1,i=!0,s=0,l=[0,0,0,0],a=[0,0,0,0],c=!1,d=0,h,m,p;const y=new D2;for(;++n<e.length;){const w=e[n],k=w[1];w[0]==="enter"?k.type==="tableHead"?(c=!1,d!==0&&(hy(y,t,d,h,m),m=void 0,d=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,p=void 0,l=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",m,t]])),s=k.type==="tableDelimiterRow"?2:m?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,a[2]===0&&(l[1]!==0&&(a[0]=a[1],p=Va(y,t,l,s,void 0,p),l=[0,0,0,0]),a[2]=n)):k.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(a[0]=a[1],p=Va(y,t,l,s,void 0,p)),l=a,a=[l[1],n,0,0])):k.type==="tableHead"?(c=!0,d=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(d=n,l[1]!==0?(a[0]=a[1],p=Va(y,t,l,s,n,p)):a[1]!==0&&(p=Va(y,t,a,s,n,p)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(a[3]=n)}for(d!==0&&hy(y,t,d,h,m),y.consume(t.events),n=-1;++n<t.events.length;){const w=t.events[n];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=_2(t.events,n))}return e}function Va(e,t,n,i,s,l){const a=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(l.end=Object.assign({},Vi(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const d=Vi(t.events,n[1]);if(l={type:a,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=Vi(t.events,n[2]),m=Vi(t.events,n[3]),p={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),i!==2){const y=t.events[n[2]],w=t.events[n[3]];if(y[1].end=Object.assign({},w[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,C=n[3]-n[2]-1;e.add(k,C,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(l.end=Object.assign({},Vi(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function hy(e,t,n,i,s){const l=[],a=Vi(t.events,n);s&&(s.end=Object.assign({},a),l.push(["exit",s,t])),i.end=Object.assign({},a),l.push(["exit",i,t]),e.add(n+1,0,l)}function Vi(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const z2={name:"tasklistCheck",tokenize:B2};function V2(){return{text:{91:z2}}}function B2(e,t,n){const i=this;return s;function s(d){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),l)}function l(d){return Ge(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),a):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),a):n(d)}function a(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Me(d)?t(d):Oe(d)?e.check({tokenize:$2},t,n)(d):n(d)}}function $2(e,t,n){return ze(e,i,"whitespace");function i(s){return s===null?n(s):t(s)}}function Ew(e){return iw([p2(),C2(),j2(e),L2(),V2()])}function Tw(e){return typeof e=="string"&&/\.md$/i.test(e.trim())}function U2(e,t){const n=String(e??"").trim().split(/\r?\n/).map(s=>`> ${s}`).join(`
248
+ `),i=String(t??"").trim();return n&&i?`${n}
249
+
250
+ ${i}`:n||i}function W2(e){const t=String(e??""),n=t.lastIndexOf(".");return`${n>0?t.slice(0,n):t}_review.md`}function H2(e,t,n){const i=String(e??""),s=String(t??""),l=Math.max(0,Number(n)||0);if(!s)return 0;let a=0,c=0;for(;c<=i.length;){const d=i.indexOf(s,c);if(d<0||d>=l)return a;a+=1,c=d+Math.max(s.length,1)}return a}function K2(e){return(String(e??"").match(/https?:\/\/[^\s<>()\[\]{}"']+/gi)??[]).map(n=>n.replace(/[.,!?;:]+$/,""))}function Df(e){return e?.kind!=="file"?null:String(e.mime??"").toLowerCase().startsWith("image/")?"photo":"file"}function q2(e){const t=i=>{const s=Date.parse(String(i??""));return Number.isFinite(s)?s:0},n=new Map;for(const i of e??[]){const s=String(i?.message?.filename||"file"),l=n.get(s)??[];l.push(i),n.set(s,l)}return[...n.entries()].map(([i,s])=>({filename:i,versions:s.sort((l,a)=>t(a.message?.date)-t(l.message?.date))})).sort((i,s)=>t(s.versions[0]?.message?.date)-t(i.versions[0]?.message?.date))}const X2=new Set(["delete","emphasis","inlineCode","link","linkReference","strong"]);function Y2(e){const t=mw(e,{extensions:[Ew()],mdastExtensions:[rw()]}),n=[],i=[],s=[],l=(c,d)=>{const h=String(c??""),m=d.position?.start?.offset,p=d.position?.end?.offset;if(!h||!Number.isInteger(m)||!Number.isInteger(p))return;const y=e.slice(m,p),w=y.indexOf(h);if(w>=0){for(let C=0;C<h.length;C+=1)n.push(h[C]),i.push(m+w+C+1);return}let k=0;for(const C of h){const T=y.indexOf(C,k),E=T>=0?T:Math.min(k,Math.max(y.length-1,0));n.push(C),i.push(m+E+1),k=E+1}},a=c=>{const d=n.length;if(c.type==="text"||c.type==="inlineCode"||c.type==="code")l(c.value,c);else for(const p of c.children??[])a(p);const h=n.length,m=c.position?.end?.offset;h>d&&X2.has(c.type)&&Number.isInteger(m)&&s.push({visibleEnd:h,rawEnd:m})};return a(t),{text:n.join(""),rawEnds:i,trailingRanges:s}}function G2(e,t,n){let i=-1,s=0;for(let l=0;l<=n;l+=1){if(i=e.indexOf(t,s),i<0)return-1;s=i+Math.max(t.length,1)}return i}function Q2(e,t){const n=String(e??""),i=Y2(n),s=new Map,l=[];for(const[d,h]of(t??[]).entries()){const m=String(h?.selection??"").trim(),p=String(h?.comment??"").trim().replace(/\s+/g," ").replace(/\]\]/g,"] ]");if(!p)continue;const y=`[[REVIEW COMMENT ${d+1}: ${p}]]`,w=Number.isInteger(h?.occurrence)&&h.occurrence>=0?h.occurrence:0,k=m?G2(i.text,m,w):-1,C=k+m.length;let T=k>=0?i.rawEnds[C-1]:void 0;if(!Number.isInteger(T)){l.push(`[[REVIEW COMMENT ${d+1} — ANCHOR NOT FOUND: ${p}]]`);continue}for(const M of i.trailingRanges)M.visibleEnd===C&&(T=Math.max(T,M.rawEnd));const E=s.get(T)??[];E.push(y),s.set(T,E)}let a=n;const c=[...s.keys()].sort((d,h)=>h-d);for(const d of c)a=`${a.slice(0,d)} ${s.get(d).join(" ")}${a.slice(d)}`;return l.length>0&&(a=`${a.trimEnd()}
251
+
252
+ ${l.join(`
253
+ `)}
254
+ `),a}const Z2=["default-src 'none'","script-src 'none'","connect-src 'none'","frame-src 'none'","child-src 'none'","object-src 'none'","worker-src 'none'","manifest-src 'none'","form-action 'none'","base-uri 'none'","img-src data: blob:","media-src data: blob:","font-src data:","style-src 'unsafe-inline'"].join("; "),J2="",eA="application/octet-stream",tA=/\.([A-Za-z0-9]{1,12})$/;function Pw(e){return String(e??"").split(";")[0].trim().toLowerCase()}function Rw(e){const t=tA.exec(String(e??"").trim());return t?t[1].toLowerCase():""}function nA(e){const t=Rw(e);return t==="html"||t==="htm"}function Ll(e,t){return nA(e)?!0:Rw(e)?!1:Pw(t)==="text/html"}function Bd(e,t){const n=Pw(e);return n==="text/html"||Ll(t,e)?eA:n}const rA=[":root{color-scheme:light}","html{background:#fff}","body{margin:0;padding:24px;color:#0f172a;font:15px/1.65 ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;overflow-wrap:break-word}","img,video,svg,canvas,iframe{max-width:100%;height:auto}","pre{overflow:auto}","table{max-width:100%}"].join("");function iA(e){return["<!doctype html>","<html>","<head>",`<meta http-equiv="Content-Security-Policy" content="${Z2}">`,'<meta charset="utf-8">','<meta name="referrer" content="no-referrer">','<meta name="viewport" content="width=device-width, initial-scale=1">',`<style>${rA}</style>`,"</head>","<body>",String(e??""),"</body>","</html>"].join(`
255
+ `)}const If=48e3,oA=Object.freeze([{rec:"audio/webm;codecs=opus",base:"audio/webm",ext:"webm"},{rec:"audio/ogg;codecs=opus",base:"audio/ogg",ext:"ogg"},{rec:"audio/webm",base:"audio/webm",ext:"webm"},{rec:"audio/mp4",base:"audio/mp4",ext:"m4a"}]),Aw="x-ours-duration",sA=4e3;function aA(e){return!Number.isFinite(e)||e<=0?null:String(Math.round(e*100)/100)}function lA(e,t){const n=t===null?null:aA(t);return n===null?e:`${e};${Aw}=${n}`}function uA(e){if(!e)return null;const t=new RegExp(`${Aw}\\s*=\\s*([0-9]*\\.?[0-9]+)`,"i").exec(e);if(!t)return null;const n=Number(t[1]);return Number.isFinite(n)&&n>0?n:null}function cA(e,t=sA){return typeof Audio!="function"||typeof URL?.createObjectURL!="function"?Promise.resolve(null):new Promise(n=>{const i=URL.createObjectURL(e),s=new Audio;let l=!1;const a=d=>{l||(l=!0,clearTimeout(c),s.removeAttribute("src"),s.load(),URL.revokeObjectURL(i),n(Number.isFinite(d)&&(d??0)>0?d:null))},c=setTimeout(()=>a(null),t);s.addEventListener("loadedmetadata",()=>{Number.isFinite(s.duration)&&s.duration>0?a(s.duration):s.currentTime=Number.MAX_SAFE_INTEGER},{once:!0}),s.addEventListener("durationchange",()=>{Number.isFinite(s.duration)&&s.duration>0&&a(s.duration)}),s.addEventListener("error",()=>a(null),{once:!0}),s.preload="metadata",s.src=i})}const Mw=40,fA=44,Nw=.14,dA=.5,hA=e=>e<0?0:e>1?1:e;function jw(e,{floor:t=Nw,gamma:n=dA}={}){const i=Math.pow(hA(Number.isFinite(e)?e:0),n);return t+(1-t)*i}function pA(e,t=Mw){const n=Math.max(1,Math.floor(t)),i=new Array(n).fill(0);if(!e||e.length===0)return i;const s=e.length/n;for(let l=0;l<n;l++){const a=Math.floor(l*s),c=Math.min(e.length,Math.max(a+1,Math.floor((l+1)*s)));let d=0;for(let h=a;h<c;h++)d+=e[h]*e[h];i[l]=Math.sqrt(d/(c-a))}return i}function mA(e,t={}){const{silenceFloor:n=1e-4}=t,i=e.reduce((s,l)=>l>s?l:s,0);return i>n?e.map(s=>jw(s/i,t)):e.map(()=>Nw)}function gA({decay:e=.995,minReference:t=.02}={}){let n=t;return{push(i){const s=Number.isFinite(i)&&i>0?i:0;return n=Math.max(t,n*e,s),jw(s/n)},get reference(){return n}}}function Dw(e){return Bd(e.mime,e.filename)}function $d(e){const[t,n]=S.useState({url:null,size:0,loaded:!1});return S.useEffect(()=>{let i=null,s=!1;n({url:null,size:0,loaded:!1});const l=e.available?EE(e.id):null;return l?(n({url:l,size:e.size,loaded:!0}),()=>{}):(Nl(e.id).then(a=>{if(s)return;if(!a){n({url:null,size:0,loaded:!0});return}const c=URL.createObjectURL(new Blob([a],{type:Dw(e)}));i=c,n({url:c,size:a.byteLength,loaded:!0})}),()=>{s=!0,i&&URL.revokeObjectURL(i)})},[e.id,e.available]),t}function Ud({label:e}){return v.jsxs("div",{className:"file-offdevice",children:[v.jsx("div",{className:"file-offdevice-ic",children:v.jsx(Se,{name:"inbox",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e,children:e}),v.jsx("div",{className:"filecard-sub",children:"Available on your original device"})]})]})}function yA(e){const t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function py({rec:e}){if(!e.transcription)return null;const t=e.transcription.text?.trim();return v.jsx("div",{className:"voice-transcript",children:t||`Transcription ${e.transcription.status??"unavailable"}${e.transcription.error_category?` · ${e.transcription.error_category}`:""}`})}function vA({rec:e,receipt:t,receiptless:n,onPreview:i,onFetch:s}){const l=e.dir==="out",a=`bubble file-bubble${l?" me":""}`,c=qi(e.mime,e.filename)?"Voice message":"File",d=v.jsxs("div",{className:"bubble-at",children:[yA(e.date),l&&v.jsx(Ox,{receipt:t,content:c,receiptless:n})]});return e.mime.startsWith("image/")?v.jsx(xA,{rec:e,cls:a,footer:d,onFetch:s}):qi(e.mime,e.filename)?v.jsx(wA,{rec:e,cls:a,footer:d,onFetch:s}):v.jsx(kA,{rec:e,cls:a,footer:d,onPreview:i,onFetch:s})}function Wd({rec:e,onFetch:t}){const[n,i]=S.useState(!1),[s,l]=S.useState(!1);return v.jsxs("div",{className:"file-offdevice",children:[v.jsx("div",{className:"file-offdevice-ic",children:v.jsx(Se,{name:"inbox",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e.filename,children:qi(e.mime,e.filename)?"Voice message":e.filename}),v.jsx("div",{className:"filecard-sub",children:s?"Could not fetch media":"Available after explicit fetch"})]}),v.jsx("button",{className:"btn sm",disabled:n,onClick:()=>{i(!0),l(!1),(t?.(e.id)??RE(e.id)).catch(()=>l(!0)).finally(()=>i(!1))},children:n?"Fetching…":"Fetch"})]})}function xA({rec:e,cls:t,footer:n,onFetch:i}){const{url:s,loaded:l}=$d(e);return l&&!s?v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(Wd,{rec:e,onFetch:i}):v.jsx(Ud,{label:e.filename&&e.filename!=="file"?e.filename:"Photo"}),n]}):v.jsxs("div",{className:t+" image-bubble",children:[s?v.jsx("a",{href:s,target:"_blank",rel:"noreferrer",title:e.filename,children:v.jsx("img",{src:s,alt:e.filename})}):v.jsx("div",{className:"file-loading",children:"loading…"}),n]})}function wA({rec:e,cls:t,footer:n,onFetch:i}){const{url:s,loaded:l}=$d(e),a=S.useRef(null),c=S.useRef(null),[d,h]=S.useState(!1),[m,p]=S.useState(0),[y,w]=S.useState(()=>uA(e.mime)),[k,C]=S.useState(!1),[T,E]=S.useState(null);if(S.useEffect(()=>{if(!s)return;let W=!1;const X=typeof window>"u"?void 0:window.AudioContext||window.webkitAudioContext;if(!X)return;const j=new X,G=()=>{try{j.close()?.catch?.(()=>{})}catch{}};return(async()=>{try{const V=await fetch(s).then(ie=>ie.arrayBuffer()),fe=await j.decodeAudioData(V);if(W)return;E(mA(pA(fe.getChannelData(0),Mw)))}catch{}finally{G()}})(),()=>{W=!0,G()}},[s]),l&&!s)return v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(Wd,{rec:e,onFetch:i}):v.jsx(Ud,{label:"Voice message"}),n,v.jsx(py,{rec:e})]});const M=()=>{const W=a.current;W&&(d?W.pause():W.play())},A=W=>{const X=c.current;if(!X)return 0;const j=X.getBoundingClientRect();return Math.max(0,Math.min(1,(W-j.left)/j.width))},L=W=>{const X=a.current;p(W),X&&y&&isFinite(y)&&(X.currentTime=W*y)},U=W=>{s&&(W.currentTarget.setPointerCapture?.(W.pointerId),C(!0),L(A(W.clientX)))},D=W=>{k&&L(A(W.clientX))},Y=W=>{k&&(W.currentTarget.releasePointerCapture?.(W.pointerId),C(!1))};return v.jsxs("div",{className:t+" voice-bubble",children:[v.jsx("button",{className:"voice-play",onClick:M,disabled:!s,title:d?"Pause":"Play",children:v.jsx(Se,{name:d?"pause":"play",size:14})}),v.jsxs("div",{className:"voice-track"+(s?" seekable":"")+(k?" scrubbing":"")+(T?" has-wave":""),ref:c,onPointerDown:U,onPointerMove:D,onPointerUp:Y,onPointerCancel:Y,role:s?"slider":void 0,"aria-label":s?"Seek":void 0,"aria-valuenow":Math.round(m*100),children:[T?v.jsx("div",{className:"voice-wave","aria-hidden":!0,children:T.map((W,X)=>v.jsx("span",{className:"voice-wave-bar"+(X/T.length<m?" played":""),style:{height:`${Math.round(W*100)}%`}},X))}):v.jsx("div",{className:"voice-track-fill",style:{width:`${m*100}%`}}),s&&v.jsx("span",{className:"voice-track-knob",style:{left:`${m*100}%`}})]}),v.jsx("span",{className:"voice-dur mono",children:y!==null?`${Math.floor(y/60)}:${String(Math.floor(y%60)).padStart(2,"0")}`:"·:··"}),s&&v.jsx("audio",{ref:a,src:s,onPlay:()=>h(!0),onPause:()=>h(!1),onEnded:()=>{h(!1),p(0)},onTimeUpdate:W=>{const X=W.currentTarget;!k&&X.duration>0&&isFinite(X.duration)&&p(X.currentTime/X.duration)},onLoadedMetadata:W=>{const X=W.currentTarget.duration;isFinite(X)&&X>0&&w(X)}}),n,v.jsx(py,{rec:e})]})}function kA({rec:e,cls:t,footer:n,onPreview:i,onFetch:s}){const{url:l,size:a,loaded:c}=$d(e);return c&&!l?v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(Wd,{rec:e,onFetch:s}):v.jsx(Ud,{label:e.filename}),n]}):v.jsxs("div",{className:t+" filecard-bubble",children:[v.jsxs("div",{className:"filecard",children:[v.jsx("div",{className:"filecard-ic",children:v.jsx(Se,{name:"copy",size:18})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e.filename,children:e.filename}),v.jsx("div",{className:"filecard-sub",children:a?Ar(a):e.size?Ar(e.size):""})]}),Tw(e.filename)&&l&&i&&v.jsx("button",{className:"icon-btn",onClick:()=>i(e),title:"Preview markdown",children:v.jsx(Se,{name:"monitor",size:16})}),Ll(e.filename,e.mime)&&l&&i&&v.jsx("button",{className:"icon-btn",onClick:()=>i(e),title:"Preview HTML",children:v.jsx(Se,{name:"monitor",size:16})}),v.jsx("a",{className:"icon-btn"+(l?"":" disabled"),href:l??void 0,download:e.filename,title:"Download",children:v.jsx(Se,{name:"download",size:16})})]}),n]})}function Iw(e){const{att:t}=e,[n,i]=S.useState(null);return S.useEffect(()=>{const s=Dw({mime:t.mime,filename:t.filename}),l=URL.createObjectURL(new Blob([t.bytes],{type:s}));return i(l),()=>URL.revokeObjectURL(l)},[t]),v.jsxs("div",{className:"attach-preview",children:[t.mime.startsWith("image/")&&n?v.jsx("img",{className:"attach-thumb",src:n,alt:t.filename}):t.voice&&n?v.jsx("audio",{className:"attach-audio",src:n,controls:!0}):v.jsx("div",{className:"filecard-ic",children:v.jsx(Se,{name:"copy",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:t.filename,children:t.voice?"Voice message":t.filename}),v.jsxs("div",{className:"filecard-sub",children:[Ar(t.bytes.length),t.originalSize&&t.originalSize>t.bytes.length?` · optimized from ${Ar(t.originalSize)}`:""]})]}),v.jsx("button",{className:"btn primary sm",disabled:e.sending,onClick:e.onSend,children:e.sending?"Sending…":"Send"}),v.jsx("button",{className:"icon-btn",title:"Discard",disabled:e.sending,onClick:e.onDiscard,children:v.jsx(Se,{name:"close"})})]})}const SA={channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},bA=e=>`${Math.floor(e/60)}:${String(Math.floor(e%60)).padStart(2,"0")}`,my=84,gy=120,CA=550,EA=Math.floor(Qo/(If/8)),TA=Math.min(300,EA),PA=fA;function _w(e){const[t,n]=S.useState("idle"),[i,s]=S.useState(0),[l,a]=S.useState([]),[c,d]=S.useState(0),[h,m]=S.useState(0),p=S.useRef("idle"),y=S.useRef(null),w=S.useRef(null),k=S.useRef([]),C=S.useRef("webm"),T=S.useRef("audio/webm"),E=S.useRef(!1),M=S.useRef({x:0,y:0}),A=S.useRef(0),L=S.useRef(!1),U=S.useRef(null),D=S.useRef(null),Y=S.useRef(null),W=S.useRef(e.onReady),X=S.useRef(e.onError),j=S.useRef(e.onActiveChange);W.current=e.onReady,X.current=e.onError,j.current=e.onActiveChange;const G=Z=>{p.current=Z,n(Z),j.current?.(Z==="recording"||Z==="locked"||Z==="arming")},V=()=>{D.current!=null&&cancelAnimationFrame(D.current),D.current=null,Y.current&&clearInterval(Y.current),Y.current=null,U.current?.close().catch(()=>{}),U.current=null,w.current?.getTracks().forEach(Z=>Z.stop()),w.current=null},fe=()=>{window.removeEventListener("pointermove",Te),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",q)},ie=Z=>{E.current=Z;const de=y.current;de&&de.state!=="inactive"?de.stop():ee(),fe()},ee=()=>{V(),G("idle"),s(0),a([]),d(0),m(0)},ve=()=>{p.current==="recording"&&(fe(),m(0),G("locked"))};function Te(Z){if(p.current!=="recording")return;const de=M.current.y-Z.clientY,re=M.current.x-Z.clientX,Ee=Math.max(0,Math.min(1,de/my)),ge=Math.max(0,Math.min(1,re/gy));d(Ee),m(ge),de>=my?ve():re>=gy&&ie(!0)}function q(){if(p.current==="arming"){L.current=!0,fe();return}if(p.current!=="recording")return;const Z=Date.now()-A.current<CA;ie(Z)}const ue=Z=>{e.disabled||p.current!=="idle"||(Z.preventDefault(),M.current={x:Z.clientX,y:Z.clientY},L.current=!1,E.current=!1,k.current=[],d(0),m(0),G("arming"),window.addEventListener("pointermove",Te),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",q),P())};async function P(){let Z;try{Z=await navigator.mediaDevices.getUserMedia({audio:SA})}catch{X.current("Microphone unavailable — check the browser permission."),fe(),G("idle");return}if(L.current||p.current==="idle"){Z.getTracks().forEach(Ee=>Ee.stop()),G("idle");return}w.current=Z;const de=oA.find(Ee=>typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported(Ee.rec));C.current=de?.ext??"webm",T.current=de?.base??"audio/webm";const re=de?new MediaRecorder(Z,{mimeType:de.rec,audioBitsPerSecond:If}):new MediaRecorder(Z,{audioBitsPerSecond:If});y.current=re,re.ondataavailable=Ee=>{Ee.data.size>0&&k.current.push(Ee.data)},re.onstop=()=>{if(E.current){ee();return}const ge=new Blob(k.current,{type:T.current});Promise.all([ge.arrayBuffer(),cA(ge)]).then(([xe,_e])=>{if(ee(),xe.byteLength===0)return;const We=new Date().toISOString().replace(/[-:]/g,"").replace(/\..+/,"").replace("T","-");W.current({filename:`${_x}${We}.${C.current}`,mime:lA(TE(T.current),_e),bytes:new Uint8Array(xe),voice:!0})})},re.start(),A.current=Date.now(),G("recording"),s(0),Y.current=setInterval(()=>{s(Ee=>{const ge=Ee+1;return ge>=TA&&ie(!1),ge})},1e3),_(Z)}function _(Z){try{const de=window.AudioContext||window.webkitAudioContext,re=new de;U.current=re;const Ee=re.createMediaStreamSource(Z),ge=re.createAnalyser();ge.fftSize=256,Ee.connect(ge);const xe=new Uint8Array(ge.fftSize),_e=gA();let We=0;const Pt=ct=>{if(D.current=requestAnimationFrame(Pt),ct-We<80)return;We=ct,ge.getByteTimeDomainData(xe);let $t=0;for(let ft=0;ft<xe.length;ft++){const It=(xe[ft]-128)/128;$t+=It*It}const ln=Math.sqrt($t/xe.length),St=_e.push(ln);a(ft=>{const It=ft.length>=PA?ft.slice(1):ft.slice();return It.push(St),It})};D.current=requestAnimationFrame(Pt)}catch{}}S.useEffect(()=>()=>{E.current=!0,y.current?.stop(),fe(),V()},[]);const Q=t==="recording"||t==="locked"||t==="arming",R=v.jsx("div",{className:"vr-wave","aria-hidden":!0,children:l.map((Z,de)=>v.jsx("span",{className:"vr-bar",style:{height:`${Math.round(Z*100)}%`}},de))});return v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"icon-btn composer-tool vr-mic",title:"Hold to record a voice message",disabled:e.disabled,onPointerDown:ue,onContextMenu:Z=>Z.preventDefault(),children:v.jsx(Se,{name:"mic",size:18})}),Q&&v.jsxs("div",{className:"voice-rec-overlay","data-mode":t,children:[t==="recording"&&v.jsxs("div",{className:"vr-lock",style:{"--p":c},"aria-hidden":!0,children:[v.jsx(Se,{name:"lock",size:13}),v.jsx(Se,{name:"chevronDown",size:12})]}),v.jsx("span",{className:"voice-rec-dot"}),v.jsx("span",{className:"vr-time mono",children:bA(i)}),t==="locked"?v.jsxs(v.Fragment,{children:[R,v.jsx("button",{className:"icon-btn vr-trash",title:"Cancel",onClick:()=>ie(!0),children:v.jsx(Se,{name:"trash",size:16})}),v.jsxs("button",{className:"btn primary sm vr-stop",onClick:()=>ie(!1),children:[v.jsx(Se,{name:"check",size:13}),"Stop"]})]}):v.jsxs("div",{className:"vr-slide",style:{opacity:1-h},children:[R,v.jsx("span",{className:"vr-hint",children:"‹ slide to cancel · slide up to lock"})]})]})]})}const RA="modulepreload",AA=function(e){return"/"+e},yy={},Hd=function(t,n,i){let s=Promise.resolve();if(n&&n.length>0){let a=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");s=a(n.map(h=>{if(h=AA(h),h in yy)return;yy[h]=!0;const m=h.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const y=document.createElement("link");if(y.rel=m?"stylesheet":RA,m||(y.as="script"),y.crossOrigin="",y.href=h,d&&y.setAttribute("nonce",d),document.head.appendChild(y),m)return new Promise((w,k)=>{y.addEventListener("load",w),y.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return s.then(a=>{for(const c of a||[])c.status==="rejected"&&l(c.reason);return t().catch(l)})};var MA=Object.defineProperty,Ji=(e,t)=>MA(e,"name",{value:t,configurable:!0}),Lw=!!(typeof window<"u"&&window.document&&window.document.createElement);function Rr(e,t,{checkForDefaultPrevented:n=!0}={}){return Ji(function(s){if(e?.(s),n===!1||!s||!s.defaultPrevented)return t?.(s)},"handleEvent")}Ji(Rr,"composeEventHandlers");function NA(e){if(!Lw)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Ji(NA,"getOwnerWindow");function _f(e){if(!Lw)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Ji(_f,"getOwnerDocument");function Ow(e,t=!1){const{activeElement:n}=_f(e);if(!n?.nodeName)return null;if(Fw(n)&&n.contentDocument)return Ow(n.contentDocument.body,t);if(t){const i=n.getAttribute("aria-activedescendant");if(i){const s=_f(n).getElementById(i);if(s)return s}}return n}Ji(Ow,"getActiveElement");function Fw(e){return e.tagName==="IFRAME"}Ji(Fw,"isFrame");var jA=Object.defineProperty,Kd=(e,t)=>jA(e,"name",{value:t,configurable:!0});function Lf(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Kd(Lf,"setRef");function zw(...e){return t=>{let n=!1;const i=e.map(s=>{const l=Lf(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():Lf(e[s],null)}}}}Kd(zw,"composeRefs");function eo(...e){return S.useCallback(zw(...e),e)}Kd(eo,"useComposedRefs");var DA=Object.defineProperty,gn=(e,t)=>DA(e,"name",{value:t,configurable:!0});function IA(e,t){const n=S.createContext(t);n.displayName=e+"Context";const i=gn(l=>{const{children:a,...c}=l,d=S.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:d,children:a})},"Provider");i.displayName=e+"Provider";function s(l,a={}){const{optional:c=!1}=a,d=S.useContext(n);if(d)return d;if(t!==void 0)return t;if(!c)throw new Error(`\`${l}\` must be used within \`${e}\``)}return gn(s,"useContext"),[i,s]}gn(IA,"createContext");function Vw(e,t=[]){let n=[];function i(l,a){const c=S.createContext(a);c.displayName=l+"Context";const d=n.length;n=[...n,a];const h=gn(p=>{const{scope:y,children:w,...k}=p,C=y?.[e]?.[d]||c,T=S.useMemo(()=>k,Object.values(k));return v.jsx(C.Provider,{value:T,children:w})},"Provider");h.displayName=l+"Provider";function m(p,y,w={}){const{optional:k=!1}=w,C=y?.[e]?.[d]||c,T=S.useContext(C);if(T)return T;if(a!==void 0)return a;if(!k)throw new Error(`\`${p}\` must be used within \`${l}\``)}return gn(m,"useContext"),[h,m]}gn(i,"createContext");const s=gn(()=>{const l=n.map(a=>S.createContext(a));return gn(function(c){const d=c?.[e]||l;return S.useMemo(()=>({[`__scope${e}`]:{...c,[e]:d}}),[c,d])},"useScope")},"createScope");return s.scopeName=e,[i,Bw(s,...t)]}gn(Vw,"createContextScope");function Bw(...e){const t=e[0];if(e.length===1)return t;const n=gn(()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return gn(function(l){const a=i.reduce((c,{useScope:d,scopeName:h})=>{const p=d(l)[`__scope${h}`];return{...c,...p}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}gn(Bw,"composeContextScopes");var Mr=globalThis?.document?S.useLayoutEffect:()=>{},_A=Object.defineProperty,LA=(e,t)=>_A(e,"name",{value:t,configurable:!0}),OA=ks[" useId ".trim().toString()]||(()=>{}),FA=0;function nl(e){const[t,n]=S.useState(OA());return Mr(()=>{e||n(i=>i??String(FA++))},[e]),e||(t?`radix-${t}`:"")}LA(nl,"useId");var zA=Object.defineProperty,VA=(e,t)=>zA(e,"name",{value:t,configurable:!0}),vy=ks[" useEffectEvent ".trim().toString()],xy=ks[" useInsertionEffect ".trim().toString()];function $w(e){if(typeof vy=="function")return vy(e);const t=S.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof xy=="function"?xy(()=>{t.current=e}):Mr(()=>{t.current=e}),S.useMemo(()=>(...n)=>t.current?.(...n),[])}VA($w,"useEffectEvent");var BA=Object.defineProperty,Cs=(e,t)=>BA(e,"name",{value:t,configurable:!0}),$A=ks[" useInsertionEffect ".trim().toString()]||Mr;function Uw({prop:e,defaultProp:t,onChange:n=Cs(()=>{},"onChange"),caller:i}){const[s,l,a]=Ww({defaultProp:t,onChange:n}),c=e!==void 0,d=c?e:s,h=S.useCallback(m=>{if(c){const p=Hw(m)?m(e):m;p!==e&&a.current?.(p)}else l(m)},[c,e,l,a]);return[d,h]}Cs(Uw,"useControllableState");function Ww({defaultProp:e,onChange:t}){const[n,i]=S.useState(e),s=S.useRef(n),l=S.useRef(t);return $A(()=>{l.current=t},[t]),S.useEffect(()=>{s.current!==n&&(l.current?.(n),s.current=n)},[n,s]),[n,i,l]}Cs(Ww,"useUncontrolledState");function Hw(e){return typeof e=="function"}Cs(Hw,"isFunction");var wy=Symbol("RADIX:SYNC_STATE");function UA(e,t,n,i){const{prop:s,defaultProp:l,onChange:a,caller:c}=t,d=s!==void 0,h=$w(a),m=[{...n,state:l}];i&&m.push(i);const[p,y]=S.useReducer((T,E)=>{if(E.type===wy)return{...T,state:E.state};const M=e(T,E);return d&&!Object.is(M.state,T.state)&&h(M.state),M},...m),w=p.state,k=S.useRef(w);S.useEffect(()=>{k.current!==w&&(k.current=w,d||h(w))},[w,k,d]);const C=S.useMemo(()=>s!==void 0?{...p,state:s}:p,[p,s]);return S.useEffect(()=>{d&&!Object.is(s,p.state)&&y({type:wy,state:s})},[s,p.state,d]),[C,y]}Cs(UA,"useControllableStateReducer");var Kw=Tx(),WA=Object.defineProperty,jn=(e,t)=>WA(e,"name",{value:t,configurable:!0});function qd(e){const t=S.forwardRef((n,i)=>{let{children:s,...l}=n,a=null,c=!1;const d=[];Of(s)&&typeof Ba=="function"&&(s=Ba(s._payload)),S.Children.forEach(s,y=>{if(Gw(y)){c=!0;const w=y;let k="child"in w.props?w.props.child:w.props.children;Of(k)&&typeof Ba=="function"&&(k=Ba(k._payload)),a=KA(w,k),d.push(a?.props?.children)}else d.push(y)}),a?a=S.cloneElement(a,void 0,d):!c&&S.Children.count(s)===1&&S.isValidElement(s)&&(a=s);const h=a?Yw(a):void 0,m=eo(i,h);if(!a){if(s||s===0)throw new Error(c?YA(e):XA(e));return s}const p=Xw(l,a.props??{});return a.type!==S.Fragment&&(p.ref=i?m:h),S.cloneElement(a,p)});return t.displayName=`${e}.Slot`,t}jn(qd,"createSlot");var qw=Symbol.for("radix.slottable");function HA(e){const t=jn(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=qw,t}jn(HA,"createSlottable");var KA=jn((e,t)=>{if("child"in e.props){const n=e.props.child;return S.isValidElement(n)?S.cloneElement(n,void 0,e.props.children(n.props.children)):null}return S.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function Xw(e,t){const n={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?n[i]=(...c)=>{const d=l(...c);return s(...c),d}:s&&(n[i]=s):i==="style"?n[i]={...s,...l}:i==="className"&&(n[i]=[s,l].filter(Boolean).join(" "))}return{...e,...n}}jn(Xw,"mergeProps");function Yw(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}jn(Yw,"getElementRef");function Gw(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qw}jn(Gw,"isSlottable");var qA=Symbol.for("react.lazy");function Of(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===qA&&"_payload"in e&&Qw(e._payload)}jn(Of,"isLazyComponent");function Qw(e){return typeof e=="object"&&e!==null&&"then"in e}jn(Qw,"isPromiseLike");var XA=jn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),YA=jn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Ba=ks[" use ".trim().toString()],GA=Object.defineProperty,QA=(e,t)=>GA(e,"name",{value:t,configurable:!0}),ZA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],li=ZA.reduce((e,t)=>{const n=qd(`Primitive.${t}`),i=S.forwardRef((s,l)=>{const{asChild:a,...c}=s,d=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(d,{...c,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function Zw(e,t){e&&Kw.flushSync(()=>e.dispatchEvent(t))}QA(Zw,"dispatchDiscreteCustomEvent");var JA=Object.defineProperty,eM=(e,t)=>JA(e,"name",{value:t,configurable:!0});function Yi(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>t.current?.(...n),[])}eM(Yi,"useCallbackRef");var tM=Object.defineProperty,kt=(e,t)=>tM(e,"name",{value:t,configurable:!0}),Ff="dismissableLayer.update",nM="dismissableLayer.pointerDownOutside",rM="dismissableLayer.focusOutside",ky,Jw=S.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),iM=S.forwardRef(kt(function(t,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:d,onDismiss:h,...m}=t,p=S.useContext(Jw),[y,w]=S.useState(null),k=y?.ownerDocument??globalThis?.document,[,C]=S.useState({}),T=eo(n,w),E=Array.from(p.layers),[M]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),A=M?E.indexOf(M):-1,L=y?E.indexOf(y):-1,U=p.layersWithOutsidePointerEventsDisabled.size>0,D=L>=A,Y=S.useRef(!1),W=t0(V=>{a?.(V),d?.(V),V.defaultPrevented||h?.()},{ownerDocument:k,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:Y,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:S.useCallback(V=>{if(!(V instanceof Node))return!1;const fe=[...p.branches].some(ie=>ie.contains(V));return D&&!fe},[p.branches,D])}),X=n0(V=>{if(s&&Y.current)return;const fe=V.target;[...p.branches].some(ee=>ee.contains(fe))||(c?.(V),d?.(V),V.defaultPrevented||h?.())},k),j=y?L===E.length-1:!1,G=Yi(V=>{V.key==="Escape"&&(l?.(V),!V.defaultPrevented&&h&&(V.preventDefault(),h()))});return S.useEffect(()=>{if(j)return k.addEventListener("keydown",G,{capture:!0}),()=>k.removeEventListener("keydown",G,{capture:!0})},[k,j,G]),S.useEffect(()=>{if(y)return i&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(ky=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),zf(),()=>{i&&(p.layersWithOutsidePointerEventsDisabled.delete(y),p.layersWithOutsidePointerEventsDisabled.size===0&&(k.body.style.pointerEvents=ky))}},[y,k,i,p]),S.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),zf())},[y,p]),S.useEffect(()=>{const V=kt(()=>C({}),"handleUpdate");return document.addEventListener(Ff,V),()=>document.removeEventListener(Ff,V)},[]),v.jsx(li.div,{...m,ref:T,style:{pointerEvents:U?D?"auto":"none":void 0,...t.style},onFocusCapture:Rr(t.onFocusCapture,X.onFocusCapture),onBlurCapture:Rr(t.onBlurCapture,X.onBlurCapture),onPointerDownCapture:Rr(t.onPointerDownCapture,W.onPointerDownCapture)})},"DismissableLayer"));function e0(){const e=S.useContext(Jw),[t,n]=S.useState(null);return S.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}kt(e0,"useDismissableLayerSurface");var oM=kt(()=>!0,"IS_TRUE");function t0(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:l,shouldHandlePointerDownOutside:a=oM}=t,c=Yi(e),d=S.useRef(!1),h=S.useRef(!1),m=S.useRef(new Map),p=S.useRef(()=>{});return S.useEffect(()=>{function y(){h.current=!1,s.current=!1,m.current.clear()}kt(y,"resetOutsideInteraction");function w(){return Array.from(m.current.values()).some(Boolean)}kt(w,"isOutsideInteractionIntercepted");function k(A){if(!h.current)return;const L=A.target;L instanceof Node&&[...l].some(D=>D.contains(L))||m.current.set(A.type,!0),A.type==="click"&&window.setTimeout(()=>{h.current&&p.current()},0)}kt(k,"handleInteractionCapture");function C(A){h.current&&m.current.set(A.type,!1)}kt(C,"handleInteractionBubble");const T=kt(A=>{if(A.target&&!d.current){let L=function(){n.removeEventListener("click",p.current);const D=w();y(),D||Xd(nM,c,U,{discrete:!0})};if(kt(L,"handleAndDispatchPointerDownOutsideEvent"),!a(A.target)){n.removeEventListener("click",p.current),y(),d.current=!1;return}const U={originalEvent:A};h.current=!0,s.current=i&&A.button===0,m.current.clear(),!i||A.button!==0?L():(n.removeEventListener("click",p.current),p.current=L,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),y();d.current=!1},"handlePointerDown"),E=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const A of E)n.addEventListener(A,k,!0),n.addEventListener(A,C);const M=window.setTimeout(()=>{n.addEventListener("pointerdown",T)},0);return()=>{window.clearTimeout(M),n.removeEventListener("pointerdown",T),n.removeEventListener("click",p.current);for(const A of E)n.removeEventListener(A,k,!0),n.removeEventListener(A,C)}},[n,c,i,s,l,a]),{onPointerDownCapture:kt(()=>d.current=!0,"onPointerDownCapture")}}kt(t0,"usePointerDownOutside");function n0(e,t=globalThis?.document){const n=Yi(e),i=S.useRef(!1);return S.useEffect(()=>{const s=kt(l=>{l.target&&!i.current&&Xd(rM,n,{originalEvent:l},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:kt(()=>i.current=!0,"onFocusCapture"),onBlurCapture:kt(()=>i.current=!1,"onBlurCapture")}}kt(n0,"useFocusOutside");function zf(){const e=new CustomEvent(Ff);document.dispatchEvent(e)}kt(zf,"dispatchUpdate");function Xd(e,t,n,{discrete:i}){const s=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),i?Zw(s,l):s.dispatchEvent(l)}kt(Xd,"handleAndDispatchCustomEvent");var sM=Object.defineProperty,zt=(e,t)=>sM(e,"name",{value:t,configurable:!0}),Vc="focusScope.autoFocusOnMount",Bc="focusScope.autoFocusOnUnmount",Sy={bubbles:!1,cancelable:!0},aM=S.forwardRef(zt(function(t,n){const{loop:i=!1,trapped:s=!1,onMountAutoFocus:l,onUnmountAutoFocus:a,...c}=t,[d,h]=S.useState(null),m=Yi(l),p=Yi(a),y=S.useRef(null),w=eo(n,h),k=S.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;S.useEffect(()=>{if(s){let T=function(L){if(k.paused||!d)return;const U=L.target;d.contains(U)?y.current=U:tr(y.current,{select:!0})},E=function(L){if(k.paused||!d)return;const U=L.relatedTarget;U!==null&&(d.contains(U)||tr(y.current,{select:!0}))},M=function(L){if(document.activeElement===document.body)for(const D of L)D.removedNodes.length>0&&tr(d)};zt(T,"handleFocusIn"),zt(E,"handleFocusOut"),zt(M,"handleMutations"),document.addEventListener("focusin",T),document.addEventListener("focusout",E);const A=new MutationObserver(M);return d&&A.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",T),document.removeEventListener("focusout",E),A.disconnect()}}},[s,d,k.paused]),S.useEffect(()=>{if(d){by.add(k);const T=document.activeElement;if(!d.contains(T)){const M=new CustomEvent(Vc,Sy);d.addEventListener(Vc,m),d.dispatchEvent(M),M.defaultPrevented||(r0(l0(Yd(d)),{select:!0}),document.activeElement===T&&tr(d))}return()=>{d.removeEventListener(Vc,m),setTimeout(()=>{const M=new CustomEvent(Bc,Sy);d.addEventListener(Bc,p),d.dispatchEvent(M),M.defaultPrevented||tr(T??document.body,{select:!0}),d.removeEventListener(Bc,p),by.remove(k)},0)}}},[d,m,p,k]);const C=S.useCallback(T=>{if(!i&&!s||k.paused)return;const E=T.key==="Tab"&&!T.altKey&&!T.ctrlKey&&!T.metaKey,M=document.activeElement;if(E&&M){const A=T.currentTarget,[L,U]=i0(A);L&&U?!T.shiftKey&&M===U?(T.preventDefault(),i&&tr(L,{select:!0})):T.shiftKey&&M===L&&(T.preventDefault(),i&&tr(U,{select:!0})):M===A&&T.preventDefault()}},[i,s,k.paused]);return v.jsx(li.div,{tabIndex:-1,...c,ref:w,onKeyDown:C})},"FocusScope"));function r0(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(tr(i,{select:t}),document.activeElement!==n)return}zt(r0,"focusFirst");function i0(e){const t=Yd(e),n=Vf(t,e),i=Vf(t.reverse(),e);return[n,i]}zt(i0,"getTabbableEdges");function Yd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:zt(i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}zt(Yd,"getTabbableCandidates");function Vf(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const i of e)if(!(n?!i.checkVisibility({checkVisibilityCSS:!0}):o0(i,{upTo:t})))return i}zt(Vf,"findVisible");function o0(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}zt(o0,"isHidden");function s0(e){return e instanceof HTMLInputElement&&"select"in e}zt(s0,"isSelectableInput");function tr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&s0(e)&&t&&e.select()}}zt(tr,"focus");var by=a0();function a0(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Bf(e,t),e.unshift(t)},remove(t){e=Bf(e,t),e[0]?.resume()}}}zt(a0,"createFocusScopesStack");function Bf(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}zt(Bf,"arrayRemove");function l0(e){return e.filter(t=>t.tagName!=="A")}zt(l0,"removeLinks");var lM=Object.defineProperty,uM=(e,t)=>lM(e,"name",{value:t,configurable:!0}),cM=S.forwardRef(uM(function(t,n){const{container:i,...s}=t,[l,a]=S.useState(!1);Mr(()=>a(!0),[]);const c=i||l&&globalThis?.document?.body;return c?Kw.createPortal(v.jsx(li.div,{...s,ref:n}),c):null},"Portal")),fM=Object.defineProperty,nr=(e,t)=>fM(e,"name",{value:t,configurable:!0});function u0(e,t){return S.useReducer((n,i)=>t[n][i]??n,e)}nr(u0,"useStateMachine");var Gd=nr(e=>{const{present:t,children:n}=e,i=c0(t),s=typeof n=="function"?n({present:i.isPresent}):S.Children.only(n),l=f0(i.ref,d0(s));return typeof n=="function"||i.isPresent?S.cloneElement(s,{ref:l}):null},"Presence");function c0(e){const[t,n]=S.useState(),i=S.useRef(null),s=S.useRef(e),l=S.useRef("none"),a=S.useRef(void 0),c=e?"mounted":"unmounted",[d,h]=u0(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{d==="mounted"?(l.current=a.current??Bi(i.current),a.current=void 0):l.current="none"},[d]),Mr(()=>{const m=i.current,p=s.current;if(p!==e){const w=l.current,k=Bi(m);e?(a.current=k,h("MOUNT")):k==="none"||m?.display==="none"?h("UNMOUNT"):h(p&&w!==k?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,h]),Mr(()=>{if(t){let m;const p=t.ownerDocument.defaultView??window,y=nr(k=>{const T=Bi(i.current).includes(CSS.escape(k.animationName));if(k.target===t&&T&&(h("ANIMATION_END"),!s.current)){const E=t.style.animationFillMode;t.style.animationFillMode="forwards",m=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=E)})}},"handleAnimationEnd"),w=nr(k=>{k.target===t&&(l.current=Bi(i.current))},"handleAnimationStart");return t.addEventListener("animationstart",w),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{p.clearTimeout(m),t.removeEventListener("animationstart",w),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:S.useCallback(m=>{if(m){const p=getComputedStyle(m);i.current=p,a.current=Bi(p)}else i.current=null;n(m)},[])}}nr(c0,"usePresence");function $f(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}nr($f,"setRef");function f0(...e){const t=S.useRef(e);return t.current=e,S.useCallback(n=>{const i=t.current;let s=!1;const l=i.map(a=>{const c=$f(a,n);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let a=0;a<l.length;a++){const c=l[a];typeof c=="function"?c():$f(i[a],null)}}},[])}nr(f0,"useStableComposedRefs");function Bi(e){return e?.animationName||"none"}nr(Bi,"getAnimationName");function d0(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}nr(d0,"getElementRef");var dM=Object.defineProperty,Qd=(e,t)=>dM(e,"name",{value:t,configurable:!0}),$a=0,_i=null;function hM(e){return Zd(),e.children}Qd(hM,"FocusGuards");function Zd(){S.useEffect(()=>{_i||(_i={start:Uf(),end:Uf()});const{start:e,end:t}=_i;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),$a++,()=>{$a===1&&(_i?.start.remove(),_i?.end.remove(),_i=null),$a=Math.max(0,$a-1)}},[])}Qd(Zd,"useFocusGuards");function Uf(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}Qd(Uf,"createFocusGuard");var Bn=function(){return Bn=Object.assign||function(t){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Bn.apply(this,arguments)};function h0(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]]);return n}function pM(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,l;i<s;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var rl="right-scroll-bar-position",il="width-before-scroll-bar",mM="with-scroll-bars-hidden",gM="--removed-body-scroll-bar-size";function $c(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yM(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var s=n.value;s!==i&&(n.value=i,n.callback(i,s))}}}})[0];return n.callback=t,n.facade}var vM=typeof window<"u"?S.useLayoutEffect:S.useEffect,Cy=new WeakMap;function xM(e,t){var n=yM(null,function(i){return e.forEach(function(s){return $c(s,i)})});return vM(function(){var i=Cy.get(n);if(i){var s=new Set(i),l=new Set(e),a=n.current;s.forEach(function(c){l.has(c)||$c(c,null)}),l.forEach(function(c){s.has(c)||$c(c,a)})}Cy.set(n,e)},[e]),n}function wM(e){return e}function kM(e,t){t===void 0&&(t=wM);var n=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var a=t(l,i);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(l){for(i=!0;n.length;){var a=n;n=[],a.forEach(l)}n={push:function(c){return l(c)},filter:function(){return n}}},assignMedium:function(l){i=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(l),a=n}var d=function(){var m=a;a=[],m.forEach(l)},h=function(){return Promise.resolve().then(d)};h(),n={push:function(m){a.push(m),h()},filter:function(m){return a=a.filter(m),n}}}};return s}function SM(e){e===void 0&&(e={});var t=kM(null);return t.options=Bn({async:!0,ssr:!1},e),t}var p0=function(e){var t=e.sideCar,n=h0(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return S.createElement(i,Bn({},n))};p0.isSideCarExport=!0;function bM(e,t){return e.useMedium(t),p0}var m0=SM(),Uc=function(){},Ol=S.forwardRef(function(e,t){var n=S.useRef(null),i=S.useState({onScrollCapture:Uc,onWheelCapture:Uc,onTouchMoveCapture:Uc}),s=i[0],l=i[1],a=e.forwardProps,c=e.children,d=e.className,h=e.removeScrollBar,m=e.enabled,p=e.shards,y=e.sideCar,w=e.noRelative,k=e.noIsolation,C=e.inert,T=e.allowPinchZoom,E=e.as,M=E===void 0?"div":E,A=e.gapMode,L=h0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),U=y,D=xM([n,t]),Y=Bn(Bn({},L),s);return S.createElement(S.Fragment,null,m&&S.createElement(U,{sideCar:m0,removeScrollBar:h,shards:p,noRelative:w,noIsolation:k,inert:C,setCallbacks:l,allowPinchZoom:!!T,lockRef:n,gapMode:A}),a?S.cloneElement(S.Children.only(c),Bn(Bn({},Y),{ref:D})):S.createElement(M,Bn({},Y,{className:d,ref:D}),c))});Ol.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ol.classNames={fullWidth:il,zeroRight:rl};var CM=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function EM(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=CM();return t&&e.setAttribute("nonce",t),e}function TM(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function PM(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var RM=function(){var e=0,t=null;return{add:function(n){e==0&&(t=EM())&&(TM(t,n),PM(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},AM=function(){var e=RM();return function(t,n){S.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},g0=function(){var e=AM(),t=function(n){var i=n.styles,s=n.dynamic;return e(i,s),null};return t},MM={left:0,top:0,right:0,gap:0},Wc=function(e){return parseInt(e||"",10)||0},NM=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Wc(n),Wc(i),Wc(s)]},jM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return MM;var t=NM(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},DM=g0(),Ki="data-scroll-locked",IM=function(e,t,n,i){var s=e.left,l=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
256
+ .`.concat(mM,` {
257
+ overflow: hidden `).concat(i,`;
258
+ padding-right: `).concat(c,"px ").concat(i,`;
259
+ }
260
+ body[`).concat(Ki,`] {
261
+ overflow: hidden `).concat(i,`;
262
+ overscroll-behavior: contain;
263
+ `).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
264
+ padding-left: `.concat(s,`px;
265
+ padding-top: `).concat(l,`px;
266
+ padding-right: `).concat(a,`px;
267
+ margin-left:0;
268
+ margin-top:0;
269
+ margin-right: `).concat(c,"px ").concat(i,`;
270
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
271
+ }
272
+
273
+ .`).concat(rl,` {
274
+ right: `).concat(c,"px ").concat(i,`;
275
+ }
276
+
277
+ .`).concat(il,` {
278
+ margin-right: `).concat(c,"px ").concat(i,`;
279
+ }
280
+
281
+ .`).concat(rl," .").concat(rl,` {
282
+ right: 0 `).concat(i,`;
283
+ }
284
+
285
+ .`).concat(il," .").concat(il,` {
286
+ margin-right: 0 `).concat(i,`;
287
+ }
288
+
289
+ body[`).concat(Ki,`] {
290
+ `).concat(gM,": ").concat(c,`px;
291
+ }
292
+ `)},Ey=function(){var e=parseInt(document.body.getAttribute(Ki)||"0",10);return isFinite(e)?e:0},_M=function(){S.useEffect(function(){return document.body.setAttribute(Ki,(Ey()+1).toString()),function(){var e=Ey()-1;e<=0?document.body.removeAttribute(Ki):document.body.setAttribute(Ki,e.toString())}},[])},LM=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;_M();var l=S.useMemo(function(){return jM(s)},[s]);return S.createElement(DM,{styles:IM(l,!t,s,n?"":"!important")})},Wf=!1;if(typeof window<"u")try{var Ua=Object.defineProperty({},"passive",{get:function(){return Wf=!0,!0}});window.addEventListener("test",Ua,Ua),window.removeEventListener("test",Ua,Ua)}catch{Wf=!1}var Li=Wf?{passive:!1}:!1,OM=function(e){return e.tagName==="TEXTAREA"},y0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!OM(e)&&n[t]==="visible")},FM=function(e){return y0(e,"overflowY")},zM=function(e){return y0(e,"overflowX")},Ty=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=v0(e,i);if(s){var l=x0(e,i),a=l[1],c=l[2];if(a>c)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},VM=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},BM=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},v0=function(e,t){return e==="v"?FM(t):zM(t)},x0=function(e,t){return e==="v"?VM(t):BM(t)},$M=function(e,t){return e==="h"&&t==="rtl"?-1:1},UM=function(e,t,n,i,s){var l=$M(e,window.getComputedStyle(t).direction),a=l*i,c=n.target,d=t.contains(c),h=!1,m=a>0,p=0,y=0;do{if(!c)break;var w=x0(e,c),k=w[0],C=w[1],T=w[2],E=C-T-l*k;(k||E)&&v0(e,c)&&(p+=E,y+=k);var M=c.parentNode;c=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!d&&c!==document.body||d&&(t.contains(c)||t===c));return(m&&Math.abs(p)<1||!m&&Math.abs(y)<1)&&(h=!0),h},Wa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Py=function(e){return[e.deltaX,e.deltaY]},Ry=function(e){return e&&"current"in e?e.current:e},WM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},HM=function(e){return`
293
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
294
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
295
+ `)},KM=0,Oi=[];function qM(e){var t=S.useRef([]),n=S.useRef([0,0]),i=S.useRef(),s=S.useState(KM++)[0],l=S.useState(g0)[0],a=S.useRef(e);S.useEffect(function(){a.current=e},[e]),S.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var C=pM([e.lockRef.current],(e.shards||[]).map(Ry),!0).filter(Boolean);return C.forEach(function(T){return T.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(T){return T.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=S.useCallback(function(C,T){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!a.current.allowPinchZoom;var E=Wa(C),M=n.current,A="deltaX"in C?C.deltaX:M[0]-E[0],L="deltaY"in C?C.deltaY:M[1]-E[1],U,D=C.target,Y=Math.abs(A)>Math.abs(L)?"h":"v";if("touches"in C&&Y==="h"&&D.type==="range")return!1;var W=window.getSelection(),X=W&&W.anchorNode,j=X?X===D||X.contains(D):!1;if(j)return!1;var G=Ty(Y,D);if(!G)return!0;if(G?U=Y:(U=Y==="v"?"h":"v",G=Ty(Y,D)),!G)return!1;if(!i.current&&"changedTouches"in C&&(A||L)&&(i.current=U),!U)return!0;var V=i.current||U;return UM(V,T,C,V==="h"?A:L)},[]),d=S.useCallback(function(C){var T=C;if(!(!Oi.length||Oi[Oi.length-1]!==l)){var E="deltaY"in T?Py(T):Wa(T),M=t.current.filter(function(U){return U.name===T.type&&(U.target===T.target||T.target===U.shadowParent)&&WM(U.delta,E)})[0];if(M&&M.should){T.cancelable&&T.preventDefault();return}if(!M){var A=(a.current.shards||[]).map(Ry).filter(Boolean).filter(function(U){return U.contains(T.target)}),L=A.length>0?c(T,A[0]):!a.current.noIsolation;L&&T.cancelable&&T.preventDefault()}}},[]),h=S.useCallback(function(C,T,E,M){var A={name:C,delta:T,target:E,should:M,shadowParent:XM(E)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(L){return L!==A})},1)},[]),m=S.useCallback(function(C){n.current=Wa(C),i.current=void 0},[]),p=S.useCallback(function(C){h(C.type,Py(C),C.target,c(C,e.lockRef.current))},[]),y=S.useCallback(function(C){h(C.type,Wa(C),C.target,c(C,e.lockRef.current))},[]);S.useEffect(function(){return Oi.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:y}),document.addEventListener("wheel",d,Li),document.addEventListener("touchmove",d,Li),document.addEventListener("touchstart",m,Li),function(){Oi=Oi.filter(function(C){return C!==l}),document.removeEventListener("wheel",d,Li),document.removeEventListener("touchmove",d,Li),document.removeEventListener("touchstart",m,Li)}},[]);var w=e.removeScrollBar,k=e.inert;return S.createElement(S.Fragment,null,k?S.createElement(l,{styles:HM(s)}):null,w?S.createElement(LM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function XM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const YM=bM(m0,qM);var w0=S.forwardRef(function(e,t){return S.createElement(Ol,Bn({},e,{ref:t,sideCar:YM}))});w0.classNames=Ol.classNames;var GM=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Fi=new WeakMap,Ha=new WeakMap,Ka={},Hc=0,k0=function(e){return e&&(e.host||k0(e.parentNode))},QM=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=k0(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ZM=function(e,t,n,i){var s=QM(t,Array.isArray(e)?e:[e]);Ka[n]||(Ka[n]=new WeakMap);var l=Ka[n],a=[],c=new Set,d=new Set(s),h=function(p){!p||c.has(p)||(c.add(p),h(p.parentNode))};s.forEach(h);var m=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(y){if(c.has(y))m(y);else try{var w=y.getAttribute(i),k=w!==null&&w!=="false",C=(Fi.get(y)||0)+1,T=(l.get(y)||0)+1;Fi.set(y,C),l.set(y,T),a.push(y),C===1&&k&&Ha.set(y,!0),T===1&&y.setAttribute(n,"true"),k||y.setAttribute(i,"true")}catch(E){console.error("aria-hidden: cannot operate on ",y,E)}})};return m(t),c.clear(),Hc++,function(){a.forEach(function(p){var y=Fi.get(p)-1,w=l.get(p)-1;Fi.set(p,y),l.set(p,w),y||(Ha.has(p)||p.removeAttribute(i),Ha.delete(p)),w||p.removeAttribute(n)}),Hc--,Hc||(Fi=new WeakMap,Fi=new WeakMap,Ha=new WeakMap,Ka={})}},JM=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=GM(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),ZM(i,s,n,"aria-hidden")):function(){return null}},eN=Object.defineProperty,xn=(e,t)=>eN(e,"name",{value:t,configurable:!0}),Jd="Dialog",[S0,Cz]=Vw(Jd),[tN,Hn]=S0(Jd),b0=xn(e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:s,onOpenChange:l,modal:a=!0}=e,c=S.useRef(null),d=S.useRef(null),[h,m]=Uw({prop:i,defaultProp:s??!1,onChange:l,caller:Jd}),[p,y]=S.useState(0),[w,k]=S.useState(0);return v.jsx(tN,{scope:t,triggerRef:c,contentRef:d,contentId:nl(),titleId:nl(),descriptionId:nl(),titlePresent:p>0,descriptionPresent:w>0,setTitleCount:y,setDescriptionCount:k,open:h,onOpenChange:m,onOpenToggle:S.useCallback(()=>m(C=>!C),[m]),modal:a,children:n})},"Dialog"),C0="DialogPortal",[nN,E0]=S0(C0,{forceMount:void 0}),T0=xn(e=>{const{__scopeDialog:t,forceMount:n,children:i,container:s}=e,l=Hn(C0,t);return v.jsx(nN,{scope:t,forceMount:n,children:S.Children.map(i,a=>v.jsx(Gd,{present:n||l.open,children:v.jsx(cM,{asChild:!0,container:s,children:a})}))})},"DialogPortal"),Hf="DialogOverlay",P0=S.forwardRef(xn(function(t,n){const i=E0(Hf,t.__scopeDialog),{forceMount:s=i.forceMount,...l}=t,a=Hn(Hf,t.__scopeDialog);return a.modal?v.jsx(Gd,{present:s||a.open,children:v.jsx(iN,{...l,ref:n})}):null},"DialogOverlay")),rN=qd("DialogOverlay.RemoveScroll"),iN=S.forwardRef(xn(function(t,n){const{__scopeDialog:i,...s}=t,l=Hn(Hf,i),a=e0(),c=eo(n,a);return v.jsx(w0,{as:rN,allowPinchZoom:!0,shards:[l.contentRef],children:v.jsx(li.div,{"data-state":eh(l.open),...s,ref:c,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),ps="DialogContent",R0=S.forwardRef(xn(function(t,n){const i=E0(ps,t.__scopeDialog),{forceMount:s=i.forceMount,...l}=t,a=Hn(ps,t.__scopeDialog);return v.jsx(Gd,{present:s||a.open,children:a.modal?v.jsx(oN,{...l,ref:n}):v.jsx(sN,{...l,ref:n})})},"DialogContent")),oN=S.forwardRef(xn(function(t,n){const i=Hn(ps,t.__scopeDialog),s=S.useRef(null),l=eo(n,i.contentRef,s);return S.useEffect(()=>{const a=s.current;if(a)return JM(a)},[]),v.jsx(A0,{...t,ref:l,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:Rr(t.onCloseAutoFocus,a=>{a.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:Rr(t.onPointerDownOutside,a=>{const c=a.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&a.preventDefault()}),onFocusOutside:Rr(t.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),sN=S.forwardRef(xn(function(t,n){const i=Hn(ps,t.__scopeDialog),s=S.useRef(!1),l=S.useRef(!1);return v.jsx(A0,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(s.current||i.triggerRef.current?.focus(),a.preventDefault()),s.current=!1,l.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const c=a.target;i.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&l.current&&a.preventDefault()}})},"DialogContentNonModal")),A0=S.forwardRef(xn(function(t,n){const{__scopeDialog:i,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:a,...c}=t,d=Hn(ps,i);return Zd(),v.jsx(v.Fragment,{children:v.jsx(aM,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:l,onUnmountAutoFocus:a,children:v.jsx(iM,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionPresent?d.descriptionId:void 0,"aria-labelledby":d.titlePresent?d.titleId:void 0,"data-state":eh(d.open),...c,ref:n,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1)})})})},"DialogContentImpl")),aN="DialogTitle",M0=S.forwardRef(xn(function(t,n){const{__scopeDialog:i,...s}=t,l=Hn(aN,i),{setTitleCount:a}=l;return Mr(()=>(a(c=>c+1),()=>a(c=>c-1)),[a]),v.jsx(li.h2,{id:l.titleId,...s,ref:n})},"DialogTitle")),lN="DialogDescription",N0=S.forwardRef(xn(function(t,n){const{__scopeDialog:i,...s}=t,l=Hn(lN,i),{setDescriptionCount:a}=l;return Mr(()=>(a(c=>c+1),()=>a(c=>c-1)),[a]),v.jsx(li.p,{id:l.descriptionId,...s,ref:n})},"DialogDescription")),uN="DialogClose",j0=S.forwardRef(xn(function(t,n){const{__scopeDialog:i,...s}=t,l=Hn(uN,i);return v.jsx(li.button,{type:"button",...s,ref:n,onClick:Rr(t.onClick,()=>l.onOpenChange(!1))})},"DialogClose"));function eh(e){return e?"open":"closed"}xn(eh,"getState");function cN(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const fN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,hN={};function Ay(e,t){return(hN.jsx?dN:fN).test(e)}const pN=/[ \t\n\f\r]/g;function mN(e){return typeof e=="object"?e.type==="text"?My(e.value):!1:My(e)}function My(e){return e.replace(pN,"")===""}class Es{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Es.prototype.normal={};Es.prototype.property={};Es.prototype.space=void 0;function D0(e,t){const n={},i={};for(const s of e)Object.assign(n,s.property),Object.assign(i,s.normal);return new Es(n,i,t)}function Kf(e){return e.toLowerCase()}class Jt{constructor(t,n){this.attribute=n,this.property=t}}Jt.prototype.attribute="";Jt.prototype.booleanish=!1;Jt.prototype.boolean=!1;Jt.prototype.commaOrSpaceSeparated=!1;Jt.prototype.commaSeparated=!1;Jt.prototype.defined=!1;Jt.prototype.mustUseProperty=!1;Jt.prototype.number=!1;Jt.prototype.overloadedBoolean=!1;Jt.prototype.property="";Jt.prototype.spaceSeparated=!1;Jt.prototype.space=void 0;let gN=0;const De=ui(),ht=ui(),qf=ui(),le=ui(),qe=ui(),ii=ui(),on=ui();function ui(){return 2**++gN}const Xf=Object.freeze(Object.defineProperty({__proto__:null,boolean:De,booleanish:ht,commaOrSpaceSeparated:on,commaSeparated:ii,number:le,overloadedBoolean:qf,spaceSeparated:qe},Symbol.toStringTag,{value:"Module"})),Kc=Object.keys(Xf);class th extends Jt{constructor(t,n,i,s){let l=-1;if(super(t,n),Ny(this,"space",s),typeof i=="number")for(;++l<Kc.length;){const a=Kc[l];Ny(this,Kc[l],(i&Xf[a])===Xf[a])}}}th.prototype.defined=!0;function Ny(e,t,n){n&&(e[t]=n)}function to(e){const t={},n={};for(const[i,s]of Object.entries(e.properties)){const l=new th(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,n[Kf(i)]=i,n[Kf(l.attribute)]=i}return new Es(t,n,e.space)}const I0=to({properties:{ariaActiveDescendant:null,ariaAtomic:ht,ariaAutoComplete:null,ariaBusy:ht,ariaChecked:ht,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:qe,ariaCurrent:null,ariaDescribedBy:qe,ariaDetails:null,ariaDisabled:ht,ariaDropEffect:qe,ariaErrorMessage:null,ariaExpanded:ht,ariaFlowTo:qe,ariaGrabbed:ht,ariaHasPopup:null,ariaHidden:ht,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qe,ariaLevel:le,ariaLive:null,ariaModal:ht,ariaMultiLine:ht,ariaMultiSelectable:ht,ariaOrientation:null,ariaOwns:qe,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:ht,ariaReadOnly:ht,ariaRelevant:null,ariaRequired:ht,ariaRoleDescription:qe,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:ht,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function _0(e,t){return t in e?e[t]:t}function L0(e,t){return _0(e,t.toLowerCase())}const yN=to({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ii,acceptCharset:qe,accessKey:qe,action:null,allow:null,allowFullScreen:De,allowPaymentRequest:De,allowUserMedia:De,alpha:De,alt:null,as:null,async:De,autoCapitalize:null,autoComplete:qe,autoFocus:De,autoPlay:De,blocking:qe,capture:null,charSet:null,checked:De,cite:null,className:qe,closedBy:null,colorSpace:null,cols:le,colSpan:le,command:null,commandFor:null,content:null,contentEditable:ht,controls:De,controlsList:qe,coords:le|ii,crossOrigin:null,data:null,dateTime:null,decoding:null,default:De,defer:De,dir:null,dirName:null,disabled:De,download:qf,draggable:ht,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:De,formTarget:null,headers:qe,height:le,hidden:qf,high:le,href:null,hrefLang:null,htmlFor:qe,httpEquiv:qe,id:null,imageSizes:null,imageSrcSet:null,inert:De,inputMode:null,integrity:null,is:null,isMap:De,itemId:null,itemProp:qe,itemRef:qe,itemScope:De,itemType:qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:De,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:De,muted:De,name:null,nonce:null,noModule:De,noValidate:De,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:De,optimum:le,pattern:null,ping:qe,placeholder:null,playsInline:De,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:De,referrerPolicy:null,rel:qe,required:De,reversed:De,rows:le,rowSpan:le,sandbox:qe,scope:null,scoped:De,seamless:De,selected:De,shadowRootClonable:De,shadowRootCustomElementRegistry:De,shadowRootDelegatesFocus:De,shadowRootMode:null,shadowRootSerializable:De,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:ht,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:De,useMap:null,value:ht,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qe,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:De,declare:De,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:De,noHref:De,noShade:De,noWrap:De,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:ht,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:De,disablePictureInPicture:De,disableRemotePlayback:De,exportParts:ii,part:qe,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:L0}),vN=to({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:on,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:qe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:De,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ii,g2:ii,glyphName:ii,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:on,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:on,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:on,rev:on,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:on,requiredFeatures:on,requiredFonts:on,requiredFormats:on,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:on,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:on,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:on,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:_0}),O0=to({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),F0=to({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:L0}),z0=to({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),xN={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},wN=/[A-Z]/g,jy=/-[a-z]/g,kN=/^data[-\w.:]+$/i;function SN(e,t){const n=Kf(t);let i=t,s=Jt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kN.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(jy,CN);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!jy.test(l)){let a=l.replace(wN,bN);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}s=th}return new s(i,t)}function bN(e){return"-"+e.toLowerCase()}function CN(e){return e.charAt(1).toUpperCase()}const EN=D0([I0,yN,O0,F0,z0],"html"),nh=D0([I0,vN,O0,F0,z0],"svg");function TN(e){return e.join(" ").trim()}var zi={},qc,Dy;function PN(){if(Dy)return qc;Dy=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
296
+ `,h="/",m="*",p="",y="comment",w="declaration";function k(T,E){if(typeof T!="string")throw new TypeError("First argument must be a string");if(!T)return[];E=E||{};var M=1,A=1;function L(ie){var ee=ie.match(t);ee&&(M+=ee.length);var ve=ie.lastIndexOf(d);A=~ve?ie.length-ve:A+ie.length}function U(){var ie={line:M,column:A};return function(ee){return ee.position=new D(ie),X(),ee}}function D(ie){this.start=ie,this.end={line:M,column:A},this.source=E.source}D.prototype.content=T;function Y(ie){var ee=new Error(E.source+":"+M+":"+A+": "+ie);if(ee.reason=ie,ee.filename=E.source,ee.line=M,ee.column=A,ee.source=T,!E.silent)throw ee}function W(ie){var ee=ie.exec(T);if(ee){var ve=ee[0];return L(ve),T=T.slice(ve.length),ee}}function X(){W(n)}function j(ie){var ee;for(ie=ie||[];ee=G();)ee!==!1&&ie.push(ee);return ie}function G(){var ie=U();if(!(h!=T.charAt(0)||m!=T.charAt(1))){for(var ee=2;p!=T.charAt(ee)&&(m!=T.charAt(ee)||h!=T.charAt(ee+1));)++ee;if(ee+=2,p===T.charAt(ee-1))return Y("End of comment missing");var ve=T.slice(2,ee-2);return A+=2,L(ve),T=T.slice(ee),A+=2,ie({type:y,comment:ve})}}function V(){var ie=U(),ee=W(i);if(ee){if(G(),!W(s))return Y("property missing ':'");var ve=W(l),Te=ie({type:w,property:C(ee[0].replace(e,p)),value:ve?C(ve[0].replace(e,p)):p});return W(a),Te}}function fe(){var ie=[];j(ie);for(var ee;ee=V();)ee!==!1&&(ie.push(ee),j(ie));return ie}return X(),fe()}function C(T){return T?T.replace(c,p):p}return qc=k,qc}var Iy;function RN(){if(Iy)return zi;Iy=1;var e=zi&&zi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(zi,"__esModule",{value:!0}),zi.default=n;const t=e(PN());function n(i,s){let l=null;if(!i||typeof i!="string")return l;const a=(0,t.default)(i),c=typeof s=="function";return a.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:m}=d;c?s(h,m,d):m&&(l=l||{},l[h]=m)}),l}return zi}var qo={},_y;function AN(){if(_y)return qo;_y=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},a=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),l(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(s,c):h=h.replace(i,c),h.replace(t,a))};return qo.camelCase=d,qo}var Xo,Ly;function MN(){if(Ly)return Xo;Ly=1;var e=Xo&&Xo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(RN()),n=AN();function i(s,l){var a={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(a[(0,n.camelCase)(c,l)]=d)}),a}return i.default=i,Xo=i,Xo}var NN=MN();const jN=Td(NN),V0=B0("end"),rh=B0("start");function B0(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function DN(e){const t=rh(e),n=V0(e);if(t&&n)return{start:t,end:n}}class Dt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let s="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(a=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?l.ruleId=i:(l.source=i.slice(0,d),l.ruleId=i.slice(d+1))}if(!l.place&&l.ancestors&&l.ancestors){const d=l.ancestors[l.ancestors.length-1];d&&(l.place=d.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=ts(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Dt.prototype.file="";Dt.prototype.name="";Dt.prototype.reason="";Dt.prototype.message="";Dt.prototype.stack="";Dt.prototype.column=void 0;Dt.prototype.line=void 0;Dt.prototype.ancestors=void 0;Dt.prototype.cause=void 0;Dt.prototype.fatal=void 0;Dt.prototype.place=void 0;Dt.prototype.ruleId=void 0;Dt.prototype.source=void 0;const ih={}.hasOwnProperty,IN=new Map,_N=/[A-Z]/g,LN=new Set(["table","tbody","thead","tfoot","tr"]),ON=new Set(["td","th"]),$0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function FN(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=KN(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=HN(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?nh:EN,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=U0(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function U0(e,t,n){if(t.type==="element")return zN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return VN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return $N(e,t,n);if(t.type==="mdxjsEsm")return BN(e,t);if(t.type==="root")return UN(e,t,n);if(t.type==="text")return WN(e,t)}function zN(e,t,n){const i=e.schema;let s=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=nh,e.schema=s),e.ancestors.push(t);const l=H0(e,t.tagName,!1),a=qN(e,t);let c=sh(e,t);return LN.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!mN(d):!0})),W0(e,a,l,t),oh(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function VN(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}ms(e,t.position)}function BN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ms(e,t.position)}function $N(e,t,n){const i=e.schema;let s=i;t.name==="svg"&&i.space==="html"&&(s=nh,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:H0(e,t.name,!0),a=XN(e,t),c=sh(e,t);return W0(e,a,l,t),oh(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function UN(e,t,n){const i={};return oh(i,sh(e,t)),e.create(t,e.Fragment,i,n)}function WN(e,t){return t.value}function W0(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function oh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function HN(e,t,n){return i;function i(s,l,a,c){const h=Array.isArray(a.children)?n:t;return c?h(l,a,c):h(l,a)}}function KN(e,t){return n;function n(i,s,l,a){const c=Array.isArray(l.children),d=rh(i);return t(s,l,a,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function qN(e,t){const n={};let i,s;for(s in t.properties)if(s!=="children"&&ih.call(t.properties,s)){const l=YN(e,s,t.properties[s]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&ON.has(t.tagName)?i=c:n[a]=c}}if(i){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function XN(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ms(e,t.position);else{const s=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else ms(e,t.position);else l=i.value===null?!0:i.value;n[s]=l}return n}function sh(e,t){const n=[];let i=-1;const s=e.passKeys?new Map:IN;for(;++i<t.children.length;){const l=t.children[i];let a;if(e.passKeys){const d=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(d){const h=s.get(d)||0;a=d+"-"+h,s.set(d,h+1)}}const c=U0(e,l,a);c!==void 0&&n.push(c)}return n}function YN(e,t,n){const i=SN(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?cN(n):TN(n)),i.property==="style"){let s=typeof n=="object"?n:GN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=QN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?xN[i.property]||i.property:i.attribute,n]}}function GN(e,t){try{return jN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,s=new Dt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=$0+"#cannot-parse-style-attribute",s}}function H0(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,a;for(;++l<s.length;){const c=Ay(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}i=a}else i=Ay(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const s=i.value;return ih.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);ms(e)}function ms(e,t){const n=new Dt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=$0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function QN(e){const t={};let n;for(n in e)ih.call(e,n)&&(t[ZN(n)]=e[n]);return t}function ZN(e){let t=e.replace(_N,JN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function JN(e){return"-"+e.toLowerCase()}const Xc={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};function ej(e){const t=this;t.parser=n;function n(i){return mw(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function tj(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function nj(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
297
+ `}]}function rj(e,t){const n=t.value?t.value+`
298
+ `:"",i={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function ij(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oj(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sj(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),s=Zi(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let a,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(i,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function aj(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lj(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function K0(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=i:s.push({type:"text",value:i}),s}function uj(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return K0(e,t);const s={src:Zi(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function cj(e,t){const n={src:Zi(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function fj(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function dj(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return K0(e,t);const s={href:Zi(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function hj(e,t){const n={href:Zi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function pj(e,t,n){const i=e.all(t),s=n?mj(n):q0(t),l={},a=[];if(typeof t.checked=="boolean"){const m=i[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},i.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const m=i[c];(s||c!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
299
+ `}),m.type==="element"&&m.tagName==="p"&&!s?a.push(...m.children):a.push(m)}const d=i[i.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
300
+ `});const h={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,h),e.applyData(t,h)}function mj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=q0(n[i])}return t}function q0(e){const t=e.spread;return t??e.children.length>1}function gj(e,t){const n={},i=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<i.length;){const a=i[s];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function yj(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vj(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function xj(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wj(e,t){const n=e.all(t),i=n.shift(),s=[];if(i){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],a),s.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=rh(t.children[1]),d=V0(t.children[t.children.length-1]);c&&d&&(a.position={start:c,end:d}),s.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function kj(e,t,n){const i=n?n.children:void 0,l=(i?i.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const p=t.children[d],y={},w=a?a[d]:void 0;w&&(y.align=w);let k={type:"element",tagName:l,properties:y,children:[]};p&&(k.children=e.all(p),e.patch(p,k),k=e.applyData(p,k)),h.push(k)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function Sj(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Oy=9,Fy=32;function bj(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),s=0;const l=[];for(;i;)l.push(zy(t.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=n.exec(t);return l.push(zy(t.slice(s),s>0,!1)),l.join("")}function zy(e,t,n){let i=0,s=e.length;if(t){let l=e.codePointAt(i);for(;l===Oy||l===Fy;)i++,l=e.codePointAt(i)}if(n){let l=e.codePointAt(s-1);for(;l===Oy||l===Fy;)s--,l=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function Cj(e,t){const n={type:"text",value:bj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ej(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Tj={blockquote:tj,break:nj,code:rj,delete:ij,emphasis:oj,footnoteReference:sj,heading:aj,html:lj,imageReference:uj,image:cj,inlineCode:fj,linkReference:dj,link:hj,listItem:pj,list:gj,paragraph:yj,root:vj,strong:xj,table:wj,tableCell:Sj,tableRow:kj,text:Cj,thematicBreak:Ej,toml:qa,yaml:qa,definition:qa,footnoteDefinition:qa};function qa(){}const X0=-1,Fl=0,ns=1,vl=2,ah=3,lh=4,uh=5,ch=6,Y0=7,G0=8,Q0=typeof self=="object"?self:globalThis,Vy=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new Q0[e](t)},Pj=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),i=s=>{if(e.has(s))return e.get(s);const[l,a]=t[s];switch(l){case Fl:case X0:return n(a,s);case ns:{const c=n([],s);for(const d of a)c.push(i(d));return c}case vl:{const c=n({},s);for(const[d,h]of a)c[i(d)]=i(h);return c}case ah:return n(new Date(a),s);case lh:{const{source:c,flags:d}=a;return n(new RegExp(c,d),s)}case uh:{const c=n(new Map,s);for(const[d,h]of a)c.set(i(d),i(h));return c}case ch:{const c=n(new Set,s);for(const d of a)c.add(i(d));return c}case Y0:{const{name:c,message:d}=a;return n(typeof Q0[c]=="function"?Vy(c,d):new Error(d),s)}case G0:return n(BigInt(a),s);case"BigInt":return n(Object(BigInt(a)),s);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}}return n(Vy(l,a),s)};return i},By=e=>Pj(new Map,e)(0),Jr="",{toString:Rj}={},{keys:Aj}=Object,Yo=e=>{const t=typeof e;if(t!=="object"||!e)return[Fl,t];const n=Rj.call(e).slice(8,-1);switch(n){case"Array":return[ns,Jr];case"Object":return[vl,Jr];case"Date":return[ah,Jr];case"RegExp":return[lh,Jr];case"Map":return[uh,Jr];case"Set":return[ch,Jr];case"DataView":return[ns,n]}return n.includes("Array")?[ns,n]:e instanceof Error?[Y0,e.name||"Error"]:[vl,n]},Xa=([e,t])=>e===Fl&&(t==="function"||t==="symbol"),Mj=(e,t,n,i)=>{const s=(a,c)=>{const d=i.push(a)-1;return n.set(c,d),d},l=a=>{if(n.has(a))return n.get(a);let[c,d]=Yo(a);switch(c){case Fl:{let m=a;switch(d){case"bigint":c=G0,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return s([X0],a)}return s([c,m],a)}case ns:{if(d){let y=a;return d==="DataView"?y=new Uint8Array(a.buffer):d==="ArrayBuffer"&&(y=new Uint8Array(a)),s([d,[...y]],a)}const m=[],p=s([c,m],a);for(const y of a)m.push(l(y));return p}case vl:{if(d)switch(d){case"BigInt":return s([d,a.toString()],a);case"Boolean":case"Number":case"String":return s([d,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const m=[],p=s([c,m],a);for(const y of Aj(a))(e||!Xa(Yo(a[y])))&&m.push([l(y),l(a[y])]);return p}case ah:return s([c,isNaN(a.getTime())?Jr:a.toISOString()],a);case lh:{const{source:m,flags:p}=a;return s([c,{source:m,flags:p}],a)}case uh:{const m=[],p=s([c,m],a);for(const[y,w]of a)(e||!(Xa(Yo(y))||Xa(Yo(w))))&&m.push([l(y),l(w)]);return p}case ch:{const m=[],p=s([c,m],a);for(const y of a)(e||!Xa(Yo(y)))&&m.push(l(y));return p}}const{message:h}=a;return s([c,{name:d,message:h}],a)};return l},$y=(e,{json:t,lossy:n}={})=>{const i=[];return Mj(!(t||n),!!t,new Map,i)(e),i},xl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?By($y(e,t)):structuredClone(e):(e,t)=>By($y(e,t));function Nj(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function jj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Dj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Nj,i=e.options.footnoteBackLabel||jj,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const m=e.all(h),p=String(h.identifier).toUpperCase(),y=Zi(p.toLowerCase());let w=0;const k=[],C=e.footnoteCounts.get(p);for(;C!==void 0&&++w<=C;){k.length>0&&k.push({type:"text",value:" "});let M=typeof n=="string"?n:n(d,w);typeof M=="string"&&(M={type:"text",value:M}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(d,w),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const T=m[m.length-1];if(T&&T.type==="element"&&T.tagName==="p"){const M=T.children[T.children.length-1];M&&M.type==="text"?M.value+=" ":T.children.push({type:"text",value:" "}),T.children.push(...k)}else m.push(...k);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(m,!0)};e.patch(h,E),c.push(E)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...xl(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
301
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
302
+ `}]}}const Yf={}.hasOwnProperty,Ij={};function _j(e,t){const n=t||Ij,i=new Map,s=new Map,l=new Map,a={...Tj,...n.handlers},c={all:h,applyData:Oj,definitionById:i,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:a,one:d,options:n,patch:Lj,wrap:zj};return _d(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?i:s,y=String(m.identifier).toUpperCase();p.has(y)||p.set(y,m)}}),c;function d(m,p){const y=m.type,w=c.handlers[y];if(Yf.call(c.handlers,y)&&w)return w(c,m,p);if(c.options.passThrough&&c.options.passThrough.includes(y)){if("children"in m){const{children:C,...T}=m,E=xl(T);return E.children=c.all(m),E}return xl(m)}return(c.options.unknownHandler||Fj)(c,m,p)}function h(m){const p=[];if("children"in m){const y=m.children;let w=-1;for(;++w<y.length;){const k=c.one(y[w],m);if(k){if(w&&y[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Uy(k.value)),!Array.isArray(k)&&k.type==="element")){const C=k.children[0];C&&C.type==="text"&&(C.value=Uy(C.value))}Array.isArray(k)?p.push(...k):p.push(k)}}}return p}}function Lj(e,t){e.position&&(t.position=DN(e))}function Oj(e,t){let n=t;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const a="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,xl(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function Fj(e,t){const n=t.data||{},i="value"in t&&!(Yf.call(n,"hProperties")||Yf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function zj(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
303
+ `});++i<e.length;)i&&n.push({type:"text",value:`
304
+ `}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
305
+ `}),n}function Uy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Wy(e,t){const n=_j(e,t),i=n.one(e,void 0),s=Dj(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
306
+ `},s),l}function Vj(e,t){return e&&"run"in e?async function(n,i){const s=Wy(n,{file:i,...t});await e.run(s,i)}:function(n,i){return Wy(n,{file:i,...e||t})}}function Hy(e){if(e)throw e}var Yc,Ky;function Bj(){if(Ky)return Yc;Ky=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!p)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},a=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(i)return i(h,m).value}else return;return h[m]};return Yc=function d(){var h,m,p,y,w,k,C=arguments[0],T=1,E=arguments.length,M=!1;for(typeof C=="boolean"&&(M=C,C=arguments[1]||{},T=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});T<E;++T)if(h=arguments[T],h!=null)for(m in h)p=c(C,m),y=c(h,m),C!==y&&(M&&y&&(l(y)||(w=s(y)))?(w?(w=!1,k=p&&s(p)?p:[]):k=p&&l(p)?p:{},a(C,{name:m,newValue:d(M,k,y)})):typeof y<"u"&&a(C,{name:m,newValue:y}));return C},Yc}var $j=Bj();const Gc=Td($j);function Gf(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Uj(){const e=[],t={run:n,use:i};return t;function n(...s){let l=-1;const a=s.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...s);function c(d,...h){const m=e[++l];let p=-1;if(d){a(d);return}for(;++p<s.length;)(h[p]===null||h[p]===void 0)&&(h[p]=s[p]);s=h,m?Wj(m,c)(...h):a(null,...h)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function Wj(e,t){let n;return i;function i(...a){const c=e.length>a.length;let d;c&&a.push(s);try{d=e.apply(this,a)}catch(h){const m=h;if(c&&n)throw m;return s(m)}c||(d&&d.then&&typeof d.then=="function"?d.then(l,s):d instanceof Error?s(d):l(d))}function s(a,...c){n||(n=!0,t(a,...c))}function l(a){s(null,a)}}const Fn={basename:Hj,dirname:Kj,extname:qj,join:Xj,sep:"/"};function Hj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ts(e);let n=0,i=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else i<0&&(l=!0,i=s+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else a<0&&(l=!0,a=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(i=s):(c=-1,i=a));return n===i?i=a:i<0&&(i=e.length),e.slice(n,i)}function Kj(e){if(Ts(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function qj(e){Ts(e);let t=e.length,n=-1,i=0,s=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){i=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===i+1?"":e.slice(s,n)}function Xj(...e){let t=-1,n;for(;++t<e.length;)Ts(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Yj(n)}function Yj(e){Ts(e);const t=e.codePointAt(0)===47;let n=Gj(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Gj(e,t){let n="",i=0,s=-1,l=0,a=-1,c,d;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(s===a-1||l===1))if(s!==a-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",i=0):(n=n.slice(0,d),i=n.length-1-n.lastIndexOf("/")),s=a,l=0;continue}}else if(n.length>0){n="",i=0,s=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),i=a-s-1;s=a,l=0}else c===46&&l>-1?l++:l=-1}return n}function Ts(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Qj={cwd:Zj};function Zj(){return"/"}function Qf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Jj(e){if(typeof e=="string")e=new URL(e);else if(!Qf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return eD(e)}function eD(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Qc=["history","path","basename","stem","extname","dirname"];class Z0{constructor(t){let n;t?Qf(t)?n={path:t}:typeof t=="string"||tD(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Qj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Qc.length;){const l=Qc[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)Qc.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Fn.basename(this.path):void 0}set basename(t){Jc(t,"basename"),Zc(t,"basename"),this.path=Fn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Fn.dirname(this.path):void 0}set dirname(t){qy(this.basename,"dirname"),this.path=Fn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Fn.extname(this.path):void 0}set extname(t){if(Zc(t,"extname"),qy(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Fn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qf(t)&&(t=Jj(t)),Jc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Fn.basename(this.path,this.extname):void 0}set stem(t){Jc(t,"stem"),Zc(t,"stem"),this.path=Fn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const s=this.message(t,n,i);throw s.fatal=!0,s}info(t,n,i){const s=this.message(t,n,i);return s.fatal=void 0,s}message(t,n,i){const s=new Dt(t,n,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Zc(e,t){if(e&&e.includes(Fn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Fn.sep+"`")}function Jc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function tD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nD=function(e){const i=this.constructor.prototype,s=i[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,i),l},rD={}.hasOwnProperty;class fh extends nD{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Uj()}copy(){const t=new fh;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Gc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(nf("data",this.frozen),this.namespace[t]=n,this):rD.call(this.namespace,t)&&this.namespace[t]||void 0:t?(nf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=n.call(t,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Ya(t),i=this.parser||this.Parser;return ef("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),ef("process",this.parser||this.Parser),tf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,a){const c=Ya(t),d=i.parse(c);i.run(d,c,function(m,p,y){if(m||!p||!y)return h(m);const w=p,k=i.stringify(w,y);sD(k)?y.value=k:y.result=k,h(m,y)});function h(m,p){m||!p?a(m):l?l(p):n(void 0,p)}}}processSync(t){let n=!1,i;return this.freeze(),ef("processSync",this.parser||this.Parser),tf("processSync",this.compiler||this.Compiler),this.process(t,s),Yy("processSync","process",n),i;function s(l,a){n=!0,Hy(l),i=a}}run(t,n,i){Xy(t),this.freeze();const s=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(a,c){const d=Ya(n);s.run(t,d,h);function h(m,p,y){const w=p||t;m?c(m):a?a(w):i(void 0,w,y)}}}runSync(t,n){let i=!1,s;return this.run(t,n,l),Yy("runSync","run",i),s;function l(a,c){Hy(a),s=c,i=!0}}stringify(t,n){this.freeze();const i=Ya(n),s=this.compiler||this.Compiler;return tf("stringify",s),Xy(t),s(t,i)}use(t,...n){const i=this.attachers,s=this.namespace;if(nf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...p]=h;d(m,p)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(s.settings=Gc(!0,s.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const p=h[m];l(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,m){let p=-1,y=-1;for(;++p<i.length;)if(i[p][0]===h){y=p;break}if(y===-1)i.push([h,...m]);else if(m.length>0){let[w,...k]=m;const C=i[y][1];Gf(C)&&Gf(w)&&(w=Gc(!0,C,w)),i[y]=[h,w,...k]}}}}const iD=new fh().freeze();function ef(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function tf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function nf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Xy(e){if(!Gf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Yy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ya(e){return oD(e)?e:new Z0(e)}function oD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function sD(e){return typeof e=="string"||aD(e)}function aD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lD="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Gy=[],Qy={allowDangerousHtml:!0},uD=/^(https?|ircs?|mailto|xmpp)$/i,cD=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function J0(e){const t=fD(e),n=dD(e);return hD(t.runSync(t.parse(n),n),e)}function fD(e){const t=e.rehypePlugins||Gy,n=e.remarkPlugins||Gy,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Qy}:Qy;return iD().use(ej).use(n).use(Vj,i).use(t)}function dD(e){const t=e.children||"",n=new Z0;return typeof t=="string"&&(n.value=t),n}function hD(e,t){const n=t.allowedElements,i=t.allowElement,s=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||pD;for(const m of cD)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+lD+m.id,void 0);return _d(e,h),FN(e,{Fragment:v.Fragment,components:s,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(m,p,y){if(m.type==="raw"&&y&&typeof p=="number")return a?y.children.splice(p,1):y.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let w;for(w in Xc)if(Object.hasOwn(Xc,w)&&Object.hasOwn(m.properties,w)){const k=m.properties[w],C=Xc[w];(C===null||C.includes(m.tagName))&&(m.properties[w]=d(String(k||""),w,m))}}if(m.type==="element"){let w=n?!n.includes(m.tagName):l?l.includes(m.tagName):!1;if(!w&&i&&typeof p=="number"&&(w=!i(m,p,y)),w&&y&&typeof p=="number")return c&&m.children?y.children.splice(p,1,...m.children):y.children.splice(p,1),p}}}function pD(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||i!==-1&&t>i||uD.test(e.slice(0,t))?e:""}const mD={};function e1(e){const t=this,n=e||mD,i=t.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(Ew(n)),l.push(rw()),a.push(xP(n))}function Ps(e){return v.jsx(b0,{open:!0,onOpenChange:t=>{t||e.onClose()},children:v.jsxs(T0,{children:[v.jsx(P0,{className:"modal-backdrop"}),v.jsxs(R0,{className:"modal"+(e.wide?" modal-wide":"")+(e.className?` ${e.className}`:""),children:[v.jsxs("div",{className:"modal-head",children:[v.jsxs("div",{children:[v.jsx(M0,{asChild:!0,children:v.jsx("h3",{children:e.title})}),e.description&&v.jsx(N0,{className:"modal-description",children:e.description})]}),v.jsx(j0,{asChild:!0,children:v.jsx("button",{className:"icon-btn","aria-label":`Close ${e.title}`,children:v.jsx(Se,{name:"close"})})})]}),e.tabs,v.jsx("div",{className:"modal-body",children:e.children})]})]})})}const gD=.25,yD=8;let Zy=Promise.resolve();function Jy(){return document.documentElement.classList.contains("theme-dark")?"dark":"default"}function vD(){const[e,t]=S.useState(Jy);return S.useEffect(()=>{const n=document.documentElement,i=()=>t(Jy()),s=new MutationObserver(i);return s.observe(n,{attributes:!0,attributeFilter:["class"]}),i(),()=>s.disconnect()},[]),e}function xD(e,t,n){const i=Zy.then(async()=>{const{default:s}=await Hd(async()=>{const{default:l}=await import("./mermaid.core-BvnI9y4f.js").then(a=>a.bp);return{default:l}},[]);return s.initialize({startOnLoad:!1,securityLevel:"strict",theme:n,fontFamily:"var(--sans)"}),s.render(e,t)});return Zy=i.then(()=>{},()=>{}),i}function wD(e){return Math.min(yD,Math.max(gD,e))}function kD(e){const t=S.useRef(null),n=S.useRef(null),[i,s]=S.useState(1),[l,a]=S.useState({x:0,y:0}),[c,d]=S.useState(!1),h=()=>{s(1),a({x:0,y:0})},m=(p,y,w)=>{const k=wD(p);if(k===i)return;const C=t.current?.getBoundingClientRect();if(C){const T=(y??C.left+C.width/2)-C.left-C.width/2,E=(w??C.top+C.height/2)-C.top-C.height/2,M=k/i;a(A=>({x:T-M*(T-A.x),y:E-M*(E-A.y)}))}s(k)};return S.useEffect(()=>{const p=y=>{y.key==="+"||y.key==="="?(y.preventDefault(),m(i*1.25)):y.key==="-"?(y.preventDefault(),m(i/1.25)):y.key==="0"&&(y.preventDefault(),h())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)}),v.jsx(b0,{open:!0,onOpenChange:p=>{p||e.onClose()},children:v.jsxs(T0,{children:[v.jsx(P0,{className:"mermaid-fullscreen-backdrop"}),v.jsxs(R0,{className:"mermaid-fullscreen","data-mermaid-theme":e.theme,"aria-describedby":"mermaid-fullscreen-help",children:[v.jsx(M0,{className:"mermaid-fullscreen-title",children:"Diagram viewer"}),v.jsxs("div",{className:"mermaid-fullscreen-tools",children:[v.jsx("button",{className:"icon-btn","aria-label":"Zoom out",title:"Zoom out (−)",onClick:()=>m(i/1.25),children:v.jsx(Se,{name:"minus"})}),v.jsxs("button",{className:"mermaid-zoom-value",onClick:h,title:"Reset zoom and position",children:[Math.round(i*100),"%"]}),v.jsx("button",{className:"icon-btn","aria-label":"Zoom in",title:"Zoom in (+)",onClick:()=>m(i*1.25),children:v.jsx(Se,{name:"plus"})}),v.jsx(j0,{asChild:!0,children:v.jsx("button",{className:"icon-btn","aria-label":"Close diagram viewer",title:"Close (Esc)",children:v.jsx(Se,{name:"close"})})})]}),v.jsx("div",{ref:t,className:"mermaid-fullscreen-viewport"+(c?" dragging":""),onWheel:p=>{p.preventDefault(),m(i*Math.exp(-p.deltaY*.0015),p.clientX,p.clientY)},onDoubleClick:p=>m(i*1.5,p.clientX,p.clientY),onPointerDown:p=>{p.button===0&&(n.current={pointerId:p.pointerId,startX:p.clientX,startY:p.clientY,panX:l.x,panY:l.y},p.currentTarget.setPointerCapture(p.pointerId),d(!0))},onPointerMove:p=>{const y=n.current;!y||y.pointerId!==p.pointerId||a({x:y.panX+p.clientX-y.startX,y:y.panY+p.clientY-y.startY})},onPointerUp:p=>{n.current?.pointerId===p.pointerId&&(n.current=null,d(!1),p.currentTarget.releasePointerCapture(p.pointerId))},onPointerCancel:()=>{n.current=null,d(!1)},children:v.jsx("div",{className:"mermaid-fullscreen-canvas",style:{transform:`translate(${l.x}px, ${l.y}px) scale(${i})`},dangerouslySetInnerHTML:{__html:e.svg}})}),v.jsx(N0,{id:"mermaid-fullscreen-help",className:"mermaid-fullscreen-help",children:"Scroll to zoom · drag to move · double-click to zoom in"})]})]})})}function SD({source:e}){const t=S.useId(),[n,i]=S.useState(""),[s,l]=S.useState(""),[a,c]=S.useState("default"),[d,h]=S.useState(!1),m=vD();return S.useEffect(()=>{let p=!0;const y=`mermaid-${t.replace(/[^a-zA-Z0-9_-]/g,"")}`;return i(""),l(""),xD(y,e,m).then(w=>{p&&(c(m),i(w.svg))}).catch(w=>{p&&l(w instanceof Error?w.message:String(w))}),()=>{p=!1,document.getElementById(`d${y}`)?.remove()}},[t,e,m]),s?v.jsxs("pre",{className:"markdown-mermaid-error",children:["Mermaid error: ",s]}):n?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"markdown-mermaid","data-mermaid-theme":a,children:[v.jsx("button",{className:"icon-btn markdown-mermaid-expand","aria-label":"View diagram fullscreen",title:"View diagram fullscreen",onClick:()=>h(!0),children:v.jsx(Se,{name:"maximize"})}),v.jsx("div",{className:"markdown-mermaid-diagram",dangerouslySetInnerHTML:{__html:n}})]}),d&&v.jsx(kD,{svg:n,theme:a,onClose:()=>h(!1)})]}):v.jsx("div",{className:"markdown-mermaid-loading",children:"Rendering diagram…"})}const bD=S.memo(function(t){return v.jsx("article",{className:"markdown-body",ref:t.contentRef,children:v.jsx(J0,{remarkPlugins:[e1],components:{a:({children:n,...i})=>v.jsx("a",{...i,target:"_blank",rel:"noreferrer",children:n}),code:({className:n,children:i,...s})=>{const l=/language-([\w-]+)/.exec(n??"")?.[1],a=String(i).replace(/\n$/,"");return l==="mermaid"?v.jsx(SD,{source:a}):v.jsx("code",{className:n,...s,children:i})}},children:t.markdown})})});function CD(e){const{rec:t}=e,n=S.useRef(null),[i,s]=S.useState(""),[l,a]=S.useState(null),[c,d]=S.useState("loading"),[h,m]=S.useState(""),[p,y]=S.useState(0),[w,k]=S.useState(""),[C,T]=S.useState(0),[E,M]=S.useState(!1),[A,L]=S.useState(""),[U,D]=S.useState(!1),[Y,W]=S.useState(!1),[X,j]=S.useState([]),[G,V]=S.useState(!1),[fe,ie]=S.useState(null),[ee,ve]=S.useState(!1),[Te,q]=S.useState("");S.useEffect(()=>{let R=!0,Z=null;return d("loading"),Nl(t.id).then(de=>{if(R){if(!de){d("missing");return}s(new TextDecoder("utf-8").decode(de)),Z=URL.createObjectURL(new Blob([de],{type:"text/markdown;charset=utf-8"})),a(Z),d("ready")}}).catch(()=>{R&&d("error")}),()=>{R=!1,Z&&URL.revokeObjectURL(Z)}},[t.id]),S.useEffect(()=>{const R=()=>{const Z=window.getSelection(),de=n.current;if(!Z||Z.isCollapsed||!de){m(""),y(0);return}if(!de.contains(Z.anchorNode)||!de.contains(Z.focusNode)){m(""),y(0);return}const re=Z.getRangeAt(0),Ee=Z.toString(),ge=Ee.length-Ee.trimStart().length,xe=Ee.trim().slice(0,4e3),_e=document.createRange();_e.selectNodeContents(de),_e.setEnd(re.startContainer,re.startOffset);const We=_e.toString().length+ge;m(xe),y(H2(de.textContent,xe,We))};return document.addEventListener("selectionchange",R),()=>document.removeEventListener("selectionchange",R)},[]);const ue=()=>{h&&(k(h),T(p),M(!0),q(""))},P=async()=>{if(Y){if(!w||!A.trim())return;j(Z=>[...Z,{selection:w,comment:A.trim(),occurrence:C}]),L(""),M(!1),q("Comment added to review");return}const R=U2(w,A);if(!(!R||!A.trim()||U)){D(!0),q("");try{await e.onSendText(R,t.id||void 0),L(""),M(!1),q("Feedback sent")}catch(Z){q(`Send failed: ${String(Z)}`)}finally{D(!1)}}},_=async()=>{if(X.length===0||G)return;const R=Q2(i,X);V(!0),q("");try{e.onSendFile?await e.onSendFile({filename:W2(t.filename),mime:"text/markdown",bytes:new TextEncoder().encode(R)},t.id||void 0):await e.onSendText(R,t.id||void 0),j([]),W(!1),q("Review submitted")}catch(Z){q(`Review send failed: ${String(Z)}`)}finally{V(!1)}},Q=async()=>{if(!(!fe||!e.onSendFile||ee)){ve(!0),q("");try{await e.onSendFile(fe,t.id||void 0),ie(null),q("Voice feedback sent")}catch(R){q(`Voice send failed: ${String(R)}`)}finally{ve(!1)}}};return v.jsx(Ps,{title:t.filename,description:"Markdown preview · select text to send precise feedback",onClose:e.onClose,wide:!0,className:"markdown-modal",children:v.jsxs("div",{className:"markdown-preview",children:[v.jsxs("div",{className:"markdown-review-toolbar",children:[v.jsxs("button",{className:"btn sm",disabled:!h,onMouseDown:R=>R.preventDefault(),onClick:ue,children:[v.jsx(Se,{name:"reply",size:14}),Y?"Add review comment":"Quick message",h?` (${h.length})`:""]}),Y?v.jsx("button",{className:"btn sm",onClick:()=>{W(!1),j([]),M(!1),q("Review discarded")},children:"Cancel review"}):v.jsxs("button",{className:"btn sm",onClick:()=>{W(!0),j([]),q("Review started — select passages to add comments")},children:[v.jsx(Se,{name:"edit",size:14}),"Start review"]}),l&&v.jsxs("a",{className:"btn sm",href:l,download:t.filename,children:[v.jsx(Se,{name:"download",size:14}),"Download"]}),e.onSendFile&&v.jsx(_w,{disabled:!!fe||ee,onReady:ie,onError:q}),v.jsx("span",{className:"markdown-review-hint",children:h?"Selection ready for feedback":"Highlight any passage to comment on it"})]}),E&&v.jsxs("div",{className:"markdown-feedback",children:[v.jsx("blockquote",{children:w}),v.jsx("textarea",{className:"field",rows:3,autoFocus:!0,placeholder:"What should change?",value:A,onChange:R=>L(R.target.value)}),v.jsxs("div",{className:"markdown-feedback-actions",children:[v.jsx("button",{className:"btn sm",onClick:()=>M(!1),children:"Cancel"}),v.jsxs("button",{className:"btn sm primary",disabled:!A.trim()||U,onClick:()=>void P(),children:[v.jsx(Se,{name:"send",size:14}),Y?"Add to review":U?"Sending…":"Send feedback"]})]})]}),Y&&v.jsxs("div",{className:"markdown-review-draft",children:[v.jsxs("div",{className:"markdown-review-draft-head",children:[v.jsxs("strong",{children:["Review · ",X.length," comment",X.length===1?"":"s"]}),v.jsxs("button",{className:"btn sm primary",disabled:X.length===0||G,onClick:()=>void _(),children:[v.jsx(Se,{name:"send",size:14}),G?"Submitting…":"Submit review"]})]}),X.map((R,Z)=>v.jsxs("div",{className:"markdown-review-comment",children:[v.jsx("span",{children:Z+1}),v.jsxs("div",{children:[v.jsx("blockquote",{children:R.selection}),v.jsx("p",{children:R.comment})]}),v.jsx("button",{className:"icon-btn",title:"Remove comment",onClick:()=>j(de=>de.filter((re,Ee)=>Ee!==Z)),children:v.jsx(Se,{name:"close",size:14})})]},`${Z}-${R.selection.slice(0,24)}`))]}),fe&&v.jsx(Iw,{att:fe,sending:ee,onSend:()=>void Q(),onDiscard:()=>ie(null)}),Te&&v.jsx("div",{className:"markdown-review-status",role:"status",children:Te}),v.jsxs("div",{className:"markdown-preview-scroll",children:[c==="loading"&&v.jsx("div",{className:"markdown-empty",children:"Loading preview…"}),c==="missing"&&v.jsx("div",{className:"markdown-empty",children:"This file is available on the original device only."}),c==="error"&&v.jsx("div",{className:"markdown-empty",children:"The file could not be opened."}),c==="ready"&&v.jsx(bD,{markdown:i,contentRef:n})]})]})})}function ED(e){const{rec:t}=e,[n,i]=S.useState(""),[s,l]=S.useState(null),[a,c]=S.useState(0),[d,h]=S.useState("loading");return S.useEffect(()=>{let m=!0,p=null;return h("loading"),Nl(t.id).then(y=>{if(m){if(!y){h("missing");return}i(iA(new TextDecoder("utf-8").decode(y))),c(y.byteLength),p=URL.createObjectURL(new Blob([y],{type:Bd(t.mime,t.filename)})),l(p),h("ready")}}).catch(()=>{m&&h("error")}),()=>{m=!1,p&&URL.revokeObjectURL(p)}},[t.id,t.mime,t.filename]),v.jsx(Ps,{title:t.filename,description:"HTML preview · sandboxed, static rendering only",onClose:e.onClose,wide:!0,className:"markdown-modal html-modal",children:v.jsxs("div",{className:"html-preview",children:[v.jsxs("div",{className:"html-preview-toolbar",children:[v.jsxs("span",{className:"html-preview-shield",children:[v.jsx(Se,{name:"shield",size:14}),"Scripts, forms and network requests are blocked"]}),s&&v.jsxs("a",{className:"btn sm",href:s,download:t.filename,children:[v.jsx(Se,{name:"download",size:14}),"Download original",a?` · ${Ar(a)}`:""]})]}),v.jsxs("div",{className:"html-preview-frame",children:[d==="loading"&&v.jsx("div",{className:"markdown-empty",children:"Loading preview…"}),d==="missing"&&v.jsx("div",{className:"markdown-empty",children:"This file is available on the original device only."}),d==="error"&&v.jsx("div",{className:"markdown-empty",children:"The file could not be opened."}),d==="ready"&&v.jsx("iframe",{className:"html-preview-iframe",title:`Sandboxed preview of ${t.filename}`,sandbox:J2,referrerPolicy:"no-referrer",srcDoc:n})]})]})})}function Zf(e){const{message:t}=e,[n,i]=S.useState(null),[s,l]=S.useState(0),a=Lx(t.wireId)??{id:t.wireId,dir:t.dir,filename:t.filename??"file",mime:t.mime??"application/octet-stream",size:s,date:t.date};S.useEffect(()=>{let h=!0,m=null;if(t.wireId)return Nl(t.wireId).then(p=>{!h||!p||(l(p.byteLength),m=URL.createObjectURL(new Blob([p],{type:Bd(a.mime,a.filename)})),i(m))}).catch(()=>{}),()=>{h=!1,m&&URL.revokeObjectURL(m)}},[t.wireId,a.mime,a.filename]);const c=Df(t)==="photo",d=qi(a.mime,a.filename);return v.jsxs("div",{className:"shared-media-item"+(c?" shared-photo-item":""),children:[v.jsxs("button",{className:"shared-media-jump",onClick:()=>e.onJump(e.messageKey),children:[c&&n?v.jsx("img",{src:n,alt:a.filename}):v.jsx("span",{className:"shared-media-icon",children:v.jsx(Se,{name:d?"mic":"copy",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:c?a.filename||"Photo":d?"Voice message":a.filename}),v.jsxs("span",{children:[e.versionLabel?`${e.versionLabel} · `:"",fs(a.date),s?` · ${Ar(s)}`:""]})]})]}),v.jsxs("span",{className:"shared-media-actions",children:[Tw(a.filename)&&n&&v.jsx("button",{className:"icon-btn",title:"Preview markdown",onClick:()=>e.onPreview(a),children:v.jsx(Se,{name:"monitor",size:16})}),Ll(a.filename,a.mime)&&n&&v.jsx("button",{className:"icon-btn",title:"Preview HTML",onClick:()=>e.onPreview(a),children:v.jsx(Se,{name:"monitor",size:16})}),v.jsx("a",{className:"icon-btn"+(n?"":" disabled"),href:n??void 0,download:a.filename,title:"Download",children:v.jsx(Se,{name:"download",size:16})})]})]})}function TD(e){const[t,n]=S.useState(!1);if(e.versions.length===1){const i=e.versions[0];return v.jsx(Zf,{message:i.message,messageKey:i.key,onJump:e.onJump,onPreview:e.onPreview})}return v.jsxs("div",{className:"file-version-stack"+(t?" expanded":""),children:[v.jsxs("button",{className:"file-version-stack-head",onClick:()=>n(i=>!i),children:[v.jsx("span",{className:"shared-media-icon",children:v.jsx(Se,{name:"copy",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:e.filename}),v.jsxs("span",{children:[e.versions.length," versions · newest ",fs(e.versions[0].message.date)]})]}),v.jsx(Se,{name:t?"chevronDown":"chevron",size:16})]}),t&&v.jsx("div",{className:"file-version-stack-list",children:e.versions.map((i,s)=>v.jsx(Zf,{message:i.message,messageKey:i.key,versionLabel:`Version ${e.versions.length-s}`,onJump:e.onJump,onPreview:e.onPreview},i.key))})]})}function PD(e){const[t,n]=S.useState("photo"),i=e.messages.map((h,m)=>({message:h,key:h.wireId||`${h.date}-${(e.indexOffset??0)+m}`})),s=i.filter(({message:h})=>Df(h)==="photo"),l=i.filter(({message:h})=>Df(h)==="file"),a=q2(l),c=i.flatMap(({message:h,key:m})=>h.kind==="file"?[]:K2(h.text).map(p=>({url:p,message:h,key:m}))),d=[{id:"photo",label:"Photos",count:s.length},{id:"file",label:"Files",count:l.length},{id:"link",label:"Links",count:c.length}];return v.jsx(Ps,{title:"Shared media",description:"Photos, files, and links from this conversation",onClose:e.onClose,wide:!0,className:"shared-media-modal",tabs:v.jsx("div",{className:"shared-media-tabs",role:"tablist","aria-label":"Shared media type",children:d.map(h=>v.jsxs("button",{role:"tab","aria-selected":t===h.id,className:t===h.id?"active":"",onClick:()=>n(h.id),children:[h.label," ",v.jsx("span",{children:h.count})]},h.id))}),children:v.jsxs("div",{className:"shared-media-list"+(t==="photo"?" photos":""),children:[t==="photo"&&s.map(h=>v.jsx(Zf,{message:h.message,messageKey:h.key,onJump:e.onJump,onPreview:e.onPreview},h.key)),t==="file"&&a.map(h=>v.jsx(TD,{filename:h.filename,versions:h.versions,onJump:e.onJump,onPreview:e.onPreview},h.filename)),t==="link"&&c.map((h,m)=>v.jsxs("div",{className:"shared-media-item",children:[v.jsxs("a",{className:"shared-media-jump",href:h.url,target:"_blank",rel:"noreferrer",children:[v.jsx("span",{className:"shared-media-icon",children:v.jsx(Se,{name:"link",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:h.url}),v.jsx("span",{children:fs(h.message.date)})]})]}),v.jsx("button",{className:"icon-btn",title:"Jump to message",onClick:()=>e.onJump(h.key),children:v.jsx(Se,{name:"reply",size:16})})]},`${h.key}-${h.url}-${m}`)),(t==="photo"&&s.length===0||t==="file"&&l.length===0||t==="link"&&c.length===0)&&v.jsxs("div",{className:"markdown-empty",children:["No ",t==="photo"?"photos":`${t}s`," in this chat yet."]})]})})}const RD=Object.freeze(["image/avif","image/bmp","image/heic","image/heif","image/jpeg","image/jpg","image/png","image/webp"]),AD=/\.(avif|bmp|heic|heif|jpe?g|png|webp)$/i;function t1(e,t=""){return RD.includes(String(e??"").toLowerCase())||AD.test(String(t??""))}function MD(e){return`${(String(e||"photo").trim()||"photo").replace(/\.[^./\\]+$/,"")||"photo"}.jpg`}function ND(e,t,n){const i=Math.max(1,Number(e)||1),s=Math.max(1,Number(t)||1),l=Math.max(1,Number(n)||1),a=Math.min(1,l/Math.max(i,s));return{width:Math.max(1,Math.round(i*a)),height:Math.max(1,Math.round(s*a))}}const jD=2048,DD=640,ID=.82,_D=[.84,.7,.56,.44],LD=.94;function OD(e){return new Promise((t,n)=>{const i=URL.createObjectURL(e),s=new Image,l=()=>URL.revokeObjectURL(i);s.onload=()=>t({image:s,release:l}),s.onerror=()=>{l(),n(new Error("This browser could not decode the selected image."))},s.src=i})}function FD(e,t){return new Promise((n,i)=>{e.toBlob(s=>s?n(s):i(new Error("This browser could not encode the optimized photo.")),"image/jpeg",t)})}async function zD(e,t){if(!t1(e.type,e.name))throw new Error("This image format cannot be optimized safely in this browser.");const n=Math.max(1,Math.floor(t*LD)),{image:i,release:s}=await OD(e),l=document.createElement("canvas"),a=l.getContext("2d",{alpha:!1});if(!a)throw s(),new Error("Photo optimization is unavailable in this browser.");try{let c=Math.min(jD,Math.max(i.naturalWidth,i.naturalHeight));for(;c>=DD;){const d=ND(i.naturalWidth,i.naturalHeight,c);l.width=d.width,l.height=d.height,a.fillStyle="#fff",a.fillRect(0,0,l.width,l.height),a.drawImage(i,0,0,l.width,l.height);for(const h of _D){const m=await FD(l,h);if(m.size<=n)return{filename:MD(e.name),mime:"image/jpeg",bytes:new Uint8Array(await m.arrayBuffer()),width:l.width,height:l.height,originalSize:e.size}}c=Math.floor(c*ID)}}finally{s(),l.width=1,l.height=1}throw new Error("The photo is still too large after optimization.")}const VD=5e4,BD=new Set(["http:","https:","mailto:"]);function n1(e){if(!(!e||e!==e.trim()||/[\u0000-\u001f\u007f]/u.test(e)))try{const t=new URL(e);return BD.has(t.protocol.toLowerCase())?e:void 0}catch{return}}function r1(e){const t="language-";return e?.startsWith(t)&&e.slice(t.length)||void 0}function $D(e){return e.split(/(\n[ \t]*\n)/).map(t=>{if(/^\n[ \t]*\n$/.test(t))return t;const n=t.split(`
307
+ `),i=n.filter(a=>a.trim().length>0);if(i.length===0)return t;const s=i.map(a=>a.match(/^[ \t]+/)?.[0]??"");if(s.some(a=>a.length===0))return t;const l=Math.min(...s.map(a=>a.length));return n.map(a=>a.trim().length>0?a.slice(l):a).join(`
308
+ `)}).join("")}function UD({children:e}){const t=S.isValidElement(e)?e:null,n=r1(t?.props.className);return v.jsxs("div",{className:"message-code-block","data-language":n||void 0,children:[n&&v.jsx("div",{className:"message-code-language",children:n}),v.jsx("pre",{children:e})]})}const WD=[e1],HD={a:({node:e,children:t,href:n,...i})=>{const s=n1(n);return s?v.jsx("a",{...i,href:s,target:"_blank",rel:"noopener noreferrer",children:t}):v.jsx("span",{className:"message-link-blocked",children:t})},img:({alt:e})=>v.jsxs("span",{className:"message-image-placeholder",children:["[image: ",e||"remote image blocked","]"]}),pre:UD,code:({node:e,className:t,children:n,...i})=>v.jsx("code",{className:t,"data-language":r1(t),...i,children:n})},ev=S.memo(function({text:t,className:n="bubble-text message-markdown"}){return t.length>VD?v.jsx("div",{className:`${n} message-markdown-plaintext`,"data-render-mode":"plaintext",children:t}):v.jsx("div",{className:n,"data-render-mode":"markdown",children:v.jsx(J0,{remarkPlugins:WD,components:HD,urlTransform:i=>n1(i)??"",children:$D(t)})})}),dh=S.createContext({});function hh(e){const t=S.useRef(null);return t.current===null&&(t.current=e()),t.current}const KD=typeof window<"u",ph=KD?S.useLayoutEffect:S.useEffect,zl=S.createContext(null);function mh(e,t){e.indexOf(t)===-1&&e.push(t)}function wl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Un=(e,t,n)=>n>t?t:n<e?e:n;let Vl=()=>{};const Nr={},i1=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),o1=e=>typeof e=="object"&&e!==null,s1=e=>/^0[^.\s]+$/u.test(e);function a1(e){let t;return()=>(t===void 0&&(t=e()),t)}const vn=e=>e,Rs=(...e)=>e.reduce((t,n)=>i=>n(t(i))),gs=(e,t,n)=>{const i=t-e;return i?(n-e)/i:1};class gh{constructor(){this.subscriptions=[]}add(t){return mh(this.subscriptions,t),()=>wl(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let l=0;l<s;l++){const a=this.subscriptions[l];a&&a(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const an=e=>e*1e3,yn=e=>e/1e3,l1=(e,t)=>t?e*(1e3/t):0,u1=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,qD=1e-7,XD=12;function YD(e,t,n,i,s){let l,a,c=0;do a=t+(n-t)/2,l=u1(a,i,s)-e,l>0?n=a:t=a;while(Math.abs(l)>qD&&++c<XD);return a}function As(e,t,n,i){if(e===t&&n===i)return vn;const s=l=>YD(l,0,1,e,n);return l=>l===0||l===1?l:u1(s(l),t,i)}const c1=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,f1=e=>t=>1-e(1-t),d1=As(.33,1.53,.69,.99),yh=f1(d1),h1=c1(yh),p1=e=>e>=1?1:(e*=2)<1?.5*yh(e):.5*(2-Math.pow(2,-10*(e-1))),vh=e=>1-Math.sin(Math.acos(e)),m1=f1(vh),g1=c1(vh),GD=As(.42,0,1,1),QD=As(0,0,.58,1),y1=As(.42,0,.58,1),ZD=e=>Array.isArray(e)&&typeof e[0]!="number",v1=e=>Array.isArray(e)&&typeof e[0]=="number",JD={linear:vn,easeIn:GD,easeInOut:y1,easeOut:QD,circIn:vh,circInOut:g1,circOut:m1,backIn:yh,backInOut:h1,backOut:d1,anticipate:p1},eI=e=>typeof e=="string",tv=e=>{if(v1(e)){Vl(e.length===4);const[t,n,i,s]=e;return As(t,n,i,s)}else if(eI(e))return JD[e];return e},Ga=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tI(e){let t=new Set,n=new Set,i=!1,s=!1;const l=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(h){l.has(h)&&(d.schedule(h),e()),h(a)}const d={schedule:(h,m=!1,p=!1)=>{const w=p&&i?t:n;return m&&l.add(h),w.add(h),h},cancel:h=>{n.delete(h),l.delete(h)},process:h=>{if(a=h,i){s=!0;return}i=!0;const m=t;t=n,n=m,t.forEach(c),t.clear(),i=!1,s&&(s=!1,d.process(h))}};return d}const nI=40;function x1(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,a=Ga.reduce((A,L)=>(A[L]=tI(l),A),{}),{setup:c,read:d,resolveKeyframes:h,preUpdate:m,update:p,preRender:y,render:w,postRender:k}=a,C=()=>{const A=Nr.useManualTiming,L=A?s.timestamp:performance.now();n=!1,A||(s.delta=i?1e3/60:Math.max(Math.min(L-s.timestamp,nI),1)),s.timestamp=L,s.isProcessing=!0,c.process(s),d.process(s),h.process(s),m.process(s),p.process(s),y.process(s),w.process(s),k.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(C))},T=()=>{n=!0,i=!0,s.isProcessing||e(C)};return{schedule:Ga.reduce((A,L)=>{const U=a[L];return A[L]=(D,Y=!1,W=!1)=>(n||T(),U.schedule(D,Y,W)),A},{}),cancel:A=>{for(let L=0;L<Ga.length;L++)a[Ga[L]].cancel(A)},state:s,steps:a}}const{schedule:Ye,cancel:jr,state:Et,steps:rf}=x1(typeof requestAnimationFrame<"u"?requestAnimationFrame:vn,!0);let ol;function rI(){ol=void 0}const Vt={now:()=>(ol===void 0&&Vt.set(Et.isProcessing||Nr.useManualTiming?Et.timestamp:performance.now()),ol),set:e=>{ol=e,queueMicrotask(rI)}},w1=e=>t=>typeof t=="string"&&t.startsWith(e),k1=w1("--"),iI=w1("var(--"),xh=e=>iI(e)?oI.test(e.split("/*")[0].trim()):!1,oI=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function nv(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const no={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ys={...no,transform:e=>Un(0,1,e)},Qa={...no,default:1},rs=e=>Math.round(e*1e5)/1e5,wh=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sI(e){return e==null}const aI=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kh=(e,t)=>n=>!!(typeof n=="string"&&aI.test(n)&&n.startsWith(e)||t&&!sI(n)&&Object.prototype.hasOwnProperty.call(n,t)),S1=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,l,a,c]=i.match(wh);return{[e]:parseFloat(s),[t]:parseFloat(l),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},lI=e=>Un(0,255,e),of={...no,transform:e=>Math.round(lI(e))},ti={test:kh("rgb","red"),parse:S1("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+of.transform(e)+", "+of.transform(t)+", "+of.transform(n)+", "+rs(ys.transform(i))+")"};function uI(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Jf={test:kh("#"),parse:uI,transform:ti.transform},Ms=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),er=Ms("deg"),$n=Ms("%"),ke=Ms("px"),cI=Ms("vh"),fI=Ms("vw"),rv={...$n,parse:e=>$n.parse(e)/100,transform:e=>$n.transform(e*100)},Ui={test:kh("hsl","hue"),parse:S1("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+$n.transform(rs(t))+", "+$n.transform(rs(n))+", "+rs(ys.transform(i))+")"},pt={test:e=>ti.test(e)||Jf.test(e)||Ui.test(e),parse:e=>ti.test(e)?ti.parse(e):Ui.test(e)?Ui.parse(e):Jf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ti.transform(e):Ui.transform(e),getAnimatableNone:e=>{const t=pt.parse(e);return t.alpha=0,pt.transform(t)}},dI=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function hI(e){return isNaN(e)&&typeof e=="string"&&(e.match(wh)?.length||0)+(e.match(dI)?.length||0)>0}const b1="number",C1="color",pI="var",mI="var(",iv="${}",gI=/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 Gi(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let l=0;const c=t.replace(gI,d=>(pt.test(d)?(i.color.push(l),s.push(C1),n.push(pt.parse(d))):d.startsWith(mI)?(i.var.push(l),s.push(pI),n.push(d)):(i.number.push(l),s.push(b1),n.push(parseFloat(d))),++l,iv)).split(iv);return{values:n,split:c,indexes:i,types:s}}function yI(e){return Gi(e).values}function E1({split:e,types:t}){const n=e.length;return i=>{let s="";for(let l=0;l<n;l++)if(s+=e[l],i[l]!==void 0){const a=t[l];a===b1?s+=rs(i[l]):a===C1?s+=pt.transform(i[l]):s+=i[l]}return s}}function vI(e){return E1(Gi(e))}const xI=e=>typeof e=="number"?0:pt.test(e)?pt.getAnimatableNone(e):e,wI=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:xI(e);function kI(e){const t=Gi(e);return E1(t)(t.values.map((i,s)=>wI(i,t.split[s])))}const Nn={test:hI,parse:yI,createTransformer:vI,getAnimatableNone:kI};function sf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function SI({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,l=0,a=0;if(!t)s=l=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,d=2*n-c;s=sf(d,c,e+1/3),l=sf(d,c,e),a=sf(d,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(l*255),blue:Math.round(a*255),alpha:i}}function kl(e,t){return n=>n>0?t:e}const Xe=(e,t,n)=>e+(t-e)*n,af=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},bI=[Jf,ti,Ui],CI=e=>bI.find(t=>t.test(e));function ov(e){const t=CI(e);if(!t)return!1;let n=t.parse(e);return t===Ui&&(n=SI(n)),n}const sv=(e,t)=>{const n=ov(e),i=ov(t);if(!n||!i)return kl(e,t);const s={...n};return l=>(s.red=af(n.red,i.red,l),s.green=af(n.green,i.green,l),s.blue=af(n.blue,i.blue,l),s.alpha=Xe(n.alpha,i.alpha,l),ti.transform(s))},ed=new Set(["none","hidden"]);function EI(e,t){return ed.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function TI(e,t){return n=>Xe(e,t,n)}function Sh(e){return typeof e=="number"?TI:typeof e=="string"?xh(e)?kl:pt.test(e)?sv:AI:Array.isArray(e)?T1:typeof e=="object"?pt.test(e)?sv:PI:kl}function T1(e,t){const n=[...e],i=n.length,s=e.map((l,a)=>Sh(l)(l,t[a]));return l=>{for(let a=0;a<i;a++)n[a]=s[a](l);return n}}function PI(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=Sh(e[s])(e[s],t[s]));return s=>{for(const l in i)n[l]=i[l](s);return n}}function RI(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const l=t.types[s],a=e.indexes[l][i[l]],c=e.values[a]??0;n[s]=c,i[l]++}return n}const AI=(e,t)=>{const n=Nn.createTransformer(t),i=Gi(e),s=Gi(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?ed.has(e)&&!s.values.length||ed.has(t)&&!i.values.length?EI(e,t):Rs(T1(RI(i,s),s.values),n):kl(e,t)};function P1(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Xe(e,t,n):Sh(e)(e,t)}const MI=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Ye.update(t,n),stop:()=>jr(t),now:()=>Et.isProcessing?Et.timestamp:Vt.now()}},R1=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let l=0;l<s;l++)i+=Math.round(e(l/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Sl=2e4;function bh(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<Sl;)t+=n,i=e.next(t);return t>=Sl?1/0:t}function NI(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(bh(i),Sl);return{type:"keyframes",ease:l=>i.next(s*l).value/t,duration:yn(s)}}const at={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 td(e,t){return e*Math.sqrt(1-t*t)}const jI=12;function DI(e,t,n){let i=n;for(let s=1;s<jI;s++)i=i-e(i)/t(i);return i}const lf=.001;function II({duration:e=at.duration,bounce:t=at.bounce,velocity:n=at.velocity,mass:i=at.mass}){let s,l,a=1-t;a=Un(at.minDamping,at.maxDamping,a),e=Un(at.minDuration,at.maxDuration,yn(e)),a<1?(s=h=>{const m=h*a,p=m*e,y=m-n,w=td(h,a),k=Math.exp(-p);return lf-y/w*k},l=h=>{const p=h*a*e,y=p*n+n,w=Math.pow(a,2)*Math.pow(h,2)*e,k=Math.exp(-p),C=td(Math.pow(h,2),a);return(-s(h)+lf>0?-1:1)*((y-w)*k)/C}):(s=h=>{const m=Math.exp(-h*e),p=(h-n)*e+1;return-lf+m*p},l=h=>{const m=Math.exp(-h*e),p=(n-h)*(e*e);return m*p});const c=5/e,d=DI(s,l,c);if(e=an(e),isNaN(d))return{stiffness:at.stiffness,damping:at.damping,duration:e};{const h=Math.pow(d,2)*i;return{stiffness:h,damping:a*2*Math.sqrt(i*h),duration:e}}}const _I=["duration","bounce"],LI=["stiffness","damping","mass"];function av(e,t){return t.some(n=>e[n]!==void 0)}function OI(e){let t={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...e};if(!av(e,LI)&&av(e,_I))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,l=2*Un(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:at.mass,stiffness:s,damping:l}}else{const n=II({...e,velocity:0});t={...t,...n,mass:at.mass},t.isResolvedFromDuration=!0}return t}function bl(e=at.visualDuration,t=at.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const l=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:l},{stiffness:d,damping:h,mass:m,duration:p,velocity:y,isResolvedFromDuration:w}=OI({...n,velocity:-yn(n.velocity||0)}),k=y||0,C=h/(2*Math.sqrt(d*m)),T=a-l,E=yn(Math.sqrt(d/m)),M=Math.abs(T)<5;i||(i=M?at.restSpeed.granular:at.restSpeed.default),s||(s=M?at.restDelta.granular:at.restDelta.default);let A,L,U,D,Y,W;if(C<1)U=td(E,C),D=(k+C*E*T)/U,A=j=>{const G=Math.exp(-C*E*j);return a-G*(D*Math.sin(U*j)+T*Math.cos(U*j))},Y=C*E*D+T*U,W=C*E*T-D*U,L=j=>Math.exp(-C*E*j)*(Y*Math.sin(U*j)+W*Math.cos(U*j));else if(C===1){A=G=>a-Math.exp(-E*G)*(T+(k+E*T)*G);const j=k+E*T;L=G=>Math.exp(-E*G)*(E*j*G-k)}else{const j=E*Math.sqrt(C*C-1);A=ie=>{const ee=Math.exp(-C*E*ie),ve=Math.min(j*ie,300);return a-ee*((k+C*E*T)*Math.sinh(ve)+j*T*Math.cosh(ve))/j};const G=(k+C*E*T)/j,V=C*E*G-T*j,fe=C*E*T-G*j;L=ie=>{const ee=Math.exp(-C*E*ie),ve=Math.min(j*ie,300);return ee*(V*Math.sinh(ve)+fe*Math.cosh(ve))}}const X={calculatedDuration:w&&p||null,velocity:j=>an(L(j)),next:j=>{if(!w&&C<1){const V=Math.exp(-C*E*j),fe=Math.sin(U*j),ie=Math.cos(U*j),ee=a-V*(D*fe+T*ie),ve=an(V*(Y*fe+W*ie));return c.done=Math.abs(ve)<=i&&Math.abs(a-ee)<=s,c.value=c.done?a:ee,c}const G=A(j);if(w)c.done=j>=p;else{const V=an(L(j));c.done=Math.abs(V)<=i&&Math.abs(a-G)<=s}return c.value=c.done?a:G,c},toString:()=>{const j=Math.min(bh(X),Sl),G=R1(V=>X.next(j*V).value,j,30);return j+"ms "+G},toTransition:()=>{}};return X}bl.applyToOptions=e=>{const t=NI(e,100,bl);return e.ease=t.ease,e.duration=an(t.duration),e.type="keyframes",e};const FI=5;function A1(e,t,n){const i=Math.max(t-FI,0);return l1(n-e(i),t-i)}function nd({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:l=500,modifyTarget:a,min:c,max:d,restDelta:h=.5,restSpeed:m}){const p=e[0],y={done:!1,value:p},w=W=>c!==void 0&&W<c||d!==void 0&&W>d,k=W=>c===void 0?d:d===void 0||Math.abs(c-W)<Math.abs(d-W)?c:d;let C=n*t;const T=p+C,E=a===void 0?T:a(T);E!==T&&(C=E-p);const M=W=>-C*Math.exp(-W/i),A=W=>E+M(W),L=W=>{const X=M(W),j=A(W);y.done=Math.abs(X)<=h,y.value=y.done?E:j};let U,D;const Y=W=>{w(y.value)&&(U=W,D=bl({keyframes:[y.value,k(y.value)],velocity:A1(A,W,y.value),damping:s,stiffness:l,restDelta:h,restSpeed:m}))};return Y(0),{calculatedDuration:null,next:W=>{let X=!1;return!D&&U===void 0&&(X=!0,L(W),Y(W)),U!==void 0&&W>=U?D.next(W-U):(!X&&L(W),y)}}}function zI(e,t,n){const i=[],s=n||Nr.mix||P1,l=e.length-1;for(let a=0;a<l;a++){let c=s(e[a],e[a+1]);if(t){const d=Array.isArray(t)?t[a]||vn:t;c=Rs(d,c)}i.push(c)}return i}function VI(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const l=e.length;if(Vl(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=zI(t,i,s),d=c.length,h=m=>{if(a&&m<e[0])return t[0];let p=0;if(d>1)for(;p<e.length-2&&!(m<e[p+1]);p++);const y=gs(e[p],e[p+1],m);return c[p](y)};return n?m=>h(Un(e[0],e[l-1],m)):h}function BI(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=gs(0,t,i);e.push(Xe(n,1,s))}}function $I(e){const t=[0];return BI(t,e.length-1),t}function UI(e,t){return e.map(n=>n*t)}function WI(e,t){return e.map(()=>t||y1).splice(0,e.length-1)}function is({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=ZD(i)?i.map(tv):tv(i),l={done:!1,value:t[0]},a=UI(n&&n.length===t.length?n:$I(t),e),c=VI(a,t,{ease:Array.isArray(s)?s:WI(t,s)});return{calculatedDuration:e,next:d=>(l.value=c(d),l.done=d>=e,l)}}const HI=e=>e!==null;function Bl(e,{repeat:t,repeatType:n="loop"},i,s=1){const l=e.filter(HI),c=s<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!c||i===void 0?l[c]:i}const KI={decay:nd,inertia:nd,tween:is,keyframes:is,spring:bl};function M1(e){typeof e.type=="string"&&(e.type=KI[e.type])}class Ch{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const qI=e=>e/100;class Cl extends Ch{constructor(t){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=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Vt.now()&&this.tick(Vt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;M1(t);const{type:n=is,repeat:i=0,repeatDelay:s=0,repeatType:l,velocity:a=0}=t;let{keyframes:c}=t;const d=n||is;d!==is&&typeof c[0]!="number"&&(this.mixKeyframes=Rs(qI,P1(c[0],c[1])),c=[0,100]);const h=d({...t,keyframes:c});l==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...c].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=bh(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:l,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:d}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:p,repeatType:y,repeatDelay:w,type:k,onUpdate:C,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const E=this.currentTime-h*(this.playbackSpeed>=0?1:-1),M=this.playbackSpeed>=0?E<0:E>s;this.currentTime=Math.max(E,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let A=this.currentTime,L=i;if(p){const W=Math.min(this.currentTime,s)/c;let X=Math.floor(W),j=W%1;!j&&W>=1&&(j=1),j===1&&X--,X=Math.min(X,p+1),!!(X%2)&&(y==="reverse"?(j=1-j,w&&(j-=w/c)):y==="mirror"&&(L=a)),A=Un(0,1,j)*c}let U;M?(this.delayState.value=m[0],U=this.delayState):U=L.next(A),l&&!M&&(U.value=l(U.value));let{done:D}=U;!M&&d!==null&&(D=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const Y=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return Y&&k!==nd&&(U.value=Bl(m,this.options,T,this.speed)),C&&C(U.value),Y&&this.finish(),U}then(t,n){return this.finished.then(t,n)}get duration(){return yn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+yn(t)}get time(){return yn(this.currentTime)}set time(t){t=an(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return A1(i=>this.generator.next(i).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Vt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=yn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=MI,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Vt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function XI(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ni=e=>e*180/Math.PI,rd=e=>{const t=ni(Math.atan2(e[1],e[0]));return id(t)},YI={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:rd,rotateZ:rd,skewX:e=>ni(Math.atan(e[1])),skewY:e=>ni(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},id=e=>(e=e%360,e<0&&(e+=360),e),lv=rd,uv=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),cv=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),GI={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:uv,scaleY:cv,scale:e=>(uv(e)+cv(e))/2,rotateX:e=>id(ni(Math.atan2(e[6],e[5]))),rotateY:e=>id(ni(Math.atan2(-e[2],e[0]))),rotateZ:lv,rotate:lv,skewX:e=>ni(Math.atan(e[4])),skewY:e=>ni(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function od(e){return e.includes("scale")?1:0}function sd(e,t){if(!e||e==="none")return od(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=GI,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=YI,s=c}if(!s)return od(t);const l=i[t],a=s[1].split(",").map(ZI);return typeof l=="function"?l(a):a[l]}const QI=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return sd(n,t)};function ZI(e){return parseFloat(e.trim())}const ro=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],io=new Set([...ro,"pathRotation"]),fv=e=>e===no||e===ke,JI=new Set(["x","y","z"]),e_=ro.filter(e=>!JI.has(e));function t_(e){const t=[];return e_.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Pr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>sd(t,"x"),y:(e,{transform:t})=>sd(t,"y")};Pr.translateX=Pr.x;Pr.translateY=Pr.y;const oi=new Set;let ad=!1,ld=!1,ud=!1;function N1(){if(ld){const e=Array.from(oi).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=t_(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([l,a])=>{i.getValue(l)?.set(a)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}ld=!1,ad=!1,oi.forEach(e=>e.complete(ud)),oi.clear()}function j1(){oi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ld=!0)})}function n_(){ud=!0,j1(),N1(),ud=!1}class Eh{constructor(t,n,i,s,l,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=l,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(oi.add(this),ad||(ad=!0,Ye.read(j1),Ye.resolveKeyframes(N1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const l=s?.get(),a=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&n){const c=i.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),s&&l===void 0&&s.set(t[0])}XI(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),oi.delete(this)}cancel(){this.state==="scheduled"&&(oi.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const r_=e=>e.startsWith("--");function D1(e,t,n){r_(t)?e.style.setProperty(t,n):e.style[t]=n}const i_={};function I1(e,t){const n=a1(e);return()=>i_[t]??n()}const o_=I1(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),_1=I1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Zo=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,dv={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zo([0,.65,.55,1]),circOut:Zo([.55,0,1,.45]),backIn:Zo([.31,.01,.66,-.59]),backOut:Zo([.33,1.53,.69,.99])};function L1(e,t){if(e)return typeof e=="function"?_1()?R1(e,t):"ease-out":v1(e)?Zo(e):Array.isArray(e)?e.map(n=>L1(n,t)||dv.easeOut):dv[e]}function s_(e,t,n,{delay:i=0,duration:s=300,repeat:l=0,repeatType:a="loop",ease:c="easeOut",times:d}={},h=void 0){const m={[t]:n};d&&(m.offset=d);const p=L1(c,s);Array.isArray(p)&&(m.easing=p);const y={delay:i,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:l+1,direction:a==="reverse"?"alternate":"normal"};return h&&(y.pseudoElement=h),e.animate(m,y)}function O1(e){return typeof e=="function"&&"applyToOptions"in e}function a_({type:e,...t}){return O1(e)&&_1()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class F1 extends Ch{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:l,allowFlatten:a=!1,finalKeyframe:c,onComplete:d}=t;this.isPseudoElement=!!l,this.allowFlatten=a,this.options=t,Vl(typeof t.type!="string");const h=a_(t);this.animation=s_(n,i,s,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=Bl(s,this.options,c,this.speed);this.updateMotionValue&&this.updateMotionValue(m),D1(n,i,m),this.animation.cancel()}d?.(),this.notifyFinished()}}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;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return yn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+yn(t)}get time(){return yn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=an(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&o_()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),vn):s(this)}}const z1={anticipate:p1,backInOut:h1,circInOut:g1};function l_(e){return e in z1}function u_(e){typeof e.ease=="string"&&l_(e.ease)&&(e.ease=z1[e.ease])}const uf=10;class c_ extends F1{constructor(t){u_(t),M1(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:l,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Cl({...a,autoplay:!1}),d=Math.max(uf,Vt.now()-this.startTime),h=Un(0,uf,d-uf),m=c.sample(d).value,{name:p}=this.options;l&&p&&D1(l,p,m),n.setWithVelocity(c.sample(Math.max(0,d-h)).value,m,h),c.stop()}}const hv=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Nn.test(e)||e==="0")&&!e.startsWith("url("));function f_(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function d_(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],a=hv(s,t),c=hv(l,t);return!a||!c?!1:f_(e)||(n==="spring"||O1(n))&&i}function cd(e){e.duration=0,e.type="keyframes"}const V1=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),h_=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function p_(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&h_.test(e[t]))return!0;return!1}const m_=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),g_=a1(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function y_(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:l,type:a,keyframes:c}=e,d=t?.owner?.current;if(!(d instanceof HTMLElement)&&!(d instanceof SVGElement))return!1;const{onUpdate:h,transformTemplate:m}=t.owner.getProps();return g_()&&n&&(V1.has(n)||m_.has(n)&&p_(c))&&(n!=="transform"||!m)&&!h&&!i&&s!=="mirror"&&l!==0&&a!=="inertia"}const v_=40;class x_ extends Ch{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:a="loop",keyframes:c,name:d,motionValue:h,element:m,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Vt.now();const y={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:l,repeatType:a,name:d,motionValue:h,element:m,...p},w=m?.KeyframeResolver||Eh;this.keyframeResolver=new w(c,(k,C,T)=>this.onKeyframesResolved(k,C,y,!T),d,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:l,type:a,velocity:c,delay:d,isHandoff:h,onUpdate:m}=i;this.resolvedAt=Vt.now();let p=!0;d_(t,l,a,c)||(p=!1,(Nr.instantAnimations||!d)&&m?.(Bl(t,i,n)),t[0]=t[t.length-1],cd(i),i.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>v_?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},k=p&&!h&&y_(w),C=w.motionValue?.owner?.current;let T;if(k)try{T=new c_({...w,element:C})}catch{T=new Cl(w)}else T=new Cl(w);T.finished.then(()=>{this.notifyFinished()}).catch(vn),this.pendingTimeline&&(this.stopTimeline=T.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=T}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),n_()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function B1(e,t,n,i=0,s=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),a=e.size,c=(a-1)*i;return typeof n=="function"?n(l,a):s===1?l*i:c-l*i}const pv=30,w_=e=>!isNaN(parseFloat(e));class k_{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=Vt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Vt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=w_(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new gh);const i=this.events[t].add(n);return t==="change"?()=>{i(),Ye.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Vt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>pv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,pv);return l1(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qi(e,t){return new k_(e,t)}function $1(e,t){if(e?.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function Th(e,t){const n=e?.[t]??e?.default??e;return n!==e?$1(n,e):n}const S_={type:"spring",stiffness:500,damping:25,restSpeed:10},b_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),C_={type:"keyframes",duration:.8},E_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},T_=(e,{keyframes:t})=>t.length>2?C_:io.has(e)?e.startsWith("scale")?b_(t[1]):S_:E_,P_=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function R_(e){for(const t in e)if(!P_.has(t))return!0;return!1}const Ph=(e,t,n,i={},s,l)=>a=>{const c=Th(i,e)||{},d=c.delay||i.delay||0;let{elapsed:h=0}=i;h=h-an(d);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-h,onUpdate:y=>{t.set(y),c.onUpdate&&c.onUpdate(y)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:l?void 0:s};R_(c)||Object.assign(m,T_(e,m)),m.duration&&(m.duration=an(m.duration)),m.repeatDelay&&(m.repeatDelay=an(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let p=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(cd(m),m.delay===0&&(p=!0)),(Nr.instantAnimations||Nr.skipAnimations||s?.shouldSkipAnimations||c.skipAnimations)&&(p=!0,cd(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,p&&!l&&t.get()!==void 0){const y=Bl(m.keyframes,c);if(y!==void 0){Ye.update(()=>{m.onUpdate(y),m.onComplete()});return}}return c.isSync?new Cl(m):new x_(m)},A_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function M_(e){const t=A_.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}function U1(e,t,n=1){const[i,s]=M_(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const a=l.trim();return i1(a)?parseFloat(a):a}return xh(s)?U1(s,t,n+1):s}function mv(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function Rh(e,t,n,i){if(typeof t=="function"){const[s,l]=mv(i);t=t(n!==void 0?n:e.custom,s,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,l]=mv(i);t=t(n!==void 0?n:e.custom,s,l)}return t}function si(e,t,n){const i=e.getProps();return Rh(i,t,n!==void 0?n:i.custom,e)}const W1=new Set(["width","height","top","left","right","bottom",...ro]),fd=e=>Array.isArray(e);function N_(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qi(n))}function j_(e){return fd(e)?e[e.length-1]||0:e}function D_(e,t){const n=si(e,t);let{transitionEnd:i={},transition:s={},...l}=n||{};l={...l,...i};for(const a in l){const c=j_(l[a]);N_(e,a,c)}}const Tt=e=>!!(e&&e.getVelocity);function I_(e){return!!(Tt(e)&&e.add)}function dd(e,t){const n=e.getValue("willChange");if(I_(n))return n.add(t);if(!n&&Nr.WillChange){const i=new Nr.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Ah(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const __="framerAppearId",H1="data-"+Ah(__);function K1(e){return e.props[H1]}function L_({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function q1(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:l,transitionEnd:a,...c}=t;const d=e.getDefaultTransition();l=l?$1(l,d):d;const h=l?.reduceMotion,m=l?.skipAnimations;i&&(l=i);const p=[],y=s&&e.animationState&&e.animationState.getState()[s],w=l?.path;w&&w.animateVisualElement(e,c,l,n,p);for(const k in c){const C=e.getValue(k,e.latestValues[k]??null),T=c[k];if(T===void 0||y&&L_(y,k))continue;const E={delay:n,...Th(l||{},k)};m&&(E.skipAnimations=!0);const M=C.get();if(M!==void 0&&!C.isAnimating()&&!Array.isArray(T)&&T===M&&!E.velocity){Ye.update(()=>C.set(T));continue}let A=!1;if(window.MotionHandoffAnimation){const D=K1(e);if(D){const Y=window.MotionHandoffAnimation(D,k,Ye);Y!==null&&(E.startTime=Y,A=!0)}}dd(e,k);const L=h??e.shouldReduceMotion;C.start(Ph(k,C,T,L&&W1.has(k)?{type:!1}:E,e,A));const U=C.animation;U&&p.push(U)}if(a){const k=()=>Ye.update(()=>{a&&D_(e,a)});p.length?Promise.all(p).then(k):k()}return p}function hd(e,t,n={}){const i=si(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const l=i?()=>Promise.all(q1(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:p}=s;return O_(e,t,d,h,m,p,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[d,h]=c==="beforeChildren"?[l,a]:[a,l];return d().then(()=>h())}else return Promise.all([l(),a(n.delay)])}function O_(e,t,n=0,i=0,s=0,l=1,a){const c=[];for(const d of e.variantChildren)d.notify("AnimationStart",t),c.push(hd(d,t,{...a,delay:n+(typeof i=="function"?0:i)+B1(e.variantChildren,d,i,s,l)}).then(()=>d.notify("AnimationComplete",t)));return Promise.all(c)}function F_(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(l=>hd(e,l,n));i=Promise.all(s)}else if(typeof t=="string")i=hd(e,t,n);else{const s=typeof t=="function"?si(e,t,n.custom):t;i=Promise.all(q1(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const z_={test:e=>e==="auto",parse:e=>e},X1=e=>t=>t.test(e),Y1=[no,ke,$n,er,fI,cI,z_],gv=e=>Y1.find(X1(e));function V_(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||s1(e):!0}const B_=new Set(["brightness","contrast","saturate","opacity"]);function $_(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(wh)||[];if(!i)return e;const s=n.replace(i,"");let l=B_.has(t)?1:0;return i!==n&&(l*=100),t+"("+l+s+")"}const U_=/\b([a-z-]*)\(.*?\)/gu,pd={...Nn,getAnimatableNone:e=>{const t=e.match(U_);return t?t.map($_).join(" "):e}},md={...Nn,getAnimatableNone:e=>{const t=Nn.parse(e);return Nn.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},yv={...no,transform:Math.round},W_={rotate:er,pathRotation:er,rotateX:er,rotateY:er,rotateZ:er,scale:Qa,scaleX:Qa,scaleY:Qa,scaleZ:Qa,skew:er,skewX:er,skewY:er,distance:ke,translateX:ke,translateY:ke,translateZ:ke,x:ke,y:ke,z:ke,perspective:ke,transformPerspective:ke,opacity:ys,originX:rv,originY:rv,originZ:ke},El={borderWidth:ke,borderTopWidth:ke,borderRightWidth:ke,borderBottomWidth:ke,borderLeftWidth:ke,borderRadius:ke,borderTopLeftRadius:ke,borderTopRightRadius:ke,borderBottomRightRadius:ke,borderBottomLeftRadius:ke,width:ke,maxWidth:ke,height:ke,maxHeight:ke,top:ke,right:ke,bottom:ke,left:ke,inset:ke,insetBlock:ke,insetBlockStart:ke,insetBlockEnd:ke,insetInline:ke,insetInlineStart:ke,insetInlineEnd:ke,padding:ke,paddingTop:ke,paddingRight:ke,paddingBottom:ke,paddingLeft:ke,paddingBlock:ke,paddingBlockStart:ke,paddingBlockEnd:ke,paddingInline:ke,paddingInlineStart:ke,paddingInlineEnd:ke,margin:ke,marginTop:ke,marginRight:ke,marginBottom:ke,marginLeft:ke,marginBlock:ke,marginBlockStart:ke,marginBlockEnd:ke,marginInline:ke,marginInlineStart:ke,marginInlineEnd:ke,fontSize:ke,backgroundPositionX:ke,backgroundPositionY:ke,...W_,zIndex:yv,fillOpacity:ys,strokeOpacity:ys,numOctaves:yv},H_={...El,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:pd,WebkitFilter:pd,mask:md,WebkitMask:md},G1=e=>H_[e],K_=new Set([pd,md]);function Q1(e,t){let n=G1(e);return K_.has(n)||(n=Nn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const q_=new Set(["auto","none","0"]);function X_(e,t,n){let i=0,s;for(;i<e.length&&!s;){const l=e[i];typeof l=="string"&&!q_.has(l)&&Gi(l).values.length&&(s=e[i]),i++}if(s&&n)for(const l of t)e[l]=Q1(n,s)}class Y_ extends Eh{constructor(t,n,i,s,l){super(t,n,i,s,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let p=t[m];if(typeof p=="string"&&(p=p.trim(),xh(p))){const y=U1(p,n.current);y!==void 0&&(t[m]=y),m===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!W1.has(i)||t.length!==2)return;const[s,l]=t,a=gv(s),c=gv(l),d=nv(s),h=nv(l);if(d!==h&&Pr[i]){this.needsMeasurement=!0;return}if(a!==c)if(fv(a)&&fv(c))for(let m=0;m<t.length;m++){const p=t[m];typeof p=="string"&&(t[m]=parseFloat(p))}else Pr[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||V_(t[s]))&&i.push(s);i.length&&X_(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pr[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const l=i.length-1,a=i[l];i[l]=Pr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,d])=>{t.getValue(c).set(d)}),this.resolveNoneKeyframes()}}const Mh=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Z1(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const gd=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function sl(e){return o1(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Nh}=x1(queueMicrotask,!1),An={x:!1,y:!1};function J1(){return An.x||An.y}function G_(e){return e==="x"||e==="y"?An[e]?null:(An[e]=!0,()=>{An[e]=!1}):An.x||An.y?null:(An.x=An.y=!0,()=>{An.x=An.y=!1})}function ek(e,t){const n=Z1(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function Q_(e){return!(e.pointerType==="touch"||J1())}function Z_(e,t,n={}){const[i,s,l]=ek(e,n);return i.forEach(a=>{let c=!1,d=!1,h;const m=()=>{a.removeEventListener("pointerleave",k)},p=T=>{h&&(h(T),h=void 0),m()},y=T=>{c=!1,window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),d&&(d=!1,p(T))},w=()=>{c=!0,window.addEventListener("pointerup",y,s),window.addEventListener("pointercancel",y,s)},k=T=>{if(T.pointerType!=="touch"){if(c){d=!0;return}p(T)}},C=T=>{if(!Q_(T))return;d=!1;const E=t(a,T);typeof E=="function"&&(h=E,a.addEventListener("pointerleave",k,s))};a.addEventListener("pointerenter",C,s),a.addEventListener("pointerdown",w,s)}),l}const tk=(e,t)=>t?e===t?!0:tk(e,t.parentElement):!1,jh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,J_=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function eL(e){return J_.has(e.tagName)||e.isContentEditable===!0}const tL=new Set(["INPUT","SELECT","TEXTAREA"]);function nL(e){return tL.has(e.tagName)||e.isContentEditable===!0}const al=new WeakSet;function vv(e){return t=>{t.key==="Enter"&&e(t)}}function cf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const rL=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=vv(()=>{if(al.has(n))return;cf(n,"down");const s=vv(()=>{cf(n,"up")}),l=()=>cf(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function xv(e){return jh(e)&&!J1()}const wv=new WeakSet;function iL(e,t,n={}){const[i,s,l]=ek(e,n),a=c=>{const d=c.currentTarget;if(!xv(c)||wv.has(c))return;al.add(d),n.stopPropagation&&wv.add(c);const h=t(d,c),m={...s,capture:!0},p=(k,C)=>{window.removeEventListener("pointerup",y,m),window.removeEventListener("pointercancel",w,m),al.has(d)&&al.delete(d),xv(k)&&typeof h=="function"&&h(k,{success:C})},y=k=>{p(k,d===window||d===document||n.useGlobalTarget||tk(d,k.target))},w=k=>{p(k,!1)};window.addEventListener("pointerup",y,m),window.addEventListener("pointercancel",w,m)};return i.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,s),sl(c)&&(c.addEventListener("focus",h=>rL(h,s)),!eL(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),l}function Dh(e){return o1(e)&&"ownerSVGElement"in e}const ll=new WeakMap;let ul;const nk=(e,t,n)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:Dh(i)&&"getBBox"in i?i.getBBox()[t]:i[n],oL=nk("inline","width","offsetWidth"),sL=nk("block","height","offsetHeight");function aL({target:e,borderBoxSize:t}){ll.get(e)?.forEach(n=>{n(e,{get width(){return oL(e,t)},get height(){return sL(e,t)}})})}function lL(e){e.forEach(aL)}function uL(){typeof ResizeObserver>"u"||(ul=new ResizeObserver(lL))}function cL(e,t){ul||uL();const n=Z1(e);return n.forEach(i=>{let s=ll.get(i);s||(s=new Set,ll.set(i,s)),s.add(t),ul?.observe(i)}),()=>{n.forEach(i=>{const s=ll.get(i);s?.delete(t),s?.size||ul?.unobserve(i)})}}const cl=new Set;let Wi;function fL(){Wi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};cl.forEach(t=>t(e))},window.addEventListener("resize",Wi)}function dL(e){return cl.add(e),Wi||fL(),()=>{cl.delete(e),!cl.size&&typeof Wi=="function"&&(window.removeEventListener("resize",Wi),Wi=void 0)}}function kv(e,t){return typeof e=="function"?dL(e):cL(e,t)}function hL(e){return Dh(e)&&e.tagName==="svg"}const pL=[...Y1,pt,Nn],mL=e=>pL.find(X1(e)),Sv=()=>({translate:0,scale:1,origin:0,originPoint:0}),Hi=()=>({x:Sv(),y:Sv()}),bv=()=>({min:0,max:0}),yt=()=>({x:bv(),y:bv()}),gL=new WeakMap;function $l(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function vs(e){return typeof e=="string"||Array.isArray(e)}const Ih=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_h=["initial",...Ih];function Ul(e){return $l(e.animate)||_h.some(t=>vs(e[t]))}function rk(e){return!!(Ul(e)||e.variants)}function yL(e,t,n){for(const i in t){const s=t[i],l=n[i];if(Tt(s))e.addValue(i,s);else if(Tt(l))e.addValue(i,Qi(s,{owner:e}));else if(l!==s)if(e.hasValue(i)){const a=e.getValue(i);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(i);e.addValue(i,Qi(a!==void 0?a:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const yd={current:null},ik={current:!1},vL=typeof window<"u";function xL(){if(ik.current=!0,!!vL)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yd.current=e.matches;e.addEventListener("change",t),t()}else yd.current=!1}const Cv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Tl={};function ok(e){Tl=e}function wL(){return Tl}class kL{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:l,blockInitialAnimation:a,visualState:c},d={}){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=Eh,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=()=>{const w=Vt.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,Ye.render(this.render,!1,!0))};const{latestValues:h,renderState:m}=c;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=l,this.options=d,this.blockInitialAnimation=!!a,this.isControllingVariants=Ul(n),this.isVariantNode=rk(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const w in y){const k=y[w];h[w]!==void 0&&Tt(k)&&k.set(h[w])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,gL.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(ik.current||xL(),this.shouldReduceMotion=yd.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(),jr(this.notifyUpdate),jr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&V1.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:c,times:d,ease:h,duration:m}=n.accelerate,p=new F1({element:this.current,name:t,keyframes:c,times:d,ease:h,duration:an(m)}),y=a(p);this.valueSubscriptions.set(t,()=>{y(),p.cancel()});return}const i=io.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Ye.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),l&&l()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Tl){const n=Tl[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<Cv.length;i++){const s=Cv[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,a=t[l];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=yL(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]: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(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Qi(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(i1(i)||s1(i))?i=parseFloat(i):!mL(i)&&Nn.test(n)&&(i=Q1(t,n)),this.setBaseTarget(t,Tt(i)?i.get():i)),Tt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const l=Rh(this.props,n,this.presenceContext?.custom);l&&(i=l[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Tt(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new gh),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Nh.render(this.render)}}class sk extends kL{constructor(){super(...arguments),this.KeyframeResolver=Y_}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Tt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ir{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ak({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function SL({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bL(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function ff(e){return e===void 0||e===1}function vd({scale:e,scaleX:t,scaleY:n}){return!ff(e)||!ff(t)||!ff(n)}function ei(e){return vd(e)||lk(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function lk(e){return Ev(e.x)||Ev(e.y)}function Ev(e){return e&&e!=="0%"}function Pl(e,t,n){const i=e-n,s=t*i;return n+s}function Tv(e,t,n,i,s){return s!==void 0&&(e=Pl(e,s,i)),Pl(e,n,i)+t}function xd(e,t=0,n=1,i,s){e.min=Tv(e.min,t,n,i,s),e.max=Tv(e.max,t,n,i,s)}function uk(e,{x:t,y:n}){xd(e.x,t.translate,t.scale,t.originPoint),xd(e.y,n.translate,n.scale,n.originPoint)}const Pv=.999999999999,Rv=1.0000000000001;function CL(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let l,a;for(let c=0;c<s;c++){l=n[c],a=l.projectionDelta;const{visualElement:d}=l.options;d&&d.props.style&&d.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(Vn(e.x,-l.scroll.offset.x),Vn(e.y,-l.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,uk(e,a)),i&&ei(l.latestValues)&&fl(e,l.latestValues,l.layout?.layoutBox))}t.x<Rv&&t.x>Pv&&(t.x=1),t.y<Rv&&t.y>Pv&&(t.y=1)}function Vn(e,t){e.min+=t,e.max+=t}function Av(e,t,n,i,s=.5){const l=Xe(e.min,e.max,s);xd(e,t,n,l,i)}function Mv(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function fl(e,t,n){const i=n??e;Av(e.x,Mv(t.x,i.x),t.scaleX,t.scale,t.originX),Av(e.y,Mv(t.y,i.y),t.scaleY,t.scale,t.originY)}function ck(e,t){return ak(bL(e.getBoundingClientRect(),t))}function EL(e,t,n){const i=ck(e,n),{scroll:s}=t;return s&&(Vn(i.x,s.offset.x),Vn(i.y,s.offset.y)),i}const TL={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},PL=ro.length;function RL(e,t,n){let i="",s=!0;for(let a=0;a<PL;a++){const c=ro[a],d=e[c];if(d===void 0)continue;let h=!0;if(typeof d=="number")h=d===(c.startsWith("scale")?1:0);else{const m=parseFloat(d);h=c.startsWith("scale")?m===1:m===0}if(!h||n){const m=gd(d,El[c]);if(!h){s=!1;const p=TL[c]||c;i+=`${p}(${m}) `}n&&(t[c]=m)}}const l=e.pathRotation;return l&&(s=!1,i+=`rotate(${gd(l,El.pathRotation)}) `),i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function Lh(e,t,n){const{style:i,vars:s,transformOrigin:l}=e;let a=!1,c=!1;for(const d in t){const h=t[d];if(io.has(d)){a=!0;continue}else if(k1(d)){s[d]=h;continue}else{const m=gd(h,El[d]);d.startsWith("origin")?(c=!0,l[d]=m):i[d]=m}}if(t.transform||(a||n?i.transform=RL(t,e.transform,n):i.transform&&(i.transform="none")),c){const{originX:d="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${d} ${h} ${m}`}}function fk(e,{style:t,vars:n},i,s){const l=e.style;let a;for(a in t)l[a]=t[a];s?.applyProjectionStyles(l,i);for(a in n)l.setProperty(a,n[a])}function Nv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Go={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ke.test(e))e=parseFloat(e);else return e;const n=Nv(e,t.target.x),i=Nv(e,t.target.y);return`${n}% ${i}%`}},AL={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Nn.parse(e);if(s.length>5)return i;const l=Nn.createTransformer(e),a=typeof s[0]!="number"?1:0,c=n.x.scale*t.x,d=n.y.scale*t.y;s[0+a]/=c,s[1+a]/=d;const h=Xe(c,d,.5);return typeof s[2+a]=="number"&&(s[2+a]/=h),typeof s[3+a]=="number"&&(s[3+a]/=h),l(s)}},wd={borderRadius:{...Go,applyTo:[...Mh]},borderTopLeftRadius:Go,borderTopRightRadius:Go,borderBottomLeftRadius:Go,borderBottomRightRadius:Go,boxShadow:AL};function dk(e,{layout:t,layoutId:n}){return io.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!wd[e]||e==="opacity")}function Oh(e,t,n){const i=e.style,s=t?.style,l={};if(!i)return l;for(const a in i)(Tt(i[a])||s&&Tt(s[a])||dk(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(l[a]=i[a]);return l}function ML(e){return window.getComputedStyle(e)}class NL extends sk{constructor(){super(...arguments),this.type="html",this.renderInstance=fk}mount(t){Vl(!!t.style),super.mount(t)}readValueFromInstance(t,n){if(io.has(n))return this.projection?.isProjecting?od(n):QI(t,n);{const i=ML(t),s=(k1(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ck(t,n)}build(t,n,i){Lh(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return Oh(t,n,i)}}const jL={offset:"stroke-dashoffset",array:"stroke-dasharray"},DL={offset:"strokeDashoffset",array:"strokeDasharray"};function IL(e,t,n=1,i=0,s=!0){e.pathLength=1;const l=s?jL:DL;e[l.offset]=`${-i}`,e[l.array]=`${t} ${n}`}const _L=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function hk(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:l=1,pathOffset:a=0,...c},d,h,m){if(Lh(e,c,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:y}=e;p.transform&&(y.transform=p.transform,delete p.transform),(y.transform||p.transformOrigin)&&(y.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),y.transform&&(y.transformBox=m?.transformBox??"fill-box",delete p.transformBox);for(const w of _L)p[w]!==void 0&&(y[w]=p[w],delete p[w]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),i!==void 0&&(p.scale=i),s!==void 0&&IL(p,s,l,a,!1)}const pk=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"]),mk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function LL(e,t,n,i){fk(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(pk.has(s)?s:Ah(s),t.attrs[s])}function gk(e,t,n){const i=Oh(e,t,n);for(const s in e)if(Tt(e[s])||Tt(t[s])){const l=ro.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[l]=e[s]}return i}class OL extends sk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=yt}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(io.has(n)){const i=G1(n);return i&&i.default||0}return n=pk.has(n)?n:Ah(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return gk(t,n,i)}build(t,n,i){hk(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){LL(t,n,i,s)}mount(t){this.isSVGTag=mk(t.tagName),super.mount(t)}}const FL=_h.length;function yk(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?yk(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<FL;n++){const i=_h[n],s=e.props[i];(vs(s)||s===!1)&&(t[i]=s)}return t}function vk(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const zL=[...Ih].reverse(),VL=Ih.length;function BL(e){return t=>Promise.all(t.map(({animation:n,options:i})=>F_(e,n,i)))}function $L(e){let t=BL(e),n=jv(),i=!0,s=!1;const l=h=>(m,p)=>{const y=si(e,p,h==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:w,transitionEnd:k,...C}=y;m={...m,...C,...k}}return m};function a(h){t=h(e)}function c(h){const{props:m}=e,p=yk(e.parent)||{},y=[],w=new Set;let k={},C=1/0;for(let E=0;E<VL;E++){const M=zL[E],A=n[M],L=m[M]!==void 0?m[M]:p[M],U=vs(L),D=M===h?A.isActive:null;D===!1&&(C=E);let Y=L===p[M]&&L!==m[M]&&U;if(Y&&(i||s)&&e.manuallyAnimateOnMount&&(Y=!1),A.protectedKeys={...k},!A.isActive&&D===null||!L&&!A.prevProp||$l(L)||typeof L=="boolean")continue;if(M==="exit"&&A.isActive&&D!==!0){A.prevResolvedValues&&(k={...k,...A.prevResolvedValues});continue}const W=UL(A.prevProp,L);let X=W||M===h&&A.isActive&&!Y&&U||E>C&&U,j=!1;const G=Array.isArray(L)?L:[L];let V=G.reduce(l(M),{});D===!1&&(V={});const{prevResolvedValues:fe={}}=A,ie={...fe,...V},ee=q=>{X=!0,w.has(q)&&(j=!0,w.delete(q)),A.needsAnimating[q]=!0;const ue=e.getValue(q);ue&&(ue.liveStyle=!1)};for(const q in ie){const ue=V[q],P=fe[q];if(k.hasOwnProperty(q))continue;let _=!1;fd(ue)&&fd(P)?_=!vk(ue,P)||W:_=ue!==P,_?ue!=null?ee(q):w.add(q):ue!==void 0&&w.has(q)?ee(q):A.protectedKeys[q]=!0}A.prevProp=L,A.prevResolvedValues=V,A.isActive&&(k={...k,...V}),(i||s)&&e.blockInitialAnimation&&(X=!1);const ve=Y&&W;X&&(!ve||j)&&y.push(...G.map(q=>{const ue={type:M};if(typeof q=="string"&&(i||s)&&!ve&&e.manuallyAnimateOnMount&&e.parent){const{parent:P}=e,_=si(P,q);if(P.enteringChildren&&_){const{delayChildren:Q}=_.transition||{};ue.delay=B1(P.enteringChildren,e,Q)}}return{animation:q,options:ue}}))}if(w.size){const E={};if(typeof m.initial!="boolean"){const M=si(e,Array.isArray(m.initial)?m.initial[0]:m.initial);M&&M.transition&&(E.transition=M.transition)}w.forEach(M=>{const A=e.getBaseTarget(M),L=e.getValue(M);L&&(L.liveStyle=!0),E[M]=A??null}),y.push({animation:E})}let T=!!y.length;return i&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(T=!1),i=!1,s=!1,T?t(y):Promise.resolve()}function d(h,m){if(n[h].isActive===m)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(h,m)),n[h].isActive=m;const p=c(h);for(const y in n)n[y].protectedKeys={};return p}return{animateChanges:c,setActive:d,setAnimateFunction:a,getState:()=>n,reset:()=>{n=jv(),s=!0}}}function UL(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!vk(t,e):!1}function Gr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jv(){return{animate:Gr(!0),whileInView:Gr(),whileHover:Gr(),whileTap:Gr(),whileDrag:Gr(),whileFocus:Gr(),exit:Gr()}}function kd(e,t){e.min=t.min,e.max=t.max}function Rn(e,t){kd(e.x,t.x),kd(e.y,t.y)}function Dv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const xk=1e-4,WL=1-xk,HL=1+xk,wk=.01,KL=0-wk,qL=0+wk;function Bt(e){return e.max-e.min}function XL(e,t,n){return Math.abs(e-t)<=n}function Iv(e,t,n,i=.5){e.origin=i,e.originPoint=Xe(t.min,t.max,e.origin),e.scale=Bt(n)/Bt(t),e.translate=Xe(n.min,n.max,e.origin)-e.originPoint,(e.scale>=WL&&e.scale<=HL||isNaN(e.scale))&&(e.scale=1),(e.translate>=KL&&e.translate<=qL||isNaN(e.translate))&&(e.translate=0)}function os(e,t,n,i){Iv(e.x,t.x,n.x,i?i.originX:void 0),Iv(e.y,t.y,n.y,i?i.originY:void 0)}function _v(e,t,n,i=0){const s=i?Xe(n.min,n.max,i):n.min;e.min=s+t.min,e.max=e.min+Bt(t)}function YL(e,t,n,i){_v(e.x,t.x,n.x,i?.x),_v(e.y,t.y,n.y,i?.y)}function Lv(e,t,n,i=0){const s=i?Xe(n.min,n.max,i):n.min;e.min=t.min-s,e.max=e.min+Bt(t)}function Rl(e,t,n,i){Lv(e.x,t.x,n.x,i?.x),Lv(e.y,t.y,n.y,i?.y)}function Ov(e,t,n,i,s){return e-=t,e=Pl(e,1/n,i),s!==void 0&&(e=Pl(e,1/s,i)),e}function GL(e,t=0,n=1,i=.5,s,l=e,a=e){if($n.test(t)&&(t=parseFloat(t),t=Xe(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=Xe(l.min,l.max,i);e===l&&(c-=t),e.min=Ov(e.min,t,n,c,s),e.max=Ov(e.max,t,n,c,s)}function Fv(e,t,[n,i,s],l,a){GL(e,t[n],t[i],t[s],t.scale,l,a)}const QL=["x","scaleX","originX"],ZL=["y","scaleY","originY"];function zv(e,t,n,i){Fv(e.x,t,QL,n?n.x:void 0,i?i.x:void 0),Fv(e.y,t,ZL,n?n.y:void 0,i?i.y:void 0)}function Vv(e){return e.translate===0&&e.scale===1}function kk(e){return Vv(e.x)&&Vv(e.y)}function Bv(e,t){return e.min===t.min&&e.max===t.max}function JL(e,t){return Bv(e.x,t.x)&&Bv(e.y,t.y)}function $v(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Sk(e,t){return $v(e.x,t.x)&&$v(e.y,t.y)}function Uv(e){return Bt(e.x)/Bt(e.y)}function Wv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function zn(e){return[e("x"),e("y")]}function eO(e,t,n){let i="";const s=e.x.translate/t.x,l=e.y.translate/t.y,a=n?.z||0;if((s||l||a)&&(i=`translate3d(${s}px, ${l}px, ${a}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:m,pathRotation:p,rotateX:y,rotateY:w,skewX:k,skewY:C}=n;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),p&&(i+=`rotate(${p}deg) `),y&&(i+=`rotateX(${y}deg) `),w&&(i+=`rotateY(${w}deg) `),k&&(i+=`skewX(${k}deg) `),C&&(i+=`skewY(${C}deg) `)}const c=e.x.scale*t.x,d=e.y.scale*t.y;return(c!==1||d!==1)&&(i+=`scale(${c}, ${d})`),i||"none"}const tO=Mh.length,Hv=e=>typeof e=="string"?parseFloat(e):e,Kv=e=>typeof e=="number"||ke.test(e);function nO(e,t,n,i,s,l){s?(e.opacity=Xe(0,n.opacity??1,rO(i)),e.opacityExit=Xe(t.opacity??1,0,iO(i))):l&&(e.opacity=Xe(t.opacity??1,n.opacity??1,i));for(let a=0;a<tO;a++){const c=Mh[a];let d=qv(t,c),h=qv(n,c);if(d===void 0&&h===void 0)continue;d||(d=0),h||(h=0),d===0||h===0||Kv(d)===Kv(h)?(e[c]=Math.max(Xe(Hv(d),Hv(h),i),0),($n.test(h)||$n.test(d))&&(e[c]+="%")):e[c]=h}(t.rotate||n.rotate)&&(e.rotate=Xe(t.rotate||0,n.rotate||0,i))}function qv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const rO=bk(0,.5,m1),iO=bk(.5,.95,vn);function bk(e,t,n){return i=>i<e?0:i>t?1:n(gs(e,t,i))}function oO(e,t,n){const i=Tt(e)?e:Qi(e);return i.start(Ph("",i,t,n)),i.animation}function xs(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}const sO=(e,t)=>e.depth-t.depth;class aO{constructor(){this.children=[],this.isDirty=!1}add(t){mh(this.children,t),this.isDirty=!0}remove(t){wl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(sO),this.isDirty=!1,this.children.forEach(t)}}function lO(e,t){const n=Vt.now(),i=({timestamp:s})=>{const l=s-n;l>=t&&(jr(i),e(l-t))};return Ye.setup(i,!0),()=>jr(i)}function dl(e){return Tt(e)?e.get():e}class uO{constructor(){this.members=[]}add(t){mh(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(wl(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(wl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:l}=t.options;(s===void 0||s!==l)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const hl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},df=["","X","Y","Z"],cO=1e3;let fO=0;function hf(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Ck(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=K1(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ye,!(s||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Ck(i)}function Ek({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(a={},c=t?.()){this.id=fO++,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,this.nodes.forEach(pO),this.nodes.forEach(wO),this.nodes.forEach(kO),this.nodes.forEach(mO)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let d=0;d<this.path.length;d++)this.path[d].shouldResetTransform=!0;this.root===this&&(this.nodes=new aO)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new gh),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const d=this.eventHandlers.get(a);d&&d.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=Dh(a)&&!hL(a),this.instance=a;const{layoutId:c,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(d||c)&&(this.isLayoutDirty=!0),e){let m,p=0;const y=()=>this.root.updateBlockedByResize=!1;Ye.read(()=>{p=window.innerWidth}),e(a,()=>{const w=window.innerWidth;w!==p&&(p=w,this.root.updateBlockedByResize=!0,m&&m(),m=lO(y,250),hl.hasAnimatedSinceResize&&(hl.hasAnimatedSinceResize=!1,this.nodes.forEach(Gv)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:y,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const k=this.options.transition||h.getDefaultTransition()||TO,{onLayoutAnimationStart:C,onLayoutAnimationComplete:T}=h.getProps(),E=!this.targetLayout||!Sk(this.targetLayout,w),M=!p&&y;if(this.options.layoutRoot||this.resumeFrom||M||p&&(E||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const A={...Th(k,"layout"),onPlay:C,onComplete:T};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A),this.setAnimationOrigin(m,M,A.path)}else p||Gv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),jr(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(SO),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ck(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const p=this.path[m];p.shouldResetTransform=!0,(typeof p.latestValues.x=="string"||typeof p.latestValues.y=="string")&&(p.isLayoutDirty=!0),p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:d}=this.options;if(c===void 0&&!d)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const d=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),d&&this.nodes.forEach(yO),this.nodes.forEach(Xv);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Yv);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(vO),this.nodes.forEach(xO),this.nodes.forEach(dO),this.nodes.forEach(hO)):this.nodes.forEach(Yv),this.clearAllSnapshots();const c=Vt.now();Et.delta=Un(0,1e3/60,c-Et.timestamp),Et.timestamp=c,Et.isProcessing=!0,rf.update.process(Et),rf.preRender.process(Et),rf.render.process(Et),Et.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Nh.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(gO),this.sharedNodes.forEach(bO)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ye.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ye.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Bt(this.snapshot.measuredBox.x)&&!Bt(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 d=0;d<this.path.length;d++)this.path[d].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=yt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c&&this.instance){const d=i(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:d,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:d}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!kk(this.projectionDelta),d=this.getTransformTemplate(),h=d?d(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;a&&this.instance&&(c||ei(this.latestValues)||m)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let d=this.removeElementScroll(c);return a&&(d=this.removeTransform(d)),PO(d),{animationId:this.root.animationId,measuredBox:c,layoutBox:d,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return yt();const c=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(RO))){const{scroll:h}=this.root;h&&(Vn(c.x,h.offset.x),Vn(c.y,h.offset.y))}return c}removeElementScroll(a){const c=yt();if(Rn(c,a),this.scroll?.wasRoot)return c;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:p}=h;h!==this.root&&m&&p.layoutScroll&&(m.wasRoot&&Rn(c,a),Vn(c.x,m.offset.x),Vn(c.y,m.offset.y))}return c}applyTransform(a,c=!1,d){const h=d||yt();Rn(h,a);for(let m=0;m<this.path.length;m++){const p=this.path[m];!c&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(Vn(h.x,-p.scroll.offset.x),Vn(h.y,-p.scroll.offset.y)),ei(p.latestValues)&&fl(h,p.latestValues,p.layout?.layoutBox)}return ei(this.latestValues)&&fl(h,this.latestValues,this.layout?.layoutBox),h}removeTransform(a){const c=yt();Rn(c,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];if(!ei(h.latestValues))continue;let m;h.instance&&(vd(h.latestValues)&&h.updateSnapshot(),m=yt(),Rn(m,h.measurePageBox())),zv(c,h.latestValues,h.snapshot?.layoutBox,m)}return ei(this.latestValues)&&zv(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Et.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==c;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:p}=this.options;if(!this.layout||!(m||p))return;this.resolvedRelativeTargetAt=Et.timestamp;const y=this.getClosestProjectingParent();y&&this.linkedParentVersion!==y.layoutVersion&&!y.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&y&&y.layout?this.createRelativeTarget(y,this.layout.layoutBox,y.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=yt(),this.targetWithTransforms=yt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),YL(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Rn(this.target,this.layout.layoutBox),uk(this.target,this.targetDelta)):Rn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?this.createRelativeTarget(y,this.target,y.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||vd(this.parent.latestValues)||lk(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,c,d){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yt(),this.relativeTargetOrigin=yt(),Rl(this.relativeTargetOrigin,c,d,this.options.layoutAnchor||void 0),Rn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),c=!!this.resumingFrom||this!==a;let d=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(d=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===Et.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;Rn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,y=this.treeScale.y;CL(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=yt());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Dv(this.prevProjectionDelta.x,this.projectionDelta.x),Dv(this.prevProjectionDelta.y,this.projectionDelta.y)),os(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==y||!Wv(this.projectionDelta.x,this.prevProjectionDelta.x)||!Wv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Hi(),this.projectionDelta=Hi(),this.projectionDeltaWithTransform=Hi()}setAnimationOrigin(a,c=!1,d){const h=this.snapshot,m=h?h.latestValues:{},p={...this.latestValues},y=Hi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const w=yt(),k=h?h.source:void 0,C=this.layout?this.layout.source:void 0,T=k!==C,E=this.getStack(),M=!E||E.members.length<=1,A=!!(T&&!M&&this.options.crossfade===!0&&!this.path.some(EO));this.animationProgress=0;let L;const U=d?.interpolateProjection(a);this.mixTargetDelta=D=>{const Y=D/1e3,W=U?.(Y);W?(y.x.translate=W.x,y.x.scale=Xe(a.x.scale,1,Y),y.x.origin=a.x.origin,y.x.originPoint=a.x.originPoint,y.y.translate=W.y,y.y.scale=Xe(a.y.scale,1,Y),y.y.origin=a.y.origin,y.y.originPoint=a.y.originPoint):(Qv(y.x,a.x,Y),Qv(y.y,a.y,Y)),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Rl(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),CO(this.relativeTarget,this.relativeTargetOrigin,w,Y),L&&JL(this.relativeTarget,L)&&(this.isProjectionDirty=!1),L||(L=yt()),Rn(L,this.relativeTarget)),T&&(this.animationValues=p,nO(p,m,this.latestValues,Y,A,M)),W&&W.rotate!==void 0&&(this.animationValues||(this.animationValues=p),this.animationValues.pathRotation=W.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(jr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ye.update(()=>{hl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Qi(0)),this.motionValue.jump(0,!1),this.currentAnimation=oO(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:d,layout:h,latestValues:m}=a;if(!(!c||!d||!h)){if(this!==a&&this.layout&&h&&Tk(this.options.animationType,this.layout.layoutBox,h.layoutBox)){d=this.target||yt();const p=Bt(this.layout.layoutBox.x);d.x.min=a.target.x.min,d.x.max=d.x.min+p;const y=Bt(this.layout.layoutBox.y);d.y.min=a.target.y.min,d.y.max=d.y.min+y}Rn(c,d),fl(c,m),os(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new uO),this.sharedNodes.get(a).add(c);const h=c.options.initialPromotionConfig;c.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:d}={}){const h=this.getStack();h&&h.promote(this,d),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:d}=a;if((d.z||d.rotate||d.rotateX||d.rotateY||d.rotateZ||d.skewX||d.skewY)&&(c=!0),!c)return;const h={};d.z&&hf("z",a,h,this.animationValues);for(let m=0;m<df.length;m++)hf(`rotate${df[m]}`,a,h,this.animationValues),hf(`skew${df[m]}`,a,h,this.animationValues);a.render();for(const m in h)a.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);a.scheduleRender()}applyProjectionStyles(a,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const d=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=dl(c?.pointerEvents)||"",a.transform=d?d(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=dl(c?.pointerEvents)||""),this.hasProjected&&!ei(this.latestValues)&&(a.transform=d?d({},""):"none",this.hasProjected=!1);return}a.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let p=eO(this.projectionDeltaWithTransform,this.treeScale,m);d&&(p=d(m,p)),a.transform=p;const{x:y,y:w}=this.projectionDelta;a.transformOrigin=`${y.origin*100}% ${w.origin*100}% 0`,h.animationValues?a.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:a.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const k in wd){if(m[k]===void 0)continue;const{correct:C,applyTo:T,isCSSVariable:E}=wd[k],M=p==="none"?m[k]:C(m[k],h);if(T){const A=T.length;for(let L=0;L<A;L++)a[T[L]]=M}else E?this.options.visualElement.renderState.vars[k]=M:a[k]=M}this.options.layoutId&&(a.pointerEvents=h===this?dl(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Xv),this.root.sharedNodes.clear()}}}function dO(e){e.updateLayout()}function hO(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,l=t.source!==e.layout.source;if(s==="size")zn(m=>{const p=l?t.measuredBox[m]:t.layoutBox[m],y=Bt(p);p.min=n[m].min,p.max=p.min+y});else if(s==="x"||s==="y"){const m=s==="x"?"y":"x";kd(l?t.measuredBox[m]:t.layoutBox[m],n[m])}else Tk(s,t.layoutBox,n)&&zn(m=>{const p=l?t.measuredBox[m]:t.layoutBox[m],y=Bt(n[m]);p.max=p.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+y)});const a=Hi();os(a,n,t.layoutBox);const c=Hi();l?os(c,e.applyTransform(i,!0),t.measuredBox):os(c,n,t.layoutBox);const d=!kk(a);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:p,layout:y}=m;if(p&&y){const w=e.options.layoutAnchor||void 0,k=yt();Rl(k,t.layoutBox,p.layoutBox,w);const C=yt();Rl(C,n,y.layoutBox,w),Sk(k,C)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=k,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function pO(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function mO(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function gO(e){e.clearSnapshot()}function Xv(e){e.clearMeasurements()}function yO(e){e.isLayoutDirty=!0,e.updateLayout()}function Yv(e){e.isLayoutDirty=!1}function vO(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function xO(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Gv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function wO(e){e.resolveTargetDelta()}function kO(e){e.calcProjection()}function SO(e){e.resetSkewAndRotation()}function bO(e){e.removeLeadSnapshot()}function Qv(e,t,n){e.translate=Xe(t.translate,0,n),e.scale=Xe(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zv(e,t,n,i){e.min=Xe(t.min,n.min,i),e.max=Xe(t.max,n.max,i)}function CO(e,t,n,i){Zv(e.x,t.x,n.x,i),Zv(e.y,t.y,n.y,i)}function EO(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const TO={duration:.45,ease:[.4,0,.1,1]},Jv=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ex=Jv("applewebkit/")&&!Jv("chrome/")?Math.round:vn;function tx(e){e.min=ex(e.min),e.max=ex(e.max)}function PO(e){tx(e.x),tx(e.y)}function Tk(e,t,n){return e==="position"||e==="preserve-aspect"&&!XL(Uv(t),Uv(n),.2)}function RO(e){return e!==e.root&&e.scroll?.wasRoot}const AO=Ek({attachResizeListener:(e,t)=>xs(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),pf={current:void 0},Pk=Ek({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pf.current){const e=new AO({});e.mount(window),e.setOptions({layoutScroll:!0}),pf.current=e}return pf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Fh=S.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function nx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function MO(...e){return t=>{let n=!1;const i=e.map(s=>{const l=nx(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():nx(e[s],null)}}}}function NO(...e){return S.useCallback(MO(...e),e)}class jO extends S.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(sl(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,s=sl(i)&&i.offsetWidth||0,l=sl(i)&&i.offsetHeight||0,a=getComputedStyle(n),c=this.props.sizeRef.current;c.height=parseFloat(a.height),c.width=parseFloat(a.width),c.top=n.offsetTop,c.left=n.offsetLeft,c.right=s-c.width-c.left,c.bottom=l-c.height-c.top,c.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function DO({children:e,isPresent:t,anchorX:n,anchorY:i,root:s,pop:l}){const a=S.useId(),c=S.useRef(null),d=S.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:h}=S.useContext(Fh),m=l!==!1?e.props?.ref??e?.ref:void 0,p=NO(c,m);return S.useInsertionEffect(()=>{const{width:y,height:w,top:k,left:C,right:T,bottom:E,direction:M}=d.current;if(t||l===!1||!c.current||!y||!w)return;const A=M==="rtl",L=n==="left"?A?`right: ${T}`:`left: ${C}`:A?`left: ${C}`:`right: ${T}`,U=i==="bottom"?`bottom: ${E}`:`top: ${k}`;c.current.dataset.motionPopId=a;const D=document.createElement("style");h&&(D.nonce=h);const Y=s??document.head;return Y.appendChild(D),D.sheet&&D.sheet.insertRule(`
309
+ [data-motion-pop-id="${a}"] {
310
+ position: absolute !important;
311
+ width: ${y}px !important;
312
+ height: ${w}px !important;
313
+ ${L}px !important;
314
+ ${U}px !important;
315
+ }
316
+ `),()=>{c.current?.removeAttribute("data-motion-pop-id"),Y.contains(D)&&Y.removeChild(D)}},[t]),v.jsx(jO,{isPresent:t,childRef:c,sizeRef:d,pop:l,children:l===!1?e:S.cloneElement(e,{ref:p})})}const IO=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:l,mode:a,anchorX:c,anchorY:d,root:h})=>{const m=hh(_O),p=S.useId(),y=S.useRef(n),w=S.useRef(i);ph(()=>{y.current=n,w.current=i});let k=!0,C=S.useMemo(()=>(k=!1,{id:p,initial:t,isPresent:n,custom:s,onExitComplete:T=>{m.set(T,!0);for(const E of m.values())if(!E)return;i&&i()},register:T=>(m.set(T,!1),()=>{m.delete(T),!y.current&&!m.size&&w.current?.()})}),[n,m,i]);return l&&k&&(C={...C}),S.useMemo(()=>{m.forEach((T,E)=>m.set(E,!1))},[n]),S.useEffect(()=>{!n&&!m.size&&i&&i()},[n]),e=v.jsx(DO,{pop:a==="popLayout",isPresent:n,anchorX:c,anchorY:d,root:h,children:e}),v.jsx(zl.Provider,{value:C,children:e})};function _O(){return new Map}function Rk(e=!0){const t=S.useContext(zl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,l=S.useId();S.useEffect(()=>{if(e)return s(l)},[e]);const a=S.useCallback(()=>e&&i&&i(l),[l,i,e]);return!n&&i?[!1,a]:[!0]}const Za=e=>e.key||"";function rx(e){const t=[];return S.Children.forEach(e,n=>{S.isValidElement(n)&&t.push(n)}),t}const LO=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:l="sync",propagate:a=!1,anchorX:c="left",anchorY:d="top",root:h})=>{const[m,p]=Rk(a),y=S.useMemo(()=>rx(e),[e]),w=a&&!m?[]:y.map(Za),k=S.useRef(!0),C=S.useRef(y),T=hh(()=>new Map),E=S.useRef(new Set),[M,A]=S.useState(y),[L,U]=S.useState(y);ph(()=>{k.current=!1,C.current=y;for(let W=0;W<L.length;W++){const X=Za(L[W]);w.includes(X)?(T.delete(X),E.current.delete(X)):T.get(X)!==!0&&T.set(X,!1)}},[L,w.length,w.join("-")]);const D=[];if(y!==M){let W=[...y];for(let X=0;X<L.length;X++){const j=L[X],G=Za(j);w.includes(G)||(W.splice(X,0,j),D.push(j))}return l==="wait"&&D.length&&(W=D),U(rx(W)),A(y),null}const{forceRender:Y}=S.useContext(dh);return v.jsx(v.Fragment,{children:L.map(W=>{const X=Za(W),j=a&&!m?!1:y===L||w.includes(X),G=()=>{if(E.current.has(X))return;if(T.has(X))E.current.add(X),T.set(X,!0);else return;let V=!0;T.forEach(fe=>{fe||(V=!1)}),V&&(Y?.(),U(C.current),a&&p?.(),i&&i())};return v.jsx(IO,{isPresent:j,initial:!k.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:l,root:h,onExitComplete:j?void 0:G,anchorX:c,anchorY:d,children:W},X)})})},Ak=S.createContext({strict:!1}),ix={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"]};let ox=!1;function OO(){if(ox)return;const e={};for(const t in ix)e[t]={isEnabled:n=>ix[t].some(i=>!!n[i])};ok(e),ox=!0}function Mk(){return OO(),wL()}function FO(e){const t=Mk();for(const n in e)t[n]={...t[n],...e[n]};ok(t)}const zO=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"]);function Al(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||zO.has(e)}let Nk=e=>!Al(e);function VO(e){typeof e=="function"&&(Nk=t=>t.startsWith("on")?!Al(t):e(t))}try{VO(require("@emotion/is-prop-valid").default)}catch{}function BO(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||Tt(e[s])||(Nk(s)||n===!0&&Al(s)||!t&&!Al(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}const Wl=S.createContext({});function $O(e,t){if(Ul(e)){const{initial:n,animate:i}=e;return{initial:n===!1||vs(n)?n:void 0,animate:vs(i)?i:void 0}}return e.inherit!==!1?t:{}}function UO(e){const{initial:t,animate:n}=$O(e,S.useContext(Wl));return S.useMemo(()=>({initial:t,animate:n}),[sx(t),sx(n)])}function sx(e){return Array.isArray(e)?e.join(" "):e}const zh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jk(e,t,n){for(const i in t)!Tt(t[i])&&!dk(i,n)&&(e[i]=t[i])}function WO({transformTemplate:e},t){return S.useMemo(()=>{const n=zh();return Lh(n,t,e),Object.assign({},n.vars,n.style)},[t])}function HO(e,t){const n=e.style||{},i={};return jk(i,n,e),Object.assign(i,WO(e,t)),i}function KO(e,t){const n={},i=HO(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.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=i,n}const Dk=()=>({...zh(),attrs:{}});function qO(e,t,n,i){const s=S.useMemo(()=>{const l=Dk();return hk(l,t,mk(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};jk(l,e.style,e),s.style={...l,...s.style}}return s}const XO=["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 Vh(e){return typeof e!="string"||e.includes("-")?!1:!!(XO.indexOf(e)>-1||/[A-Z]/u.test(e))}function YO(e,t,n,{latestValues:i},s,l=!1,a){const d=(a??Vh(e)?qO:KO)(t,i,s,e),h=BO(t,typeof e=="string",l),m=e!==S.Fragment?{...h,...d,ref:n}:{},{children:p}=t,y=S.useMemo(()=>Tt(p)?p.get():p,[p]);return S.createElement(e,{...m,children:y})}function GO({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:QO(n,i,s,e),renderState:t()}}function QO(e,t,n,i){const s={},l=i(e,{});for(const y in l)s[y]=dl(l[y]);let{initial:a,animate:c}=e;const d=Ul(e),h=rk(e);t&&h&&!d&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||a===!1;const p=m?c:a;if(p&&typeof p!="boolean"&&!$l(p)){const y=Array.isArray(p)?p:[p];for(let w=0;w<y.length;w++){const k=Rh(e,y[w]);if(k){const{transitionEnd:C,transition:T,...E}=k;for(const M in E){let A=E[M];if(Array.isArray(A)){const L=m?A.length-1:0;A=A[L]}A!==null&&(s[M]=A)}for(const M in C)s[M]=C[M]}}}return s}const Ik=e=>(t,n)=>{const i=S.useContext(Wl),s=S.useContext(zl),l=()=>GO(e,t,i,s);return n?l():hh(l)},ZO=Ik({scrapeMotionValuesFromProps:Oh,createRenderState:zh}),JO=Ik({scrapeMotionValuesFromProps:gk,createRenderState:Dk}),eF=Symbol.for("motionComponentSymbol");function tF(e,t,n){const i=S.useRef(n);S.useInsertionEffect(()=>{i.current=n});const s=S.useRef(null);return S.useCallback(l=>{l&&e.onMount?.(l),t&&(l?t.mount(l):t.unmount());const a=i.current;if(typeof a=="function")if(l){const c=a(l);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):a(l);else a&&(a.current=l)},[t])}const _k=S.createContext({});function $i(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nF(e,t,n,i,s,l){const{visualElement:a}=S.useContext(Wl),c=S.useContext(Ak),d=S.useContext(zl),h=S.useContext(Fh),m=h.reducedMotion,p=h.skipAnimations,y=S.useRef(null),w=S.useRef(!1);i=i||c.renderer,!y.current&&i&&(y.current=i(e,{visualState:t,parent:a,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:m,skipAnimations:p,isSVG:l}),w.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const k=y.current,C=S.useContext(_k);k&&!k.projection&&s&&(k.type==="html"||k.type==="svg")&&rF(y.current,n,s,C);const T=S.useRef(!1);S.useInsertionEffect(()=>{k&&T.current&&k.update(n,d)});const E=n[H1],M=S.useRef(!!E&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(E)&&window.MotionHasOptimisedAnimation?.(E));return ph(()=>{w.current=!0,k&&(T.current=!0,window.MotionIsMounted=!0,k.updateFeatures(),k.scheduleRenderMicrotask(),M.current&&k.animationState&&k.animationState.animateChanges())}),S.useEffect(()=>{k&&(!M.current&&k.animationState&&k.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(E)}),M.current=!1),k.enteringChildren=void 0)}),k}function rF(e,t,n,i){const{layoutId:s,layout:l,drag:a,dragConstraints:c,layoutScroll:d,layoutRoot:h,layoutAnchor:m,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Lk(e.parent)),e.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!a||c&&$i(c),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:d,layoutRoot:h,layoutAnchor:m})}function Lk(e){if(e)return e.options.allowProjection!==!1?e.projection:Lk(e.parent)}function mf(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&&FO(i);const l=n?n==="svg":Vh(e),a=l?JO:ZO;function c(h,m){let p;const y={...S.useContext(Fh),...h,layoutId:iF(h)},{isStatic:w}=y,k=UO(h),C=a(h,w);if(!w&&typeof window<"u"){oF();const T=sF(y);p=T.MeasureLayout,k.visualElement=nF(e,C,y,s,T.ProjectionNode,l)}return v.jsxs(Wl.Provider,{value:k,children:[p&&k.visualElement?v.jsx(p,{visualElement:k.visualElement,...y}):null,YO(e,h,tF(C,k.visualElement,m),C,w,t,l)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=S.forwardRef(c);return d[eF]=e,d}function iF({layoutId:e}){const t=S.useContext(dh).id;return t&&e!==void 0?t+"-"+e:e}function oF(e,t){S.useContext(Ak).strict}function sF(e){const t=Mk(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n?.isEnabled(e)||i?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function aF(e,t){if(typeof Proxy>"u")return mf;const n=new Map,i=(l,a)=>mf(l,a,e,t),s=(l,a)=>i(l,a);return new Proxy(s,{get:(l,a)=>a==="create"?i:(n.has(a)||n.set(a,mf(a,void 0,e,t)),n.get(a))})}const lF=(e,t)=>t.isSVG??Vh(e)?new OL(t):new NL(t,{allowProjection:e!==S.Fragment});class uF extends Ir{constructor(t){super(t),t.animationState||(t.animationState=$L(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();$l(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let cF=0;class fF extends Ir{constructor(){super(...arguments),this.id=cF++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&i===!1){if(this.isExitComplete){const{initial:l,custom:a}=this.node.getProps();if(typeof l=="string"||typeof l=="object"&&l!==null&&!Array.isArray(l)){const c=si(this.node,l,a);if(c){const{transition:d,transitionEnd:h,...m}=c;for(const p in m)this.node.getValue(p)?.jump(m[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const dF={animation:{Feature:uF},exit:{Feature:fF}};function Ns(e){return{point:{x:e.pageX,y:e.pageY}}}const hF=e=>t=>jh(t)&&e(t,Ns(t));function ss(e,t,n,i){return xs(e,t,hF(n),i)}const Ok=({current:e})=>e?e.ownerDocument.defaultView:null,ax=(e,t)=>Math.abs(e-t);function pF(e,t){const n=ax(e.x,t.x),i=ax(e.y,t.y);return Math.sqrt(n**2+i**2)}const lx=new Set(["auto","scroll"]);class Fk{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:l=!1,distanceThreshold:a=3,element:c}={}){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=k=>{this.handleScroll(k.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ja(this.lastRawMoveEventInfo,this.transformPagePoint));const k=gf(this.lastMoveEventInfo,this.history),C=this.startEvent!==null,T=pF(k.offset,{x:0,y:0})>=this.distanceThreshold;if(!C&&!T)return;const{point:E}=k,{timestamp:M}=Et;this.history.push({...E,timestamp:M});const{onStart:A,onMove:L}=this.handlers;C||(A&&A(this.lastMoveEvent,k),this.startEvent=this.lastMoveEvent),L&&L(this.lastMoveEvent,k)},this.handlePointerMove=(k,C)=>{this.lastMoveEvent=k,this.lastRawMoveEventInfo=C,this.lastMoveEventInfo=Ja(C,this.transformPagePoint),Ye.update(this.updatePoint,!0)},this.handlePointerUp=(k,C)=>{this.end();const{onEnd:T,onSessionEnd:E,resumeAnimation:M}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&M&&M(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const A=gf(k.type==="pointercancel"?this.lastMoveEventInfo:Ja(C,this.transformPagePoint),this.history);this.startEvent&&T&&T(k,A),E&&E(k,A)},!jh(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=a,this.contextWindow=s||window;const d=Ns(t),h=Ja(d,this.transformPagePoint),{point:m}=h,{timestamp:p}=Et;this.history=[{...m,timestamp:p}];const{onSessionStart:y}=n;y&&y(t,gf(h,this.history));const w={passive:!0,capture:!0};this.removeListeners=Rs(ss(this.contextWindow,"pointermove",this.handlePointerMove,w),ss(this.contextWindow,"pointerup",this.handlePointerUp,w),ss(this.contextWindow,"pointercancel",this.handlePointerUp,w)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);(lx.has(i.overflowX)||lx.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.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(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:s.x-n.x,y:s.y-n.y};l.x===0&&l.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,s),Ye.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),jr(this.updatePoint)}}function Ja(e,t){return t?{point:t(e.point)}:e}function ux(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gf({point:e},t){return{point:e,delta:ux(e,zk(t)),offset:ux(e,mF(t)),velocity:gF(t,.1)}}function mF(e){return e[0]}function zk(e){return e[e.length-1]}function gF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=zk(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>an(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>an(t)*2&&(i=e[1]);const l=yn(s.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const a={x:(s.x-i.x)/l,y:(s.y-i.y)/l};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function yF(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?Xe(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?Xe(n,e,i.max):Math.min(e,n)),e}function cx(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function vF(e,{top:t,left:n,bottom:i,right:s}){return{x:cx(e.x,n,s),y:cx(e.y,t,i)}}function fx(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function xF(e,t){return{x:fx(e.x,t.x),y:fx(e.y,t.y)}}function wF(e,t){let n=.5;const i=Bt(e),s=Bt(t);return s>i?n=gs(t.min,t.max-i,e.min):i>s&&(n=gs(e.min,e.max-s,t.min)),Un(0,1,n)}function kF(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Sd=.35;function SF(e=Sd){return e===!1?e=0:e===!0&&(e=Sd),{x:dx(e,"left","right"),y:dx(e,"top","bottom")}}function dx(e,t,n){return{min:hx(e,t),max:hx(e,n)}}function hx(e,t){return typeof e=="number"?e:e[t]||0}const bF=new WeakMap;class CF{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const l=p=>{n&&this.snapToCursor(Ns(p).point),this.stopAnimation()},a=(p,y)=>{const{drag:w,dragPropagation:k,onDragStart:C}=this.getProps();if(w&&!k&&(this.openDragLock&&this.openDragLock(),this.openDragLock=G_(w),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),zn(E=>{let M=this.getAxisMotionValue(E).get()||0;if($n.test(M)){const{projection:A}=this.visualElement;if(A&&A.layout){const L=A.layout.layoutBox[E];L&&(M=Bt(L)*(parseFloat(M)/100))}}this.originPoint[E]=M}),C&&Ye.update(()=>C(p,y),!1,!0),dd(this.visualElement,"transform");const{animationState:T}=this.visualElement;T&&T.setActive("whileDrag",!0)},c=(p,y)=>{this.latestPointerEvent=p,this.latestPanInfo=y;const{dragPropagation:w,dragDirectionLock:k,onDirectionLock:C,onDrag:T}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:E}=y;if(k&&this.currentDirection===null){this.currentDirection=TF(E),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",y.point,E),this.updateAxis("y",y.point,E),this.visualElement.render(),T&&Ye.update(()=>T(p,y),!1,!0)},d=(p,y)=>{this.latestPointerEvent=p,this.latestPanInfo=y,this.stop(p,y),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new Fk(t,{onSessionStart:l,onStart:a,onMove:c,onSessionEnd:d,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:Ok(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!s||!i)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&Ye.postRender(()=>c(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!el(t,s,this.currentDirection))return;const l=this.getAxisMotionValue(t);let a=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(a=yF(a,this.constraints[t],this.elastic[t])),l.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&$i(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=vF(i.layoutBox,t):this.constraints=!1,this.elastic=SF(n),s!==this.constraints&&!$i(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&zn(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=kF(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!$i(t))return!1;const i=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const l=EL(i,s.root,this.visualElement.getTransformPagePoint());let a=xF(s.layout.layoutBox,l);if(n){const c=n(SL(a));this.hasMutatedConstraints=!!c,c&&(a=ak(c))}return a}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:l,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),d=this.constraints||{},h=zn(m=>{if(!el(m,n,this.currentDirection))return;let p=d&&d[m]||{};(a===!0||a===m)&&(p={min:0,max:0});const y=s?200:1e6,w=s?40:1e7,k={type:"inertia",velocity:i?t[m]:0,bounceStiffness:y,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...l,...p};return this.startAxisValueAnimation(m,k)});return Promise.all(h).then(c)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return dd(this.visualElement,t),i.start(Ph(t,i,0,n,this.visualElement,!1))}stopAnimation(){zn(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){zn(n=>{const{drag:i}=this.getProps();if(!el(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:c}=s.layout.layoutBox[n],d=l.get()||0;l.set(t[n]-Xe(a,c,.5)+d)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!$i(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};zn(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const d=c.get();s[a]=wF({min:d,max:d},this.constraints[a])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),zn(a=>{if(!el(a,t,null))return;const c=this.getAxisMotionValue(a),{min:d,max:h}=this.constraints[a];c.set(Xe(d,h,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;bF.set(this.visualElement,this);const t=this.visualElement.current,n=ss(t,"pointerdown",h=>{const{drag:m,dragListener:p=!0}=this.getProps(),y=h.target,w=y!==t&&nL(y);m&&p&&!w&&this.start(h)});let i;const s=()=>{const{dragConstraints:h}=this.getProps();$i(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),i||(i=EF(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,a=l.addEventListener("measure",s);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),Ye.read(s);const c=xs(window,"resize",()=>this.scalePositionWithinConstraints()),d=l.addEventListener("didUpdate",({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&(zn(p=>{const y=this.getAxisMotionValue(p);y&&(this.originPoint[p]+=h[p].translate,y.set(y.get()+h[p].translate))}),this.visualElement.render())});return()=>{c(),n(),a(),d&&d(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:a=Sd,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:l,dragElastic:a,dragMomentum:c}}}function px(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function EF(e,t,n){const i=kv(e,px(n)),s=kv(t,px(n));return()=>{i(),s()}}function el(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function TF(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class PF extends Ir{constructor(t){super(t),this.removeGroupControls=vn,this.removeListeners=vn,this.controls=new CF(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const yf=e=>(t,n)=>{e&&Ye.update(()=>e(t,n),!1,!0)};class RF extends Ir{constructor(){super(...arguments),this.removePointerDownListener=vn}onPointerDown(t){this.session=new Fk(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ok(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:yf(t),onStart:yf(n),onMove:yf(i),onEnd:(l,a)=>{delete this.session,s&&Ye.postRender(()=>s(l,a))}}}mount(){this.removePointerDownListener=ss(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let vf=!1;class AF extends S.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:l}=t;l&&(n.group&&n.group.add(l),i&&i.register&&s&&i.register(l),vf&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),hl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:l}=this.props,{projection:a}=i;return a&&(a.isPresent=l,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),vf=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==l?a.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?a.promote():a.relegate()||Ye.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=n,i.root.didUpdate(),Nh.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;vf=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Vk(e){const[t,n]=Rk(),i=S.useContext(dh);return v.jsx(AF,{...e,layoutGroup:i,switchLayoutGroup:S.useContext(_k),isPresent:t,safeToRemove:n})}const MF={pan:{Feature:RF},drag:{Feature:PF,ProjectionNode:Pk,MeasureLayout:Vk}};function mx(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,l=i[s];l&&Ye.postRender(()=>l(t,Ns(t)))}class NF extends Ir{mount(){const{current:t}=this.node;t&&(this.unmount=Z_(t,(n,i)=>(mx(this.node,i,"Start"),s=>mx(this.node,s,"End"))))}unmount(){}}class jF extends Ir{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=Rs(xs(this.node.current,"focus",()=>this.onFocus()),xs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function gx(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),l=i[s];l&&Ye.postRender(()=>l(t,Ns(t)))}class DF extends Ir{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=iL(t,(s,l)=>(gx(this.node,l,"Start"),(a,{success:c})=>gx(this.node,a,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:i?.tap===!1})}unmount(){}}const bd=new WeakMap,xf=new WeakMap,IF=e=>{const t=bd.get(e.target);t&&t(e)},_F=e=>{e.forEach(IF)};function LF({root:e,...t}){const n=e||document;xf.has(n)||xf.set(n,{});const i=xf.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(_F,{root:e,...t})),i[s]}function OF(e,t,n){const i=LF(t);return bd.set(e,n),i.observe(e),()=>{bd.delete(e),i.unobserve(e)}}const FF={some:0,all:1};class zF extends Ir{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:l}=t,a={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:FF[s]},c=d=>{const{isIntersecting:h}=d;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),y=h?m:p;y&&y(d)};this.stopObserver=OF(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(VF(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function VF({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const BF={inView:{Feature:zF},tap:{Feature:DF},focus:{Feature:jF},hover:{Feature:NF}},$F={layout:{ProjectionNode:Pk,MeasureLayout:Vk}},UF={...dF,...BF,...MF,...$F},as=aF(UF,lF),Cd="ours.chats.listMode",ls="recent";function Bk(){try{return globalThis.localStorage}catch{return}}function WF(e=Bk()){try{return e?.getItem(Cd)==="identity"?"identity":ls}catch{return ls}}function HF(e,t=Bk()){const n=e==="identity"?"identity":ls;try{return t?.setItem(Cd,n),t?.getItem(Cd)===n?n:ls}catch{return ls}}function ws(e){return typeof e=="string"?e:""}function Ml(e,t){const n=ws(e),i=ws(t),s=n.normalize().toLowerCase(),l=i.normalize().toLowerCase();return s<l?-1:s>l?1:n<i?-1:n>i?1:0}function KF(e,t){const n=pl(ws(t.activityAt))-pl(ws(e.activityAt));if(n!==0)return n;const i=Ml(e.name,t.name);return i!==0?i:Ml(e.id,t.id)}function Ed(e){return[...e].sort(KF)}function yx(e){return e.contacts.length>0?pl(ws(e.contacts[0].activityAt)):0}function qF(e,t){const n=new Map,i=[];for(const l of e){const a=l.root||(t?.[l.id]?l.id:null);if(!a){i.push(l);continue}const c=t?.[a]||{label:a,note:""};let d=n.get(a);d||(d={id:`root:${a}`,rootId:a,label:c.label,note:c.note,contacts:[]},n.set(a,d)),d.contacts.push(l)}const s=[...n.values()].map(l=>({...l,contacts:Ed(l.contacts)}));return i.length>0&&s.push({id:"rootless",rootId:null,label:"Independent identities",note:"People, agents and apps without a verified Human/root group",contacts:Ed(i)}),s.sort((l,a)=>{const c=yx(a)-yx(l);if(c!==0)return c;const d=Ml(l.label,a.label);return d!==0?d:Ml(l.id,a.id)})}const XF=15e3;function wf(e){const{c:t,active:n,grouped:i}=e;return v.jsxs(as.button,{type:"button",layout:!0,className:"contact-row"+(n?" active":"")+(i?" grouped":"")+(t.status==="pending"?" pending":""),onClick:e.onClick,whileHover:{x:3},whileTap:{scale:.985},transition:{type:"spring",stiffness:420,damping:32},children:[v.jsx("span",{className:"contact-avatar","aria-hidden":!0,children:t.initials}),v.jsxs("span",{className:"contact-copy",children:[v.jsxs("span",{className:"contact-row-topline",children:[v.jsx("span",{className:"contact-name",children:t.name}),t.when&&v.jsx("span",{className:"contact-time",children:t.when})]}),v.jsxs("span",{className:"contact-row-bottomline",children:[v.jsx("span",{className:"contact-last",children:t.last}),t.status==="pending"&&v.jsx("span",{className:"chip",children:"invited"}),!!t.unread&&v.jsx("span",{className:"contact-unread",children:t.unread})]})]}),n&&v.jsx(as.span,{className:"contact-active-glow",layoutId:"active-contact"})]})}function YF(e){const{contacts:t,roots:n,selected:i}=e,[s,l]=S.useState(""),[a,c]=S.useState(()=>WF()),d=E=>E.name.toLowerCase().includes(s.toLowerCase()),h=t.filter(E=>E.status!=="pending"&&d(E)),m=t.filter(E=>E.status==="pending"&&d(E)),p=Ed(h),y=qF(h,n),w=h.length===0&&m.length===0,k=E=>{c(HF(E))},C=[{id:"recent",label:"Recent"},{id:"identity",label:"By identity"}],T=(E,M)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(E.key))return;E.preventDefault();const L=E.key==="Home"?"recent":E.key==="End"||M==="recent"?"identity":"recent";k(L),document.getElementById(`conversation-list-${L}`)?.focus()};return v.jsxs("div",{className:"listcol",children:[v.jsxs("div",{className:"listcol-head",children:[v.jsxs("div",{className:"listcol-titlebar",children:[v.jsx("h2",{className:"listcol-title",children:"Chats"}),v.jsxs("div",{className:"listcol-actions",children:[v.jsxs("button",{className:"btn sm primary",onClick:e.onInvite,children:[v.jsx(Se,{name:"plus",size:15}),"Invite"]}),v.jsx("button",{className:"icon-btn",title:"Settings",onClick:e.onSettings,children:v.jsx(Se,{name:"settings"})})]})]}),v.jsxs("div",{className:"search",children:[v.jsx(Se,{name:"search"}),v.jsx("input",{className:"field",placeholder:"Search people, agents, apps…",value:s,onChange:E=>l(E.target.value)})]}),v.jsx("div",{className:"conversation-list-modes",role:"tablist","aria-label":"Conversation list layout",children:C.map(E=>v.jsx("button",{id:`conversation-list-${E.id}`,type:"button",role:"tab","aria-selected":a===E.id,"aria-controls":"conversation-list-panel",tabIndex:a===E.id?0:-1,className:a===E.id?"active":"",onClick:()=>k(E.id),onKeyDown:M=>T(M,E.id),children:E.label},E.id))})]}),v.jsxs("div",{id:"conversation-list-panel",className:"listcol-scroll",role:"tabpanel","aria-labelledby":`conversation-list-${a}`,children:[a==="recent"&&p.length>0&&v.jsx("div",{className:"conversation-group",children:p.map(E=>v.jsx(wf,{c:E,active:i===E.id,onClick:()=>e.onSelect(E.id)},E.id))}),a==="identity"&&y.map(E=>v.jsxs("div",{children:[v.jsxs("div",{className:"group-label",title:E.note,children:[E.rootId&&v.jsx(Se,{name:"clusters"}),v.jsx("span",{children:E.label}),E.note&&v.jsxs("span",{className:"gl-note",children:["· ",E.note]})]}),v.jsx("div",{className:"conversation-group",children:E.contacts.map(M=>v.jsx(wf,{c:M,grouped:E.rootId!==null,active:i===M.id,onClick:()=>e.onSelect(M.id)},M.id))})]},E.id)),m.length>0&&v.jsxs("div",{children:[v.jsx("div",{className:"group-label",children:v.jsx("span",{children:"Pending"})}),v.jsx("div",{className:"conversation-group",children:m.map(E=>v.jsx(wf,{c:E,active:!1,onClick:()=>{}},E.id))})]}),w&&v.jsx("p",{className:"muted",style:{padding:"14px 10px",fontSize:"0.85rem"},children:"No contacts yet — share an invite to start."})]})]})}const vx=e=>`chat-message-${encodeURIComponent(e)}`,GF=()=>typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function xx(e){const{dir:t,canReply:n,onReply:i}=e,s=S.useRef(null),l=S.useRef(null),a=t==="out"?-1:1,c=8,d=56,h=84,m=S.useRef({id:-1,x0:0,y0:0,mode:"idle",armed:!1}),p=C=>{const T=s.current,E=l.current;if(T&&(T.style.transform=C?`translateX(${C}px)`:""),E){const M=Math.min(1,Math.abs(C)/d);E.style.opacity=String(M),E.style.transform=`scale(${.5+.5*M})`}},y=C=>{!n||C.pointerType==="mouse"||(m.current={id:C.pointerId,x0:C.clientX,y0:C.clientY,mode:"maybe",armed:!1})},w=C=>{const T=m.current;if(T.id!==C.pointerId||T.mode==="idle")return;const E=C.clientX-T.x0,M=C.clientY-T.y0;if(T.mode==="maybe"){if(Math.abs(E)<c&&Math.abs(M)<c)return;if(Math.abs(E)>Math.abs(M)&&Math.sign(E)===a)T.mode="drag",s.current?.classList.add("swiping");else{T.mode="idle";return}}let A=E*a;A<0&&(A=0),A>d&&(A=d+(A-d)*.35),A=Math.min(A,h);const L=A*a,U=Math.abs(L)>=d;U!==T.armed&&(T.armed=U,l.current?.classList.toggle("armed",U),U&&navigator.vibrate?.(10)),p(L)},k=C=>{const T=m.current;if(T.id!==C.pointerId)return;const E=T.mode==="drag"&&T.armed;m.current={id:-1,x0:0,y0:0,mode:"idle",armed:!1},s.current?.classList.remove("swiping"),l.current?.classList.remove("armed"),p(0),E&&i()};return v.jsxs("div",{className:"msg-row "+(e.rowClass??t),style:n?{touchAction:"pan-y"}:void 0,onPointerDown:y,onPointerMove:w,onPointerUp:k,onPointerCancel:k,children:[n&&v.jsx("span",{className:"swipe-cue",ref:l,"aria-hidden":!0,children:v.jsx(Se,{name:"reply",size:16})}),v.jsx("div",{className:"bubble-wrap",ref:s,children:e.children}),e.after]})}function QF(e){const{contact:t,messages:n}=e,[i,s]=S.useState(""),[l,a]=S.useState(!1),[c,d]=S.useState(null),[h,m]=S.useState(null),[p,y]=S.useState(null),[w,k]=S.useState(null),[C,T]=S.useState(null),[E,M]=S.useState(!1),[A,L]=S.useState(null),[U,D]=S.useState(!1),[Y,W]=S.useState(!1),[X,j]=S.useState(!1),[G,V]=S.useState(null),[fe,ie]=S.useState(!1),ee=S.useRef(null),ve=S.useRef(null),Te=S.useRef(!1),q=S.useRef(null),ue=S.useRef(!0),P=S.useRef(null),_=S.useRef(0),Q=S.useRef(null),R=S.useRef(new Map),Z=S.useRef(0),de=S.useRef(null),re=S.useRef(null),Ee=S.useRef(0);S.useEffect(()=>{s(""),m(null),y(null),d(null),k(null),T(null),M(!1),L(null),D(!1),W(!1),j(!1),_.current+=1,V(null),ie(!1),R.current.clear(),de.current=null,re.current=null},[t?.id]),S.useEffect(()=>{if(!p)return;const B=p.reply?.wireId;n.some(Ne=>Ne.kind!=="file"&&Ne.dir==="out"&&!!Ne.wireId&&!p.wireIds.has(Ne.wireId)&&Ne.text===p.text&&(Ne.replyTo?.wireId??void 0)===B)&&(y(null),m(null),s(Ne=>Ne===p.draft?"":Ne),k(Ne=>Ne===p.reply?null:Ne))},[n,p]);const ge=!!c?.wireId&&n.some(B=>B.wireId===c.wireId),xe=S.useMemo(()=>c&&!ge?[...n,c.message]:n,[n,c,ge]);S.useEffect(()=>{ge&&d(null)},[ge]),S.useLayoutEffect(()=>{const B=ve.current;if(!B)return;B.style.height="0px";const he=Math.max(44,Math.min(B.scrollHeight,132));B.style.height=`${he}px`,B.style.overflowY=B.scrollHeight>132?"auto":"hidden"},[i,t?.id]);const _e=B=>{const he=q.current;if(!he)return;const Ne=Math.max(0,he.scrollHeight-he.clientHeight);if(Math.abs(he.scrollTop-Ne)<1){de.current=null,re.current=null;return}const K=B&&!GF();de.current=K?Ne:null,re.current=K?he.scrollTop:null,K?he.scrollTo({top:Ne,behavior:"smooth"}):he.scrollTop=Ne};S.useLayoutEffect(()=>{if(!t){P.current=null,ue.current=!0,Ee.current=0;return}const B=q.current;if(!B)return;const he=P.current!==t.id,Ne=xe.length!==Ee.current;Ee.current=xe.length,!he&&!Ne&&de.current===null&&(ue.current=B.scrollHeight-B.clientHeight-B.scrollTop<=48),(he||ue.current)&&(_e(Ne&&!he&&P.current!==null),ue.current=!0),P.current=t.id},[t,xe.length]),S.useLayoutEffect(()=>{const B=window.location.hash;if(!B.startsWith("#chat-message-"))return;const he=document.getElementById(B.slice(1));he&&(he.scrollIntoView({block:"center"}),ue.current=!1)},[t?.id,xe.length]),S.useLayoutEffect(()=>{const B=Q.current,he=q.current;if(B===null||!he)return;const Ne=requestAnimationFrame(()=>{Q.current===B&&(he.scrollTop=B.top+he.scrollHeight-B.height,Q.current=null)});return()=>cancelAnimationFrame(Ne)},[xe.length]),S.useEffect(()=>{const B=q.current;if(!B||typeof ResizeObserver>"u")return;const he=B.firstElementChild;if(!he)return;const Ne=new ResizeObserver(()=>{ue.current&&_e(de.current!==null)});return Ne.observe(he),Ne.observe(B),()=>Ne.disconnect()},[t?.id]);const We=async B=>{const he=++_.current;m(null),j(!0);try{if(B.size>Qo&&t1(B.type,B.name)){const K=await zD(B,Qo);if(he!==_.current)return;L({filename:K.filename,mime:K.mime,bytes:K.bytes,originalSize:K.originalSize});return}if(B.size>Qo){m(`"${B.name}" is ${Ar(B.size)} — files up to ${Ar(Qo)} can be sent.`);return}const Ne=await B.arrayBuffer();if(he!==_.current)return;L({filename:B.name||"file",mime:B.type||"application/octet-stream",bytes:new Uint8Array(Ne)})}catch(Ne){he===_.current&&m(`Photo optimization failed: ${Ne instanceof Error?Ne.message:String(Ne)}`)}finally{he===_.current&&j(!1)}},Pt=()=>{!A||!e.onSendFile||Y||(W(!0),e.onSendFile(A,w?.wireId).then(()=>{L(null),k(null)}).catch(B=>m(`File send failed: ${String(B)} — it was not delivered.`)).finally(()=>W(!1)))},ct=e.onDraftChange;S.useEffect(()=>(ct?.(i.trim().length>0||l),()=>ct?.(!1)),[i,l,ct]);const $t=new Map;for(const B of xe)B.wireId&&$t.set(B.wireId,B);const ln=S.useMemo(()=>{const B=new Map;for(const he of xe)B.set(he,he.kind==="file"?null:he.dir==="in"?lE(t?.announcedName??"",he.text):null);return B},[xe,t?.announcedName]),St=B=>ln.get(B)??null,ft=B=>{if(B.dir==="out")return"You";const he=St(B);return he&&he.variant==="chat"?he.author:t?.name??"Them"},It=B=>{if(B.kind==="file")return B.mime?.startsWith("image/")?"Photo":qi(B.mime??"",B.filename??"")?"Voice message":B.filename||"File";const he=St(B);return he?he.text||mE(he):B.text},Le=B=>{if(!B.replyTo)return null;const he=$t.get(B.replyTo.wireId);return he?{author:ft(he),text:It(he)}:{author:"",text:"Original message"}};if(!t)return e.emptyOverride?v.jsx(v.Fragment,{children:e.emptyOverride}):v.jsx("div",{className:"detail",children:v.jsxs("div",{className:"detail-empty",children:[v.jsx(Se,{name:"chat"}),v.jsxs("div",{children:[v.jsx("div",{style:{fontWeight:650,color:"var(--text-2)"},children:"Select a conversation"}),v.jsx("div",{style:{fontSize:"0.85rem"},children:"Chat with people, agents and apps across ours."})]})]})});const Ut=async()=>{const B=i,he=B.trim(),Ne=!!p&&B===p.draft&&(w?.wireId??void 0)===p.reply?.wireId;if(!he||Te.current||Ne)return;p&&y(null),Te.current=!0,a(!0),m(null);const K=w,ae=K?.wireId,F=new AbortController;let J=!1,se=0;s(""),k(null);const Pe=`optimistic-${++Z.current}`;d({key:Pe,wireId:null,message:{dir:"out",text:he,date:new Date().toISOString(),read:!0,wireId:"",replyTo:ae?{wireId:ae}:null}});try{const Fe=await Promise.race([e.onSend(he,ae,F.signal),new Promise((pe,Je)=>{se=window.setTimeout(()=>{J=!0,F.abort(),Je(new Error("send timeout"))},XF)})]);Fe?(R.current.set(Fe,Pe),d(pe=>pe?.key===Pe?{...pe,wireId:Fe}:pe)):d(pe=>pe?.key===Pe?null:pe),y(null)}catch(Fe){d(null),s(pe=>pe===""?B:pe),k(pe=>pe===null?K:pe),J||!(Fe instanceof kf)?(y({draft:B,text:he,reply:K,wireIds:new Set(n.flatMap(pe=>pe.wireId?[pe.wireId]:[]))}),m(`${J?"Send timed out":"Send connection was interrupted"} — delivery status is unknown. Check the conversation; edit the draft before sending again.`)):m(`Send failed: ${String(Fe)} — the message was not delivered.`)}finally{window.clearTimeout(se),Te.current=!1,a(!1)}},Wt=!!p&&i===p.draft&&(w?.wireId??void 0)===p.reply?.wireId,wn=B=>{B.wireId&&k({wireId:B.wireId,author:ft(B),text:It(B)})};return v.jsxs("div",{className:"detail detail-chat",children:[v.jsxs("div",{className:"detail-head",children:[v.jsxs("div",{className:"conv-peer",children:[v.jsx("button",{className:"icon-btn detail-back",onClick:e.onBack,children:v.jsx(Se,{name:"back"})}),v.jsx("div",{className:"avatar accent",children:t.initials}),v.jsxs("div",{className:"conv-peer-meta",children:[C!==null?v.jsx("input",{className:"field name-edit",value:C,autoFocus:!0,placeholder:t.name,onChange:B=>T(B.target.value),onKeyDown:B=>{B.key==="Enter"?(e.onRename?.(C),T(null)):B.key==="Escape"&&T(null)},onBlur:()=>T(null)}):v.jsxs("div",{className:"conv-peer-name",children:[t.name,e.onRename&&v.jsx("button",{className:"icon-btn name-pencil",title:"Rename (only changes how they appear to you)",onClick:()=>T(t.name),children:v.jsx(Se,{name:"edit",size:13})})]}),e.syncing&&v.jsxs("div",{className:"conv-sync",role:"status","aria-live":"polite",children:[v.jsx("span",{className:"conv-sync-dot","aria-hidden":!0}),e.syncing==="connecting"?"Connecting…":"Updating…"]}),!e.syncing&&(t.roleId?v.jsxs("button",{className:"idchip",onClick:()=>M(!0),children:[v.jsx(Se,{name:"shield",size:11}),"verified role of ",t.rootName]}):t.status!=="pending"&&v.jsxs("button",{className:"idchip quiet",onClick:()=>M(!0),children:[v.jsx(Se,{name:"lock",size:11}),"verified identity"]}))]})]}),E&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pop-backdrop",onClick:()=>M(!1)}),v.jsxs("div",{className:"idcard anim-scale",children:[v.jsx("h4",{children:"Verified identity"}),t.roleId&&v.jsxs("p",{children:["This is the role ",v.jsxs("strong",{children:["“",t.roleId,"”"]})," of"," ",v.jsx("strong",{children:t.rootName})," — the link is cryptographically signed, not self-declared."]}),v.jsx("div",{className:"idcard-fp mono",children:t.id}),v.jsx("p",{className:"idcard-note",children:"This id is the fingerprint of their key. Names are what people show you; the fingerprint is what guarantees you're always talking to the same identity — no one can impersonate it. Renaming only changes how they appear to you."})]})]}),v.jsxs("div",{className:"conv-actions",children:[v.jsxs("button",{className:"btn sm",title:"Shared photos, files, and links",onClick:()=>ie(!0),children:[v.jsx(Se,{name:"paperclip",size:14}),"Media"]}),v.jsxs("button",{className:"btn sm danger",title:"Remove contact",onClick:e.onRemove,children:[v.jsx(Se,{name:"trash",size:14}),"Remove"]})]})]}),v.jsx("div",{className:"messages",ref:q,onScroll:B=>{const he=B.currentTarget,Ne=he.scrollHeight-he.clientHeight-he.scrollTop;if(de.current!==null){const K=re.current;if(K===null||he.scrollTop>=K-1){re.current=he.scrollTop,Ne<=4&&(de.current=null,re.current=null);return}de.current=null,re.current=null}ue.current=Ne<=48},onPointerDown:()=>{de.current=null,re.current=null},onTouchStart:()=>{de.current=null,re.current=null},onWheel:()=>{de.current=null,re.current=null},onDragOver:B=>{e.onSendFile&&B.preventDefault()},onDrop:B=>{if(!e.onSendFile)return;B.preventDefault();const he=B.dataTransfer.files?.[0];he&&We(he)},children:v.jsxs("div",{className:"messages-inner",children:[v.jsxs("div",{className:"e2e-note",children:[v.jsx(Se,{name:"lock"}),"End-to-end encrypted · the broker only sees ciphertext"]}),(e.hiddenEarlier??0)>0&&e.onLoadEarlier&&v.jsxs("button",{className:"btn sm chat-load-earlier",onClick:()=>{ue.current=!1;const B=q.current;Q.current=B?{height:B.scrollHeight,top:B.scrollTop}:null,e.onLoadEarlier?.()},children:["Load earlier messages (",e.hiddenEarlier," remaining)"]}),v.jsx(LO,{initial:!1,children:xe.map((B,he)=>{const Ne=B===c?.message?c.key:B.wireId&&R.current.get(B.wireId)||B.wireId||`${B.date}-${(e.hiddenEarlier??0)+he}`,K=vx(B.wireId||Ne),ae=xe[he-1],F=xe[he+1],J=St(B),se=Ke=>{if(!Ke)return null;const Ue=St(Ke);return Ue?Ue.variant==="system"?"room:system":`room:chat:${Ue.author}${Ue.role}`:Ke.dir},Pe=se(B),Fe=!!ae&&se(ae)===Pe&&Pe!=="room:system",pe=!!F&&se(F)===Pe&&Pe!=="room:system",Je=(B.dir==="out"?"out":"in")+(Fe?" cont-top":"")+(pe?" cont-bot":""),Ht=B.wireId?v.jsx("button",{className:"msg-reply",title:"Reply",onClick:()=>wn(B),children:v.jsx(Se,{name:"reply",size:15})}):null;if(J&&J.variant==="system"){const Ke=J.presentation??"system";return v.jsx(as.div,{className:"message-motion",id:K,initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0},transition:{duration:.22,ease:[.22,1,.36,1]},children:v.jsxs("div",{className:`room-system room-${Ke}-card`,role:"note",children:[J.label&&v.jsx("span",{className:"room-system-label",children:J.label}),J.roomName&&v.jsx("strong",{className:"room-card-name",children:J.roomName}),v.jsx(ev,{text:J.text,className:"room-system-text message-markdown"}),!!J.details?.length&&v.jsx("ul",{className:"room-card-details","aria-label":"Room event details",children:J.details.map(Ue=>v.jsx("li",{children:Ue},Ue))}),v.jsxs("span",{className:"room-card-provenance",children:[J.authoredBy&&v.jsx("span",{className:"room-card-author",children:J.authoredBy}),v.jsx("span",{className:"room-system-at",children:fs(J.authoredAt||B.date)})]})]})},Ne)}if(B.kind==="file"){const Ke=Lx(B.wireId)??{id:B.wireId,dir:B.dir,filename:B.filename??"file",mime:B.mime??"application/octet-stream",size:0,date:B.date};return v.jsx(as.div,{className:"message-motion",id:K,initial:{opacity:0,y:12,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.98},transition:{duration:.22,ease:[.22,1,.36,1]},children:v.jsx(xx,{dir:B.dir==="out"?"out":"in",rowClass:Je,canReply:!!B.wireId,onReply:()=>wn(B),after:Ht,children:v.jsx("div",{className:`ours-message ours-message-file ours-message--${B.dir}`,children:v.jsx(vA,{rec:Ke,receipt:B.receipt,receiptless:B.receiptless,onPreview:V,onFetch:e.onFetchFile})})})},Ne)}const nt=Le(B);return v.jsx(as.div,{className:"message-motion",id:K,initial:{opacity:0,y:12,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.98},transition:{duration:.22,ease:[.22,1,.36,1]},children:v.jsx(xx,{dir:B.dir==="out"?"out":"in",rowClass:Je,canReply:!!B.wireId,onReply:()=>wn(B),after:Ht,children:v.jsxs("div",{className:`ours-message ours-message--${B.dir}`,children:[nt&&v.jsxs("div",{className:"quote",children:[nt.author&&v.jsx("span",{className:"quote-author",children:nt.author}),v.jsx("span",{className:"quote-text",children:nt.text})]}),J&&!Fe&&v.jsxs(v.Fragment,{children:[J.roomName&&v.jsx("div",{className:"room-message-room",children:J.roomName}),v.jsxs("div",{className:"room-author",children:[v.jsx("span",{className:"room-author-name",children:J.author}),J.role&&v.jsx("span",{className:"room-author-role",children:J.role})]})]}),v.jsx(ev,{text:J?J.text:B.text}),v.jsxs("div",{className:"bubble-at",children:[fs(J?.authoredAt||B.date),B.dir==="out"&&v.jsx(Ox,{receipt:B.receipt,receiptless:B.receiptless})]})]})})},Ne)})}),v.jsx("div",{className:"thread-end","aria-hidden":!0})]})},t.id),h&&v.jsxs("div",{className:"banner error",role:"alert",children:[h,h.startsWith("Send failed:")&&v.jsx("span",{className:"banner-actions",children:v.jsx("button",{className:"linkbtn",onClick:()=>void Ut(),children:"retry"})})]}),v.jsxs("div",{className:"composer-wrap",children:[w&&v.jsxs("div",{className:"reply-bar",children:[v.jsx("div",{className:"reply-bar-line"}),v.jsxs("div",{className:"reply-bar-body",children:[v.jsxs("div",{className:"reply-bar-author",children:["Replying to ",w.author]}),v.jsx("div",{className:"reply-bar-text",children:w.text})]}),v.jsx("button",{className:"icon-btn",title:"Cancel reply",onClick:()=>k(null),children:v.jsx(Se,{name:"close",size:16})})]}),A&&v.jsx(Iw,{att:A,sending:Y,onSend:Pt,onDiscard:()=>L(null)}),X&&v.jsx("div",{className:"attachment-processing",role:"status",children:"Optimizing photo for secure delivery…"}),v.jsxs("div",{className:"composer"+(U?" recording":""),children:[e.onSendFile&&v.jsxs(v.Fragment,{children:[v.jsx("input",{ref:ee,type:"file",style:{display:"none"},onChange:B=>{const he=B.target.files?.[0];he&&We(he),B.target.value=""}}),v.jsx("button",{className:"icon-btn composer-tool",title:"Attach a file or photo",disabled:Y||X||U,onClick:()=>ee.current?.click(),children:v.jsx(Se,{name:"paperclip",size:18})}),v.jsx(_w,{disabled:Y||X||!!A,onReady:B=>{D(!1),L(B)},onError:B=>{D(!1),m(B)},onActiveChange:D},t.id)]}),v.jsx("textarea",{ref:ve,className:"field",rows:1,placeholder:(w?"Reply to "+w.author:"Message "+t.name)+"…",value:i,"aria-busy":l,onChange:B=>s(B.target.value),onKeyDown:B=>{B.key==="Enter"?!(window.matchMedia("(pointer: coarse)").matches||window.innerWidth<=860)&&!B.shiftKey&&(B.preventDefault(),Ut()):B.key==="Escape"&&k(null)}}),v.jsxs("button",{className:"btn primary",onPointerDown:B=>{B.button===0&&document.activeElement===ve.current&&B.preventDefault()},onClick:()=>void Ut(),disabled:l||Wt||!i.trim(),title:Wt?"Delivery status unknown — edit before sending again":void 0,children:[v.jsx(Se,{name:"send",size:16}),"Send"]})]})]}),G&&(Ll(G.filename,G.mime)?v.jsx(ED,{rec:G,onClose:()=>V(null)}):v.jsx(CD,{rec:G,onClose:()=>V(null),onSendText:e.onSend,onSendFile:e.onSendFile})),fe&&v.jsx(PD,{messages:n,indexOffset:e.hiddenEarlier??0,onClose:()=>ie(!1),onPreview:B=>{ie(!1),V(B)},onJump:B=>{document.getElementById(vx(B))?.scrollIntoView({behavior:"smooth",block:"center"}),ie(!1)}})]})}const $k=3;function ZF(e,t,n=$k){return[t,...e.filter(i=>i.cid!==t.cid)].slice(0,n)}function JF(e,t){return e.filter(n=>n.id!==t)}const ez=6e3,tz=ZF,nz=JF;function rz(){const[e,t]=S.useState([]),n=S.useRef(0),i=S.useCallback((a,c,d)=>{const h=Date.now(),m={id:`${a}:${h}:${n.current++}`,cid:a,name:c,preview:"",at:h};t(p=>tz(p,m,$k))},[]),s=S.useCallback(a=>t(c=>nz(c,a)),[]),l=S.useCallback(a=>t(c=>c.filter(d=>d.cid!==a)),[]);return{toasts:e,push:i,dismiss:s,clear:l}}function iz(e){const{item:t,onOpen:n,onDismiss:i}=e,[s,l]=S.useState(!1),[a,c]=S.useState(!1),d=s||a;return S.useEffect(()=>{if(d)return;const h=setTimeout(()=>i(t.id),ez);return()=>clearTimeout(h)},[t.id,d,i]),v.jsxs("div",{className:"banner msg",role:"status",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onFocus:()=>c(!0),onBlur:h=>{h.currentTarget.contains(h.relatedTarget)||c(!1)},children:[v.jsxs("button",{className:"msg-open",title:`Open the conversation with ${t.name}`,onClick:()=>n(t.cid),children:[v.jsx("span",{className:"avatar sm accent","aria-hidden":"true",children:cs(t.name)}),v.jsxs("span",{className:"msg-text",children:[v.jsx("strong",{className:"msg-name",children:t.name}),v.jsx("span",{className:"msg-preview",children:t.preview||"New message"})]})]}),v.jsx("button",{className:"icon-btn msg-close",title:"Dismiss","aria-label":`Dismiss the notification from ${t.name}`,onClick:()=>i(t.id),children:v.jsx(Se,{name:"close",size:15})})]})}function oz(e){return v.jsx(v.Fragment,{children:e.items.map(t=>v.jsx(iz,{item:t,onOpen:e.onOpen,onDismiss:e.onDismiss},t.id))})}function sz(e){const t=S.useRef(null),{text:n,size:i=240}=e;return S.useEffect(()=>{if(!t.current||!n)return;const s=t.current;Hd(()=>import("./browser-B-oaR5rG.js").then(l=>l.b),[]).then(l=>{l.toCanvas(s,n,{width:i,margin:2,errorCorrectionLevel:"M",color:{dark:"#000000",light:"#ffffff"}})})},[n,i]),v.jsx("div",{style:{display:"flex",justifyContent:"center",margin:"8px 0"},children:v.jsx("canvas",{ref:t,"data-testid":"qr-canvas","data-invite":n,width:i,height:i,style:{borderRadius:8,border:"1px solid var(--line)",imageRendering:"pixelated"}})})}function az(e){const t=S.useRef(null),n=S.useRef(null),i=S.useRef(null),s=S.useRef(0),l=S.useRef(!0),[a,c]=S.useState("requesting"),[d,h]=S.useState(""),m=S.useCallback(()=>{s.current&&cancelAnimationFrame(s.current),i.current&&(i.current.getTracks().forEach(w=>w.stop()),i.current=null),t.current&&(t.current.srcObject=null)},[]),p=S.useCallback(w=>{i.current=w;const k=t.current;k.srcObject=w,k.setAttribute("playsinline","true"),k.play();const C=n.current,T=C.getContext("2d"),E=()=>{if(l.current)if(k.readyState>=k.HAVE_ENOUGH_DATA){const M=k.videoWidth||320,A=k.videoHeight||240;C.width=M,C.height=A,T.drawImage(k,0,0,M,A);const L=T.getImageData(0,0,M,A);Hd(()=>import("./jsQR-CKtnWXY9.js").then(U=>U.j),[]).then(U=>{const D=U.default,Y=D(L.data,L.width,L.height,{inversionAttempts:"dontInvert"});if(Y&&Y.data&&l.current){m(),e.onDecode(Y.data);return}l.current&&(s.current=requestAnimationFrame(E))})}else s.current=requestAnimationFrame(E)};s.current=requestAnimationFrame(E)},[m,e]);S.useEffect(()=>{if(l.current=!0,!navigator.mediaDevices?.getUserMedia){c("nocamera");return}return navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then(w=>{if(!l.current){w.getTracks().forEach(k=>k.stop());return}c("scanning"),p(w)}).catch(w=>{if(!l.current)return;const k=w.name??"";k==="NotAllowedError"||k==="PermissionDeniedError"?c("denied"):k==="NotFoundError"||k==="DevicesNotFoundError"?c("nocamera"):(c("error"),h(w.message??String(w)))}),()=>{l.current=!1,m()}},[]);const y=()=>{m(),e.onClose()};return v.jsxs("div",{"data-testid":"qr-scanner",style:{display:"flex",flexDirection:"column",gap:12,padding:"12px 0"},children:[(a==="requesting"||a==="scanning")&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:a==="requesting"?"Requesting camera…":"Point your camera at the QR code."}),v.jsxs("div",{style:{position:"relative",borderRadius:8,overflow:"hidden",background:"#000",minHeight:200},children:[v.jsx("canvas",{ref:n,"data-testid":"scanner-canvas",style:{display:"none"}}),v.jsx("video",{ref:t,"data-testid":"scanner-video",muted:!0,playsInline:!0,style:{width:"100%",display:"block",borderRadius:8}}),a==="scanning"&&v.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{width:160,height:160,borderRadius:12,border:"2px solid var(--accent)",boxShadow:"0 0 0 9999px rgba(0,0,0,0.4)"}})})]})]}),a==="denied"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--text-2)"},children:[v.jsx(Se,{name:"shield",size:16}),v.jsx("span",{style:{fontWeight:600,fontSize:"0.9rem"},children:"Camera access denied"})]}),v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:"Camera permission was denied. To scan QR codes, allow camera access in your browser settings, then try again. Or paste the invite text below instead."})]}),a==="nocamera"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--text-2)"},children:[v.jsx(Se,{name:"close",size:16}),v.jsx("span",{style:{fontWeight:600,fontSize:"0.9rem"},children:"No camera available"})]}),v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:"No camera was found on this device. Paste the invite text below instead."})]}),a==="error"&&v.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:v.jsxs("p",{style:{margin:0,fontSize:"0.85rem",color:"var(--danger, #e53)"},children:["Camera error: ",d||"unknown error",". Paste the invite text below instead."]})}),v.jsx("button",{className:"btn",style:{justifyContent:"center"},onClick:y,children:a==="scanning"?v.jsxs(v.Fragment,{children:[v.jsx(Se,{name:"close",size:14}),"Cancel scan"]}):v.jsxs(v.Fragment,{children:[v.jsx(Se,{name:"close",size:14}),"Close scanner"]})})]})}function lz(e){const[t,n]=S.useState("generate"),[i,s]=S.useState("one_time"),[l,a]=S.useState(""),[c,d]=S.useState(null),[h,m]=S.useState("one_time"),[p,y]=S.useState(""),[w,k]=S.useState(""),[C,T]=S.useState(!1),[E,M]=S.useState(null),[A,L]=S.useState(null),[U,D]=S.useState(!1),[Y,W]=S.useState(null),X=S.useRef(!1),j=async()=>{if(!X.current){X.current=!0,T(!0),L(null),M(null);try{m(i),d(await e.onCreate(i,i==="one_time"&&l.trim()||void 0))}catch(V){L(V instanceof Error?V.message:String(V))}finally{X.current=!1,T(!1)}}},G=v.jsxs("div",{className:"modal-tabs",role:"tablist","aria-label":"Invite mode",children:[v.jsx("button",{type:"button",role:"tab","aria-selected":t==="generate",className:"btn sm"+(t==="generate"?" primary":""),onClick:()=>n("generate"),children:"Generate invite"}),v.jsx("button",{type:"button",role:"tab","aria-selected":t==="accept",className:"btn sm"+(t==="accept"?" primary":""),onClick:()=>n("accept"),children:"Accept invite"})]});return v.jsxs(Ps,{title:t==="generate"?"Invite a contact":"Accept an invite",onClose:()=>{X.current||e.onClose()},tabs:G,children:[t==="generate"&&!c&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:13},children:[v.jsxs("p",{className:"muted","data-testid":"invite-identity",style:{margin:0,fontSize:"0.85rem"},children:["Creating as ",v.jsx("strong",{children:e.identity.name})," · ",v.jsxs("span",{className:"mono",children:["@",jd(e.identity.cid)]})]}),v.jsxs("div",{role:"radiogroup","aria-label":"Invite kind",style:{display:"flex",flexDirection:"column",gap:7},children:[v.jsxs("label",{children:[v.jsx("input",{type:"radio",name:"invite-kind",checked:i==="one_time",onChange:()=>s("one_time")})," One person (one time)"]}),v.jsxs("label",{children:[v.jsx("input",{type:"radio",name:"invite-kind",checked:i==="public",onChange:()=>s("public")})," Reusable public invite"]})]}),i==="one_time"?v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.9rem"},children:"Optionally name the person or agent this invite is for."}),v.jsx("input",{className:"field",value:l,onChange:V=>a(V.target.value),placeholder:"Their name (optional), e.g. Bob",maxLength:64})]}):v.jsx("p",{className:"onb-warning","data-testid":"public-invite-warning",style:{margin:0,fontSize:"0.9rem"},children:"Anyone with this invite can connect until you revoke it. It has no expiry and stays valid across server restarts."}),v.jsx("button",{className:"btn primary",style:{justifyContent:"center"},disabled:C,onClick:()=>void j(),children:C?"Generating…":i==="public"?"Create public invite":"Generate invite"}),i==="public"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsx("h4",{style:{margin:0,fontSize:"0.9rem"},children:"Active reusable invites"}),e.invites.filter(V=>V.mode==="public").length===0&&v.jsx("p",{className:"muted",style:{margin:0},children:"None right now."}),e.invites.filter(V=>V.mode==="public").map(V=>v.jsxs("div",{"data-testid":"public-invite-row",style:{padding:"8px 10px",background:"var(--inset)",borderRadius:7},children:[v.jsx("span",{className:"mono",children:V.invite_id}),v.jsxs("p",{className:"muted",children:["Created ",V.created?xE(V.created):"unknown"," · Active until revoked · No expiry"]}),Y===V.invite_id?v.jsxs("span",{children:[v.jsx("button",{className:"btn sm danger",onClick:()=>void e.onRevoke(V.invite_id).then(()=>(W(null),e.onRefresh())).catch(fe=>L(String(fe))),children:"Confirm revoke"})," ",v.jsx("button",{className:"btn sm",onClick:()=>W(null),children:"Keep it"})]}):v.jsx("button",{className:"btn sm",onClick:()=>W(V.invite_id),children:"Revoke"})]},V.invite_id))]}),E&&v.jsx("p",{className:"muted",children:E}),A&&v.jsx("p",{className:"onb-error",children:A})]}),t==="generate"&&c&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted","data-testid":h==="public"?"public-result-note":void 0,children:h==="public"?"Shown only on this screen. Copy it now; the text cannot be recovered later. The invite stays active until revoked.":`Send this invite to ${l.trim()||"your contact"}. It can be redeemed once.`}),v.jsx("textarea",{className:"field mono","data-testid":"invite-result-text",readOnly:!0,rows:5,value:c,onFocus:V=>V.currentTarget.select()}),h==="one_time"&&v.jsx(sz,{text:c}),v.jsxs("button",{className:"btn primary",onClick:()=>void navigator.clipboard.writeText(c).then(()=>M("Copied to clipboard.")),children:[v.jsx(Se,{name:"copy",size:15}),"Copy invite"]}),h==="public"&&v.jsx("button",{className:"btn","data-testid":"done-hide-invite",onClick:()=>{d(null),a(""),e.onRefresh()},children:"Done — hide invite"}),E&&v.jsx("p",{className:"muted",children:E})]}),t==="accept"&&v.jsxs("form",{style:{display:"flex",flexDirection:"column",gap:13},onSubmit:V=>{V.preventDefault(),!(!p.trim()||C)&&(T(!0),L(null),e.onAccept(p.trim(),w.trim()||void 0).then(()=>{M("Invite accepted — the contact will appear once the sender verifies your identity."),y(""),k("")}).catch(fe=>L(String(fe))).finally(()=>T(!1)))},children:[v.jsx("p",{className:"muted",children:"Paste the invite you received, or scan a QR code."}),U?v.jsx(az,{onDecode:V=>{y(V),D(!1)},onClose:()=>D(!1)}):v.jsxs("button",{type:"button",className:"btn",onClick:()=>D(!0),children:[v.jsx(Se,{name:"monitor",size:15}),"Scan QR code"]}),v.jsx("textarea",{className:"field mono","aria-label":"Invite",rows:5,value:p,onChange:V=>y(V.target.value),placeholder:"Paste invite text…"}),v.jsx("input",{className:"field",value:w,onChange:V=>k(V.target.value),placeholder:"Rename them (optional)",maxLength:64}),v.jsx("button",{className:"btn primary",type:"submit",disabled:C||!p.trim(),children:C?"Connecting…":"Add contact"}),E&&v.jsx("p",{className:"muted",children:E}),A&&v.jsx("p",{className:"onb-error",children:A})]})]})}function uz(e){const[t,n]=S.useState(e.identity.bio??""),[i,s]=S.useState(!1),[l,a]=S.useState(null),[c,d]=S.useState(e.push.preview),h=fC(),m=!e.workerSupported||e.push.status==="unsupported"?h??"Unavailable — requires a secure browser with service-worker support.":e.push.status==="needs-permission"?h??"Needs permission — allow notifications, then choose Enable or Repair.":e.push.status==="on"?"On — this browser and the server agree on the current Web Push configuration.":e.push.status==="repairing"?"Repairing — checking the browser subscription and server acknowledgement…":e.push.status==="error"?"Repair needed — the browser and server could not confirm the same subscription.":"Off — enable notifications for this browser.";return v.jsxs(Ps,{title:"Settings",onClose:e.onClose,wide:!0,children:[v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Display name"}),v.jsx("input",{className:"field",readOnly:!0,value:e.identity.name})]}),v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Your address"}),v.jsx("input",{className:"field mono",readOnly:!0,value:e.identity.cid,onFocus:p=>p.currentTarget.select()}),v.jsx("p",{className:"muted",children:"Your public address on ours. Share an invite to connect more easily."})]}),v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Public bio"}),v.jsx("textarea",{className:"field",rows:3,value:t,onChange:p=>{n(p.target.value),s(!1),a(null)}}),v.jsx("button",{className:"btn sm",onClick:()=>{a(null),e.onSaveBio(t).then(()=>s(!0)).catch(p=>a(String(p)))},children:i?"Saved":"Save bio"}),l&&v.jsx("p",{className:"onb-error",children:l})]}),v.jsxs("label",{style:{display:"flex",gap:9},children:[v.jsx("input",{type:"checkbox",checked:e.dark,onChange:e.onToggleDark})," Dark mode"]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"Notifications"}),v.jsx("p",{className:e.push.status==="needs-permission"||e.push.status==="error"?"onb-error":"muted",children:m}),h&&h!==m&&v.jsx("p",{className:"muted","data-testid":"push-platform-guidance",children:h}),v.jsxs("fieldset",{style:{border:0,padding:0,margin:"12px 0"},children:[v.jsx("legend",{className:"lbl",children:"Lock-screen preview"}),v.jsxs("label",{style:{display:"block",marginTop:7},children:[v.jsx("input",{type:"radio",name:"push-preview",checked:c==="full",onChange:()=>d("full")})," Full — sender and message text or filename"]}),v.jsxs("label",{style:{display:"block",marginTop:7},children:[v.jsx("input",{type:"radio",name:"push-preview",checked:c==="private",onChange:()=>d("private")})," Private — generic content only"]})]}),v.jsx("p",{className:"muted",children:"Full previews can expose sender names, message text, and filenames on the lock screen. The push provider still sees delivery endpoint, timing, and payload size metadata in either mode."}),v.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:e.push.status==="on"?v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"btn",disabled:e.busy,onClick:()=>void e.onPushAction("disable",c),children:"Disable notifications"}),v.jsx("button",{className:"btn",disabled:e.busy,onClick:()=>void e.onPushAction("repair",c),children:"Repair"}),c!==e.push.preview&&v.jsx("button",{className:"btn primary",disabled:e.busy,onClick:()=>void e.onPushAction("enable",c),children:"Save preview"})]}):v.jsx("button",{className:"btn primary",disabled:e.busy||!e.workerSupported||e.push.status==="unsupported",onClick:()=>void e.onPushAction(e.push.status==="error"||e.push.blocked?"repair":"enable",c),children:e.busy?"Repairing…":e.push.status==="error"||e.push.blocked?"Repair":"Enable notifications"})})]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"App status"}),v.jsx("p",{className:"muted",children:e.offline?"Offline — reconnecting. Message and identity data are never cached.":"Online."}),e.updateAvailable&&v.jsx("button",{className:"btn primary",onClick:e.onReloadUpdate,children:"Reload to update"})]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"Build"}),v.jsx("input",{className:"field mono",readOnly:!0,value:e.build?`${e.build.version} · ${e.build.sha}`:"Loading…"})]})]})}function cz(e,t,n,i,s=6e4){return!t||!t.sha?"current":t.sha===e?(n.remoteSha=null,n.firstMismatchAt=null,"current"):(n.remoteSha=t.sha,(n.firstMismatchAt===null||n.firstMismatchAt===void 0)&&(n.firstMismatchAt=i),n.controllerChanged?"newer-available":i-n.firstMismatchAt>=s?"stuck":"newer-available")}const fz="f426c53053346d9886c9e04989661538a7f76edc",dz=15*6e4,hz=6e4,pz=cz;async function mz(){try{const e=await fetch("/version.json",{cache:"no-store"});return e.ok?await e.json():null}catch{return null}}function gz(e){const t={remoteSha:null,firstMismatchAt:null,controllerChanged:!1},n=()=>{t.controllerChanged=!0};navigator.serviceWorker?.addEventListener("controllerchange",n);let i=!1;const s=async()=>{const d=await mz(),h=pz(fz,d,t,Date.now(),hz);h==="newer-available"?(e.onUpdateAvailable(),navigator.serviceWorker?.getRegistration().then(m=>m?.update())):h==="stuck"&&!i&&(i=!0,e.onStuck(d.sha))},l=setTimeout(()=>void s(),5e3),a=setInterval(()=>void s(),dz),c=()=>{document.visibilityState==="visible"&&s()};return document.addEventListener("visibilitychange",c),()=>{clearTimeout(l),clearInterval(a),document.removeEventListener("visibilitychange",c),navigator.serviceWorker?.removeEventListener("controllerchange",n)}}async function yz(e){try{const t=await navigator.serviceWorker.getRegistrations();await Promise.all(t.map(i=>i.unregister()));const n=await caches.keys();await Promise.all(n.map(i=>caches.delete(i)))}catch{}return location.replace(location.pathname+"?v="+encodeURIComponent(e)),new Promise(()=>{})}function vz(){const e=new URL(location.href);e.searchParams.has("v")&&(e.searchParams.delete("v"),history.replaceState(null,"",e.pathname+e.search+e.hash))}const wx=[0,100,400,1e3,3e3,6e3],kx=e=>new Promise(t=>setTimeout(t,e)),Sx={delivered:1,read:2},bx="ours-dark-v3",Cx="#chat-message-",Ex=pl,xz=e=>e instanceof Error&&e.message?e.message:"The request could not be completed.";function Uk(e,t){const n=new Map,i=[];for(const s of e?.messages??[]){const l={dir:s.dir,text:s.text,date:s.date,read:s.read,wireId:s.wire_id,replyTo:s.reply_to?{wireId:s.reply_to.wire_id}:null,receipt:s.receipt??void 0,receiptless:s.dir==="out"&&!s.wire_id};s.wire_id?n.set(s.wire_id,l):i.push(l)}for(const s of t){const l=n.get(s.wire_id);n.set(s.wire_id,{dir:s.dir,text:"",date:s.date,read:l?.read??s.dir==="out",wireId:s.wire_id,replyTo:s.reply_to?{wireId:s.reply_to.wire_id}:l?.replyTo??null,kind:"file",filename:s.filename,mime:s.mime,receipt:l?.receipt})}return[...i,...n.values()].sort((s,l)=>{const a=Ex(s.date)-Ex(l.date);return a===0?s.wireId.localeCompare(l.wireId):a})}function wz(e){const t={};for(const n of Object.values(e.roots??{}))t[n.root_cid]={label:n.root_name,note:"Verified identity"};return t}function kz(e,t){return[...e.contacts.contacts.map(i=>{const s=e.contacts.roots?.[i.container_id],l=Zr(e,i.container_id),c=Uk(l,t[i.container_id]??[]).at(-1),d=Jo(i);return{id:i.container_id,name:d,announcedName:i.name,initials:cs(d),when:c?vE(c.date):"",activityAt:c?.date??"",last:c?.kind==="file"?PE(c.filename,c.mime):l?.preview??c?.text??"",unread:l?.unread??0,status:"active",root:s?.root_cid??null,sub:s?`role “${s.role_id}” of ${s.root_name}`:"",roleId:s?.role_id??null,rootName:s?.root_name??null,mine:!1,kind:s?"agent":"person"}}),...e.contacts.pending.map(i=>{const s=Jo(i);return{id:`pending:${i.container_id}`,name:s,announcedName:i.name,initials:cs(s),when:"",activityAt:"",last:`${i.queued} queued · approval required`,unread:0,status:"pending",root:null,sub:"",roleId:null,rootName:null,mine:!1,kind:"person"}})]}function Sz(){return v.jsx(bz,{})}function bz(){const e=S.useRef(oC(Dg(window.location.pathname))).current,[t,n]=S.useReducer(Lg,e),i=S.useRef(t),s=S.useRef(new rC),l=S.useRef(null),a=S.useRef(new Map),c=S.useRef(new Map),[d,h]=S.useState({}),m=S.useRef(d),[p,y]=S.useState(null),w=S.useRef(new Set),[k,C]=S.useState(null),T=S.useRef(k),E=S.useRef(!1),[M,A]=S.useState([]),[L,U]=S.useState(null),[D,Y]=S.useState(()=>localStorage.getItem(bx)!=="0"),[W,X]=S.useState(null),[j,G]=S.useState({supported:!1,offline:!navigator.onLine,updateAvailable:!1,registration:null}),[V,fe]=S.useState({status:"unsupported",preview:"full"}),[ie,ee]=S.useState(!1),[ve,Te]=S.useState(!1),[q,ue]=S.useState(()=>window.location.hash.startsWith(Cx)),{toasts:P,push:_,dismiss:Q,clear:R}=rz(),Z=S.useCallback(F=>{i.current=Lg(i.current,F),n(F)},[]),de=S.useCallback(F=>{E.current=F},[]);S.useEffect(()=>{i.current=t},[t]),T.current=k,m.current=d,S.useMemo(()=>(qg(Object.values(d).flat()),null),[d]),S.useEffect(()=>(document.documentElement.classList.toggle("theme-dark",D),()=>document.documentElement.classList.remove("theme-dark")),[D]);const re=S.useCallback(F=>Z({type:"error",message:xz(F)}),[Z]),Ee=S.useCallback(()=>{const F=i.current;return{visibility:document.visibilityState,appRoute:F.route.name==="chats"?"chats":"other",selectedContactCid:Xr(F),desktopLayout:l.current?.matches??window.innerWidth>=861,mobileDetailOpen:F.mobileDetailOpen,conversationCoveringDialogOpen:T.current!==null}},[]),ge=S.useCallback(async(F,J=!0)=>{try{const se=await Ze.conversation(F);return Z({type:"page",contactCid:F,page:se}),se}catch(se){return J&&re(se),null}},[Z,re]),xe=S.useCallback(async(F,J=!0)=>{try{const se=await Ze.files(F);return qg(se.files),h(Pe=>({...Pe,[F]:se.files})),se.files}catch(se){return J&&re(se),null}},[re]);S.useEffect(()=>gz({onUpdateAvailable:()=>G(F=>({...F,updateAvailable:!0})),onStuck:F=>{yz(F)}}),[]);const _e=S.useCallback(async()=>{const F=await Ze.contacts();return Z({type:"contacts",contacts:{...F,pending:F.pending??[]}}),F},[Z]),We=S.useCallback(async()=>{try{const[F,J,se]=await Promise.all([Ze.identity(),Ze.contacts(),Ze.buildInfo()]),Pe={...J,pending:J.pending??[]};return i.current.identity&&i.current.identity.cid!==F.cid&&(CE(),m.current={},h({})),Z({type:"snapshot",identity:F,contacts:Pe}),U(se),await Promise.all(Pe.contacts.flatMap(Fe=>[ge(Fe.container_id,!1),xe(Fe.container_id,!1)])),Xr(i.current)}catch(F){return re(F),null}},[Z,xe,ge,re]),Pt=S.useCallback(async F=>{await s.current.request(F,async()=>{nC(F,Ee())&&(await Ze.markRead(F),await Promise.all([ge(F),_e()]))}).catch(re)},[Ee,_e,ge,re]),ct=S.useCallback(async(F,J,se="page")=>{const Pe=`page:${F}:${se}`,Fe=(a.current.get(Pe)??0)+1;a.current.set(Pe,Fe);for(const pe of wx){if(pe&&await kx(pe),a.current.get(Pe)!==Fe)return;const Je=await ge(F,!1);if(Je&&J(Je))return}},[ge]),$t=S.useCallback(async(F,J)=>{const se=`file:${F}`,Pe=(a.current.get(se)??0)+1;a.current.set(se,Pe);for(const Fe of wx)if(Fe&&await kx(Fe),a.current.get(se)!==Pe||(await xe(F,!1))?.some(Je=>Je.wire_id===J))return},[xe]),ln=S.useRef(!1);S.useEffect(()=>{if(!q||!t.loaded)return;const F=decodeURIComponent(window.location.hash.slice(Cx.length)),J=Xr(i.current);if(!F||!J){ue(!1);return}if(Zr(i.current,J)?.messages.some(se=>se.wire_id===F)){ue(!1);return}ln.current||(ln.current=!0,ct(J,se=>se.messages.some(Pe=>Pe.wire_id===F),`anchor:${F}`).catch(()=>{}).finally(()=>ue(!1)))},[q,ct,t.loaded,t.pages]),S.useMemo(()=>(bE({url:F=>Object.values(m.current).flat().find(se=>se.wire_id===F)?.available?Ze.mediaUrl(F):null,bytes:async F=>{if(!Object.values(m.current).flat().find(Pe=>Pe.wire_id===F)?.available)return null;const se=await fetch(Ze.mediaUrl(F),{cache:"no-store",credentials:"same-origin"});if(!se.ok)throw new Error(`Media request failed (HTTP ${se.status})`);return new Uint8Array(await se.arrayBuffer())},fetch:async F=>{const J=Object.values(m.current).flat().find(se=>se.wire_id===F);if(!J)throw new Error("Media record is unavailable");await Ze.fetchFiles([F]),await xe(J.contact_id)}}),null),[xe]),S.useEffect(()=>{let F;lC(se=>{G(se),zg(se.registration).then(fe).catch(()=>fe(Pe=>({...Pe,status:"error"})))},{shouldDeferReload:()=>E.current||T.current!==null}).then(se=>{F=se}).catch(re);const J=se=>{se.preventDefault(),X(se)};return window.addEventListener("beforeinstallprompt",J),()=>{F?.(),window.removeEventListener("beforeinstallprompt",J)}},[re]),S.useEffect(()=>gC(),[]),S.useEffect(()=>{if(!(!j.registration||V.status!=="on"))return tC({registration:j.registration,identity:Ze.identity,onEvent:Px})},[V.status,V.bindingId,j.registration]),S.useEffect(()=>{const F=()=>fe(J=>({...J,status:"error"}));return window.addEventListener("ours-push-repair-required",F),()=>window.removeEventListener("ours-push-repair-required",F)},[]),S.useEffect(()=>{window.location.pathname==="/"&&window.history.replaceState(null,"",Wo()),l.current=window.matchMedia("(min-width: 861px)");const F=()=>Z({type:"route",route:Dg(window.location.pathname)}),J=()=>{if(document.visibilityState!=="visible")return;const pe=Xr(i.current);pe&&Pt(pe),Nx(),j.registration&&zg(j.registration).then(fe).catch(()=>fe(Je=>({...Je,status:"error"})))};window.addEventListener("popstate",F),document.addEventListener("visibilitychange",J);const se=pe=>{const Je=pe.type==="sync_required"?`${pe.type}:${pe.reason}`:pe.type==="receipt_received"?`${pe.type}:${pe.contact_id}:${pe.kind}:${pe.wire_ids.join(",")}`:`${pe.type}:${pe.contact_id}:${pe.wire_id}`,Ht=Date.now(),nt=c.current.get(Je)??0;c.current.set(Je,Ht);for(const[Ke,Ue]of c.current)Ht-Ue>6e4&&c.current.delete(Ke);Ht-nt<6e4||(async()=>{if(pe.type==="sync_required"){await We();return}if(_e().catch(re),pe.type==="file_received"){await $t(pe.contact_id,pe.wire_id);const Ke=i.current.contacts.contacts.find(Ue=>Ue.container_id===pe.contact_id);Xr(i.current)!==pe.contact_id&&Ke&&_(pe.contact_id,Jo(Ke),"New file");return}if(pe.type==="message_received"){const Ke=i.current.contacts.contacts.find(Ue=>Ue.container_id===pe.contact_id);await ct(pe.contact_id,Ue=>Ue.messages.some(ir=>ir.wire_id===pe.wire_id),`message:${pe.wire_id}`),Xr(i.current)===pe.contact_id?await Pt(pe.contact_id):Ke&&_(pe.contact_id,Jo(Ke),"New message");return}Z({type:"receipt",contactCid:pe.contact_id,kind:pe.kind,wireIds:pe.wire_ids}),await ct(pe.contact_id,Ke=>pe.wire_ids.every(Ue=>{const ir=Ke.messages.find(oo=>oo.wire_id===Ue);return!!ir?.receipt&&Sx[ir.receipt]>=Sx[pe.kind]}),`receipt:${pe.wire_ids.join(",")}`)})().catch(re)},Pe=Qb(se),Fe=Zb(se,pe=>Z({type:"connection",connection:pe}));return We().then(pe=>{pe&&Pt(pe)}),()=>{Fe(),Pe(),window.removeEventListener("popstate",F),document.removeEventListener("visibilitychange",J)}},[ct,$t,Z,Pt,_,_e,We,re,j.registration]);const St=(F,J,se)=>{window.history.pushState(null,"",J),Z({type:"route",route:F,mobileDetailOpen:se})},ft=async F=>{St({name:"chats",contactCid:F},Wo(F),!0),R(F),await Promise.all([ge(F),xe(F,!1)]),await Pt(F)},It=async F=>{const J=Zr(i.current,F);if(!(!J?.nextBefore||w.current.has(F))){w.current.add(F),y(F);try{const se=await Ze.conversation(F,J.nextBefore);Z({type:"older_page",contactCid:F,page:se,newer:J.messages})}catch(se){re(se)}finally{w.current.delete(F),y(null)}}},Le=Xr(t),Ut=t.contacts.contacts.find(F=>F.container_id===Le),Wt=S.useMemo(()=>kz(t,d),[t,d]),wn=Wt.find(F=>F.id===Le)??null,B=Le?Uk(Zr(t,Le),d[Le]??[]):[],he=t.identity,Ne=t.loaded?Le&&!Zr(t,Le)||q?"updating":t.connection!=="live"?"connecting":null:"connecting",K=async(F,J=V.preview)=>{if(j.registration){ee(!0),fe(se=>({...se,status:"repairing",preview:J}));try{fe(await(F==="enable"?Mx(j.registration,{preview:J}):F==="repair"?pC(j.registration,J):mC(j.registration,V)))}catch(se){fe(Pe=>({...Pe,status:"error"})),re(se)}finally{ee(!1)}}},ae=()=>{A([]),C("invite"),Ze.invites().then(A).catch(re)};return t.route.name==="not_found"?v.jsxs("div",{className:"centered-screen",children:[v.jsx("h1",{children:"Page not found"}),v.jsx("button",{className:"btn primary",onClick:()=>St({name:"chats",contactCid:null},Wo()),children:"Open chats"})]}):he?v.jsx("div",{className:D?"theme-dark":"",style:{height:"100%"},children:v.jsxs("div",{className:"app signal-app",children:[v.jsxs("header",{className:"commandbar",children:[v.jsx("div",{className:"command-brand","aria-label":"ours network",children:v.jsx("span",{children:"Ours"})}),v.jsxs("div",{className:"command-copy",children:[v.jsx("span",{className:"command-kicker",children:"ours / encrypted network"}),v.jsx("strong",{children:"Chats"})]}),v.jsxs("div",{className:"command-actions",children:[W&&v.jsx("button",{className:"command-action",onClick:()=>void W.prompt().then(()=>X(null)),children:"Install app"}),v.jsxs("button",{className:"command-action",onClick:ae,children:[v.jsx(Se,{name:"plus"}),v.jsx("span",{children:"New chat"})]}),v.jsx("button",{className:"icon-btn command-settings",title:"Settings","aria-label":"Settings",onClick:()=>C("settings"),children:v.jsx(Se,{name:"settings"})}),v.jsxs("button",{className:"rail-me command-me",title:he.name,onClick:()=>Te(F=>!F),children:[cs(he.name),v.jsx("span",{className:"conn-dot "+(t.connection==="live"?"on":"off")})]})]})]}),v.jsxs("main",{className:"section signal-stage"+(t.mobileDetailOpen?" show-detail":""),children:[v.jsx(YF,{contacts:Wt,roots:wz(t.contacts),selected:Le,onSelect:F=>{F.startsWith("pending:")||ft(F)},onInvite:ae,onSettings:()=>C("settings")}),v.jsx(QF,{contact:wn,messages:B,syncing:Ne,hiddenEarlier:Zr(t,Le??"")?.hasMore?Math.max(1,(Zr(t,Le??"")?.total??B.length)-B.length):0,onLoadEarlier:Le&&p!==Le?()=>void It(Le):void 0,onBack:()=>St({name:"chats",contactCid:null},Wo(),!1),onDraftChange:de,onSend:async(F,J,se)=>{if(!Le)return;const Pe=Le,Fe=await Ze.send(Pe,F,J,se);return Z({type:"sent_message",contactCid:Pe,message:{dir:"out",text:F,date:new Date().toISOString(),read:!0,wire_id:Fe.wire_id??"",receipt:null,reply_to:J?{wire_id:J}:null}}),Fe.wire_id?ct(Pe,pe=>pe.messages.some(Je=>Je.wire_id===Fe.wire_id),`send:${Fe.wire_id}`):_e().catch(re),Fe.wire_id??void 0},onSendFile:async(F,J)=>{Le&&(await Ze.sendFile(Le,new Blob([F.bytes],{type:F.mime}),F.filename,F.mime,J),await Promise.all([xe(Le),ge(Le,!1)]))},onFetchFile:async F=>{await Ze.fetchFiles([F]),Le&&await xe(Le)},onRename:F=>{Le&&Ze.renameContact(Le,F).then(We).catch(re)},onRemove:()=>{Le&&confirm(`Remove “${Ut?.name??"contact"}”?`)&&Ze.removeContact(Le).then(()=>(St({name:"chats",contactCid:null},Wo(),!1),We())).catch(re)}},Le??"no-conversation")]}),v.jsxs("div",{className:"app-banners",children:[j.offline&&v.jsx("div",{className:"banner warn",children:"Offline — reconnecting to the network…"}),t.connection!=="live"&&v.jsx("div",{className:"banner warn",children:t.connection==="retrying"?"Live updates interrupted — reconnecting…":"Connecting to live updates…"}),j.updateAvailable&&v.jsxs("div",{className:"banner info",children:["A new version is available.",v.jsx("span",{className:"banner-actions",children:v.jsx("button",{className:"linkbtn",onClick:()=>{j.registration&&Og(j.registration)},children:"Restart now"})})]}),t.contacts.pending.map(F=>v.jsxs("div",{className:"banner info",children:["Introduction from ",Jo(F)," · ",F.queued," queued",v.jsxs("span",{className:"banner-actions",children:[v.jsx("button",{className:"linkbtn",onClick:()=>void Ze.respondToIntroduction(F.container_id,"approve").then(We).catch(re),children:"Approve"}),v.jsx("button",{className:"linkbtn quiet",onClick:()=>void Ze.respondToIntroduction(F.container_id,"reject").then(We).catch(re),children:"Reject"})]})]},F.container_id)),v.jsx(oz,{items:P,onDismiss:Q,onOpen:F=>void ft(F)})]}),ve&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"pop-backdrop",onClick:()=>Te(!1)}),v.jsxs("div",{className:"menu command-menu",children:[v.jsxs("div",{className:"menu-head",children:[v.jsx("div",{className:"avatar accent lg",children:cs(he.name)}),v.jsxs("div",{children:[v.jsx("strong",{children:he.name}),v.jsxs("div",{className:"faint mono",children:["@",jd(he.cid)]})]})]}),v.jsxs("button",{className:"menu-item",onClick:()=>{Te(!1),ae()},children:[v.jsx(Se,{name:"plus"}),"Invite a contact"]}),v.jsxs("button",{className:"menu-item",onClick:()=>{Te(!1),C("settings")},children:[v.jsx(Se,{name:"settings"}),"Settings"]})]})]}),k==="invite"&&v.jsx(lz,{identity:he,invites:M,onRefresh:async()=>A(await Ze.invites()),onCreate:async(F,J)=>(await Ze.createInvite(F,J)).blob,onAccept:async(F,J)=>{await Ze.addContact(F,J),await We()},onRevoke:async F=>{await Ze.revokeInvite(F)},onClose:()=>{C(null),We()}}),k==="settings"&&v.jsx(uz,{identity:he,push:V,workerSupported:j.supported,busy:ie,offline:j.offline,updateAvailable:j.updateAvailable,build:L,dark:D,onToggleDark:()=>Y(F=>(localStorage.setItem(bx,F?"0":"1"),!F)),onSaveBio:async F=>{await Ze.setBio(F),await We()},onPushAction:K,onReloadUpdate:()=>{j.registration&&Og(j.registration)},onClose:()=>{T.current=null,C(null),Le&&Pt(Le)}}),t.error&&v.jsxs("div",{className:"banner error",children:[t.error,v.jsx("button",{className:"linkbtn",onClick:()=>Z({type:"error",message:null}),children:"dismiss"})]})]})}):v.jsx("div",{className:D?"theme-dark":"",style:{height:"100%"},children:v.jsx("div",{className:"centered-screen",children:v.jsx("p",{className:"muted",children:"Loading…"})})})}vz();const Wk=document.getElementById("root");if(!Wk)throw new Error("missing #root");qb.createRoot(Wk).render(v.jsx(Sz,{}));export{Hd as _,Td as g};
317
+ //# sourceMappingURL=index-BGYPGRd5.js.map