@abtnode/blocklet-services 1.16.29-beta-7e212076 → 1.16.29-beta-924d4db7

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 (206) hide show
  1. package/dist/assets/{Add-D2VdAxTV.js → Add-DJrE574Y.js} +1 -1
  2. package/dist/assets/{AddBox-E5mEN-D6.js → AddBox-CJkiavtW.js} +1 -1
  3. package/dist/assets/{Alert-CDzVFAwP.js → Alert-CziFRfxv.js} +1 -1
  4. package/dist/assets/{ArrowDropDown-BddF_259.js → ArrowDropDown-BvKh0H1M.js} +1 -1
  5. package/dist/assets/{Avatar-DGGB5LOw.js → Avatar-DA2NBebq.js} +1 -1
  6. package/dist/assets/{ButtonGroup-vDnWyGwv.js → ButtonGroup-DztqjsF_.js} +1 -1
  7. package/dist/assets/{CheckCircle-DjgDwF2l.js → CheckCircle-CKjE4NYu.js} +1 -1
  8. package/dist/assets/{ChevronRight-CXapQRHl.js → ChevronRight-Emhd6Ji3.js} +1 -1
  9. package/dist/assets/{Close-Bl0kBAve.js → Close-BUv39PhX.js} +1 -1
  10. package/dist/assets/{CloseOutlined-CJDha2Ce.js → CloseOutlined-mq9RZPnu.js} +1 -1
  11. package/dist/assets/{Delete-BzmPMrXA.js → Delete-ByoO2-QK.js} +1 -1
  12. package/dist/assets/{DeleteOutline-S4eLA6ti.js → DeleteOutline-Bcba6nCA.js} +1 -1
  13. package/dist/assets/{Done-RyIIPvNv.js → Done-8pMK8MaE.js} +1 -1
  14. package/dist/assets/{Download-CM2Jk9TF.js → Download-CXqnt0If.js} +1 -1
  15. package/dist/assets/{Edit-DCjDIbEj.js → Edit-C21vzskq.js} +1 -1
  16. package/dist/assets/{EditIcon-Bo0qHS9N.js → EditIcon-H25yGx8e.js} +1 -1
  17. package/dist/assets/{Error-DQVtNAXY.js → Error-y_uBRRsg.js} +1 -1
  18. package/dist/assets/{ExpandMore-D6W5qQDS.js → ExpandMore-BGm8eNr3.js} +1 -1
  19. package/dist/assets/{FilterList-DcgF3V13.js → FilterList-BiFvAI5s.js} +1 -1
  20. package/dist/assets/{FormControl-CaDEAkLH.js → FormControl-C0eu7m-c.js} +1 -1
  21. package/dist/assets/{FormControlLabel-B5ncBZIc.js → FormControlLabel-CJRQvybe.js} +1 -1
  22. package/dist/assets/{FormGroup-BYR0aKZc.js → FormGroup-g3eIP27k.js} +1 -1
  23. package/dist/assets/{Google-DoUUjUYt.js → Google-Zs04c3Iz.js} +1 -1
  24. package/dist/assets/{Hidden-D7Q1-tKp.js → Hidden-C3OT1k4C.js} +1 -1
  25. package/dist/assets/{InfoOutlined--iq1UyKb.js → InfoOutlined-DSJEd1AP.js} +1 -1
  26. package/dist/assets/{InputAdornment-CIpynRn-.js → InputAdornment-CsccB89Q.js} +1 -1
  27. package/dist/assets/{InputLabel-CWS9z6st.js → InputLabel-BfZVD9gV.js} +1 -1
  28. package/dist/assets/{LastPage-DVBjN0qK.js → LastPage-tpHxk45u.js} +1 -1
  29. package/dist/assets/{Launch-D5yIAhRx.js → Launch-P3Uc9xr1.js} +1 -1
  30. package/dist/assets/{LaunchOutlined-Dfmb--ul.js → LaunchOutlined-C1Nls83Y.js} +1 -1
  31. package/dist/assets/{Link-Cdv7hers.js → Link-CJSgKpcc.js} +1 -1
  32. package/dist/assets/{ListItemText-CnjGxzQz.js → ListItemText-YKFhiKqe.js} +1 -1
  33. package/dist/assets/{LoadingButton-D1NlE7ac.js → LoadingButton-0yYwoHJN.js} +1 -1
  34. package/dist/assets/{LockIcon-DILIlp5K.js → LockIcon-BZUCd9NB.js} +1 -1
  35. package/dist/assets/{Loop-0rLUHvSn.js → Loop-GgpLI0wF.js} +1 -1
  36. package/dist/assets/{MoreHoriz-7CGbv4cq.js → MoreHoriz-X3J0MR9m.js} +1 -1
  37. package/dist/assets/{MoreVert-BgAtRXpu.js → MoreVert-BQShMgz5.js} +1 -1
  38. package/dist/assets/{OpenInNew-CKl-eX6H.js → OpenInNew-CW0Mx4kq.js} +1 -1
  39. package/dist/assets/{Pagination-X9bx9dP0.js → Pagination-YKIZJh1q.js} +1 -1
  40. package/dist/assets/{PlayArrow-BezpfNQb.js → PlayArrow-C_czmRem.js} +1 -1
  41. package/dist/assets/{QuestionMarkCircle-DnR13Dar.js → QuestionMarkCircle-Gudsx8Wq.js} +1 -1
  42. package/dist/assets/{RadioGroup-CnFAkai6.js → RadioGroup-DVGkbUhU.js} +1 -1
  43. package/dist/assets/{Search-jOuIj90i.js → Search-BQvSlrFX.js} +1 -1
  44. package/dist/assets/{Select-BfEjSPo-.js → Select-BMvBs6BG.js} +1 -1
  45. package/dist/assets/{ServerLogo-CKr8ZLjg.js → ServerLogo-NdaU9bpX.js} +1 -1
  46. package/dist/assets/{Skeleton-DC6kjiUn.js → Skeleton-CV4Ax2wY.js} +1 -1
  47. package/dist/assets/{Slider-DPM8r03D.js → Slider-vGpp_GD8.js} +1 -1
  48. package/dist/assets/Stepper-tbe91MoS.js +1 -0
  49. package/dist/assets/{TextField-DUu5kP7_.js → TextField-BX0gscdj.js} +1 -1
  50. package/dist/assets/{Toolbar-DDIrGptL.js → Toolbar-CCyuBYV6.js} +1 -1
  51. package/dist/assets/{ViewList-D6rNJImE.js → ViewList-BJeqOZ-c.js} +1 -1
  52. package/dist/assets/{access-control-Cb5IzyTX.js → access-control-knYONYGe.js} +1 -1
  53. package/dist/assets/{actions-BpTVB1ZW.js → actions-CyBi2m7t.js} +1 -1
  54. package/dist/assets/add-component-core-0jkxxzQV.js +954 -0
  55. package/dist/assets/add-resource-6xtbXCuB.js +1 -0
  56. package/dist/assets/{addon-bXuYgp81.js → addon-Bq2NRtUT.js} +1 -1
  57. package/dist/assets/{analytics-b3yzuCHM.js → analytics-DuHxc0BB.js} +1 -1
  58. package/dist/assets/api-DQObWY3j.js +1 -0
  59. package/dist/assets/ar-JbMny-gg.js +1 -0
  60. package/dist/assets/{audit-logs--gPv7mQ8.js → audit-logs-Db3zCHD-.js} +1 -1
  61. package/dist/assets/{button-CnJGZEgf.js → button-wI8ChbX_.js} +1 -1
  62. package/dist/assets/{click-to-copy-B0FA1Wba.js → click-to-copy-CIg3JHKX.js} +1 -1
  63. package/dist/assets/{complete-Ddli7zjF.js → complete-BEKl2MYD.js} +2 -2
  64. package/dist/assets/{component-DmP8_GC7.js → component-BJfyfm0R.js} +1 -1
  65. package/dist/assets/{config-CYzHb4QA.js → config-BVVnazEZ.js} +1 -1
  66. package/dist/assets/{config-navigation-B-vJc-uF.js → config-navigation-BhnnUV0E.js} +1 -1
  67. package/dist/assets/{config-space-Dd0O-OVH.js → config-space-1F8kX3BG.js} +1 -1
  68. package/dist/assets/{config-4Ivi7aAN.js → config-ucTM29c4.js} +2 -2
  69. package/dist/assets/{confirm-CnKQrfJf.js → confirm-JOta2iLX.js} +1 -1
  70. package/dist/assets/{connect-8ysX-mPH.js → connect-CQ9eITQy.js} +1 -1
  71. package/dist/assets/{connect-KVDVG0WB.js → connect-DwGJKxi2.js} +1 -1
  72. package/dist/assets/{connect-to-CfDaEe0A.js → connect-to-CSmEv-YT.js} +1 -1
  73. package/dist/assets/{content-layout-6QyIvVJd.js → content-layout-DQE6ycf5.js} +1 -1
  74. package/dist/assets/{dashboard-C0i0zGaq.js → dashboard-CP6EH8D5.js} +3 -3
  75. package/dist/assets/de-CE9g_-X2.js +1 -0
  76. package/dist/assets/{did-address-BpfbzLGz.js → did-address-DqEEjv0O.js} +1 -1
  77. package/dist/assets/{domain-BhSCRtSo.js → domain-8iS5ri-y.js} +1 -1
  78. package/dist/assets/{domain-list-BPkOfmYb.js → domain-list-BkcN2BUo.js} +2 -2
  79. package/dist/assets/es-DOde1pH1.js +1 -0
  80. package/dist/assets/{exchange-passport-LLiIFc-0.js → exchange-passport-CUySag9T.js} +1 -1
  81. package/dist/assets/{fallback-BLXI-n6v.js → fallback-CJF1dNBc.js} +1 -1
  82. package/dist/assets/{format-error-BwGW2wAE.js → format-error-bBsbD_z2.js} +1 -1
  83. package/dist/assets/fr-CQP2ynaM.js +1 -0
  84. package/dist/assets/{fuel-CIdqb__Z.js → fuel-DLXXjr2e.js} +1 -1
  85. package/dist/assets/{fullpage-DTIP3-KI.js → fullpage-BM0u4OQn.js} +1 -1
  86. package/dist/assets/hi-COkpP61P.js +1 -0
  87. package/dist/assets/{home-BB_1tCUS.js → home-fef1tb5d.js} +1 -1
  88. package/dist/assets/id-e4JFBjR1.js +1 -0
  89. package/dist/assets/{iframe-DNXQ2lQl.js → iframe-az3HXsp7.js} +1 -1
  90. package/dist/assets/{index-BjTALf2f.js → index-2N1JOhJU.js} +6 -6
  91. package/dist/assets/{index-CNAqzvhq.js → index-BJLl0pPL.js} +1 -1
  92. package/dist/assets/{index-BXr4Y9l1.js → index-BO9dWa_k.js} +1 -1
  93. package/dist/assets/{index-C5ufWL53.js → index-Be0mmIOx.js} +1 -1
  94. package/dist/assets/{index-B6FtMIlF.js → index-BeZuizSh.js} +11 -11
  95. package/dist/assets/{index-BwilLoOD.js → index-Bg6SWkrY.js} +1 -1
  96. package/dist/assets/{index-pA5dhubz.js → index-Bp7qFuFt.js} +1 -1
  97. package/dist/assets/{index-BylXgi0O.js → index-Bq1LP5zH.js} +5 -5
  98. package/dist/assets/index-Bs6eVh1i.js +1290 -0
  99. package/dist/assets/{index-BYcFZmG9.js → index-BuPB6aMk.js} +1 -1
  100. package/dist/assets/{index-CKFSulaR.js → index-C1QqZwUI.js} +1 -1
  101. package/dist/assets/{index-RsllRuBz.js → index-CTidB1Mn.js} +2 -2
  102. package/dist/assets/{index-Bq0-mzcm.js → index-CncMeJUb.js} +3 -3
  103. package/dist/assets/{index-DdSsMxXy.js → index-CwpZFWj7.js} +1 -1
  104. package/dist/assets/{index-D4b58oiI.js → index-D6ye1IUq.js} +1 -1
  105. package/dist/assets/{index-CbSGlpYN.js → index-D8biArPL.js} +1 -1
  106. package/dist/assets/{index-BgJgHwAp.js → index-DCGGF_ss.js} +1 -1
  107. package/dist/assets/{index-KlKmkdC4.js → index-DDJEE2Xy.js} +1 -1
  108. package/dist/assets/{index-x7UzLF5t.js → index-DKZXssfh.js} +1 -1
  109. package/dist/assets/{index-DXjO9c84.js → index-DWoFCWPW.js} +1 -1
  110. package/dist/assets/{index-C0rjFsnk.js → index-DhQA2uno.js} +1 -1
  111. package/dist/assets/{index-DUF0JDS_.js → index-DnWL8uZv.js} +1 -1
  112. package/dist/assets/{index-DRRXCVrD.js → index-DpMthtbm.js} +1 -1
  113. package/dist/assets/{index-VnShV1xQ.js → index-FbdVFGv1.js} +1 -1
  114. package/dist/assets/{index-e6kcO2IM.js → index-FlPazMJb.js} +1 -1
  115. package/dist/assets/{index-CxxPTcE0.js → index-Z-Gqsoqr.js} +2 -2
  116. package/dist/assets/{index-BIthRuvH.js → index-biQ8ZceJ.js} +1 -1
  117. package/dist/assets/{index-DA95OU7i.js → index-jLuY8xVP.js} +1 -1
  118. package/dist/assets/{index-64_qV40R.js → index-x__xpa1X.js} +1 -1
  119. package/dist/assets/{index-DsSBM-_S.js → index-z3cCfo9Y.js} +1 -1
  120. package/dist/assets/{index.es-mRXAEMNt.js → index.es-P0LYMq_S.js} +1 -1
  121. package/dist/assets/{index.esm-DjWw7Lzz.js → index.esm-LkGC4wGR.js} +1 -1
  122. package/dist/assets/{invitation-B6-C0VCK.js → invitation-CL3-iDM7.js} +1 -1
  123. package/dist/assets/{invite-xGj5CdHL.js → invite-DvF6V0Jf.js} +1 -1
  124. package/dist/assets/{issue-passport-DTHjla63.js → issue-passport-CqNH99d9.js} +1 -1
  125. package/dist/assets/item-B4YNb-JH.js +1 -0
  126. package/dist/assets/ja-Bq_9phll.js +1 -0
  127. package/dist/assets/{jss-plugin-props-sort.esm-DY9yzJca.js → jss-plugin-props-sort.esm-BLVpG1A9.js} +1 -1
  128. package/dist/assets/ko-BGNBXY1X.js +1 -0
  129. package/dist/assets/{launch-result-message-CPCpHKjz.js → launch-result-message-B9KR1tDu.js} +1 -1
  130. package/dist/assets/{layout-CFQe2Ker.js → layout-fJBqIo5F.js} +1 -1
  131. package/dist/assets/{list-header-BEhaqW7t.js → list-header-Ctnd2oAd.js} +1 -1
  132. package/dist/assets/localization-BgQRT2Zf.js +1 -0
  133. package/dist/assets/{log-C8W-cVxN.js → log-CEvGpqSm.js} +1 -1
  134. package/dist/assets/{login-D12Rhk2d.js → login-Bo3fIpOb.js} +1 -1
  135. package/dist/assets/{login-oauth-callback-CxApK6EZ.js → login-oauth-callback-sWQINBHD.js} +1 -1
  136. package/dist/assets/{logo-uploader-CkOwPjl_.js → logo-uploader-CeErFRIl.js} +3 -3
  137. package/dist/assets/{lost-passport-w6KkH0ST.js → lost-passport-OX1aBYlK.js} +3 -3
  138. package/dist/assets/{lottie-CL87YgRk.js → lottie-6KsaV-u_.js} +1 -1
  139. package/dist/assets/{notifications-Cx1cupfs.js → notifications-nege0U75.js} +1 -1
  140. package/dist/assets/open-window-CT2Rlniv.js +1 -0
  141. package/dist/assets/{overview-AUalyiGO.js → overview-sW_rdSuj.js} +1 -1
  142. package/dist/assets/{page-header-C_QUgaZY.js → page-header-CrCpCM1t.js} +1 -1
  143. package/dist/assets/{permission-DP5aIKWz.js → permission-C0Tguzrp.js} +1 -1
  144. package/dist/assets/{preferences-DMuS6yE9.js → preferences-B1iXhAz1.js} +1 -1
  145. package/dist/assets/pt-CowvQB1d.js +1 -0
  146. package/dist/assets/publish-resource-fpFi7tkw.js +1 -0
  147. package/dist/assets/{react-Beg8saxn.js → react-D-F09R4E.js} +16 -16
  148. package/dist/assets/{redux-bZecRzCd.js → redux-CGHNIqz1.js} +1 -1
  149. package/dist/assets/{resource-dialog-B5rWbT9Z.js → resource-dialog-CiiVZ6ZU.js} +1 -1
  150. package/dist/assets/ru-8F9Pd4BB.js +1 -0
  151. package/dist/assets/{selector-BdkTW8Bp.js → selector-BQUPsOZR.js} +1 -1
  152. package/dist/assets/session-MHHY5q0Q.js +1 -0
  153. package/dist/assets/{setup-B6Iee4wV.js → setup-IRueYt4O.js} +3 -3
  154. package/dist/assets/{shorten-label-DXoHBwIO.js → shorten-label-BGTJy7hP.js} +1 -1
  155. package/dist/assets/{slicedToArray-hNHfzrfr.js → slicedToArray-BW1atOp0.js} +2 -2
  156. package/dist/assets/{spaces-DsKfbkyQ.js → spaces-BLjgBDcq.js} +1 -1
  157. package/dist/assets/{start-B7iX5Z5Z.js → start-DrTpOgvn.js} +1 -1
  158. package/dist/assets/{step-actions-CgyPUsY4.js → step-actions-DApDKLgh.js} +1 -1
  159. package/dist/assets/{studio-CYD9Ey14.js → studio-Bb1Nlgox.js} +1 -1
  160. package/dist/assets/{switch-control-DUlsPdHK.js → switch-control-BoM-Iavm.js} +1 -1
  161. package/dist/assets/th-ChXe3YuF.js +1 -0
  162. package/dist/assets/{toUpper-B1oejjJe.js → toUpper-MflOQzKL.js} +1 -1
  163. package/dist/assets/{transfer-C_jkllrL.js → transfer-Cqj10aL4.js} +1 -1
  164. package/dist/assets/{uniqBy-CsoEC9j2.js → uniqBy-D_r3-UMR.js} +1 -1
  165. package/dist/assets/{unsubscribe-CTQsc0wO.js → unsubscribe-BTnor6mA.js} +1 -1
  166. package/dist/assets/{url-join-BUTIHIZG.js → url-join-CInA5YbB.js} +1 -1
  167. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-Lklzirrm.js → use-blocklet-info-for-connect-did-spaces-3C34EnsW.js} +1 -1
  168. package/dist/assets/{use-mobile-CKd5Pj3q.js → use-mobile-3lQHeCHh.js} +1 -1
  169. package/dist/assets/{useAsync-BxYxBpgs.js → useAsync-CvmXde6W.js} +1 -1
  170. package/dist/assets/{useFormControl-Cvbt6y34.js → useFormControl-DixvdRRz.js} +1 -1
  171. package/dist/assets/{useLocalStorage-DbEB4fUS.js → useLocalStorage-DHaavGnu.js} +1 -1
  172. package/dist/assets/{useSetState-Bz02VHn2.js → useSetState-4A0WYymn.js} +1 -1
  173. package/dist/assets/{useSlot-D2AIHTcE.js → useSlot-Cw31Yuqy.js} +1 -1
  174. package/dist/assets/{user-center-BJtZiryH.js → user-center-W0kP8nha.js} +1 -1
  175. package/dist/assets/{user-sessions-kEzGodpW.js → user-sessions-F2x-Qp00.js} +1 -1
  176. package/dist/assets/{util-DX8Y76BI.js → util-DS8KP9ZV.js} +1 -1
  177. package/dist/assets/vi-B7O3CE6M.js +1 -0
  178. package/dist/assets/wrap-locale-B7pJDslW.js +1 -0
  179. package/dist/assets/{zh-Cggiq0mg.js → zh-CmpXeSIg.js} +1 -1
  180. package/dist/assets/zh-tw-BLezyw-8.js +1 -0
  181. package/dist/index.html +1 -1
  182. package/dist/service-worker.js +1 -1
  183. package/package.json +19 -19
  184. package/dist/assets/Stepper-CbSHroLh.js +0 -1
  185. package/dist/assets/add-component-core-v6kFtaUn.js +0 -954
  186. package/dist/assets/add-resource-C7YwudIc.js +0 -1
  187. package/dist/assets/api-DsQhO2U6.js +0 -1
  188. package/dist/assets/ar-COf4Y_3p.js +0 -1
  189. package/dist/assets/de-zdKcscdw.js +0 -1
  190. package/dist/assets/es-CzY_FD37.js +0 -1
  191. package/dist/assets/fr-B4j_t6Vr.js +0 -1
  192. package/dist/assets/hi-DZQLRi1O.js +0 -1
  193. package/dist/assets/id-D9u1yms9.js +0 -1
  194. package/dist/assets/index-CN-fwa9u.js +0 -1290
  195. package/dist/assets/item-D2N3g9Se.js +0 -1
  196. package/dist/assets/ja-Df9x-5Ht.js +0 -1
  197. package/dist/assets/ko-vd-KA1ih.js +0 -1
  198. package/dist/assets/localization-BZZp7sPO.js +0 -1
  199. package/dist/assets/pt-CYape_zS.js +0 -1
  200. package/dist/assets/publish-resource-DLpstd6O.js +0 -1
  201. package/dist/assets/ru-DqCpN5z5.js +0 -1
  202. package/dist/assets/session-B9OlTLIw.js +0 -1
  203. package/dist/assets/th-J1Hr4fyV.js +0 -1
  204. package/dist/assets/vi-TLG_YDYN.js +0 -1
  205. package/dist/assets/wrap-locale-qJfL2cC9.js +0 -1
  206. package/dist/assets/zh-tw-BzV3gvkJ.js +0 -1
