@abtnode/webapp 1.16.45-beta-20250609-111118-0d252ebe → 1.16.45-beta-20250612-231219-481217be

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 (223) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-BqwbfR-J.js → AdapterDayjs-cAovH2Wn.js} +1 -1
  4. package/dist/assets/{Add-CSGWebd7.js → Add-CDNZP3_0.js} +1 -1
  5. package/dist/assets/{ArrowDropDown-BCCxOUNE.js → ArrowDropDown-DX4axGQA.js} +1 -1
  6. package/dist/assets/{Autocomplete-BRFoT1-d.js → Autocomplete-DpJFKWid.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-B-xYTnoc.js → Breadcrumbs-DvU47lY-.js} +1 -1
  8. package/dist/assets/{ButtonGroup-ClVwTb7r.js → ButtonGroup-pRTDFJWg.js} +1 -1
  9. package/dist/assets/{CSSTransition-DpoNbm4c.js → CSSTransition-DwzJ0puV.js} +1 -1
  10. package/dist/assets/{CallMerge-weq4zXp-.js → CallMerge-C0f2EMe_.js} +1 -1
  11. package/dist/assets/{CardContent-CTAfwoUe.js → CardContent-0awZM1Ns.js} +1 -1
  12. package/dist/assets/{ChevronLeft-DQK-aqqz.js → ChevronLeft-ud_S8L4-.js} +1 -1
  13. package/dist/assets/{ChevronRight-BtkdX9A9.js → ChevronRight-B_-R2Sts.js} +1 -1
  14. package/dist/assets/{Clear-D0I7uWhD.js → Clear-B9P4WqAY.js} +1 -1
  15. package/dist/assets/{Close-6CxneLlA.js → Close-D_k500g1.js} +1 -1
  16. package/dist/assets/{Community-v2_SoLAO.js → Community-C1YZ_Fzm.js} +1 -1
  17. package/dist/assets/{Delete-P4B2dduO.js → Delete-CvkgpWXX.js} +1 -1
  18. package/dist/assets/{DeleteOutline-EQ9bHspP.js → DeleteOutline-C6-UDibg.js} +1 -1
  19. package/dist/assets/{Done-2EsU1aO2.js → Done-oo1eX6tp.js} +1 -1
  20. package/dist/assets/{Edit-frf3Fbx4.js → Edit-D2-hkmp_.js} +1 -1
  21. package/dist/assets/{ErrorOutline-a1DnwqoR.js → ErrorOutline-zNHQAP0N.js} +1 -1
  22. package/dist/assets/{HelpOutline-CBv7x3VM.js → HelpOutline-Dnfzivtx.js} +1 -1
  23. package/dist/assets/{Holiday-CM3JD4xm.js → Holiday-CiEfpBY3.js} +1 -1
  24. package/dist/assets/{Launch-B7fv6nTK.js → Launch-DVq2r1vu.js} +1 -1
  25. package/dist/assets/{Link-CiUEO3cQ.js → Link-CHQGWtG9.js} +1 -1
  26. package/dist/assets/{ListItemButton-ByIRcZGW.js → ListItemButton-LswuUKPc.js} +1 -1
  27. package/dist/assets/{ListSubheader-Yn3XMnVm.js → ListSubheader-Dqc3XTI_.js} +1 -1
  28. package/dist/assets/{LoadingButton-B3es9INs.js → LoadingButton-BlJTr1LL.js} +1 -1
  29. package/dist/assets/{LockIcon-C1gL9Uz4.js → LockIcon-DvcB90iN.js} +1 -1
  30. package/dist/assets/{Meeting-BkxfSXYG.js → Meeting-Bt1FEapI.js} +1 -1
  31. package/dist/assets/{MoreHoriz-3d6Yp_t-.js → MoreHoriz-CQaja3QI.js} +1 -1
  32. package/dist/assets/{MoreVert-C_Ck3fn9.js → MoreVert-Ca16Cnof.js} +1 -1
  33. package/dist/assets/{OffSick-Z9k6qoex.js → OffSick-HYKiIDQw.js} +1 -1
  34. package/dist/assets/{OpenInNew-D79h4Iot.js → OpenInNew-CysIURb4.js} +1 -1
  35. package/dist/assets/{Public-BtS6bdiD.js → Public-D4TSC2Ib.js} +1 -1
  36. package/dist/assets/{Refresh-C1kA8imS.js → Refresh-BNaUmDFT.js} +1 -1
  37. package/dist/assets/{SchemaReference.es-Dfqhb0uS.js → SchemaReference.es-GR-_9bfJ.js} +1 -1
  38. package/dist/assets/{Search-CUm1f8xo.js → Search-BqZFZ5g2.js} +1 -1
  39. package/dist/assets/{Slider-B0hY7ZYB.js → Slider-DkRYH92J.js} +1 -1
  40. package/dist/assets/{Stepper-CEe-v4P_.js → Stepper-DEgX4GTY.js} +1 -1
  41. package/dist/assets/{Switch-D3iZUzda.js → Switch-SGjalYgz.js} +1 -1
  42. package/dist/assets/{TableRow-CQ8RBtid.js → TableRow-D2EIvRB_.js} +1 -1
  43. package/dist/assets/{TableSearch-Uk9kIt7i.js → TableSearch-CAvitNOv.js} +1 -1
  44. package/dist/assets/{ToggleButtonGroup-BrZT8OFC.js → ToggleButtonGroup-BUQPuDr0.js} +1 -1
  45. package/dist/assets/{Verified-DjfvSM3n.js → Verified-CLwd2p1i.js} +1 -1
  46. package/dist/assets/{VerifiedUser-CGB9pAg5.js → VerifiedUser-BlbKkPqo.js} +1 -1
  47. package/dist/assets/{ViewColumn-CcQluqhl.js → ViewColumn-CxnzgopE.js} +1 -1
  48. package/dist/assets/{ViewList-CPkfx4gI.js → ViewList-Dq8vu1UD.js} +1 -1
  49. package/dist/assets/{WorkingRemotely-BMx519Rn.js → WorkingRemotely-C4WjSs8k.js} +1 -1
  50. package/dist/assets/{_createAggregator-Dp2y-Mf_.js → _createAggregator-C775jKSl.js} +1 -1
  51. package/dist/assets/{actions-C8ldDfDc.js → actions-CWQtNrcD.js} +1 -1
  52. package/dist/assets/{actions-CvZtuIOm.js → actions-Dq6DDwe2.js} +1 -1
  53. package/dist/assets/{agreement-4TUvZhY3.js → agreement-DCQc_rAP.js} +1 -1
  54. package/dist/assets/api-DwcaKz2E.js +1 -0
  55. package/dist/assets/{appearance-CztLZ35g.js → appearance-Bp-lCdSt.js} +1 -1
  56. package/dist/assets/ar-D9QEDjY-.js +7 -0
  57. package/dist/assets/{audit-logs-vnwtSLPp.js → audit-logs-CjK3Z08k.js} +1 -1
  58. package/dist/assets/{base-chart-tXWghrta.js → base-chart-YZwnGzYD.js} +1 -1
  59. package/dist/assets/{blocklet-SKmr21o8.js → blocklet-3SnK_ln7.js} +1 -1
  60. package/dist/assets/{brace-fold.es-C8hYDu8C.js → brace-fold.es-BNQlG2nr.js} +1 -1
  61. package/dist/assets/{chain-Cw3CxpIJ.js → chain-B90dDCGq.js} +1 -1
  62. package/dist/assets/{click-to-copy-BBcwV5Sv.js → click-to-copy-a5cMFI-_.js} +1 -1
  63. package/dist/assets/cloneDeep-BmfjF8bM.js +1 -0
  64. package/dist/assets/{closebrackets.es-n7j2YaKC.js → closebrackets.es-CXG4Cd3e.js} +1 -1
  65. package/dist/assets/{codemirror.es-q3z3D3fp.js → codemirror.es-B3B1JR3x.js} +1 -1
  66. package/dist/assets/{collapse-Cy01Qhtt.js → collapse-C2nB1Q0B.js} +1 -1
  67. package/dist/assets/{comment.es-CZaW3Zjc.js → comment.es-BzZcNo5B.js} +1 -1
  68. package/dist/assets/{config-navigation-B4iEyuxN.js → config-navigation-BN6zZFyV.js} +3 -3
  69. package/dist/assets/{connect-to-BbdcjX_x.js → connect-to-CmhbEEvA.js} +1 -1
  70. package/dist/assets/{de-Dv_ApqsF.js → de-BOa43YBF.js} +2 -2
  71. package/dist/assets/{delete-confirm-qy4uClf5.js → delete-confirm-m56IXxYG.js} +1 -1
  72. package/dist/assets/{detail-C_SIxTEY.js → detail-BlHIoIDp.js} +3 -3
  73. package/dist/assets/{dialog.es-BEBI39yG.js → dialog.es-C42Mil04.js} +1 -1
  74. package/dist/assets/{domains-Bql4UA4y.js → domains-CeBkVCNd.js} +2 -2
  75. package/dist/assets/{download-DdDp7qNF.js → download-Bh0sNo9s.js} +1 -1
  76. package/dist/assets/emotion-react.browser.esm-CorLywyT.js +1 -0
  77. package/dist/assets/es-A3ma-OJp.js +9 -0
  78. package/dist/assets/{foldgutter.es-XJVlfA9j.js → foldgutter.es-Jx2Yn3Ns.js} +1 -1
  79. package/dist/assets/fr-I3xKp6I5.js +7 -0
  80. package/dist/assets/{get-safe-url-BHhOK-87.js → get-safe-url-CXFJ7HE5.js} +1 -1
  81. package/dist/assets/{get-safe-url-ZQAisLez.js → get-safe-url-t5_KGb1I.js} +1 -1
  82. package/dist/assets/getValidReactChildren-DuVu0i0i.js +1 -0
  83. package/dist/assets/{hi-Dqbq8i5Y.js → hi-DacRhM8A.js} +1 -1
  84. package/dist/assets/{hint.es-BXYnqh_9.js → hint.es-BoFboqfs.js} +1 -1
  85. package/dist/assets/{hint.es2-mCmWTcSI.js → hint.es2-C9gyljNf.js} +1 -1
  86. package/dist/assets/{id-Bxr8o3Uo.js → id-B7LQAHL7.js} +3 -3
  87. package/dist/assets/{iframe-CVde2I2R.js → iframe-AXVHNW_k.js} +1 -1
  88. package/dist/assets/{index-DzK6OW-H.js → index-4WVfl35V.js} +1 -1
  89. package/dist/assets/{index-DzWDWvao.js → index-B-k7ViK0.js} +1 -1
  90. package/dist/assets/{index-B37Lr7Hg.js → index-B0jcX1RF.js} +1 -1
  91. package/dist/assets/{index-DzcmC4If.js → index-B2F1vMBv.js} +4 -4
  92. package/dist/assets/{index-BkStkax6.js → index-B7K9oQOc.js} +2 -2
  93. package/dist/assets/{index-DNFAdenj.js → index-BA9uj90I.js} +1 -1
  94. package/dist/assets/{index-CIeEDIRZ.js → index-BBjq0j2v.js} +1 -1
  95. package/dist/assets/{index-CEr4LN-P.js → index-BEKDshjS.js} +1 -1
  96. package/dist/assets/{index-Cm6VrPFr.js → index-BGgjrqZC.js} +1 -1
  97. package/dist/assets/{index-BUWOtFDP.js → index-BHBEV8r4.js} +1 -1
  98. package/dist/assets/{index-DTb1YjkO.js → index-BXOD69ua.js} +83 -83
  99. package/dist/assets/{index-CCGiAGPb.js → index-BY88k43C.js} +1 -1
  100. package/dist/assets/{index-CFc2cpAq.js → index-BZeeqqFX.js} +1 -1
  101. package/dist/assets/{index-uw3m84Z2.js → index-Ba15C891.js} +1 -1
  102. package/dist/assets/{index-BKpBz5IS.js → index-BbubXXOK.js} +1 -1
  103. package/dist/assets/{index-omP-_XYV.js → index-C0MwD3ew.js} +1 -1
  104. package/dist/assets/{index-BublfAf3.js → index-CEuPYhl0.js} +1 -1
  105. package/dist/assets/{index-BQOOINkR.js → index-CGpLBTuz.js} +1 -1
  106. package/dist/assets/{index-B6YLm2gY.js → index-CJTCcEXc.js} +1 -1
  107. package/dist/assets/{index-Dg-nEXIR.js → index-CTMjLXVv.js} +1 -1
  108. package/dist/assets/{index-DM5TK3mI.js → index-Ca4fyQU9.js} +1 -1
  109. package/dist/assets/{index-wKRUqEyT.js → index-Cim0AD_y.js} +2 -2
  110. package/dist/assets/{index-D3OlVE0m.js → index-CknB_y2G.js} +1 -1
  111. package/dist/assets/index-Clkrz3Dv.js +41 -0
  112. package/dist/assets/{index-C_5on_zt.js → index-CpywGtnH.js} +1 -1
  113. package/dist/assets/{index-DdAt9jDT.js → index-Cs16EI2i.js} +1 -1
  114. package/dist/assets/{index-BDHvuJA-.js → index-CwcDS29n.js} +5 -5
  115. package/dist/assets/index-D1tieyaZ.js +1 -0
  116. package/dist/assets/{index-Ds-ruyy-.js → index-DDI2W4Tb.js} +1 -1
  117. package/dist/assets/{index-ChSMfUDl.js → index-DGqCsVmc.js} +10 -10
  118. package/dist/assets/{index-DsdaIM1E.js → index-DKeeqPhh.js} +4 -4
  119. package/dist/assets/{index-CViyZjZs.js → index-DNdIaDLR.js} +1 -1
  120. package/dist/assets/{index-DVT--CtL.js → index-DQvxOUyW.js} +3 -3
  121. package/dist/assets/{index-BILcrV-b.js → index-DV2t0rB2.js} +1 -1
  122. package/dist/assets/{index-DTnnZgV3.js → index-DVVxcn_U.js} +1 -1
  123. package/dist/assets/index-DW-mbKeK.js +236 -0
  124. package/dist/assets/{index-BWpZKV7G.js → index-DXbn94TQ.js} +3 -3
  125. package/dist/assets/{index-B6gCUDLy.js → index-Dd8tfIXz.js} +1 -1
  126. package/dist/assets/{index-C562LNdR.js → index-DdwYTOhS.js} +9 -9
  127. package/dist/assets/{index-BLrsx8oH.js → index-DfVhmhNU.js} +1 -1
  128. package/dist/assets/{index-DnLtwT4P.js → index-Dhx2XMvi.js} +1 -1
  129. package/dist/assets/{index-CPBAco4X.js → index-MCMqKG1X.js} +1 -1
  130. package/dist/assets/{index-ooFvSbXR.js → index-NOETvacG.js} +1 -1
  131. package/dist/assets/{index-DRvnuna9.js → index-Vj6hcvqX.js} +1 -1
  132. package/dist/assets/{index-CyCivdc5.js → index-VoBTA_fx.js} +1 -1
  133. package/dist/assets/{index-CZplOWEN.js → index-gYWDzVZB.js} +1 -1
  134. package/dist/assets/{index-C-QDjEC-.js → index-kMvGy1BT.js} +1 -1
  135. package/dist/assets/{index.esm-CB-7UGfI.js → index.esm-S1RHFvfU.js} +1 -1
  136. package/dist/assets/{info-addon.es-DKtNhOCh.js → info-addon.es-BrPERxwM.js} +1 -1
  137. package/dist/assets/{info.es-B7YFO8O9.js → info.es-BG627Djn.js} +1 -1
  138. package/dist/assets/{install-from-url-B9F0r0Uk.js → install-from-url-Kt3o4LBx.js} +1 -1
  139. package/dist/assets/{invitation-BAovnHWT.js → invitation-w4SAH9iP.js} +1 -1
  140. package/dist/assets/is-path-prefix-equal-B5zOew9j.js +1 -0
  141. package/dist/assets/item-B-caRYba.js +277 -0
  142. package/dist/assets/{ja-CJfcqkdo.js → ja-DRQ4Eecl.js} +3 -1
  143. package/dist/assets/{javascript.es-e4wfmIpw.js → javascript.es-BEqQG-X0.js} +1 -1
  144. package/dist/assets/{jump-to-line.es-D1zAOCng.js → jump-to-line.es-K-qNaz4d.js} +1 -1
  145. package/dist/assets/{jump.es-CR1apnMt.js → jump.es-TG1mfYt_.js} +1 -1
  146. package/dist/assets/{ko-BxAazRix.js → ko-CzL3UzwL.js} +3 -1
  147. package/dist/assets/{lint.es-po0cvpDF.js → lint.es-CXlTl58k.js} +1 -1
  148. package/dist/assets/{lint.es2-CIRlGKEU.js → lint.es2-6L_OlSQy.js} +1 -1
  149. package/dist/assets/{lint.es3-CC5QXby4.js → lint.es3-D-7-u1za.js} +1 -1
  150. package/dist/assets/{list-header-D5Klosqn.js → list-header-B8ysM0r4.js} +1 -1
  151. package/dist/assets/{log-DvWjHRjx.js → log-0actLjpa.js} +1 -1
  152. package/dist/assets/{lottie-react.esm-CzS4D97g.js → lottie-react.esm-PsK3z7dD.js} +1 -1
  153. package/dist/assets/{matchbrackets.es-Bh__cUPA.js → matchbrackets.es-DvOANBOF.js} +1 -1
  154. package/dist/assets/{memory-VuyFpRX6.js → memory-Dk-Khjf8.js} +1 -1
  155. package/dist/assets/{metric-sJIuzFdD.js → metric-7dzLcQP8.js} +1 -1
  156. package/dist/assets/{mode.es-b4PvmWPj.js → mode.es-BCPKj5xj.js} +1 -1
  157. package/dist/assets/{mode.es2-B8UlLCtX.js → mode.es2-DcHabWZq.js} +1 -1
  158. package/dist/assets/{mode.es3-CQ9X5NiW.js → mode.es3-DepgrqKR.js} +1 -1
  159. package/dist/assets/omit-BIY56Vm3.js +1 -0
  160. package/dist/assets/{onlineParser.es-mNPHWPcl.js → onlineParser.es-F2aU-24r.js} +1 -1
  161. package/dist/assets/{overview-DptGQrLC.js → overview-D99x1C_L.js} +1 -1
  162. package/dist/assets/{permission-DtbkcHFU.js → permission-BwU5vqVv.js} +1 -1
  163. package/dist/assets/{preference-BIxg48qT.js → preference-B-a8y1-u.js} +3 -3
  164. package/dist/assets/{pt-FpFCyI6v.js → pt-CHKumXYv.js} +3 -3
  165. package/dist/assets/{raf-schd.esm-CyR0PsG3.js → raf-schd.esm-CfDeV_Tv.js} +1 -1
  166. package/dist/assets/refType-RuhvdYnQ.js +1 -0
  167. package/dist/assets/{resource-dialog-DSlsEDCi.js → resource-dialog-B3xpsyIT.js} +5 -5
  168. package/dist/assets/{ru-BuGIFp9h.js → ru-CvkEKhgU.js} +1 -1
  169. package/dist/assets/{runtime-BqyrQzUD.js → runtime-C94CoEdP.js} +1 -1
  170. package/dist/assets/{schema-BD6PrmCO.js → schema-D29PP22L.js} +1 -1
  171. package/dist/assets/sdk-CJFYaDBM.js +1 -0
  172. package/dist/assets/{search.es-BjwGHA7G.js → search.es-Dtiay1-p.js} +1 -1
  173. package/dist/assets/{searchcursor.es-CbJCToER.js → searchcursor.es-B5hHQBpu.js} +1 -1
  174. package/dist/assets/{service-BV2uNns2.js → service-Dwje1JT3.js} +1 -1
  175. package/dist/assets/{shorten-label-BOckTQ1X.js → shorten-label-C3V2RyR1.js} +1 -1
  176. package/dist/assets/{show-hint.es-q9IMwctI.js → show-hint.es-IwvOaNo4.js} +1 -1
  177. package/dist/assets/{simple-select-Dtd0a5G_.js → simple-select-C-hoC-G2.js} +1 -1
  178. package/dist/assets/{spaces-Bqb0c1IC.js → spaces-BqxfgJ6Q.js} +1 -1
  179. package/dist/assets/{status-CoaEXqC8.js → status-YpqmLpg4.js} +1 -1
  180. package/dist/assets/{status-DAsfcIss.js → status-uT90przA.js} +1 -1
  181. package/dist/assets/{sublime.es-Di_Rzzft.js → sublime.es-D6Ae2P0m.js} +1 -1
  182. package/dist/assets/{switch-control-uwHD90eP.js → switch-control-6V55bVbg.js} +1 -1
  183. package/dist/assets/{table-icons-CMF2B4vQ.js → table-icons-DA0sv0Eq.js} +1 -1
  184. package/dist/assets/{team-DbBAK1Lw.js → team-CKufRu0w.js} +1 -1
  185. package/dist/assets/{th-BafLD2wR.js → th-B2BUfjNJ.js} +1 -1
  186. package/dist/assets/{toLower-Bk4Y66nU.js → toLower-J0GcLV1u.js} +1 -1
  187. package/dist/assets/toUpper-CkfbCBIC.js +1 -0
  188. package/dist/assets/{traffic-C8Jrp6CL.js → traffic-D56Ew432.js} +1 -1
  189. package/dist/assets/{url-evaluation-DQ262LSg.js → url-evaluation-D9TCPMS4.js} +1 -1
  190. package/dist/assets/{url-join-IGglLOtK.js → url-join-C88wtrgy.js} +1 -1
  191. package/dist/assets/{use-mobile-YvhVWxe8.js → use-mobile-5Zh9Oud5.js} +1 -1
  192. package/dist/assets/{use-mobile-BoYyduuc.js → use-mobile-C9rByBew.js} +1 -1
  193. package/dist/assets/{useAsync-DbB0tJq1.js → useAsync-DPy_pDJm.js} +1 -1
  194. package/dist/assets/{useAsyncRetry-BLg3v7lI.js → useAsyncRetry-oFyp9pPD.js} +1 -1
  195. package/dist/assets/{useLocalStorage-DQZ59j66.js → useLocalStorage-osYXE-mL.js} +1 -1
  196. package/dist/assets/{useThemeProps-CtXzBlYo.js → useThemeProps-C_6zzxTC.js} +1 -1
  197. package/dist/assets/{util-CUC0Xf5B.js → util-MD5zwT5R.js} +1 -1
  198. package/dist/assets/{vi-BMZxxaJ2.js → vi-BykmwIAT.js} +3 -3
  199. package/dist/assets/{wait-container-GoGxY2Kf.js → wait-container-BbGRQLG4.js} +1 -1
  200. package/dist/assets/{withStyles-_FcG1bkA.js → withStyles-DL-NFbaE.js} +1 -1
  201. package/dist/assets/wrap-locale-BRogPOgW.js +1 -0
  202. package/dist/assets/{zh-DusA4qAT.js → zh-CbCaOuAd.js} +3 -1
  203. package/dist/assets/{zh-tw-BO-QhSNP.js → zh-tw-C9JfiCVV.js} +3 -1
  204. package/dist/index.html +1 -1
  205. package/dist/service-worker.js +1 -1
  206. package/package.json +1 -1
  207. package/dist/assets/api-gAVz4YtD.js +0 -1
  208. package/dist/assets/ar-0ZkmCCuq.js +0 -7
  209. package/dist/assets/cloneDeep-CP0xacDT.js +0 -1
  210. package/dist/assets/emotion-react.browser.esm--gIypTeg.js +0 -1
  211. package/dist/assets/es-D_uF0siv.js +0 -7
  212. package/dist/assets/fr-DVFSQfDp.js +0 -7
  213. package/dist/assets/getValidReactChildren-B-b9MOMT.js +0 -1
  214. package/dist/assets/index-Boprg64p.js +0 -236
  215. package/dist/assets/index-DrBxStif.js +0 -41
  216. package/dist/assets/index-s1CQJTjJ.js +0 -1
  217. package/dist/assets/is-path-prefix-equal-C80Jhu_q.js +0 -1
  218. package/dist/assets/item-CrnjScjy.js +0 -277
  219. package/dist/assets/omit-BEDWXxvr.js +0 -1
  220. package/dist/assets/refType-J5vgZzDX.js +0 -1
  221. package/dist/assets/sdk-gxKU3x6m.js +0 -1
  222. package/dist/assets/toUpper-FI4Si1KF.js +0 -1
  223. package/dist/assets/wrap-locale-B35eVgy7.js +0 -1
