@epic-web/workshop-app 5.22.4 → 5.23.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 (248) hide show
  1. package/build/client/assets/{_-CHaVBRQw.js → _-BaHOmd8F.js} +2 -2
  2. package/build/client/assets/{_-CHaVBRQw.js.map → _-BaHOmd8F.js.map} +1 -1
  3. package/build/client/assets/_basePickBy-B3Ji82Lk.js +2 -0
  4. package/build/client/assets/_basePickBy-B3Ji82Lk.js.map +1 -0
  5. package/build/client/assets/_baseUniq-BoGoqSUm.js +2 -0
  6. package/build/client/assets/_baseUniq-BoGoqSUm.js.map +1 -0
  7. package/build/client/assets/{_exerciseNumber-3uq8PYSd.js → _exerciseNumber-DtILU6SM.js} +2 -2
  8. package/build/client/assets/{_exerciseNumber-3uq8PYSd.js.map → _exerciseNumber-DtILU6SM.js.map} +1 -1
  9. package/build/client/assets/{_exerciseNumber_._stepNumber-D5VDI7vZ.js → _exerciseNumber_._stepNumber-DoOFEk-P.js} +2 -2
  10. package/build/client/assets/{_exerciseNumber_._stepNumber-D5VDI7vZ.js.map → _exerciseNumber_._stepNumber-DoOFEk-P.js.map} +1 -1
  11. package/build/client/assets/{_exerciseNumber_.finished-3Iv9ikNq.js → _exerciseNumber_.finished-CEK9anWX.js} +2 -2
  12. package/build/client/assets/{_exerciseNumber_.finished-3Iv9ikNq.js.map → _exerciseNumber_.finished-CEK9anWX.js.map} +1 -1
  13. package/build/client/assets/{_layout-DV29dlKr.js → _layout-B_BIIcpM.js} +2 -2
  14. package/build/client/assets/{_layout-DV29dlKr.js.map → _layout-B_BIIcpM.js.map} +1 -1
  15. package/build/client/assets/_layout-D1r_62oj.js +6 -0
  16. package/build/client/assets/_layout-D1r_62oj.js.map +1 -0
  17. package/build/client/assets/{_layout-CwTidn3v.js → _layout-D7_F6t3x.js} +2 -2
  18. package/build/client/assets/{_layout-CwTidn3v.js.map → _layout-D7_F6t3x.js.map} +1 -1
  19. package/build/client/assets/_layout-DzlTTMQ0.js +2 -0
  20. package/build/client/assets/_layout-DzlTTMQ0.js.map +1 -0
  21. package/build/client/assets/accordion-CpiLc1m2.js +2 -0
  22. package/build/client/assets/accordion-CpiLc1m2.js.map +1 -0
  23. package/build/client/assets/{account-CN4B8rm4.js → account-CbFDiVNd.js} +2 -2
  24. package/build/client/assets/{account-CN4B8rm4.js.map → account-CbFDiVNd.js.map} +1 -1
  25. package/build/client/assets/app-CQvK51s0.js +2 -0
  26. package/build/client/assets/{app-lUkT_xku.js.map → app-CQvK51s0.js.map} +1 -1
  27. package/build/client/assets/{app-DGPT3Jy6.css → app-DSmkkXO5.css} +1 -1
  28. package/build/client/assets/arc-rF8TbXNV.js +2 -0
  29. package/build/client/assets/arc-rF8TbXNV.js.map +1 -0
  30. package/build/client/assets/architectureDiagram-IEHRJDOE-D7gCCmY9.js +37 -0
  31. package/build/client/assets/architectureDiagram-IEHRJDOE-D7gCCmY9.js.map +1 -0
  32. package/build/client/assets/blockDiagram-JOT3LUYC-yGQOzhkw.js +122 -0
  33. package/build/client/assets/blockDiagram-JOT3LUYC-yGQOzhkw.js.map +1 -0
  34. package/build/client/assets/{button-ChOzbirS.js → button-Dt4EcDfR.js} +2 -2
  35. package/build/client/assets/{button-ChOzbirS.js.map → button-Dt4EcDfR.js.map} +1 -1
  36. package/build/client/assets/c4Diagram-VJAJSXHY-CTFjYF37.js +11 -0
  37. package/build/client/assets/c4Diagram-VJAJSXHY-CTFjYF37.js.map +1 -0
  38. package/build/client/assets/channel-5s71-OE9.js +2 -0
  39. package/build/client/assets/channel-5s71-OE9.js.map +1 -0
  40. package/build/client/assets/chunk-4BMEZGHF-BIe0IUDz.js +2 -0
  41. package/build/client/assets/chunk-4BMEZGHF-BIe0IUDz.js.map +1 -0
  42. package/build/client/assets/chunk-A2AXSNBT-B-nCbUBj.js +165 -0
  43. package/build/client/assets/chunk-A2AXSNBT-B-nCbUBj.js.map +1 -0
  44. package/build/client/assets/chunk-AEK57VVT-B-cCHPs2.js +221 -0
  45. package/build/client/assets/chunk-AEK57VVT-B-cCHPs2.js.map +1 -0
  46. package/build/client/assets/chunk-D6G4REZN-EQ3R8OZx.js +2 -0
  47. package/build/client/assets/chunk-D6G4REZN-EQ3R8OZx.js.map +1 -0
  48. package/build/client/assets/chunk-RZ5BOZE2-h6svq8Xk.js +2 -0
  49. package/build/client/assets/chunk-RZ5BOZE2-h6svq8Xk.js.map +1 -0
  50. package/build/client/assets/chunk-XZIHB7SX-74-HFRcU.js +2 -0
  51. package/build/client/assets/chunk-XZIHB7SX-74-HFRcU.js.map +1 -0
  52. package/build/client/assets/classDiagram-GIVACNV2-CWogZCzR.js +2 -0
  53. package/build/client/assets/classDiagram-GIVACNV2-CWogZCzR.js.map +1 -0
  54. package/build/client/assets/classDiagram-v2-COTLJTTW-CWogZCzR.js +2 -0
  55. package/build/client/assets/classDiagram-v2-COTLJTTW-CWogZCzR.js.map +1 -0
  56. package/build/client/assets/clone-nHZ14b_E.js +2 -0
  57. package/build/client/assets/clone-nHZ14b_E.js.map +1 -0
  58. package/build/client/assets/{components-DrvY4pal.js → components-5arJTWsS.js} +5 -5
  59. package/build/client/assets/{components-DrvY4pal.js.map → components-5arJTWsS.js.map} +1 -1
  60. package/build/client/assets/cytoscape.esm-BY7v1xhs.js +332 -0
  61. package/build/client/assets/cytoscape.esm-BY7v1xhs.js.map +1 -0
  62. package/build/client/assets/dagre-OKDRZEBW-Bq-HgVN8.js +5 -0
  63. package/build/client/assets/dagre-OKDRZEBW-Bq-HgVN8.js.map +1 -0
  64. package/build/client/assets/diagram-SSKATNLV-Cls675Lh.js +44 -0
  65. package/build/client/assets/diagram-SSKATNLV-Cls675Lh.js.map +1 -0
  66. package/build/client/assets/diagram-VNBRO52H-CJDqBhLa.js +25 -0
  67. package/build/client/assets/diagram-VNBRO52H-CJDqBhLa.js.map +1 -0
  68. package/build/client/assets/diff-8N5KyD7o.js +2 -0
  69. package/build/client/assets/{diff-CVrsnWqw.js.map → diff-8N5KyD7o.js.map} +1 -1
  70. package/build/client/assets/{diff-CTHVtVGQ.js → diff-Bu4t2NGL.js} +2 -2
  71. package/build/client/assets/{diff-CTHVtVGQ.js.map → diff-Bu4t2NGL.js.map} +1 -1
  72. package/build/client/assets/{discord-gROK6Zn6.js → discord-BU7RzE6-.js} +2 -2
  73. package/build/client/assets/{discord-gROK6Zn6.js.map → discord-BU7RzE6-.js.map} +1 -1
  74. package/build/client/assets/discord-ut4t-aMQ.js +2 -0
  75. package/build/client/assets/discord-ut4t-aMQ.js.map +1 -0
  76. package/build/client/assets/entry.client-BLUlgPHE.js +44 -0
  77. package/build/client/assets/{entry.client-CQusg5Iz.js.map → entry.client-BLUlgPHE.js.map} +1 -1
  78. package/build/client/assets/epic-video-DN9DRRHf.js +3206 -0
  79. package/build/client/assets/epic-video-DN9DRRHf.js.map +1 -0
  80. package/build/client/assets/erDiagram-Q7BY3M3F-DdKn4jVQ.js +61 -0
  81. package/build/client/assets/erDiagram-Q7BY3M3F-DdKn4jVQ.js.map +1 -0
  82. package/build/client/assets/{error-boundary-CAu3AmhN.js → error-boundary-B07cWiEy.js} +2 -2
  83. package/build/client/assets/{error-boundary-CAu3AmhN.js.map → error-boundary-B07cWiEy.js.map} +1 -1
  84. package/build/client/assets/{finished-9PhQncNF.js → finished-B3G1RUDO.js} +2 -2
  85. package/build/client/assets/{finished-9PhQncNF.js.map → finished-B3G1RUDO.js.map} +1 -1
  86. package/build/client/assets/flowDiagram-4HSFHLVR-5Mg796nh.js +162 -0
  87. package/build/client/assets/flowDiagram-4HSFHLVR-5Mg796nh.js.map +1 -0
  88. package/build/client/assets/ganttDiagram-APWFNJXF-YO2fxWzG.js +258 -0
  89. package/build/client/assets/ganttDiagram-APWFNJXF-YO2fxWzG.js.map +1 -0
  90. package/build/client/assets/gitGraphDiagram-7IBYFJ6S-DQCZvhP_.js +66 -0
  91. package/build/client/assets/gitGraphDiagram-7IBYFJ6S-DQCZvhP_.js.map +1 -0
  92. package/build/client/assets/graph-BFAO9Sgp.js +2 -0
  93. package/build/client/assets/graph-BFAO9Sgp.js.map +1 -0
  94. package/build/client/assets/{index-egcHQOpF.js → index-B8yUFowV.js} +2 -2
  95. package/build/client/assets/{index-egcHQOpF.js.map → index-B8yUFowV.js.map} +1 -1
  96. package/build/client/assets/{index-qo6WmPUa.js → index-BfCSiT_X.js} +2 -2
  97. package/build/client/assets/{index-qo6WmPUa.js.map → index-BfCSiT_X.js.map} +1 -1
  98. package/build/client/assets/index-BmMpCvYx.js +2 -0
  99. package/build/client/assets/index-BmMpCvYx.js.map +1 -0
  100. package/build/client/assets/index-CEP3Xxa0.js +36 -0
  101. package/build/client/assets/index-CEP3Xxa0.js.map +1 -0
  102. package/build/client/assets/index-Dkt2MSig.js +2 -0
  103. package/build/client/assets/index-Dkt2MSig.js.map +1 -0
  104. package/build/client/assets/index-Do-KWT0a.js +42 -0
  105. package/build/client/assets/index-Do-KWT0a.js.map +1 -0
  106. package/build/client/assets/index-Dsusf_Av.js +38 -0
  107. package/build/client/assets/{index-CGzylDPY.js.map → index-Dsusf_Av.js.map} +1 -1
  108. package/build/client/assets/index-DvQyydjU.js +3 -0
  109. package/build/client/assets/index-DvQyydjU.js.map +1 -0
  110. package/build/client/assets/{index-CYZfnGWa.js → index-Fw2eA3AF.js} +2 -2
  111. package/build/client/assets/{index-CYZfnGWa.js.map → index-Fw2eA3AF.js.map} +1 -1
  112. package/build/client/assets/infoDiagram-PH2N3AL5-x87RxSs8.js +3 -0
  113. package/build/client/assets/infoDiagram-PH2N3AL5-x87RxSs8.js.map +1 -0
  114. package/build/client/assets/init-Gi6I4Gst.js +2 -0
  115. package/build/client/assets/init-Gi6I4Gst.js.map +1 -0
  116. package/build/client/assets/journeyDiagram-U35MCT3I-D5yGbOLJ.js +139 -0
  117. package/build/client/assets/journeyDiagram-U35MCT3I-D5yGbOLJ.js.map +1 -0
  118. package/build/client/assets/kanban-definition-NDS4AKOZ-BM6KyRww.js +89 -0
  119. package/build/client/assets/kanban-definition-NDS4AKOZ-BM6KyRww.js.map +1 -0
  120. package/build/client/assets/katex-ChWnQ-fc.js +262 -0
  121. package/build/client/assets/katex-ChWnQ-fc.js.map +1 -0
  122. package/build/client/assets/layout-qCiM2Jgn.js +2 -0
  123. package/build/client/assets/layout-qCiM2Jgn.js.map +1 -0
  124. package/build/client/assets/linear-B3zp51yW.js +2 -0
  125. package/build/client/assets/linear-B3zp51yW.js.map +1 -0
  126. package/build/client/assets/{loading-CPEkK5hO.js → loading-BPTYJOXN.js} +2 -2
  127. package/build/client/assets/{loading-CPEkK5hO.js.map → loading-BPTYJOXN.js.map} +1 -1
  128. package/build/client/assets/login-CfyUfm-m.js +2 -0
  129. package/build/client/assets/{login-C9JmYc0v.js.map → login-CfyUfm-m.js.map} +1 -1
  130. package/build/client/assets/{manifest-4acdd3e2.js → manifest-fe4b7228.js} +1 -1
  131. package/build/client/assets/mdx-Dfsh6Vjk.js +3 -0
  132. package/build/client/assets/mdx-Dfsh6Vjk.js.map +1 -0
  133. package/build/client/assets/mermaid.core-ZaxoMXOj.js +214 -0
  134. package/build/client/assets/mermaid.core-ZaxoMXOj.js.map +1 -0
  135. package/build/client/assets/mindmap-definition-ALO5MXBD-CF3siXp6.js +96 -0
  136. package/build/client/assets/mindmap-definition-ALO5MXBD-CF3siXp6.js.map +1 -0
  137. package/build/client/assets/misc-2sBiisF5.js +2 -0
  138. package/build/client/assets/misc-2sBiisF5.js.map +1 -0
  139. package/build/client/assets/{nav-chevrons-DCuva9-Q.js → nav-chevrons-CV-dpXNR.js} +2 -2
  140. package/build/client/assets/{nav-chevrons-DCuva9-Q.js.map → nav-chevrons-CV-dpXNR.js.map} +1 -1
  141. package/build/client/assets/{onboarding-DzfDHJg_.js → onboarding-5LC4kIVW.js} +2 -2
  142. package/build/client/assets/{onboarding-DzfDHJg_.js.map → onboarding-5LC4kIVW.js.map} +1 -1
  143. package/build/client/assets/{online-BsTX44az.js → online-IWqRB9zP.js} +2 -2
  144. package/build/client/assets/{online-BsTX44az.js.map → online-IWqRB9zP.js.map} +1 -1
  145. package/build/client/assets/ordinal-Cboi1Yqb.js +2 -0
  146. package/build/client/assets/ordinal-Cboi1Yqb.js.map +1 -0
  147. package/build/client/assets/{pe-DXT2FOp1.js → pe-BShc2dvc.js} +2 -2
  148. package/build/client/assets/{pe-DXT2FOp1.js.map → pe-BShc2dvc.js.map} +1 -1
  149. package/build/client/assets/pieDiagram-IB7DONF6-B-gWQIHI.js +31 -0
  150. package/build/client/assets/pieDiagram-IB7DONF6-B-gWQIHI.js.map +1 -0
  151. package/build/client/assets/{preferences-BYBJKp8k.js → preferences-BkWQyRCq.js} +2 -2
  152. package/build/client/assets/{preferences-BYBJKp8k.js.map → preferences-BkWQyRCq.js.map} +1 -1
  153. package/build/client/assets/presence-BAL3jDku.js +28 -0
  154. package/build/client/assets/presence-BAL3jDku.js.map +1 -0
  155. package/build/client/assets/preview-D4amucCL.js +2 -0
  156. package/build/client/assets/{preview-DaTpH6lj.js.map → preview-D4amucCL.js.map} +1 -1
  157. package/build/client/assets/{product-BKhLQKd7.js → product-Cyum2biy.js} +2 -2
  158. package/build/client/assets/{product-BKhLQKd7.js.map → product-Cyum2biy.js.map} +1 -1
  159. package/build/client/assets/progress-BJ4ADF-s.js +2 -0
  160. package/build/client/assets/progress-BJ4ADF-s.js.map +1 -0
  161. package/build/client/assets/{progress-bar-ZCHf2Y4W.js → progress-bar-DgnkQxQw.js} +2 -2
  162. package/build/client/assets/{progress-bar-ZCHf2Y4W.js.map → progress-bar-DgnkQxQw.js.map} +1 -1
  163. package/build/client/assets/quadrantDiagram-7GDLP6J5-BQzo7p61.js +8 -0
  164. package/build/client/assets/quadrantDiagram-7GDLP6J5-BQzo7p61.js.map +1 -0
  165. package/build/client/assets/radar-MK3ICKWK-CM-Iz9PA.js +129 -0
  166. package/build/client/assets/radar-MK3ICKWK-CM-Iz9PA.js.map +1 -0
  167. package/build/client/assets/requirementDiagram-KVF5MWMF-DzaHc66R.js +65 -0
  168. package/build/client/assets/requirementDiagram-KVF5MWMF-DzaHc66R.js.map +1 -0
  169. package/build/client/assets/revalidation-ws-ho-umDqd.js +2 -0
  170. package/build/client/assets/{revalidation-ws-BoJZTvOQ.js.map → revalidation-ws-ho-umDqd.js.map} +1 -1
  171. package/build/client/assets/{root-4MvCzrFd.js → root-tJmOmO9T.js} +3 -3
  172. package/build/client/assets/{root-4MvCzrFd.js.map → root-tJmOmO9T.js.map} +1 -1
  173. package/build/client/assets/sankeyDiagram-QLVOVGJD-DfAVeZCk.js +11 -0
  174. package/build/client/assets/sankeyDiagram-QLVOVGJD-DfAVeZCk.js.map +1 -0
  175. package/build/client/assets/sequenceDiagram-X6HHIX6F-CljZRLoS.js +123 -0
  176. package/build/client/assets/sequenceDiagram-X6HHIX6F-CljZRLoS.js.map +1 -0
  177. package/build/client/assets/{set-playground-IUJCGVu2.js → set-playground-DW2Ys-rV.js} +2 -2
  178. package/build/client/assets/{set-playground-IUJCGVu2.js.map → set-playground-DW2Ys-rV.js.map} +1 -1
  179. package/build/client/assets/stateDiagram-DGXRK772-BzVfGv3W.js +2 -0
  180. package/build/client/assets/stateDiagram-DGXRK772-BzVfGv3W.js.map +1 -0
  181. package/build/client/assets/stateDiagram-v2-YXO3MK2T-8oX001yq.js +2 -0
  182. package/build/client/assets/stateDiagram-v2-YXO3MK2T-8oX001yq.js.map +1 -0
  183. package/build/client/assets/{support-CW3-Iilk.js → support-Bg0iSyle.js} +2 -2
  184. package/build/client/assets/{support-CW3-Iilk.js.map → support-Bg0iSyle.js.map} +1 -1
  185. package/build/client/assets/tailwind-DtnE_2an.css +1 -0
  186. package/build/client/assets/test-C14D-N72.js +2 -0
  187. package/build/client/assets/{test-B8jDo0X4.js.map → test-C14D-N72.js.map} +1 -1
  188. package/build/client/assets/tests-6__AtHpI.js +4 -0
  189. package/build/client/assets/{tests-y-atkhWB.js.map → tests-6__AtHpI.js.map} +1 -1
  190. package/build/client/assets/timeline-definition-BDJGKUSR-2TO9MtLY.js +62 -0
  191. package/build/client/assets/timeline-definition-BDJGKUSR-2TO9MtLY.js.map +1 -0
  192. package/build/client/assets/tooltip-Bzd6O8vq.js +2 -0
  193. package/build/client/assets/tooltip-Bzd6O8vq.js.map +1 -0
  194. package/build/client/assets/{use-event-source-AZJtQsFX.js → use-event-source-Dar8h_B8.js} +2 -2
  195. package/build/client/assets/{use-event-source-AZJtQsFX.js.map → use-event-source-Dar8h_B8.js.map} +1 -1
  196. package/build/client/assets/{user-C0j04V55.js → user-DNSnhqGn.js} +2 -2
  197. package/build/client/assets/{user-C0j04V55.js.map → user-DNSnhqGn.js.map} +1 -1
  198. package/build/client/assets/{version-D61Qvt0X.js → version-DriSvNMy.js} +2 -2
  199. package/build/client/assets/{version-D61Qvt0X.js.map → version-DriSvNMy.js.map} +1 -1
  200. package/build/client/assets/{workshop-config-oL_FWDKq.js → workshop-config-DchzGYJM.js} +2 -2
  201. package/build/client/assets/{workshop-config-oL_FWDKq.js.map → workshop-config-DchzGYJM.js.map} +1 -1
  202. package/build/client/assets/xychartDiagram-VJFVF3MP-Dh4nsbBT.js +8 -0
  203. package/build/client/assets/xychartDiagram-VJFVF3MP-Dh4nsbBT.js.map +1 -0
  204. package/build/server/index.js +50 -58
  205. package/build/server/index.js.map +1 -1
  206. package/dist/server/index.js +6 -0
  207. package/package.json +6 -5
  208. package/build/client/assets/_layout-Brb3LPqZ.js +0 -5
  209. package/build/client/assets/_layout-Brb3LPqZ.js.map +0 -1
  210. package/build/client/assets/_layout-CkabS-6c.js +0 -9
  211. package/build/client/assets/_layout-CkabS-6c.js.map +0 -1
  212. package/build/client/assets/accordion-BjQ-5Z44.js +0 -2
  213. package/build/client/assets/accordion-BjQ-5Z44.js.map +0 -1
  214. package/build/client/assets/app-lUkT_xku.js +0 -2
  215. package/build/client/assets/diff-CVrsnWqw.js +0 -2
  216. package/build/client/assets/discord-Cl4hiMqz.js +0 -2
  217. package/build/client/assets/discord-Cl4hiMqz.js.map +0 -1
  218. package/build/client/assets/entry.client-CQusg5Iz.js +0 -44
  219. package/build/client/assets/epic-video-BQtjG_Y0.js +0 -3053
  220. package/build/client/assets/epic-video-BQtjG_Y0.js.map +0 -1
  221. package/build/client/assets/index-BncqUVfr.js +0 -39
  222. package/build/client/assets/index-BncqUVfr.js.map +0 -1
  223. package/build/client/assets/index-CB8bjE90.js +0 -3
  224. package/build/client/assets/index-CB8bjE90.js.map +0 -1
  225. package/build/client/assets/index-CGzylDPY.js +0 -38
  226. package/build/client/assets/index-CMYl882D.js +0 -36
  227. package/build/client/assets/index-CMYl882D.js.map +0 -1
  228. package/build/client/assets/index-CSGHuBiw.js +0 -5
  229. package/build/client/assets/index-CSGHuBiw.js.map +0 -1
  230. package/build/client/assets/index-mZJ8sz9i.js +0 -2
  231. package/build/client/assets/index-mZJ8sz9i.js.map +0 -1
  232. package/build/client/assets/login-C9JmYc0v.js +0 -2
  233. package/build/client/assets/mdx-CnaWQCDw.js +0 -2
  234. package/build/client/assets/mdx-CnaWQCDw.js.map +0 -1
  235. package/build/client/assets/misc-CQmANiHr.js +0 -2
  236. package/build/client/assets/misc-CQmANiHr.js.map +0 -1
  237. package/build/client/assets/presence-D5UF-NOM.js +0 -28
  238. package/build/client/assets/presence-D5UF-NOM.js.map +0 -1
  239. package/build/client/assets/preview-DaTpH6lj.js +0 -2
  240. package/build/client/assets/progress-DwE8EkAa.js +0 -2
  241. package/build/client/assets/progress-DwE8EkAa.js.map +0 -1
  242. package/build/client/assets/revalidation-ws-BoJZTvOQ.js +0 -2
  243. package/build/client/assets/tailwind-O9k3JIDs.css +0 -1
  244. package/build/client/assets/test-B8jDo0X4.js +0 -2
  245. package/build/client/assets/tests-y-atkhWB.js +0 -4
  246. package/build/client/assets/tooltip-Cd0yJoQb.js +0 -2
  247. package/build/client/assets/tooltip-Cd0yJoQb.js.map +0 -1
  248. /package/build/client/assets/{epic-video-DUnRvy1A.css → epic-video-D2Xftn6t.css} +0 -0