@@ -1 +1 @@
1
- import{r as v,j as c,P as f,a1 as d}from"./index-CN-fwa9u.js";var o={};Object.defineProperty(o,"__esModule",{value:!0});var s=o.default=void 0;m(v);var n=c;function m(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(a){y(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function y(e,t,r){return t=g(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=j(e,"string");return typeof t=="symbol"?t:String(t)}function j(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i=function(t){return(0,n.jsxs)("svg",u(u({},t),{},{children:[(0,n.jsx)("path",{d:"M24.604 2.263L28.524 0H42.79v41.862H28.79a1 1 0 0 1-.5-.134l-15.103-8.72V8.854l1.817-1.05 3.2 1.848-1.817 1.05V31.16l12.993 7.502H39.59V3.2H29.38l-1.576.91-3.2-1.847z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.402 31.16V10.701L13.409 3.2H3.2v35.462h10.21l1.58-.913 3.2 1.847-3.923 2.266H0V0h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z"}),(0,n.jsx)("path",{d:"M138.44 27.684c.192 0 .357.075.496.224l1.344 1.472a9.584 9.584 0 0 1-3.44 2.576c-1.344.608-2.965.912-4.864.912-1.664 0-3.173-.288-4.528-.864a10.056 10.056 0 0 1-3.456-2.416c-.949-1.035-1.685-2.272-2.208-3.712-.523-1.44-.784-3.024-.784-4.752 0-1.728.272-3.312.816-4.752.555-1.44 1.328-2.677 2.32-3.712a10.444 10.444 0 0 1 3.552-2.416c1.387-.576 2.917-.864 4.592-.864 1.632 0 3.083.267 4.352.8a10.973 10.973 0 0 1 3.312 2.128l-1.12 1.584a.936.936 0 0 1-.288.288.742.742 0 0 1-.432.112c-.203 0-.443-.101-.72-.304a8.802 8.802 0 0 0-1.072-.672c-.437-.256-.981-.485-1.632-.688-.651-.203-1.461-.304-2.432-.304-1.141 0-2.187.203-3.136.608a6.885 6.885 0 0 0-2.464 1.728c-.683.747-1.216 1.67-1.6 2.768-.373 1.088-.56 2.32-.56 3.696 0 1.397.197 2.64.592 3.728.395 1.088.939 2.01 1.632 2.768a6.914 6.914 0 0 0 2.448 1.728 7.764 7.764 0 0 0 3.04.592c.661 0 1.253-.037 1.776-.112a7.843 7.843 0 0 0 1.456-.368c.448-.16.869-.363 1.264-.608a8.89 8.89 0 0 0 1.168-.912c.085-.075.176-.133.272-.176a.616.616 0 0 1 .304-.08zM149.68 16.1c1.195 0 2.272.197 3.232.592a6.54 6.54 0 0 1 2.464 1.68c.683.725 1.205 1.605 1.568 2.64.363 1.024.544 2.176.544 3.456 0 1.28-.181 2.437-.544 3.472-.363 1.035-.885 1.915-1.568 2.64a6.795 6.795 0 0 1-2.464 1.68c-.96.384-2.037.576-3.232.576-1.205 0-2.293-.192-3.264-.576a6.987 6.987 0 0 1-2.464-1.68c-.683-.725-1.211-1.605-1.584-2.64-.363-1.035-.544-2.192-.544-3.472 0-1.28.181-2.432.544-3.456.373-1.035.901-1.915 1.584-2.64a6.717 6.717 0 0 1 2.464-1.68c.971-.395 2.059-.592 3.264-.592zm0 14.304c1.536 0 2.683-.517 3.44-1.552.757-1.035 1.136-2.49 1.136-4.368 0-1.877-.379-3.333-1.136-4.368-.757-1.045-1.904-1.568-3.44-1.568-1.557 0-2.72.523-3.488 1.568-.757 1.035-1.136 2.49-1.136 4.368 0 1.877.379 3.333 1.136 4.368.768 1.035 1.931 1.552 3.488 1.552zM163.899 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.442 6.442 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448.682.299 1.253.72 1.712 1.264.458.533.805 1.179 1.04 1.936.234.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.534-.65-1.35-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.38 7.38 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM181.805 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.448 6.448 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448a4.63 4.63 0 0 1 1.712 1.264c.459.533.805 1.179 1.04 1.936.235.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.533-.65-1.349-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.396 7.396 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM207.551 22.676c0-.619-.09-1.19-.272-1.712a3.77 3.77 0 0 0-.768-1.36 3.521 3.521 0 0 0-1.248-.896c-.49-.213-1.056-.32-1.696-.32-1.312 0-2.346.379-3.104 1.136-.746.757-1.221 1.808-1.424 3.152h8.512zm2.576 7.616a6.311 6.311 0 0 1-1.328 1.168 7.926 7.926 0 0 1-1.6.784 9.664 9.664 0 0 1-1.76.448c-.597.096-1.189.144-1.776.144-1.12 0-2.16-.187-3.12-.56a7.159 7.159 0 0 1-2.48-1.664c-.693-.736-1.237-1.643-1.632-2.72-.384-1.088-.576-2.336-.576-3.744 0-1.13.176-2.181.528-3.152a7.67 7.67 0 0 1 1.504-2.56 7.064 7.064 0 0 1 2.416-1.712c.95-.416 2.016-.624 3.2-.624.992 0 1.904.165 2.736.496.843.32 1.568.79 2.176 1.408.608.619 1.083 1.381 1.424 2.288.352.907.528 1.941.528 3.104 0 .48-.053.805-.16.976-.106.16-.304.24-.592.24h-10.656c.032.97.171 1.819.416 2.544.246.715.582 1.312 1.008 1.792.438.48.955.837 1.552 1.072.598.235 1.264.352 2 .352.694 0 1.291-.08 1.792-.24.512-.16.95-.33 1.312-.512.374-.192.683-.368.928-.528.256-.16.48-.24.672-.24.256 0 .454.096.592.288l.896 1.152zM225.113 19.396a1.836 1.836 0 0 1-.288.288c-.086.064-.214.096-.384.096-.171 0-.352-.064-.544-.192a4.872 4.872 0 0 0-.704-.432 5.21 5.21 0 0 0-1.024-.432c-.395-.139-.886-.208-1.472-.208-.768 0-1.446.139-2.032.416a3.972 3.972 0 0 0-1.472 1.184c-.384.512-.678 1.136-.88 1.872-.203.736-.304 1.563-.304 2.48 0 .95.106 1.797.32 2.544.213.736.517 1.36.912 1.872.394.501.874.885 1.44 1.152a4.522 4.522 0 0 0 1.888.384c.672 0 1.226-.08 1.664-.24.437-.17.8-.352 1.088-.544.288-.192.528-.368.72-.528.192-.17.389-.256.592-.256.256 0 .453.096.592.288l.896 1.152a5.966 5.966 0 0 1-1.264 1.168c-.459.32-.95.581-1.472.784a8.34 8.34 0 0 1-1.648.448c-.566.096-1.142.144-1.728.144a7.25 7.25 0 0 1-2.848-.56 6.52 6.52 0 0 1-2.288-1.632c-.64-.715-1.147-1.59-1.52-2.624-.374-1.045-.56-2.23-.56-3.552 0-1.205.165-2.32.496-3.344.341-1.024.837-1.904 1.488-2.64a6.821 6.821 0 0 1 2.432-1.744c.96-.427 2.058-.64 3.296-.64 1.162 0 2.186.187 3.072.56a7.514 7.514 0 0 1 2.368 1.584l-.832 1.152zM234.121 32.868c-1.312 0-2.325-.368-3.04-1.104-.704-.736-1.056-1.787-1.056-3.152v-9.728h-1.888a.701.701 0 0 1-.464-.16c-.117-.117-.176-.288-.176-.512v-1.264l2.64-.368.704-4.848a.738.738 0 0 1 .24-.416.724.724 0 0 1 .48-.16h1.584v5.456h4.608v2.272h-4.608v9.52c0 .64.155 1.12.464 1.44.32.31.726.464 1.216.464.288 0 .534-.037.736-.112a3.27 3.27 0 0 0 .544-.24c.15-.096.278-.181.384-.256a.521.521 0 0 1 .288-.112c.107 0 .187.027.24.08a.694.694 0 0 1 .192.224l.928 1.504c-.512.47-1.12.832-1.824 1.088a6.362 6.362 0 0 1-2.192.384z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.815 33.284V9H70.66a6.259 6.259 0 0 1 5.823 6.243v11.783a6.258 6.258 0 0 1-6.258 6.258h-12.41zM84.56 9h-3.335v24.321h3.335V9zM61.15 29.95V12.32h9.075a2.923 2.923 0 0 1 2.923 2.923v11.783a2.923 2.923 0 0 1-2.923 2.923H61.15zM89.243 9v24.284h12.409a6.258 6.258 0 0 0 6.259-6.258V15.243A6.259 6.259 0 0 0 102.087 9H89.243zm22.912 5.636h3.728v3.728h-3.728v-3.729zm3.728 9.321h-3.728v3.729h3.728v-3.729zM92.578 12.32v17.63h9.074a2.924 2.924 0 0 0 2.924-2.924V15.243a2.924 2.924 0 0 0-2.924-2.923h-9.074z"})]}))};i.defaultProps={width:"239",height:"42",viewBox:"0 0 239 42",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};i.displayName="connect-logo";s=o.default=i;function p({children:e,...t}){return c.jsxs(d,{color:"did",variant:"contained",...t,children:[c.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),c.jsx(s,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}p.propTypes={children:f.any};p.defaultProps={children:""};export{p as C};
1
+ import{r as v,j as c,P as f,a1 as d}from"./index-Bs6eVh1i.js";var o={};Object.defineProperty(o,"__esModule",{value:!0});var s=o.default=void 0;m(v);var n=c;function m(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(h){return Object.getOwnPropertyDescriptor(e,h).enumerable})),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(a){y(e,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(r,a))})}return e}function y(e,t,r){return t=g(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){var t=j(e,"string");return typeof t=="symbol"?t:String(t)}function j(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var a=r.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i=function(t){return(0,n.jsxs)("svg",u(u({},t),{},{children:[(0,n.jsx)("path",{d:"M24.604 2.263L28.524 0H42.79v41.862H28.79a1 1 0 0 1-.5-.134l-15.103-8.72V8.854l1.817-1.05 3.2 1.848-1.817 1.05V31.16l12.993 7.502H39.59V3.2H29.38l-1.576.91-3.2-1.847z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.402 31.16V10.701L13.409 3.2H3.2v35.462h10.21l1.58-.913 3.2 1.847-3.923 2.266H0V0h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047z"}),(0,n.jsx)("path",{d:"M138.44 27.684c.192 0 .357.075.496.224l1.344 1.472a9.584 9.584 0 0 1-3.44 2.576c-1.344.608-2.965.912-4.864.912-1.664 0-3.173-.288-4.528-.864a10.056 10.056 0 0 1-3.456-2.416c-.949-1.035-1.685-2.272-2.208-3.712-.523-1.44-.784-3.024-.784-4.752 0-1.728.272-3.312.816-4.752.555-1.44 1.328-2.677 2.32-3.712a10.444 10.444 0 0 1 3.552-2.416c1.387-.576 2.917-.864 4.592-.864 1.632 0 3.083.267 4.352.8a10.973 10.973 0 0 1 3.312 2.128l-1.12 1.584a.936.936 0 0 1-.288.288.742.742 0 0 1-.432.112c-.203 0-.443-.101-.72-.304a8.802 8.802 0 0 0-1.072-.672c-.437-.256-.981-.485-1.632-.688-.651-.203-1.461-.304-2.432-.304-1.141 0-2.187.203-3.136.608a6.885 6.885 0 0 0-2.464 1.728c-.683.747-1.216 1.67-1.6 2.768-.373 1.088-.56 2.32-.56 3.696 0 1.397.197 2.64.592 3.728.395 1.088.939 2.01 1.632 2.768a6.914 6.914 0 0 0 2.448 1.728 7.764 7.764 0 0 0 3.04.592c.661 0 1.253-.037 1.776-.112a7.843 7.843 0 0 0 1.456-.368c.448-.16.869-.363 1.264-.608a8.89 8.89 0 0 0 1.168-.912c.085-.075.176-.133.272-.176a.616.616 0 0 1 .304-.08zM149.68 16.1c1.195 0 2.272.197 3.232.592a6.54 6.54 0 0 1 2.464 1.68c.683.725 1.205 1.605 1.568 2.64.363 1.024.544 2.176.544 3.456 0 1.28-.181 2.437-.544 3.472-.363 1.035-.885 1.915-1.568 2.64a6.795 6.795 0 0 1-2.464 1.68c-.96.384-2.037.576-3.232.576-1.205 0-2.293-.192-3.264-.576a6.987 6.987 0 0 1-2.464-1.68c-.683-.725-1.211-1.605-1.584-2.64-.363-1.035-.544-2.192-.544-3.472 0-1.28.181-2.432.544-3.456.373-1.035.901-1.915 1.584-2.64a6.717 6.717 0 0 1 2.464-1.68c.971-.395 2.059-.592 3.264-.592zm0 14.304c1.536 0 2.683-.517 3.44-1.552.757-1.035 1.136-2.49 1.136-4.368 0-1.877-.379-3.333-1.136-4.368-.757-1.045-1.904-1.568-3.44-1.568-1.557 0-2.72.523-3.488 1.568-.757 1.035-1.136 2.49-1.136 4.368 0 1.877.379 3.333 1.136 4.368.768 1.035 1.931 1.552 3.488 1.552zM163.899 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.442 6.442 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448.682.299 1.253.72 1.712 1.264.458.533.805 1.179 1.04 1.936.234.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.534-.65-1.35-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.38 7.38 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM181.805 18.612c.352-.373.72-.715 1.104-1.024a6.73 6.73 0 0 1 1.216-.784 6.195 6.195 0 0 1 1.392-.512 6.448 6.448 0 0 1 1.6-.192c.896 0 1.68.15 2.352.448a4.63 4.63 0 0 1 1.712 1.264c.459.533.805 1.179 1.04 1.936.235.757.352 1.595.352 2.512v10.352h-3.136V22.26c0-1.163-.267-2.064-.8-2.704-.533-.65-1.349-.976-2.448-.976-.8 0-1.552.192-2.256.576a7.396 7.396 0 0 0-1.936 1.536v11.92h-3.12V16.356h1.872c.437 0 .709.208.816.624l.24 1.632zM207.551 22.676c0-.619-.09-1.19-.272-1.712a3.77 3.77 0 0 0-.768-1.36 3.521 3.521 0 0 0-1.248-.896c-.49-.213-1.056-.32-1.696-.32-1.312 0-2.346.379-3.104 1.136-.746.757-1.221 1.808-1.424 3.152h8.512zm2.576 7.616a6.311 6.311 0 0 1-1.328 1.168 7.926 7.926 0 0 1-1.6.784 9.664 9.664 0 0 1-1.76.448c-.597.096-1.189.144-1.776.144-1.12 0-2.16-.187-3.12-.56a7.159 7.159 0 0 1-2.48-1.664c-.693-.736-1.237-1.643-1.632-2.72-.384-1.088-.576-2.336-.576-3.744 0-1.13.176-2.181.528-3.152a7.67 7.67 0 0 1 1.504-2.56 7.064 7.064 0 0 1 2.416-1.712c.95-.416 2.016-.624 3.2-.624.992 0 1.904.165 2.736.496.843.32 1.568.79 2.176 1.408.608.619 1.083 1.381 1.424 2.288.352.907.528 1.941.528 3.104 0 .48-.053.805-.16.976-.106.16-.304.24-.592.24h-10.656c.032.97.171 1.819.416 2.544.246.715.582 1.312 1.008 1.792.438.48.955.837 1.552 1.072.598.235 1.264.352 2 .352.694 0 1.291-.08 1.792-.24.512-.16.95-.33 1.312-.512.374-.192.683-.368.928-.528.256-.16.48-.24.672-.24.256 0 .454.096.592.288l.896 1.152zM225.113 19.396a1.836 1.836 0 0 1-.288.288c-.086.064-.214.096-.384.096-.171 0-.352-.064-.544-.192a4.872 4.872 0 0 0-.704-.432 5.21 5.21 0 0 0-1.024-.432c-.395-.139-.886-.208-1.472-.208-.768 0-1.446.139-2.032.416a3.972 3.972 0 0 0-1.472 1.184c-.384.512-.678 1.136-.88 1.872-.203.736-.304 1.563-.304 2.48 0 .95.106 1.797.32 2.544.213.736.517 1.36.912 1.872.394.501.874.885 1.44 1.152a4.522 4.522 0 0 0 1.888.384c.672 0 1.226-.08 1.664-.24.437-.17.8-.352 1.088-.544.288-.192.528-.368.72-.528.192-.17.389-.256.592-.256.256 0 .453.096.592.288l.896 1.152a5.966 5.966 0 0 1-1.264 1.168c-.459.32-.95.581-1.472.784a8.34 8.34 0 0 1-1.648.448c-.566.096-1.142.144-1.728.144a7.25 7.25 0 0 1-2.848-.56 6.52 6.52 0 0 1-2.288-1.632c-.64-.715-1.147-1.59-1.52-2.624-.374-1.045-.56-2.23-.56-3.552 0-1.205.165-2.32.496-3.344.341-1.024.837-1.904 1.488-2.64a6.821 6.821 0 0 1 2.432-1.744c.96-.427 2.058-.64 3.296-.64 1.162 0 2.186.187 3.072.56a7.514 7.514 0 0 1 2.368 1.584l-.832 1.152zM234.121 32.868c-1.312 0-2.325-.368-3.04-1.104-.704-.736-1.056-1.787-1.056-3.152v-9.728h-1.888a.701.701 0 0 1-.464-.16c-.117-.117-.176-.288-.176-.512v-1.264l2.64-.368.704-4.848a.738.738 0 0 1 .24-.416.724.724 0 0 1 .48-.16h1.584v5.456h4.608v2.272h-4.608v9.52c0 .64.155 1.12.464 1.44.32.31.726.464 1.216.464.288 0 .534-.037.736-.112a3.27 3.27 0 0 0 .544-.24c.15-.096.278-.181.384-.256a.521.521 0 0 1 .288-.112c.107 0 .187.027.24.08a.694.694 0 0 1 .192.224l.928 1.504c-.512.47-1.12.832-1.824 1.088a6.362 6.362 0 0 1-2.192.384z"}),(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M57.815 33.284V9H70.66a6.259 6.259 0 0 1 5.823 6.243v11.783a6.258 6.258 0 0 1-6.258 6.258h-12.41zM84.56 9h-3.335v24.321h3.335V9zM61.15 29.95V12.32h9.075a2.923 2.923 0 0 1 2.923 2.923v11.783a2.923 2.923 0 0 1-2.923 2.923H61.15zM89.243 9v24.284h12.409a6.258 6.258 0 0 0 6.259-6.258V15.243A6.259 6.259 0 0 0 102.087 9H89.243zm22.912 5.636h3.728v3.728h-3.728v-3.729zm3.728 9.321h-3.728v3.729h3.728v-3.729zM92.578 12.32v17.63h9.074a2.924 2.924 0 0 0 2.924-2.924V15.243a2.924 2.924 0 0 0-2.924-2.923h-9.074z"})]}))};i.defaultProps={width:"239",height:"42",viewBox:"0 0 239 42",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};i.displayName="connect-logo";s=o.default=i;function p({children:e,...t}){return c.jsxs(d,{color:"did",variant:"contained",...t,children:[c.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),c.jsx(s,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}p.propTypes={children:f.any};p.defaultProps={children:""};export{p as C};
@@ -1,4 +1,4 @@
1
- import{r,aQ as d,j as e,b as p,ae as M,bn as I,ck as z,P as o,bA as A,bt as m,bm as E}from"./index-CN-fwa9u.js";import{d as O}from"./ExpandMore-D6W5qQDS.js";import{B as S}from"./ButtonGroup-vDnWyGwv.js";function u(s){const{size:f,color:i,menu:a,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),t=r.useRef(null),k=Array.isArray(a)?a.map((n,P)=>r.isValidElement(n)?n:r.createElement(d,{...n,key:P})):a,b=()=>{c(n=>!n)},B=n=>{t.current&&t.current.contains(n.target)||c(!1)},C=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(v,{variant:h,size:f,color:i,ref:t,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:i,children:l}),e.jsx(p,{onClick:b,color:i,...y,"aria-label":"more functions",children:e.jsx(O,{})})]}),e.jsx(L,{open:j,anchorEl:t.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(M,{children:e.jsx(I,{onClickAway:B,children:e.jsx(z,{onClick:C,children:k})})})})]})}u.propTypes={size:o.oneOf(["small","medium","large"]),color:o.oneOf(["primary","secondary","inherit"]),menu:o.oneOfType([o.node,o.array]),children:o.node,variant:o.oneOf(["outlined","contained"]),onClick:o.func,menuButtonProps:o.object};u.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:A,menuButtonProps:{}};u.Item=d;const v=m(S)`
1
+ import{r,aQ as d,j as e,b as p,ae as M,bn as I,ck as z,P as o,bA as A,bt as m,bm as E}from"./index-Bs6eVh1i.js";import{d as O}from"./ExpandMore-BGm8eNr3.js";import{B as S}from"./ButtonGroup-DztqjsF_.js";function u(s){const{size:f,color:i,menu:a,children:l,variant:h,onClick:x,menuButtonProps:y,...g}=s,[j,c]=r.useState(!1),t=r.useRef(null),k=Array.isArray(a)?a.map((n,P)=>r.isValidElement(n)?n:r.createElement(d,{...n,key:P})):a,b=()=>{c(n=>!n)},B=n=>{t.current&&t.current.contains(n.target)||c(!1)},C=n=>{n.target.closest(".MuiMenuItem-root")&&c(!1)};return e.jsxs(e.Fragment,{children:[e.jsxs(v,{variant:h,size:f,color:i,ref:t,...g,children:[typeof l=="function"?l():e.jsx(p,{onClick:x,color:i,children:l}),e.jsx(p,{onClick:b,color:i,...y,"aria-label":"more functions",children:e.jsx(O,{})})]}),e.jsx(L,{open:j,anchorEl:t.current,placement:"bottom-end",disablePortal:!1,children:e.jsx(M,{children:e.jsx(I,{onClickAway:B,children:e.jsx(z,{onClick:C,children:k})})})})]})}u.propTypes={size:o.oneOf(["small","medium","large"]),color:o.oneOf(["primary","secondary","inherit"]),menu:o.oneOfType([o.node,o.array]),children:o.node,variant:o.oneOf(["outlined","contained"]),onClick:o.func,menuButtonProps:o.object};u.defaultProps={size:"medium",color:"primary",menu:[],children:null,variant:"contained",onClick:A,menuButtonProps:{}};u.Item=d;const v=m(S)`
2
2
  > .MuiButtonBase-root:last-of-type {
3
3
  min-width: 2em;
4
4
  padding-left: 0;
@@ -1,5 +1,5 @@
1
- const __vite__fileDeps=["assets/react-Beg8saxn.js","assets/index-CN-fwa9u.js","assets/index-CCovGSMB.css","assets/index-BXr4Y9l1.js","assets/preact.module-B1z5cdvs.js","assets/index-x7UzLF5t.js","assets/index-D4b58oiI.js","assets/toUpper-B1oejjJe.js","assets/index-e6kcO2IM.js","assets/fallback-BLXI-n6v.js","assets/index-C0rjFsnk.js","assets/Toolbar-DDIrGptL.js","assets/Hidden-D7Q1-tKp.js","assets/MoreHoriz-7CGbv4cq.js","assets/ExpandMore-D6W5qQDS.js","assets/index-DA95OU7i.js","assets/MoreVert-BgAtRXpu.js","assets/selector-BdkTW8Bp.js","assets/Avatar-DGGB5LOw.js","assets/useSlot-D2AIHTcE.js","assets/resource-dialog-B5rWbT9Z.js","assets/use-mobile-CKd5Pj3q.js","assets/OpenInNew-CKl-eX6H.js","assets/CloseOutlined-CJDha2Ce.js","assets/index-DUF0JDS_.js","assets/index-64_qV40R.js","assets/index-CKFSulaR.js","assets/FormControlLabel-B5ncBZIc.js","assets/useFormControl-Cvbt6y34.js","assets/index-CNAqzvhq.js","assets/FilterList-DcgF3V13.js","assets/toPropertyKey-hKuLU48H.js","assets/FormControl-CaDEAkLH.js","assets/FormGroup-BYR0aKZc.js","assets/InputLabel-CWS9z6st.js","assets/ListItemText-CnjGxzQz.js","assets/Select-BfEjSPo-.js","assets/TextField-DUu5kP7_.js","assets/LastPage-DVBjN0qK.js","assets/index-CbSGlpYN.js","assets/redux-bZecRzCd.js","assets/Search-jOuIj90i.js","assets/Delete-BzmPMrXA.js","assets/url-join-BUTIHIZG.js","assets/uniqBy-CsoEC9j2.js","assets/react-BW7E7-P9.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
- import{ao as K0,j as o,aD as re,cE as a0,aG as E,fl as O1,aF as me,aB as Ne,aC as De,T as K,r as R,aK as _e,aH as c0,aI as Be,aJ as Ee,cK as X0,fm as We,X as Se,Y as ke,B as z,l as s1,P as f,$ as Ae,E as U,e as i1,u as le,aM as je,aV as Me,bx as Ge,a1 as Fe,L as de,bG as d0,a as fe,az as se,I as J0,q,Z as ie,dn as Q0,a9 as ge,c as ue,F as Y0,bU as a1,ce as u0,cz as Z0,cI as Te,cJ as p0,bj as e2,cZ as t2,cD as $e,bB as qe,c1 as Ze,f6 as o2,b as ne,bm as l2,dr as r2,ae as h0,bn as n2,ck as s2,aQ as $1,aP as i2,a2 as f0,bk as a2,eX as ye,fn as F1,cQ as c2,ap as d2,ay as u2,al as p2,am as Xe}from"./index-CN-fwa9u.js";import{d as c1}from"./Add-D2VdAxTV.js";import{d as h2}from"./AddBox-E5mEN-D6.js";import{d as x0}from"./Delete-BzmPMrXA.js";import{d as f2}from"./Error-DQVtNAXY.js";import{D as d1}from"./index-CNAqzvhq.js";import{T as m0,b as x2}from"./index-BYcFZmG9.js";import{C as u1}from"./confirm-CnKQrfJf.js";import{u as Ke}from"./session-B9OlTLIw.js";import{W as q1}from"./did-address-BpfbzLGz.js";import{B as p1,d as m2}from"./ChevronRight-CXapQRHl.js";import{S as xe}from"./shorten-label-DXoHBwIO.js";import{A as v0}from"./Avatar-DGGB5LOw.js";import{d as v2}from"./Download-CM2Jk9TF.js";import{d as g2}from"./QuestionMarkCircle-DnR13Dar.js";import{b as b2,c as U1,T as j2}from"./index-DUF0JDS_.js";import{_ as Ce}from"./useSetState-Bz02VHn2.js";import{c as h1}from"./index-D4b58oiI.js";import{C as e1,F as t1,S as w2}from"./FormControlLabel-B5ncBZIc.js";import{A as g0}from"./Alert-CDzVFAwP.js";import{p as b0}from"./index-HqFqdQ4r.js";import"./api-DsQhO2U6.js";import{i as R2}from"./index-DXjO9c84.js";import{d as C2}from"./ExpandMore-D6W5qQDS.js";import{d as y2}from"./OpenInNew-CKl-eX6H.js";import{d as z2}from"./DeleteOutline-S4eLA6ti.js";import{d as S2}from"./ArrowDropDown-BddF_259.js";import{f as Ve}from"./format-error-BwGW2wAE.js";import{c as k2,A as j0,u as M2,S as I2}from"./item-D2N3g9Se.js";import{B as L2}from"./ButtonGroup-vDnWyGwv.js";import{T as ze}from"./TextField-DUu5kP7_.js";import{M as f1}from"./InputAdornment-CIpynRn-.js";import{d as P2}from"./Launch-D5yIAhRx.js";import{L as T2}from"./MoreVert-BgAtRXpu.js";import{a as V2}from"./ListItemText-CnjGxzQz.js";import{C as N2}from"./click-to-copy-B0FA1Wba.js";import{M as D2}from"./index-RsllRuBz.js";import{r as _2}from"./index-VnShV1xQ.js";import{d as B2}from"./Done-RyIIPvNv.js";import{c as w0,d as R0,b as E2,S as A2,a as H2}from"./Stepper-CbSHroLh.js";import{R as O2,a as W1}from"./RadioGroup-CnFAkai6.js";import"./FilterList-DcgF3V13.js";import"./toPropertyKey-hKuLU48H.js";import"./FormControl-CaDEAkLH.js";import"./useFormControl-Cvbt6y34.js";import"./FormGroup-BYR0aKZc.js";import"./InputLabel-CWS9z6st.js";import"./Select-BfEjSPo-.js";import"./LastPage-DVBjN0qK.js";import"./Toolbar-DDIrGptL.js";import"./index-CbSGlpYN.js";import"./redux-bZecRzCd.js";import"./Search-jOuIj90i.js";import"./index-64_qV40R.js";import"./Link-Cdv7hers.js";import"./useSlot-D2AIHTcE.js";import"./jss-plugin-props-sort.esm-DY9yzJca.js";const $2=K0(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),F2=["slots","slotProps"],q2=re(a0)(({theme:e})=>E({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":E({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":E({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:O1(e.palette.grey[200],.12)}:{backgroundColor:O1(e.palette.grey[600],.12)})})),U2=re($2)({width:24,height:16});function W2(e){const{slots:t={},slotProps:l={}}=e,n=me(e,F2),s=e;return o.jsx("li",{children:o.jsx(q2,E({focusRipple:!0},n,{ownerState:s,children:o.jsx(U2,E({as:t.CollapsedIcon,ownerState:s},l.collapsedIcon))}))})}function G2(e){return De("MuiBreadcrumbs",e)}const K2=Ne("MuiBreadcrumbs",["root","ol","li","separator"]),X2=K2,J2=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],Q2=e=>{const{classes:t}=e;return Ee({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},G2,t)},Y2=re(K,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${X2.li}`]:t.li},t.root]})({}),Z2=re("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),et=re("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function tt(e,t,l,n){return e.reduce((s,a,c)=>(c<e.length-1?s=s.concat(a,o.jsx(et,{"aria-hidden":!0,className:t,ownerState:n,children:l},`separator-${c}`)):s.push(a),s),[])}const ot=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiBreadcrumbs"}),{children:s,className:a,component:c="nav",slots:d={},slotProps:u={},expandText:h="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=n,i=me(n,J2),[m,w]=R.useState(!1),v=E({},n,{component:c,expanded:m,expandText:h,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=Q2(v),S=c0({elementType:d.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),V=R.useRef(null),T=k=>{const $=()=>{w(!0);const D=V.current.querySelector("a[href],button,[tabindex]");D&&D.focus()};return g+x>=k.length?k:[...k.slice(0,g),o.jsx(W2,{"aria-label":h,slots:{CollapsedIcon:d.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:$},"ellipsis"),...k.slice(k.length-x,k.length)]},I=R.Children.toArray(s).filter(k=>R.isValidElement(k)).map((k,$)=>o.jsx("li",{className:C.li,children:k},`child-${$}`));return o.jsx(Y2,E({ref:l,component:c,color:"text.secondary",className:Be(C.root,a),ownerState:v},i,{children:o.jsx(Z2,{className:C.ol,ref:V,ownerState:v,children:tt(m||y&&I.length<=y?I:T(I),C.separator,p,v)})}))}),C0=ot;function lt(e){return De("MuiStepButton",e)}const rt=Ne("MuiStepButton",["root","horizontal","vertical","touchRipple"]),G1=rt,nt=["children","className","icon","optional"],st=e=>{const{classes:t,orientation:l}=e;return Ee({root:["root",l],touchRipple:["touchRipple"]},lt,t)},it=re(a0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${G1.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>E({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${G1.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),at=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiStepButton"}),{children:s,className:a,icon:c,optional:d}=n,u=me(n,nt),{disabled:h,active:x}=R.useContext(w0),{orientation:g}=R.useContext(R0),y=E({},n,{orientation:g}),p=st(y),i={icon:c,optional:d},m=X0(s,["StepLabel"])?R.cloneElement(s,i):o.jsx(E2,E({},i,{children:s}));return o.jsx(it,E({focusRipple:!0,disabled:h,TouchRippleProps:{className:p.touchRipple},className:Be(p.root,a),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))}),ct=at;function dt(e){return De("MuiStepContent",e)}Ne("MuiStepContent",["root","last","transition"]);const ut=["children","className","TransitionComponent","transitionDuration","TransitionProps"],pt=e=>{const{classes:t,last:l}=e;return Ee({root:["root",l&&"last"],transition:["transition"]},dt,t)},ht=re("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>E({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),ft=re(We,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),xt=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiStepContent"}),{children:s,className:a,TransitionComponent:c=We,transitionDuration:d="auto",TransitionProps:u}=n,h=me(n,ut);R.useContext(R0);const{active:x,last:g,expanded:y}=R.useContext(w0),p=E({},n,{last:g}),i=pt(p);let m=d;return d==="auto"&&!c.muiSupportAuto&&(m=void 0),o.jsx(ht,E({className:Be(i.root,a),ref:l,ownerState:p},h,{children:o.jsx(ft,E({as:c,in:x||y,className:i.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:s}))}))}),mt=xt;var x1={},vt=ke;Object.defineProperty(x1,"__esModule",{value:!0});var y0=x1.default=void 0,gt=vt(Se()),bt=o;y0=x1.default=(0,gt.default)((0,bt.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var m1={},jt=ke;Object.defineProperty(m1,"__esModule",{value:!0});var z0=m1.default=void 0,wt=jt(Se()),Rt=o;z0=m1.default=(0,wt.default)((0,Rt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function we({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(s1,{size:e})})}we.propTypes={size:f.number};we.defaultProps={size:24};function v1({did:e,projectId:t,title:l,logo:n,describe:s}){const c=`${`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${n}`,[d,u]=R.useState(!1),h=Ae(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:d?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(v0,{sx:{borderRadius:1},src:c}),o.jsxs(z,{children:[o.jsx(xe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:h?"primary.main":""},children:l||"/"}),o.jsx(xe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:h||d?"primary.main":"grey.700"},children:s||"/"})]})]})}v1.propTypes={projectId:f.string.isRequired,did:f.string.isRequired,title:f.string.isRequired,logo:f.string.isRequired,describe:f.string.isRequired};function g1({initUrl:e}){const t=i1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:n,locale:s}=le(),{api:a}=je(),{api:c}=Ke(),[d,u]=R.useState(!0),{blocklet:h}=Me(),[x,g]=R.useState(null),[y,p]=R.useState(!1),i=Ae(M=>M.breakpoints.down("xl")),{componentDid:m=""}=Ge(),[w,v]=R.useState(null),C=()=>{a.getProjects({input:{did:h.meta.did,componentDid:m,tenantScope:l}}).then(M=>{const L=(M==null?void 0:M.projects)||[];u(!1),v(L)}).catch(M=>{u(!1),q.error(M.message)})},S=()=>{t(`${U.UNOWNED_DID}/create/none`,{replace:!0})},V=M=>{g(M)},T=()=>{u(!1),p(!0)},I=()=>{p(!1),g(null)},k=M=>{q.error(M.message),p(!1),g(null)},$=M=>{if(!(M!=null&&M.deleted)){q.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!w&&d)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(we,{})});if(!w)return null;if(!w.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:n("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:n("blocklet.publish.createBlockletTip")}),o.jsx(Fe,{onClick:S,variant:"contained",children:n("blocklet.publish.createBlocklet")})]});const D=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:M=>{const L=w[M];return o.jsx(de,{to:`${L.id}`,children:o.jsx(v1,{did:h.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:M=>M?o.jsx(m0,{type:"success",children:M}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:M=>M?o.jsx(q1,{size:14,compact:!0,responsive:!1,did:M}):null}},i||m?null:{label:n("common.createdBy"),name:"createdBy",options:{customBodyRender:M=>M?o.jsx(q1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${M}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:M}):null}},i||m?null:{label:n("common.scope"),name:"componentDid",options:{customBodyRender:M=>{const L=(h.children||[]).find(A=>A.meta.did===M);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(p1,{size:14,blocklet:L,ancestors:[h]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},M):""}}},i||l?null:{label:n("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:M=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(xe,{children:M})})}},{label:n("common.updatedAt"),name:"updatedAt",options:{customBodyRender:M=>o.jsx(d0,{value:Number(M),locale:s})}},{label:n("common.actions"),name:"actions",options:{customBodyRenderLite:M=>{const L=w[M];return o.jsxs(z,{display:"flex",children:[o.jsx(de,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(fe,{title:n("blocklet.publish.createRelease"),placement:"top",children:o.jsx(se,{color:"primary","aria-label":"create",children:o.jsx(h2,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(fe,{title:n("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(se,{color:"secondary","aria-label":"create",children:o.jsx(de,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(y0,{sx:{fontSize:18}})})})}),o.jsx(fe,{title:n("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(se,{color:"primary","aria-label":"delete",onClick:()=>V(L),children:o.jsx(x0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),P=y?o.jsx(J0,{open:!0,popup:!0,onClose:I,action:"check-has-project-id",locale:s,checkFn:c.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:$,onError:k,extraParams:{projectId:x.id,did:h.meta.did,name:x.blockletTitle},messages:{title:n("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:n("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:n("blocklet.publish.deleteProject.confirm"),success:n("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Ct,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:n("common.blockletStudio")}),o.jsx(fe,{title:n("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(z0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(Fe,{onClick:S,variant:"contained",children:[o.jsx(c1,{style:{fontSize:"1.3em",marginRight:4}}),n("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(d1,{className:"main-table",locale:s,data:w,columns:D,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(u1,{title:`${n("common.delete")} ${x.blockletTitle}`,description:n("blocklet.publish.deleteProject.description"),confirm:n("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[n("blocklet.publish.deleteProject.tip1"),n("blocklet.publish.deleteProject.tip2"),n("blocklet.publish.deleteProject.tip3")].map(M=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(f2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(K,{component:"span",variant:"inherit",color:"text.secondary",children:M})]}))})}),P]})}g1.propTypes={initUrl:f.object};g1.defaultProps={initUrl:null};const Ct=ie(z)`
1
+ const __vite__fileDeps=["assets/react-D-F09R4E.js","assets/index-Bs6eVh1i.js","assets/index-CCovGSMB.css","assets/index-BO9dWa_k.js","assets/preact.module-B1z5cdvs.js","assets/index-DKZXssfh.js","assets/index-D6ye1IUq.js","assets/toUpper-MflOQzKL.js","assets/index-FlPazMJb.js","assets/fallback-CJF1dNBc.js","assets/index-DhQA2uno.js","assets/Toolbar-CCyuBYV6.js","assets/Hidden-C3OT1k4C.js","assets/MoreHoriz-X3J0MR9m.js","assets/ExpandMore-BGm8eNr3.js","assets/index-jLuY8xVP.js","assets/MoreVert-BQShMgz5.js","assets/selector-BQUPsOZR.js","assets/Avatar-DA2NBebq.js","assets/useSlot-Cw31Yuqy.js","assets/resource-dialog-CiiVZ6ZU.js","assets/use-mobile-3lQHeCHh.js","assets/OpenInNew-CW0Mx4kq.js","assets/CloseOutlined-mq9RZPnu.js","assets/index-DnWL8uZv.js","assets/index-x__xpa1X.js","assets/index-C1QqZwUI.js","assets/FormControlLabel-CJRQvybe.js","assets/useFormControl-DixvdRRz.js","assets/index-BJLl0pPL.js","assets/FilterList-BiFvAI5s.js","assets/toPropertyKey-hKuLU48H.js","assets/FormControl-C0eu7m-c.js","assets/FormGroup-g3eIP27k.js","assets/InputLabel-BfZVD9gV.js","assets/ListItemText-YKFhiKqe.js","assets/Select-BMvBs6BG.js","assets/TextField-BX0gscdj.js","assets/LastPage-tpHxk45u.js","assets/index-D8biArPL.js","assets/redux-CGHNIqz1.js","assets/Search-BQvSlrFX.js","assets/Delete-ByoO2-QK.js","assets/url-join-CInA5YbB.js","assets/uniqBy-D_r3-UMR.js","assets/react-BW7E7-P9.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2
+ import{ao as K0,j as o,aD as re,cE as a0,aG as E,fg as O1,aF as me,aB as Ne,aC as De,T as K,r as R,aK as _e,aH as c0,aI as Be,aJ as Ee,cK as X0,fh as We,X as Se,Y as ke,B as z,l as s1,P as f,$ as Ae,E as U,e as i1,u as le,aM as je,aV as Me,bx as Ge,a1 as Fe,L as de,bG as d0,a as fe,az as se,I as J0,q,Z as ie,dn as Q0,a9 as ge,c as ue,F as Y0,bU as a1,ce as u0,cz as Z0,cI as Te,cJ as p0,bj as e2,cZ as t2,cD as $e,bB as qe,c1 as Ze,f1 as o2,b as ne,bm as l2,dr as r2,ae as h0,bn as n2,ck as s2,aQ as $1,aP as i2,a2 as f0,bk as a2,eS as ye,fi as F1,cQ as c2,ap as d2,ay as u2,al as p2,am as Xe}from"./index-Bs6eVh1i.js";import{d as c1}from"./Add-DJrE574Y.js";import{d as h2}from"./AddBox-CJkiavtW.js";import{d as x0}from"./Delete-ByoO2-QK.js";import{d as f2}from"./Error-y_uBRRsg.js";import{D as d1}from"./index-BJLl0pPL.js";import{T as m0,b as x2}from"./index-BuPB6aMk.js";import{C as u1}from"./confirm-JOta2iLX.js";import{u as Ke}from"./session-MHHY5q0Q.js";import{W as q1}from"./did-address-DqEEjv0O.js";import{B as p1,d as m2}from"./ChevronRight-Emhd6Ji3.js";import{S as xe}from"./shorten-label-BGTJy7hP.js";import{A as v0}from"./Avatar-DA2NBebq.js";import{d as v2}from"./Download-CXqnt0If.js";import{d as g2}from"./QuestionMarkCircle-Gudsx8Wq.js";import{b as b2,c as U1,T as j2}from"./index-DnWL8uZv.js";import{_ as Ce}from"./useSetState-4A0WYymn.js";import{c as h1}from"./index-D6ye1IUq.js";import{C as e1,F as t1,S as w2}from"./FormControlLabel-CJRQvybe.js";import{A as g0}from"./Alert-CziFRfxv.js";import{p as b0}from"./index-HqFqdQ4r.js";import"./api-DQObWY3j.js";import{i as R2}from"./index-DWoFCWPW.js";import{d as C2}from"./ExpandMore-BGm8eNr3.js";import{d as y2}from"./OpenInNew-CW0Mx4kq.js";import{d as z2}from"./DeleteOutline-Bcba6nCA.js";import{d as S2}from"./ArrowDropDown-BvKh0H1M.js";import{f as Ve}from"./format-error-bBsbD_z2.js";import{c as k2,A as j0,u as M2,S as I2}from"./item-B4YNb-JH.js";import{B as L2}from"./ButtonGroup-DztqjsF_.js";import{T as ze}from"./TextField-BX0gscdj.js";import{M as f1}from"./InputAdornment-CsccB89Q.js";import{d as P2}from"./Launch-P3Uc9xr1.js";import{L as T2}from"./MoreVert-BQShMgz5.js";import{a as V2}from"./ListItemText-YKFhiKqe.js";import{C as N2}from"./click-to-copy-CIg3JHKX.js";import{M as D2}from"./index-CTidB1Mn.js";import{r as _2}from"./index-FbdVFGv1.js";import{d as B2}from"./Done-8pMK8MaE.js";import{c as w0,d as R0,b as E2,S as A2,a as H2}from"./Stepper-tbe91MoS.js";import{R as O2,a as W1}from"./RadioGroup-DVGkbUhU.js";import"./FilterList-BiFvAI5s.js";import"./toPropertyKey-hKuLU48H.js";import"./FormControl-C0eu7m-c.js";import"./useFormControl-DixvdRRz.js";import"./FormGroup-g3eIP27k.js";import"./InputLabel-BfZVD9gV.js";import"./Select-BMvBs6BG.js";import"./LastPage-tpHxk45u.js";import"./Toolbar-CCyuBYV6.js";import"./index-D8biArPL.js";import"./redux-CGHNIqz1.js";import"./Search-BQvSlrFX.js";import"./index-x__xpa1X.js";import"./Link-CJSgKpcc.js";import"./useSlot-Cw31Yuqy.js";import"./jss-plugin-props-sort.esm-BLVpG1A9.js";const $2=K0(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),F2=["slots","slotProps"],q2=re(a0)(({theme:e})=>E({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":E({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":E({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:O1(e.palette.grey[200],.12)}:{backgroundColor:O1(e.palette.grey[600],.12)})})),U2=re($2)({width:24,height:16});function W2(e){const{slots:t={},slotProps:l={}}=e,n=me(e,F2),s=e;return o.jsx("li",{children:o.jsx(q2,E({focusRipple:!0},n,{ownerState:s,children:o.jsx(U2,E({as:t.CollapsedIcon,ownerState:s},l.collapsedIcon))}))})}function G2(e){return De("MuiBreadcrumbs",e)}const K2=Ne("MuiBreadcrumbs",["root","ol","li","separator"]),X2=K2,J2=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],Q2=e=>{const{classes:t}=e;return Ee({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},G2,t)},Y2=re(K,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${X2.li}`]:t.li},t.root]})({}),Z2=re("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),et=re("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function tt(e,t,l,n){return e.reduce((s,a,c)=>(c<e.length-1?s=s.concat(a,o.jsx(et,{"aria-hidden":!0,className:t,ownerState:n,children:l},`separator-${c}`)):s.push(a),s),[])}const ot=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiBreadcrumbs"}),{children:s,className:a,component:c="nav",slots:d={},slotProps:u={},expandText:h="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=n,i=me(n,J2),[m,w]=R.useState(!1),v=E({},n,{component:c,expanded:m,expandText:h,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=Q2(v),S=c0({elementType:d.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),V=R.useRef(null),T=k=>{const $=()=>{w(!0);const D=V.current.querySelector("a[href],button,[tabindex]");D&&D.focus()};return g+x>=k.length?k:[...k.slice(0,g),o.jsx(W2,{"aria-label":h,slots:{CollapsedIcon:d.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:$},"ellipsis"),...k.slice(k.length-x,k.length)]},I=R.Children.toArray(s).filter(k=>R.isValidElement(k)).map((k,$)=>o.jsx("li",{className:C.li,children:k},`child-${$}`));return o.jsx(Y2,E({ref:l,component:c,color:"text.secondary",className:Be(C.root,a),ownerState:v},i,{children:o.jsx(Z2,{className:C.ol,ref:V,ownerState:v,children:tt(m||y&&I.length<=y?I:T(I),C.separator,p,v)})}))}),C0=ot;function lt(e){return De("MuiStepButton",e)}const rt=Ne("MuiStepButton",["root","horizontal","vertical","touchRipple"]),G1=rt,nt=["children","className","icon","optional"],st=e=>{const{classes:t,orientation:l}=e;return Ee({root:["root",l],touchRipple:["touchRipple"]},lt,t)},it=re(a0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${G1.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>E({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${G1.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),at=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiStepButton"}),{children:s,className:a,icon:c,optional:d}=n,u=me(n,nt),{disabled:h,active:x}=R.useContext(w0),{orientation:g}=R.useContext(R0),y=E({},n,{orientation:g}),p=st(y),i={icon:c,optional:d},m=X0(s,["StepLabel"])?R.cloneElement(s,i):o.jsx(E2,E({},i,{children:s}));return o.jsx(it,E({focusRipple:!0,disabled:h,TouchRippleProps:{className:p.touchRipple},className:Be(p.root,a),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))}),ct=at;function dt(e){return De("MuiStepContent",e)}Ne("MuiStepContent",["root","last","transition"]);const ut=["children","className","TransitionComponent","transitionDuration","TransitionProps"],pt=e=>{const{classes:t,last:l}=e;return Ee({root:["root",l&&"last"],transition:["transition"]},dt,t)},ht=re("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>E({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),ft=re(We,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),xt=R.forwardRef(function(t,l){const n=_e({props:t,name:"MuiStepContent"}),{children:s,className:a,TransitionComponent:c=We,transitionDuration:d="auto",TransitionProps:u}=n,h=me(n,ut);R.useContext(R0);const{active:x,last:g,expanded:y}=R.useContext(w0),p=E({},n,{last:g}),i=pt(p);let m=d;return d==="auto"&&!c.muiSupportAuto&&(m=void 0),o.jsx(ht,E({className:Be(i.root,a),ref:l,ownerState:p},h,{children:o.jsx(ft,E({as:c,in:x||y,className:i.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:s}))}))}),mt=xt;var x1={},vt=ke;Object.defineProperty(x1,"__esModule",{value:!0});var y0=x1.default=void 0,gt=vt(Se()),bt=o;y0=x1.default=(0,gt.default)((0,bt.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var m1={},jt=ke;Object.defineProperty(m1,"__esModule",{value:!0});var z0=m1.default=void 0,wt=jt(Se()),Rt=o;z0=m1.default=(0,wt.default)((0,Rt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function we({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(s1,{size:e})})}we.propTypes={size:f.number};we.defaultProps={size:24};function v1({did:e,projectId:t,title:l,logo:n,describe:s}){const c=`${`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${n}`,[d,u]=R.useState(!1),h=Ae(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:d?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(v0,{sx:{borderRadius:1},src:c}),o.jsxs(z,{children:[o.jsx(xe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:h?"primary.main":""},children:l||"/"}),o.jsx(xe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:h||d?"primary.main":"grey.700"},children:s||"/"})]})]})}v1.propTypes={projectId:f.string.isRequired,did:f.string.isRequired,title:f.string.isRequired,logo:f.string.isRequired,describe:f.string.isRequired};function g1({initUrl:e}){const t=i1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:n,locale:s}=le(),{api:a}=je(),{api:c}=Ke(),[d,u]=R.useState(!0),{blocklet:h}=Me(),[x,g]=R.useState(null),[y,p]=R.useState(!1),i=Ae(M=>M.breakpoints.down("xl")),{componentDid:m=""}=Ge(),[w,v]=R.useState(null),C=()=>{a.getProjects({input:{did:h.meta.did,componentDid:m,tenantScope:l}}).then(M=>{const L=(M==null?void 0:M.projects)||[];u(!1),v(L)}).catch(M=>{u(!1),q.error(M.message)})},S=()=>{t(`${U.UNOWNED_DID}/create/none`,{replace:!0})},V=M=>{g(M)},T=()=>{u(!1),p(!0)},I=()=>{p(!1),g(null)},k=M=>{q.error(M.message),p(!1),g(null)},$=M=>{if(!(M!=null&&M.deleted)){q.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!w&&d)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(we,{})});if(!w)return null;if(!w.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:n("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:n("blocklet.publish.createBlockletTip")}),o.jsx(Fe,{onClick:S,variant:"contained",children:n("blocklet.publish.createBlocklet")})]});const D=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:M=>{const L=w[M];return o.jsx(de,{to:`${L.id}`,children:o.jsx(v1,{did:h.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:M=>M?o.jsx(m0,{type:"success",children:M}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:M=>M?o.jsx(q1,{size:14,compact:!0,responsive:!1,did:M}):null}},i||m?null:{label:n("common.createdBy"),name:"createdBy",options:{customBodyRender:M=>M?o.jsx(q1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${M}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:M}):null}},i||m?null:{label:n("common.scope"),name:"componentDid",options:{customBodyRender:M=>{const L=(h.children||[]).find(A=>A.meta.did===M);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(p1,{size:14,blocklet:L,ancestors:[h]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},M):""}}},i||l?null:{label:n("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:M=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(xe,{children:M})})}},{label:n("common.updatedAt"),name:"updatedAt",options:{customBodyRender:M=>o.jsx(d0,{value:Number(M),locale:s})}},{label:n("common.actions"),name:"actions",options:{customBodyRenderLite:M=>{const L=w[M];return o.jsxs(z,{display:"flex",children:[o.jsx(de,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(fe,{title:n("blocklet.publish.createRelease"),placement:"top",children:o.jsx(se,{color:"primary","aria-label":"create",children:o.jsx(h2,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(fe,{title:n("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(se,{color:"secondary","aria-label":"create",children:o.jsx(de,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(y0,{sx:{fontSize:18}})})})}),o.jsx(fe,{title:n("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(se,{color:"primary","aria-label":"delete",onClick:()=>V(L),children:o.jsx(x0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),P=y?o.jsx(J0,{open:!0,popup:!0,onClose:I,action:"check-has-project-id",locale:s,checkFn:c.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:$,onError:k,extraParams:{projectId:x.id,did:h.meta.did,name:x.blockletTitle},messages:{title:n("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:n("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:n("blocklet.publish.deleteProject.confirm"),success:n("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(Ct,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:n("common.blockletStudio")}),o.jsx(fe,{title:n("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(z0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(Fe,{onClick:S,variant:"contained",children:[o.jsx(c1,{style:{fontSize:"1.3em",marginRight:4}}),n("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(d1,{className:"main-table",locale:s,data:w,columns:D,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(u1,{title:`${n("common.delete")} ${x.blockletTitle}`,description:n("blocklet.publish.deleteProject.description"),confirm:n("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[n("blocklet.publish.deleteProject.tip1"),n("blocklet.publish.deleteProject.tip2"),n("blocklet.publish.deleteProject.tip3")].map(M=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(f2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(K,{component:"span",variant:"inherit",color:"text.secondary",children:M})]}))})}),P]})}g1.propTypes={initUrl:f.object};g1.defaultProps={initUrl:null};const Ct=ie(z)`
3
3
  .main-table > div:first-child {
4
4
  display: none;
5
5
  }
@@ -133,7 +133,7 @@ import{ao as K0,j as o,aD as re,cE as a0,aG as E,fl as O1,aF as me,aB as Ne,aC a
133
133
  background: #fff;
134
134
  z-index: 10;
135
135
  }
136
- `,N0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:n})=>{var c,d;const s=e?(c=l==null?void 0:l.meta)==null?void 0:c.did:t==null?void 0:t.did;let a=e?((d=l==null?void 0:l.settings)==null?void 0:d.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return a=a.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===n),{teamDid:s,storeList:a}};function I1({blocklet:e,store:t,onChangeStore:l,onClick:n,disabled:s,loading:a,componentDid:c}){var L,A,H;const{t:d}=le(),{session:u}=Ke(),{api:h,info:x,inService:g}=je(),y=Me(),[p,i]=R.useState(!1),m=R.useRef(null),[w,v]=R.useState(!1),[C,S]=R.useState(null),V=B=>{l(B),i(!1)},T=()=>{i(!0)},I=B=>{m.current&&m.current.contains(B.target)||i(!1)},k=()=>{v(!0)},$=()=>{v(!1)},D=async()=>{var B;if(C)try{await h.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((B=y==null?void 0:y.actions)==null?void 0:B.refreshBlocklet())}catch(X){q.error(`Remove Blocklet Store Error: ${Ve(X)}`)}finally{S(null)}},{storeList:P}=N0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:c,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),M=(A=e==null?void 0:e.meta)==null?void 0:A.did;return o.jsxs(o.Fragment,{children:[o.jsxs(L2,{disabled:s,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:n,children:[a&&o.jsx(s1,{size:14,sx:{mr:.5}}),`${d("common.connect")} ${(t==null?void 0:t.name)||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx(S2,{})})]}),o.jsx(l2,{sx:{zIndex:1},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:B})=>o.jsx(r2,{...B,style:{transformOrigin:"center top"},children:o.jsx(h0,{children:o.jsx(n2,{onClickAway:I,children:o.jsxs(s2,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto"},children:[P.map(X=>{var J;return o.jsxs($1,{selected:X.id===t.id,sx:{height:56},onClick:()=>V(X),children:[o.jsxs(z,{children:[o.jsx(xe,{sx:{fontSize:"16px"},maxLength:24,children:X.name}),o.jsx(xe,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:X.url})]}),k2({store:X,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(se,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(X)},children:o.jsx(qe,{icon:"ic:outline-delete"})})]},X.url)}),o.jsx(i2,{}),o.jsxs($1,{onClick:k,children:[o.jsx(c1,{font:!0}),o.jsx(K,{variant:"inherit",children:d("store.blockletRegistry.addRegistry")})]})]})})})})}),w&&o.jsx(j0,{hiddenChildren:!0,open:!0,onClose:$,teamDid:M,storeList:P,scope:"studio",onAdd:(H=y==null?void 0:y.actions)==null?void 0:H.refreshBlocklet}),C&&o.jsx(u1,{displayError:!0,title:`${d("common.delete")} ${C.name}`,description:d("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:d("common.confirm"),onConfirm:D,onCancel:()=>S(null)})]})}I1.propTypes={store:f.object,blocklet:f.object,onChangeStore:f.func.isRequired,onClick:f.func.isRequired,loading:f.bool.isRequired,disabled:f.bool.isRequired,componentDid:f.string.isRequired,projectType:f.string.isRequired,getData:f.func.isRequired};I1.defaultProps={store:null,blocklet:null};async function D0(e,t=1500,l=600,n=5e3){let s=0;await new Promise(c=>setTimeout(c,n));const a=async(c,d)=>{try{const u=await e();c(u)}catch(u){s++,s>=l?d(u):setTimeout(()=>a(c,d),t)}};return new Promise(a)}function Dl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function _l(e,{did:t,projectId:l,messageId:n}){return D0(async()=>{var a;const s=await e.getProject({input:{did:t,projectId:l,messageId:n}});if(!((a=s==null?void 0:s.project)!=null&&a.blockletDid))throw new Error("Connected store not found");return s.project.blockletDid})}function Bl(e,{did:t,projectId:l,storeId:n}){return D0(async()=>{var c,d;const s=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((d=(c=s==null?void 0:s.project)==null?void 0:c.connectedStores)!=null&&d.length))throw new Error("Connected store not found");if(!s.project.connectedStores.find(u=>u.storeId===n))throw new Error("Connected store not found")})}const e0="lastWantToConnectStoreId";function El(e){var d,u;const[t,l]=R.useState(null),{session:n}=Ke(),s=R.useCallback(h=>{l(h),localStorage.setItem(e0,h==null?void 0:h.id)},[l]),a=R.useMemo(()=>{var g,y;const h=localStorage.getItem(e0),x=h?(((g=e==null?void 0:e.settings)==null?void 0:g.storeList)||[]).find(p=>p.id===h):null;return x||(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(p=>{var i;return!(p.id!==U.BLOCKLET_STORE.id||p.scope&&p.scope!=="studio"&&p.scope!==((i=n==null?void 0:n.user)==null?void 0:i.did))})},[(d=e==null?void 0:e.settings)==null?void 0:d.storeList,(u=n==null?void 0:n.user)==null?void 0:u.did]);return[t||a,s]}const t0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],o0=1024*1024*10,l0=R.lazy(()=>f0(()=>import("./react-Beg8saxn.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])).then(e=>({default:e.Uploader})));function _0({projectId:e,readOnly:t,loading:l,blocklet:n,params:s,setParams:a,paramsErrTip:c,setParamsErrTip:d,setLoading:u,initUrl:h,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=le(),{api:i}=je(),m=i1(),w=R.useRef(null),v=R.useRef(null),[C,S]=El(n),V=M2({onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const A=setTimeout(()=>{u(!1)},2e4),H=await _l(i,L);u(!1),clearTimeout(A),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${U.UNOWNED_DID}/create`,`${H}/create`),{replace:!0})},I=()=>{if(!s.blockletTitle){q.error(p("blocklet.publish.errorTip.noTitle"));return}if(!C){q.error("No store found");return}const L=Dl();V(async(A,H)=>{var B,X,J;try{const W=await i.connectByStudio({input:{did:(B=n==null?void 0:n.meta)==null?void 0:B.did,blockletTitle:s==null?void 0:s.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((X=s==null?void 0:s.blockletComponents)==null?void 0:X.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(h==null?void 0:h.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){q.error("failed to connect to store");return}H(W.url),T({did:(J=n==null?void 0:n.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const te=Ve(W);q.error(te),A.document.write(te),u(!1)}})},k=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${n.meta.did}/${e}/logo/upload`,$=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${n.meta.did}/${e}/screenshot/upload`,D=s!=null&&s.blockletLogo?`${k}/${s.blockletLogo}`:`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,P=((s==null?void 0:s.blockletScreenshots)||[]).filter(Boolean).map(L=>`${$}/${L}`),M=()=>t?!1:!e||e===U.UNOWNED_DID?(q.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Al,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(ze,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:s.blockletTitle||"",onChange:L=>{d({blockletTitle:""}),a({blockletTitle:L.target.value})},error:!!c.blockletTitle,helperText:c.blockletTitle||""}),o.jsx(ze,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===U.UNOWNED_DID&&o.jsx(f1,{position:"end",children:o.jsx(I1,{blocklet:n,store:C,componentDid:y,onChangeStore:S,disabled:!s.blockletTitle||t||l,loading:l,onClick:I})})},error:!!c.projectId,helperText:c.projectId||"",value:e===U.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(ze,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletDescription||"",onChange:L=>{d({blockletDescription:""}),a({blockletDescription:L.target.value})},error:!!c.blockletDescription,helperText:c.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(K,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(v0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||D,onClick:()=>{M()&&w.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(K,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[P.map((L,A)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(se,{className:"action",onClick:()=>{a(H=>{const B=[...H.blockletScreenshots];return B.splice(A,1),{...H,blockletScreenshots:B}})},children:o.jsx(z2,{})})]},L)),P.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{M()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(we,{}),children:[o.jsx(l0,{ref:w,popup:!0,onUploadFinish:L=>{a({blockletLogo:L.data.filename}),g(""),w.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:k,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:t0,maxFileSize:o0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(l0,{ref:v,popup:!0,onUploadFinish:L=>{a(A=>{var B;const H=A.blockletScreenshots||[];return H.push((B=L.data)==null?void 0:B.filename),{...A,blockletScreenshots:H}}),v.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:$,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:t0,maxFileSize:o0,maxNumberOfFiles:5-P.length}}},"uploader-screenshot")]})]})}_0.propTypes={projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired,blocklet:f.object.isRequired,setLoading:f.func.isRequired,initUrl:f.object.isRequired,componentDid:f.isRequired,initLogoUrl:f.string.isRequired,setInitLogoUrl:f.func.isRequired};const Al=ie.div`
136
+ `,N0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:n})=>{var c,d;const s=e?(c=l==null?void 0:l.meta)==null?void 0:c.did:t==null?void 0:t.did;let a=e?((d=l==null?void 0:l.settings)==null?void 0:d.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return a=a.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===n),{teamDid:s,storeList:a}};function I1({blocklet:e,store:t,onChangeStore:l,onClick:n,disabled:s,loading:a,componentDid:c}){var L,A,H;const{t:d}=le(),{session:u}=Ke(),{api:h,info:x,inService:g}=je(),y=Me(),[p,i]=R.useState(!1),m=R.useRef(null),[w,v]=R.useState(!1),[C,S]=R.useState(null),V=B=>{l(B),i(!1)},T=()=>{i(!0)},I=B=>{m.current&&m.current.contains(B.target)||i(!1)},k=()=>{v(!0)},$=()=>{v(!1)},D=async()=>{var B;if(C)try{await h.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((B=y==null?void 0:y.actions)==null?void 0:B.refreshBlocklet())}catch(X){q.error(`Remove Blocklet Store Error: ${Ve(X)}`)}finally{S(null)}},{storeList:P}=N0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:c,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),M=(A=e==null?void 0:e.meta)==null?void 0:A.did;return o.jsxs(o.Fragment,{children:[o.jsxs(L2,{disabled:s,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:n,children:[a&&o.jsx(s1,{size:14,sx:{mr:.5}}),`${d("common.connect")} ${(t==null?void 0:t.name)||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx(S2,{})})]}),o.jsx(l2,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:B})=>o.jsx(r2,{...B,style:{transformOrigin:"center top"},children:o.jsx(h0,{children:o.jsx(n2,{onClickAway:I,children:o.jsxs(s2,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto"},children:[P.map(X=>{var J;return o.jsxs($1,{selected:X.id===t.id,sx:{height:56},onClick:()=>V(X),children:[o.jsxs(z,{children:[o.jsx(xe,{sx:{fontSize:"16px"},maxLength:24,children:X.name}),o.jsx(xe,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:X.url})]}),k2({store:X,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(se,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(X)},children:o.jsx(qe,{icon:"ic:outline-delete"})})]},X.url)}),o.jsx(i2,{}),o.jsxs($1,{onClick:k,children:[o.jsx(c1,{font:!0}),o.jsx(K,{variant:"inherit",children:d("store.blockletRegistry.addRegistry")})]})]})})})})}),w&&o.jsx(j0,{hiddenChildren:!0,open:!0,onClose:$,teamDid:M,storeList:P,scope:"studio",onAdd:(H=y==null?void 0:y.actions)==null?void 0:H.refreshBlocklet}),C&&o.jsx(u1,{displayError:!0,title:`${d("common.delete")} ${C.name}`,description:d("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:d("common.confirm"),onConfirm:D,onCancel:()=>S(null)})]})}I1.propTypes={store:f.object,blocklet:f.object,onChangeStore:f.func.isRequired,onClick:f.func.isRequired,loading:f.bool.isRequired,disabled:f.bool.isRequired,componentDid:f.string.isRequired,projectType:f.string.isRequired,getData:f.func.isRequired};I1.defaultProps={store:null,blocklet:null};async function D0(e,t=1e3,l=300,n=4e3){let s=0;await new Promise(c=>setTimeout(c,n));const a=async(c,d)=>{try{const u=await e();c(u)}catch(u){s++,s>=l?d(u):setTimeout(()=>a(c,d),t)}};return new Promise(a)}function Dl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function _l(e,{did:t,projectId:l,messageId:n}){return D0(async()=>{var a;const s=await e.getProject({input:{did:t,projectId:l,messageId:n}});if(!((a=s==null?void 0:s.project)!=null&&a.blockletDid))throw new Error("Connected store not found");return s.project.blockletDid})}function Bl(e,{did:t,projectId:l,storeId:n}){return D0(async()=>{var c,d;const s=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((d=(c=s==null?void 0:s.project)==null?void 0:c.connectedStores)!=null&&d.length))throw new Error("Connected store not found");if(!s.project.connectedStores.find(u=>u.storeId===n))throw new Error("Connected store not found")})}const e0="lastWantToConnectStoreId";function El(e){var d,u;const[t,l]=R.useState(null),{session:n}=Ke(),s=R.useCallback(h=>{l(h),localStorage.setItem(e0,h==null?void 0:h.id)},[l]),a=R.useMemo(()=>{var g,y;const h=localStorage.getItem(e0),x=h?(((g=e==null?void 0:e.settings)==null?void 0:g.storeList)||[]).find(p=>p.id===h):null;return x||(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(p=>{var i;return!(p.id!==U.BLOCKLET_STORE.id||p.scope&&p.scope!=="studio"&&p.scope!==((i=n==null?void 0:n.user)==null?void 0:i.did))})},[(d=e==null?void 0:e.settings)==null?void 0:d.storeList,(u=n==null?void 0:n.user)==null?void 0:u.did]);return[t||a,s]}const t0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],o0=1024*1024*10,l0=R.lazy(()=>f0(()=>import("./react-D-F09R4E.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])).then(e=>({default:e.Uploader})));function _0({projectId:e,readOnly:t,loading:l,blocklet:n,params:s,setParams:a,paramsErrTip:c,setParamsErrTip:d,setLoading:u,initUrl:h,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=le(),{api:i}=je(),m=i1(),w=R.useRef(null),v=R.useRef(null),[C,S]=El(n),V=M2({onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const A=setTimeout(()=>{u(!1)},2e4),H=await _l(i,L);u(!1),clearTimeout(A),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${U.UNOWNED_DID}/create`,`${H}/create`),{replace:!0})},I=()=>{if(!s.blockletTitle){q.error(p("blocklet.publish.errorTip.noTitle"));return}if(!C){q.error("No store found");return}const L=Dl();V(async(A,H)=>{var B,X,J;try{const W=await i.connectByStudio({input:{did:(B=n==null?void 0:n.meta)==null?void 0:B.did,blockletTitle:s==null?void 0:s.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((X=s==null?void 0:s.blockletComponents)==null?void 0:X.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(h==null?void 0:h.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){q.error("failed to connect to store");return}H(W.url),T({did:(J=n==null?void 0:n.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const te=Ve(W);q.error(te),A.document.write(te),u(!1)}})},k=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${n.meta.did}/${e}/logo/upload`,$=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${n.meta.did}/${e}/screenshot/upload`,D=s!=null&&s.blockletLogo?`${k}/${s.blockletLogo}`:`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,P=((s==null?void 0:s.blockletScreenshots)||[]).filter(Boolean).map(L=>`${$}/${L}`),M=()=>t?!1:!e||e===U.UNOWNED_DID?(q.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Al,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(ze,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:s.blockletTitle||"",onChange:L=>{d({blockletTitle:""}),a({blockletTitle:L.target.value})},error:!!c.blockletTitle,helperText:c.blockletTitle||""}),o.jsx(ze,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===U.UNOWNED_DID&&o.jsx(f1,{position:"end",children:o.jsx(I1,{blocklet:n,store:C,componentDid:y,onChangeStore:S,disabled:!s.blockletTitle||t||l,loading:l,onClick:I})})},error:!!c.projectId,helperText:c.projectId||"",value:e===U.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(ze,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletDescription||"",onChange:L=>{d({blockletDescription:""}),a({blockletDescription:L.target.value})},error:!!c.blockletDescription,helperText:c.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(K,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(v0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||D,onClick:()=>{M()&&w.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(K,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[P.map((L,A)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(se,{className:"action",onClick:()=>{a(H=>{const B=[...H.blockletScreenshots];return B.splice(A,1),{...H,blockletScreenshots:B}})},children:o.jsx(z2,{})})]},L)),P.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{M()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(we,{}),children:[o.jsx(l0,{ref:w,popup:!0,onUploadFinish:L=>{a({blockletLogo:L.data.filename}),g(""),w.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:k,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:t0,maxFileSize:o0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(l0,{ref:v,popup:!0,onUploadFinish:L=>{a(A=>{var B;const H=A.blockletScreenshots||[];return H.push((B=L.data)==null?void 0:B.filename),{...A,blockletScreenshots:H}}),v.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:$,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:t0,maxFileSize:o0,maxNumberOfFiles:5-P.length}}},"uploader-screenshot")]})]})}_0.propTypes={projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired,blocklet:f.object.isRequired,setLoading:f.func.isRequired,initUrl:f.object.isRequired,componentDid:f.isRequired,initLogoUrl:f.string.isRequired,setInitLogoUrl:f.func.isRequired};const Al=ie.div`
137
137
  margin-top: 24px;
138
138
  .screenshot {
139
139
  margin-bottom: 16px;
@@ -164,7 +164,7 @@ import{ao as K0,j as o,aD as re,cE as a0,aG as E,fl as O1,aF as me,aB as Ne,aC a
164
164
  width: 100%; /* 图像宽度填充容器 */
165
165
  height: auto; /* 图像高度自适应 */
166
166
  }
167
- `;var L1={},Hl=ke;Object.defineProperty(L1,"__esModule",{value:!0});var B0=L1.default=void 0,Ol=Hl(Se()),$l=o;B0=L1.default=(0,Ol.default)((0,$l.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l4.65-4.65c.2-.2.51-.2.71 0L17 13z"}),"CloudUploadRounded");function P1({blocklet:e,releaseId:t,connectedStores:l,projectId:n,releaseType:s,publishedStoreIds:a,onPublish:c,onDelete:d,projectType:u,componentDid:h,onOpenConnectStore:x,behavior:g,onSelectConnectStore:y}){var S,V;const{t:p}=le(),{actions:{refreshBlocklet:i}}=Me(),{session:m}=Ke(),{storeList:w}=N0({fromBlocklet:!0,blocklet:e,componentDid:h,userDid:(S=m==null?void 0:m.user)==null?void 0:S.did}),v=R.useMemo(()=>l!=null&&l.length?l==null?void 0:l.reduce((T,I)=>(T[I.storeId]=I,T),{}):{},[l]),C=(V=e==null?void 0:e.meta)==null?void 0:V.did;return o.jsxs(o.Fragment,{children:[g==="connect"&&!!(w!=null&&w.length)&&o.jsx(g0,{severity:"info",style:{width:"100%"},children:o.jsxs(z,{color:x2[400],component:"a",href:u==="pack"?"https://www.arcblock.io/docs/blocklet-developer/en/5PXToZve-5IXAN1bc8rkpxAc":"https://www.arcblock.io/docs/blocklet-developer/en/hB5VWLfg9VnbWsL1JGLuLUfW",target:"_blank",display:"flex",alignItems:"center",rel:"noreferrer",children:[p(u==="pack"?"blocklet.publish.whyCantSeeInStore":"blocklet.publish.whyCantSeeResourceBlockletInStore"),o.jsx(P2,{sx:{marginLeft:1}})]})}),o.jsx(a2,{children:w==null?void 0:w.map(T=>o.jsx(T2,{"data-cy":"store-switch",children:o.jsx(V2,{children:o.jsx(I2,{behavior:g,onSelectConnectStore:y,releaseId:t,projectId:n,releaseType:s,kind:"publish",teamDid:C,store:T,published:(a==null?void 0:a.indexOf(T.id))>-1,connectedStore:v[T.id],onPublish:c,onDelete:d,scope:T.scope||"studio",onOpenConnectStore:x})})},T.url))}),o.jsx(j0,{teamDid:C,storeList:w,scope:"studio",onAdd:i})]})}P1.propTypes={blocklet:f.object.isRequired,projectId:f.string.isRequired,releaseId:f.string.isRequired,releaseType:f.string.isRequired,onPublish:f.func,onDelete:f.func,publishedStoreIds:f.arrayOf(f.string),connectedStores:f.arrayOf(f.object).isRequired,projectType:f.string,componentDid:f.string,onOpenConnectStore:f.func,onSelectConnectStore:f.func,behavior:f.string};P1.defaultProps={projectType:"",componentDid:"",publishedStoreIds:[],onPublish:()=>{},onDelete:()=>{},onOpenConnectStore:()=>{},onSelectConnectStore:()=>{},behavior:"connect"};const E0=({params:e,hasSelectedResources:t,projectId:l,status:n,t:s})=>{const a=[];return e.blockletTitle||a.push({param:"blockletTitle",message:s("blocklet.publish.errorTip.noTitle")}),(!l||l===U.UNOWNED_DID)&&a.push({param:"projectId",message:s("blocklet.publish.errorTip.noDid")}),!e.uploadedResource&&!t&&a.push({param:"blockletResource",message:s("blocklet.publish.errorTip.noResource")}),e.blockletVersion?ye.valid(e.blockletVersion)||a.push({param:"blockletVersion",message:s("blocklet.publish.errorTip.inValidVersion")}):a.push({param:"blockletVersion",message:s("blocklet.publish.errorTip.noVersion")}),n===ge.PROJECT.RELEASE_STATUS.published&&(e.blockletDescription||a.push({param:"blockletDescription",message:s("blocklet.publish.errorTip.noDescription")}),e.note||a.push({param:"note",message:s("blocklet.publish.errorTip.noNote")})),a.length?a:null},Fl=({params:e,hasSelectedResources:t,step:l,t:n,projectId:s})=>{if(l===0){if(!e.blockletTitle)return n("blocklet.publish.errorTip.noTitle");if(!s||s===U.UNOWNED_DID)return n("blocklet.publish.errorTip.noDid");if(!e.blockletDescription)return n("blocklet.publish.errorTip.noDescription")}if(l===2&&!e.uploadedResource&&!t)return n("blocklet.publish.errorTip.noResource");if(l>=4){if(!e.blockletVersion)return n("blocklet.publish.errorTip.noVersion");if(!ye.valid(e.blockletVersion))return n("blocklet.publish.errorTip.inValidVersion");if(!e.note)return n("blocklet.publish.errorTip.noNote")}return""},ql=async e=>{if(typeof e!="string")throw new Error("URL must be a string");try{const t=e.split("/").pop().split("?")[0],n=await(await fetch(e)).blob();return new File([n],t,{type:n.type})}catch{throw new Error("Failed to convert Logo URL to file")}};function*Ul(e,t){let l=0;for(;l<e.size;)yield e.slice(l,l+t),l+=t}const Wl=async({did:e,projectId:t,uploadType:l="logo",imageUrl:n})=>{const s=await ql(n);new FormData().append("file",s);const c={uploaderId:"Uploader",relativePath:encodeURIComponent(s.name),name:encodeURIComponent(s.name),type:s.type},u=(await F1.post(ue(U.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/project",e,t,l,"upload"),null,{headers:{"Tus-Resumable":"1.0.0","Upload-Length":s.size,"X-Uploader-File-Ext":s.name.split(".").pop(),"Upload-Metadata":Object.keys(c).map(y=>`${y} ${btoa(c[y])}`).join(",")}})).headers.location,h=2*1024*1024;let x=0,g="";for(const y of Ul(s,h)){const p=await F1.patch(ue(U.WELLKNOWN_SERVICE_PATH_PREFIX,u),y,{headers:{"Tus-Resumable":"1.0.0","Upload-Offset":x,"Content-Type":"application/offset+octet-stream"}});x+=y.size,g=p.data.filename}return g};var i0;const Ye=(i0=window.env)==null?void 0:i0.serverEndpoint;function A0({projectId:e,params:t,setParamsErrTip:l,initUrl:n,setParams:s,mode:a,loading:c,blocklet:d,release:u,isPublished:h,releaseId:x,getData:g,getRelease:y,componentDid:p,resourceRelateComponents:i,disabledSelectComponents:m,saveSelectedEventsRef:w,hasSelectedResources:v,initLogoUrl:C,setLoading:S,releaseUsedLast:V,setReleaseUsedLast:T,projectType:I}){var pe;const{t:k,locale:$}=le(),{api:D}=je(),P=i1(),[M,L]=R.useState(!1),[A,H]=R.useState(),B=Ae(G=>G.breakpoints.down("md")),X=()=>{window.parent.postMessage({event:"studioDialog.uploaded",componentDid:p},"*"),y()},J=async G=>{var ae,Z,ce;const Y=E0({params:t,hasSelectedResources:v,projectId:e,status:G,t:k});if(Y){q.error(Y.map(_=>_.message).join("; ")),l(Y.reduce((_,O)=>({..._,[O.param]:O.message}),{}));return}const F={...t},oe=((d==null?void 0:d.children)||[]).reduce((_,O)=>(_[O.meta.did]=!0,_),{});if(Object.keys(i).forEach(_=>{if(!oe[_])return;let O=!1;m||F.blockletComponents.forEach(ee=>{ee.did===_&&(ee.included=!0,ee.required=!0,O=!0)}),O||F.blockletComponents.push({did:_,included:!0,required:!0})}),F.blockletVersion=ye.valid(F.blockletVersion),!F.blockletVersion){q.error("Invalid Blocklet Version"),l({blockletVersion:"Invalid Blocklet Version"});return}if(S(!0),C)try{const _=await Wl({did:d.meta.did,projectId:e,imageUrl:C});F.blockletLogo=_,s({blockletLogo:_})}catch(_){q.error(_.message),S(!1);return}if(t.resourceFromSelect){F.uploadedResource="";try{const _=Object.keys(w.current);await b0(_.map(O=>()=>{const ee=w.current[O];return Tl({api:D,locale:$,projectId:e,releaseId:V?"":x,appDid:d.meta.did,component:ee.component,resources:ee.resources,initUrl:n})}),{concurrency:2})}catch(_){q.error(((ce=(Z=(ae=_==null?void 0:_.response)==null?void 0:ae.data)==null?void 0:Z.error)==null?void 0:ce.message)||_.message),S(!1),l({blockletResource:"Invalid save the resource"});return}}else F.blockletComponents=[];F.blockletTitle=(F.blockletTitle||"").trim(),F.blockletDescription=(F.blockletDescription||"").trim(),F.blockletIntroduction=(F.blockletIntroduction||"").trim(),F.note=(F.note||"").trim(),F.blockletComponents=((F==null?void 0:F.blockletComponents)||[]).filter(_=>_.included).map(_=>a1(_,["did","required"])).map(JSON.stringify),S(!0),D.createRelease({input:{...F,did:d.meta.did,projectId:e,releaseId:V?"":x,status:G}}).then(_=>{var O;if(G==="draft"?q.success(k("blocklet.publish.saveDraftSuccess")):(T(!1),q.success(k("blocklet.publish.createReleaseSuccess")),window.parent.postMessage({event:"studioDialog.released",componentDid:p},"*")),l({blockletResource:"",blockletTitle:"",blockletDescription:"",blockletVersion:"",blockletLogo:"",projectId:"",blockletIntroduction:"",note:""}),a==="create"||a==="new-release"){const ee=(O=_==null?void 0:_.release)==null?void 0:O.id;P(`../${e}/view/${ee}`,{replace:!0})}else y()}).catch(_=>{const O=Ve(_);q.error(O),(/resource/.test(O)||/zip/.test(O))&&l({blockletResource:O})}).finally(()=>{S(!1)})},W=async G=>{await Bl(D,G),g()};let te=null;if(h&&Ye){const G=ue(Ye,`/api/project/${d.meta.did}/${e}/${x}/release/blocklet.json`);if(I==="pack"){const Y=new URL(Ye);Y.pathname=ue(Y.pathname,"/launch-blocklet/agreement"),Y.searchParams.set("blocklet_meta_url",G),te=o.jsx("a",{href:Y.href,target:"_blank",rel:"noreferrer",children:B?o.jsx(se,{color:"primary",sx:{mr:1},onClick:()=>H(G),children:o.jsx(qe,{icon:"ic:baseline-install-desktop"})}):o.jsx(ne,{variant:"outlined",sx:{mr:1},onClick:()=>H(G),children:k("common.install")})})}else te=o.jsxs(o.Fragment,{children:[B?o.jsx(se,{color:"primary",sx:{mr:1},onClick:()=>H(G),children:o.jsx(qe,{icon:"ic:baseline-install-desktop"})}):o.jsx(ne,{variant:"outlined",sx:{mr:1},onClick:()=>H(G),children:k("blocklet.publish.copyInstallUrl")}),o.jsx(c2,{fullWidth:!0,maxWidth:"sm",open:A,onClose:()=>H(""),children:o.jsxs(z,{sx:{py:5,px:4,wordBreak:"break-all"},children:[o.jsx(K,{variant:"h6",sx:{mb:2},children:k("blocklet.publish.installResourceTip")}),o.jsx(N2,{children:A}),o.jsxs(K,{sx:{mt:2},children:[k("blocklet.publish.installResourceTip2"),o.jsx("a",{style:{marginLeft:4},href:"https://www.arcblock.io/docs/blocklet-developer/R3weqCy7WPI8ggudt0C2alWv",target:"_blank",rel:"noreferrer",children:k("blocklet.publish.installResourceHelp")})]})]})})]})}return o.jsxs(o.Fragment,{children:[o.jsx(Gl,{className:"sticky-header",children:o.jsxs(z,{display:"flex",alignItems:"center",flexDirection:"row",children:[o.jsxs(C0,{className:"breadcrumbs","aria-label":"breadcrumb",children:[o.jsx(de,{to:"../",children:k("common.blockletStudio")}),e===U.UNOWNED_DID?o.jsx(K,{color:"text.primary",children:o.jsx(xe,{maxLength:B?6:30,children:(t==null?void 0:t.blockletTitle)||"Blocklet"})}):o.jsx(de,{to:`../${e}`,children:o.jsx(xe,{maxLength:B?6:30,children:(t==null?void 0:t.blockletTitle)||"Blocklet"})}),o.jsx(K,{color:"text.primary",children:a==="create"?k("common.create"):(t==null?void 0:t.blockletVersion)||k("common.edit")})]}),o.jsx(z,{flex:"1"}),!h&&o.jsxs(ne,{variant:"contained",disabled:c,style:{marginRight:12},onClick:()=>J(ge.PROJECT.RELEASE_STATUS.published),children:[c&&o.jsx(s1,{size:14,sx:{mr:.5},color:"inherit"}),k("blocklet.publish.createRelease")]}),h&&o.jsxs(o.Fragment,{children:[te,o.jsx("a",{href:ue(`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${d.meta.did}/${e}/${x}/download/${(u.files||[])[0]}`),children:B?null:o.jsx(ne,{variant:"outlined",sx:{mr:1},children:k("common.download")})}),o.jsxs(ne,{variant:"contained",onClick:()=>L(!0),children:[o.jsx(B0,{style:{fontSize:"1.3em",marginRight:4}}),k(B?"common.upload":"common.uploadToStore")]})]})]})}),o.jsx(d2,{title:k("common.connectToStore"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:M,onClose:()=>L(!1),children:o.jsx(P1,{projectType:I,blocklet:d,releaseType:((pe=t==null?void 0:t.blockletComponents)==null?void 0:pe.length)>0?"pack":"resource",projectId:e,releaseId:x,componentDid:p,onPublish:X,onOpenConnectStore:W,onDelete:g,connectedStores:t.connectedStores||[],publishedStoreIds:u==null?void 0:u.publishedStoreIds})})]})}A0.propTypes={projectId:f.string.isRequired,params:f.object.isRequired,mode:f.string.isRequired,loading:f.bool.isRequired,blocklet:f.object.isRequired,release:f.object.isRequired,isPublished:f.bool.isRequired,releaseId:f.string.isRequired,getData:f.func.isRequired,getRelease:f.func.isRequired,componentDid:f.string.isRequired,resourceRelateComponents:f.object.isRequired,disabledSelectComponents:f.bool.isRequired,saveSelectedEventsRef:f.object.isRequired,hasSelectedResources:f.bool.isRequired,initLogoUrl:f.string.isRequired,setLoading:f.func.isRequired,releaseUsedLast:f.bool.isRequired,setReleaseUsedLast:f.func.isRequired,projectType:f.string.isRequired,setParamsErrTip:f.func.isRequired,setParams:f.func.isRequired,initUrl:f.object.isRequired};const Gl=ie.div`
167
+ `;var L1={},Hl=ke;Object.defineProperty(L1,"__esModule",{value:!0});var B0=L1.default=void 0,Ol=Hl(Se()),$l=o;B0=L1.default=(0,Ol.default)((0,$l.jsx)("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96M14 13v4h-4v-4H7l4.65-4.65c.2-.2.51-.2.71 0L17 13z"}),"CloudUploadRounded");function P1({blocklet:e,releaseId:t,connectedStores:l,projectId:n,releaseType:s,publishedStoreIds:a,onPublish:c,onDelete:d,projectType:u,componentDid:h,onOpenConnectStore:x,behavior:g,onSelectConnectStore:y}){var S,V;const{t:p}=le(),{actions:{refreshBlocklet:i}}=Me(),{session:m}=Ke(),{storeList:w}=N0({fromBlocklet:!0,blocklet:e,componentDid:h,userDid:(S=m==null?void 0:m.user)==null?void 0:S.did}),v=R.useMemo(()=>l!=null&&l.length?l==null?void 0:l.reduce((T,I)=>(T[I.storeId]=I,T),{}):{},[l]),C=(V=e==null?void 0:e.meta)==null?void 0:V.did;return o.jsxs(o.Fragment,{children:[g==="connect"&&!!(w!=null&&w.length)&&o.jsx(g0,{severity:"info",style:{width:"100%"},children:o.jsxs(z,{color:x2[400],component:"a",href:u==="pack"?"https://www.arcblock.io/docs/blocklet-developer/en/5PXToZve-5IXAN1bc8rkpxAc":"https://www.arcblock.io/docs/blocklet-developer/en/hB5VWLfg9VnbWsL1JGLuLUfW",target:"_blank",display:"flex",alignItems:"center",rel:"noreferrer",children:[p(u==="pack"?"blocklet.publish.whyCantSeeInStore":"blocklet.publish.whyCantSeeResourceBlockletInStore"),o.jsx(P2,{sx:{marginLeft:1}})]})}),o.jsx(a2,{children:w==null?void 0:w.map(T=>o.jsx(T2,{"data-cy":"store-switch",children:o.jsx(V2,{children:o.jsx(I2,{behavior:g,onSelectConnectStore:y,releaseId:t,projectId:n,releaseType:s,kind:"publish",teamDid:C,store:T,published:(a==null?void 0:a.indexOf(T.id))>-1,connectedStore:v[T.id],onPublish:c,onDelete:d,scope:T.scope||"studio",onOpenConnectStore:x})})},T.url))}),o.jsx(j0,{teamDid:C,storeList:w,scope:"studio",onAdd:i})]})}P1.propTypes={blocklet:f.object.isRequired,projectId:f.string.isRequired,releaseId:f.string.isRequired,releaseType:f.string.isRequired,onPublish:f.func,onDelete:f.func,publishedStoreIds:f.arrayOf(f.string),connectedStores:f.arrayOf(f.object).isRequired,projectType:f.string,componentDid:f.string,onOpenConnectStore:f.func,onSelectConnectStore:f.func,behavior:f.string};P1.defaultProps={projectType:"",componentDid:"",publishedStoreIds:[],onPublish:()=>{},onDelete:()=>{},onOpenConnectStore:()=>{},onSelectConnectStore:()=>{},behavior:"connect"};const E0=({params:e,hasSelectedResources:t,projectId:l,status:n,t:s})=>{const a=[];return e.blockletTitle||a.push({param:"blockletTitle",message:s("blocklet.publish.errorTip.noTitle")}),(!l||l===U.UNOWNED_DID)&&a.push({param:"projectId",message:s("blocklet.publish.errorTip.noDid")}),!e.uploadedResource&&!t&&a.push({param:"blockletResource",message:s("blocklet.publish.errorTip.noResource")}),e.blockletVersion?ye.valid(e.blockletVersion)||a.push({param:"blockletVersion",message:s("blocklet.publish.errorTip.inValidVersion")}):a.push({param:"blockletVersion",message:s("blocklet.publish.errorTip.noVersion")}),n===ge.PROJECT.RELEASE_STATUS.published&&(e.blockletDescription||a.push({param:"blockletDescription",message:s("blocklet.publish.errorTip.noDescription")}),e.note||a.push({param:"note",message:s("blocklet.publish.errorTip.noNote")})),a.length?a:null},Fl=({params:e,hasSelectedResources:t,step:l,t:n,projectId:s})=>{if(l===0){if(!e.blockletTitle)return n("blocklet.publish.errorTip.noTitle");if(!s||s===U.UNOWNED_DID)return n("blocklet.publish.errorTip.noDid");if(!e.blockletDescription)return n("blocklet.publish.errorTip.noDescription")}if(l===2&&!e.uploadedResource&&!t)return n("blocklet.publish.errorTip.noResource");if(l>=4){if(!e.blockletVersion)return n("blocklet.publish.errorTip.noVersion");if(!ye.valid(e.blockletVersion))return n("blocklet.publish.errorTip.inValidVersion");if(!e.note)return n("blocklet.publish.errorTip.noNote")}return""},ql=async e=>{if(typeof e!="string")throw new Error("URL must be a string");try{const t=e.split("/").pop().split("?")[0],n=await(await fetch(e)).blob();return new File([n],t,{type:n.type})}catch{throw new Error("Failed to convert Logo URL to file")}};function*Ul(e,t){let l=0;for(;l<e.size;)yield e.slice(l,l+t),l+=t}const Wl=async({did:e,projectId:t,uploadType:l="logo",imageUrl:n})=>{const s=await ql(n);new FormData().append("file",s);const c={uploaderId:"Uploader",relativePath:encodeURIComponent(s.name),name:encodeURIComponent(s.name),type:s.type},u=(await F1.post(ue(U.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/project",e,t,l,"upload"),null,{headers:{"Tus-Resumable":"1.0.0","Upload-Length":s.size,"X-Uploader-File-Ext":s.name.split(".").pop(),"Upload-Metadata":Object.keys(c).map(y=>`${y} ${btoa(c[y])}`).join(",")}})).headers.location,h=2*1024*1024;let x=0,g="";for(const y of Ul(s,h)){const p=await F1.patch(ue(U.WELLKNOWN_SERVICE_PATH_PREFIX,u),y,{headers:{"Tus-Resumable":"1.0.0","Upload-Offset":x,"Content-Type":"application/offset+octet-stream"}});x+=y.size,g=p.data.filename}return g};var i0;const Ye=(i0=window.env)==null?void 0:i0.serverEndpoint;function A0({projectId:e,params:t,setParamsErrTip:l,initUrl:n,setParams:s,mode:a,loading:c,blocklet:d,release:u,isPublished:h,releaseId:x,getData:g,getRelease:y,componentDid:p,resourceRelateComponents:i,disabledSelectComponents:m,saveSelectedEventsRef:w,hasSelectedResources:v,initLogoUrl:C,setLoading:S,releaseUsedLast:V,setReleaseUsedLast:T,projectType:I}){var pe;const{t:k,locale:$}=le(),{api:D}=je(),P=i1(),[M,L]=R.useState(!1),[A,H]=R.useState(),B=Ae(G=>G.breakpoints.down("md")),X=()=>{window.parent.postMessage({event:"studioDialog.uploaded",componentDid:p},"*"),y()},J=async G=>{var ae,Z,ce;const Y=E0({params:t,hasSelectedResources:v,projectId:e,status:G,t:k});if(Y){q.error(Y.map(_=>_.message).join("; ")),l(Y.reduce((_,O)=>({..._,[O.param]:O.message}),{}));return}const F={...t},oe=((d==null?void 0:d.children)||[]).reduce((_,O)=>(_[O.meta.did]=!0,_),{});if(Object.keys(i).forEach(_=>{if(!oe[_])return;let O=!1;m||F.blockletComponents.forEach(ee=>{ee.did===_&&(ee.included=!0,ee.required=!0,O=!0)}),O||F.blockletComponents.push({did:_,included:!0,required:!0})}),F.blockletVersion=ye.valid(F.blockletVersion),!F.blockletVersion){q.error("Invalid Blocklet Version"),l({blockletVersion:"Invalid Blocklet Version"});return}if(S(!0),C)try{const _=await Wl({did:d.meta.did,projectId:e,imageUrl:C});F.blockletLogo=_,s({blockletLogo:_})}catch(_){q.error(_.message),S(!1);return}if(t.resourceFromSelect){F.uploadedResource="";try{const _=Object.keys(w.current);await b0(_.map(O=>()=>{const ee=w.current[O];return Tl({api:D,locale:$,projectId:e,releaseId:V?"":x,appDid:d.meta.did,component:ee.component,resources:ee.resources,initUrl:n})}),{concurrency:2})}catch(_){q.error(((ce=(Z=(ae=_==null?void 0:_.response)==null?void 0:ae.data)==null?void 0:Z.error)==null?void 0:ce.message)||_.message),S(!1),l({blockletResource:"Invalid save the resource"});return}}else F.blockletComponents=[];F.blockletTitle=(F.blockletTitle||"").trim(),F.blockletDescription=(F.blockletDescription||"").trim(),F.blockletIntroduction=(F.blockletIntroduction||"").trim(),F.note=(F.note||"").trim(),F.blockletComponents=((F==null?void 0:F.blockletComponents)||[]).filter(_=>_.included).map(_=>a1(_,["did","required"])).map(JSON.stringify),S(!0),D.createRelease({input:{...F,did:d.meta.did,projectId:e,releaseId:V?"":x,status:G}}).then(_=>{var O;if(G==="draft"?q.success(k("blocklet.publish.saveDraftSuccess")):(T(!1),q.success(k("blocklet.publish.createReleaseSuccess")),window.parent.postMessage({event:"studioDialog.released",componentDid:p},"*")),l({blockletResource:"",blockletTitle:"",blockletDescription:"",blockletVersion:"",blockletLogo:"",projectId:"",blockletIntroduction:"",note:""}),a==="create"||a==="new-release"){const ee=(O=_==null?void 0:_.release)==null?void 0:O.id;P(`../${e}/view/${ee}`,{replace:!0})}else y()}).catch(_=>{const O=Ve(_);q.error(O),(/resource/.test(O)||/zip/.test(O))&&l({blockletResource:O})}).finally(()=>{S(!1)})},W=async G=>{await Bl(D,G),g()};let te=null;if(h&&Ye){const G=ue(Ye,`/api/project/${d.meta.did}/${e}/${x}/release/blocklet.json`);if(I==="pack"){const Y=new URL(Ye);Y.pathname=ue(Y.pathname,"/launch-blocklet/agreement"),Y.searchParams.set("blocklet_meta_url",G),te=o.jsx("a",{href:Y.href,target:"_blank",rel:"noreferrer",children:B?o.jsx(se,{color:"primary",sx:{mr:1},onClick:()=>H(G),children:o.jsx(qe,{icon:"ic:baseline-install-desktop"})}):o.jsx(ne,{variant:"outlined",sx:{mr:1},onClick:()=>H(G),children:k("common.install")})})}else te=o.jsxs(o.Fragment,{children:[B?o.jsx(se,{color:"primary",sx:{mr:1},onClick:()=>H(G),children:o.jsx(qe,{icon:"ic:baseline-install-desktop"})}):o.jsx(ne,{variant:"outlined",sx:{mr:1},onClick:()=>H(G),children:k("blocklet.publish.copyInstallUrl")}),o.jsx(c2,{fullWidth:!0,maxWidth:"sm",open:A,onClose:()=>H(""),children:o.jsxs(z,{sx:{py:5,px:4,wordBreak:"break-all"},children:[o.jsx(K,{variant:"h6",sx:{mb:2},children:k("blocklet.publish.installResourceTip")}),o.jsx(N2,{children:A}),o.jsxs(K,{sx:{mt:2},children:[k("blocklet.publish.installResourceTip2"),o.jsx("a",{style:{marginLeft:4},href:"https://www.arcblock.io/docs/blocklet-developer/R3weqCy7WPI8ggudt0C2alWv",target:"_blank",rel:"noreferrer",children:k("blocklet.publish.installResourceHelp")})]})]})})]})}return o.jsxs(o.Fragment,{children:[o.jsx(Gl,{className:"sticky-header",children:o.jsxs(z,{display:"flex",alignItems:"center",flexDirection:"row",children:[o.jsxs(C0,{className:"breadcrumbs","aria-label":"breadcrumb",children:[o.jsx(de,{to:"../",children:k("common.blockletStudio")}),e===U.UNOWNED_DID?o.jsx(K,{color:"text.primary",children:o.jsx(xe,{maxLength:B?6:30,children:(t==null?void 0:t.blockletTitle)||"Blocklet"})}):o.jsx(de,{to:`../${e}`,children:o.jsx(xe,{maxLength:B?6:30,children:(t==null?void 0:t.blockletTitle)||"Blocklet"})}),o.jsx(K,{color:"text.primary",children:a==="create"?k("common.create"):(t==null?void 0:t.blockletVersion)||k("common.edit")})]}),o.jsx(z,{flex:"1"}),!h&&o.jsxs(ne,{variant:"contained",disabled:c,style:{marginRight:12},onClick:()=>J(ge.PROJECT.RELEASE_STATUS.published),children:[c&&o.jsx(s1,{size:14,sx:{mr:.5},color:"inherit"}),k("blocklet.publish.createRelease")]}),h&&o.jsxs(o.Fragment,{children:[te,o.jsx("a",{href:ue(`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${d.meta.did}/${e}/${x}/download/${(u.files||[])[0]}`),children:B?null:o.jsx(ne,{variant:"outlined",sx:{mr:1},children:k("common.download")})}),o.jsxs(ne,{variant:"contained",onClick:()=>L(!0),children:[o.jsx(B0,{style:{fontSize:"1.3em",marginRight:4}}),k(B?"common.upload":"common.uploadToStore")]})]})]})}),o.jsx(d2,{title:k("blocklet.publish.connectOrUpload"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:M,onClose:()=>L(!1),children:o.jsx(P1,{projectType:I,blocklet:d,releaseType:((pe=t==null?void 0:t.blockletComponents)==null?void 0:pe.length)>0?"pack":"resource",projectId:e,releaseId:x,componentDid:p,onPublish:X,onOpenConnectStore:W,onDelete:g,connectedStores:t.connectedStores||[],publishedStoreIds:u==null?void 0:u.publishedStoreIds})})]})}A0.propTypes={projectId:f.string.isRequired,params:f.object.isRequired,mode:f.string.isRequired,loading:f.bool.isRequired,blocklet:f.object.isRequired,release:f.object.isRequired,isPublished:f.bool.isRequired,releaseId:f.string.isRequired,getData:f.func.isRequired,getRelease:f.func.isRequired,componentDid:f.string.isRequired,resourceRelateComponents:f.object.isRequired,disabledSelectComponents:f.bool.isRequired,saveSelectedEventsRef:f.object.isRequired,hasSelectedResources:f.bool.isRequired,initLogoUrl:f.string.isRequired,setLoading:f.func.isRequired,releaseUsedLast:f.bool.isRequired,setReleaseUsedLast:f.func.isRequired,projectType:f.string.isRequired,setParamsErrTip:f.func.isRequired,setParams:f.func.isRequired,initUrl:f.object.isRequired};const Gl=ie.div`
168
168
  .sticky-header {
169
169
  margin-top: -12px;
170
170
  padding: 12px 0;
@@ -178,7 +178,7 @@ import{ao as K0,j as o,aD as re,cE as a0,aG as E,fl as O1,aF as me,aB as Ne,aC a
178
178
  padding-bottom: 12px;
179
179
  border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
180
180
  }
181
- `;function H0({text:e}){return e?o.jsx(D2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[_2,{target:"_blank"}]]}):o.jsx(be,{Icon:He})}H0.propTypes={text:f.string.isRequired};function O0({params:e,setParams:t,paramsErrTip:l,loading:n,setParamsErrTip:s,readOnly:a}){var x;const{t:c}=le(),[d,u]=R.useState(a?"preview":"write"),h=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(K,{variant:"h6",fontWeight:"bold",sx:{},children:c("common.introduction")}),o.jsxs(b2,{value:d,onChange:h,"aria-label":"wrapped label tabs example",children:[o.jsx(U1,{value:"write",label:"Write"}),o.jsx(U1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:d==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(ze,{disabled:n||a,sx:{border:"none"},placeholder:`Blocklet ${c("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:a,endAdornment:o.jsxs(f1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ge.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{s({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ge.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:d==="preview"?"block":"none",mt:3,children:o.jsx(H0,{text:e.blockletIntroduction||""})})]})}O0.propTypes={params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,readOnly:f.bool.isRequired,loading:f.bool.isRequired};var T1={},Kl=ke;Object.defineProperty(T1,"__esModule",{value:!0});var $0=T1.default=void 0,Xl=Kl(Se()),r0=o;$0=T1.default=(0,Xl.default)([(0,r0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,r0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function V1({step:e,ok:t,active:l,error:n}){let s="grey.500",a=e+1;return t&&(a=o.jsx(B2,{sx:{fontSize:18,margin:0},color:"white"})),n||!t&&l>e?(s="error.main",a=o.jsx($0,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(s="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:s,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:a})}V1.propTypes={step:f.number,ok:f.bool,active:f.number,error:f.string};V1.defaultProps={step:0,ok:!1,active:0,error:""};function F0({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:n,params:s,loading:a,paramsErrTip:c,viewMode:d,projectId:u}){const{t:h}=le(),x=()=>{l(i=>i+1)},g=()=>{l(i=>i-1)},y=i=>i===0?(c==null?void 0:c.blockletTitle)||(c==null?void 0:c.projectId)||(c==null?void 0:c.blockletDescription):i===2?c==null?void 0:c.blockletResource:i>=4?(c==null?void 0:c.blockletVersion)||(c==null?void 0:c.note):"",p=d||E0({hasSelectedResources:n,params:s,projectId:u,t:h})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(A2,{activeStep:t,orientation:"vertical",children:e.map((i,m)=>{const w={},v=a||!Fl({hasSelectedResources:n,params:s,projectId:u,step:m,t:h}),C=a?"":y(m);return C&&(w.optional=o.jsx(K,{variant:"caption",color:"error",children:C}),w.error=!0),o.jsxs(H2,{children:[o.jsx(ct,{icon:o.jsx(V1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...w,children:o.jsx(K,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:i.label})}),o.jsxs(mt,{children:[o.jsx(K,{fontSize:12,children:i.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:h("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:h("common.back")})]})})]})]},i.label)})}),t>=e.length-1&&o.jsx(h0,{square:!0,elevation:0,sx:{p:3},children:o.jsx(K,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}F0.propTypes={steps:f.array.isRequired,activeStep:f.number.isRequired,setActiveStep:f.func.isRequired,params:f.object.isRequired,viewMode:f.string.isRequired,loading:f.bool.isRequired,projectId:f.string.isRequired,hasSelectedResources:f.bool.isRequired,paramsErrTip:f.shape({projectId:f.string,blockletVersion:f.string,blockletTitle:f.string,blockletDescription:f.string,note:f.string,blockletResource:f.string}).isRequired};function Ue({readOnly:e,params:t,setParams:l,paramsErrTip:n,setParamsErrTip:s,loading:a}){var d;const{t:c}=le();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(ze,{required:!0,disabled:a||e,label:`Blocklet ${c("common.version")}`,placeholder:`Blocklet ${c("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{s({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!n.blockletVersion,helperText:n.blockletVersion||""}),o.jsx(ze,{label:c("blocklet.publish.releaseNote"),autoComplete:"off",disabled:a||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(f1,{position:"end",children:[((d=t==null?void 0:t.note)==null?void 0:d.length)||0," / ",ge.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{s({note:""}),l({note:u.target.value.slice(0,ge.PROJECT.MAX_NOTE_LENGTH)})},error:!!n.note,helperText:n.note||"",sx:{mt:3}})]})})}Ue.propTypes={readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired};Ue.defaultProps={};const Jl=[".zip",".gz"],Ql=1024*1024*100,Yl=R.lazy(()=>f0(()=>import("./react-Beg8saxn.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])).then(e=>({default:e.Uploader})));function N1({app:e,projectId:t,readOnly:l,params:n,setParams:s,setParamsErrTip:a,error:c}){const{t:d}=le(),u=R.useRef(null),h=()=>l?!1:!t||t===U.UNOWNED_DID?(q.error(d("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(K,{gutterBottom:!0,children:d("blocklet.publish.resourceUpload")}),o.jsxs(w2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!n.uploadedResource&&o.jsx(K,{component:"a",href:`${x}/params.uploadedResource`,children:n.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;h()&&((g=u.current)==null||g.open())},children:n.uploadedResource?d("common.change"):d("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(we,{}),children:o.jsx(Yl,{ref:u,popup:!0,onUploadFinish:g=>{var y;s({uploadedResource:g.data.filename}),a({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:Jl,maxFileSize:Ql,maxNumberOfFiles:1}}},"uploader-resource")}),!!c&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:c})]})}N1.propTypes={app:f.object.isRequired,projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,error:f.string.isRequired,setParamsErrTip:f.func.isRequired};N1.defaultProps={};const Zl=({tabs:e,blocklet:t,ancestors:l=[]})=>{const n=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(p1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},n),value:n})},n0=(e,t)=>{const l=a1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(n=>({...n,included:!0})):l.blockletComponents=(t.children||[]).map(n=>({did:n.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},e3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},s0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function D1({initUrl:e,...t}){var H1;const{projectId:l,mode:n,releaseId:s,componentDid:a=""}=Ge(),{t:c}=le(),{blocklet:d}=Me(),[u,h]=Ce({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Ce({}),[y,p]=R.useState(!1),[i,m]=Ce(null),{api:w}=je(),v=Ae(N=>N.breakpoints.down("md")),[C,S]=R.useState({}),[V,T]=R.useState(!1),I=R.useRef({}),[k,$]=Ce({}),[D,P]=R.useState(""),[M,L]=Ce({}),A=e==null?void 0:e.searchParams.get("dependentComponentsMode"),H=A==="readonly",B=R.useCallback(N=>{H&&h({blockletComponents:[]}),L(N)},[H,L,h]),X=R.useCallback((...N)=>{$(...N),g({blockletResource:""})},[]),J=s==="none"?(u==null?void 0:u.lastReleaseId)||"":s,[W,te]=R.useState(n==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const pe=R.useMemo(()=>{var N;return(N=u==null?void 0:u.blockletComponents)!=null&&N.some(Q=>Q.included)||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource]),G=[],Y=((d==null?void 0:d.children)||[]).filter(N=>{var Q;return(Q=N.meta.resource)==null?void 0:Q.exportApi}).filter(N=>!a||N.meta.did===a);Y.forEach(N=>{Zl({tabs:G,blocklet:N,t:c,ancestors:[d]})});const[F,oe]=R.useState((H1=G[0])==null?void 0:H1.value),ae=!V&&(i==null?void 0:i.status)==="published",Z=ae,ce=R.useMemo(()=>{const N={};return Object.keys(M).forEach(Q=>{const Oe=M[Q];Oe&&Oe.forEach(G0=>{N[G0]=!0})}),N},[M]),_=async()=>{if(J)try{const N=await w.getRelease({input:{did:d.meta.did,projectId:l,releaseId:J}});if(p(!1),!N.release){q.error("Release not found");return}n!=="view"&&(N.release.note=""),h(Q=>n0({...Q,...N.release,blockletVersion:n==="create"||n==="new-release"?ye.inc(N.release.blockletVersion,"patch"):N.release.blockletVersion},d)),m(N.release)}catch(N){p(!1),q.error(Ve(N))}},O=async()=>{if(l===U.UNOWNED_DID){h({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){q.error(c("blocklet.publish.errorTip.noDid"));return}try{const N=await w.getProject({input:{did:d.meta.did,projectId:l}});p(!1);const Q=N.project||{};Q.blockletVersion?(n==="create"||n==="new-release")&&ye.valid(Q.blockletVersion)&&(Q.blockletVersion=ye.inc(Q.blockletVersion,"patch")):Q.blockletVersion="1.0.0";const Oe=n0(Q,d);h(Oe)}catch(N){p(!1),q.error(Ve(N))}},ee=R.useCallback(async()=>{if(n==="view"){if(!J){q.error("Empty release id");return}await O(),await _();return}await O(),J&&(T(!0),await _())},[n,J]),Le=N=>{h({blockletComponents:N})};R.useEffect(()=>{ee()},[ee]),R.useEffect(()=>{if(l===U.UNOWNED_DID&&(n==="create"||n==="new-release")&&e){P(e.searchParams.get("logo")),h({blockletTitle:e.searchParams.get("title"),blockletDescription:e.searchParams.get("description"),blockletIntroduction:e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:e.searchParams.get("note")||"No note"});const N=e.searchParams.get("resources");try{const Q=JSON.parse(N);S(Q)}catch{}}},[h,l,e,n]);const _1=R.useMemo(()=>!!Object.keys(k).find(N=>!!k[N].length),[k]);if(!u&&y)return o.jsx(we,{});if(!u)return null;const B1=Y.find(N=>N.meta.did===F);if(Y.every(N=>N.status!=="running"))return o.jsx(be,{children:c("blocklet.publish.allComponentsNotRunning")});const U0=N=>{oe(N)},E1=e==null?void 0:e.searchParams.get("resourcesTitle"),A1=e==null?void 0:e.searchParams.get("componentsTitle"),Re=[{label:c("blocklet.publish.branding"),description:c("blocklet.publish.steps.branding")},{label:c("common.introduction"),description:c("blocklet.publish.steps.introduction")},{label:E1||c("blocklet.publish.resourceTitle"),description:c("blocklet.publish.steps.resources")},{label:A1||c("common.components"),description:c("blocklet.publish.steps.blocklets")},{label:c("blocklet.publish.versionTitle"),description:c("blocklet.publish.steps.version")}],W0=Re[W]||Re[Re.length-1],ve=e3[W];return o.jsxs(t3,{...t,children:[o.jsx(A0,{blocklet:d,release:i,getData:ee,getRelease:_,mode:n,params:u,setParams:h,setParamsErrTip:g,readOnly:Z,isPublished:ae,loading:y,setLoading:p,initLogoUrl:D,releaseId:J,projectId:l,projectType:pe,resourceComponents:Y,resourceComponentsMap:M,resourceRelateComponents:ce,resourceItem:B1,saveSelectedEventsRef:I,hasSelectedResources:_1,releaseUsedLast:V,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(F0,{steps:Re,viewMode:n==="view",params:u,hasSelectedResources:_1||u.uploadedResource,paramsErrTip:x,activeStep:W,setActiveStep:te,projectId:l,resourcesUrlTitle:E1,componentsUrlTitle:A1}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&ve!=="introduction"&&o.jsxs(K,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[W0.label,ve==="branding"&&o.jsx(fe,{title:c("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(g2,{})})})]}),(v||ve==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(_0,{projectId:l,setParams:h,setParamsErrTip:g,params:u,componentDid:a,blocklet:d,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Z,initLogoUrl:D,setInitLogoUrl:P})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(Ue,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:Z})}),(v||ve==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(O0,{loading:y,readOnly:Z,params:u,setParams:h,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Re[s0.resources].label}),o.jsx(z,{display:v||ve==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(O2,{onChange:()=>h({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(t1,{value:"select",disabled:Z,control:o.jsx(W1,{size:"small",checked:u.resourceFromSelect}),label:c("blocklet.publish.resourceSelect")}),o.jsx(t1,{value:"select",disabled:Z,control:o.jsx(W1,{size:"small",checked:!u.resourceFromSelect}),label:c("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!a&&o.jsx(j2,{tabs:G,current:F,onChange:U0,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(M1,{loading:y,initialResources:C,saveSelectedEventsRef:I,selectedResourceIds:k,setSelectedResourceIds:X,setResourceComponentsMap:B,error:x.blockletResource,app:d,readOnly:Z,component:B1,componentDid:a,initUrl:e,params:u,setParams:h,projectId:l===U.UNOWNED_DID?"":l,releaseUsedLast:V,release:{...i,id:J}})]}),!u.resourceFromSelect&&o.jsx(N1,{app:d,readOnly:Z,projectId:l===U.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:h,setParamsErrTip:g})]})})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Re[s0.blocklets].label}),(v||ve==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(w1,{projectType:pe,disabled:y||Z,app:d,value:(u==null?void 0:u.blockletComponents)||[],onChange:Le,resourceRelateComponents:ce,dependentComponentsMode:A})})})}),!v&&ve==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(Ue,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:Z})})]})]})]})]})}D1.propTypes={initUrl:f.object};D1.defaultProps={initUrl:null};const t3=ie.div`
181
+ `;function H0({text:e}){return e?o.jsx(D2,{wrapperElement:{"data-color-mode":"light"},source:e,rehypePlugins:[[_2,{target:"_blank"}]]}):o.jsx(be,{Icon:He})}H0.propTypes={text:f.string.isRequired};function O0({params:e,setParams:t,paramsErrTip:l,loading:n,setParamsErrTip:s,readOnly:a}){var x;const{t:c}=le(),[d,u]=R.useState(a?"preview":"write"),h=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(K,{variant:"h6",fontWeight:"bold",sx:{},children:c("common.introduction")}),o.jsxs(b2,{value:d,onChange:h,"aria-label":"wrapped label tabs example",children:[o.jsx(U1,{value:"write",label:"Write"}),o.jsx(U1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:d==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(ze,{disabled:n||a,sx:{border:"none"},placeholder:`Blocklet ${c("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:a,endAdornment:o.jsxs(f1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ge.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{s({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ge.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:d==="preview"?"block":"none",mt:3,children:o.jsx(H0,{text:e.blockletIntroduction||""})})]})}O0.propTypes={params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,readOnly:f.bool.isRequired,loading:f.bool.isRequired};var T1={},Kl=ke;Object.defineProperty(T1,"__esModule",{value:!0});var $0=T1.default=void 0,Xl=Kl(Se()),r0=o;$0=T1.default=(0,Xl.default)([(0,r0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,r0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function V1({step:e,ok:t,active:l,error:n}){let s="grey.500",a=e+1;return t&&(a=o.jsx(B2,{sx:{fontSize:18,margin:0},color:"white"})),n||!t&&l>e?(s="error.main",a=o.jsx($0,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(s="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:s,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:a})}V1.propTypes={step:f.number,ok:f.bool,active:f.number,error:f.string};V1.defaultProps={step:0,ok:!1,active:0,error:""};function F0({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:n,params:s,loading:a,paramsErrTip:c,viewMode:d,projectId:u}){const{t:h}=le(),x=()=>{l(i=>i+1)},g=()=>{l(i=>i-1)},y=i=>i===0?(c==null?void 0:c.blockletTitle)||(c==null?void 0:c.projectId)||(c==null?void 0:c.blockletDescription):i===2?c==null?void 0:c.blockletResource:i>=4?(c==null?void 0:c.blockletVersion)||(c==null?void 0:c.note):"",p=d||E0({hasSelectedResources:n,params:s,projectId:u,t:h})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(A2,{activeStep:t,orientation:"vertical",children:e.map((i,m)=>{const w={},v=a||!Fl({hasSelectedResources:n,params:s,projectId:u,step:m,t:h}),C=a?"":y(m);return C&&(w.optional=o.jsx(K,{variant:"caption",color:"error",children:C}),w.error=!0),o.jsxs(H2,{children:[o.jsx(ct,{icon:o.jsx(V1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...w,children:o.jsx(K,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:i.label})}),o.jsxs(mt,{children:[o.jsx(K,{fontSize:12,children:i.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:h("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:h("common.back")})]})})]})]},i.label)})}),t>=e.length-1&&o.jsx(h0,{square:!0,elevation:0,sx:{p:3},children:o.jsx(K,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}F0.propTypes={steps:f.array.isRequired,activeStep:f.number.isRequired,setActiveStep:f.func.isRequired,params:f.object.isRequired,viewMode:f.string.isRequired,loading:f.bool.isRequired,projectId:f.string.isRequired,hasSelectedResources:f.bool.isRequired,paramsErrTip:f.shape({projectId:f.string,blockletVersion:f.string,blockletTitle:f.string,blockletDescription:f.string,note:f.string,blockletResource:f.string}).isRequired};function Ue({readOnly:e,params:t,setParams:l,paramsErrTip:n,setParamsErrTip:s,loading:a}){var d;const{t:c}=le();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(ze,{required:!0,disabled:a||e,label:`Blocklet ${c("common.version")}`,placeholder:`Blocklet ${c("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{s({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!n.blockletVersion,helperText:n.blockletVersion||""}),o.jsx(ze,{label:c("blocklet.publish.releaseNote"),autoComplete:"off",disabled:a||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(f1,{position:"end",children:[((d=t==null?void 0:t.note)==null?void 0:d.length)||0," / ",ge.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{s({note:""}),l({note:u.target.value.slice(0,ge.PROJECT.MAX_NOTE_LENGTH)})},error:!!n.note,helperText:n.note||"",sx:{mt:3}})]})})}Ue.propTypes={readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,paramsErrTip:f.object.isRequired,setParamsErrTip:f.func.isRequired,loading:f.bool.isRequired};Ue.defaultProps={};const Jl=[".zip",".gz"],Ql=1024*1024*100,Yl=R.lazy(()=>f0(()=>import("./react-D-F09R4E.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45])).then(e=>({default:e.Uploader})));function N1({app:e,projectId:t,readOnly:l,params:n,setParams:s,setParamsErrTip:a,error:c}){const{t:d}=le(),u=R.useRef(null),h=()=>l?!1:!t||t===U.UNOWNED_DID?(q.error(d("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${U.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(K,{gutterBottom:!0,children:d("blocklet.publish.resourceUpload")}),o.jsxs(w2,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!n.uploadedResource&&o.jsx(K,{component:"a",href:`${x}/params.uploadedResource`,children:n.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;h()&&((g=u.current)==null||g.open())},children:n.uploadedResource?d("common.change"):d("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(we,{}),children:o.jsx(Yl,{ref:u,popup:!0,onUploadFinish:g=>{var y;s({uploadedResource:g.data.filename}),a({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:Jl,maxFileSize:Ql,maxNumberOfFiles:1}}},"uploader-resource")}),!!c&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:c})]})}N1.propTypes={app:f.object.isRequired,projectId:f.string.isRequired,readOnly:f.bool.isRequired,params:f.object.isRequired,setParams:f.func.isRequired,error:f.string.isRequired,setParamsErrTip:f.func.isRequired};N1.defaultProps={};const Zl=({tabs:e,blocklet:t,ancestors:l=[]})=>{const n=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(p1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},n),value:n})},n0=(e,t)=>{const l=a1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(n=>({...n,included:!0})):l.blockletComponents=(t.children||[]).map(n=>({did:n.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},e3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},s0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function D1({initUrl:e,...t}){var H1;const{projectId:l,mode:n,releaseId:s,componentDid:a=""}=Ge(),{t:c}=le(),{blocklet:d}=Me(),[u,h]=Ce({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Ce({}),[y,p]=R.useState(!1),[i,m]=Ce(null),{api:w}=je(),v=Ae(N=>N.breakpoints.down("md")),[C,S]=R.useState({}),[V,T]=R.useState(!1),I=R.useRef({}),[k,$]=Ce({}),[D,P]=R.useState(""),[M,L]=Ce({}),A=e==null?void 0:e.searchParams.get("dependentComponentsMode"),H=A==="readonly",B=R.useCallback(N=>{H&&h({blockletComponents:[]}),L(N)},[H,L,h]),X=R.useCallback((...N)=>{$(...N),g({blockletResource:""})},[]),J=s==="none"?(u==null?void 0:u.lastReleaseId)||"":s,[W,te]=R.useState(n==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const pe=R.useMemo(()=>{var N;return(N=u==null?void 0:u.blockletComponents)!=null&&N.some(Q=>Q.included)||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource]),G=[],Y=((d==null?void 0:d.children)||[]).filter(N=>{var Q;return(Q=N.meta.resource)==null?void 0:Q.exportApi}).filter(N=>!a||N.meta.did===a);Y.forEach(N=>{Zl({tabs:G,blocklet:N,t:c,ancestors:[d]})});const[F,oe]=R.useState((H1=G[0])==null?void 0:H1.value),ae=!V&&(i==null?void 0:i.status)==="published",Z=ae,ce=R.useMemo(()=>{const N={};return Object.keys(M).forEach(Q=>{const Oe=M[Q];Oe&&Oe.forEach(G0=>{N[G0]=!0})}),N},[M]),_=async()=>{if(J)try{const N=await w.getRelease({input:{did:d.meta.did,projectId:l,releaseId:J}});if(p(!1),!N.release){q.error("Release not found");return}n!=="view"&&(N.release.note=""),h(Q=>n0({...Q,...N.release,blockletVersion:n==="create"||n==="new-release"?ye.inc(N.release.blockletVersion,"patch"):N.release.blockletVersion},d)),m(N.release)}catch(N){p(!1),q.error(Ve(N))}},O=async()=>{if(l===U.UNOWNED_DID){h({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){q.error(c("blocklet.publish.errorTip.noDid"));return}try{const N=await w.getProject({input:{did:d.meta.did,projectId:l}});p(!1);const Q=N.project||{};Q.blockletVersion?(n==="create"||n==="new-release")&&ye.valid(Q.blockletVersion)&&(Q.blockletVersion=ye.inc(Q.blockletVersion,"patch")):Q.blockletVersion="1.0.0";const Oe=n0(Q,d);h(Oe)}catch(N){p(!1),q.error(Ve(N))}},ee=R.useCallback(async()=>{if(n==="view"){if(!J){q.error("Empty release id");return}await O(),await _();return}await O(),J&&(T(!0),await _())},[n,J]),Le=N=>{h({blockletComponents:N})};R.useEffect(()=>{ee()},[ee]),R.useEffect(()=>{if(l===U.UNOWNED_DID&&(n==="create"||n==="new-release")&&e){P(e.searchParams.get("logo")),h({blockletTitle:e.searchParams.get("title"),blockletDescription:e.searchParams.get("description"),blockletIntroduction:e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:e.searchParams.get("note")||"No note"});const N=e.searchParams.get("resources");try{const Q=JSON.parse(N);S(Q)}catch{}}},[h,l,e,n]);const _1=R.useMemo(()=>!!Object.keys(k).find(N=>!!k[N].length),[k]);if(!u&&y)return o.jsx(we,{});if(!u)return null;const B1=Y.find(N=>N.meta.did===F);if(Y.every(N=>N.status!=="running"))return o.jsx(be,{children:c("blocklet.publish.allComponentsNotRunning")});const U0=N=>{oe(N)},E1=e==null?void 0:e.searchParams.get("resourcesTitle"),A1=e==null?void 0:e.searchParams.get("componentsTitle"),Re=[{label:c("blocklet.publish.branding"),description:c("blocklet.publish.steps.branding")},{label:c("common.introduction"),description:c("blocklet.publish.steps.introduction")},{label:E1||c("blocklet.publish.resourceTitle"),description:c("blocklet.publish.steps.resources")},{label:A1||c("common.components"),description:c("blocklet.publish.steps.blocklets")},{label:c("blocklet.publish.versionTitle"),description:c("blocklet.publish.steps.version")}],W0=Re[W]||Re[Re.length-1],ve=e3[W];return o.jsxs(t3,{...t,children:[o.jsx(A0,{blocklet:d,release:i,getData:ee,getRelease:_,mode:n,params:u,setParams:h,setParamsErrTip:g,readOnly:Z,isPublished:ae,loading:y,setLoading:p,initLogoUrl:D,releaseId:J,projectId:l,projectType:pe,resourceComponents:Y,resourceComponentsMap:M,resourceRelateComponents:ce,resourceItem:B1,saveSelectedEventsRef:I,hasSelectedResources:_1,releaseUsedLast:V,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(F0,{steps:Re,viewMode:n==="view",params:u,hasSelectedResources:_1||u.uploadedResource,paramsErrTip:x,activeStep:W,setActiveStep:te,projectId:l,resourcesUrlTitle:E1,componentsUrlTitle:A1}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&ve!=="introduction"&&o.jsxs(K,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[W0.label,ve==="branding"&&o.jsx(fe,{title:c("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(g2,{})})})]}),(v||ve==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(_0,{projectId:l,setParams:h,setParamsErrTip:g,params:u,componentDid:a,blocklet:d,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Z,initLogoUrl:D,setInitLogoUrl:P})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(Ue,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:Z})}),(v||ve==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(O0,{loading:y,readOnly:Z,params:u,setParams:h,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Re[s0.resources].label}),o.jsx(z,{display:v||ve==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(O2,{onChange:()=>h({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(t1,{value:"select",disabled:Z,control:o.jsx(W1,{size:"small",checked:u.resourceFromSelect}),label:c("blocklet.publish.resourceSelect")}),o.jsx(t1,{value:"select",disabled:Z,control:o.jsx(W1,{size:"small",checked:!u.resourceFromSelect}),label:c("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!a&&o.jsx(j2,{tabs:G,current:F,onChange:U0,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(M1,{loading:y,initialResources:C,saveSelectedEventsRef:I,selectedResourceIds:k,setSelectedResourceIds:X,setResourceComponentsMap:B,error:x.blockletResource,app:d,readOnly:Z,component:B1,componentDid:a,initUrl:e,params:u,setParams:h,projectId:l===U.UNOWNED_DID?"":l,releaseUsedLast:V,release:{...i,id:J}})]}),!u.resourceFromSelect&&o.jsx(N1,{app:d,readOnly:Z,projectId:l===U.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:h,setParamsErrTip:g})]})})}),v&&o.jsx(K,{variant:"h6",fontWeight:"bold",mt:5,children:Re[s0.blocklets].label}),(v||ve==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(w1,{projectType:pe,disabled:y||Z,app:d,value:(u==null?void 0:u.blockletComponents)||[],onChange:Le,resourceRelateComponents:ce,dependentComponentsMode:A})})})}),!v&&ve==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(Ue,{loading:y,params:u,paramsErrTip:x,setParams:h,setParamsErrTip:g,readOnly:Z})})]})]})]})]})}D1.propTypes={initUrl:f.object};D1.defaultProps={initUrl:null};const t3=ie.div`
182
182
  .section {
183
183
  &.full-width {
184
184
  max-width: 100%;