@tapflowio/relay 0.27.0 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/dist/RelayServer.d.ts +74 -0
  2. package/dist/RelayServer.d.ts.map +1 -1
  3. package/dist/RelayServer.js +482 -43
  4. package/dist/RelayServer.js.map +1 -1
  5. package/dist/SessionManager.d.ts +63 -2
  6. package/dist/SessionManager.d.ts.map +1 -1
  7. package/dist/SessionManager.js +123 -1
  8. package/dist/SessionManager.js.map +1 -1
  9. package/dist/api/apps.d.ts +2 -1
  10. package/dist/api/apps.d.ts.map +1 -1
  11. package/dist/api/apps.js +20 -7
  12. package/dist/api/apps.js.map +1 -1
  13. package/dist/api/builds.d.ts +2 -1
  14. package/dist/api/builds.d.ts.map +1 -1
  15. package/dist/api/builds.js +23 -45
  16. package/dist/api/builds.js.map +1 -1
  17. package/dist/api/comments.d.ts.map +1 -1
  18. package/dist/api/comments.js +5 -7
  19. package/dist/api/comments.js.map +1 -1
  20. package/dist/api/invitations.d.ts.map +1 -1
  21. package/dist/api/invitations.js +3 -0
  22. package/dist/api/invitations.js.map +1 -1
  23. package/dist/api/profile.d.ts.map +1 -1
  24. package/dist/api/profile.js +28 -9
  25. package/dist/api/profile.js.map +1 -1
  26. package/dist/api/recordings.d.ts.map +1 -1
  27. package/dist/api/recordings.js +5 -6
  28. package/dist/api/recordings.js.map +1 -1
  29. package/dist/api/runVideos.d.ts +85 -0
  30. package/dist/api/runVideos.d.ts.map +1 -0
  31. package/dist/api/runVideos.js +494 -0
  32. package/dist/api/runVideos.js.map +1 -0
  33. package/dist/api/runs.d.ts +77 -0
  34. package/dist/api/runs.d.ts.map +1 -0
  35. package/dist/api/runs.js +579 -0
  36. package/dist/api/runs.js.map +1 -0
  37. package/dist/api/settings.d.ts +1 -1
  38. package/dist/api/settings.d.ts.map +1 -1
  39. package/dist/api/settings.js +67 -10
  40. package/dist/api/settings.js.map +1 -1
  41. package/dist/db.d.ts +2 -0
  42. package/dist/db.d.ts.map +1 -1
  43. package/dist/db.js +4 -0
  44. package/dist/db.js.map +1 -1
  45. package/dist/lib/buildDeletion.d.ts +21 -0
  46. package/dist/lib/buildDeletion.d.ts.map +1 -0
  47. package/dist/lib/buildDeletion.js +58 -0
  48. package/dist/lib/buildDeletion.js.map +1 -0
  49. package/dist/lib/clientAddress.d.ts +12 -0
  50. package/dist/lib/clientAddress.d.ts.map +1 -1
  51. package/dist/lib/clientAddress.js +22 -0
  52. package/dist/lib/clientAddress.js.map +1 -1
  53. package/dist/lib/uploads.d.ts +13 -0
  54. package/dist/lib/uploads.d.ts.map +1 -1
  55. package/dist/lib/uploads.js +41 -0
  56. package/dist/lib/uploads.js.map +1 -1
  57. package/dist/lib/watchActions.d.ts +10 -0
  58. package/dist/lib/watchActions.d.ts.map +1 -0
  59. package/dist/lib/watchActions.js +27 -0
  60. package/dist/lib/watchActions.js.map +1 -0
  61. package/dist/middleware/auth.d.ts +1 -0
  62. package/dist/middleware/auth.d.ts.map +1 -1
  63. package/dist/middleware/auth.js +1 -1
  64. package/dist/middleware/auth.js.map +1 -1
  65. package/dist/migrations/015_flow_runs.sql +59 -0
  66. package/dist/migrations/016_flow_run_videos.sql +51 -0
  67. package/dist/router.d.ts +5 -0
  68. package/dist/router.d.ts.map +1 -1
  69. package/dist/router.js +24 -0
  70. package/dist/router.js.map +1 -1
  71. package/package.json +9 -9
  72. package/public/assets/AISessionWatch-Bxew762e.js +36 -0
  73. package/public/assets/AISessionWatch-Bxew762e.js.br +0 -0
  74. package/public/assets/AISessionWatch-Bxew762e.js.gz +0 -0
  75. package/public/assets/AndroidDeviceScreen-C55msKfh.js +35 -0
  76. package/public/assets/AndroidDeviceScreen-C55msKfh.js.br +0 -0
  77. package/public/assets/AndroidDeviceScreen-C55msKfh.js.gz +0 -0
  78. package/public/assets/AppCenter-93hnrrdy.js +26 -0
  79. package/public/assets/AppCenter-93hnrrdy.js.br +0 -0
  80. package/public/assets/AppCenter-93hnrrdy.js.gz +0 -0
  81. package/public/assets/Default-BhgcUKBm.js +6 -0
  82. package/public/assets/Default-BhgcUKBm.js.br +0 -0
  83. package/public/assets/Default-BhgcUKBm.js.gz +0 -0
  84. package/public/assets/Invite-DQBwLaOl.js +1 -0
  85. package/public/assets/Invite-DQBwLaOl.js.br +0 -0
  86. package/public/assets/Invite-DQBwLaOl.js.gz +0 -0
  87. package/public/assets/MacResources-D4LMGxgV.js +1 -0
  88. package/public/assets/MacResources-D4LMGxgV.js.br +0 -0
  89. package/public/assets/MacResources-D4LMGxgV.js.gz +0 -0
  90. package/public/assets/{NotFound-wHOnT2Fl.js → NotFound-DVq_rCKc.js} +1 -1
  91. package/public/assets/NotFound-DVq_rCKc.js.br +0 -0
  92. package/public/assets/NotFound-DVq_rCKc.js.gz +0 -0
  93. package/public/assets/QASession-Dnuq0yrN.js +81 -0
  94. package/public/assets/QASession-Dnuq0yrN.js.br +0 -0
  95. package/public/assets/QASession-Dnuq0yrN.js.gz +0 -0
  96. package/public/assets/ResetPassword-inTbbral.js +1 -0
  97. package/public/assets/ResetPassword-inTbbral.js.br +0 -0
  98. package/public/assets/ResetPassword-inTbbral.js.gz +0 -0
  99. package/public/assets/RunDetail-B3dw8_U0.js +16 -0
  100. package/public/assets/RunDetail-B3dw8_U0.js.br +0 -0
  101. package/public/assets/RunDetail-B3dw8_U0.js.gz +0 -0
  102. package/public/assets/Runs-DqZl9Y6M.js +6 -0
  103. package/public/assets/Runs-DqZl9Y6M.js.br +0 -0
  104. package/public/assets/Runs-DqZl9Y6M.js.gz +0 -0
  105. package/public/assets/Setup-CPa_UWpa.js +1 -0
  106. package/public/assets/Setup-CPa_UWpa.js.br +0 -0
  107. package/public/assets/Setup-CPa_UWpa.js.gz +0 -0
  108. package/public/assets/Team-DZie8W7R.js +6 -0
  109. package/public/assets/Team-DZie8W7R.js.br +0 -0
  110. package/public/assets/Team-DZie8W7R.js.gz +0 -0
  111. package/public/assets/Tokens-u3-uRAwd.js +1 -0
  112. package/public/assets/Tokens-u3-uRAwd.js.br +0 -0
  113. package/public/assets/Tokens-u3-uRAwd.js.gz +0 -0
  114. package/public/assets/WatchedDevice-CpaKHa1x.js +1 -0
  115. package/public/assets/WatchedDevice-CpaKHa1x.js.br +0 -0
  116. package/public/assets/WatchedDevice-CpaKHa1x.js.gz +0 -0
  117. package/public/assets/aiSession-BsmDnyV1.js +31 -0
  118. package/public/assets/aiSession-BsmDnyV1.js.br +0 -0
  119. package/public/assets/aiSession-BsmDnyV1.js.gz +0 -0
  120. package/public/assets/alert-dialog-Bq_Ln5bp.js +1 -0
  121. package/public/assets/alert-dialog-Bq_Ln5bp.js.br +0 -0
  122. package/public/assets/alert-dialog-Bq_Ln5bp.js.gz +0 -0
  123. package/public/assets/{badge-B3vaBVIQ.js → badge-D-bt97WR.js} +1 -1
  124. package/public/assets/badge-D-bt97WR.js.br +0 -0
  125. package/public/assets/badge-D-bt97WR.js.gz +0 -0
  126. package/public/assets/build-format-ofd2iIzf.js +1 -0
  127. package/public/assets/build-format-ofd2iIzf.js.br +0 -0
  128. package/public/assets/build-format-ofd2iIzf.js.gz +0 -0
  129. package/public/assets/dialog-CtzPkg0O.js +1 -0
  130. package/public/assets/dialog-CtzPkg0O.js.br +0 -0
  131. package/public/assets/dialog-CtzPkg0O.js.gz +0 -0
  132. package/public/assets/field-hint-B774BIWK.js +1 -0
  133. package/public/assets/field-hint-B774BIWK.js.br +1 -0
  134. package/public/assets/field-hint-B774BIWK.js.gz +0 -0
  135. package/public/assets/index-D17hSi50.js +1 -0
  136. package/public/assets/index-D17hSi50.js.br +0 -0
  137. package/public/assets/index-D17hSi50.js.gz +0 -0
  138. package/public/assets/index-EPyP3g9A.css +1 -0
  139. package/public/assets/index-EPyP3g9A.css.br +0 -0
  140. package/public/assets/index-EPyP3g9A.css.gz +0 -0
  141. package/public/assets/index-cgl1yEKu.js +223 -0
  142. package/public/assets/index-cgl1yEKu.js.br +0 -0
  143. package/public/assets/index-cgl1yEKu.js.gz +0 -0
  144. package/public/assets/list-view-BcjDCJy5.js +1 -0
  145. package/public/assets/list-view-BcjDCJy5.js.br +0 -0
  146. package/public/assets/list-view-BcjDCJy5.js.gz +0 -0
  147. package/public/assets/{pencil-CycAOoC_.js → pencil-1XSs32nb.js} +2 -2
  148. package/public/assets/pencil-1XSs32nb.js.br +0 -0
  149. package/public/assets/pencil-1XSs32nb.js.gz +0 -0
  150. package/public/assets/play-DCvrorIC.js +6 -0
  151. package/public/assets/play-DCvrorIC.js.br +0 -0
  152. package/public/assets/play-DCvrorIC.js.gz +0 -0
  153. package/public/assets/resource-health-oWJ8hy9X.js +1 -0
  154. package/public/assets/resource-health-oWJ8hy9X.js.br +0 -0
  155. package/public/assets/resource-health-oWJ8hy9X.js.gz +0 -0
  156. package/public/assets/runs-CInQb6v1.js +1 -0
  157. package/public/assets/runs-CInQb6v1.js.br +0 -0
  158. package/public/assets/runs-CInQb6v1.js.gz +0 -0
  159. package/public/assets/search-input-CFWgLcKA.js +6 -0
  160. package/public/assets/search-input-CFWgLcKA.js.br +0 -0
  161. package/public/assets/search-input-CFWgLcKA.js.gz +0 -0
  162. package/public/assets/select-5ZtzWRYG.js +11 -0
  163. package/public/assets/select-5ZtzWRYG.js.br +0 -0
  164. package/public/assets/select-5ZtzWRYG.js.gz +0 -0
  165. package/public/assets/slider-DHuMDXcP.js +1 -0
  166. package/public/assets/slider-DHuMDXcP.js.br +0 -0
  167. package/public/assets/slider-DHuMDXcP.js.gz +0 -0
  168. package/public/assets/tabs-CmgV_sSI.js +1 -0
  169. package/public/assets/tabs-CmgV_sSI.js.br +0 -0
  170. package/public/assets/tabs-CmgV_sSI.js.gz +0 -0
  171. package/public/assets/tech-label-qLodPeUI.js +1 -0
  172. package/public/assets/tech-label-qLodPeUI.js.br +0 -0
  173. package/public/assets/tech-label-qLodPeUI.js.gz +0 -0
  174. package/public/assets/{trash-BXQnOI5U.js → trash-CXjB9oU1.js} +3 -3
  175. package/public/assets/trash-CXjB9oU1.js.br +0 -0
  176. package/public/assets/trash-CXjB9oU1.js.gz +0 -0
  177. package/public/assets/{useFocusAfterSwap-BY3N9f9v.js → useFocusAfterSwap-BdItkQCu.js} +1 -1
  178. package/public/assets/useFocusAfterSwap-BdItkQCu.js.br +0 -0
  179. package/public/assets/useFocusAfterSwap-BdItkQCu.js.gz +0 -0
  180. package/public/assets/useRelay-CES3I1Mt.js +1 -0
  181. package/public/assets/useRelay-CES3I1Mt.js.br +0 -0
  182. package/public/assets/useRelay-CES3I1Mt.js.gz +0 -0
  183. package/public/assets/useShownAfter-By1Yxysz.js +1 -0
  184. package/public/assets/useShownAfter-By1Yxysz.js.br +0 -0
  185. package/public/assets/useShownAfter-By1Yxysz.js.gz +0 -0
  186. package/public/assets/{vendor-charts-BykzUV2D.js → vendor-charts-BE7R_8yA.js} +2 -2
  187. package/public/assets/vendor-charts-BE7R_8yA.js.br +0 -0
  188. package/public/assets/vendor-charts-BE7R_8yA.js.gz +0 -0
  189. package/public/assets/{vendor-react-BlPSzrEe.js → vendor-react-DTSdA8m-.js} +4 -4
  190. package/public/assets/vendor-react-DTSdA8m-.js.br +0 -0
  191. package/public/assets/{vendor-react-BlPSzrEe.js.gz → vendor-react-DTSdA8m-.js.gz} +0 -0
  192. package/public/assets/{vendor-router-B_lVHrKl.js → vendor-router-B1pQim9Z.js} +3 -3
  193. package/public/assets/vendor-router-B1pQim9Z.js.br +0 -0
  194. package/public/assets/vendor-router-B1pQim9Z.js.gz +0 -0
  195. package/public/assets/video-CK2q3-0B.js +6 -0
  196. package/public/assets/video-CK2q3-0B.js.br +0 -0
  197. package/public/assets/video-CK2q3-0B.js.gz +0 -0
  198. package/public/index.html +18 -4
  199. package/public/index.html.br +0 -0
  200. package/public/index.html.gz +0 -0
  201. package/public/assets/AppCenter-BMdYtQbV.js +0 -26
  202. package/public/assets/AppCenter-BMdYtQbV.js.br +0 -0
  203. package/public/assets/AppCenter-BMdYtQbV.js.gz +0 -0
  204. package/public/assets/Default-0DHHVGaN.js +0 -1
  205. package/public/assets/Default-0DHHVGaN.js.br +0 -0
  206. package/public/assets/Default-0DHHVGaN.js.gz +0 -0
  207. package/public/assets/Invite-C0ZB_HiU.js +0 -1
  208. package/public/assets/Invite-C0ZB_HiU.js.br +0 -0
  209. package/public/assets/Invite-C0ZB_HiU.js.gz +0 -0
  210. package/public/assets/MacResources-DmY5pRV2.js +0 -1
  211. package/public/assets/MacResources-DmY5pRV2.js.br +0 -0
  212. package/public/assets/MacResources-DmY5pRV2.js.gz +0 -0
  213. package/public/assets/NotFound-wHOnT2Fl.js.br +0 -0
  214. package/public/assets/NotFound-wHOnT2Fl.js.gz +0 -0
  215. package/public/assets/QASession-2QogWEX7.js +0 -150
  216. package/public/assets/QASession-2QogWEX7.js.br +0 -0
  217. package/public/assets/QASession-2QogWEX7.js.gz +0 -0
  218. package/public/assets/ResetPassword-jNRuertx.js +0 -1
  219. package/public/assets/ResetPassword-jNRuertx.js.br +0 -0
  220. package/public/assets/ResetPassword-jNRuertx.js.gz +0 -0
  221. package/public/assets/Setup-CF_FN9Dt.js +0 -1
  222. package/public/assets/Setup-CF_FN9Dt.js.br +0 -0
  223. package/public/assets/Setup-CF_FN9Dt.js.gz +0 -0
  224. package/public/assets/Team-BbiyOGau.js +0 -6
  225. package/public/assets/Team-BbiyOGau.js.br +0 -0
  226. package/public/assets/Team-BbiyOGau.js.gz +0 -0
  227. package/public/assets/Tokens-CZo4sPTx.js +0 -1
  228. package/public/assets/Tokens-CZo4sPTx.js.br +0 -0
  229. package/public/assets/Tokens-CZo4sPTx.js.gz +0 -0
  230. package/public/assets/alert-dialog-DFz8G_zu.js +0 -1
  231. package/public/assets/alert-dialog-DFz8G_zu.js.br +0 -0
  232. package/public/assets/alert-dialog-DFz8G_zu.js.gz +0 -0
  233. package/public/assets/badge-B3vaBVIQ.js.br +0 -0
  234. package/public/assets/badge-B3vaBVIQ.js.gz +0 -0
  235. package/public/assets/build-format-dbQPU3A4.js +0 -11
  236. package/public/assets/build-format-dbQPU3A4.js.br +0 -0
  237. package/public/assets/build-format-dbQPU3A4.js.gz +0 -0
  238. package/public/assets/dialog-DeBPk-I3.js +0 -11
  239. package/public/assets/dialog-DeBPk-I3.js.br +0 -0
  240. package/public/assets/dialog-DeBPk-I3.js.gz +0 -0
  241. package/public/assets/field-hint-CMKmbVpy.js +0 -1
  242. package/public/assets/field-hint-CMKmbVpy.js.br +0 -0
  243. package/public/assets/field-hint-CMKmbVpy.js.gz +0 -0
  244. package/public/assets/index-B4w4Lh3e.js +0 -218
  245. package/public/assets/index-B4w4Lh3e.js.br +0 -0
  246. package/public/assets/index-B4w4Lh3e.js.gz +0 -0
  247. package/public/assets/index-CDWu0GQL.css +0 -1
  248. package/public/assets/index-CDWu0GQL.css.br +0 -0
  249. package/public/assets/index-CDWu0GQL.css.gz +0 -0
  250. package/public/assets/list-view-BvINA5t4.js +0 -1
  251. package/public/assets/list-view-BvINA5t4.js.br +0 -0
  252. package/public/assets/list-view-BvINA5t4.js.gz +0 -0
  253. package/public/assets/pencil-CycAOoC_.js.br +0 -0
  254. package/public/assets/pencil-CycAOoC_.js.gz +0 -0
  255. package/public/assets/resource-health-C1qSG3MK.js +0 -1
  256. package/public/assets/resource-health-C1qSG3MK.js.br +0 -0
  257. package/public/assets/resource-health-C1qSG3MK.js.gz +0 -0
  258. package/public/assets/trash-BXQnOI5U.js.br +0 -0
  259. package/public/assets/trash-BXQnOI5U.js.gz +0 -0
  260. package/public/assets/useFocusAfterSwap-BY3N9f9v.js.br +0 -0
  261. package/public/assets/useFocusAfterSwap-BY3N9f9v.js.gz +0 -0
  262. package/public/assets/vendor-charts-BykzUV2D.js.br +0 -0
  263. package/public/assets/vendor-charts-BykzUV2D.js.gz +0 -0
  264. package/public/assets/vendor-react-BlPSzrEe.js.br +0 -0
  265. package/public/assets/vendor-router-B_lVHrKl.js.br +0 -0
  266. package/public/assets/vendor-router-B_lVHrKl.js.gz +0 -0
@@ -1,218 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Setup-CF_FN9Dt.js","assets/vendor-react-BlPSzrEe.js","assets/field-hint-CMKmbVpy.js","assets/vendor-router-B_lVHrKl.js","assets/Invite-C0ZB_HiU.js","assets/pencil-CycAOoC_.js","assets/ResetPassword-jNRuertx.js","assets/AppCenter-BMdYtQbV.js","assets/build-format-dbQPU3A4.js","assets/dialog-DeBPk-I3.js","assets/trash-BXQnOI5U.js","assets/badge-B3vaBVIQ.js","assets/alert-dialog-DFz8G_zu.js","assets/useFocusAfterSwap-BY3N9f9v.js","assets/QASession-2QogWEX7.js","assets/resource-health-C1qSG3MK.js","assets/publicLink-D6zKS_wu.js","assets/MacResources-DmY5pRV2.js","assets/vendor-charts-BykzUV2D.js","assets/Default-0DHHVGaN.js","assets/Team-BbiyOGau.js","assets/list-view-BvINA5t4.js","assets/Tokens-CZo4sPTx.js","assets/NotFound-wHOnT2Fl.js"])))=>i.map(i=>d[i]);
2
- var Ba=e=>{throw TypeError(e)};var ys=(e,n,t)=>n.has(e)||Ba("Cannot "+t);var S=(e,n,t)=>(ys(e,n,"read from private field"),t?t.call(e):n.get(e)),X=(e,n,t)=>n.has(e)?Ba("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),H=(e,n,t,r)=>(ys(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),de=(e,n,t)=>(ys(e,n,"access private method"),t);var po=(e,n,t,r)=>({set _(o){H(e,n,o,t)},get _(){return S(e,n,r)}});import{k as h,j as g,R as I,b as Lh,a as wr,f as Y,r as Al,u as Vh,o as Uh,s as Zh,g as Bh,m as Kh,c as Wh,i as Hh,l as Gh,d as qh,e as Qh}from"./vendor-react-BlPSzrEe.js";import{u as Dl,b as Nl,L as mo,N as zi,O as Jh,R as yt,a as Yh,B as Xh}from"./vendor-router-B_lVHrKl.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function t(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=t(o);fetch(o.href,s)}})();var ep=(e,n,t,r,o,s,i,a)=>{let c=document.documentElement,u=["light","dark"];function d(p){(Array.isArray(e)?e:[e]).forEach(m=>{let v=m==="class",y=v&&s?o.map(b=>s[b]||b):o;v?(c.classList.remove(...y),c.classList.add(s&&s[p]?s[p]:p)):c.setAttribute(m,p)}),l(p)}function l(p){a&&u.includes(p)&&(c.style.colorScheme=p)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)d(r);else try{let p=localStorage.getItem(n)||t,m=i&&p==="system"?f():p;d(m)}catch{}},Ka=["light","dark"],jl="(prefers-color-scheme: dark)",tp=typeof window>"u",Fi=h.createContext(void 0),np={setTheme:e=>{},themes:[]},es=()=>{var e;return(e=h.useContext(Fi))!=null?e:np},rp=e=>h.useContext(Fi)?h.createElement(h.Fragment,null,e.children):h.createElement(sp,{...e}),op=["light","dark"],sp=({forcedTheme:e,disableTransitionOnChange:n=!1,enableSystem:t=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:s=op,defaultTheme:i=t?"system":"light",attribute:a="data-theme",value:c,children:u,nonce:d,scriptProps:l})=>{let[f,p]=h.useState(()=>ap(o,i)),[m,v]=h.useState(()=>f==="system"?bs():f),y=c?Object.values(c):s,b=h.useCallback(C=>{let O=C;if(!O)return;C==="system"&&t&&(O=bs());let T=c?c[O]:O,A=n?cp(d):null,R=document.documentElement,z=L=>{L==="class"?(R.classList.remove(...y),T&&R.classList.add(T)):L.startsWith("data-")&&(T?R.setAttribute(L,T):R.removeAttribute(L))};if(Array.isArray(a)?a.forEach(z):z(a),r){let L=Ka.includes(i)?i:null,$=Ka.includes(O)?O:L;R.style.colorScheme=$}A==null||A()},[d]),_=h.useCallback(C=>{let O=typeof C=="function"?C(f):C;p(O);try{localStorage.setItem(o,O)}catch{}},[f]),x=h.useCallback(C=>{let O=bs(C);v(O),f==="system"&&t&&!e&&b("system")},[f,e]);h.useEffect(()=>{let C=window.matchMedia(jl);return C.addListener(x),x(C),()=>C.removeListener(x)},[x]),h.useEffect(()=>{let C=O=>{O.key===o&&(O.newValue?p(O.newValue):_(i))};return window.addEventListener("storage",C),()=>window.removeEventListener("storage",C)},[_]),h.useEffect(()=>{b(e??f)},[e,f]);let E=h.useMemo(()=>({theme:f,setTheme:_,forcedTheme:e,resolvedTheme:f==="system"?m:f,themes:t?[...s,"system"]:s,systemTheme:t?m:void 0}),[f,_,e,m,t,s]);return h.createElement(Fi.Provider,{value:E},h.createElement(ip,{forcedTheme:e,storageKey:o,attribute:a,enableSystem:t,enableColorScheme:r,defaultTheme:i,value:c,themes:s,nonce:d,scriptProps:l}),u)},ip=h.memo(({forcedTheme:e,storageKey:n,attribute:t,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:i,themes:a,nonce:c,scriptProps:u})=>{let d=JSON.stringify([t,n,s,e,a,i,r,o]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${ep.toString()})(${d})`}})}),ap=(e,n)=>{if(tp)return;let t;try{t=localStorage.getItem(e)||void 0}catch{}return t||n},cp=e=>{let n=document.createElement("style");return e&&n.setAttribute("nonce",e),n.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(n),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(n)},1)}},bs=e=>(e||(e=window.matchMedia(jl)),e.matches?"dark":"light");const lp="modulepreload",up=function(e){return"/"+e},Wa={},Ut=function(n,t,r){let o=Promise.resolve();if(t&&t.length>0){let i=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(l=>({status:"fulfilled",value:l}),l=>({status:"rejected",reason:l}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=i(t.map(u=>{if(u=up(u),u in Wa)return;Wa[u]=!0;const d=u.endsWith(".css"),l=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${l}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":lp,d||(f.as="script"),f.crossOrigin="",f.href=u,c&&f.setAttribute("nonce",c),document.head.appendChild(f),d)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return n().catch(s)})},Ml=h.createContext(void 0),Li=e=>{const n=h.useContext(Ml);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},dp=({client:e,children:n})=>(h.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),g.jsx(Ml.Provider,{value:e,children:n})),fp={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var pn,$i,xl,hp=(xl=class{constructor(){X(this,pn,fp);X(this,$i,!1)}setTimeoutProvider(e){H(this,pn,e)}setTimeout(e,n){return S(this,pn).setTimeout(e,n)}clearTimeout(e){S(this,pn).clearTimeout(e)}setInterval(e,n){return S(this,pn).setInterval(e,n)}clearInterval(e){S(this,pn).clearInterval(e)}},pn=new WeakMap,$i=new WeakMap,xl);const On=new hp;function pp(e){setTimeout(e,0)}const mp=typeof window>"u"||"Deno"in globalThis;function dt(){}function gp(e,n){return typeof e=="function"?e(n):e}function $l(e){return typeof e=="number"&&e>=0&&e!==1/0}function zl(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Oe(e,n){return typeof e=="function"?e(n):e}function Ha(e,n){const{type:t="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i){if(r){if(n.queryHash!==Vi(i,n.options))return!1}else if(!mr(n.queryKey,i))return!1}if(t!=="all"){const c=n.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof a=="boolean"&&n.isStale()!==a||o&&o!==n.state.fetchStatus||s&&!s(n))}function Ga(e,n){const{exact:t,status:r,predicate:o,mutationKey:s}=e;if(s){if(!n.options.mutationKey)return!1;if(t){if(Br(n.options.mutationKey)!==Br(s))return!1}else if(!mr(n.options.mutationKey,s))return!1}return!(r&&n.state.status!==r||o&&!o(n))}function Vi(e,n){return((n==null?void 0:n.queryKeyHashFn)||Br)(e)}function Br(e){return JSON.stringify(e,(n,t)=>Ls(t)?Object.keys(t).sort().reduce((r,o)=>(r[o]=t[o],r),{}):t)}function mr(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(e&&n&&typeof e=="object"&&typeof n=="object"){if(Array.isArray(e)&&Array.isArray(n)){if(n.length>e.length)return!1;for(let r=0;r<n.length;r++)if(!mr(e[r],n[r]))return!1;return!0}const t=Object.keys(n);for(const r of t)if(!mr(e[r],n[r]))return!1;return!0}return!1}const vp=Object.prototype.hasOwnProperty;function Fl(e,n,t=0){if(e===n)return e;if(t>500)return n;const r=qa(e)&&qa(n);if(!r&&!(Ls(e)&&Ls(n)))return n;const o=(r?e:Object.keys(e)).length,s=r?n:Object.keys(n),i=s.length,a=r?new Array(i):{};let c=0;for(let u=0;u<i;u++){const d=r?u:s[u],l=e[d],f=n[d];if(l===f){a[d]=l,(r?u<o:vp.call(e,d))&&c++;continue}if(l===null||f===null||typeof l!="object"||typeof f!="object"){a[d]=f;continue}const p=Fl(l,f,t+1);a[d]=p,p===l&&c++}return o===i&&c===o?e:a}function ws(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const t in e)if(e[t]!==n[t])return!1;return!0}function qa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ls(e){if(!Qa(e))return!1;const n=Object.getPrototypeOf(e),t=n==null?void 0:n.constructor;if(t===void 0)return!0;if(typeof t!="function")return!1;const r=t.prototype;return!(!Qa(r)||!r.hasOwnProperty("isPrototypeOf")||n!==Object.prototype)}function Qa(e){return Object.prototype.toString.call(e)==="[object Object]"}function yp(e){return new Promise(n=>{On.setTimeout(n,e)})}function Vs(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?Fl(e,n):n}function BC(e){return e}function bp(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function wp(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const Ui=Symbol();function Ll(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Ui?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Vl(e,n){return typeof e=="function"?e(...n):!!e}function _p(e,n,t){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??(o=n()),r||(r=!0,o.aborted?t():o.addEventListener("abort",t,{once:!0})),o)}),e}let xp=()=>mp;const Zi=()=>xp();var no=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Rn,mn,nr,Sl,Sp=(Sl=class extends no{constructor(){super();X(this,Rn);X(this,mn);X(this,nr);H(this,nr,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){S(this,mn)||this.setEventListener(S(this,nr))}onUnsubscribe(){var n;this.hasListeners()||((n=S(this,mn))==null||n.call(this),H(this,mn,void 0))}setEventListener(n){var t;H(this,nr,n),(t=S(this,mn))==null||t.call(this),H(this,mn,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){S(this,Rn)!==n&&(H(this,Rn,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof S(this,Rn)=="boolean"?S(this,Rn):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Rn=new WeakMap,mn=new WeakMap,nr=new WeakMap,Sl);const Bi=new Sp,Ep=pp;function Cp(){let e=[],n=0,t=a=>{a()},r=a=>{a()},o=Ep;const s=a=>{n?e.push(a):o(()=>{t(a)})},i=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(c=>{t(c)})})})};return{batch:a=>{let c;n++;try{c=a()}finally{n--,n||i()}return c},batchCalls:a=>(...c)=>{s(()=>{a(...c)})},schedule:s,setNotifyFunction:a=>{t=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}const Ye=Cp();var rr,gn,or,El,kp=(El=class extends no{constructor(){super();X(this,rr,!0);X(this,gn);X(this,or);H(this,or,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n(!0),r=()=>n(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){S(this,gn)||this.setEventListener(S(this,or))}onUnsubscribe(){var n;this.hasListeners()||((n=S(this,gn))==null||n.call(this),H(this,gn,void 0))}setEventListener(n){var t;H(this,or,n),(t=S(this,gn))==null||t.call(this),H(this,gn,n(this.setOnline.bind(this)))}setOnline(n){S(this,rr)!==n&&(H(this,rr,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return S(this,rr)}},rr=new WeakMap,gn=new WeakMap,or=new WeakMap,El);const Uo=new kp;function Pp(e){return Math.min(1e3*2**e,3e4)}function Ul(e){return(e??"online")==="online"?Uo.isOnline():!0}var Us=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Zl(e){let n=!1,t=0,r,o="pending",s,i;const a=new Promise((_,x)=>{s=_,i=x});a.catch(dt);const c=()=>o!=="pending",u=_=>{var x;if(!c()){const E=new Us(_);v(E),(x=e.onCancel)==null||x.call(e,E)}},d=()=>{n=!0},l=()=>{n=!1},f=()=>Bi.isFocused()&&(e.networkMode==="always"||Uo.isOnline())&&e.canRun(),p=()=>Ul(e.networkMode)&&e.canRun(),m=_=>{c()||(r==null||r(),o="resolved",s(_))},v=_=>{c()||(r==null||r(),o="rejected",i(_))},y=()=>new Promise(_=>{var x;r=E=>{(c()||f())&&_(E)},(x=e.onPause)==null||x.call(e)}).then(()=>{var _;r=void 0,c()||(_=e.onContinue)==null||_.call(e)}),b=()=>{if(c())return;let _;const x=t===0?e.initialPromise:void 0;try{_=x??e.fn()}catch(E){_=Promise.reject(E)}Promise.resolve(_).then(m).catch(E=>{var R;if(c())return;const C=e.retry??(Zi()?0:3),O=e.retryDelay??Pp,T=typeof O=="function"?O(t,E):O,A=C===!0||typeof C=="number"&&t<C||typeof C=="function"&&C(t,E);if(n||!A){v(E);return}t++,(R=e.onFail)==null||R.call(e,t,E),yp(T).then(()=>f()?void 0:y()).then(()=>{n?v(E):b()})})};return{promise:a,status:()=>o,cancel:u,continue:()=>(r==null||r(),a),cancelRetry:d,continueRetry:l,canStart:p,start:()=>(p()?b():y().then(b),a)}}var Tn,Cl,Bl=(Cl=class{constructor(){X(this,Tn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),$l(this.gcTime)&&H(this,Tn,On.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zi()?1/0:3e5))}clearGcTimeout(){S(this,Tn)!==void 0&&(On.clearTimeout(S(this,Tn)),H(this,Tn,void 0))}},Tn=new WeakMap,Cl);function Op(e){return{onFetch:(n,t)=>{var d,l,f,p,m;const r=n.options,o=(f=(l=(d=n.fetchOptions)==null?void 0:d.meta)==null?void 0:l.fetchMore)==null?void 0:f.direction,s=((p=n.state.data)==null?void 0:p.pages)||[],i=((m=n.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const y=x=>{_p(x,()=>n.signal,()=>v=!0)},b=Ll(n.options,n.fetchOptions),_=async(x,E,C)=>{if(v)return Promise.reject(n.signal.reason);if(E==null&&x.pages.length)return Promise.resolve(x);const T=(()=>{const L={client:n.client,queryKey:n.queryKey,pageParam:E,direction:C?"backward":"forward",meta:n.options.meta};return y(L),L})(),A=await b(T),{maxPages:R}=n.options,z=C?wp:bp;return{pages:z(x.pages,A,R),pageParams:z(x.pageParams,E,R)}};if(o&&s.length){const x=o==="backward",E=x?Rp:Ja,C={pages:s,pageParams:i};a=await _(C,E(r,C),x)}else{const x=e??s.length;do{const E=c===0?i[0]??r.initialPageParam:Ja(r,a);if(c>0&&E==null)break;a=await _(a,E),c++}while(c<x)}return a};n.options.persister?n.fetchFn=()=>{var v,y;return(y=(v=n.options).persister)==null?void 0:y.call(v,u,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},t)}:n.fetchFn=u}}}function Ja(e,{pages:n,pageParams:t}){const r=n.length-1;return n.length>0?e.getNextPageParam(n[r],n,t[r],t):void 0}function Rp(e,{pages:n,pageParams:t}){var r;return n.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,n[0],n,t[0],t):void 0}var sr,In,ir,xt,An,Ze,Jr,Dn,Rt,Ht,kl,Tp=(kl=class extends Bl{constructor(n){super();X(this,Rt);X(this,sr);X(this,In);X(this,ir);X(this,xt);X(this,An);X(this,Ze);X(this,Jr);X(this,Dn);H(this,Dn,!1),H(this,Jr,n.defaultOptions),this.setOptions(n.options),this.observers=[],H(this,An,n.client),H(this,xt,S(this,An).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,H(this,In,Xa(this.options)),this.state=n.state??S(this,In),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return S(this,sr)}get promise(){var n;return(n=S(this,Ze))==null?void 0:n.promise}setOptions(n){if(this.options={...S(this,Jr),...n},n!=null&&n._type&&H(this,sr,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Xa(this.options);t.data!==void 0&&(this.setState(Ya(t.data,t.dataUpdatedAt)),H(this,In,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&S(this,xt).remove(this)}setData(n,t){const r=Vs(this.state.data,n,this.options);return de(this,Rt,Ht).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){de(this,Rt,Ht).call(this,{type:"setState",state:n})}cancel(n){var r,o;const t=(r=S(this,Ze))==null?void 0:r.promise;return(o=S(this,Ze))==null||o.cancel(n),t?t.then(dt).catch(dt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return S(this,In)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Oe(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ui||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Oe(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!zl(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=S(this,Ze))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=S(this,Ze))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),S(this,xt).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){const t=this.observers.indexOf(n);t!==-1&&(this.observers.splice(t,1),this.observers.length||(S(this,Ze)&&(S(this,Dn)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?S(this,Ze).cancel({revert:!0}):S(this,Ze).cancelRetry()),this.scheduleGc()),S(this,xt).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||de(this,Rt,Ht).call(this,{type:"invalidate"})}async fetch(n,t){var u,d,l,f,p,m,v,y,b,_,x,E;if(this.state.fetchStatus!=="idle"&&((u=S(this,Ze))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(S(this,Ze))return S(this,Ze).continueRetry(),S(this,Ze).promise}if(n&&this.setOptions(n),!this.options.queryFn){const C=this.observers.find(O=>O.options.queryFn);C&&this.setOptions(C.options)}const r=new AbortController,o=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(H(this,Dn,!0),r.signal)})},s=()=>{const C=Ll(this.options,t),T=(()=>{const A={client:S(this,An),queryKey:this.queryKey,meta:this.meta};return o(A),A})();return H(this,Dn,!1),this.options.persister?this.options.persister(C,T,this):C(T)},a=(()=>{const C={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:S(this,An),state:this.state,fetchFn:s};return o(C),C})();(d=S(this,sr)==="infinite"?Op(this.options.pages):this.options.behavior)==null||d.onFetch(a,this),H(this,ir,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&de(this,Rt,Ht).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const c=H(this,Ze,Zl({initialPromise:t==null?void 0:t.initialPromise,fn:a.fetchFn,onCancel:C=>{C instanceof Us&&C.revert&&this.setState({...S(this,ir),fetchStatus:"idle"}),r.abort()},onFail:(C,O)=>{de(this,Rt,Ht).call(this,{type:"failed",failureCount:C,error:O})},onPause:()=>{de(this,Rt,Ht).call(this,{type:"pause"})},onContinue:()=>{de(this,Rt,Ht).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const C=await c.start();if(C===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(C),(m=(p=S(this,xt).config).onSuccess)==null||m.call(p,C,this),(y=(v=S(this,xt).config).onSettled)==null||y.call(v,C,this.state.error,this),C}catch(C){if(C instanceof Us){if(C.silent)return S(this,Ze).promise;if(C.revert){if(this.state.data===void 0)throw C;return this.state.data}}throw de(this,Rt,Ht).call(this,{type:"error",error:C}),(_=(b=S(this,xt).config).onError)==null||_.call(b,C,this),(E=(x=S(this,xt).config).onSettled)==null||E.call(x,this.state.data,C,this),C}finally{S(this,Ze)===c&&H(this,Ze,void 0),this.scheduleGc()}}},sr=new WeakMap,In=new WeakMap,ir=new WeakMap,xt=new WeakMap,An=new WeakMap,Ze=new WeakMap,Jr=new WeakMap,Dn=new WeakMap,Rt=new WeakSet,Ht=function(n){const t=r=>{switch(n.type){case"failed":return{...r,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Kl(r.data,this.options),fetchMeta:n.meta??null};case"success":const o={...r,...Ya(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return H(this,ir,n.manual?o:void 0),o;case"error":const s=n.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...n.state}}};this.state=t(this.state),Ye.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),S(this,xt).notify({query:this,type:"updated",action:n})})},kl);function Kl(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ul(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ya(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Xa(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,t=n!==void 0,r=t?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}var it,me,Yr,at,Nn,ar,qt,Xr,cr,lr,jn,Mn,vn,ur,we,Mr,Zs,Bs,Ks,Ws,Hs,Gs,qs,Qs,Pl,Ip=(Pl=class extends no{constructor(n,t){super();X(this,we);X(this,it);X(this,me);X(this,Yr);X(this,at);X(this,Nn);X(this,ar);X(this,qt);X(this,Xr);X(this,cr);X(this,lr);X(this,jn);X(this,Mn);X(this,vn);X(this,ur,new Set);this.options=t,H(this,it,n),H(this,qt,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(S(this,me).addObserver(this),ec(S(this,me),this.options)?de(this,we,Mr).call(this):this.updateResult(),de(this,we,Hs).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Js(S(this,me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Js(S(this,me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,de(this,we,Gs).call(this),de(this,we,qs).call(this),S(this,me).removeObserver(this)}setOptions(n){const t=this.options,r=S(this,me);if(this.options=S(this,it).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Oe(this.options.enabled,S(this,me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");de(this,we,Qs).call(this),S(this,me).setOptions(this.options),t._defaulted&&!ws(this.options,t)&&S(this,it).getQueryCache().notify({type:"observerOptionsUpdated",query:S(this,me),observer:this});const o=this.hasListeners();o&&tc(S(this,me),r,this.options,t)&&de(this,we,Mr).call(this),this.updateResult(),o&&(S(this,me)!==r||Oe(this.options.enabled,S(this,me))!==Oe(t.enabled,S(this,me))||Oe(this.options.staleTime,S(this,me))!==Oe(t.staleTime,S(this,me)))&&de(this,we,Bs).call(this);const s=de(this,we,Ks).call(this);o&&(S(this,me)!==r||Oe(this.options.enabled,S(this,me))!==Oe(t.enabled,S(this,me))||s!==S(this,vn))&&de(this,we,Ws).call(this,s)}getOptimisticResult(n){const t=S(this,it).getQueryCache().build(S(this,it),n),r=this.createResult(t,n);return ws(this.getCurrentResult(),r)||(H(this,at,r),H(this,ar,this.options),H(this,Nn,S(this,me).state)),r}getCurrentResult(){return S(this,at)}trackResult(n,t){return new Proxy(n,{get:(r,o)=>(this.trackProp(o),t==null||t(o),Reflect.get(r,o))})}trackProp(n){S(this,ur).add(n)}getCurrentQuery(){return S(this,me)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=S(this,it).defaultQueryOptions(n),r=S(this,it).getQueryCache().build(S(this,it),t);let o=()=>{},s;const i=new Promise(a=>{s=a,o=S(this,it).getQueryCache().subscribe(c=>{c.type==="updated"&&c.query.queryHash===r.queryHash&&r.state.data!==void 0&&(o(),a(this.createResult(r,t)))})});return Promise.race([r.fetch().then(()=>{const a=this.createResult(r,t);return s==null||s(a),a}).finally(()=>{o()}),i])}fetch(n){return de(this,we,Mr).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),S(this,at)))}createResult(n,t){var O;const r=S(this,me),o=this.options,s=S(this,at),i=S(this,Nn),a=S(this,ar),c=n!==r?n.state:S(this,Yr),{state:u}=n;let d={...u},l=!1,f;if(t._optimisticResults){const T=this.hasListeners(),A=!T&&ec(n,t),R=T&&tc(n,r,t,o);(A||R)&&(d={...d,...Kl(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:v}=d;f=d.data;let y=!1;if(t.placeholderData!==void 0&&f===void 0&&v==="pending"){let T;s!=null&&s.isPlaceholderData&&t.placeholderData===(a==null?void 0:a.placeholderData)?(T=s.data,y=!0):T=typeof t.placeholderData=="function"?t.placeholderData((O=S(this,lr))==null?void 0:O.state.data,S(this,lr)):t.placeholderData,T!==void 0&&(v="success",f=Vs(s==null?void 0:s.data,T,t),l=!0)}if(t.select&&f!==void 0&&!y)if(s&&f===(i==null?void 0:i.data)&&t.select===S(this,Xr))f=S(this,cr);else try{H(this,Xr,t.select),f=t.select(f),f=Vs(s==null?void 0:s.data,f,t),H(this,cr,f),H(this,qt,null)}catch(T){H(this,qt,T)}else f===void 0&&H(this,qt,null);S(this,qt)&&(p=S(this,qt),f=S(this,cr),m=Date.now(),v="error",l=!1);const b=d.fetchStatus==="fetching",_=v==="pending",x=v==="error",E=_&&b,C=f!==void 0;return{status:v,fetchStatus:d.fetchStatus,isPending:_,isSuccess:v==="success",isError:x,isInitialLoading:E,isLoading:E,data:f,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!_,isLoadingError:x&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:l,isRefetchError:x&&C,isStale:Ki(n,t),refetch:this.refetch,isEnabled:Oe(t.enabled,n)!==!1}}updateResult(){const n=S(this,at),t=this.createResult(S(this,me),this.options);if(H(this,Nn,S(this,me).state),H(this,ar,this.options),S(this,Nn).data!==void 0&&H(this,lr,S(this,me)),ws(t,n))return;H(this,at,t);const o=(()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!S(this,ur).size)return!0;const a=new Set(i??S(this,ur));return this.options.throwOnError&&a.add("error"),Object.keys(S(this,at)).some(c=>{const u=c;return S(this,at)[u]!==n[u]&&a.has(u)})})();Ye.batch(()=>{o&&this.listeners.forEach(s=>{s(S(this,at))}),S(this,it).getQueryCache().notify({query:S(this,me),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&de(this,we,Hs).call(this)}},it=new WeakMap,me=new WeakMap,Yr=new WeakMap,at=new WeakMap,Nn=new WeakMap,ar=new WeakMap,qt=new WeakMap,Xr=new WeakMap,cr=new WeakMap,lr=new WeakMap,jn=new WeakMap,Mn=new WeakMap,vn=new WeakMap,ur=new WeakMap,we=new WeakSet,Mr=function(n){de(this,we,Qs).call(this);let t=S(this,me).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(dt)),t},Zs=function(n){return!Zi()&&Oe(this.options.enabled,S(this,me))!==!1&&$l(n)},Bs=function(){de(this,we,Gs).call(this);const n=Oe(this.options.staleTime,S(this,me));if(S(this,at).isStale||!de(this,we,Zs).call(this,n))return;const t=zl(S(this,at).dataUpdatedAt,n)+1;H(this,jn,On.setTimeout(()=>{S(this,at).isStale||this.updateResult()},t))},Ks=function(){return Oe(this.options.refetchInterval,S(this,me))??!1},Ws=function(n){de(this,we,qs).call(this),H(this,vn,n),!(S(this,vn)===0||!de(this,we,Zs).call(this,S(this,vn)))&&H(this,Mn,On.setInterval(()=>{(this.options.refetchIntervalInBackground||Bi.isFocused())&&de(this,we,Mr).call(this)},S(this,vn)))},Hs=function(){de(this,we,Bs).call(this),de(this,we,Ws).call(this,de(this,we,Ks).call(this))},Gs=function(){S(this,jn)!==void 0&&(On.clearTimeout(S(this,jn)),H(this,jn,void 0))},qs=function(){S(this,Mn)!==void 0&&(On.clearInterval(S(this,Mn)),H(this,Mn,void 0))},Qs=function(){const n=S(this,it).getQueryCache().build(S(this,it),this.options);if(n===S(this,me))return;const t=S(this,me);H(this,me,n),H(this,Yr,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},Pl);function Ap(e,n){return Oe(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Oe(n.retryOnMount,e)===!1)}function ec(e,n){return Ap(e,n)||e.state.data!==void 0&&Js(e,n,n.refetchOnMount)}function Js(e,n,t){if(Oe(n.enabled,e)!==!1&&Oe(n.staleTime,e)!=="static"){const r=Oe(t,e);return r==="always"||r!==!1&&Ki(e,n)}return!1}function tc(e,n,t,r){return(e!==n||Oe(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&Ki(e,t)}function Ki(e,n){return Oe(n.enabled,e)!==!1&&e.isStaleByTime(Oe(n.staleTime,e))}var eo,$t,nt,$n,zt,un,Ol,Dp=(Ol=class extends Bl{constructor(n){super();X(this,zt);X(this,eo);X(this,$t);X(this,nt);X(this,$n);H(this,eo,n.client),this.mutationId=n.mutationId,H(this,nt,n.mutationCache),H(this,$t,[]),this.state=n.state||Np(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){S(this,$t).includes(n)||(S(this,$t).push(n),this.clearGcTimeout(),S(this,nt).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){H(this,$t,S(this,$t).filter(t=>t!==n)),this.scheduleGc(),S(this,nt).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){S(this,$t).length||(this.state.status==="pending"?this.scheduleGc():S(this,nt).remove(this))}continue(){var n;return((n=S(this,$n))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var a,c,u,d,l,f,p,m,v,y,b,_,x,E,C,O,T,A;const t=()=>{de(this,zt,un).call(this,{type:"continue"})},r={client:S(this,eo),meta:this.options.meta,mutationKey:this.options.mutationKey},o=H(this,$n,Zl({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,z)=>{de(this,zt,un).call(this,{type:"failed",failureCount:R,error:z})},onPause:()=>{de(this,zt,un).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,nt).canRun(this)})),s=this.state.status==="pending",i=!o.canStart();try{if(s)t();else{de(this,zt,un).call(this,{type:"pending",variables:n,isPaused:i}),S(this,nt).config.onMutate&&await S(this,nt).config.onMutate(n,this,r);const z=await((c=(a=this.options).onMutate)==null?void 0:c.call(a,n,r));z!==this.state.context&&de(this,zt,un).call(this,{type:"pending",context:z,variables:n,isPaused:i})}const R=await o.start();return await((d=(u=S(this,nt).config).onSuccess)==null?void 0:d.call(u,R,n,this.state.context,this,r)),await((f=(l=this.options).onSuccess)==null?void 0:f.call(l,R,n,this.state.context,r)),await((m=(p=S(this,nt).config).onSettled)==null?void 0:m.call(p,R,null,this.state.variables,this.state.context,this,r)),await((y=(v=this.options).onSettled)==null?void 0:y.call(v,R,null,n,this.state.context,r)),de(this,zt,un).call(this,{type:"success",data:R}),R}catch(R){try{await((_=(b=S(this,nt).config).onError)==null?void 0:_.call(b,R,n,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((E=(x=this.options).onError)==null?void 0:E.call(x,R,n,this.state.context,r))}catch(z){Promise.reject(z)}try{await((O=(C=S(this,nt).config).onSettled)==null?void 0:O.call(C,void 0,R,this.state.variables,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((A=(T=this.options).onSettled)==null?void 0:A.call(T,void 0,R,n,this.state.context,r))}catch(z){Promise.reject(z)}throw de(this,zt,un).call(this,{type:"error",error:R}),R}finally{S(this,$n)===o&&H(this,$n,void 0),S(this,nt).runNext(this)}}},eo=new WeakMap,$t=new WeakMap,nt=new WeakMap,$n=new WeakMap,zt=new WeakSet,un=function(n){const t=r=>{switch(n.type){case"failed":return{...r,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...r,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:n.error,failureCount:r.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ye.batch(()=>{S(this,$t).forEach(r=>{r.onMutationUpdate(n)}),S(this,nt).notify({mutation:this,type:"updated",action:n})})},Ol);function Np(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Qt,Tt,to,Rl,jp=(Rl=class extends no{constructor(n={}){super();X(this,Qt);X(this,Tt);X(this,to);this.config=n,H(this,Qt,new Set),H(this,Tt,new Map),H(this,to,0)}build(n,t,r){const o=new Dp({client:n,mutationCache:this,mutationId:++po(this,to)._,options:n.defaultMutationOptions(t),state:r});return this.add(o),o}add(n){S(this,Qt).add(n);const t=go(n);if(typeof t=="string"){const r=S(this,Tt).get(t);r?r.push(n):S(this,Tt).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(S(this,Qt).delete(n)){const t=go(n);if(typeof t=="string"){const r=S(this,Tt).get(t);if(r)if(r.length>1){const o=r.indexOf(n);o!==-1&&r.splice(o,1)}else r[0]===n&&S(this,Tt).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=go(n);if(typeof t=="string"){const o=(r=S(this,Tt).get(t))==null?void 0:r.find(s=>s.state.status==="pending");return!o||o===n}else return!0}runNext(n){var r,o;const t=go(n);return typeof t=="string"?((o=(r=S(this,Tt).get(t))==null?void 0:r.find(s=>s!==n&&s.state.isPaused))==null?void 0:o.continue())??Promise.resolve():Promise.resolve()}clear(){Ye.batch(()=>{S(this,Qt).forEach(n=>{this.notify({type:"removed",mutation:n})}),S(this,Qt).clear(),S(this,Tt).clear()})}getAll(){return Array.from(S(this,Qt))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>Ga(t,r))}findAll(n={}){return this.getAll().filter(t=>Ga(n,t))}notify(n){Ye.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Ye.batch(()=>Promise.all(n.map(t=>t.continue().catch(dt))))}},Qt=new WeakMap,Tt=new WeakMap,to=new WeakMap,Rl);function go(e){var n;return(n=e.options.scope)==null?void 0:n.id}var Ft,Tl,Mp=(Tl=class extends no{constructor(n={}){super();X(this,Ft);this.config=n,H(this,Ft,new Map)}build(n,t,r){const o=t.queryKey,s=t.queryHash??Vi(o,t);let i=this.get(s);return i||(i=new Tp({client:n,queryKey:o,queryHash:s,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(o)}),this.add(i)),i}add(n){S(this,Ft).has(n.queryHash)||(S(this,Ft).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){S(this,Ft).get(n.queryHash)===n&&(n.destroy(),S(this,Ft).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Ye.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return S(this,Ft).get(n)}getAll(){return[...S(this,Ft).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>Ha(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>Ha(n,r)):t}notify(n){Ye.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Ye.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Ye.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Ft=new WeakMap,Tl),Ie,yn,bn,dr,fr,wn,hr,pr,Il,$p=(Il=class{constructor(e={}){X(this,Ie);X(this,yn);X(this,bn);X(this,dr);X(this,fr);X(this,wn);X(this,hr);X(this,pr);H(this,Ie,e.queryCache||new Mp),H(this,yn,e.mutationCache||new jp),H(this,bn,e.defaultOptions||{}),H(this,dr,new Map),H(this,fr,new Map),H(this,wn,0)}mount(){po(this,wn)._++,S(this,wn)===1&&(H(this,hr,Bi.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ie).onFocus())})),H(this,pr,Uo.subscribe(async e=>{e&&(await this.resumePausedMutations(),S(this,Ie).onOnline())})))}unmount(){var e,n;po(this,wn)._--,S(this,wn)===0&&((e=S(this,hr))==null||e.call(this),H(this,hr,void 0),(n=S(this,pr))==null||n.call(this),H(this,pr,void 0))}isFetching(e){return S(this,Ie).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return S(this,yn).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=S(this,Ie).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=S(this,Ie).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Oe(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return S(this,Ie).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var i;const r=this.defaultQueryOptions({queryKey:e}),o=(i=S(this,Ie).get(r.queryHash))==null?void 0:i.state.data,s=gp(n,o);if(s!==void 0)return S(this,Ie).build(this,r).setData(s,{...t,manual:!0})}setQueriesData(e,n,t){return Ye.batch(()=>S(this,Ie).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=S(this,Ie).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=S(this,Ie);Ye.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=S(this,Ie);return Ye.batch(()=>{const r=t.findAll(e),o=new Set(r);return r.forEach(s=>{s.reset()}),this.refetchQueries({type:"active",predicate:s=>o.has(s)},n)})}cancelQueries(e,n={}){const t={revert:!0,...n},r=Ye.batch(()=>S(this,Ie).findAll(e).map(o=>o.cancel(t)));return Promise.all(r).then(dt).catch(dt)}invalidateQueries(e,n={}){return Ye.batch(()=>(S(this,Ie).findAll(e).forEach(t=>{t.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},n)))}refetchQueries(e,n={}){const t={...n,cancelRefetch:n.cancelRefetch??!0},r=Ye.batch(()=>S(this,Ie).findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,t);return t.throwOnError||(s=s.catch(dt)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(dt)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=S(this,Ie).build(this,n),r=t.isStaleByTime(Oe(n.staleTime,t))?await t.fetch(n):t.state.data,o=n.select;return o?o(r):r}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=S(this,Ie).build(this,n);return t.isStaleByTime(Oe(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(dt).catch(dt)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(dt).catch(dt)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Uo.isOnline()?S(this,yn).resumePausedMutations():Promise.resolve()}getQueryCache(){return S(this,Ie)}getMutationCache(){return S(this,yn)}getDefaultOptions(){return S(this,bn)}setDefaultOptions(e){H(this,bn,e)}setQueryDefaults(e,n){S(this,dr).set(Br(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...S(this,dr).values()],t={};return n.forEach(r=>{mr(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){S(this,fr).set(Br(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...S(this,fr).values()],t={};return n.forEach(r=>{mr(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...S(this,bn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Vi(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Ui&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...S(this,bn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){S(this,Ie).clear(),S(this,yn).clear()}},Ie=new WeakMap,yn=new WeakMap,bn=new WeakMap,dr=new WeakMap,fr=new WeakMap,wn=new WeakMap,hr=new WeakMap,pr=new WeakMap,Il);const Wl=h.createContext(!1),zp=()=>h.useContext(Wl);Wl.Provider;function Fp(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Lp=h.createContext(Fp()),Vp=()=>h.useContext(Lp),Up=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?Vl(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},Zp=e=>{h.useEffect(()=>{e.clearReset()},[e])},Bp=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:o})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||Vl(t,[e.error,r])),Kp=e=>{if(e.suspense){const t=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>t(r(...o)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Wp=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,Hp=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function Gp(e,n,t){const r=zp(),o=Vp(),s=Li(),i=s.defaultQueryOptions(e),a=s.getQueryCache().get(i.queryHash),c=e.subscribed!==!1;i._optimisticResults=r?"isRestoring":c?"optimistic":void 0,Kp(i),Up(i,o,a),Zp(o);const[u]=h.useState(()=>new n(s,i)),d=u.getOptimisticResult(i),l=!r&&c;if(h.useSyncExternalStore(h.useCallback(f=>{const p=l?u.subscribe(Ye.batchCalls(f)):dt;return u.updateResult(),p},[u,l]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),h.useEffect(()=>{u.setOptions(i)},[i,u]),Wp(i,d))throw Hp(i,u,o);if(Bp({result:d,errorResetBoundary:o,throwOnError:i.throwOnError,query:a,suspense:i.suspense}))throw d.error;return i.notifyOnChangeProps?d:u.trackResult(d)}function Wi(e,n){return Gp(e,Ip)}function qp(e){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");t.type="text/css",n.appendChild(t),t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}const Qp=e=>{switch(e){case"success":return Xp;case"info":return tm;case"warning":return em;case"error":return nm;default:return null}},Jp=Array(12).fill(0),Yp=({visible:e,className:n})=>I.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},Jp.map((t,r)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),Xp=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),em=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),tm=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),nm=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),rm=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),om=()=>{const[e,n]=I.useState(document.hidden);return I.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let sm=1;const im=100,nc=e=>{var n;return typeof(e==null?void 0:e.id)=="number"||(e==null||(n=e.id)==null?void 0:n.length)>0?e.id:sm++};class am{constructor(){this.subscribe=n=>(this.subscribers.push(n),this.getActiveToasts().forEach(t=>n(t)),()=>{const t=this.subscribers.indexOf(n);this.subscribers.splice(t,1)}),this.publish=n=>{this.subscribers.forEach(t=>t(n))},this.addToast=n=>{this.publish(n),this.toasts=[...this.toasts,n],this.trimHistory()},this.trimHistory=()=>{let n=this.toasts.length-im;n<=0||(this.toasts=this.toasts.filter(t=>n>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),n--,!1):!0))},this.create=n=>{const{message:t,...r}=n,o=nc(n),s=this.pendingDismissals.get(o);s!==void 0&&(cancelAnimationFrame(s),this.pendingDismissals.delete(o),this.dismissedToasts.delete(o));const i=this.dismissedToasts.has(o),a=n.dismissible===void 0?!0:n.dismissible;return i&&(this.dismissedToasts.delete(o),this.toasts=this.toasts.filter(u=>u.id!==o)),(i?void 0:this.toasts.find(u=>u.id===o))?this.toasts=this.toasts.map(u=>u.id===o?(this.publish({...u,...n,id:o,title:t}),{...u,...n,id:o,dismissible:a,title:t}):u):this.addToast({title:t,...r,dismissible:a,id:o}),o},this.dismiss=n=>{if(n==null)return this.getActiveToasts().forEach(r=>{this.dismissedToasts.add(r.id),this.subscribers.forEach(o=>o({id:r.id,dismiss:!0}))}),n;this.dismissedToasts.add(n);const t=this.pendingDismissals.get(n);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(n,requestAnimationFrame(()=>{this.pendingDismissals.delete(n),this.subscribers.forEach(r=>r({id:n,dismiss:!0}))})),n},this.message=(n,t)=>this.create({...t,message:n,type:void 0}),this.error=(n,t)=>this.create({...t,message:n,type:"error"}),this.success=(n,t)=>this.create({...t,type:"success",message:n}),this.info=(n,t)=>this.create({...t,type:"info",message:n}),this.warning=(n,t)=>this.create({...t,type:"warning",message:n}),this.loading=(n,t)=>this.create({...t,type:"loading",message:n}),this.promise=(n,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:n,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const o=Promise.resolve(n instanceof Function?n():n);let s=r!==void 0,i;const a=o.then(async u=>{if(i=["resolve",u],I.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(lm(u)&&!u.ok){s=!1;const l=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,f=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description,m=typeof l=="object"&&!I.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:f,...m})}else if(u instanceof Error){s=!1;const l=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof l=="object"&&!I.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:f,...m})}else if(t.success!==void 0){s=!1;const l=typeof t.success=="function"?await t.success(u):t.success,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof l=="object"&&!I.isValidElement(l)?l:{message:l};this.create({id:r,type:"success",description:f,...m})}}).catch(async u=>{if(i=["reject",u],t.error!==void 0){s=!1;const d=typeof t.error=="function"?await t.error(u):t.error,l=typeof t.description=="function"?await t.description(u):t.description,p=typeof d=="object"&&!I.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:l,...p})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((u,d)=>a.then(()=>i[0]==="reject"?d(i[1]):u(i[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=nc(t);return this.create({...t,jsx:n(r),id:r,type:void 0}),r},this.getActiveToasts=()=>this.toasts.filter(n=>!this.dismissedToasts.has(n.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}const ut=new am,cm=(e,n)=>ut.message(e,n),lm=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",um=cm,dm=()=>ut.toasts,fm=()=>ut.getActiveToasts(),KC=Object.assign(um,{success:ut.success,info:ut.info,warning:ut.warning,error:ut.error,custom:ut.custom,message:ut.message,promise:ut.promise,dismiss:ut.dismiss,loading:ut.loading},{getHistory:dm,getToasts:fm});qp("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function vo(e){return e.label!==void 0}const hm=3,pm="24px",mm="16px",rc=4e3,gm=356,vm=14,ym=45,bm=200;function jt(...e){return e.filter(Boolean).join(" ")}function wm(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const _m=e=>{var n,t,r,o,s,i,a,c,u;const{invert:d,toast:l,unstyled:f,interacting:p,setHeights:m,visibleToasts:v,heights:y,index:b,toasts:_,expanded:x,removeToast:E,defaultRichColors:C,closeButton:O,style:T,cancelButtonStyle:A,actionButtonStyle:R,className:z="",descriptionClassName:L="",duration:$,position:G,gap:Z,expandByDefault:q,classNames:B,icons:J,closeButtonAriaLabel:ue="Close toast"}=e,[ee,Q]=I.useState(null),[oe,fe]=I.useState(null),[_e,te]=I.useState(!1),[ce,he]=I.useState(!1),[be,ke]=I.useState(!1),[pe,Se]=I.useState(!1),[rt,lt]=I.useState(!1),[Qe,ot]=I.useState(0),[on,sn]=I.useState(0),Ot=I.useRef(l.duration||$||rc),an=I.useRef(null),tt=I.useRef(null),Pr=b===0,Kn=b+1<=v,Ne=l.type,Wn=Ne??"default",Zt=l.dismissible!==!1,Or=l.className||"",Rr=l.descriptionClassName||"",Hn=I.useMemo(()=>y.findIndex(F=>F.toastId===l.id)||0,[y,l.id]),uo=I.useMemo(()=>{var F;return(F=l.closeButton)!=null?F:O},[l.closeButton,O]),fo=I.useMemo(()=>l.duration||$||rc,[l.duration,$]),Gn=I.useRef(0),Bt=I.useRef(0),ho=I.useRef(0),Kt=I.useRef(null),[Ua,Za]=G.split("-"),Tr=I.useMemo(()=>y.reduce((F,ie,le)=>le>=Hn?F:F+ie.height,0),[y,Hn]),w=om(),k=I.useMemo(()=>{var F;return(F=e.swipeDirections)!=null?F:wm(G)},[e.swipeDirections,G]),P=l.invert||d,N=Ne==="loading";Bt.current=I.useMemo(()=>Hn*Z+Tr,[Hn,Tr]),I.useEffect(()=>{Ot.current=fo},[fo]),I.useEffect(()=>{te(!0)},[]),I.useEffect(()=>{const F=tt.current;if(F){const ie=F.getBoundingClientRect().height;return sn(ie),m(le=>[{toastId:l.id,height:ie,position:l.position},...le]),()=>m(le=>le.filter(Ee=>Ee.toastId!==l.id))}},[m,l.id]),I.useLayoutEffect(()=>{if(!_e)return;const F=tt.current,ie=F.style.height;F.style.height="auto";const le=F.getBoundingClientRect().height;F.style.height=ie,sn(le),m(Ee=>Ee.find(Ue=>Ue.toastId===l.id)?Ee.map(Ue=>Ue.toastId===l.id?{...Ue,height:le}:Ue):[{toastId:l.id,height:le,position:l.position},...Ee])},[_e,l.title,l.description,m,l.id,l.jsx,l.action,l.cancel]);const D=I.useCallback(()=>{he(!0),ot(Bt.current),m(F=>F.filter(ie=>ie.toastId!==l.id)),setTimeout(()=>{E(l)},bm)},[l,E,m,Bt]);I.useEffect(()=>{if(l.promise&&Ne==="loading"||l.duration===1/0||l.type==="loading")return;let F;return x||p||w?(()=>{if(ho.current<Gn.current){const Ee=new Date().getTime()-Gn.current;Ot.current=Ot.current-Ee}ho.current=new Date().getTime()})():(()=>{Ot.current!==1/0&&(Gn.current=new Date().getTime(),F=setTimeout(()=>{l.onAutoClose==null||l.onAutoClose.call(l,l),D()},Ot.current))})(),()=>clearTimeout(F)},[x,p,l,Ne,w,D]),I.useEffect(()=>{l.delete&&(D(),l.onDismiss==null||l.onDismiss.call(l,l))},[D,l.delete]);function U(){var F;if(J!=null&&J.loading){var ie;return I.createElement("div",{className:jt(B==null?void 0:B.loader,l==null||(ie=l.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":Ne==="loading"},J.loading)}return I.createElement(Yp,{className:jt(B==null?void 0:B.loader,l==null||(F=l.classNames)==null?void 0:F.loader),visible:Ne==="loading"})}const M=l.icon||(J==null?void 0:J[Ne])||Qp(Ne);var K,W;return I.createElement("li",{tabIndex:0,ref:tt,className:jt(z,Or,B==null?void 0:B.toast,l==null||(n=l.classNames)==null?void 0:n.toast,B==null?void 0:B[Wn],l==null||(t=l.classNames)==null?void 0:t[Wn]),"data-sonner-toast":"","data-rich-colors":(K=l.richColors)!=null?K:C,"data-styled":!(l.jsx||l.unstyled||f),"data-mounted":_e,"data-promise":!!l.promise,"data-swiped":rt,"data-removed":ce,"data-visible":Kn,"data-y-position":Ua,"data-x-position":Za,"data-index":b,"data-front":Pr,"data-swiping":be,"data-dismissible":Zt,"data-type":Ne,"data-invert":P,"data-swipe-out":pe,"data-swipe-direction":oe,"data-expanded":!!(x||q&&_e),"data-testid":l.testId,style:{"--index":b,"--toasts-before":b,"--z-index":_.length-b,"--offset":`${ce?Qe:Bt.current}px`,"--initial-height":q?"auto":`${on}px`,...T,...l.style},onDragEnd:()=>{ke(!1),Q(null),Kt.current=null},onPointerDown:F=>{F.button!==2&&(N||!Zt||(an.current=new Date,ot(Bt.current),F.target.setPointerCapture(F.pointerId),F.target.tagName!=="BUTTON"&&(ke(!0),Kt.current={x:F.clientX,y:F.clientY})))},onPointerUp:()=>{var F,ie,le;if(pe||!Zt)return;Kt.current=null;const Ee=Number(((F=tt.current)==null?void 0:F.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Je=Number(((ie=tt.current)==null?void 0:ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ue=new Date().getTime()-((le=an.current)==null?void 0:le.getTime()),ze=ee==="x"?Ee:Je,gt=Math.abs(ze)/Ue;if((ee==="x"?k.includes(Ee>0?"right":"left"):k.includes(Je>0?"bottom":"top"))&&(Math.abs(ze)>=ym||gt>.11)){ot(Bt.current),l.onDismiss==null||l.onDismiss.call(l,l),fe(ee==="x"?Ee>0?"right":"left":Je>0?"down":"up"),D(),Se(!0);return}else{var vt,vs;(vt=tt.current)==null||vt.style.setProperty("--swipe-amount-x","0px"),(vs=tt.current)==null||vs.style.setProperty("--swipe-amount-y","0px")}lt(!1),ke(!1),Q(null)},onPointerMove:F=>{var ie,le,Ee;if(!Kt.current||!Zt||((ie=window.getSelection())==null?void 0:ie.toString().length)>0)return;const Ue=F.clientY-Kt.current.y,ze=F.clientX-Kt.current.x;!ee&&(Math.abs(ze)>1||Math.abs(Ue)>1)&&Q(Math.abs(ze)>Math.abs(Ue)?"x":"y");let gt={x:0,y:0};const Ir=vt=>1/(1.5+Math.abs(vt)/20);if(ee==="y"){if(k.includes("top")||k.includes("bottom"))if(k.includes("top")&&Ue<0||k.includes("bottom")&&Ue>0)gt.y=Ue;else{const vt=Ue*Ir(Ue);gt.y=Math.abs(vt)<Math.abs(Ue)?vt:Ue}}else if(ee==="x"&&(k.includes("left")||k.includes("right")))if(k.includes("left")&&ze<0||k.includes("right")&&ze>0)gt.x=ze;else{const vt=ze*Ir(ze);gt.x=Math.abs(vt)<Math.abs(ze)?vt:ze}(Math.abs(gt.x)>0||Math.abs(gt.y)>0)&&lt(!0),(le=tt.current)==null||le.style.setProperty("--swipe-amount-x",`${gt.x}px`),(Ee=tt.current)==null||Ee.style.setProperty("--swipe-amount-y",`${gt.y}px`)}},uo&&!l.jsx&&Ne!=="loading"?I.createElement("button",{"aria-label":ue,"data-disabled":N,"data-close-button":!0,onClick:N||!Zt?()=>{}:()=>{D(),l.onDismiss==null||l.onDismiss.call(l,l)},className:jt(B==null?void 0:B.closeButton,l==null||(r=l.classNames)==null?void 0:r.closeButton)},(W=J==null?void 0:J.close)!=null?W:rm):null,(Ne||l.icon||l.promise)&&l.icon!==null&&((J==null?void 0:J[Ne])!==null||l.icon)?I.createElement("div",{"data-icon":"",className:jt(B==null?void 0:B.icon,l==null||(o=l.classNames)==null?void 0:o.icon)},Ne==="loading"?l.icon||U():l.promise?U():null,Ne!=="loading"?M:null):null,I.createElement("div",{"data-content":"",className:jt(B==null?void 0:B.content,l==null||(s=l.classNames)==null?void 0:s.content)},I.createElement("div",{"data-title":"",className:jt(B==null?void 0:B.title,l==null||(i=l.classNames)==null?void 0:i.title)},l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title),l.description?I.createElement("div",{"data-description":"",className:jt(L,Rr,B==null?void 0:B.description,l==null||(a=l.classNames)==null?void 0:a.description)},typeof l.description=="function"?l.description():l.description):null),I.isValidElement(l.cancel)?l.cancel:l.cancel&&vo(l.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||A,onClick:F=>{vo(l.cancel)&&Zt&&(l.cancel.onClick==null||l.cancel.onClick.call(l.cancel,F),D())},className:jt(B==null?void 0:B.cancelButton,l==null||(c=l.classNames)==null?void 0:c.cancelButton)},l.cancel.label):null,I.isValidElement(l.action)?l.action:l.action&&vo(l.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||R,onClick:F=>{vo(l.action)&&(l.action.onClick==null||l.action.onClick.call(l.action,F),!F.defaultPrevented&&D())},className:jt(B==null?void 0:B.actionButton,l==null||(u=l.classNames)==null?void 0:u.actionButton)},l.action.label):null)};function oc(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function xm(e,n){const t={};return[e,n].forEach((r,o)=>{const s=o===1,i=s?"--mobile-offset":"--offset",a=s?mm:pm;function c(u){["top","right","bottom","left"].forEach(d=>{t[`${i}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?t[`${i}-${u}`]=a:t[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(a)}),t}const Sm=I.forwardRef(function(n,t){const{id:r,invert:o,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:c,className:u,offset:d,mobileOffset:l,theme:f="light",richColors:p,duration:m,style:v,visibleToasts:y=hm,toastOptions:b,dir:_=oc(),gap:x=vm,icons:E,customAriaLabel:C,containerAriaLabel:O="Notifications"}=n,[T,A]=I.useState([]),R=I.useMemo(()=>r?T.filter(te=>te.toasterId===r):T.filter(te=>!te.toasterId),[T,r]),z=I.useMemo(()=>Array.from(new Set([s].concat(R.filter(te=>te.position).map(te=>te.position)))),[R,s]),[L,$]=I.useState([]),[G,Z]=I.useState(!1),[q,B]=I.useState(!1),[J,ue]=I.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),ee=I.useRef(null),Q=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),oe=I.useRef(null),fe=I.useRef(!1),_e=I.useCallback(te=>{A(ce=>{var he;return(he=ce.find(be=>be.id===te.id))!=null&&he.delete||ut.dismiss(te.id),ce.filter(({id:be})=>be!==te.id)})},[]);return I.useEffect(()=>ut.subscribe(te=>{if(te.dismiss){requestAnimationFrame(()=>{A(ce=>ce.map(he=>he.id===te.id?{...he,delete:!0}:he))});return}setTimeout(()=>{Lh.flushSync(()=>{A(ce=>{const he=ce.findIndex(be=>be.id===te.id);return he!==-1?[...ce.slice(0,he),{...ce[he],...te},...ce.slice(he+1)]:[te,...ce]})})})}),[]),I.useEffect(()=>{if(f!=="system"){ue(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ue("dark"):ue("light")),typeof window>"u")return;const te=window.matchMedia("(prefers-color-scheme: dark)");try{te.addEventListener("change",({matches:ce})=>{ue(ce?"dark":"light")})}catch{te.addListener(({matches:he})=>{try{ue(he?"dark":"light")}catch(be){console.error(be)}})}},[f]),I.useEffect(()=>{T.length<=1&&Z(!1)},[T]),I.useEffect(()=>{const te=ce=>{var he;if(i.length>0&&i.every(pe=>ce[pe]||ce.code===pe)){var ke;Z(!0),(ke=ee.current)==null||ke.focus()}ce.code==="Escape"&&(document.activeElement===ee.current||(he=ee.current)!=null&&he.contains(document.activeElement))&&Z(!1)};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[i]),I.useEffect(()=>{if(ee.current)return()=>{oe.current&&(oe.current.focus({preventScroll:!0}),oe.current=null,fe.current=!1)}},[ee.current]),I.createElement("section",{ref:t,"aria-label":C??`${O} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},z.map((te,ce)=>{var he;const[be,ke]=te.split("-");return R.length?I.createElement("ol",{key:te,dir:_==="auto"?oc():_,tabIndex:-1,ref:ee,className:u,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":be,"data-x-position":ke,style:{"--front-toast-height":`${((he=L[0])==null?void 0:he.height)||0}px`,"--width":`${gm}px`,"--gap":`${x}px`,...v,...xm(d,l)},onBlur:pe=>{fe.current&&!pe.currentTarget.contains(pe.relatedTarget)&&(fe.current=!1,oe.current&&(oe.current.focus({preventScroll:!0}),oe.current=null))},onFocus:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||fe.current||(fe.current=!0,oe.current=pe.relatedTarget)},onMouseEnter:()=>Z(!0),onMouseMove:()=>Z(!0),onMouseLeave:()=>{q||Z(!1)},onDragEnd:()=>Z(!1),onPointerDown:pe=>{pe.target instanceof HTMLElement&&pe.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},R.filter(pe=>!pe.position&&ce===0||pe.position===te).map((pe,Se)=>{var rt,lt;return I.createElement(_m,{key:pe.id,icons:E,index:Se,toast:pe,defaultRichColors:p,duration:(rt=b==null?void 0:b.duration)!=null?rt:m,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:o,visibleToasts:y,closeButton:(lt=b==null?void 0:b.closeButton)!=null?lt:c,interacting:q,position:te,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:_e,toasts:R.filter(Qe=>Qe.position==pe.position),heights:L.filter(Qe=>Qe.position==pe.position),setHeights:$,expandByDefault:a,gap:x,expanded:G,swipeDirections:n.swipeDirections})})):null}))});var Em=Object.defineProperty,Hi=(e,n)=>Em(e,"name",{value:n,configurable:!0});function Ys(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}Hi(Ys,"setRef");function Hl(...e){return n=>{let t=!1;const r=e.map(o=>{const s=Ys(o,n);return!t&&typeof s=="function"&&(t=!0),s});if(t)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Ys(e[o],null)}}}}Hi(Hl,"composeRefs");function Re(...e){return h.useCallback(Hl(...e),e)}Hi(Re,"useComposedRefs");var Cm=Object.defineProperty,At=(e,n)=>Cm(e,"name",{value:n,configurable:!0});function Yt(e){const n=h.forwardRef((t,r)=>{let{children:o,...s}=t,i=null,a=!1;const c=[];Xs(o)&&typeof yo=="function"&&(o=yo(o._payload)),h.Children.forEach(o,f=>{var p;if(Yl(f)){a=!0;const m=f;let v="child"in m.props?m.props.child:m.props.children;Xs(v)&&typeof yo=="function"&&(v=yo(v._payload)),i=km(m,v),c.push((p=i==null?void 0:i.props)==null?void 0:p.children)}else c.push(f)}),i?i=h.cloneElement(i,void 0,c):!a&&h.Children.count(o)===1&&h.isValidElement(o)&&(i=o);const u=i?Jl(i):void 0,d=Re(r,u);if(!i){if(o||o===0)throw new Error(a?Rm(e):Om(e));return o}const l=Ql(s,i.props??{});return i.type!==h.Fragment&&(l.ref=r?d:u),h.cloneElement(i,l)});return n.displayName=`${e}.Slot`,n}At(Yt,"createSlot");var _r=Yt("Slot"),Gl=Symbol.for("radix.slottable");function ql(e){const n=At(t=>"child"in t?t.children(t.child):t.children,"Slottable");return n.displayName=`${e}.Slottable`,n.__radixId=Gl,n}At(ql,"createSlottable");var km=At((e,n)=>{if("child"in e.props){const t=e.props.child;return h.isValidElement(t)?h.cloneElement(t,void 0,e.props.children(t.props.children)):null}return h.isValidElement(n)?n:null},"getSlottableElementFromSlottable");function Ql(e,n){const t={...n};for(const r in n){const o=e[r],s=n[r];/^on[A-Z]/.test(r)?o&&s?t[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(t[r]=o):r==="style"?t[r]={...o,...s}:r==="className"&&(t[r]=[o,s].filter(Boolean).join(" "))}return{...e,...t}}At(Ql,"mergeProps");function Jl(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}At(Jl,"getElementRef");function Yl(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gl}At(Yl,"isSlottable");var Pm=Symbol.for("react.lazy");function Xs(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Pm&&"_payload"in e&&Xl(e._payload)}At(Xs,"isLazyComponent");function Xl(e){return typeof e=="object"&&e!==null&&"then"in e}At(Xl,"isPromiseLike");var Om=At(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Rm=At(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),yo=wr[" use ".trim().toString()];function eu(e){var n,t,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(t=eu(e[n]))&&(r&&(r+=" "),r+=t)}else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function tu(){for(var e,n,t=0,r="",o=arguments.length;t<o;t++)(e=arguments[t])&&(n=eu(e))&&(r&&(r+=" "),r+=n);return r}const sc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ic=tu,ro=(e,n)=>t=>{var r;if((n==null?void 0:n.variants)==null)return ic(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:o,defaultVariants:s}=n,i=Object.keys(o).map(u=>{const d=t==null?void 0:t[u],l=s==null?void 0:s[u];if(d===null)return null;const f=sc(d)||sc(l);return o[u][f]}),a=t&&Object.entries(t).reduce((u,d)=>{let[l,f]=d;return f===void 0||(u[l]=f),u},{}),c=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:l,className:f,...p}=d;return Object.entries(p).every(m=>{let[v,y]=m;return Array.isArray(y)?y.includes({...s,...a}[v]):{...s,...a}[v]===y})?[...u,l,f]:u},[]);return ic(e,i,c,t==null?void 0:t.class,t==null?void 0:t.className)};/**
3
- * @license lucide-react v1.48.0 - ISC
4
- *
5
- * This source code is licensed under the ISC license.
6
- * See the LICENSE file in the root directory of this source tree.
7
- */const Tm=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
8
- * @license lucide-react v1.48.0 - ISC
9
- *
10
- * This source code is licensed under the ISC license.
11
- * See the LICENSE file in the root directory of this source tree.
12
- */function Im(e,n,t=[]){if(n==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Tm(e),size:24,node:n,...t.length>0?{aliases:t}:{}}}/**
13
- * @license lucide-react v1.48.0 - ISC
14
- *
15
- * This source code is licensed under the ISC license.
16
- * See the LICENSE file in the root directory of this source tree.
17
- */const Am=e=>{let n="",t=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){t=n.length>0;continue}n.length===0?n+=r.toLowerCase():n+=t?r.toUpperCase():r,t=!1}return n};/**
18
- * @license lucide-react v1.48.0 - ISC
19
- *
20
- * This source code is licensed under the ISC license.
21
- * See the LICENSE file in the root directory of this source tree.
22
- */const Dm=e=>{const n=Am(e);return n.charAt(0).toUpperCase()+n.slice(1)};/**
23
- * @license lucide-react v1.48.0 - ISC
24
- *
25
- * This source code is licensed under the ISC license.
26
- * See the LICENSE file in the root directory of this source tree.
27
- */const ei=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/**
28
- * @license lucide-react v1.48.0 - ISC
29
- *
30
- * This source code is licensed under the ISC license.
31
- * See the LICENSE file in the root directory of this source tree.
32
- */const Pn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
33
- * @license lucide-react v1.48.0 - ISC
34
- *
35
- * This source code is licensed under the ISC license.
36
- * See the LICENSE file in the root directory of this source tree.
37
- */function _s(e){return e!=null}function Nm(e,n={}){var f,p;const t=n.attributeNames??{},r=m=>t[m]??m,o=e.size??e.width??Pn.width,s=e.size??e.height??Pn.height,i=((f=e.aliases)==null?void 0:f.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`))??[],a=[...e.name?[`lucide-${e.name}`]:[],...i],c=((p=n.className)==null?void 0:p.split(" ").filter(Boolean))??[],u=n.includeDefaultClasses===!1?ei(...c):ei("lucide",...a,...c),d=n.absoluteStrokeWidth?Number(n.strokeWidth??Pn["stroke-width"])*Number(e.size??e.width??Pn.width)/Number(n.size??n.width??Pn.width):n.strokeWidth??Pn["stroke-width"];return["svg",{...Object.entries(Pn).reduce((m,[v,y])=>(m[r(v)]=y,m),{}),..."color"in n&&n.color&&{[r("stroke")]:n.color},..."size"in n&&_s(n.size)&&{[r("width")]:n.size,[r("height")]:n.size},..."width"in n&&_s(n.width)&&{[r("width")]:n.width},..."height"in n&&_s(n.height)&&{[r("height")]:n.height},[r("stroke-width")]:d,...u&&{[r("class")]:u},[r("viewBox")]:`0 0 ${o} ${s}`,...n.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in n&&n.attributes},e.node.map(m=>{const[v,y,b]=m,_=n.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...y}:y;return b?[v,_,b]:[v,_]})]}/**
38
- * @license lucide-react v1.48.0 - ISC
39
- *
40
- * This source code is licensed under the ISC license.
41
- * See the LICENSE file in the root directory of this source tree.
42
- */function jm(e,n={}){return Nm(e,{...n,attributeNames:{...n.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
43
- * @license lucide-react v1.48.0 - ISC
44
- *
45
- * This source code is licensed under the ISC license.
46
- * See the LICENSE file in the root directory of this source tree.
47
- */const Mm=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},$m=h.createContext({}),zm=()=>h.useContext($m),Fm=h.forwardRef(({color:e,size:n,width:t,height:r,strokeWidth:o,absoluteStrokeWidth:s,nonScalingStroke:i,className:a="",children:c,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...l},f)=>{const{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:v=!1,nonScalingStroke:y=!1,color:b="currentColor",className:_=""}=zm()??{},x=!!c||Mm(l),[E,C,O=[]]=jm(d,{color:e??b,width:t??n??p,height:r??n??p,strokeWidth:o??m,absoluteStrokeWidth:s??v,nonScalingStroke:i??y,className:ei(_,a),hasA11yProp:x,attributes:l});return h.createElement(E,{ref:f,...C},[...O.map(([T,A])=>h.createElement(T,A)),...Array.isArray(c)?c:[c]])});/**
48
- * @license lucide-react v1.48.0 - ISC
49
- *
50
- * This source code is licensed under the ISC license.
51
- * See the LICENSE file in the root directory of this source tree.
52
- */function mt(e,n=[],t=[]){const r=typeof e=="string"?Im(e,n,t):e,o=h.forwardRef(({className:s,...i},a)=>h.createElement(Fm,{ref:a,icon:r,className:s,...i}));return r.name&&(o.displayName=Dm(r.name)),o}/**
53
- * @license lucide-react v1.48.0 - ISC
54
- *
55
- * This source code is licensed under the ISC license.
56
- * See the LICENSE file in the root directory of this source tree.
57
- */const nu={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};nu.node;const Lm=mt(nu);/**
58
- * @license lucide-react v1.48.0 - ISC
59
- *
60
- * This source code is licensed under the ISC license.
61
- * See the LICENSE file in the root directory of this source tree.
62
- */const ru={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};ru.node;const Vm=mt(ru);/**
63
- * @license lucide-react v1.48.0 - ISC
64
- *
65
- * This source code is licensed under the ISC license.
66
- * See the LICENSE file in the root directory of this source tree.
67
- */const ou={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};ou.node;const Um=mt(ou);/**
68
- * @license lucide-react v1.48.0 - ISC
69
- *
70
- * This source code is licensed under the ISC license.
71
- * See the LICENSE file in the root directory of this source tree.
72
- */const su={name:"circle",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]};su.node;const Zm=mt(su);/**
73
- * @license lucide-react v1.48.0 - ISC
74
- *
75
- * This source code is licensed under the ISC license.
76
- * See the LICENSE file in the root directory of this source tree.
77
- */const iu={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};iu.node;const Bm=mt(iu);/**
78
- * @license lucide-react v1.48.0 - ISC
79
- *
80
- * This source code is licensed under the ISC license.
81
- * See the LICENSE file in the root directory of this source tree.
82
- */const au={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};au.node;const Km=mt(au);/**
83
- * @license lucide-react v1.48.0 - ISC
84
- *
85
- * This source code is licensed under the ISC license.
86
- * See the LICENSE file in the root directory of this source tree.
87
- */const cu={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};cu.node;const Wm=mt(cu);/**
88
- * @license lucide-react v1.48.0 - ISC
89
- *
90
- * This source code is licensed under the ISC license.
91
- * See the LICENSE file in the root directory of this source tree.
92
- */const lu={name:"monitor",size:24,node:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]};lu.node;const Hm=mt(lu);/**
93
- * @license lucide-react v1.48.0 - ISC
94
- *
95
- * This source code is licensed under the ISC license.
96
- * See the LICENSE file in the root directory of this source tree.
97
- */const uu={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};uu.node;const Gm=mt(uu);/**
98
- * @license lucide-react v1.48.0 - ISC
99
- *
100
- * This source code is licensed under the ISC license.
101
- * See the LICENSE file in the root directory of this source tree.
102
- */const du={name:"panel-left",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],aliases:["sidebar"]};du.node;const qm=mt(du);/**
103
- * @license lucide-react v1.48.0 - ISC
104
- *
105
- * This source code is licensed under the ISC license.
106
- * See the LICENSE file in the root directory of this source tree.
107
- */const fu={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};fu.node;const hu=mt(fu);/**
108
- * @license lucide-react v1.48.0 - ISC
109
- *
110
- * This source code is licensed under the ISC license.
111
- * See the LICENSE file in the root directory of this source tree.
112
- */const pu={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};pu.node;const Qm=mt(pu);/**
113
- * @license lucide-react v1.48.0 - ISC
114
- *
115
- * This source code is licensed under the ISC license.
116
- * See the LICENSE file in the root directory of this source tree.
117
- */const mu={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};mu.node;const Jm=mt(mu);/**
118
- * @license lucide-react v1.48.0 - ISC
119
- *
120
- * This source code is licensed under the ISC license.
121
- * See the LICENSE file in the root directory of this source tree.
122
- */const gu={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};gu.node;const Ym=mt(gu),Xm=768,vu=`(max-width: ${Xm-1}px)`;function eg(e){const n=window.matchMedia(vu);return n.addEventListener("change",e),()=>n.removeEventListener("change",e)}function tg(){return h.useSyncExternalStore(eg,rg,ng)}function ng(){return!1}function rg(){return window.matchMedia(vu).matches}const Gi="-",og=e=>{const n=ig(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Gi);return a[0]===""&&a.length!==1&&a.shift(),yu(a,n)||sg(i)},getConflictingClassGroupIds:(i,a)=>{const c=t[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},yu=(e,n)=>{var i;if(e.length===0)return n.classGroupId;const t=e[0],r=n.nextPart.get(t),o=r?yu(e.slice(1),r):void 0;if(o)return o;if(n.validators.length===0)return;const s=e.join(Gi);return(i=n.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},ac=/^\[(.+)\]$/,sg=e=>{if(ac.test(e)){const n=ac.exec(e)[1],t=n==null?void 0:n.substring(0,n.indexOf(":"));if(t)return"arbitrary.."+t}},ig=e=>{const{theme:n,prefix:t}=e,r={nextPart:new Map,validators:[]};return cg(Object.entries(e.classGroups),t).forEach(([s,i])=>{ti(i,r,s,n)}),r},ti=(e,n,t,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?n:cc(n,o);s.classGroupId=t;return}if(typeof o=="function"){if(ag(o)){ti(o(r),n,t,r);return}n.validators.push({validator:o,classGroupId:t});return}Object.entries(o).forEach(([s,i])=>{ti(i,cc(n,s),t,r)})})},cc=(e,n)=>{let t=e;return n.split(Gi).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},ag=e=>e.isThemeGetter,cg=(e,n)=>n?e.map(([t,r])=>{const o=r.map(s=>typeof s=="string"?n+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[n+i,a])):s);return[t,o]}):e,lg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=new Map,r=new Map;const o=(s,i)=>{t.set(s,i),n++,n>e&&(n=0,r=t,t=new Map)};return{get(s){let i=t.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){t.has(s)?t.set(s,i):o(s,i)}}},bu="!",ug=e=>{const{separator:n,experimentalParseClassName:t}=e,r=n.length===1,o=n[0],s=n.length,i=a=>{const c=[];let u=0,d=0,l;for(let y=0;y<a.length;y++){let b=a[y];if(u===0){if(b===o&&(r||a.slice(y,y+s)===n)){c.push(a.slice(d,y)),d=y+s;continue}if(b==="/"){l=y;continue}}b==="["?u++:b==="]"&&u--}const f=c.length===0?a:a.substring(d),p=f.startsWith(bu),m=p?f.substring(1):f,v=l&&l>d?l-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}};return t?a=>t({className:a,parseClassName:i}):i},dg=e=>{if(e.length<=1)return e;const n=[];let t=[];return e.forEach(r=>{r[0]==="["?(n.push(...t.sort(),r),t=[]):t.push(r)}),n.push(...t.sort()),n},fg=e=>({cache:lg(e.cacheSize),parseClassName:ug(e),...og(e)}),hg=/\s+/,pg=(e,n)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:o}=n,s=[],i=e.trim().split(hg);let a="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:d,hasImportantModifier:l,baseClassName:f,maybePostfixModifierPosition:p}=t(u);let m=!!p,v=r(m?f.substring(0,p):f);if(!v){if(!m){a=u+(a.length>0?" "+a:a);continue}if(v=r(f),!v){a=u+(a.length>0?" "+a:a);continue}m=!1}const y=dg(d).join(":"),b=l?y+bu:y,_=b+v;if(s.includes(_))continue;s.push(_);const x=o(v,m);for(let E=0;E<x.length;++E){const C=x[E];s.push(b+C)}a=u+(a.length>0?" "+a:a)}return a};function mg(){let e=0,n,t,r="";for(;e<arguments.length;)(n=arguments[e++])&&(t=wu(n))&&(r&&(r+=" "),r+=t);return r}const wu=e=>{if(typeof e=="string")return e;let n,t="";for(let r=0;r<e.length;r++)e[r]&&(n=wu(e[r]))&&(t&&(t+=" "),t+=n);return t};function gg(e,...n){let t,r,o,s=i;function i(c){const u=n.reduce((d,l)=>l(d),e());return t=fg(u),r=t.cache.get,o=t.cache.set,s=a,a(c)}function a(c){const u=r(c);if(u)return u;const d=pg(c,t);return o(c,d),d}return function(){return s(mg.apply(null,arguments))}}const Pe=e=>{const n=t=>t[e]||[];return n.isThemeGetter=!0,n},_u=/^\[(?:([a-z-]+):)?(.+)\]$/i,vg=/^\d+\/\d+$/,yg=new Set(["px","full","screen"]),bg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,wg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,_g=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,xg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wt=e=>er(e)||yg.has(e)||vg.test(e),cn=e=>xr(e,"length",Ig),er=e=>!!e&&!Number.isNaN(Number(e)),xs=e=>xr(e,"number",er),Ar=e=>!!e&&Number.isInteger(Number(e)),Eg=e=>e.endsWith("%")&&er(e.slice(0,-1)),ae=e=>_u.test(e),ln=e=>bg.test(e),Cg=new Set(["length","size","percentage"]),kg=e=>xr(e,Cg,xu),Pg=e=>xr(e,"position",xu),Og=new Set(["image","url"]),Rg=e=>xr(e,Og,Dg),Tg=e=>xr(e,"",Ag),Dr=()=>!0,xr=(e,n,t)=>{const r=_u.exec(e);return r?r[1]?typeof n=="string"?r[1]===n:n.has(r[1]):t(r[2]):!1},Ig=e=>wg.test(e)&&!_g.test(e),xu=()=>!1,Ag=e=>xg.test(e),Dg=e=>Sg.test(e),Ng=()=>{const e=Pe("colors"),n=Pe("spacing"),t=Pe("blur"),r=Pe("brightness"),o=Pe("borderColor"),s=Pe("borderRadius"),i=Pe("borderSpacing"),a=Pe("borderWidth"),c=Pe("contrast"),u=Pe("grayscale"),d=Pe("hueRotate"),l=Pe("invert"),f=Pe("gap"),p=Pe("gradientColorStops"),m=Pe("gradientColorStopPositions"),v=Pe("inset"),y=Pe("margin"),b=Pe("opacity"),_=Pe("padding"),x=Pe("saturate"),E=Pe("scale"),C=Pe("sepia"),O=Pe("skew"),T=Pe("space"),A=Pe("translate"),R=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",ae,n],$=()=>[ae,n],G=()=>["",Wt,cn],Z=()=>["auto",er,ae],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>["start","end","center","between","around","evenly","stretch"],ee=()=>["","0",ae],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[er,ae];return{cacheSize:500,separator:":",theme:{colors:[Dr],spacing:[Wt,cn],blur:["none","",ln,ae],brightness:oe(),borderColor:[e],borderRadius:["none","","full",ln,ae],borderSpacing:$(),borderWidth:G(),contrast:oe(),grayscale:ee(),hueRotate:oe(),invert:ee(),gap:$(),gradientColorStops:[e],gradientColorStopPositions:[Eg,cn],inset:L(),margin:L(),opacity:oe(),padding:$(),saturate:oe(),scale:oe(),sepia:ee(),skew:oe(),space:$(),translate:$()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[ln]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...q(),ae]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ar,ae]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:ee()}],shrink:[{shrink:ee()}],order:[{order:["first","last","none",Ar,ae]}],"grid-cols":[{"grid-cols":[Dr]}],"col-start-end":[{col:["auto",{span:["full",Ar,ae]},ae]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Dr]}],"row-start-end":[{row:["auto",{span:[Ar,ae]},ae]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...ue()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ue(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ue(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[T]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[T]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,n]}],"min-w":[{"min-w":[ae,n,"min","max","fit"]}],"max-w":[{"max-w":[ae,n,"none","full","min","max","fit","prose",{screen:[ln]},ln]}],h:[{h:[ae,n,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,n,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,n,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,n,"auto","min","max","fit"]}],"font-size":[{text:["base",ln,cn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xs]}],"font-family":[{font:[Dr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",er,xs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wt,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wt,cn]}],"underline-offset":[{"underline-offset":["auto",Wt,ae]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),Pg]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",kg]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Rg]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[b]}],"divide-style":[{divide:B()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Wt,ae]}],"outline-w":[{outline:[Wt,cn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[Wt,cn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ln,Tg]}],"shadow-color":[{shadow:[Dr]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...J(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":J()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ln,ae]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[l]}],saturate:[{saturate:[x]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[l]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[Ar,ae]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Wt,cn,xs]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},jg=gg(Ng);function ne(...e){return jg(tu(e))}const Mg=ro("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8","icon-sm":"h-9 w-9",icon:"h-10 w-10",pill:"h-12 px-6 rounded-pill",nav:"h-7 px-3 text-xs"}},defaultVariants:{variant:"default",size:"default"}}),ts=h.forwardRef((e,n)=>{const t=Y.c(15);let r,o,s,i,a;t[0]!==e?({className:r,variant:a,size:s,asChild:i,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i,t[5]=a):(r=t[1],o=t[2],s=t[3],i=t[4],a=t[5]);const u=(i===void 0?!1:i)?_r:"button";let d;t[6]!==r||t[7]!==s||t[8]!==a?(d=ne(Mg({variant:a,size:s,className:r})),t[6]=r,t[7]=s,t[8]=a,t[9]=d):d=t[9];let l;return t[10]!==u||t[11]!==o||t[12]!==n||t[13]!==d?(l=g.jsx(u,{className:d,ref:n,...o}),t[10]=u,t[11]=o,t[12]=n,t[13]=d,t[14]=l):l=t[14],l});ts.displayName="Button";const Zo=h.forwardRef((e,n)=>{const t=Y.c(11);let r,o,s;t[0]!==e?({className:r,type:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);let i;t[4]!==r?(i=ne("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),t[4]=r,t[5]=i):i=t[5];let a;return t[6]!==o||t[7]!==n||t[8]!==i||t[9]!==s?(a=g.jsx("input",{type:s,className:i,ref:n,...o}),t[6]=o,t[7]=n,t[8]=i,t[9]=s,t[10]=a):a=t[10],a});Zo.displayName="Input";var $g=Object.defineProperty,zg=(e,n)=>$g(e,"name",{value:n,configurable:!0}),Fg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$e=Fg.reduce((e,n)=>{const t=Yt(`Primitive.${n}`),r=h.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?t:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${n}`,{...e,[n]:r}},{});function qi(e,n){e&&Al.flushSync(()=>e.dispatchEvent(n))}zg(qi,"dispatchDiscreteCustomEvent");var Lg=Object.defineProperty,Su=(e,n)=>Lg(e,"name",{value:n,configurable:!0}),lc="horizontal",Vg=["horizontal","vertical"],Ug=h.forwardRef(Su(function(n,t){const{decorative:r,orientation:o=lc,...s}=n,i=Eu(o)?o:lc,c=r?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return g.jsx($e.div,{"data-orientation":i,...c,...s,ref:t})},"Separator"));function Eu(e){return Vg.includes(e)}Su(Eu,"isValidOrientation");var Cu=Ug;const Bo=h.forwardRef((e,n)=>{const t=Y.c(14);let r,o,s,i;t[0]!==e?({className:r,orientation:s,decorative:i,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i):(r=t[1],o=t[2],s=t[3],i=t[4]);const a=s===void 0?"horizontal":s,c=i===void 0?!0:i,u=a==="horizontal"?"h-[1px] w-full":"h-full w-[1px]";let d;t[5]!==r||t[6]!==u?(d=ne("shrink-0 bg-border",u,r),t[5]=r,t[6]=u,t[7]=d):d=t[7];let l;return t[8]!==c||t[9]!==a||t[10]!==o||t[11]!==n||t[12]!==d?(l=g.jsx(Cu,{ref:n,decorative:c,orientation:a,className:d,...o}),t[8]=c,t[9]=a,t[10]=o,t[11]=n,t[12]=d,t[13]=l):l=t[13],l});Bo.displayName=Cu.displayName;var Zg=Object.defineProperty,Sr=(e,n)=>Zg(e,"name",{value:n,configurable:!0}),ku=!!(typeof window<"u"&&window.document&&window.document.createElement);function se(e,n,{checkForDefaultPrevented:t=!0}={}){return Sr(function(o){if(e==null||e(o),t===!1||!o||!o.defaultPrevented)return n==null?void 0:n(o)},"handleEvent")}Sr(se,"composeEventHandlers");function Bg(e){var n;if(!ku)throw new Error("Cannot access window outside of the DOM");return((n=e==null?void 0:e.ownerDocument)==null?void 0:n.defaultView)??window}Sr(Bg,"getOwnerWindow");function ni(e){if(!ku)throw new Error("Cannot access document outside of the DOM");return(e==null?void 0:e.ownerDocument)??document}Sr(ni,"getOwnerDocument");function Pu(e,n=!1){const{activeElement:t}=ni(e);if(!(t!=null&&t.nodeName))return null;if(Ou(t)&&t.contentDocument)return Pu(t.contentDocument.body,n);if(n){const r=t.getAttribute("aria-activedescendant");if(r){const o=ni(t).getElementById(r);if(o)return o}}return t}Sr(Pu,"getActiveElement");function Ou(e){return e.tagName==="IFRAME"}Sr(Ou,"isFrame");var Kg=Object.defineProperty,St=(e,n)=>Kg(e,"name",{value:n,configurable:!0});function Wg(e,n){const t=h.createContext(n);t.displayName=e+"Context";const r=St(s=>{const{children:i,...a}=s,c=h.useMemo(()=>a,Object.values(a));return g.jsx(t.Provider,{value:c,children:i})},"Provider");r.displayName=e+"Provider";function o(s,i={}){const{optional:a=!1}=i,c=h.useContext(t);if(c)return c;if(n!==void 0)return n;if(!a)throw new Error(`\`${s}\` must be used within \`${e}\``)}return St(o,"useContext"),[r,o]}St(Wg,"createContext");function nn(e,n=[]){let t=[];function r(s,i){const a=h.createContext(i);a.displayName=s+"Context";const c=t.length;t=[...t,i];const u=St(l=>{var b;const{scope:f,children:p,...m}=l,v=((b=f==null?void 0:f[e])==null?void 0:b[c])||a,y=h.useMemo(()=>m,Object.values(m));return g.jsx(v.Provider,{value:y,children:p})},"Provider");u.displayName=s+"Provider";function d(l,f,p={}){var b;const{optional:m=!1}=p,v=((b=f==null?void 0:f[e])==null?void 0:b[c])||a,y=h.useContext(v);if(y)return y;if(i!==void 0)return i;if(!m)throw new Error(`\`${l}\` must be used within \`${s}\``)}return St(d,"useContext"),[u,d]}St(r,"createContext");const o=St(()=>{const s=t.map(i=>h.createContext(i));return St(function(a){const c=(a==null?void 0:a[e])||s;return h.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])},"useScope")},"createScope");return o.scopeName=e,[r,Ru(o,...n)]}St(nn,"createContextScope");function Ru(...e){const n=e[0];if(e.length===1)return n;const t=St(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return St(function(s){const i=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(s)[`__scope${u}`];return{...a,...l}},{});return h.useMemo(()=>({[`__scope${n.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return t.scopeName=n.scopeName,t}St(Ru,"composeContextScopes");var pt=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},Hg=Object.defineProperty,Gg=(e,n)=>Hg(e,"name",{value:n,configurable:!0}),qg=wr[" useId ".trim().toString()]||(()=>{}),Qg=0;function xn(e){const[n,t]=h.useState(qg());return pt(()=>{e||t(r=>r??String(Qg++))},[e]),e||(n?`radix-${n}`:"")}Gg(xn,"useId");var Jg=Object.defineProperty,Yg=(e,n)=>Jg(e,"name",{value:n,configurable:!0}),uc=wr[" useEffectEvent ".trim().toString()],dc=wr[" useInsertionEffect ".trim().toString()];function Tu(e){if(typeof uc=="function")return uc(e);const n=h.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof dc=="function"?dc(()=>{n.current=e}):pt(()=>{n.current=e}),h.useMemo(()=>((...t)=>{var r;return(r=n.current)==null?void 0:r.call(n,...t)}),[])}Yg(Tu,"useEffectEvent");var Xg=Object.defineProperty,oo=(e,n)=>Xg(e,"name",{value:n,configurable:!0}),ev=wr[" useInsertionEffect ".trim().toString()]||pt;function so({prop:e,defaultProp:n,onChange:t=oo(()=>{},"onChange"),caller:r}){const[o,s,i]=Iu({defaultProp:n,onChange:t}),a=e!==void 0,c=a?e:o,u=h.useCallback(d=>{var l;if(a){const f=Au(d)?d(e):d;f!==e&&((l=i.current)==null||l.call(i,f))}else s(d)},[a,e,s,i]);return[c,u]}oo(so,"useControllableState");function Iu({defaultProp:e,onChange:n}){const[t,r]=h.useState(e),o=h.useRef(t),s=h.useRef(n);return ev(()=>{s.current=n},[n]),h.useEffect(()=>{var i;o.current!==t&&((i=s.current)==null||i.call(s,t),o.current=t)},[t,o]),[t,r,s]}oo(Iu,"useUncontrolledState");function Au(e){return typeof e=="function"}oo(Au,"isFunction");var fc=Symbol("RADIX:SYNC_STATE");function tv(e,n,t,r){const{prop:o,defaultProp:s,onChange:i,caller:a}=n,c=o!==void 0,u=Tu(i),d=[{...t,state:s}];r&&d.push(r);const[l,f]=h.useReducer((y,b)=>{if(b.type===fc)return{...y,state:b.state};const _=e(y,b);return c&&!Object.is(_.state,y.state)&&u(_.state),_},...d),p=l.state,m=h.useRef(p);h.useEffect(()=>{m.current!==p&&(m.current=p,c||u(p))},[p,m,c]);const v=h.useMemo(()=>o!==void 0?{...l,state:o}:l,[l,o]);return h.useEffect(()=>{c&&!Object.is(o,l.state)&&f({type:fc,state:o})},[o,l.state,c]),[v,f]}oo(tv,"useControllableStateReducer");var nv=Object.defineProperty,rv=(e,n)=>nv(e,"name",{value:n,configurable:!0});function Xt(e){const n=h.useRef(e);return h.useEffect(()=>{n.current=e}),h.useMemo(()=>((...t)=>{var r;return(r=n.current)==null?void 0:r.call(n,...t)}),[])}rv(Xt,"useCallbackRef");var ov=Object.defineProperty,We=(e,n)=>ov(e,"name",{value:n,configurable:!0}),ri="dismissableLayer.update",sv="dismissableLayer.pointerDownOutside",iv="dismissableLayer.focusOutside",hc,Du=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Qi=h.forwardRef(We(function(n,t){const{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:c,onDismiss:u,...d}=n,l=h.useContext(Du),[f,p]=h.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=h.useState({}),y=Re(t,p),b=Array.from(l.layers),[_]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),x=_?b.indexOf(_):-1,E=f?b.indexOf(f):-1,C=l.layersWithOutsidePointerEventsDisabled.size>0,O=E>=x,T=h.useRef(!1),A=ju($=>{i==null||i($),c==null||c($),$.defaultPrevented||u==null||u()},{ownerDocument:m,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:l.dismissableSurfaces,shouldHandlePointerDownOutside:h.useCallback($=>{if(!($ instanceof Node))return!1;const G=[...l.branches].some(Z=>Z.contains($));return O&&!G},[l.branches,O])}),R=Mu($=>{if(o&&T.current)return;const G=$.target;[...l.branches].some(q=>q.contains(G))||(a==null||a($),c==null||c($),$.defaultPrevented||u==null||u())},m),z=f?E===b.length-1:!1,L=Xt($=>{$.key==="Escape"&&(s==null||s($),!$.defaultPrevented&&u&&($.preventDefault(),u()))});return h.useEffect(()=>{if(z)return m.addEventListener("keydown",L,{capture:!0}),()=>m.removeEventListener("keydown",L,{capture:!0})},[m,z,L]),h.useEffect(()=>{if(f)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(hc=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),oi(),()=>{r&&(l.layersWithOutsidePointerEventsDisabled.delete(f),l.layersWithOutsidePointerEventsDisabled.size===0&&(m.body.style.pointerEvents=hc))}},[f,m,r,l]),h.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),oi())},[f,l]),h.useEffect(()=>{const $=We(()=>v({}),"handleUpdate");return document.addEventListener(ri,$),()=>document.removeEventListener(ri,$)},[]),g.jsx($e.div,{...d,ref:y,style:{pointerEvents:C?O?"auto":"none":void 0,...n.style},onFocusCapture:se(n.onFocusCapture,R.onFocusCapture),onBlurCapture:se(n.onBlurCapture,R.onBlurCapture),onPointerDownCapture:se(n.onPointerDownCapture,A.onPointerDownCapture)})},"DismissableLayer"));function Nu(){const e=h.useContext(Du),[n,t]=h.useState(null);return h.useEffect(()=>{if(n)return e.dismissableSurfaces.add(n),()=>{e.dismissableSurfaces.delete(n)}},[n,e.dismissableSurfaces]),t}We(Nu,"useDismissableLayerSurface");var av=We(()=>!0,"IS_TRUE");function ju(e,n){const{ownerDocument:t=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:s,shouldHandlePointerDownOutside:i=av}=n,a=Xt(e),c=h.useRef(!1),u=h.useRef(!1),d=h.useRef(new Map),l=h.useRef(()=>{});return h.useEffect(()=>{function f(){u.current=!1,o.current=!1,d.current.clear()}We(f,"resetOutsideInteraction");function p(){return Array.from(d.current.values()).some(Boolean)}We(p,"isOutsideInteractionIntercepted");function m(x){if(!u.current)return;const E=x.target;E instanceof Node&&[...s].some(O=>O.contains(E))||d.current.set(x.type,!0),x.type==="click"&&window.setTimeout(()=>{u.current&&l.current()},0)}We(m,"handleInteractionCapture");function v(x){u.current&&d.current.set(x.type,!1)}We(v,"handleInteractionBubble");const y=We(x=>{if(x.target&&!c.current){let E=function(){t.removeEventListener("click",l.current);const O=p();f(),O||Ji(sv,a,C,{discrete:!0})};if(We(E,"handleAndDispatchPointerDownOutsideEvent"),!i(x.target)){t.removeEventListener("click",l.current),f(),c.current=!1;return}const C={originalEvent:x};u.current=!0,o.current=r&&x.button===0,d.current.clear(),!r||x.button!==0?E():(t.removeEventListener("click",l.current),l.current=E,t.addEventListener("click",l.current,{once:!0}))}else t.removeEventListener("click",l.current),f();c.current=!1},"handlePointerDown"),b=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const x of b)t.addEventListener(x,m,!0),t.addEventListener(x,v);const _=window.setTimeout(()=>{t.addEventListener("pointerdown",y)},0);return()=>{window.clearTimeout(_),t.removeEventListener("pointerdown",y),t.removeEventListener("click",l.current);for(const x of b)t.removeEventListener(x,m,!0),t.removeEventListener(x,v)}},[t,a,r,o,s,i]),{onPointerDownCapture:We(()=>c.current=!0,"onPointerDownCapture")}}We(ju,"usePointerDownOutside");function Mu(e,n=globalThis==null?void 0:globalThis.document){const t=Xt(e),r=h.useRef(!1);return h.useEffect(()=>{const o=We(s=>{s.target&&!r.current&&Ji(iv,t,{originalEvent:s},{discrete:!1})},"handleFocus");return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,t]),{onFocusCapture:We(()=>r.current=!0,"onFocusCapture"),onBlurCapture:We(()=>r.current=!1,"onBlurCapture")}}We(Mu,"useFocusOutside");function oi(){const e=new CustomEvent(ri);document.dispatchEvent(e)}We(oi,"dispatchUpdate");function Ji(e,n,t,{discrete:r}){const o=t.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:t});n&&o.addEventListener(e,n,{once:!0}),r?qi(o,s):o.dispatchEvent(s)}We(Ji,"handleAndDispatchCustomEvent");var cv=Object.defineProperty,ct=(e,n)=>cv(e,"name",{value:n,configurable:!0}),Ss="focusScope.autoFocusOnMount",Es="focusScope.autoFocusOnUnmount",pc={bubbles:!1,cancelable:!0},$u=h.forwardRef(ct(function(n,t){const{loop:r=!1,trapped:o=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=n,[c,u]=h.useState(null),d=Xt(s),l=Xt(i),f=h.useRef(null),p=Re(t,u),m=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(o){let y=function(E){if(m.paused||!c)return;const C=E.target;c.contains(C)?f.current=C:Gt(f.current,{select:!0})},b=function(E){if(m.paused||!c)return;const C=E.relatedTarget;C!==null&&(c.contains(C)||Gt(f.current,{select:!0}))},_=function(E){if(document.activeElement===document.body)for(const O of E)O.removedNodes.length>0&&Gt(c)};ct(y,"handleFocusIn"),ct(b,"handleFocusOut"),ct(_,"handleMutations"),document.addEventListener("focusin",y),document.addEventListener("focusout",b);const x=new MutationObserver(_);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),x.disconnect()}}},[o,c,m.paused]),h.useEffect(()=>{if(c){mc.add(m);const y=document.activeElement;if(!c.contains(y)){const _=new CustomEvent(Ss,pc);c.addEventListener(Ss,d),c.dispatchEvent(_),_.defaultPrevented||(zu(Zu(Yi(c)),{select:!0}),document.activeElement===y&&Gt(c))}return()=>{c.removeEventListener(Ss,d),setTimeout(()=>{const _=new CustomEvent(Es,pc);c.addEventListener(Es,l),c.dispatchEvent(_),_.defaultPrevented||Gt(y??document.body,{select:!0}),c.removeEventListener(Es,l),mc.remove(m)},0)}}},[c,d,l,m]);const v=h.useCallback(y=>{if(!r&&!o||m.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,_=document.activeElement;if(b&&_){const x=y.currentTarget,[E,C]=Fu(x);E&&C?!y.shiftKey&&_===C?(y.preventDefault(),r&&Gt(E,{select:!0})):y.shiftKey&&_===E&&(y.preventDefault(),r&&Gt(C,{select:!0})):_===x&&y.preventDefault()}},[r,o,m.paused]);return g.jsx($e.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})},"FocusScope"));function zu(e,{select:n=!1}={}){const t=document.activeElement;for(const r of e)if(Gt(r,{select:n}),document.activeElement!==t)return}ct(zu,"focusFirst");function Fu(e){const n=Yi(e),t=si(n,e),r=si(n.reverse(),e);return[t,r]}ct(Fu,"getTabbableEdges");function Yi(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:ct(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;t.nextNode();)n.push(t.currentNode);return n}ct(Yi,"getTabbableCandidates");function si(e,n){const t=typeof n.checkVisibility=="function"&&n.checkVisibility({checkVisibilityCSS:!0});for(const r of e)if(!(t?!r.checkVisibility({checkVisibilityCSS:!0}):Lu(r,{upTo:n})))return r}ct(si,"findVisible");function Lu(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}ct(Lu,"isHidden");function Vu(e){return e instanceof HTMLInputElement&&"select"in e}ct(Vu,"isSelectableInput");function Gt(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Vu(e)&&n&&e.select()}}ct(Gt,"focus");var mc=Uu();function Uu(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=ii(e,n),e.unshift(n)},remove(n){var t;e=ii(e,n),(t=e[0])==null||t.resume()}}}ct(Uu,"createFocusScopesStack");function ii(e,n){const t=[...e],r=t.indexOf(n);return r!==-1&&t.splice(r,1),t}ct(ii,"arrayRemove");function Zu(e){return e.filter(n=>n.tagName!=="A")}ct(Zu,"removeLinks");var lv=Object.defineProperty,uv=(e,n)=>lv(e,"name",{value:n,configurable:!0}),Xi=h.forwardRef(uv(function(n,t){var c;const{container:r,...o}=n,[s,i]=h.useState(!1);pt(()=>i(!0),[]);const a=r||s&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return a?Al.createPortal(g.jsx($e.div,{...o,ref:t}),a):null},"Portal")),dv=Object.defineProperty,en=(e,n)=>dv(e,"name",{value:n,configurable:!0});function Bu(e,n){return h.useReducer((t,r)=>n[t][r]??t,e)}en(Bu,"useStateMachine");var rn=en(e=>{const{present:n,children:t}=e,r=Ku(n),o=typeof t=="function"?t({present:r.isPresent}):h.Children.only(t),s=Wu(r.ref,Hu(o));return typeof t=="function"||r.isPresent?h.cloneElement(o,{ref:s}):null},"Presence");function Ku(e){const[n,t]=h.useState(),r=h.useRef(null),o=h.useRef(e),s=h.useRef("none"),i=h.useRef(void 0),a=e?"mounted":"unmounted",[c,u]=Bu(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{c==="mounted"?(s.current=i.current??Xn(r.current),i.current=void 0):s.current="none"},[c]),pt(()=>{const d=r.current,l=o.current;if(l!==e){const p=s.current,m=Xn(d);e?(i.current=m,u("MOUNT")):m==="none"||(d==null?void 0:d.display)==="none"?u("UNMOUNT"):u(l&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,u]),pt(()=>{if(n){let d;const l=n.ownerDocument.defaultView??window,f=en(m=>{const y=Xn(r.current).includes(CSS.escape(m.animationName));if(m.target===n&&y&&(u("ANIMATION_END"),!o.current)){const b=n.style.animationFillMode;n.style.animationFillMode="forwards",d=l.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=b)})}},"handleAnimationEnd"),p=en(m=>{m.target===n&&(s.current=Xn(r.current))},"handleAnimationStart");return n.addEventListener("animationstart",p),n.addEventListener("animationcancel",f),n.addEventListener("animationend",f),()=>{l.clearTimeout(d),n.removeEventListener("animationstart",p),n.removeEventListener("animationcancel",f),n.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[n,u]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:h.useCallback(d=>{if(d){const l=getComputedStyle(d);r.current=l,i.current=Xn(l)}else r.current=null;t(d)},[])}}en(Ku,"usePresence");function ai(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}en(ai,"setRef");function Wu(...e){const n=h.useRef(e);return n.current=e,h.useCallback(t=>{const r=n.current;let o=!1;const s=r.map(i=>{const a=ai(i,t);return!o&&typeof a=="function"&&(o=!0),a});if(o)return()=>{for(let i=0;i<s.length;i++){const a=s[i];typeof a=="function"?a():ai(r[i],null)}}},[])}en(Wu,"useStableComposedRefs");function Xn(e){return(e==null?void 0:e.animationName)||"none"}en(Xn,"getAnimationName");function Hu(e){var r,o;let n=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}en(Hu,"getElementRef");var fv=Object.defineProperty,ea=(e,n)=>fv(e,"name",{value:n,configurable:!0}),bo=0,Mt=null;function hv(e){return ns(),e.children}ea(hv,"FocusGuards");function ns(){h.useEffect(()=>{Mt||(Mt={start:ci(),end:ci()});const{start:e,end:n}=Mt;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==n&&document.body.insertAdjacentElement("beforeend",n),bo++,()=>{bo===1&&(Mt==null||Mt.start.remove(),Mt==null||Mt.end.remove(),Mt=null),bo=Math.max(0,bo-1)}},[])}ea(ns,"useFocusGuards");function ci(){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}ea(ci,"createFocusGuard");var Lt=function(){return Lt=Object.assign||function(n){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(n[s]=t[s])}return n},Lt.apply(this,arguments)};function Gu(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]]);return t}function pv(e,n,t){if(t||arguments.length===2)for(var r=0,o=n.length,s;r<o;r++)(s||!(r in n))&&(s||(s=Array.prototype.slice.call(n,0,r)),s[r]=n[r]);return e.concat(s||Array.prototype.slice.call(n))}var Do="right-scroll-bar-position",No="width-before-scroll-bar",mv="with-scroll-bars-hidden",gv="--removed-body-scroll-bar-size";function Cs(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function vv(e,n){var t=h.useState(function(){return{value:e,callback:n,facade:{get current(){return t.value},set current(r){var o=t.value;o!==r&&(t.value=r,t.callback(r,o))}}}})[0];return t.callback=n,t.facade}var yv=typeof window<"u"?h.useLayoutEffect:h.useEffect,gc=new WeakMap;function bv(e,n){var t=vv(null,function(r){return e.forEach(function(o){return Cs(o,r)})});return yv(function(){var r=gc.get(t);if(r){var o=new Set(r),s=new Set(e),i=t.current;o.forEach(function(a){s.has(a)||Cs(a,null)}),s.forEach(function(a){o.has(a)||Cs(a,i)})}gc.set(t,e)},[e]),t}function wv(e){return e}function _v(e,n){n===void 0&&(n=wv);var t=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(s){var i=n(s,r);return t.push(i),function(){t=t.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;t.length;){var i=t;t=[],i.forEach(s)}t={push:function(a){return s(a)},filter:function(){return t}}},assignMedium:function(s){r=!0;var i=[];if(t.length){var a=t;t=[],a.forEach(s),i=t}var c=function(){var d=i;i=[],d.forEach(s)},u=function(){return Promise.resolve().then(c)};u(),t={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),t}}}};return o}function xv(e){e===void 0&&(e={});var n=_v(null);return n.options=Lt({async:!0,ssr:!1},e),n}var qu=function(e){var n=e.sideCar,t=Gu(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return h.createElement(r,Lt({},t))};qu.isSideCarExport=!0;function Sv(e,n){return e.useMedium(n),qu}var Qu=xv(),ks=function(){},rs=h.forwardRef(function(e,n){var t=h.useRef(null),r=h.useState({onScrollCapture:ks,onWheelCapture:ks,onTouchMoveCapture:ks}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,l=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,v=e.inert,y=e.allowPinchZoom,b=e.as,_=b===void 0?"div":b,x=e.gapMode,E=Gu(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,O=bv([t,n]),T=Lt(Lt({},E),o);return h.createElement(h.Fragment,null,d&&h.createElement(C,{sideCar:Qu,removeScrollBar:u,shards:l,noRelative:p,noIsolation:m,inert:v,setCallbacks:s,allowPinchZoom:!!y,lockRef:t,gapMode:x}),i?h.cloneElement(h.Children.only(a),Lt(Lt({},T),{ref:O})):h.createElement(_,Lt({},T,{className:c,ref:O}),a))});rs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};rs.classNames={fullWidth:No,zeroRight:Do};var Ev=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Cv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=Ev();return n&&e.setAttribute("nonce",n),e}function kv(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function Pv(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var Ov=function(){var e=0,n=null;return{add:function(t){e==0&&(n=Cv())&&(kv(n,t),Pv(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Rv=function(){var e=Ov();return function(n,t){h.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&t])}},Ju=function(){var e=Rv(),n=function(t){var r=t.styles,o=t.dynamic;return e(r,o),null};return n},Tv={left:0,top:0,right:0,gap:0},Ps=function(e){return parseInt(e||"",10)||0},Iv=function(e){var n=window.getComputedStyle(document.body),t=n[e==="padding"?"paddingLeft":"marginLeft"],r=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[Ps(t),Ps(r),Ps(o)]},Av=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Tv;var n=Iv(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},Dv=Ju(),tr="data-scroll-locked",Nv=function(e,n,t,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return t===void 0&&(t="margin"),`
123
- .`.concat(mv,` {
124
- overflow: hidden `).concat(r,`;
125
- padding-right: `).concat(a,"px ").concat(r,`;
126
- }
127
- body[`).concat(tr,`] {
128
- overflow: hidden `).concat(r,`;
129
- overscroll-behavior: contain;
130
- `).concat([n&&"position: relative ".concat(r,";"),t==="margin"&&`
131
- padding-left: `.concat(o,`px;
132
- padding-top: `).concat(s,`px;
133
- padding-right: `).concat(i,`px;
134
- margin-left:0;
135
- margin-top:0;
136
- margin-right: `).concat(a,"px ").concat(r,`;
137
- `),t==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
138
- }
139
-
140
- .`).concat(Do,` {
141
- right: `).concat(a,"px ").concat(r,`;
142
- }
143
-
144
- .`).concat(No,` {
145
- margin-right: `).concat(a,"px ").concat(r,`;
146
- }
147
-
148
- .`).concat(Do," .").concat(Do,` {
149
- right: 0 `).concat(r,`;
150
- }
151
-
152
- .`).concat(No," .").concat(No,` {
153
- margin-right: 0 `).concat(r,`;
154
- }
155
-
156
- body[`).concat(tr,`] {
157
- `).concat(gv,": ").concat(a,`px;
158
- }
159
- `)},vc=function(){var e=parseInt(document.body.getAttribute(tr)||"0",10);return isFinite(e)?e:0},jv=function(){h.useEffect(function(){return document.body.setAttribute(tr,(vc()+1).toString()),function(){var e=vc()-1;e<=0?document.body.removeAttribute(tr):document.body.setAttribute(tr,e.toString())}},[])},Mv=function(e){var n=e.noRelative,t=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;jv();var s=h.useMemo(function(){return Av(o)},[o]);return h.createElement(Dv,{styles:Nv(s,!n,o,t?"":"!important")})},li=!1;if(typeof window<"u")try{var wo=Object.defineProperty({},"passive",{get:function(){return li=!0,!0}});window.addEventListener("test",wo,wo),window.removeEventListener("test",wo,wo)}catch{li=!1}var qn=li?{passive:!1}:!1,$v=function(e){return e.tagName==="TEXTAREA"},Yu=function(e,n){if(!(e instanceof Element))return!1;var t=window.getComputedStyle(e);return t[n]!=="hidden"&&!(t.overflowY===t.overflowX&&!$v(e)&&t[n]==="visible")},zv=function(e){return Yu(e,"overflowY")},Fv=function(e){return Yu(e,"overflowX")},yc=function(e,n){var t=n.ownerDocument,r=n;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Xu(e,r);if(o){var s=ed(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==t.body);return!1},Lv=function(e){var n=e.scrollTop,t=e.scrollHeight,r=e.clientHeight;return[n,t,r]},Vv=function(e){var n=e.scrollLeft,t=e.scrollWidth,r=e.clientWidth;return[n,t,r]},Xu=function(e,n){return e==="v"?zv(n):Fv(n)},ed=function(e,n){return e==="v"?Lv(n):Vv(n)},Uv=function(e,n){return e==="h"&&n==="rtl"?-1:1},Zv=function(e,n,t,r,o){var s=Uv(e,window.getComputedStyle(n).direction),i=s*r,a=t.target,c=n.contains(a),u=!1,d=i>0,l=0,f=0;do{if(!a)break;var p=ed(e,a),m=p[0],v=p[1],y=p[2],b=v-y-s*m;(m||b)&&Xu(e,a)&&(l+=b,f+=m);var _=a.parentNode;a=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!c&&a!==document.body||c&&(n.contains(a)||n===a));return(d&&Math.abs(l)<1||!d&&Math.abs(f)<1)&&(u=!0),u},_o=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},bc=function(e){return[e.deltaX,e.deltaY]},wc=function(e){return e&&"current"in e?e.current:e},Bv=function(e,n){return e[0]===n[0]&&e[1]===n[1]},Kv=function(e){return`
160
- .block-interactivity-`.concat(e,` {pointer-events: none;}
161
- .allow-interactivity-`).concat(e,` {pointer-events: all;}
162
- `)},Wv=0,Qn=[];function Hv(e){var n=h.useRef([]),t=h.useRef([0,0]),r=h.useRef(),o=h.useState(Wv++)[0],s=h.useState(Ju)[0],i=h.useRef(e);h.useEffect(function(){i.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=pv([e.lockRef.current],(e.shards||[]).map(wc),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=h.useCallback(function(v,y){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!i.current.allowPinchZoom;var b=_o(v),_=t.current,x="deltaX"in v?v.deltaX:_[0]-b[0],E="deltaY"in v?v.deltaY:_[1]-b[1],C,O=v.target,T=Math.abs(x)>Math.abs(E)?"h":"v";if("touches"in v&&T==="h"&&O.type==="range")return!1;var A=window.getSelection(),R=A&&A.anchorNode,z=R?R===O||R.contains(O):!1;if(z)return!1;var L=yc(T,O);if(!L)return!0;if(L?C=T:(C=T==="v"?"h":"v",L=yc(T,O)),!L)return!1;if(!r.current&&"changedTouches"in v&&(x||E)&&(r.current=C),!C)return!0;var $=r.current||C;return Zv($,y,v,$==="h"?x:E)},[]),c=h.useCallback(function(v){var y=v;if(!(!Qn.length||Qn[Qn.length-1]!==s)){var b="deltaY"in y?bc(y):_o(y),_=n.current.filter(function(C){return C.name===y.type&&(C.target===y.target||y.target===C.shadowParent)&&Bv(C.delta,b)})[0];if(_&&_.should){y.cancelable&&y.preventDefault();return}if(!_){var x=(i.current.shards||[]).map(wc).filter(Boolean).filter(function(C){return C.contains(y.target)}),E=x.length>0?a(y,x[0]):!i.current.noIsolation;E&&y.cancelable&&y.preventDefault()}}},[]),u=h.useCallback(function(v,y,b,_){var x={name:v,delta:y,target:b,should:_,shadowParent:Gv(b)};n.current.push(x),setTimeout(function(){n.current=n.current.filter(function(E){return E!==x})},1)},[]),d=h.useCallback(function(v){t.current=_o(v),r.current=void 0},[]),l=h.useCallback(function(v){u(v.type,bc(v),v.target,a(v,e.lockRef.current))},[]),f=h.useCallback(function(v){u(v.type,_o(v),v.target,a(v,e.lockRef.current))},[]);h.useEffect(function(){return Qn.push(s),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:f}),document.addEventListener("wheel",c,qn),document.addEventListener("touchmove",c,qn),document.addEventListener("touchstart",d,qn),function(){Qn=Qn.filter(function(v){return v!==s}),document.removeEventListener("wheel",c,qn),document.removeEventListener("touchmove",c,qn),document.removeEventListener("touchstart",d,qn)}},[]);var p=e.removeScrollBar,m=e.inert;return h.createElement(h.Fragment,null,m?h.createElement(s,{styles:Kv(o)}):null,p?h.createElement(Mv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Gv(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const qv=Sv(Qu,Hv);var ta=h.forwardRef(function(e,n){return h.createElement(rs,Lt({},e,{ref:n,sideCar:qv}))});ta.classNames=rs.classNames;var Qv=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},Jn=new WeakMap,xo=new WeakMap,So={},Os=0,td=function(e){return e&&(e.host||td(e.parentNode))},Jv=function(e,n){return n.map(function(t){if(e.contains(t))return t;var r=td(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Yv=function(e,n,t,r){var o=Jv(n,Array.isArray(e)?e:[e]);So[t]||(So[t]=new WeakMap);var s=So[t],i=[],a=new Set,c=new Set(o),u=function(l){!l||a.has(l)||(a.add(l),u(l.parentNode))};o.forEach(u);var d=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(f){if(a.has(f))d(f);else try{var p=f.getAttribute(r),m=p!==null&&p!=="false",v=(Jn.get(f)||0)+1,y=(s.get(f)||0)+1;Jn.set(f,v),s.set(f,y),i.push(f),v===1&&m&&xo.set(f,!0),y===1&&f.setAttribute(t,"true"),m||f.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return d(n),a.clear(),Os++,function(){i.forEach(function(l){var f=Jn.get(l)-1,p=s.get(l)-1;Jn.set(l,f),s.set(l,p),f||(xo.has(l)||l.removeAttribute(r),xo.delete(l)),p||l.removeAttribute(t)}),Os--,Os||(Jn=new WeakMap,Jn=new WeakMap,xo=new WeakMap,So={})}},nd=function(e,n,t){t===void 0&&(t="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Qv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Yv(r,o,t,"aria-hidden")):function(){return null}},Xv=Object.defineProperty,_t=(e,n)=>Xv(e,"name",{value:n,configurable:!0}),na="Dialog",[rd,WC]=nn(na),[ey,Dt]=rd(na),ty=_t(e=>{const{__scopeDialog:n,children:t,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=h.useRef(null),c=h.useRef(null),[u,d]=so({prop:r,defaultProp:o??!1,onChange:s,caller:na}),[l,f]=h.useState(0),[p,m]=h.useState(0);return g.jsx(ey,{scope:n,triggerRef:a,contentRef:c,contentId:xn(),titleId:xn(),descriptionId:xn(),titlePresent:l>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:u,onOpenChange:d,onOpenToggle:h.useCallback(()=>d(v=>!v),[d]),modal:i,children:t})},"Dialog"),ny="DialogTrigger",HC=h.forwardRef(_t(function(n,t){const{__scopeDialog:r,...o}=n,s=Dt(ny,r),i=Re(t,s.triggerRef);return g.jsx($e.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":os(s.open),...o,ref:i,onClick:se(n.onClick,s.onOpenToggle)})},"DialogTrigger")),od="DialogPortal",[ry,sd]=rd(od,{forceMount:void 0}),oy=_t(e=>{const{__scopeDialog:n,forceMount:t,children:r,container:o}=e,s=Dt(od,n);return g.jsx(ry,{scope:n,forceMount:t,children:h.Children.map(r,i=>g.jsx(rn,{present:t||s.open,children:g.jsx(Xi,{asChild:!0,container:o,children:i})}))})},"DialogPortal"),ui="DialogOverlay",id=h.forwardRef(_t(function(n,t){const r=sd(ui,n.__scopeDialog),{forceMount:o=r.forceMount,...s}=n,i=Dt(ui,n.__scopeDialog);return i.modal?g.jsx(rn,{present:o||i.open,children:g.jsx(iy,{...s,ref:t})}):null},"DialogOverlay")),sy=Yt("DialogOverlay.RemoveScroll"),iy=h.forwardRef(_t(function(n,t){const{__scopeDialog:r,...o}=n,s=Dt(ui,r),i=Nu(),a=Re(t,i);return g.jsx(ta,{as:sy,allowPinchZoom:!0,shards:[s.contentRef],children:g.jsx($e.div,{"data-state":os(s.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Kr="DialogContent",ad=h.forwardRef(_t(function(n,t){const r=sd(Kr,n.__scopeDialog),{forceMount:o=r.forceMount,...s}=n,i=Dt(Kr,n.__scopeDialog);return g.jsx(rn,{present:o||i.open,children:i.modal?g.jsx(ay,{...s,ref:t}):g.jsx(cy,{...s,ref:t})})},"DialogContent")),ay=h.forwardRef(_t(function(n,t){const r=Dt(Kr,n.__scopeDialog),o=h.useRef(null),s=Re(t,r.contentRef,o);return h.useEffect(()=>{const i=o.current;if(i)return nd(i)},[]),g.jsx(cd,{...n,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:se(n.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:se(n.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&i.preventDefault()}),onFocusOutside:se(n.onFocusOutside,i=>i.preventDefault())})},"DialogContentModal")),cy=h.forwardRef(_t(function(n,t){const r=Dt(Kr,n.__scopeDialog),o=h.useRef(!1),s=h.useRef(!1);return g.jsx(cd,{...n,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,c;(a=n.onCloseAutoFocus)==null||a.call(n,i),i.defaultPrevented||(o.current||(c=r.triggerRef.current)==null||c.focus(),i.preventDefault()),o.current=!1,s.current=!1},onInteractOutside:i=>{var u,d;(u=n.onInteractOutside)==null||u.call(n,i),i.defaultPrevented||(o.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((d=r.triggerRef.current)==null?void 0:d.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})},"DialogContentNonModal")),cd=h.forwardRef(_t(function(n,t){const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=n,c=Dt(Kr,r);return ns(),g.jsx(g.Fragment,{children:g.jsx($u,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:s,onUnmountAutoFocus:i,children:g.jsx(Qi,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionPresent?c.descriptionId:void 0,"aria-labelledby":c.titlePresent?c.titleId:void 0,"data-state":os(c.open),...a,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})},"DialogContentImpl")),ly="DialogTitle",ld=h.forwardRef(_t(function(n,t){const{__scopeDialog:r,...o}=n,s=Dt(ly,r),{setTitleCount:i}=s;return pt(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),g.jsx($e.h2,{id:s.titleId,...o,ref:t})},"DialogTitle")),uy="DialogDescription",ud=h.forwardRef(_t(function(n,t){const{__scopeDialog:r,...o}=n,s=Dt(uy,r),{setDescriptionCount:i}=s;return pt(()=>(i(a=>a+1),()=>i(a=>a-1)),[i]),g.jsx($e.p,{id:s.descriptionId,...o,ref:t})},"DialogDescription")),dy="DialogClose",fy=h.forwardRef(_t(function(n,t){const{__scopeDialog:r,...o}=n,s=Dt(dy,r);return g.jsx($e.button,{type:"button",...o,ref:t,onClick:se(n.onClick,()=>s.onOpenChange(!1))})},"DialogClose"));function os(e){return e?"open":"closed"}_t(os,"getState");const hy=ty,py=oy,dd=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(id,{className:s,...o,ref:n}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});dd.displayName=id.displayName;const my=ro("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),fd=h.forwardRef((e,n)=>{const t=Y.c(15);let r,o,s,i;t[0]!==e?({side:i,className:o,children:r,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i):(r=t[1],o=t[2],s=t[3],i=t[4]);const a=i===void 0?"right":i;let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=g.jsx(dd,{}),t[5]=c):c=t[5];let u;t[6]!==o||t[7]!==a?(u=ne(my({side:a}),o),t[6]=o,t[7]=a,t[8]=u):u=t[8];let d;t[9]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsxs(fy,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[g.jsx(Ym,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]}),t[9]=d):d=t[9];let l;return t[10]!==r||t[11]!==s||t[12]!==n||t[13]!==u?(l=g.jsxs(py,{children:[c,g.jsxs(ad,{ref:n,className:u,...s,children:[r,d]})]}),t[10]=r,t[11]=s,t[12]=n,t[13]=u,t[14]=l):l=t[14],l});fd.displayName=ad.displayName;const hd=e=>{const n=Y.c(8);let t,r;n[0]!==e?({className:t,...r}=e,n[0]=e,n[1]=t,n[2]=r):(t=n[1],r=n[2]);let o;n[3]!==t?(o=ne("flex flex-col space-y-2 text-center sm:text-left",t),n[3]=t,n[4]=o):o=n[4];let s;return n[5]!==r||n[6]!==o?(s=g.jsx("div",{className:o,...r}),n[5]=r,n[6]=o,n[7]=s):s=n[7],s};hd.displayName="SheetHeader";const pd=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("text-lg font-semibold text-foreground",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(ld,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});pd.displayName=ld.displayName;const md=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("text-sm text-muted-foreground",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(ud,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});md.displayName=ud.displayName;function _c(e){const n=Y.c(8);let t,r;n[0]!==e?({className:t,...r}=e,n[0]=e,n[1]=t,n[2]=r):(t=n[1],r=n[2]);let o;n[3]!==t?(o=ne("animate-pulse rounded-md bg-muted",t),n[3]=t,n[4]=o):o=n[4];let s;return n[5]!==r||n[6]!==o?(s=g.jsx("div",{className:o,...r}),n[5]=r,n[6]=o,n[7]=s):s=n[7],s}var gy=Object.defineProperty,vy=(e,n)=>gy(e,"name",{value:n,configurable:!0});function gd(e){const[n,t]=h.useState(void 0);return pt(()=>{if(e){t({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;t({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else t(void 0)},[e]),n}vy(gd,"useSize");var yy=Object.defineProperty,Sn=(e,n)=>yy(e,"name",{value:n,configurable:!0}),vd="Popper",[yd,ss]=nn(vd),[by,bd]=yd(vd),wy=Sn(e=>{const{__scopePopper:n,children:t}=e,[r,o]=h.useState(null),[s,i]=h.useState(void 0);return g.jsx(by,{scope:n,anchor:r,onAnchorChange:o,placementState:s,setPlacementState:i,children:t})},"Popper"),_y="PopperAnchor",xy=h.forwardRef(Sn(function(n,t){const{__scopePopper:r,virtualRef:o,...s}=n,i=bd(_y,r),a=h.useRef(null),c=i.onAnchorChange,u=h.useCallback(v=>{a.current=v,v&&c(v)},[c]),d=Re(t,u),l=h.useRef(null);h.useEffect(()=>{if(!o)return;const v=l.current;l.current=o.current,v!==l.current&&c(l.current)});const f=i.placementState&&is(i.placementState),p=f==null?void 0:f[0],m=f==null?void 0:f[1];return o?null:g.jsx($e.div,{"data-radix-popper-side":p,"data-radix-popper-align":m,...s,ref:d})},"PopperAnchor")),wd="PopperContent",[Sy,GC]=yd(wd),Ey=h.forwardRef(Sn(function(n,t){var pe,Se,rt,lt,Qe,ot,on;const{__scopePopper:r,side:o="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:l=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:v,...y}=n,b=bd(wd,r),[_,x]=h.useState(null),E=Re(t,x),[C,O]=h.useState(null),T=gd(C),A=(T==null?void 0:T.width)??0,R=(T==null?void 0:T.height)??0,z=o+(i!=="center"?"-"+i:""),L=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},$=Array.isArray(d)?d:[d],G=$.length>0,Z={padding:L,boundary:$.filter(_d),altBoundary:G},{refs:q,floatingStyles:B,placement:J,isPositioned:ue,middlewareData:ee}=Vh({strategy:"fixed",placement:z,whileElementsMounted:Sn((...sn)=>qh(...sn,{animationFrame:m==="always"}),"whileElementsMounted"),elements:{reference:b.anchor},middleware:[Uh({mainAxis:s+R,alignmentAxis:a}),u&&Zh({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Gh():void 0,...Z}),u&&Bh({...Z}),Kh({...Z,apply:Sn(({elements:sn,rects:Ot,availableWidth:an,availableHeight:tt})=>{const{width:Pr,height:Kn}=Ot.reference,Ne=sn.floating.style;Ne.setProperty("--radix-popper-available-width",`${an}px`),Ne.setProperty("--radix-popper-available-height",`${tt}px`),Ne.setProperty("--radix-popper-anchor-width",`${Pr}px`),Ne.setProperty("--radix-popper-anchor-height",`${Kn}px`)},"apply")}),C&&Wh({element:C,padding:c}),Cy({arrowWidth:A,arrowHeight:R}),p&&Hh({strategy:"referenceHidden",...Z,boundary:G?Z.boundary:void 0})]}),Q=b.setPlacementState;pt(()=>(Q(J),()=>{Q(void 0)}),[J,Q]);const[oe,fe]=is(J),_e=Xt(v);pt(()=>{ue&&(_e==null||_e())},[ue,_e]);const te=(pe=ee.arrow)==null?void 0:pe.x,ce=(Se=ee.arrow)==null?void 0:Se.y,he=((rt=ee.arrow)==null?void 0:rt.centerOffset)!==0,[be,ke]=h.useState();return pt(()=>{_&&ke(window.getComputedStyle(_).zIndex)},[_]),g.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:ue?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(lt=ee.transformOrigin)==null?void 0:lt.x,(Qe=ee.transformOrigin)==null?void 0:Qe.y].join(" "),...((ot=ee.hide)==null?void 0:ot.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:g.jsx(Sy,{scope:r,placedSide:oe,placedAlign:fe,onArrowChange:O,arrowX:te,arrowY:ce,shouldHideArrow:he,children:g.jsx($e.div,{"data-side":oe,"data-align":fe,...y,ref:E,style:{...y.style,animation:ue?(on=y.style)==null?void 0:on.animation:"none"}})})})},"PopperContent"));function _d(e){return e!==null}Sn(_d,"isNotNull");var Cy=Sn(e=>({name:"transformOrigin",options:e,fn(n){var y,b,_;const{placement:t,rects:r,middlewareData:o}=n,i=((y=o.arrow)==null?void 0:y.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=is(t),l={start:"0%",center:"50%",end:"100%"}[d],f=(((b=o.arrow)==null?void 0:b.x)??0)+a/2,p=(((_=o.arrow)==null?void 0:_.y)??0)+c/2;let m="",v="";return u==="bottom"?(m=i?l:`${f}px`,v=`${-c}px`):u==="top"?(m=i?l:`${f}px`,v=`${r.floating.height+c}px`):u==="right"?(m=`${-c}px`,v=i?l:`${p}px`):u==="left"&&(m=`${r.floating.width+c}px`,v=i?l:`${p}px`),{data:{x:m,y:v}}}}),"transformOrigin");function is(e){const[n,t="center"]=e.split("-");return[n,t]}Sn(is,"getSideAndAlignFromPlacement");var xd=wy,Sd=xy,Ed=Ey,ky=Object.defineProperty,Py=(e,n)=>ky(e,"name",{value:n,configurable:!0}),Oy=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ry=h.forwardRef(Py(function(n,t){return g.jsx($e.span,{...n,ref:t,style:{...Oy,...n.style}})},"VisuallyHidden")),Ty=Ry,Iy=Object.defineProperty,qe=(e,n)=>Iy(e,"name",{value:n,configurable:!0}),[ra,qC]=nn("Tooltip",[ss]),oa=ss(),Ay="TooltipProvider",Dy=700,di="tooltip.open",[Ny,sa]=ra(Ay),jy=qe(e=>{const{__scopeTooltip:n,delayDuration:t=Dy,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=h.useRef(!0),a=h.useRef(!1),c=h.useRef(0);return h.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),g.jsx(Ny,{scope:n,isOpenDelayedRef:i,delayDuration:t,onOpen:h.useCallback(()=>{r<=0||(window.clearTimeout(c.current),i.current=!1)},[r]),onClose:h.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r))},[r]),isPointerInTransitRef:a,onPointerInTransitChange:h.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:s})},"TooltipProvider"),fi="Tooltip",[My,io]=ra(fi),$y=qe(e=>{const{__scopeTooltip:n,children:t,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,c=sa(fi,e.__scopeTooltip),u=oa(n),[d,l]=h.useState(null),[f,p]=h.useState(void 0),m=xn(),v=h.useRef(0),y=i??c.disableHoverableContent,b=a??c.delayDuration,_=h.useRef(!1),[x,E]=so({prop:r,defaultProp:o??!1,onChange:qe(z=>{z?(c.onOpen(),document.dispatchEvent(new CustomEvent(di))):c.onClose(),s==null||s(z)},"onChange"),caller:fi}),C=h.useMemo(()=>x?_.current?"delayed-open":"instant-open":"closed",[x]),O=h.useCallback(()=>{window.clearTimeout(v.current),v.current=0,_.current=!1,E(!0)},[E]),T=h.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E(!1)},[E]),A=h.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{_.current=!0,E(!0),v.current=0},b)},[b,E]);h.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]);const R=f??m;return g.jsx(xd,{...u,children:g.jsx(My,{scope:n,contentId:R,setContentId:p,open:x,stateAttribute:C,trigger:d,onTriggerChange:l,onTriggerEnter:h.useCallback(()=>{c.isOpenDelayedRef.current?A():O()},[c.isOpenDelayedRef,A,O]),onTriggerLeave:h.useCallback(()=>{y?T():(window.clearTimeout(v.current),v.current=0)},[T,y]),onOpen:O,onClose:T,disableHoverableContent:y,children:t})})},"Tooltip"),xc="TooltipTrigger",zy=h.forwardRef(qe(function(n,t){const{__scopeTooltip:r,...o}=n,s=io(xc,r),i=sa(xc,r),a=oa(r),c=h.useRef(null),u=Re(t,c,s.onTriggerChange),d=h.useRef(!1),l=h.useRef(!1),f=h.useCallback(()=>d.current=!1,[]);return h.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),g.jsx(Sd,{asChild:!0,...a,children:g.jsx($e.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...o,ref:u,onPointerMove:se(n.onPointerMove,p=>{p.pointerType!=="touch"&&!l.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),l.current=!0)}),onPointerLeave:se(n.onPointerLeave,()=>{s.onTriggerLeave(),l.current=!1}),onPointerDown:se(n.onPointerDown,()=>{s.open&&s.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:se(n.onFocus,()=>{d.current||s.onOpen()}),onBlur:se(n.onBlur,s.onClose),onClick:se(n.onClick,s.onClose)})})},"TooltipTrigger")),Cd="TooltipPortal",[Fy,Ly]=ra(Cd,{forceMount:void 0}),Vy=qe(e=>{const{__scopeTooltip:n,forceMount:t,children:r,container:o}=e,s=io(Cd,n);return g.jsx(Fy,{scope:n,forceMount:t,children:g.jsx(rn,{present:t||s.open,children:g.jsx(Xi,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),Wr="TooltipContent",Uy=h.forwardRef(qe(function(n,t){const r=Ly(Wr,n.__scopeTooltip),{forceMount:o=r.forceMount,side:s="top",...i}=n,a=io(Wr,n.__scopeTooltip);return g.jsx(rn,{present:o||a.open,children:a.disableHoverableContent?g.jsx(kd,{side:s,...i,ref:t}):g.jsx(Zy,{side:s,...i,ref:t})})},"TooltipContent")),Zy=h.forwardRef(qe(function(n,t){const r=io(Wr,n.__scopeTooltip),o=sa(Wr,n.__scopeTooltip),s=h.useRef(null),i=Re(t,s),[a,c]=h.useState(null),{trigger:u,onClose:d}=r,l=s.current,{onPointerInTransitChange:f}=o,p=h.useCallback(()=>{c(null),f(!1)},[f]),m=h.useCallback((v,y)=>{const b=v.currentTarget,_={x:v.clientX,y:v.clientY},x=Pd(_,b.getBoundingClientRect()),E=Od(_,x),C=Rd(y.getBoundingClientRect()),O=Id([...E,...C]);c(O),f(!0)},[f]);return h.useEffect(()=>()=>p(),[p]),h.useEffect(()=>{if(u&&l){const v=qe(b=>m(b,l),"handleTriggerLeave"),y=qe(b=>m(b,u),"handleContentLeave");return u.addEventListener("pointerleave",v),l.addEventListener("pointerleave",y),()=>{u.removeEventListener("pointerleave",v),l.removeEventListener("pointerleave",y)}}},[u,l,m,p]),h.useEffect(()=>{if(a){const v=qe(y=>{const b=y.target,_={x:y.clientX,y:y.clientY},x=(u==null?void 0:u.contains(b))||(l==null?void 0:l.contains(b)),E=!Td(_,a);x?p():E&&(p(),d())},"handleTrackPointerGrace");return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[u,l,a,d,p]),g.jsx(kd,{...n,ref:i})},"TooltipContentHoverable")),By=ql("TooltipContent"),kd=h.forwardRef(qe(function(n,t){const{__scopeTooltip:r,children:o,"aria-label":s,id:i,onEscapeKeyDown:a,onPointerDownOutside:c,...u}=n,d=io(Wr,r),l=oa(r),{onClose:f}=d;h.useEffect(()=>(document.addEventListener(di,f),()=>document.removeEventListener(di,f)),[f]),h.useEffect(()=>{if(d.trigger){const m=qe(v=>{v.target instanceof Node&&v.target.contains(d.trigger)&&f()},"handleScroll");return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,f]);const{setContentId:p}=d;return pt(()=>(p(i),()=>{p(void 0)}),[i,p]),g.jsx(Qi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:g.jsxs(Ed,{"data-state":d.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:d.contentId,...l,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(By,{children:o}),s?g.jsx(Ty,{id:d.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl"));function Pd(e,n){const t=Math.abs(n.top-e.y),r=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(t,r,o,s)){case s:return"left";case o:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}qe(Pd,"getExitSideFromRect");function Od(e,n,t=5){const r=[];switch(n){case"top":r.push({x:e.x-t,y:e.y+t},{x:e.x+t,y:e.y+t});break;case"bottom":r.push({x:e.x-t,y:e.y-t},{x:e.x+t,y:e.y-t});break;case"left":r.push({x:e.x+t,y:e.y-t},{x:e.x+t,y:e.y+t});break;case"right":r.push({x:e.x-t,y:e.y-t},{x:e.x-t,y:e.y+t});break}return r}qe(Od,"getPaddedExitPoints");function Rd(e){const{top:n,right:t,bottom:r,left:o}=e;return[{x:o,y:n},{x:t,y:n},{x:t,y:r},{x:o,y:r}]}qe(Rd,"getPointsFromRect");function Td(e,n){const{x:t,y:r}=e;let o=!1;for(let s=0,i=n.length-1;s<n.length;i=s++){const a=n[s],c=n[i],u=a.x,d=a.y,l=c.x,f=c.y;d>r!=f>r&&t<(l-u)*(r-d)/(f-d)+u&&(o=!o)}return o}qe(Td,"isPointInPolygon");function Id(e){const n=e.slice();return n.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Ad(n)}qe(Id,"getHull");function Ad(e){if(e.length<=1)return e.slice();const n=[];for(let r=0;r<e.length;r++){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}n.pop();const t=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}return t.pop(),n.length===1&&t.length===1&&n[0].x===t[0].x&&n[0].y===t[0].y?n:n.concat(t)}qe(Ad,"getHullPresorted");var Ky=jy,Wy=$y,Hy=zy,Gy=Vy,Dd=Uy;const qy=Ky,Qy=Wy,Jy=Hy,Nd=h.forwardRef((e,n)=>{const t=Y.c(11);let r,o,s;t[0]!==e?({className:r,sideOffset:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const i=s===void 0?4:s;let a;t[4]!==r?(a=ne("z-[50] overflow-hidden rounded-lg bg-foreground/85 px-[7px] py-1.5 text-[11px] text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",r),t[4]=r,t[5]=a):a=t[5];let c;return t[6]!==o||t[7]!==n||t[8]!==i||t[9]!==a?(c=g.jsx(Gy,{children:g.jsx(Dd,{ref:n,sideOffset:i,"data-slot":"tooltip-content",className:a,...o})}),t[6]=o,t[7]=n,t[8]=i,t[9]=a,t[10]=c):c=t[10],c});Nd.displayName=Dd.displayName;const Yy="sidebar_state",Xy=3600*24*7,eb="16rem",tb="18rem",nb="3rem",rb="b",jd=h.createContext(null);function as(){const e=h.useContext(jd);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Md=h.forwardRef((e,n)=>{const t=Y.c(37);let r,o,s,i,a,c,u;t[0]!==e?({defaultOpen:u,open:s,onOpenChange:a,className:o,style:c,children:r,...i}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i,t[5]=a,t[6]=c,t[7]=u):(r=t[1],o=t[2],s=t[3],i=t[4],a=t[5],c=t[6],u=t[7]);const d=u===void 0?!0:u,l=tg(),[f,p]=h.useState(!1),[m,v]=h.useState(d),y=s??m;let b;t[8]!==y||t[9]!==a?(b=q=>{const B=typeof q=="function"?q(y):q;a?a(B):v(B),document.cookie=`${Yy}=${B}; path=/; max-age=${Xy}`},t[8]=y,t[9]=a,t[10]=b):b=t[10];const _=b;let x;t[11]!==l||t[12]!==_?(x=()=>l?p(mb):_(gb),t[11]=l,t[12]=_,t[13]=x):x=t[13];const E=x;let C,O;t[14]!==E?(C=()=>{const q=B=>{B.key===rb&&(B.metaKey||B.ctrlKey)&&(B.preventDefault(),E())};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},O=[E],t[14]=E,t[15]=C,t[16]=O):(C=t[15],O=t[16]),h.useEffect(C,O);const T=y?"expanded":"collapsed";let A;t[17]!==l||t[18]!==y||t[19]!==f||t[20]!==_||t[21]!==T||t[22]!==E?(A={state:T,open:y,setOpen:_,isMobile:l,openMobile:f,setOpenMobile:p,toggleSidebar:E},t[17]=l,t[18]=y,t[19]=f,t[20]=_,t[21]=T,t[22]=E,t[23]=A):A=t[23];const R=A;let z;t[24]!==c?(z={"--sidebar-width":eb,"--sidebar-width-icon":nb,...c},t[24]=c,t[25]=z):z=t[25];const L=z;let $;t[26]!==o?($=ne("group/sidebar-wrapper flex h-svh w-full has-[[data-variant=inset]]:bg-sidebar",o),t[26]=o,t[27]=$):$=t[27];let G;t[28]!==r||t[29]!==i||t[30]!==n||t[31]!==L||t[32]!==$?(G=g.jsx(qy,{delayDuration:0,children:g.jsx("div",{style:L,className:$,ref:n,...i,children:r})}),t[28]=r,t[29]=i,t[30]=n,t[31]=L,t[32]=$,t[33]=G):G=t[33];let Z;return t[34]!==R||t[35]!==G?(Z=g.jsx(jd.Provider,{value:R,children:G}),t[34]=R,t[35]=G,t[36]=Z):Z=t[36],Z});Md.displayName="SidebarProvider";const $d=h.forwardRef((e,n)=>{const t=Y.c(48);let r,o,s,i,a,c;t[0]!==e?({side:i,variant:a,collapsible:c,className:o,children:r,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i,t[5]=a,t[6]=c):(r=t[1],o=t[2],s=t[3],i=t[4],a=t[5],c=t[6]);const u=i===void 0?"left":i,d=a===void 0?"sidebar":a,l=c===void 0?"offcanvas":c,{isMobile:f,state:p,openMobile:m,setOpenMobile:v}=as();if(l==="none"){let z;t[7]!==o?(z=ne("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),t[7]=o,t[8]=z):z=t[8];let L;return t[9]!==r||t[10]!==s||t[11]!==n||t[12]!==z?(L=g.jsx("div",{className:z,ref:n,...s,children:r}),t[9]=r,t[10]=s,t[11]=n,t[12]=z,t[13]=L):L=t[13],L}if(f){let z;t[14]===Symbol.for("react.memo_cache_sentinel")?(z={"--sidebar-width":tb},t[14]=z):z=t[14];let L;t[15]===Symbol.for("react.memo_cache_sentinel")?(L=g.jsxs(hd,{className:"sr-only",children:[g.jsx(pd,{children:"Sidebar"}),g.jsx(md,{children:"Displays the mobile sidebar."})]}),t[15]=L):L=t[15];let $;t[16]!==r?($=g.jsx("div",{className:"flex h-full w-full flex-col",children:r}),t[16]=r,t[17]=$):$=t[17];let G;t[18]!==u||t[19]!==$?(G=g.jsxs(fd,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:z,side:u,children:[L,$]}),t[18]=u,t[19]=$,t[20]=G):G=t[20];let Z;return t[21]!==m||t[22]!==s||t[23]!==v||t[24]!==G?(Z=g.jsx(hy,{open:m,onOpenChange:v,...s,children:G}),t[21]=m,t[22]=s,t[23]=v,t[24]=G,t[25]=Z):Z=t[25],Z}const y=p==="collapsed"?l:"",b=d==="floating"||d==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]";let _;t[26]!==b?(_=ne("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",b),t[26]=b,t[27]=_):_=t[27];let x;t[28]!==_?(x=g.jsx("div",{className:_}),t[28]=_,t[29]=x):x=t[29];const E=u==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",C=d==="floating"||d==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l";let O;t[30]!==o||t[31]!==E||t[32]!==C?(O=ne("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",E,C,o),t[30]=o,t[31]=E,t[32]=C,t[33]=O):O=t[33];let T;t[34]!==r?(T=g.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r}),t[34]=r,t[35]=T):T=t[35];let A;t[36]!==s||t[37]!==O||t[38]!==T?(A=g.jsx("div",{className:O,...s,children:T}),t[36]=s,t[37]=O,t[38]=T,t[39]=A):A=t[39];let R;return t[40]!==n||t[41]!==u||t[42]!==p||t[43]!==A||t[44]!==y||t[45]!==x||t[46]!==d?(R=g.jsxs("div",{ref:n,className:"group peer hidden text-sidebar-foreground md:block","data-state":p,"data-collapsible":y,"data-variant":d,"data-side":u,children:[x,A]}),t[40]=n,t[41]=u,t[42]=p,t[43]=A,t[44]=y,t[45]=x,t[46]=d,t[47]=R):R=t[47],R});$d.displayName="Sidebar";const zd=h.forwardRef((e,n)=>{const t=Y.c(16);let r,o,s;t[0]!==e?({className:r,onClick:o,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const{toggleSidebar:i}=as();let a;t[4]!==r?(a=ne("h-7 w-7",r),t[4]=r,t[5]=a):a=t[5];let c;t[6]!==o||t[7]!==i?(c=f=>{o==null||o(f),i()},t[6]=o,t[7]=i,t[8]=c):c=t[8];let u,d;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(qm,{}),d=g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),t[9]=u,t[10]=d):(u=t[9],d=t[10]);let l;return t[11]!==s||t[12]!==n||t[13]!==a||t[14]!==c?(l=g.jsxs(ts,{ref:n,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:a,onClick:c,...s,children:[u,d]}),t[11]=s,t[12]=n,t[13]=a,t[14]=c,t[15]=l):l=t[15],l});zd.displayName="SidebarTrigger";const ob=h.forwardRef((e,n)=>{const t=Y.c(10);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);const{toggleSidebar:s}=as();let i;t[3]!==r?(i=ne("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",r),t[3]=r,t[4]=i):i=t[4];let a;return t[5]!==o||t[6]!==n||t[7]!==i||t[8]!==s?(a=g.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:i,...o}),t[5]=o,t[6]=n,t[7]=i,t[8]=s,t[9]=a):a=t[9],a});ob.displayName="SidebarRail";const Fd=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("main",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Fd.displayName="SidebarInset";const sb=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(Zo,{ref:n,"data-sidebar":"input",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});sb.displayName="SidebarInput";const Ld=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("flex flex-col gap-2 p-2",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"header",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Ld.displayName="SidebarHeader";const Vd=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("flex flex-col gap-2 p-2",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"footer",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Vd.displayName="SidebarFooter";const ib=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("mx-2 w-auto bg-sidebar-border",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(Bo,{ref:n,"data-sidebar":"separator",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});ib.displayName="SidebarSeparator";const Ud=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"content",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Ud.displayName="SidebarContent";const jo=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("relative flex w-full min-w-0 flex-col p-2",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"group",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});jo.displayName="SidebarGroup";const hi=h.forwardRef((e,n)=>{const t=Y.c(11);let r,o,s;t[0]!==e?({className:r,asChild:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const a=(s===void 0?!1:s)?_r:"div";let c;t[4]!==r?(c=ne("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",r),t[4]=r,t[5]=c):c=t[5];let u;return t[6]!==a||t[7]!==o||t[8]!==n||t[9]!==c?(u=g.jsx(a,{ref:n,"data-sidebar":"group-label",className:c,...o}),t[6]=a,t[7]=o,t[8]=n,t[9]=c,t[10]=u):u=t[10],u});hi.displayName="SidebarGroupLabel";const ab=h.forwardRef((e,n)=>{const t=Y.c(11);let r,o,s;t[0]!==e?({className:r,asChild:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const a=(s===void 0?!1:s)?_r:"button";let c;t[4]!==r?(c=ne("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",r),t[4]=r,t[5]=c):c=t[5];let u;return t[6]!==a||t[7]!==o||t[8]!==n||t[9]!==c?(u=g.jsx(a,{ref:n,"data-sidebar":"group-action",className:c,...o}),t[6]=a,t[7]=o,t[8]=n,t[9]=c,t[10]=u):u=t[10],u});ab.displayName="SidebarGroupAction";const Mo=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("w-full text-sm",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"group-content",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Mo.displayName="SidebarGroupContent";const $o=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("flex w-full min-w-0 flex-col gap-1",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("ul",{ref:n,"data-sidebar":"menu",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});$o.displayName="SidebarMenu";const Ko=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("group/menu-item relative",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("li",{ref:n,"data-sidebar":"menu-item",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Ko.displayName="SidebarMenuItem";const cb=ro("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Wo=h.forwardRef((e,n)=>{const t=Y.c(29);let r,o,s,i,a,c,u;t[0]!==e?({asChild:s,isActive:i,variant:a,size:c,tooltip:u,className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i,t[5]=a,t[6]=c,t[7]=u):(r=t[1],o=t[2],s=t[3],i=t[4],a=t[5],c=t[6],u=t[7]);const d=s===void 0?!1:s,l=i===void 0?!1:i,f=a===void 0?"default":a,p=c===void 0?"default":c,m=d?_r:"button",{isMobile:v,state:y}=as();let b;t[8]!==r||t[9]!==p||t[10]!==f?(b=ne(cb({variant:f,size:p}),r),t[8]=r,t[9]=p,t[10]=f,t[11]=b):b=t[11];let _;t[12]!==m||t[13]!==l||t[14]!==o||t[15]!==n||t[16]!==p||t[17]!==b?(_=g.jsx(m,{ref:n,"data-sidebar":"menu-button","data-size":p,"data-active":l,className:b,...o}),t[12]=m,t[13]=l,t[14]=o,t[15]=n,t[16]=p,t[17]=b,t[18]=_):_=t[18];const x=_;if(!u)return x;if(typeof u=="string"){let A;t[19]!==u?(A={children:u},t[19]=u,t[20]=A):A=t[20],u=A}let E;t[21]!==x?(E=g.jsx(Jy,{asChild:!0,children:x}),t[21]=x,t[22]=E):E=t[22];const C=y!=="collapsed"||v;let O;t[23]!==C||t[24]!==u?(O=g.jsx(Nd,{side:"right",align:"center",hidden:C,...u}),t[23]=C,t[24]=u,t[25]=O):O=t[25];let T;return t[26]!==E||t[27]!==O?(T=g.jsxs(Qy,{children:[E,O]}),t[26]=E,t[27]=O,t[28]=T):T=t[28],T});Wo.displayName="SidebarMenuButton";const lb=h.forwardRef((e,n)=>{const t=Y.c(13);let r,o,s,i;t[0]!==e?({className:r,asChild:s,showOnHover:i,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i):(r=t[1],o=t[2],s=t[3],i=t[4]);const a=s===void 0?!1:s,c=i===void 0?!1:i,u=a?_r:"button",d=c&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0";let l;t[5]!==r||t[6]!==d?(l=ne("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",d,r),t[5]=r,t[6]=d,t[7]=l):l=t[7];let f;return t[8]!==u||t[9]!==o||t[10]!==n||t[11]!==l?(f=g.jsx(u,{ref:n,"data-sidebar":"menu-action",className:l,...o}),t[8]=u,t[9]=o,t[10]=n,t[11]=l,t[12]=f):f=t[12],f});lb.displayName="SidebarMenuAction";const ub=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});ub.displayName="SidebarMenuBadge";const db=h.forwardRef((e,n)=>{const t=Y.c(15);let r,o,s;t[0]!==e?({className:r,showIcon:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const i=s===void 0?!1:s,a=`${Math.floor(Math.random()*40)+50}%`;let c;t[4]!==r?(c=ne("flex h-8 items-center gap-2 rounded-md px-2",r),t[4]=r,t[5]=c):c=t[5];let u;t[6]!==i?(u=i&&g.jsx(_c,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),t[6]=i,t[7]=u):u=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d={"--skeleton-width":a},t[8]=d):d=t[8];let l;t[9]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(_c,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:d}),t[9]=l):l=t[9];let f;return t[10]!==o||t[11]!==n||t[12]!==c||t[13]!==u?(f=g.jsxs("div",{ref:n,"data-sidebar":"menu-skeleton",className:c,...o,children:[u,l]}),t[10]=o,t[11]=n,t[12]=c,t[13]=u,t[14]=f):f=t[14],f});db.displayName="SidebarMenuSkeleton";const fb=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});fb.displayName="SidebarMenuSub";const hb=h.forwardRef((e,n)=>{const t=Y.c(5);let r;t[0]!==e?({...r}=e,t[0]=e,t[1]=r):r=t[1];let o;return t[2]!==r||t[3]!==n?(o=g.jsx("li",{ref:n,...r}),t[2]=r,t[3]=n,t[4]=o):o=t[4],o});hb.displayName="SidebarMenuSubItem";const pb=h.forwardRef((e,n)=>{const t=Y.c(17);let r,o,s,i,a;t[0]!==e?({asChild:i,size:a,isActive:o,className:r,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i,t[5]=a):(r=t[1],o=t[2],s=t[3],i=t[4],a=t[5]);const c=i===void 0?!1:i,u=a===void 0?"md":a,d=c?_r:"a",l=u==="sm"&&"text-xs",f=u==="md"&&"text-sm";let p;t[6]!==r||t[7]!==l||t[8]!==f?(p=ne("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",l,f,"group-data-[collapsible=icon]:hidden",r),t[6]=r,t[7]=l,t[8]=f,t[9]=p):p=t[9];let m;return t[10]!==d||t[11]!==o||t[12]!==s||t[13]!==n||t[14]!==u||t[15]!==p?(m=g.jsx(d,{ref:n,"data-sidebar":"menu-sub-button","data-size":u,"data-active":o,className:p,...s}),t[10]=d,t[11]=o,t[12]=s,t[13]=n,t[14]=u,t[15]=p,t[16]=m):m=t[16],m});pb.displayName="SidebarMenuSubButton";function mb(e){return!e}function gb(e){return!e}var vb=Object.defineProperty,Ge=(e,n)=>vb(e,"name",{value:n,configurable:!0});function ia(e){const n=e+"CollectionProvider",[t,r]=nn(n),[o,s]=t(n,{collectionRef:{current:null},itemMap:new Map}),i=Ge(v=>{const{scope:y,children:b}=v,_=h.useRef(null),x=h.useRef(new Map).current;return g.jsx(o,{scope:y,itemMap:x,collectionRef:_,children:b})},"CollectionProvider");i.displayName=n;const a=e+"CollectionSlot",c=Yt(a),u=h.forwardRef((v,y)=>{const{scope:b,children:_}=v,x=s(a,b),E=Re(y,x.collectionRef);return g.jsx(c,{ref:E,children:_})});u.displayName=a;const d=e+"CollectionItemSlot",l="data-radix-collection-item",f=Yt(d),p=h.forwardRef((v,y)=>{const{scope:b,children:_,...x}=v,E=h.useRef(null),C=Re(y,E),O=s(d,b);return h.useEffect(()=>(O.itemMap.set(E,{ref:E,...x}),()=>void O.itemMap.delete(E))),g.jsx(f,{[l]:"",ref:C,children:_})});p.displayName=d;function m(v){const y=s(e+"CollectionConsumer",v);return h.useCallback(()=>{const _=y.collectionRef.current;if(!_)return[];const x=Array.from(_.querySelectorAll(`[${l}]`));return Array.from(y.itemMap.values()).sort((O,T)=>x.indexOf(O.ref.current)-x.indexOf(T.ref.current))},[y.collectionRef,y.itemMap])}return Ge(m,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},m,r]}Ge(ia,"createCollection");var Sc=new WeakMap,Fe,bt,Rs=(bt=class extends Map{constructor(t){super(t);X(this,Fe);H(this,Fe,[...super.keys()]),Sc.set(this,!0)}set(t,r){return Sc.get(this)&&(this.has(t)?S(this,Fe)[S(this,Fe).indexOf(t)]=t:S(this,Fe).push(t)),super.set(t,r),this}insert(t,r,o){const s=this.has(r),i=S(this,Fe).length,a=aa(t);let c=a>=0?a:i+a;const u=c<0||c>=i?-1:c;if(u===this.size||s&&u===this.size-1||u===-1)return this.set(r,o),this;const d=this.size+(s?0:1);a<0&&c++;const l=[...S(this,Fe)];let f,p=!1;for(let m=c;m<d;m++)if(c===m){let v=l[m];l[m]===r&&(v=l[m+1]),s&&this.delete(r),f=this.get(v),this.set(r,o)}else{!p&&l[m-1]===r&&(p=!0);const v=l[p?m:m-1],y=f;f=this.get(v),this.delete(v),this.set(v,y)}return this}with(t,r,o){const s=new bt(this);return s.insert(t,r,o),s}before(t){const r=S(this,Fe).indexOf(t)-1;if(!(r<0))return this.entryAt(r)}setBefore(t,r,o){const s=S(this,Fe).indexOf(t);return s===-1?this:this.insert(s,r,o)}after(t){let r=S(this,Fe).indexOf(t);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(t,r,o){const s=S(this,Fe).indexOf(t);return s===-1?this:this.insert(s+1,r,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return H(this,Fe,[]),super.clear()}delete(t){const r=super.delete(t);return r&&S(this,Fe).splice(S(this,Fe).indexOf(t),1),r}deleteAt(t){const r=this.keyAt(t);return r!==void 0?this.delete(r):!1}at(t){const r=zo(S(this,Fe),t);if(r!==void 0)return this.get(r)}entryAt(t){const r=zo(S(this,Fe),t);if(r!==void 0)return[r,this.get(r)]}indexOf(t){return S(this,Fe).indexOf(t)}keyAt(t){return zo(S(this,Fe),t)}from(t,r){const o=this.indexOf(t);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(t,r){const o=this.indexOf(t);if(o===-1)return;let s=o+r;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(t,r){let o=0;for(const s of this){if(Reflect.apply(t,r,[s,o,this]))return s;o++}}findIndex(t,r){let o=0;for(const s of this){if(Reflect.apply(t,r,[s,o,this]))return o;o++}return-1}filter(t,r){const o=[];let s=0;for(const i of this)Reflect.apply(t,r,[i,s,this])&&o.push(i),s++;return new bt(o)}map(t,r){const o=[];let s=0;for(const i of this)o.push([i[0],Reflect.apply(t,r,[i,s,this])]),s++;return new bt(o)}reduce(...t){const[r,o]=t;let s=0,i=o??this.at(0);for(const a of this)s===0&&t.length===1?i=a:i=Reflect.apply(r,this,[i,a,s,this]),s++;return i}reduceRight(...t){const[r,o]=t;let s=o??this.at(-1);for(let i=this.size-1;i>=0;i--){const a=this.at(i);i===this.size-1&&t.length===1?s=a:s=Reflect.apply(r,this,[s,a,i,this])}return s}toSorted(t){const r=[...this.entries()].sort(t);return new bt(r)}toReversed(){const t=new bt;for(let r=this.size-1;r>=0;r--){const o=this.keyAt(r),s=this.get(o);t.set(o,s)}return t}toSpliced(...t){const r=[...this.entries()];return r.splice(...t),new bt(r)}slice(t,r){const o=new bt;let s=this.size-1;if(t===void 0)return o;t<0&&(t=t+this.size),r!==void 0&&r>0&&(s=r-1);for(let i=t;i<=s;i++){const a=this.keyAt(i),c=this.get(a);o.set(a,c)}return o}every(t,r){let o=0;for(const s of this){if(!Reflect.apply(t,r,[s,o,this]))return!1;o++}return!0}some(t,r){let o=0;for(const s of this){if(Reflect.apply(t,r,[s,o,this]))return!0;o++}return!1}},Fe=new WeakMap,Ge(bt,"OrderedDict"),bt);function zo(e,n){if("at"in Array.prototype)return Array.prototype.at.call(e,n);const t=Zd(e,n);return t===-1?void 0:e[t]}Ge(zo,"at");function Zd(e,n){const t=e.length,r=aa(n),o=r>=0?r:t+r;return o<0||o>=t?-1:o}Ge(Zd,"toSafeIndex");function aa(e){return e!==e||e===0?0:Math.trunc(e)}Ge(aa,"toSafeInteger");function yb(e){const n=e+"CollectionProvider",[t,r]=nn(n),[o,s]=t(n,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Rs,setItemMap:Ge(()=>{},"setItemMap")}),i=Ge(({state:x,...E})=>x?g.jsx(c,{...E,state:x}):g.jsx(a,{...E}),"CollectionProvider");i.displayName=n;const a=Ge(x=>{const E=y();return g.jsx(c,{...x,state:E})},"CollectionInit");a.displayName=n+"Init";const c=Ge(x=>{const{scope:E,children:C,state:O}=x,T=h.useRef(null),[A,R]=h.useState(null),z=Re(T,R),[L,$]=O;return h.useEffect(()=>{if(!A)return;const G=Wd(()=>{});return G.observe(A,{childList:!0,subtree:!0}),()=>{G.disconnect()}},[A]),g.jsx(o,{scope:E,itemMap:L,setItemMap:$,collectionRef:z,collectionRefObject:T,collectionElement:A,children:C})},"CollectionProviderImpl");c.displayName=n+"Impl";const u=e+"CollectionSlot",d=Yt(u),l=h.forwardRef((x,E)=>{const{scope:C,children:O}=x,T=s(u,C),A=Re(E,T.collectionRef);return g.jsx(d,{ref:A,children:O})});l.displayName=u;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=Yt(f),v=h.forwardRef((x,E)=>{const{scope:C,children:O,...T}=x,A=h.useRef(null),[R,z]=h.useState(null),L=Re(E,A,z),$=s(f,C),{setItemMap:G}=$,Z=h.useRef(T);Bd(Z.current,T)||(Z.current=T);const q=Z.current;return h.useEffect(()=>{const B=q;return G(J=>R?J.has(R)?J.set(R,{...B,element:R}).toSorted(pi):(J.set(R,{...B,element:R}),J.toSorted(pi)):J),()=>{G(J=>!R||!J.has(R)?J:(J.delete(R),new Rs(J)))}},[R,q,G]),g.jsx(m,{[p]:"",ref:L,children:O})});v.displayName=f;function y(){return h.useState(new Rs)}Ge(y,"useInitCollection");function b(x){const{itemMap:E}=s(e+"CollectionConsumer",x);return E}return Ge(b,"useCollection"),[{Provider:i,Slot:l,ItemSlot:v},{createCollectionScope:r,useCollection:b,useInitCollection:y}]}Ge(yb,"createCollection");function Bd(e,n){if(e===n)return!0;if(typeof e!="object"||typeof n!="object"||e==null||n==null)return!1;const t=Object.keys(e),r=Object.keys(n);if(t.length!==r.length)return!1;for(const o of t)if(!Object.prototype.hasOwnProperty.call(n,o)||e[o]!==n[o])return!1;return!0}Ge(Bd,"shallowEqual");function Kd(e,n){return!!(n.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ge(Kd,"isElementPreceding");function pi(e,n){return!e[1].element||!n[1].element?0:Kd(e[1].element,n[1].element)?-1:1}Ge(pi,"sortByDocumentPosition");function Wd(e){return new MutationObserver(t=>{for(const r of t)if(r.type==="childList"){e();return}})}Ge(Wd,"getChildListObserver");var bb=Object.defineProperty,wb=(e,n)=>bb(e,"name",{value:n,configurable:!0}),_b=h.createContext(void 0);function ca(e){const n=h.useContext(_b);return e||n||"ltr"}wb(ca,"useDirection");var xb=Object.defineProperty,la=(e,n)=>xb(e,"name",{value:n,configurable:!0}),Ts=!1;function Hd(){const[e,n]=h.useState(Ts);return h.useEffect(()=>{Ts||(Ts=!0,n(!0))},[]),e}la(Hd,"useIsHydrated");var Gd=wr[" useSyncExternalStore ".trim().toString()];function qd(){return()=>{}}la(qd,"subscribe");function Qd(){return Gd(qd,()=>!0,()=>!1)}la(Qd,"useIsHydratedModern");var Sb=typeof Gd=="function"?Qd:Hd,Eb=Object.defineProperty,Vn=(e,n)=>Eb(e,"name",{value:n,configurable:!0}),Is="rovingFocusGroup.onEntryFocus",Cb={bubbles:!1,cancelable:!0},cs="RovingFocusGroup",[mi,Jd,kb]=ia(cs),[Pb,Yd]=nn(cs,[kb]),[Ob,Rb]=Pb(cs),Tb=h.forwardRef(Vn(function(n,t){return g.jsx(mi.Provider,{scope:n.__scopeRovingFocusGroup,children:g.jsx(mi.Slot,{scope:n.__scopeRovingFocusGroup,children:g.jsx(Ib,{...n,ref:t})})})},"RovingFocusGroup")),Ib=h.forwardRef(Vn(function(n,t){const{__scopeRovingFocusGroup:r,orientation:o,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:u,onEntryFocus:d,preventScrollOnEntryFocus:l=!1,...f}=n,p=h.useRef(null),m=Re(t,p),v=ca(i),[y,b]=so({prop:a,defaultProp:c??null,onChange:u,caller:cs}),[_,x]=h.useState(!1),E=Xt(d),C=Jd(r),O=h.useRef(!1),[T,A]=h.useState(0);return h.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(Is,E),()=>R.removeEventListener(Is,E)},[E]),g.jsx(Ob,{scope:r,orientation:o,dir:v,loop:s,currentTabStopId:y,onItemFocus:h.useCallback(R=>b(R),[b]),onItemShiftTab:h.useCallback(()=>x(!0),[]),onFocusableItemAdd:h.useCallback(()=>A(R=>R+1),[]),onFocusableItemRemove:h.useCallback(()=>A(R=>R-1),[]),children:g.jsx($e.div,{tabIndex:_||T===0?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...n.style},onMouseDown:se(n.onMouseDown,()=>{O.current=!0}),onFocus:se(n.onFocus,R=>{const z=!O.current;if(R.target===R.currentTarget&&z&&!_){const L=new CustomEvent(Is,Cb);if(R.currentTarget.dispatchEvent(L),!L.defaultPrevented){const $=C().filter(J=>J.focusable),G=$.find(J=>J.active),Z=$.find(J=>J.id===y),B=[G,Z,...$].filter(Boolean).map(J=>J.ref.current);ua(B,l)}}O.current=!1}),onBlur:se(n.onBlur,()=>x(!1))})})},"RovingFocusGroupImpl")),Ab="RovingFocusGroupItem",Db=h.forwardRef(Vn(function(n,t){const{__scopeRovingFocusGroup:r,focusable:o=!0,active:s=!1,tabStopId:i,children:a,...c}=n,u=xn(),d=i||u,l=Rb(Ab,r),f=l.currentTabStopId===d,p=Jd(r),{onFocusableItemAdd:m,onFocusableItemRemove:v,currentTabStopId:y}=l,b=Sb();return pt(()=>{if(!(!b||!o))return m(),()=>v()},[b,o,m,v]),h.useEffect(()=>{if(!(b||!o))return m(),()=>v()},[b,o,m,v]),g.jsx(mi.ItemSlot,{scope:r,id:d,focusable:o,active:s,children:g.jsx($e.span,{tabIndex:f?0:-1,"data-orientation":l.orientation,...c,ref:t,onMouseDown:se(n.onMouseDown,_=>{o?l.onItemFocus(d):_.preventDefault()}),onFocus:se(n.onFocus,()=>l.onItemFocus(d)),onKeyDown:se(n.onKeyDown,_=>{if(_.key==="Tab"&&_.shiftKey){l.onItemShiftTab();return}if(_.target!==_.currentTarget)return;const x=ef(_,l.orientation,l.dir);if(x!==void 0){if(_.metaKey||_.ctrlKey||_.altKey||_.shiftKey)return;_.preventDefault();let C=p().filter(O=>O.focusable).map(O=>O.ref.current);if(x==="last")C.reverse();else if(x==="prev"||x==="next"){x==="prev"&&C.reverse();const O=C.indexOf(_.currentTarget);C=l.loop?tf(C,O+1):C.slice(O+1)}setTimeout(()=>ua(C))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:y!=null}):a})})},"RovingFocusGroupItem")),Nb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Xd(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Vn(Xd,"getDirectionAwareKey");function ef(e,n,t){const r=Xd(e.key,t);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Nb[r]}Vn(ef,"getFocusIntent");function ua(e,n=!1){const t=document.activeElement;for(const r of e)if(r===t||(r.focus({preventScroll:n}),document.activeElement!==t))return}Vn(ua,"focusFirst");function tf(e,n){return e.map((t,r)=>e[(n+r)%e.length])}Vn(tf,"wrapArray");var jb=Tb,Mb=Db,$b=Object.defineProperty,ye=(e,n)=>$b(e,"name",{value:n,configurable:!0}),gi=["Enter"," "],zb=["ArrowDown","PageUp","Home"],nf=["ArrowUp","PageDown","End"],Fb=[...zb,...nf],Lb={ltr:[...gi,"ArrowRight"],rtl:[...gi,"ArrowLeft"]},Vb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ls="Menu",[Hr,Ub,Zb]=ia(ls),[Un,rf]=nn(ls,[Zb,ss,Yd]),da=ss(),of=Yd(),[Bb,Zn]=Un(ls),[Kb,ao]=Un(ls),Wb=ye(e=>{const{__scopeMenu:n,open:t=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=da(n),[c,u]=h.useState(null),d=h.useRef(!1),l=Xt(s),f=ca(o);return h.useEffect(()=>{const p=ye(()=>{d.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},"handleKeyDown"),m=ye(()=>d.current=!1,"handlePointer");return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),h.useEffect(()=>{if(!t)return;const p=ye(()=>l(!1),"handleBlur");return window.addEventListener("blur",p),()=>window.removeEventListener("blur",p)},[t,l]),g.jsx(xd,{...a,children:g.jsx(Bb,{scope:n,open:t,onOpenChange:l,content:c,onContentChange:u,children:g.jsx(Kb,{scope:n,onClose:h.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:d,dir:f,modal:i,children:r})})})},"Menu"),sf=h.forwardRef(ye(function(n,t){const{__scopeMenu:r,...o}=n,s=da(r);return g.jsx(Sd,{...s,...o,ref:t})},"MenuAnchor")),af="MenuPortal",[Hb,cf]=Un(af,{forceMount:void 0}),Gb=ye(e=>{const{__scopeMenu:n,forceMount:t,children:r,container:o}=e,s=Zn(af,n);return g.jsx(Hb,{scope:n,forceMount:t,children:g.jsx(rn,{present:t||s.open,children:g.jsx(Xi,{asChild:!0,container:o,children:r})})})},"MenuPortal"),It="MenuContent",[qb,fa]=Un(It),Qb=h.forwardRef(ye(function(n,t){const r=cf(It,n.__scopeMenu),{forceMount:o=r.forceMount,...s}=n,i=Zn(It,n.__scopeMenu),a=ao(It,n.__scopeMenu);return g.jsx(Hr.Provider,{scope:n.__scopeMenu,children:g.jsx(rn,{present:o||i.open,children:g.jsx(Hr.Slot,{scope:n.__scopeMenu,children:a.modal?g.jsx(Jb,{...s,ref:t}):g.jsx(Yb,{...s,ref:t})})})})},"MenuContent")),Jb=h.forwardRef(ye(function(n,t){const r=Zn(It,n.__scopeMenu),o=h.useRef(null),s=Re(t,o);return h.useEffect(()=>{const i=o.current;if(i)return nd(i)},[]),g.jsx(ha,{...n,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:se(n.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),Yb=h.forwardRef(ye(function(n,t){const r=Zn(It,n.__scopeMenu);return g.jsx(ha,{...n,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),Xb=Yt("MenuContent.ScrollLock"),ha=h.forwardRef(ye(function(n,t){const{__scopeMenu:r,loop:o=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:v,...y}=n,b=Zn(It,r),_=ao(It,r),x=da(r),E=of(r),C=Ub(r),[O,T]=h.useState(null),A=h.useRef(null),R=Re(t,A,b.onContentChange),z=h.useRef(0),L=h.useRef(""),$=h.useRef(0),G=h.useRef(null),Z=h.useRef("right"),q=h.useRef(0),B=v?ta:h.Fragment,J=v?{as:Xb,allowPinchZoom:!0}:void 0,ue=ye(Q=>{var ke,pe;const oe=L.current+Q,fe=C().filter(Se=>!Se.disabled),_e=document.activeElement,te=(ke=fe.find(Se=>Se.ref.current===_e))==null?void 0:ke.textValue,ce=fe.map(Se=>Se.textValue),he=mf(ce,oe,te),be=(pe=fe.find(Se=>Se.textValue===he))==null?void 0:pe.ref.current;ye((function Se(rt){L.current=rt,window.clearTimeout(z.current),rt!==""&&(z.current=window.setTimeout(()=>Se(""),1e3))}),"updateSearch")(oe),be&&setTimeout(()=>be.focus())},"handleTypeaheadSearch");h.useEffect(()=>()=>window.clearTimeout(z.current),[]),ns();const ee=h.useCallback(Q=>{var fe,_e;return Z.current===((fe=G.current)==null?void 0:fe.side)&&vf(Q,(_e=G.current)==null?void 0:_e.area)},[]);return g.jsx(qb,{scope:r,searchRef:L,onItemEnter:h.useCallback(Q=>{ee(Q)&&Q.preventDefault()},[ee]),onItemLeave:h.useCallback(Q=>{var oe;ee(Q)||((oe=A.current)==null||oe.focus(),T(null))},[ee]),onTriggerLeave:h.useCallback(Q=>{ee(Q)&&Q.preventDefault()},[ee]),pointerGraceTimerRef:$,onPointerGraceIntentChange:h.useCallback(Q=>{G.current=Q},[]),children:g.jsx(B,{...J,children:g.jsx($u,{asChild:!0,trapped:s,onMountAutoFocus:se(i,Q=>{var oe;Q.preventDefault(),(oe=A.current)==null||oe.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:g.jsx(Qi,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:l,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:g.jsx(jb,{asChild:!0,...E,dir:_.dir,orientation:"vertical",loop:o,currentTabStopId:O,onCurrentTabStopIdChange:T,onEntryFocus:se(u,Q=>{_.isUsingKeyboardRef.current||Q.preventDefault()}),preventScrollOnEntryFocus:!0,children:g.jsx(Ed,{role:"menu","aria-orientation":"vertical","data-state":ma(b.open),"data-radix-menu-content":"",dir:_.dir,...x,...y,ref:R,style:{outline:"none",...y.style},onKeyDown:se(y.onKeyDown,Q=>{const fe=Q.target.closest("[data-radix-menu-content]")===Q.currentTarget,_e=Q.ctrlKey||Q.altKey||Q.metaKey,te=Q.key.length===1;fe&&(Q.key==="Tab"&&Q.preventDefault(),!_e&&te&&ue(Q.key));const ce=A.current;if(Q.target!==ce||!Fb.includes(Q.key))return;Q.preventDefault();const be=C().filter(ke=>!ke.disabled).map(ke=>ke.ref.current);nf.includes(Q.key)&&be.reverse(),hf(be)}),onBlur:se(n.onBlur,Q=>{Q.currentTarget.contains(Q.target)||(window.clearTimeout(z.current),L.current="")}),onPointerMove:se(n.onPointerMove,gr(Q=>{const oe=Q.target,fe=q.current!==Q.clientX;if(Q.currentTarget.contains(oe)&&fe){const _e=Q.clientX>q.current?"right":"left";Z.current=_e,q.current=Q.clientX}}))})})})})})})},"MenuContentImpl")),ew=h.forwardRef(ye(function(n,t){const{__scopeMenu:r,...o}=n;return g.jsx($e.div,{...o,ref:t})},"MenuLabel")),vi="MenuItem",Ec="menu.itemSelect",pa=h.forwardRef(ye(function(n,t){const{disabled:r=!1,onSelect:o,...s}=n,i=h.useRef(null),a=ao(vi,n.__scopeMenu),c=fa(vi,n.__scopeMenu),u=Re(t,i),d=h.useRef(!1),l=ye(()=>{const f=i.current;if(!r&&f){const p=new CustomEvent(Ec,{bubbles:!0,cancelable:!0});f.addEventListener(Ec,m=>o==null?void 0:o(m),{once:!0}),qi(f,p),p.defaultPrevented?d.current=!1:a.onClose()}},"handleSelect");return g.jsx(lf,{...s,ref:u,disabled:r,onClick:se(n.onClick,l),onPointerDown:f=>{var p;(p=n.onPointerDown)==null||p.call(n,f),d.current=!0},onPointerUp:se(n.onPointerUp,f=>{var p;d.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:se(n.onKeyDown,f=>{r||f.target!==f.currentTarget||c.searchRef.current!==""&&f.key===" "||gi.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})},"MenuItem")),lf=h.forwardRef(ye(function(n,t){const{__scopeMenu:r,disabled:o=!1,textValue:s,...i}=n,a=fa(vi,r),c=of(r),u=h.useRef(null),d=Re(t,u),[l,f]=h.useState(!1),[p,m]=h.useState("");return h.useEffect(()=>{const v=u.current;v&&m((v.textContent??"").trim())},[i.children]),g.jsx(Hr.ItemSlot,{scope:r,disabled:o,textValue:s??p,children:g.jsx(Mb,{asChild:!0,...c,focusable:!o,children:g.jsx($e.div,{role:"menuitem","data-highlighted":l?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...i,ref:d,onPointerMove:se(n.onPointerMove,gr(v=>{o?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:se(n.onPointerLeave,gr(v=>a.onItemLeave(v))),onFocus:se(n.onFocus,()=>f(!0)),onBlur:se(n.onBlur,()=>f(!1))})})})},"MenuItemImpl")),tw=h.forwardRef(ye(function(n,t){const{checked:r=!1,onCheckedChange:o,...s}=n;return g.jsx(df,{scope:n.__scopeMenu,checked:r,children:g.jsx(pa,{role:"menuitemcheckbox","aria-checked":Gr(r)?"mixed":r,...s,ref:t,"data-state":us(r),onSelect:se(s.onSelect,()=>o==null?void 0:o(Gr(r)?!0:!r),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),nw="MenuRadioGroup",[QC,rw]=Un(nw,{value:void 0,onValueChange:ye(()=>{},"onValueChange")}),ow="MenuRadioItem",sw=h.forwardRef(ye(function(n,t){const{value:r,...o}=n,s=rw(ow,n.__scopeMenu),i=r===s.value;return g.jsx(df,{scope:n.__scopeMenu,checked:i,children:g.jsx(pa,{role:"menuitemradio","aria-checked":i,...o,ref:t,"data-state":us(i),onSelect:se(o.onSelect,()=>{var a;return(a=s.onValueChange)==null?void 0:a.call(s,r)},{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),uf="MenuItemIndicator",[df,iw]=Un(uf,{checked:!1}),aw=h.forwardRef(ye(function(n,t){const{__scopeMenu:r,forceMount:o,...s}=n,i=iw(uf,r);return g.jsx(rn,{present:o||Gr(i.checked)||i.checked===!0,children:g.jsx($e.span,{...s,ref:t,"data-state":us(i.checked)})})},"MenuItemIndicator")),cw=h.forwardRef(ye(function(n,t){const{__scopeMenu:r,...o}=n;return g.jsx($e.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})},"MenuSeparator")),lw="MenuSub",[JC,ff]=Un(lw),Eo="MenuSubTrigger",uw=h.forwardRef(ye(function(n,t){const r=Zn(Eo,n.__scopeMenu),o=ao(Eo,n.__scopeMenu),s=ff(Eo,n.__scopeMenu),i=fa(Eo,n.__scopeMenu),a=h.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=i,d={__scopeMenu:n.__scopeMenu},l=h.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);h.useEffect(()=>l,[l]),h.useEffect(()=>{const p=c.current;return()=>{window.clearTimeout(p),u(null)}},[c,u]);const f=Re(t,s.onTriggerChange);return g.jsx(sf,{asChild:!0,...d,children:g.jsx(lf,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":r.open?s.contentId:void 0,"data-state":ma(r.open),...n,ref:f,onClick:p=>{var m;(m=n.onClick)==null||m.call(n,p),!(n.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:se(n.onPointerMove,gr(p=>{i.onItemEnter(p),!p.defaultPrevented&&!n.disabled&&!r.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{r.onOpenChange(!0),l()},100))})),onPointerLeave:se(n.onPointerLeave,gr(p=>{var v,y;l();const m=(v=r.content)==null?void 0:v.getBoundingClientRect();if(m){const b=(y=r.content)==null?void 0:y.dataset.side,_=b==="right",x=_?-5:5,E=m[_?"left":"right"],C=m[_?"right":"left"];i.onPointerGraceIntentChange({area:[{x:p.clientX+x,y:p.clientY},{x:E,y:m.top},{x:C,y:m.top},{x:C,y:m.bottom},{x:E,y:m.bottom}],side:b}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(p),p.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:se(n.onKeyDown,p=>{var v;n.disabled||p.target!==p.currentTarget||i.searchRef.current!==""&&p.key===" "||Lb[o.dir].includes(p.key)&&(r.onOpenChange(!0),(v=r.content)==null||v.focus(),p.preventDefault())})})})},"MenuSubTrigger")),dw="MenuSubContent",fw=h.forwardRef(ye(function(n,t){const r=cf(It,n.__scopeMenu),{forceMount:o=r.forceMount,align:s="start",...i}=n,a=Zn(It,n.__scopeMenu),c=ao(It,n.__scopeMenu),u=ff(dw,n.__scopeMenu),d=h.useRef(null),l=Re(t,d);return g.jsx(Hr.Provider,{scope:n.__scopeMenu,children:g.jsx(rn,{present:o||a.open,children:g.jsx(Hr.Slot,{scope:n.__scopeMenu,children:g.jsx(ha,{id:u.contentId,"aria-labelledby":u.triggerId,...i,ref:l,align:s,side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var p;c.isUsingKeyboardRef.current&&((p=d.current)==null||p.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:se(n.onFocusOutside,f=>{f.target!==u.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:se(n.onEscapeKeyDown,f=>{c.onClose(),f.preventDefault()}),onKeyDown:se(n.onKeyDown,f=>{var v;const p=f.currentTarget.contains(f.target),m=Vb[c.dir].includes(f.key);p&&m&&(a.onOpenChange(!1),(v=u.trigger)==null||v.focus(),f.preventDefault())})})})})})},"MenuSubContent"));function ma(e){return e?"open":"closed"}ye(ma,"getOpenState");function Gr(e){return e==="indeterminate"}ye(Gr,"isIndeterminate");function us(e){return Gr(e)?"indeterminate":e?"checked":"unchecked"}ye(us,"getCheckedState");function hf(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}ye(hf,"focusFirst");function pf(e,n){return e.map((t,r)=>e[(n+r)%e.length])}ye(pf,"wrapArray");function mf(e,n,t){const o=n.length>1&&Array.from(n).every(u=>u===n[0])?n[0]:n,s=t?e.indexOf(t):-1;let i=pf(e,Math.max(s,0));o.length===1&&(i=i.filter(u=>u!==t));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==t?c:void 0}ye(mf,"getNextMatch");function gf(e,n){const{x:t,y:r}=e;let o=!1;for(let s=0,i=n.length-1;s<n.length;i=s++){const a=n[s],c=n[i],u=a.x,d=a.y,l=c.x,f=c.y;d>r!=f>r&&t<(l-u)*(r-d)/(f-d)+u&&(o=!o)}return o}ye(gf,"isPointInPolygon");function vf(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return gf(t,n)}ye(vf,"isPointerInGraceArea");function gr(e){return n=>n.pointerType==="mouse"?e(n):void 0}ye(gr,"whenMouse");var hw=Wb,pw=sf,mw=Gb,gw=Qb,vw=ew,yw=pa,bw=tw,ww=sw,_w=aw,xw=cw,Sw=uw,Ew=fw,Cw=Object.defineProperty,Ct=(e,n)=>Cw(e,"name",{value:n,configurable:!0}),ga="DropdownMenu",[kw,YC]=nn(ga,[rf]),kt=rf(),[Pw,yf]=kw(ga),Ow=Ct(e=>{const{__scopeDropdownMenu:n,children:t,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,c=kt(n),u=h.useRef(null),[d,l]=so({prop:o,defaultProp:s??!1,onChange:i,caller:ga});return g.jsx(Pw,{scope:n,triggerId:xn(),triggerRef:u,contentId:xn(),open:d,onOpenChange:l,onOpenToggle:h.useCallback(()=>l(f=>!f),[l]),modal:a,children:g.jsx(hw,{...c,open:d,onOpenChange:l,dir:r,modal:a,children:t})})},"DropdownMenu"),Rw="DropdownMenuTrigger",Tw=h.forwardRef(Ct(function(n,t){const{__scopeDropdownMenu:r,disabled:o=!1,...s}=n,i=yf(Rw,r),a=kt(r),c=Re(t,i.triggerRef);return g.jsx(pw,{asChild:!0,...a,children:g.jsx($e.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...s,ref:c,onPointerDown:se(n.onPointerDown,u=>{!o&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:se(n.onKeyDown,u=>{o||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})},"DropdownMenuTrigger")),Iw=Ct(e=>{const{__scopeDropdownMenu:n,...t}=e,r=kt(n);return g.jsx(mw,{...r,...t})},"DropdownMenuPortal"),Aw="DropdownMenuContent",Dw=h.forwardRef(Ct(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=yf(Aw,r),i=kt(r),a=h.useRef(!1);return g.jsx(gw,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...o,ref:t,onCloseAutoFocus:se(n.onCloseAutoFocus,c=>{var u;a.current||(u=s.triggerRef.current)==null||u.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:se(n.onInteractOutside,c=>{const u=c.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0,l=u.button===2||d;(!s.modal||l)&&(a.current=!0)}),style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),Nw=h.forwardRef(Ct(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=kt(r);return g.jsx(vw,{...s,...o,ref:t})},"DropdownMenuLabel")),jw=h.forwardRef(Ct(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=kt(r);return g.jsx(yw,{...s,...o,ref:t})},"DropdownMenuItem")),Mw=h.forwardRef(Ct(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=kt(r);return g.jsx(bw,{...s,...o,ref:t})},"DropdownMenuCheckboxItem")),$w=h.forwardRef(Ct(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=kt(r);return g.jsx(ww,{...s,...o,ref:t})},"DropdownMenuRadioItem")),zw=h.forwardRef(Ct(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=kt(r);return g.jsx(_w,{...s,...o,ref:t})},"DropdownMenuItemIndicator")),Fw=h.forwardRef(Ct(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=kt(r);return g.jsx(xw,{...s,...o,ref:t})},"DropdownMenuSeparator")),Lw=h.forwardRef(Ct(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=kt(r);return g.jsx(Sw,{...s,...o,ref:t})},"DropdownMenuSubTrigger")),Vw=h.forwardRef(Ct(function(n,t){const{__scopeDropdownMenu:r,...o}=n,s=kt(r);return g.jsx(Ew,{...s,...o,ref:t,style:{...n.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),Uw=Ow,Zw=Tw,Bw=Iw,bf=Dw,wf=Nw,_f=jw,xf=Mw,Sf=$w,Ef=zw,Cf=Fw,kf=Lw,Pf=Vw;const Kw=Uw,Ww=Zw,Hw=h.forwardRef((e,n)=>{const t=Y.c(14);let r,o,s,i;t[0]!==e?({className:o,inset:s,children:r,...i}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i):(r=t[1],o=t[2],s=t[3],i=t[4]);const a=s&&"pl-8";let c;t[5]!==o||t[6]!==a?(c=ne("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",a,o),t[5]=o,t[6]=a,t[7]=c):c=t[7];let u;t[8]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(Um,{className:"ml-auto"}),t[8]=u):u=t[8];let d;return t[9]!==r||t[10]!==i||t[11]!==n||t[12]!==c?(d=g.jsxs(kf,{ref:n,className:c,...i,children:[r,u]}),t[9]=r,t[10]=i,t[11]=n,t[12]=c,t[13]=d):d=t[13],d});Hw.displayName=kf.displayName;const Gw=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(Pf,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Gw.displayName=Pf.displayName;const Of=h.forwardRef((e,n)=>{const t=Y.c(11);let r,o,s;t[0]!==e?({className:r,sideOffset:s,...o}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const i=s===void 0?4:s;let a;t[4]!==r?(a=ne("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",r),t[4]=r,t[5]=a):a=t[5];let c;return t[6]!==o||t[7]!==n||t[8]!==i||t[9]!==a?(c=g.jsx(Bw,{children:g.jsx(bf,{ref:n,sideOffset:i,className:a,...o})}),t[6]=o,t[7]=n,t[8]=i,t[9]=a,t[10]=c):c=t[10],c});Of.displayName=bf.displayName;const yi=h.forwardRef((e,n)=>{const t=Y.c(11);let r,o,s;t[0]!==e?({className:r,inset:o,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const i=o&&"pl-8";let a;t[4]!==r||t[5]!==i?(a=ne("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",i,r),t[4]=r,t[5]=i,t[6]=a):a=t[6];let c;return t[7]!==s||t[8]!==n||t[9]!==a?(c=g.jsx(_f,{ref:n,className:a,...s}),t[7]=s,t[8]=n,t[9]=a,t[10]=c):c=t[10],c});yi.displayName=_f.displayName;const qw=h.forwardRef((e,n)=>{const t=Y.c(14);let r,o,s,i;t[0]!==e?({className:s,children:o,checked:r,...i}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s,t[4]=i):(r=t[1],o=t[2],s=t[3],i=t[4]);let a;t[5]!==s?(a=ne("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),t[5]=s,t[6]=a):a=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(Ef,{children:g.jsx(Vm,{className:"h-4 w-4"})})}),t[7]=c):c=t[7];let u;return t[8]!==r||t[9]!==o||t[10]!==i||t[11]!==n||t[12]!==a?(u=g.jsxs(xf,{ref:n,className:a,checked:r,...i,children:[c,o]}),t[8]=r,t[9]=o,t[10]=i,t[11]=n,t[12]=a,t[13]=u):u=t[13],u});qw.displayName=xf.displayName;const Qw=h.forwardRef((e,n)=>{const t=Y.c(12);let r,o,s;t[0]!==e?({className:o,children:r,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);let i;t[4]!==o?(i=ne("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o),t[4]=o,t[5]=i):i=t[5];let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(Ef,{children:g.jsx(Zm,{className:"h-2 w-2 fill-current"})})}),t[6]=a):a=t[6];let c;return t[7]!==r||t[8]!==s||t[9]!==n||t[10]!==i?(c=g.jsxs(Sf,{ref:n,className:i,...s,children:[a,r]}),t[7]=r,t[8]=s,t[9]=n,t[10]=i,t[11]=c):c=t[11],c});Qw.displayName=Sf.displayName;const Jw=h.forwardRef((e,n)=>{const t=Y.c(11);let r,o,s;t[0]!==e?({className:r,inset:o,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);const i=o&&"pl-8";let a;t[4]!==r||t[5]!==i?(a=ne("px-2 py-1.5 text-sm font-semibold",i,r),t[4]=r,t[5]=i,t[6]=a):a=t[6];let c;return t[7]!==s||t[8]!==n||t[9]!==a?(c=g.jsx(wf,{ref:n,className:a,...s}),t[7]=s,t[8]=n,t[9]=a,t[10]=c):c=t[10],c});Jw.displayName=wf.displayName;const Rf=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("-mx-1 my-1 h-px bg-muted",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(Cf,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Rf.displayName=Cf.displayName;const bi="";async function Co(e,n,t,r){const o=await fetch(`${bi}${n}`,{method:e,credentials:"include",headers:{"Content-Type":"application/json",...r},body:t!=null?JSON.stringify(t):void 0});if(o.status===204)return{data:null,status:204};const s=await o.json().catch(()=>null);return o.ok?{data:s,status:o.status}:{data:null,status:o.status,error:(s==null?void 0:s.error)??"Request failed"}}const Tf={get:e=>Co("GET",e),post:(e,n)=>Co("POST",e,n),patch:(e,n)=>Co("PATCH",e,n),delete:e=>Co("DELETE",e),upload:async(e,n)=>{const t=await fetch(`${bi}${e}`,{method:"POST",credentials:"include",body:n});if(t.status===204)return{data:null,status:204};const r=await t.json().catch(()=>null);return t.ok?{data:r,status:t.status}:{data:null,status:t.status,error:(r==null?void 0:r.error)??"Upload failed"}},uploadPatch:async(e,n)=>{const t=await fetch(`${bi}${e}`,{method:"PATCH",credentials:"include",body:n});if(t.status===204)return{data:null,status:204};const r=await t.json().catch(()=>null);return t.ok?{data:r,status:t.status}:{data:null,status:t.status,error:(r==null?void 0:r.error)??"Upload failed"}}},va={authStatus:["auth","status"],me:["auth","me"],inviteToken:e=>["invitations","verify",e],resetToken:e=>["auth","reset-password",e],apps:["apps"],settings:["settings"],tokens:["tokens"],teamMembers:["team","members"],comments:e=>["comments",e],allRecordings:["recordings"],recordings:e=>["recordings",e],agents:["agents"],resourceHistory:(e,n)=>["agents",e,"resources",n]};async function Yw(){const e=await fetch("/api/v1/auth/status");if(!e.ok)throw new Error(`GET /api/v1/auth/status failed with ${e.status}`);return e.json()}async function Xw(){const{data:e,status:n}=await Tf.get("/api/v1/auth/me");if(n===401)return null;if(!e)throw new Error(`GET /api/v1/auth/me failed with ${n}`);return e}async function XC(e){const n=await fetch(`/api/v1/invitations/verify?token=${e}`);if(!n.ok)throw new Error(`invitation refused with ${n.status}`);return n.json()}async function Er(e){const n=await fetch(e,{credentials:"include"});if(!n.ok)throw new Error(`GET ${e} failed with ${n.status}`);return n.json()}const e0=()=>Er("/api/v1/settings"),e2=()=>Er("/api/v1/tokens"),t2=()=>Er("/api/v1/team/members"),n2=e=>Er(`/api/v1/comments?build_id=${e}`),r2=e=>Er(`/api/v1/recordings?buildId=${e}`),o2=()=>Er("/api/v1/agents");async function s2(e,n,t){const r=await fetch(`/api/v1/agents/${encodeURIComponent(e)}/resources?range=${n}`,{credentials:"include",signal:t});if(!r.ok)throw new Error(`HTTP ${r.status}`);return r.json()}async function i2(e){const n=await fetch(`/api/v1/auth/reset-password/verify?token=${e}`);if(!n.ok)throw new Error(`reset token refused with ${n.status}`);return!0}async function a2(){const e=await fetch("/api/v1/apps",{credentials:"include"});if(!e.ok)throw new Error(`GET /api/v1/apps failed with ${e.status}`);return(await e.json()).items}async function c2({appId:e,search:n,statusFilter:t}){const r=new URLSearchParams({app_id:String(e),limit:"100",sort:"uploaded_at",dir:"desc"});n&&r.set("q",n),t&&t!=="all"&&r.set("status",t);const o=await fetch(`/api/v1/builds?${r}`,{credentials:"include"});if(!o.ok)throw new Error(`GET /api/v1/builds failed with ${o.status}`);return(await o.json()).items}async function l2(e){const n=await fetch("/api/v1/apps",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return n.status===409?{error:"App with this bundle ID and platform already exists"}:n.ok?n.json():null}class t0 extends Error{}async function ya(e){if(e.status!==403)return;const n=await e.json().catch(()=>null);throw new t0((n==null?void 0:n.error)??"You do not have permission to do this")}async function u2(e,n){const t=await fetch(`/api/v1/builds/${e}`,{method:"PATCH",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({status_label:n})});if(await ya(t),!t.ok)throw new Error(`PATCH /api/v1/builds/${e} failed with ${t.status}`)}async function d2(e){const n=await fetch(`/api/v1/builds/${e}/schedule-deletion`,{method:"POST",credentials:"include"});if(await ya(n),!n.ok)throw new Error(`Failed to schedule deletion (${n.status})`);return(await n.json()).delete_after}async function f2(e){const n=await fetch(`/api/v1/builds/${e}/schedule-deletion`,{method:"DELETE",credentials:"include"});if(await ya(n),!n.ok)throw new Error(`Failed to cancel scheduled deletion (${n.status})`)}async function h2(e){const n=await fetch(`/api/v1/builds/${e}`,{credentials:"include"});return n.ok?n.json():null}function p2(e){const n=new Map;for(const t of e){const r=t.version_name??"Unversioned";n.has(r)||n.set(r,[]),n.get(r).push(t)}return Array.from(n.entries()).map(([t,r])=>({versionName:t,builds:r}))}function If(){const e=Y.c(4);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={queryKey:va.me,queryFn:Xw},e[0]=n):n=e[0];const t=Wi(n),r=t.data??null,o=t.data===void 0;let s;return e[1]!==r||e[2]!==o?(s={user:r,loading:o},e[1]=r,e[2]=o,e[3]=s):s=e[3],s}const n0={"/settings/team":["Admin"],"/settings/tokens":["Admin","Developer","QA"]};function Af(e,n){const t=Object.entries(n0).find(([r])=>e.startsWith(r));return!t||n!==void 0&&t[1].includes(n)}const r0=6;function o0(e){let n=0;for(const t of e)n=n*31+t.charCodeAt(0)&4294967295;return Math.abs(n)}function s0(e){const n=o0(e)%r0+1;return{bg:`hsl(var(--avatar-${n}-bg))`,fg:`hsl(var(--avatar-${n}-fg))`}}function i0(e){const n=Y.c(20),{name:t,avatarUrl:r,size:o}=e,s=o===void 0?28:o,i=(t==null?void 0:t[0])??"?";let a;n[0]!==i?(a=i.toUpperCase(),n[0]=i,n[1]=a):a=n[1];const c=a;let u;n[2]!==s?(u={width:s,height:s,borderRadius:"50%",flexShrink:0},n[2]=s,n[3]=u):u=n[3];const d=u;if(r){let b;n[4]!==d?(b={...d,objectFit:"cover"},n[4]=d,n[5]=b):b=n[5];let _;return n[6]!==r||n[7]!==t||n[8]!==b?(_=g.jsx("img",{src:r,alt:t,style:b}),n[6]=r,n[7]=t,n[8]=b,n[9]=_):_=n[9],_}let l;n[10]!==t?(l=s0(t),n[10]=t,n[11]=l):l=n[11];const{bg:f,fg:p}=l,m=s*.42;let v;n[12]!==f||n[13]!==p||n[14]!==d||n[15]!==m?(v={...d,background:f,display:"inline-flex",alignItems:"center",justifyContent:"center",color:p,fontSize:m,fontWeight:600,userSelect:"none"},n[12]=f,n[13]=p,n[14]=d,n[15]=m,n[16]=v):v=n[16];let y;return n[17]!==c||n[18]!==v?(y=g.jsx("span",{style:v,children:c}),n[17]=c,n[18]=v,n[19]=y):y=n[19],y}const a0=[{label:"App Center",href:"/app-center",icon:Km},{label:"Mac Resources",href:"/mac-resources",icon:Hm}],c0=[{label:"Default",href:"/settings/default",icon:hu},{label:"Team",href:"/settings/team",icon:Jm},{label:"Tokens",href:"/settings/tokens",icon:Bm}],l0=[{label:"Docs",href:"https://www.tapflow.dev/get-started/teammates",icon:Lm}];function u0(){const e=Y.c(37),{pathname:n}=Dl(),t=Nl(),{user:r}=If(),{resolvedTheme:o}=es(),s=o==="dark"?"/logo-dark.svg":"/logo.svg";let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={queryKey:va.settings,queryFn:e0},e[0]=i):i=e[0];const a=Wi(i).data,c=(a==null?void 0:a.logo_url)??null,u=(a==null?void 0:a.team_name)||"tapflow",d=Li();let l;e[1]!==t||e[2]!==d?(l=async function(){await fetch("/api/v1/auth/logout",{method:"POST",credentials:"include"}),d.clear(),t("/login",{replace:!0})},e[1]=t,e[2]=d,e[3]=l):l=e[3];const f=l,p=c??s;let m;e[4]!==p?(m=g.jsx("img",{src:p,alt:"tapflow",className:"w-6 h-6 min-w-6 shrink-0"}),e[4]=p,e[5]=m):m=e[5];let v;e[6]!==u?(v=g.jsx("span",{className:"text-base font-semibold tracking-tight truncate text-sidebar-accent-foreground group-data-[collapsible=icon]:hidden",children:u}),e[6]=u,e[7]=v):v=e[7];let y;e[8]!==m||e[9]!==v?(y=g.jsx(Ld,{className:"p-2",children:g.jsxs(mo,{to:"/app-center",className:"flex items-center gap-2 p-1",children:[m,v]})}),e[8]=m,e[9]=v,e[10]=y):y=e[10];let b;e[11]!==n?(b=a0.map(L=>g.jsx(Ko,{children:g.jsx(Wo,{asChild:!0,isActive:n.startsWith(L.href),tooltip:L.label,children:g.jsxs(mo,{to:L.href,children:[g.jsx(L.icon,{}),g.jsx("span",{children:L.label})]})})},L.href)),e[11]=n,e[12]=b):b=e[12];let _;e[13]!==b?(_=g.jsx(jo,{children:g.jsx(Mo,{children:g.jsx($o,{children:b})})}),e[13]=b,e[14]=_):_=e[14];let x;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=g.jsx(hi,{children:"Settings"}),e[15]=x):x=e[15];let E;if(e[16]!==n||e[17]!==(r==null?void 0:r.role)){let L;e[19]!==(r==null?void 0:r.role)?(L=G=>Af(G.href,r==null?void 0:r.role),e[19]=r==null?void 0:r.role,e[20]=L):L=e[20];let $;e[21]!==n?($=G=>g.jsx(Ko,{children:g.jsx(Wo,{asChild:!0,isActive:n===G.href,tooltip:G.label,children:g.jsxs(mo,{to:G.href,children:[g.jsx(G.icon,{}),g.jsx("span",{children:G.label})]})})},G.href),e[21]=n,e[22]=$):$=e[22],E=c0.filter(L).map($),e[16]=n,e[17]=r==null?void 0:r.role,e[18]=E}else E=e[18];let C;e[23]!==E?(C=g.jsxs(jo,{children:[x,g.jsx(Mo,{children:g.jsx($o,{children:E})})]}),e[23]=E,e[24]=C):C=e[24];let O;e[25]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx(hi,{children:"Reference"}),e[25]=O):O=e[25];let T;e[26]===Symbol.for("react.memo_cache_sentinel")?(T=g.jsxs(jo,{children:[O,g.jsx(Mo,{children:g.jsx($o,{children:l0.map(d0)})})]}),e[26]=T):T=e[26];let A;e[27]!==C||e[28]!==_?(A=g.jsxs(Ud,{children:[_,C,T]}),e[27]=C,e[28]=_,e[29]=A):A=e[29];let R;e[30]!==f||e[31]!==r?(R=r&&g.jsx(Vd,{className:"px-3 py-3",children:g.jsxs(Kw,{children:[g.jsx(Ww,{asChild:!0,children:g.jsxs("button",{className:"flex w-full items-center gap-2.5 rounded-md px-1 py-1 text-left hover:bg-sidebar-accent transition-colors group-data-[collapsible=icon]:justify-center",children:[g.jsx(i0,{name:r.displayName??"",avatarUrl:r.avatarUrl,size:28}),g.jsxs("div",{className:"flex flex-col min-w-0 flex-1 group-data-[collapsible=icon]:hidden",children:[g.jsx("span",{className:"text-sm font-medium truncate",children:r.displayName}),g.jsx("span",{className:"text-xs text-muted-foreground truncate",children:r.email})]})]})}),g.jsxs(Of,{side:"top",align:"start",className:"w-56",children:[g.jsx(yi,{asChild:!0,children:g.jsxs(mo,{to:"/settings/default",children:[g.jsx(hu,{className:"mr-2 h-4 w-4"}),"Settings"]})}),g.jsx(Rf,{}),g.jsxs(yi,{onClick:f,className:"text-destructive focus:text-destructive",children:[g.jsx(Wm,{className:"mr-2 h-4 w-4"}),"Log out"]})]})]})}),e[30]=f,e[31]=r,e[32]=R):R=e[32];let z;return e[33]!==A||e[34]!==R||e[35]!==y?(z=g.jsxs($d,{collapsible:"icon",children:[y,A,R]}),e[33]=A,e[34]=R,e[35]=y,e[36]=z):z=e[36],z}function d0(e){return g.jsx(Ko,{children:g.jsx(Wo,{asChild:!0,tooltip:e.label,children:g.jsxs("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(e.icon,{}),g.jsx("span",{children:e.label})]})})},e.href)}function f0(){const e=Y.c(7),{theme:n,setTheme:t}=es();let r;e[0]!==t||e[1]!==n?(r=()=>t(n==="dark"?"light":"dark"),e[0]=t,e[1]=n,e[2]=r):r=e[2];let o,s;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(Qm,{className:"h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),s=g.jsx(Gm,{className:"absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),e[3]=o,e[4]=s):(o=e[3],s=e[4]);let i;return e[5]!==r?(i=g.jsxs(ts,{variant:"ghost",size:"icon",onClick:r,"aria-label":"Toggle theme",children:[o,s]}),e[5]=r,e[6]=i):i=e[6],i}const Df=h.createContext({node:null,setNode:()=>{}});function h0(e){const n=Y.c(5),{children:t}=e,[r,o]=h.useState(null);let s;n[0]!==r?(s={node:r,setNode:o},n[0]=r,n[1]=s):s=n[1];const i=s;let a;return n[2]!==t||n[3]!==i?(a=g.jsx(Df.Provider,{value:i,children:t}),n[2]=t,n[3]=i,n[4]=a):a=n[4],a}function p0(){return h.useContext(Df)}function m0(){const e=Y.c(8),{node:n}=p0();let t,r;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=g.jsx(zd,{className:"-ml-1"}),r=g.jsx(Bo,{orientation:"vertical",className:"h-4"}),e[0]=t,e[1]=r):(t=e[0],r=e[1]);let o,s,i;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx("div",{className:"flex-1"}),s=g.jsx(f0,{}),i=g.jsx(Bo,{orientation:"vertical",className:"h-4"}),e[2]=o,e[3]=s,e[4]=i):(o=e[2],s=e[3],i=e[4]);let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("a",{href:"https://github.com/jo-duchan/tapflow",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center w-8 h-8 rounded-md hover:bg-accent transition-colors","aria-label":"GitHub",children:g.jsx("svg",{viewBox:"0 0 24 24",className:"w-4 h-4 fill-current","aria-hidden":"true",children:g.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})})}),e[5]=a):a=e[5];let c;return e[6]!==n?(c=g.jsxs("header",{className:"flex h-16 items-center gap-2 border-b px-4",children:[t,r,n,o,s,i,a]}),e[6]=n,e[7]=c):c=e[7],c}function g0(){const e=Y.c(5),{user:n,loading:t}=If(),r=Dl();if(t)return null;if(!n){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(zi,{to:"/login",replace:!0}),e[0]=a):a=e[0],a}if(!Af(r.pathname,n.role)){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("div",{className:"flex h-screen items-center justify-center",children:g.jsxs("div",{className:"text-center space-y-2",children:[g.jsx("p",{className:"text-lg font-semibold",children:"Access Denied"}),g.jsx("p",{className:"text-sm text-muted-foreground",children:"Your role does not have access to this page."})]})}),e[1]=a):a=e[1],a}let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(u0,{}),e[2]=o):o=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsx(m0,{}),e[3]=s):s=e[3];let i;return e[4]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(h0,{children:g.jsxs(Md,{children:[o,g.jsxs(Fd,{children:[s,g.jsx("main",{className:"flex-1 min-h-0 overflow-auto",children:g.jsx(h.Suspense,{fallback:g.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),children:g.jsx(Jh,{})})})]})]})}),e[4]=i):i=e[4],i}var co=e=>e.type==="checkbox",ds=e=>e.type==="file",_n=e=>e instanceof Date,Ke=e=>e==null;const ba=e=>typeof e=="object";var Ae=e=>!Ke(e)&&!Array.isArray(e)&&ba(e)&&!_n(e),wi=e=>Ae(e)&&e.target?co(e.target)?e.target.checked:ds(e.target)?e.target.files:e.target.value:e;const v0=/[.[\]'"]/;var Fn=e=>e.split(v0).filter(Boolean);function y0(e,n){const t=Fn(n);let r=e._formValues,o=e._defaultValues;for(let s=0;s<t.length-1;s++){const i=t[s];if(r=r==null?r:r[i],o=o==null?o:o[i],r===null||o===null)return null}}var Nf=(e,n)=>n.split(".").some((t,r,o)=>!isNaN(Number(t))&&e.has(o.slice(0,r).join("."))),fs=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ce(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);const n=typeof Blob<"u"&&e instanceof Blob,t=typeof FileList<"u"&&e instanceof FileList;if(fs&&(n||t))return e;const r=Array.isArray(e);if(!r&&e.constructor!==Object)return e;const o=r?[]:Object.create(Object.getPrototypeOf(e));for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(o[s]=Ce(e[s]));return o}const hn={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Et={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Be={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},b0=[Be.required,Be.min,Be.max,Be.minLength,Be.maxLength,Be.pattern,Be.validate],$r="form",jf="root",wa=["__proto__","constructor","prototype"],w0=/^\w*$/;var vr=e=>w0.test(e),ve=e=>e===void 0,V=(e,n,t)=>{if(!n||!Ae(e))return t;const r=vr(n)?[n]:Fn(n);if(r.some(s=>wa.includes(s)))return t;const o=r.reduce((s,i)=>Ke(s)?void 0:s[i],e);return ve(o)||o===e?ve(e[n])?t:e[n]:o},ft=e=>typeof e=="boolean",Xe=e=>typeof e=="function",ge=(e,n,t)=>{let r=-1;const o=vr(n)?[n]:Fn(n),s=o.length,i=s-1;for(;++r<s;){const a=o[r];let c=t;if(r!==i){const u=e[a];c=Ae(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}if(wa.includes(a))return;e[a]=c,e=e[a]}};const Mf=I.createContext(null);Mf.displayName="HookFormControlContext";const _a=()=>I.useContext(Mf);var $f=(e,n,t,r=!0)=>{const o={};for(const s in e)Object.defineProperty(o,s,{get:()=>{const i=s;return n._proxyFormState[i]!==Et.all&&(n._proxyFormState[i]=!r||Et.all),t&&(t[i]=!0),e[i]}});return o};const xa=fs?I.useLayoutEffect:I.useEffect;var _0=e=>{const n=e.constructor&&e.constructor.prototype;return Ae(n)&&n.hasOwnProperty("isPrototypeOf")},_i=e=>Ke(e)||!ba(e);const Cc=(e,n)=>n.length===0&&!Array.isArray(e)&&!_0(e);function ht(e,n,t=new WeakMap){if(e===n)return!0;if(_i(e)||_i(n))return Object.is(e,n);if(_n(e)&&_n(n))return Object.is(e.getTime(),n.getTime());const r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;if(Cc(e,r)||Cc(n,o))return Object.is(e,n);if(!r.length&&Array.isArray(e)!==Array.isArray(n))return!1;const s=t.get(e);if(s&&s.has(n))return!0;if(s)s.add(n);else{const i=new WeakSet;i.add(n),t.set(e,i)}for(const i of r){const a=e[i];if(!(i in n))return!1;if(i!=="ref"){const c=n[i];if(_n(a)&&_n(c)||(Ae(a)||Array.isArray(a))&&(Ae(c)||Array.isArray(c))?!ht(a,c,t):!Object.is(a,c))return!1}}return!0}function Sa(e){const n=I.useRef(!1),t=I.useRef(!1),r=I.useRef(void 0),o=I.useRef(0);o.current++,!t.current&&e&&(t.current=!0,r.current=Ce(e()));const s=I.useCallback((a,c,u)=>{if(a&&(n.current||t.current&&o.current>1)){const d=c();ht(r.current,d)||u(d)}n.current=!0},[]),i=I.useCallback((a,c)=>{a&&(r.current=Ce(c()))},[]);return{resyncIfNeeded:s,snapshot:i}}function x0(e){const n=_a(),{control:t=n,disabled:r,name:o,exact:s}=e||{},i=()=>({...t._formState,defaultValues:t._defaultValues}),[a,c]=I.useState(i),u=I.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:d,snapshot:l}=Sa(i);return xa(()=>{d(!r,i,c);const f=t._subscribe({name:o,formState:u.current,exact:s,callback:p=>{!r&&c({...t._formState,...p,defaultValues:t._defaultValues})}});return()=>{f(),l(!r,i)}},[t,o,r,s,d,l]),I.useEffect(()=>{u.current.isValid&&t._setValid(!0)},[t]),I.useMemo(()=>$f(a,t,u.current,!1),[a,t])}var He=e=>typeof e=="string",xi=(e,n,t,r,o)=>He(e)?(r&&n.watch.add(e),V(t,e,o)):Array.isArray(e)?e.map(s=>(r&&n.watch.add(s),V(t,s,V(o,s)))):(r&&(n.watchAll=!0),t);function S0(e){const n=_a(),{control:t=n,name:r,defaultValue:o,disabled:s,exact:i,compute:a}=e||{},c=I.useRef(o),u=I.useRef(a),d=I.useRef(t),l=I.useRef(r);u.current=a;const f=()=>{const R=t._getWatch(r,c.current);return u.current?u.current(R):R},[p,m]=I.useState(f),v=I.useRef(p),y=I.useCallback(R=>{const z=xi(r,t._names,R||t._formValues,!1,c.current);return u.current?u.current(z):z},[t._formValues,t._names,r]),b=I.useCallback(R=>{if(!s){const z=xi(r,t._names,R||t._formValues,!1,c.current);if(u.current){const L=u.current(z);ht(L,v.current)||(m(L),v.current=L)}else m(z)}},[t._formValues,t._names,s,r]),{resyncIfNeeded:_,snapshot:x}=Sa(f),E=I.useRef(b);E.current=b;const C=I.useRef(y);C.current=y,xa(()=>{d.current!==t||!ht(l.current,r)?(d.current=t,l.current=r,E.current()):_(!s,()=>C.current(),z=>{m(z),v.current=z});const R=t._subscribe({name:r,formState:{values:!0},exact:i,callback:z=>{E.current(z.values)}});return()=>{R(),x(!s,()=>C.current())}},[t,i,r,s,_,x]),I.useEffect(()=>t._removeUnmounted());const O=d.current!==t,T=l.current;return I.useMemo(()=>{if(s)return!1;const R=!O&&!ht(T,r);return O||R},[s,O,r,T])?y():p}function E0(e){const n=_a(),{name:t,disabled:r,control:o=n,shouldUnregister:s,defaultValue:i,exact:a=!0}=e,c=Nf(o._names.array,t),u=I.useMemo(()=>{const E=V(o._formValues,t,V(o._defaultValues,t,i));return ve(E)?y0(o,t):E},[o,t,i]),d=S0({control:o,name:t,defaultValue:u,exact:a}),l=x0({control:o,name:t,exact:a}),f=I.useRef(e),p=I.useRef(null),m=I.useRef(o.register(t,{...e.rules,value:d,...ft(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const v=I.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!V(l.errors,t)},isDirty:{enumerable:!0,get:()=>!!V(l.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!V(l.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!V(l.validatingFields,t)},error:{enumerable:!0,get:()=>V(l.errors,t)}}),[l,t]),y=I.useCallback(E=>{const C=wi(E);return V(o._fields,t)||(m.current=o.register(t,{...f.current.rules,value:C})),m.current.onChange({target:{value:wi(E),name:t},type:hn.CHANGE})},[t,o]),b=I.useCallback(()=>m.current.onBlur({target:{value:V(o._formValues,t),name:t},type:hn.BLUR}),[t,o._formValues]),_=I.useCallback(E=>{E&&(p.current={focus:()=>Xe(E.focus)&&E.focus(),select:()=>Xe(E.select)&&E.select(),setCustomValidity:O=>Xe(E.setCustomValidity)&&E.setCustomValidity(O),reportValidity:()=>Xe(E.reportValidity)&&E.reportValidity()});const C=V(o._fields,t);C&&C._f&&E&&(C._f.ref=p.current,C._f._c=!0)},[o._fields,t]),x=I.useMemo(()=>({name:t,value:d,...ft(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:y,onBlur:b,ref:_}),[t,r,l.disabled,y,b,_,d]);return I.useEffect(()=>{const E=o._options.shouldUnregister||s;m.current=o.register(t,{...f.current.rules,...ft(f.current.disabled)?{disabled:f.current.disabled}:{}});const C=(O,T)=>{const A=V(o._fields,O);A&&A._f&&(A._f.mount=T,A._f._c=T)};if(C(t,!0),E){const O=Ce(V(s?o._defaultValues:o._options.values||o._defaultValues,t,V(o._options.defaultValues,t,f.current.defaultValue)));ge(o._defaultValues,t,O),ve(V(o._formValues,t))&&ge(o._formValues,t,O)}if(!c&&o.register(t,{...f.current.rules,...ft(f.current.disabled)?{disabled:f.current.disabled}:{}}),p.current){const O=V(o._fields,t);O&&O._f&&(O._f.ref=p.current)}return()=>{(c?E&&!o._state.action:E)?o.unregister(t):C(t,!1)}},[t,o,c,s]),I.useEffect(()=>{o._setDisabledField({disabled:r,name:t})},[r,t,o]),I.useMemo(()=>({field:x,formState:l,fieldState:v}),[x,l,v])}const m2=e=>e.render(E0(e));var ko=e=>({isOnSubmit:!e||e===Et.onSubmit,isOnBlur:e===Et.onBlur,isOnChange:e===Et.onChange,isOnAll:e===Et.all,isOnTouch:e===Et.onTouched}),As=(e,n,t)=>{if(t)return!1;if(n.watchAll||n.watch.has(e))return!0;for(const r of n.watch)if(e.startsWith(r)&&e.charAt(r.length)===".")return!0;return!1};const Lr=(e,n,t)=>{for(const r of t||Object.keys(e)){if(r==="_f")continue;const o=t?V(e,r):e[r];if(o){const{_f:s}=o;if(s){if(s.refs&&s.refs[0]&&n(s.refs[0],s.name))return!0;if(s.ref&&n(s.ref,s.name))return!0;if(Lr(o,n))return!0}else if((Ae(o)||Array.isArray(o))&&Lr(o,n))return!0}}};var kc=(e,n,t)=>{const r=V(e,t),o=Array.isArray(r)?r:[];return ge(o,jf,n[t]),ge(e,t,o),e},Me=e=>Ae(e)&&!Object.keys(e).length,Ho=e=>{if(!fs)return!1;const n=e?e.ownerDocument:0;return e instanceof(n&&n.defaultView?n.defaultView.HTMLElement:HTMLElement)},Ea=e=>e.type==="radio",Go=e=>e instanceof RegExp,Ca=(e,n,t,r,o)=>n?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[r]:o||!0}}:{};const Pc={value:!1,isValid:!1},Oc={value:!0,isValid:!0};var zf=e=>{if(!Array.isArray(e))return Pc;if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}const n=e[0];return!n||!n.checked||n.disabled?Pc:!n.attributes||!("value"in n.attributes)||ve(n.value)||n.value===""?Oc:{value:n.value,isValid:!0}};const Rc={isValid:!1,value:null};var Ff=e=>Array.isArray(e)?e.reduce((n,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:n,Rc):Rc;function Tc(e,n,t="validate"){if(He(e)||Array.isArray(e)&&e.every(He)||ft(e)&&!e)return{type:t,message:He(e)?e:"",ref:n}}var Yn=e=>Ae(e)&&!Go(e)?e:{value:e,message:""},Ic=async(e,n,t,r,o,s)=>{const{ref:i,refs:a,required:c,maxLength:u,minLength:d,min:l,max:f,pattern:p,validate:m,name:v,valueAsNumber:y,mount:b,_c:_}=e._f,x=V(t,v);if(!b||n.has(v))return{};const E=a?a[0]:i,C=Z=>{if(o&&E.reportValidity){const q=ft(Z)?"":Z||"";a?a.forEach(B=>Xe(B.setCustomValidity)&&B.setCustomValidity(q)):E.setCustomValidity(q),E.reportValidity()}},O={},T=Ea(i),A=co(i),R=T||A,z=(y||ds(i))&&ve(i.value)&&ve(x)||Ho(i)&&i.value===""&&!_||x===""||Array.isArray(x)&&!x.length,L=Ca.bind(null,v,r,O),$=(Z,q,B,J=Be.maxLength,ue=Be.minLength)=>{const ee=Z?q:B;O[v]={type:Z?J:ue,message:ee,ref:i,...L(Z?J:ue,ee)}};if(s?!Array.isArray(x)||!x.length:c&&(!R&&(z||Ke(x))||ft(x)&&!x||A&&!zf(a).isValid||T&&!Ff(a).isValid)){const{value:Z,message:q}=He(c)?{value:!!c,message:c}:Yn(c);if(Z&&(O[v]={type:Be.required,message:q,ref:E,...L(Be.required,q)},!r))return C(q),O}if(!z&&(!Ke(l)||!Ke(f))){let Z,q;const B=Yn(f),J=Yn(l);if(!Ke(x)&&!_n(x)&&!isNaN(x)){const ue=i.valueAsNumber||x&&+x;Ke(B.value)||(Z=ue>B.value),Ke(J.value)||(q=ue<J.value)}else{const ue=i.valueAsDate||new Date(x),ee=fe=>new Date(new Date().toDateString()+" "+fe),Q=i.type=="time",oe=i.type=="week";He(B.value)&&x&&(Z=Q?ee(x)>ee(B.value):oe?x>B.value:ue>new Date(B.value)),He(J.value)&&x&&(q=Q?ee(x)<ee(J.value):oe?x<J.value:ue<new Date(J.value))}if((Z||q)&&($(!!Z,B.message,J.message,Be.max,Be.min),!r))return C(O[v].message),O}if((u||d)&&!z&&(He(x)||s&&Array.isArray(x))){const Z=Yn(u),q=Yn(d),B=!Ke(Z.value)&&x.length>+Z.value,J=!Ke(q.value)&&x.length<+q.value;if((B||J)&&($(B,Z.message,q.message),!r))return C(O[v].message),O}if(p&&!z&&He(x)){const{value:Z,message:q}=Yn(p);if(Go(Z)&&!x.match(Z)&&(O[v]={type:Be.pattern,message:q,ref:i,...L(Be.pattern,q)},!r))return C(q),O}if(m){if(Xe(m)){const Z=await m(x,t),q=Tc(Z,E);if(q&&(O[v]={...q,...L(Be.validate,q.message)},!r))return C(q.message),O}else if(Ae(m)){let Z={};for(const q in m){if(!Me(Z)&&!r)break;const B=Tc(await m[q](x,t),E,q);B&&(Z={...B,...L(q,B.message)},r||C(B.message),r&&(O[v]=Z))}if(!Me(Z)&&(O[v]={ref:E,...Z},!r))return O}}const G=O[v];return C(G?G.message:!0),O},Fo=e=>Array.isArray(e)?e:[e],Lf=e=>Array.isArray(e)?e.filter(Boolean):[];function C0(e,n){const t=n.length-1;let r=0;for(;r<t;){if(Ke(e)){e=void 0;break}e=e[n[r]],r++}return e}function k0(e){for(const n in e)if(e.hasOwnProperty(n)&&!ve(e[n]))return!1;return!0}function je(e,n){if(He(n)&&Object.prototype.hasOwnProperty.call(e,n))return delete e[n],e;const t=Array.isArray(n)?n:vr(n)?[n]:Fn(n);if(t.some(i=>wa.includes(String(i))))return e;const r=t.length===1?e:C0(e,t),o=t.length-1,s=t[o];return r&&delete r[s],o!==0&&(Ae(r)&&Me(r)||Array.isArray(r)&&k0(r))&&je(e,t.slice(0,-1)),e}const P0=I.createContext(null);P0.displayName="HookFormContext";var Ac=()=>{let e=[];return{get observers(){return e},next:o=>{for(const s of e)s.next&&s.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(s=>s!==o)}}),unsubscribe:()=>{e=[]}}};function Vf(e,n){const t=Array.isArray(e)?[]:{};for(const r in e)if(e.hasOwnProperty(r)){const o=e[r],s=n[r];o&&(Ae(o)||Array.isArray(o))&&s?t[r]=Vf(o,s):e[r]&&(t[r]=s)}return t}const Dc=(e,n)=>e!==null&&ba(e)&&Object.prototype.hasOwnProperty.call(e,n);var O0=(e,n)=>{if(!n)return!1;let t=e;for(const r of vr(n)?[n]:Fn(n)){if(!Dc(t,r))return Dc(e,n);t=t[r]}return!0},Uf=e=>e.type==="select-multiple",R0=e=>Ea(e)||co(e),Ds=e=>Ho(e)&&e.isConnected;function Nc(e){return Array.isArray(e)||Ae(e)}function Zf(e,n,t="",r=[]){for(const o in e){const s=t?`${t}.${o}`:o,i=e[o];Nc(i)&&Nc(V(n,s))?Zf(i,n,s,r):r.push(s)}return r}var T0=e=>{for(const n in e)if(Xe(e[n]))return!0;return!1};function Bf(e){return Array.isArray(e)||Ae(e)&&!T0(e)}function Kf(e){return!!(e&&"_f"in e)}function Wf(e){return Array.isArray(e)?!e.some(n=>!ve(n)):!Object.keys(e).length}function Si(e,n){Array.isArray(e)?e[n]=void 0:delete e[n]}function Ei(e,n={},t){for(const r in e){const o=e[r],s=t&&t[r];Bf(o)&&(!Array.isArray(o)||!Kf(s))?(n[r]=Array.isArray(o)?[]:{},Ei(o,n[r],s),Wf(n[r])&&Si(n,r)):ve(o)||(n[r]=!0)}return n}function dn(e,n,t,r){t||(t=Ei(n,{},r));for(const o in e){const s=e[o],i=r&&r[o];Bf(s)&&(!Array.isArray(s)||!Kf(i))?(ve(n)||_i(t[o])?t[o]=Ei(s,Array.isArray(s)?[]:{},i):dn(s,Ke(n)?{}:n[o],t[o],i),Wf(t[o])&&Si(t,o)):ht(s,n[o])?Si(t,o):t[o]=!0}return t}var I0=(e,n)=>{const t=n.split("."),r=[];let o=t[0];for(let s=1;s<t.length;o+="."+t[s++])!isNaN(+t[s])&&e.has(o)&&r.push(`${o}.${t[s]}`);return r},Ci=(e,{valueAsNumber:n,valueAsDate:t,setValueAs:r})=>ve(e)?e:n?e===""?NaN:e&&+e:t&&He(e)?new Date(e):r?r(e):e;function jc(e){const n=e.ref;return ds(n)?n.files:Ea(n)?Ff(e.refs).value:Uf(n)?[...n.selectedOptions].map(({value:t})=>t):co(n)?zf(e.refs).value:Ci(n.value,e)}var A0=(e,n,t,r)=>{const o={};for(const s of e){const i=V(n,s);i&&ge(o,s,i._f)}return{criteriaMode:t,names:[...e],fields:o,shouldUseNativeValidation:r}},Nr=e=>ve(e)?e:Go(e)?e.source:Ae(e)?Go(e.value)?e.value.source:e.value:e;const Mc="AsyncFunction";var D0=e=>{if(!e||!e.validate)return!1;if(Xe(e.validate))return e.validate.constructor.name===Mc;if(Ae(e.validate)){for(const n in e.validate)if(e.validate[n].constructor.name===Mc)return!0}return!1},N0=e=>e.mount&&(e.required||!ve(e.required)&&e.required!==!1||!ve(e.min)||!ve(e.max)||!ve(e.maxLength)||!ve(e.minLength)||e.pattern||e.validate);function $c(e,n,t){const r=V(e,t);if(r!=null&&r.type||r!=null&&r.message||Array.isArray(r))return{error:r,name:t};const o=t.split(".");for(;o.length;){const s=o.join("."),i=V(n,s),a=V(e,s);if(i&&!Array.isArray(i)&&t!==s)return{name:t};if(a&&a.type)return{name:s,error:a};if(a&&a.root&&a.root.type)return{name:`${s}.root`,error:a.root};o.pop()}return{name:t}}var j0=(e,n,t,r)=>{t(e);const o=Object.keys(e).filter(s=>s!=="name");return!o.length||r&&o.length>=Object.keys(n).length||o.find(s=>n[s]===(!r||Et.all))},M0=(e,n,t)=>!e||!n||e===n||Fo(e).some(r=>r&&(t?r===n||r.startsWith(n+"."):r.startsWith(n)||n.startsWith(r))),$0=(e,n,t,r,o)=>o.isOnAll?!1:!t&&o.isOnTouch?!(n||e):(t?r.isOnBlur:o.isOnBlur)?!e:(t?r.isOnChange:o.isOnChange)?e:!0,z0=(e,n)=>{const t=V(e,n);!Lf(t).length&&!(t!=null&&t.root)&&je(e,n)};const F0={mode:Et.onSubmit,reValidateMode:Et.onChange,shouldFocusError:!0},L0=(e,n)=>{for(const t in e)t in n||delete e[t];Object.assign(e,n)},Hf={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function V0(e={}){let n={...F0,...e},t={...Ce(Hf),isLoading:Xe(n.defaultValues),errors:n.errors||{},disabled:n.disabled||!1},r={},o=Ae(n.defaultValues)||Ae(n.values)?Ce(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:Ce(o),i={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set};const c={},u={};let d=0,l=ko(n.mode),f=ko(n.reValidateMode);const p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...p};let v={...m};const y=(...w)=>w.some(k=>m[k]||v[k]),b={array:Ac(),state:Ac()};let _=0,x=0,E=n.criteriaMode===Et.all;const C=(w,k)=>P=>{clearTimeout(u[w]),u[w]=setTimeout(k,P)},O=w=>{clearTimeout(u[w]),delete u[w],delete c[w]},T=w=>{O(w);const k=`${w}.`;for(const P of Object.keys(c))P.startsWith(k)&&O(P)},A=async w=>{if(!i.keepIsValid&&!n.disabled&&(y("isValid")||w)){const k=++_;let P;n.resolver?(P=Me((await ee()).errors),k===_&&R()):P=await fe({fields:r,onlyCheckValid:!0,eventType:hn.VALID}),k===_&&P!==t.isValid&&b.state.next({isValid:P})}},R=(w,k)=>{!n.disabled&&y("isValidating","validatingFields")&&((w||a.mount).forEach(P=>{P&&(k?ge(t.validatingFields,P,k):je(t.validatingFields,P))}),b.state.next({validatingFields:t.validatingFields,isValidating:!Me(t.validatingFields)}))},z=()=>{t.dirtyFields=dn(o,s,void 0,r)},L=(w,k=[],P,N,D=!0,U=!0)=>{if(N&&P&&!n.disabled){i.action=!0;const M=V(r,w);if(i.actionArrayLengths.has(w)||i.actionArrayLengths.set(w,Array.isArray(M)?M.length:0),U&&Array.isArray(M)){const le=P(M,N.argA,N.argB);D&&ge(r,w,le)}const K=V(t.errors,w);if(U&&Array.isArray(K)){const le=K.root,Ee=P(K,N.argA,N.argB)||K;le&&(Ee.root=le),D&&ge(t.errors,w,Ee),z0(t.errors,w)}const W=V(t.touchedFields,w),F=U&&Array.isArray(W);if(F){const le=P(W,N.argA,N.argB);D&&ge(t.touchedFields,w,le)}const ie=V(t.dirtyFields,w);if(U&&Array.isArray(ie)){const le=P(ie,N.argA,N.argB)||ie;D&&ge(t.dirtyFields,w,le)}y("dirtyFields")&&z(),b.state.next({name:w,isDirty:te(w,k),dirtyFields:t.dirtyFields,...F&&{touchedFields:t.touchedFields},errors:t.errors,isValid:t.isValid})}else ge(s,w,k)},$=(w,k)=>{ge(t.errors,w,k),t.errors={...t.errors},b.state.next({errors:t.errors})},G=w=>{Object.keys(c).forEach(O);const k=!Me(w);t.errors=w,b.state.next({errors:t.errors,...k?{isValid:!1}:{}}),!k&&i.mount&&A()},Z=w=>{const k=vr(w)?[w]:Fn(w);let P=s,N=o;for(let D=0;D<k.length-1;D++){const U=k[D];if(P=Ke(P)?P:P[U],N=Ke(N)?N:N[U],P===null&&N!==null)return!0}return!1},q=w=>{if(!i.actionArrayLengths.size)return!1;const k=vr(w)?[w]:Fn(w);let P=s,N="",D=-1,U=0;for(let M=0;M<k.length;M++){if(Ke(P))return!1;const K=k[M];if(N=N?`${N}.${K}`:K,Array.isArray(P)&&+K>=P.length)return D===-1?!1:M===D?+K<U:!0;if(i.actionArrayLengths.has(N)&&(D=M+1,U=i.actionArrayLengths.get(N)),P=P[K],ve(P)&&D!==-1&&M>D&&+k[D]<U)return!0}return!1},B=(w,k,P,N)=>{const D=V(r,w);if(D){if(Z(w)||q(w))return;const U=ve(V(s,w)),M=V(s,w,ve(P)?V(o,w):P);ve(M)||N&&N.defaultChecked||k?ge(s,w,k?M:jc(D._f)):be(w,M),i.mount&&!i.action&&(n.resolver&&y("isValidating","validatingFields")?Promise.resolve().then(()=>A()):A(),U&&t.isDirty&&y("isDirty")&&(te()||(t.isDirty=!1,b.state.next({...t}))),e.shouldUnregister&&U&&!ve(V(s,w))&&As(w,a)&&(i.watch=!0))}},J=(w,k,P,N,D)=>{let U=!1,M=!1;const K={name:w};if(!n.disabled||N===!0){if(!P||N){const W=ht(V(o,w),k);y("isDirty")&&(M=t.isDirty,t.isDirty=K.isDirty=!W||te(),U=M!==K.isDirty),M=!!V(t.dirtyFields,w),W!==t.isDirty?L0(t.dirtyFields,dn(o,s,void 0,r)):W?je(t.dirtyFields,w):ge(t.dirtyFields,w,!0),K.dirtyFields=t.dirtyFields,U=U||y("dirtyFields")&&M!==!W}if(P){const W=V(t.touchedFields,w);W||(ge(t.touchedFields,w,P),K.touchedFields=t.touchedFields,U=U||y("touchedFields")&&W!==P)}U&&D&&b.state.next(K)}return U?K:{}},ue=(w,k,P,N)=>{const D=V(t.errors,w),U=y("isValid")&&ft(k)&&t.isValid!==k;if(n.delayError&&P?(c[w]=C(w,()=>$(w,P)),c[w](n.delayError)):(O(w),P?ge(t.errors,w,P):je(t.errors,w),t.errors={...t.errors}),(P?!ht(D,P):D)||!Me(N)||U){const M={...N,...U&&ft(k)?{isValid:k}:{},errors:t.errors,name:w};b.state.next(M)}},ee=async w=>(R(w,!0),await n.resolver(s,n.context,A0(w||a.mount,r,n.criteriaMode,n.shouldUseNativeValidation))),Q=async w=>{const k=x,{errors:P}=await ee(w);if(k!==x)return P;if(R(w),w){for(const N of w){const D=V(P,N);T(N);const U=a.array.has(N)&&Ae(D)&&!Object.keys(D).some(W=>!Number.isNaN(Number(W))),M=V(r,N),K=Ae(M)&&Object.keys(M).some(W=>W!=="_f");U?kc(t.errors,{[N]:D},N):D!=null&&D.type||D!=null&&D.message||Array.isArray(D)||Ae(D)&&K?ge(t.errors,N,D):je(t.errors,N)}t.errors={...t.errors}}else Object.keys(c).forEach(O),t.errors=P;return P},oe=async({name:w,eventType:k})=>{if(n.validate){const P=x,N=await n.validate({formValues:s,formState:t,name:w,eventType:k});if(P!==x)return!0;if(Ae(N)){let D=!0;an($r);for(const U in N){const M=N[U];M&&(D=!1,tt(`${$r}.${U}`,{message:He(M.message)?M.message:"",type:M.type||Be.validate}))}return D}else return He(N)||!N?(tt($r,{message:N||"",type:Be.validate}),!1):(an($r),!0)}return!0},fe=async({fields:w,onlyCheckValid:k,name:P,eventType:N,context:D={valid:!0,runRootValidation:!1}})=>{const U=x;if(n.validate&&!D.runRootValidation&&(D.runRootValidation=!0,!await oe({name:P,eventType:N})&&(D.valid=!1,k)))return D.valid;for(const M in w){const K=w[M];if(K){const{_f:W,...F}=K;if(W){const ie=a.array.has(W.name),le=K._f&&D0(K._f),Ee=y("isValidating","validatingFields");le&&Ee&&R([W.name],!0);const Je=await Ic(K,a.disabled,s,E,n.shouldUseNativeValidation&&!k,ie);if(U!==x)return D.valid;if(le&&Ee&&R([W.name]),Je[W.name]&&(D.valid=!1,k)||(k||(O(W.name),V(Je,W.name)?ie?kc(t.errors,Je,W.name):ge(t.errors,W.name,Je[W.name]):je(t.errors,W.name)),e.shouldUseNativeValidation&&Je[W.name]))break}!Me(F)&&await fe({context:D,onlyCheckValid:k,fields:F,name:M,eventType:N})}}return D.valid},_e=()=>{for(const w of a.unMount){const k=V(r,w);k&&(k._f.refs?k._f.refs.every(P=>!Ds(P)):!Ds(k._f.ref))&&Wn(w)}a.unMount=new Set},te=(w,k)=>(w&&k&&ge(s,w,k),!ht(i.mount?s:o,o)),ce=(w,k,P)=>xi(w,a,{...i.mount?s:ve(k)||He(w)?o:k},P,k),he=w=>Lf(V(i.mount?s:o,w,n.shouldUnregister?V(o,w,[]):[])),be=(w,k,P={},N=!1,D=!1,U=!1)=>{const M=V(r,w);let K=k;if(M){const W=M._f;W&&(!W.disabled&&ge(s,w,Ci(k,W)),K=Ho(W.ref)&&Ke(k)?"":k,Uf(W.ref)?[...W.ref.options].forEach(F=>F.selected=K.includes(F.value)):W.refs?co(W.ref)?W.refs.forEach(F=>{(!F.defaultChecked||!F.disabled)&&(Array.isArray(K)?F.checked=!!K.find(ie=>ie===F.value):F.checked=K===F.value||!!K)}):W.refs.forEach(F=>F.checked=F.value===K):ds(W.ref)?W.ref.value="":(W.ref.value=K,!W.ref.type&&!D&&!U&&b.state.next({name:w,values:N?s:Ce(s)})))}(P.shouldDirty||P.shouldTouch)&&J(w,M&&M._f&&!M._f.disabled&&(M._f.valueAsNumber||M._f.valueAsDate||M._f.setValueAs)?Ci(k,M._f):K,P.shouldTouch,P.shouldDirty,!D),P.shouldValidate&&ot(w,{delayError:P.delayError}),P.shouldValidate&&M&&M._f&&M._f.deps&&(!Array.isArray(M._f.deps)||M._f.deps.length>0)&&ot(M._f.deps)},ke=(w,k,P,N=!1,D=!1,U=!1)=>{a.array.has(w)&&b.array.next({name:w,values:N?s:Ce(s)});for(const M in k){if(!k.hasOwnProperty(M))continue;const K=k[M],W=w+"."+M,F=V(r,W);(a.array.has(w)||Ae(K)||F&&!F._f)&&!_n(K)?ke(W,K,P,N,D,U):be(W,K,P,N,D,U)}},pe=(w,k,P,N,D=!1)=>{const U=V(r,w),M=a.array.has(w),K=N?k:Ce(k),W=V(s,w),F=ht(W,K);if(F||ge(s,w,K),M)b.array.next({name:w,values:N?s:Ce(s)}),y("isDirty","dirtyFields")&&P.shouldDirty&&(z(),D||b.state.next({name:w,dirtyFields:t.dirtyFields,isDirty:te(w,K)})),P.shouldValidate&&ot(w,{delayError:P.delayError});else{const ie=Array.isArray(K)&&!K.length||Me(K),le=!F&&!D;!U||U._f||Ke(K)||ie?be(w,K,P,N,D,le):ke(w,K,P,N,D,le)}if(!F&&!D){const ie=As(w,a),le=N?s:Ce(s);if(b.state.next({...ie&&t,name:i.mount||ie?w:void 0,values:le}),!M)for(const Ee of I0(a.array,w))b.state.next({name:Ee,values:le})}},Se=(w,k,P={})=>pe(w,k,P,!1),rt=(w,k={})=>{const P=Xe(w)?w(s):w;if(!ht(s,P)){s={...s,...P};for(const N of a.mount)O0(P,N)&&pe(N,V(P,N),k,!0,!0);b.state.next({...t,name:void 0,type:void 0,...d?{values:s}:{}}),k.shouldValidate&&A()}},lt=async w=>{i.mount=!0;const k=w.target;let P=k.name,N=!0;const D=V(r,P),U=M=>{N=Number.isNaN(M)||_n(M)&&isNaN(M.getTime())||ht(M,V(s,P,M))};if(D){let M,K;const W=k.type?jc(D._f):wi(w),F=w.type===hn.BLUR||w.type===hn.FOCUS_OUT,ie=!N0(D._f)&&!n.validate&&!n.resolver&&!V(t.errors,P)&&!D._f.deps,le=ie||$0(F,V(t.touchedFields,P),t.isSubmitted,f,l),Ee=As(P,a,F);if(ge(s,P,Ce(W)),F){if(!k||!k.readOnly){D._f.onBlur&&D._f.onBlur(w);const ze=c[P];ze&&ze(0)}}else D._f.onChange&&D._f.onChange(w);const Je=J(P,W,F),Ue=!Me(Je)||Ee;if(!F&&b.state.next({name:P,type:w.type,...d?{values:Ce(s)}:{}}),le)return(!ie||!t.isValid)&&y("isValid")&&(n.mode==="onBlur"?F&&A():F||A()),Ue&&b.state.next({name:P,...Ee?{}:Je});if(!n.resolver&&n.validate&&await oe({name:P,eventType:w.type}),!F&&Ee&&b.state.next({...t}),n.resolver){const ze=x,{errors:gt}=await ee([P]);if(ze!==x)return;if(R([P]),U(W),!N){!Me(Je)&&b.state.next(Je);return}const Ir=$c(t.errors,r,P),vt=$c(gt,r,Ir.name||P);M=vt.error,P=vt.name,K=Me(gt)}else{const ze=x;if(R([P],!0),M=(await Ic(D,a.disabled,s,E,n.shouldUseNativeValidation))[P],ze!==x)return;if(R([P]),U(W),N){if(M)K=!1;else if(y("isValid")&&(K=await fe({fields:r,onlyCheckValid:!0,name:P,eventType:w.type}),ze!==x))return}}N&&(D._f.deps&&(!Array.isArray(D._f.deps)||D._f.deps.length>0)&&ot(D._f.deps),ue(P,K,M,Je))}},Qe=(w,k)=>{if(V(t.errors,k)&&w.focus)return w.focus(),1},ot=async(w,k={})=>{let P,N;const D=Fo(w);if(n.resolver){const U=x,M=await Q(ve(w)?w:D);if(P=Me(M),N=w?!D.some(K=>V(M,K)):P,U!==x)return N}else w?(N=(await Promise.all(D.map(async U=>{const M=V(r,U);return await fe({fields:M&&M._f?{[U]:M}:M,eventType:hn.TRIGGER})}))).every(Boolean),!(!N&&!t.isValid)&&A()):N=P=await fe({fields:r,name:w,eventType:hn.TRIGGER});if(k.delayError&&n.delayError&&He(w)){const U=V(t.errors,w);U?(je(t.errors,w),c[w]=C(w,()=>$(w,U)),c[w](n.delayError)):O(w)}if(k.shouldTouch)for(const U of w?D:a.mount)!a.array.has(U)&&ge(t.touchedFields,U,!0);return b.state.next({...!He(w)||y("isValid")&&P!==t.isValid?{}:{name:w},...n.resolver||!w?{isValid:P}:{},...k.shouldTouch&&y("touchedFields")?{touchedFields:t.touchedFields}:{},errors:t.errors}),k.shouldFocus&&!N&&Lr(r,Qe,w?D:a.mount),N},on=(w,k)=>{let P={...i.mount?s:o};return k&&(P=Vf(k.dirtyFields?t.dirtyFields:t.touchedFields,P)),ve(w)?P:He(w)?V(P,w):w.map(N=>V(P,N))},sn=w=>ve(w)?{...t.errors}:He(w)?V(t.errors,w):w.map(k=>V(t.errors,k)),Ot=(w,k)=>{const P=k||t,N=V(P.errors,w);return{invalid:!!N,isDirty:!!V(P.dirtyFields,w),error:N,isValidating:!!V(P.validatingFields,w),isTouched:!!V(P.touchedFields,w)}},an=w=>{const k=w?Fo(w):void 0;k?k.forEach(P=>{T(P),je(t.errors,P),b.state.next({name:P,errors:t.errors})}):(Object.keys(c).forEach(O),t.errors={},b.state.next({errors:t.errors}))},tt=(w,k,P)=>{T(w);const N=(V(r,w,{_f:{}})._f||{}).ref,D=V(t.errors,w)||{},{ref:U,message:M,type:K,types:W,...F}=D;ge(t.errors,w,{...F,...k,ref:N}),b.state.next({name:w,errors:t.errors,isValid:!1}),P&&P.shouldFocus&&N&&N.focus&&N.focus()},Pr=(w,k)=>{if(Xe(w)){d++;const{unsubscribe:P}=b.state.subscribe({next:D=>"values"in D&&w(D.values||ce(void 0,k),D)});let N=!1;return{unsubscribe:()=>{N||(N=!0,d--,P())}}}return ce(w,k,!0)},Kn=w=>{var k;const P=!!(!((k=w.formState)===null||k===void 0)&&k.values);P&&d++;const{unsubscribe:N}=b.state.subscribe({next:U=>{if(M0(w.name,U.name,w.exact)&&j0(U,w.formState||m,Kt,w.reRenderRoot)){const M={...s};w.callback({values:M,...t,...U,defaultValues:o})}}});if(!P)return N;let D=!1;return()=>{D||(D=!0,d--,N())}},Ne=w=>(i.mount=!0,v={...v,...w.formState},Kn({...w,formState:{...p,...w.formState}})),Wn=(w,k={})=>{for(const P of w?Fo(w):a.mount)a.mount.delete(P),a.array.delete(P),a.disabled.delete(P),k.keepValue||(je(r,P),je(s,P)),k.keepError||(T(P),je(t.errors,P)),!k.keepDirty&&je(t.dirtyFields,P),!k.keepTouched&&je(t.touchedFields,P),!k.keepIsValidating&&je(t.validatingFields,P),!n.shouldUnregister&&!k.keepDefaultValue&&je(o,P);d&&b.state.next({values:Ce(s)}),b.state.next({...t,...k.keepDirty?{}:{isDirty:te()},...k.keepIsValidating?{}:{isValidating:!Me(t.validatingFields)}}),!k.keepIsValid&&A()},Zt=({disabled:w,name:k})=>{if(ft(w)&&i.mount||w||a.disabled.has(k)){const D=a.disabled.has(k)!==!!w;w?a.disabled.add(k):a.disabled.delete(k),D&&i.mount&&!i.action&&A()}},Or=(w,k={})=>{let P=V(r,w);const N=ft(k.disabled)||ft(n.disabled),D=!a.registerName.has(w)&&P&&P._f&&!P._f.mount;if(ge(r,w,{...P||{},_f:{...P&&P._f?P._f:{ref:{name:w}},name:w,mount:!0,...k}}),a.mount.add(w),P&&P._f){const U=V(r,w);for(const M of b0)M in k||delete U._f[M]}return P&&!D?Zt({disabled:ft(k.disabled)?k.disabled:n.disabled,name:w}):B(w,!0,k.value),{...N?{disabled:k.disabled||n.disabled}:{},...n.progressive?{required:!!k.required,min:Nr(k.min),max:Nr(k.max),minLength:Nr(k.minLength),maxLength:Nr(k.maxLength),pattern:Nr(k.pattern)}:{},name:w,onChange:lt,onBlur:lt,ref:U=>{if(U){a.registerName.add(w),Or(w,k),a.registerName.delete(w),P=V(r,w);const M=ve(U.value)&&U.querySelectorAll&&U.querySelectorAll("input,select,textarea")[0]||U,K=R0(M),W=P._f.refs||[];if(K?W.find(ie=>ie===M):M===P._f.ref)return;const F={...P._f};K?(F.refs=[...W.filter(Ds),M,...Array.isArray(V(o,w))?[{}]:[]],F.ref={type:M.type,name:w}):(F.ref=M,delete F.refs),ge(r,w,{_f:F}),B(w,!1,void 0,M)}else P=V(r,w,{}),P._f&&(P._f.mount=!1),(n.shouldUnregister||k.shouldUnregister)&&!(Nf(a.array,w)&&i.action)&&a.unMount.add(w)}}},Rr=()=>n.shouldFocusError&&!n.shouldUseNativeValidation&&Lr(r,Qe,a.mount),Hn=w=>{ft(w)&&(b.state.next({disabled:w}),Lr(r,(k,P)=>{const N=V(r,P);N&&(k.disabled=N._f.disabled||w,Array.isArray(N._f.refs)&&N._f.refs.forEach(D=>{D.disabled=N._f.disabled||w}))},0))},uo=(w,k)=>async P=>{let N,D;P&&(P.preventDefault&&P.preventDefault(),P.persist&&P.persist());let U=Ce(s);if(b.state.next({isSubmitting:!0}),n.resolver){const M=x,{errors:K,values:W}=await ee();if(M!==x)return;R(),Object.keys(c).forEach(O),t.errors=K,U=Ce(W)}else{const M=x;if(await fe({fields:r,eventType:hn.SUBMIT}),M!==x)return;je(t.errors,jf)}if(a.disabled.size)for(const M of a.disabled)je(U,M);if(Me(t.errors)){b.state.next({errors:{}});try{N=await w(U,P)}catch(M){D=M}}else k&&await k({...t.errors},P),Rr(),setTimeout(Rr);if(b.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Me(t.errors)&&!D,submitCount:t.submitCount+1,errors:t.errors}),D)throw D;return N},fo=(w,k={})=>{V(r,w)&&(je(t.validatingFields,w),ve(k.defaultValue)?Se(w,Ce(V(o,w))):(Se(w,k.defaultValue),ge(o,w,Ce(k.defaultValue))),k.keepTouched||je(t.touchedFields,w),k.keepDirty||(je(t.dirtyFields,w),t.isDirty=k.defaultValue?te(w,Ce(V(o,w))):te()),k.keepError||(T(w),je(t.errors,w),A()),b.state.next({...t,isValidating:!Me(t.validatingFields)}))},Gn=(w,k={})=>{x++;const P=w?Ce(w):o,N=Ce(P),D=Me(w),U=N,M=r;if(Object.keys(c).forEach(O),k.keepDefaultValues||(o=P),!k.keepValues){if(k.keepDirtyValues){const K=new Set([...a.mount,...Zf(dn(o,s,void 0,M),t.dirtyFields)]);for(const W of K){const F=V(t.dirtyFields,W),ie=V(s,W),le=V(U,W);F&&!ve(ie)?ge(U,W,ie):!F&&!ve(le)&&Se(W,le)}}else{if(fs&&ve(w))for(const K of a.mount){const W=V(r,K);if(W&&W._f){const F=Array.isArray(W._f.refs)?W._f.refs[0]:W._f.ref;if(Ho(F)){const ie=F.closest("form");if(ie){ie.reset();break}}}}if(k.keepFieldsRef)for(const K of a.mount)Se(K,V(U,K));else r={}}if(n.shouldUnregister){if(s=k.keepDefaultValues?Ce(o):{},k.keepFieldsRef)for(const K of a.mount)ge(s,K,V(U,K))}else s=Ce(U);b.array.next({values:{...U}}),b.state.next({name:void 0,type:void 0,values:{...U}})}a={mount:k.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},i.mount=!m.isValid||!!k.keepIsValid||!!k.keepDirtyValues||!n.shouldUnregister&&!Me(U),i.watch=!!n.shouldUnregister,i.keepIsValid=!!k.keepIsValid,i.action=!1,i.actionArrayLengths.clear(),k.keepErrors||(t.errors={}),b.state.next({submitCount:k.keepSubmitCount?t.submitCount:0,isDirty:D?!1:k.keepDirty?t.isDirty:k.keepValues?te():!!(k.keepDefaultValues&&!ht(w,o)),isSubmitted:k.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:D?{}:k.keepDirtyValues?k.keepDefaultValues&&s?dn(o,s,void 0,M):t.dirtyFields:k.keepDefaultValues&&w?dn(o,w,void 0,M):k.keepDirty?t.dirtyFields:k.keepValues?dn(o,s,void 0,M):{},touchedFields:k.keepTouched?t.touchedFields:{},...!k.keepIsValidating&&(t.isValidating||!Me(t.validatingFields))?{validatingFields:{},isValidating:!1}:null,errors:k.keepErrors?t.errors:{},isSubmitSuccessful:k.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:o})},Bt=(w,k)=>Gn(Xe(w)?w(s):w,{...n.resetOptions,...k}),ho=(w,k={})=>{const P=V(r,w),N=P&&P._f;if(N){const D=N.refs?N.refs[0]:N.ref;D.focus&&setTimeout(()=>{D.focus(),k.shouldSelect&&Xe(D.select)&&D.select()})}},Kt=w=>{const{name:k,type:P,values:N,...D}=w;t={...t,...D}};b.state.subscribe({next:Kt});const Tr={control:{register:Or,unregister:Wn,getFieldState:Ot,handleSubmit:uo,setError:tt,_subscribe:Kn,_runSchema:ee,_updateIsValidating:R,_focusError:Rr,_getWatch:ce,_getDirty:te,_setValid:A,_setFieldArray:L,_setDisabledField:Zt,_setErrors:G,_getFieldArray:he,_reset:Gn,_resetDefaultValues:()=>Xe(n.defaultValues)&&n.defaultValues().then(w=>{Bt(w,n.resetOptions),b.state.next({isLoading:!1})}),_removeUnmounted:_e,_disableForm:Hn,_subjects:b,_proxyFormState:m,get _fields(){return r},get _formValues(){return s},get _state(){return i},set _state(w){i=w},get _defaultValues(){return o},get _names(){return a},set _names(w){a=w},get _formState(){return t},get _options(){return n},set _options(w){n={...n,...w},l=ko(n.mode),f=ko(n.reValidateMode),E=n.criteriaMode===Et.all}},subscribe:Ne,trigger:ot,register:Or,handleSubmit:uo,watch:Pr,setValue:Se,setValues:rt,getValues:on,getErrors:sn,reset:Bt,resetField:fo,resetDefaultValues:(w,k={})=>{if(o=Ce(w),!k.keepDirty){const P=dn(o,s,void 0,r);t.dirtyFields=P,t.isDirty=!Me(P)}k.keepIsValid||A(),b.state.next({...t,defaultValues:o})},clearErrors:an,unregister:Wn,setError:tt,setFocus:ho,getFieldState:Ot};return{...Tr,formControl:Tr}}function U0(e={}){const n=I.useRef(void 0),t=I.useRef(void 0),r=I.useRef(e.formControl),o=I.useRef(!!e.validate),[s,i]=I.useState(()=>({...Ce(Hf),isLoading:Xe(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Xe(e.defaultValues)?void 0:e.defaultValues}));if(!n.current||e.formControl&&r.current!==e.formControl)if(r.current=e.formControl,e.formControl)n.current={...e.formControl,formState:s},e.defaultValues&&!Xe(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...f}=V0(e);n.current={...f,formState:s}}const a=n.current.control;a._options={...e,validate:e.validate};const c=()=>({...a._formState,defaultValues:a._defaultValues}),{resyncIfNeeded:u,snapshot:d}=Sa(c);return xa(()=>{u(!0,c,i);const l=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState,defaultValues:a._defaultValues}),reRenderRoot:!0});return i(f=>({...f,isReady:!0})),a._formState.isReady=!0,()=>{l(),d(!0,c)}},[a,u,d]),I.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),I.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),I.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),I.useEffect(()=>{var l;o.current&&!e.validate&&((l=n.current)===null||l===void 0||l.clearErrors($r)),o.current=!!e.validate},[e.validate]),I.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),I.useEffect(()=>{if(a._proxyFormState.isDirty){const l=a._getDirty();l!==s.isDirty&&a._subjects.state.next({isDirty:l})}},[a,s.isDirty]),I.useEffect(()=>{var l;e.values&&!ht(e.values,t.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),!((l=a._options.resetOptions)===null||l===void 0)&&l.keepIsValid||a._setValid(),t.current=e.values,i(f=>({...f}))):a._resetDefaultValues()},[a,e.values]),I.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),n.current.formState=I.useMemo(()=>$f(s,a),[a,s]),n.current}const zc=(e,n,t)=>{if(e&&"reportValidity"in e){const r=V(t,n);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},ki=(e,n)=>{for(const t in n.fields){const r=n.fields[t];r&&r.ref&&"reportValidity"in r.ref?zc(r.ref,t,e):r&&r.refs&&r.refs.forEach(o=>zc(o,t,e))}},Fc=(e,n)=>{n.shouldUseNativeValidation&&ki(e,n);const t={};for(const r in e){const o=V(n.fields,r),s=Object.assign(e[r]||{},{ref:o&&o.refs?o.refs[0]:o&&o.ref});if(Z0(n.names||Object.keys(e),r)){const i=Object.assign({},V(t,r));ge(i,"root",s),ge(t,r,i)}else ge(t,r,s)}return t},Z0=(e,n)=>{const t=Lc(n).replace(/[.*+?^${}()|\\]/g,"\\$&");return e.some(r=>Lc(r).match(`^${t}\\.\\d+`))};function Lc(e){return e.replace(/\[(\d+)]/g,".$1").replace(/[[\]]/g,"")}function Pi(){return Pi=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Pi.apply(null,arguments)}function Vc(e,n){try{var t=e()}catch(r){return n(r)}return t&&t.then?t.then(void 0,n):t}function B0(e,n){for(var t=Object.create(null);e.length;){var r=e[0],o=r.code,s=r.message,i=r.path.join(".");if(!t[i])if("unionErrors"in r){var a,c,u=r.unionErrors.reduce(function(f,p){return p.errors.length<f.errors.length?p:f}).errors[0];t[i]={message:(a=u==null?void 0:u.message)!=null?a:s,type:(c=u==null?void 0:u.code)!=null?c:o}}else t[i]={message:s,type:o};if("unionErrors"in r&&r.unionErrors.forEach(function(f){return f.errors.forEach(function(p){return e.push(p)})}),n){var d=t[i].types,l=d&&d[r.code];t[i]=Ca(i,n,t,o,l?[].concat(l,r.message):r.message)}e.shift()}return t}function K0(e,n){for(var t=Object.create(null),r=function(){var o=e[0],s=o.code,i=o.message,a=o.path.join(".");if(!t[a])if(o.code==="invalid_union"&&o.errors.length>0){var c,u,d=o.errors.reduce(function(p,m){return m.length<p.length?m:p})[0];t[a]={message:(c=d==null?void 0:d.message)!=null?c:i,type:(u=d==null?void 0:d.code)!=null?u:s}}else t[a]={message:i,type:s};if(o.code==="invalid_union"&&o.errors.forEach(function(p){return p.forEach(function(m){return e.push(Pi({},m,{path:[].concat(o.path,m.path)}))})}),n){var l=t[a].types,f=l&&l[o.code];t[a]=Ca(a,n,t,s,f?[].concat(f,o.message):o.message)}e.shift()};e.length;)r();return t}function W0(e,n,t){if(t===void 0&&(t={}),(function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,o,s){try{return Promise.resolve(Vc(function(){function i(c){return s.shouldUseNativeValidation&&ki({},s),{errors:{},values:t.raw?Object.assign({},r):c}}var a=e;return t.mode==="sync"?i(a.parse(r,n)):Promise.resolve(a.parseAsync(r,n)).then(i)},function(i){if((function(a){var c;return!(a==null||(c=a._zod)==null||(c=c.traits)==null||!c.has("$ZodError"))})(i))return{values:{},errors:Fc(K0(i.issues,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};if((function(r){return"_def"in r&&typeof r._def=="object"})(e))return function(r,o,s){try{return Promise.resolve(Vc(function(){return Promise.resolve(e[t.mode==="sync"?"parse":"parseAsync"](r,n)).then(function(i){return s.shouldUseNativeValidation&&ki({},s),{errors:{},values:t.raw?Object.assign({},r):i}})},function(i){if((function(a){return Array.isArray(a==null?void 0:a.issues)})(i))return{values:{},errors:Fc(B0(i.errors,!s.shouldUseNativeValidation&&s.criteriaMode==="all"),s)};throw i}))}catch(i){return Promise.reject(i)}};throw new Error("Invalid input: not a Zod schema")}function Oi(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>n.indexOf(+r)===-1).map(([r,o])=>o)}function Uc(e,n="|"){return e.map(t=>Xf(t)).join(n)}function Ri(e,n){return typeof n=="bigint"?n.toString():n}class H0{constructor(n){this._getter=n,this._value=void 0}get value(){const n=this._getter;return n!==void 0&&(this._value=n(),this._getter=void 0),this._value}}function ka(e){return new H0(e)}function G0(e){return e==null}function Pa(e){const n=e.startsWith("^")?1:0,t=e.endsWith("$")?e.length-1:e.length;return e.slice(n,t)}function Bn(e,n,t){Object.defineProperty(e,n,{value:t,writable:!0,enumerable:!0,configurable:!0})}function Gf(e){const n=Object.getOwnPropertyDescriptor(e,"shape");return n!=null&&n.get?n.get.raw:n==null?void 0:n.value}function tn(e){return Gf(e._zod.def)??e._zod.def.shape}function qf(e,n,t){Object.defineProperty(e,n,{get(){const r=t();return Bn(this,n,r),r},enumerable:!0,configurable:!0})}function Qf(e,n,t){n in e?Bn(e,n,t):e[n]=t}function Ln(e,n,t,r){const o=tn(n);for(const s of t){const i=Object.getOwnPropertyDescriptor(o,s);i.enumerable&&(i.get?qf(e,s,()=>{const a=n._zod.def.shape[s];return r?r(a,s):a}):Qf(e,s,r?r(i.value,s):i.value))}}function q0(e,n){for(const t of Reflect.ownKeys(n)){const r=Object.getOwnPropertyDescriptor(n,t);r.enumerable&&(r.get?qf(e,t,()=>n[t]):Qf(e,t,r.value))}}function wt(...e){const n={};for(const t of e){const r=Object.getOwnPropertyDescriptors(t);Object.assign(n,r)}return Object.defineProperties({},n)}function Q0(e){return JSON.stringify(e)}function J0(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Jf="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const Y0=ka(()=>{var e;if(Vt.jitless||typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function qr(e){if(qo(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const t=n.prototype;return!(qo(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}function Yf(e){return qr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}const X0=new Set(["string","number","symbol"]);function hs(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cn(e,n,t){const r=new e._zod.constr(n??e._zod.def);return(!n||t!=null&&t.parent)&&(r._zod.parent=e),r}function re(e){const n=e;if(!n)return{};if(typeof n=="string")return{error:()=>n};if((n==null?void 0:n.message)!==void 0){if((n==null?void 0:n.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function Xf(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function e_(e){return Object.keys(e).filter(n=>e[n]._zod.optin!==void 0&&e[n]._zod.optout==="optional")}const t_={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},n_={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function r_(e,n){const t=e._zod.def,r=t.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s={};return Ln(s,e,ps(e,n)),Cn(e,wt(t,{shape:s,checks:[]}))}function ps(e,n){var o;const t=tn(e),r=[];for(const s of Reflect.ownKeys(n)){if(!((o=Object.getOwnPropertyDescriptor(t,s))!=null&&o.enumerable))throw new Error(`Unrecognized key: "${String(s)}"`);n[s]&&r.push(s)}return r}function o_(e,n){const t=e._zod.def,r=t.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=new Set(ps(e,n)),i={};return Ln(i,e,Reflect.ownKeys(tn(e)).filter(a=>!s.has(a))),Cn(e,wt(t,{shape:i,checks:[]}))}function s_(e,n){if(!qr(n))throw new Error("Invalid input to extend: expected a plain object");const t=e._zod.def.checks;if(t&&t.length>0){const o=tn(e);for(const s of Reflect.ownKeys(n))if(Object.getOwnPropertyDescriptor(o,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Cn(e,wt(e._zod.def,{shape:eh(e,n)}))}function eh(e,n){const t={};return Ln(t,e,Reflect.ownKeys(tn(e))),q0(t,n),t}function i_(e,n){if(!qr(n))throw new Error("Invalid input to safeExtend: expected a plain object");return Cn(e,wt(e._zod.def,{shape:eh(e,n)}))}function a_(e,n){var o,s;if(!((o=n==null?void 0:n._zod)!=null&&o.def))throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if((s=e._zod.def.checks)!=null&&s.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const t={};Ln(t,e,Reflect.ownKeys(tn(e))),Ln(t,n,Reflect.ownKeys(tn(n)));const r=wt(e._zod.def,{shape:t,get catchall(){return n._zod.def.catchall},checks:n._zod.def.checks??[]});return Cn(e,r)}function Zc(e,n,t,r="partial"){const s=n._zod.def.checks;if(s&&s.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const a=t?new Set(ps(n,t)):void 0,c={};return Ln(c,n,Reflect.ownKeys(tn(n)),e&&((u,d)=>a&&!a.has(d)?u:new e({type:"optional",innerType:u}))),Cn(n,wt(n._zod.def,{shape:c,checks:[]}))}function c_(e,n,t){const r=t?new Set(ps(n,t)):void 0,o={};return Ln(o,n,Reflect.ownKeys(tn(n)),(s,i)=>r&&!r.has(i)?s:new e({type:"nonoptional",innerType:s})),Cn(n,wt(n._zod.def,{shape:o}))}function Jt(e,n=0){var t;if(e.aborted===!0)return!0;for(let r=n;r<e.issues.length;r++)if(((t=e.issues[r])==null?void 0:t.continue)!==!0)return!0;return!1}function l_(e,n=0){var t;if(e.aborted===!0)return!0;for(let r=n;r<e.issues.length;r++)if(((t=e.issues[r])==null?void 0:t.continue)===!1)return!0;return!1}function Oa(e,n){return n.map(t=>{var r;return(r=t).path??(r.path=[]),t.path.unshift(e),t})}function jr(e){return typeof e=="string"?e:e==null?void 0:e.message}function Bc(e,n,t){var r;for(let o=n;o<e.length;o++)(r=e[o]).schema??(r.schema=t)}function Cr(e,n,t){var c,u,d,l,f,p,m,v,y,b;var r;const o=(u=(c=e.inst)==null?void 0:c._zod)==null?void 0:u.traits;o!=null&&o.has("$ZodType")&&(o.has("$ZodCheck")?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);const s=e.schema!==e.inst?(l=(d=e.schema)==null?void 0:d._zod.def)==null?void 0:l.error:void 0,i=e.message?e.message:jr((m=(p=(f=e.inst)==null?void 0:f._zod.def)==null?void 0:p.error)==null?void 0:m.call(p,e))??jr(s==null?void 0:s(e))??jr((v=n==null?void 0:n.error)==null?void 0:v.call(n,e))??jr((y=t.customError)==null?void 0:y.call(t,e))??jr((b=t.localeError)==null?void 0:b.call(t,e))??"Invalid input",a={};for(const _ of Object.keys(e))_==="inst"||_==="schema"||_==="continue"||_==="input"||_==="__proto__"||(a[_]=e[_]);return a.path??(a.path=[]),a.message=i,n!=null&&n.reportInput&&(a.input=e.input),a}const u_=/[\uD800-\uDBFF]/;function Ra(e){const n=e.length;if(!u_.test(e))return n;let t=n;for(let r=0;r<n-1;r++)(e.charCodeAt(r)&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320&&(t--,r++);return t}function Ta(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function d_(e){const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";const t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return n}function Qr(...e){const[n,t,r]=e;return typeof n=="string"?{message:n,code:"custom",input:t,inst:r}:{...n}}function f_(e,n){for(const t in n){const r=Object.getOwnPropertyDescriptor(n,t);r.get?Object.defineProperty(e,t,{...r,enumerable:!1}):p_(e,t,r.value)}}function En(e,n,t,r=!0){return Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:r,value:t}),t}function Ia(e,n,t){return En(e,n,t,!1)}function h_(e,n){for(const t in e){const r=e[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get(){return En(this,t,r(this))},set(o){En(this,t,o)}})}return n}function p_(e,n,t){Object.defineProperty(e,n,{configurable:!0,get(){return this==null?t:En(this,n,t.bind(this))},set(r){En(this,n,r)}})}function m_(e,n){const t=Object.getPrototypeOf(e);return n in t?void 0:t}let Ns,fn=!1;const g_={configurable:!0,get(){fn=!0}};function xe(e,n,t){const r=Object.getPrototypeOf(e._zod);if(n in r&&Ns!==e._zod){Ns=void 0;return}Ns=e._zod,Object.defineProperty(r,n,{configurable:!0,get(){Object.defineProperty(this,n,g_);const o=fn;fn=!1;try{const s=t(this);return fn?delete this[n]:Object.defineProperty(this,n,{configurable:!0,writable:!0,value:s}),fn=fn||o,s}catch(s){throw delete this[n],fn=fn||o,s}},set(o){Object.defineProperty(this,n,{configurable:!0,writable:!0,value:o})}})}function v_(e,n,t,r){const o=m_(e,n);o&&Object.defineProperty(o,n,{configurable:!0,get(){const s={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,n,s),s.value=t(this),Object.defineProperty(this,n,s),s.value},set(s){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:r,value:s})}})}const y_="~constantCatch";function b_(e){const n=()=>e;return n[y_]=!0,n}var Kc;const js={value:void 0,enumerable:!1};let Wc="captureStackTrace"in Error?Error:null;function w_(e){const n=Wc;if(n){const t=n.stackTraceLimit;if(typeof t=="number"){try{n.stackTraceLimit=0}catch{return Wc=null,new e}try{return new e}finally{n.stackTraceLimit=t}}}return new e}function j(e,n,t,r){const o={};function s(f){this.def=f,this.constr=l,this.traits=new Set}s.prototype=o;const i=t,a=i&&new WeakSet;function c(f,p){if(f._zod){if(f._zod.traits.has(e))return}else{js.value=new s(p);try{Object.defineProperty(f,"_zod",js)}finally{js.value=void 0}}if(f._zod.traits.add(e),n(f,p),a){const v=Object.getPrototypeOf(f),y=f._zod.constr.prototype;let b=v;for(;b&&b!==y;)b=Object.getPrototypeOf(b);const _=b??v;a.has(_)||(a.add(_),f_(_,i))}const m=l.prototype;for(const v in m)Object.prototype.hasOwnProperty.call(m,v)&&(v in f||(f[v]=m[v].bind(f)))}const u=(r==null?void 0:r.Parent)??Object;class d extends u{}Object.defineProperty(d,"name",{value:e});function l(f){var y;const p=r!=null&&r.Parent?w_(d):this;c(p,f);const m=p._zod.deferred;if(m){for(const b of m)b();p._zod.deferred=void 0}const v=(y=globalThis.__zod_globalConfig)==null?void 0:y.postProcessor;return v&&v(p),p}return Object.defineProperty(l,"init",{value:c}),Object.defineProperty(l,Symbol.hasInstance,{value:f=>{var p,m;return r!=null&&r.Parent&&f instanceof r.Parent?!0:(m=(p=f==null?void 0:f._zod)==null?void 0:p.traits)==null?void 0:m.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class zn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class th extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}(Kc=globalThis).__zod_globalConfig??(Kc.__zod_globalConfig={});const Vt=globalThis.__zod_globalConfig;function kn(e){return e&&Object.assign(Vt,e),Vt}function __(){const e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ri,2)),e.message}function x_(e){this._zod.message=e}const S_={get:__,set:x_,enumerable:!0,configurable:!0},Ms={value:void 0,enumerable:!1},Hc=new WeakSet([Object.prototype,Error.prototype]),E_=(e,n)=>{e.name="$ZodError",Ms.value=n,Object.defineProperty(e,"issues",Ms),Ms.value=void 0,Object.defineProperty(e,"message",S_);const t=Object.getPrototypeOf(e);Hc.has(t)||(Hc.add(t),Object.defineProperty(t,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},C_=j("$ZodError",E_);function k_(e,n,t){return Object.prototype.hasOwnProperty.call(e,n)||(n==="__proto__"?Object.defineProperty(e,n,{value:t(),writable:!0,enumerable:!0,configurable:!0}):e[n]=t()),e[n]}function P_(e,n=t=>t.message){const t={},r=[];for(const o of e.issues)o.path.length>0?k_(t,o.path[0],()=>[]).push(n(o)):r.push(n(o));return{formErrors:r,fieldErrors:t}}function O_(e,n=t=>t.message){const t={_errors:[]},r=(o,s=[])=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a},[...s,...i.path]));else if(i.code==="invalid_key")r({issues:i.issues},[...s,...i.path]);else if(i.code==="invalid_element")r({issues:i.issues},[...s,...i.path]);else{const a=[...s,...i.path];if(a.length===0)t._errors.push(n(i));else{let c=t,u=0;for(;u<a.length;){const d=a[u],l=u===a.length-1;if(d==="_errors"){l&&c._errors.push(n(i)),u++;continue}Object.prototype.hasOwnProperty.call(c,d)||Object.defineProperty(c,d,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const f=c[d];l&&f._errors.push(n(i)),c=f,u++}}}};return r(e),t}function ms(e,n){return{callee:(n==null?void 0:n.callee)??e,Err:n==null?void 0:n.Err}}const Aa=e=>{const n=(t,r,o,s)=>{const i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new zn;if(a.issues.length){const c=new((s==null?void 0:s.Err)??e)(a.issues.map(u=>Cr(u,i,kn())));throw Jf(c,(s==null?void 0:s.callee)??n),c}return a.value};return n},Da=e=>{const n=async(t,r,o,s)=>{const i=o?{...o,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const c=new((s==null?void 0:s.Err)??e)(a.issues.map(u=>Cr(u,i,kn())));throw Jf(c,(s==null?void 0:s.callee)??n),c}return a.value};return n},Na=e=>(n,t,r)=>{const o=r?{...r,async:!1}:{async:!1},s=n._zod.run({value:t,issues:[]},o);if(s instanceof Promise)throw new zn;return s.issues.length?nh(e,s.issues,o):{success:!0,data:s.value}};function nh(e,n,t){let r;return{success:!1,get error(){return r||(r=new e(n.map(o=>Cr(o,t,kn()))),n=void 0,t=void 0),r},set error(o){r=o,n=void 0,t=void 0}}}const ja=e=>async(n,t,r)=>{const o=r?{...r,async:!0}:{async:!0};let s=n._zod.run({value:t,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?nh(e,s.issues,o):{success:!0,data:s.value}},R_=Symbol.for("zod.compile.invalid"),T_=Symbol.for("zod.compile.fallback"),I_=((e,n,t)=>{const r=e._zod.bag.validator;if(r!==void 0){if(r(n)!==R_)return!0;if(r.definite===!0&&t===void 0)return!1}return A_(e,n,t)});function A_(e,n,t){const r=t?{...t,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=e._zod.bag.fallbackRun;let s;if(o?(r[T_]=!0,s=o({value:n,issues:[]},r)):s=e._zod.run({value:n,issues:[]},r),s instanceof Promise)throw new zn;return s.issues.length===0}const D_=async(e,n,t)=>{const r=t?{...t,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=e._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},N_=e=>{const n=Aa(e),t=(r,o,s,i)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return n(r,o,a,ms(t,i))};return t},j_=e=>{const n=Aa(e),t=(r,o,s,i)=>n(r,o,s,ms(t,i));return t},M_=e=>{const n=Da(e),t=async(r,o,s,i)=>{const a=s?{...s,direction:"backward"}:{direction:"backward"};return await n(r,o,a,ms(t,i))};return t},$_=e=>{const n=Da(e),t=async(r,o,s,i)=>await n(r,o,s,ms(t,i));return t},z_=e=>(n,t,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Na(e)(n,t,o)},F_=e=>(n,t,r)=>Na(e)(n,t,r),L_=e=>async(n,t,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return ja(e)(n,t,o)},V_=e=>async(n,t,r)=>ja(e)(n,t,r),U_=/^[cC][0-9a-z]{6,}$/,Z_=/^[0-9a-z]+$/,B_=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,K_=/^[0-9a-vA-V]{20}$/,W_=/^[A-Za-z0-9]{27}$/,H_=/^[a-zA-Z0-9_-]{21}$/;function G_(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}const q_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Q_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Gc=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,J_=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Y_="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function X_(){return new RegExp(Y_,"u")}const ex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,nx=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,rx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ox=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,sx=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,ix=/^https?$/,ax=/^\+[1-9]\d{6,14}$/,rh="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function cx(e){return new RegExp(`^${e}$`)}const lx=cx(rh);function Ti(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${n}:[0-5]\\d(?:\\.\\d+)?`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ux(e){return new RegExp(`^${Ti(e)}$`)}function dx(e){const n=["Z"];e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const t=`${Ti({precision:e.precision,seconds:!0})}(?:${n.join("|")})`,r=e.local?`${t}|${Ti({precision:e.precision})}`:t;return new RegExp(`^${rh}T(?:${r})$`)}const fx=/^[\s\S]{0,}$/,hx=/^(?:true|false)$/i,px=/^[^A-Z]*$/,mx=/^[^a-z]*$/,Nt=j("$ZodCheck",(e,n)=>{var t;e._zod??(e._zod={}),e._zod.def=n,(t=e._zod).onattach??(t.onattach=[])}),Ma=e=>{const n=e.value;return!G0(n)&&n.length!==void 0},gx=j("$ZodCheckMaxLength",(e,n)=>{var t;Nt.init(e,n),(t=e._zod.def).when??(t.when=Ma),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>n.maximum?Ra(o):s)<=n.maximum)return;const a=Ta(o);r.issues.push({origin:a,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),vx=j("$ZodCheckMinLength",(e,n)=>{var t;Nt.init(e,n),(t=e._zod.def).when??(t.when=Ma),e._zod.check=r=>{const o=r.value,s=o.length;if((typeof o=="string"&&s>=n.minimum&&s<n.minimum*2?Ra(o):s)>=n.minimum)return;const a=Ta(o);r.issues.push({origin:a,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:e,continue:!n.abort})}}),yx=j("$ZodCheckLengthEquals",(e,n)=>{var t;Nt.init(e,n),(t=e._zod.def).when??(t.when=Ma),e._zod.check=r=>{const o=r.value,s=o.length,i=typeof o=="string"&&s>=n.length&&s<=n.length*2?Ra(o):s;if(i===n.length)return;const a=Ta(o),c=i>n.length;r.issues.push({origin:a,...c?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),gs=j("$ZodCheckStringFormat",(e,n)=>{var t,r;Nt.init(e,n),n.pattern?(t=e._zod).check??(t.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),bx=j("$ZodCheckRegex",(e,n)=>{gs.init(e,n),e._zod.check=t=>{n.pattern.lastIndex=0,!n.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),wx=j("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=px),gs.init(e,n)}),_x=j("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=mx),gs.init(e,n)}),xx=j("$ZodCheckIncludes",(e,n)=>{Nt.init(e,n);const t=hs(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position},}${t}`:t);n.pattern=r,e._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:e,continue:!n.abort})}}),Sx=j("$ZodCheckStartsWith",(e,n)=>{Nt.init(e,n);const t=new RegExp(`^${hs(n.prefix)}.*`);n.pattern??(n.pattern=t),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),Ex=j("$ZodCheckEndsWith",(e,n)=>{Nt.init(e,n);const t=new RegExp(`.*${hs(n.suffix)}$`);n.pattern??(n.pattern=t),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}});function qc(e,n,t){e.issues.length&&n.issues.push(...Oa(t,e.issues))}const Cx=j("$ZodCheckProperties",(e,n)=>{Nt.init(e,n),Ia(e,Symbol.iterator,function*(){yield e});let t;e._zod.check=r=>{if(r.value==null){r.issues.push({expected:"object",code:"invalid_type",input:r.value,inst:e});return}t??(t=Reflect.ownKeys(n.shape).map(i=>[i,n.shape[i]]));const o=r.value;let s;for(const[i,a]of t){const c=a._zod.run({value:o[i],issues:[]},{});c instanceof Promise?(s??(s=[]),s.push(c.then(u=>qc(u,r,i)))):qc(c,r,i)}if(s)return Promise.all(s).then(()=>{})}}),kx=j("$ZodCheckOverwrite",(e,n)=>{Nt.init(e,n),e._zod.check=t=>{t.value=n.tx(t.value)}});class Px{constructor(n=[],t={}){this.content=[],this.indent=0,this.args=n,this.closed=t}indented(n){this.indent+=1;try{n(this)}finally{this.indent-=1}}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const r=n.split(`
163
- `).filter(i=>i),o=Math.min(...r.map(i=>i.length-i.trimStart().length)),s=r.map(i=>i.slice(o)).map(i=>" ".repeat(this.indent*2)+i);for(const i of s)this.content.push(i)}compile(){const n=Function,t=(this==null?void 0:this.content)??[""];return new n(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
164
- ${t.join(`
165
- `)}
166
- };`)(...Object.values(this.closed))}}const Ox={major:4,minor:6,patch:5},Le=j("$ZodType",(e,n)=>{var s;var t;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=Ox;const r=e._zod.def.checks,o=e._zod.traits.has("$ZodCheck")?[e,...r??[]]:r!=null&&r.length?[...r]:[];for(const i of o)for(const a of i._zod.onattach)a(e);if(o.length===0)(t=e._zod).deferred??(t.deferred=[]),(s=e._zod.deferred)==null||s.push(()=>{e._zod.run=e._zod.parse});else{const i=(c,u,d)=>{if(c.memo)return c;let l=Jt(c),f;for(const p of u){if(p._zod.def.when){if(l_(c)||!p._zod.def.when(c))continue}else if(l)continue;const m=c.issues.length,v=p._zod.check(c);if(v instanceof Promise&&(d==null?void 0:d.async)===!1)throw new zn;if(f||v instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await v,c.issues.length!==m&&(Bc(c.issues,m,e),l||(l=Jt(c,m)))});else{if(c.issues.length===m)continue;Bc(c.issues,m,e),l||(l=Jt(c,m))}}return f?f.then(()=>c):c},a=(c,u,d)=>{if(Jt(c))return c.aborted=!0,c;const l=i(u,o,d);if(l instanceof Promise){if(d.async===!1)throw new zn;return l.then(f=>e._zod.parse(f,d))}return e._zod.parse(l,d)};e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){const l=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return l instanceof Promise?l.then(f=>a(f,c,u)):a(l,c,u)}const d=e._zod.parse(c,u);if(d instanceof Promise){if(u.async===!1)throw new zn;return d.then(l=>i(l,o,u))}return i(d,o,u)}}},{get"~standard"(){return Ia(this,"~standard",sh(this))},set"~standard"(e){En(this,"~standard",e)}}),oh=(e,n)=>e.issues.length?{issues:e.issues.map(t=>Cr(t,n,kn()))}:{value:e.value};async function Rx(e,n){const t={async:!0};return oh(await e._zod.run({value:n,issues:[]},t),t)}function sh(e){return{validate:n=>{const t={async:!1};try{const r=e._zod.run({value:n,issues:[]},t);if(!(r instanceof Promise))return oh(r,t)}catch{}return Rx(e,n)},vendor:"zod",version:1}}const $a=j("$ZodString",(e,n)=>{Le.init(e,n),e._zod.pattern=n.pattern??fx,e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=String(t.value)}catch{}return typeof t.value=="string"||t.issues.push({expected:"string",code:"invalid_type",input:t.value,inst:e}),t}}),Te=j("$ZodStringFormat",(e,n)=>{gs.init(e,n),$a.init(e,n)}),Tx=j("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=Q_),Te.init(e,n)}),Ix=j("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Gc(r))}else n.pattern??(n.pattern=Gc());Te.init(e,n)}),Ax=j("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=J_),Te.init(e,n)}),ih=1,Qo=2;function ah(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Dx(e,n){return!("normalize"in n)&&!("hostname"in n)&&!("protocol"in n)?ah(e)||Qo:Nx(e,n)}function Nx(e,n){var t;if(!n.normalize&&((t=n.protocol)==null?void 0:t.source)===ix.source&&!/^https?:\/\//i.test(e))return ih;try{if(typeof URL<"u"){const r=URL;if(typeof r.parse=="function")return r.parse(e)??Qo}return new URL(e)}catch{return Qo}}const jx=/[\t\n\r]/g;function Qc(e){return e.replace(jx,"")}function Mx(e,n){return n.lastIndex=0,n.test(e.hostname)}function $x(e,n){return n.lastIndex=0,n.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}const zx=j("$ZodURL",(e,n)=>{Te.init(e,n),e._zod.check=t=>{try{const r=t.value.trim(),o=Dx(r,n);if(o===ih){t.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:t.value,inst:e,continue:!n.abort});return}if(o===Qo){t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!n.abort});return}if(o===!0){t.value=Qc(r);return}n.hostname&&!Mx(o,n.hostname)&&t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:t.value,inst:e,continue:!n.abort}),n.protocol&&!$x(o,n.protocol)&&t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:t.value,inst:e,continue:!n.abort}),t.value=n.normalize?o.href:Qc(r);return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!n.abort})}}}),Fx=j("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=X_()),Te.init(e,n)}),Lx=j("$ZodNanoID",(e,n)=>{if(n.length!==void 0&&(!Number.isInteger(n.length)||n.length<1))throw new Error(`Invalid nanoid length: ${n.length}`);n.pattern??(n.pattern=n.length===void 0?H_:G_(n.length)),Te.init(e,n)}),Vx=j("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=U_),Te.init(e,n)}),Ux=j("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=Z_),Te.init(e,n)}),Zx=j("$ZodULID",(e,n)=>{n.pattern??(n.pattern=B_),Te.init(e,n)}),Bx=j("$ZodXID",(e,n)=>{n.pattern??(n.pattern=K_),Te.init(e,n)}),Kx=j("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=W_),Te.init(e,n)}),Wx=j("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=dx(n)),Te.init(e,n)}),Hx=j("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=lx),Te.init(e,n)}),Gx=j("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=ux(n)),Te.init(e,n)}),qx=j("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=q_),Te.init(e,n)}),Qx=j("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=ex),Te.init(e,n)}),Jx=/^[0-9a-fA-F:.]+$/;function ch(e){return Jx.test(e)?ah(`http://[${e}]`):!1}const Yx=j("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=tx),Te.init(e,n),e._zod.check=t=>{ch(t.value)||t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:e,continue:!n.abort})}}),Xx=j("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=nx),Te.init(e,n)});function e1(e){const n=e.split("/");if(n.length!==2)return!1;const[t,r]=n;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:ch(t)}const t1=j("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=rx),Te.init(e,n),e._zod.check=t=>{e1(t.value)||t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:e,continue:!n.abort})}});function lh(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const uh=/^[0-9a-zA-Z+/]*={0,2}$/,n1=j("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=uh),Te.init(e,n),e._zod.check=t=>{lh(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:e,continue:!n.abort})}}),za=/^[A-Za-z0-9_-]*$/;function r1(e){if(!za.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),t=n.padEnd(Math.ceil(n.length/4)*4,"=");return lh(t)}const o1=j("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=za),Te.init(e,n),e._zod.check=t=>{r1(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:e,continue:!n.abort})}}),s1=j("$ZodE164",(e,n)=>{n.pattern??(n.pattern=ax),Te.init(e,n)});function i1(e,n=null){try{const t=e.split(".");if(t.length!==3)return!1;const[r]=t;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const a1=j("$ZodJWT",(e,n)=>{Te.init(e,n),e._zod.check=t=>{i1(t.value,n.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:e,continue:!n.abort})}}),c1=j("$ZodBoolean",(e,n)=>{Le.init(e,n),e._zod.pattern=hx,e._zod.parse=(t,r)=>{if(n.coerce)try{t.value=!!t.value}catch{}const o=t.value;return typeof o=="boolean"||t.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),t}}),l1=j("$ZodUnknown",(e,n)=>{Le.init(e,n),e._zod.parse=t=>t}),u1=j("$ZodNever",(e,n)=>{Le.init(e,n),e._zod.parse=(t,r)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function Jc(e,n,t){e.issues.length&&n.issues.push(...Oa(t,e.issues)),n.value[t]=e.value}const d1=j("$ZodArray",(e,n)=>{Le.init(e,n);const t=Vt.memoizer;t==null||t.attach(e),e._zod.parse=(r,o)=>{const s=r.value;if(!Array.isArray(s))return r.issues.push({expected:"array",code:"invalid_type",input:s,inst:e}),r;r.value=t?t.alloc(e,r,Array(s.length),o):Array(s.length);const i=[],a=o==null?void 0:o.abortEarly;for(let c=0;c<s.length;c++){const u=s[c],d=n.element._zod.run({value:u,issues:[]},o);if(d instanceof Promise)i.push(d.then(l=>Jc(l,r,c)));else if(Jc(d,r,c),a&&d.issues.length!==0&&Jt(d))break}return i.length?Promise.all(i).then(()=>r):r}});function Jo(e,n,t,r,o,s){const i=t in r,a=s==="optional";if(!(!i&&a&&o==="optional")){if(e.issues.length){if(o!==void 0&&a&&!i)return;n.issues.push(...Oa(t,e.issues))}if(!i&&o===void 0){e.issues.length||n.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[t]});return}e.value===void 0?(i||o==="defaulted"&&!a)&&(n.value[t]=void 0):n.value[t]=e.value}}const f1=[];function dh(e){var i,a,c,u;const n=Object.keys(e.shape),t=Object.getOwnPropertySymbols(e.shape),r=t.length?t:f1,o=r.length?[...n,...r]:n;for(const d of o)if(!((u=(c=(a=(i=e.shape)==null?void 0:i[d])==null?void 0:a._zod)==null?void 0:c.traits)!=null&&u.has("$ZodType")))throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);const s=e_(e.shape);return{...e,allKeys:o,symbolKeys:r,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(s)}}function fh(e,n,t,r,o,s,i){const a=[],c=o.keySet,u=o.catchall._zod,d=u.def.type,l=u.optin,f=u.optout;let p=0;for(const m in n){if(i&&t.issues.length!==p){if(Jt(t,p))break;p=t.issues.length}if(c.has(m))continue;if(m==="__proto__"){d==="never"&&a.push(m);continue}if(d==="never"){a.push(m);continue}const v=u.run({value:n[m],issues:[]},r);v instanceof Promise?e.push(v.then(y=>Jo(y,t,m,n,l,f))):Jo(v,t,m,n,l,f)}return a.length&&t.issues.push({code:"unrecognized_keys",keys:a,input:n,inst:s,continue:!0}),e.length?Promise.all(e).then(()=>t):t}const h1=j("$ZodObject",(e,n)=>{Le.init(e,n);const t=Object.getOwnPropertyDescriptor(n,"shape"),r=t!=null&&t.get?t.get.raw:n.shape??{};if(r){const u=()=>{const d={...r};return Object.defineProperty(n,"shape",{value:d}),u.raw=d,d};u.raw=r,Object.defineProperty(n,"shape",{get:u})}const o=ka(()=>dh(n));xe(e,"propValues",u=>{const d=u.def.shape,l={};for(const f in d){const p=d[f]._zod;if(p.values){Object.prototype.hasOwnProperty.call(l,f)||Bn(l,f,new Set);for(const m of p.values)l[f].add(m);p.optin!==void 0&&l[f].add(void 0)}}return l});const s=qo,i=n.catchall;let a;const c=Vt.memoizer;c==null||c.attach(e),e._zod.parse=(u,d)=>{a??(a=o.value);const l=u.value;if(!s(l))return u.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),u;u.value=c?c.alloc(e,u,{},d):{};const f=[],p=a.shape,m=d==null?void 0:d.abortEarly;let v=u.issues.length;for(const y of a.allKeys){if(m&&u.issues.length!==v){if(Jt(u,v))break;v=u.issues.length}if(y==="__proto__")continue;const b=p[y],_=b._zod.optin,x=b._zod.optout,E=b._zod.run({value:l[y],issues:[]},d);E instanceof Promise?f.push(E.then(C=>Jo(C,u,y,l,_,x))):Jo(E,u,y,l,_,x)}return i?fh(f,l,u,d,o.value,e,m===!0):f.length?Promise.all(f).then(()=>u):u}}),p1=j("$ZodObjectJIT",(e,n)=>{h1.init(e,n);const t=e._zod.parse,r=ka(()=>dh(n)),o=Vt.memoizer,s=p=>{var C,O;const m=r.value,v=m.symbolKeys,y=new Px(["payload","ctx"],{shape:p,inst:e,memo:o,syms:v}),b=T=>`shape[${T}]._zod.run({ value: input[${T}], issues: [] }, ctx)`,_=(T,A)=>`
167
- let ${T}_ab = false;
168
- for (let i = 0; i < ${T}.issues.length; i++) {
169
- const iss = ${T}.issues[i];
170
- iss.path = iss.path ? [${A}, ...iss.path] : [${A}];
171
- payload.issues.push(iss);
172
- if (iss.continue !== true) ${T}_ab = true;
173
- }
174
- if (${T}_ab && ctx && ctx.abortEarly) {
175
- payload.value = newResult;
176
- return payload;
177
- }`;y.write("const input = payload.value;");const x=Object.create(null);let E=0;for(const T of m.allKeys)x[T]=`key_${E++}`;y.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const T of m.allKeys){if(T==="__proto__")continue;const A=x[T],R=typeof T=="symbol"?`syms[${v.indexOf(T)}]`:Q0(T),z=`${R} in input`,L=p[T],$=(C=L==null?void 0:L._zod)==null?void 0:C.optin,G=$!==void 0,Z=((O=L==null?void 0:L._zod)==null?void 0:O.optout)==="optional";if(y.write(`const ${A} = ${b(R)};`),G&&Z){const q=$==="optional"?`${A}_present`:`${A}.value !== undefined || ${A}_present`;y.write(`
178
- const ${A}_present = ${z};
179
- if (!${A}.issues.length || ${A}_present) {
180
- if (${A}.issues.length) {${_(A,R)}
181
- }
182
-
183
- if (${q}) {
184
- newResult[${R}] = ${A}.value;
185
- }
186
- }
187
-
188
- `)}else G?(y.write(`
189
- if (${A}.issues.length) {${_(A,R)}
190
- }
191
- `),$==="defaulted"?y.write(`newResult[${R}] = ${A}.value;`):y.write(`
192
- if (${A}.value !== undefined || ${z}) {
193
- newResult[${R}] = ${A}.value;
194
- }
195
- `)):y.write(`
196
- const ${A}_present = ${z};
197
- if (${A}.issues.length) {${_(A,R)}
198
- }
199
- if (!${A}_present && !${A}.issues.length) {
200
- payload.issues.push({
201
- code: "invalid_type",
202
- expected: "nonoptional",
203
- input: undefined,
204
- path: [${R}]
205
- });
206
- if (ctx && ctx.abortEarly) {
207
- payload.value = newResult;
208
- return payload;
209
- }
210
- }
211
-
212
- if (${A}_present) {
213
- newResult[${R}] = ${A}.value;
214
- }
215
-
216
- `)}return y.write("payload.value = newResult;"),y.write("return payload;"),y.compile()};let i;const a=qo,c=!Vt.jitless,d=c&&Y0.value,l=n.catchall;let f;e._zod.parse=(p,m)=>{f??(f=r.value);const v=p.value;return a(v)?c&&d&&(m==null?void 0:m.async)===!1&&m.jitless!==!0?(i||(i=s(n.shape)),p=i(p,m),l?fh([],v,p,m,f,e,(m==null?void 0:m.abortEarly)===!0):p):t(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),p)}});function Yc(e,n,t,r){for(const s of e)if(s.issues.length===0)return n.value=s.value,n;const o=e.filter(s=>!Jt(s));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:t,errors:e.map(s=>s.issues.map(i=>Cr(i,r,kn())))}),n)}const m1=j("$ZodUnion",(e,n)=>{Le.init(e,n),xe(e,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),xe(e,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),xe(e,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),xe(e,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(s=>s._zod.pattern);return new RegExp(`^(${o.map(s=>Pa(s.source)).join("|")})$`)}});const t=n.options.length===1?n.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(t)return t(r,o);let s=!1;const i=[];for(const a of n.options){const c=a._zod.run({value:r.value,issues:[]},o);if(c instanceof Promise)i.push(c),s=!0;else{if(c.issues.length===0)return c;i.push(c)}}return s?Promise.all(i).then(a=>Yc(a,r,e,o)):Yc(i,r,e,o)}}),g1=j("$ZodIntersection",(e,n)=>{Le.init(e,n),e._zod.parse=(t,r)=>{const o=t.value,s=n.left._zod.run({value:o,issues:[]},r),i=n.right._zod.run({value:o,issues:[]},r);return s instanceof Promise||i instanceof Promise?Promise.all([s,i]).then(([c,u])=>Xc(t,c,u)):Xc(t,s,i)}});function Ii(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(qr(e)&&qr(n)){const t=Object.keys(n),r=Object.keys(e).filter(s=>t.indexOf(s)!==-1),o={...e,...n};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const s of r){if(s==="__proto__")continue;const i=Ii(e[s],n[s]);if(!i.valid)return{valid:!1,mergeErrorPath:[s,...i.mergeErrorPath]};o[s]=i.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let r=0;r<e.length;r++){const o=e[r],s=n[r],i=Ii(o,s);if(!i.valid)return{valid:!1,mergeErrorPath:[r,...i.mergeErrorPath]};t.push(i.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function Xc(e,n,t){const r=new Map;let o;const s=new Map,i=(u,d)=>{var f,p;let l;if(u.code==="unrecognized_keys"&&!((f=u.path)!=null&&f.length))o??(o=u),l=u.keys;else if(u.code==="invalid_key"&&u.origin==="record"&&((p=u.path)==null?void 0:p.length)===1){const m=String(u.path[0]);s.has(m)||s.set(m,u),l=[m]}else return!1;for(const m of l)r.has(m)||r.set(m,{}),r.get(m)[d]=!0;return!0};for(const u of n.issues)i(u,"l")||e.issues.push(u);for(const u of t.issues)i(u,"r")||e.issues.push(u);const a=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(a.length){const u=o?a.filter(d=>o.keys.includes(d)):[];u.length&&e.issues.push({...o,keys:u});for(const d of a)!u.includes(d)&&s.has(d)&&e.issues.push(s.get(d))}const c=Ii(n.value,t.value);if(!c.valid){if(Jt(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}const v1=j("$ZodEnum",(e,n)=>{Le.init(e,n);const t=Oi(n.entries),r=new Set(t);e._zod.values=r,xe(e,"pattern",o=>{const s=Oi(o.def.entries).filter(i=>X0.has(typeof i));return new RegExp(s.length?`^(${s.map(i=>hs(i.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(o,s)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t,input:i,inst:e}),o}}),y1=j("$ZodTransform",(e,n)=>{var t;Le.init(e,n),e._zod.optin="optional",(t=Vt.memoizer)==null||t.guard(e),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new th(e.constructor.name);const s=n.transform(r.value,r);if(o.async)return(s instanceof Promise?s:Promise.resolve(s)).then(a=>(r.value=a,r));if(s instanceof Promise)throw new zn;return r.value=s,r}});function el(e,n){return e.value=n.issues.length?void 0:n.value,e}const hh=j("$ZodOptional",(e,n)=>{Le.init(e,n),xe(e,"optin",t=>t.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",xe(e,"values",t=>{const r=t.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),xe(e,"pattern",t=>{const r=t.def.innerType._zod.pattern;return r?new RegExp(`^(${Pa(r.source)})?$`):void 0}),e._zod.parse=(t,r)=>{if(t.value===void 0){if(n.innerType._zod.optin!=="defaulted")return t;const o=n.innerType._zod.run({value:t.value,issues:[]},r);return o instanceof Promise?o.then(s=>el(t,s)):el(t,o)}return n.innerType._zod.run(t,r)}}),b1=j("$ZodExactOptional",(e,n)=>{hh.init(e,n),xe(e,"values",t=>t.def.innerType._zod.values),xe(e,"pattern",t=>t.def.innerType._zod.pattern),e._zod.parse=(t,r)=>n.innerType._zod.run(t,r)}),w1=j("$ZodNullable",(e,n)=>{Le.init(e,n),xe(e,"optin",t=>t.def.innerType._zod.optin),xe(e,"optout",t=>t.def.innerType._zod.optout),xe(e,"pattern",t=>{const r=t.def.innerType._zod.pattern;return r?new RegExp(`^(${Pa(r.source)}|null)$`):void 0}),xe(e,"values",t=>t.def.innerType._zod.values?new Set([...t.def.innerType._zod.values,null]):void 0),e._zod.parse=(t,r)=>t.value===null?t:n.innerType._zod.run(t,r)}),_1=j("$ZodDefault",(e,n)=>{Le.init(e,n),e._zod.optin="defaulted",xe(e,"values",t=>t.def.innerType._zod.values),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);if(t.value===void 0)return t.value=n.defaultValue,t;const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(s=>tl(s,n)):tl(o,n)}});function tl(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const x1=j("$ZodPrefault",(e,n)=>{Le.init(e,n),e._zod.optin="defaulted",xe(e,"values",t=>t.def.innerType._zod.values),e._zod.parse=(t,r)=>(r.direction==="backward"||t.value===void 0&&(t.value=n.defaultValue),n.innerType._zod.run(t,r))}),S1=j("$ZodNonOptional",(e,n)=>{Le.init(e,n),xe(e,"values",t=>{const r=t.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(t,r)=>{const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(s=>nl(s,e)):nl(o,e)}});function nl(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}function rl(e,n,t,r){return n.issues.length?(e.value=t.catchValue({...n,value:e.value,error:{issues:n.issues.map(o=>Cr(o,r,kn()))},input:e.value}),e):(e.value=n.value,n.memo&&(e.memo=!0),e)}const E1=j("$ZodCatch",(e,n)=>{Le.init(e,n),xe(e,"optin",t=>t.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),xe(e,"optout",t=>t.def.innerType._zod.optout),xe(e,"values",t=>t.def.innerType._zod.values),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);const o=n.innerType._zod.run({value:t.value,issues:[]},r);return o instanceof Promise?o.then(s=>rl(t,s,n,r)):rl(t,o,n,r)}}),C1=j("$ZodPipe",(e,n)=>{Le.init(e,n),xe(e,"values",t=>t.def.in._zod.values),xe(e,"optin",t=>t.def.in._zod.optin),xe(e,"optout",t=>t.def.out._zod.optout),xe(e,"propValues",t=>t.def.in._zod.propValues),e._zod.parse=(t,r)=>{if(r.direction==="backward"){const s=n.out._zod.run(t,r);return s instanceof Promise?s.then(i=>Po(i,n.in,r)):Po(s,n.in,r)}const o=n.in._zod.run(t,r);return o instanceof Promise?o.then(s=>Po(s,n.out,r)):Po(o,n.out,r)}});function Po(e,n,t){return e.issues.some(r=>r.code!=="unrecognized_keys")?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},t)}const k1=j("$ZodReadonly",(e,n)=>{Le.init(e,n),xe(e,"propValues",t=>t.def.innerType._zod.propValues),xe(e,"values",t=>t.def.innerType._zod.values),xe(e,"optin",t=>{var r,o;return(o=(r=t.def.innerType)==null?void 0:r._zod)==null?void 0:o.optin}),xe(e,"optout",t=>{var r,o;return(o=(r=t.def.innerType)==null?void 0:r._zod)==null?void 0:o.optout}),e._zod.parse=(t,r)=>{if(r.direction==="backward")return n.innerType._zod.run(t,r);const o=n.innerType._zod.run(t,r);return o instanceof Promise?o.then(ol):ol(o)}});function ol(e){return e.memo||(e.value=Object.freeze(e.value)),e}const P1=j("$ZodCustom",(e,n)=>{Nt.init(e,n),Le.init(e,n),e._zod.parse=(t,r)=>t,e._zod.check=t=>{const r=t.value,o=n.fn(r);if(o instanceof Promise)return o.then(s=>sl(s,t,r,e));sl(o,t,r,e)}});function sl(e,n,t,r){if(!e){const o={code:"custom",input:t,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),n.issues.push(Qr(o))}}class O1 extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Ai="~memo",il=[];function ph(e){return e!==null&&typeof e=="object"}function $s(e){return e.map(n=>n.path?{...n,path:n.path.slice()}:{...n})}const mh=new WeakMap,zr=0,Lo=1,Vr=2;function Vo(e,n,t){const r=mh.get(e);if(r!==void 0)return r?Vr:zr;if(n.has(e))return Vr;n.add(e);let o=zr;const s=d=>{if(o!==Vr&&(d!=null&&d._zod)){const l=Vo(d,n);l>o&&(o=l)}},i=(d,l)=>{var p;let f=zr;for(const m of Reflect.ownKeys(d)){const v=Object.getOwnPropertyDescriptor(d,m);if(!v.enumerable)continue;const y=v.get?Lo:(p=v.value)!=null&&p._zod?Vo(v.value,n):zr;y>f&&(f=y)}return f},a=d=>{d>o&&(o=d)},c=e._zod.def;switch(c.type){case"object":{const d=Gf(c);a(d?i(d):Lo),s(c.catchall);break}case"array":s(c.element);break;case"tuple":for(const d of c.items)s(d);s(c.rest);break;case"record":case"map":s(c.keyType),s(c.valueType);break;case"set":s(c.valueType);break;case"union":for(const d of c.options)s(d);break;case"intersection":s(c.left),s(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":s(c.innerType);break;case"pipe":s(c.in),s(c.out);break;case"function":s(c.input),s(c.output);break;case"lazy":{const d=c._cachedInner??void 0;a(d?Vo(d,n):Lo);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const d in c){const l=Object.getOwnPropertyDescriptor(c,d);if(!l||l.get)continue;const f=l.value;if(!(!f||typeof f!="object")){if(f._zod)s(f);else if(Array.isArray(f))for(const p of f)s(p)}}}return n.delete(e),R1(e,o)}function R1(e,n){return n!==Lo&&mh.set(e,n===Vr),n}function T1(e,n){let t=e.buckets.get(n);return t||(t=new WeakMap,e.buckets.set(n,t)),t}let Oo;const Ro=[],I1={alloc(e,n,t){const r=Oo;if(!r)return t;Oo=void 0;const o={value:t,issues:null};return r.set(n.value,o),Ro.push(o),t},guard(e){var n;(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred.push(()=>{const t=e._zod.parse,r=(o,s)=>{if(s.direction!=="backward"&&D1(s,o.value))throw new O1;return t(o,s)};e._zod.parse=r,e._zod.run===t&&(e._zod.run=r)})},attach(e){var n;let t,r=!1,o,s;(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred.push(()=>{const i=e._zod.parse,a=(c,u)=>{if(t===void 0){const b=Vo(e,new Set);if(b===zr)return e._zod.parse=i,e._zod.run===a&&(e._zod.run=i),i(c,u);b===Vr||r?t=!0:r=!0}const d=c.value;if(!ph(d))return i(c,u);let l=u[Ai];l||(l={buckets:new WeakMap,backEdges:void 0},u[Ai]=l);let f;o===u?f=s:(f=T1(l,e),o=u,s=f);const p=f.get(d);if(p)return c.value=p.value,p.issues?p.issues.length&&c.issues.push(...$s(p.issues)):(c.memo=!0,l.backEdges??(l.backEdges=new WeakSet),l.backEdges.add(p.value)),c;Oo=f;const m=Ro.length,v=i(c,u);Oo=void 0;const y=Ro.length>m?Ro.pop():void 0;return v instanceof Promise?v.then(b=>(y&&(y.issues=b.issues.length?$s(b.issues):il),b)):(y&&(y.issues=v.issues.length?$s(v.issues):il),v)};e._zod.parse=a,e._zod.run===i&&(e._zod.run=a)})}};function A1(){return I1}function D1(e,n){var r;const t=(r=e[Ai])==null?void 0:r.backEdges;return t!==void 0&&ph(n)&&t.has(n)}const N1=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function n(s){return e[s]??null}const t={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(s,i){return s==="number"&&typeof i=="number"&&!Number.isFinite(i)?String(i):r[s]??s}return s=>{switch(s.code){case"invalid_type":{const i=o(s.expected),a=d_(s.input),c=o(a,s.input);return`Invalid input: expected ${i}, received ${c}`}case"invalid_value":return s.values.length===1?`Invalid input: expected ${Xf(s.values[0])}`:`Invalid option: expected one of ${Uc(s.values,"|")}`;case"too_big":{const i=s.exact?"exactly ":s.inclusive?"<=":"<",a=n(s.origin);return a?`Too big: expected ${s.origin??"value"} to have ${i}${s.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${s.origin??"value"} to be ${i}${s.maximum.toString()}`}case"too_small":{const i=s.exact?"exactly ":s.inclusive?">=":">",a=n(s.origin);return a?`Too small: expected ${s.origin} to have ${i}${s.minimum.toString()} ${a.unit}`:`Too small: expected ${s.origin} to be ${i}${s.minimum.toString()}`}case"invalid_format":{const i=s;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${t[i.format]??s.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${s.divisor}`;case"unrecognized_keys":return`Unrecognized key${s.keys.length>1?"s":""}: ${Uc(s.keys,", ")}`;case"invalid_key":return`Invalid key in ${s.origin}`;case"invalid_union":return s.options&&Array.isArray(s.options)&&s.options.length>0?`Invalid discriminator value. Expected ${s.options.map(a=>`'${a}'`).join(" | ")}`:s.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${s.origin}`;default:return"Invalid input"}}};function j1(){return{localeError:N1()}}var al;class M1{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...t){const r=t[0];return this._map.set(n,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const t=this._map.get(n);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(n),this}get(n){const t=n._zod.parent;if(t){const r={...this.get(t)??{}};delete r.id;const o={...r,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function $1(){return new M1}(al=globalThis).__zod_globalRegistry??(al.__zod_globalRegistry=$1());const Fr=globalThis.__zod_globalRegistry;function z1(e){return e.checks&&(e.checks=[...e.checks]),e}function F1(e,n){return new e(z1({type:"string",...re(n)}))}function L1(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...re(n)})}function V1(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...re(n)})}function U1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...re(n)})}function Z1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...re(n)})}function B1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...re(n)})}function K1(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...re(n)})}function W1(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...re(n)})}function H1(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...re(n)})}function G1(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...re(n)})}function q1(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...re(n)})}function Q1(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...re(n)})}function J1(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...re(n)})}function Y1(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...re(n)})}function X1(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...re(n)})}function eS(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...re(n)})}function tS(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...re(n)})}function nS(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...re(n)})}function rS(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...re(n)})}function oS(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...re(n)})}function sS(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...re(n)})}function iS(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...re(n)})}function aS(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...re(n)})}function cS(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...re(n)})}function lS(e,n){return new e({type:"string",format:"date",check:"string_format",...re(n)})}function uS(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...re(n)})}function dS(e,n){return new e({type:"string",format:"duration",check:"string_format",...re(n)})}function fS(e,n){return new e({type:"boolean",...re(n)})}function hS(e){return new e({type:"unknown"})}function pS(e,n){return new e({type:"never",...re(n)})}function gh(e,n){return new gx({check:"max_length",...re(n),maximum:e})}function Yo(e,n){return new vx({check:"min_length",...re(n),minimum:e})}function vh(e,n){return new yx({check:"length_equals",...re(n),length:e})}function mS(e,n){return new bx({check:"string_format",format:"regex",...re(n),pattern:e})}function gS(e){return new wx({check:"string_format",format:"lowercase",...re(e)})}function vS(e){return new _x({check:"string_format",format:"uppercase",...re(e)})}function yS(e,n){return new xx({check:"string_format",format:"includes",...re(n),includes:e})}function bS(e,n){return new Sx({check:"string_format",format:"starts_with",...re(n),prefix:e})}function wS(e,n){return new Ex({check:"string_format",format:"ends_with",...re(n),suffix:e})}function _S(e,n){return new Cx({check:"properties",shape:e,...re(n)})}function kr(e){return new kx({check:"overwrite",tx:e})}function xS(e){return kr(n=>n.normalize(e))}function SS(){return kr(e=>e.trim())}function ES(){return kr(e=>e.toLowerCase())}function CS(){return kr(e=>e.toUpperCase())}function kS(){return kr(e=>J0(e))}function PS(e,n,t){return new e({type:"array",element:n,...re(t)})}function OS(e,n,t){return new e({type:"custom",check:"custom",fn:n,...re(t)})}function RS(e,n){const t=TS(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Qr(o,r.value,t._zod.def));else{const s=o;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),"input"in s||(s.input=r.value),s.inst??(s.inst=t),s.continue??(s.continue=!t._zod.def.abort),r.issues.push(Qr(s))}},e(r.value,r)),n);return t}function TS(e,n){const t=new Nt({check:"custom",...re(n)});return t._zod.check=e,t}function Ur(e,...n){for(const t of n)for(const r of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,r)&&Bn(e,r,t[r]);return e}function yh(e){let n=(e==null?void 0:e.target)??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??Fr,target:n,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",intersections:[],deferred:[],external:(e==null?void 0:e.external)??void 0}}function lo(e,n,t,r,o){const s=typeof n.unrepresentable=="function"?n.unrepresentable({zodSchema:e,path:r.path,message:o}):n.unrepresentable;if(s==="any")return!1;if(s===void 0||s==="throw")throw new Error(o);return Object.assign(t,s),!0}function et(e,n,t={path:[],schemaPath:[]}){var d,l;var r;const o=e._zod.def,s=n.seen.get(e);if(s)return s.count++,t.schemaPath.includes(e)&&(s.cycle=t.path),s.schema;const i={schema:{},count:1,cycle:void 0,path:t.path};n.seen.set(e,i),n.sharedDefsExtractedFor=void 0,n.sharedEmitDoneFor=void 0;const a=(l=(d=e._zod).toJSONSchema)==null?void 0:l.call(d);if(a)i.schema=a;else{const f={...t,schemaPath:[...t.schemaPath,e],path:t.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,i.schema,f);else{const m=i.schema,v=n.processors[o.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);v(e,n,m,f)}const p=e._zod.parent;p&&(i.ref||(i.ref=p),et(p,n,f),n.seen.get(p).isParent=!0)}const c=n.metadataRegistry.get(e);return c&&Ur(i.schema,c),n.io==="input"&&st(e)&&(delete i.schema.examples,delete i.schema.default),n.io==="input"&&"_prefault"in i.schema&&((r=i.schema).default??(r.default=i.schema._prefault)),delete i.schema._prefault,n.seen.get(e).schema}function cl(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function bh(e,n){var i,a,c,u;const t=e.seen.get(n);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;const r=new Map;for(const d of e.seen.entries()){const l=(i=e.metadataRegistry.get(d[0]))==null?void 0:i.id;if(l){const f=r.get(l);if(f&&f!==d[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(l,d[0])}}const o=d=>{var v;const l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const y=(v=e.external.registry.get(d[0]))==null?void 0:v.id,b=e.external.uri??(x=>x);if(y)return{ref:b(y)};const _=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=_,{defId:_,ref:`${b("__shared")}#/${l}/${cl(_)}`}}const f="#",p=`${f}/${l}/`;if(d[1]===t&&!d[1].schema.id)return{ref:f};const m=d[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:p+cl(m)}},s=d=>{if(d[1].schema.$ref)return;const l=d[1],{ref:f,defId:p}=o(d);l.def={...l.schema},p&&(l.defId=p);const m=l.schema;for(const v in m)delete m[v];m.$ref=f};if(e.cycles==="throw")for(const d of e.seen.entries()){const l=d[1];if(l.cycle)throw new Error(`Cycle detected: #/${(a=l.cycle)==null?void 0:a.join("/")}/<root>
217
-
218
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const l=d[1];if(n===d[0]){s(d);continue}if(e.external){const p=(c=e.external.registry.get(d[0]))==null?void 0:c.id;if(n!==d[0]&&p){s(d);continue}}if((u=e.metadataRegistry.get(d[0]))==null?void 0:u.id){s(d);continue}if(l.cycle){s(d);continue}l.count>1&&e.reused==="ref"&&s(d)}e.external&&(e.sharedDefsExtractedFor=e.external)}function wh(e){const n=e.anyOf;if(!Array.isArray(n)||n.length===0||e.type!==void 0)return;const t=[];for(const r of n){if(!r||typeof r!="object")return;wh(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const s=r.type;for(const i of Array.isArray(s)?s:[s]){if(typeof i!="string")return;t.includes(i)||t.push(i)}}delete e.anyOf,e.type=t.length===1?t[0]:t}const _h=new Set(["type","properties","required","additionalProperties"]),ll=["oneOf","anyOf"];function ul(e){const n=e.additionalProperties;return n===void 0||n===!1||typeof n!="object"||n===null?null:Object.keys(n).length?n:null}function Di(e){var s;const n=[];for(const i of e){if(typeof i!="object"||i.type!=="object")return null;for(const a in i)if(!_h.has(a))return null;n.push(i)}const t={},r=new Set;for(const i of n){for(const a in i.properties){if(Object.prototype.hasOwnProperty.call(t,a))continue;const c=[];for(const d of n){const l=((s=d.properties)==null?void 0:s[a])??ul(d);l!=null&&(c.some(f=>JSON.stringify(f)===JSON.stringify(l))||c.push(l))}const u=c.length===1?c[0]:Di(c)??{allOf:c};Bn(t,a,u)}for(const a of i.required??[])r.add(a)}const o={type:"object",properties:t};if(r.size&&(o.required=[...r]),n.every(i=>i.additionalProperties===!1))o.additionalProperties=!1;else{const i=[];for(const a of n){const c=ul(a);c&&!i.some(u=>JSON.stringify(u)===JSON.stringify(c))&&i.push(c)}i.length===1?o.additionalProperties=i[0]:i.length>1&&(o.additionalProperties={allOf:i})}return o}function IS(e){const n=e.allOf;if(!Array.isArray(n)||n.length<2)return;for(const o of _h)if(o in e)return;const t=n.filter(o=>ll.some(s=>Array.isArray(o[s])));let r=null;if(!t.length)r=Di(n);else{const o=t[0],s=ll.find(c=>Array.isArray(o[c]));if(Object.keys(o).length!==1)return;const i=n.filter(c=>c!==o),a=o[s].map(c=>Di([...i,c]));if(a.some(c=>!c))return;r={[s]:a}}r&&(delete e.allOf,Ur(e,r))}function xh(e,n){var a,c,u,d;const t=e.seen.get(n);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=l=>{const f=e.seen.get(l);if(f.ref===null)return;const p=f.def??f.schema,m={...p},v=f.ref;if(f.ref=null,v){r(v);const b=e.seen.get(v),_=b.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(_)):Ur(p,_),Ur(p,m),l._zod.parent===v)for(const E in p)E==="$ref"||E==="allOf"||E in m||delete p[E];if(_.$ref&&b.def)for(const E in p)E==="$ref"||E==="allOf"||E in b.def&&JSON.stringify(p[E])===JSON.stringify(b.def[E])&&delete p[E]}const y=l._zod.parent;if(y&&y!==v){r(y);const b=e.seen.get(y);if(b!=null&&b.schema.$ref&&(p.$ref=b.schema.$ref,b.def))for(const _ in p)_==="$ref"||_==="allOf"||_ in b.def&&JSON.stringify(p[_])===JSON.stringify(b.def[_])&&delete p[_]}e.override({zodSchema:l,jsonSchema:p,path:f.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(const l of[...e.seen.entries()].reverse())r(l[0]);if(e.target!=="openapi-3.0")for(const l of e.seen.entries())wh(l[1].def??l[1].schema);for(const l of e.deferred)l();if(e.intersections.length){const l=new Map;for(const f of e.seen.values())for(const p of[f.schema,f.def]){const m=p==null?void 0:p.allOf;if(!Array.isArray(m))continue;const v=l.get(m);v?v.push(p):l.set(m,[p])}for(const f of e.intersections)for(const p of l.get(f)??[])IS(p)}}const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const l=(c=e.external.registry.get(n))==null?void 0:c.id;if(!l)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(l)}Ur(o,t.defId?t.schema:t.def??t.schema);const s=(u=e.metadataRegistry.get(n))==null?void 0:u.id;s!==void 0&&o.id===s&&delete o.id;const i=((d=e.external)==null?void 0:d.defs)??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(const l of e.seen.entries()){const f=l[1];f.def&&f.defId&&(f.def.id===f.defId&&delete f.def.id,Bn(i,f.defId,f.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const l=JSON.parse(JSON.stringify(o));return Object.defineProperty(l,"~standard",{value:{...n["~standard"],jsonSchema:{input:Xo(n,"input",e.processors),output:Xo(n,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function st(e,n){const t=n??{seen:new Set};if(t.seen.has(e))return!1;t.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return st(r.element,t);if(r.type==="set")return st(r.valueType,t);if(r.type==="lazy")return st(r.getter(),t);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return st(r.innerType,t);if(r.type==="intersection")return st(r.left,t)||st(r.right,t);if(r.type==="record"||r.type==="map")return st(r.keyType,t)||st(r.valueType,t);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:st(r.in,t)||st(r.out,t);if(r.type==="object"){for(const o in r.shape)if(st(r.shape[o],t))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(st(o,t))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(st(o,t))return!0;return!!(r.rest&&st(r.rest,t))}return!1}const AS=(e,n={})=>t=>{const r=yh({...t,processors:n});return et(e,r),bh(r,e),xh(r,e)},Xo=(e,n,t={})=>r=>{const{libraryOptions:o,target:s}=r??{},i=yh({...o??{},target:s,io:n,processors:t});return et(e,i),bh(i,e),xh(i,e)},yr=(e,n,t)=>{(e[n]===void 0||t>e[n])&&(e[n]=t)},br=(e,n,t)=>{(e[n]===void 0||t<e[n])&&(e[n]=t)},dl=(e,n)=>{yr(e,"minimum",n),br(e,"maximum",n)},Sh=(e,n)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(n)||e.multipleOf.push(n)},Eh=(e,n)=>{e.patterns??(e.patterns=new Set),e.patterns.add(n)},Ch=(e,n)=>{e.mime=e.mime?e.mime.filter(t=>n.includes(t)):[...n]},kh=(e,n)=>{e.format=n,n.includes("int")&&(e.isInt=!0)},fl=(e,n)=>yr(e,"minimum",n.minimum),hl=(e,n)=>br(e,"maximum",n.maximum),pl=e=>(n,t)=>{kh(n,t.format);const[r,o]=e[t.format];yr(n,"minimum",r),br(n,"maximum",o)},zs={greater_than:(e,n)=>yr(e,n.inclusive?"minimum":"exclusiveMinimum",n.value),less_than:(e,n)=>br(e,n.inclusive?"maximum":"exclusiveMaximum",n.value),multiple_of:(e,n)=>Sh(e,n.value),number_format:pl(t_),bigint_format:pl(n_),min_length:fl,max_length:hl,length_equals:(e,n)=>dl(e,n.length),min_size:fl,max_size:hl,size_equals:(e,n)=>dl(e,n.size),string_format:(e,n)=>{kh(e,n.format),n.pattern&&Eh(e,n.pattern),(n.format==="base64"||n.format==="base64url")&&(e.contentEncoding=n.format),(n.local||n.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,n)=>Ch(e,n.mime)};function Zr(e){var s;const n={},t=e._zod.def,r=e._zod.traits.has("$ZodCheck")?[e,...t.checks??[]]:t.checks??[];for(const i of r)(s=zs[i._zod.def.check])==null||s.call(zs,n,i._zod.def);const o=e._zod.bag;o.minimum!==void 0&&yr(n,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&yr(n,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&br(n,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&br(n,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&Sh(n,o.multipleOf),o.format!==void 0&&(n.format??(n.format=o.format),o.format.includes("int")&&(n.isInt=!0)),o.mime&&Ch(n,o.mime);for(const i of o.patterns??[])Eh(n,i);return n}const DS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},NS=new Map([[uh,ox],[za,sx]]),jS=e=>NS.get(e)??e,MS=(e,n,t,r)=>{const o=t;o.type="string";const{minimum:s,maximum:i,format:a,patterns:c,contentEncoding:u,laxFormat:d}=Zr(e);if(typeof s=="number"&&(o.minLength=s),typeof i=="number"&&(o.maxLength=i),a&&(o.format=DS[a]??a,o.format===""&&delete o.format,(a==="time"||d)&&delete o.format),u&&(o.contentEncoding=u),c&&c.size>0){const l=[...c].map(jS);l.length===1?o.pattern=l[0].source:l.length>1&&(o.allOf=[...l.map(f=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},$S=(e,n,t,r)=>{t.type="boolean"},zS=(e,n,t,r)=>{t.not={}},FS=(e,n,t,r)=>{},LS=(e,n,t,r)=>{const o=e._zod.def,s=Oi(o.entries);if(s.length===0){t.not={};return}s.every(i=>typeof i=="number")&&(t.type="number"),s.every(i=>typeof i=="string")&&(t.type="string"),t.enum=s},VS=(e,n,t,r)=>{lo(e,n,t,r,"Custom types cannot be represented in JSON Schema")},US=(e,n,t,r)=>{lo(e,n,t,r,"Transforms cannot be represented in JSON Schema")},ZS=(e,n,t,r)=>{const o=t,s=e._zod.def,{minimum:i,maximum:a}=Zr(e);typeof i=="number"&&(o.minItems=i),typeof a=="number"&&(o.maxItems=a),o.type="array",o.items=et(s.element,n,{...r,path:[...r.path,"items"]})};function Ni(e){const n=e._zod.def;return n.type==="pipe"&&n.in._zod.traits.has("$ZodTransform")?Ni(n.out):n.type==="catch"?Ni(n.innerType):e._zod.optin}const BS=(e,n,t,r)=>{var u;const o=t,s=e._zod.def,i=s.shape;if(Object.getOwnPropertySymbols(i).length&&lo(e,n,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const d in i)Bn(o.properties,d,et(i[d],n,{...r,path:[...r.path,"properties",d]}));const c=[];for(const d of Object.keys(i)){const l=s.shape[d];(n.io==="input"?Ni(l)===void 0:l._zod.optout===void 0)&&c.push(d)}c.length>0&&(o.required=c),((u=s.catchall)==null?void 0:u._zod.def.type)==="never"?o.additionalProperties=!1:s.catchall?s.catchall&&(o.additionalProperties=et(s.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},KS=(e,n,t,r)=>{const o=e._zod.def,s=o.inclusive===!1,i=o.options.map((a,c)=>et(a,n,{...r,path:[...r.path,s?"oneOf":"anyOf",c]}));s?t.oneOf=i:t.anyOf=i},WS=(e,n,t,r)=>{const o=e._zod.def,s=et(o.left,n,{...r,path:[...r.path,"allOf",0]}),i=et(o.right,n,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(s)?s.allOf:[s],...a(i)?i.allOf:[i]];t.allOf=c,n.intersections.push(c)},HS=(e,n,t,r)=>{const o=e._zod.def,s=et(o.innerType,n,r),i=n.seen.get(e);n.target==="openapi-3.0"?(i.ref=o.innerType,t.nullable=!0):t.anyOf=[s,{type:"null"}]},GS=(e,n,t,r)=>{const o=e._zod.def;et(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType},Fa=Symbol();function Ph(e,n,t,r,o){let s=!1;const i=JSON.stringify(e,(a,c)=>typeof c!="bigint"?c:(s=!0,null));return s?(lo(n,t,r,o,"BigInt defaults cannot be represented in JSON Schema"),Fa):JSON.parse(i)}const qS=(e,n,t,r)=>{const o=e._zod.def;et(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType;const i=Ph(o.defaultValue,e,n,t,r);i!==Fa&&(t.default=i)},QS=(e,n,t,r)=>{const o=e._zod.def;et(o.innerType,n,r);const s=n.seen.get(e);if(s.ref=o.innerType,n.io!=="input")return;const i=Ph(o.defaultValue,e,n,t,r);i!==Fa&&(t._prefault=i)},JS=(e,n,t,r)=>{const o=e._zod.def;et(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType;let i;try{i=o.catchValue(void 0)}catch{lo(e,n,t,r,"Dynamic catch values are not supported in JSON Schema");return}t.default=i},YS=(e,n,t,r)=>{const o=e._zod.def,s=o.in._zod.traits.has("$ZodTransform"),i=n.io==="input"?s?o.out:o.in:o.out;et(i,n,r);const a=n.seen.get(e);a.ref=i},XS=(e,n,t,r)=>{const o=e._zod.def;et(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType,t.readOnly=!0},Oh=(e,n,t,r)=>{const o=e._zod.def;et(o.innerType,n,r);const s=n.seen.get(e);s.ref=o.innerType},ml=new WeakSet([Object.prototype,Error.prototype]);function To(e,n,t){Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get(){const r=t(this);return Object.defineProperty(this,n,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,n,{value:r,configurable:!0,writable:!0})}})}const eE=(e,n)=>{C_.init(e,n),e.name="ZodError";const t=Object.getPrototypeOf(e);ml.has(t)||(ml.add(t),To(t,"format",r=>o=>O_(r,o)),To(t,"flatten",r=>o=>P_(r,o)),To(t,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Ri,2)}),To(t,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Ri,2)}),Object.defineProperty(t,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},Pt=j("ZodError",eE,void 0,{Parent:Error}),tE=Aa(Pt),nE=Da(Pt),rE=Na(Pt),oE=ja(Pt),sE=N_(Pt),iE=j_(Pt),aE=M_(Pt),cE=$_(Pt),lE=z_(Pt),uE=F_(Pt),dE=L_(Pt),fE=V_(Pt);function hE(){Vt.localeError||kn(j1())}function La(){Vt.memoizer||kn({memoizer:A1()})}const Ve=j("ZodType",(e,n)=>(hE(),Le.init(e,n),e.def=n,e.type=n.type,e),{check(...e){const n=this.def;return this.clone(wt(n,{checks:[...n.checks??[],...e.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,n){return Cn(this,e,n)},brand(){return this},register(e,n){return e.add(this,n),this},refine(e,n){return this.check(uC(e,n))},superRefine(e,n){return this.check(dC(e,n))},overwrite(e){return this.check(kr(e))},optional(){return yl(this)},exactOptional(){return YE(this)},nullable(){return bl(this)},nullish(){return yl(bl(this))},nonoptional(e){return oC(this,e)},array(){return UE(this)},or(e){return WE([this,e])},and(e){return GE(this,e)},transform(e){return wl(this,JE(e))},default(e){return tC(this,e)},prefault(e){return rC(this,e)},catch(e){return iC(this,e)},pipe(e){return wl(this,e)},readonly(){return lC(this)},describe(e){const n=this.clone();return Fr.add(n,{description:e}),n},meta(...e){if(e.length===0)return Fr.get(this);const n=this.clone();return Fr.add(n,e[0]),n},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...n){return n.length===0?e(this):e(this,...n)},get"~standard"(){return Ia(this,"~standard",{...sh(this),jsonSchema:{input:Xo(this,"input"),output:Xo(this,"output")}})},set"~standard"(e){En(this,"~standard",e)},parse:function e(n,t){return tE(this,n,t,{callee:e})},parseAsync:async function e(n,t){return await nE(this,n,t,{callee:e})},safeParse(e,n){return rE(this,e,n)},async safeParseAsync(e,n){return oE(this,e,n)},get spa(){return this==null?void 0:this.safeParseAsync},set spa(e){En(this,"spa",e)},validate(e,n){return I_(this,e,n)},validateAsync(e,n){return D_(this,e,n)},encode:function e(n,t){return sE(this,n,t,{callee:e})},decode:function e(n,t){return iE(this,n,t,{callee:e})},encodeAsync:async function e(n,t){return await aE(this,n,t,{callee:e})},decodeAsync:async function e(n,t){return await cE(this,n,t,{callee:e})},safeEncode(e,n){return lE(this,e,n)},safeDecode(e,n){return uE(this,e,n)},async safeEncodeAsync(e,n){return dE(this,e,n)},async safeDecodeAsync(e,n){return fE(this,e,n)},toJSONSchema(e){return AS(this,{})(e)},get description(){var e;return(e=Fr.get(this))==null?void 0:e.description},get _def(){return this._zod.def}}),Rh=j("_ZodString",(e,n)=>{$a.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>MS(e,t,r)},h_({format:e=>Zr(e).format??null,minLength:e=>Zr(e).minimum??null,maxLength:e=>Zr(e).maximum??null},{regex(...e){return this.check(mS(...e))},includes(...e){return this.check(yS(...e))},startsWith(...e){return this.check(bS(...e))},endsWith(...e){return this.check(wS(...e))},min(...e){return this.check(Yo(...e))},max(...e){return this.check(gh(...e))},length(...e){return this.check(vh(...e))},nonempty(...e){return this.check(Yo(1,...e))},lowercase(e){return this.check(gS(e))},uppercase(e){return this.check(vS(e))},trim(){return this.check(SS())},normalize(...e){return this.check(xS(...e))},toLowerCase(){return this.check(ES())},toUpperCase(){return this.check(CS())},slugify(){return this.check(kS())}})),pE=j("ZodString",(e,n)=>{$a.init(e,n),Rh.init(e,n)},{email(e){return this.check(L1(bE,e))},url(e){return this.check(W1(_E,e))},jwt(e){return this.check(aS(ME,e))},emoji(e){return this.check(H1(xE,e))},guid(e){return this.check(V1(wE,e))},uuid(e){return this.check(U1(Io,e))},uuidv4(e){return this.check(Z1(Io,e))},uuidv6(e){return this.check(B1(Io,e))},uuidv7(e){return this.check(K1(Io,e))},nanoid(e){return this.check(G1(SE,e))},cuid(e){return this.check(q1(EE,e))},cuid2(e){return this.check(Q1(CE,e))},ulid(e){return this.check(J1(kE,e))},base64(e){return this.check(oS(DE,e))},base64url(e){return this.check(sS(NE,e))},xid(e){return this.check(Y1(PE,e))},ksuid(e){return this.check(X1(OE,e))},ipv4(e){return this.check(eS(RE,e))},ipv6(e){return this.check(tS(TE,e))},cidrv4(e){return this.check(nS(IE,e))},cidrv6(e){return this.check(rS(AE,e))},e164(e){return this.check(iS(jE,e))},datetime(e){return this.check(cS(mE,e))},date(e){return this.check(lS(gE,e))},time(e){return this.check(uS(vE,e))},duration(e){return this.check(dS(yE,e))}});function gl(e){return F1(pE,e)}const De=j("ZodStringFormat",(e,n)=>{Te.init(e,n),Rh.init(e,n)}),mE=j("ZodISODateTime",(e,n)=>{Wx.init(e,n),De.init(e,n)}),gE=j("ZodISODate",(e,n)=>{Hx.init(e,n),De.init(e,n)}),vE=j("ZodISOTime",(e,n)=>{Gx.init(e,n),De.init(e,n)}),yE=j("ZodISODuration",(e,n)=>{qx.init(e,n),De.init(e,n)}),bE=j("ZodEmail",(e,n)=>{Ax.init(e,n),De.init(e,n)}),wE=j("ZodGUID",(e,n)=>{Tx.init(e,n),De.init(e,n)}),Io=j("ZodUUID",(e,n)=>{Ix.init(e,n),De.init(e,n)}),_E=j("ZodURL",(e,n)=>{zx.init(e,n),De.init(e,n)}),xE=j("ZodEmoji",(e,n)=>{Fx.init(e,n),De.init(e,n)}),SE=j("ZodNanoID",(e,n)=>{Lx.init(e,n),De.init(e,n)}),EE=j("ZodCUID",(e,n)=>{Vx.init(e,n),De.init(e,n)}),CE=j("ZodCUID2",(e,n)=>{Ux.init(e,n),De.init(e,n)}),kE=j("ZodULID",(e,n)=>{Zx.init(e,n),De.init(e,n)}),PE=j("ZodXID",(e,n)=>{Bx.init(e,n),De.init(e,n)}),OE=j("ZodKSUID",(e,n)=>{Kx.init(e,n),De.init(e,n)}),RE=j("ZodIPv4",(e,n)=>{Qx.init(e,n),De.init(e,n)}),TE=j("ZodIPv6",(e,n)=>{Yx.init(e,n),De.init(e,n)}),IE=j("ZodCIDRv4",(e,n)=>{Xx.init(e,n),De.init(e,n)}),AE=j("ZodCIDRv6",(e,n)=>{t1.init(e,n),De.init(e,n)}),DE=j("ZodBase64",(e,n)=>{n1.init(e,n),De.init(e,n)}),NE=j("ZodBase64URL",(e,n)=>{o1.init(e,n),De.init(e,n)}),jE=j("ZodE164",(e,n)=>{s1.init(e,n),De.init(e,n)}),ME=j("ZodJWT",(e,n)=>{a1.init(e,n),De.init(e,n)}),$E=j("ZodBoolean",(e,n)=>{c1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>$S(e,t,r)});function g2(e){return fS($E,e)}const zE=j("ZodUnknown",(e,n)=>{l1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>FS()});function vl(){return hS(zE)}const FE=j("ZodNever",(e,n)=>{u1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>zS(e,t,r)});function LE(e){return pS(FE,e)}const VE=j("ZodArray",(e,n)=>{La(),d1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>ZS(e,t,r,o),e.element=n.element},{min(e,n){return this.check(Yo(e,n))},nonempty(e){return this.check(Yo(1,e))},max(e,n){return this.check(gh(e,n))},length(e,n){return this.check(vh(e,n))},unwrap(){return this.element}});function UE(e,n){return PS(VE,e,n)}const ZE=j("ZodObject",(e,n)=>{La(),p1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>BS(e,t,r,o),v_(e,"shape",t=>t._zod.def.shape,!1)},{keyof(){return qE(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(wt(this._zod.def,{catchall:e}))},passthrough(){return this.clone(wt(this._zod.def,{catchall:vl()}))},loose(){return this.clone(wt(this._zod.def,{catchall:vl()}))},strict(){return this.clone(wt(this._zod.def,{catchall:LE()}))},strip(){return this.clone(wt(this._zod.def,{catchall:void 0}))},extend(e){return s_(this,e)},safeExtend(e){return i_(this,e)},merge(e){return a_(this,e)},pick(e){return r_(this,e)},omit(e){return o_(this,e)},partial(...e){return Zc(Th,this,e[0])},exactPartial(...e){return Zc(Ih,this,e[0],"exactPartial")},required(...e){return c_(Ah,this,e[0])}});function BE(e,n){const t={type:"object",shape:e??{},...re(n)};return new ZE(t)}const KE=j("ZodUnion",(e,n)=>{m1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>KS(e,t,r,o),e.options=n.options});function WE(e,n){return new KE({type:"union",options:e,...re(n)})}const HE=j("ZodIntersection",(e,n)=>{g1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>WS(e,t,r,o)});function GE(e,n){return new HE({type:"intersection",left:e,right:n})}const ji=j("ZodEnum",(e,n)=>{v1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(r,o,s)=>LS(e,r,o),e.enum=n.entries,e.options=[...e._zod.values];const t=new Set(Object.keys(n.entries));e.extract=(r,o)=>{const s={};for(const i of r)if(t.has(i))s[i]=n.entries[i];else throw new Error(`Key ${i} not found in enum`);return new ji({...n,checks:[],...re(o),entries:s})},e.exclude=(r,o)=>{const s={...n.entries};for(const i of r)if(t.has(i))delete s[i];else throw new Error(`Key ${i} not found in enum`);return new ji({...n,checks:[],...re(o),entries:s})}});function qE(e,n){const t=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new ji({type:"enum",entries:t,...re(n)})}const QE=j("ZodTransform",(e,n)=>{La(),y1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>US(e,t,r,o),e._zod.parse=(t,r)=>{if(r.direction==="backward")throw new th(e.constructor.name);t.addIssue=s=>{if(typeof s=="string")t.issues.push(Qr(s,t.value,n));else{const i=s;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),"input"in i||(i.input=t.value),i.inst??(i.inst=e),t.issues.push(Qr(i))}};const o=n.transform(t.value,t);return o instanceof Promise?o.then(s=>(t.value=s,t)):(t.value=o,t)}});function JE(e){return new QE({type:"transform",transform:e})}const Th=j("ZodOptional",(e,n)=>{hh.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>Oh(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function yl(e){return new Th({type:"optional",innerType:e})}const Ih=j("ZodExactOptional",(e,n)=>{b1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>Oh(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function YE(e){return new Ih({type:"optional",innerType:e})}const XE=j("ZodNullable",(e,n)=>{w1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>HS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function bl(e){return new XE({type:"nullable",innerType:e})}const eC=j("ZodDefault",(e,n)=>{_1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>qS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function tC(e,n){return new eC({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Yf(n)}})}const nC=j("ZodPrefault",(e,n)=>{x1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>QS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function rC(e,n){return new nC({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Yf(n)}})}const Ah=j("ZodNonOptional",(e,n)=>{S1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>GS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function oC(e,n){return new Ah({type:"nonoptional",innerType:e,...re(n)})}const sC=j("ZodCatch",(e,n)=>{E1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>JS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function iC(e,n){return new sC({type:"catch",innerType:e,catchValue:typeof n=="function"?n:b_(n)})}const aC=j("ZodPipe",(e,n)=>{C1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>YS(e,t,r,o),e.in=n.in,e.out=n.out});function wl(e,n){return new aC({type:"pipe",in:e,out:n})}const cC=j("ZodReadonly",(e,n)=>{k1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>XS(e,t,r,o),e.unwrap=()=>e._zod.def.innerType});function lC(e){return new cC({type:"readonly",innerType:e})}const Dh=j("ZodCustom",(e,n)=>{P1.init(e,n),Ve.init(e,n),e._zod.processJSONSchema=(t,r,o)=>VS(e,t,r,o)});function uC(e,n={}){return OS(Dh,e,n)}function dC(e,n){return RS(e,n)}const fC=j("ZodInstanceOf",(e,n)=>{Dh.init(e,n)},{properties(e,n){return this.check(_S(e,n))}});function v2(e,n={}){const t=new fC({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...re(n)});return t._zod.bag.Class=e,t._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:t,path:[...t._zod.def.path??[]]})},t}var hC=Object.defineProperty,pC=(e,n)=>hC(e,"name",{value:n,configurable:!0}),mC=h.forwardRef(pC(function(n,t){return g.jsx($e.label,{...n,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=n.onMouseDown)==null||s.call(n,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}})},"Label")),Nh=mC;const gC=ro("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Mi=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne(gC(),r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx(Nh,{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Mi.displayName=Nh.displayName;function Fs(e){const n=Y.c(10),{id:t,message:r,className:o,assertive:s}=e;let i;n[0]!==s?(i=s?{role:"alert"}:{},n[0]=s,n[1]=i):i=n[1];const a=!r&&"absolute";let c;n[2]!==o||n[3]!==a?(c=ne("text-sm text-destructive",a,o),n[2]=o,n[3]=a,n[4]=c):c=n[4];const u=r??"";let d;return n[5]!==t||n[6]!==i||n[7]!==c||n[8]!==u?(d=g.jsx("p",{id:t,...i,className:c,children:u}),n[5]=t,n[6]=i,n[7]=c,n[8]=u,n[9]=d):d=n[9],d}function vC(e){return Object.entries(e).filter(([n,t])=>n!=="root"&&typeof(t==null?void 0:t.message)=="string").length}const _l=e=>e===1?"1 field needs attention":`${e} fields need attention`,yC=100;function bC(e){var r,o,s,i;const n=(r=e==null?void 0:e.closest("form"))==null?void 0:r.querySelector('[aria-invalid="true"]');if(!n)return"";if(n!==document.activeElement)return n.focus(),"";const t=(o=n.getAttribute("aria-describedby"))==null?void 0:o.split(" ")[0];return t&&((i=(s=document.getElementById(t))==null?void 0:s.textContent)==null?void 0:i.trim())||""}function wC(e,n){return e?`${/[.!?]$/.test(e)?e:`${e}.`} ${_l(n)}`:_l(n)}function _C(e){const n=Y.c(5),{errors:t,submitCount:r}=e,o=h.useRef(null),s=vC(t),[i,a]=h.useState(r),[c,u]=h.useState(""),[d,l]=h.useState(null);i!==r?(a(r),u(""),l(s>0?{submit:r,count:s}:null)):s===0&&(c!==""||d!==null)&&(u(""),l(null));let f,p;n[0]!==d?(f=()=>{if(d===null)return;const v=bC(o.current),y=setTimeout(()=>{u(wC(v,d.count)),l(null)},yC);return()=>clearTimeout(y)},p=[d],n[0]=d,n[1]=f,n[2]=p):(f=n[1],p=n[2]),h.useEffect(f,p);let m;return n[3]!==c?(m=g.jsx("p",{ref:o,"aria-live":"polite",className:"sr-only",children:c}),n[3]=c,n[4]=m):m=n[4],m}const Va=8,y2=`Use at least ${Va} characters`,xC=`Password must be at least ${Va} characters`;function b2(e,n,t){return t?n:e}const SC=ro("rounded-lg bg-card text-card-foreground",{variants:{level:{0:"",1:"shadow-card-1",2:"shadow-card-2",3:"shadow-card-3",4:"shadow-card-4"}},defaultVariants:{level:2}}),jh=h.forwardRef((e,n)=>{const t=Y.c(11);let r,o,s;t[0]!==e?({className:r,level:o,...s}=e,t[0]=e,t[1]=r,t[2]=o,t[3]=s):(r=t[1],o=t[2],s=t[3]);let i;t[4]!==r||t[5]!==o?(i=ne(SC({level:o}),r),t[4]=r,t[5]=o,t[6]=i):i=t[6];let a;return t[7]!==s||t[8]!==n||t[9]!==i?(a=g.jsx("div",{ref:n,className:i,...s}),t[7]=s,t[8]=n,t[9]=i,t[10]=a):a=t[10],a});jh.displayName="Card";const Mh=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("flex flex-col space-y-1.5 p-6",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Mh.displayName="CardHeader";const $h=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("text-2xl font-semibold leading-none tracking-tight",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});$h.displayName="CardTitle";const zh=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("text-sm text-muted-foreground",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});zh.displayName="CardDescription";const Fh=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("p-6 pt-0",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});Fh.displayName="CardContent";const EC=h.forwardRef((e,n)=>{const t=Y.c(9);let r,o;t[0]!==e?({className:r,...o}=e,t[0]=e,t[1]=r,t[2]=o):(r=t[1],o=t[2]);let s;t[3]!==r?(s=ne("flex items-center p-6 pt-0",r),t[3]=r,t[4]=s):s=t[4];let i;return t[5]!==o||t[6]!==n||t[7]!==s?(i=g.jsx("div",{ref:n,className:s,...o}),t[5]=o,t[6]=n,t[7]=s,t[8]=i):i=t[8],i});EC.displayName="CardFooter";const CC=BE({email:gl().email("Enter a valid email"),password:gl().min(Va,xC)});function kC(){var pe,Se,rt,lt;const e=Y.c(58),n=Nl(),{resolvedTheme:t}=es(),r=t==="dark"?"/logo-dark.svg":"/logo.svg";let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={queryKey:va.authStatus,queryFn:Yw,staleTime:1/0},e[0]=o):o=e[0];const s=Wi(o),i=Li();let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={shouldFocusError:!1,resolver:W0(CC)},e[1]=a):a=e[1];const{register:c,handleSubmit:u,setError:d,formState:l}=U0(a),{errors:f,isSubmitting:p,submitCount:m}=l;let v;e[2]!==n||e[3]!==i||e[4]!==d?(v=async function(ot){try{const{status:on}=await Tf.post("/api/v1/auth/login",{email:ot.email,password:ot.password});if(on!==200){d("root",{message:"Invalid email or password"});return}i.clear(),n("/app-center",{replace:!0})}catch{d("root",{message:"Network error. Please try again."})}},e[2]=n,e[3]=i,e[4]=d,e[5]=v):v=e[5];const y=v;if(((pe=s.data)==null?void 0:pe.initialized)===!1){let Qe;return e[6]===Symbol.for("react.memo_cache_sentinel")?(Qe=g.jsx(zi,{to:"/setup",replace:!0}),e[6]=Qe):Qe=e[6],Qe}let b;e[7]!==r?(b=g.jsx("img",{src:r,alt:"tapflow",className:"w-6 h-6"}),e[7]=r,e[8]=b):b=e[8];let _;e[9]===Symbol.for("react.memo_cache_sentinel")?(_=g.jsx("span",{className:"text-base font-semibold tracking-tight",children:"tapflow"}),e[9]=_):_=e[9];let x;e[10]!==b?(x=g.jsxs("div",{className:"flex items-center gap-2",children:[b,_]}),e[10]=b,e[11]=x):x=e[11];let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=g.jsxs(Mh,{className:"text-center",children:[g.jsx($h,{className:"text-2xl tracking-display-md",children:"Welcome back"}),g.jsx(zh,{children:"Sign in to your team workspace"})]}),e[12]=E):E=e[12];let C;e[13]!==u||e[14]!==y?(C=u(y),e[13]=u,e[14]=y,e[15]=C):C=e[15];let O;e[16]===Symbol.for("react.memo_cache_sentinel")?(O=g.jsx(Mi,{htmlFor:"email",children:"Email"}),e[16]=O):O=e[16];const T=!!f.email,A=f.email?"email-error":void 0;let R;e[17]!==c?(R=c("email"),e[17]=c,e[18]=R):R=e[18];let z;e[19]!==T||e[20]!==A||e[21]!==R?(z=g.jsx(Zo,{id:"email",type:"email",placeholder:"you@company.com",autoComplete:"email","aria-required":"true","aria-invalid":T,"aria-describedby":A,...R}),e[19]=T,e[20]=A,e[21]=R,e[22]=z):z=e[22];const L=(Se=f.email)==null?void 0:Se.message;let $;e[23]!==L?($=g.jsx(Fs,{id:"email-error",message:L}),e[23]=L,e[24]=$):$=e[24];let G;e[25]!==z||e[26]!==$?(G=g.jsxs("div",{className:"grid gap-2",children:[O,z,$]}),e[25]=z,e[26]=$,e[27]=G):G=e[27];let Z;e[28]===Symbol.for("react.memo_cache_sentinel")?(Z=g.jsx(Mi,{htmlFor:"password",children:"Password"}),e[28]=Z):Z=e[28];const q=!!f.password,B=f.password?"password-error":void 0;let J;e[29]!==c?(J=c("password"),e[29]=c,e[30]=J):J=e[30];let ue;e[31]!==q||e[32]!==B||e[33]!==J?(ue=g.jsx(Zo,{id:"password",type:"password",autoComplete:"current-password","aria-required":"true","aria-invalid":q,"aria-describedby":B,...J}),e[31]=q,e[32]=B,e[33]=J,e[34]=ue):ue=e[34];const ee=(rt=f.password)==null?void 0:rt.message;let Q;e[35]!==ee?(Q=g.jsx(Fs,{id:"password-error",message:ee}),e[35]=ee,e[36]=Q):Q=e[36];let oe;e[37]!==ue||e[38]!==Q?(oe=g.jsxs("div",{className:"grid gap-2",children:[Z,ue,Q]}),e[37]=ue,e[38]=Q,e[39]=oe):oe=e[39];const fe=(lt=f.root)==null?void 0:lt.message;let _e;e[40]!==fe?(_e=g.jsx(Fs,{assertive:!0,id:"login-error",message:fe}),e[40]=fe,e[41]=_e):_e=e[41];const te=p?"Signing in…":"Sign in";let ce;e[42]!==p||e[43]!==te?(ce=g.jsx(ts,{type:"submit",size:"lg",disabled:p,className:"w-full mt-1",children:te}),e[42]=p,e[43]=te,e[44]=ce):ce=e[44];let he;e[45]!==f||e[46]!==m?(he=g.jsx(_C,{errors:f,submitCount:m}),e[45]=f,e[46]=m,e[47]=he):he=e[47];let be;e[48]!==G||e[49]!==oe||e[50]!==_e||e[51]!==ce||e[52]!==he||e[53]!==C?(be=g.jsxs(jh,{level:4,className:"w-full",children:[E,g.jsx(Fh,{children:g.jsxs("form",{onSubmit:C,className:"flex flex-col gap-4",children:[G,oe,_e,ce,he]})})]}),e[48]=G,e[49]=oe,e[50]=_e,e[51]=ce,e[52]=he,e[53]=C,e[54]=be):be=e[54];let ke;return e[55]!==be||e[56]!==x?(ke=g.jsx("div",{className:"flex min-h-svh items-center justify-center overflow-hidden p-4",children:g.jsxs("div",{className:"flex flex-col items-center gap-6 w-full max-w-sm",children:[x,be]})}),e[55]=be,e[56]=x,e[57]=ke):ke=e[57],ke}function PC(){return new $p({defaultOptions:{queries:{retry:0,refetchOnWindowFocus:!0,networkMode:"always"}}})}const OC=h.lazy(()=>Ut(()=>import("./Setup-CF_FN9Dt.js"),__vite__mapDeps([0,1,2,3])).then(e=>({default:e.Setup}))),RC=h.lazy(()=>Ut(()=>import("./Invite-C0ZB_HiU.js"),__vite__mapDeps([4,1,2,3,5])).then(e=>({default:e.Invite}))),TC=h.lazy(()=>Ut(()=>import("./ResetPassword-jNRuertx.js"),__vite__mapDeps([6,1,2,3])).then(e=>({default:e.ResetPassword}))),IC=h.lazy(()=>Ut(()=>import("./AppCenter-BMdYtQbV.js"),__vite__mapDeps([7,1,8,9,10,11,12,13,3])).then(e=>({default:e.AppCenter}))),AC=h.lazy(()=>Ut(()=>import("./QASession-2QogWEX7.js"),__vite__mapDeps([14,1,15,3,12,9,8,16,11])).then(e=>({default:e.QASession}))),DC=h.lazy(()=>Ut(()=>import("./MacResources-DmY5pRV2.js"),__vite__mapDeps([17,1,15,18,3])).then(e=>({default:e.MacResources}))),NC=h.lazy(()=>Ut(()=>import("./Default-0DHHVGaN.js"),__vite__mapDeps([19,1,2,11,12,5,3])).then(e=>({default:e.DefaultSettings}))),jC=h.lazy(()=>Ut(()=>import("./Team-BbiyOGau.js"),__vite__mapDeps([20,1,9,12,21,16,13,3])).then(e=>({default:e.TeamSettings}))),MC=h.lazy(()=>Ut(()=>import("./Tokens-CZo4sPTx.js"),__vite__mapDeps([22,1,11,12,9,21,16,13,10,3])).then(e=>({default:e.TokenSettings}))),$C=h.lazy(()=>Ut(()=>import("./NotFound-wHOnT2Fl.js"),__vite__mapDeps([23,1])).then(e=>({default:e.NotFound}))),zC=g.jsx("div",{className:"flex h-screen w-full items-center justify-center text-sm text-muted-foreground",children:"Loading…"}),Ao=e=>g.jsx(h.Suspense,{fallback:zC,children:e}),FC=PC();function LC(){const e=Y.c(15),{resolvedTheme:n}=es();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=g.jsx(yt,{path:"/login",element:g.jsx(kC,{})}),e[0]=t):t=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=g.jsx(yt,{path:"/setup",element:Ao(g.jsx(OC,{}))}),e[1]=r):r=e[1];let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=g.jsx(yt,{path:"/invite",element:Ao(g.jsx(RC,{}))}),e[2]=o):o=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=g.jsx(yt,{path:"/reset-password",element:Ao(g.jsx(TC,{}))}),e[3]=s):s=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=g.jsx(g0,{}),e[4]=i):i=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx(yt,{index:!0,element:g.jsx(zi,{to:"/app-center",replace:!0})}),e[5]=a):a=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c=g.jsx(yt,{path:"/app-center",element:g.jsx(IC,{})}),e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=g.jsx(yt,{path:"/app-center/build",element:g.jsx(AC,{})}),e[7]=u):u=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=g.jsx(yt,{path:"/mac-resources",element:g.jsx(DC,{})}),e[8]=d):d=e[8];let l;e[9]===Symbol.for("react.memo_cache_sentinel")?(l=g.jsx(yt,{path:"/settings/default",element:g.jsx(NC,{})}),e[9]=l):l=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=g.jsx(yt,{path:"/settings/team",element:g.jsx(jC,{})}),e[10]=f):f=e[10];let p;e[11]===Symbol.for("react.memo_cache_sentinel")?(p=g.jsxs(yt,{element:i,children:[a,c,u,d,l,f,g.jsx(yt,{path:"/settings/tokens",element:g.jsx(MC,{})})]}),e[11]=p):p=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=g.jsxs(Yh,{children:[t,r,o,s,p,g.jsx(yt,{path:"*",element:Ao(g.jsx($C,{}))})]}),e[12]=m):m=e[12];const v=n;let y;return e[13]!==v?(y=g.jsx(dp,{client:FC,children:g.jsxs(Xh,{children:[m,g.jsx(Sm,{position:"bottom-right",richColors:!0,theme:v})]})}),e[13]=v,e[14]=y):y=e[14],y}Qh.createRoot(document.getElementById("root")).render(g.jsx(h.StrictMode,{children:g.jsx(rp,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,children:g.jsx(LC,{})})}));export{f2 as $,Sd as A,ts as B,jh as C,ty as D,jb as E,Fs as F,xd as G,_r as H,Zo as I,no as J,Nd as K,Mi as L,Hm as M,qy as N,Jy as O,y2 as P,v2 as Q,ta as R,Bo as S,Qy as T,i0 as U,Oy as V,s0 as W,Ym as X,g2 as Y,Mg as Z,qE as _,Fh as a,ne as a0,se as a1,l2 as a2,ia as a3,nn as a4,WC as a5,mt as a6,ss as a7,Yd as a8,Yt as a9,KC as aA,W0 as aB,u2 as aC,If as aD,p0 as aE,Xt as aF,Re as aG,so as aH,ca as aI,ns as aJ,U0 as aK,xn as aL,pt as aM,Wi as aN,Li as aO,gd as aP,S0 as aQ,XC as aR,i2 as aS,es as aT,ro as aa,b2 as ab,a2 as ac,Yw as ad,h2 as ae,c2 as af,n2 as ag,Np as ah,o2 as ai,r2 as aj,s2 as ak,e0 as al,t2 as am,e2 as an,p2 as ao,Br as ap,nd as aq,BC as ar,dt as as,Ye as at,BE as au,va as av,d2 as aw,ws as ax,Vl as ay,gl as az,zh as b,Mh as c,$h as d,Vm as e,Um as f,Ed as g,m2 as h,fy as i,ad as j,ud as k,id as l,oy as m,ld as n,HC as o,Qi as p,$u as q,t0 as r,_C as s,Mb as t,Km as u,Va as v,xC as w,Xi as x,rn as y,$e as z};