@@ -1,38 +0,0 @@
1
- function mn(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const l=Object.getOwnPropertyDescriptor(n,a);l&&Object.defineProperty(e,a,l.get?l:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Qa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _r={exports:{}},Rt={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var gn=Symbol.for("react.transitional.element"),yn=Symbol.for("react.fragment");function Mr(e,t,r){var n=null;if(r!==void 0&&(n=""+r),t.key!==void 0&&(n=""+t.key),"key"in t){r={};for(var a in t)a!=="key"&&(r[a]=t[a])}else r=t;return t=r.ref,{$$typeof:gn,type:e,key:n,ref:t!==void 0?t:null,props:r}}Rt.Fragment=yn;Rt.jsx=Mr;Rt.jsxs=Mr;_r.exports=Rt;var Za=_r.exports,Lr={exports:{}},T={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Ut=Symbol.for("react.transitional.element"),bn=Symbol.for("react.portal"),En=Symbol.for("react.fragment"),Rn=Symbol.for("react.strict_mode"),wn=Symbol.for("react.profiler"),Pn=Symbol.for("react.consumer"),xn=Symbol.for("react.context"),Dn=Symbol.for("react.forward_ref"),Sn=Symbol.for("react.suspense"),Cn=Symbol.for("react.memo"),Tr=Symbol.for("react.lazy"),sr=Symbol.iterator;function _n(e){return e===null||typeof e!="object"?null:(e=sr&&e[sr]||e["@@iterator"],typeof e=="function"?e:null)}var jr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Or=Object.assign,Ar={};function ze(e,t,r){this.props=e,this.context=t,this.refs=Ar,this.updater=r||jr}ze.prototype.isReactComponent={};ze.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ze.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ur(){}Ur.prototype=ze.prototype;function Nt(e,t,r){this.props=e,this.context=t,this.refs=Ar,this.updater=r||jr}var Ft=Nt.prototype=new Ur;Ft.constructor=Nt;Or(Ft,ze.prototype);Ft.isPureReactComponent=!0;var ur=Array.isArray,$={H:null,A:null,T:null,S:null},Nr=Object.prototype.hasOwnProperty;function It(e,t,r,n,a,l,o){return r=o.ref,{$$typeof:Ut,type:e,key:t,ref:r!==void 0?r:null,props:o}}function Mn(e,t){return It(e.type,t,null,void 0,void 0,void 0,e.props)}function Bt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ut}function Ln(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var dr=/\/+/g;function Ct(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ln(""+e.key):t.toString(36)}function cr(){}function Tn(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(cr,cr):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ie(e,t,r,n,a){var l=typeof e;(l==="undefined"||l==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(l){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Ut:case bn:o=!0;break;case Tr:return o=e._init,Ie(o(e._payload),t,r,n,a)}}if(o)return a=a(e),o=n===""?"."+Ct(e,0):n,ur(a)?(r="",o!=null&&(r=o.replace(dr,"$&/")+"/"),Ie(a,t,r,"",function(h){return h})):a!=null&&(Bt(a)&&(a=Mn(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(dr,"$&/")+"/")+o)),t.push(a)),1;o=0;var c=n===""?".":n+":";if(ur(e))for(var u=0;u<e.length;u++)n=e[u],l=c+Ct(n,u),o+=Ie(n,t,r,l,a);else if(u=_n(e),typeof u=="function")for(e=u.call(e),u=0;!(n=e.next()).done;)n=n.value,l=c+Ct(n,u++),o+=Ie(n,t,r,l,a);else if(l==="object"){if(typeof e.then=="function")return Ie(Tn(e),t,r,n,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function vt(e,t,r){if(e==null)return e;var n=[],a=0;return Ie(e,n,"","",function(l){return t.call(r,l,a++)}),n}function jn(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var fr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function On(){}T.Children={map:vt,forEach:function(e,t,r){vt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return vt(e,function(){t++}),t},toArray:function(e){return vt(e,function(t){return t})||[]},only:function(e){if(!Bt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};T.Component=ze;T.Fragment=En;T.Profiler=wn;T.PureComponent=Nt;T.StrictMode=Rn;T.Suspense=Sn;T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$;T.act=function(){throw Error("act(...) is not supported in production builds of React.")};T.cache=function(e){return function(){return e.apply(null,arguments)}};T.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var n=Or({},e.props),a=e.key,l=void 0;if(t!=null)for(o in t.ref!==void 0&&(l=void 0),t.key!==void 0&&(a=""+t.key),t)!Nr.call(t,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&t.ref===void 0||(n[o]=t[o]);var o=arguments.length-2;if(o===1)n.children=r;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];n.children=c}return It(e.type,a,null,void 0,void 0,l,n)};T.createContext=function(e){return e={$$typeof:xn,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Pn,_context:e},e};T.createElement=function(e,t,r){var n,a={},l=null;if(t!=null)for(n in t.key!==void 0&&(l=""+t.key),t)Nr.call(t,n)&&n!=="key"&&n!=="__self"&&n!=="__source"&&(a[n]=t[n]);var o=arguments.length-2;if(o===1)a.children=r;else if(1<o){for(var c=Array(o),u=0;u<o;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)a[n]===void 0&&(a[n]=o[n]);return It(e,l,null,void 0,void 0,null,a)};T.createRef=function(){return{current:null}};T.forwardRef=function(e){return{$$typeof:Dn,render:e}};T.isValidElement=Bt;T.lazy=function(e){return{$$typeof:Tr,_payload:{_status:-1,_result:e},_init:jn}};T.memo=function(e,t){return{$$typeof:Cn,type:e,compare:t===void 0?null:t}};T.startTransition=function(e){var t=$.T,r={};$.T=r;try{var n=e(),a=$.S;a!==null&&a(r,n),typeof n=="object"&&n!==null&&typeof n.then=="function"&&n.then(On,fr)}catch(l){fr(l)}finally{$.T=t}};T.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()};T.use=function(e){return $.H.use(e)};T.useActionState=function(e,t,r){return $.H.useActionState(e,t,r)};T.useCallback=function(e,t){return $.H.useCallback(e,t)};T.useContext=function(e){return $.H.useContext(e)};T.useDebugValue=function(){};T.useDeferredValue=function(e,t){return $.H.useDeferredValue(e,t)};T.useEffect=function(e,t){return $.H.useEffect(e,t)};T.useId=function(){return $.H.useId()};T.useImperativeHandle=function(e,t,r){return $.H.useImperativeHandle(e,t,r)};T.useInsertionEffect=function(e,t){return $.H.useInsertionEffect(e,t)};T.useLayoutEffect=function(e,t){return $.H.useLayoutEffect(e,t)};T.useMemo=function(e,t){return $.H.useMemo(e,t)};T.useOptimistic=function(e,t){return $.H.useOptimistic(e,t)};T.useReducer=function(e,t,r){return $.H.useReducer(e,t,r)};T.useRef=function(e){return $.H.useRef(e)};T.useState=function(e){return $.H.useState(e)};T.useSyncExternalStore=function(e,t,r){return $.H.useSyncExternalStore(e,t,r)};T.useTransition=function(){return $.H.useTransition()};T.version="19.0.0-rc-1460d67c-20241003";Lr.exports=T;var b=Lr.exports;const An=vn(b),qa=mn({__proto__:null,default:An},[b]);/**
18
- * @remix-run/router v1.19.2
19
- *
20
- * Copyright (c) Remix Software Inc.
21
- *
22
- * This source code is licensed under the MIT license found in the
23
- * LICENSE.md file in the root directory of this source tree.
24
- *
25
- * @license MIT
26
- */function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},H.apply(this,arguments)}var G;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(G||(G={}));const hr="popstate";function eo(e){e===void 0&&(e={});function t(n,a){let{pathname:l,search:o,hash:c}=n.location;return Ze("",{pathname:l,search:o,hash:c},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:et(a)}return Nn(t,r,null,e)}function j(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ke(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Un(){return Math.random().toString(36).substr(2,8)}function pr(e,t){return{usr:e.state,key:e.key,idx:t}}function Ze(e,t,r,n){return r===void 0&&(r=null),H({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?xe(t):t,{state:r,key:t&&t.key||n||Un()})}function et(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function xe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Nn(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:l=!1}=n,o=a.history,c=G.Pop,u=null,h=v();h==null&&(h=0,o.replaceState(H({},o.state,{idx:h}),""));function v(){return(o.state||{idx:null}).idx}function p(){c=G.Pop;let _=v(),I=_==null?null:_-h;h=_,u&&u({action:c,location:x.location,delta:I})}function E(_,I){c=G.Push;let U=Ze(x.location,_,I);h=v()+1;let Z=pr(U,h),K=x.createHref(U);try{o.pushState(Z,"",K)}catch(ie){if(ie instanceof DOMException&&ie.name==="DataCloneError")throw ie;a.location.assign(K)}l&&u&&u({action:c,location:x.location,delta:1})}function R(_,I){c=G.Replace;let U=Ze(x.location,_,I);h=v();let Z=pr(U,h),K=x.createHref(U);o.replaceState(Z,"",K),l&&u&&u({action:c,location:x.location,delta:0})}function M(_){let I=a.location.origin!=="null"?a.location.origin:a.location.href,U=typeof _=="string"?_:et(_);return U=U.replace(/ $/,"%20"),j(I,"No window.location.(origin|href) available to create URL for href: "+U),new URL(U,I)}let x={get action(){return c},get location(){return e(a,o)},listen(_){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(hr,p),u=_,()=>{a.removeEventListener(hr,p),u=null}},createHref(_){return t(a,_)},createURL:M,encodeLocation(_){let I=M(_);return{pathname:I.pathname,search:I.search,hash:I.hash}},push:E,replace:R,go(_){return o.go(_)}};return x}var F;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(F||(F={}));const Fn=new Set(["lazy","caseSensitive","path","id","index","children"]);function In(e){return e.index===!0}function qe(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,l)=>{let o=[...r,String(l)],c=typeof a.id=="string"?a.id:o.join("-");if(j(a.index!==!0||!a.children,"Cannot specify children on an index route"),j(!n[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),In(a)){let u=H({},a,t(a),{id:c});return n[c]=u,u}else{let u=H({},a,t(a),{id:c,children:void 0});return n[c]=u,a.children&&(u.children=qe(a.children,t,o,n)),u}})}function Le(e,t,r){return r===void 0&&(r="/"),yt(e,t,r,!1)}function yt(e,t,r,n){let a=typeof t=="string"?xe(t):t,l=tt(a.pathname||"/",r);if(l==null)return null;let o=Ir(e);Bn(o);let c=null;for(let u=0;c==null&&u<o.length;++u){let h=Xn(l);c=Vn(o[u],h,n)}return c}function Fr(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function Ir(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(l,o,c)=>{let u={relativePath:c===void 0?l.path||"":c,caseSensitive:l.caseSensitive===!0,childrenIndex:o,route:l};u.relativePath.startsWith("/")&&(j(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let h=ge([n,u.relativePath]),v=r.concat(u);l.children&&l.children.length>0&&(j(l.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),Ir(l.children,t,v,h)),!(l.path==null&&!l.index)&&t.push({path:h,score:Kn(h,l.index),routesMeta:v})};return e.forEach((l,o)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))a(l,o);else for(let u of Br(l.path))a(l,o,u)}),t}function Br(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),l=r.replace(/\?$/,"");if(n.length===0)return a?[l,""]:[l];let o=Br(n.join("/")),c=[];return c.push(...o.map(u=>u===""?l:[l,u].join("/"))),a&&c.push(...o),c.map(u=>e.startsWith("/")&&u===""?"/":u)}function Bn(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Jn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const kn=/^:[\w-]+$/,zn=3,Hn=2,$n=1,Wn=10,Yn=-2,mr=e=>e==="*";function Kn(e,t){let r=e.split("/"),n=r.length;return r.some(mr)&&(n+=Yn),t&&(n+=Hn),r.filter(a=>!mr(a)).reduce((a,l)=>a+(kn.test(l)?zn:l===""?$n:Wn),n)}function Jn(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Vn(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},l="/",o=[];for(let c=0;c<n.length;++c){let u=n[c],h=c===n.length-1,v=l==="/"?t:t.slice(l.length)||"/",p=vr({path:u.relativePath,caseSensitive:u.caseSensitive,end:h},v),E=u.route;if(!p&&h&&r&&!n[n.length-1].route.index&&(p=vr({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},v)),!p)return null;Object.assign(a,p.params),o.push({params:a,pathname:ge([l,p.pathname]),pathnameBase:qn(ge([l,p.pathnameBase])),route:E}),p.pathnameBase!=="/"&&(l=ge([l,p.pathnameBase]))}return o}function vr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Gn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let l=a[0],o=l.replace(/(.)\/+$/,"$1"),c=a.slice(1);return{params:n.reduce((h,v,p)=>{let{paramName:E,isOptional:R}=v;if(E==="*"){let x=c[p]||"";o=l.slice(0,l.length-x.length).replace(/(.)\/+$/,"$1")}const M=c[p];return R&&!M?h[E]=void 0:h[E]=(M||"").replace(/%2F/g,"/"),h},{}),pathname:l,pathnameBase:o,pattern:e}}function Gn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ke(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,u)=>(n.push({paramName:c,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Xn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ke(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function tt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Qn(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?xe(e):e;return{pathname:r?r.startsWith("/")?r:Zn(r,t):t,search:ea(n),hash:ta(a)}}function Zn(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function _t(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function kr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function kt(e,t){let r=kr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function zt(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=xe(e):(a=H({},e),j(!a.pathname||!a.pathname.includes("?"),_t("?","pathname","search",a)),j(!a.pathname||!a.pathname.includes("#"),_t("#","pathname","hash",a)),j(!a.search||!a.search.includes("#"),_t("#","search","hash",a)));let l=e===""||a.pathname==="",o=l?"/":a.pathname,c;if(o==null)c=r;else{let p=t.length-1;if(!n&&o.startsWith("..")){let E=o.split("/");for(;E[0]==="..";)E.shift(),p-=1;a.pathname=E.join("/")}c=p>=0?t[p]:"/"}let u=Qn(a,c),h=o&&o!=="/"&&o.endsWith("/"),v=(l||o===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(h||v)&&(u.pathname+="/"),u}const ge=e=>e.join("/").replace(/\/\/+/g,"/"),qn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ea=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ta=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ra{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}}function to(e,t){return new ra(e,typeof t=="number"?{status:t}:t)}class Tt extends Error{}class ro{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],j(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((l,o)=>n=o),this.controller=new AbortController;let a=()=>n(new Tt("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((l,o)=>{let[c,u]=o;return Object.assign(l,{[c]:this.trackPromise(c,u)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof Tt)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let l=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>l}),this.emit(!1,r),Promise.reject(l)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(l=>{t.removeEventListener("abort",n),(l||this.done)&&a(l)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return j(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,a]=r;return Object.assign(t,{[n]:aa(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function na(e){return e instanceof Promise&&e._tracked===!0}function aa(e){if(!na(e))return e;if(e._error)throw e._error;return e._data}const no=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,H({},n,{headers:a}))};class jt{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function wt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const zr=["post","put","patch","delete"],oa=new Set(zr),ia=["get",...zr],la=new Set(ia),sa=new Set([301,302,303,307,308]),ua=new Set([307,308]),Mt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},da={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ge={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ht=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ca=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Hr="remix-router-transitions";function ao(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;j(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let i=e.detectErrorBoundary;a=s=>({hasErrorBoundary:i(s)})}else a=ca;let l={},o=qe(e.routes,a,void 0,l),c,u=e.basename||"/",h=e.unstable_dataStrategy||ga,v=e.unstable_patchRoutesOnNavigation,p=H({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),E=null,R=new Set,M=1e3,x=new Set,_=null,I=null,U=null,Z=e.hydrationData!=null,K=Le(o,e.history.location,u),ie=null;if(K==null&&!v){let i=ee(404,{pathname:e.history.location.pathname}),{matches:s,route:d}=Dr(o);K=s,ie={[d.id]:i}}K&&!e.hydrationData&&dt(K,o,e.history.location.pathname).active&&(K=null);let de;if(K)if(K.some(i=>i.route.lazy))de=!1;else if(!K.some(i=>i.route.loader))de=!0;else if(p.v7_partialHydration){let i=e.hydrationData?e.hydrationData.loaderData:null,s=e.hydrationData?e.hydrationData.errors:null,d=m=>m.route.loader?typeof m.route.loader=="function"&&m.route.loader.hydrate===!0?!1:i&&i[m.route.id]!==void 0||s&&s[m.route.id]!==void 0:!0;if(s){let m=K.findIndex(y=>s[y.route.id]!==void 0);de=K.slice(0,m+1).every(d)}else de=K.every(d)}else de=e.hydrationData!=null;else if(de=!1,K=[],p.v7_partialHydration){let i=dt(null,o,e.history.location.pathname);i.active&&i.matches&&(K=i.matches)}let We,f={historyAction:e.history.action,location:e.history.location,matches:K,initialized:de,navigation:Mt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||ie,fetchers:new Map,blockers:new Map},z=G.Pop,Q=!1,B,te=!1,ae=new Map,le=null,je=!1,De=!1,nt=[],at=new Set,J=new Map,ot=0,Ye=-1,Oe=new Map,ce=new Set,Ae=new Map,Ke=new Map,fe=new Set,Se=new Map,Ce=new Map,Xr=new Map,it;function Qr(){if(E=e.history.listen(i=>{let{action:s,location:d,delta:m}=i;if(it){it(),it=void 0;return}ke(Ce.size===0||m!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let y=nr({currentLocation:f.location,nextLocation:d,historyAction:s});if(y&&m!=null){let D=new Promise(C=>{it=C});e.history.go(m*-1),st(y,{state:"blocked",location:d,proceed(){st(y,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),D.then(()=>e.history.go(m))},reset(){let C=new Map(f.blockers);C.set(y,Ge),q({blockers:C})}});return}return _e(s,d)}),r){ja(t,ae);let i=()=>Oa(t,ae);t.addEventListener("pagehide",i),le=()=>t.removeEventListener("pagehide",i)}return f.initialized||_e(G.Pop,f.location,{initialHydration:!0}),We}function Zr(){E&&E(),le&&le(),R.clear(),B&&B.abort(),f.fetchers.forEach((i,s)=>lt(s)),f.blockers.forEach((i,s)=>rr(s))}function qr(i){return R.add(i),()=>R.delete(i)}function q(i,s){s===void 0&&(s={}),f=H({},f,i);let d=[],m=[];p.v7_fetcherPersist&&f.fetchers.forEach((y,D)=>{y.state==="idle"&&(fe.has(D)?m.push(D):d.push(D))}),[...R].forEach(y=>y(f,{deletedFetchers:m,unstable_viewTransitionOpts:s.viewTransitionOpts,unstable_flushSync:s.flushSync===!0})),p.v7_fetcherPersist&&(d.forEach(y=>f.fetchers.delete(y)),m.forEach(y=>lt(y)))}function Ue(i,s,d){var m,y;let{flushSync:D}=d===void 0?{}:d,C=f.actionData!=null&&f.navigation.formMethod!=null&&se(f.navigation.formMethod)&&f.navigation.state==="loading"&&((m=i.state)==null?void 0:m._isRedirect)!==!0,g;s.actionData?Object.keys(s.actionData).length>0?g=s.actionData:g=null:C?g=f.actionData:g=null;let S=s.loaderData?Pr(f.loaderData,s.loaderData,s.matches||[],s.errors):f.loaderData,w=f.blockers;w.size>0&&(w=new Map(w),w.forEach((N,k)=>w.set(k,Ge)));let P=Q===!0||f.navigation.formMethod!=null&&se(f.navigation.formMethod)&&((y=i.state)==null?void 0:y._isRedirect)!==!0;c&&(o=c,c=void 0),je||z===G.Pop||(z===G.Push?e.history.push(i,i.state):z===G.Replace&&e.history.replace(i,i.state));let A;if(z===G.Pop){let N=ae.get(f.location.pathname);N&&N.has(i.pathname)?A={currentLocation:f.location,nextLocation:i}:ae.has(i.pathname)&&(A={currentLocation:i,nextLocation:f.location})}else if(te){let N=ae.get(f.location.pathname);N?N.add(i.pathname):(N=new Set([i.pathname]),ae.set(f.location.pathname,N)),A={currentLocation:f.location,nextLocation:i}}q(H({},s,{actionData:g,loaderData:S,historyAction:z,location:i,initialized:!0,navigation:Mt,revalidation:"idle",restoreScrollPosition:or(i,s.matches||f.matches),preventScrollReset:P,blockers:w}),{viewTransitionOpts:A,flushSync:D===!0}),z=G.Pop,Q=!1,te=!1,je=!1,De=!1,nt=[]}async function Gt(i,s){if(typeof i=="number"){e.history.go(i);return}let d=Ot(f.location,f.matches,u,p.v7_prependBasename,i,p.v7_relativeSplatPath,s==null?void 0:s.fromRouteId,s==null?void 0:s.relative),{path:m,submission:y,error:D}=gr(p.v7_normalizeFormMethod,!1,d,s),C=f.location,g=Ze(f.location,m,s&&s.state);g=H({},g,e.history.encodeLocation(g));let S=s&&s.replace!=null?s.replace:void 0,w=G.Push;S===!0?w=G.Replace:S===!1||y!=null&&se(y.formMethod)&&y.formAction===f.location.pathname+f.location.search&&(w=G.Replace);let P=s&&"preventScrollReset"in s?s.preventScrollReset===!0:void 0,A=(s&&s.unstable_flushSync)===!0,N=nr({currentLocation:C,nextLocation:g,historyAction:w});if(N){st(N,{state:"blocked",location:g,proceed(){st(N,{state:"proceeding",proceed:void 0,reset:void 0,location:g}),Gt(i,s)},reset(){let k=new Map(f.blockers);k.set(N,Ge),q({blockers:k})}});return}return await _e(w,g,{submission:y,pendingError:D,preventScrollReset:P,replace:s&&s.replace,enableViewTransition:s&&s.unstable_viewTransition,flushSync:A})}function en(){if(xt(),q({revalidation:"loading"}),f.navigation.state!=="submitting"){if(f.navigation.state==="idle"){_e(f.historyAction,f.location,{startUninterruptedRevalidation:!0});return}_e(z||f.historyAction,f.navigation.location,{overrideNavigation:f.navigation,enableViewTransition:te===!0})}}async function _e(i,s,d){B&&B.abort(),B=null,z=i,je=(d&&d.startUninterruptedRevalidation)===!0,cn(f.location,f.matches),Q=(d&&d.preventScrollReset)===!0,te=(d&&d.enableViewTransition)===!0;let m=c||o,y=d&&d.overrideNavigation,D=Le(m,s,u),C=(d&&d.flushSync)===!0,g=dt(D,m,s.pathname);if(g.active&&g.matches&&(D=g.matches),!D){let{error:O,notFoundMatches:X,route:V}=Dt(s.pathname);Ue(s,{matches:X,loaderData:{},errors:{[V.id]:O}},{flushSync:C});return}if(f.initialized&&!De&&Pa(f.location,s)&&!(d&&d.submission&&se(d.submission.formMethod))){Ue(s,{matches:D},{flushSync:C});return}B=new AbortController;let S=Fe(e.history,s,B.signal,d&&d.submission),w;if(d&&d.pendingError)w=[Be(D).route.id,{type:F.error,error:d.pendingError}];else if(d&&d.submission&&se(d.submission.formMethod)){let O=await tn(S,s,d.submission,D,g.active,{replace:d.replace,flushSync:C});if(O.shortCircuited)return;if(O.pendingActionResult){let[X,V]=O.pendingActionResult;if(ne(V)&&wt(V.error)&&V.error.status===404){B=null,Ue(s,{matches:O.matches,loaderData:{},errors:{[X]:V.error}});return}}D=O.matches||D,w=O.pendingActionResult,y=Lt(s,d.submission),C=!1,g.active=!1,S=Fe(e.history,S.url,S.signal)}let{shortCircuited:P,matches:A,loaderData:N,errors:k}=await rn(S,s,D,g.active,y,d&&d.submission,d&&d.fetcherSubmission,d&&d.replace,d&&d.initialHydration===!0,C,w);P||(B=null,Ue(s,H({matches:A||D},xr(w),{loaderData:N,errors:k})))}async function tn(i,s,d,m,y,D){D===void 0&&(D={}),xt();let C=La(s,d);if(q({navigation:C},{flushSync:D.flushSync===!0}),y){let w=await ct(m,s.pathname,i.signal);if(w.type==="aborted")return{shortCircuited:!0};if(w.type==="error"){let{boundaryId:P,error:A}=ut(s.pathname,w);return{matches:w.partialMatches,pendingActionResult:[P,{type:F.error,error:A}]}}else if(w.matches)m=w.matches;else{let{notFoundMatches:P,error:A,route:N}=Dt(s.pathname);return{matches:P,pendingActionResult:[N.id,{type:F.error,error:A}]}}}let g,S=Qe(m,s);if(!S.route.action&&!S.route.lazy)g={type:F.error,error:ee(405,{method:i.method,pathname:s.pathname,routeId:S.route.id})};else if(g=(await Je("action",f,i,[S],m,null))[S.route.id],i.signal.aborted)return{shortCircuited:!0};if(Te(g)){let w;return D&&D.replace!=null?w=D.replace:w=Er(g.response.headers.get("Location"),new URL(i.url),u)===f.location.pathname+f.location.search,await Me(i,g,!0,{submission:d,replace:w}),{shortCircuited:!0}}if(Pe(g))throw ee(400,{type:"defer-action"});if(ne(g)){let w=Be(m,S.route.id);return(D&&D.replace)!==!0&&(z=G.Push),{matches:m,pendingActionResult:[w.route.id,g]}}return{matches:m,pendingActionResult:[S.route.id,g]}}async function rn(i,s,d,m,y,D,C,g,S,w,P){let A=y||Lt(s,D),N=D||C||Cr(A),k=!je&&(!p.v7_partialHydration||!S);if(m){if(k){let W=Xt(P);q(H({navigation:A},W!==void 0?{actionData:W}:{}),{flushSync:w})}let L=await ct(d,s.pathname,i.signal);if(L.type==="aborted")return{shortCircuited:!0};if(L.type==="error"){let{boundaryId:W,error:re}=ut(s.pathname,L);return{matches:L.partialMatches,loaderData:{},errors:{[W]:re}}}else if(L.matches)d=L.matches;else{let{error:W,notFoundMatches:re,route:Y}=Dt(s.pathname);return{matches:re,loaderData:{},errors:{[Y.id]:W}}}}let O=c||o,[X,V]=yr(e.history,f,d,N,s,p.v7_partialHydration&&S===!0,p.v7_skipActionErrorRevalidation,De,nt,at,fe,Ae,ce,O,u,P);if(St(L=>!(d&&d.some(W=>W.route.id===L))||X&&X.some(W=>W.route.id===L)),Ye=++ot,X.length===0&&V.length===0){let L=er();return Ue(s,H({matches:d,loaderData:{},errors:P&&ne(P[1])?{[P[0]]:P[1].error}:null},xr(P),L?{fetchers:new Map(f.fetchers)}:{}),{flushSync:w}),{shortCircuited:!0}}if(k){let L={};if(!m){L.navigation=A;let W=Xt(P);W!==void 0&&(L.actionData=W)}V.length>0&&(L.fetchers=nn(V)),q(L,{flushSync:w})}V.forEach(L=>{J.has(L.key)&&Ee(L.key),L.controller&&J.set(L.key,L.controller)});let Ve=()=>V.forEach(L=>Ee(L.key));B&&B.signal.addEventListener("abort",Ve);let{loaderResults:pe,fetcherResults:Ne}=await Qt(f,d,X,V,i);if(i.signal.aborted)return{shortCircuited:!0};B&&B.signal.removeEventListener("abort",Ve),V.forEach(L=>J.delete(L.key));let Re=gt(pe);if(Re)return await Me(i,Re.result,!0,{replace:g}),{shortCircuited:!0};if(Re=gt(Ne),Re)return ce.add(Re.key),await Me(i,Re.result,!0,{replace:g}),{shortCircuited:!0};let{loaderData:ft,errors:me}=wr(f,d,X,pe,P,V,Ne,Se);Se.forEach((L,W)=>{L.subscribe(re=>{(re||L.done)&&Se.delete(W)})}),p.v7_partialHydration&&S&&f.errors&&Object.entries(f.errors).filter(L=>{let[W]=L;return!X.some(re=>re.route.id===W)}).forEach(L=>{let[W,re]=L;me=Object.assign(me||{},{[W]:re})});let ht=er(),pt=tr(Ye),mt=ht||pt||V.length>0;return H({matches:d,loaderData:ft,errors:me},mt?{fetchers:new Map(f.fetchers)}:{})}function Xt(i){if(i&&!ne(i[1]))return{[i[0]]:i[1].data};if(f.actionData)return Object.keys(f.actionData).length===0?null:f.actionData}function nn(i){return i.forEach(s=>{let d=f.fetchers.get(s.key),m=Xe(void 0,d?d.data:void 0);f.fetchers.set(s.key,m)}),new Map(f.fetchers)}function an(i,s,d,m){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");J.has(i)&&Ee(i);let y=(m&&m.unstable_flushSync)===!0,D=c||o,C=Ot(f.location,f.matches,u,p.v7_prependBasename,d,p.v7_relativeSplatPath,s,m==null?void 0:m.relative),g=Le(D,C,u),S=dt(g,D,C);if(S.active&&S.matches&&(g=S.matches),!g){he(i,s,ee(404,{pathname:C}),{flushSync:y});return}let{path:w,submission:P,error:A}=gr(p.v7_normalizeFormMethod,!0,C,m);if(A){he(i,s,A,{flushSync:y});return}let N=Qe(g,w);if(Q=(m&&m.preventScrollReset)===!0,P&&se(P.formMethod)){on(i,s,w,N,g,S.active,y,P);return}Ae.set(i,{routeId:s,path:w}),ln(i,s,w,N,g,S.active,y,P)}async function on(i,s,d,m,y,D,C,g){xt(),Ae.delete(i);function S(Y){if(!Y.route.action&&!Y.route.lazy){let ve=ee(405,{method:g.formMethod,pathname:d,routeId:s});return he(i,s,ve,{flushSync:C}),!0}return!1}if(!D&&S(m))return;let w=f.fetchers.get(i);be(i,Ta(g,w),{flushSync:C});let P=new AbortController,A=Fe(e.history,d,P.signal,g);if(D){let Y=await ct(y,d,A.signal);if(Y.type==="aborted")return;if(Y.type==="error"){let{error:ve}=ut(d,Y);he(i,s,ve,{flushSync:C});return}else if(Y.matches){if(y=Y.matches,m=Qe(y,d),S(m))return}else{he(i,s,ee(404,{pathname:d}),{flushSync:C});return}}J.set(i,P);let N=ot,O=(await Je("action",f,A,[m],y,i))[m.route.id];if(A.signal.aborted){J.get(i)===P&&J.delete(i);return}if(p.v7_fetcherPersist&&fe.has(i)){if(Te(O)||ne(O)){be(i,we(void 0));return}}else{if(Te(O))if(J.delete(i),Ye>N){be(i,we(void 0));return}else return ce.add(i),be(i,Xe(g)),Me(A,O,!1,{fetcherSubmission:g});if(ne(O)){he(i,s,O.error);return}}if(Pe(O))throw ee(400,{type:"defer-action"});let X=f.navigation.location||f.location,V=Fe(e.history,X,P.signal),Ve=c||o,pe=f.navigation.state!=="idle"?Le(Ve,f.navigation.location,u):f.matches;j(pe,"Didn't find any matches after fetcher action");let Ne=++ot;Oe.set(i,Ne);let Re=Xe(g,O.data);f.fetchers.set(i,Re);let[ft,me]=yr(e.history,f,pe,g,X,!1,p.v7_skipActionErrorRevalidation,De,nt,at,fe,Ae,ce,Ve,u,[m.route.id,O]);me.filter(Y=>Y.key!==i).forEach(Y=>{let ve=Y.key,lr=f.fetchers.get(ve),pn=Xe(void 0,lr?lr.data:void 0);f.fetchers.set(ve,pn),J.has(ve)&&Ee(ve),Y.controller&&J.set(ve,Y.controller)}),q({fetchers:new Map(f.fetchers)});let ht=()=>me.forEach(Y=>Ee(Y.key));P.signal.addEventListener("abort",ht);let{loaderResults:pt,fetcherResults:mt}=await Qt(f,pe,ft,me,V);if(P.signal.aborted)return;P.signal.removeEventListener("abort",ht),Oe.delete(i),J.delete(i),me.forEach(Y=>J.delete(Y.key));let L=gt(pt);if(L)return Me(V,L.result,!1);if(L=gt(mt),L)return ce.add(L.key),Me(V,L.result,!1);let{loaderData:W,errors:re}=wr(f,pe,ft,pt,void 0,me,mt,Se);if(f.fetchers.has(i)){let Y=we(O.data);f.fetchers.set(i,Y)}tr(Ne),f.navigation.state==="loading"&&Ne>Ye?(j(z,"Expected pending action"),B&&B.abort(),Ue(f.navigation.location,{matches:pe,loaderData:W,errors:re,fetchers:new Map(f.fetchers)})):(q({errors:re,loaderData:Pr(f.loaderData,W,pe,re),fetchers:new Map(f.fetchers)}),De=!1)}async function ln(i,s,d,m,y,D,C,g){let S=f.fetchers.get(i);be(i,Xe(g,S?S.data:void 0),{flushSync:C});let w=new AbortController,P=Fe(e.history,d,w.signal);if(D){let O=await ct(y,d,P.signal);if(O.type==="aborted")return;if(O.type==="error"){let{error:X}=ut(d,O);he(i,s,X,{flushSync:C});return}else if(O.matches)y=O.matches,m=Qe(y,d);else{he(i,s,ee(404,{pathname:d}),{flushSync:C});return}}J.set(i,w);let A=ot,k=(await Je("loader",f,P,[m],y,i))[m.route.id];if(Pe(k)&&(k=await $t(k,P.signal,!0)||k),J.get(i)===w&&J.delete(i),!P.signal.aborted){if(fe.has(i)){be(i,we(void 0));return}if(Te(k))if(Ye>A){be(i,we(void 0));return}else{ce.add(i),await Me(P,k,!1);return}if(ne(k)){he(i,s,k.error);return}j(!Pe(k),"Unhandled fetcher deferred data"),be(i,we(k.data))}}async function Me(i,s,d,m){let{submission:y,fetcherSubmission:D,replace:C}=m===void 0?{}:m;s.response.headers.has("X-Remix-Revalidate")&&(De=!0);let g=s.response.headers.get("Location");j(g,"Expected a Location header on the redirect Response"),g=Er(g,new URL(i.url),u);let S=Ze(f.location,g,{_isRedirect:!0});if(r){let O=!1;if(s.response.headers.has("X-Remix-Reload-Document"))O=!0;else if(Ht.test(g)){const X=e.history.createURL(g);O=X.origin!==t.location.origin||tt(X.pathname,u)==null}if(O){C?t.location.replace(g):t.location.assign(g);return}}B=null;let w=C===!0||s.response.headers.has("X-Remix-Replace")?G.Replace:G.Push,{formMethod:P,formAction:A,formEncType:N}=f.navigation;!y&&!D&&P&&A&&N&&(y=Cr(f.navigation));let k=y||D;if(ua.has(s.response.status)&&k&&se(k.formMethod))await _e(w,S,{submission:H({},k,{formAction:g}),preventScrollReset:Q,enableViewTransition:d?te:void 0});else{let O=Lt(S,y);await _e(w,S,{overrideNavigation:O,fetcherSubmission:D,preventScrollReset:Q,enableViewTransition:d?te:void 0})}}async function Je(i,s,d,m,y,D){let C,g={};try{C=await ya(h,i,s,d,m,y,D,l,a)}catch(S){return m.forEach(w=>{g[w.route.id]={type:F.error,error:S}}),g}for(let[S,w]of Object.entries(C))if(Da(w)){let P=w.result;g[S]={type:F.redirect,response:Ra(P,d,S,y,u,p.v7_relativeSplatPath)}}else g[S]=await Ea(w);return g}async function Qt(i,s,d,m,y){let D=i.matches,C=Je("loader",i,y,d,s,null),g=Promise.all(m.map(async P=>{if(P.matches&&P.match&&P.controller){let N=(await Je("loader",i,Fe(e.history,P.path,P.controller.signal),[P.match],P.matches,P.key))[P.match.route.id];return{[P.key]:N}}else return Promise.resolve({[P.key]:{type:F.error,error:ee(404,{pathname:P.path})}})})),S=await C,w=(await g).reduce((P,A)=>Object.assign(P,A),{});return await Promise.all([_a(s,S,y.signal,D,i.loaderData),Ma(s,w,m)]),{loaderResults:S,fetcherResults:w}}function xt(){De=!0,nt.push(...St()),Ae.forEach((i,s)=>{J.has(s)&&(at.add(s),Ee(s))})}function be(i,s,d){d===void 0&&(d={}),f.fetchers.set(i,s),q({fetchers:new Map(f.fetchers)},{flushSync:(d&&d.flushSync)===!0})}function he(i,s,d,m){m===void 0&&(m={});let y=Be(f.matches,s);lt(i),q({errors:{[y.route.id]:d},fetchers:new Map(f.fetchers)},{flushSync:(m&&m.flushSync)===!0})}function Zt(i){return p.v7_fetcherPersist&&(Ke.set(i,(Ke.get(i)||0)+1),fe.has(i)&&fe.delete(i)),f.fetchers.get(i)||da}function lt(i){let s=f.fetchers.get(i);J.has(i)&&!(s&&s.state==="loading"&&Oe.has(i))&&Ee(i),Ae.delete(i),Oe.delete(i),ce.delete(i),fe.delete(i),at.delete(i),f.fetchers.delete(i)}function sn(i){if(p.v7_fetcherPersist){let s=(Ke.get(i)||0)-1;s<=0?(Ke.delete(i),fe.add(i)):Ke.set(i,s)}else lt(i);q({fetchers:new Map(f.fetchers)})}function Ee(i){let s=J.get(i);j(s,"Expected fetch controller: "+i),s.abort(),J.delete(i)}function qt(i){for(let s of i){let d=Zt(s),m=we(d.data);f.fetchers.set(s,m)}}function er(){let i=[],s=!1;for(let d of ce){let m=f.fetchers.get(d);j(m,"Expected fetcher: "+d),m.state==="loading"&&(ce.delete(d),i.push(d),s=!0)}return qt(i),s}function tr(i){let s=[];for(let[d,m]of Oe)if(m<i){let y=f.fetchers.get(d);j(y,"Expected fetcher: "+d),y.state==="loading"&&(Ee(d),Oe.delete(d),s.push(d))}return qt(s),s.length>0}function un(i,s){let d=f.blockers.get(i)||Ge;return Ce.get(i)!==s&&Ce.set(i,s),d}function rr(i){f.blockers.delete(i),Ce.delete(i)}function st(i,s){let d=f.blockers.get(i)||Ge;j(d.state==="unblocked"&&s.state==="blocked"||d.state==="blocked"&&s.state==="blocked"||d.state==="blocked"&&s.state==="proceeding"||d.state==="blocked"&&s.state==="unblocked"||d.state==="proceeding"&&s.state==="unblocked","Invalid blocker state transition: "+d.state+" -> "+s.state);let m=new Map(f.blockers);m.set(i,s),q({blockers:m})}function nr(i){let{currentLocation:s,nextLocation:d,historyAction:m}=i;if(Ce.size===0)return;Ce.size>1&&ke(!1,"A router only supports one blocker at a time");let y=Array.from(Ce.entries()),[D,C]=y[y.length-1],g=f.blockers.get(D);if(!(g&&g.state==="proceeding")&&C({currentLocation:s,nextLocation:d,historyAction:m}))return D}function Dt(i){let s=ee(404,{pathname:i}),d=c||o,{matches:m,route:y}=Dr(d);return St(),{notFoundMatches:m,route:y,error:s}}function ut(i,s){return{boundaryId:Be(s.partialMatches).route.id,error:ee(400,{type:"route-discovery",pathname:i,message:s.error!=null&&"message"in s.error?s.error:String(s.error)})}}function St(i){let s=[];return Se.forEach((d,m)=>{(!i||i(m))&&(d.cancel(),s.push(m),Se.delete(m))}),s}function dn(i,s,d){if(_=i,U=s,I=d||null,!Z&&f.navigation===Mt){Z=!0;let m=or(f.location,f.matches);m!=null&&q({restoreScrollPosition:m})}return()=>{_=null,U=null,I=null}}function ar(i,s){return I&&I(i,s.map(m=>Fr(m,f.loaderData)))||i.key}function cn(i,s){if(_&&U){let d=ar(i,s);_[d]=U()}}function or(i,s){if(_){let d=ar(i,s),m=_[d];if(typeof m=="number")return m}return null}function dt(i,s,d){if(v){if(x.has(d))return{active:!1,matches:i};if(i){if(Object.keys(i[0].params).length>0)return{active:!0,matches:yt(s,d,u,!0)}}else return{active:!0,matches:yt(s,d,u,!0)||[]}}return{active:!1,matches:null}}async function ct(i,s,d){let m=i;for(;;){let y=c==null,D=c||o;try{await ma(v,s,m,D,l,a,Xr,d)}catch(S){return{type:"error",error:S,partialMatches:m}}finally{y&&(o=[...o])}if(d.aborted)return{type:"aborted"};let C=Le(D,s,u);if(C)return ir(s,x),{type:"success",matches:C};let g=yt(D,s,u,!0);if(!g||m.length===g.length&&m.every((S,w)=>S.route.id===g[w].route.id))return ir(s,x),{type:"success",matches:null};m=g}}function ir(i,s){if(s.size>=M){let d=s.values().next().value;s.delete(d)}s.add(i)}function fn(i){l={},c=qe(i,a,void 0,l)}function hn(i,s){let d=c==null;Wr(i,s,c||o,l,a),d&&(o=[...o],q({}))}return We={get basename(){return u},get future(){return p},get state(){return f},get routes(){return o},get window(){return t},initialize:Qr,subscribe:qr,enableScrollRestoration:dn,navigate:Gt,fetch:an,revalidate:en,createHref:i=>e.history.createHref(i),encodeLocation:i=>e.history.encodeLocation(i),getFetcher:Zt,deleteFetcher:sn,dispose:Zr,getBlocker:un,deleteBlocker:rr,patchRoutes:hn,_internalFetchControllers:J,_internalActiveDeferreds:Se,_internalSetRoutes:fn},We}function fa(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ot(e,t,r,n,a,l,o,c){let u,h;if(o){u=[];for(let p of t)if(u.push(p),p.route.id===o){h=p;break}}else u=t,h=t[t.length-1];let v=zt(a||".",kt(u,l),tt(e.pathname,r)||e.pathname,c==="path");return a==null&&(v.search=e.search,v.hash=e.hash),(a==null||a===""||a===".")&&h&&h.route.index&&!Wt(v.search)&&(v.search=v.search?v.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(v.pathname=v.pathname==="/"?r:ge([r,v.pathname])),et(v)}function gr(e,t,r,n){if(!n||!fa(n))return{path:r};if(n.formMethod&&!Ca(n.formMethod))return{path:r,error:ee(405,{method:n.formMethod})};let a=()=>({path:r,error:ee(400,{type:"invalid-body"})}),l=n.formMethod||"get",o=e?l.toUpperCase():l.toLowerCase(),c=Yr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!se(o))return a();let E=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((R,M)=>{let[x,_]=M;return""+R+x+"="+_+`
27
- `},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:E}}}else if(n.formEncType==="application/json"){if(!se(o))return a();try{let E=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:c,formEncType:n.formEncType,formData:void 0,json:E,text:void 0}}}catch{return a()}}}j(typeof FormData=="function","FormData is not available in this environment");let u,h;if(n.formData)u=At(n.formData),h=n.formData;else if(n.body instanceof FormData)u=At(n.body),h=n.body;else if(n.body instanceof URLSearchParams)u=n.body,h=Rr(u);else if(n.body==null)u=new URLSearchParams,h=new FormData;else try{u=new URLSearchParams(n.body),h=Rr(u)}catch{return a()}let v={formMethod:o,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(se(v.formMethod))return{path:r,submission:v};let p=xe(r);return t&&p.search&&Wt(p.search)&&u.append("index",""),p.search="?"+u,{path:et(p),submission:v}}function ha(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function yr(e,t,r,n,a,l,o,c,u,h,v,p,E,R,M,x){let _=x?ne(x[1])?x[1].error:x[1].data:void 0,I=e.createURL(t.location),U=e.createURL(a),Z=x&&ne(x[1])?x[0]:void 0,K=Z?ha(r,Z):r,ie=x?x[1].statusCode:void 0,de=o&&ie&&ie>=400,We=K.filter((z,Q)=>{let{route:B}=z;if(B.lazy)return!0;if(B.loader==null)return!1;if(l)return typeof B.loader!="function"||B.loader.hydrate?!0:t.loaderData[B.id]===void 0&&(!t.errors||t.errors[B.id]===void 0);if(pa(t.loaderData,t.matches[Q],z)||u.some(le=>le===z.route.id))return!0;let te=t.matches[Q],ae=z;return br(z,H({currentUrl:I,currentParams:te.params,nextUrl:U,nextParams:ae.params},n,{actionResult:_,actionStatus:ie,defaultShouldRevalidate:de?!1:c||I.pathname+I.search===U.pathname+U.search||I.search!==U.search||$r(te,ae)}))}),f=[];return p.forEach((z,Q)=>{if(l||!r.some(je=>je.route.id===z.routeId)||v.has(Q))return;let B=Le(R,z.path,M);if(!B){f.push({key:Q,routeId:z.routeId,path:z.path,matches:null,match:null,controller:null});return}let te=t.fetchers.get(Q),ae=Qe(B,z.path),le=!1;E.has(Q)?le=!1:h.has(Q)?(h.delete(Q),le=!0):te&&te.state!=="idle"&&te.data===void 0?le=c:le=br(ae,H({currentUrl:I,currentParams:t.matches[t.matches.length-1].params,nextUrl:U,nextParams:r[r.length-1].params},n,{actionResult:_,actionStatus:ie,defaultShouldRevalidate:de?!1:c})),le&&f.push({key:Q,routeId:z.routeId,path:z.path,matches:B,match:ae,controller:new AbortController})}),[We,f]}function pa(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function $r(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function br(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function ma(e,t,r,n,a,l,o,c){let u=[t,...r.map(h=>h.route.id)].join("-");try{let h=o.get(u);h||(h=e({path:t,matches:r,patch:(v,p)=>{c.aborted||Wr(v,p,n,a,l)}}),o.set(u,h)),h&&xa(h)&&await h}finally{o.delete(u)}}function Wr(e,t,r,n,a){if(e){var l;let o=n[e];j(o,"No route found to patch children into: routeId = "+e);let c=qe(t,a,[e,"patch",String(((l=o.children)==null?void 0:l.length)||"0")],n);o.children?o.children.push(...c):o.children=c}else{let o=qe(t,a,["patch",String(r.length||"0")],n);r.push(...o)}}async function va(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];j(a,"No route found in manifest");let l={};for(let o in n){let u=a[o]!==void 0&&o!=="hasErrorBoundary";ke(!u,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!u&&!Fn.has(o)&&(l[o]=n[o])}Object.assign(a,l),Object.assign(a,H({},t(a),{lazy:void 0}))}async function ga(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,l,o)=>Object.assign(a,{[r[o].route.id]:l}),{})}async function ya(e,t,r,n,a,l,o,c,u,h){let v=l.map(R=>R.route.lazy?va(R.route,u,c):void 0),p=l.map((R,M)=>{let x=v[M],_=a.some(U=>U.route.id===R.route.id);return H({},R,{shouldLoad:_,resolve:async U=>(U&&n.method==="GET"&&(R.route.lazy||R.route.loader)&&(_=!0),_?ba(t,n,R,x,U,h):Promise.resolve({type:F.data,result:void 0}))})}),E=await e({matches:p,request:n,params:l[0].params,fetcherKey:o,context:h});try{await Promise.all(v)}catch{}return E}async function ba(e,t,r,n,a,l){let o,c,u=h=>{let v,p=new Promise((M,x)=>v=x);c=()=>v(),t.signal.addEventListener("abort",c);let E=M=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):h({request:t,params:r.params,context:l},...M!==void 0?[M]:[]),R=(async()=>{try{return{type:"data",result:await(a?a(x=>E(x)):E())}}catch(M){return{type:"error",result:M}}})();return Promise.race([R,p])};try{let h=r.route[e];if(n)if(h){let v,[p]=await Promise.all([u(h).catch(E=>{v=E}),n]);if(v!==void 0)throw v;o=p}else if(await n,h=r.route[e],h)o=await u(h);else if(e==="action"){let v=new URL(t.url),p=v.pathname+v.search;throw ee(405,{method:t.method,pathname:p,routeId:r.route.id})}else return{type:F.data,result:void 0};else if(h)o=await u(h);else{let v=new URL(t.url),p=v.pathname+v.search;throw ee(404,{pathname:p})}j(o.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:F.error,result:h}}finally{c&&t.signal.removeEventListener("abort",c)}return o}async function Ea(e){let{result:t,type:r}=e;if(Kr(t)){let h;try{let v=t.headers.get("Content-Type");v&&/\bapplication\/json\b/.test(v)?t.body==null?h=null:h=await t.json():h=await t.text()}catch(v){return{type:F.error,error:v}}return r===F.error?{type:F.error,error:new jt(t.status,t.statusText,h),statusCode:t.status,headers:t.headers}:{type:F.data,data:h,statusCode:t.status,headers:t.headers}}if(r===F.error){if(Sr(t)){var n;if(t.data instanceof Error){var a;return{type:F.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status}}t=new jt(((n=t.init)==null?void 0:n.status)||500,void 0,t.data)}return{type:F.error,error:t,statusCode:wt(t)?t.status:void 0}}if(Sa(t)){var l,o;return{type:F.deferred,deferredData:t,statusCode:(l=t.init)==null?void 0:l.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}if(Sr(t)){var c,u;return{type:F.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:F.data,data:t}}function Ra(e,t,r,n,a,l){let o=e.headers.get("Location");if(j(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ht.test(o)){let c=n.slice(0,n.findIndex(u=>u.route.id===r)+1);o=Ot(new URL(t.url),c,a,!0,o,l),e.headers.set("Location",o)}return e}function Er(e,t,r){if(Ht.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),l=tt(a.pathname,r)!=null;if(a.origin===t.origin&&l)return a.pathname+a.search+a.hash}return e}function Fe(e,t,r,n){let a=e.createURL(Yr(t)).toString(),l={signal:r};if(n&&se(n.formMethod)){let{formMethod:o,formEncType:c}=n;l.method=o.toUpperCase(),c==="application/json"?(l.headers=new Headers({"Content-Type":c}),l.body=JSON.stringify(n.json)):c==="text/plain"?l.body=n.text:c==="application/x-www-form-urlencoded"&&n.formData?l.body=At(n.formData):l.body=n.formData}return new Request(a,l)}function At(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Rr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function wa(e,t,r,n,a){let l={},o=null,c,u=!1,h={},v=r&&ne(r[1])?r[1].error:void 0;return e.forEach(p=>{if(!(p.route.id in t))return;let E=p.route.id,R=t[E];if(j(!Te(R),"Cannot handle redirect results in processLoaderData"),ne(R)){let M=R.error;v!==void 0&&(M=v,v=void 0),o=o||{};{let x=Be(e,E);o[x.route.id]==null&&(o[x.route.id]=M)}l[E]=void 0,u||(u=!0,c=wt(R.error)?R.error.status:500),R.headers&&(h[E]=R.headers)}else Pe(R)?(n.set(E,R.deferredData),l[E]=R.deferredData.data,R.statusCode!=null&&R.statusCode!==200&&!u&&(c=R.statusCode),R.headers&&(h[E]=R.headers)):(l[E]=R.data,R.statusCode&&R.statusCode!==200&&!u&&(c=R.statusCode),R.headers&&(h[E]=R.headers))}),v!==void 0&&r&&(o={[r[0]]:v},l[r[0]]=void 0),{loaderData:l,errors:o,statusCode:c||200,loaderHeaders:h}}function wr(e,t,r,n,a,l,o,c){let{loaderData:u,errors:h}=wa(t,n,a,c);return l.forEach(v=>{let{key:p,match:E,controller:R}=v,M=o[p];if(j(M,"Did not find corresponding fetcher result"),!(R&&R.signal.aborted))if(ne(M)){let x=Be(e.matches,E==null?void 0:E.route.id);h&&h[x.route.id]||(h=H({},h,{[x.route.id]:M.error})),e.fetchers.delete(p)}else if(Te(M))j(!1,"Unhandled fetcher revalidation redirect");else if(Pe(M))j(!1,"Unhandled fetcher deferred data");else{let x=we(M.data);e.fetchers.set(p,x)}}),{loaderData:u,errors:h}}function Pr(e,t,r,n){let a=H({},t);for(let l of r){let o=l.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(a[o]=t[o]):e[o]!==void 0&&l.route.loader&&(a[o]=e[o]),n&&n.hasOwnProperty(o))break}return a}function xr(e){return e?ne(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Be(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Dr(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ee(e,t){let{pathname:r,routeId:n,method:a,type:l,message:o}=t===void 0?{}:t,c="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(c="Bad Request",l==="route-discovery"?u='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnNavigation()` '+(`function threw the following error:
28
- `+o):a&&r&&n?u="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":l==="defer-action"?u="defer() is not supported in actions":l==="invalid-body"&&(u="Unable to encode submission body")):e===403?(c="Forbidden",u='Route "'+n+'" does not match URL "'+r+'"'):e===404?(c="Not Found",u='No route matches URL "'+r+'"'):e===405&&(c="Method Not Allowed",a&&r&&n?u="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(u='Invalid request method "'+a.toUpperCase()+'"')),new jt(e||500,c,new Error(u),!0)}function gt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Te(a))return{key:n,result:a}}}function Yr(e){let t=typeof e=="string"?xe(e):e;return et(H({},t,{hash:""}))}function Pa(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function xa(e){return typeof e=="object"&&e!=null&&"then"in e}function Da(e){return Kr(e.result)&&sa.has(e.result.status)}function Pe(e){return e.type===F.deferred}function ne(e){return e.type===F.error}function Te(e){return(e&&e.type)===F.redirect}function Sr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Sa(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Kr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ca(e){return la.has(e.toLowerCase())}function se(e){return oa.has(e.toLowerCase())}async function _a(e,t,r,n,a){let l=Object.entries(t);for(let o=0;o<l.length;o++){let[c,u]=l[o],h=e.find(E=>(E==null?void 0:E.route.id)===c);if(!h)continue;let v=n.find(E=>E.route.id===h.route.id),p=v!=null&&!$r(v,h)&&(a&&a[h.route.id])!==void 0;Pe(u)&&p&&await $t(u,r,!1).then(E=>{E&&(t[c]=E)})}}async function Ma(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:l,controller:o}=r[n],c=t[a];e.find(h=>(h==null?void 0:h.route.id)===l)&&Pe(c)&&(j(o,"Expected an AbortController for revalidating fetcher deferred result"),await $t(c,o.signal,!0).then(h=>{h&&(t[a]=h)}))}}async function $t(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:F.data,data:e.deferredData.unwrappedData}}catch(a){return{type:F.error,error:a}}return{type:F.data,data:e.deferredData.data}}}function Wt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Qe(e,t){let r=typeof t=="string"?xe(t).search:t.search;if(e[e.length-1].route.index&&Wt(r||""))return e[e.length-1];let n=kr(e);return n[n.length-1]}function Cr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:l,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(l!=null)return{formMethod:t,formAction:r,formEncType:n,formData:l,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function Lt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function La(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Xe(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ta(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function we(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ja(e,t){try{let r=e.sessionStorage.getItem(Hr);if(r){let n=JSON.parse(r);for(let[a,l]of Object.entries(n||{}))l&&Array.isArray(l)&&t.set(a,new Set(l||[]))}}catch{}}function Oa(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Hr,JSON.stringify(r))}catch(n){ke(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
29
- * React Router v6.26.2
30
- *
31
- * Copyright (c) Remix Software Inc.
32
- *
33
- * This source code is licensed under the MIT license found in the
34
- * LICENSE.md file in the root directory of this source tree.
35
- *
36
- * @license MIT
37
- */function bt(){return bt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bt.apply(this,arguments)}const Yt=b.createContext(null),Aa=b.createContext(null),Et=b.createContext(null),He=b.createContext(null),Kt=b.createContext(null),ye=b.createContext({outlet:null,matches:[],isDataRoute:!1}),Jr=b.createContext(null);function oo(e,t){let{relative:r}=t===void 0?{}:t;rt()||j(!1);let{basename:n,navigator:a}=b.useContext(He),{hash:l,pathname:o,search:c}=Ia(e,{relative:r}),u=o;return n!=="/"&&(u=o==="/"?n:ge([n,o])),a.createHref({pathname:u,search:c,hash:l})}function rt(){return b.useContext(Kt)!=null}function Jt(){return rt()||j(!1),b.useContext(Kt).location}function Vr(e){b.useContext(He).static||b.useLayoutEffect(e)}function io(){let{isDataRoute:e}=b.useContext(ye);return e?Ja():Ua()}function Ua(){rt()||j(!1);let e=b.useContext(Yt),{basename:t,future:r,navigator:n}=b.useContext(He),{matches:a}=b.useContext(ye),{pathname:l}=Jt(),o=JSON.stringify(kt(a,r.v7_relativeSplatPath)),c=b.useRef(!1);return Vr(()=>{c.current=!0}),b.useCallback(function(h,v){if(v===void 0&&(v={}),!c.current)return;if(typeof h=="number"){n.go(h);return}let p=zt(h,JSON.parse(o),l,v.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:ge([t,p.pathname])),(v.replace?n.replace:n.push)(p,v.state,v)},[t,n,o,l,e])}const Na=b.createContext(null);function Fa(e){let t=b.useContext(ye).outlet;return t&&b.createElement(Na.Provider,{value:e},t)}function lo(){let{matches:e}=b.useContext(ye),t=e[e.length-1];return t?t.params:{}}function Ia(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=b.useContext(He),{matches:a}=b.useContext(ye),{pathname:l}=Jt(),o=JSON.stringify(kt(a,n.v7_relativeSplatPath));return b.useMemo(()=>zt(e,JSON.parse(o),l,r==="path"),[e,o,l,r])}function so(e,t,r,n){rt()||j(!1);let{navigator:a}=b.useContext(He),{matches:l}=b.useContext(ye),o=l[l.length-1],c=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let h=Jt(),v;v=h;let p=v.pathname||"/",E=p;if(u!=="/"){let x=u.replace(/^\//,"").split("/");E="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let R=Le(e,{pathname:E});return $a(R&&R.map(x=>Object.assign({},x,{params:Object.assign({},c,x.params),pathname:ge([u,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:ge([u,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),l,r,n)}function Ba(){let e=Ya(),t=wt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),r?b.createElement("pre",{style:a},r):null,null)}const ka=b.createElement(Ba,null);class za extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?b.createElement(ye.Provider,{value:this.props.routeContext},b.createElement(Jr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Ha(e){let{routeContext:t,match:r,children:n}=e,a=b.useContext(Yt);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(ye.Provider,{value:t},n)}function $a(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var l;if(!r)return null;if(r.errors)e=r.matches;else if((l=n)!=null&&l.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,c=(a=r)==null?void 0:a.errors;if(c!=null){let v=o.findIndex(p=>p.route.id&&(c==null?void 0:c[p.route.id])!==void 0);v>=0||j(!1),o=o.slice(0,Math.min(o.length,v+1))}let u=!1,h=-1;if(r&&n&&n.v7_partialHydration)for(let v=0;v<o.length;v++){let p=o[v];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(h=v),p.route.id){let{loaderData:E,errors:R}=r,M=p.route.loader&&E[p.route.id]===void 0&&(!R||R[p.route.id]===void 0);if(p.route.lazy||M){u=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((v,p,E)=>{let R,M=!1,x=null,_=null;r&&(R=c&&p.route.id?c[p.route.id]:void 0,x=p.route.errorElement||ka,u&&(h<0&&E===0?(M=!0,_=null):h===E&&(M=!0,_=p.route.hydrateFallbackElement||null)));let I=t.concat(o.slice(0,E+1)),U=()=>{let Z;return R?Z=x:M?Z=_:p.route.Component?Z=b.createElement(p.route.Component,null):p.route.element?Z=p.route.element:Z=v,b.createElement(Ha,{match:p,routeContext:{outlet:v,matches:I,isDataRoute:r!=null},children:Z})};return r&&(p.route.ErrorBoundary||p.route.errorElement||E===0)?b.createElement(za,{location:r.location,revalidation:r.revalidation,component:x,error:R,children:U(),routeContext:{outlet:null,matches:I,isDataRoute:!0}}):U()},null)}var Vt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Vt||{}),ue=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ue||{});function Gr(e){let t=b.useContext(Yt);return t||j(!1),t}function $e(e){let t=b.useContext(Aa);return t||j(!1),t}function Wa(e){let t=b.useContext(ye);return t||j(!1),t}function Pt(e){let t=Wa(),r=t.matches[t.matches.length-1];return r.route.id||j(!1),r.route.id}function uo(){return Pt(ue.UseRouteId)}function co(){return $e(ue.UseNavigation).navigation}function fo(){let e=Gr(Vt.UseRevalidator),t=$e(ue.UseRevalidator);return b.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function ho(){let{matches:e,loaderData:t}=$e(ue.UseMatches);return b.useMemo(()=>e.map(r=>Fr(r,t)),[e,t])}function po(){let e=$e(ue.UseLoaderData),t=Pt(ue.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function mo(e){return $e(ue.UseRouteLoaderData).loaderData[e]}function Ya(){var e;let t=b.useContext(Jr),r=$e(ue.UseRouteError),n=Pt(ue.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Ka(){let e=b.useContext(Et);return e==null?void 0:e._data}function vo(){let e=b.useContext(Et);return e==null?void 0:e._error}function Ja(){let{router:e}=Gr(Vt.UseNavigateStable),t=Pt(ue.UseNavigateStable),r=b.useRef(!1);return Vr(()=>{r.current=!0}),b.useCallback(function(a,l){l===void 0&&(l={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,bt({fromRouteId:t},l)))},[e,t])}function go(e){return Fa(e.context)}function yo(e){let{basename:t="/",children:r=null,location:n,navigationType:a=G.Pop,navigator:l,static:o=!1,future:c}=e;rt()&&j(!1);let u=t.replace(/^\/*/,"/"),h=b.useMemo(()=>({basename:u,navigator:l,static:o,future:bt({v7_relativeSplatPath:!1},c)}),[u,c,l,o]);typeof n=="string"&&(n=xe(n));let{pathname:v="/",search:p="",hash:E="",state:R=null,key:M="default"}=n,x=b.useMemo(()=>{let _=tt(v,u);return _==null?null:{location:{pathname:_,search:p,hash:E,state:R,key:M},navigationType:a}},[u,v,p,E,R,M,a]);return x==null?null:b.createElement(He.Provider,{value:h},b.createElement(Kt.Provider,{children:r,value:x}))}function bo(e){let{children:t,errorElement:r,resolve:n}=e;return b.createElement(Ga,{resolve:n,errorElement:r},b.createElement(Xa,null,t))}var oe=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(oe||{});const Va=new Promise(()=>{});class Ga extends b.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error("<Await> caught the following error during render",t,r)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,l=oe.pending;if(!(n instanceof Promise))l=oe.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){l=oe.error;let o=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>o})}else n._tracked?(a=n,l="_error"in a?oe.error:"_data"in a?oe.success:oe.pending):(l=oe.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then(o=>Object.defineProperty(n,"_data",{get:()=>o}),o=>Object.defineProperty(n,"_error",{get:()=>o})));if(l===oe.error&&a._error instanceof Tt)throw Va;if(l===oe.error&&!r)throw a._error;if(l===oe.error)return b.createElement(Et.Provider,{value:a,children:r});if(l===oe.success)return b.createElement(Et.Provider,{value:a,children:t});throw a}}function Xa(e){let{children:t}=e,r=Ka(),n=typeof t=="function"?t(r):t;return b.createElement(b.Fragment,null,n)}function Eo(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:b.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}export{ge as A,qa as B,vr as C,Yt as D,jt as E,xe as F,Tt as G,ro as H,da as I,to as J,no as K,po as L,mo as M,He as N,go as O,bo as P,vo as Q,An as R,Ya as a,lo as b,co as c,fo as d,io as e,ao as f,eo as g,Eo as h,wt as i,Za as j,ho as k,vn as l,Le as m,Qa as n,Aa as o,yo as p,so as q,b as r,tt as s,oo as t,Jt as u,Ia as v,et as w,uo as x,ye as y,j as z};
38
- //# sourceMappingURL=index-CGzylDPY.js.map
@@ -1,36 +0,0 @@
1
- import{r as H,d as hr,j as D}from"./index-CGzylDPY.js";import{I as ut}from"./misc-CQmANiHr.js";import{S as pr}from"./tooltip-Cd0yJoQb.js";import{b as mr,a as vr,c as yr}from"./components-DrvY4pal.js";import{u as gr}from"./pe-DXT2FOp1.js";function Nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function S(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nt(Object(r),!0).forEach(function(n){_r(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _r(t,e,r){return e=kr(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function br(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kr(t){var e=br(t,"string");return typeof e=="symbol"?e:String(e)}function wr(t,e){var r=new FormData(t,e);if(e&&e.type==="submit"&&e.name!==""){var n=r.getAll(e.name);n.includes(e.value)||r.append(e.name,e.value)}return r}function X(t){return t?t.split(/\.|(\[\d*\])/).reduce((e,r)=>{if(typeof r<"u"&&r!==""&&r!=="__proto__"&&r!=="constructor"&&r!=="prototype")if(r.startsWith("[")&&r.endsWith("]")){var n=r.slice(1,-1);e.push(Number(n))}else e.push(r);return e},[]):[]}function de(t){return t.reduce((e,r)=>typeof r=="number"?"".concat(e,"[").concat(Number.isNaN(r)?"":r,"]"):e===""||r===""?[e,r].join(""):[e,r].join("."),"")}function Pe(t,e){return typeof e<"u"?de([...X(t),e]):t??""}function He(t,e){var r=X(t),n=X(e);return r.length>=n.length&&n.every((a,i)=>r[i]===a)}function re(t,e,r){for(var n=X(e),a=n.length,i=a-1,s=-1,o=t;o!=null&&++s<a;){var u=n[s],d=n[s+1],f=s!=i?Object.prototype.hasOwnProperty.call(o,u)&&o[u]!==null?o[u]:typeof d=="number"?[]:{}:r(o[u]);o[u]=f,o=o[u]}}function it(t,e){var r=t;for(var n of X(e)){if(typeof r>"u"||r==null)break;if(!Object.prototype.hasOwnProperty.call(r,n))return;if(ne(r)&&typeof n=="string")r=r[n];else if(Array.isArray(r)&&typeof n=="number")r=r[n];else return}return r}function ne(t){return!!t&&t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function xr(t){return typeof File>"u"?!1:t instanceof File}function _e(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(ne(t)){var r=Object.keys(t).sort().reduce((n,a)=>{var i=_e(t[a],e);return typeof i<"u"&&(n[a]=i),n},{});return Object.keys(r).length===0?void 0:r}if(Array.isArray(t))return t.length===0?void 0:t.map(n=>_e(n,e));if(!(typeof t=="string"&&t===""||t===null||xr(t)&&(!e||t.size===0)))return t}function bt(t){var e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={},a=(e=r.resolve)!==null&&e!==void 0?e:o=>o;function i(o,u){var d=_e(a(o));if(typeof d<"u"&&(n[u]=d),Array.isArray(o))for(var f=0;f<o.length;f++)i(o[f],"".concat(u,"[").concat(f,"]"));else if(ne(o))for(var[w,A]of Object.entries(o))i(A,u?"".concat(u,".").concat(w):w)}if(t){var s;i(t,(s=r.prefix)!==null&&s!==void 0?s:"")}return n}function st(t,e){if(!t)throw new Error(e)}function be(){return(Date.now()*Math.random()).toString(36)}function Ze(t){return JSON.parse(JSON.stringify(t))}function Tr(t){return t instanceof Element&&(t.tagName==="INPUT"||t.tagName==="SELECT"||t.tagName==="TEXTAREA"||t.tagName==="BUTTON")}function dt(t){return Tr(t)&&t.type!=="submit"&&t.type!=="button"&&t.type!=="reset"}function Or(t){var e,r,n=t.target,a=t.submitter;return(e=(r=a==null?void 0:a.getAttribute("formaction"))!==null&&r!==void 0?r:n.getAttribute("action"))!==null&&e!==void 0?e:"".concat(location.pathname).concat(location.search)}function Sr(t){var e,r=t.target,n=t.submitter,a=(e=n==null?void 0:n.getAttribute("formenctype"))!==null&&e!==void 0?e:r.enctype;return a==="multipart/form-data"?a:"application/x-www-form-urlencoded"}function Nr(t){var e,r,n=t.target,a=t.submitter,i=(e=(r=a==null?void 0:a.getAttribute("formmethod"))!==null&&r!==void 0?r:n.getAttribute("method"))===null||e===void 0?void 0:e.toUpperCase();switch(i){case"POST":case"PUT":case"PATCH":case"DELETE":return i}return"GET"}function Er(t,e){if(st(!!t,"Failed to submit the form. The element provided is null or undefined."),typeof t.requestSubmit=="function")t.requestSubmit(e);else{var r=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:e});t.dispatchEvent(r)}}var je="__intent__",ct="__state__";function Lt(t){var e=t.get(je),r=t.get(ct);st((typeof e=="string"||e===null)&&(typeof r=="string"||r===null),'The input name "'.concat(je,'" and "').concat(ct,'" are reserved by Conform. Please use another name for your input.'));var n={payload:{},fields:new Set,intent:Ir(e)};r&&(n.state=JSON.parse(r));var a=function(u){if(i===je||i===ct)return 1;n.fields.add(i),re(n.payload,i,d=>d?Array.isArray(d)?d.concat(u):[d,u]:u)};for(var[i,s]of t.entries())a(s);return n}function Cr(t,e){var r=Lt(t),n=r.intent;if(n)switch(n.type){case"update":{var a=Pe(n.payload.name,n.payload.index),i=n.payload.value;typeof n.payload.value<"u"&&(a?re(r.payload,a,()=>i):r.payload=i);break}case"reset":{var s=Pe(n.payload.name,n.payload.index);s?re(r.payload,s,()=>{}):r.payload={};break}case"insert":case"remove":case"reorder":{Ft(r.payload,n);break}}var o=e.resolve(r.payload,n),u=d=>Ar(S(S({},r),{},{value:d.value,error:d.error}));return o instanceof Promise?o.then(u):u(o)}function Ar(t){return t.intent||!t.value||t.error?{status:t.intent?void 0:"error",payload:t.payload,error:typeof t.error<"u"?t.error:{},reply(e){return Et(t,e)}}:{status:"success",payload:t.payload,value:t.value,reply(e){return Et(t,e)}}}function Et(t){var e,r,n,a,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if("resetForm"in i&&i.resetForm||((e=t.intent)===null||e===void 0?void 0:e.type)==="reset"&&((r=t.intent.payload.name)!==null&&r!==void 0?r:"")==="")return{initialValue:null};if("hideFields"in i&&i.hideFields)for(var s of i.hideFields){var o=it(t.payload,s);typeof o<"u"&&re(t.payload,s,()=>{})}var u="formErrors"in i||"fieldErrors"in i?_e(S({"":(n=i.formErrors)!==null&&n!==void 0?n:null},i.fieldErrors)):null,d=t.error||u?S(S({},t.error),u):void 0,f=(a=_e(t.payload,typeof document<"u"))!==null&&a!==void 0?a:{};return{status:t.intent?void 0:d?"error":"success",intent:t.intent?t.intent:void 0,initialValue:f,error:d,state:t.state,fields:Array.from(t.fields)}}function Ir(t){if(!t)return null;var e=JSON.parse(t);if(typeof e.type!="string"||typeof e.payload>"u")throw new Error("Unknown form control intent");return e}function Zr(t){switch(t.type){case"insert":return JSON.stringify({type:t.type,payload:S(S({},t.payload),{},{defaultValue:Re(t.payload.defaultValue)})});case"update":return JSON.stringify({type:t.type,payload:S(S({},t.payload),{},{value:Re(t.payload.value)})});default:return JSON.stringify(t)}}function ht(t,e){var r;switch(st(Array.isArray(t),"Failed to update list. The value is not an array."),e.type){case"insert":t.splice((r=e.payload.index)!==null&&r!==void 0?r:t.length,0,e.payload.defaultValue);break;case"remove":t.splice(e.payload.index,1);break;case"reorder":t.splice(e.payload.to,0,...t.splice(e.payload.from,1));break;default:throw new Error("Unknown list intent received")}}function Ft(t,e){re(t,e.payload.name,r=>{var n=r??[];return ht(n,e),n})}var pt=Symbol.for("root");function Ge(t,e,r){var n=Object.keys(t).sort((u,d)=>d.localeCompare(u)),a={},i=function(){var d=t[s];He(s,e)&&s!==e&&(re(a,s,f=>typeof f>"u"?d:(f[pt]=d,f)),delete t[s])};for(var s of n)i();var o=r(it(a,e));Object.assign(t,bt(o,{resolve(u){if(ne(u)||Array.isArray(u)){var d;return(d=u[pt])!==null&&d!==void 0?d:null}return u},prefix:e}))}function Ct(t,e,r){Ge(t,e.payload.name,n=>{var a=n??[];switch(e.type){case"insert":ht(a,{type:e.type,payload:S(S({},e.payload),{},{defaultValue:r==null?void 0:r(e.payload.defaultValue)})});break;default:ht(a,e);break}return a})}function Re(t){return ne(t)?Object.entries(t).reduce((e,r)=>{var[n,a]=r;return e[n]=Re(a),e},{}):Array.isArray(t)?t.map(Re):t instanceof Date?t.toISOString():typeof t=="boolean"?t?"on":void 0:typeof t=="number"||typeof t=="bigint"?t.toString():t??void 0}function At(t,e){var r,n,a,i,s,o=e?void 0:t.lastResult,u=t.defaultValue?Re(t.defaultValue):{},d=(r=o==null?void 0:o.initialValue)!==null&&r!==void 0?r:u,f={formId:t.formId,isValueUpdated:!1,submissionStatus:o==null?void 0:o.status,defaultValue:u,initialValue:d,value:d,constraint:(n=t.constraint)!==null&&n!==void 0?n:{},validated:(a=o==null||(i=o.state)===null||i===void 0?void 0:i.validated)!==null&&a!==void 0?a:{},key:e?S({"":be()},Ve(u)):Ve(u),error:(s=o==null?void 0:o.error)!==null&&s!==void 0?s:{}};return Ut(f,o==null?void 0:o.intent,o==null?void 0:o.fields),f}function Ve(t,e){return Object.entries(bt(t,{prefix:e})).reduce((r,n)=>{var[a,i]=n;if(Array.isArray(i))for(var s=0;s<i.length;s++)r[Pe(a,s)]=be();return r},{})}function It(t,e){for(var r of Object.keys(t.error).concat(e??[]))t.validated[r]=!0}function Ut(t,e,r,n){var a;if(!e){It(t,r);return}switch(e.type){case"validate":{e.payload.name?t.validated[e.payload.name]=!0:It(t,r);break}case"update":{var{validated:i,value:s}=e.payload,o=Pe(e.payload.name,e.payload.index);typeof s<"u"&&Zt(t,o??"",s),typeof i<"u"&&(o?Ge(t.validated,o,()=>{}):t.validated={},i?((ne(s)||Array.isArray(s))&&Object.assign(t.validated,bt(s,{resolve(){return!0},prefix:o})),t.validated[o??""]=!0):o&&delete t.validated[o]);break}case"reset":{var u=Pe(e.payload.name,e.payload.index),d=it(t.defaultValue,u);Zt(t,u,d),u?(Ge(t.validated,u,()=>{}),delete t.validated[u]):t.validated={};break}case"insert":case"remove":case"reorder":{n&&(t.initialValue=Ze(t.initialValue),t.key=Ze(t.key),Ct(t.key,e,w=>!Array.isArray(w)&&!ne(w)?be():Object.assign(Ve(w),{[pt]:be()})),Ft(t.initialValue,e)),Ct(t.validated,e),t.validated[e.payload.name]=!0;break}}var f=(a=r==null?void 0:r.filter(w=>t.validated[w]))!==null&&a!==void 0?a:[];t.error=Object.entries(t.error).reduce((w,A)=>{var[j,M]=A;return(t.validated[j]||f.some(J=>He(j,J)))&&(w[j]=M),w},{})}function Zt(t,e,r){if(e===""){t.initialValue=r,t.value=r,t.key=S(S({},Ve(r)),{},{"":be()});return}t.initialValue=Ze(t.initialValue),t.value=Ze(t.value),t.key=Ze(t.key),re(t.initialValue,e,()=>r),re(t.value,e,()=>r),(ne(r)||Array.isArray(r))&&(Ge(t.key,e,()=>{}),Object.assign(t.key,Ve(r,e))),t.key[e]=be()}function qe(t){var e={};return new Proxy(e,{get(r,n,a){var i;if(typeof n=="string")return(i=e[n])!==null&&i!==void 0?i:e[n]=t(n,a)}})}function lt(t){var e=_e(t);return qe((r,n)=>{if(r==="")return e;var a=X(r),i=de(a.slice(0,-1)),s=de(a.slice(-1)),o=n[i];return it(o,s)})}function jr(t){return qe((e,r)=>{var n,a=t[e];if(!a){for(var i=X(e),s=i.length-1;s>=0;s--){var o=i[s];if(typeof o=="number"&&!Number.isNaN(o)){i[s]=Number.NaN;break}}var u=de(i);e!==u&&(a=r[u])}return(n=a)!==null&&n!==void 0?n:{}})}function Pr(t){return qe((e,r)=>{var n=t[e],a=X(e);if(a.length===0)return n;var i=r[de(a.slice(0,-1))];return typeof i>"u"?n:"".concat(i,"/").concat(n??a.at(-1))})}function Rr(t){return qe(e=>{var r=Object.keys(t);if(e==="")return r.length===0;for(var n of r)if(He(n,e)&&typeof t[n]<"u")return!1;return!0})}function Vr(t,e,r){return qe(n=>JSON.stringify(t[n])!==JSON.stringify(e[n],(a,i)=>n===""&&a===""&&i?Object.entries(i).reduce((s,o)=>{var[u,d]=o;return r(u)?Object.assign(s??{},{[u]:d}):s},void 0):i))}function pe(t,e,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:(j,M)=>JSON.stringify(j)!==JSON.stringify(M);if(n&&t!==e){var i,s,o=(i=n.prefix)!==null&&i!==void 0?i:[],u=(s=n.name)!==null&&s!==void 0?s:[],d=o.length===0?u:Array.from(new Set([...Object.keys(t),...Object.keys(e)])),f=function(M){if(o.length===0||u.includes(M)||o.some(Ce=>He(M,Ce))){var J;if((J=r[M])!==null&&J!==void 0||(r[M]=a(t[M],e[M])),r[M])return{v:!0}}},w;for(var A of d)if(w=f(A),w)return w.v}return!1}function Mr(t){var e=[],r=t,n=At(t),a=s(n);function i(){return document.forms.namedItem(r.formId)}function s(l){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l,m=arguments.length>2?arguments[2]:void 0,T=!m||v.defaultValue!==l.defaultValue?lt(l.defaultValue):m.defaultValue,C=l.initialValue===l.defaultValue?T:!m||v.initialValue!==l.initialValue?lt(l.initialValue):m.initialValue,E=l.value===l.initialValue?C:!m||v.value!==l.value?lt(l.value):m.value;return{submissionStatus:l.submissionStatus,defaultValue:T,initialValue:C,value:E,error:!m||v.error!==l.error?l.error:m.error,validated:l.validated,constraint:!m||v.constraint!==l.constraint?jr(l.constraint):m.constraint,key:!m||v.key!==l.key?Pr(l.key):m.key,valid:!m||v.error!==l.error?Rr(l.error):m.valid,dirty:!m||v.defaultValue!==l.defaultValue||v.value!==l.value?Vr(T,E,I=>{var P,oe;return(P=(oe=r.shouldDirtyConsider)===null||oe===void 0?void 0:oe.call(r,I))!==null&&P!==void 0?P:!0}):m.dirty}}function o(l){var v=n,m=a,T=s(l,v,m);n=l,a=T;var C={value:{},error:{},initialValue:{},key:{},valid:{},dirty:{}};for(var E of e){var I,P=(I=E.getSubject)===null||I===void 0?void 0:I.call(E);(!P||P.formId&&v.formId!==l.formId||P.status&&m.submissionStatus!==T.submissionStatus||pe(m.error,T.error,C.error,P.error)||pe(m.initialValue,T.initialValue,C.initialValue,P.initialValue)||pe(m.key,T.key,C.key,P.key,(oe,Ke)=>oe!==Ke)||pe(m.valid,T.valid,C.valid,P.valid,u)||pe(m.dirty,T.dirty,C.dirty,P.dirty,u)||pe(m.value,T.value,C.value,P.value))&&E.callback()}}function u(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return l!==v}function d(){return JSON.stringify({validated:n.validated})}function f(l){var v=l.target,m=l.submitter;st(v===i(),"The submit event is dispatched by form#".concat(v.id," instead of form#").concat(r.formId));var T=wr(v,m),C={formData:T,action:Or(l),encType:Sr(l),method:Nr(l)};if(typeof(r==null?void 0:r.onValidate)>"u")return C;var E=r.onValidate({form:v,formData:T,submitter:m});if(E.status==="success"||E.error!==null){var I=E.reply();xt(S(S({},I),{},{status:I.status!=="success"?I.status:void 0}))}return S(S({},C),{},{submission:E})}function w(l){var v=i(),m=l.target;return!v||!dt(m)||m.form!==v||!m.form.isConnected||m.name===""?null:m}function A(l,v){var{shouldValidate:m="onSubmit",shouldRevalidate:T=m}=r,C=n.validated[l.name];return C?T===v&&(v==="onInput"||n.isValueUpdated):m===v}function j(l){var v=new FormData(l),m=Lt(v);o(S(S({},n),{},{isValueUpdated:!0,value:m.payload}))}function M(l){var v=w(l);!v||!v.form||(l.defaultPrevented||!A(v,"onInput")?j(v.form):ot({type:"validate",payload:{name:v.name}}))}function J(l){var v=w(l);!v||l.defaultPrevented||!A(v,"onBlur")||ot({type:"validate",payload:{name:v.name}})}function Ce(){o(At(r,!0))}function ur(l){var v=i();l.type!=="reset"||l.target!==v||l.defaultPrevented||Ce()}function xt(l){var v,m,T=i();if(!l.initialValue){Ce();return}var C=Object.entries((v=l.error)!==null&&v!==void 0?v:{}).reduce((P,oe)=>{var[Ke,Ot]=oe,St=Ot===null?n.error[Ke]:Ot;return St&&(P[Ke]=St),P},{}),E=S(S({},n),{},{isValueUpdated:!1,submissionStatus:l.status,value:l.initialValue,validated:S(S({},n.validated),(m=l.state)===null||m===void 0?void 0:m.validated),error:C});if(Ut(E,l.intent,l.fields,!0),o(E),T&&l.status==="error"){for(var I of T.elements)if(dt(I)&&n.error[I.name]){I.focus();break}}}function dr(l){var v=r.formId,m=r.lastResult;Object.assign(r,l),r.formId!==v?Ce():l.lastResult&&l.lastResult!==m&&xt(l.lastResult)}function cr(l,v){var m={callback:l,getSubject:v};return e.push(m),()=>{e=e.filter(T=>T!==m)}}function lr(){return a}function ot(l){var v=i(),m=document.createElement("button"),T=Tt(l);m.name=T.name,m.value=T.value,m.hidden=!0,m.formNoValidate=!0,v==null||v.appendChild(m),Er(v,m),v==null||v.removeChild(m)}function Tt(l){return{name:je,value:Zr(l),form:r.formId,formNoValidate:!0}}function he(l){var v=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ot({type:l,payload:T})};return Object.assign(v,{getButtonProps(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Tt({type:l,payload:m})}})}function fr(){var l=new MutationObserver(v=>{var m=i();if(m)for(var T of v){var C=T.type==="childList"?[...T.addedNodes,...T.removedNodes]:[T.target];for(var E of C){var I=dt(E)?E:E instanceof HTMLElement?E.querySelector("input,select,textarea"):null;if((I==null?void 0:I.form)===m){j(m);return}}}});return l.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["form","name"]}),()=>{l.disconnect()}}return{getFormId(){return n.formId},submit:f,onReset:ur,onInput:M,onBlur:J,onUpdate:dr,validate:he("validate"),reset:he("reset"),update:he("update"),insert:he("insert"),remove:he("remove"),reorder:he("reorder"),subscribe:cr,getState:lr,getSerializedState:d,observe:fr}}function jt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function G(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jt(Object(r),!0).forEach(function(n){$r(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $r(t,e,r){return e=Ur(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Dr(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Lr(t,e){if(t==null)return{};var r=Dr(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Fr(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ur(t){var e=Fr(t,"string");return typeof e=="symbol"?e:String(e)}var zr=Symbol("wrapped");function Br(t,e){var r=H.useCallback(n=>t.subscribe(n,()=>e==null?void 0:e.current),[t,e]);return H.useSyncExternalStore(r,t.getState,t.getState)}function Wr(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=H.useRef(t);return e.current=t,e}function ye(t,e,r,n){if(e==="status"||e==="formId")t.current[e]=!0;else if(typeof r<"u"&&typeof n<"u"){var a,i;t.current[e]=G(G({},t.current[e]),{},{[r]:((a=(i=t.current[e])===null||i===void 0?void 0:i[r])!==null&&a!==void 0?a:[]).concat(n)})}}function zt(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",a=n?"".concat(t.getFormId(),"-").concat(n):t.getFormId(),i=t.getState();return new Proxy({id:a,name:n,errorId:"".concat(a,"-error"),descriptionId:"".concat(a,"-description"),get initialValue(){return i.initialValue[n]},get value(){return i.value[n]},get errors(){return i.error[n]},get key(){return i.key[n]},get valid(){return i.valid[n]},get dirty(){return i.dirty[n]},get allErrors(){if(n==="")return i.error;var s={};for(var[o,u]of Object.entries(i.error))He(o,n)&&(s[o]=u);return s},get getFieldset(){return()=>new Proxy({},{get(s,o,u){return typeof o=="string"?Bt(t,e,r,n,o):Reflect.get(s,o,u)}})}},{get(s,o,u){if(i===r)switch(o){case"id":case"errorId":case"descriptionId":ye(e,"formId");break;case"key":case"initialValue":case"value":case"valid":case"dirty":ye(e,o,"name",n);break;case"errors":case"allErrors":ye(e,"error",o==="errors"?"name":"prefix",n);break}return Reflect.get(s,o,u)}})}function Bt(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",a=arguments.length>4?arguments[4]:void 0,i=typeof a>"u"?n:de([...X(n),a]);return new Proxy({},{get(s,o,u){var d,f=zt(t,e,r,i),w=t.getState();switch(o){case"formId":return w===r&&ye(e,"formId"),t.getFormId();case"required":case"minLength":case"maxLength":case"min":case"max":case"pattern":case"step":case"multiple":return(d=w.constraint[i])===null||d===void 0?void 0:d[o];case"getFieldList":return()=>{var A,j=(A=w.initialValue[i])!==null&&A!==void 0?A:[];if(w===r&&ye(e,"initialValue","name",i),!Array.isArray(j))throw new Error("The initial value at the given name is not a list");return Array(j.length).fill(0).map((M,J)=>Bt(t,e,r,i,J))}}return Reflect.get(f,o,u)}})}function Hr(t,e,r,n){return new Proxy({},{get(a,i,s){var o=zt(t,e,r),u=t.getState();switch(i){case"context":return{[zr]:t};case"status":return u===r&&ye(e,"status"),u.submissionStatus;case"validate":case"update":case"reset":case"insert":case"remove":case"reorder":return t[i];case"onSubmit":return t.submit;case"noValidate":return n}return Reflect.get(o,i,s)}})}function qr(t){var{onSubmit:e}=t,r=Mr(t);return G(G({},r),{},{submit(n){var a=n.nativeEvent,i=r.submit(a);if(!i.submission||i.submission.status==="success"||i.submission.error===null){if(!i.formData.has(je)){var s;(s=e)===null||s===void 0||s(n,i)}}else n.preventDefault()},onUpdate(n){e=n.onSubmit,r.onUpdate(n)}})}var Jr=["id"],mt=typeof document>"u"?H.useEffect:H.useLayoutEffect;function Kr(t){var e=H.useId();return t??e}function Yr(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,[e,r]=H.useState(t);return mt(()=>{e||r(!0)},[e]),e}function Gr(t){var{id:e}=t,r=Lr(t,Jr),n=Kr(e),[a]=H.useState(()=>qr(G(G({},r),{},{formId:n})));mt(()=>{var d=a.observe();return document.addEventListener("input",a.onInput),document.addEventListener("focusout",a.onBlur),document.addEventListener("reset",a.onReset),()=>{d(),document.removeEventListener("input",a.onInput),document.removeEventListener("focusout",a.onBlur),document.removeEventListener("reset",a.onReset)}},[a]),mt(()=>{a.onUpdate(G(G({},r),{},{formId:n}))});var i=Wr(),s=Br(a,i),o=Yr(t.defaultNoValidate),u=Hr(a,i,s,o);return[u,u.getFieldset()]}function Wt(t){for(var e in t)t[e]===void 0&&delete t[e];return t}function Xr(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e.ariaAttributes<"u"&&!e.ariaAttributes)return{};var r=e.ariaInvalid==="allErrors"?!t.valid:typeof t.errors<"u",n=e.ariaDescribedBy;return Wt({"aria-invalid":r||void 0,"aria-describedby":r?"".concat(t.errorId," ").concat(n??"").trim():n})}function Qr(t,e){return Wt(G({id:t.id,onSubmit:t.onSubmit,noValidate:t.noValidate},Xr(t,e)))}function Pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function O(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pt(Object(r),!0).forEach(function(n){en(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function en(t,e,r){return e=rn(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tn(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rn(t){var e=tn(t,"string");return typeof e=="symbol"?e:String(e)}var x;(function(t){t.assertEqual=a=>a;function e(a){}t.assertIs=e;function r(a){throw new Error}t.assertNever=r,t.arrayToEnum=a=>{const i={};for(const s of a)i[s]=s;return i},t.getValidEnumValues=a=>{const i=t.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),s={};for(const o of i)s[o]=a[o];return t.objectValues(s)},t.objectValues=a=>t.objectKeys(a).map(function(i){return a[i]}),t.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&i.push(s);return i},t.find=(a,i)=>{for(const s of a)if(i(s))return s},t.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function n(a,i=" | "){return a.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}t.joinValues=n,t.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(x||(x={}));var vt;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(vt||(vt={}));const p=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Y=t=>{switch(typeof t){case"undefined":return p.undefined;case"string":return p.string;case"number":return isNaN(t)?p.nan:p.number;case"boolean":return p.boolean;case"function":return p.function;case"bigint":return p.bigint;case"symbol":return p.symbol;case"object":return Array.isArray(t)?p.array:t===null?p.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?p.promise:typeof Map<"u"&&t instanceof Map?p.map:typeof Set<"u"&&t instanceof Set?p.set:typeof Date<"u"&&t instanceof Date?p.date:p.object;default:return p.unknown}},c=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),nn=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class $ extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(i){return i.message},n={_errors:[]},a=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(a);else if(s.code==="invalid_return_type")a(s.returnTypeError);else if(s.code==="invalid_arguments")a(s.argumentsError);else if(s.path.length===0)n._errors.push(r(s));else{let o=n,u=0;for(;u<s.path.length;){const d=s.path[u];u===s.path.length-1?(o[d]=o[d]||{_errors:[]},o[d]._errors.push(r(s))):o[d]=o[d]||{_errors:[]},o=o[d],u++}}};return a(this),n}static assert(e){if(!(e instanceof $))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},n=[];for(const a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):n.push(e(a));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}$.create=t=>new $(t);const ke=(t,e)=>{let r;switch(t.code){case c.invalid_type:t.received===p.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case c.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,x.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:r=`Unrecognized key(s) in object: ${x.joinValues(t.keys,", ")}`;break;case c.invalid_union:r="Invalid input";break;case c.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${x.joinValues(t.options)}`;break;case c.invalid_enum_value:r=`Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;break;case c.invalid_arguments:r="Invalid function arguments";break;case c.invalid_return_type:r="Invalid function return type";break;case c.invalid_date:r="Invalid date";break;case c.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:x.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case c.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case c.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case c.custom:r="Invalid input";break;case c.invalid_intersection_types:r="Intersection results could not be merged";break;case c.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case c.not_finite:r="Number must be finite";break;default:r=e.defaultError,x.assertNever(t)}return{message:r}};let Ht=ke;function an(t){Ht=t}function Xe(){return Ht}const Qe=t=>{const{data:e,path:r,errorMaps:n,issueData:a}=t,i=[...r,...a.path||[]],s={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let o="";const u=n.filter(d=>!!d).slice().reverse();for(const d of u)o=d(s,{data:e,defaultError:o}).message;return{...a,path:i,message:o}},sn=[];function h(t,e){const r=Xe(),n=Qe({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===ke?void 0:ke].filter(a=>!!a)});t.common.issues.push(n)}class R{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const n=[];for(const a of r){if(a.status==="aborted")return _;a.status==="dirty"&&e.dirty(),n.push(a.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,r){const n=[];for(const a of r){const i=await a.key,s=await a.value;n.push({key:i,value:s})}return R.mergeObjectSync(e,n)}static mergeObjectSync(e,r){const n={};for(const a of r){const{key:i,value:s}=a;if(i.status==="aborted"||s.status==="aborted")return _;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||a.alwaysSet)&&(n[i.value]=s.value)}return{status:e.value,value:n}}}const _=Object.freeze({status:"aborted"}),ve=t=>({status:"dirty",value:t}),V=t=>({status:"valid",value:t}),yt=t=>t.status==="aborted",gt=t=>t.status==="dirty",ce=t=>t.status==="valid",Me=t=>typeof Promise<"u"&&t instanceof Promise;function et(t,e,r,n){if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function qt(t,e,r,n,a){if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}var y;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(y||(y={}));var Ae,Ie;class q{constructor(e,r,n,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=n,this._key=a}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Rt=(t,e)=>{if(ce(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new $(t.common.issues);return this._error=r,this._error}}};function b(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:n,description:a}=t;if(e&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(s,o)=>{var u,d;const{message:f}=t;return s.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:(u=f??n)!==null&&u!==void 0?u:o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:(d=f??r)!==null&&d!==void 0?d:o.defaultError}},description:a}}class k{get description(){return this._def.description}_getType(e){return Y(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Y(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new R,ctx:{common:e.parent.common,data:e.data,parsedType:Y(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Me(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const n=this.safeParse(e,r);if(n.success)return n.data;throw n.error}safeParse(e,r){var n;const a={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Y(e)},i=this._parseSync({data:e,path:a.path,parent:a});return Rt(a,i)}"~validate"(e){var r,n;const a={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Y(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:a});return ce(i)?{value:i.value}:{issues:a.common.issues}}catch(i){!((n=(r=i==null?void 0:i.message)===null||r===void 0?void 0:r.toLowerCase())===null||n===void 0)&&n.includes("encountered")&&(this["~standard"].async=!0),a.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:a}).then(i=>ce(i)?{value:i.value}:{issues:a.common.issues})}async parseAsync(e,r){const n=await this.safeParseAsync(e,r);if(n.success)return n.data;throw n.error}async safeParseAsync(e,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Y(e)},a=this._parse({data:e,path:n.path,parent:n}),i=await(Me(a)?a:Promise.resolve(a));return Rt(n,i)}refine(e,r){const n=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,i)=>{const s=e(a),o=()=>i.addIssue({code:c.custom,...n(a)});return typeof Promise<"u"&&s instanceof Promise?s.then(u=>u?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,r){return this._refinement((n,a)=>e(n)?!0:(a.addIssue(typeof r=="function"?r(n,a):r),!1))}_refinement(e){return new F({schema:this,typeName:g.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return B.create(this,this._def)}nullable(){return ee.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return L.create(this)}promise(){return Oe.create(this,this._def)}or(e){return xe.create([this,e],this._def)}and(e){return Te.create(this,e,this._def)}transform(e){return new F({...b(this._def),schema:this,typeName:g.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Se({...b(this._def),innerType:this,defaultValue:r,typeName:g.ZodDefault})}brand(){return new kt({typeName:g.ZodBranded,type:this,...b(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Ne({...b(this._def),innerType:this,catchValue:r,typeName:g.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Ee.create(this,e)}readonly(){return We.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const on=/^c[^\s-]{8,}$/i,un=/^[0-9a-z]+$/,dn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cn=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ln=/^[a-z0-9_-]{21}$/i,fn=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hn=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,pn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mn="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ft;const vn=/^(?:(?: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])$/,yn=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,gn=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,_n=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bn=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kn=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Jt="((\\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])))",wn=new RegExp(`^${Jt}$`);function Kt(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function xn(t){return new RegExp(`^${Kt(t)}$`)}function Yt(t){let e=`${Jt}T${Kt(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Tn(t,e){return!!((e==="v4"||!e)&&vn.test(t)||(e==="v6"||!e)&&gn.test(t))}function On(t,e){if(!fn.test(t))return!1;try{const[r]=t.split("."),n=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),a=JSON.parse(atob(n));return!(typeof a!="object"||a===null||!a.typ||!a.alg||e&&a.alg!==e)}catch{return!1}}function Sn(t,e){return!!((e==="v4"||!e)&&yn.test(t)||(e==="v6"||!e)&&_n.test(t))}class z extends k{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==p.string){const i=this._getOrReturnCtx(e);return h(i,{code:c.invalid_type,expected:p.string,received:i.parsedType}),_}const n=new R;let a;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:c.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:c.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,o=e.data.length<i.value;(s||o)&&(a=this._getOrReturnCtx(e,a),s?h(a,{code:c.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&h(a,{code:c.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")pn.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"email",code:c.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")ft||(ft=new RegExp(mn,"u")),ft.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"emoji",code:c.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")cn.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"uuid",code:c.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")ln.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"nanoid",code:c.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")on.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"cuid",code:c.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")un.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"cuid2",code:c.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")dn.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"ulid",code:c.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),h(a,{validation:"url",code:c.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"regex",code:c.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),h(a,{code:c.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),h(a,{code:c.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),h(a,{code:c.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Yt(i).test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{code:c.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?wn.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{code:c.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?xn(i).test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{code:c.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?hn.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"duration",code:c.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?Tn(e.data,i.version)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"ip",code:c.invalid_string,message:i.message}),n.dirty()):i.kind==="jwt"?On(e.data,i.alg)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"jwt",code:c.invalid_string,message:i.message}),n.dirty()):i.kind==="cidr"?Sn(e.data,i.version)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"cidr",code:c.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?bn.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"base64",code:c.invalid_string,message:i.message}),n.dirty()):i.kind==="base64url"?kn.test(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{validation:"base64url",code:c.invalid_string,message:i.message}),n.dirty()):x.assertNever(i);return{status:n.value,value:e.data}}_regex(e,r,n){return this.refinement(a=>e.test(a),{validation:r,code:c.invalid_string,...y.errToObj(n)})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...y.errToObj(e)})}url(e){return this._addCheck({kind:"url",...y.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...y.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...y.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...y.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...y.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...y.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...y.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...y.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...y.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...y.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...y.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...y.errToObj(e)})}datetime(e){var r,n;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,local:(n=e==null?void 0:e.local)!==null&&n!==void 0?n:!1,...y.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...y.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...y.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...y.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...y.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...y.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...y.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...y.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...y.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...y.errToObj(r)})}nonempty(e){return this.min(1,y.errToObj(e))}trim(){return new z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}z.create=t=>{var e;return new z({checks:[],typeName:g.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...b(t)})};function Nn(t,e){const r=(t.toString().split(".")[1]||"").length,n=(e.toString().split(".")[1]||"").length,a=r>n?r:n,i=parseInt(t.toFixed(a).replace(".","")),s=parseInt(e.toFixed(a).replace(".",""));return i%s/Math.pow(10,a)}class ae extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==p.number){const i=this._getOrReturnCtx(e);return h(i,{code:c.invalid_type,expected:p.number,received:i.parsedType}),_}let n;const a=new R;for(const i of this._def.checks)i.kind==="int"?x.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:c.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:c.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:c.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?Nn(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),h(n,{code:c.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:c.not_finite,message:i.message}),a.dirty()):x.assertNever(i);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,y.toString(r))}gt(e,r){return this.setLimit("min",e,!1,y.toString(r))}lte(e,r){return this.setLimit("max",e,!0,y.toString(r))}lt(e,r){return this.setLimit("max",e,!1,y.toString(r))}setLimit(e,r,n,a){return new ae({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:y.toString(a)}]})}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:y.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:y.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:y.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:y.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:y.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:y.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:y.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:y.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:y.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(e===null||n.value<e)&&(e=n.value)}return Number.isFinite(r)&&Number.isFinite(e)}}ae.create=t=>new ae({checks:[],typeName:g.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...b(t)});class ie extends k{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==p.bigint)return this._getInvalidInput(e);let n;const a=new R;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:c.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),h(n,{code:c.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),h(n,{code:c.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):x.assertNever(i);return{status:a.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return h(r,{code:c.invalid_type,expected:p.bigint,received:r.parsedType}),_}gte(e,r){return this.setLimit("min",e,!0,y.toString(r))}gt(e,r){return this.setLimit("min",e,!1,y.toString(r))}lte(e,r){return this.setLimit("max",e,!0,y.toString(r))}lt(e,r){return this.setLimit("max",e,!1,y.toString(r))}setLimit(e,r,n,a){return new ie({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:n,message:y.toString(a)}]})}_addCheck(e){return new ie({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:y.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:y.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:y.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:y.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:y.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}ie.create=t=>{var e;return new ie({checks:[],typeName:g.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...b(t)})};class $e extends k{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==p.boolean){const n=this._getOrReturnCtx(e);return h(n,{code:c.invalid_type,expected:p.boolean,received:n.parsedType}),_}return V(e.data)}}$e.create=t=>new $e({typeName:g.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...b(t)});class le extends k{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==p.date){const i=this._getOrReturnCtx(e);return h(i,{code:c.invalid_type,expected:p.date,received:i.parsedType}),_}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return h(i,{code:c.invalid_date}),_}const n=new R;let a;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:c.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),h(a,{code:c.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):x.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new le({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:y.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:y.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}le.create=t=>new le({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:g.ZodDate,...b(t)});class tt extends k{_parse(e){if(this._getType(e)!==p.symbol){const n=this._getOrReturnCtx(e);return h(n,{code:c.invalid_type,expected:p.symbol,received:n.parsedType}),_}return V(e.data)}}tt.create=t=>new tt({typeName:g.ZodSymbol,...b(t)});class De extends k{_parse(e){if(this._getType(e)!==p.undefined){const n=this._getOrReturnCtx(e);return h(n,{code:c.invalid_type,expected:p.undefined,received:n.parsedType}),_}return V(e.data)}}De.create=t=>new De({typeName:g.ZodUndefined,...b(t)});class Le extends k{_parse(e){if(this._getType(e)!==p.null){const n=this._getOrReturnCtx(e);return h(n,{code:c.invalid_type,expected:p.null,received:n.parsedType}),_}return V(e.data)}}Le.create=t=>new Le({typeName:g.ZodNull,...b(t)});class we extends k{constructor(){super(...arguments),this._any=!0}_parse(e){return V(e.data)}}we.create=t=>new we({typeName:g.ZodAny,...b(t)});class ue extends k{constructor(){super(...arguments),this._unknown=!0}_parse(e){return V(e.data)}}ue.create=t=>new ue({typeName:g.ZodUnknown,...b(t)});class Q extends k{_parse(e){const r=this._getOrReturnCtx(e);return h(r,{code:c.invalid_type,expected:p.never,received:r.parsedType}),_}}Q.create=t=>new Q({typeName:g.ZodNever,...b(t)});class rt extends k{_parse(e){if(this._getType(e)!==p.undefined){const n=this._getOrReturnCtx(e);return h(n,{code:c.invalid_type,expected:p.void,received:n.parsedType}),_}return V(e.data)}}rt.create=t=>new rt({typeName:g.ZodVoid,...b(t)});class L extends k{_parse(e){const{ctx:r,status:n}=this._processInputParams(e),a=this._def;if(r.parsedType!==p.array)return h(r,{code:c.invalid_type,expected:p.array,received:r.parsedType}),_;if(a.exactLength!==null){const s=r.data.length>a.exactLength.value,o=r.data.length<a.exactLength.value;(s||o)&&(h(r,{code:s?c.too_big:c.too_small,minimum:o?a.exactLength.value:void 0,maximum:s?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),n.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(h(r,{code:c.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),n.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(h(r,{code:c.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((s,o)=>a.type._parseAsync(new q(r,s,r.path,o)))).then(s=>R.mergeArray(n,s));const i=[...r.data].map((s,o)=>a.type._parseSync(new q(r,s,r.path,o)));return R.mergeArray(n,i)}get element(){return this._def.type}min(e,r){return new L({...this._def,minLength:{value:e,message:y.toString(r)}})}max(e,r){return new L({...this._def,maxLength:{value:e,message:y.toString(r)}})}length(e,r){return new L({...this._def,exactLength:{value:e,message:y.toString(r)}})}nonempty(e){return this.min(1,e)}}L.create=(t,e)=>new L({type:t,minLength:null,maxLength:null,exactLength:null,typeName:g.ZodArray,...b(e)});function me(t){if(t instanceof N){const e={};for(const r in t.shape){const n=t.shape[r];e[r]=B.create(me(n))}return new N({...t._def,shape:()=>e})}else return t instanceof L?new L({...t._def,type:me(t.element)}):t instanceof B?B.create(me(t.unwrap())):t instanceof ee?ee.create(me(t.unwrap())):t instanceof W?W.create(t.items.map(e=>me(e))):t}class N extends k{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=x.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==p.object){const d=this._getOrReturnCtx(e);return h(d,{code:c.invalid_type,expected:p.object,received:d.parsedType}),_}const{status:n,ctx:a}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof Q&&this._def.unknownKeys==="strip"))for(const d in a.data)s.includes(d)||o.push(d);const u=[];for(const d of s){const f=i[d],w=a.data[d];u.push({key:{status:"valid",value:d},value:f._parse(new q(a,w,a.path,d)),alwaysSet:d in a.data})}if(this._def.catchall instanceof Q){const d=this._def.unknownKeys;if(d==="passthrough")for(const f of o)u.push({key:{status:"valid",value:f},value:{status:"valid",value:a.data[f]}});else if(d==="strict")o.length>0&&(h(a,{code:c.unrecognized_keys,keys:o}),n.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const f of o){const w=a.data[f];u.push({key:{status:"valid",value:f},value:d._parse(new q(a,w,a.path,f)),alwaysSet:f in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const d=[];for(const f of u){const w=await f.key,A=await f.value;d.push({key:w,value:A,alwaysSet:f.alwaysSet})}return d}).then(d=>R.mergeObjectSync(n,d)):R.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return y.errToObj,new N({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,n)=>{var a,i,s,o;const u=(s=(i=(a=this._def).errorMap)===null||i===void 0?void 0:i.call(a,r,n).message)!==null&&s!==void 0?s:n.defaultError;return r.code==="unrecognized_keys"?{message:(o=y.errToObj(e).message)!==null&&o!==void 0?o:u}:{message:u}}}:{}})}strip(){return new N({...this._def,unknownKeys:"strip"})}passthrough(){return new N({...this._def,unknownKeys:"passthrough"})}extend(e){return new N({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new N({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:g.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new N({...this._def,catchall:e})}pick(e){const r={};return x.objectKeys(e).forEach(n=>{e[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new N({...this._def,shape:()=>r})}omit(e){const r={};return x.objectKeys(this.shape).forEach(n=>{e[n]||(r[n]=this.shape[n])}),new N({...this._def,shape:()=>r})}deepPartial(){return me(this)}partial(e){const r={};return x.objectKeys(this.shape).forEach(n=>{const a=this.shape[n];e&&!e[n]?r[n]=a:r[n]=a.optional()}),new N({...this._def,shape:()=>r})}required(e){const r={};return x.objectKeys(this.shape).forEach(n=>{if(e&&!e[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof B;)i=i._def.innerType;r[n]=i}}),new N({...this._def,shape:()=>r})}keyof(){return Gt(x.objectKeys(this.shape))}}N.create=(t,e)=>new N({shape:()=>t,unknownKeys:"strip",catchall:Q.create(),typeName:g.ZodObject,...b(e)});N.strictCreate=(t,e)=>new N({shape:()=>t,unknownKeys:"strict",catchall:Q.create(),typeName:g.ZodObject,...b(e)});N.lazycreate=(t,e)=>new N({shape:t,unknownKeys:"strip",catchall:Q.create(),typeName:g.ZodObject,...b(e)});class xe extends k{_parse(e){const{ctx:r}=this._processInputParams(e),n=this._def.options;function a(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return r.common.issues.push(...o.ctx.common.issues),o.result;const s=i.map(o=>new $(o.ctx.common.issues));return h(r,{code:c.invalid_union,unionErrors:s}),_}if(r.common.async)return Promise.all(n.map(async i=>{const s={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(a);{let i;const s=[];for(const u of n){const d={...r,common:{...r.common,issues:[]},parent:null},f=u._parseSync({data:r.data,path:r.path,parent:d});if(f.status==="valid")return f;f.status==="dirty"&&!i&&(i={result:f,ctx:d}),d.common.issues.length&&s.push(d.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const o=s.map(u=>new $(u));return h(r,{code:c.invalid_union,unionErrors:o}),_}}get options(){return this._def.options}}xe.create=(t,e)=>new xe({options:t,typeName:g.ZodUnion,...b(e)});const K=t=>t instanceof Ue?K(t.schema):t instanceof F?K(t.innerType()):t instanceof ze?[t.value]:t instanceof se?t.options:t instanceof Be?x.objectValues(t.enum):t instanceof Se?K(t._def.innerType):t instanceof De?[void 0]:t instanceof Le?[null]:t instanceof B?[void 0,...K(t.unwrap())]:t instanceof ee?[null,...K(t.unwrap())]:t instanceof kt||t instanceof We?K(t.unwrap()):t instanceof Ne?K(t._def.innerType):[];class Je extends k{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.object)return h(r,{code:c.invalid_type,expected:p.object,received:r.parsedType}),_;const n=this.discriminator,a=r.data[n],i=this.optionsMap.get(a);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(h(r,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),_)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,n){const a=new Map;for(const i of r){const s=K(i.shape[e]);if(!s.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of s){if(a.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);a.set(o,i)}}return new Je({typeName:g.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...b(n)})}}function _t(t,e){const r=Y(t),n=Y(e);if(t===e)return{valid:!0,data:t};if(r===p.object&&n===p.object){const a=x.objectKeys(e),i=x.objectKeys(t).filter(o=>a.indexOf(o)!==-1),s={...t,...e};for(const o of i){const u=_t(t[o],e[o]);if(!u.valid)return{valid:!1};s[o]=u.data}return{valid:!0,data:s}}else if(r===p.array&&n===p.array){if(t.length!==e.length)return{valid:!1};const a=[];for(let i=0;i<t.length;i++){const s=t[i],o=e[i],u=_t(s,o);if(!u.valid)return{valid:!1};a.push(u.data)}return{valid:!0,data:a}}else return r===p.date&&n===p.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Te extends k{_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=(i,s)=>{if(yt(i)||yt(s))return _;const o=_t(i.value,s.value);return o.valid?((gt(i)||gt(s))&&r.dirty(),{status:r.value,value:o.data}):(h(n,{code:c.invalid_intersection_types}),_)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,s])=>a(i,s)):a(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Te.create=(t,e,r)=>new Te({left:t,right:e,typeName:g.ZodIntersection,...b(r)});class W extends k{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.array)return h(n,{code:c.invalid_type,expected:p.array,received:n.parsedType}),_;if(n.data.length<this._def.items.length)return h(n,{code:c.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_;!this._def.rest&&n.data.length>this._def.items.length&&(h(n,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((s,o)=>{const u=this._def.items[o]||this._def.rest;return u?u._parse(new q(n,s,n.path,o)):null}).filter(s=>!!s);return n.common.async?Promise.all(i).then(s=>R.mergeArray(r,s)):R.mergeArray(r,i)}get items(){return this._def.items}rest(e){return new W({...this._def,rest:e})}}W.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new W({items:t,typeName:g.ZodTuple,rest:null,...b(e)})};class Fe extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.object)return h(n,{code:c.invalid_type,expected:p.object,received:n.parsedType}),_;const a=[],i=this._def.keyType,s=this._def.valueType;for(const o in n.data)a.push({key:i._parse(new q(n,o,n.path,o)),value:s._parse(new q(n,n.data[o],n.path,o)),alwaysSet:o in n.data});return n.common.async?R.mergeObjectAsync(r,a):R.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,n){return r instanceof k?new Fe({keyType:e,valueType:r,typeName:g.ZodRecord,...b(n)}):new Fe({keyType:z.create(),valueType:e,typeName:g.ZodRecord,...b(r)})}}class nt extends k{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.map)return h(n,{code:c.invalid_type,expected:p.map,received:n.parsedType}),_;const a=this._def.keyType,i=this._def.valueType,s=[...n.data.entries()].map(([o,u],d)=>({key:a._parse(new q(n,o,n.path,[d,"key"])),value:i._parse(new q(n,u,n.path,[d,"value"]))}));if(n.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const u of s){const d=await u.key,f=await u.value;if(d.status==="aborted"||f.status==="aborted")return _;(d.status==="dirty"||f.status==="dirty")&&r.dirty(),o.set(d.value,f.value)}return{status:r.value,value:o}})}else{const o=new Map;for(const u of s){const d=u.key,f=u.value;if(d.status==="aborted"||f.status==="aborted")return _;(d.status==="dirty"||f.status==="dirty")&&r.dirty(),o.set(d.value,f.value)}return{status:r.value,value:o}}}}nt.create=(t,e,r)=>new nt({valueType:e,keyType:t,typeName:g.ZodMap,...b(r)});class fe extends k{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.parsedType!==p.set)return h(n,{code:c.invalid_type,expected:p.set,received:n.parsedType}),_;const a=this._def;a.minSize!==null&&n.data.size<a.minSize.value&&(h(n,{code:c.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&n.data.size>a.maxSize.value&&(h(n,{code:c.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const i=this._def.valueType;function s(u){const d=new Set;for(const f of u){if(f.status==="aborted")return _;f.status==="dirty"&&r.dirty(),d.add(f.value)}return{status:r.value,value:d}}const o=[...n.data.values()].map((u,d)=>i._parse(new q(n,u,n.path,d)));return n.common.async?Promise.all(o).then(u=>s(u)):s(o)}min(e,r){return new fe({...this._def,minSize:{value:e,message:y.toString(r)}})}max(e,r){return new fe({...this._def,maxSize:{value:e,message:y.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}fe.create=(t,e)=>new fe({valueType:t,minSize:null,maxSize:null,typeName:g.ZodSet,...b(e)});class ge extends k{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.function)return h(r,{code:c.invalid_type,expected:p.function,received:r.parsedType}),_;function n(o,u){return Qe({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Xe(),ke].filter(d=>!!d),issueData:{code:c.invalid_arguments,argumentsError:u}})}function a(o,u){return Qe({data:o,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Xe(),ke].filter(d=>!!d),issueData:{code:c.invalid_return_type,returnTypeError:u}})}const i={errorMap:r.common.contextualErrorMap},s=r.data;if(this._def.returns instanceof Oe){const o=this;return V(async function(...u){const d=new $([]),f=await o._def.args.parseAsync(u,i).catch(j=>{throw d.addIssue(n(u,j)),d}),w=await Reflect.apply(s,this,f);return await o._def.returns._def.type.parseAsync(w,i).catch(j=>{throw d.addIssue(a(w,j)),d})})}else{const o=this;return V(function(...u){const d=o._def.args.safeParse(u,i);if(!d.success)throw new $([n(u,d.error)]);const f=Reflect.apply(s,this,d.data),w=o._def.returns.safeParse(f,i);if(!w.success)throw new $([a(f,w.error)]);return w.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ge({...this._def,args:W.create(e).rest(ue.create())})}returns(e){return new ge({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,n){return new ge({args:e||W.create([]).rest(ue.create()),returns:r||ue.create(),typeName:g.ZodFunction,...b(n)})}}class Ue extends k{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Ue.create=(t,e)=>new Ue({getter:t,typeName:g.ZodLazy,...b(e)});class ze extends k{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return h(r,{received:r.data,code:c.invalid_literal,expected:this._def.value}),_}return{status:"valid",value:e.data}}get value(){return this._def.value}}ze.create=(t,e)=>new ze({value:t,typeName:g.ZodLiteral,...b(e)});function Gt(t,e){return new se({values:t,typeName:g.ZodEnum,...b(e)})}class se extends k{constructor(){super(...arguments),Ae.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),n=this._def.values;return h(r,{expected:x.joinValues(n),received:r.parsedType,code:c.invalid_type}),_}if(et(this,Ae)||qt(this,Ae,new Set(this._def.values)),!et(this,Ae).has(e.data)){const r=this._getOrReturnCtx(e),n=this._def.values;return h(r,{received:r.data,code:c.invalid_enum_value,options:n}),_}return V(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return se.create(e,{...this._def,...r})}exclude(e,r=this._def){return se.create(this.options.filter(n=>!e.includes(n)),{...this._def,...r})}}Ae=new WeakMap;se.create=Gt;class Be extends k{constructor(){super(...arguments),Ie.set(this,void 0)}_parse(e){const r=x.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==p.string&&n.parsedType!==p.number){const a=x.objectValues(r);return h(n,{expected:x.joinValues(a),received:n.parsedType,code:c.invalid_type}),_}if(et(this,Ie)||qt(this,Ie,new Set(x.getValidEnumValues(this._def.values))),!et(this,Ie).has(e.data)){const a=x.objectValues(r);return h(n,{received:n.data,code:c.invalid_enum_value,options:a}),_}return V(e.data)}get enum(){return this._def.values}}Ie=new WeakMap;Be.create=(t,e)=>new Be({values:t,typeName:g.ZodNativeEnum,...b(e)});class Oe extends k{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==p.promise&&r.common.async===!1)return h(r,{code:c.invalid_type,expected:p.promise,received:r.parsedType}),_;const n=r.parsedType===p.promise?r.data:Promise.resolve(r.data);return V(n.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Oe.create=(t,e)=>new Oe({type:t,typeName:g.ZodPromise,...b(e)});class F extends k{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===g.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:n}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:s=>{h(n,s),s.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const s=a.transform(n.data,i);if(n.common.async)return Promise.resolve(s).then(async o=>{if(r.value==="aborted")return _;const u=await this._def.schema._parseAsync({data:o,path:n.path,parent:n});return u.status==="aborted"?_:u.status==="dirty"||r.value==="dirty"?ve(u.value):u});{if(r.value==="aborted")return _;const o=this._def.schema._parseSync({data:s,path:n.path,parent:n});return o.status==="aborted"?_:o.status==="dirty"||r.value==="dirty"?ve(o.value):o}}if(a.type==="refinement"){const s=o=>{const u=a.refinement(o,i);if(n.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(n.common.async===!1){const o=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?_:(o.status==="dirty"&&r.dirty(),s(o.value),{status:r.value,value:o.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(o=>o.status==="aborted"?_:(o.status==="dirty"&&r.dirty(),s(o.value).then(()=>({status:r.value,value:o.value}))))}if(a.type==="transform")if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!ce(s))return s;const o=a.transform(s.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:o}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>ce(s)?Promise.resolve(a.transform(s.value,i)).then(o=>({status:r.value,value:o})):s);x.assertNever(a)}}F.create=(t,e,r)=>new F({schema:t,typeName:g.ZodEffects,effect:e,...b(r)});F.createWithPreprocess=(t,e,r)=>new F({schema:e,effect:{type:"preprocess",transform:t},typeName:g.ZodEffects,...b(r)});class B extends k{_parse(e){return this._getType(e)===p.undefined?V(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}B.create=(t,e)=>new B({innerType:t,typeName:g.ZodOptional,...b(e)});class ee extends k{_parse(e){return this._getType(e)===p.null?V(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ee.create=(t,e)=>new ee({innerType:t,typeName:g.ZodNullable,...b(e)});class Se extends k{_parse(e){const{ctx:r}=this._processInputParams(e);let n=r.data;return r.parsedType===p.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Se.create=(t,e)=>new Se({innerType:t,typeName:g.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...b(e)});class Ne extends k{_parse(e){const{ctx:r}=this._processInputParams(e),n={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Me(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new $(n.common.issues)},input:n.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new $(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ne.create=(t,e)=>new Ne({innerType:t,typeName:g.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...b(e)});class at extends k{_parse(e){if(this._getType(e)!==p.nan){const n=this._getOrReturnCtx(e);return h(n,{code:c.invalid_type,expected:p.nan,received:n.parsedType}),_}return{status:"valid",value:e.data}}}at.create=t=>new at({typeName:g.ZodNaN,...b(t)});const En=Symbol("zod_brand");class kt extends k{_parse(e){const{ctx:r}=this._processInputParams(e),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ee extends k{_parse(e){const{status:r,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?_:i.status==="dirty"?(r.dirty(),ve(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const a=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return a.status==="aborted"?_:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:n.path,parent:n})}}static create(e,r){return new Ee({in:e,out:r,typeName:g.ZodPipeline})}}class We extends k{_parse(e){const r=this._def.innerType._parse(e),n=a=>(ce(a)&&(a.value=Object.freeze(a.value)),a);return Me(r)?r.then(a=>n(a)):n(r)}unwrap(){return this._def.innerType}}We.create=(t,e)=>new We({innerType:t,typeName:g.ZodReadonly,...b(e)});function Vt(t,e){const r=typeof t=="function"?t(e):typeof t=="string"?{message:t}:t;return typeof r=="string"?{message:r}:r}function Xt(t,e={},r){return t?we.create().superRefine((n,a)=>{var i,s;const o=t(n);if(o instanceof Promise)return o.then(u=>{var d,f;if(!u){const w=Vt(e,n),A=(f=(d=w.fatal)!==null&&d!==void 0?d:r)!==null&&f!==void 0?f:!0;a.addIssue({code:"custom",...w,fatal:A})}});if(!o){const u=Vt(e,n),d=(s=(i=u.fatal)!==null&&i!==void 0?i:r)!==null&&s!==void 0?s:!0;a.addIssue({code:"custom",...u,fatal:d})}}):we.create()}const Cn={object:N.lazycreate};var g;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(g||(g={}));const An=(t,e={message:`Input not instance of ${t.name}`})=>Xt(r=>r instanceof t,e),Qt=z.create,er=ae.create,In=at.create,Zn=ie.create,tr=$e.create,jn=le.create,Pn=tt.create,Rn=De.create,Vn=Le.create,U=we.create,Mn=ue.create,$n=Q.create,Dn=rt.create,Ln=L.create,Fn=N.create,Un=N.strictCreate,zn=xe.create,Bn=Je.create,Wn=Te.create,Hn=W.create,qn=Fe.create,Jn=nt.create,Kn=fe.create,Yn=ge.create,rr=Ue.create,Gn=ze.create,Xn=se.create,Qn=Be.create,ea=Oe.create,Mt=F.create,ta=B.create,ra=ee.create,na=F.createWithPreprocess,aa=Ee.create,ia=()=>Qt().optional(),sa=()=>er().optional(),oa=()=>tr().optional(),ua={string:t=>z.create({...t,coerce:!0}),number:t=>ae.create({...t,coerce:!0}),boolean:t=>$e.create({...t,coerce:!0}),bigint:t=>ie.create({...t,coerce:!0}),date:t=>le.create({...t,coerce:!0})},da=_;var $t=Object.freeze({__proto__:null,defaultErrorMap:ke,setErrorMap:an,getErrorMap:Xe,makeIssue:Qe,EMPTY_PATH:sn,addIssueToContext:h,ParseStatus:R,INVALID:_,DIRTY:ve,OK:V,isAborted:yt,isDirty:gt,isValid:ce,isAsync:Me,get util(){return x},get objectUtil(){return vt},ZodParsedType:p,getParsedType:Y,ZodType:k,datetimeRegex:Yt,ZodString:z,ZodNumber:ae,ZodBigInt:ie,ZodBoolean:$e,ZodDate:le,ZodSymbol:tt,ZodUndefined:De,ZodNull:Le,ZodAny:we,ZodUnknown:ue,ZodNever:Q,ZodVoid:rt,ZodArray:L,ZodObject:N,ZodUnion:xe,ZodDiscriminatedUnion:Je,ZodIntersection:Te,ZodTuple:W,ZodRecord:Fe,ZodMap:nt,ZodSet:fe,ZodFunction:ge,ZodLazy:Ue,ZodLiteral:ze,ZodEnum:se,ZodNativeEnum:Be,ZodPromise:Oe,ZodEffects:F,ZodTransformer:F,ZodOptional:B,ZodNullable:ee,ZodDefault:Se,ZodCatch:Ne,ZodNaN:at,BRAND:En,ZodBranded:kt,ZodPipeline:Ee,ZodReadonly:We,custom:Xt,Schema:k,ZodSchema:k,late:Cn,get ZodFirstPartyTypeKind(){return g},coerce:ua,any:U,array:Ln,bigint:Zn,boolean:tr,date:jn,discriminatedUnion:Bn,effect:Mt,enum:Xn,function:Yn,instanceof:An,intersection:Wn,lazy:rr,literal:Gn,map:Jn,nan:In,nativeEnum:Qn,never:$n,null:Vn,nullable:ra,number:er,object:Fn,oboolean:oa,onumber:sa,optional:ta,ostring:ia,pipeline:aa,preprocess:na,promise:ea,record:qn,set:Kn,strictObject:Un,string:Qt,symbol:Pn,transformer:Mt,tuple:Hn,undefined:Rn,union:zn,unknown:Mn,void:Dn,NEVER:da,ZodIssueCode:c,quotelessJson:nn,ZodError:$}),nr="__EMPTY_STRING__";function te(t,e){if(typeof t!="string")return t;if(t!=="")return t===nr?"":typeof e!="function"?t:e(t)}function Ye(t){if(!(typeof File<"u"&&t instanceof File&&t.name===""&&t.size===0))return t}function ca(t){return typeof File>"u"?!1:t._def.effect.type==="refinement"&&t.innerType()._def.typeName==="ZodAny"&&t.safeParse(new File([],"")).success&&!t.safeParse("").success}function Z(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Map,r=e.get(t);if(r)return r;var n=t,a=t._def;if(a.typeName==="ZodString"||a.typeName==="ZodLiteral"||a.typeName==="ZodEnum"||a.typeName==="ZodNativeEnum")n=U().transform(s=>te(s)).pipe(t);else if(a.typeName==="ZodNumber")n=U().transform(s=>te(s,o=>o.trim()===""?o:Number(o))).pipe(t);else if(a.typeName==="ZodBoolean")n=U().transform(s=>te(s,o=>o==="on"?!0:o)).pipe(t);else if(a.typeName==="ZodDate")n=U().transform(s=>te(s,o=>{var u=new Date(o);return isNaN(u.getTime())?o:u})).pipe(t);else if(a.typeName==="ZodBigInt")n=U().transform(s=>te(s,o=>{if(o.trim()==="")return o;try{return BigInt(o)}catch{return o}})).pipe(t);else if(a.typeName==="ZodArray")n=U().transform(s=>Array.isArray(s)?s:typeof s>"u"||typeof Ye(te(s))>"u"?[]:[s]).pipe(new L(O(O({},a),{},{type:Z(a.type,e)})));else if(a.typeName==="ZodObject")n=U().transform(s=>typeof s>"u"?{}:s).pipe(new N(O(O({},a),{},{shape:()=>Object.fromEntries(Object.entries(a.shape()).map(s=>{var[o,u]=s;return[o,Z(u,e)]}))})));else if(a.typeName==="ZodEffects")ca(t)?n=U().transform(s=>Ye(s)).pipe(t):n=new F(O(O({},a),{},{schema:Z(a.schema,e)}));else if(a.typeName==="ZodOptional")n=U().transform(s=>Ye(te(s))).pipe(new B(O(O({},a),{},{innerType:Z(a.innerType,e)})));else if(a.typeName==="ZodDefault")n=U().transform(s=>Ye(te(s))).pipe(new Se(O(O({},a),{},{defaultValue:()=>{var s=a.defaultValue();return s===""?nr:s},innerType:Z(a.innerType,e)})));else if(a.typeName==="ZodCatch")n=new Ne(O(O({},a),{},{innerType:Z(a.innerType,e)}));else if(a.typeName==="ZodIntersection")n=new Te(O(O({},a),{},{left:Z(a.left,e),right:Z(a.right,e)}));else if(a.typeName==="ZodUnion")n=new xe(O(O({},a),{},{options:a.options.map(s=>Z(s,e))}));else if(a.typeName==="ZodDiscriminatedUnion")n=new Je(O(O({},a),{},{options:a.options.map(s=>Z(s,e)),optionsMap:new Map(Array.from(a.optionsMap.entries()).map(s=>{var[o,u]=s;return[o,Z(u,e)]}))}));else if(a.typeName==="ZodTuple")n=new W(O(O({},a),{},{items:a.items.map(s=>Z(s,e))}));else if(a.typeName==="ZodNullable")n=new ee(O(O({},a),{},{innerType:Z(a.innerType,e)}));else if(a.typeName==="ZodPipeline")n=new Ee(O(O({},a),{},{in:Z(a.in,e),out:Z(a.out,e)}));else if(a.typeName==="ZodLazy"){var i=a.getter();n=rr(()=>Z(i,e))}return t!==n&&e.set(t,n),n}function la(t,e){var r={};for(var n of t.errors){var a=de(n.path);switch(n.message){case Dt.VALIDATION_UNDEFINED:return null;case Dt.VALIDATION_SKIPPED:r[a]=null;break;default:{var i=r[a];i!==null&&(i?r[a]=i.concat(n):r[a]=[n]);break}}}return Object.entries(r).reduce((s,o)=>{var[u,d]=o;return s[u]=d?e(d):null,s},{})}function fa(t,e){return Cr(t,{resolve(r,n){var a=e.errorMap,i=Z(typeof e.schema=="function"?e.schema(n):e.schema),s=o=>{var u;return{value:o.success?o.data:void 0,error:o.success?void 0:la(o.error,(u=e.formatError)!==null&&u!==void 0?u:d=>d.map(f=>f.message))}};return e.async?i.safeParseAsync(r,{errorMap:a}).then(o=>s(o)):s(i.safeParse(r,{errorMap:a}))}})}var Dt={VALIDATION_SKIPPED:"__skipped__",VALIDATION_UNDEFINED:"__undefined__"};function ha(t){function e(a,i){var u;const s=t[i];if(!s)throw new Error(`Unknown client hint: ${typeof i=="string"?i:"Unknown"}`);const o=(u=a.split(";").map(d=>d.trim()).find(d=>d.startsWith(s.cookieName+"=")))==null?void 0:u.split("=")[1];return o?decodeURIComponent(o):null}function r(a){const i=typeof document<"u"?document.cookie:typeof a<"u"?a.headers.get("Cookie")??"":"";return Object.entries(t).reduce((s,[o,u])=>{const d=o;return"transform"in u?s[d]=u.transform(e(i,d)??u.fallback):s[d]=e(i,d)??u.fallback,s},{})}function n(){return`
2
- // This block of code allows us to check if the client hints have changed and
3
- // force a reload of the page with updated hints if they have so you don't get
4
- // a flash of incorrect content.
5
- function checkClientHints() {
6
- if (!navigator.cookieEnabled) return;
7
-
8
- // set a short-lived cookie to make sure we can set cookies
9
- document.cookie = "canSetCookies=1; Max-Age=60; SameSite=Lax; path=/";
10
- const canSetCookies = document.cookie.includes("canSetCookies=1");
11
- document.cookie = "canSetCookies=; Max-Age=-1; path=/";
12
- if (!canSetCookies) return;
13
-
14
- const cookies = document.cookie.split(';').map(c => c.trim()).reduce((acc, cur) => {
15
- const [key, value] = cur.split('=');
16
- acc[key] = value;
17
- return acc;
18
- }, {});
19
-
20
- let cookieChanged = false;
21
- const hints = [
22
- ${Object.values(t).map(a=>{const i=JSON.stringify(a.cookieName);return`{ name: ${i}, actual: String(${a.getValueCode}), value: cookies[${i}] != null ? cookies[${i}] : encodeURIComponent("${a.fallback}") }`}).join(`,
23
- `)}
24
- ];
25
- for (const hint of hints) {
26
- document.cookie = encodeURIComponent(hint.name) + '=' + encodeURIComponent(hint.actual) + '; Max-Age=31536000; path=/';
27
- if (decodeURIComponent(hint.value) !== hint.actual) {
28
- cookieChanged = true;
29
- }
30
- }
31
- if (cookieChanged) window.location.reload();
32
- }
33
-
34
- checkClientHints();
35
- `}return{getHints:r,getClientHintCheckScript:n}}const ar={cookieName:"CH-prefers-color-scheme",getValueCode:"window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'",fallback:"light",transform(t){return t==="dark"?"dark":"light"}};function pa(t,e=ar.cookieName){const r=window.matchMedia("(prefers-color-scheme: dark)");function n(){const a=r.matches?"dark":"light";document.cookie=`${e}=${a}; Max-Age=31536000; Path=/`,t(a)}return r.addEventListener("change",n),function(){r.removeEventListener("change",n)}}const ir={cookieName:"CH-reduced-motion",getValueCode:"window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'reduce' : 'no-preference'",fallback:"no-preference",transform(t){return t==="reduce"?"reduce":"no-preference"}};function ma(t,e=ir.cookieName){const r=window.matchMedia("(prefers-reduced-motion: reduce)");function n(){const a=r.matches?"reduce":"no-preference";document.cookie=`${e}=${a}; Max-Age=31536000; Path=/`,t(a)}return r.addEventListener("change",n),function(){r.removeEventListener("change",n)}}const va={cookieName:"CH-time-zone",getValueCode:"Intl.DateTimeFormat().resolvedOptions().timeZone",fallback:"UTC"};function wt(){return mr("root").requestInfo}const sr="EpicShop_CH-prefers-color-scheme",or="EpicShop_CH-reduced-motion",ya=ha({theme:{...ar,cookieName:sr},timeZone:{...va,cookieName:"EpicShop_CH-time-zone"},reducedMotion:{...ir,cookieName:or}});function ga(){return wt().hints}function Na(){const{revalidate:t}=hr();return H.useEffect(()=>pa(()=>t(),sr),[t]),H.useEffect(()=>ma(()=>t(),or),[t]),D.jsx("script",{dangerouslySetInnerHTML:{__html:ya.getClientHintCheckScript()}})}function _a({id:t,errors:e}){const r=e==null?void 0:e.filter(Boolean);return r!=null&&r.length?D.jsx("ul",{id:t,className:"space-y-1",children:r.map(n=>D.jsx("li",{className:"text-foreground-destructive text-[10px]",children:n},n))}):null}const ba="/theme",ka=$t.object({theme:$t.enum(["system","light","dark"])});function Ea(){const t=wt(),e=gr(),r=vr(),[n]=Gr({lastResult:r.data,onValidate({formData:o}){return fa(o,{schema:ka})}}),a=t.session.theme??"system",i=a==="system"?"light":a==="light"?"dark":"system",s={light:D.jsx(ut,{size:"md",name:"Sun",title:"Light mode"}),dark:D.jsx(ut,{size:"md",name:"Moon",title:"Dark mode"}),system:D.jsx(ut,{size:"md",name:"Laptop",title:"System mode"})};return D.jsxs(r.Form,{method:"POST",action:ba,...Qr(n),children:[D.jsxs("div",{className:"flex gap-2",children:[e,D.jsx("input",{type:"hidden",name:"theme",value:i}),D.jsx(pr,{content:`Change theme from ${a} mode`,children:D.jsx("button",{type:"submit",name:"intent",value:"update-theme",className:"flex h-8 w-8 cursor-pointer items-center justify-center",children:s[a]})})]}),D.jsx(_a,{errors:n.errors,id:n.errorId})]})}function Ca(){var i;const t=ga(),e=wt(),n=yr().find(s=>{var o;return((o=s.formData)==null?void 0:o.get("intent"))==="update-theme"}),a=(i=n==null?void 0:n.formData)==null?void 0:i.get("theme");return a==="system"?t.theme:a==="light"||a==="dark"?a:e.session.theme??t.theme}export{Na as C,Ea as T,wt as a,ga as b,Ca as u,$t as z};
36
- //# sourceMappingURL=index-CMYl882D.js.map