@abtnode/blocklet-services 1.16.30-beta-e7a90fb2 → 1.16.31-beta-52250475

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 (180) hide show
  1. package/dist/assets/{Add-DV9cHTiI.js → Add-DMLXuapt.js} +1 -1
  2. package/dist/assets/{AddBox-DjGRetT1.js → AddBox-CpBdwq7q.js} +1 -1
  3. package/dist/assets/{Alert-BriK3hjA.js → Alert-DdUTjamT.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-DX29Pf8V.js → ArrowDropDown-DpF0L6m2.js} +1 -1
  5. package/dist/assets/{Avatar-CpQhQmV4.js → Avatar-Ba5K-SpV.js} +1 -1
  6. package/dist/assets/{ButtonGroup-BPdi_2z2.js → ButtonGroup-oqbT9mJ7.js} +1 -1
  7. package/dist/assets/{CheckCircle-DwkE-k6U.js → CheckCircle-Df4UlXEP.js} +1 -1
  8. package/dist/assets/{ChevronRight-BHXal2s_.js → ChevronRight-MsONzKko.js} +1 -1
  9. package/dist/assets/{Close-BtG4tyUL.js → Close-BzQI1nKM.js} +1 -1
  10. package/dist/assets/{CloseOutlined-CYZb8eDz.js → CloseOutlined-CcRedm-I.js} +1 -1
  11. package/dist/assets/{Delete-rvy-F0hT.js → Delete-eYuUFe-a.js} +1 -1
  12. package/dist/assets/{DeleteOutline-C36lJe42.js → DeleteOutline-avstszKw.js} +1 -1
  13. package/dist/assets/{Done-n1c-sUsw.js → Done-CDaSY-gN.js} +1 -1
  14. package/dist/assets/{Download-DuCZFVPl.js → Download-DA76-zAj.js} +1 -1
  15. package/dist/assets/{Edit-BrAk9NBL.js → Edit-DrnFKfrQ.js} +1 -1
  16. package/dist/assets/{EditIcon-CPgYqcwg.js → EditIcon-FTgbeCiz.js} +1 -1
  17. package/dist/assets/{Error-g7gK9Wfp.js → Error-EtOO_F4K.js} +1 -1
  18. package/dist/assets/{ExpandMore-DpLFPsWa.js → ExpandMore-CAfMRIG3.js} +1 -1
  19. package/dist/assets/{FilterList-BpmYd7MC.js → FilterList-CfRY6G_6.js} +1 -1
  20. package/dist/assets/{FormControl-Dq6XW9kS.js → FormControl-CJxOqtCV.js} +1 -1
  21. package/dist/assets/{FormControlLabel-CQnpTkDU.js → FormControlLabel-BKsoLGHz.js} +1 -1
  22. package/dist/assets/{FormGroup-C8sAhYQk.js → FormGroup-Chc5NbDQ.js} +1 -1
  23. package/dist/assets/{Google-C3cw6Unp.js → Google-C72krpFT.js} +1 -1
  24. package/dist/assets/{Hidden-c0nvbE8_.js → Hidden-v7r91ILG.js} +1 -1
  25. package/dist/assets/{InfoOutlined-DEt-KJ8v.js → InfoOutlined-D6TSS9ex.js} +1 -1
  26. package/dist/assets/{InputAdornment-Dr1oU3Hs.js → InputAdornment-B1JGDyvY.js} +1 -1
  27. package/dist/assets/{InputLabel-DYr7To9X.js → InputLabel-Ds1qPSij.js} +1 -1
  28. package/dist/assets/{LastPage-DV14H4DC.js → LastPage-5otHasfZ.js} +1 -1
  29. package/dist/assets/{Launch-DSSRxyd1.js → Launch-CsBFqx2_.js} +1 -1
  30. package/dist/assets/{LaunchOutlined-DOGa7uCZ.js → LaunchOutlined-B4YtdACN.js} +1 -1
  31. package/dist/assets/{Link-BzeSWqDp.js → Link-JTCdKmrw.js} +1 -1
  32. package/dist/assets/{ListItemText-BWMpM4cA.js → ListItemText-CJO6iQaY.js} +1 -1
  33. package/dist/assets/{LoadingButton-IrsPdnhT.js → LoadingButton-MZJ0ZCPE.js} +1 -1
  34. package/dist/assets/{LockIcon-Cx_TySkG.js → LockIcon-BEsB4YZ5.js} +1 -1
  35. package/dist/assets/{Loop-CSmyyk97.js → Loop-D4rRjL2T.js} +1 -1
  36. package/dist/assets/{MoreHoriz-B_IgZ_Tw.js → MoreHoriz-B5rpG1Ew.js} +1 -1
  37. package/dist/assets/{MoreVert-BQD92YJp.js → MoreVert-BqoNOXb1.js} +1 -1
  38. package/dist/assets/{OpenInNew-Ba4HupG6.js → OpenInNew-D9pZObQI.js} +1 -1
  39. package/dist/assets/{Pagination-g_z2fX8D.js → Pagination-BiImme98.js} +1 -1
  40. package/dist/assets/{PlayArrow-CvyM0yMY.js → PlayArrow-DpuhKo6D.js} +1 -1
  41. package/dist/assets/{QuestionMarkCircle-B_wELYAO.js → QuestionMarkCircle-D8s3T__Z.js} +1 -1
  42. package/dist/assets/{RadioGroup-BSqtRWJR.js → RadioGroup-D4XxZA_m.js} +1 -1
  43. package/dist/assets/{Search-D_9DtKpx.js → Search-eHBEQt38.js} +1 -1
  44. package/dist/assets/{Select-CMM8MR9i.js → Select-CHwe79IG.js} +1 -1
  45. package/dist/assets/{ServerLogo-Ds39xok2.js → ServerLogo-Cg7KWr6l.js} +1 -1
  46. package/dist/assets/{Skeleton-d-rA8WB_.js → Skeleton-LO2AMjQj.js} +1 -1
  47. package/dist/assets/{Slider-Cv9IlmAx.js → Slider-D_aaap0D.js} +1 -1
  48. package/dist/assets/{Stepper-X4KYPIVJ.js → Stepper-Cn0ehU0z.js} +1 -1
  49. package/dist/assets/{TextField-BYelVRF_.js → TextField-By686O81.js} +1 -1
  50. package/dist/assets/{Toolbar-DI2YKZS2.js → Toolbar-CILlK-1t.js} +1 -1
  51. package/dist/assets/{ViewList-DWZsPuDR.js → ViewList-DOAqHfHm.js} +1 -1
  52. package/dist/assets/{access-control-Deg0Ez_v.js → access-control-YiOVUeX5.js} +1 -1
  53. package/dist/assets/{actions-Dv2KmWA_.js → actions-BoMQPbbF.js} +1 -1
  54. package/dist/assets/add-component-core-C3-hSwf4.js +979 -0
  55. package/dist/assets/{add-resource-B2YCggbD.js → add-resource-YzQQokOB.js} +1 -1
  56. package/dist/assets/{addon-B-L0-6EM.js → addon-BMJifOIu.js} +1 -1
  57. package/dist/assets/{analytics-B3U8I3AQ.js → analytics-Mv3diYQv.js} +1 -1
  58. package/dist/assets/api-jAQ8N-C_.js +1 -0
  59. package/dist/assets/{audit-logs-Dt1zBSaX.js → audit-logs-BNNOk6hr.js} +1 -1
  60. package/dist/assets/{button-BotQVFjI.js → button-jtk50dQY.js} +1 -1
  61. package/dist/assets/click-to-copy-CuY68HMG.js +1 -0
  62. package/dist/assets/{complete-BfHgp0O7.js → complete-bFHLAkpC.js} +2 -2
  63. package/dist/assets/{component-BziFLYA3.js → component-BaAw_jvb.js} +1 -1
  64. package/dist/assets/{config-BqLTd80Y.js → config-BHCviFXO.js} +1 -1
  65. package/dist/assets/{config-BcfULTik.js → config-CL6WfXG0.js} +2 -2
  66. package/dist/assets/{config-navigation-1U4iVdBl.js → config-navigation-DOxLg4SG.js} +1 -1
  67. package/dist/assets/{confirm-BWW215hi.js → confirm-Dx6jUaOz.js} +1 -1
  68. package/dist/assets/{connect-DC7BGJJv.js → connect-CdF3A2Vn.js} +1 -1
  69. package/dist/assets/{connect-CfBbqaTr.js → connect-W750gtDi.js} +1 -1
  70. package/dist/assets/{connect-to-CHo6hM6n.js → connect-to-DSVNCjA-.js} +1 -1
  71. package/dist/assets/{content-layout-BP4bsvx7.js → content-layout-BEZyVpjO.js} +1 -1
  72. package/dist/assets/{dashboard-BWG8DtF1.js → dashboard-CigfHyBK.js} +3 -3
  73. package/dist/assets/{did-address-TSZ5XRBj.js → did-address-CR96fGSF.js} +1 -1
  74. package/dist/assets/{domain-B0bCdxTC.js → domain-DvAmfnwX.js} +1 -1
  75. package/dist/assets/{domain-list-A5SqLbLS.js → domain-list-BFAh6gG5.js} +2 -2
  76. package/dist/assets/{exchange-passport-CBjbwwA6.js → exchange-passport-C9lSXYeG.js} +1 -1
  77. package/dist/assets/{fallback-Dz8ZuYD5.js → fallback-DVHgA8PG.js} +1 -1
  78. package/dist/assets/{format-error-DQS9AwZv.js → format-error-xm5q5N3Z.js} +1 -1
  79. package/dist/assets/{fuel-BP12PtJ1.js → fuel-B2bKQ7Ww.js} +1 -1
  80. package/dist/assets/{fullpage-DXFbt1Ve.js → fullpage-9fehs0lR.js} +1 -1
  81. package/dist/assets/{home-Cx9PAId-.js → home-CVEpIfo3.js} +1 -1
  82. package/dist/assets/{iframe-CO-VEhes.js → iframe-4KnzoKaC.js} +1 -1
  83. package/dist/assets/{index-BSHfXuRt.js → index-3IKYL1th.js} +1 -1
  84. package/dist/assets/{index-DtAm5Ed6.js → index-3TcO2NHG.js} +1 -1
  85. package/dist/assets/{index-D-GkMvG_.js → index-7ATAUQCS.js} +1 -1
  86. package/dist/assets/{index-DCMTEGgZ.js → index-BHBa5bY_.js} +1 -1
  87. package/dist/assets/{index-ozDSMBYi.js → index-BIwlKqnv.js} +1 -1
  88. package/dist/assets/{index-ByYl1QnH.js → index-BJflKzAj.js} +1 -1
  89. package/dist/assets/{index-ChpB_Xok.js → index-BLG5zTvA.js} +1 -1
  90. package/dist/assets/{index-B0wa_Sca.js → index-BZeVpmIU.js} +1 -1
  91. package/dist/assets/{index-CQU16qpp.js → index-BjygIrih.js} +1 -1
  92. package/dist/assets/{index-CndSwPzI.js → index-BvJGY_nw.js} +1 -1
  93. package/dist/assets/{index-DU7LqWjQ.js → index-C01E65Yy.js} +1 -1
  94. package/dist/assets/{index-COZKzHiS.js → index-CPYtoS2i.js} +1 -1
  95. package/dist/assets/{index-Bwzls06Y.js → index-Cc3xWU8h.js} +1 -1
  96. package/dist/assets/{index-CTFO1wAr.js → index-CcMsQvPf.js} +1 -1
  97. package/dist/assets/{index-CaLGv6xG.js → index-Cggmiiia.js} +221 -221
  98. package/dist/assets/{index-VIHj0M7P.js → index-ChjVC0V6.js} +1 -1
  99. package/dist/assets/{index-Du6azec5.js → index-CplLRft2.js} +1 -1
  100. package/dist/assets/{index-BcFOSrVl.js → index-CtsIzdJq.js} +1 -1
  101. package/dist/assets/{index-B22_1WOD.js → index-Cx6pRmO2.js} +1 -1
  102. package/dist/assets/{index--YUaVsoq.js → index-CzyLZl7H.js} +21 -21
  103. package/dist/assets/{index-TTSckhl8.js → index-DFAKgndM.js} +1 -1
  104. package/dist/assets/{index-zQvc8SIq.js → index-DFxBHRuN.js} +1 -1
  105. package/dist/assets/{index-BmHPL-9s.js → index-Da_LrvSz.js} +3 -3
  106. package/dist/assets/{index-46Rvg-Bo.js → index-DbFNRcRj.js} +1 -1
  107. package/dist/assets/{index-MoRwjSwP.js → index-Dm5LygxH.js} +1 -1
  108. package/dist/assets/{index-B5Pm_bPi.js → index-DnemmBZZ.js} +1 -1
  109. package/dist/assets/{index-BqmsKa7O.js → index-Dnz1P7hS.js} +1 -1
  110. package/dist/assets/{index-BsjCwHmK.js → index-J--b5UMY.js} +1 -1
  111. package/dist/assets/{index-CFQwbx1S.js → index-Ro4L6Nk9.js} +1 -1
  112. package/dist/assets/{index-BJDKEH0b.js → index-Z80N-6o6.js} +5 -5
  113. package/dist/assets/{index-D_u35EkG.js → index-tZwe6kGH.js} +1 -1
  114. package/dist/assets/{index-D5PXuh6o.js → index-xFQdePlH.js} +11 -11
  115. package/dist/assets/{index.es-CYl4P_xg.js → index.es-Bu678ogX.js} +1 -1
  116. package/dist/assets/{index.esm-DDyWFyUp.js → index.esm-eUQd5uNf.js} +1 -1
  117. package/dist/assets/{invitation-YCFRX3K4.js → invitation-BtBp97Li.js} +1 -1
  118. package/dist/assets/{invite-BVqEvYi7.js → invite-D6nXY3dB.js} +1 -1
  119. package/dist/assets/{issue-passport-Bt2ICeaH.js → issue-passport-NVB_pTUn.js} +1 -1
  120. package/dist/assets/{item-DmDrPoAj.js → item-BvTmy-2T.js} +1 -1
  121. package/dist/assets/{jss-plugin-props-sort.esm-B9z92TrV.js → jss-plugin-props-sort.esm-DF2UeHPM.js} +1 -1
  122. package/dist/assets/{launch-result-message-DpNOYW9u.js → launch-result-message--yAIU8ij.js} +1 -1
  123. package/dist/assets/{layout-D41GSjev.js → layout-CfszkMaR.js} +1 -1
  124. package/dist/assets/{list-header-cw9lRKSX.js → list-header-BvVRSRDr.js} +1 -1
  125. package/dist/assets/localization-CdHA54kI.js +1 -0
  126. package/dist/assets/{log-DVDRYSeA.js → log--54sjPHz.js} +1 -1
  127. package/dist/assets/{login-BLIQel5D.js → login-eHr1AdTW.js} +1 -1
  128. package/dist/assets/{login-oauth-callback--4mls_Fw.js → login-oauth-callback-D6HMi3t4.js} +1 -1
  129. package/dist/assets/{logo-uploader-CHBeSau3.js → logo-uploader-Ct05IBgW.js} +3 -3
  130. package/dist/assets/{lost-passport-6PNRRlCd.js → lost-passport-DFkMMATo.js} +3 -3
  131. package/dist/assets/{lottie-C16LOHrZ.js → lottie-CHlQE8LI.js} +1 -1
  132. package/dist/assets/{notifications-DHYTuxQt.js → notifications-DNefq6Ai.js} +1 -1
  133. package/dist/assets/{open-window-CEqHc-YI.js → open-window-Hoovi1SQ.js} +1 -1
  134. package/dist/assets/{overview-jW78KQ6d.js → overview-C99SD8Sj.js} +2 -2
  135. package/dist/assets/{page-header-Bjl7D46v.js → page-header-BcMcWChj.js} +1 -1
  136. package/dist/assets/{permission-BK9x4qjQ.js → permission-CoUl_-TD.js} +1 -1
  137. package/dist/assets/{preferences-4fQh6PBV.js → preferences-BhQwvtNs.js} +1 -1
  138. package/dist/assets/publish-resource-BrX6QZZv.js +1 -0
  139. package/dist/assets/{react-DCoycSH4.js → react-CM36OPYv.js} +19 -19
  140. package/dist/assets/{redux-Xix6UYN5.js → redux-CmQ0AupQ.js} +1 -1
  141. package/dist/assets/{resource-dialog-CMS1eEc0.js → resource-dialog-DPp8WhH6.js} +1 -1
  142. package/dist/assets/sdk-SqTk_6RZ.js +1 -0
  143. package/dist/assets/{selector-BcHp8r2b.js → selector-DplhIXMq.js} +1 -1
  144. package/dist/assets/session-B20aBevE.js +1 -0
  145. package/dist/assets/{setup-DXuWRjLR.js → setup-CHeBPg1W.js} +3 -3
  146. package/dist/assets/{shorten-label-DZ5n7VkB.js → shorten-label-Bfc9PQs9.js} +1 -1
  147. package/dist/assets/{slicedToArray-DiN6EoYj.js → slicedToArray-ZTJkdcdS.js} +2 -2
  148. package/dist/assets/{spaces-DBKeHx91.js → spaces-BKVgtwre.js} +1 -1
  149. package/dist/assets/{start-C4mLiamV.js → start-Bma6-tzj.js} +1 -1
  150. package/dist/assets/{step-actions-NyA7AGpj.js → step-actions-CZsxCY_f.js} +1 -1
  151. package/dist/assets/{studio-CC7YQ-9Q.js → studio-BG-LwJ0Y.js} +1 -1
  152. package/dist/assets/{switch-control-VH3u6pwk.js → switch-control-BQicjBlL.js} +1 -1
  153. package/dist/assets/{toUpper-D8eon-dl.js → toUpper-Cl4b2ZOs.js} +1 -1
  154. package/dist/assets/{transfer-Dp36g86n.js → transfer-iCxgFgdA.js} +1 -1
  155. package/dist/assets/{uniqBy-Cev3lMnU.js → uniqBy-Depm40zB.js} +1 -1
  156. package/dist/assets/{unsubscribe-Be0k3pAZ.js → unsubscribe-j4j95BgM.js} +1 -1
  157. package/dist/assets/{url-join-B-UX0vQK.js → url-join-CXExeXLp.js} +1 -1
  158. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-DF1lby8c.js → use-blocklet-info-for-connect-did-spaces-ByFtSRMu.js} +1 -1
  159. package/dist/assets/{use-mobile-BLqjm-5m.js → use-mobile-Bjgo--1J.js} +1 -1
  160. package/dist/assets/{useAsync-PE3W-DLW.js → useAsync-BrIwhlfT.js} +1 -1
  161. package/dist/assets/{useFormControl-DMGx-jdt.js → useFormControl-xR1NlgHj.js} +1 -1
  162. package/dist/assets/{useLocalStorage-eP0cInBT.js → useLocalStorage-C1CX-JWm.js} +1 -1
  163. package/dist/assets/{useSetState-DEVLe2Fz.js → useSetState-Buep2Jkr.js} +1 -1
  164. package/dist/assets/{useSlot-BrU8y60n.js → useSlot-DJoDEpM7.js} +1 -1
  165. package/dist/assets/{useSlotProps-fP10cTIP.js → useSlotProps-thaabt4w.js} +1 -1
  166. package/dist/assets/{useThemeProps-C59Glnbx.js → useThemeProps-DthQbzYX.js} +1 -1
  167. package/dist/assets/{user-center-CkHZ_2ui.js → user-center-LFYa8NAO.js} +1 -1
  168. package/dist/assets/{user-sessions-C8nlOE7U.js → user-sessions-ChQlFWXn.js} +1 -1
  169. package/dist/assets/{util-yXMDVjHb.js → util-BKJ5oRJz.js} +1 -1
  170. package/dist/assets/{wrap-locale-DL11xPuS.js → wrap-locale-B9-80Orf.js} +1 -1
  171. package/dist/index.html +1 -1
  172. package/dist/service-worker.js +1 -1
  173. package/package.json +25 -25
  174. package/dist/assets/add-component-core-CGy2QLvt.js +0 -979
  175. package/dist/assets/api-DJ1sjN9o.js +0 -1
  176. package/dist/assets/click-to-copy-C932KUDy.js +0 -1
  177. package/dist/assets/localization-9mzelGR9.js +0 -1
  178. package/dist/assets/publish-resource-RsLy3V3l.js +0 -1
  179. package/dist/assets/sdk-B75CkXUw.js +0 -1
  180. package/dist/assets/session-AqfK0jLG.js +0 -1