@@ -1 +1 @@
1
- import{i4 as z}from"./index-DTb1YjkO.js";function w(a){if(a===null||a===!0||a===!1)return NaN;var e=Number(a);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function s(a,e){if(e.length<a)throw new TypeError(a+" argument"+(a>1?"s":"")+" required, but only "+e.length+" present")}function f(a){s(1,arguments);var e=Object.prototype.toString.call(a);return a instanceof Date||z(a)==="object"&&e==="[object Date]"?new Date(a.getTime()):typeof a=="number"||e==="[object Number]"?new Date(a):((typeof a=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function se(a,e){s(2,arguments);var t=f(a),r=w(e);return isNaN(r)?new Date(NaN):(r&&t.setDate(t.getDate()+r),t)}function de(a,e){s(2,arguments);var t=f(a),r=w(e);if(isNaN(r))return new Date(NaN);if(!r)return t;var n=t.getDate(),i=new Date(t.getTime());i.setMonth(t.getMonth()+r+1,0);var o=i.getDate();return n>=o?i:(t.setFullYear(i.getFullYear(),i.getMonth(),n),t)}function le(a,e){s(2,arguments);var t=f(a).getTime(),r=w(e);return new Date(t+r)}var fe={};function C(){return fe}function Et(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getDay(),y=(g<c?7:0)+g-c;return h.setDate(h.getDate()-y),h.setHours(0,0,0,0),h}function ce(a){var e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return e.setUTCFullYear(a.getFullYear()),a.getTime()-e.getTime()}function X(a){s(1,arguments);var e=f(a);return e.setHours(0,0,0,0),e}function Ft(a,e){s(2,arguments);var t=w(e),r=t*7;return se(a,r)}function $t(a,e){s(2,arguments);var t=w(e);return de(a,t*12)}var J=6e4,Z=36e5,It=1e3;function Ht(a,e){s(2,arguments);var t=X(a),r=X(e);return t.getTime()===r.getTime()}function ve(a){return s(1,arguments),a instanceof Date||z(a)==="object"&&Object.prototype.toString.call(a)==="[object Date]"}function me(a){if(s(1,arguments),!ve(a)&&typeof a!="number")return!1;var e=f(a);return!isNaN(Number(e))}function qt(a,e){s(2,arguments);var t=f(a),r=f(e),n=t.getFullYear()-r.getFullYear(),i=t.getMonth()-r.getMonth();return n*12+i}function Rt(a){s(1,arguments);var e=f(a),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function Lt(a){s(1,arguments);var e=f(a);return e.setDate(1),e.setHours(0,0,0,0),e}function jt(a){s(1,arguments);var e=f(a),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e}function Qt(a){s(1,arguments);var e=f(a),t=new Date(0);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Xt(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getDay(),y=(g<c?-7:0)+6-(g-c);return h.setDate(h.getDate()+y),h.setHours(23,59,59,999),h}function he(a,e){s(2,arguments);var t=w(e);return le(a,-t)}var ge=864e5;function we(a){s(1,arguments);var e=f(a),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),n=t-r;return Math.floor(n/ge)+1}function F(a){s(1,arguments);var e=1,t=f(a),r=t.getUTCDay(),n=(r<e?7:0)+r-e;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function K(a){s(1,arguments);var e=f(a),t=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var n=F(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var o=F(i);return e.getTime()>=n.getTime()?t+1:e.getTime()>=o.getTime()?t:t-1}function ye(a){s(1,arguments);var e=K(a),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var r=F(t);return r}var be=6048e5;function Te(a){s(1,arguments);var e=f(a),t=F(e).getTime()-ye(e).getTime();return Math.round(t/be)+1}function $(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getUTCDay(),y=(g<c?7:0)+g-c;return h.setUTCDate(h.getUTCDate()-y),h.setUTCHours(0,0,0,0),h}function ee(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=f(a),c=v.getUTCFullYear(),h=C(),g=w((t=(r=(n=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:h.firstWeekContainsDate)!==null&&r!==void 0?r:(l=h.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(c+1,0,g),y.setUTCHours(0,0,0,0);var S=$(y,e),p=new Date(0);p.setUTCFullYear(c,0,g),p.setUTCHours(0,0,0,0);var k=$(p,e);return v.getTime()>=S.getTime()?c+1:v.getTime()>=k.getTime()?c:c-1}function De(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:v.firstWeekContainsDate)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=ee(a,e),g=new Date(0);g.setUTCFullYear(h,0,c),g.setUTCHours(0,0,0,0);var y=$(g,e);return y}var pe=6048e5;function Oe(a,e){s(1,arguments);var t=f(a),r=$(t,e).getTime()-De(t,e).getTime();return Math.round(r/pe)+1}function m(a,e){for(var t=a<0?"-":"",r=Math.abs(a).toString();r.length<e;)r="0"+r;return t+r}var D={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return m(t==="yy"?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return t==="M"?String(r+1):m(r+1,2)},d:function(e,t){return m(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,t){return m(e.getUTCHours()%12||12,t.length)},H:function(e,t){return m(e.getUTCHours(),t.length)},m:function(e,t){return m(e.getUTCMinutes(),t.length)},s:function(e,t){return m(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds(),i=Math.floor(n*Math.pow(10,r-3));return m(i,t.length)}},M={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Me={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){var n=e.getUTCFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return D.y(e,t)},Y:function(e,t,r,n){var i=ee(e,n),o=i>0?i:1-i;if(t==="YY"){var u=o%100;return m(u,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):m(o,t.length)},R:function(e,t){var r=K(e);return m(r,t.length)},u:function(e,t){var r=e.getUTCFullYear();return m(r,t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return m(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return m(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return D.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return m(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var i=Oe(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):m(i,t.length)},I:function(e,t,r){var n=Te(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):m(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):D.d(e,t)},D:function(e,t,r){var n=we(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):m(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return m(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return m(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return m(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours(),i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n=e.getUTCHours(),i;switch(n===12?i=M.noon:n===0?i=M.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n=e.getUTCHours(),i;switch(n>=17?i=M.evening:n>=12?i=M.afternoon:n>=4?i=M.morning:i=M.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){var n=e.getUTCHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return D.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):D.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):D.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):D.s(e,t)},S:function(e,t){return D.S(e,t)},X:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return A(o);case"XXXX":case"XX":return O(o);case"XXXXX":case"XXX":default:return O(o,":")}},x:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return A(o);case"xxxx":case"xx":return O(o);case"xxxxx":case"xxx":default:return O(o,":")}},O:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+G(o,":");case"OOOO":default:return"GMT"+O(o,":")}},z:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+G(o,":");case"zzzz":default:return"GMT"+O(o,":")}},t:function(e,t,r,n){var i=n._originalDate||e,o=Math.floor(i.getTime()/1e3);return m(o,t.length)},T:function(e,t,r,n){var i=n._originalDate||e,o=i.getTime();return m(o,t.length)}};function G(a,e){var t=a>0?"-":"+",r=Math.abs(a),n=Math.floor(r/60),i=r%60;if(i===0)return t+String(n);var o=e;return t+String(n)+o+m(i,2)}function A(a,e){if(a%60===0){var t=a>0?"-":"+";return t+m(Math.abs(a)/60,2)}return O(a,e)}function O(a,e){var t=e||"",r=a>0?"-":"+",n=Math.abs(a),i=m(Math.floor(n/60),2),o=m(n%60,2);return r+i+t+o}var B=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},te=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ce=function(e,t){var r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return B(e,t);var o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",B(n,t)).replace("{{time}}",te(i,t))},Se={p:te,P:Ce},ke=["D","DD"],Pe=["YY","YYYY"];function Ye(a){return ke.indexOf(a)!==-1}function We(a){return Pe.indexOf(a)!==-1}function V(a,e,t){if(a==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var _e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xe=function(e,t,r){var n,i=_e[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function j(a){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):a.defaultWidth,r=a.formats[t]||a.formats[a.defaultWidth];return r}}var Ne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ue={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ee={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fe={date:j({formats:Ne,defaultWidth:"full"}),time:j({formats:Ue,defaultWidth:"full"}),dateTime:j({formats:Ee,defaultWidth:"full"})},$e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ie=function(e,t,r,n){return $e[e]};function W(a){return function(e,t){var r=t!=null&&t.context?String(t.context):"standalone",n;if(r==="formatting"&&a.formattingValues){var i=a.defaultFormattingWidth||a.defaultWidth,o=t!=null&&t.width?String(t.width):i;n=a.formattingValues[o]||a.formattingValues[i]}else{var u=a.defaultWidth,l=t!=null&&t.width?String(t.width):a.defaultWidth;n=a.values[l]||a.values[u]}var d=a.argumentCallback?a.argumentCallback(e):e;return n[d]}}var He={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Re={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Le={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},je={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Qe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xe=function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ge={ordinalNumber:Xe,era:W({values:He,defaultWidth:"wide"}),quarter:W({values:qe,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:W({values:Re,defaultWidth:"wide"}),day:W({values:Le,defaultWidth:"wide"}),dayPeriod:W({values:je,defaultWidth:"wide",formattingValues:Qe,defaultFormattingWidth:"wide"})};function _(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,n=r&&a.matchPatterns[r]||a.matchPatterns[a.defaultMatchWidth],i=e.match(n);if(!i)return null;var o=i[0],u=r&&a.parsePatterns[r]||a.parsePatterns[a.defaultParseWidth],l=Array.isArray(u)?Be(u,function(c){return c.test(o)}):Ae(u,function(c){return c.test(o)}),d;d=a.valueCallback?a.valueCallback(l):l,d=t.valueCallback?t.valueCallback(d):d;var v=e.slice(o.length);return{value:d,rest:v}}}function Ae(a,e){for(var t in a)if(a.hasOwnProperty(t)&&e(a[t]))return t}function Be(a,e){for(var t=0;t<a.length;t++)if(e(a[t]))return t}function Ve(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(a.matchPattern);if(!r)return null;var n=r[0],i=e.match(a.parsePattern);if(!i)return null;var o=a.valueCallback?a.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;var u=e.slice(n.length);return{value:o,rest:u}}}var ze=/^(\d+)(th|st|nd|rd)?/i,Je=/\d+/i,Ze={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ke={any:[/^b/i,/^(a|c)/i]},et={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tt={any:[/1/i,/2/i,/3/i,/4/i]},at={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},it={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ot={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ut={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},st={ordinalNumber:Ve({matchPattern:ze,parsePattern:Je,valueCallback:function(e){return parseInt(e,10)}}),era:_({matchPatterns:Ze,defaultMatchWidth:"wide",parsePatterns:Ke,defaultParseWidth:"any"}),quarter:_({matchPatterns:et,defaultMatchWidth:"wide",parsePatterns:tt,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:_({matchPatterns:at,defaultMatchWidth:"wide",parsePatterns:rt,defaultParseWidth:"any"}),day:_({matchPatterns:nt,defaultMatchWidth:"wide",parsePatterns:it,defaultParseWidth:"any"}),dayPeriod:_({matchPatterns:ot,defaultMatchWidth:"any",parsePatterns:ut,defaultParseWidth:"any"})},dt={code:"en-US",formatDistance:xe,formatLong:Fe,formatRelative:Ie,localize:Ge,match:st,options:{weekStartsOn:0,firstWeekContainsDate:1}},lt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ft=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ct=/^'([^]*?)'?$/,vt=/''/g,mt=/[a-zA-Z]/;function ht(a,e,t){var r,n,i,o,u,l,d,v,c,h,g,y,S,p,k,I,H,q;s(2,arguments);var re=String(e),P=C(),Y=(r=(n=t==null?void 0:t.locale)!==null&&n!==void 0?n:P.locale)!==null&&r!==void 0?r:dt,R=w((i=(o=(u=(l=t==null?void 0:t.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(d=t.locale)===null||d===void 0||(v=d.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&u!==void 0?u:P.firstWeekContainsDate)!==null&&o!==void 0?o:(c=P.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var L=w((g=(y=(S=(p=t==null?void 0:t.weekStartsOn)!==null&&p!==void 0?p:t==null||(k=t.locale)===null||k===void 0||(I=k.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&S!==void 0?S:P.weekStartsOn)!==null&&y!==void 0?y:(H=P.locale)===null||H===void 0||(q=H.options)===null||q===void 0?void 0:q.weekStartsOn)!==null&&g!==void 0?g:0);if(!(L>=0&&L<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Y.localize)throw new RangeError("locale must contain localize property");if(!Y.formatLong)throw new RangeError("locale must contain formatLong property");var N=f(a);if(!me(N))throw new RangeError("Invalid time value");var ne=ce(N),ie=he(N,ne),oe={firstWeekContainsDate:R,weekStartsOn:L,locale:Y,_originalDate:N},ue=re.match(ft).map(function(b){var T=b[0];if(T==="p"||T==="P"){var U=Se[T];return U(b,Y.formatLong)}return b}).join("").match(lt).map(function(b){if(b==="''")return"'";var T=b[0];if(T==="'")return gt(b);var U=Me[T];if(U)return!(t!=null&&t.useAdditionalWeekYearTokens)&&We(b)&&V(b,e,String(a)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Ye(b)&&V(b,e,String(a)),U(ie,b,Y.localize,oe);if(T.match(mt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return b}).join("");return ue}function gt(a){var e=a.match(ct);return e?e[1].replace(vt,"'"):a}const Gt=Object.freeze(Object.defineProperty({__proto__:null,default:ht},Symbol.toStringTag,{value:"Module"}));function At(a){s(1,arguments);var e=f(a),t=e.getDate();return t}function wt(a){s(1,arguments);var e=f(a),t=e.getFullYear(),r=e.getMonth(),n=new Date(0);return n.setFullYear(t,r+1,0),n.setHours(0,0,0,0),n.getDate()}function Bt(a){s(1,arguments);var e=f(a),t=e.getMonth();return t}function Vt(a){return s(1,arguments),f(a).getFullYear()}function zt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getTime()>r.getTime()}function Jt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getTime()<r.getTime()}function Zt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()}function Kt(a,e){s(2,arguments);var t=f(a).getTime(),r=f(e.start).getTime(),n=f(e.end).getTime();if(!(r<=n))throw new RangeError("Invalid interval");return t>=r&&t<=n}function yt(a,e){var t;s(1,arguments);var r=w((t=e==null?void 0:e.additionalDigits)!==null&&t!==void 0?t:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof a=="string"||Object.prototype.toString.call(a)==="[object String]"))return new Date(NaN);var n=pt(a),i;if(n.date){var o=Ot(n.date,r);i=Mt(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var u=i.getTime(),l=0,d;if(n.time&&(l=Ct(n.time),isNaN(l)))return new Date(NaN);if(n.timezone){if(d=St(n.timezone),isNaN(d))return new Date(NaN)}else{var v=new Date(u+l),c=new Date(0);return c.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),c.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),c}return new Date(u+l+d)}var E={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},bt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Tt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Dt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function pt(a){var e={},t=a.split(E.dateTimeDelimiter),r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],E.timeZoneDelimiter.test(e.date)&&(e.date=a.split(E.timeZoneDelimiter)[0],r=a.substr(e.date.length,a.length))),r){var n=E.timezone.exec(r);n?(e.time=r.replace(n[1],""),e.timezone=n[1]):e.time=r}return e}function Ot(a,e){var t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=a.match(t);if(!r)return{year:NaN,restDateString:""};var n=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?n:i*100,restDateString:a.slice((r[1]||r[2]).length)}}function Mt(a,e){if(e===null)return new Date(NaN);var t=a.match(bt);if(!t)return new Date(NaN);var r=!!t[4],n=x(t[1]),i=x(t[2])-1,o=x(t[3]),u=x(t[4]),l=x(t[5])-1;if(r)return _t(e,u,l)?kt(e,u,l):new Date(NaN);var d=new Date(0);return!Yt(e,i,o)||!Wt(e,n)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(n,o)),d)}function x(a){return a?parseInt(a):1}function Ct(a){var e=a.match(Tt);if(!e)return NaN;var t=Q(e[1]),r=Q(e[2]),n=Q(e[3]);return xt(t,r,n)?t*Z+r*J+n*1e3:NaN}function Q(a){return a&&parseFloat(a.replace(",","."))||0}function St(a){if(a==="Z")return 0;var e=a.match(Dt);if(!e)return 0;var t=e[1]==="+"?-1:1,r=parseInt(e[2]),n=e[3]&&parseInt(e[3])||0;return Nt(r,n)?t*(r*Z+n*J):NaN}function kt(a,e,t){var r=new Date(0);r.setUTCFullYear(a,0,4);var n=r.getUTCDay()||7,i=(e-1)*7+t+1-n;return r.setUTCDate(r.getUTCDate()+i),r}var Pt=[31,null,31,30,31,30,31,31,30,31,30,31];function ae(a){return a%400===0||a%4===0&&a%100!==0}function Yt(a,e,t){return e>=0&&e<=11&&t>=1&&t<=(Pt[e]||(ae(a)?29:28))}function Wt(a,e){return e>=1&&e<=(ae(a)?366:365)}function _t(a,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function xt(a,e,t){return a===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&a>=0&&a<25}function Nt(a,e){return e>=0&&e<=59}const ea=Object.freeze(Object.defineProperty({__proto__:null,default:yt},Symbol.toStringTag,{value:"Module"}));function ta(a,e){s(2,arguments);var t=f(a),r=w(e),n=t.getFullYear(),i=t.getDate(),o=new Date(0);o.setFullYear(n,r,15),o.setHours(0,0,0,0);var u=wt(o);return t.setMonth(r,Math.min(i,u)),t}function aa(a,e){s(2,arguments);var t=f(a),r=w(e);return isNaN(t.getTime())?new Date(NaN):(t.setFullYear(r),t)}export{le as A,w as B,X as C,ce as D,Z as E,J as F,m as G,It as H,ee as I,$ as J,F as K,Oe as L,Te as M,C as N,dt as O,Se as P,We as Q,V as R,Ye as S,he as T,wt as U,ea as V,Gt as W,$t as a,de as b,me as c,Zt as d,se as e,Xt as f,Ft as g,Lt as h,Ht as i,Rt as j,Qt as k,jt as l,qt as m,ht as n,Jt as o,yt as p,zt as q,s as r,Et as s,f as t,Kt as u,At as v,Bt as w,Vt as x,ta as y,aa as z};
1
+ import{i5 as z}from"./index-BXOD69ua.js";function w(a){if(a===null||a===!0||a===!1)return NaN;var e=Number(a);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function s(a,e){if(e.length<a)throw new TypeError(a+" argument"+(a>1?"s":"")+" required, but only "+e.length+" present")}function f(a){s(1,arguments);var e=Object.prototype.toString.call(a);return a instanceof Date||z(a)==="object"&&e==="[object Date]"?new Date(a.getTime()):typeof a=="number"||e==="[object Number]"?new Date(a):((typeof a=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function se(a,e){s(2,arguments);var t=f(a),r=w(e);return isNaN(r)?new Date(NaN):(r&&t.setDate(t.getDate()+r),t)}function de(a,e){s(2,arguments);var t=f(a),r=w(e);if(isNaN(r))return new Date(NaN);if(!r)return t;var n=t.getDate(),i=new Date(t.getTime());i.setMonth(t.getMonth()+r+1,0);var o=i.getDate();return n>=o?i:(t.setFullYear(i.getFullYear(),i.getMonth(),n),t)}function le(a,e){s(2,arguments);var t=f(a).getTime(),r=w(e);return new Date(t+r)}var fe={};function C(){return fe}function Et(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getDay(),y=(g<c?7:0)+g-c;return h.setDate(h.getDate()-y),h.setHours(0,0,0,0),h}function ce(a){var e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return e.setUTCFullYear(a.getFullYear()),a.getTime()-e.getTime()}function X(a){s(1,arguments);var e=f(a);return e.setHours(0,0,0,0),e}function Ft(a,e){s(2,arguments);var t=w(e),r=t*7;return se(a,r)}function $t(a,e){s(2,arguments);var t=w(e);return de(a,t*12)}var J=6e4,Z=36e5,It=1e3;function Ht(a,e){s(2,arguments);var t=X(a),r=X(e);return t.getTime()===r.getTime()}function ve(a){return s(1,arguments),a instanceof Date||z(a)==="object"&&Object.prototype.toString.call(a)==="[object Date]"}function me(a){if(s(1,arguments),!ve(a)&&typeof a!="number")return!1;var e=f(a);return!isNaN(Number(e))}function qt(a,e){s(2,arguments);var t=f(a),r=f(e),n=t.getFullYear()-r.getFullYear(),i=t.getMonth()-r.getMonth();return n*12+i}function Rt(a){s(1,arguments);var e=f(a),t=e.getMonth();return e.setFullYear(e.getFullYear(),t+1,0),e.setHours(23,59,59,999),e}function Lt(a){s(1,arguments);var e=f(a);return e.setDate(1),e.setHours(0,0,0,0),e}function jt(a){s(1,arguments);var e=f(a),t=e.getFullYear();return e.setFullYear(t+1,0,0),e.setHours(23,59,59,999),e}function Qt(a){s(1,arguments);var e=f(a),t=new Date(0);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}function Xt(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getDay(),y=(g<c?-7:0)+6-(g-c);return h.setDate(h.getDate()+y),h.setHours(23,59,59,999),h}function he(a,e){s(2,arguments);var t=w(e);return le(a,-t)}var ge=864e5;function we(a){s(1,arguments);var e=f(a),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),n=t-r;return Math.floor(n/ge)+1}function F(a){s(1,arguments);var e=1,t=f(a),r=t.getUTCDay(),n=(r<e?7:0)+r-e;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function K(a){s(1,arguments);var e=f(a),t=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var n=F(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var o=F(i);return e.getTime()>=n.getTime()?t+1:e.getTime()>=o.getTime()?t:t-1}function ye(a){s(1,arguments);var e=K(a),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var r=F(t);return r}var be=6048e5;function Te(a){s(1,arguments);var e=f(a),t=F(e).getTime()-ye(e).getTime();return Math.round(t/be)+1}function $(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&n!==void 0?n:v.weekStartsOn)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=f(a),g=h.getUTCDay(),y=(g<c?7:0)+g-c;return h.setUTCDate(h.getUTCDate()-y),h.setUTCHours(0,0,0,0),h}function ee(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=f(a),c=v.getUTCFullYear(),h=C(),g=w((t=(r=(n=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:h.firstWeekContainsDate)!==null&&r!==void 0?r:(l=h.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(c+1,0,g),y.setUTCHours(0,0,0,0);var S=$(y,e),p=new Date(0);p.setUTCFullYear(c,0,g),p.setUTCHours(0,0,0,0);var k=$(p,e);return v.getTime()>=S.getTime()?c+1:v.getTime()>=k.getTime()?c:c-1}function De(a,e){var t,r,n,i,o,u,l,d;s(1,arguments);var v=C(),c=w((t=(r=(n=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(u=o.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&n!==void 0?n:v.firstWeekContainsDate)!==null&&r!==void 0?r:(l=v.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),h=ee(a,e),g=new Date(0);g.setUTCFullYear(h,0,c),g.setUTCHours(0,0,0,0);var y=$(g,e);return y}var pe=6048e5;function Oe(a,e){s(1,arguments);var t=f(a),r=$(t,e).getTime()-De(t,e).getTime();return Math.round(r/pe)+1}function m(a,e){for(var t=a<0?"-":"",r=Math.abs(a).toString();r.length<e;)r="0"+r;return t+r}var D={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return m(t==="yy"?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return t==="M"?String(r+1):m(r+1,2)},d:function(e,t){return m(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,t){return m(e.getUTCHours()%12||12,t.length)},H:function(e,t){return m(e.getUTCHours(),t.length)},m:function(e,t){return m(e.getUTCMinutes(),t.length)},s:function(e,t){return m(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds(),i=Math.floor(n*Math.pow(10,r-3));return m(i,t.length)}},M={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Me={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){var n=e.getUTCFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return D.y(e,t)},Y:function(e,t,r,n){var i=ee(e,n),o=i>0?i:1-i;if(t==="YY"){var u=o%100;return m(u,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):m(o,t.length)},R:function(e,t){var r=K(e);return m(r,t.length)},u:function(e,t){var r=e.getUTCFullYear();return m(r,t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return m(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return m(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return D.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return m(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var i=Oe(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):m(i,t.length)},I:function(e,t,r){var n=Te(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):m(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):D.d(e,t)},D:function(e,t,r){var n=we(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):m(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return m(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return m(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return m(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours(),i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n=e.getUTCHours(),i;switch(n===12?i=M.noon:n===0?i=M.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n=e.getUTCHours(),i;switch(n>=17?i=M.evening:n>=12?i=M.afternoon:n>=4?i=M.morning:i=M.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){var n=e.getUTCHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return D.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):D.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):D.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):D.s(e,t)},S:function(e,t){return D.S(e,t)},X:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return A(o);case"XXXX":case"XX":return O(o);case"XXXXX":case"XXX":default:return O(o,":")}},x:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return A(o);case"xxxx":case"xx":return O(o);case"xxxxx":case"xxx":default:return O(o,":")}},O:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+G(o,":");case"OOOO":default:return"GMT"+O(o,":")}},z:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+G(o,":");case"zzzz":default:return"GMT"+O(o,":")}},t:function(e,t,r,n){var i=n._originalDate||e,o=Math.floor(i.getTime()/1e3);return m(o,t.length)},T:function(e,t,r,n){var i=n._originalDate||e,o=i.getTime();return m(o,t.length)}};function G(a,e){var t=a>0?"-":"+",r=Math.abs(a),n=Math.floor(r/60),i=r%60;if(i===0)return t+String(n);var o=e;return t+String(n)+o+m(i,2)}function A(a,e){if(a%60===0){var t=a>0?"-":"+";return t+m(Math.abs(a)/60,2)}return O(a,e)}function O(a,e){var t=e||"",r=a>0?"-":"+",n=Math.abs(a),i=m(Math.floor(n/60),2),o=m(n%60,2);return r+i+t+o}var B=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},te=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ce=function(e,t){var r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return B(e,t);var o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",B(n,t)).replace("{{time}}",te(i,t))},Se={p:te,P:Ce},ke=["D","DD"],Pe=["YY","YYYY"];function Ye(a){return ke.indexOf(a)!==-1}function We(a){return Pe.indexOf(a)!==-1}function V(a,e,t){if(a==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var _e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},xe=function(e,t,r){var n,i=_e[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function j(a){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):a.defaultWidth,r=a.formats[t]||a.formats[a.defaultWidth];return r}}var Ne={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ue={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ee={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fe={date:j({formats:Ne,defaultWidth:"full"}),time:j({formats:Ue,defaultWidth:"full"}),dateTime:j({formats:Ee,defaultWidth:"full"})},$e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ie=function(e,t,r,n){return $e[e]};function W(a){return function(e,t){var r=t!=null&&t.context?String(t.context):"standalone",n;if(r==="formatting"&&a.formattingValues){var i=a.defaultFormattingWidth||a.defaultWidth,o=t!=null&&t.width?String(t.width):i;n=a.formattingValues[o]||a.formattingValues[i]}else{var u=a.defaultWidth,l=t!=null&&t.width?String(t.width):a.defaultWidth;n=a.values[l]||a.values[u]}var d=a.argumentCallback?a.argumentCallback(e):e;return n[d]}}var He={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},qe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Re={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Le={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},je={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Qe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xe=function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},Ge={ordinalNumber:Xe,era:W({values:He,defaultWidth:"wide"}),quarter:W({values:qe,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:W({values:Re,defaultWidth:"wide"}),day:W({values:Le,defaultWidth:"wide"}),dayPeriod:W({values:je,defaultWidth:"wide",formattingValues:Qe,defaultFormattingWidth:"wide"})};function _(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,n=r&&a.matchPatterns[r]||a.matchPatterns[a.defaultMatchWidth],i=e.match(n);if(!i)return null;var o=i[0],u=r&&a.parsePatterns[r]||a.parsePatterns[a.defaultParseWidth],l=Array.isArray(u)?Be(u,function(c){return c.test(o)}):Ae(u,function(c){return c.test(o)}),d;d=a.valueCallback?a.valueCallback(l):l,d=t.valueCallback?t.valueCallback(d):d;var v=e.slice(o.length);return{value:d,rest:v}}}function Ae(a,e){for(var t in a)if(a.hasOwnProperty(t)&&e(a[t]))return t}function Be(a,e){for(var t=0;t<a.length;t++)if(e(a[t]))return t}function Ve(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(a.matchPattern);if(!r)return null;var n=r[0],i=e.match(a.parsePattern);if(!i)return null;var o=a.valueCallback?a.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;var u=e.slice(n.length);return{value:o,rest:u}}}var ze=/^(\d+)(th|st|nd|rd)?/i,Je=/\d+/i,Ze={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ke={any:[/^b/i,/^(a|c)/i]},et={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tt={any:[/1/i,/2/i,/3/i,/4/i]},at={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},nt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},it={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ot={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ut={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},st={ordinalNumber:Ve({matchPattern:ze,parsePattern:Je,valueCallback:function(e){return parseInt(e,10)}}),era:_({matchPatterns:Ze,defaultMatchWidth:"wide",parsePatterns:Ke,defaultParseWidth:"any"}),quarter:_({matchPatterns:et,defaultMatchWidth:"wide",parsePatterns:tt,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:_({matchPatterns:at,defaultMatchWidth:"wide",parsePatterns:rt,defaultParseWidth:"any"}),day:_({matchPatterns:nt,defaultMatchWidth:"wide",parsePatterns:it,defaultParseWidth:"any"}),dayPeriod:_({matchPatterns:ot,defaultMatchWidth:"any",parsePatterns:ut,defaultParseWidth:"any"})},dt={code:"en-US",formatDistance:xe,formatLong:Fe,formatRelative:Ie,localize:Ge,match:st,options:{weekStartsOn:0,firstWeekContainsDate:1}},lt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ft=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ct=/^'([^]*?)'?$/,vt=/''/g,mt=/[a-zA-Z]/;function ht(a,e,t){var r,n,i,o,u,l,d,v,c,h,g,y,S,p,k,I,H,q;s(2,arguments);var re=String(e),P=C(),Y=(r=(n=t==null?void 0:t.locale)!==null&&n!==void 0?n:P.locale)!==null&&r!==void 0?r:dt,R=w((i=(o=(u=(l=t==null?void 0:t.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(d=t.locale)===null||d===void 0||(v=d.options)===null||v===void 0?void 0:v.firstWeekContainsDate)!==null&&u!==void 0?u:P.firstWeekContainsDate)!==null&&o!==void 0?o:(c=P.locale)===null||c===void 0||(h=c.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var L=w((g=(y=(S=(p=t==null?void 0:t.weekStartsOn)!==null&&p!==void 0?p:t==null||(k=t.locale)===null||k===void 0||(I=k.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&S!==void 0?S:P.weekStartsOn)!==null&&y!==void 0?y:(H=P.locale)===null||H===void 0||(q=H.options)===null||q===void 0?void 0:q.weekStartsOn)!==null&&g!==void 0?g:0);if(!(L>=0&&L<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!Y.localize)throw new RangeError("locale must contain localize property");if(!Y.formatLong)throw new RangeError("locale must contain formatLong property");var N=f(a);if(!me(N))throw new RangeError("Invalid time value");var ne=ce(N),ie=he(N,ne),oe={firstWeekContainsDate:R,weekStartsOn:L,locale:Y,_originalDate:N},ue=re.match(ft).map(function(b){var T=b[0];if(T==="p"||T==="P"){var U=Se[T];return U(b,Y.formatLong)}return b}).join("").match(lt).map(function(b){if(b==="''")return"'";var T=b[0];if(T==="'")return gt(b);var U=Me[T];if(U)return!(t!=null&&t.useAdditionalWeekYearTokens)&&We(b)&&V(b,e,String(a)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Ye(b)&&V(b,e,String(a)),U(ie,b,Y.localize,oe);if(T.match(mt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+T+"`");return b}).join("");return ue}function gt(a){var e=a.match(ct);return e?e[1].replace(vt,"'"):a}const Gt=Object.freeze(Object.defineProperty({__proto__:null,default:ht},Symbol.toStringTag,{value:"Module"}));function At(a){s(1,arguments);var e=f(a),t=e.getDate();return t}function wt(a){s(1,arguments);var e=f(a),t=e.getFullYear(),r=e.getMonth(),n=new Date(0);return n.setFullYear(t,r+1,0),n.setHours(0,0,0,0),n.getDate()}function Bt(a){s(1,arguments);var e=f(a),t=e.getMonth();return t}function Vt(a){return s(1,arguments),f(a).getFullYear()}function zt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getTime()>r.getTime()}function Jt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getTime()<r.getTime()}function Zt(a,e){s(2,arguments);var t=f(a),r=f(e);return t.getFullYear()===r.getFullYear()&&t.getMonth()===r.getMonth()}function Kt(a,e){s(2,arguments);var t=f(a).getTime(),r=f(e.start).getTime(),n=f(e.end).getTime();if(!(r<=n))throw new RangeError("Invalid interval");return t>=r&&t<=n}function yt(a,e){var t;s(1,arguments);var r=w((t=e==null?void 0:e.additionalDigits)!==null&&t!==void 0?t:2);if(r!==2&&r!==1&&r!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof a=="string"||Object.prototype.toString.call(a)==="[object String]"))return new Date(NaN);var n=pt(a),i;if(n.date){var o=Ot(n.date,r);i=Mt(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var u=i.getTime(),l=0,d;if(n.time&&(l=Ct(n.time),isNaN(l)))return new Date(NaN);if(n.timezone){if(d=St(n.timezone),isNaN(d))return new Date(NaN)}else{var v=new Date(u+l),c=new Date(0);return c.setFullYear(v.getUTCFullYear(),v.getUTCMonth(),v.getUTCDate()),c.setHours(v.getUTCHours(),v.getUTCMinutes(),v.getUTCSeconds(),v.getUTCMilliseconds()),c}return new Date(u+l+d)}var E={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},bt=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Tt=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Dt=/^([+-])(\d{2})(?::?(\d{2}))?$/;function pt(a){var e={},t=a.split(E.dateTimeDelimiter),r;if(t.length>2)return e;if(/:/.test(t[0])?r=t[0]:(e.date=t[0],r=t[1],E.timeZoneDelimiter.test(e.date)&&(e.date=a.split(E.timeZoneDelimiter)[0],r=a.substr(e.date.length,a.length))),r){var n=E.timezone.exec(r);n?(e.time=r.replace(n[1],""),e.timezone=n[1]):e.time=r}return e}function Ot(a,e){var t=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=a.match(t);if(!r)return{year:NaN,restDateString:""};var n=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?n:i*100,restDateString:a.slice((r[1]||r[2]).length)}}function Mt(a,e){if(e===null)return new Date(NaN);var t=a.match(bt);if(!t)return new Date(NaN);var r=!!t[4],n=x(t[1]),i=x(t[2])-1,o=x(t[3]),u=x(t[4]),l=x(t[5])-1;if(r)return _t(e,u,l)?kt(e,u,l):new Date(NaN);var d=new Date(0);return!Yt(e,i,o)||!Wt(e,n)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(n,o)),d)}function x(a){return a?parseInt(a):1}function Ct(a){var e=a.match(Tt);if(!e)return NaN;var t=Q(e[1]),r=Q(e[2]),n=Q(e[3]);return xt(t,r,n)?t*Z+r*J+n*1e3:NaN}function Q(a){return a&&parseFloat(a.replace(",","."))||0}function St(a){if(a==="Z")return 0;var e=a.match(Dt);if(!e)return 0;var t=e[1]==="+"?-1:1,r=parseInt(e[2]),n=e[3]&&parseInt(e[3])||0;return Nt(r,n)?t*(r*Z+n*J):NaN}function kt(a,e,t){var r=new Date(0);r.setUTCFullYear(a,0,4);var n=r.getUTCDay()||7,i=(e-1)*7+t+1-n;return r.setUTCDate(r.getUTCDate()+i),r}var Pt=[31,null,31,30,31,30,31,31,30,31,30,31];function ae(a){return a%400===0||a%4===0&&a%100!==0}function Yt(a,e,t){return e>=0&&e<=11&&t>=1&&t<=(Pt[e]||(ae(a)?29:28))}function Wt(a,e){return e>=1&&e<=(ae(a)?366:365)}function _t(a,e,t){return e>=1&&e<=53&&t>=0&&t<=6}function xt(a,e,t){return a===24?e===0&&t===0:t>=0&&t<60&&e>=0&&e<60&&a>=0&&a<25}function Nt(a,e){return e>=0&&e<=59}const ea=Object.freeze(Object.defineProperty({__proto__:null,default:yt},Symbol.toStringTag,{value:"Module"}));function ta(a,e){s(2,arguments);var t=f(a),r=w(e),n=t.getFullYear(),i=t.getDate(),o=new Date(0);o.setFullYear(n,r,15),o.setHours(0,0,0,0);var u=wt(o);return t.setMonth(r,Math.min(i,u)),t}function aa(a,e){s(2,arguments);var t=f(a),r=w(e);return isNaN(t.getTime())?new Date(NaN):(t.setFullYear(r),t)}export{le as A,w as B,X as C,ce as D,Z as E,J as F,m as G,It as H,ee as I,$ as J,F as K,Oe as L,Te as M,C as N,dt as O,Se as P,We as Q,V as R,Ye as S,he as T,wt as U,ea as V,Gt as W,$t as a,de as b,me as c,Zt as d,se as e,Xt as f,Ft as g,Lt as h,Ht as i,Rt as j,Qt as k,jt as l,qt as m,ht as n,Jt as o,yt as p,zt as q,s as r,Et as s,f as t,Kt as u,At as v,Bt as w,Vt as x,ta as y,aa as z};
@@ -1,4 +1,4 @@
1
- import{cF as qm,bl as s2,i6 as tT,be as Km,cU as jm,bh as l2,r as u2,bf as Jm}from"./index-DTb1YjkO.js";/*! *****************************************************************************
1
+ import{cF as qm,bl as s2,i7 as tT,be as Km,cU as jm,bh as l2,r as u2,bf as Jm}from"./index-BXOD69ua.js";/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -1 +1 @@
1
- import{P as e,j as n,B as i,K as s,i2 as r}from"./index-DTb1YjkO.js";function a({children:t=null,...o}){return n.jsxs(i,{color:"did",variant:"contained",...o,children:[n.jsx(s,{sx:{fontWeight:400},children:t||"Continue With"}),n.jsx(r,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}a.propTypes={children:e.any};export{a as C};
1
+ import{P as e,j as n,B as i,K as s,i3 as r}from"./index-BXOD69ua.js";function a({children:t=null,...o}){return n.jsxs(i,{color:"did",variant:"contained",...o,children:[n.jsx(s,{sx:{fontWeight:400},children:t||"Continue With"}),n.jsx(r,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}a.propTypes={children:e.any};export{a as C};
@@ -1 +1 @@
1
- import{r as E,m as W,x as j,j as e,Y as I,C as T,cE as k,K as v,v as L,y as h,A as S,u as U,w as N,ap as R,af as b}from"./index-DTb1YjkO.js";import{w as _}from"./wrap-locale-B35eVgy7.js";import{g as y}from"./get-safe-url-BHhOK-87.js";function A({SessionContext:n,webWalletUrl:a,onSuccess:r}){var u,g;const{api:o,session:t}=E.useContext(n),{t:s,locale:f}=W(),m=j(),{searchParams:l}=new URL(window.location.href),p=l.get("redirect"),w=async(c,C)=>{r(c,C),await t.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(p){const i=decodeURIComponent(p);i.startsWith(S.WELLKNOWN_SERVICE_PATH_PREFIX)?m(i,{replace:!0}):window.location.href=y(i)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},P=c=>{h.error(c.message)},d={},x=l.get("componentId");return x&&(d.componentId=x),t.loading?e.jsx(I,{children:e.jsx(T,{})}):e.jsx(k,{did:((u=window==null?void 0:window.blocklet)==null?void 0:u.appPid)||((g=window==null?void 0:window.env)==null?void 0:g.appPid),children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(L,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:w,onError:P,locale:f,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:d,extraContent:null,hideCloseButton:!0})})})}const B=_(A);function H(){const{info:n}=U(),a=N(n),r=(o,t)=>{o.sessionToken&&b(t(o.sessionToken))};return e.jsx(B,{SessionContext:R,webWalletUrl:a,onSuccess:r})}export{H as default};
1
+ import{r as E,m as W,x as j,j as e,Y as I,C as T,cE as k,K as v,v as L,y as h,A as S,u as U,w as N,ap as R,af as b}from"./index-BXOD69ua.js";import{w as _}from"./wrap-locale-BRogPOgW.js";import{g as y}from"./get-safe-url-t5_KGb1I.js";function A({SessionContext:n,webWalletUrl:a,onSuccess:r}){var u,g;const{api:o,session:t}=E.useContext(n),{t:s,locale:f}=W(),m=j(),{searchParams:l}=new URL(window.location.href),p=l.get("redirect"),w=async(c,C)=>{r(c,C),await t.refresh(),h.success(s("exchangePassport.success")),setTimeout(()=>{if(p){const i=decodeURIComponent(p);i.startsWith(S.WELLKNOWN_SERVICE_PATH_PREFIX)?m(i,{replace:!0}):window.location.href=y(i)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},P=c=>{h.error(c.message)},d={},x=l.get("componentId");return x&&(d.componentId=x),t.loading?e.jsx(I,{children:e.jsx(T,{})}):e.jsx(k,{did:((u=window==null?void 0:window.blocklet)==null?void 0:u.appPid)||((g=window==null?void 0:window.env)==null?void 0:g.appPid),children:e.jsx(v,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(L,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:o.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:w,onError:P,locale:f,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:d,extraContent:null,hideCloseButton:!0})})})}const B=_(A);function H(){const{info:n}=U(),a=N(n),r=(o,t)=>{o.sessionToken&&b(t(o.sessionToken))};return e.jsx(B,{SessionContext:R,webWalletUrl:a,onSuccess:r})}export{H as default};
@@ -1 +1 @@
1
- import{bh as b}from"./index-DTb1YjkO.js";var _e=e=>e.type==="checkbox",ue=e=>e instanceof Date,j=e=>e==null;const dt=e=>typeof e=="object";var U=e=>!j(e)&&!Array.isArray(e)&&dt(e)&&!ue(e),yt=e=>U(e)&&e.target?_e(e.target)?e.target.checked:e.target.value:e,Ut=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,gt=(e,s)=>e.has(Ut(s)),Mt=e=>{const s=e.constructor&&e.constructor.prototype;return U(s)&&s.hasOwnProperty("isPrototypeOf")},We=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function T(e){let s;const t=Array.isArray(e),i=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(We&&(e instanceof Blob||i))&&(t||U(e)))if(s=t?[]:{},!t&&!Mt(e))s=e;else for(const n in e)e.hasOwnProperty(n)&&(s[n]=T(e[n]));else return e;return s}var he=e=>Array.isArray(e)?e.filter(Boolean):[],O=e=>e===void 0,c=(e,s,t)=>{if(!s||!U(e))return t;const i=he(s.split(/[,[\].]+?/)).reduce((n,u)=>j(n)?n:n[u],e);return O(i)||i===e?O(e[s])?t:e[s]:i},Q=e=>typeof e=="boolean",qe=e=>/^\w*$/.test(e),_t=e=>he(e.replace(/["|']|\]/g,"").split(/\.|\[/)),C=(e,s,t)=>{let i=-1;const n=qe(s)?[s]:_t(s),u=n.length,d=u-1;for(;++i<u;){const y=n[i];let A=t;if(i!==d){const x=e[y];A=U(x)||Array.isArray(x)?x:isNaN(+n[i+1])?{}:[]}if(y==="__proto__"||y==="constructor"||y==="prototype")return;e[y]=A,e=e[y]}};const me={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ee={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ie={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Nt=b.createContext(null),xe=()=>b.useContext(Nt);var ht=(e,s,t,i=!0)=>{const n={defaultValues:s._defaultValues};for(const u in e)Object.defineProperty(n,u,{get:()=>{const d=u;return s._proxyFormState[d]!==ee.all&&(s._proxyFormState[d]=!i||ee.all),t&&(t[d]=!0),e[d]}});return n};function Bt(e){const s=xe(),{control:t=s.control,disabled:i,name:n,exact:u}=e||{},[d,y]=b.useState(t._formState),A=b.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),x=b.useRef(n);return x.current=n,b.useEffect(()=>t._subscribe({name:x.current,formState:A.current,exact:u,callback:w=>{!i&&y({...t._formState,...w})}}),[t,i,u]),b.useEffect(()=>{A.current.isValid&&t._setValid(!0)},[t]),b.useMemo(()=>ht(d,t,A.current,!1),[d,t])}var se=e=>typeof e=="string",vt=(e,s,t,i,n)=>se(e)?(i&&s.watch.add(e),c(t,e,n)):Array.isArray(e)?e.map(u=>(i&&s.watch.add(u),c(t,u))):(i&&(s.watchAll=!0),t);function It(e){const s=xe(),{control:t=s.control,name:i,defaultValue:n,disabled:u,exact:d}=e||{},y=b.useRef(i),A=b.useRef(n);y.current=i,b.useEffect(()=>t._subscribe({name:y.current,formState:{values:!0},exact:d,callback:E=>!u&&w(vt(y.current,t._names,E.values||t._formValues,!1,A.current))}),[t,u,d]);const[x,w]=b.useState(t._getWatch(i,n));return b.useEffect(()=>t._removeUnmounted()),x}function Pt(e){const s=xe(),{name:t,disabled:i,control:n=s.control,shouldUnregister:u}=e,d=gt(n._names.array,t),y=It({control:n,name:t,defaultValue:c(n._formValues,t,c(n._defaultValues,t,e.defaultValue)),exact:!0}),A=Bt({control:n,name:t,exact:!0}),x=b.useRef(e),w=b.useRef(n.register(t,{...e.rules,value:y,...Q(e.disabled)?{disabled:e.disabled}:{}})),E=b.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!c(A.errors,t)},isDirty:{enumerable:!0,get:()=>!!c(A.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!c(A.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!c(A.validatingFields,t)},error:{enumerable:!0,get:()=>c(A.errors,t)}}),[A,t]),F=b.useCallback(P=>w.current.onChange({target:{value:yt(P),name:t},type:me.CHANGE}),[t]),R=b.useCallback(()=>w.current.onBlur({target:{value:c(n._formValues,t),name:t},type:me.BLUR}),[t,n._formValues]),G=b.useCallback(P=>{const W=c(n._fields,t);W&&P&&(W._f.ref={focus:()=>P.focus(),select:()=>P.select(),setCustomValidity:m=>P.setCustomValidity(m),reportValidity:()=>P.reportValidity()})},[n._fields,t]),I=b.useMemo(()=>({name:t,value:y,...Q(i)||A.disabled?{disabled:A.disabled||i}:{},onChange:F,onBlur:R,ref:G}),[t,i,A.disabled,F,R,G,y]);return b.useEffect(()=>{const P=n._options.shouldUnregister||u;n.register(t,{...x.current.rules,...Q(x.current.disabled)?{disabled:x.current.disabled}:{}});const W=(m,Y)=>{const $=c(n._fields,m);$&&$._f&&($._f.mount=Y)};if(W(t,!0),P){const m=T(c(n._options.defaultValues,t));C(n._defaultValues,t,m),O(c(n._formValues,t))&&C(n._formValues,t,m)}return!d&&n.register(t),()=>{(d?P&&!n._state.action:P)?n.unregister(t):W(t,!1)}},[t,n,d,u]),b.useEffect(()=>{n._setDisabledField({disabled:i,name:t})},[i,t,n]),b.useMemo(()=>({field:I,formState:A,fieldState:E}),[I,A,E])}const sr=e=>e.render(Pt(e));var Wt=(e,s,t,i,n)=>s?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[i]:n||!0}}:{},z=e=>Array.isArray(e)?e:[e],st=()=>{let e=[];return{get observers(){return e},next:n=>{for(const u of e)u.next&&u.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(u=>u!==n)}}),unsubscribe:()=>{e=[]}}},Be=e=>j(e)||!dt(e);function le(e,s){if(Be(e)||Be(s))return e===s;if(ue(e)&&ue(s))return e.getTime()===s.getTime();const t=Object.keys(e),i=Object.keys(s);if(t.length!==i.length)return!1;for(const n of t){const u=e[n];if(!i.includes(n))return!1;if(n!=="ref"){const d=s[n];if(ue(u)&&ue(d)||U(u)&&U(d)||Array.isArray(u)&&Array.isArray(d)?!le(u,d):u!==d)return!1}}return!0}var H=e=>U(e)&&!Object.keys(e).length,He=e=>e.type==="file",te=e=>typeof e=="function",Ae=e=>{if(!We)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},bt=e=>e.type==="select-multiple",$e=e=>e.type==="radio",qt=e=>$e(e)||_e(e),Ee=e=>Ae(e)&&e.isConnected;function Ht(e,s){const t=s.slice(0,-1).length;let i=0;for(;i<t;)e=O(e)?i++:e[s[i++]];return e}function $t(e){for(const s in e)if(e.hasOwnProperty(s)&&!O(e[s]))return!1;return!0}function B(e,s){const t=Array.isArray(s)?s:qe(s)?[s]:_t(s),i=t.length===1?e:Ht(e,t),n=t.length-1,u=t[n];return i&&delete i[u],n!==0&&(U(i)&&H(i)||Array.isArray(i)&&$t(i))&&B(e,t.slice(0,-1)),e}var mt=e=>{for(const s in e)if(te(e[s]))return!0;return!1};function Fe(e,s={}){const t=Array.isArray(e);if(U(e)||t)for(const i in e)Array.isArray(e[i])||U(e[i])&&!mt(e[i])?(s[i]=Array.isArray(e[i])?[]:{},Fe(e[i],s[i])):j(e[i])||(s[i]=!0);return s}function At(e,s,t){const i=Array.isArray(e);if(U(e)||i)for(const n in e)Array.isArray(e[n])||U(e[n])&&!mt(e[n])?O(s)||Be(t[n])?t[n]=Array.isArray(e[n])?Fe(e[n],[]):{...Fe(e[n])}:At(e[n],j(s)?{}:s[n],t[n]):t[n]=!le(e[n],s[n]);return t}var ye=(e,s)=>At(e,s,Fe(s));const it={value:!1,isValid:!1},at={value:!0,isValid:!0};var Ft=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!O(e[0].attributes.value)?O(e[0].value)||e[0].value===""?at:{value:e[0].value,isValid:!0}:at:it}return it},Vt=(e,{valueAsNumber:s,valueAsDate:t,setValueAs:i})=>O(e)?e:s?e===""?NaN:e&&+e:t&&se(e)?new Date(e):i?i(e):e;const nt={isValid:!1,value:null};var xt=e=>Array.isArray(e)?e.reduce((s,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:s,nt):nt;function lt(e){const s=e.ref;return He(s)?s.files:$e(s)?xt(e.refs).value:bt(s)?[...s.selectedOptions].map(({value:t})=>t):_e(s)?Ft(e.refs).value:Vt(O(s.value)?e.ref.value:s.value,e)}var jt=(e,s,t,i)=>{const n={};for(const u of e){const d=c(s,u);d&&C(n,u,d._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:i}},Ve=e=>e instanceof RegExp,ge=e=>O(e)?e:Ve(e)?e.source:U(e)?Ve(e.value)?e.value.source:e.value:e,ce=e=>({isOnSubmit:!e||e===ee.onSubmit,isOnBlur:e===ee.onBlur,isOnChange:e===ee.onChange,isOnAll:e===ee.all,isOnTouch:e===ee.onTouched});const ut="AsyncFunction";var Kt=e=>!!e&&!!e.validate&&!!(te(e.validate)&&e.validate.constructor.name===ut||U(e.validate)&&Object.values(e.validate).find(s=>s.constructor.name===ut)),zt=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ie=(e,s,t)=>!t&&(s.watchAll||s.watch.has(e)||[...s.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const fe=(e,s,t,i)=>{for(const n of t||Object.keys(e)){const u=c(e,n);if(u){const{_f:d,...y}=u;if(d){if(d.refs&&d.refs[0]&&s(d.refs[0],n)&&!i)return!0;if(d.ref&&s(d.ref,d.name)&&!i)return!0;if(fe(y,s))break}else if(U(y)&&fe(y,s))break}}};function ot(e,s,t){const i=c(e,t);if(i||qe(t))return{error:i,name:t};const n=t.split(".");for(;n.length;){const u=n.join("."),d=c(s,u),y=c(e,u);if(d&&!Array.isArray(d)&&t!==u)return{name:t};if(y&&y.type)return{name:u,error:y};n.pop()}return{name:t}}var Gt=(e,s,t,i)=>{t(e);const{name:n,...u}=e;return H(u)||Object.keys(u).length>=Object.keys(s).length||Object.keys(u).find(d=>s[d]===(!i||ee.all))},Yt=(e,s,t)=>!e||!s||e===s||z(e).some(i=>i&&(t?i===s:i.startsWith(s)||s.startsWith(i))),Jt=(e,s,t,i,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(s||e):(t?i.isOnBlur:n.isOnBlur)?!e:(t?i.isOnChange:n.isOnChange)?e:!0,Qt=(e,s)=>!he(c(e,s)).length&&B(e,s),St=(e,s,t)=>{const i=z(c(e,t));return C(i,"root",s[t]),C(e,t,i),e},be=e=>se(e);function ct(e,s,t="validate"){if(be(e)||Array.isArray(e)&&e.every(be)||Q(e)&&!e)return{type:t,message:be(e)?e:"",ref:s}}var oe=e=>U(e)&&!Ve(e)?e:{value:e,message:""},Pe=async(e,s,t,i,n,u)=>{const{ref:d,refs:y,required:A,maxLength:x,minLength:w,min:E,max:F,pattern:R,validate:G,name:I,valueAsNumber:P,mount:W}=e._f,m=c(t,I);if(!W||s.has(I))return{};const Y=y?y[0]:d,$=p=>{n&&Y.reportValidity&&(Y.setCustomValidity(Q(p)?"":p||""),Y.reportValidity())},M={},v=$e(d),h=_e(d),V=v||h,D=(P||He(d))&&O(d.value)&&O(m)||Ae(d)&&d.value===""||m===""||Array.isArray(m)&&!m.length,J=Wt.bind(null,I,i,M),X=(p,S,L,K=ie.maxLength,Z=ie.minLength)=>{const re=p?S:L;M[I]={type:p?K:Z,message:re,ref:d,...J(p?K:Z,re)}};if(u?!Array.isArray(m)||!m.length:A&&(!V&&(D||j(m))||Q(m)&&!m||h&&!Ft(y).isValid||v&&!xt(y).isValid)){const{value:p,message:S}=be(A)?{value:!!A,message:A}:oe(A);if(p&&(M[I]={type:ie.required,message:S,ref:Y,...J(ie.required,S)},!i))return $(S),M}if(!D&&(!j(E)||!j(F))){let p,S;const L=oe(F),K=oe(E);if(!j(m)&&!isNaN(m)){const Z=d.valueAsNumber||m&&+m;j(L.value)||(p=Z>L.value),j(K.value)||(S=Z<K.value)}else{const Z=d.valueAsDate||new Date(m),re=ve=>new Date(new Date().toDateString()+" "+ve),ae=d.type=="time",de=d.type=="week";se(L.value)&&m&&(p=ae?re(m)>re(L.value):de?m>L.value:Z>new Date(L.value)),se(K.value)&&m&&(S=ae?re(m)<re(K.value):de?m<K.value:Z<new Date(K.value))}if((p||S)&&(X(!!p,L.message,K.message,ie.max,ie.min),!i))return $(M[I].message),M}if((x||w)&&!D&&(se(m)||u&&Array.isArray(m))){const p=oe(x),S=oe(w),L=!j(p.value)&&m.length>+p.value,K=!j(S.value)&&m.length<+S.value;if((L||K)&&(X(L,p.message,S.message),!i))return $(M[I].message),M}if(R&&!D&&se(m)){const{value:p,message:S}=oe(R);if(Ve(p)&&!m.match(p)&&(M[I]={type:ie.pattern,message:S,ref:d,...J(ie.pattern,S)},!i))return $(S),M}if(G){if(te(G)){const p=await G(m,t),S=ct(p,Y);if(S&&(M[I]={...S,...J(ie.validate,S.message)},!i))return $(S.message),M}else if(U(G)){let p={};for(const S in G){if(!H(p)&&!i)break;const L=ct(await G[S](m,t),Y,S);L&&(p={...L,...J(S,L.message)},$(L.message),i&&(M[I]=p))}if(!H(p)&&(M[I]={ref:Y,...p},!i))return M}}return $(!0),M};const Xt={mode:ee.onSubmit,reValidateMode:ee.onChange,shouldFocusError:!0};function Zt(e={}){let s={...Xt,...e},t={submitCount:0,isDirty:!1,isLoading:te(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1};const i={};let n=U(s.defaultValues)||U(s.values)?T(s.values||s.defaultValues)||{}:{},u=s.shouldUnregister?{}:T(n),d={action:!1,mount:!1,watch:!1},y={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},A,x=0;const w={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let E={...w};const F={array:st(),state:st()},R=ce(s.mode),G=ce(s.reValidateMode),I=s.criteriaMode===ee.all,P=r=>a=>{clearTimeout(x),x=setTimeout(r,a)},W=async r=>{if(!s.disabled&&(w.isValid||E.isValid||r)){const a=s.resolver?H((await D()).errors):await X(i,!0);a!==t.isValid&&F.state.next({isValid:a})}},m=(r,a)=>{!s.disabled&&(w.isValidating||w.validatingFields||E.isValidating||E.validatingFields)&&((r||Array.from(y.mount)).forEach(l=>{l&&(a?C(t.validatingFields,l,a):B(t.validatingFields,l))}),F.state.next({validatingFields:t.validatingFields,isValidating:!H(t.validatingFields)}))},Y=(r,a=[],l,g,f=!0,o=!0)=>{if(g&&l&&!s.disabled){if(d.action=!0,o&&Array.isArray(c(i,r))){const _=l(c(i,r),g.argA,g.argB);f&&C(i,r,_)}if(o&&Array.isArray(c(t.errors,r))){const _=l(c(t.errors,r),g.argA,g.argB);f&&C(t.errors,r,_),Qt(t.errors,r)}if((w.touchedFields||E.touchedFields)&&o&&Array.isArray(c(t.touchedFields,r))){const _=l(c(t.touchedFields,r),g.argA,g.argB);f&&C(t.touchedFields,r,_)}(w.dirtyFields||E.dirtyFields)&&(t.dirtyFields=ye(n,u)),F.state.next({name:r,isDirty:S(r,a),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else C(u,r,a)},$=(r,a)=>{C(t.errors,r,a),F.state.next({errors:t.errors})},M=r=>{t.errors=r,F.state.next({errors:t.errors,isValid:!1})},v=(r,a,l,g)=>{const f=c(i,r);if(f){const o=c(u,r,O(l)?c(n,r):l);O(o)||g&&g.defaultChecked||a?C(u,r,a?o:lt(f._f)):Z(r,o),d.mount&&W()}},h=(r,a,l,g,f)=>{let o=!1,_=!1;const k={name:r};if(!s.disabled){if(!l||g){(w.isDirty||E.isDirty)&&(_=t.isDirty,t.isDirty=k.isDirty=S(),o=_!==k.isDirty);const N=le(c(n,r),a);_=!!c(t.dirtyFields,r),N?B(t.dirtyFields,r):C(t.dirtyFields,r,!0),k.dirtyFields=t.dirtyFields,o=o||(w.dirtyFields||E.dirtyFields)&&_!==!N}if(l){const N=c(t.touchedFields,r);N||(C(t.touchedFields,r,l),k.touchedFields=t.touchedFields,o=o||(w.touchedFields||E.touchedFields)&&N!==l)}o&&f&&F.state.next(k)}return o?k:{}},V=(r,a,l,g)=>{const f=c(t.errors,r),o=(w.isValid||E.isValid)&&Q(a)&&t.isValid!==a;if(s.delayError&&l?(A=P(()=>$(r,l)),A(s.delayError)):(clearTimeout(x),A=null,l?C(t.errors,r,l):B(t.errors,r)),(l?!le(f,l):f)||!H(g)||o){const _={...g,...o&&Q(a)?{isValid:a}:{},errors:t.errors,name:r};t={...t,..._},F.state.next(_)}},D=async r=>{m(r,!0);const a=await s.resolver(u,s.context,jt(r||y.mount,i,s.criteriaMode,s.shouldUseNativeValidation));return m(r),a},J=async r=>{const{errors:a}=await D(r);if(r)for(const l of r){const g=c(a,l);g?C(t.errors,l,g):B(t.errors,l)}else t.errors=a;return a},X=async(r,a,l={valid:!0})=>{for(const g in r){const f=r[g];if(f){const{_f:o,..._}=f;if(o){const k=y.array.has(o.name),N=f._f&&Kt(f._f);N&&w.validatingFields&&m([g],!0);const q=await Pe(f,y.disabled,u,I,s.shouldUseNativeValidation&&!a,k);if(N&&w.validatingFields&&m([g]),q[o.name]&&(l.valid=!1,a))break;!a&&(c(q,o.name)?k?St(t.errors,q,o.name):C(t.errors,o.name,q[o.name]):B(t.errors,o.name))}!H(_)&&await X(_,a,l)}}return l.valid},p=()=>{for(const r of y.unMount){const a=c(i,r);a&&(a._f.refs?a._f.refs.every(l=>!Ee(l)):!Ee(a._f.ref))&&we(r)}y.unMount=new Set},S=(r,a)=>!s.disabled&&(r&&a&&C(u,r,a),!le(je(),n)),L=(r,a,l)=>vt(r,y,{...d.mount?u:O(a)?n:se(r)?{[r]:a}:a},l,a),K=r=>he(c(d.mount?u:n,r,s.shouldUnregister?c(n,r,[]):[])),Z=(r,a,l={})=>{const g=c(i,r);let f=a;if(g){const o=g._f;o&&(!o.disabled&&C(u,r,Vt(a,o)),f=Ae(o.ref)&&j(a)?"":a,bt(o.ref)?[...o.ref.options].forEach(_=>_.selected=f.includes(_.value)):o.refs?_e(o.ref)?o.refs.length>1?o.refs.forEach(_=>(!_.defaultChecked||!_.disabled)&&(_.checked=Array.isArray(f)?!!f.find(k=>k===_.value):f===_.value)):o.refs[0]&&(o.refs[0].checked=!!f):o.refs.forEach(_=>_.checked=_.value===f):He(o.ref)?o.ref.value="":(o.ref.value=f,o.ref.type||F.state.next({name:r,values:T(u)})))}(l.shouldDirty||l.shouldTouch)&&h(r,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&Se(r)},re=(r,a,l)=>{for(const g in a){const f=a[g],o=`${r}.${g}`,_=c(i,o);(y.array.has(r)||U(f)||_&&!_._f)&&!ue(f)?re(o,f,l):Z(o,f,l)}},ae=(r,a,l={})=>{const g=c(i,r),f=y.array.has(r),o=T(a);C(u,r,o),f?(F.array.next({name:r,values:T(u)}),(w.isDirty||w.dirtyFields||E.isDirty||E.dirtyFields)&&l.shouldDirty&&F.state.next({name:r,dirtyFields:ye(n,u),isDirty:S(r,o)})):g&&!g._f&&!j(o)?re(r,o,l):Z(r,o,l),Ie(r,y)&&F.state.next({...t}),F.state.next({name:d.mount?r:void 0,values:T(u)})},de=async r=>{d.mount=!0;const a=r.target;let l=a.name,g=!0;const f=c(i,l),o=_=>{g=Number.isNaN(_)||ue(_)&&isNaN(_.getTime())||le(_,c(u,l,_))};if(f){let _,k;const N=a.type?lt(f._f):yt(r),q=r.type===me.BLUR||r.type===me.FOCUS_OUT,Rt=!zt(f._f)&&!s.resolver&&!c(t.errors,l)&&!f._f.deps||Jt(q,c(t.touchedFields,l),t.isSubmitted,G,R),De=Ie(l,y,q);C(u,l,N),q?(f._f.onBlur&&f._f.onBlur(r),A&&A(0)):f._f.onChange&&f._f.onChange(r);const pe=h(l,N,q),Tt=!H(pe)||De;if(!q&&F.state.next({name:l,type:r.type,values:T(u)}),Rt)return(w.isValid||E.isValid)&&(s.mode==="onBlur"?q&&W():q||W()),Tt&&F.state.next({name:l,...De?{}:pe});if(!q&&De&&F.state.next({...t}),s.resolver){const{errors:tt}=await D([l]);if(o(N),g){const Lt=ot(t.errors,i,l),rt=ot(tt,i,Lt.name||l);_=rt.error,l=rt.name,k=H(tt)}}else m([l],!0),_=(await Pe(f,y.disabled,u,I,s.shouldUseNativeValidation))[l],m([l]),o(N),g&&(_?k=!1:(w.isValid||E.isValid)&&(k=await X(i,!0)));g&&(f._f.deps&&Se(f._f.deps),V(l,k,_,pe))}},ve=(r,a)=>{if(c(t.errors,a)&&r.focus)return r.focus(),1},Se=async(r,a={})=>{let l,g;const f=z(r);if(s.resolver){const o=await J(O(r)?r:f);l=H(o),g=r?!f.some(_=>c(o,_)):l}else r?(g=(await Promise.all(f.map(async o=>{const _=c(i,o);return await X(_&&_._f?{[o]:_}:_)}))).every(Boolean),!(!g&&!t.isValid)&&W()):g=l=await X(i);return F.state.next({...!se(r)||(w.isValid||E.isValid)&&l!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:l}:{},errors:t.errors}),a.shouldFocus&&!g&&fe(i,ve,r?f:y.mount),g},je=r=>{const a={...d.mount?u:n};return O(r)?a:se(r)?c(a,r):r.map(l=>c(a,l))},Ke=(r,a)=>({invalid:!!c((a||t).errors,r),isDirty:!!c((a||t).dirtyFields,r),error:c((a||t).errors,r),isValidating:!!c(t.validatingFields,r),isTouched:!!c((a||t).touchedFields,r)}),wt=r=>{r&&z(r).forEach(a=>B(t.errors,a)),F.state.next({errors:r?t.errors:{}})},ze=(r,a,l)=>{const g=(c(i,r,{_f:{}})._f||{}).ref,f=c(t.errors,r)||{},{ref:o,message:_,type:k,...N}=f;C(t.errors,r,{...N,...a,ref:g}),F.state.next({name:r,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&g&&g.focus&&g.focus()},kt=(r,a)=>te(r)?F.state.subscribe({next:l=>r(L(void 0,a),l)}):L(r,a,!0),Ge=r=>F.state.subscribe({next:a=>{Yt(r.name,a.name,r.exact)&&Gt(a,r.formState||w,Ot,r.reRenderRoot)&&r.callback({values:{...u},...t,...a})}}).unsubscribe,Dt=r=>(d.mount=!0,E={...E,...r.formState},Ge({...r,formState:E})),we=(r,a={})=>{for(const l of r?z(r):y.mount)y.mount.delete(l),y.array.delete(l),a.keepValue||(B(i,l),B(u,l)),!a.keepError&&B(t.errors,l),!a.keepDirty&&B(t.dirtyFields,l),!a.keepTouched&&B(t.touchedFields,l),!a.keepIsValidating&&B(t.validatingFields,l),!s.shouldUnregister&&!a.keepDefaultValue&&B(n,l);F.state.next({values:T(u)}),F.state.next({...t,...a.keepDirty?{isDirty:S()}:{}}),!a.keepIsValid&&W()},Ye=({disabled:r,name:a})=>{(Q(r)&&d.mount||r||y.disabled.has(a))&&(r?y.disabled.add(a):y.disabled.delete(a))},ke=(r,a={})=>{let l=c(i,r);const g=Q(a.disabled)||Q(s.disabled);return C(i,r,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:r}},name:r,mount:!0,...a}}),y.mount.add(r),l?Ye({disabled:Q(a.disabled)?a.disabled:s.disabled,name:r}):v(r,!0,a.value),{...g?{disabled:a.disabled||s.disabled}:{},...s.progressive?{required:!!a.required,min:ge(a.min),max:ge(a.max),minLength:ge(a.minLength),maxLength:ge(a.maxLength),pattern:ge(a.pattern)}:{},name:r,onChange:de,onBlur:de,ref:f=>{if(f){ke(r,a),l=c(i,r);const o=O(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,_=qt(o),k=l._f.refs||[];if(_?k.find(N=>N===o):o===l._f.ref)return;C(i,r,{_f:{...l._f,..._?{refs:[...k.filter(Ee),o,...Array.isArray(c(n,r))?[{}]:[]],ref:{type:o.type,name:r}}:{ref:o}}}),v(r,!1,void 0,o)}else l=c(i,r,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||a.shouldUnregister)&&!(gt(y.array,r)&&d.action)&&y.unMount.add(r)}}},Je=()=>s.shouldFocusError&&fe(i,ve,y.mount),pt=r=>{Q(r)&&(F.state.next({disabled:r}),fe(i,(a,l)=>{const g=c(i,l);g&&(a.disabled=g._f.disabled||r,Array.isArray(g._f.refs)&&g._f.refs.forEach(f=>{f.disabled=g._f.disabled||r}))},0,!1))},Qe=(r,a)=>async l=>{let g;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let f=T(u);if(F.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:_}=await D();t.errors=o,f=_}else await X(i);if(y.disabled.size)for(const o of y.disabled)C(f,o,void 0);if(B(t.errors,"root"),H(t.errors)){F.state.next({errors:{}});try{await r(f,l)}catch(o){g=o}}else a&&await a({...t.errors},l),Je(),setTimeout(Je);if(F.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:H(t.errors)&&!g,submitCount:t.submitCount+1,errors:t.errors}),g)throw g},Et=(r,a={})=>{c(i,r)&&(O(a.defaultValue)?ae(r,T(c(n,r))):(ae(r,a.defaultValue),C(n,r,T(a.defaultValue))),a.keepTouched||B(t.touchedFields,r),a.keepDirty||(B(t.dirtyFields,r),t.isDirty=a.defaultValue?S(r,T(c(n,r))):S()),a.keepError||(B(t.errors,r),w.isValid&&W()),F.state.next({...t}))},Xe=(r,a={})=>{const l=r?T(r):n,g=T(l),f=H(r),o=f?n:g;if(a.keepDefaultValues||(n=l),!a.keepValues){if(a.keepDirtyValues){const _=new Set([...y.mount,...Object.keys(ye(n,u))]);for(const k of Array.from(_))c(t.dirtyFields,k)?C(o,k,c(u,k)):ae(k,c(o,k))}else{if(We&&O(r))for(const _ of y.mount){const k=c(i,_);if(k&&k._f){const N=Array.isArray(k._f.refs)?k._f.refs[0]:k._f.ref;if(Ae(N)){const q=N.closest("form");if(q){q.reset();break}}}}for(const _ of y.mount)ae(_,c(o,_))}u=T(o),F.array.next({values:{...o}}),F.state.next({values:{...o}})}y={mount:a.keepDirtyValues?y.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},d.mount=!w.isValid||!!a.keepIsValid||!!a.keepDirtyValues,d.watch=!!s.shouldUnregister,F.state.next({submitCount:a.keepSubmitCount?t.submitCount:0,isDirty:f?!1:a.keepDirty?t.isDirty:!!(a.keepDefaultValues&&!le(r,n)),isSubmitted:a.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:f?{}:a.keepDirtyValues?a.keepDefaultValues&&u?ye(n,u):t.dirtyFields:a.keepDefaultValues&&r?ye(n,r):a.keepDirty?t.dirtyFields:{},touchedFields:a.keepTouched?t.touchedFields:{},errors:a.keepErrors?t.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},Ze=(r,a)=>Xe(te(r)?r(u):r,a),Ct=(r,a={})=>{const l=c(i,r),g=l&&l._f;if(g){const f=g.refs?g.refs[0]:g.ref;f.focus&&(f.focus(),a.shouldSelect&&te(f.select)&&f.select())}},Ot=r=>{t={...t,...r}},et={control:{register:ke,unregister:we,getFieldState:Ke,handleSubmit:Qe,setError:ze,_subscribe:Ge,_runSchema:D,_getWatch:L,_getDirty:S,_setValid:W,_setFieldArray:Y,_setDisabledField:Ye,_setErrors:M,_getFieldArray:K,_reset:Xe,_resetDefaultValues:()=>te(s.defaultValues)&&s.defaultValues().then(r=>{Ze(r,s.resetOptions),F.state.next({isLoading:!1})}),_removeUnmounted:p,_disableForm:pt,_subjects:F,_proxyFormState:w,get _fields(){return i},get _formValues(){return u},get _state(){return d},set _state(r){d=r},get _defaultValues(){return n},get _names(){return y},set _names(r){y=r},get _formState(){return t},get _options(){return s},set _options(r){s={...s,...r}}},subscribe:Dt,trigger:Se,register:ke,handleSubmit:Qe,watch:kt,setValue:ae,getValues:je,reset:Ze,resetField:Et,clearErrors:wt,unregister:we,setError:ze,setFocus:Ct,getFieldState:Ke};return{...et,formControl:et}}var ne=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{const t=(Math.random()*16+e)%16|0;return(s=="x"?t:t&3|8).toString(16)})},Ce=(e,s,t={})=>t.shouldFocus||O(t.shouldFocus)?t.focusName||`${e}.${O(t.focusIndex)?s:t.focusIndex}.`:"",Oe=(e,s)=>[...e,...z(s)],Re=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Te(e,s,t){return[...e.slice(0,s),...z(t),...e.slice(s)]}var Le=(e,s,t)=>Array.isArray(e)?(O(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(s,1)[0]),e):[],Ue=(e,s)=>[...z(s),...z(e)];function er(e,s){let t=0;const i=[...e];for(const n of s)i.splice(n-t,1),t++;return he(i).length?i:[]}var Me=(e,s)=>O(s)?[]:er(e,z(s).sort((t,i)=>t-i)),Ne=(e,s,t)=>{[e[s],e[t]]=[e[t],e[s]]},ft=(e,s,t)=>(e[s]=t,e);function ir(e){const s=xe(),{control:t=s.control,name:i,keyName:n="id",shouldUnregister:u,rules:d}=e,[y,A]=b.useState(t._getFieldArray(i)),x=b.useRef(t._getFieldArray(i).map(ne)),w=b.useRef(y),E=b.useRef(i),F=b.useRef(!1);E.current=i,w.current=y,t._names.array.add(i),d&&t.register(i,d),b.useEffect(()=>t._subjects.array.subscribe({next:({values:v,name:h})=>{if(h===E.current||!h){const V=c(v,E.current);Array.isArray(V)&&(A(V),x.current=V.map(ne))}}}).unsubscribe,[t]);const R=b.useCallback(v=>{F.current=!0,t._setFieldArray(i,v)},[t,i]),G=(v,h)=>{const V=z(T(v)),D=Oe(t._getFieldArray(i),V);t._names.focus=Ce(i,D.length-1,h),x.current=Oe(x.current,V.map(ne)),R(D),A(D),t._setFieldArray(i,D,Oe,{argA:Re(v)})},I=(v,h)=>{const V=z(T(v)),D=Ue(t._getFieldArray(i),V);t._names.focus=Ce(i,0,h),x.current=Ue(x.current,V.map(ne)),R(D),A(D),t._setFieldArray(i,D,Ue,{argA:Re(v)})},P=v=>{const h=Me(t._getFieldArray(i),v);x.current=Me(x.current,v),R(h),A(h),!Array.isArray(c(t._fields,i))&&C(t._fields,i,void 0),t._setFieldArray(i,h,Me,{argA:v})},W=(v,h,V)=>{const D=z(T(h)),J=Te(t._getFieldArray(i),v,D);t._names.focus=Ce(i,v,V),x.current=Te(x.current,v,D.map(ne)),R(J),A(J),t._setFieldArray(i,J,Te,{argA:v,argB:Re(h)})},m=(v,h)=>{const V=t._getFieldArray(i);Ne(V,v,h),Ne(x.current,v,h),R(V),A(V),t._setFieldArray(i,V,Ne,{argA:v,argB:h},!1)},Y=(v,h)=>{const V=t._getFieldArray(i);Le(V,v,h),Le(x.current,v,h),R(V),A(V),t._setFieldArray(i,V,Le,{argA:v,argB:h},!1)},$=(v,h)=>{const V=T(h),D=ft(t._getFieldArray(i),v,V);x.current=[...D].map((J,X)=>!J||X===v?ne():x.current[X]),R(D),A([...D]),t._setFieldArray(i,D,ft,{argA:v,argB:V},!0,!1)},M=v=>{const h=z(T(v));x.current=h.map(ne),R([...h]),A([...h]),t._setFieldArray(i,[...h],V=>V,{},!0,!1)};return b.useEffect(()=>{if(t._state.action=!1,Ie(i,t._names)&&t._subjects.state.next({...t._formState}),F.current&&(!ce(t._options.mode).isOnSubmit||t._formState.isSubmitted)&&!ce(t._options.reValidateMode).isOnSubmit)if(t._options.resolver)t._runSchema([i]).then(v=>{const h=c(v.errors,i),V=c(t._formState.errors,i);(V?!h&&V.type||h&&(V.type!==h.type||V.message!==h.message):h&&h.type)&&(h?C(t._formState.errors,i,h):B(t._formState.errors,i),t._subjects.state.next({errors:t._formState.errors}))});else{const v=c(t._fields,i);v&&v._f&&!(ce(t._options.reValidateMode).isOnSubmit&&ce(t._options.mode).isOnSubmit)&&Pe(v,t._names.disabled,t._formValues,t._options.criteriaMode===ee.all,t._options.shouldUseNativeValidation,!0).then(h=>!H(h)&&t._subjects.state.next({errors:St(t._formState.errors,h,i)}))}t._subjects.state.next({name:i,values:T(t._formValues)}),t._names.focus&&fe(t._fields,(v,h)=>{if(t._names.focus&&h.startsWith(t._names.focus)&&v.focus)return v.focus(),1}),t._names.focus="",t._setValid(),F.current=!1},[y,i,t]),b.useEffect(()=>(!c(t._formValues,i)&&t._setFieldArray(i),()=>{const v=(h,V)=>{const D=c(t._fields,h);D&&D._f&&(D._f.mount=V)};t._options.shouldUnregister||u?t.unregister(i):v(i,!1)}),[i,t,n,u]),{swap:b.useCallback(m,[R,i,t]),move:b.useCallback(Y,[R,i,t]),prepend:b.useCallback(I,[R,i,t]),append:b.useCallback(G,[R,i,t]),remove:b.useCallback(P,[R,i,t]),insert:b.useCallback(W,[R,i,t]),update:b.useCallback($,[R,i,t]),replace:b.useCallback(M,[R,i,t]),fields:b.useMemo(()=>y.map((v,h)=>({...v,[n]:x.current[h]||ne()})),[y,n])}}function ar(e={}){const s=b.useRef(void 0),t=b.useRef(void 0),[i,n]=b.useState({isDirty:!1,isValidating:!1,isLoading:te(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:te(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...e.formControl?e.formControl:Zt(e),formState:i},e.formControl&&e.defaultValues&&!te(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const u=s.current.control;return u._options=e,b.useLayoutEffect(()=>u._subscribe({formState:u._proxyFormState,callback:()=>n({...u._formState}),reRenderRoot:!0}),[u]),b.useEffect(()=>u._disableForm(e.disabled),[u,e.disabled]),b.useEffect(()=>{if(u._proxyFormState.isDirty){const d=u._getDirty();d!==i.isDirty&&u._subjects.state.next({isDirty:d})}},[u,i.isDirty]),b.useEffect(()=>{e.values&&!le(e.values,t.current)?(u._reset(e.values,u._options.resetOptions),t.current=e.values,n(d=>({...d}))):u._resetDefaultValues()},[e.values,u]),b.useEffect(()=>{e.errors&&!H(e.errors)&&u._setErrors(e.errors)},[e.errors,u]),b.useEffect(()=>{u._state.mount||(u._setValid(),u._state.mount=!0),u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),b.useEffect(()=>{e.shouldUnregister&&u._subjects.state.next({values:u._getWatch()})},[e.shouldUnregister,u]),s.current.formState=ht(i,u),s.current}export{sr as C,It as a,ir as b,ar as u};
1
+ import{bh as b}from"./index-BXOD69ua.js";var _e=e=>e.type==="checkbox",ue=e=>e instanceof Date,j=e=>e==null;const dt=e=>typeof e=="object";var U=e=>!j(e)&&!Array.isArray(e)&&dt(e)&&!ue(e),yt=e=>U(e)&&e.target?_e(e.target)?e.target.checked:e.target.value:e,Ut=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,gt=(e,s)=>e.has(Ut(s)),Mt=e=>{const s=e.constructor&&e.constructor.prototype;return U(s)&&s.hasOwnProperty("isPrototypeOf")},We=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function T(e){let s;const t=Array.isArray(e),i=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(We&&(e instanceof Blob||i))&&(t||U(e)))if(s=t?[]:{},!t&&!Mt(e))s=e;else for(const n in e)e.hasOwnProperty(n)&&(s[n]=T(e[n]));else return e;return s}var he=e=>Array.isArray(e)?e.filter(Boolean):[],O=e=>e===void 0,c=(e,s,t)=>{if(!s||!U(e))return t;const i=he(s.split(/[,[\].]+?/)).reduce((n,u)=>j(n)?n:n[u],e);return O(i)||i===e?O(e[s])?t:e[s]:i},Q=e=>typeof e=="boolean",qe=e=>/^\w*$/.test(e),_t=e=>he(e.replace(/["|']|\]/g,"").split(/\.|\[/)),C=(e,s,t)=>{let i=-1;const n=qe(s)?[s]:_t(s),u=n.length,d=u-1;for(;++i<u;){const y=n[i];let A=t;if(i!==d){const x=e[y];A=U(x)||Array.isArray(x)?x:isNaN(+n[i+1])?{}:[]}if(y==="__proto__"||y==="constructor"||y==="prototype")return;e[y]=A,e=e[y]}};const me={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},ee={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ie={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Nt=b.createContext(null),xe=()=>b.useContext(Nt);var ht=(e,s,t,i=!0)=>{const n={defaultValues:s._defaultValues};for(const u in e)Object.defineProperty(n,u,{get:()=>{const d=u;return s._proxyFormState[d]!==ee.all&&(s._proxyFormState[d]=!i||ee.all),t&&(t[d]=!0),e[d]}});return n};function Bt(e){const s=xe(),{control:t=s.control,disabled:i,name:n,exact:u}=e||{},[d,y]=b.useState(t._formState),A=b.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),x=b.useRef(n);return x.current=n,b.useEffect(()=>t._subscribe({name:x.current,formState:A.current,exact:u,callback:w=>{!i&&y({...t._formState,...w})}}),[t,i,u]),b.useEffect(()=>{A.current.isValid&&t._setValid(!0)},[t]),b.useMemo(()=>ht(d,t,A.current,!1),[d,t])}var se=e=>typeof e=="string",vt=(e,s,t,i,n)=>se(e)?(i&&s.watch.add(e),c(t,e,n)):Array.isArray(e)?e.map(u=>(i&&s.watch.add(u),c(t,u))):(i&&(s.watchAll=!0),t);function It(e){const s=xe(),{control:t=s.control,name:i,defaultValue:n,disabled:u,exact:d}=e||{},y=b.useRef(i),A=b.useRef(n);y.current=i,b.useEffect(()=>t._subscribe({name:y.current,formState:{values:!0},exact:d,callback:E=>!u&&w(vt(y.current,t._names,E.values||t._formValues,!1,A.current))}),[t,u,d]);const[x,w]=b.useState(t._getWatch(i,n));return b.useEffect(()=>t._removeUnmounted()),x}function Pt(e){const s=xe(),{name:t,disabled:i,control:n=s.control,shouldUnregister:u}=e,d=gt(n._names.array,t),y=It({control:n,name:t,defaultValue:c(n._formValues,t,c(n._defaultValues,t,e.defaultValue)),exact:!0}),A=Bt({control:n,name:t,exact:!0}),x=b.useRef(e),w=b.useRef(n.register(t,{...e.rules,value:y,...Q(e.disabled)?{disabled:e.disabled}:{}})),E=b.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!c(A.errors,t)},isDirty:{enumerable:!0,get:()=>!!c(A.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!c(A.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!c(A.validatingFields,t)},error:{enumerable:!0,get:()=>c(A.errors,t)}}),[A,t]),F=b.useCallback(P=>w.current.onChange({target:{value:yt(P),name:t},type:me.CHANGE}),[t]),R=b.useCallback(()=>w.current.onBlur({target:{value:c(n._formValues,t),name:t},type:me.BLUR}),[t,n._formValues]),G=b.useCallback(P=>{const W=c(n._fields,t);W&&P&&(W._f.ref={focus:()=>P.focus(),select:()=>P.select(),setCustomValidity:m=>P.setCustomValidity(m),reportValidity:()=>P.reportValidity()})},[n._fields,t]),I=b.useMemo(()=>({name:t,value:y,...Q(i)||A.disabled?{disabled:A.disabled||i}:{},onChange:F,onBlur:R,ref:G}),[t,i,A.disabled,F,R,G,y]);return b.useEffect(()=>{const P=n._options.shouldUnregister||u;n.register(t,{...x.current.rules,...Q(x.current.disabled)?{disabled:x.current.disabled}:{}});const W=(m,Y)=>{const $=c(n._fields,m);$&&$._f&&($._f.mount=Y)};if(W(t,!0),P){const m=T(c(n._options.defaultValues,t));C(n._defaultValues,t,m),O(c(n._formValues,t))&&C(n._formValues,t,m)}return!d&&n.register(t),()=>{(d?P&&!n._state.action:P)?n.unregister(t):W(t,!1)}},[t,n,d,u]),b.useEffect(()=>{n._setDisabledField({disabled:i,name:t})},[i,t,n]),b.useMemo(()=>({field:I,formState:A,fieldState:E}),[I,A,E])}const sr=e=>e.render(Pt(e));var Wt=(e,s,t,i,n)=>s?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[i]:n||!0}}:{},z=e=>Array.isArray(e)?e:[e],st=()=>{let e=[];return{get observers(){return e},next:n=>{for(const u of e)u.next&&u.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(u=>u!==n)}}),unsubscribe:()=>{e=[]}}},Be=e=>j(e)||!dt(e);function le(e,s){if(Be(e)||Be(s))return e===s;if(ue(e)&&ue(s))return e.getTime()===s.getTime();const t=Object.keys(e),i=Object.keys(s);if(t.length!==i.length)return!1;for(const n of t){const u=e[n];if(!i.includes(n))return!1;if(n!=="ref"){const d=s[n];if(ue(u)&&ue(d)||U(u)&&U(d)||Array.isArray(u)&&Array.isArray(d)?!le(u,d):u!==d)return!1}}return!0}var H=e=>U(e)&&!Object.keys(e).length,He=e=>e.type==="file",te=e=>typeof e=="function",Ae=e=>{if(!We)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},bt=e=>e.type==="select-multiple",$e=e=>e.type==="radio",qt=e=>$e(e)||_e(e),Ee=e=>Ae(e)&&e.isConnected;function Ht(e,s){const t=s.slice(0,-1).length;let i=0;for(;i<t;)e=O(e)?i++:e[s[i++]];return e}function $t(e){for(const s in e)if(e.hasOwnProperty(s)&&!O(e[s]))return!1;return!0}function B(e,s){const t=Array.isArray(s)?s:qe(s)?[s]:_t(s),i=t.length===1?e:Ht(e,t),n=t.length-1,u=t[n];return i&&delete i[u],n!==0&&(U(i)&&H(i)||Array.isArray(i)&&$t(i))&&B(e,t.slice(0,-1)),e}var mt=e=>{for(const s in e)if(te(e[s]))return!0;return!1};function Fe(e,s={}){const t=Array.isArray(e);if(U(e)||t)for(const i in e)Array.isArray(e[i])||U(e[i])&&!mt(e[i])?(s[i]=Array.isArray(e[i])?[]:{},Fe(e[i],s[i])):j(e[i])||(s[i]=!0);return s}function At(e,s,t){const i=Array.isArray(e);if(U(e)||i)for(const n in e)Array.isArray(e[n])||U(e[n])&&!mt(e[n])?O(s)||Be(t[n])?t[n]=Array.isArray(e[n])?Fe(e[n],[]):{...Fe(e[n])}:At(e[n],j(s)?{}:s[n],t[n]):t[n]=!le(e[n],s[n]);return t}var ye=(e,s)=>At(e,s,Fe(s));const it={value:!1,isValid:!1},at={value:!0,isValid:!0};var Ft=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!O(e[0].attributes.value)?O(e[0].value)||e[0].value===""?at:{value:e[0].value,isValid:!0}:at:it}return it},Vt=(e,{valueAsNumber:s,valueAsDate:t,setValueAs:i})=>O(e)?e:s?e===""?NaN:e&&+e:t&&se(e)?new Date(e):i?i(e):e;const nt={isValid:!1,value:null};var xt=e=>Array.isArray(e)?e.reduce((s,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:s,nt):nt;function lt(e){const s=e.ref;return He(s)?s.files:$e(s)?xt(e.refs).value:bt(s)?[...s.selectedOptions].map(({value:t})=>t):_e(s)?Ft(e.refs).value:Vt(O(s.value)?e.ref.value:s.value,e)}var jt=(e,s,t,i)=>{const n={};for(const u of e){const d=c(s,u);d&&C(n,u,d._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:i}},Ve=e=>e instanceof RegExp,ge=e=>O(e)?e:Ve(e)?e.source:U(e)?Ve(e.value)?e.value.source:e.value:e,ce=e=>({isOnSubmit:!e||e===ee.onSubmit,isOnBlur:e===ee.onBlur,isOnChange:e===ee.onChange,isOnAll:e===ee.all,isOnTouch:e===ee.onTouched});const ut="AsyncFunction";var Kt=e=>!!e&&!!e.validate&&!!(te(e.validate)&&e.validate.constructor.name===ut||U(e.validate)&&Object.values(e.validate).find(s=>s.constructor.name===ut)),zt=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),Ie=(e,s,t)=>!t&&(s.watchAll||s.watch.has(e)||[...s.watch].some(i=>e.startsWith(i)&&/^\.\w+/.test(e.slice(i.length))));const fe=(e,s,t,i)=>{for(const n of t||Object.keys(e)){const u=c(e,n);if(u){const{_f:d,...y}=u;if(d){if(d.refs&&d.refs[0]&&s(d.refs[0],n)&&!i)return!0;if(d.ref&&s(d.ref,d.name)&&!i)return!0;if(fe(y,s))break}else if(U(y)&&fe(y,s))break}}};function ot(e,s,t){const i=c(e,t);if(i||qe(t))return{error:i,name:t};const n=t.split(".");for(;n.length;){const u=n.join("."),d=c(s,u),y=c(e,u);if(d&&!Array.isArray(d)&&t!==u)return{name:t};if(y&&y.type)return{name:u,error:y};n.pop()}return{name:t}}var Gt=(e,s,t,i)=>{t(e);const{name:n,...u}=e;return H(u)||Object.keys(u).length>=Object.keys(s).length||Object.keys(u).find(d=>s[d]===(!i||ee.all))},Yt=(e,s,t)=>!e||!s||e===s||z(e).some(i=>i&&(t?i===s:i.startsWith(s)||s.startsWith(i))),Jt=(e,s,t,i,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(s||e):(t?i.isOnBlur:n.isOnBlur)?!e:(t?i.isOnChange:n.isOnChange)?e:!0,Qt=(e,s)=>!he(c(e,s)).length&&B(e,s),St=(e,s,t)=>{const i=z(c(e,t));return C(i,"root",s[t]),C(e,t,i),e},be=e=>se(e);function ct(e,s,t="validate"){if(be(e)||Array.isArray(e)&&e.every(be)||Q(e)&&!e)return{type:t,message:be(e)?e:"",ref:s}}var oe=e=>U(e)&&!Ve(e)?e:{value:e,message:""},Pe=async(e,s,t,i,n,u)=>{const{ref:d,refs:y,required:A,maxLength:x,minLength:w,min:E,max:F,pattern:R,validate:G,name:I,valueAsNumber:P,mount:W}=e._f,m=c(t,I);if(!W||s.has(I))return{};const Y=y?y[0]:d,$=p=>{n&&Y.reportValidity&&(Y.setCustomValidity(Q(p)?"":p||""),Y.reportValidity())},M={},v=$e(d),h=_e(d),V=v||h,D=(P||He(d))&&O(d.value)&&O(m)||Ae(d)&&d.value===""||m===""||Array.isArray(m)&&!m.length,J=Wt.bind(null,I,i,M),X=(p,S,L,K=ie.maxLength,Z=ie.minLength)=>{const re=p?S:L;M[I]={type:p?K:Z,message:re,ref:d,...J(p?K:Z,re)}};if(u?!Array.isArray(m)||!m.length:A&&(!V&&(D||j(m))||Q(m)&&!m||h&&!Ft(y).isValid||v&&!xt(y).isValid)){const{value:p,message:S}=be(A)?{value:!!A,message:A}:oe(A);if(p&&(M[I]={type:ie.required,message:S,ref:Y,...J(ie.required,S)},!i))return $(S),M}if(!D&&(!j(E)||!j(F))){let p,S;const L=oe(F),K=oe(E);if(!j(m)&&!isNaN(m)){const Z=d.valueAsNumber||m&&+m;j(L.value)||(p=Z>L.value),j(K.value)||(S=Z<K.value)}else{const Z=d.valueAsDate||new Date(m),re=ve=>new Date(new Date().toDateString()+" "+ve),ae=d.type=="time",de=d.type=="week";se(L.value)&&m&&(p=ae?re(m)>re(L.value):de?m>L.value:Z>new Date(L.value)),se(K.value)&&m&&(S=ae?re(m)<re(K.value):de?m<K.value:Z<new Date(K.value))}if((p||S)&&(X(!!p,L.message,K.message,ie.max,ie.min),!i))return $(M[I].message),M}if((x||w)&&!D&&(se(m)||u&&Array.isArray(m))){const p=oe(x),S=oe(w),L=!j(p.value)&&m.length>+p.value,K=!j(S.value)&&m.length<+S.value;if((L||K)&&(X(L,p.message,S.message),!i))return $(M[I].message),M}if(R&&!D&&se(m)){const{value:p,message:S}=oe(R);if(Ve(p)&&!m.match(p)&&(M[I]={type:ie.pattern,message:S,ref:d,...J(ie.pattern,S)},!i))return $(S),M}if(G){if(te(G)){const p=await G(m,t),S=ct(p,Y);if(S&&(M[I]={...S,...J(ie.validate,S.message)},!i))return $(S.message),M}else if(U(G)){let p={};for(const S in G){if(!H(p)&&!i)break;const L=ct(await G[S](m,t),Y,S);L&&(p={...L,...J(S,L.message)},$(L.message),i&&(M[I]=p))}if(!H(p)&&(M[I]={ref:Y,...p},!i))return M}}return $(!0),M};const Xt={mode:ee.onSubmit,reValidateMode:ee.onChange,shouldFocusError:!0};function Zt(e={}){let s={...Xt,...e},t={submitCount:0,isDirty:!1,isLoading:te(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1};const i={};let n=U(s.defaultValues)||U(s.values)?T(s.values||s.defaultValues)||{}:{},u=s.shouldUnregister?{}:T(n),d={action:!1,mount:!1,watch:!1},y={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},A,x=0;const w={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let E={...w};const F={array:st(),state:st()},R=ce(s.mode),G=ce(s.reValidateMode),I=s.criteriaMode===ee.all,P=r=>a=>{clearTimeout(x),x=setTimeout(r,a)},W=async r=>{if(!s.disabled&&(w.isValid||E.isValid||r)){const a=s.resolver?H((await D()).errors):await X(i,!0);a!==t.isValid&&F.state.next({isValid:a})}},m=(r,a)=>{!s.disabled&&(w.isValidating||w.validatingFields||E.isValidating||E.validatingFields)&&((r||Array.from(y.mount)).forEach(l=>{l&&(a?C(t.validatingFields,l,a):B(t.validatingFields,l))}),F.state.next({validatingFields:t.validatingFields,isValidating:!H(t.validatingFields)}))},Y=(r,a=[],l,g,f=!0,o=!0)=>{if(g&&l&&!s.disabled){if(d.action=!0,o&&Array.isArray(c(i,r))){const _=l(c(i,r),g.argA,g.argB);f&&C(i,r,_)}if(o&&Array.isArray(c(t.errors,r))){const _=l(c(t.errors,r),g.argA,g.argB);f&&C(t.errors,r,_),Qt(t.errors,r)}if((w.touchedFields||E.touchedFields)&&o&&Array.isArray(c(t.touchedFields,r))){const _=l(c(t.touchedFields,r),g.argA,g.argB);f&&C(t.touchedFields,r,_)}(w.dirtyFields||E.dirtyFields)&&(t.dirtyFields=ye(n,u)),F.state.next({name:r,isDirty:S(r,a),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else C(u,r,a)},$=(r,a)=>{C(t.errors,r,a),F.state.next({errors:t.errors})},M=r=>{t.errors=r,F.state.next({errors:t.errors,isValid:!1})},v=(r,a,l,g)=>{const f=c(i,r);if(f){const o=c(u,r,O(l)?c(n,r):l);O(o)||g&&g.defaultChecked||a?C(u,r,a?o:lt(f._f)):Z(r,o),d.mount&&W()}},h=(r,a,l,g,f)=>{let o=!1,_=!1;const k={name:r};if(!s.disabled){if(!l||g){(w.isDirty||E.isDirty)&&(_=t.isDirty,t.isDirty=k.isDirty=S(),o=_!==k.isDirty);const N=le(c(n,r),a);_=!!c(t.dirtyFields,r),N?B(t.dirtyFields,r):C(t.dirtyFields,r,!0),k.dirtyFields=t.dirtyFields,o=o||(w.dirtyFields||E.dirtyFields)&&_!==!N}if(l){const N=c(t.touchedFields,r);N||(C(t.touchedFields,r,l),k.touchedFields=t.touchedFields,o=o||(w.touchedFields||E.touchedFields)&&N!==l)}o&&f&&F.state.next(k)}return o?k:{}},V=(r,a,l,g)=>{const f=c(t.errors,r),o=(w.isValid||E.isValid)&&Q(a)&&t.isValid!==a;if(s.delayError&&l?(A=P(()=>$(r,l)),A(s.delayError)):(clearTimeout(x),A=null,l?C(t.errors,r,l):B(t.errors,r)),(l?!le(f,l):f)||!H(g)||o){const _={...g,...o&&Q(a)?{isValid:a}:{},errors:t.errors,name:r};t={...t,..._},F.state.next(_)}},D=async r=>{m(r,!0);const a=await s.resolver(u,s.context,jt(r||y.mount,i,s.criteriaMode,s.shouldUseNativeValidation));return m(r),a},J=async r=>{const{errors:a}=await D(r);if(r)for(const l of r){const g=c(a,l);g?C(t.errors,l,g):B(t.errors,l)}else t.errors=a;return a},X=async(r,a,l={valid:!0})=>{for(const g in r){const f=r[g];if(f){const{_f:o,..._}=f;if(o){const k=y.array.has(o.name),N=f._f&&Kt(f._f);N&&w.validatingFields&&m([g],!0);const q=await Pe(f,y.disabled,u,I,s.shouldUseNativeValidation&&!a,k);if(N&&w.validatingFields&&m([g]),q[o.name]&&(l.valid=!1,a))break;!a&&(c(q,o.name)?k?St(t.errors,q,o.name):C(t.errors,o.name,q[o.name]):B(t.errors,o.name))}!H(_)&&await X(_,a,l)}}return l.valid},p=()=>{for(const r of y.unMount){const a=c(i,r);a&&(a._f.refs?a._f.refs.every(l=>!Ee(l)):!Ee(a._f.ref))&&we(r)}y.unMount=new Set},S=(r,a)=>!s.disabled&&(r&&a&&C(u,r,a),!le(je(),n)),L=(r,a,l)=>vt(r,y,{...d.mount?u:O(a)?n:se(r)?{[r]:a}:a},l,a),K=r=>he(c(d.mount?u:n,r,s.shouldUnregister?c(n,r,[]):[])),Z=(r,a,l={})=>{const g=c(i,r);let f=a;if(g){const o=g._f;o&&(!o.disabled&&C(u,r,Vt(a,o)),f=Ae(o.ref)&&j(a)?"":a,bt(o.ref)?[...o.ref.options].forEach(_=>_.selected=f.includes(_.value)):o.refs?_e(o.ref)?o.refs.length>1?o.refs.forEach(_=>(!_.defaultChecked||!_.disabled)&&(_.checked=Array.isArray(f)?!!f.find(k=>k===_.value):f===_.value)):o.refs[0]&&(o.refs[0].checked=!!f):o.refs.forEach(_=>_.checked=_.value===f):He(o.ref)?o.ref.value="":(o.ref.value=f,o.ref.type||F.state.next({name:r,values:T(u)})))}(l.shouldDirty||l.shouldTouch)&&h(r,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&Se(r)},re=(r,a,l)=>{for(const g in a){const f=a[g],o=`${r}.${g}`,_=c(i,o);(y.array.has(r)||U(f)||_&&!_._f)&&!ue(f)?re(o,f,l):Z(o,f,l)}},ae=(r,a,l={})=>{const g=c(i,r),f=y.array.has(r),o=T(a);C(u,r,o),f?(F.array.next({name:r,values:T(u)}),(w.isDirty||w.dirtyFields||E.isDirty||E.dirtyFields)&&l.shouldDirty&&F.state.next({name:r,dirtyFields:ye(n,u),isDirty:S(r,o)})):g&&!g._f&&!j(o)?re(r,o,l):Z(r,o,l),Ie(r,y)&&F.state.next({...t}),F.state.next({name:d.mount?r:void 0,values:T(u)})},de=async r=>{d.mount=!0;const a=r.target;let l=a.name,g=!0;const f=c(i,l),o=_=>{g=Number.isNaN(_)||ue(_)&&isNaN(_.getTime())||le(_,c(u,l,_))};if(f){let _,k;const N=a.type?lt(f._f):yt(r),q=r.type===me.BLUR||r.type===me.FOCUS_OUT,Rt=!zt(f._f)&&!s.resolver&&!c(t.errors,l)&&!f._f.deps||Jt(q,c(t.touchedFields,l),t.isSubmitted,G,R),De=Ie(l,y,q);C(u,l,N),q?(f._f.onBlur&&f._f.onBlur(r),A&&A(0)):f._f.onChange&&f._f.onChange(r);const pe=h(l,N,q),Tt=!H(pe)||De;if(!q&&F.state.next({name:l,type:r.type,values:T(u)}),Rt)return(w.isValid||E.isValid)&&(s.mode==="onBlur"?q&&W():q||W()),Tt&&F.state.next({name:l,...De?{}:pe});if(!q&&De&&F.state.next({...t}),s.resolver){const{errors:tt}=await D([l]);if(o(N),g){const Lt=ot(t.errors,i,l),rt=ot(tt,i,Lt.name||l);_=rt.error,l=rt.name,k=H(tt)}}else m([l],!0),_=(await Pe(f,y.disabled,u,I,s.shouldUseNativeValidation))[l],m([l]),o(N),g&&(_?k=!1:(w.isValid||E.isValid)&&(k=await X(i,!0)));g&&(f._f.deps&&Se(f._f.deps),V(l,k,_,pe))}},ve=(r,a)=>{if(c(t.errors,a)&&r.focus)return r.focus(),1},Se=async(r,a={})=>{let l,g;const f=z(r);if(s.resolver){const o=await J(O(r)?r:f);l=H(o),g=r?!f.some(_=>c(o,_)):l}else r?(g=(await Promise.all(f.map(async o=>{const _=c(i,o);return await X(_&&_._f?{[o]:_}:_)}))).every(Boolean),!(!g&&!t.isValid)&&W()):g=l=await X(i);return F.state.next({...!se(r)||(w.isValid||E.isValid)&&l!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:l}:{},errors:t.errors}),a.shouldFocus&&!g&&fe(i,ve,r?f:y.mount),g},je=r=>{const a={...d.mount?u:n};return O(r)?a:se(r)?c(a,r):r.map(l=>c(a,l))},Ke=(r,a)=>({invalid:!!c((a||t).errors,r),isDirty:!!c((a||t).dirtyFields,r),error:c((a||t).errors,r),isValidating:!!c(t.validatingFields,r),isTouched:!!c((a||t).touchedFields,r)}),wt=r=>{r&&z(r).forEach(a=>B(t.errors,a)),F.state.next({errors:r?t.errors:{}})},ze=(r,a,l)=>{const g=(c(i,r,{_f:{}})._f||{}).ref,f=c(t.errors,r)||{},{ref:o,message:_,type:k,...N}=f;C(t.errors,r,{...N,...a,ref:g}),F.state.next({name:r,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&g&&g.focus&&g.focus()},kt=(r,a)=>te(r)?F.state.subscribe({next:l=>r(L(void 0,a),l)}):L(r,a,!0),Ge=r=>F.state.subscribe({next:a=>{Yt(r.name,a.name,r.exact)&&Gt(a,r.formState||w,Ot,r.reRenderRoot)&&r.callback({values:{...u},...t,...a})}}).unsubscribe,Dt=r=>(d.mount=!0,E={...E,...r.formState},Ge({...r,formState:E})),we=(r,a={})=>{for(const l of r?z(r):y.mount)y.mount.delete(l),y.array.delete(l),a.keepValue||(B(i,l),B(u,l)),!a.keepError&&B(t.errors,l),!a.keepDirty&&B(t.dirtyFields,l),!a.keepTouched&&B(t.touchedFields,l),!a.keepIsValidating&&B(t.validatingFields,l),!s.shouldUnregister&&!a.keepDefaultValue&&B(n,l);F.state.next({values:T(u)}),F.state.next({...t,...a.keepDirty?{isDirty:S()}:{}}),!a.keepIsValid&&W()},Ye=({disabled:r,name:a})=>{(Q(r)&&d.mount||r||y.disabled.has(a))&&(r?y.disabled.add(a):y.disabled.delete(a))},ke=(r,a={})=>{let l=c(i,r);const g=Q(a.disabled)||Q(s.disabled);return C(i,r,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:r}},name:r,mount:!0,...a}}),y.mount.add(r),l?Ye({disabled:Q(a.disabled)?a.disabled:s.disabled,name:r}):v(r,!0,a.value),{...g?{disabled:a.disabled||s.disabled}:{},...s.progressive?{required:!!a.required,min:ge(a.min),max:ge(a.max),minLength:ge(a.minLength),maxLength:ge(a.maxLength),pattern:ge(a.pattern)}:{},name:r,onChange:de,onBlur:de,ref:f=>{if(f){ke(r,a),l=c(i,r);const o=O(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,_=qt(o),k=l._f.refs||[];if(_?k.find(N=>N===o):o===l._f.ref)return;C(i,r,{_f:{...l._f,..._?{refs:[...k.filter(Ee),o,...Array.isArray(c(n,r))?[{}]:[]],ref:{type:o.type,name:r}}:{ref:o}}}),v(r,!1,void 0,o)}else l=c(i,r,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||a.shouldUnregister)&&!(gt(y.array,r)&&d.action)&&y.unMount.add(r)}}},Je=()=>s.shouldFocusError&&fe(i,ve,y.mount),pt=r=>{Q(r)&&(F.state.next({disabled:r}),fe(i,(a,l)=>{const g=c(i,l);g&&(a.disabled=g._f.disabled||r,Array.isArray(g._f.refs)&&g._f.refs.forEach(f=>{f.disabled=g._f.disabled||r}))},0,!1))},Qe=(r,a)=>async l=>{let g;l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let f=T(u);if(F.state.next({isSubmitting:!0}),s.resolver){const{errors:o,values:_}=await D();t.errors=o,f=_}else await X(i);if(y.disabled.size)for(const o of y.disabled)C(f,o,void 0);if(B(t.errors,"root"),H(t.errors)){F.state.next({errors:{}});try{await r(f,l)}catch(o){g=o}}else a&&await a({...t.errors},l),Je(),setTimeout(Je);if(F.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:H(t.errors)&&!g,submitCount:t.submitCount+1,errors:t.errors}),g)throw g},Et=(r,a={})=>{c(i,r)&&(O(a.defaultValue)?ae(r,T(c(n,r))):(ae(r,a.defaultValue),C(n,r,T(a.defaultValue))),a.keepTouched||B(t.touchedFields,r),a.keepDirty||(B(t.dirtyFields,r),t.isDirty=a.defaultValue?S(r,T(c(n,r))):S()),a.keepError||(B(t.errors,r),w.isValid&&W()),F.state.next({...t}))},Xe=(r,a={})=>{const l=r?T(r):n,g=T(l),f=H(r),o=f?n:g;if(a.keepDefaultValues||(n=l),!a.keepValues){if(a.keepDirtyValues){const _=new Set([...y.mount,...Object.keys(ye(n,u))]);for(const k of Array.from(_))c(t.dirtyFields,k)?C(o,k,c(u,k)):ae(k,c(o,k))}else{if(We&&O(r))for(const _ of y.mount){const k=c(i,_);if(k&&k._f){const N=Array.isArray(k._f.refs)?k._f.refs[0]:k._f.ref;if(Ae(N)){const q=N.closest("form");if(q){q.reset();break}}}}for(const _ of y.mount)ae(_,c(o,_))}u=T(o),F.array.next({values:{...o}}),F.state.next({values:{...o}})}y={mount:a.keepDirtyValues?y.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},d.mount=!w.isValid||!!a.keepIsValid||!!a.keepDirtyValues,d.watch=!!s.shouldUnregister,F.state.next({submitCount:a.keepSubmitCount?t.submitCount:0,isDirty:f?!1:a.keepDirty?t.isDirty:!!(a.keepDefaultValues&&!le(r,n)),isSubmitted:a.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:f?{}:a.keepDirtyValues?a.keepDefaultValues&&u?ye(n,u):t.dirtyFields:a.keepDefaultValues&&r?ye(n,r):a.keepDirty?t.dirtyFields:{},touchedFields:a.keepTouched?t.touchedFields:{},errors:a.keepErrors?t.errors:{},isSubmitSuccessful:a.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},Ze=(r,a)=>Xe(te(r)?r(u):r,a),Ct=(r,a={})=>{const l=c(i,r),g=l&&l._f;if(g){const f=g.refs?g.refs[0]:g.ref;f.focus&&(f.focus(),a.shouldSelect&&te(f.select)&&f.select())}},Ot=r=>{t={...t,...r}},et={control:{register:ke,unregister:we,getFieldState:Ke,handleSubmit:Qe,setError:ze,_subscribe:Ge,_runSchema:D,_getWatch:L,_getDirty:S,_setValid:W,_setFieldArray:Y,_setDisabledField:Ye,_setErrors:M,_getFieldArray:K,_reset:Xe,_resetDefaultValues:()=>te(s.defaultValues)&&s.defaultValues().then(r=>{Ze(r,s.resetOptions),F.state.next({isLoading:!1})}),_removeUnmounted:p,_disableForm:pt,_subjects:F,_proxyFormState:w,get _fields(){return i},get _formValues(){return u},get _state(){return d},set _state(r){d=r},get _defaultValues(){return n},get _names(){return y},set _names(r){y=r},get _formState(){return t},get _options(){return s},set _options(r){s={...s,...r}}},subscribe:Dt,trigger:Se,register:ke,handleSubmit:Qe,watch:kt,setValue:ae,getValues:je,reset:Ze,resetField:Et,clearErrors:wt,unregister:we,setError:ze,setFocus:Ct,getFieldState:Ke};return{...et,formControl:et}}var ne=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{const t=(Math.random()*16+e)%16|0;return(s=="x"?t:t&3|8).toString(16)})},Ce=(e,s,t={})=>t.shouldFocus||O(t.shouldFocus)?t.focusName||`${e}.${O(t.focusIndex)?s:t.focusIndex}.`:"",Oe=(e,s)=>[...e,...z(s)],Re=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Te(e,s,t){return[...e.slice(0,s),...z(t),...e.slice(s)]}var Le=(e,s,t)=>Array.isArray(e)?(O(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(s,1)[0]),e):[],Ue=(e,s)=>[...z(s),...z(e)];function er(e,s){let t=0;const i=[...e];for(const n of s)i.splice(n-t,1),t++;return he(i).length?i:[]}var Me=(e,s)=>O(s)?[]:er(e,z(s).sort((t,i)=>t-i)),Ne=(e,s,t)=>{[e[s],e[t]]=[e[t],e[s]]},ft=(e,s,t)=>(e[s]=t,e);function ir(e){const s=xe(),{control:t=s.control,name:i,keyName:n="id",shouldUnregister:u,rules:d}=e,[y,A]=b.useState(t._getFieldArray(i)),x=b.useRef(t._getFieldArray(i).map(ne)),w=b.useRef(y),E=b.useRef(i),F=b.useRef(!1);E.current=i,w.current=y,t._names.array.add(i),d&&t.register(i,d),b.useEffect(()=>t._subjects.array.subscribe({next:({values:v,name:h})=>{if(h===E.current||!h){const V=c(v,E.current);Array.isArray(V)&&(A(V),x.current=V.map(ne))}}}).unsubscribe,[t]);const R=b.useCallback(v=>{F.current=!0,t._setFieldArray(i,v)},[t,i]),G=(v,h)=>{const V=z(T(v)),D=Oe(t._getFieldArray(i),V);t._names.focus=Ce(i,D.length-1,h),x.current=Oe(x.current,V.map(ne)),R(D),A(D),t._setFieldArray(i,D,Oe,{argA:Re(v)})},I=(v,h)=>{const V=z(T(v)),D=Ue(t._getFieldArray(i),V);t._names.focus=Ce(i,0,h),x.current=Ue(x.current,V.map(ne)),R(D),A(D),t._setFieldArray(i,D,Ue,{argA:Re(v)})},P=v=>{const h=Me(t._getFieldArray(i),v);x.current=Me(x.current,v),R(h),A(h),!Array.isArray(c(t._fields,i))&&C(t._fields,i,void 0),t._setFieldArray(i,h,Me,{argA:v})},W=(v,h,V)=>{const D=z(T(h)),J=Te(t._getFieldArray(i),v,D);t._names.focus=Ce(i,v,V),x.current=Te(x.current,v,D.map(ne)),R(J),A(J),t._setFieldArray(i,J,Te,{argA:v,argB:Re(h)})},m=(v,h)=>{const V=t._getFieldArray(i);Ne(V,v,h),Ne(x.current,v,h),R(V),A(V),t._setFieldArray(i,V,Ne,{argA:v,argB:h},!1)},Y=(v,h)=>{const V=t._getFieldArray(i);Le(V,v,h),Le(x.current,v,h),R(V),A(V),t._setFieldArray(i,V,Le,{argA:v,argB:h},!1)},$=(v,h)=>{const V=T(h),D=ft(t._getFieldArray(i),v,V);x.current=[...D].map((J,X)=>!J||X===v?ne():x.current[X]),R(D),A([...D]),t._setFieldArray(i,D,ft,{argA:v,argB:V},!0,!1)},M=v=>{const h=z(T(v));x.current=h.map(ne),R([...h]),A([...h]),t._setFieldArray(i,[...h],V=>V,{},!0,!1)};return b.useEffect(()=>{if(t._state.action=!1,Ie(i,t._names)&&t._subjects.state.next({...t._formState}),F.current&&(!ce(t._options.mode).isOnSubmit||t._formState.isSubmitted)&&!ce(t._options.reValidateMode).isOnSubmit)if(t._options.resolver)t._runSchema([i]).then(v=>{const h=c(v.errors,i),V=c(t._formState.errors,i);(V?!h&&V.type||h&&(V.type!==h.type||V.message!==h.message):h&&h.type)&&(h?C(t._formState.errors,i,h):B(t._formState.errors,i),t._subjects.state.next({errors:t._formState.errors}))});else{const v=c(t._fields,i);v&&v._f&&!(ce(t._options.reValidateMode).isOnSubmit&&ce(t._options.mode).isOnSubmit)&&Pe(v,t._names.disabled,t._formValues,t._options.criteriaMode===ee.all,t._options.shouldUseNativeValidation,!0).then(h=>!H(h)&&t._subjects.state.next({errors:St(t._formState.errors,h,i)}))}t._subjects.state.next({name:i,values:T(t._formValues)}),t._names.focus&&fe(t._fields,(v,h)=>{if(t._names.focus&&h.startsWith(t._names.focus)&&v.focus)return v.focus(),1}),t._names.focus="",t._setValid(),F.current=!1},[y,i,t]),b.useEffect(()=>(!c(t._formValues,i)&&t._setFieldArray(i),()=>{const v=(h,V)=>{const D=c(t._fields,h);D&&D._f&&(D._f.mount=V)};t._options.shouldUnregister||u?t.unregister(i):v(i,!1)}),[i,t,n,u]),{swap:b.useCallback(m,[R,i,t]),move:b.useCallback(Y,[R,i,t]),prepend:b.useCallback(I,[R,i,t]),append:b.useCallback(G,[R,i,t]),remove:b.useCallback(P,[R,i,t]),insert:b.useCallback(W,[R,i,t]),update:b.useCallback($,[R,i,t]),replace:b.useCallback(M,[R,i,t]),fields:b.useMemo(()=>y.map((v,h)=>({...v,[n]:x.current[h]||ne()})),[y,n])}}function ar(e={}){const s=b.useRef(void 0),t=b.useRef(void 0),[i,n]=b.useState({isDirty:!1,isValidating:!1,isLoading:te(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:te(e.defaultValues)?void 0:e.defaultValues});s.current||(s.current={...e.formControl?e.formControl:Zt(e),formState:i},e.formControl&&e.defaultValues&&!te(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const u=s.current.control;return u._options=e,b.useLayoutEffect(()=>u._subscribe({formState:u._proxyFormState,callback:()=>n({...u._formState}),reRenderRoot:!0}),[u]),b.useEffect(()=>u._disableForm(e.disabled),[u,e.disabled]),b.useEffect(()=>{if(u._proxyFormState.isDirty){const d=u._getDirty();d!==i.isDirty&&u._subjects.state.next({isDirty:d})}},[u,i.isDirty]),b.useEffect(()=>{e.values&&!le(e.values,t.current)?(u._reset(e.values,u._options.resetOptions),t.current=e.values,n(d=>({...d}))):u._resetDefaultValues()},[e.values,u]),b.useEffect(()=>{e.errors&&!H(e.errors)&&u._setErrors(e.errors)},[e.errors,u]),b.useEffect(()=>{u._state.mount||(u._setValid(),u._state.mount=!0),u._state.watch&&(u._state.watch=!1,u._subjects.state.next({...u._formState})),u._removeUnmounted()}),b.useEffect(()=>{e.shouldUnregister&&u._subjects.state.next({values:u._getWatch()})},[e.shouldUnregister,u]),s.current.formState=ht(i,u),s.current}export{sr as C,It as a,ir as b,ar as u};
@@ -1 +1 @@
1
- import{C as i}from"./codemirror.es-q3z3D3fp.js";import"./index-BDHvuJA-.js";import"./index-DTb1YjkO.js";var y=Object.defineProperty,u=(e,t)=>y(e,"name",{value:t,configurable:!0});i.defineOption("info",!1,(e,t,n)=>{if(n&&n!==i.Init){const o=e.state.info.onMouseOver;i.off(e.getWrapperElement(),"mouseover",o),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const o=e.state.info=v(t);o.onMouseOver=h.bind(null,e),i.on(e.getWrapperElement(),"mouseover",o.onMouseOver)}});function v(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}u(v,"createState");function g(e){const t=e.state.info.options;return(t==null?void 0:t.hoverTime)||500}u(g,"getHoverTime");function h(e,t){const n=e.state.info,o=t.target||t.srcElement;if(!(o instanceof HTMLElement)||o.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const s=o.getBoundingClientRect(),r=u(function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(f,a)},"onMouseMove"),p=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},"onMouseOut"),f=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),n.hoverTimeout=void 0,T(e,s)},"onHover"),a=g(e);n.hoverTimeout=setTimeout(f,a),i.on(document,"mousemove",r),i.on(e.getWrapperElement(),"mouseout",p)}u(h,"onMouseOver");function T(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),s=e.state.info.options,r=s.render||e.getHelper(n,"info");if(r){const p=e.getTokenAt(n,!0);if(p){const f=r(p,s,e,n);f&&M(e,t,f)}}}u(T,"onMouseHover");function M(e,t,n){const o=document.createElement("div");o.className="CodeMirror-info",o.appendChild(n),document.body.appendChild(o);const s=o.getBoundingClientRect(),r=window.getComputedStyle(o),p=s.right-s.left+parseFloat(r.marginLeft)+parseFloat(r.marginRight),f=s.bottom-s.top+parseFloat(r.marginTop)+parseFloat(r.marginBottom);let a=t.bottom;f>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(a=t.top-f),a<0&&(a=t.bottom);let l=Math.max(0,window.innerWidth-p-15);l>t.left&&(l=t.left),o.style.opacity="1",o.style.top=a+"px",o.style.left=l+"px";let d;const c=u(function(){clearTimeout(d)},"onMouseOverPopup"),m=u(function(){clearTimeout(d),d=setTimeout(O,200)},"onMouseOut"),O=u(function(){i.off(o,"mouseover",c),i.off(o,"mouseout",m),i.off(e.getWrapperElement(),"mouseout",m),o.style.opacity?(o.style.opacity="0",setTimeout(()=>{o.parentNode&&o.parentNode.removeChild(o)},600)):o.parentNode&&o.parentNode.removeChild(o)},"hidePopup");i.on(o,"mouseover",c),i.on(o,"mouseout",m),i.on(e.getWrapperElement(),"mouseout",m)}u(M,"showPopup");
1
+ import{C as i}from"./codemirror.es-B3B1JR3x.js";import"./index-CwcDS29n.js";import"./index-BXOD69ua.js";var y=Object.defineProperty,u=(e,t)=>y(e,"name",{value:t,configurable:!0});i.defineOption("info",!1,(e,t,n)=>{if(n&&n!==i.Init){const o=e.state.info.onMouseOver;i.off(e.getWrapperElement(),"mouseover",o),clearTimeout(e.state.info.hoverTimeout),delete e.state.info}if(t){const o=e.state.info=v(t);o.onMouseOver=h.bind(null,e),i.on(e.getWrapperElement(),"mouseover",o.onMouseOver)}});function v(e){return{options:e instanceof Function?{render:e}:e===!0?{}:e}}u(v,"createState");function g(e){const t=e.state.info.options;return(t==null?void 0:t.hoverTime)||500}u(g,"getHoverTime");function h(e,t){const n=e.state.info,o=t.target||t.srcElement;if(!(o instanceof HTMLElement)||o.nodeName!=="SPAN"||n.hoverTimeout!==void 0)return;const s=o.getBoundingClientRect(),r=u(function(){clearTimeout(n.hoverTimeout),n.hoverTimeout=setTimeout(f,a)},"onMouseMove"),p=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),clearTimeout(n.hoverTimeout),n.hoverTimeout=void 0},"onMouseOut"),f=u(function(){i.off(document,"mousemove",r),i.off(e.getWrapperElement(),"mouseout",p),n.hoverTimeout=void 0,T(e,s)},"onHover"),a=g(e);n.hoverTimeout=setTimeout(f,a),i.on(document,"mousemove",r),i.on(e.getWrapperElement(),"mouseout",p)}u(h,"onMouseOver");function T(e,t){const n=e.coordsChar({left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}),s=e.state.info.options,r=s.render||e.getHelper(n,"info");if(r){const p=e.getTokenAt(n,!0);if(p){const f=r(p,s,e,n);f&&M(e,t,f)}}}u(T,"onMouseHover");function M(e,t,n){const o=document.createElement("div");o.className="CodeMirror-info",o.appendChild(n),document.body.appendChild(o);const s=o.getBoundingClientRect(),r=window.getComputedStyle(o),p=s.right-s.left+parseFloat(r.marginLeft)+parseFloat(r.marginRight),f=s.bottom-s.top+parseFloat(r.marginTop)+parseFloat(r.marginBottom);let a=t.bottom;f>window.innerHeight-t.bottom-15&&t.top>window.innerHeight-t.bottom&&(a=t.top-f),a<0&&(a=t.bottom);let l=Math.max(0,window.innerWidth-p-15);l>t.left&&(l=t.left),o.style.opacity="1",o.style.top=a+"px",o.style.left=l+"px";let d;const c=u(function(){clearTimeout(d)},"onMouseOverPopup"),m=u(function(){clearTimeout(d),d=setTimeout(O,200)},"onMouseOut"),O=u(function(){i.off(o,"mouseover",c),i.off(o,"mouseout",m),i.off(e.getWrapperElement(),"mouseout",m),o.style.opacity?(o.style.opacity="0",setTimeout(()=>{o.parentNode&&o.parentNode.removeChild(o)},600)):o.parentNode&&o.parentNode.removeChild(o)},"hidePopup");i.on(o,"mouseover",c),i.on(o,"mouseout",m),i.on(e.getWrapperElement(),"mouseout",m)}u(M,"showPopup");
@@ -1 +1 @@
1
- import{C as h}from"./codemirror.es-q3z3D3fp.js";import{g as E,a as C,b as N,c as _,d as V,e as x}from"./SchemaReference.es-Dfqhb0uS.js";import"./info-addon.es-DKtNhOCh.js";import{Y as A,r as F}from"./index-BDHvuJA-.js";import"./index-DTb1YjkO.js";import"./introspection.es-CPJcz6nz.js";import"./forEachState.es-D8bf0zSr.js";var L=Object.defineProperty,l=(r,e)=>L(r,"name",{value:e,configurable:!0});h.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const i=r.state,n=i.kind,d=i.step,c=E(e.schema,r.state);if(n==="Field"&&d===0&&c.fieldDef||n==="AliasedField"&&d===2&&c.fieldDef){const a=document.createElement("div");return o(a,c,e),u(a,e,c.fieldDef),a}else if(n==="Directive"&&d===1&&c.directiveDef){const a=document.createElement("div");return f(a,c,e),u(a,e,c.directiveDef),a}else if(n==="Argument"&&d===0&&c.argDef){const a=document.createElement("div");return p(a,c,e),u(a,e,c.argDef),a}else if(n==="EnumValue"&&c.enumValue&&c.enumValue.description){const a=document.createElement("div");return D(a,c,e),u(a,e,c.enumValue),a}else if(n==="NamedType"&&c.type&&c.type.description){const a=document.createElement("div");return m(a,c,e,c.type),u(a,e,c.type),a}});function o(r,e,i){s(r,e,i),v(r,e,i,e.type)}l(o,"renderField");function s(r,e,i){var n;const d=((n=e.fieldDef)===null||n===void 0?void 0:n.name)||"";d.slice(0,2)!=="__"&&(m(r,e,i,e.parentType),t(r,".")),t(r,d,"field-name",i,C(e))}l(s,"renderQualifiedField");function f(r,e,i){var n;const d="@"+(((n=e.directiveDef)===null||n===void 0?void 0:n.name)||"");t(r,d,"directive-name",i,N(e))}l(f,"renderDirective");function p(r,e,i){var n;e.directiveDef?f(r,e,i):e.fieldDef&&s(r,e,i);const d=((n=e.argDef)===null||n===void 0?void 0:n.name)||"";t(r,"("),t(r,d,"arg-name",i,_(e)),v(r,e,i,e.inputType),t(r,")")}l(p,"renderArg");function v(r,e,i,n){t(r,": "),m(r,e,i,n)}l(v,"renderTypeAnnotation");function D(r,e,i){var n;const d=((n=e.enumValue)===null||n===void 0?void 0:n.name)||"";m(r,e,i,e.inputType),t(r,"."),t(r,d,"enum-value",i,V(e))}l(D,"renderEnumValue");function m(r,e,i,n){n instanceof A?(m(r,e,i,n.ofType),t(r,"!")):n instanceof F?(t(r,"["),m(r,e,i,n.ofType),t(r,"]")):t(r,(n==null?void 0:n.name)||"","type-name",i,x(e,n))}l(m,"renderType");function u(r,e,i){const n=i.description;if(n){const d=document.createElement("div");d.className="info-description",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n)),r.appendChild(d)}T(r,e,i)}l(u,"renderDescription");function T(r,e,i){const n=i.deprecationReason;if(n){const d=document.createElement("div");d.className="info-deprecation",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n));const c=document.createElement("span");c.className="info-deprecation-label",c.appendChild(document.createTextNode("Deprecated: ")),d.insertBefore(c,d.firstChild),r.appendChild(d)}}l(T,"renderDeprecation");function t(r,e,i="",n={onClick:null},d=null){if(i){const c=n.onClick;let a;c?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",g=>{c(d,g)})):a=document.createElement("span"),a.className=i,a.appendChild(document.createTextNode(e)),r.appendChild(a)}else r.appendChild(document.createTextNode(e))}l(t,"text");
1
+ import{C as h}from"./codemirror.es-B3B1JR3x.js";import{g as E,a as C,b as N,c as _,d as V,e as x}from"./SchemaReference.es-GR-_9bfJ.js";import"./info-addon.es-BrPERxwM.js";import{Y as A,r as F}from"./index-CwcDS29n.js";import"./index-BXOD69ua.js";import"./introspection.es-CPJcz6nz.js";import"./forEachState.es-D8bf0zSr.js";var L=Object.defineProperty,l=(r,e)=>L(r,"name",{value:e,configurable:!0});h.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const i=r.state,n=i.kind,d=i.step,c=E(e.schema,r.state);if(n==="Field"&&d===0&&c.fieldDef||n==="AliasedField"&&d===2&&c.fieldDef){const a=document.createElement("div");return o(a,c,e),u(a,e,c.fieldDef),a}else if(n==="Directive"&&d===1&&c.directiveDef){const a=document.createElement("div");return f(a,c,e),u(a,e,c.directiveDef),a}else if(n==="Argument"&&d===0&&c.argDef){const a=document.createElement("div");return p(a,c,e),u(a,e,c.argDef),a}else if(n==="EnumValue"&&c.enumValue&&c.enumValue.description){const a=document.createElement("div");return D(a,c,e),u(a,e,c.enumValue),a}else if(n==="NamedType"&&c.type&&c.type.description){const a=document.createElement("div");return m(a,c,e,c.type),u(a,e,c.type),a}});function o(r,e,i){s(r,e,i),v(r,e,i,e.type)}l(o,"renderField");function s(r,e,i){var n;const d=((n=e.fieldDef)===null||n===void 0?void 0:n.name)||"";d.slice(0,2)!=="__"&&(m(r,e,i,e.parentType),t(r,".")),t(r,d,"field-name",i,C(e))}l(s,"renderQualifiedField");function f(r,e,i){var n;const d="@"+(((n=e.directiveDef)===null||n===void 0?void 0:n.name)||"");t(r,d,"directive-name",i,N(e))}l(f,"renderDirective");function p(r,e,i){var n;e.directiveDef?f(r,e,i):e.fieldDef&&s(r,e,i);const d=((n=e.argDef)===null||n===void 0?void 0:n.name)||"";t(r,"("),t(r,d,"arg-name",i,_(e)),v(r,e,i,e.inputType),t(r,")")}l(p,"renderArg");function v(r,e,i,n){t(r,": "),m(r,e,i,n)}l(v,"renderTypeAnnotation");function D(r,e,i){var n;const d=((n=e.enumValue)===null||n===void 0?void 0:n.name)||"";m(r,e,i,e.inputType),t(r,"."),t(r,d,"enum-value",i,V(e))}l(D,"renderEnumValue");function m(r,e,i,n){n instanceof A?(m(r,e,i,n.ofType),t(r,"!")):n instanceof F?(t(r,"["),m(r,e,i,n.ofType),t(r,"]")):t(r,(n==null?void 0:n.name)||"","type-name",i,x(e,n))}l(m,"renderType");function u(r,e,i){const n=i.description;if(n){const d=document.createElement("div");d.className="info-description",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n)),r.appendChild(d)}T(r,e,i)}l(u,"renderDescription");function T(r,e,i){const n=i.deprecationReason;if(n){const d=document.createElement("div");d.className="info-deprecation",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n));const c=document.createElement("span");c.className="info-deprecation-label",c.appendChild(document.createTextNode("Deprecated: ")),d.insertBefore(c,d.firstChild),r.appendChild(d)}}l(T,"renderDeprecation");function t(r,e,i="",n={onClick:null},d=null){if(i){const c=n.onClick;let a;c?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",g=>{c(d,g)})):a=document.createElement("span"),a.className=i,a.appendChild(document.createTextNode(e)),r.appendChild(a)}else r.appendChild(document.createTextNode(e))}l(t,"text");
@@ -1 +1 @@
1
- import{P as C,j as u,fg as Gt,d8 as O,fh as qt,b as Ht,K as jt,fi as Kt,a6 as Vt,bh as zt,r as P,a9 as Jt,a4 as Yt,aa as Xt,bm as Qt,bq as Zt,o as kt,m as te,H as ee,W as re,k as ie,t as ne,D as se,B as ft,C as pt,s as oe,V as ae,v as le,bA as ce,X as he}from"./index-DTb1YjkO.js";import{W as ue}from"./url-evaluation-DQ262LSg.js";import{s as St,n as fe}from"./schema-BD6PrmCO.js";import{r as pe}from"./cloneDeep-CP0xacDT.js";import{I as mt}from"./index-BLrsx8oH.js";import{d as me}from"./Delete-P4B2dduO.js";import{_ as de}from"./useLocalStorage-DQZ59j66.js";import{A as ge}from"./Autocomplete-BRFoT1-d.js";import{L as ve}from"./ListItemButton-ByIRcZGW.js";import{S as ye,a as be,b as xe}from"./Stepper-CEe-v4P_.js";function je({mode:t,...e}){return t==="development"?u.jsx(ue,{type:"primary",...e,children:"DEV"}):null}je.propTypes={mode:C.string.isRequired};var _t={},lt={exports:{}},Et={exports:{}},Y=Et.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(t){return"file-"+Ct(t)}}},dt={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:Ct};Object.keys(Y).forEach(function(t){Object.keys(dt).forEach(function(e){Y[t][e]||(Y[t][e]=dt[e])}),Y[t].protocols_re=RegExp("^("+Y[t].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function Ct(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var wt=Et.exports,gt=wt,K=Object.assign||function(e,r){if(r===null||typeof r!="object")return e;const i=Object.keys(r);let s=i.length;for(;s--;)e[i[s]]=r[i[s]];return e},Se=E;function E(t,e,r,i,s,a,c){var l=this;l.type=t,Object.keys(gt[t]).forEach(function(d){l[d]=gt[t][d]}),l.user=e,l.auth=r,l.project=i,l.committish=s,l.default=a,l.opts=c||{}}E.prototype.hash=function(){return this.committish?"#"+this.committish:""};E.prototype._fill=function(t,e){if(t){var r=K({},e);r.path=r.path?r.path.replace(/^[/]+/g,""):"",e=K(K({},this.opts),e);var i=this;Object.keys(this).forEach(function(h){i[h]!=null&&r[h]==null&&(r[h]=i[h])});var s=r.auth,a=r.committish,c=r.fragment,l=r.path,d=r.project;Object.keys(r).forEach(function(h){var j=r[h];(h==="path"||h==="project")&&typeof j=="string"?r[h]=j.split("/").map(function(m){return encodeURIComponent(m)}).join("/"):h!=="domain"&&(r[h]=encodeURIComponent(j))}),r["auth@"]=s?s+"@":"",r["#fragment"]=c?"#"+this.hashformat(c):"",r.fragment=r.fragment?r.fragment:"",r["#path"]=l?"#"+this.hashformat(l):"",r["/path"]=r.path?"/"+r.path:"",r.projectPath=d.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(r["#committish"]="",r["/tree/committish"]="",r["/committish"]="",r.committish=""):(r["#committish"]=a?"#"+a:"",r["/tree/committish"]=r.committish?"/"+r.treepath+"/"+r.committish:"",r["/committish"]=r.committish?"/"+r.committish:"",r.committish=r.committish||"master");var y=t;return Object.keys(r).forEach(function(h){y=y.replace(new RegExp("[{]"+h+"[}]","g"),r[h])}),e.noGitPlus?y.replace(/^git[+]/,""):y}};E.prototype.ssh=function(t){return this._fill(this.sshtemplate,t)};E.prototype.sshurl=function(t){return this._fill(this.sshurltemplate,t)};E.prototype.browse=function(t,e,r){return typeof t=="string"?(typeof e!="string"&&(r=e,e=null),this._fill(this.browsefiletemplate,K({fragment:e,path:t},r))):this._fill(this.browsetemplate,t)};E.prototype.docs=function(t){return this._fill(this.docstemplate,t)};E.prototype.bugs=function(t){return this._fill(this.bugstemplate,t)};E.prototype.https=function(t){return this._fill(this.httpstemplate,t)};E.prototype.git=function(t){return this._fill(this.gittemplate,t)};E.prototype.shortcut=function(t){return this._fill(this.shortcuttemplate,t)};E.prototype.path=function(t){return this._fill(this.pathtemplate,t)};E.prototype.tarball=function(t){var e=K({},t,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};E.prototype.file=function(t,e){return this._fill(this.filetemplate,K({path:t},e))};E.prototype.getDefaultRepresentation=function(){return this.default};E.prototype.toString=function(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)};var it,vt;function _e(){return vt||(vt=1,it=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),it}var Ee=p;p.Node=B;p.create=p;function p(t){var e=this;if(e instanceof p||(e=new p),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)e.push(arguments[r]);return e}p.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};p.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};p.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};p.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)we(this,arguments[t]);return this.length};p.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Ie(this,arguments[t]);return this.length};p.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};p.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};p.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,i=0;r!==null;i++)t.call(e,r.value,i,this),r=r.next};p.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,i=this.length-1;r!==null;i--)t.call(e,r.value,i,this),r=r.prev};p.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};p.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};p.prototype.map=function(t,e){e=e||this;for(var r=new p,i=this.head;i!==null;)r.push(t.call(e,i.value,this)),i=i.next;return r};p.prototype.mapReverse=function(t,e){e=e||this;for(var r=new p,i=this.tail;i!==null;)r.push(t.call(e,i.value,this)),i=i.prev;return r};p.prototype.reduce=function(t,e){var r,i=this.head;if(arguments.length>1)r=e;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;i!==null;s++)r=t(r,i.value,s),i=i.next;return r};p.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;i!==null;s--)r=t(r,i.value,s),i=i.prev;return r};p.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};p.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};p.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new p;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=0,s=this.head;s!==null&&i<t;i++)s=s.next;for(;s!==null&&i<e;i++,s=s.next)r.push(s.value);return r};p.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new p;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=this.length,s=this.tail;s!==null&&i>e;i--)s=s.prev;for(;s!==null&&i>t;i--,s=s.prev)r.push(s.value);return r};p.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,s=this.head;s!==null&&i<t;i++)s=s.next;for(var a=[],i=0;s&&i<e;i++)a.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var i=0;i<r.length;i++)s=Ce(this,s,r[i]);return a};p.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=e,this.tail=t,this};function Ce(t,e,r){var i=e===t.head?new B(r,null,e,t):new B(r,e,e.next,t);return i.next===null&&(t.tail=i),i.prev===null&&(t.head=i),t.length++,i}function we(t,e){t.tail=new B(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Ie(t,e){t.head=new B(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function B(t,e,r,i){if(!(this instanceof B))return new B(t,e,r,i);this.list=i,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{_e()(p)}catch{}const Ae=Ee,N=Symbol("max"),L=Symbol("length"),H=Symbol("lengthCalculator"),Q=Symbol("allowStale"),$=Symbol("maxAge"),U=Symbol("dispose"),yt=Symbol("noDisposeOnSet"),S=Symbol("lruList"),A=Symbol("cache"),It=Symbol("updateAgeOnGet"),nt=()=>1;class Re{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[N]=e.max||1/0;const r=e.length||nt;if(this[H]=typeof r!="function"?nt:r,this[Q]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[$]=e.maxAge||0,this[U]=e.dispose,this[yt]=e.noDisposeOnSet||!1,this[It]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[N]=e||1/0,X(this)}get max(){return this[N]}set allowStale(e){this[Q]=!!e}get allowStale(){return this[Q]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[$]=e,X(this)}get maxAge(){return this[$]}set lengthCalculator(e){typeof e!="function"&&(e=nt),e!==this[H]&&(this[H]=e,this[L]=0,this[S].forEach(r=>{r.length=this[H](r.value,r.key),this[L]+=r.length})),X(this)}get lengthCalculator(){return this[H]}get length(){return this[L]}get itemCount(){return this[S].length}rforEach(e,r){r=r||this;for(let i=this[S].tail;i!==null;){const s=i.prev;bt(this,e,i,r),i=s}}forEach(e,r){r=r||this;for(let i=this[S].head;i!==null;){const s=i.next;bt(this,e,i,r),i=s}}keys(){return this[S].toArray().map(e=>e.key)}values(){return this[S].toArray().map(e=>e.value)}reset(){this[U]&&this[S]&&this[S].length&&this[S].forEach(e=>this[U](e.key,e.value)),this[A]=new Map,this[S]=new Ae,this[L]=0}dump(){return this[S].map(e=>Z(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[S]}set(e,r,i){if(i=i||this[$],i&&typeof i!="number")throw new TypeError("maxAge must be a number");const s=i?Date.now():0,a=this[H](r,e);if(this[A].has(e)){if(a>this[N])return V(this,this[A].get(e)),!1;const d=this[A].get(e).value;return this[U]&&(this[yt]||this[U](e,d.value)),d.now=s,d.maxAge=i,d.value=r,this[L]+=a-d.length,d.length=a,this.get(e),X(this),!0}const c=new Oe(e,r,a,s,i);return c.length>this[N]?(this[U]&&this[U](e,r),!1):(this[L]+=c.length,this[S].unshift(c),this[A].set(e,this[S].head),X(this),!0)}has(e){if(!this[A].has(e))return!1;const r=this[A].get(e).value;return!Z(this,r)}get(e){return st(this,e,!0)}peek(e){return st(this,e,!1)}pop(){const e=this[S].tail;return e?(V(this,e),e.value):null}del(e){V(this,this[A].get(e))}load(e){this.reset();const r=Date.now();for(let i=e.length-1;i>=0;i--){const s=e[i],a=s.e||0;if(a===0)this.set(s.k,s.v);else{const c=a-r;c>0&&this.set(s.k,s.v,c)}}}prune(){this[A].forEach((e,r)=>st(this,r,!1))}}const st=(t,e,r)=>{const i=t[A].get(e);if(i){const s=i.value;if(Z(t,s)){if(V(t,i),!t[Q])return}else r&&(t[It]&&(i.value.now=Date.now()),t[S].unshiftNode(i));return s.value}},Z=(t,e)=>{if(!e||!e.maxAge&&!t[$])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[$]&&r>t[$]},X=t=>{if(t[L]>t[N])for(let e=t[S].tail;t[L]>t[N]&&e!==null;){const r=e.prev;V(t,e),e=r}},V=(t,e)=>{if(e){const r=e.value;t[U]&&t[U](r.key,r.value),t[L]-=r.length,t[A].delete(r.key),t[S].removeNode(e)}};class Oe{constructor(e,r,i,s,a){this.key=e,this.value=r,this.length=i,this.now=s,this.maxAge=a||0}}const bt=(t,e,r,i)=>{let s=r.value;Z(t,s)&&(V(t,r),t[Q]||(s=void 0)),s&&e.call(i,s.value,s.key,t)};var Pe=Re,at=Gt,xt=wt,Ue=lt.exports=Se,Le=Pe,ot=new Le({max:1e3}),Te={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function De(t){return Te[t]||t.slice(0,-1)}var Ne={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};lt.exports.fromUrl=function(t,e){if(typeof t=="string"){var r=t+JSON.stringify(e||{});return ot.has(r)||ot.set(r,$e(t,e)),ot.get(r)}};function $e(t,e){if(!(t==null||t==="")){var r=Me(Be(t)?"github:"+t:t),i=Fe(r),s=r.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),a=Object.keys(xt).map(function(c){try{var l=xt[c],d=null;i.auth&&Ne[i.protocol]&&(d=i.auth);var y=i.hash?decodeURIComponent(i.hash.substr(1)):null,h=null,j=null,m=null;if(s&&s[1]===c)h=s[2]&&decodeURIComponent(s[2]),j=decodeURIComponent(s[3].replace(/\.git$/,"")),m="shortcut";else{if(i.host&&i.host!==l.domain&&i.host.replace(/^www[.]/,"")!==l.domain||!l.protocols_re.test(i.protocol)||!i.path)return;var F=l.pathmatch,w=i.path.match(F);if(!w)return;w[1]!==null&&w[1]!==void 0&&(h=decodeURIComponent(w[1].replace(/^:/,""))),j=decodeURIComponent(w[2]),m=De(i.protocol)}return new Ue(c,h,d,j,y,m,e)}catch(I){if(!(I instanceof URIError))throw I}}).filter(function(c){return c});if(a.length===1)return a[0]}}function Be(t){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(t)}function Me(t){var e=at.parse(t);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:t}function Fe(t){var e=t.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var r=at.parse(t);if(r.auth){const s=t.match(/[^@]+@[^:/]+/);if(s){var i=new at.URL(s[0]);r.auth=i.username||"",i.password&&(r.auth+=":"+i.password)}}return r}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}var We=lt.exports,M={},R={},Ge=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R,"__esModule",{value:!0});R.setService=R.findService=R.getDefaultServiceConfig=R.getServiceConfig=void 0;const qe=Ge(pe),He=St,At={},ct=t=>{At[t.name]={validate:t.schema.validate.bind(t.schema),defaultConfig:t.default}};R.setService=ct;ct({name:"auth",schema:He.authConfigSchema,default:{}});const Rt=t=>{if(!t)throw new Error("service name should not be empty");const e=At[t];if(!e)throw new Error(`service ${t} does not exist`);return e},Ot=(t,e,{validate:r}={})=>{const i=Rt(t),s=(0,qe.default)(e||{}),{value:a,error:c}=i.validate(s);if(r&&c)throw new Error(`Invalid blocklet service config: ${c.details.map(l=>l.message).join(", ")}`);return a};R.getServiceConfig=Ot;const Pt=t=>{const{defaultConfig:e}=Rt(t);return e};R.getDefaultServiceConfig=Pt;const Ut=(t,e)=>{const r=[e];return(t||[]).find(i=>r.includes(i.name))};R.findService=Ut;R.default={getServiceConfig:Ot,getDefaultServiceConfig:Pt,findService:Ut,setService:ct};Object.defineProperty(M,"__esModule",{value:!0});M.fixAndValidateService=M.validateMeta=void 0;const Ke=St,Ve=R,ze=t=>(!t.interfaces||!t.interfaces.length||t.interfaces.forEach(e=>{e.services&&e.services.length&&e.services.forEach(r=>{r.config=(0,Ve.getServiceConfig)(r.name,r.config,{validate:!0})})}),t);M.fixAndValidateService=ze;const Lt=(t,{ensureFiles:e=!1,ensureDist:r=!1,ensureComponentStore:i=!0,ensureName:s=!1,skipValidateDidName:a=!1,schemaOptions:c={}}={})=>{const l=(0,Ke.createBlockletSchema)(null,{ensureFiles:e,ensureDist:r,ensureComponentStore:i,ensureName:s,skipValidateDidName:a,...c}),{value:d,error:y}=l.validate(t);if(y)throw new Error(`Invalid blocklet meta: ${y.details.map(h=>h.message).join(", ")}`);return d};M.validateMeta=Lt;M.default=Lt;(function(t){var e=O&&O.__createBinding||(Object.create?function(n,o,v,b){b===void 0&&(b=v);var g=Object.getOwnPropertyDescriptor(o,v);(!g||("get"in g?!o.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return o[v]}}),Object.defineProperty(n,b,g)}:function(n,o,v,b){b===void 0&&(b=v),n[b]=o[v]}),r=O&&O.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),i=O&&O.__importStar||function(){var n=function(o){return n=Object.getOwnPropertyNames||function(v){var b=[];for(var g in v)Object.prototype.hasOwnProperty.call(v,g)&&(b[b.length]=g);return b},n(o)};return function(o){if(o&&o.__esModule)return o;var v={};if(o!=null)for(var b=n(o),g=0;g<b.length;g++)b[g]!=="default"&&e(v,o,b[g]);return r(v,o),v}}(),s=O&&O.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixService=t.fixInterfaces=t.parsePerson=t.formatPerson=t.fixName=t.fixTags=t.fixPerson=t.fixKeywords=t.fixFiles=t.fixRepository=t.fixRequired=void 0;const a=s(qt),c=i(We),l=Ht,d=M;Object.defineProperty(t,"fixService",{enumerable:!0,get:function(){return d.fixAndValidateService}});const y=fe,h=(n,o)=>{n.description||(n.description=`Blocklet from ${o}`),n.version||(n.version=l.BLOCKLET_DEFAULT_VERSION)};t.fixRequired=h;const j=n=>{if(n.repository&&(typeof n.repository=="string"&&(n.repository={type:"git",url:n.repository}),n.repository.url)){const o=c.fromUrl(n.repository.url);o&&(n.repository.url=o.getDefaultRepresentation()==="shortcut"?o.https():o.toString())}};t.fixRepository=j;const m=n=>{Array.isArray(n.files)?n.files&&(n.files=n.files.filter(o=>!(!o||typeof o!="string"))):delete n.files};t.fixFiles=m;const F=n=>{typeof n.keywords=="string"&&(n.keywords=n.keywords.split(/,\s+/)),n.keywords&&!Array.isArray(n.keywords)?delete n.keywords:n.keywords&&(n.keywords=n.keywords.filter(o=>!(typeof o!="string"||!o)))};t.fixKeywords=F;const w=n=>{typeof n.tags=="string"&&(n.tags=n.tags.split(/,\s+/)),n.tags&&!Array.isArray(n.tags)?delete n.tags:n.tags&&(n.tags=n.tags.filter(o=>!(typeof o!="string"||!o)))};t.fixTags=w;const I=(n,o)=>(n.author&&(n.author=o(n.author)),["maintainers","contributors"].forEach(v=>{Array.isArray(n[v])&&(n[v]=n[v].map(o))}),n),W=n=>{if(!n)return"";if(typeof n=="string")return n;const o=n.name||"",v=n.url||n.web,b=v?` (${v})`:"",g=n.email||n.mail,x=g?` <${g}>`:"";return o+x+b};t.formatPerson=W;const T=n=>{if(typeof n!="string")return n;const o=n.match(/^([^(<]+)/),v=n.match(/\(([^)]+)\)/),b=n.match(/<([^>]+)>/),g={};return o&&o[0].trim()&&(g.name=o[0].trim()),b&&([,g.email]=b),v&&([,g.url]=v),g};t.parsePerson=T;const G=n=>(I(n,W),I(n,T),n);t.fixPerson=G;const _=(n,o=!0)=>{if(Array.isArray(n.interfaces)||(n.interfaces=[]),n.interfaces.length)return n.interfaces.forEach(x=>{x.type===l.BLOCKLET_INTERFACE_TYPE_WEB&&(x.protocol="http")}),n;const b=(0,a.default)(n,"capabilities.dynamicPathPrefix",!0)?l.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",g=({type:x="web",name:k,path:J="/",protocol:tt="http",port:et=l.BLOCKLET_DEFAULT_PORT_NAME})=>{n.interfaces.push({type:x,name:k,path:J,prefix:b,port:et,protocol:tt})};return[l.BLOCKLET_INTERFACE_PUBLIC].forEach(x=>{n[x]&&g({name:x,path:n[x]})}),Array.isArray(n.exposeServices)&&n.exposeServices.forEach(x=>{g({type:"service",name:x.protocol,protocol:x.protocol,port:{internal:`BLOCKLET_${x.protocol}_PORT`.toUpperCase(),external:x.port}})}),o&&(delete n.publicUrl,delete n.adminUrl,delete n.configUrl,delete n.docUrl,delete n.exposeServices,n.capabilities&&delete n.capabilities.dynamicPathPrefix),n};t.fixInterfaces=_;const z=n=>{const{did:o}=n;try{(0,y.validateNewDid)(o),n.name=o}catch{}return n};t.fixName=z,t.default={fixRequired:h,fixRepository:j,fixFiles:m,fixKeywords:F,fixPerson:G,fixTags:w,fixName:z,formatPerson:W,parsePerson:T,fixInterfaces:_,fixService:d.fixAndValidateService}})(_t);function Tt({owner:t,locale:e}){return u.jsxs(jt,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.fullName,t.did?u.jsx(Kt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:t.did,compact:!0,size:14,locale:e}):null]})}Tt.propTypes={owner:C.object.isRequired,locale:C.string.isRequired};const Je="install-blocklet-from-URL",Dt=()=>{const[t,e]=de(Je,"[]",{raw:!0}),r=s=>{const a=s.trim(),c=JSON.parse(t),l=c.findIndex(d=>d===a);l!==0&&(l>0&&c.splice(l,1),c.length>=10&&c.splice(9),c.unshift(a),e(JSON.stringify(c)))},i=s=>{if(!s)return;const a=JSON.parse(t),c=s.trim(),l=a.findIndex(d=>d===c);l>-1&&(a.splice(l,1),e(JSON.stringify(a)))};return{urls:t?JSON.parse(t):[],addUrlRecord:r,removeUrlRecord:i}},Ye=Vt(()=>({listItemText:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}));function ht(t){const{value:e,onValueChange:r,children:i,helperText:s}=t,{urls:a,removeUrlRecord:c}=Dt(),l=(y,h)=>{y.preventDefault(),y.stopPropagation(),c(h)},d=Ye();return u.jsxs(jt,{children:[u.jsx(ge,{freeSolo:!0,options:a,inputValue:e,onInputChange:(y,h)=>{r(h)},disableClearable:!0,popupIcon:null,renderInput:y=>zt.cloneElement(i,{...y}),renderOption:(y,h)=>P.createElement(Jt,{...y,key:h,secondaryAction:u.jsx(Yt,{edge:"end","aria-label":"delete",onClick:j=>l(j,h),children:u.jsx(me,{})})},u.jsx(ve,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:u.jsx(Xt,{primary:h,className:d.listItemText})})),ListboxProps:{sx:{maxHeight:300,overflow:"auto"}}}),u.jsx(Qt,{style:{margin:0},children:s})]})}ht.propTypes={onValueChange:C.func,children:C.node,value:C.string,helperText:C.string};ht.defaultProps={onValueChange:()=>{},children:null,value:"",helperText:""};function Nt({defaultUrl:t,onCancel:e,onSuccess:r,onError:i,mode:s,handleText:a}){const{api:c}=Zt(),{api:l}=kt(),[d,y]=P.useState(!1),[h,j]=P.useState(""),{t:m,locale:F}=te(),w={dist:{}},[I,W]=P.useState(t),[T,G]=P.useState(t?1:0),[_,z]=P.useState(w),[n,o]=P.useState(!1),[v,b]=P.useState({}),g=s==="component",x=g?!0:!t,{addUrlRecord:k}=Dt(),J=async()=>{z(w),j(null),y(!0);let f=I.trim();!f.startsWith("https://")&&!f.startsWith("http://")&&!f.startsWith("file://")&&(f=`file://${f}`);try{const q=decodeURIComponent(f);try{new URL(q)}catch{throw new Error("Invalid URL")}const{meta:rt,inStore:Ft,registryUrl:Wt}=await c.getBlockletMetaFromUrl({input:{url:q}});z(rt),b({inStore:Ft,registryUrl:Wt,inputUrl:f}),k(f)}catch(q){console.error(q);const rt=`Blocklet Install failed: ${he(q)}`;j(rt),i(q)}finally{y(!1)}},tt=()=>{if(g){r({meta:_,...v}),e();return}y(!0),o(!0)},et=()=>{y(!1),o(!1),r({meta:_,...v}),e()},$t=()=>{y(!1),o(!1)};P.useEffect(()=>{t&&J()},[t]);const Bt=[{name:m("common.name"),value:ee.getDisplayName({meta:_},!0)},{name:m("common.version"),value:_.version},{name:m("common.did"),value:_.did?u.jsx(re,{did:_.did}):null},{name:m("common.author"),value:_.owner?u.jsx(Tt,{owner:_.owner,locale:F}):_t.formatPerson(_.author)},{name:m("blocklet.dist.downloadLink"),value:_.dist.tarball}],Mt=()=>d?u.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:u.jsx(pt,{})}):_.did?u.jsx("div",{style:{paddingLeft:"10%"},children:Bt.map(f=>f.name===m("common.did")?u.jsx(mt,{valueComponent:"div",nameWidth:120,name:f.name,nameFormatter:()=>m("common.did"),children:f.value},f.name):u.jsx(mt,{valueComponent:"div",nameWidth:120,name:f.name,children:f.value},f.name))}):null,ut=[{label:m("blocklet.fromUrl.step0"),body:u.jsx(ie,{component:"div",children:u.jsx(ht,{style:{marginBottom:32},value:I,helperText:m("blocklet.fromUrl.description"),onValueChange:f=>{j(null),W(f)},children:u.jsx(ne,{label:m("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:I,onChange:f=>{j(null),W(f.target.value)},disabled:d,onKeyPress:f=>{f.key==="Enter"&&(f.preventDefault(),J(),G(1))}})})}),cancel:m("common.cancel"),confirm:m("common.next"),onCancel:e,onConfirm:()=>{J(),G(1)}},{label:m("blocklet.fromUrl.step1"),body:Mt(),cancel:m(x?"common.pre":"common.cancel"),confirm:(a==null?void 0:a.confirm)||m("blocklet.fromUrl.confirm"),onCancel:()=>{x?G(f=>f-1):e()},onConfirm:()=>{tt()}}],D=ut[T];return u.jsxs(u.Fragment,{children:[u.jsxs(se,{title:(a==null?void 0:a.title)||m("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>D.onCancel(),showCloseButton:T===0,disableEscapeKeyDown:!0,open:!0,actions:u.jsxs(u.Fragment,{children:[D.cancel&&u.jsx(ft,{onClick:f=>{f.stopPropagation(),j(null),D.onCancel()},color:"inherit",children:D.cancel||m("common.cancel")}),u.jsxs(ft,{onClick:f=>{f.stopPropagation(),D.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:d||!I||h,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[d&&T===0&&u.jsx(pt,{size:16}),D.confirm]})]}),children:[x&&u.jsx(ye,{alternativeLabel:!0,activeStep:T,children:ut.map(({label:f})=>u.jsx(be,{children:u.jsx(xe,{children:f})},f))}),u.jsx(oe,{component:"div",style:{marginTop:24},children:D.body}),!!h&&u.jsx(ae,{severity:"error",style:{width:"100%",marginTop:8},children:h})]}),_&&n&&u.jsx(le,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:l.get,checkTimeout:5*60*1e3,onSuccess:et,extraParams:{title:_.title,wt:ce(_),blockletMetaUrl:decodeURIComponent(I.trim())},messages:{title:m("setup.keyPair.title"),scan:m("setup.keyPair.scan"),confirm:m("setup.keyPair.confirm"),success:m("setup.keyPair.success")},onClose:$t})]})}Nt.propTypes={defaultUrl:C.string,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,mode:C.oneOf(["install","component"]),handleText:C.object};Nt.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{je as B,Nt as I,Tt as a,_t as f};
1
+ import{P as C,j as u,fg as Gt,d8 as O,fh as qt,b as Ht,K as jt,fi as Kt,a6 as Vt,bh as zt,r as P,a9 as Jt,a4 as Yt,aa as Xt,bm as Qt,bq as Zt,o as kt,m as te,H as ee,W as re,k as ie,t as ne,D as se,B as ft,C as pt,s as oe,V as ae,v as le,bA as ce,X as he}from"./index-BXOD69ua.js";import{W as ue}from"./url-evaluation-D9TCPMS4.js";import{s as St,n as fe}from"./schema-D29PP22L.js";import{r as pe}from"./cloneDeep-BmfjF8bM.js";import{I as mt}from"./index-DfVhmhNU.js";import{d as me}from"./Delete-CvkgpWXX.js";import{_ as de}from"./useLocalStorage-osYXE-mL.js";import{A as ge}from"./Autocomplete-DpJFKWid.js";import{L as ve}from"./ListItemButton-LswuUKPc.js";import{S as ye,a as be,b as xe}from"./Stepper-DEgX4GTY.js";function je({mode:t,...e}){return t==="development"?u.jsx(ue,{type:"primary",...e,children:"DEV"}):null}je.propTypes={mode:C.string.isRequired};var _t={},lt={exports:{}},Et={exports:{}},Y=Et.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(t){return"file-"+Ct(t)}}},dt={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:Ct};Object.keys(Y).forEach(function(t){Object.keys(dt).forEach(function(e){Y[t][e]||(Y[t][e]=dt[e])}),Y[t].protocols_re=RegExp("^("+Y[t].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function Ct(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var wt=Et.exports,gt=wt,K=Object.assign||function(e,r){if(r===null||typeof r!="object")return e;const i=Object.keys(r);let s=i.length;for(;s--;)e[i[s]]=r[i[s]];return e},Se=E;function E(t,e,r,i,s,a,c){var l=this;l.type=t,Object.keys(gt[t]).forEach(function(d){l[d]=gt[t][d]}),l.user=e,l.auth=r,l.project=i,l.committish=s,l.default=a,l.opts=c||{}}E.prototype.hash=function(){return this.committish?"#"+this.committish:""};E.prototype._fill=function(t,e){if(t){var r=K({},e);r.path=r.path?r.path.replace(/^[/]+/g,""):"",e=K(K({},this.opts),e);var i=this;Object.keys(this).forEach(function(h){i[h]!=null&&r[h]==null&&(r[h]=i[h])});var s=r.auth,a=r.committish,c=r.fragment,l=r.path,d=r.project;Object.keys(r).forEach(function(h){var j=r[h];(h==="path"||h==="project")&&typeof j=="string"?r[h]=j.split("/").map(function(m){return encodeURIComponent(m)}).join("/"):h!=="domain"&&(r[h]=encodeURIComponent(j))}),r["auth@"]=s?s+"@":"",r["#fragment"]=c?"#"+this.hashformat(c):"",r.fragment=r.fragment?r.fragment:"",r["#path"]=l?"#"+this.hashformat(l):"",r["/path"]=r.path?"/"+r.path:"",r.projectPath=d.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(r["#committish"]="",r["/tree/committish"]="",r["/committish"]="",r.committish=""):(r["#committish"]=a?"#"+a:"",r["/tree/committish"]=r.committish?"/"+r.treepath+"/"+r.committish:"",r["/committish"]=r.committish?"/"+r.committish:"",r.committish=r.committish||"master");var y=t;return Object.keys(r).forEach(function(h){y=y.replace(new RegExp("[{]"+h+"[}]","g"),r[h])}),e.noGitPlus?y.replace(/^git[+]/,""):y}};E.prototype.ssh=function(t){return this._fill(this.sshtemplate,t)};E.prototype.sshurl=function(t){return this._fill(this.sshurltemplate,t)};E.prototype.browse=function(t,e,r){return typeof t=="string"?(typeof e!="string"&&(r=e,e=null),this._fill(this.browsefiletemplate,K({fragment:e,path:t},r))):this._fill(this.browsetemplate,t)};E.prototype.docs=function(t){return this._fill(this.docstemplate,t)};E.prototype.bugs=function(t){return this._fill(this.bugstemplate,t)};E.prototype.https=function(t){return this._fill(this.httpstemplate,t)};E.prototype.git=function(t){return this._fill(this.gittemplate,t)};E.prototype.shortcut=function(t){return this._fill(this.shortcuttemplate,t)};E.prototype.path=function(t){return this._fill(this.pathtemplate,t)};E.prototype.tarball=function(t){var e=K({},t,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};E.prototype.file=function(t,e){return this._fill(this.filetemplate,K({path:t},e))};E.prototype.getDefaultRepresentation=function(){return this.default};E.prototype.toString=function(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)};var it,vt;function _e(){return vt||(vt=1,it=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),it}var Ee=p;p.Node=B;p.create=p;function p(t){var e=this;if(e instanceof p||(e=new p),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)e.push(arguments[r]);return e}p.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};p.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};p.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};p.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)we(this,arguments[t]);return this.length};p.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Ie(this,arguments[t]);return this.length};p.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};p.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};p.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,i=0;r!==null;i++)t.call(e,r.value,i,this),r=r.next};p.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,i=this.length-1;r!==null;i--)t.call(e,r.value,i,this),r=r.prev};p.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};p.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};p.prototype.map=function(t,e){e=e||this;for(var r=new p,i=this.head;i!==null;)r.push(t.call(e,i.value,this)),i=i.next;return r};p.prototype.mapReverse=function(t,e){e=e||this;for(var r=new p,i=this.tail;i!==null;)r.push(t.call(e,i.value,this)),i=i.prev;return r};p.prototype.reduce=function(t,e){var r,i=this.head;if(arguments.length>1)r=e;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;i!==null;s++)r=t(r,i.value,s),i=i.next;return r};p.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;i!==null;s--)r=t(r,i.value,s),i=i.prev;return r};p.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};p.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};p.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new p;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=0,s=this.head;s!==null&&i<t;i++)s=s.next;for(;s!==null&&i<e;i++,s=s.next)r.push(s.value);return r};p.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new p;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=this.length,s=this.tail;s!==null&&i>e;i--)s=s.prev;for(;s!==null&&i>t;i--,s=s.prev)r.push(s.value);return r};p.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,s=this.head;s!==null&&i<t;i++)s=s.next;for(var a=[],i=0;s&&i<e;i++)a.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var i=0;i<r.length;i++)s=Ce(this,s,r[i]);return a};p.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=e,this.tail=t,this};function Ce(t,e,r){var i=e===t.head?new B(r,null,e,t):new B(r,e,e.next,t);return i.next===null&&(t.tail=i),i.prev===null&&(t.head=i),t.length++,i}function we(t,e){t.tail=new B(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Ie(t,e){t.head=new B(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function B(t,e,r,i){if(!(this instanceof B))return new B(t,e,r,i);this.list=i,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{_e()(p)}catch{}const Ae=Ee,N=Symbol("max"),L=Symbol("length"),H=Symbol("lengthCalculator"),Q=Symbol("allowStale"),$=Symbol("maxAge"),U=Symbol("dispose"),yt=Symbol("noDisposeOnSet"),S=Symbol("lruList"),A=Symbol("cache"),It=Symbol("updateAgeOnGet"),nt=()=>1;class Re{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[N]=e.max||1/0;const r=e.length||nt;if(this[H]=typeof r!="function"?nt:r,this[Q]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[$]=e.maxAge||0,this[U]=e.dispose,this[yt]=e.noDisposeOnSet||!1,this[It]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[N]=e||1/0,X(this)}get max(){return this[N]}set allowStale(e){this[Q]=!!e}get allowStale(){return this[Q]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[$]=e,X(this)}get maxAge(){return this[$]}set lengthCalculator(e){typeof e!="function"&&(e=nt),e!==this[H]&&(this[H]=e,this[L]=0,this[S].forEach(r=>{r.length=this[H](r.value,r.key),this[L]+=r.length})),X(this)}get lengthCalculator(){return this[H]}get length(){return this[L]}get itemCount(){return this[S].length}rforEach(e,r){r=r||this;for(let i=this[S].tail;i!==null;){const s=i.prev;bt(this,e,i,r),i=s}}forEach(e,r){r=r||this;for(let i=this[S].head;i!==null;){const s=i.next;bt(this,e,i,r),i=s}}keys(){return this[S].toArray().map(e=>e.key)}values(){return this[S].toArray().map(e=>e.value)}reset(){this[U]&&this[S]&&this[S].length&&this[S].forEach(e=>this[U](e.key,e.value)),this[A]=new Map,this[S]=new Ae,this[L]=0}dump(){return this[S].map(e=>Z(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[S]}set(e,r,i){if(i=i||this[$],i&&typeof i!="number")throw new TypeError("maxAge must be a number");const s=i?Date.now():0,a=this[H](r,e);if(this[A].has(e)){if(a>this[N])return V(this,this[A].get(e)),!1;const d=this[A].get(e).value;return this[U]&&(this[yt]||this[U](e,d.value)),d.now=s,d.maxAge=i,d.value=r,this[L]+=a-d.length,d.length=a,this.get(e),X(this),!0}const c=new Oe(e,r,a,s,i);return c.length>this[N]?(this[U]&&this[U](e,r),!1):(this[L]+=c.length,this[S].unshift(c),this[A].set(e,this[S].head),X(this),!0)}has(e){if(!this[A].has(e))return!1;const r=this[A].get(e).value;return!Z(this,r)}get(e){return st(this,e,!0)}peek(e){return st(this,e,!1)}pop(){const e=this[S].tail;return e?(V(this,e),e.value):null}del(e){V(this,this[A].get(e))}load(e){this.reset();const r=Date.now();for(let i=e.length-1;i>=0;i--){const s=e[i],a=s.e||0;if(a===0)this.set(s.k,s.v);else{const c=a-r;c>0&&this.set(s.k,s.v,c)}}}prune(){this[A].forEach((e,r)=>st(this,r,!1))}}const st=(t,e,r)=>{const i=t[A].get(e);if(i){const s=i.value;if(Z(t,s)){if(V(t,i),!t[Q])return}else r&&(t[It]&&(i.value.now=Date.now()),t[S].unshiftNode(i));return s.value}},Z=(t,e)=>{if(!e||!e.maxAge&&!t[$])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[$]&&r>t[$]},X=t=>{if(t[L]>t[N])for(let e=t[S].tail;t[L]>t[N]&&e!==null;){const r=e.prev;V(t,e),e=r}},V=(t,e)=>{if(e){const r=e.value;t[U]&&t[U](r.key,r.value),t[L]-=r.length,t[A].delete(r.key),t[S].removeNode(e)}};class Oe{constructor(e,r,i,s,a){this.key=e,this.value=r,this.length=i,this.now=s,this.maxAge=a||0}}const bt=(t,e,r,i)=>{let s=r.value;Z(t,s)&&(V(t,r),t[Q]||(s=void 0)),s&&e.call(i,s.value,s.key,t)};var Pe=Re,at=Gt,xt=wt,Ue=lt.exports=Se,Le=Pe,ot=new Le({max:1e3}),Te={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function De(t){return Te[t]||t.slice(0,-1)}var Ne={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};lt.exports.fromUrl=function(t,e){if(typeof t=="string"){var r=t+JSON.stringify(e||{});return ot.has(r)||ot.set(r,$e(t,e)),ot.get(r)}};function $e(t,e){if(!(t==null||t==="")){var r=Me(Be(t)?"github:"+t:t),i=Fe(r),s=r.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),a=Object.keys(xt).map(function(c){try{var l=xt[c],d=null;i.auth&&Ne[i.protocol]&&(d=i.auth);var y=i.hash?decodeURIComponent(i.hash.substr(1)):null,h=null,j=null,m=null;if(s&&s[1]===c)h=s[2]&&decodeURIComponent(s[2]),j=decodeURIComponent(s[3].replace(/\.git$/,"")),m="shortcut";else{if(i.host&&i.host!==l.domain&&i.host.replace(/^www[.]/,"")!==l.domain||!l.protocols_re.test(i.protocol)||!i.path)return;var F=l.pathmatch,w=i.path.match(F);if(!w)return;w[1]!==null&&w[1]!==void 0&&(h=decodeURIComponent(w[1].replace(/^:/,""))),j=decodeURIComponent(w[2]),m=De(i.protocol)}return new Ue(c,h,d,j,y,m,e)}catch(I){if(!(I instanceof URIError))throw I}}).filter(function(c){return c});if(a.length===1)return a[0]}}function Be(t){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(t)}function Me(t){var e=at.parse(t);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:t}function Fe(t){var e=t.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var r=at.parse(t);if(r.auth){const s=t.match(/[^@]+@[^:/]+/);if(s){var i=new at.URL(s[0]);r.auth=i.username||"",i.password&&(r.auth+=":"+i.password)}}return r}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}var We=lt.exports,M={},R={},Ge=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(R,"__esModule",{value:!0});R.setService=R.findService=R.getDefaultServiceConfig=R.getServiceConfig=void 0;const qe=Ge(pe),He=St,At={},ct=t=>{At[t.name]={validate:t.schema.validate.bind(t.schema),defaultConfig:t.default}};R.setService=ct;ct({name:"auth",schema:He.authConfigSchema,default:{}});const Rt=t=>{if(!t)throw new Error("service name should not be empty");const e=At[t];if(!e)throw new Error(`service ${t} does not exist`);return e},Ot=(t,e,{validate:r}={})=>{const i=Rt(t),s=(0,qe.default)(e||{}),{value:a,error:c}=i.validate(s);if(r&&c)throw new Error(`Invalid blocklet service config: ${c.details.map(l=>l.message).join(", ")}`);return a};R.getServiceConfig=Ot;const Pt=t=>{const{defaultConfig:e}=Rt(t);return e};R.getDefaultServiceConfig=Pt;const Ut=(t,e)=>{const r=[e];return(t||[]).find(i=>r.includes(i.name))};R.findService=Ut;R.default={getServiceConfig:Ot,getDefaultServiceConfig:Pt,findService:Ut,setService:ct};Object.defineProperty(M,"__esModule",{value:!0});M.fixAndValidateService=M.validateMeta=void 0;const Ke=St,Ve=R,ze=t=>(!t.interfaces||!t.interfaces.length||t.interfaces.forEach(e=>{e.services&&e.services.length&&e.services.forEach(r=>{r.config=(0,Ve.getServiceConfig)(r.name,r.config,{validate:!0})})}),t);M.fixAndValidateService=ze;const Lt=(t,{ensureFiles:e=!1,ensureDist:r=!1,ensureComponentStore:i=!0,ensureName:s=!1,skipValidateDidName:a=!1,schemaOptions:c={}}={})=>{const l=(0,Ke.createBlockletSchema)(null,{ensureFiles:e,ensureDist:r,ensureComponentStore:i,ensureName:s,skipValidateDidName:a,...c}),{value:d,error:y}=l.validate(t);if(y)throw new Error(`Invalid blocklet meta: ${y.details.map(h=>h.message).join(", ")}`);return d};M.validateMeta=Lt;M.default=Lt;(function(t){var e=O&&O.__createBinding||(Object.create?function(n,o,v,b){b===void 0&&(b=v);var g=Object.getOwnPropertyDescriptor(o,v);(!g||("get"in g?!o.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return o[v]}}),Object.defineProperty(n,b,g)}:function(n,o,v,b){b===void 0&&(b=v),n[b]=o[v]}),r=O&&O.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),i=O&&O.__importStar||function(){var n=function(o){return n=Object.getOwnPropertyNames||function(v){var b=[];for(var g in v)Object.prototype.hasOwnProperty.call(v,g)&&(b[b.length]=g);return b},n(o)};return function(o){if(o&&o.__esModule)return o;var v={};if(o!=null)for(var b=n(o),g=0;g<b.length;g++)b[g]!=="default"&&e(v,o,b[g]);return r(v,o),v}}(),s=O&&O.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixService=t.fixInterfaces=t.parsePerson=t.formatPerson=t.fixName=t.fixTags=t.fixPerson=t.fixKeywords=t.fixFiles=t.fixRepository=t.fixRequired=void 0;const a=s(qt),c=i(We),l=Ht,d=M;Object.defineProperty(t,"fixService",{enumerable:!0,get:function(){return d.fixAndValidateService}});const y=fe,h=(n,o)=>{n.description||(n.description=`Blocklet from ${o}`),n.version||(n.version=l.BLOCKLET_DEFAULT_VERSION)};t.fixRequired=h;const j=n=>{if(n.repository&&(typeof n.repository=="string"&&(n.repository={type:"git",url:n.repository}),n.repository.url)){const o=c.fromUrl(n.repository.url);o&&(n.repository.url=o.getDefaultRepresentation()==="shortcut"?o.https():o.toString())}};t.fixRepository=j;const m=n=>{Array.isArray(n.files)?n.files&&(n.files=n.files.filter(o=>!(!o||typeof o!="string"))):delete n.files};t.fixFiles=m;const F=n=>{typeof n.keywords=="string"&&(n.keywords=n.keywords.split(/,\s+/)),n.keywords&&!Array.isArray(n.keywords)?delete n.keywords:n.keywords&&(n.keywords=n.keywords.filter(o=>!(typeof o!="string"||!o)))};t.fixKeywords=F;const w=n=>{typeof n.tags=="string"&&(n.tags=n.tags.split(/,\s+/)),n.tags&&!Array.isArray(n.tags)?delete n.tags:n.tags&&(n.tags=n.tags.filter(o=>!(typeof o!="string"||!o)))};t.fixTags=w;const I=(n,o)=>(n.author&&(n.author=o(n.author)),["maintainers","contributors"].forEach(v=>{Array.isArray(n[v])&&(n[v]=n[v].map(o))}),n),W=n=>{if(!n)return"";if(typeof n=="string")return n;const o=n.name||"",v=n.url||n.web,b=v?` (${v})`:"",g=n.email||n.mail,x=g?` <${g}>`:"";return o+x+b};t.formatPerson=W;const T=n=>{if(typeof n!="string")return n;const o=n.match(/^([^(<]+)/),v=n.match(/\(([^)]+)\)/),b=n.match(/<([^>]+)>/),g={};return o&&o[0].trim()&&(g.name=o[0].trim()),b&&([,g.email]=b),v&&([,g.url]=v),g};t.parsePerson=T;const G=n=>(I(n,W),I(n,T),n);t.fixPerson=G;const _=(n,o=!0)=>{if(Array.isArray(n.interfaces)||(n.interfaces=[]),n.interfaces.length)return n.interfaces.forEach(x=>{x.type===l.BLOCKLET_INTERFACE_TYPE_WEB&&(x.protocol="http")}),n;const b=(0,a.default)(n,"capabilities.dynamicPathPrefix",!0)?l.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",g=({type:x="web",name:k,path:J="/",protocol:tt="http",port:et=l.BLOCKLET_DEFAULT_PORT_NAME})=>{n.interfaces.push({type:x,name:k,path:J,prefix:b,port:et,protocol:tt})};return[l.BLOCKLET_INTERFACE_PUBLIC].forEach(x=>{n[x]&&g({name:x,path:n[x]})}),Array.isArray(n.exposeServices)&&n.exposeServices.forEach(x=>{g({type:"service",name:x.protocol,protocol:x.protocol,port:{internal:`BLOCKLET_${x.protocol}_PORT`.toUpperCase(),external:x.port}})}),o&&(delete n.publicUrl,delete n.adminUrl,delete n.configUrl,delete n.docUrl,delete n.exposeServices,n.capabilities&&delete n.capabilities.dynamicPathPrefix),n};t.fixInterfaces=_;const z=n=>{const{did:o}=n;try{(0,y.validateNewDid)(o),n.name=o}catch{}return n};t.fixName=z,t.default={fixRequired:h,fixRepository:j,fixFiles:m,fixKeywords:F,fixPerson:G,fixTags:w,fixName:z,formatPerson:W,parsePerson:T,fixInterfaces:_,fixService:d.fixAndValidateService}})(_t);function Tt({owner:t,locale:e}){return u.jsxs(jt,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.fullName,t.did?u.jsx(Kt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:t.did,compact:!0,size:14,locale:e}):null]})}Tt.propTypes={owner:C.object.isRequired,locale:C.string.isRequired};const Je="install-blocklet-from-URL",Dt=()=>{const[t,e]=de(Je,"[]",{raw:!0}),r=s=>{const a=s.trim(),c=JSON.parse(t),l=c.findIndex(d=>d===a);l!==0&&(l>0&&c.splice(l,1),c.length>=10&&c.splice(9),c.unshift(a),e(JSON.stringify(c)))},i=s=>{if(!s)return;const a=JSON.parse(t),c=s.trim(),l=a.findIndex(d=>d===c);l>-1&&(a.splice(l,1),e(JSON.stringify(a)))};return{urls:t?JSON.parse(t):[],addUrlRecord:r,removeUrlRecord:i}},Ye=Vt(()=>({listItemText:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}));function ht(t){const{value:e,onValueChange:r,children:i,helperText:s}=t,{urls:a,removeUrlRecord:c}=Dt(),l=(y,h)=>{y.preventDefault(),y.stopPropagation(),c(h)},d=Ye();return u.jsxs(jt,{children:[u.jsx(ge,{freeSolo:!0,options:a,inputValue:e,onInputChange:(y,h)=>{r(h)},disableClearable:!0,popupIcon:null,renderInput:y=>zt.cloneElement(i,{...y}),renderOption:(y,h)=>P.createElement(Jt,{...y,key:h,secondaryAction:u.jsx(Yt,{edge:"end","aria-label":"delete",onClick:j=>l(j,h),children:u.jsx(me,{})})},u.jsx(ve,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:u.jsx(Xt,{primary:h,className:d.listItemText})})),ListboxProps:{sx:{maxHeight:300,overflow:"auto"}}}),u.jsx(Qt,{style:{margin:0},children:s})]})}ht.propTypes={onValueChange:C.func,children:C.node,value:C.string,helperText:C.string};ht.defaultProps={onValueChange:()=>{},children:null,value:"",helperText:""};function Nt({defaultUrl:t,onCancel:e,onSuccess:r,onError:i,mode:s,handleText:a}){const{api:c}=Zt(),{api:l}=kt(),[d,y]=P.useState(!1),[h,j]=P.useState(""),{t:m,locale:F}=te(),w={dist:{}},[I,W]=P.useState(t),[T,G]=P.useState(t?1:0),[_,z]=P.useState(w),[n,o]=P.useState(!1),[v,b]=P.useState({}),g=s==="component",x=g?!0:!t,{addUrlRecord:k}=Dt(),J=async()=>{z(w),j(null),y(!0);let f=I.trim();!f.startsWith("https://")&&!f.startsWith("http://")&&!f.startsWith("file://")&&(f=`file://${f}`);try{const q=decodeURIComponent(f);try{new URL(q)}catch{throw new Error("Invalid URL")}const{meta:rt,inStore:Ft,registryUrl:Wt}=await c.getBlockletMetaFromUrl({input:{url:q}});z(rt),b({inStore:Ft,registryUrl:Wt,inputUrl:f}),k(f)}catch(q){console.error(q);const rt=`Blocklet Install failed: ${he(q)}`;j(rt),i(q)}finally{y(!1)}},tt=()=>{if(g){r({meta:_,...v}),e();return}y(!0),o(!0)},et=()=>{y(!1),o(!1),r({meta:_,...v}),e()},$t=()=>{y(!1),o(!1)};P.useEffect(()=>{t&&J()},[t]);const Bt=[{name:m("common.name"),value:ee.getDisplayName({meta:_},!0)},{name:m("common.version"),value:_.version},{name:m("common.did"),value:_.did?u.jsx(re,{did:_.did}):null},{name:m("common.author"),value:_.owner?u.jsx(Tt,{owner:_.owner,locale:F}):_t.formatPerson(_.author)},{name:m("blocklet.dist.downloadLink"),value:_.dist.tarball}],Mt=()=>d?u.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:u.jsx(pt,{})}):_.did?u.jsx("div",{style:{paddingLeft:"10%"},children:Bt.map(f=>f.name===m("common.did")?u.jsx(mt,{valueComponent:"div",nameWidth:120,name:f.name,nameFormatter:()=>m("common.did"),children:f.value},f.name):u.jsx(mt,{valueComponent:"div",nameWidth:120,name:f.name,children:f.value},f.name))}):null,ut=[{label:m("blocklet.fromUrl.step0"),body:u.jsx(ie,{component:"div",children:u.jsx(ht,{style:{marginBottom:32},value:I,helperText:m("blocklet.fromUrl.description"),onValueChange:f=>{j(null),W(f)},children:u.jsx(ne,{label:m("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:I,onChange:f=>{j(null),W(f.target.value)},disabled:d,onKeyPress:f=>{f.key==="Enter"&&(f.preventDefault(),J(),G(1))}})})}),cancel:m("common.cancel"),confirm:m("common.next"),onCancel:e,onConfirm:()=>{J(),G(1)}},{label:m("blocklet.fromUrl.step1"),body:Mt(),cancel:m(x?"common.pre":"common.cancel"),confirm:(a==null?void 0:a.confirm)||m("blocklet.fromUrl.confirm"),onCancel:()=>{x?G(f=>f-1):e()},onConfirm:()=>{tt()}}],D=ut[T];return u.jsxs(u.Fragment,{children:[u.jsxs(se,{title:(a==null?void 0:a.title)||m("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>D.onCancel(),showCloseButton:T===0,disableEscapeKeyDown:!0,open:!0,actions:u.jsxs(u.Fragment,{children:[D.cancel&&u.jsx(ft,{onClick:f=>{f.stopPropagation(),j(null),D.onCancel()},color:"inherit",children:D.cancel||m("common.cancel")}),u.jsxs(ft,{onClick:f=>{f.stopPropagation(),D.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:d||!I||h,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[d&&T===0&&u.jsx(pt,{size:16}),D.confirm]})]}),children:[x&&u.jsx(ye,{alternativeLabel:!0,activeStep:T,children:ut.map(({label:f})=>u.jsx(be,{children:u.jsx(xe,{children:f})},f))}),u.jsx(oe,{component:"div",style:{marginTop:24},children:D.body}),!!h&&u.jsx(ae,{severity:"error",style:{width:"100%",marginTop:8},children:h})]}),_&&n&&u.jsx(le,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:l.get,checkTimeout:5*60*1e3,onSuccess:et,extraParams:{title:_.title,wt:ce(_),blockletMetaUrl:decodeURIComponent(I.trim())},messages:{title:m("setup.keyPair.title"),scan:m("setup.keyPair.scan"),confirm:m("setup.keyPair.confirm"),success:m("setup.keyPair.success")},onClose:$t})]})}Nt.propTypes={defaultUrl:C.string,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,mode:C.oneOf(["install","component"]),handleText:C.object};Nt.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{je as B,Nt as I,Tt as a,_t as f};
@@ -1,4 +1,4 @@
1
- import{bW as T,j as s,P as r,n as v,r as m,e as A,bi as $,D as E,m as j,o as H,aT as M,cX as q,cu as b,a2 as F,cY as U,A as B,cZ as O,cD as Y,c_ as N,c$ as S,av as W,K as L,bc as V,b8 as X,ct as K,C as J}from"./index-DTb1YjkO.js";import{R as Z}from"./index-CIeEDIRZ.js";import{N as G}from"./index-uw3m84Z2.js";import{C as z}from"./index-CZplOWEN.js";import{b as Q}from"./sdk-gxKU3x6m.js";import{w as ee}from"./wrap-locale-B35eVgy7.js";const se=T(s.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function P({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext(A),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c,extra:e.passportExpireTime?{key:"Exp",value:$(e.passportExpireTime).format("YYYY-MM-DD HH:mm:ss")}:void 0}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),i=m.useCallback(()=>{o(!1)},[]);return s.jsxs(s.Fragment,{children:[s.jsx(ie,{children:s.jsxs("div",{className:"invite-passport__card",onClick:x,children:[!!e.display&&s.jsx(G,{data:e.display,style:{width:"100%",height:"100%"}}),!e.display&&s.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})]})}),s.jsx(E,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:i,children:e.role.permissions&&e.role.permissions.length>0?s.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>s.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):s.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[s.jsx(se,{style:{width:"30px",height:"30px"}}),s.jsx("div",{children:t("invite.emptyPermission")})]})})]})}P.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};P.defaultProps={passportColor:"auto"};const ie=v.div`
1
+ import{bW as T,j as s,P as r,n as v,r as m,e as A,bi as $,D as E,m as j,o as H,aT as M,cX as q,cu as b,a2 as F,cY as U,A as B,cZ as O,cD as Y,c_ as N,c$ as S,av as W,K as L,bc as V,b8 as X,ct as K,C as J}from"./index-BXOD69ua.js";import{R as Z}from"./index-BBjq0j2v.js";import{N as G}from"./index-Ba15C891.js";import{C as z}from"./index-gYWDzVZB.js";import{b as Q}from"./sdk-CJFYaDBM.js";import{w as ee}from"./wrap-locale-BRogPOgW.js";const se=T(s.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function P({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext(A),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c,extra:e.passportExpireTime?{key:"Exp",value:$(e.passportExpireTime).format("YYYY-MM-DD HH:mm:ss")}:void 0}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),i=m.useCallback(()=>{o(!1)},[]);return s.jsxs(s.Fragment,{children:[s.jsx(ie,{children:s.jsxs("div",{className:"invite-passport__card",onClick:x,children:[!!e.display&&s.jsx(G,{data:e.display,style:{width:"100%",height:"100%"}}),!e.display&&s.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})]})}),s.jsx(E,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:i,children:e.role.permissions&&e.role.permissions.length>0?s.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>s.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):s.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[s.jsx(se,{style:{width:"30px",height:"30px"}}),s.jsx("div",{children:t("invite.emptyPermission")})]})})]})}P.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};P.defaultProps={passportColor:"auto"};const ie=v.div`
2
2
  display: flex;
3
3
  max-width: 350px;
4
4
  margin: 30px auto;
@@ -0,0 +1 @@
1
+ import{bl as i,ga as e}from"./index-BXOD69ua.js";const a=e;var o=(r,t)=>a(r)===a(t);const P=i(o);export{P as i};