@@ -1 +1 @@
1
- import{u as B,al as L,by as W,a1 as O,r,c as A,c4 as T,bx as _,m as h,l as F,c5 as K,j as w,av as $}from"./index-CaLGv6xG.js";import{A as z,S as G}from"./add-component-core-CGy2QLvt.js";import"./lottie-C16LOHrZ.js";import"./index-DU7LqWjQ.js";import"./spaces-DBKeHx91.js";import"./index-VIHj0M7P.js";import"./api-DJ1sjN9o.js";import"./url-join-B-UX0vQK.js";import"./Skeleton-d-rA8WB_.js";import"./Hidden-c0nvbE8_.js";import"./launch-result-message-DpNOYW9u.js";import"./Close-BtG4tyUL.js";import"./page-header-Bjl7D46v.js";import"./uniqBy-Cev3lMnU.js";import"./logo-uploader-CHBeSau3.js";import"./index-MoRwjSwP.js";import"./index-46Rvg-Bo.js";import"./EditIcon-CPgYqcwg.js";import"./Done-n1c-sUsw.js";import"./Google-C3cw6Unp.js";import"./TextField-BYelVRF_.js";import"./FormControl-Dq6XW9kS.js";import"./useFormControl-DMGx-jdt.js";import"./InputLabel-DYr7To9X.js";import"./Select-CMM8MR9i.js";import"./index-BsjCwHmK.js";import"./FormControlLabel-CQnpTkDU.js";import"./index-DtAm5Ed6.js";import"./index-B22_1WOD.js";import"./session-AqfK0jLG.js";import"./did-address-TSZ5XRBj.js";import"./Link-BzeSWqDp.js";import"./Stepper-X4KYPIVJ.js";import"./format-error-DQS9AwZv.js";import"./Alert-BriK3hjA.js";import"./useSlot-BrU8y60n.js";import"./item-DmDrPoAj.js";import"./Add-DV9cHTiI.js";import"./MoreVert-BQD92YJp.js";import"./Launch-DSSRxyd1.js";import"./DeleteOutline-C36lJe42.js";import"./click-to-copy-C932KUDy.js";import"./shorten-label-DZ5n7VkB.js";import"./confirm-BWW215hi.js";import"./Avatar-CpQhQmV4.js";import"./ButtonGroup-BPdi_2z2.js";import"./jss-plugin-props-sort.esm-B9z92TrV.js";import"./toPropertyKey-PLuKRk1e.js";import"./ListItemText-BWMpM4cA.js";import"./util-yXMDVjHb.js";import"./connect-to-CHo6hM6n.js";import"./use-blocklet-info-for-connect-did-spaces-DF1lby8c.js";import"./CloseOutlined-CYZb8eDz.js";import"./index-CndSwPzI.js";import"./ExpandMore-DpLFPsWa.js";import"./content-layout-BP4bsvx7.js";import"./ArrowDropDown-DX29Pf8V.js";import"./useLocalStorage-eP0cInBT.js";import"./fallback-Dz8ZuYD5.js";import"./index-B5Pm_bPi.js";import"./Search-D_9DtKpx.js";import"./index-ChpB_Xok.js";import"./InputAdornment-Dr1oU3Hs.js";import"./preact.module-DJUF--8d.js";function to(){var u;const{t:g}=B(),{blocklet:a}=L(),{componentDid:s}=W(),f=O(t=>t.breakpoints.down("md")),e=new URL(window.location.href),C=e.searchParams.get("mode")==="dialog",p=e.searchParams.get("resourceType")||"",c=e.searchParams.get("resourceDid")||s,R=e.searchParams.get("store")||"",y=e.searchParams.get("showFromUrl")!=="false",S=e.searchParams.get("showResourcesSwitch")!=="false",E=e.searchParams.get("enableRunBackground")!=="false",P=e.searchParams.get("showCategory")!=="false",n=(u=a==null?void 0:a.meta)==null?void 0:u.did,m=R.split(",").filter(Boolean).map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t}`).origin}catch(o){return console.error(o),null}}).filter(Boolean),[b,D]=r.useState(m.map(t=>({url:t,name:t.replace("https://","")}))),[x,U]=r.useState(null),[j,M]=r.useState("");r.useEffect(()=>{(async()=>{try{const t=await Promise.all(m.map(async o=>{const i=A(o,"/api/store.json"),{data:k}=await T.get(i);return{url:o,name:k.name}}));D(t||[])}catch(t){console.error(t)}})()},[m.join(",")]);const v=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const t=_();return n&&t.connect(),()=>{n&&t.isConnected()&&t.disconnect()}},[n]),h(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const l=F(t=>{var o,i;((o=t.data)==null?void 0:o.event)==="resourceDialog.select"&&((i=t.data)==null?void 0:i.componentDid)===s&&(U(t.data.data),M(t.data.storeUrl))});h(()=>{window.addEventListener("message",l)}),K(()=>{window.removeEventListener("message",l)});const d=({inDialog:t=!0}={})=>w.jsx(z,{stores:b,selectedMeta:x,storeUrl:j,resourceType:p,resourceDid:c,mode:"embed",inDialog:t,storageKey:G(`${p}+${c}`),showResourcesSwitch:S,showFromUrl:y,enableRunBackground:E,showCategory:P});return C?w.jsx($,{className:"resource-dialog",title:g("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:f?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(t,o)=>{o!=="backdropClick"&&v()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:d()}):d({inDialog:!1})}export{to as default};
1
+ import{u as B,al as L,by as W,a1 as O,r,c as A,c4 as T,bx as _,m as h,l as F,c5 as K,j as w,av as $}from"./index-Cggmiiia.js";import{A as z,S as G}from"./add-component-core-C3-hSwf4.js";import"./lottie-CHlQE8LI.js";import"./index-C01E65Yy.js";import"./spaces-BKVgtwre.js";import"./index-ChjVC0V6.js";import"./api-jAQ8N-C_.js";import"./url-join-CXExeXLp.js";import"./Skeleton-LO2AMjQj.js";import"./Hidden-v7r91ILG.js";import"./launch-result-message--yAIU8ij.js";import"./Close-BzQI1nKM.js";import"./page-header-BcMcWChj.js";import"./uniqBy-Depm40zB.js";import"./logo-uploader-Ct05IBgW.js";import"./index-Dm5LygxH.js";import"./index-DbFNRcRj.js";import"./EditIcon-FTgbeCiz.js";import"./Done-CDaSY-gN.js";import"./Google-C72krpFT.js";import"./TextField-By686O81.js";import"./FormControl-CJxOqtCV.js";import"./useFormControl-xR1NlgHj.js";import"./InputLabel-Ds1qPSij.js";import"./Select-CHwe79IG.js";import"./index-J--b5UMY.js";import"./FormControlLabel-BKsoLGHz.js";import"./index-3TcO2NHG.js";import"./index-Cx6pRmO2.js";import"./session-B20aBevE.js";import"./did-address-CR96fGSF.js";import"./Link-JTCdKmrw.js";import"./Stepper-Cn0ehU0z.js";import"./format-error-xm5q5N3Z.js";import"./Alert-DdUTjamT.js";import"./useSlot-DJoDEpM7.js";import"./item-BvTmy-2T.js";import"./Add-DMLXuapt.js";import"./MoreVert-BqoNOXb1.js";import"./Launch-CsBFqx2_.js";import"./DeleteOutline-avstszKw.js";import"./click-to-copy-CuY68HMG.js";import"./shorten-label-Bfc9PQs9.js";import"./confirm-Dx6jUaOz.js";import"./Avatar-Ba5K-SpV.js";import"./ButtonGroup-oqbT9mJ7.js";import"./jss-plugin-props-sort.esm-DF2UeHPM.js";import"./toPropertyKey-PLuKRk1e.js";import"./ListItemText-CJO6iQaY.js";import"./util-BKJ5oRJz.js";import"./connect-to-DSVNCjA-.js";import"./use-blocklet-info-for-connect-did-spaces-ByFtSRMu.js";import"./CloseOutlined-CcRedm-I.js";import"./index-BvJGY_nw.js";import"./ExpandMore-CAfMRIG3.js";import"./content-layout-BEZyVpjO.js";import"./ArrowDropDown-DpF0L6m2.js";import"./useLocalStorage-C1CX-JWm.js";import"./fallback-DVHgA8PG.js";import"./index-DnemmBZZ.js";import"./Search-eHBEQt38.js";import"./index-BLG5zTvA.js";import"./InputAdornment-B1JGDyvY.js";import"./preact.module-DJUF--8d.js";function to(){var u;const{t:g}=B(),{blocklet:a}=L(),{componentDid:s}=W(),f=O(t=>t.breakpoints.down("md")),e=new URL(window.location.href),C=e.searchParams.get("mode")==="dialog",p=e.searchParams.get("resourceType")||"",c=e.searchParams.get("resourceDid")||s,R=e.searchParams.get("store")||"",y=e.searchParams.get("showFromUrl")!=="false",S=e.searchParams.get("showResourcesSwitch")!=="false",E=e.searchParams.get("enableRunBackground")!=="false",P=e.searchParams.get("showCategory")!=="false",n=(u=a==null?void 0:a.meta)==null?void 0:u.did,m=R.split(",").filter(Boolean).map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t}`).origin}catch(o){return console.error(o),null}}).filter(Boolean),[b,D]=r.useState(m.map(t=>({url:t,name:t.replace("https://","")}))),[x,U]=r.useState(null),[j,M]=r.useState("");r.useEffect(()=>{(async()=>{try{const t=await Promise.all(m.map(async o=>{const i=A(o,"/api/store.json"),{data:k}=await T.get(i);return{url:o,name:k.name}}));D(t||[])}catch(t){console.error(t)}})()},[m.join(",")]);const v=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const t=_();return n&&t.connect(),()=>{n&&t.isConnected()&&t.disconnect()}},[n]),h(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const l=F(t=>{var o,i;((o=t.data)==null?void 0:o.event)==="resourceDialog.select"&&((i=t.data)==null?void 0:i.componentDid)===s&&(U(t.data.data),M(t.data.storeUrl))});h(()=>{window.addEventListener("message",l)}),K(()=>{window.removeEventListener("message",l)});const d=({inDialog:t=!0}={})=>w.jsx(z,{stores:b,selectedMeta:x,storeUrl:j,resourceType:p,resourceDid:c,mode:"embed",inDialog:t,storageKey:G(`${p}+${c}`),showResourcesSwitch:S,showFromUrl:y,enableRunBackground:E,showCategory:P});return C?w.jsx($,{className:"resource-dialog",title:g("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:f?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(t,o)=>{o!=="backdropClick"&&v()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:d()}):d({inDialog:!1})}export{to as default};
@@ -1,4 +1,4 @@
1
- import{r as s,j as a,a2 as j,aC as P,aD as O,aE as z,P as n,a0 as _}from"./index-CaLGv6xG.js";import{L as M}from"./selector-BcHp8r2b.js";import{d as k}from"./QuestionMarkCircle-B_wELYAO.js";var c={};Object.defineProperty(c,"__esModule",{value:!0});var m=c.default=void 0;S(s);var p=a;function S(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function f(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?d(Object(o),!0).forEach(function(r){C(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function C(e,t,o){return(t=H(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function H(e){var t=A(e,"string");return typeof t=="symbol"?t:t+""}function A(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l=function(t){return(0,p.jsx)("svg",f(f({},t),{},{children:(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.606 17.32a7.933 7.933 0 0 1-.581-1.18c-.165-.411-.312-.86-.44-1.339a7.639 7.639 0 0 0-1.586 1.054 7.69 7.69 0 0 0 2.607 1.465zm.657-1.675c-.16-.4-.305-.848-.429-1.335A7.643 7.643 0 0 1 10 14h.002c.734 0 1.463.104 2.165.31-.124.487-.268.935-.428 1.335-.283.707-.604 1.235-.925 1.575-.32.339-.595.447-.813.447-.218 0-.493-.108-.813-.447-.322-.34-.642-.867-.925-1.575zM10 12.667a8.976 8.976 0 0 1 2.436.334c.116-.727.193-1.511.22-2.334H7.344c.027.823.103 1.607.22 2.334A8.972 8.972 0 0 1 10 12.667zM7.345 9.333c.027-.823.103-1.607.22-2.334.791.223 1.61.335 2.436.334A8.974 8.974 0 0 0 12.437 7c.116.727.193 1.511.22 2.334H7.344zm6.646 1.334c-.03.982-.127 1.925-.28 2.797.81.367 1.56.852 2.227 1.439a7.666 7.666 0 0 0 1.734-4.236h-3.681zm3.681-1.334H13.99a19.718 19.718 0 0 0-.28-2.798 8.975 8.975 0 0 0 2.228-1.438 7.665 7.665 0 0 1 1.734 4.236zm1.329.669A9 9 0 1 1 1 10a9 9 0 0 1 18 0v.002zM2.329 9.333a7.665 7.665 0 0 1 1.734-4.236A8.974 8.974 0 0 0 6.29 6.535a19.74 19.74 0 0 0-.28 2.798H2.329zm0 1.334h3.682c.03.983.126 1.925.28 2.797a8.974 8.974 0 0 0-2.228 1.439 7.665 7.665 0 0 1-1.734-4.236zm10.648 5.473c.164-.411.312-.86.44-1.34.57.285 1.103.639 1.585 1.055a7.687 7.687 0 0 1-2.606 1.465c.216-.354.41-.751.58-1.18zm-.581-13.46c.967.316 1.85.819 2.606 1.465A7.64 7.64 0 0 1 13.417 5.2c-.128-.48-.276-.928-.44-1.34a7.925 7.925 0 0 0-.581-1.18zm-.657 1.675c.16.4.304.848.428 1.335a7.64 7.64 0 0 1-2.165.31H10a7.64 7.64 0 0 1-2.166-.31c.124-.487.268-.935.429-1.335.283-.708.603-1.235.925-1.575.32-.339.595-.447.813-.447.218 0 .492.108.813.447.321.34.642.867.925 1.575zM7.025 3.86c-.165.411-.312.86-.44 1.34a7.64 7.64 0 0 1-1.586-1.055A7.688 7.688 0 0 1 7.606 2.68c-.216.354-.41.751-.581 1.18z",fill:"currentColor"})}))};l.defaultProps={width:"21",height:"20",viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg"};l.displayName="globe";m=c.default=l;function b({SessionContext:e,extraItems:t,showLocale:o,showHelper:r,showSessionManager:i,sessionManagerProps:w}){const{session:h}=s.useContext(e),{locale:g}=s.useContext(j),y=P(),v=()=>{if(y.pathname.indexOf("/store")>-1){window.open("https://www.arcblock.io/content/docs/createblocklet","_blank");return}window.open("https://www.arcblock.io/content/docs/blocklet-developer","_blank")};return a.jsxs(D,{children:[t.map((u,x)=>s.cloneElement(u,{key:x})),o&&a.jsx(M,{"data-cy":"locale-addon",icon:m,size:23,showText:!1,className:"locale-addon"}),r&&a.jsx(O,{onClick:v,children:a.jsx(k,{})}),i&&a.jsx(z,{locale:g,session:h,size:24,showRole:!0,...w,showManageBlocklet:!1})]})}b.propTypes={SessionContext:n.object.isRequired,webWalletUrl:n.string,extraItems:n.array,showLocale:n.bool,showSessionManager:n.bool,showHelper:n.bool,sessionManagerProps:n.object};b.defaultProps={webWalletUrl:"",extraItems:[],showLocale:!0,showSessionManager:!0,showHelper:!0,sessionManagerProps:{}};const D=_.div`
1
+ import{r as s,j as a,a2 as j,aC as P,aD as O,aE as z,P as n,a0 as _}from"./index-Cggmiiia.js";import{L as M}from"./selector-DplhIXMq.js";import{d as k}from"./QuestionMarkCircle-D8s3T__Z.js";var c={};Object.defineProperty(c,"__esModule",{value:!0});var m=c.default=void 0;S(s);var p=a;function S(e){return e&&e.__esModule?e:{default:e}}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),o.push.apply(o,r)}return o}function f(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?d(Object(o),!0).forEach(function(r){C(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function C(e,t,o){return(t=H(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function H(e){var t=A(e,"string");return typeof t=="symbol"?t:t+""}function A(e,t){if(typeof e!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var r=o.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var l=function(t){return(0,p.jsx)("svg",f(f({},t),{},{children:(0,p.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.606 17.32a7.933 7.933 0 0 1-.581-1.18c-.165-.411-.312-.86-.44-1.339a7.639 7.639 0 0 0-1.586 1.054 7.69 7.69 0 0 0 2.607 1.465zm.657-1.675c-.16-.4-.305-.848-.429-1.335A7.643 7.643 0 0 1 10 14h.002c.734 0 1.463.104 2.165.31-.124.487-.268.935-.428 1.335-.283.707-.604 1.235-.925 1.575-.32.339-.595.447-.813.447-.218 0-.493-.108-.813-.447-.322-.34-.642-.867-.925-1.575zM10 12.667a8.976 8.976 0 0 1 2.436.334c.116-.727.193-1.511.22-2.334H7.344c.027.823.103 1.607.22 2.334A8.972 8.972 0 0 1 10 12.667zM7.345 9.333c.027-.823.103-1.607.22-2.334.791.223 1.61.335 2.436.334A8.974 8.974 0 0 0 12.437 7c.116.727.193 1.511.22 2.334H7.344zm6.646 1.334c-.03.982-.127 1.925-.28 2.797.81.367 1.56.852 2.227 1.439a7.666 7.666 0 0 0 1.734-4.236h-3.681zm3.681-1.334H13.99a19.718 19.718 0 0 0-.28-2.798 8.975 8.975 0 0 0 2.228-1.438 7.665 7.665 0 0 1 1.734 4.236zm1.329.669A9 9 0 1 1 1 10a9 9 0 0 1 18 0v.002zM2.329 9.333a7.665 7.665 0 0 1 1.734-4.236A8.974 8.974 0 0 0 6.29 6.535a19.74 19.74 0 0 0-.28 2.798H2.329zm0 1.334h3.682c.03.983.126 1.925.28 2.797a8.974 8.974 0 0 0-2.228 1.439 7.665 7.665 0 0 1-1.734-4.236zm10.648 5.473c.164-.411.312-.86.44-1.34.57.285 1.103.639 1.585 1.055a7.687 7.687 0 0 1-2.606 1.465c.216-.354.41-.751.58-1.18zm-.581-13.46c.967.316 1.85.819 2.606 1.465A7.64 7.64 0 0 1 13.417 5.2c-.128-.48-.276-.928-.44-1.34a7.925 7.925 0 0 0-.581-1.18zm-.657 1.675c.16.4.304.848.428 1.335a7.64 7.64 0 0 1-2.165.31H10a7.64 7.64 0 0 1-2.166-.31c.124-.487.268-.935.429-1.335.283-.708.603-1.235.925-1.575.32-.339.595-.447.813-.447.218 0 .492.108.813.447.321.34.642.867.925 1.575zM7.025 3.86c-.165.411-.312.86-.44 1.34a7.64 7.64 0 0 1-1.586-1.055A7.688 7.688 0 0 1 7.606 2.68c-.216.354-.41.751-.581 1.18z",fill:"currentColor"})}))};l.defaultProps={width:"21",height:"20",viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg"};l.displayName="globe";m=c.default=l;function b({SessionContext:e,extraItems:t,showLocale:o,showHelper:r,showSessionManager:i,sessionManagerProps:w}){const{session:h}=s.useContext(e),{locale:g}=s.useContext(j),y=P(),v=()=>{if(y.pathname.indexOf("/store")>-1){window.open("https://www.arcblock.io/content/docs/createblocklet","_blank");return}window.open("https://www.arcblock.io/content/docs/blocklet-developer","_blank")};return a.jsxs(D,{children:[t.map((u,x)=>s.cloneElement(u,{key:x})),o&&a.jsx(M,{"data-cy":"locale-addon",icon:m,size:23,showText:!1,className:"locale-addon"}),r&&a.jsx(O,{onClick:v,children:a.jsx(k,{})}),i&&a.jsx(z,{locale:g,session:h,size:24,showRole:!0,...w,showManageBlocklet:!1})]})}b.propTypes={SessionContext:n.object.isRequired,webWalletUrl:n.string,extraItems:n.array,showLocale:n.bool,showSessionManager:n.bool,showHelper:n.bool,sessionManagerProps:n.object};b.defaultProps={webWalletUrl:"",extraItems:[],showLocale:!0,showSessionManager:!0,showHelper:!0,sessionManagerProps:{}};const D=_.div`
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{P as d,h1 as _o,b8 as Vt,b7 as Bo,dP as Yo,Z as Wo,$ as zo,j as p,eF as U,B as Fe,r as b,aj as Jt,aT as Wt,T as be,bl as _n,aD as Ye,aU as Dn,aK as ie,aL as v,au as ze,aG as Me,aF as ke,aH as te,ak as rt,aN as Pe,aO as ve,d1 as We,cN as G,cJ as Ho,cI as tt,ch as Ke,cE as nt,cV as Uo,gU as xn,cT as Ko,dl as Rt,a1 as Bn,bn as Go,dy as qo,gT as Zo,cO as zt,b as ft,cU as Qo,bg as Jo,gS as Yn,eG as Wn,d2 as Xt,cv as en,Y as we,h2 as Xo,a0 as Ot,c7 as er,c9 as tr,Q as nr,dh as or,bh as qe,aQ as rr,u as tn,n as sr,G as ar,c as ir,bk as wn,bj as lr,gD as Be,a2 as zn,gm as Hn,aZ as cr,a9 as Ht,h3 as ur,al as dr,F as hr}from"./index-CaLGv6xG.js";import{T as fr}from"./index-ByYl1QnH.js";import{_ as mr}from"./permission-BK9x4qjQ.js";import{I as pr}from"./iframe-CO-VEhes.js";import{d as gr}from"./LaunchOutlined-DOGa7uCZ.js";import{r as nn,b as Un,H as je,D as ot,B as Ee,y as yr,E as br,I as on,z as Gt,M as gt,N as yt,A as Je,L as bt,e as Dt,J as kt,K as St,d as Dr,Q as qt,G as mt,F as vn,R as rn,S as xr,Z as wr,T as vr,O as Pr,V as Mr,P as kr,W as Sr}from"./index-TTSckhl8.js";import{d as Cr,B as Tr}from"./ChevronRight-BHXal2s_.js";import{_ as Kn}from"./toPropertyKey-PLuKRk1e.js";import{G as pe}from"./redux-Xix6UYN5.js";import{L as Gn}from"./MoreVert-BQD92YJp.js";import{a as Ir}from"./ListItemText-BWMpM4cA.js";import{F as Pn}from"./FormControl-Dq6XW9kS.js";import{S as Mn}from"./Select-CMM8MR9i.js";import{A as Vr}from"./Alert-BriK3hjA.js";import{f as Rr}from"./format-error-DQS9AwZv.js";import{u as ye}from"./useThemeProps-C59Glnbx.js";import{u as ge,r as qn}from"./useSlotProps-fP10cTIP.js";import{T as Or}from"./TextField-BYelVRF_.js";import{I as Zn}from"./InputAdornment-Dr1oU3Hs.js";import{p as Ar}from"./dashboard-BWG8DtF1.js";import{D as Er}from"./index-COZKzHiS.js";import"./useAsync-PE3W-DLW.js";import"./session-AqfK0jLG.js";import"./Avatar-CpQhQmV4.js";import"./useSlot-BrU8y60n.js";import"./useFormControl-DMGx-jdt.js";import"./InputLabel-DYr7To9X.js";import"./useLocalStorage-eP0cInBT.js";import"./confirm-BWW215hi.js";import"./Delete-rvy-F0hT.js";import"./PlayArrow-CvyM0yMY.js";import"./ButtonGroup-BPdi_2z2.js";import"./RadioGroup-BSqtRWJR.js";import"./FormControlLabel-CQnpTkDU.js";import"./FormGroup-C8sAhYQk.js";import"./index-D-GkMvG_.js";import"./Link-BzeSWqDp.js";import"./useSetState-DEVLe2Fz.js";import"./fallback-Dz8ZuYD5.js";import"./index-D_u35EkG.js";import"./Toolbar-DI2YKZS2.js";import"./Hidden-c0nvbE8_.js";import"./index-ozDSMBYi.js";import"./selector-BcHp8r2b.js";import"./FilterList-BpmYd7MC.js";import"./LastPage-DV14H4DC.js";import"./index-BqmsKa7O.js";import"./Search-D_9DtKpx.js";import"./index-B5Pm_bPi.js";const Qn=d.oneOfType([d.func,d.object]);var Fr=_o;function Lr(e,t){var n=e.length;if(n)return t+=t<0?n:0,Fr(t,n)?e[t]:void 0}var jr=Lr,$r=jr,Nr=Bo,_r=Yo;function Br(e){return e=_r(e),Nr(function(t){return $r(t,e)})}var Yr=Br;const Wr=Vt(Yr);function Jn(e){nn(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Kn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Un(r);(n===void 0||n<a||isNaN(Number(a)))&&(n=a)}),n||new Date(NaN)}function Xn(e){nn(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Kn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Un(r);(n===void 0||n>a||isNaN(a.getDate()))&&(n=a)}),n||new Date(NaN)}function zr(e){return nn(1,arguments),je(e,Date.now())}var sn={},Hr=zo;Object.defineProperty(sn,"__esModule",{value:!0});var eo=sn.default=void 0,Ur=Hr(Wo()),Kr=p;eo=sn.default=(0,Ur.default)((0,Kr.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const Gr=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t)),qr=(e,t)=>{const n=gt(bt(e),{locale:t}),r=yt(Dt(e),{locale:t}),a=[];for(let o=n;mt(o,r);)a.push(o),o=Gt(o,1);return a},Zr=({startDate:e},t)=>e&&je(t,e),Qr=({endDate:e},t)=>e&&je(t,e),Jr=({startDate:e,endDate:t},n)=>e&&t&&(rn(n,{start:e,end:t})||je(n,e)||je(n,t)),Xr=({startDate:e,endDate:t})=>e&&t?je(e,t):!1,kn=(e,t)=>{if(e){const n=e instanceof Date?e:yr(e);if(br(n))return n}return t},es=(e,t,n)=>{const{startDate:r,endDate:a}=e;if(r&&a){const o=Jn([r,t]),s=Xn([a,n]);return[o,on(o,s)?Ee(o,1):s]}return[r,a]},ts=(e,t)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:Gt(e,-1),endDate:Gt(e,-1)},{label:"This Week",startDate:gt(e,{locale:t}),endDate:yt(e,{locale:t})},{label:"Last Week",startDate:gt(Je(e,-1),{locale:t}),endDate:yt(Je(e,-1),{locale:t})},{label:"Last 7 Days",startDate:Je(e,-1),endDate:e},{label:"This Month",startDate:bt(e),endDate:Dt(e)},{label:"Last Month",startDate:bt(Ee(e,-1)),endDate:Dt(Ee(e,-1))},{label:"This Year",startDate:kt(e),endDate:St(e)},{label:"Last Year",startDate:kt(ot(e,-1)),endDate:St(ot(e,-1))}],ns=(e,t)=>{const n=Math.floor(t/2);return Array(t).fill(0).map((r,a)=>e.getFullYear()-n+a)},os=({date:e,setDate:t,nextDisabled:n,prevDisabled:r,onClickNext:a,onClickPrevious:o,locale:s})=>{const i=typeof s<"u"?[...Array(12).keys()].map(u=>{var y;return(y=s.localize)===null||y===void 0?void 0:y.month(u,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],l=u=>{t(Mr(e,parseInt(u.target.value,10)))},c=u=>{t(kr(e,parseInt(u.target.value,10)))};return U.createElement(pe,{container:!0,justifyContent:"space-between",alignItems:"center"},U.createElement(pe,{item:!0,sx:{padding:"5px"}},U.createElement(Ye,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:r,onClick:o},U.createElement(wr,{color:r?"disabled":"action"}))),U.createElement(pe,{item:!0},U.createElement(Pn,{variant:"standard"},U.createElement(Mn,{value:vr(e),onChange:l,MenuProps:{disablePortal:!0}},i.map((u,y)=>U.createElement(Dn,{key:u,value:y},u))))),U.createElement(pe,{item:!0},U.createElement(Pn,{variant:"standard"},U.createElement(Mn,{value:Pr(e),onChange:c,MenuProps:{disablePortal:!0}},ns(e,30).map(u=>U.createElement(Dn,{key:u,value:u},u))))),U.createElement(pe,{item:!0,sx:{padding:"5px"}},U.createElement(Ye,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:n,onClick:a},U.createElement(Cr,{color:n?"disabled":"action"}))))},rs=({startOfRange:e,endOfRange:t,disabled:n,highlighted:r,outlined:a,filled:o,onClick:s,onHover:i,value:l})=>U.createElement(Fe,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":t?"0 50% 50% 0":void 0,backgroundColor:c=>!n&&r?c.palette.primary.light:void 0}},U.createElement(Ye,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:c=>!n&&a?`1px solid ${c.palette.primary.dark}`:void 0},!n&&o?{"&:hover":{backgroundColor:c=>c.palette.primary.dark},backgroundColor:c=>c.palette.primary.dark}:{}),disabled:n,onClick:s,onMouseOver:i},U.createElement(be,{sx:{lineHeight:1.6,color:c=>n?c.palette.text.secondary:o?c.palette.primary.contrastText:c.palette.text.primary},variant:"body2"},l)));var Ct;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(Ct||(Ct={}));const Sn=e=>{var t;const{helpers:n,handlers:r,value:a,dateRange:o,marker:s,setValue:i,minDate:l,maxDate:c,locale:u}=e,y=((t=u==null?void 0:u.options)===null||t===void 0?void 0:t.weekStartsOn)||0,D=typeof u<"u"?[...Array(7).keys()].map(x=>{var f;return(f=u.localize)===null||f===void 0?void 0:f.day((x+y)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[h,T]=e.navState;return U.createElement(Jt,{square:!0,elevation:0,sx:{width:290}},U.createElement(pe,{container:!0},U.createElement(os,{date:a,setDate:i,nextDisabled:!T,prevDisabled:!h,onClickPrevious:()=>r.onMonthNavigate(s,Ct.Previous),onClickNext:()=>r.onMonthNavigate(s,Ct.Next),locale:u}),U.createElement(pe,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},D.map((x,f)=>U.createElement(be,{color:"textSecondary",key:f,variant:"caption"},x))),U.createElement(pe,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},Gr(qr(a,u),7).map((x,f)=>U.createElement(pe,{key:f,container:!0,direction:"row",justifyContent:"center"},x.map(m=>{const g=Zr(o,m),w=Qr(o,m),C=Xr(o),P=Jr(o,m)||n.inHoverRange(m);return U.createElement(rs,{key:qt(m,"dd-MM-yyyy"),filled:g||w,outlined:zr(m),highlighted:P&&!C,disabled:!on(a,m)||!rn(m,{start:l,end:c}),startOfRange:g&&!C,endOfRange:w&&!C,onClick:()=>r.onDayClick(m),onHover:()=>r.onDayHover(m),value:xr(m)})}))))))},Cn=(e,t)=>{const{startDate:n,endDate:r}=e,{startDate:a,endDate:o}=t;return n&&a&&r&&o?je(n,a)&&je(r,o):!1},ss=({ranges:e,setRange:t,selectedRange:n})=>U.createElement(_n,null,e.map((r,a)=>U.createElement(Gn,{button:!0,key:a,onClick:()=>t(r),sx:[Cn(r,n)&&{backgroundColor:o=>o.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},U.createElement(Ir,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:Cn(r,n)?"bold":"normal"}}},r.label)))),Zt={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},as=e=>{const{ranges:t,dateRange:n,minDate:r,maxDate:a,firstMonth:o,setFirstMonth:s,secondMonth:i,setSecondMonth:l,setDateRange:c,helpers:u,handlers:y,locale:D}=e,{startDate:h,endDate:T}=n,x=Dr(i,o)>=2,f={dateRange:n,minDate:r,maxDate:a,helpers:u,handlers:y};return U.createElement(Jt,{elevation:5,square:!0},U.createElement(pe,{container:!0,direction:"row",wrap:"nowrap"},U.createElement(pe,null,U.createElement(ss,{selectedRange:n,ranges:t,setRange:c})),U.createElement(Wt,{orientation:"vertical",flexItem:!0}),U.createElement(pe,null,U.createElement(pe,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},U.createElement(pe,{item:!0,sx:{flex:1,textAlign:"center"}},U.createElement(be,{variant:"subtitle1"},h?qt(h,"dd MMMM yyyy",{locale:D}):"Start Date")),U.createElement(pe,{item:!0,sx:{flex:1,textAlign:"center"}},U.createElement(eo,{color:"action"})),U.createElement(pe,{item:!0,sx:{flex:1,textAlign:"center"}},U.createElement(be,{variant:"subtitle1"},T?qt(T,"dd MMMM yyyy",{locale:D}):"End Date"))),U.createElement(Wt,null),U.createElement(pe,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},U.createElement(Sn,Object.assign({},f,{value:o,setValue:s,navState:[!0,x],marker:Zt.FIRST_MONTH,locale:D})),U.createElement(Wt,{orientation:"vertical",flexItem:!0}),U.createElement(Sn,Object.assign({},f,{value:i,setValue:l,navState:[x,!0],marker:Zt.SECOND_MONTH,locale:D}))))))},is=e=>{const t=new Date,{open:n,onChange:r,initialDateRange:a,minDate:o,maxDate:s,definedRanges:i=ts(new Date,e.locale),locale:l}=e,c=kn(o,ot(t,-10)),u=kn(s,ot(t,10)),[y,D]=es(a||{},c,u),[h,T]=b.useState(Object.assign({},a)),[x,f]=b.useState(),[m,g]=b.useState(y||t),[w,C]=b.useState(D||Ee(m,1)),{startDate:P,endDate:E}=h,V=O=>{mt(O,w)&&g(O)},F=O=>{vn(O,m)&&C(O)},k=O=>{let{startDate:B,endDate:L}=O;if(B&&L)O.startDate=B=Jn([B,c]),O.endDate=L=Xn([L,u]),T(O),r(O),g(B),C(on(B,L)?Ee(B,1):L);else{const W={};T(W),r(W),g(t),C(Ee(m,1))}},_=O=>{if(P&&!E&&!mt(O,P)){const B={startDate:P,endDate:O};r(B),T(B)}else T({startDate:O,endDate:void 0});f(O)},R=(O,B)=>{if(O===Zt.FIRST_MONTH){const L=Ee(m,B);mt(L,w)&&g(L)}else{const L=Ee(w,B);mt(m,L)&&C(L)}},A=O=>{P&&!E&&(!x||!je(O,x))&&f(O)},S={inHoverRange:O=>P&&!E&&x&&vn(x,P)&&rn(O,{start:P,end:x})},M={onDayClick:_,onDayHover:A,onMonthNavigate:R};return n?b.createElement(as,{dateRange:h,minDate:c,maxDate:u,ranges:i,firstMonth:m,secondMonth:w,setFirstMonth:V,setSecondMonth:F,setDateRange:k,helpers:S,handlers:M,locale:l}):null},ls=e=>{const{closeOnClickOutside:t,wrapperClassName:n,toggle:r,open:a}=e,o=()=>{t!==!1&&r()},s=i=>(i==null?void 0:i.key)==="Escape"&&o();return U.createElement(Fe,{sx:{position:"relative"}},a&&U.createElement(Fe,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:s,onClick:o}),U.createElement(Fe,{sx:{position:"relative",zIndex:1},className:n},U.createElement(is,Object.assign({},e))))},cs=e=>U.createElement(ls,Object.assign({},e)),us=["localeText"],Qt=b.createContext(null),an=function(t){var n;const{localeText:r}=t,a=ie(t,us),{utils:o,localeText:s}=(n=b.useContext(Qt))!=null?n:{utils:void 0,localeText:void 0},i=ye({props:a,name:"MuiLocalizationProvider"}),{children:l,dateAdapter:c,dateFormats:u,dateLibInstance:y,adapterLocale:D,localeText:h}=i,T=b.useMemo(()=>v({},h,s,r),[h,s,r]),x=b.useMemo(()=>{if(!c)return o||null;const g=new c({locale:D,formats:u,instance:y});if(!g.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
1
+ import{P as d,h4 as _o,b8 as Vt,b7 as Bo,dP as Yo,Z as Wo,$ as zo,j as p,eF as U,B as Fe,r as b,aj as Jt,aT as Wt,T as be,bl as _n,aD as Ye,aU as Dn,aK as ie,aL as v,au as ze,aG as Me,aF as ke,aH as te,ak as rt,aN as Pe,aO as ve,d1 as We,cN as G,cJ as Ho,cI as tt,ch as Ke,cE as nt,cV as Uo,gX as xn,cT as Ko,dl as Rt,a1 as Bn,bn as Go,dy as qo,gW as Zo,cO as zt,b as ft,cU as Qo,bg as Jo,gV as Yn,eG as Wn,d2 as Xt,cv as en,Y as we,h5 as Xo,a0 as Ot,c7 as er,c9 as tr,Q as nr,dh as or,bh as qe,aQ as rr,u as tn,n as sr,G as ar,c as ir,bk as wn,bj as lr,gG as Be,a2 as zn,gp as Hn,aZ as cr,a9 as Ht,h6 as ur,al as dr,F as hr}from"./index-Cggmiiia.js";import{T as fr}from"./index-BJflKzAj.js";import{_ as mr}from"./permission-CoUl_-TD.js";import{I as pr}from"./iframe-4KnzoKaC.js";import{d as gr}from"./LaunchOutlined-B4YtdACN.js";import{r as nn,b as Un,H as je,D as ot,B as Ee,y as yr,E as br,I as on,z as Gt,M as gt,N as yt,A as Je,L as bt,e as Dt,J as kt,K as St,d as Dr,Q as qt,G as mt,F as vn,R as rn,S as xr,Z as wr,T as vr,O as Pr,V as Mr,P as kr,W as Sr}from"./index-DFAKgndM.js";import{d as Cr,B as Tr}from"./ChevronRight-MsONzKko.js";import{_ as Kn}from"./toPropertyKey-PLuKRk1e.js";import{G as pe}from"./redux-CmQ0AupQ.js";import{L as Gn}from"./MoreVert-BqoNOXb1.js";import{a as Ir}from"./ListItemText-CJO6iQaY.js";import{F as Pn}from"./FormControl-CJxOqtCV.js";import{S as Mn}from"./Select-CHwe79IG.js";import{A as Vr}from"./Alert-DdUTjamT.js";import{f as Rr}from"./format-error-xm5q5N3Z.js";import{u as ye}from"./useThemeProps-DthQbzYX.js";import{u as ge,r as qn}from"./useSlotProps-thaabt4w.js";import{T as Or}from"./TextField-By686O81.js";import{I as Zn}from"./InputAdornment-B1JGDyvY.js";import{p as Ar}from"./dashboard-CigfHyBK.js";import{D as Er}from"./index-CPYtoS2i.js";import"./useAsync-BrIwhlfT.js";import"./session-B20aBevE.js";import"./Avatar-Ba5K-SpV.js";import"./useSlot-DJoDEpM7.js";import"./useFormControl-xR1NlgHj.js";import"./InputLabel-Ds1qPSij.js";import"./useLocalStorage-C1CX-JWm.js";import"./confirm-Dx6jUaOz.js";import"./Delete-eYuUFe-a.js";import"./PlayArrow-DpuhKo6D.js";import"./ButtonGroup-oqbT9mJ7.js";import"./RadioGroup-D4XxZA_m.js";import"./FormControlLabel-BKsoLGHz.js";import"./FormGroup-Chc5NbDQ.js";import"./index-7ATAUQCS.js";import"./Link-JTCdKmrw.js";import"./useSetState-Buep2Jkr.js";import"./fallback-DVHgA8PG.js";import"./index-tZwe6kGH.js";import"./Toolbar-CILlK-1t.js";import"./Hidden-v7r91ILG.js";import"./index-BIwlKqnv.js";import"./selector-DplhIXMq.js";import"./FilterList-CfRY6G_6.js";import"./LastPage-5otHasfZ.js";import"./index-Dnz1P7hS.js";import"./Search-eHBEQt38.js";import"./index-DnemmBZZ.js";const Qn=d.oneOfType([d.func,d.object]);var Fr=_o;function Lr(e,t){var n=e.length;if(n)return t+=t<0?n:0,Fr(t,n)?e[t]:void 0}var jr=Lr,$r=jr,Nr=Bo,_r=Yo;function Br(e){return e=_r(e),Nr(function(t){return $r(t,e)})}var Yr=Br;const Wr=Vt(Yr);function Jn(e){nn(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Kn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Un(r);(n===void 0||n<a||isNaN(Number(a)))&&(n=a)}),n||new Date(NaN)}function Xn(e){nn(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(Kn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Un(r);(n===void 0||n>a||isNaN(a.getDate()))&&(n=a)}),n||new Date(NaN)}function zr(e){return nn(1,arguments),je(e,Date.now())}var sn={},Hr=zo;Object.defineProperty(sn,"__esModule",{value:!0});var eo=sn.default=void 0,Ur=Hr(Wo()),Kr=p;eo=sn.default=(0,Ur.default)((0,Kr.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const Gr=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t)),qr=(e,t)=>{const n=gt(bt(e),{locale:t}),r=yt(Dt(e),{locale:t}),a=[];for(let o=n;mt(o,r);)a.push(o),o=Gt(o,1);return a},Zr=({startDate:e},t)=>e&&je(t,e),Qr=({endDate:e},t)=>e&&je(t,e),Jr=({startDate:e,endDate:t},n)=>e&&t&&(rn(n,{start:e,end:t})||je(n,e)||je(n,t)),Xr=({startDate:e,endDate:t})=>e&&t?je(e,t):!1,kn=(e,t)=>{if(e){const n=e instanceof Date?e:yr(e);if(br(n))return n}return t},es=(e,t,n)=>{const{startDate:r,endDate:a}=e;if(r&&a){const o=Jn([r,t]),s=Xn([a,n]);return[o,on(o,s)?Ee(o,1):s]}return[r,a]},ts=(e,t)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:Gt(e,-1),endDate:Gt(e,-1)},{label:"This Week",startDate:gt(e,{locale:t}),endDate:yt(e,{locale:t})},{label:"Last Week",startDate:gt(Je(e,-1),{locale:t}),endDate:yt(Je(e,-1),{locale:t})},{label:"Last 7 Days",startDate:Je(e,-1),endDate:e},{label:"This Month",startDate:bt(e),endDate:Dt(e)},{label:"Last Month",startDate:bt(Ee(e,-1)),endDate:Dt(Ee(e,-1))},{label:"This Year",startDate:kt(e),endDate:St(e)},{label:"Last Year",startDate:kt(ot(e,-1)),endDate:St(ot(e,-1))}],ns=(e,t)=>{const n=Math.floor(t/2);return Array(t).fill(0).map((r,a)=>e.getFullYear()-n+a)},os=({date:e,setDate:t,nextDisabled:n,prevDisabled:r,onClickNext:a,onClickPrevious:o,locale:s})=>{const i=typeof s<"u"?[...Array(12).keys()].map(u=>{var y;return(y=s.localize)===null||y===void 0?void 0:y.month(u,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],l=u=>{t(Mr(e,parseInt(u.target.value,10)))},c=u=>{t(kr(e,parseInt(u.target.value,10)))};return U.createElement(pe,{container:!0,justifyContent:"space-between",alignItems:"center"},U.createElement(pe,{item:!0,sx:{padding:"5px"}},U.createElement(Ye,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:r,onClick:o},U.createElement(wr,{color:r?"disabled":"action"}))),U.createElement(pe,{item:!0},U.createElement(Pn,{variant:"standard"},U.createElement(Mn,{value:vr(e),onChange:l,MenuProps:{disablePortal:!0}},i.map((u,y)=>U.createElement(Dn,{key:u,value:y},u))))),U.createElement(pe,{item:!0},U.createElement(Pn,{variant:"standard"},U.createElement(Mn,{value:Pr(e),onChange:c,MenuProps:{disablePortal:!0}},ns(e,30).map(u=>U.createElement(Dn,{key:u,value:u},u))))),U.createElement(pe,{item:!0,sx:{padding:"5px"}},U.createElement(Ye,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:n,onClick:a},U.createElement(Cr,{color:n?"disabled":"action"}))))},rs=({startOfRange:e,endOfRange:t,disabled:n,highlighted:r,outlined:a,filled:o,onClick:s,onHover:i,value:l})=>U.createElement(Fe,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":t?"0 50% 50% 0":void 0,backgroundColor:c=>!n&&r?c.palette.primary.light:void 0}},U.createElement(Ye,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:c=>!n&&a?`1px solid ${c.palette.primary.dark}`:void 0},!n&&o?{"&:hover":{backgroundColor:c=>c.palette.primary.dark},backgroundColor:c=>c.palette.primary.dark}:{}),disabled:n,onClick:s,onMouseOver:i},U.createElement(be,{sx:{lineHeight:1.6,color:c=>n?c.palette.text.secondary:o?c.palette.primary.contrastText:c.palette.text.primary},variant:"body2"},l)));var Ct;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(Ct||(Ct={}));const Sn=e=>{var t;const{helpers:n,handlers:r,value:a,dateRange:o,marker:s,setValue:i,minDate:l,maxDate:c,locale:u}=e,y=((t=u==null?void 0:u.options)===null||t===void 0?void 0:t.weekStartsOn)||0,D=typeof u<"u"?[...Array(7).keys()].map(x=>{var f;return(f=u.localize)===null||f===void 0?void 0:f.day((x+y)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[h,T]=e.navState;return U.createElement(Jt,{square:!0,elevation:0,sx:{width:290}},U.createElement(pe,{container:!0},U.createElement(os,{date:a,setDate:i,nextDisabled:!T,prevDisabled:!h,onClickPrevious:()=>r.onMonthNavigate(s,Ct.Previous),onClickNext:()=>r.onMonthNavigate(s,Ct.Next),locale:u}),U.createElement(pe,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},D.map((x,f)=>U.createElement(be,{color:"textSecondary",key:f,variant:"caption"},x))),U.createElement(pe,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},Gr(qr(a,u),7).map((x,f)=>U.createElement(pe,{key:f,container:!0,direction:"row",justifyContent:"center"},x.map(m=>{const g=Zr(o,m),w=Qr(o,m),C=Xr(o),P=Jr(o,m)||n.inHoverRange(m);return U.createElement(rs,{key:qt(m,"dd-MM-yyyy"),filled:g||w,outlined:zr(m),highlighted:P&&!C,disabled:!on(a,m)||!rn(m,{start:l,end:c}),startOfRange:g&&!C,endOfRange:w&&!C,onClick:()=>r.onDayClick(m),onHover:()=>r.onDayHover(m),value:xr(m)})}))))))},Cn=(e,t)=>{const{startDate:n,endDate:r}=e,{startDate:a,endDate:o}=t;return n&&a&&r&&o?je(n,a)&&je(r,o):!1},ss=({ranges:e,setRange:t,selectedRange:n})=>U.createElement(_n,null,e.map((r,a)=>U.createElement(Gn,{button:!0,key:a,onClick:()=>t(r),sx:[Cn(r,n)&&{backgroundColor:o=>o.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},U.createElement(Ir,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:Cn(r,n)?"bold":"normal"}}},r.label)))),Zt={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},as=e=>{const{ranges:t,dateRange:n,minDate:r,maxDate:a,firstMonth:o,setFirstMonth:s,secondMonth:i,setSecondMonth:l,setDateRange:c,helpers:u,handlers:y,locale:D}=e,{startDate:h,endDate:T}=n,x=Dr(i,o)>=2,f={dateRange:n,minDate:r,maxDate:a,helpers:u,handlers:y};return U.createElement(Jt,{elevation:5,square:!0},U.createElement(pe,{container:!0,direction:"row",wrap:"nowrap"},U.createElement(pe,null,U.createElement(ss,{selectedRange:n,ranges:t,setRange:c})),U.createElement(Wt,{orientation:"vertical",flexItem:!0}),U.createElement(pe,null,U.createElement(pe,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},U.createElement(pe,{item:!0,sx:{flex:1,textAlign:"center"}},U.createElement(be,{variant:"subtitle1"},h?qt(h,"dd MMMM yyyy",{locale:D}):"Start Date")),U.createElement(pe,{item:!0,sx:{flex:1,textAlign:"center"}},U.createElement(eo,{color:"action"})),U.createElement(pe,{item:!0,sx:{flex:1,textAlign:"center"}},U.createElement(be,{variant:"subtitle1"},T?qt(T,"dd MMMM yyyy",{locale:D}):"End Date"))),U.createElement(Wt,null),U.createElement(pe,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},U.createElement(Sn,Object.assign({},f,{value:o,setValue:s,navState:[!0,x],marker:Zt.FIRST_MONTH,locale:D})),U.createElement(Wt,{orientation:"vertical",flexItem:!0}),U.createElement(Sn,Object.assign({},f,{value:i,setValue:l,navState:[x,!0],marker:Zt.SECOND_MONTH,locale:D}))))))},is=e=>{const t=new Date,{open:n,onChange:r,initialDateRange:a,minDate:o,maxDate:s,definedRanges:i=ts(new Date,e.locale),locale:l}=e,c=kn(o,ot(t,-10)),u=kn(s,ot(t,10)),[y,D]=es(a||{},c,u),[h,T]=b.useState(Object.assign({},a)),[x,f]=b.useState(),[m,g]=b.useState(y||t),[w,C]=b.useState(D||Ee(m,1)),{startDate:P,endDate:E}=h,V=O=>{mt(O,w)&&g(O)},F=O=>{vn(O,m)&&C(O)},k=O=>{let{startDate:B,endDate:L}=O;if(B&&L)O.startDate=B=Jn([B,c]),O.endDate=L=Xn([L,u]),T(O),r(O),g(B),C(on(B,L)?Ee(B,1):L);else{const W={};T(W),r(W),g(t),C(Ee(m,1))}},_=O=>{if(P&&!E&&!mt(O,P)){const B={startDate:P,endDate:O};r(B),T(B)}else T({startDate:O,endDate:void 0});f(O)},R=(O,B)=>{if(O===Zt.FIRST_MONTH){const L=Ee(m,B);mt(L,w)&&g(L)}else{const L=Ee(w,B);mt(m,L)&&C(L)}},A=O=>{P&&!E&&(!x||!je(O,x))&&f(O)},S={inHoverRange:O=>P&&!E&&x&&vn(x,P)&&rn(O,{start:P,end:x})},M={onDayClick:_,onDayHover:A,onMonthNavigate:R};return n?b.createElement(as,{dateRange:h,minDate:c,maxDate:u,ranges:i,firstMonth:m,secondMonth:w,setFirstMonth:V,setSecondMonth:F,setDateRange:k,helpers:S,handlers:M,locale:l}):null},ls=e=>{const{closeOnClickOutside:t,wrapperClassName:n,toggle:r,open:a}=e,o=()=>{t!==!1&&r()},s=i=>(i==null?void 0:i.key)==="Escape"&&o();return U.createElement(Fe,{sx:{position:"relative"}},a&&U.createElement(Fe,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:s,onClick:o}),U.createElement(Fe,{sx:{position:"relative",zIndex:1},className:n},U.createElement(is,Object.assign({},e))))},cs=e=>U.createElement(ls,Object.assign({},e)),us=["localeText"],Qt=b.createContext(null),an=function(t){var n;const{localeText:r}=t,a=ie(t,us),{utils:o,localeText:s}=(n=b.useContext(Qt))!=null?n:{utils:void 0,localeText:void 0},i=ye({props:a,name:"MuiLocalizationProvider"}),{children:l,dateAdapter:c,dateFormats:u,dateLibInstance:y,adapterLocale:D,localeText:h}=i,T=b.useMemo(()=>v({},h,s,r),[h,s,r]),x=b.useMemo(()=>{if(!c)return o||null;const g=new c({locale:D,formats:u,instance:y});if(!g.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
2
2
  `));return g},[c,D,u,y,o]),f=b.useMemo(()=>x?{minDate:x.date("1900-01-01T00:00:00.000"),maxDate:x.date("2099-12-31T00:00:00.000")}:null,[x]),m=b.useMemo(()=>({utils:x,defaultDates:f,localeText:T}),[f,x,T]);return p.jsx(Qt.Provider,{value:m,children:l})},ds=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:v({},e)}}}}),to={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. ${t===null?"No time selected":`Selected time is ${n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t)=>e!==null&&t.isValid(e)?`Choose date, selected date is ${t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>e!==null&&t.isValid(e)?`Choose time, selected time is ${t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear value",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},hs=to;ds(to);const Ge=()=>{const e=b.useContext(Qt);if(e===null)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
3
3
  `));if(e.utils===null)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
4
4
  `));const t=b.useMemo(()=>v({},hs,e.localeText),[e.localeText]);return b.useMemo(()=>v({},e,{localeText:t}),[e,t])},de=()=>Ge().utils,wt=()=>Ge().defaultDates,He=()=>Ge().localeText,At=e=>{const t=de(),n=b.useRef();return n.current===void 0&&(n.current=t.dateWithTimezone(void 0,e)),n.current},fs=ze(p.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ms=ze(p.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),ps=ze(p.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),gs=ze(p.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");ze(p.jsxs(b.Fragment,{children:[p.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),p.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");ze(p.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");ze(p.jsxs(b.Fragment,{children:[p.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),p.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");const ys=ze(p.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function bs(e){return Me("MuiPickersArrowSwitcher",e)}ke("MuiPickersArrowSwitcher",["root","spacer","button"]);const Ds=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],xs=["ownerState"],ws=["ownerState"],vs=te("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Ps=te("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Tn=te(Ye,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})(({ownerState:e})=>v({},e.hidden&&{visibility:"hidden"})),Ms=e=>{const{classes:t}=e;return ve({root:["root"],spacer:["spacer"],button:["button"]},bs,t)},ks=b.forwardRef(function(t,n){var r,a,o,s;const l=rt().direction==="rtl",c=ye({props:t,name:"MuiPickersArrowSwitcher"}),{children:u,className:y,slots:D,slotProps:h,isNextDisabled:T,isNextHidden:x,onGoToNext:f,nextLabel:m,isPreviousDisabled:g,isPreviousHidden:w,onGoToPrevious:C,previousLabel:P}=c,E=ie(c,Ds),V=c,F=Ms(V),k={isDisabled:T,isHidden:x,goTo:f,label:m},_={isDisabled:g,isHidden:w,goTo:C,label:P},R=(r=D==null?void 0:D.previousIconButton)!=null?r:Tn,A=ge({elementType:R,externalSlotProps:h==null?void 0:h.previousIconButton,additionalProps:{size:"medium",title:_.label,"aria-label":_.label,disabled:_.isDisabled,edge:"end",onClick:_.goTo},ownerState:v({},V,{hidden:_.isHidden}),className:F.button}),I=(a=D==null?void 0:D.nextIconButton)!=null?a:Tn,S=ge({elementType:I,externalSlotProps:h==null?void 0:h.nextIconButton,additionalProps:{size:"medium",title:k.label,"aria-label":k.label,disabled:k.isDisabled,edge:"start",onClick:k.goTo},ownerState:v({},V,{hidden:k.isHidden}),className:F.button}),M=(o=D==null?void 0:D.leftArrowIcon)!=null?o:ms,O=ge({elementType:M,externalSlotProps:h==null?void 0:h.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),B=ie(O,xs),L=(s=D==null?void 0:D.rightArrowIcon)!=null?s:ps,W=ge({elementType:L,externalSlotProps:h==null?void 0:h.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),K=ie(W,ws);return p.jsxs(vs,v({ref:n,className:Pe(F.root,y),ownerState:V},E,{children:[p.jsx(R,v({},A,{children:l?p.jsx(L,v({},K)):p.jsx(M,v({},B))})),u?p.jsx(be,{variant:"subtitle1",component:"span",children:u}):p.jsx(Ps,{className:F.spacer,ownerState:V}),p.jsx(I,v({},S,{children:l?p.jsx(M,v({},B)):p.jsx(L,v({},K))}))]}))}),ct=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),Ss=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const a=n??r;let o;if(e!=null)o=e;else if(a.includes(t))o=t;else if(a.length>0)o=a[0];else throw new Error("MUI: The `views` prop must contain at least one view");return{views:a,openTo:o}},Cs=["hours","minutes","seconds"],Ts=e=>Cs.includes(e),In=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),Is=(e,t)=>(n,r)=>e?t.isAfter(n,r):In(n,t)>In(r,t);function no({onChange:e,onViewChange:t,openTo:n,view:r,views:a,autoFocus:o,focusedView:s,onFocusedViewChange:i}){var l,c;const u=b.useRef(n),y=b.useRef(a),D=b.useRef(a.includes(n)?n:a[0]),[h,T]=We({name:"useViews",state:"view",controlled:r,default:D.current}),x=b.useRef(o?h:null),[f,m]=We({name:"useViews",state:"focusedView",controlled:s,default:x.current});b.useEffect(()=>{(u.current&&u.current!==n||y.current&&y.current.some(k=>!a.includes(k)))&&(T(a.includes(n)?n:a[0]),y.current=a,u.current=n)},[n,T,h,a]);const g=a.indexOf(h),w=(l=a[g-1])!=null?l:null,C=(c=a[g+1])!=null?c:null,P=G((k,_)=>{m(_?k:R=>k===R?null:R),i==null||i(k,_)}),E=G(k=>{P(k,!0),k!==h&&(T(k),t&&t(k))}),V=G(()=>{C&&E(C)}),F=G((k,_,R)=>{const A=_==="finish",I=R?a.indexOf(R)<a.length-1:!!C;if(e(k,A&&I?"partial":_,R),R&&R!==h){const M=a[a.indexOf(R)+1];M&&E(M)}else A&&V()});return{view:h,setView:E,focusedView:f,setFocusedView:P,nextView:C,previousView:w,defaultView:a.includes(n)?n:a[0],goToNextView:V,setValueAndGoToNextView:F}}function Vs(e,{disableFuture:t,maxDate:n,timezone:r}){const a=de();return b.useMemo(()=>{const o=a.dateWithTimezone(void 0,r),s=a.startOfMonth(t&&a.isBefore(o,n)?o:n);return!a.isAfter(s,e)},[t,n,e,a,r])}function Rs(e,{disablePast:t,minDate:n,timezone:r}){const a=de();return b.useMemo(()=>{const o=a.dateWithTimezone(void 0,r),s=a.startOfMonth(t&&a.isAfter(o,n)?o:n);return!a.isBefore(s,e)},[t,n,e,a,r])}const xt=36,Et=2,Ft=320,Os=280,ln=334,As=te("div")({overflow:"hidden",width:Ft,maxHeight:ln,display:"flex",flexDirection:"column",margin:"0 auto"}),Tt=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r},pt=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:a,isDateDisabled:o,utils:s,timezone:i})=>{const l=Tt(s,s.dateWithTimezone(void 0,i),e);n&&s.isBefore(a,l)&&(a=l),t&&s.isAfter(r,l)&&(r=l);let c=e,u=e;for(s.isBefore(e,a)&&(c=a,u=null),s.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&s.isAfter(c,r)&&(c=null),u&&s.isBefore(u,a)&&(u=null),c){if(!o(c))return c;c=s.addDays(c,1)}if(u){if(!o(u))return u;u=s.addDays(u,-1)}}return null},Es=(e,t)=>t==null||!e.isValid(t)?null:t,Ie=(e,t,n)=>t==null||!e.isValid(t)?n:t,Fs=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),cn=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const a=r[r.length-1];r.push(e.addMonths(a,1))}return r},oo=(e,t,n)=>n==="date"?e.startOfDay(e.dateWithTimezone(void 0,t)):e.dateWithTimezone(void 0,t),Ls=["year","month","day"],Vn=e=>Ls.includes(e),un=(e,{format:t,views:n},r)=>{if(t!=null)return t;const a=e.formats;return ct(n,["year"])?a.year:ct(n,["month"])?a.month:ct(n,["day"])?a.dayOfMonth:ct(n,["month","year"])?`${a.month} ${a.year}`:ct(n,["day","month"])?`${a.month} ${a.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?a.normalDateWithWeekday:a.normalDate:a.keyboardDate},js=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},dn=({timezone:e,value:t,defaultValue:n,onChange:r,valueManager:a})=>{var o,s;const i=de(),l=b.useRef(n),c=(o=t??l.current)!=null?o:a.emptyValue,u=b.useMemo(()=>a.getTimezone(i,c),[i,a,c]),y=G(x=>u==null?x:a.setTimezone(i,u,x)),D=(s=e??u)!=null?s:"default",h=b.useMemo(()=>a.setTimezone(i,D,c),[a,i,D,c]),T=G((x,...f)=>{const m=y(x);r==null||r(m,...f)});return{value:h,handleValueChange:T,timezone:D}},hn=({name:e,timezone:t,value:n,defaultValue:r,onChange:a,valueManager:o})=>{const[s,i]=We({name:e,state:"value",controlled:n,default:r??o.emptyValue}),l=G((c,...u)=>{i(c),a==null||a(c,...u)});return dn({timezone:t,value:s,defaultValue:void 0,onChange:l,valueManager:o})},Ae={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},$s=e=>Math.max(...e.map(t=>{var n;return(n=Ae[t.type])!=null?n:1})),ut=(e,t,n)=>{if(t===Ae.year)return e.startOfYear(n);if(t===Ae.month)return e.startOfMonth(n);if(t===Ae.day)return e.startOfDay(n);let r=n;return t<Ae.minutes&&(r=e.setMinutes(r,0)),t<Ae.seconds&&(r=e.setSeconds(r,0)),t<Ae.milliseconds&&(r=e.setMilliseconds(r,0)),r},Ns=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:a})=>{var o;let s=a?a():ut(t,n,oo(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,s)&&(s=ut(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,s)&&(s=ut(t,n,e.maxDate));const i=Is((o=e.disableIgnoringDatePartForTimeValidation)!=null?o:!1,t);return e.minTime!=null&&i(e.minTime,s)&&(s=ut(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Tt(t,s,e.minTime))),e.maxTime!=null&&i(s,e.maxTime)&&(s=ut(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Tt(t,s,e.maxTime))),s},ro=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
@@ -0,0 +1 @@
1
+ import{c4 as a}from"./index-Cggmiiia.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
@@ -1,4 +1,4 @@
1
- import{aQ as C,r as n,j as t,t as P,u as T,n as B,B as x,aU as M,a0 as I,A as b,T as d,L,G as _}from"./index-CaLGv6xG.js";import{M as W}from"./index-BsjCwHmK.js";import{E as F}from"./index-B5Pm_bPi.js";import{T as z}from"./index-D-GkMvG_.js";import{_ as R}from"./useLocalStorage-eP0cInBT.js";import{R as U}from"./dashboard-BWG8DtF1.js";import{F as D}from"./FormControl-Dq6XW9kS.js";import{I as G}from"./InputLabel-DYr7To9X.js";import{S as K}from"./Select-CMM8MR9i.js";import{P as O}from"./Pagination-g_z2fX8D.js";import{r as H}from"./index-DCMTEGgZ.js";import"./index-ByYl1QnH.js";import"./MoreVert-BQD92YJp.js";import"./confirm-BWW215hi.js";import"./format-error-DQS9AwZv.js";import"./Alert-BriK3hjA.js";import"./useSlot-BrU8y60n.js";import"./Delete-rvy-F0hT.js";import"./PlayArrow-CvyM0yMY.js";import"./ListItemText-BWMpM4cA.js";import"./ButtonGroup-BPdi_2z2.js";import"./RadioGroup-BSqtRWJR.js";import"./FormControlLabel-CQnpTkDU.js";import"./useFormControl-DMGx-jdt.js";import"./FormGroup-C8sAhYQk.js";import"./Avatar-CpQhQmV4.js";import"./session-AqfK0jLG.js";import"./permission-BK9x4qjQ.js";import"./useAsync-PE3W-DLW.js";import"./Link-BzeSWqDp.js";import"./useSetState-DEVLe2Fz.js";import"./fallback-Dz8ZuYD5.js";import"./index-D_u35EkG.js";import"./Toolbar-DI2YKZS2.js";import"./Hidden-c0nvbE8_.js";import"./index-ozDSMBYi.js";import"./selector-BcHp8r2b.js";import"./LastPage-DV14H4DC.js";const S=n.createContext({}),{Provider:Q,Consumer:Fe}=S;function q({children:e,scope:o="",categories:a=[],showScope:i,scopeFormatter:p}){const{api:s,info:l}=C(),[c,r]=n.useState([]),[f,A]=n.useState({total:0,pageSize:20,pageCount:0,page:1}),[j,h]=n.useState(!1),[u,k]=R(`audit-log-category-${o}`,"all"),N=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(g=>a.length?g.value==="all"||a.includes(g.value):!0),y=async({page:g=1,silent:E=!0}={})=>{if(!j){E||h(!0);try{const m=await s.getAuditLogs({input:{paging:{page:g},category:u==="all"?"":u,scope:o}});i&&(m.list||[]).forEach(v=>{v.scope!==l.did&&(v.link=`/blocklets/${v.scope}/components`)}),r(m.list),A(m.paging),h(!1)}catch(m){P.error(m.message),h(!1)}}};n.useEffect(()=>{y({page:1,silent:!1})},[]),n.useEffect(()=>{y({page:1,silent:!1})},[u]);const $={loading:j,fetch:y,filter:{category:u,scope:o},categories:N,setCategory:k,data:c,paging:f,showScope:i,scopeFormatter:p};return t.jsx(Q,{value:{auditLogs:$},children:e})}function w(){const{auditLogs:e}=n.useContext(S);return e}const J=({log:e,info:o,inService:a})=>a?`${_.WELLKNOWN_BLOCKLET_ADMIN_PATH}/members?did=${e.actor.did}`:e.scope===o.did?`/team/members?did=${e.actor.did}`:`/blocklets/${e.scope}/members?did=${e.actor.did}`;function V({log:e}){var l,c;const{inService:o,info:a}=C(),{showScope:i,scopeFormatter:p=r=>r}=w();if(!e.actor.did)return null;const s=!["blocklet",""].includes(e.actor.role);return t.jsxs(x,{className:"log-entry","data-cy":"log-entry",children:[t.jsx("div",{className:"log-author",children:s?t.jsx(b,{did:e.actor.did,size:36,shape:"circle"}):t.jsx(b,{did:e.actor.did,size:36})}),t.jsxs("div",{className:"log-body",children:[t.jsxs(d,{className:"log-header",color:"textSecondary",component:"p",gutterBottom:!0,display:"flex",alignItems:"center",children:[i&&t.jsx(L,{to:e.link,children:t.jsx(z,{style:{marginRight:8},children:p(e.scope)})}),s?t.jsxs(L,{to:J({log:e,inService:o,info:a}),target:"_blank",children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]}):t.jsxs("span",{children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]})," ",t.jsx("span",{style:{margin:"0 4px"},children:"-"})," ",e.action]}),t.jsx(d,{className:"log-content",maxWidth:"lg",color:"textPrimary",component:"div","data-color-mode":"light",gutterBottom:!0,children:t.jsx(W,{source:e.content,rehypePlugins:[[H,{target:"_blank"}]]})}),t.jsxs(x,{className:"log-meta",variant:"body2",children:[!!e.ip&&t.jsx(d,{component:"span",color:"textSecondary",children:`IP: ${e.ip}`}),!!((l=e.env.os)!=null&&l.name)&&t.jsxs(d,{component:"span",color:"textSecondary",children:[e.env.os.name,"(",e.env.os.version,")"]}),!!((c=e.env.browser)!=null&&c.name)&&t.jsxs(d,{component:"span",color:"textSecondary",children:[e.env.browser.name,"(",e.env.browser.version,")"]}),t.jsx(d,{component:"span",color:"textSecondary",children:t.jsx(U,{value:e.createdAt})})]})]})]})}function X(){const{t:e}=T(),{data:o,loading:a,paging:i,filter:p,categories:s,setCategory:l,fetch:c}=w();return a?t.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:t.jsx(B,{})}):t.jsxs(Y,{"data-cy":"audit-logs",children:[t.jsx(x,{className:"log-controls",children:t.jsxs(D,{style:{width:"240px"},variant:"outlined",children:[t.jsx(G,{children:e("common.filter")}),t.jsx(K,{"data-cy":"filter-by-category-trigger",value:p.category,onChange:r=>l(r.target.value),fullWidth:!0,label:e("common.category"),disabled:a,children:s.map(r=>t.jsx(M,{value:r.value,"data-cy":`filter-by-category-${r.value}`,children:t.jsx(x,{children:t.jsx("span",{children:r.label})})},r.label))})]})}),o.length===0&&t.jsx(F,{children:e("common.empty")}),o.length>0&&o.map(r=>t.jsx(V,{log:r},r.id)),i.pageCount>1&&t.jsx(O,{page:i.page,count:i.pageCount,onChange:(r,f)=>c({page:f}),showFirstButton:!0,showLastButton:!0})]})}function ze({scope:e,categories:o,showScope:a,scopeFormatter:i}){return t.jsx(q,{scope:e,categories:o,showScope:a,scopeFormatter:i,children:t.jsx(X,{})})}const Y=I.div`
1
+ import{aQ as C,r as n,j as t,t as P,u as T,n as B,B as x,aU as M,a0 as I,A as b,T as d,L,G as _}from"./index-Cggmiiia.js";import{M as W}from"./index-J--b5UMY.js";import{E as F}from"./index-DnemmBZZ.js";import{T as z}from"./index-7ATAUQCS.js";import{_ as R}from"./useLocalStorage-C1CX-JWm.js";import{R as U}from"./dashboard-CigfHyBK.js";import{F as D}from"./FormControl-CJxOqtCV.js";import{I as G}from"./InputLabel-Ds1qPSij.js";import{S as K}from"./Select-CHwe79IG.js";import{P as O}from"./Pagination-BiImme98.js";import{r as H}from"./index-BHBa5bY_.js";import"./index-BJflKzAj.js";import"./MoreVert-BqoNOXb1.js";import"./confirm-Dx6jUaOz.js";import"./format-error-xm5q5N3Z.js";import"./Alert-DdUTjamT.js";import"./useSlot-DJoDEpM7.js";import"./Delete-eYuUFe-a.js";import"./PlayArrow-DpuhKo6D.js";import"./ListItemText-CJO6iQaY.js";import"./ButtonGroup-oqbT9mJ7.js";import"./RadioGroup-D4XxZA_m.js";import"./FormControlLabel-BKsoLGHz.js";import"./useFormControl-xR1NlgHj.js";import"./FormGroup-Chc5NbDQ.js";import"./Avatar-Ba5K-SpV.js";import"./session-B20aBevE.js";import"./permission-CoUl_-TD.js";import"./useAsync-BrIwhlfT.js";import"./Link-JTCdKmrw.js";import"./useSetState-Buep2Jkr.js";import"./fallback-DVHgA8PG.js";import"./index-tZwe6kGH.js";import"./Toolbar-CILlK-1t.js";import"./Hidden-v7r91ILG.js";import"./index-BIwlKqnv.js";import"./selector-DplhIXMq.js";import"./LastPage-5otHasfZ.js";const S=n.createContext({}),{Provider:Q,Consumer:Fe}=S;function q({children:e,scope:o="",categories:a=[],showScope:i,scopeFormatter:p}){const{api:s,info:l}=C(),[c,r]=n.useState([]),[f,A]=n.useState({total:0,pageSize:20,pageCount:0,page:1}),[j,h]=n.useState(!1),[u,k]=R(`audit-log-category-${o}`,"all"),N=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(g=>a.length?g.value==="all"||a.includes(g.value):!0),y=async({page:g=1,silent:E=!0}={})=>{if(!j){E||h(!0);try{const m=await s.getAuditLogs({input:{paging:{page:g},category:u==="all"?"":u,scope:o}});i&&(m.list||[]).forEach(v=>{v.scope!==l.did&&(v.link=`/blocklets/${v.scope}/components`)}),r(m.list),A(m.paging),h(!1)}catch(m){P.error(m.message),h(!1)}}};n.useEffect(()=>{y({page:1,silent:!1})},[]),n.useEffect(()=>{y({page:1,silent:!1})},[u]);const $={loading:j,fetch:y,filter:{category:u,scope:o},categories:N,setCategory:k,data:c,paging:f,showScope:i,scopeFormatter:p};return t.jsx(Q,{value:{auditLogs:$},children:e})}function w(){const{auditLogs:e}=n.useContext(S);return e}const J=({log:e,info:o,inService:a})=>a?`${_.WELLKNOWN_BLOCKLET_ADMIN_PATH}/members?did=${e.actor.did}`:e.scope===o.did?`/team/members?did=${e.actor.did}`:`/blocklets/${e.scope}/members?did=${e.actor.did}`;function V({log:e}){var l,c;const{inService:o,info:a}=C(),{showScope:i,scopeFormatter:p=r=>r}=w();if(!e.actor.did)return null;const s=!["blocklet",""].includes(e.actor.role);return t.jsxs(x,{className:"log-entry","data-cy":"log-entry",children:[t.jsx("div",{className:"log-author",children:s?t.jsx(b,{did:e.actor.did,size:36,shape:"circle"}):t.jsx(b,{did:e.actor.did,size:36})}),t.jsxs("div",{className:"log-body",children:[t.jsxs(d,{className:"log-header",color:"textSecondary",component:"p",gutterBottom:!0,display:"flex",alignItems:"center",children:[i&&t.jsx(L,{to:e.link,children:t.jsx(z,{style:{marginRight:8},children:p(e.scope)})}),s?t.jsxs(L,{to:J({log:e,inService:o,info:a}),target:"_blank",children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]}):t.jsxs("span",{children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]})," ",t.jsx("span",{style:{margin:"0 4px"},children:"-"})," ",e.action]}),t.jsx(d,{className:"log-content",maxWidth:"lg",color:"textPrimary",component:"div","data-color-mode":"light",gutterBottom:!0,children:t.jsx(W,{source:e.content,rehypePlugins:[[H,{target:"_blank"}]]})}),t.jsxs(x,{className:"log-meta",variant:"body2",children:[!!e.ip&&t.jsx(d,{component:"span",color:"textSecondary",children:`IP: ${e.ip}`}),!!((l=e.env.os)!=null&&l.name)&&t.jsxs(d,{component:"span",color:"textSecondary",children:[e.env.os.name,"(",e.env.os.version,")"]}),!!((c=e.env.browser)!=null&&c.name)&&t.jsxs(d,{component:"span",color:"textSecondary",children:[e.env.browser.name,"(",e.env.browser.version,")"]}),t.jsx(d,{component:"span",color:"textSecondary",children:t.jsx(U,{value:e.createdAt})})]})]})]})}function X(){const{t:e}=T(),{data:o,loading:a,paging:i,filter:p,categories:s,setCategory:l,fetch:c}=w();return a?t.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:t.jsx(B,{})}):t.jsxs(Y,{"data-cy":"audit-logs",children:[t.jsx(x,{className:"log-controls",children:t.jsxs(D,{style:{width:"240px"},variant:"outlined",children:[t.jsx(G,{children:e("common.filter")}),t.jsx(K,{"data-cy":"filter-by-category-trigger",value:p.category,onChange:r=>l(r.target.value),fullWidth:!0,label:e("common.category"),disabled:a,children:s.map(r=>t.jsx(M,{value:r.value,"data-cy":`filter-by-category-${r.value}`,children:t.jsx(x,{children:t.jsx("span",{children:r.label})})},r.label))})]})}),o.length===0&&t.jsx(F,{children:e("common.empty")}),o.length>0&&o.map(r=>t.jsx(V,{log:r},r.id)),i.pageCount>1&&t.jsx(O,{page:i.page,count:i.pageCount,onChange:(r,f)=>c({page:f}),showFirstButton:!0,showLastButton:!0})]})}function ze({scope:e,categories:o,showScope:a,scopeFormatter:i}){return t.jsx(q,{scope:e,categories:o,showScope:a,scopeFormatter:i,children:t.jsx(X,{})})}const Y=I.div`
2
2
  .log-controls {
3
3
  display: flex;
4
4
  justify-content: space-between;
@@ -1 +1 @@
1
- import{j as o,a3 as n}from"./index-CaLGv6xG.js";function r({...t}){return o.jsx(n,{className:"bottom-button",variant:"contained",color:"primary",...t})}export{r as S};
1
+ import{j as o,a3 as n}from"./index-Cggmiiia.js";function r({...t}){return o.jsx(n,{className:"bottom-button",variant:"contained",color:"primary",...t})}export{r as S};
@@ -0,0 +1 @@
1
+ import{r as i,a2 as s,j as t,fv as r,P as c}from"./index-Cggmiiia.js";function n({children:p,...e}){const{t:o}=i.useContext(s);return t.jsx(r,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...e,children:p})}n.propTypes={children:c.any.isRequired};export{n as C};
@@ -1,11 +1,11 @@
1
- import{a0 as d,u as U,r as n,al as C,am as T,j as t,n as B,B as h,fP as _,c as $,a6 as A,a7 as F,t as I,fy as M,fQ as N,P as z,G as O,ap as Q}from"./index-CaLGv6xG.js";import{L as W}from"./launch-result-message-DpNOYW9u.js";import{S as v}from"./button-BotQVFjI.js";import{S as X}from"./layout-D41GSjev.js";import"./Close-BtG4tyUL.js";import"./content-layout-BP4bsvx7.js";const G=d(W)`
1
+ import{a0 as d,u as C,r as n,al as P,am as T,j as t,n as B,B as h,fS as _,c as $,a6 as A,a7 as F,t as I,fC as M,fT as N,P as z,G as O,ap as W}from"./index-Cggmiiia.js";import{L as X}from"./launch-result-message--yAIU8ij.js";import{S as v}from"./button-jtk50dQY.js";import{S as G}from"./layout-CfszkMaR.js";import"./Close-BzQI1nKM.js";import"./content-layout-BEZyVpjO.js";const H=d(X)`
2
2
  && .result-footer {
3
3
  height: 120px;
4
4
  > div {
5
5
  flex-wrap: wrap;
6
6
  }
7
7
  }
8
- `,H=G;function E({onPrevious:s}){const{t:r}=U(),[x,g]=n.useState(!1),[c,u]=n.useState("starting"),[a,k]=n.useState(),{blocklet:i}=C(),[l,P]=n.useState(""),w=T("fromLauncher"),p=!["starting","running"].includes(c),y=c==="starting",L={stopped:r("blocklet.start"),starting:r("blocklet.starting"),running:r("blocklet.open")},R=()=>{const e=new URL(window.location.href).searchParams.get("redirect");let o=new URL(l);e&&(o=new URL(e,l));const j=_.get("login_token");o.host!==window.location.host&&j&&(o.pathname=$(O.WELLKNOWN_SERVICE_PATH_PREFIX,"redirect-with-login"),o.searchParams.set("setupToken",j)),window.location.href=o.href},f=async()=>{var m;g(!0),u("starting");try{await A.post("/blocklet/start",{fromSetup:!0});const{blocklet:{status:e}={}}=await F.getBlocklet({input:{did:i.meta.did}});g(!1),u(e),k(e==="running"?null:r("setup.complete.notRunning"))}catch(e){const o=((m=e==null?void 0:e.response)==null?void 0:m.data)||e.message;I.error(o),g(!1),u("stopped"),k(o)}};n.useEffect(()=>{u(i.status),["starting","running"].includes(i.status)||f()},[]),n.useEffect(()=>{l||(async()=>{const e=await M.evaluateURLs(i.site.domainAliases.map(o=>N(o.value,Q)),{preferAccessible:!0});e.length>0&&P(e[0].url)})()},[i,l]);const S=localStorage.getItem("blocklet-server-url"),b=y||!l;return w&&!b&&(p?f():R()),t.jsx(K,{children:t.jsx(H,{variant:a?"error":"success",title:r(a?"setup.complete.failedTitle":"setup.complete.title"),footer:t.jsxs(V,{children:[p&&t.jsx(v,{variant:"outlined",disabled:x,onClick:()=>s(),children:r("setup.previous")}),w?t.jsxs(q,{rel:"noreferrer",children:[t.jsx(B,{size:16,style:{marginRight:14}})," ",r("common.redirecting")]}):t.jsxs(t.Fragment,{children:[t.jsx(v,{style:{marginLeft:p?24:0},disabled:x||y,onClick:()=>p?f():R(),loading:b,children:L[c]||L.stopped}),(c==="running"||a)&&!!S&&t.jsx(h,{width:"100%",mt:2,children:t.jsx("a",{href:S,target:"_blank",rel:"noopener noreferrer",className:"back-to-server-link",children:r("setup.complete.backToServer")})}),a&&t.jsx(h,{className:"error-message",fontSize:14,color:"#888",mt:1,children:a})]})]})})})}const K=d(X)`
8
+ `,K=H;function E({onPrevious:s}){const{t:r}=C(),[x,g]=n.useState(!1),[c,u]=n.useState("starting"),[a,k]=n.useState(),{blocklet:i}=P(),[l,U]=n.useState(""),w=T("fromLauncher"),p=!["starting","running"].includes(c),L=c==="starting",R={stopped:r("blocklet.start"),starting:r("blocklet.starting"),running:r("blocklet.open")},S=()=>{const e=new URL(window.location.href).searchParams.get("redirect");let o=new URL(l);e&&(o=new URL(e,l));const j=_.get("login_token");o.host!==window.location.host&&j&&(o.pathname=$(O.WELLKNOWN_SERVICE_PATH_PREFIX,"redirect-with-login"),o.searchParams.set("setupToken",j)),window.location.href=o.href},f=async()=>{var m;g(!0),u("starting");try{await A.post("/blocklet/start",{fromSetup:!0});const{blocklet:{status:e}={}}=await F.getBlocklet({input:{did:i.meta.did}});g(!1),u(e),k(e==="running"?null:r("setup.complete.notRunning"))}catch(e){const o=((m=e==null?void 0:e.response)==null?void 0:m.data)||e.message;I.error(o),g(!1),u("stopped"),k(o)}};n.useEffect(()=>{u(i.status),["starting","running"].includes(i.status)||f()},[]),n.useEffect(()=>{l||(async()=>{const e=await M.evaluateURLs(i.site.domainAliases.map(o=>N(o.value,W)),{preferAccessible:!0});e.length>0&&U(e[0].url)})()},[i,l]);const y=localStorage.getItem("blocklet-server-url"),b=L||!l;return w&&!b&&(p?f():S()),t.jsx(Q,{children:t.jsx(K,{variant:a?"error":"success",title:r(a?"setup.complete.failedTitle":"setup.complete.title"),footer:t.jsxs(V,{children:[p&&t.jsx(v,{variant:"outlined",disabled:x,onClick:()=>s(),children:r("setup.previous")}),w?t.jsxs(q,{rel:"noreferrer",children:[t.jsx(B,{size:16,style:{marginRight:14}})," ",r("common.redirecting")]}):t.jsxs(t.Fragment,{children:[t.jsx(v,{style:{marginLeft:p?24:0},disabled:x||L,onClick:()=>p?f():S(),loading:b,children:R[c]||R.stopped}),(c==="running"||a)&&!!y&&t.jsx(h,{width:"100%",mt:2,children:t.jsx("a",{href:y,target:"_blank",rel:"noopener noreferrer",className:"back-to-server-link",children:r("setup.complete.backToServer")})}),a&&t.jsx(h,{className:"error-message",fontSize:14,color:"#888",mt:1,children:a})]})]})})})}const Q=d(G)`
9
9
  justify-content: center;
10
10
  .icon-success {
11
11
  width: 64px;
@@ -1,4 +1,4 @@
1
- import{gF as Kp,n as Ut,gG as Qp,gH as Xp,ft as Zp,gI as Jp,gJ as em,B as le,gE as tm,gK as nm,gL as rm,b_ as am,gM as om,gN as im,aS as lm,gO as sm,gP as um,au as _t,j as x,Z as Yt,$ as de,u as pt,aQ as st,aZ as on,a as Gt,P as K,t as Oe,cu as We,gQ as Ne,r as R,cr as Xe,b8 as vi,eF as ke,cv as Mc,gR as cm,fq as re,aF as Fe,aG as Ve,aH as ae,T as Ct,aL as z,cI as qr,aK as we,cE as ia,aO as Be,eG as dm,d1 as la,cN as sa,gS as Oc,dl as _c,cJ as fm,ch as mn,ak as vr,aD as et,aI as pm,d2 as Ic,b as fn,cU as Ac,bn as mm,aj as hm,gT as gm,cO as Fa,dy as bm,cV as Xo,gU as Kl,cT as Zo,a1 as ua,gV as vm,eA as Ql,gW as ym,dJ as yi,gX as Cm,cx as wm,a0 as ot,a2 as Kt,aY as sr,ab as Ot,a9 as ze,bm as hn,gY as Dm,f8 as rn,f5 as Ci,fe as Jo,av as wi,aU as Mt,G as me,fQ as Lc,gd as jc,gZ as xm,e as Pm,c as Bc,aW as er,ag as Va,g_ as Tm,bF as nn,a3 as Er,cS as Xl}from"./index-CaLGv6xG.js";import{d as $c}from"./Add-DV9cHTiI.js";import{E as Sm,d as Di,F as km,a as xi,L as Pi}from"./Edit-BrAk9NBL.js";import{E as Em}from"./index-B5Pm_bPi.js";import{g as Rm,h as Mm,W as gn,i as Om,j as Ti,B as Nc,a as Fc,k as _m,l as Im}from"./dashboard-BWG8DtF1.js";import{S as Am}from"./switch-control-VH3u6pwk.js";import{P as ei,w as xn}from"./permission-BK9x4qjQ.js";import{b as Lm,t as jm,c as Zl,T as Bm}from"./index-ByYl1QnH.js";import{r as Pn,V as $m,R as Nm,F as Fm,C as Vm,a as zm,e as Wm,g as It,f as Rt,s as ca,h as ln,q as Vc,p as Si,k as zc,m as qm,l as Um,i as Tn,c as sn,d as da,o as Gm,n as Hm,v as Wc,y as Ym,w as Km,x as Qm,j as Xm,u as Zm,t as Jm,b as eh,z as Jl,D as th,A as nh}from"./FilterList-BpmYd7MC.js";import{d as rh,_ as te,G as tr,b as es,c as ah,e as oh,f as ih}from"./redux-Xix6UYN5.js";import{S as lh,d as sh}from"./Search-D_9DtKpx.js";import{C as uh,r as De,a as ki,t as lt,b as ye,e as ti,d as ch,s as Ur,g as ni,m as qc,c as Uc,f as dh,h as fh,i as ri,j as Gc,k as ph,l as mh,n as Hc,o as Ei,p as ts,q as hh,u as ns,v as gh,w as bh,x as $t,y as vh,z as rs,A as yh,B as za,D as as,E as Ch,F as Rr,G as cn,H as wh,I as Dh,J as Mr,K as Wa,L as Or,M as qa,N as Ua,O as xh,P as Ph,Q as Th,R as Sh,S as kh,T as Eh,U as Rh,V as Mh,W as Oh,X as _h,Y as Ih,Z as Ah}from"./index-TTSckhl8.js";import{C as Lh,d as os,B as jh}from"./ChevronRight-BHXal2s_.js";import{D as Bh}from"./DeleteOutline-C36lJe42.js";import{A as $h}from"./AddBox-DjGRetT1.js";import{o as Nh,e as Fh,i as Vh,p as zh,g as Wh,d as is,c as qh,b as Ee,_ as Te,r as Qt}from"./slicedToArray-DiN6EoYj.js";import{t as Uh,k as Gh,l as Hh,_ as Se}from"./jss-plugin-props-sort.esm-B9z92TrV.js";import{F as Yh,f as Kh,a as Qh,T as ut}from"./TextField-BYelVRF_.js";import{_ as Xh}from"./toPropertyKey-PLuKRk1e.js";import{u as Ae}from"./useThemeProps-C59Glnbx.js";import{S as Zh}from"./Skeleton-d-rA8WB_.js";import{I as Yc,g as Jh,i as eg}from"./InputAdornment-Dr1oU3Hs.js";import{m as tt,t as tg}from"./toUpper-D8eon-dl.js";import{C as ls}from"./click-to-copy-C932KUDy.js";import{d as yr}from"./Delete-rvy-F0hT.js";import{d as ng}from"./ArrowDropDown-DX29Pf8V.js";import{A as ss}from"./Alert-BriK3hjA.js";import{f as bt}from"./format-error-DQS9AwZv.js";import{A as rg,a as ag,b as og,d as Kc,B as ig,f as lg}from"./add-component-core-CGy2QLvt.js";import{C as Sn}from"./confirm-BWW215hi.js";import{v as sg,a as Gr}from"./util-yXMDVjHb.js";import{i as ug}from"./index-VIHj0M7P.js";import{d as cg}from"./LockIcon-Cx_TySkG.js";import{d as Qc}from"./Launch-DSSRxyd1.js";import{C as dg}from"./item-DmDrPoAj.js";import{A as fg}from"./Avatar-CpQhQmV4.js";import{L as Ri}from"./Link-BzeSWqDp.js";import{d as pg}from"./InfoOutlined-DEt-KJ8v.js";import{R as mg,a as us}from"./RadioGroup-BSqtRWJR.js";import{F as ai,C as hg}from"./FormControlLabel-CQnpTkDU.js";import{d as gg}from"./PlayArrow-CvyM0yMY.js";import{A as Xc}from"./actions-Dv2KmWA_.js";import{I as Ga}from"./index-B22_1WOD.js";import{W as bg}from"./did-address-TSZ5XRBj.js";import{T as vg}from"./index-D-GkMvG_.js";import{a as yg}from"./index-ChpB_Xok.js";import"./Done-n1c-sUsw.js";import"./logo-uploader-CHBeSau3.js";import"./index-MoRwjSwP.js";import"./EditIcon-CPgYqcwg.js";import"./ButtonGroup-BPdi_2z2.js";import"./useLocalStorage-eP0cInBT.js";import"./MoreVert-BQD92YJp.js";import"./ListItemText-BWMpM4cA.js";import"./session-AqfK0jLG.js";import"./useSetState-DEVLe2Fz.js";import"./fallback-Dz8ZuYD5.js";import"./index-D_u35EkG.js";import"./Toolbar-DI2YKZS2.js";import"./Hidden-c0nvbE8_.js";import"./index-ozDSMBYi.js";import"./selector-BcHp8r2b.js";import"./useAsync-PE3W-DLW.js";import"./FormControl-Dq6XW9kS.js";import"./useFormControl-DMGx-jdt.js";import"./FormGroup-C8sAhYQk.js";import"./InputLabel-DYr7To9X.js";import"./Select-CMM8MR9i.js";import"./LastPage-DV14H4DC.js";import"./useSlot-BrU8y60n.js";import"./lottie-C16LOHrZ.js";import"./index-DU7LqWjQ.js";import"./spaces-DBKeHx91.js";import"./api-DJ1sjN9o.js";import"./url-join-B-UX0vQK.js";import"./launch-result-message-DpNOYW9u.js";import"./Close-BtG4tyUL.js";import"./page-header-Bjl7D46v.js";import"./uniqBy-Cev3lMnU.js";import"./index-46Rvg-Bo.js";import"./Google-C3cw6Unp.js";import"./index-BsjCwHmK.js";import"./index-DtAm5Ed6.js";import"./Stepper-X4KYPIVJ.js";import"./connect-to-CHo6hM6n.js";import"./use-blocklet-info-for-connect-did-spaces-DF1lby8c.js";import"./CloseOutlined-CYZb8eDz.js";import"./index-CndSwPzI.js";import"./ExpandMore-DpLFPsWa.js";import"./content-layout-BP4bsvx7.js";import"./preact.module-DJUF--8d.js";import"./shorten-label-DZ5n7VkB.js";import"./MoreHoriz-B_IgZ_Tw.js";const Cg=Object.freeze(Object.defineProperty({__proto__:null,circularProgressClasses:Kp,default:Ut,getCircularProgressUtilityClass:Qp},Symbol.toStringTag,{value:"Module"})),wg=Object.freeze(Object.defineProperty({__proto__:null,collapseClasses:Xp,default:Zp,getCollapseUtilityClass:Jp},Symbol.toStringTag,{value:"Module"})),Dg=Object.freeze(Object.defineProperty({__proto__:null,boxClasses:em,default:le},Symbol.toStringTag,{value:"Module"})),xg=Object.freeze(Object.defineProperty({__proto__:null,default:Yh,formHelperTextClasses:Kh,getFormHelperTextUtilityClasses:Qh},Symbol.toStringTag,{value:"Module"})),Pg=Object.freeze(Object.defineProperty({__proto__:null,default:tm,getIconUtilityClass:nm,iconClasses:rm},Symbol.toStringTag,{value:"Module"})),Tg=Object.freeze(Object.defineProperty({__proto__:null,default:Yc,getInputAdornmentUtilityClass:Jh,inputAdornmentClasses:eg},Symbol.toStringTag,{value:"Module"})),Sg=Object.freeze(Object.defineProperty({__proto__:null,default:am,getLinearProgressUtilityClass:om,linearProgressClasses:im},Symbol.toStringTag,{value:"Module"})),kg=Object.freeze(Object.defineProperty({__proto__:null,default:lm,getMenuUtilityClass:sm,menuClasses:um},Symbol.toStringTag,{value:"Module"})),Eg=_t(x.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"}),"TextSnippetOutlined");var Mi={},Rg=de;Object.defineProperty(Mi,"__esModule",{value:!0});var Zc=Mi.default=void 0,Mg=Rg(Yt()),Og=x;Zc=Mi.default=(0,Mg.default)((0,Og.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");var Oi={},_g=de;Object.defineProperty(Oi,"__esModule",{value:!0});var Jc=Oi.default=void 0,Ig=_g(Yt()),Ag=x;Jc=Oi.default=(0,Ig.default)((0,Ag.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");function _i({children:e,...t}){var s;const{t:n}=pt(),{api:a}=st(),{blocklet:r}=on(),o=(s=r==null?void 0:r.settings)==null?void 0:s.autoCheckUpdate,i=async f=>{await a.updateAutoCheckUpdate({input:{did:r.meta.did,autoCheckUpdate:f}})},l=async()=>{try{const f=!(o!=null&&o.enabled);await i({enabled:f}),Oe.success(n(f?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(f){Oe.error(f.message)}},u=!!(o!=null&&o.enabled);return x.jsxs(le,{display:"flex",flexDirection:"row",alignItems:"center",children:[e,x.jsx(Gt,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:x.jsx("div",{children:x.jsx(Am,{checked:u,onChange:l,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}_i.propTypes={children:K.any};_i.defaultProps={children:null};var ed={},Ln={},Ha={},Ya={},Ka={};const td=We(Cg);var cs;function Lg(){return cs||(cs=1,function(e){var t=de;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(Ne),a=t(td),r=t(R),o=t(Xe),i=Pn;function l(s){var f=(0,i.useTheme)();return r.default.createElement("div",{ref:s.forwardedRef,style:{display:"table",width:"100%",height:"100%",backgroundColor:f.palette.background.paper,opacity:.7}},r.default.createElement("div",{style:{display:"table-cell",width:"100%",height:"100%",verticalAlign:"middle",textAlign:"center"}},r.default.createElement(a.default,null)))}l.propTypes={theme:o.default.any};var u=r.default.forwardRef(function(f,c){return r.default.createElement(l,(0,n.default)({},f,{forwardedRef:c}))});e.default=u}(Ka)),Ka}var Qa={},Xa={},Dt={};const Je=We(rh),jg={BASE_URL:"/.well-known/service/static",DEV:!1,MODE:"production",PROD:!0,SSR:!1},ds=e=>{let t;const n=new Set,a=(f,c)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const g=t;t=c??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(y=>y(t,g))}},r=()=>t,u={setState:a,getState:r,getInitialState:()=>s,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(jg?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(a,r,u);return u},nd=e=>e?ds(e):ds;var rd={exports:{}},ad={},od={exports:{}},id={};/**
1
+ import{gI as Kp,n as Ut,gJ as Qp,gK as Xp,fx as Zp,gL as Jp,gM as em,B as le,gH as tm,gN as nm,gO as rm,b_ as am,gP as om,gQ as im,aS as lm,gR as sm,gS as um,au as _t,j as x,Z as Yt,$ as de,u as pt,aQ as st,aZ as on,a as Gt,P as K,t as Oe,cu as We,gT as Ne,r as R,cr as Xe,b8 as vi,eF as ke,cv as Mc,gU as cm,fu as re,aF as Fe,aG as Ve,aH as ae,T as Ct,aL as z,cI as qr,aK as we,cE as ia,aO as Be,eG as dm,d1 as la,cN as sa,gV as Oc,dl as _c,cJ as fm,ch as mn,ak as vr,aD as et,aI as pm,d2 as Ic,b as fn,cU as Ac,bn as mm,aj as hm,gW as gm,cO as Fa,dy as bm,cV as Xo,gX as Kl,cT as Zo,a1 as ua,gY as vm,eA as Ql,gZ as ym,dJ as yi,g_ as Cm,cx as wm,a0 as ot,a2 as Kt,aY as sr,ab as Ot,a9 as ze,bm as hn,g$ as Dm,fc as rn,f9 as Ci,fi as Jo,av as wi,aU as Mt,G as me,fT as Lc,gg as jc,h0 as xm,e as Pm,c as Bc,aW as er,ag as Va,h1 as Tm,bF as nn,a3 as Er,cS as Xl}from"./index-Cggmiiia.js";import{d as $c}from"./Add-DMLXuapt.js";import{E as Sm,d as Di,F as km,a as xi,L as Pi}from"./Edit-DrnFKfrQ.js";import{E as Em}from"./index-DnemmBZZ.js";import{g as Rm,h as Mm,W as gn,i as Om,j as Ti,B as Nc,a as Fc,k as _m,l as Im}from"./dashboard-CigfHyBK.js";import{S as Am}from"./switch-control-BQicjBlL.js";import{P as ei,w as xn}from"./permission-CoUl_-TD.js";import{b as Lm,t as jm,c as Zl,T as Bm}from"./index-BJflKzAj.js";import{r as Pn,V as $m,R as Nm,F as Fm,C as Vm,a as zm,e as Wm,g as It,f as Rt,s as ca,h as ln,q as Vc,p as Si,k as zc,m as qm,l as Um,i as Tn,c as sn,d as da,o as Gm,n as Hm,v as Wc,y as Ym,w as Km,x as Qm,j as Xm,u as Zm,t as Jm,b as eh,z as Jl,D as th,A as nh}from"./FilterList-CfRY6G_6.js";import{d as rh,_ as te,G as tr,b as es,c as ah,e as oh,f as ih}from"./redux-CmQ0AupQ.js";import{S as lh,d as sh}from"./Search-eHBEQt38.js";import{C as uh,r as De,a as ki,t as lt,b as ye,e as ti,d as ch,s as Ur,g as ni,m as qc,c as Uc,f as dh,h as fh,i as ri,j as Gc,k as ph,l as mh,n as Hc,o as Ei,p as ts,q as hh,u as ns,v as gh,w as bh,x as $t,y as vh,z as rs,A as yh,B as za,D as as,E as Ch,F as Rr,G as cn,H as wh,I as Dh,J as Mr,K as Wa,L as Or,M as qa,N as Ua,O as xh,P as Ph,Q as Th,R as Sh,S as kh,T as Eh,U as Rh,V as Mh,W as Oh,X as _h,Y as Ih,Z as Ah}from"./index-DFAKgndM.js";import{C as Lh,d as os,B as jh}from"./ChevronRight-MsONzKko.js";import{D as Bh}from"./DeleteOutline-avstszKw.js";import{A as $h}from"./AddBox-CpBdwq7q.js";import{o as Nh,e as Fh,i as Vh,p as zh,g as Wh,d as is,c as qh,b as Ee,_ as Te,r as Qt}from"./slicedToArray-ZTJkdcdS.js";import{t as Uh,k as Gh,l as Hh,_ as Se}from"./jss-plugin-props-sort.esm-DF2UeHPM.js";import{F as Yh,f as Kh,a as Qh,T as ut}from"./TextField-By686O81.js";import{_ as Xh}from"./toPropertyKey-PLuKRk1e.js";import{u as Ae}from"./useThemeProps-DthQbzYX.js";import{S as Zh}from"./Skeleton-LO2AMjQj.js";import{I as Yc,g as Jh,i as eg}from"./InputAdornment-B1JGDyvY.js";import{m as tt,t as tg}from"./toUpper-Cl4b2ZOs.js";import{C as ls}from"./click-to-copy-CuY68HMG.js";import{d as yr}from"./Delete-eYuUFe-a.js";import{d as ng}from"./ArrowDropDown-DpF0L6m2.js";import{A as ss}from"./Alert-DdUTjamT.js";import{f as bt}from"./format-error-xm5q5N3Z.js";import{A as rg,a as ag,b as og,d as Kc,B as ig,f as lg}from"./add-component-core-C3-hSwf4.js";import{C as Sn}from"./confirm-Dx6jUaOz.js";import{v as sg,a as Gr}from"./util-BKJ5oRJz.js";import{i as ug}from"./index-ChjVC0V6.js";import{d as cg}from"./LockIcon-BEsB4YZ5.js";import{d as Qc}from"./Launch-CsBFqx2_.js";import{C as dg}from"./item-BvTmy-2T.js";import{A as fg}from"./Avatar-Ba5K-SpV.js";import{L as Ri}from"./Link-JTCdKmrw.js";import{d as pg}from"./InfoOutlined-D6TSS9ex.js";import{R as mg,a as us}from"./RadioGroup-D4XxZA_m.js";import{F as ai,C as hg}from"./FormControlLabel-BKsoLGHz.js";import{d as gg}from"./PlayArrow-DpuhKo6D.js";import{A as Xc}from"./actions-BoMQPbbF.js";import{I as Ga}from"./index-Cx6pRmO2.js";import{W as bg}from"./did-address-CR96fGSF.js";import{T as vg}from"./index-7ATAUQCS.js";import{a as yg}from"./index-BLG5zTvA.js";import"./Done-CDaSY-gN.js";import"./logo-uploader-Ct05IBgW.js";import"./index-Dm5LygxH.js";import"./EditIcon-FTgbeCiz.js";import"./ButtonGroup-oqbT9mJ7.js";import"./useLocalStorage-C1CX-JWm.js";import"./MoreVert-BqoNOXb1.js";import"./ListItemText-CJO6iQaY.js";import"./session-B20aBevE.js";import"./useSetState-Buep2Jkr.js";import"./fallback-DVHgA8PG.js";import"./index-tZwe6kGH.js";import"./Toolbar-CILlK-1t.js";import"./Hidden-v7r91ILG.js";import"./index-BIwlKqnv.js";import"./selector-DplhIXMq.js";import"./useAsync-BrIwhlfT.js";import"./FormControl-CJxOqtCV.js";import"./useFormControl-xR1NlgHj.js";import"./FormGroup-Chc5NbDQ.js";import"./InputLabel-Ds1qPSij.js";import"./Select-CHwe79IG.js";import"./LastPage-5otHasfZ.js";import"./useSlot-DJoDEpM7.js";import"./lottie-CHlQE8LI.js";import"./index-C01E65Yy.js";import"./spaces-BKVgtwre.js";import"./api-jAQ8N-C_.js";import"./url-join-CXExeXLp.js";import"./launch-result-message--yAIU8ij.js";import"./Close-BzQI1nKM.js";import"./page-header-BcMcWChj.js";import"./uniqBy-Depm40zB.js";import"./index-DbFNRcRj.js";import"./Google-C72krpFT.js";import"./index-J--b5UMY.js";import"./index-3TcO2NHG.js";import"./Stepper-Cn0ehU0z.js";import"./connect-to-DSVNCjA-.js";import"./use-blocklet-info-for-connect-did-spaces-ByFtSRMu.js";import"./CloseOutlined-CcRedm-I.js";import"./index-BvJGY_nw.js";import"./ExpandMore-CAfMRIG3.js";import"./content-layout-BEZyVpjO.js";import"./preact.module-DJUF--8d.js";import"./shorten-label-Bfc9PQs9.js";import"./MoreHoriz-B5rpG1Ew.js";const Cg=Object.freeze(Object.defineProperty({__proto__:null,circularProgressClasses:Kp,default:Ut,getCircularProgressUtilityClass:Qp},Symbol.toStringTag,{value:"Module"})),wg=Object.freeze(Object.defineProperty({__proto__:null,collapseClasses:Xp,default:Zp,getCollapseUtilityClass:Jp},Symbol.toStringTag,{value:"Module"})),Dg=Object.freeze(Object.defineProperty({__proto__:null,boxClasses:em,default:le},Symbol.toStringTag,{value:"Module"})),xg=Object.freeze(Object.defineProperty({__proto__:null,default:Yh,formHelperTextClasses:Kh,getFormHelperTextUtilityClasses:Qh},Symbol.toStringTag,{value:"Module"})),Pg=Object.freeze(Object.defineProperty({__proto__:null,default:tm,getIconUtilityClass:nm,iconClasses:rm},Symbol.toStringTag,{value:"Module"})),Tg=Object.freeze(Object.defineProperty({__proto__:null,default:Yc,getInputAdornmentUtilityClass:Jh,inputAdornmentClasses:eg},Symbol.toStringTag,{value:"Module"})),Sg=Object.freeze(Object.defineProperty({__proto__:null,default:am,getLinearProgressUtilityClass:om,linearProgressClasses:im},Symbol.toStringTag,{value:"Module"})),kg=Object.freeze(Object.defineProperty({__proto__:null,default:lm,getMenuUtilityClass:sm,menuClasses:um},Symbol.toStringTag,{value:"Module"})),Eg=_t(x.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"}),"TextSnippetOutlined");var Mi={},Rg=de;Object.defineProperty(Mi,"__esModule",{value:!0});var Zc=Mi.default=void 0,Mg=Rg(Yt()),Og=x;Zc=Mi.default=(0,Mg.default)((0,Og.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");var Oi={},_g=de;Object.defineProperty(Oi,"__esModule",{value:!0});var Jc=Oi.default=void 0,Ig=_g(Yt()),Ag=x;Jc=Oi.default=(0,Ig.default)((0,Ag.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");function _i({children:e,...t}){var s;const{t:n}=pt(),{api:a}=st(),{blocklet:r}=on(),o=(s=r==null?void 0:r.settings)==null?void 0:s.autoCheckUpdate,i=async f=>{await a.updateAutoCheckUpdate({input:{did:r.meta.did,autoCheckUpdate:f}})},l=async()=>{try{const f=!(o!=null&&o.enabled);await i({enabled:f}),Oe.success(n(f?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(f){Oe.error(f.message)}},u=!!(o!=null&&o.enabled);return x.jsxs(le,{display:"flex",flexDirection:"row",alignItems:"center",children:[e,x.jsx(Gt,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:x.jsx("div",{children:x.jsx(Am,{checked:u,onChange:l,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}_i.propTypes={children:K.any};_i.defaultProps={children:null};var ed={},Ln={},Ha={},Ya={},Ka={};const td=We(Cg);var cs;function Lg(){return cs||(cs=1,function(e){var t=de;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(Ne),a=t(td),r=t(R),o=t(Xe),i=Pn;function l(s){var f=(0,i.useTheme)();return r.default.createElement("div",{ref:s.forwardedRef,style:{display:"table",width:"100%",height:"100%",backgroundColor:f.palette.background.paper,opacity:.7}},r.default.createElement("div",{style:{display:"table-cell",width:"100%",height:"100%",verticalAlign:"middle",textAlign:"center"}},r.default.createElement(a.default,null)))}l.propTypes={theme:o.default.any};var u=r.default.forwardRef(function(f,c){return r.default.createElement(l,(0,n.default)({},f,{forwardedRef:c}))});e.default=u}(Ka)),Ka}var Qa={},Xa={},Dt={};const Je=We(rh),jg={BASE_URL:"/.well-known/service/static",DEV:!1,MODE:"production",PROD:!0,SSR:!1},ds=e=>{let t;const n=new Set,a=(f,c)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const g=t;t=c??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(y=>y(t,g))}},r=()=>t,u={setState:a,getState:r,getInitialState:()=>s,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(jg?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(a,r,u);return u},nd=e=>e?ds(e):ds;var rd={exports:{}},ad={},od={exports:{}},id={};/**
2
2
  * @license React
3
3
  * use-sync-external-store-shim.production.min.js
4
4
  *
@@ -1 +1 @@
1
- import{Z as t,$ as a,j as c,G as e}from"./index-CaLGv6xG.js";var r={},u=a;Object.defineProperty(r,"__esModule",{value:!0});var n=r.default=void 0,v=u(t()),d=c;n=r.default=(0,v.default)((0,d.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");var o={},p=a;Object.defineProperty(o,"__esModule",{value:!0});var l=o.default=void 0,_=p(t()),f=c;l=o.default=(0,_.default)((0,f.jsx)("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"}),"ContactMail");var i={},h=a;Object.defineProperty(i,"__esModule",{value:!0});var s=i.default=void 0,m=h(t()),C=c;s=i.default=(0,m.default)((0,C.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}),"Public");const j=[{value:e.WHO_CAN_ACCESS.ALL,icon:s,title:{zh:"所有人可访问",en:"Accessible to all"},description:{zh:"向所有人开放,无需通行证即可访问应用",en:"Open to the world anyone can access without passport"}},{value:e.WHO_CAN_ACCESS.INVITED,icon:l,title:{zh:"只有被邀请的人可以访问",en:"Only invited people can access"},description:{zh:"稍后您可以在管理页面中邀请成员",en:"You can invite members later in the admin page"}},{value:e.WHO_CAN_ACCESS.OWNER,icon:n,title:{zh:"只有应用所有者可以访问",en:"Only Owner of the blocklet can access"},description:{zh:"必须提供所有者通行证才能访问应用",en:"You must provide owner passport to access this application"}}];export{j as A};
1
+ import{Z as t,$ as a,j as c,G as e}from"./index-Cggmiiia.js";var r={},u=a;Object.defineProperty(r,"__esModule",{value:!0});var n=r.default=void 0,v=u(t()),d=c;n=r.default=(0,v.default)((0,d.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");var o={},p=a;Object.defineProperty(o,"__esModule",{value:!0});var l=o.default=void 0,_=p(t()),f=c;l=o.default=(0,_.default)((0,f.jsx)("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"}),"ContactMail");var i={},h=a;Object.defineProperty(i,"__esModule",{value:!0});var s=i.default=void 0,m=h(t()),C=c;s=i.default=(0,m.default)((0,C.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}),"Public");const j=[{value:e.WHO_CAN_ACCESS.ALL,icon:s,title:{zh:"所有人可访问",en:"Accessible to all"},description:{zh:"向所有人开放,无需通行证即可访问应用",en:"Open to the world anyone can access without passport"}},{value:e.WHO_CAN_ACCESS.INVITED,icon:l,title:{zh:"只有被邀请的人可以访问",en:"Only invited people can access"},description:{zh:"稍后您可以在管理页面中邀请成员",en:"You can invite members later in the admin page"}},{value:e.WHO_CAN_ACCESS.OWNER,icon:n,title:{zh:"只有应用所有者可以访问",en:"Only Owner of the blocklet can access"},description:{zh:"必须提供所有者通行证才能访问应用",en:"You must provide owner passport to access this application"}}];export{j as A};
@@ -1,4 +1,4 @@
1
- import{r as a,j as n,a0 as I,P as g,a1 as q,u as U,al as F,bq as G,ab as d,c as M,G as z,a9 as P,f7 as H,bW as D,t as Y}from"./index-CaLGv6xG.js";import{u as Q}from"./uniqBy-Cev3lMnU.js";import{S as W}from"./index-46Rvg-Bo.js";import{P as $}from"./page-header-Bjl7D46v.js";import{S as V}from"./layout-D41GSjev.js";import{S as X}from"./step-actions-NyA7AGpj.js";import{S as J}from"./button-BotQVFjI.js";import"./EditIcon-CPgYqcwg.js";import"./Done-n1c-sUsw.js";import"./Google-C3cw6Unp.js";import"./TextField-BYelVRF_.js";import"./FormControl-Dq6XW9kS.js";import"./useFormControl-DMGx-jdt.js";import"./InputLabel-DYr7To9X.js";import"./Select-CMM8MR9i.js";import"./logo-uploader-CHBeSau3.js";import"./index-MoRwjSwP.js";import"./content-layout-BP4bsvx7.js";function x({children:C,bottom:E,onBottomFix:f}){const i=a.useRef(null),s=a.useRef(null),m=a.useRef(null),r=a.useRef(null),[L,h]=a.useState(!1);return a.useEffect(()=>{let t;const l=()=>{t||(t=setTimeout(()=>{s.current&&(s.current.scrollHeight>i.current.clientHeight-m.current.clientHeight?(r.current!=="fix"&&(f("fix"),r.current="fix"),h(!0)):(r.current!=="scroll"&&(f("scroll"),r.current="scroll"),h(!1))),t=null},50))};let u;return window.ResizeObserver?u=new ResizeObserver(l):window.addEventListener("resize",l),u.observe(i.current),u.observe(s.current),()=>{u?u.disconnect():window.removeEventListener("resize",l),t&&clearTimeout(t)}},[f]),n.jsxs(Z,{ref:i,className:`${L?"scroll-mode":""}`,children:[n.jsx("div",{className:"compact-context",ref:s,children:C}),n.jsx("div",{className:"fix-container",ref:m,children:E})]})}const Z=I.div`
1
+ import{r as a,j as n,a0 as I,P as g,a1 as q,u as U,al as F,bq as G,ab as d,c as M,G as z,a9 as P,fb as H,bW as D,t as Y}from"./index-Cggmiiia.js";import{u as Q}from"./uniqBy-Depm40zB.js";import{S as W}from"./index-DbFNRcRj.js";import{P as $}from"./page-header-BcMcWChj.js";import{S as V}from"./layout-CfszkMaR.js";import{S as X}from"./step-actions-CZsxCY_f.js";import{S as J}from"./button-jtk50dQY.js";import"./EditIcon-FTgbeCiz.js";import"./Done-CDaSY-gN.js";import"./Google-C72krpFT.js";import"./TextField-By686O81.js";import"./FormControl-CJxOqtCV.js";import"./useFormControl-xR1NlgHj.js";import"./InputLabel-Ds1qPSij.js";import"./Select-CHwe79IG.js";import"./logo-uploader-Ct05IBgW.js";import"./index-Dm5LygxH.js";import"./content-layout-BEZyVpjO.js";function x({children:C,bottom:E,onBottomFix:f}){const i=a.useRef(null),s=a.useRef(null),m=a.useRef(null),r=a.useRef(null),[L,h]=a.useState(!1);return a.useEffect(()=>{let t;const l=()=>{t||(t=setTimeout(()=>{s.current&&(s.current.scrollHeight>i.current.clientHeight-m.current.clientHeight?(r.current!=="fix"&&(f("fix"),r.current="fix"),h(!0)):(r.current!=="scroll"&&(f("scroll"),r.current="scroll"),h(!1))),t=null},50))};let u;return window.ResizeObserver?u=new ResizeObserver(l):window.addEventListener("resize",l),u.observe(i.current),u.observe(s.current),()=>{u?u.disconnect():window.removeEventListener("resize",l),t&&clearTimeout(t)}},[f]),n.jsxs(Z,{ref:i,className:`${L?"scroll-mode":""}`,children:[n.jsx("div",{className:"compact-context",ref:s,children:C}),n.jsx("div",{className:"fix-container",ref:m,children:E})]})}const Z=I.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -29,4 +29,4 @@ import{r as a,j as n,a0 as I,P as g,a1 as q,u as U,al as F,bq as G,ab as d,c as
29
29
  opacity: 1;
30
30
  }
31
31
  }
32
- `;x.propTypes={children:g.any,bottom:g.element.isRequired,onBottomFix:g.func};x.defaultProps={children:[],onBottomFix:()=>{}};function T({onNext:C,onPrevious:E}){var _;const f=q(e=>e.breakpoints.down("md")),{t:i}=U(),[s,m]=a.useState(!1),[r,L]=a.useState(null),{did:h,blocklet:t,actions:l}=F(),{prefix:u,getSessionInHeader:S}=G();let y=(t.configs||[]).filter(e=>!d.BLOCKLET_CONFIGURABLE_KEY[e.key]);const O=t.environments.find(e=>e.key==="BLOCKLET_PASSPORT_COLOR"),B=M(z.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?v=${t==null?void 0:t.updatedAt}`),R=[{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE,description:i("blocklet.config.logoSquare"),value:(_=t.environments.find(e=>e.key==="BLOCKLET_APP_LOGO_SQUARE"))==null?void 0:_.value,componentType:"uploader",solo:!0,componentProps:{url:B,height:120,width:120,type:"square",did:h,prefix:u,headers:S,onUploaded:l.refreshBlocklet}},{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:i("blocklet.config.name"),value:t.environments.find(e=>e.key==="BLOCKLET_APP_NAME").value},{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:i("blocklet.config.description"),value:t.environments.find(e=>e.key==="BLOCKLET_APP_DESCRIPTION").value},{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,description:i("blocklet.config.passportColor"),value:O?O.value:"auto",hidden:!0,componentType:"passport",componentProps:{blocklet:t}}],v=[];P.forEachChildSync(t,(e,{ancestors:o})=>{const c=o.slice(1).map(p=>p.meta.did);v.push((e.configs||[]).map(p=>({...p,childDid:c.concat(e.meta.did)})))}),t.meta.group===d.BlockletGroup.gateway&&(y=y.filter(e=>!e.secure&&e.shared));const A=Q(H([...y,...v]),"key").filter(e=>!!e.key).sort((e,o)=>e.required&&!o.required?-1:o.required&&!e.required?1:0),b=P.getAppMissingConfigs(t).length,N=async e=>{const{childDid:o,...c}=r,p=[{...D(c,["key","value","description"]),value:e}];try{m(!0),await l.configBlocklet({configs:p,childDid:o})}catch(j){Y.error(j.message)}finally{m(!1)}},k={},K=[...R,...A].map(e=>{const{value:o,...c}=e;return k[e.key]=o,{...c}}),w=()=>{E()};return n.jsxs(V,{children:[n.jsx("div",{className:"header",style:{marginBottom:16},children:n.jsx($,{title:i("setup.config.title"),subTitle:i("setup.config.subTitle"),onClickBack:w})}),n.jsx("div",{className:"container-main",children:n.jsx("div",{className:"container-inner",children:n.jsx(x,{bottom:n.jsx(X,{mt:8,disabled:s||r,blocklet:t,onStartNow:()=>C("complete"),children:n.jsx(J,{variant:"contained",disabled:s||b||r,onClick:()=>{l.refreshFuel({showError:!1}),C()},children:i("setup.next")})}),children:n.jsx(W,{style:{margin:"0 auto 20px",paddingTop:f?0:38},loading:s,schema:K,defaultValue:k,onChange:(e,{action:o,currentItem:c})=>{o==="edit"?L(c):["cancel","confirm"].includes(o)&&L(null),o==="confirm"&&N(e[c.key])}})})})})]})}T.propTypes={onNext:g.func,onPrevious:g.func};T.defaultProps={onNext:()=>{},onPrevious:()=>{}};export{T as default};
32
+ `;x.propTypes={children:g.any,bottom:g.element.isRequired,onBottomFix:g.func};x.defaultProps={children:[],onBottomFix:()=>{}};function T({onNext:C,onPrevious:E}){var _;const f=q(e=>e.breakpoints.down("md")),{t:i}=U(),[s,m]=a.useState(!1),[r,L]=a.useState(null),{did:h,blocklet:t,actions:l}=F(),{prefix:u,getSessionInHeader:S}=G();let y=(t.configs||[]).filter(e=>!d.BLOCKLET_CONFIGURABLE_KEY[e.key]);const O=t.environments.find(e=>e.key==="BLOCKLET_PASSPORT_COLOR"),B=M(z.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?v=${t==null?void 0:t.updatedAt}`),R=[{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE,description:i("blocklet.config.logoSquare"),value:(_=t.environments.find(e=>e.key==="BLOCKLET_APP_LOGO_SQUARE"))==null?void 0:_.value,componentType:"uploader",solo:!0,componentProps:{url:B,height:120,width:120,type:"square",did:h,prefix:u,headers:S,onUploaded:l.refreshBlocklet}},{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:i("blocklet.config.name"),value:t.environments.find(e=>e.key==="BLOCKLET_APP_NAME").value},{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:i("blocklet.config.description"),value:t.environments.find(e=>e.key==="BLOCKLET_APP_DESCRIPTION").value},{key:d.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,description:i("blocklet.config.passportColor"),value:O?O.value:"auto",hidden:!0,componentType:"passport",componentProps:{blocklet:t}}],v=[];P.forEachChildSync(t,(e,{ancestors:o})=>{const c=o.slice(1).map(p=>p.meta.did);v.push((e.configs||[]).map(p=>({...p,childDid:c.concat(e.meta.did)})))}),t.meta.group===d.BlockletGroup.gateway&&(y=y.filter(e=>!e.secure&&e.shared));const b=Q(H([...y,...v]),"key").filter(e=>!!e.key).sort((e,o)=>e.required&&!o.required?-1:o.required&&!e.required?1:0),A=P.getAppMissingConfigs(t).length,N=async e=>{const{childDid:o,...c}=r,p=[{...D(c,["key","value","description"]),value:e}];try{m(!0),await l.configBlocklet({configs:p,childDid:o})}catch(j){Y.error(j.message)}finally{m(!1)}},k={},K=[...R,...b].map(e=>{const{value:o,...c}=e;return k[e.key]=o,{...c}}),w=()=>{E()};return n.jsxs(V,{children:[n.jsx("div",{className:"header",style:{marginBottom:16},children:n.jsx($,{title:i("setup.config.title"),subTitle:i("setup.config.subTitle"),onClickBack:w})}),n.jsx("div",{className:"container-main",children:n.jsx("div",{className:"container-inner",children:n.jsx(x,{bottom:n.jsx(X,{mt:8,disabled:s||r,blocklet:t,onStartNow:()=>C("complete"),children:n.jsx(J,{variant:"contained",disabled:s||A||r,onClick:()=>{l.refreshFuel({showError:!1}),C()},children:i("setup.next")})}),children:n.jsx(W,{style:{margin:"0 auto 20px",paddingTop:f?0:38},loading:s,schema:K,defaultValue:k,onChange:(e,{action:o,currentItem:c})=>{o==="edit"?L(c):["cancel","confirm"].includes(o)&&L(null),o==="confirm"&&N(e[c.key])}})})})})]})}T.propTypes={onNext:g.func,onPrevious:g.func};T.defaultProps={onNext:()=>{},onPrevious:()=>{}};export{T as default};
@@ -1,4 +1,4 @@
1
- import{_ as Ur,r as P,cv as ze,eN as nt,cr as Vr,gn as ri,dJ as Ct,fq as D,aL as ie,ez as oi,b8 as Bt,P as b,eF as V,cu as ii,j as T,bF as se,gb as ai,u as et,cz as Ue,B as fe,T as ge,b0 as li,dN as si,b7 as Kr,bb as qr,b5 as ci,b6 as di,ba as ui,go as hi,gp as fi,gq as pi,gr as gi,eS as vi,gs as mi,eR as Si,cs as hn,fI as yi,fe as _i,bg as Qr,aU as gt,Q as Ut,aD as Ge,bj as Ci,b as fn,aZ as Vt,ab as Gt,c2 as Oe,gt as Gn,c as Xr,bH as wi,gu as Wn,bW as xi,t as ct,dv as dt,av as bi,a3 as Ri,gv as Ti,bX as Ii,dr as Yr,G as At,gw as zi,gx as Di,f6 as Pi,a0 as Oi,a1 as ki,aj as Zt,bD as Ni,fg as Mi,bE as Re}from"./index-CaLGv6xG.js";import{r as Li,b as Ei,i as Hn,c as Ai,d as $n,D as ji,H as Fi}from"./index-BqmsKa7O.js";import{_ as te,a as Ve,b as ve,c as me,d as Se,r as Gi}from"./slicedToArray-DiN6EoYj.js";import{_ as re,i as Wi,f as Hi,j as $i,a as Bi,c as Ui,d as Vi,b as Ki,e as qi,g as Qi,h as Xi}from"./jss-plugin-props-sort.esm-B9z92TrV.js";import{_ as w,G as Bn}from"./redux-Xix6UYN5.js";import{_ as Yi}from"./toPropertyKey-PLuKRk1e.js";import{_ as Ji,u as Jr,b as Zi}from"./dashboard-BWG8DtF1.js";import{u as ea,C as rt,A as ta}from"./index.esm-DDyWFyUp.js";import{p as na}from"./index-DtAm5Ed6.js";import{u as ra}from"./index-B0wa_Sca.js";import{F as _n}from"./FormControl-Dq6XW9kS.js";import{I as Zr}from"./InputLabel-DYr7To9X.js";import{S as pn,O as oa}from"./Select-CMM8MR9i.js";import{a as ia}from"./ListItemText-BWMpM4cA.js";import{F as aa,T as en}from"./TextField-BYelVRF_.js";import{b as la,c as Un}from"./index-ByYl1QnH.js";import{I as Vn}from"./InputAdornment-Dr1oU3Hs.js";import{H as sa,F as ca}from"./index-BSHfXuRt.js";import{D as da}from"./index-ozDSMBYi.js";import{S as tn}from"./Skeleton-d-rA8WB_.js";import{f as Kn}from"./format-error-DQS9AwZv.js";import{B as nn}from"./ButtonGroup-BPdi_2z2.js";import{T as qn}from"./Toolbar-DI2YKZS2.js";import{L as Qn}from"./LoadingButton-IrsPdnhT.js";import"./useLocalStorage-eP0cInBT.js";import"./MoreVert-BQD92YJp.js";import"./confirm-BWW215hi.js";import"./Alert-BriK3hjA.js";import"./useSlot-BrU8y60n.js";import"./Delete-rvy-F0hT.js";import"./PlayArrow-CvyM0yMY.js";import"./RadioGroup-BSqtRWJR.js";import"./FormControlLabel-CQnpTkDU.js";import"./useFormControl-DMGx-jdt.js";import"./FormGroup-C8sAhYQk.js";import"./Avatar-CpQhQmV4.js";import"./session-AqfK0jLG.js";import"./permission-BK9x4qjQ.js";import"./useAsync-PE3W-DLW.js";import"./index-D-GkMvG_.js";import"./Link-BzeSWqDp.js";import"./useSetState-DEVLe2Fz.js";import"./fallback-Dz8ZuYD5.js";import"./index-D_u35EkG.js";import"./Hidden-c0nvbE8_.js";import"./ExpandMore-DpLFPsWa.js";import"./selector-BcHp8r2b.js";import"./useThemeProps-C59Glnbx.js";function ua(n,o){var r=Ur(P.useState(n),2),e=r[0],t=r[1],i=P.useMemo(function(){var a=!n,l=function(){return t(function(u){return u===n?a:n})},s=function(u){return t(u)},d=function(){return t(n)},c=function(){return t(a)};return{toggle:l,set:s,setLeft:d,setRight:c}},[]);return[e,i]}function ha(n){var o=Ur(ua(!!n),2),r=o[0],e=o[1],t=e.toggle,i=e.set,a=P.useMemo(function(){var l=function(){return i(!0)},s=function(){return i(!1)};return{toggle:t,set:function(d){return i(!!d)},setTrue:l,setFalse:s}},[]);return[r,a]}var Pe={},eo="Expected a function",Xn=NaN,fa="[object Symbol]",pa=/^\s+|\s+$/g,ga=/^[-+]0x[0-9a-f]+$/i,va=/^0b[01]+$/i,ma=/^0o[0-7]+$/i,Sa=parseInt,ya=typeof ze=="object"&&ze&&ze.Object===Object&&ze,_a=typeof self=="object"&&self&&self.Object===Object&&self,Ca=ya||_a||Function("return this")(),wa=Object.prototype,xa=wa.toString,ba=Math.max,Ra=Math.min,rn=function(){return Ca.Date.now()};function Ta(n,o,r){var e,t,i,a,l,s,d=0,c=!1,u=!1,h=!0;if(typeof n!="function")throw new TypeError(eo);o=Yn(o)||0,Wt(r)&&(c=!!r.leading,u="maxWait"in r,i=u?ba(Yn(r.maxWait)||0,o):i,h="trailing"in r?!!r.trailing:h);function p(x){var R=e,y=t;return e=t=void 0,d=x,a=n.apply(y,R),a}function f(x){return d=x,l=setTimeout(C,o),c?p(x):a}function m(x){var R=x-s,y=x-d,O=o-R;return u?Ra(O,i-y):O}function S(x){var R=x-s,y=x-d;return s===void 0||R>=o||R<0||u&&y>=i}function C(){var x=rn();if(S(x))return g(x);l=setTimeout(C,m(x))}function g(x){return l=void 0,h&&e?p(x):(e=t=void 0,a)}function z(){l!==void 0&&clearTimeout(l),d=0,e=s=t=l=void 0}function _(){return l===void 0?a:g(rn())}function v(){var x=rn(),R=S(x);if(e=arguments,t=this,s=x,R){if(l===void 0)return f(s);if(u)return l=setTimeout(C,o),p(s)}return l===void 0&&(l=setTimeout(C,o)),a}return v.cancel=z,v.flush=_,v}function Ia(n,o,r){var e=!0,t=!0;if(typeof n!="function")throw new TypeError(eo);return Wt(r)&&(e="leading"in r?!!r.leading:e,t="trailing"in r?!!r.trailing:t),Ta(n,o,{leading:e,maxWait:o,trailing:t})}function Wt(n){var o=typeof n;return!!n&&(o=="object"||o=="function")}function za(n){return!!n&&typeof n=="object"}function Da(n){return typeof n=="symbol"||za(n)&&xa.call(n)==fa}function Yn(n){if(typeof n=="number")return n;if(Da(n))return Xn;if(Wt(n)){var o=typeof n.valueOf=="function"?n.valueOf():n;n=Wt(o)?o+"":o}if(typeof n!="string")return n===0?n:+n;n=n.replace(pa,"");var r=va.test(n);return r||ma.test(n)?Sa(n.slice(2),r?2:8):ga.test(n)?Xn:+n}var Pa=Ia,Kt={exports:{}},ut={exports:{}};(function(){var n,o,r,e,t,i;typeof performance<"u"&&performance!==null&&performance.now?ut.exports=function(){return performance.now()}:typeof nt<"u"&&nt!==null&&nt.hrtime?(ut.exports=function(){return(n()-t)/1e6},o=nt.hrtime,n=function(){var a;return a=o(),a[0]*1e9+a[1]},e=n(),i=nt.uptime()*1e9,t=e-i):Date.now?(ut.exports=function(){return Date.now()-r},r=Date.now()):(ut.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(ze);var Oa=ut.exports,ka=Oa,De=typeof window>"u"?ze:window,kt=["moz","webkit"],Qe="AnimationFrame",Ye=De["request"+Qe],St=De["cancel"+Qe]||De["cancelRequest"+Qe];for(var ot=0;!Ye&&ot<kt.length;ot++)Ye=De[kt[ot]+"Request"+Qe],St=De[kt[ot]+"Cancel"+Qe]||De[kt[ot]+"CancelRequest"+Qe];if(!Ye||!St){var on=0,Jn=0,Ae=[],Na=1e3/60;Ye=function(n){if(Ae.length===0){var o=ka(),r=Math.max(0,Na-(o-on));on=r+o,setTimeout(function(){var e=Ae.slice(0);Ae.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(on)}catch(i){setTimeout(function(){throw i},0)}},Math.round(r))}return Ae.push({handle:++Jn,callback:n,cancelled:!1}),Jn},St=function(n){for(var o=0;o<Ae.length;o++)Ae[o].handle===n&&(Ae[o].cancelled=!0)}}Kt.exports=function(n){return Ye.call(De,n)};Kt.exports.cancel=function(){St.apply(De,arguments)};Kt.exports.polyfill=function(n){n||(n=De),n.requestAnimationFrame=Ye,n.cancelAnimationFrame=St};var Ma=Kt.exports,Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.default=La;function La(n){return n.displayName||n.name||(typeof n=="string"&&n.length>0?n:"Unknown")}var wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.noop=Ea;wt.intBetween=Aa;wt.getCoords=ja;function Ea(){}function Aa(n,o,r){return Math.floor(Math.min(o,Math.max(n,r)))}function ja(n){return n.type==="touchmove"?{x:n.changedTouches[0].clientX,y:n.changedTouches[0].clientY}:{x:n.clientX,y:n.clientY}}Object.defineProperty(Pe,"__esModule",{value:!0});var Fa=Pe.createHorizontalStrength=no,Ga=Pe.createVerticalStrength=ro,Wa=Pe.createScrollingComponent=ao,Ha=Pe.default=nl;Pe.defaultVerticalStrength=Pe.defaultHorizontalStrength=void 0;var vt=qa(P),it=xt(Vr),$a=Ct,Ba=xt(Pa),Zn=xt(Ma),Ua=xt(Cn),Va=Li,Ka=xt(ri),Nt=wt;function xt(n){return n&&n.__esModule?n:{default:n}}function qa(n){if(n&&n.__esModule)return n;var o={};if(n!=null){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var e=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(n,r):{};e.get||e.set?Object.defineProperty(o,r,e):o[r]=n[r]}}return o.default=n,o}function jt(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jt=function(r){return typeof r}:jt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},jt(n)}function Ht(){return Ht=Object.assign||function(n){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=r[e])}return n},Ht.apply(this,arguments)}function Qa(n,o){if(n==null)return{};var r=Xa(n,o),e,t;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t<i.length;t++)e=i[t],!(o.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(n,e)&&(r[e]=n[e])}return r}function Xa(n,o){if(n==null)return{};var r={},e=Object.keys(n),t,i;for(i=0;i<e.length;i++)t=e[i],!(o.indexOf(t)>=0)&&(r[t]=n[t]);return r}function Ya(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function Ja(n,o){for(var r=0;r<o.length;r++){var e=o[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}function Za(n,o,r){return o&&Ja(n.prototype,o),n}function el(n,o){return o&&(jt(o)==="object"||typeof o=="function")?o:ht(n)}function gn(n){return gn=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},gn(n)}function tl(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),o&&vn(n,o)}function vn(n,o){return vn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},vn(n,o)}function ht(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function at(n,o,r){return o in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,n}var to=150;function no(n){return function(r,e){var t=r.x,i=r.w,a=r.y,l=r.h,s=Math.min(i/2,n),d=e.x>=t&&e.x<=t+i,c=d&&e.y>=a&&e.y<=a+l;if(c){if(e.x<t+s)return(e.x-t-s)/s;if(e.x>t+i-s)return-(t+i-e.x-s)/s}return 0}}function ro(n){return function(r,e){var t=r.y,i=r.h,a=r.x,l=r.w,s=Math.min(i/2,n),d=e.y>=t&&e.y<=t+i,c=d&&e.x>=a&&e.x<=a+l;if(c){if(e.y<t+s)return(e.y-t-s)/s;if(e.y>t+i-s)return-(t+i-e.y-s)/s}return 0}}var oo=no(to);Pe.defaultHorizontalStrength=oo;var io=ro(to);Pe.defaultVerticalStrength=io;function ao(n){var o=function(r){tl(e,r);function e(t,i){var a;return Ya(this,e),a=el(this,gn(e).call(this,t,i)),at(ht(ht(a)),"updateScrolling",(0,Ba.default)(function(l){var s=a.container.getBoundingClientRect(),d=s.left,c=s.top,u=s.width,h=s.height,p={x:d,y:c,w:u,h},f=(0,Nt.getCoords)(l),m=a.props,S=m.horizontalStrength,C=m.verticalStrength;a.scaleX=S(p,f),a.scaleY=C(p,f),!a.frame&&(a.scaleX||a.scaleY)&&a.startScrolling()},100,{trailing:!1})),at(ht(ht(a)),"handleEvent",function(l){a.dragging&&!a.attached&&(a.attach(),a.updateScrolling(l))}),a.wrappedInstance=vt.default.createRef(),a.scaleX=0,a.scaleY=0,a.frame=null,a.attached=!1,a.dragging=!1,a}return Za(e,[{key:"componentDidMount",value:function(){var i=this;this.container=(0,$a.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var a=this.props.dragDropManager;this.clearMonitorSubscription=a.getMonitor().subscribeToStateChange(function(){return i.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var i=this.props.dragDropManager,a=i.getMonitor().isDragging();!this.dragging&&a?this.dragging=!0:this.dragging&&!a&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var i=this,a=0,l=function s(){var d=i.scaleX,c=i.scaleY,u=i.container,h=i.props,p=h.strengthMultiplier,f=h.onScrollChange;if(p===0||d+c===0){i.stopScrolling();return}if(a+=1,a%2){var m=u.scrollLeft,S=u.scrollTop,C=u.scrollWidth,g=u.scrollHeight,z=u.clientWidth,_=u.clientHeight,v=d?u.scrollLeft=(0,Nt.intBetween)(0,C-z,m+d*p):m,x=c?u.scrollTop=(0,Nt.intBetween)(0,g-_,S+c*p):S;f(v,x)}i.frame=(0,Zn.default)(s)};l()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(Zn.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var i=this.props;i.strengthMultiplier,i.verticalStrength,i.horizontalStrength,i.onScrollChange;var a=Qa(i,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return vt.default.createElement(n,Ht({ref:this.wrappedInstance},a))}}]),e}(vt.Component);return at(o,"displayName","Scrolling(".concat((0,Ua.default)(n),")")),at(o,"propTypes",{dragDropManager:it.default.object.isRequired,onScrollChange:it.default.func,verticalStrength:it.default.func,horizontalStrength:it.default.func,strengthMultiplier:it.default.number}),at(o,"defaultProps",{onScrollChange:Nt.noop,verticalStrength:io,horizontalStrength:oo,strengthMultiplier:30}),(0,Ka.default)(o,n)}function nl(n){var o=ao(n);return function(r){return vt.default.createElement(Va.DragDropContextConsumer,null,function(e){var t=e.dragDropManager;return t===void 0?null:vt.default.createElement(o,Ht({},r,{dragDropManager:t}))})}}function lo(){var n=this.constructor.getDerivedStateFromProps(this.props,this.state);n!=null&&this.setState(n)}function so(n){function o(r){var e=this.constructor.getDerivedStateFromProps(n,r);return e??null}this.setState(o.bind(this))}function co(n,o){try{var r=this.props,e=this.state;this.props=n,this.state=o,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,e)}finally{this.props=r,this.state=e}}lo.__suppressDeprecationWarning=!0;so.__suppressDeprecationWarning=!0;co.__suppressDeprecationWarning=!0;function bt(n){var o=n.prototype;if(!o||!o.isReactComponent)throw new Error("Can only polyfill class components");if(typeof n.getDerivedStateFromProps!="function"&&typeof o.getSnapshotBeforeUpdate!="function")return n;var r=null,e=null,t=null;if(typeof o.componentWillMount=="function"?r="componentWillMount":typeof o.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof o.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof o.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof o.componentWillUpdate=="function"?t="componentWillUpdate":typeof o.UNSAFE_componentWillUpdate=="function"&&(t="UNSAFE_componentWillUpdate"),r!==null||e!==null||t!==null){var i=n.displayName||n.name,a=typeof n.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
1
+ import{_ as Ur,r as P,cv as ze,eS as nt,cr as Vr,gq as ri,dJ as Ct,fu as D,aL as ie,ez as oi,b8 as Bt,P as b,eF as V,cu as ii,j as T,bF as se,ge as ai,u as et,cz as Ue,B as fe,T as ge,b0 as li,dN as si,b7 as Kr,bb as qr,b5 as ci,b6 as di,ba as ui,gr as hi,gs as fi,gt as pi,gu as gi,eX as vi,gv as mi,eW as Si,cs as hn,eQ as yi,fi as _i,bg as Qr,aU as gt,Q as Ut,aD as Ge,bj as Ci,b as fn,aZ as Vt,ab as Gt,c2 as Oe,gw as Gn,c as Xr,bH as wi,gx as Wn,bW as xi,t as ct,dv as dt,av as bi,a3 as Ri,gy as Ti,bX as Ii,dr as Yr,G as At,gz as zi,gA as Di,fa as Pi,a0 as Oi,a1 as ki,aj as Zt,bD as Ni,fk as Mi,bE as Re}from"./index-Cggmiiia.js";import{r as Li,b as Ei,i as Hn,c as Ai,d as $n,D as ji,H as Fi}from"./index-Dnz1P7hS.js";import{_ as te,a as Ve,b as ve,c as me,d as Se,r as Gi}from"./slicedToArray-ZTJkdcdS.js";import{_ as re,i as Wi,f as Hi,j as $i,a as Bi,c as Ui,d as Vi,b as Ki,e as qi,g as Qi,h as Xi}from"./jss-plugin-props-sort.esm-DF2UeHPM.js";import{_ as w,G as Bn}from"./redux-CmQ0AupQ.js";import{_ as Yi}from"./toPropertyKey-PLuKRk1e.js";import{_ as Ji,u as Jr,b as Zi}from"./dashboard-CigfHyBK.js";import{u as ea,C as rt,A as ta}from"./index.esm-eUQd5uNf.js";import{p as na}from"./index-3TcO2NHG.js";import{u as ra}from"./index-BZeVpmIU.js";import{F as _n}from"./FormControl-CJxOqtCV.js";import{I as Zr}from"./InputLabel-Ds1qPSij.js";import{S as pn,O as oa}from"./Select-CHwe79IG.js";import{a as ia}from"./ListItemText-CJO6iQaY.js";import{F as aa,T as en}from"./TextField-By686O81.js";import{b as la,c as Un}from"./index-BJflKzAj.js";import{I as Vn}from"./InputAdornment-B1JGDyvY.js";import{H as sa,F as ca}from"./index-3IKYL1th.js";import{D as da}from"./index-BIwlKqnv.js";import{S as tn}from"./Skeleton-LO2AMjQj.js";import{f as Kn}from"./format-error-xm5q5N3Z.js";import{B as nn}from"./ButtonGroup-oqbT9mJ7.js";import{T as qn}from"./Toolbar-CILlK-1t.js";import{L as Qn}from"./LoadingButton-MZJ0ZCPE.js";import"./useLocalStorage-C1CX-JWm.js";import"./MoreVert-BqoNOXb1.js";import"./confirm-Dx6jUaOz.js";import"./Alert-DdUTjamT.js";import"./useSlot-DJoDEpM7.js";import"./Delete-eYuUFe-a.js";import"./PlayArrow-DpuhKo6D.js";import"./RadioGroup-D4XxZA_m.js";import"./FormControlLabel-BKsoLGHz.js";import"./useFormControl-xR1NlgHj.js";import"./FormGroup-Chc5NbDQ.js";import"./Avatar-Ba5K-SpV.js";import"./session-B20aBevE.js";import"./permission-CoUl_-TD.js";import"./useAsync-BrIwhlfT.js";import"./index-7ATAUQCS.js";import"./Link-JTCdKmrw.js";import"./useSetState-Buep2Jkr.js";import"./fallback-DVHgA8PG.js";import"./index-tZwe6kGH.js";import"./Hidden-v7r91ILG.js";import"./ExpandMore-CAfMRIG3.js";import"./selector-DplhIXMq.js";import"./useThemeProps-DthQbzYX.js";function ua(n,o){var r=Ur(P.useState(n),2),e=r[0],t=r[1],i=P.useMemo(function(){var a=!n,l=function(){return t(function(u){return u===n?a:n})},s=function(u){return t(u)},d=function(){return t(n)},c=function(){return t(a)};return{toggle:l,set:s,setLeft:d,setRight:c}},[]);return[e,i]}function ha(n){var o=Ur(ua(!!n),2),r=o[0],e=o[1],t=e.toggle,i=e.set,a=P.useMemo(function(){var l=function(){return i(!0)},s=function(){return i(!1)};return{toggle:t,set:function(d){return i(!!d)},setTrue:l,setFalse:s}},[]);return[r,a]}var Pe={},eo="Expected a function",Xn=NaN,fa="[object Symbol]",pa=/^\s+|\s+$/g,ga=/^[-+]0x[0-9a-f]+$/i,va=/^0b[01]+$/i,ma=/^0o[0-7]+$/i,Sa=parseInt,ya=typeof ze=="object"&&ze&&ze.Object===Object&&ze,_a=typeof self=="object"&&self&&self.Object===Object&&self,Ca=ya||_a||Function("return this")(),wa=Object.prototype,xa=wa.toString,ba=Math.max,Ra=Math.min,rn=function(){return Ca.Date.now()};function Ta(n,o,r){var e,t,i,a,l,s,d=0,c=!1,u=!1,h=!0;if(typeof n!="function")throw new TypeError(eo);o=Yn(o)||0,Wt(r)&&(c=!!r.leading,u="maxWait"in r,i=u?ba(Yn(r.maxWait)||0,o):i,h="trailing"in r?!!r.trailing:h);function p(x){var R=e,y=t;return e=t=void 0,d=x,a=n.apply(y,R),a}function f(x){return d=x,l=setTimeout(C,o),c?p(x):a}function m(x){var R=x-s,y=x-d,O=o-R;return u?Ra(O,i-y):O}function S(x){var R=x-s,y=x-d;return s===void 0||R>=o||R<0||u&&y>=i}function C(){var x=rn();if(S(x))return g(x);l=setTimeout(C,m(x))}function g(x){return l=void 0,h&&e?p(x):(e=t=void 0,a)}function z(){l!==void 0&&clearTimeout(l),d=0,e=s=t=l=void 0}function _(){return l===void 0?a:g(rn())}function v(){var x=rn(),R=S(x);if(e=arguments,t=this,s=x,R){if(l===void 0)return f(s);if(u)return l=setTimeout(C,o),p(s)}return l===void 0&&(l=setTimeout(C,o)),a}return v.cancel=z,v.flush=_,v}function Ia(n,o,r){var e=!0,t=!0;if(typeof n!="function")throw new TypeError(eo);return Wt(r)&&(e="leading"in r?!!r.leading:e,t="trailing"in r?!!r.trailing:t),Ta(n,o,{leading:e,maxWait:o,trailing:t})}function Wt(n){var o=typeof n;return!!n&&(o=="object"||o=="function")}function za(n){return!!n&&typeof n=="object"}function Da(n){return typeof n=="symbol"||za(n)&&xa.call(n)==fa}function Yn(n){if(typeof n=="number")return n;if(Da(n))return Xn;if(Wt(n)){var o=typeof n.valueOf=="function"?n.valueOf():n;n=Wt(o)?o+"":o}if(typeof n!="string")return n===0?n:+n;n=n.replace(pa,"");var r=va.test(n);return r||ma.test(n)?Sa(n.slice(2),r?2:8):ga.test(n)?Xn:+n}var Pa=Ia,Kt={exports:{}},ut={exports:{}};(function(){var n,o,r,e,t,i;typeof performance<"u"&&performance!==null&&performance.now?ut.exports=function(){return performance.now()}:typeof nt<"u"&&nt!==null&&nt.hrtime?(ut.exports=function(){return(n()-t)/1e6},o=nt.hrtime,n=function(){var a;return a=o(),a[0]*1e9+a[1]},e=n(),i=nt.uptime()*1e9,t=e-i):Date.now?(ut.exports=function(){return Date.now()-r},r=Date.now()):(ut.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(ze);var Oa=ut.exports,ka=Oa,De=typeof window>"u"?ze:window,kt=["moz","webkit"],Qe="AnimationFrame",Ye=De["request"+Qe],St=De["cancel"+Qe]||De["cancelRequest"+Qe];for(var ot=0;!Ye&&ot<kt.length;ot++)Ye=De[kt[ot]+"Request"+Qe],St=De[kt[ot]+"Cancel"+Qe]||De[kt[ot]+"CancelRequest"+Qe];if(!Ye||!St){var on=0,Jn=0,Ae=[],Na=1e3/60;Ye=function(n){if(Ae.length===0){var o=ka(),r=Math.max(0,Na-(o-on));on=r+o,setTimeout(function(){var e=Ae.slice(0);Ae.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(on)}catch(i){setTimeout(function(){throw i},0)}},Math.round(r))}return Ae.push({handle:++Jn,callback:n,cancelled:!1}),Jn},St=function(n){for(var o=0;o<Ae.length;o++)Ae[o].handle===n&&(Ae[o].cancelled=!0)}}Kt.exports=function(n){return Ye.call(De,n)};Kt.exports.cancel=function(){St.apply(De,arguments)};Kt.exports.polyfill=function(n){n||(n=De),n.requestAnimationFrame=Ye,n.cancelAnimationFrame=St};var Ma=Kt.exports,Cn={};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.default=La;function La(n){return n.displayName||n.name||(typeof n=="string"&&n.length>0?n:"Unknown")}var wt={};Object.defineProperty(wt,"__esModule",{value:!0});wt.noop=Ea;wt.intBetween=Aa;wt.getCoords=ja;function Ea(){}function Aa(n,o,r){return Math.floor(Math.min(o,Math.max(n,r)))}function ja(n){return n.type==="touchmove"?{x:n.changedTouches[0].clientX,y:n.changedTouches[0].clientY}:{x:n.clientX,y:n.clientY}}Object.defineProperty(Pe,"__esModule",{value:!0});var Fa=Pe.createHorizontalStrength=no,Ga=Pe.createVerticalStrength=ro,Wa=Pe.createScrollingComponent=ao,Ha=Pe.default=nl;Pe.defaultVerticalStrength=Pe.defaultHorizontalStrength=void 0;var vt=qa(P),it=xt(Vr),$a=Ct,Ba=xt(Pa),Zn=xt(Ma),Ua=xt(Cn),Va=Li,Ka=xt(ri),Nt=wt;function xt(n){return n&&n.__esModule?n:{default:n}}function qa(n){if(n&&n.__esModule)return n;var o={};if(n!=null){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var e=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(n,r):{};e.get||e.set?Object.defineProperty(o,r,e):o[r]=n[r]}}return o.default=n,o}function jt(n){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jt=function(r){return typeof r}:jt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},jt(n)}function Ht(){return Ht=Object.assign||function(n){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(n[e]=r[e])}return n},Ht.apply(this,arguments)}function Qa(n,o){if(n==null)return{};var r=Xa(n,o),e,t;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(t=0;t<i.length;t++)e=i[t],!(o.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(n,e)&&(r[e]=n[e])}return r}function Xa(n,o){if(n==null)return{};var r={},e=Object.keys(n),t,i;for(i=0;i<e.length;i++)t=e[i],!(o.indexOf(t)>=0)&&(r[t]=n[t]);return r}function Ya(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}function Ja(n,o){for(var r=0;r<o.length;r++){var e=o[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(n,e.key,e)}}function Za(n,o,r){return o&&Ja(n.prototype,o),n}function el(n,o){return o&&(jt(o)==="object"||typeof o=="function")?o:ht(n)}function gn(n){return gn=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},gn(n)}function tl(n,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),o&&vn(n,o)}function vn(n,o){return vn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},vn(n,o)}function ht(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function at(n,o,r){return o in n?Object.defineProperty(n,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[o]=r,n}var to=150;function no(n){return function(r,e){var t=r.x,i=r.w,a=r.y,l=r.h,s=Math.min(i/2,n),d=e.x>=t&&e.x<=t+i,c=d&&e.y>=a&&e.y<=a+l;if(c){if(e.x<t+s)return(e.x-t-s)/s;if(e.x>t+i-s)return-(t+i-e.x-s)/s}return 0}}function ro(n){return function(r,e){var t=r.y,i=r.h,a=r.x,l=r.w,s=Math.min(i/2,n),d=e.y>=t&&e.y<=t+i,c=d&&e.x>=a&&e.x<=a+l;if(c){if(e.y<t+s)return(e.y-t-s)/s;if(e.y>t+i-s)return-(t+i-e.y-s)/s}return 0}}var oo=no(to);Pe.defaultHorizontalStrength=oo;var io=ro(to);Pe.defaultVerticalStrength=io;function ao(n){var o=function(r){tl(e,r);function e(t,i){var a;return Ya(this,e),a=el(this,gn(e).call(this,t,i)),at(ht(ht(a)),"updateScrolling",(0,Ba.default)(function(l){var s=a.container.getBoundingClientRect(),d=s.left,c=s.top,u=s.width,h=s.height,p={x:d,y:c,w:u,h},f=(0,Nt.getCoords)(l),m=a.props,S=m.horizontalStrength,C=m.verticalStrength;a.scaleX=S(p,f),a.scaleY=C(p,f),!a.frame&&(a.scaleX||a.scaleY)&&a.startScrolling()},100,{trailing:!1})),at(ht(ht(a)),"handleEvent",function(l){a.dragging&&!a.attached&&(a.attach(),a.updateScrolling(l))}),a.wrappedInstance=vt.default.createRef(),a.scaleX=0,a.scaleY=0,a.frame=null,a.attached=!1,a.dragging=!1,a}return Za(e,[{key:"componentDidMount",value:function(){var i=this;this.container=(0,$a.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var a=this.props.dragDropManager;this.clearMonitorSubscription=a.getMonitor().subscribeToStateChange(function(){return i.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var i=this.props.dragDropManager,a=i.getMonitor().isDragging();!this.dragging&&a?this.dragging=!0:this.dragging&&!a&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var i=this,a=0,l=function s(){var d=i.scaleX,c=i.scaleY,u=i.container,h=i.props,p=h.strengthMultiplier,f=h.onScrollChange;if(p===0||d+c===0){i.stopScrolling();return}if(a+=1,a%2){var m=u.scrollLeft,S=u.scrollTop,C=u.scrollWidth,g=u.scrollHeight,z=u.clientWidth,_=u.clientHeight,v=d?u.scrollLeft=(0,Nt.intBetween)(0,C-z,m+d*p):m,x=c?u.scrollTop=(0,Nt.intBetween)(0,g-_,S+c*p):S;f(v,x)}i.frame=(0,Zn.default)(s)};l()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(Zn.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var i=this.props;i.strengthMultiplier,i.verticalStrength,i.horizontalStrength,i.onScrollChange;var a=Qa(i,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return vt.default.createElement(n,Ht({ref:this.wrappedInstance},a))}}]),e}(vt.Component);return at(o,"displayName","Scrolling(".concat((0,Ua.default)(n),")")),at(o,"propTypes",{dragDropManager:it.default.object.isRequired,onScrollChange:it.default.func,verticalStrength:it.default.func,horizontalStrength:it.default.func,strengthMultiplier:it.default.number}),at(o,"defaultProps",{onScrollChange:Nt.noop,verticalStrength:io,horizontalStrength:oo,strengthMultiplier:30}),(0,Ka.default)(o,n)}function nl(n){var o=ao(n);return function(r){return vt.default.createElement(Va.DragDropContextConsumer,null,function(e){var t=e.dragDropManager;return t===void 0?null:vt.default.createElement(o,Ht({},r,{dragDropManager:t}))})}}function lo(){var n=this.constructor.getDerivedStateFromProps(this.props,this.state);n!=null&&this.setState(n)}function so(n){function o(r){var e=this.constructor.getDerivedStateFromProps(n,r);return e??null}this.setState(o.bind(this))}function co(n,o){try{var r=this.props,e=this.state;this.props=n,this.state=o,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,e)}finally{this.props=r,this.state=e}}lo.__suppressDeprecationWarning=!0;so.__suppressDeprecationWarning=!0;co.__suppressDeprecationWarning=!0;function bt(n){var o=n.prototype;if(!o||!o.isReactComponent)throw new Error("Can only polyfill class components");if(typeof n.getDerivedStateFromProps!="function"&&typeof o.getSnapshotBeforeUpdate!="function")return n;var r=null,e=null,t=null;if(typeof o.componentWillMount=="function"?r="componentWillMount":typeof o.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof o.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof o.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof o.componentWillUpdate=="function"?t="componentWillUpdate":typeof o.UNSAFE_componentWillUpdate=="function"&&(t="UNSAFE_componentWillUpdate"),r!==null||e!==null||t!==null){var i=n.displayName||n.name,a=typeof n.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
2
2
 
3
3
  `+i+" uses "+a+" but also contains the following legacy lifecycles:"+(r!==null?`
4
4
  `+r:"")+(e!==null?`
@@ -1,4 +1,4 @@
1
- import{cR as L,a1 as C,r,u as z,ak as F,j as n,cS as N,cT as O,cU as Q,a3 as y,n as U,P as o,a0 as V,cV as G}from"./index-CaLGv6xG.js";import{D as H,f as I}from"./format-error-DQS9AwZv.js";import{A as J}from"./Alert-BriK3hjA.js";function K(){var e;const s=L();return(e=s==null?void 0:s.$$material)!=null?e:s}function X(){const e=K();return{minWidth:C(e.breakpoints.down("md"))?300:e.breakpoints.values.sm}}function x({title:e,description:s,showCancel:c,showConfirm:b,cancel:k,confirm:w,color:j,params:D,onCancel:S,onConfirm:T,loading:l,displayError:v,children:P,...$}){const[t,E]=r.useState(D),[R,d]=r.useState(!0),[m,u]=r.useState(!1),[p,f]=r.useState(""),{t:B}=z(),W=F(),h=async a=>{if(typeof a=="function"){u(!0);try{if(await a(t)===!1)return;d(!1)}catch(i){f(I(i)),console.error(i)}finally{u(!1)}}else d(!1)},q=typeof e=="function"?e():e,A=typeof s=="function"?s(t,E,f):s,M=C(W.breakpoints.down("md")),_=a=>{a.stopPropagation()},{minWidth:g}=X();return n.jsxs(Y,{onClick:_,fullScreen:M,open:R,style:{minWidth:g},...$,children:[n.jsx(N,{children:q}),n.jsxs(O,{style:{minWidth:g},children:[n.jsx(H,{component:"div",children:A}),!!p&&v&&n.jsx(J,{severity:"error",style:{width:"100%",marginTop:8},children:p}),P]}),n.jsxs(Q,{className:"delete-actions",style:{padding:"8px 24px 24px"},children:[c&&n.jsx(y,{onClick:a=>{a.stopPropagation(),h(S)},color:"inherit","data-cy":"cancel-confirm-dialog",children:k||B("common.cancel")}),b&&n.jsxs(y,{onClick:a=>{a.stopPropagation(),h(T)},color:j,disabled:t.__disableConfirm||m||l,variant:"contained","data-cy":"submit-confirm-dialog",autoFocus:!0,children:[(m||l)&&n.jsx(U,{size:16,sx:{mr:1}}),w]})]})]})}x.propTypes={title:o.any.isRequired,description:o.any.isRequired,showCancel:o.bool,showConfirm:o.bool,cancel:o.string,color:o.string,confirm:o.string,params:o.object,onCancel:o.func,onConfirm:o.func.isRequired,loading:o.bool,displayError:o.bool,children:o.any};x.defaultProps={children:void 0,onCancel:()=>{},showCancel:!0,showConfirm:!0,cancel:"",confirm:"Confirm",color:"error",params:{},loading:!1,displayError:!0};const Y=V(G)`
1
+ import{cR as L,a1 as C,r,u as z,ak as F,j as n,cS as N,cT as O,cU as Q,a3 as y,n as U,P as o,a0 as V,cV as G}from"./index-Cggmiiia.js";import{D as H,f as I}from"./format-error-xm5q5N3Z.js";import{A as J}from"./Alert-DdUTjamT.js";function K(){var e;const s=L();return(e=s==null?void 0:s.$$material)!=null?e:s}function X(){const e=K();return{minWidth:C(e.breakpoints.down("md"))?300:e.breakpoints.values.sm}}function x({title:e,description:s,showCancel:c,showConfirm:b,cancel:k,confirm:w,color:j,params:D,onCancel:S,onConfirm:T,loading:l,displayError:v,children:P,...$}){const[t,E]=r.useState(D),[R,d]=r.useState(!0),[m,u]=r.useState(!1),[p,f]=r.useState(""),{t:B}=z(),W=F(),h=async a=>{if(typeof a=="function"){u(!0);try{if(await a(t)===!1)return;d(!1)}catch(i){f(I(i)),console.error(i)}finally{u(!1)}}else d(!1)},q=typeof e=="function"?e():e,A=typeof s=="function"?s(t,E,f):s,M=C(W.breakpoints.down("md")),_=a=>{a.stopPropagation()},{minWidth:g}=X();return n.jsxs(Y,{onClick:_,fullScreen:M,open:R,style:{minWidth:g},...$,children:[n.jsx(N,{children:q}),n.jsxs(O,{style:{minWidth:g},children:[n.jsx(H,{component:"div",children:A}),!!p&&v&&n.jsx(J,{severity:"error",style:{width:"100%",marginTop:8},children:p}),P]}),n.jsxs(Q,{className:"delete-actions",style:{padding:"8px 24px 24px"},children:[c&&n.jsx(y,{onClick:a=>{a.stopPropagation(),h(S)},color:"inherit","data-cy":"cancel-confirm-dialog",children:k||B("common.cancel")}),b&&n.jsxs(y,{onClick:a=>{a.stopPropagation(),h(T)},color:j,disabled:t.__disableConfirm||m||l,variant:"contained","data-cy":"submit-confirm-dialog",autoFocus:!0,children:[(m||l)&&n.jsx(U,{size:16,sx:{mr:1}}),w]})]})]})}x.propTypes={title:o.any.isRequired,description:o.any.isRequired,showCancel:o.bool,showConfirm:o.bool,cancel:o.string,color:o.string,confirm:o.string,params:o.object,onCancel:o.func,onConfirm:o.func.isRequired,loading:o.bool,displayError:o.bool,children:o.any};x.defaultProps={children:void 0,onCancel:()=>{},showCancel:!0,showConfirm:!0,cancel:"",confirm:"Confirm",color:"error",params:{},loading:!1,displayError:!0};const Y=V(G)`
2
2
  .delete-actions .Mui-disabled {
3
3
  color: rgba(0, 0, 0, 0.26) !important;
4
4
  box-shadow: none;
@@ -1 +1 @@
1
- import{r as w,d as N,u as W,e as $,F as z,h as B,i as H,k as O,j as t,B as P,a as K,L as G,G as J,l as V,m as X,C as q,H as T,n as Q,R as Y,t as Z}from"./index-CaLGv6xG.js";import{i as y}from"./index-VIHj0M7P.js";import{u as ee}from"./use-passport-id-B-b-_oYF.js";import{F as ne}from"./fullpage-DXFbt1Ve.js";import"./Link-BzeSWqDp.js";const C="authorization_response";async function se(d){const l=new URL("__blocklet__.js",d);return l.searchParams.set("type","json"),await(await fetch(l.href)).json()}function de(){var R;const d=w.useRef(null),{getPassportId:l}=ee(),{session:x,connectApi:_}=N(),{t:a,locale:v}=W(),U=$(),[h]=z(),{encrypt:L}=B(),[k,S]=w.useState(null);let c={};try{c=JSON.parse(decodeURIComponent(atob(h.get("params"))))}catch{console.warn("parse connect params failed")}const{action:f="login",extraParams:I={},messages:E,...u}=c,i=h.get("redirect"),m=h.get("_ek_");I.passportId=l(),f==="login"&&H(u.forceConnected)&&(u.forceConnected=!1);const g=s=>m?L(JSON.stringify(s),m):s,j=w.useMemo(()=>i||!window.opener?"redirect":"popup",[i]),D=({encrypted:s=!0,...e},o,n)=>{s&&(e.sessionToken&&(e.sessionToken=o(e.sessionToken)),e.refreshToken&&(e.refreshToken=o(e.refreshToken)),e.visitorId&&(e.visitorId=o(e.visitorId))),e.visitorId&&localStorage.setItem("__visitor_id",e.visitorId);const A={type:C,response:e,options:n};({redirect:()=>{setTimeout(()=>{if(i){const p=decodeURIComponent(i);let r;y(p)?r=new URL(p):r=new URL(p,window.location.origin),m&&r.searchParams.set("encrypted",!0),e.sessionToken&&r.searchParams.set("sessionToken",g(e.sessionToken)),e.refreshToken&&r.searchParams.set("refreshToken",g(e.refreshToken)),e.visitorId&&r.searchParams.set("visitorId",g(e.visitorId)),n!=null&&n.connected_did&&r.searchParams.set("connected_did",n.connected_did),n!=null&&n.connected_pk&&r.searchParams.set("connected_pk",n.connected_pk),n!=null&&n.connected_app&&r.searchParams.set("connected_app",n.connected_app),n!=null&&n.connected_wallet_os&&r.searchParams.set("connected_wallet_os",n.connected_wallet_os),y(p)?window.location.replace(r.href):U(`${r.pathname}${r.search}`,{replace:!0})}else window.location.replace(window.env.pathPrefix||"/")},50)},popup:()=>{window.opener.postMessage(A,"*"),setTimeout(()=>{window.open("about:blank","_self"),window.close()},2e3)}})[j]()},F=s=>{const e={type:C,error:s.message,errorDescription:s.message};({redirect:()=>{Z.error(s.message)},popup:()=>{window.opener.postMessage(e,"*")}})[j]()},M=O(()=>{if(f!=="login")return null;const s=window.blocklet.trustedFactories||[];return t.jsx(P,{textAlign:"center",fontSize:14,children:s.length>0&&t.jsx(K,{title:a("exchangePassport.tooltip",{collections:s.map(e=>e.factoryAddress)}),placement:"top-end",enterTouchDelay:0,children:t.jsx(G,{to:`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport?redirect=${encodeURIComponent(i||"/")}`,style:{color:"#4598FA"},children:a("exchangePassport.title")},"exchange-passport")})})},[f]),b=V(async()=>{if(!i)return!0;let s;try{s=new URL(i)}catch{return!1}let e;try{e=new URL(c==null?void 0:c.baseUrl)}catch{try{e=new URL(c==null?void 0:c.prefix)}catch{console.warn("baseUrl and prefix are both invalid")}}if(e&&e.origin!==window.location.origin){const o=await se(e.origin),n=(o==null?void 0:o.domainAliases)||[];if(n.length>0&&!n.includes(s.host))return S(a("login.invalidRedirectUrl")),!1}return!0});return X(async()=>{await b()&&d.current&&setTimeout(()=>{_.open({locale:v,action:f,extraParams:I,...u,containerEl:d.current,className:"connect",popup:!1,messages:E||{title:a("login.connect.title"),scan:a("login.connect.scan"),confirm:a("login.connect.confirm"),success:a("login.connect.success")},extraContent:M,useSocket:!0,onSuccess:D,onError:F})})}),x.loading?t.jsxs(q,{children:[t.jsx(T,{children:t.jsx("title",{children:"DID Connect"})}),t.jsx(Q,{})]}):t.jsxs(t.Fragment,{children:[t.jsx(T,{children:t.jsx("title",{children:"DID Connect"})}),t.jsx(ne,{did:(R=window.blocklet)==null?void 0:R.appPid,children:k?t.jsx(Y,{status:403,description:k}):t.jsx(P,{sx:{width:"560px",maxWidth:"100%",height:"100%"},ref:d})})]})}export{de as default};
1
+ import{r as w,d as N,u as W,e as $,F as z,h as B,i as H,k as O,j as t,B as P,a as K,L as G,G as J,l as V,m as X,C as q,H as T,n as Q,R as Y,t as Z}from"./index-Cggmiiia.js";import{i as y}from"./index-ChjVC0V6.js";import{u as ee}from"./use-passport-id-B-b-_oYF.js";import{F as ne}from"./fullpage-9fehs0lR.js";import"./Link-JTCdKmrw.js";const C="authorization_response";async function se(d){const l=new URL("__blocklet__.js",d);return l.searchParams.set("type","json"),await(await fetch(l.href)).json()}function de(){var R;const d=w.useRef(null),{getPassportId:l}=ee(),{session:x,connectApi:_}=N(),{t:a,locale:v}=W(),U=$(),[h]=z(),{encrypt:L}=B(),[k,S]=w.useState(null);let c={};try{c=JSON.parse(decodeURIComponent(atob(h.get("params"))))}catch{console.warn("parse connect params failed")}const{action:f="login",extraParams:I={},messages:E,...u}=c,i=h.get("redirect"),m=h.get("_ek_");I.passportId=l(),f==="login"&&H(u.forceConnected)&&(u.forceConnected=!1);const g=s=>m?L(JSON.stringify(s),m):s,j=w.useMemo(()=>i||!window.opener?"redirect":"popup",[i]),D=({encrypted:s=!0,...e},o,n)=>{s&&(e.sessionToken&&(e.sessionToken=o(e.sessionToken)),e.refreshToken&&(e.refreshToken=o(e.refreshToken)),e.visitorId&&(e.visitorId=o(e.visitorId))),e.visitorId&&localStorage.setItem("__visitor_id",e.visitorId);const A={type:C,response:e,options:n};({redirect:()=>{setTimeout(()=>{if(i){const p=decodeURIComponent(i);let r;y(p)?r=new URL(p):r=new URL(p,window.location.origin),m&&r.searchParams.set("encrypted",!0),e.sessionToken&&r.searchParams.set("sessionToken",g(e.sessionToken)),e.refreshToken&&r.searchParams.set("refreshToken",g(e.refreshToken)),e.visitorId&&r.searchParams.set("visitorId",g(e.visitorId)),n!=null&&n.connected_did&&r.searchParams.set("connected_did",n.connected_did),n!=null&&n.connected_pk&&r.searchParams.set("connected_pk",n.connected_pk),n!=null&&n.connected_app&&r.searchParams.set("connected_app",n.connected_app),n!=null&&n.connected_wallet_os&&r.searchParams.set("connected_wallet_os",n.connected_wallet_os),y(p)?window.location.replace(r.href):U(`${r.pathname}${r.search}`,{replace:!0})}else window.location.replace(window.env.pathPrefix||"/")},50)},popup:()=>{window.opener.postMessage(A,"*"),setTimeout(()=>{window.open("about:blank","_self"),window.close()},2e3)}})[j]()},F=s=>{const e={type:C,error:s.message,errorDescription:s.message};({redirect:()=>{Z.error(s.message)},popup:()=>{window.opener.postMessage(e,"*")}})[j]()},M=O(()=>{if(f!=="login")return null;const s=window.blocklet.trustedFactories||[];return t.jsx(P,{textAlign:"center",fontSize:14,children:s.length>0&&t.jsx(K,{title:a("exchangePassport.tooltip",{collections:s.map(e=>e.factoryAddress)}),placement:"top-end",enterTouchDelay:0,children:t.jsx(G,{to:`${J.WELLKNOWN_SERVICE_PATH_PREFIX}/exchange-passport?redirect=${encodeURIComponent(i||"/")}`,style:{color:"#4598FA"},children:a("exchangePassport.title")},"exchange-passport")})})},[f]),b=V(async()=>{if(!i)return!0;let s;try{s=new URL(i)}catch{return!1}let e;try{e=new URL(c==null?void 0:c.baseUrl)}catch{try{e=new URL(c==null?void 0:c.prefix)}catch{console.warn("baseUrl and prefix are both invalid")}}if(e&&e.origin!==window.location.origin){const o=await se(e.origin),n=(o==null?void 0:o.domainAliases)||[];if(n.length>0&&!n.includes(s.host))return S(a("login.invalidRedirectUrl")),!1}return!0});return X(async()=>{await b()&&d.current&&setTimeout(()=>{_.open({locale:v,action:f,extraParams:I,...u,containerEl:d.current,className:"connect",popup:!1,messages:E||{title:a("login.connect.title"),scan:a("login.connect.scan"),confirm:a("login.connect.confirm"),success:a("login.connect.success")},extraContent:M,useSocket:!0,onSuccess:D,onError:F})})}),x.loading?t.jsxs(q,{children:[t.jsx(T,{children:t.jsx("title",{children:"DID Connect"})}),t.jsx(Q,{})]}):t.jsxs(t.Fragment,{children:[t.jsx(T,{children:t.jsx("title",{children:"DID Connect"})}),t.jsx(ne,{did:(R=window.blocklet)==null?void 0:R.appPid,children:k?t.jsx(Y,{status:403,description:k}):t.jsx(P,{sx:{width:"560px",maxWidth:"100%",height:"100%"},ref:d})})]})}export{de as default};
@@ -1,4 +1,4 @@
1
- import{u as h,d as y,h as m,c as x,j as n,C as i,n as g,T as w,M as C,v as T,t as j,P as k,a0 as v,K as P}from"./index-CaLGv6xG.js";import{_ as S}from"./useAsync-PE3W-DLW.js";function U({children:u}){const{t:r,locale:p}=h(),{api:c,session:a}=y(),{encryptKey:l,decrypt:d}=m(),t=S(async()=>{var s;const e=new URL(window.location.href);e.pathname=x(((s=window==null?void 0:window.env)==null?void 0:s.apiPrefix)??"/","/api/did/setup/token"),e.searchParams.set("_ek_",l);const{data:o}=await c.get(e.href);return o}),f=async e=>{const o=Array.isArray(e)?e.find(s=>s.sessionToken):e;T(d(o.sessionToken));try{await a.refresh()}catch(s){j.error(s.message)}};return!t.value||t.loading||a.loading?n.jsx(i,{relative:"parent",children:n.jsx(g,{})}):a.user?u:t.error?n.jsx(i,{relative:"parent",children:n.jsx(w,{children:t.error.message})}):n.jsx(R,{popup:!0,open:!0,hideCloseButton:!0,action:"pre-setup",checkFn:c.get,checkTimeout:10*60*1e3,webWalletUrl:C(),onSuccess:f,locale:p,messages:{title:r("setup.connect.title"),scan:r("setup.connect.scan"),confirm:r("setup.connect.confirm"),success:r("setup.connect.success")},extraParams:{setup:!0,nw:t.value.url}})}U.propTypes={children:k.any.isRequired};const R=v(P)`
1
+ import{u as h,d as y,h as m,c as x,j as n,C as i,n as g,T as w,M as C,v as T,t as j,P as k,a0 as v,K as P}from"./index-Cggmiiia.js";import{_ as S}from"./useAsync-BrIwhlfT.js";function U({children:u}){const{t:r,locale:p}=h(),{api:c,session:a}=y(),{encryptKey:l,decrypt:d}=m(),t=S(async()=>{var s;const e=new URL(window.location.href);e.pathname=x(((s=window==null?void 0:window.env)==null?void 0:s.apiPrefix)??"/","/api/did/setup/token"),e.searchParams.set("_ek_",l);const{data:o}=await c.get(e.href);return o}),f=async e=>{const o=Array.isArray(e)?e.find(s=>s.sessionToken):e;T(d(o.sessionToken));try{await a.refresh()}catch(s){j.error(s.message)}};return!t.value||t.loading||a.loading?n.jsx(i,{relative:"parent",children:n.jsx(g,{})}):a.user?u:t.error?n.jsx(i,{relative:"parent",children:n.jsx(w,{children:t.error.message})}):n.jsx(R,{popup:!0,open:!0,hideCloseButton:!0,action:"pre-setup",checkFn:c.get,checkTimeout:10*60*1e3,webWalletUrl:C(),onSuccess:f,locale:p,messages:{title:r("setup.connect.title"),scan:r("setup.connect.scan"),confirm:r("setup.connect.confirm"),success:r("setup.connect.success")},extraParams:{setup:!0,nw:t.value.url}})}U.propTypes={children:k.any.isRequired};const R=v(P)`
2
2
  .action-info-desc {
3
3
  padding: 0 72px;
4
4
  }