@abtnode/blocklet-services 1.16.25-beta-cfcab4af → 1.16.25-beta-023ec101

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 (193) hide show
  1. package/api/routes/user-session.js +16 -7
  2. package/api/services/auth/connect/connect-to-did-spaces-for-user.js +5 -2
  3. package/dist/assets/{Add-LHUM0Ma8.js → Add-1xjpewz5.js} +1 -1
  4. package/dist/assets/Alert-YuViHXR0.js +1 -0
  5. package/dist/assets/{ArrowDropDown-Xwz8I9dw.js → ArrowDropDown-Rc9AhI_a.js} +1 -1
  6. package/dist/assets/{Avatar-d1HBhAcf.js → Avatar-9aQtHFLk.js} +1 -1
  7. package/dist/assets/{ButtonGroup-JTRmfxdD.js → ButtonGroup-jKO-Guf2.js} +1 -1
  8. package/dist/assets/{CheckCircle-s0z0jpJ6.js → CheckCircle-ke9PV1Jo.js} +1 -1
  9. package/dist/assets/{ChevronRight-aPnLeTB4.js → ChevronRight-EqClP1jF.js} +1 -1
  10. package/dist/assets/{CloseOutlined--dnfQa2n.js → CloseOutlined-hMQSiN1m.js} +1 -1
  11. package/dist/assets/{Delete-jNg2gv9v.js → Delete-scHxyggC.js} +1 -1
  12. package/dist/assets/{DeleteOutline--3VOI5hj.js → DeleteOutline-A2WcZEL3.js} +1 -1
  13. package/dist/assets/{Done-WCFuEG8h.js → Done-wQQBOr6B.js} +1 -1
  14. package/dist/assets/{Download-MRLPGnEV.js → Download-mcEPTVsB.js} +1 -1
  15. package/dist/assets/{Edit-e1kdlpe-.js → Edit-YatIW2f9.js} +1 -1
  16. package/dist/assets/{EditIcon-W-Wd8PWd.js → EditIcon-QPa0yvDo.js} +1 -1
  17. package/dist/assets/{ExpandMore-inn6pwGR.js → ExpandMore-WQg_8AV_.js} +1 -1
  18. package/dist/assets/{FilterList-_UU_tsIc.js → FilterList-ZQnUABNq.js} +4 -4
  19. package/dist/assets/{FormControl-8O72uE8H.js → FormControl-uhlBMMeK.js} +1 -1
  20. package/dist/assets/{FormControlLabel-r9q0VfRf.js → FormControlLabel-N6kIDqLm.js} +1 -1
  21. package/dist/assets/FormGroup-rl0ncWja.js +1 -0
  22. package/dist/assets/{Google-frjvLhqb.js → Google-3itK6SDp.js} +4 -4
  23. package/dist/assets/{Grid-GelBsPE2.js → Grid-MyqNT_XI.js} +1 -1
  24. package/dist/assets/Hidden-_SJ5u7tx.js +1 -0
  25. package/dist/assets/{InfoOutlined-aFlSmEQY.js → InfoOutlined-13l9OVN9.js} +1 -1
  26. package/dist/assets/{InputAdornment-ZGszKDvC.js → InputAdornment-N_ls3xJ4.js} +1 -1
  27. package/dist/assets/{InputLabel-OaHIlADE.js → InputLabel-SMyOIavk.js} +1 -1
  28. package/dist/assets/{LastPage-JawdTEAU.js → LastPage-3di6NtYt.js} +1 -1
  29. package/dist/assets/{Launch-N5MXzc59.js → Launch-P3Da3bZZ.js} +1 -1
  30. package/dist/assets/{LaunchOutlined-UDaO4b_K.js → LaunchOutlined-mrxtQV97.js} +1 -1
  31. package/dist/assets/{Link-eUvm2eyV.js → Link-7Neb7it0.js} +1 -1
  32. package/dist/assets/{ListItem-jR0DTbV4.js → ListItem-cIUZMF-7.js} +1 -1
  33. package/dist/assets/{ListItemText-JpoZJL1W.js → ListItemText-IXOBm0cf.js} +1 -1
  34. package/dist/assets/{LockIcon-zz3rFvQ4.js → LockIcon-gBex87Ym.js} +1 -1
  35. package/dist/assets/{Loop-OCjMxbSV.js → Loop-zO4IKHCl.js} +1 -1
  36. package/dist/assets/{MoreHoriz-sd7FCyPf.js → MoreHoriz-ek7Nm6hB.js} +1 -1
  37. package/dist/assets/{MoreVert-w2xJDuVT.js → MoreVert-_uT0_c7b.js} +1 -1
  38. package/dist/assets/{OpenInNew-UfLZPW1_.js → OpenInNew-nofe5889.js} +1 -1
  39. package/dist/assets/{Pagination-ivSNMkKH.js → Pagination-djVDlUwo.js} +1 -1
  40. package/dist/assets/{PlayArrow-VPEfVDyh.js → PlayArrow-9AIbf2JB.js} +1 -1
  41. package/dist/assets/{RadioGroup-m7_mgPuS.js → RadioGroup-WNCDuKso.js} +1 -1
  42. package/dist/assets/{Search-y1h18Mub.js → Search-DtHNRy-_.js} +1 -1
  43. package/dist/assets/{Select-6x_KXv7T.js → Select-ZFaqiDJM.js} +2 -2
  44. package/dist/assets/{ServerLogo-63QQHvC5.js → ServerLogo-KUADR2j_.js} +1 -1
  45. package/dist/assets/{Skeleton-P-w29KVi.js → Skeleton-SeywxR_J.js} +5 -5
  46. package/dist/assets/{Slider-tLdXZYtt.js → Slider-wcQ5Rqj4.js} +1 -1
  47. package/dist/assets/{Stepper-k_1sc-Jz.js → Stepper-q1JEHRw_.js} +1 -1
  48. package/dist/assets/{TableRow-j1fbGnXk.js → TableRow-I6sJG9EK.js} +2 -2
  49. package/dist/assets/{TextField-BmfH05Zr.js → TextField-jXLk3dBz.js} +1 -1
  50. package/dist/assets/{Toolbar-qIgYu3q0.js → Toolbar-mzmmamgr.js} +1 -1
  51. package/dist/assets/{ViewList-IUiaZyFJ.js → ViewList-29-ldnDJ.js} +1 -1
  52. package/dist/assets/access-control-CNPOvL0K.js +13 -0
  53. package/dist/assets/{actions-utWI_Fdq.js → actions--ExXZSNH.js} +1 -1
  54. package/dist/assets/{add-component-core-nv0BkT-1.js → add-component-core-AWDlul8a.js} +1 -1
  55. package/dist/assets/add-resource-4KoBgrFL.js +1 -0
  56. package/dist/assets/{addon-WH4aidA7.js → addon-vKvaZGRr.js} +1 -1
  57. package/dist/assets/{analytics-Q8r2CWze.js → analytics-DsvfaYT1.js} +1 -1
  58. package/dist/assets/api-udTY28jX.js +1 -0
  59. package/dist/assets/{audit-logs-If0sv5d-.js → audit-logs-QCKJG7-1.js} +1 -1
  60. package/dist/assets/{button-wMY8RkVx.js → button-OI_TnVbM.js} +1 -1
  61. package/dist/assets/{click-to-copy-rNYVmm1q.js → click-to-copy-BRCse-Wz.js} +1 -1
  62. package/dist/assets/{complete-MWi1D0CT.js → complete-9v17qSvS.js} +4 -4
  63. package/dist/assets/{component-eJU_VSuZ.js → component-ViuQ7BtB.js} +14 -14
  64. package/dist/assets/{config-H3UQNIPq.js → config-2xfTL0EP.js} +2 -2
  65. package/dist/assets/{config-pJYUgz7W.js → config-EHHMqHx0.js} +1 -1
  66. package/dist/assets/{config-navigation-xnnDHqk-.js → config-navigation-e2l7CPQR.js} +5 -5
  67. package/dist/assets/{config-space-DKKLcIG0.js → config-space-wmwjKlqw.js} +1 -1
  68. package/dist/assets/confirm-6i9aFJCn.js +7 -0
  69. package/dist/assets/connect-4keuHeoZ.js +1 -0
  70. package/dist/assets/{connect-GahP7mCS.js → connect-qBTgXpaR.js} +2 -2
  71. package/dist/assets/connect-to-TiAkNxml.js +54 -0
  72. package/dist/assets/{content-layout-Yl1I61Iu.js → content-layout-GrNKlEQV.js} +1 -1
  73. package/dist/assets/{dashboard-kM0LM1rk.js → dashboard-tQLMMfJg.js} +8 -8
  74. package/dist/assets/{did-address-LWSNRm3U.js → did-address-WwpjYrtA.js} +1 -1
  75. package/dist/assets/domain-list-1_oDAnPh.js +12 -0
  76. package/dist/assets/{domain-5EDkOwwC.js → domain-tr6r_UMb.js} +2 -2
  77. package/dist/assets/{exchange-passport-7k1iz_0l.js → exchange-passport-Ijn_kYAQ.js} +1 -1
  78. package/dist/assets/{fallback-WjzTKaZb.js → fallback-ETW39yfj.js} +1 -1
  79. package/dist/assets/{fuel-FzmgRd-b.js → fuel-VDUkYZna.js} +1 -1
  80. package/dist/assets/{fullpage-i6iNi4_E.js → fullpage-v-iCwd7f.js} +1 -1
  81. package/dist/assets/{home-cQPSY8mb.js → home-DgLQAE23.js} +1 -1
  82. package/dist/assets/iframe-q_1J1n-b.js +1 -0
  83. package/dist/assets/{index-Lz-j33m0.js → index-0B3E9YjN.js} +8 -8
  84. package/dist/assets/{index-tggg7yzj.js → index-3tErDQl8.js} +1 -1
  85. package/dist/assets/{index-QvTDYv6X.js → index-4kDY-bSj.js} +144 -140
  86. package/dist/assets/{index-ZxfDwv5M.js → index-6U66PG3E.js} +3 -3
  87. package/dist/assets/{index-yxeCKWVh.js → index-BKumN6cR.js} +9 -9
  88. package/dist/assets/{index-fSGfbmCJ.js → index-BMAuMxsS.js} +1 -1
  89. package/dist/assets/index-DGEurGvE.js +717 -0
  90. package/dist/assets/{index-KaOUc2JH.js → index-G4TxIvAp.js} +1 -1
  91. package/dist/assets/{index-br4owYtx.js → index-NenHSVdJ.js} +1 -1
  92. package/dist/assets/{index-xp4s9IF1.js → index-PmX2brdr.js} +1 -1
  93. package/dist/assets/{index-xmLBpv45.js → index-Q1D-v2CS.js} +8 -8
  94. package/dist/assets/{index-ucFrSwXM.js → index-T8BvO7dt.js} +1 -1
  95. package/dist/assets/{index-xNeqsXvu.js → index-VWcGKp0G.js} +7 -7
  96. package/dist/assets/{index-yNszdAyn.js → index-Wv-uKXkq.js} +1 -1
  97. package/dist/assets/{index-vOzMfhG6.js → index-X8tXLwEv.js} +1 -1
  98. package/dist/assets/{index-oDR_sdyF.js → index-XABOL4Cf.js} +4 -4
  99. package/dist/assets/{index-_N7xFgV-.js → index-XNap50fg.js} +4 -4
  100. package/dist/assets/index-YKC2_Ouj.js +54 -0
  101. package/dist/assets/{index-uKQPc1-9.js → index-ZurHVOEn.js} +1 -1
  102. package/dist/assets/{index-epYuva3d.js → index-_s10R5me.js} +1 -1
  103. package/dist/assets/index-aTjQzm8I.js +1 -0
  104. package/dist/assets/{index-Zdfw2Jfh.js → index-e8Ezqc-n.js} +6 -6
  105. package/dist/assets/{index-cxMd9OmR.js → index-eyD4-V0s.js} +2 -2
  106. package/dist/assets/{index-vmnxboIT.js → index-gPARl_mw.js} +9 -9
  107. package/dist/assets/{index-oXD9dbMK.js → index-j48DdoEE.js} +1 -1
  108. package/dist/assets/{index-0D-f55vh.js → index-jukXaf0T.js} +1 -1
  109. package/dist/assets/index-oX6ioTmv.js +13 -0
  110. package/dist/assets/{index-zRf18La_.js → index-zdDzzHGv.js} +1 -1
  111. package/dist/assets/{index.es-OKnxTnLl.js → index.es-cuYnRO1R.js} +1 -1
  112. package/dist/assets/{index.esm-OcETBuDV.js → index.esm-l6cHPFrX.js} +1 -1
  113. package/dist/assets/{invitation-k0Q9cGc5.js → invitation-ac8O4T1a.js} +4 -4
  114. package/dist/assets/invite-ueC-4iwH.js +10 -0
  115. package/dist/assets/issue-passport-CQWhwvK8.js +1 -0
  116. package/dist/assets/{jss-plugin-props-sort.esm-aXihcMq2.js → jss-plugin-props-sort.esm-RN3Leah8.js} +4 -4
  117. package/dist/assets/{launch-result-message-d1r2NgCX.js → launch-result-message-HL7WtQax.js} +1 -1
  118. package/dist/assets/{layout-QckOi3Xm.js → layout-KwmEpyp8.js} +2 -2
  119. package/dist/assets/{list-header--_n-b43_.js → list-header-qIurILxB.js} +1 -1
  120. package/dist/assets/localization-EH1WSSLi.js +1 -0
  121. package/dist/assets/{log-mnS-TdXn.js → log-zFf0FaGZ.js} +1 -1
  122. package/dist/assets/login-orwLXiGe.js +1 -0
  123. package/dist/assets/{logo-uploader--_qtondy.js → logo-uploader-pbrzf7fZ.js} +3 -3
  124. package/dist/assets/lost-passport-6yhNIjcr.js +169 -0
  125. package/dist/assets/{lottie-E1ACRA3E.js → lottie-JicrabNG.js} +1 -1
  126. package/dist/assets/notifications-onoefmlH.js +62 -0
  127. package/dist/assets/overview-yiXGL8WF.js +12 -0
  128. package/dist/assets/{page-header-qF7_fzR9.js → page-header-V9g_8wUw.js} +1 -1
  129. package/dist/assets/{permission-hEOP1h9W.js → permission-nnd28XX_.js} +2 -2
  130. package/dist/assets/{preferences-eB-0C2Rp.js → preferences-eEqZ5uQK.js} +1 -1
  131. package/dist/assets/publish-resource-B7UXpZpR.js +1 -0
  132. package/dist/assets/{react-bSUPw7ox.js → react-MJeba7Rg.js} +3 -3
  133. package/dist/assets/{redux-x1KHLUJG.js → redux-OK0ujNpx.js} +1 -1
  134. package/dist/assets/selector-txSzpZlr.js +46 -0
  135. package/dist/assets/session-h_IEacYq.js +1 -0
  136. package/dist/assets/setup-GiqAdSWH.js +19 -0
  137. package/dist/assets/{slicedToArray-5KNWz95O.js → slicedToArray-dek_0zgb.js} +2 -2
  138. package/dist/assets/{spaces-N2F_E-8K.js → spaces-NK4D6ncf.js} +1 -1
  139. package/dist/assets/start-uMXI514L.js +186 -0
  140. package/dist/assets/step-actions-j3CTqYOL.js +31 -0
  141. package/dist/assets/{studio-FAm6rdv-.js → studio-tqUMyPBq.js} +1 -1
  142. package/dist/assets/{switch-control-uAEmC3pq.js → switch-control-ZS1uFr1m.js} +1 -1
  143. package/dist/assets/{toUpper-9pPJLyHS.js → toUpper-ihNYSzdF.js} +1 -1
  144. package/dist/assets/transfer-ObR11h3I.js +16 -0
  145. package/dist/assets/ua-parser-7BcsJkdX.js +57 -0
  146. package/dist/assets/{uniqBy-MWaAHDmW.js → uniqBy-m8IpmIgG.js} +1 -1
  147. package/dist/assets/{unsubscribe-Gdf5yrA3.js → unsubscribe-0hGCO_md.js} +1 -1
  148. package/dist/assets/{use-blocklet-info-for-connect-did-spaces-IlLt-w7P.js → use-blocklet-info-for-connect-did-spaces-i25gbjM1.js} +1 -1
  149. package/dist/assets/useAsync-aUvdlcvx.js +1 -0
  150. package/dist/assets/{useFormControl-htyncNn_.js → useFormControl--zZqKVme.js} +1 -1
  151. package/dist/assets/{useLocalStorage-lFajT5Wt.js → useLocalStorage-wRnP8MV2.js} +1 -1
  152. package/dist/assets/{useSetState-VkVh8FSU.js → useSetState-a6PKN2ar.js} +1 -1
  153. package/dist/assets/{useSlot-o8ZWnVB_.js → useSlot-O2pDH7jV.js} +1 -1
  154. package/dist/assets/user-center-Fsr-Vmdi.js +1 -0
  155. package/dist/assets/user-sessions-XuCGOd7a.js +1 -0
  156. package/dist/assets/{util-SlxoUgsk.js → util-E7015j19.js} +1 -1
  157. package/dist/assets/{wrap-locale-rzaw8fdM.js → wrap-locale-A1nf8NiP.js} +1 -1
  158. package/dist/index.html +1 -1
  159. package/dist/service-worker.js +1 -1
  160. package/package.json +24 -23
  161. package/dist/assets/Alert-Jwofj9zD.js +0 -1
  162. package/dist/assets/FormGroup-G3i9ndxk.js +0 -1
  163. package/dist/assets/Hidden-mW8rjJ7H.js +0 -1
  164. package/dist/assets/access-control-S02_icFp.js +0 -13
  165. package/dist/assets/add-resource-V5SSdovk.js +0 -1
  166. package/dist/assets/api-ovvSdkBc.js +0 -1
  167. package/dist/assets/confirm-Ol9jrnEp.js +0 -7
  168. package/dist/assets/connect-3iNlPsJr.js +0 -1
  169. package/dist/assets/connect-to-y8-mTLBV.js +0 -54
  170. package/dist/assets/domain-list--f1cwe1D.js +0 -12
  171. package/dist/assets/iframe-5UjW2V6n.js +0 -1
  172. package/dist/assets/index-ZOtBXjp4.js +0 -13
  173. package/dist/assets/index-be-g3mUI.js +0 -54
  174. package/dist/assets/index-goHsxnhy.js +0 -721
  175. package/dist/assets/index-pDR9mJ-H.js +0 -1
  176. package/dist/assets/invite-TXEzfZdZ.js +0 -10
  177. package/dist/assets/issue-passport-lqc3DCzl.js +0 -1
  178. package/dist/assets/localization-q0_ZXoZr.js +0 -1
  179. package/dist/assets/login-3qKyn_VS.js +0 -1
  180. package/dist/assets/lost-passport-bODnf323.js +0 -169
  181. package/dist/assets/notifications-SZg6UK6X.js +0 -62
  182. package/dist/assets/overview-4G67JAUI.js +0 -12
  183. package/dist/assets/publish-resource-9ALgGTpI.js +0 -1
  184. package/dist/assets/selector-8FMpyB2D.js +0 -46
  185. package/dist/assets/session-daRjp05u.js +0 -1
  186. package/dist/assets/setup-q9HSByQU.js +0 -19
  187. package/dist/assets/start-QdHpx1u3.js +0 -186
  188. package/dist/assets/step-actions-OuZVbtQC.js +0 -31
  189. package/dist/assets/transfer-izCLI9R_.js +0 -16
  190. package/dist/assets/ua-parser-UbVJZWQu.js +0 -57
  191. package/dist/assets/useAsync-fFB3zXQe.js +0 -1
  192. package/dist/assets/user-center--CwIbbon.js +0 -1
  193. package/dist/assets/user-sessions-98WzThR8.js +0 -1
@@ -1,4 +1,4 @@
1
- var bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var D=(e,t,n)=>(yt(e,typeof t!="symbol"?t+"":t,n),n);import{aB as xt,cq as wt,cI as vt,aE as W,b$ as V,r as A,aI as It,aD as Ct,aJ as ve,cl as St,c1 as Tt,j as m,aG as Ie,aH as At,P as f,H as Pt,h as jt,ax as kt,bz as Ce,br as Lt,bs as Mt,cX as Ot,ad as Rt,G as P,bp as _t,B as Et,bG as Nt,T as qt,cY as Ft,W as $t,cZ as Bt,bM as De,u as Ve,ay as zt,V as Ht,Y as Dt}from"./index-QvTDYv6X.js";import{D as Vt}from"./index-goHsxnhy.js";import{l as R,g as Ut,L as Gt}from"./ListItem-jR0DTbV4.js";import{L as Qt}from"./selector-8FMpyB2D.js";const Wt=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Zt=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Jt=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:s,divider:i,selected:a}=e,l=At({root:["root",r&&"dense",!s&&"gutters",i&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Ut,n);return W({},n,l)},Yt=xt(wt,{shouldForwardProp:e=>vt(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Zt})(({theme:e,ownerState:t})=>W({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${R.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${R.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${R.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${R.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${R.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Xt=A.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:s=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:g}=r,b=Ct(r,Wt),x=A.useContext(ve),C=A.useMemo(()=>({dense:c||x.dense||!1,alignItems:o,disableGutters:l}),[o,x.dense,c,l]),T=A.useRef(null);St(()=>{s&&T.current&&T.current.focus()},[s]);const w=W({},r,{alignItems:o,dense:C.dense,disableGutters:l,divider:u,selected:p}),y=Jt(w),O=Tt(T,n);return m.jsx(ve.Provider,{value:C,children:m.jsx(Yt,W({ref:O,href:b.href||b.to,component:(b.href||b.to)&&i==="div"?"button":i,focusVisibleClassName:Ie(y.focusVisible,d),ownerState:w,className:Ie(y.root,g)},b,{classes:y,children:a}))})}),Kt=Xt;/**
1
+ var bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var D=(e,t,n)=>(yt(e,typeof t!="symbol"?t+"":t,n),n);import{aC as xt,cr as wt,cJ as vt,aF as Z,c0 as V,r as A,aJ as It,aE as Ct,aK as ve,cm as St,c2 as Tt,j as m,aH as Ie,aI as At,P as f,I as Pt,h as jt,ay as kt,bA as Ce,bs as Lt,bt as Mt,cY as Ot,ae as Rt,G as P,bq as _t,B as Et,bH as Nt,T as qt,cZ as Ft,c_ as $t,X as Bt,c$ as zt,bN as De,u as Ve,az as Ht,W as Dt,Z as Vt}from"./index-4kDY-bSj.js";import{D as Ut}from"./index-DGEurGvE.js";import{l as R,g as Qt,L as Wt}from"./ListItem-cIUZMF-7.js";import{L as Zt}from"./selector-txSzpZlr.js";const Gt=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Jt=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Xt=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:s,divider:i,selected:a}=e,l=At({root:["root",r&&"dense",!s&&"gutters",i&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},Qt,n);return Z({},n,l)},Yt=xt(wt,{shouldForwardProp:e=>vt(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Jt})(({theme:e,ownerState:t})=>Z({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${R.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${R.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${R.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:V(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:V(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${R.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${R.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.alignItems==="flex-start"&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4})),Kt=A.forwardRef(function(t,n){const r=It({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:s=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:g}=r,b=Ct(r,Gt),x=A.useContext(ve),C=A.useMemo(()=>({dense:c||x.dense||!1,alignItems:o,disableGutters:l}),[o,x.dense,c,l]),T=A.useRef(null);St(()=>{s&&T.current&&T.current.focus()},[s]);const w=Z({},r,{alignItems:o,dense:C.dense,disableGutters:l,divider:u,selected:p}),y=Xt(w),O=Tt(T,n);return m.jsx(ve.Provider,{value:C,children:m.jsx(Yt,Z({ref:O,href:b.href||b.to,component:(b.href||b.to)&&i==="div"?"button":i,focusVisibleClassName:Ie(y.focusVisible,d),ownerState:w,className:Ie(y.root,g)},b,{classes:y,children:a}))})}),en=Kt;/**
2
2
  * (c) Iconify
3
3
  *
4
4
  * For the full copyright and license information, please view the license.txt
@@ -8,10 +8,10 @@ var bt=Object.defineProperty;var yt=(e,t,n)=>t in e?bt(e,t,{enumerable:!0,config
8
8
  *
9
9
  * @license MIT
10
10
  * @version 1.0.8
11
- */const Ue=Object.freeze({left:0,top:0,width:16,height:16}),Z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),B=Object.freeze({...Ue,...Z}),se=Object.freeze({...B,body:"",hidden:!1}),en=Object.freeze({width:null,height:null}),Ge=Object.freeze({...en,...Z});function tn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const nn=/[\s,]+/;function on(e,t){t.split(nn).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Qe={...Ge,preserveAspectRatio:""};function Se(e){const t={...Qe},n=(r,o)=>e.getAttribute(r)||o;return t.width=n("width",null),t.height=n("height",null),t.rotate=tn(n("rotate","")),on(t,n("flip","")),t.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),t}function rn(e,t){for(const n in Qe)if(e[n]!==t[n])return!0;return!1}const E=/^[a-z0-9]+(-[a-z0-9]+)*$/,z=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return t&&!G(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!G(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return t&&!G(a,n)?null:a}return null},G=(e,t)=>e?!!((e.provider===""||e.provider.match(E))&&(t&&e.prefix===""||e.prefix.match(E))&&e.name.match(E)):!1;function sn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Te(e,t){const n=sn(e,t);for(const r in se)r in Z?r in e&&!(r in n)&&(n[r]=Z[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function cn(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function an(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(a){s=Te(r[a]||o[a],s)}return i(t),n.forEach(i),Te(e,s)}function We(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=cn(e);for(const o in r){const s=r[o];s&&(t(o,an(e,o,s)),n.push(o))}return n}const ln={provider:"",aliases:{},not_found:{},...Ue};function te(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Ze(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!te(e,ln))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(E)||typeof s.body!="string"||!te(s,se))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(E)||typeof i!="string"||!n[i]&&!r[i]||!te(s,se))return null}return t}const J=Object.create(null);function un(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function k(e,t){const n=J[e]||(J[e]=Object.create(null));return n[t]||(n[t]=un(e,t))}function pe(e,t){return Ze(t)?We(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function fn(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function dn(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(J)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(J[o]||{})).forEach(i=>{const a=k(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let q=!1;function Je(e){return typeof e=="boolean"&&(q=e),q}function F(e){const t=typeof e=="string"?z(e,!0,q):e;if(t){const n=k(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Ye(e,t){const n=z(e,!0,q);if(!n)return!1;const r=k(n.provider,n.prefix);return fn(r,n.name,t)}function Ae(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),q&&!t&&!e.prefix){let o=!1;return Ze(e)&&(e.prefix="",We(e,(s,i)=>{i&&Ye(s,i)&&(o=!0)})),o}const n=e.prefix;if(!G({provider:t,prefix:n,name:"a"}))return!1;const r=k(t,n);return!!pe(r,e)}function pn(e){return!!F(e)}function hn(e){const t=F(e);return t?{...B,...t}:null}function gn(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=k(s,i));let u;a in l.icons?u=t.loaded:i===""||l.missing.has(a)?u=t.missing:u=t.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),t}function Xe(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function mn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(e.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(e.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Xe([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let bn=0;function yn(e,t,n){const r=bn++,o=Xe.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const ie=Object.create(null);function Pe(e,t){ie[e]=t}function ce(e){return ie[e]||ie[""]}function xn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?z(o,t,n):o;s&&r.push(s)}),r}var wn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function vn(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let h=e.resources.slice(0);for(i=[];h.length>1;){const I=Math.floor(Math.random()*h.length);i.push(h[I]),h=h.slice(0,I).concat(h.slice(I+1))}i=i.concat(h)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],g=[];typeof r=="function"&&g.push(r);function b(){d&&(clearTimeout(d),d=null)}function x(){c==="pending"&&(c="aborted"),b(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function C(h,I){I&&(g=[]),typeof h=="function"&&g.push(h)}function T(){return{startTime:a,payload:t,status:c,queriesSent:l,queriesPending:p.length,subscribe:C,abort:x}}function w(){c="failed",g.forEach(h=>{h(void 0,u)})}function y(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function O(h,I,j){const S=I!=="success";switch(p=p.filter(L=>L!==h),c){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){u=j,w();return}if(S){u=j,p.length||(i.length?v():w());return}if(b(),y(),!e.random){const L=e.resources.indexOf(h.resource);L!==-1&&L!==e.index&&(e.index=L)}c="completed",g.forEach(L=>{L(j)})}function v(){if(c!=="pending")return;b();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{b(),c==="pending"&&(y(),w())},e.timeout);return}w();return}const I={status:"pending",resource:h,callback:(j,S)=>{O(I,j,S)}};p.push(I),l++,d=setTimeout(v,e.rotate),n(h,t,I.callback)}return setTimeout(v),T}function Ke(e){const t={...wn,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=vn(t,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function he(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const K=Object.create(null),_=["https://api.simplesvg.com","https://api.unisvg.com"],Q=[];for(;_.length>0;)_.length===1||Math.random()>.5?Q.push(_.shift()):Q.push(_.pop());K[""]=he({resources:["https://api.iconify.design"].concat(Q)});function je(e,t){const n=he(t);return n===null?!1:(K[e]=n,!0)}function ee(e){return K[e]}function In(){return Object.keys(K)}function ke(){}const ne=Object.create(null);function Cn(e){if(!ne[e]){const t=ee(e);if(!t)return;const n=Ke(t),r={config:t,redundancy:n};ne[e]=r}return ne[e]}function et(e,t,n){let r,o;if(typeof e=="string"){const s=ce(e);if(!s)return n(void 0,424),ke;o=s.send;const i=Cn(e);i&&(r=i.redundancy)}else{const s=he(e);if(s){r=Ke(s);const i=e.resources?e.resources[0]:"",a=ce(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),ke):r.query(t,o,n)().abort}const Le="iconify2",$="iconify",tt=$+"-count",Me=$+"-version",nt=36e5,Sn=168;function ae(e,t){try{return e.getItem(t)}catch{}}function ge(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Oe(e,t){try{e.removeItem(t)}catch{}}function le(e,t){return ge(e,tt,t.toString())}function ue(e){return parseInt(ae(e,tt))||0}const M={local:!0,session:!0},ot={local:new Set,session:new Set};let me=!1;function Tn(e){me=e}let U=typeof window>"u"?{}:window;function rt(e){const t=e+"Storage";try{if(U&&U[t]&&typeof U[t].length=="number")return U[t]}catch{}M[e]=!1}function st(e,t){const n=rt(e);if(!n)return;const r=ae(n,Me);if(r!==Le){if(r){const a=ue(n);for(let c=0;c<a;c++)Oe(n,$+c.toString())}ge(n,Me,Le),le(n,0);return}const o=Math.floor(Date.now()/nt)-Sn,s=a=>{const c=$+a.toString(),l=ae(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,a))return!0}catch{}Oe(n,c)}};let i=ue(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,le(n,i)):ot[e].add(a))}function it(){if(!me){Tn(!0);for(const e in M)st(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=k(r,o);if(!pe(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function An(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in M)st(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Pn(e,t){me||it();function n(r){let o;if(!M[r]||!(o=rt(r)))return;const s=ot[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=ue(o),!le(o,i+1))return;const a={cached:Math.floor(Date.now()/nt),provider:e.provider,data:t};return ge(o,$+i.toString(),JSON.stringify(a))}t.lastModified&&!An(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Re(){}function jn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,mn(e)}))}function kn(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ce(n)))return;s.prepare(n,r,o).forEach(a=>{et(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{e.missing.add(l)});else try{const l=pe(e,c);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),Pn(e,c)}catch(l){console.error(l)}jn(e)})})}))}const be=(e,t)=>{const n=xn(e,!0,Je()),r=gn(n);if(!r.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(r.loaded,r.missing,r.pending,Re)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(k(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=k(l,u),g=p.pendingIcons||(p.pendingIcons=new Set);g.has(d)||(g.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&kn(c,o[l][u])}),t?yn(t,r,s):Re},Ln=e=>new Promise((t,n)=>{const r=typeof e=="string"?z(e,!0):e;if(!r){n(e);return}be([r||e],o=>{if(o.length&&r){const s=F(r);if(s){t({...B,...s});return}}n(e)})});function Mn(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function On(e,t){const n=typeof e=="string"?z(e,!0,!0):null;if(!n){const s=Mn(e);return{value:e,data:s}}const r=F(n);if(r!==void 0||!n.prefix)return{value:e,name:n,data:r};const o=be([n],()=>t(e,n,F(n)));return{value:e,name:n,loading:o}}function oe(e){return e.hasAttribute("inline")}let ct=!1;try{ct=navigator.vendor.indexOf("Apple")===0}catch{}function Rn(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(ct||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const _n=/(-?[0-9.]*[0-9]+[0-9.]*)/g,En=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function fe(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(_n);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=En.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const Nn=e=>e==="unset"||e==="undefined"||e==="none";function at(e,t){const n={...B,...e},r={...Ge,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(b=>{const x=[],C=b.hFlip,T=b.vFlip;let w=b.rotate;C?T?w+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):T&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}w%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(s='<g transform="'+x.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=fe(d,c/l)):(u=i==="auto"?c:i,d=a===null?fe(u,l/c):a==="auto"?l:a);const p={},g=(b,x)=>{Nn(x)||(p[b]=x.toString())};return g("width",u),g("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const qn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Y=qn();function Fn(e){Y=e}function $n(){return Y}function Bn(e,t){const n=ee(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function zn(e){return e===404}const Hn=(e,t,n)=>{const r=[],o=Bn(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Dn(e){if(typeof e=="string"){const t=ee(e);if(t)return t.path}return"/"}const Vn=(e,t,n)=>{if(!Y){n("abort",424);return}let r=Dn(t.provider);switch(t.type){case"icons":{const s=t.prefix,a=t.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;Y(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(zn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},Un={prepare:Hn,send:Vn};function _e(e,t){switch(e){case"local":case"session":M[e]=t;break;case"all":for(const n in M)M[n]=t;break}}const re="data-style";let lt="";function Gn(e){lt=e}function Ee(e,t){let n=Array.from(e.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(re));n||(n=document.createElement("style"),n.setAttribute(re,re),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+lt}function ut(){Pe("",Un),Je(!0);let e;try{e=window}catch{}if(e){if(it(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Ae(o))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;je(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>_e(n,!0),disableCache:n=>_e(n,!1),iconExists:pn,getIcon:hn,listIcons:dn,addIcon:Ye,addCollection:Ae,calculateSize:fe,buildIcon:at,loadIcons:be,loadIcon:Ln,addAPIProvider:je,appendCustomStyle:Gn,_api:{getAPIConfig:ee,setAPIModule:Pe,sendAPIQuery:et,setFetch:Fn,getFetch:$n,listAPIProviders:In}}}function ft(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Qn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Wn(e){return"data:image/svg+xml,"+Qn(e)}function Zn(e){return'url("'+Wn(e)+'")'}const de={"background-color":"currentColor"},dt={"background-color":"transparent"},Ne={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},qe={"-webkit-mask":de,mask:de,background:dt};for(const e in qe){const t=qe[e];for(const n in Ne)t[e+"-"+n]=Ne[n]}function Fe(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Jn(e,t,n){const r=document.createElement("span");let o=e.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=e.attributes,i=ft(o,{...s,width:t.width+"",height:t.height+""}),a=Zn(i),c=r.style,l={"--svg":a,width:Fe(s.width),height:Fe(s.height),...n?de:dt};for(const u in l)c.setProperty(u,l[u]);return r}let N;function Yn(){try{N=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{N=null}}function Xn(e){return N===void 0&&Yn(),N?N.createHTML(e):e}function Kn(e){const t=document.createElement("span"),n=e.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ft(e.body,n);return t.innerHTML=Xn(o),t.firstChild}function $e(e,t){const n=t.icon.data,r=t.customisations,o=at(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=t.renderedMode;let i;switch(s){case"svg":i=Kn(o);break;default:i=Jn(o,{...B,...n},s==="mask")}const a=Array.from(e.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):e.replaceChild(i,a):e.appendChild(i)}function Be(e,t,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:r}}function eo(e="iconify-icon"){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;const r=t.get(e);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();D(this,"_shadowRoot");D(this,"_state");D(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=oe(this);Ee(c,l),this._state=Be({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=oe(this),u=this._state;l!==u.inline&&(u.inline=l,Ee(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return oe(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}$e(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=Se(this);(c.attrMode!==u||rn(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=On(c,(u,d,p)=>{const g=this._state;if(g.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:d,data:p};b.data?this._gotIconData(b):g.icon=b});l.data?this._gotIconData(l):this._state=Be(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Se(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=Rn(c.data.body,u),p=this._state.inline;$e(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ut();for(const a in i)s[a]=s.prototype[a]=i[a];return t.define(e,s),s}eo()||ut();const to=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),pt=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),H=(e,t,n="children")=>e.map(r=>Array.isArray(r[n])?t({...r,[n]:H(r[n],t,n)}):t(r)),no=(e,t="children")=>{const n=[];return H(e,r=>n.push(r),t),n},ye=(e,t,n="children")=>e.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=ye(o,t,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return t(r,s)}),oo=e=>/^https?:\/\//.test(e),wo=e=>/^[\w-]+:[\w-]+$/.test(e),ro=e=>{if(!e||!(e!=null&&e.startsWith("/")))return!1;const t=o=>o.endsWith("/")?o:`${o}/`,n=t(window.location.pathname),r=t(new URL(e,window.location.origin).pathname);return n.startsWith(r)},so=(e=[])=>{const t=e.map((r,o)=>({path:r,index:o})).filter(r=>ro(r.path));return t!=null&&t.length?t.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,t[0]).index:-1};var ze,He;const X=((ze=window==null?void 0:window.blocklet)==null?void 0:ze.groupPrefix)||((He=window==null?void 0:window.blocklet)==null?void 0:He.prefix)||"/",io=e=>{const t={...e},n=e==null?void 0:e.background;return typeof n=="string"?t.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(t.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),t},ht=(e,t="en")=>{if(!(e!=null&&e.length))return e;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(oo(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return H(e,o=>{var s;return{...o,title:n(o.title,t),link:(s=o.items)!=null&&s.length?o.link:r(o.link,t),_rawLink:o.link}},"items")},co=e=>H(e,t=>t.role?{...t,role:Array.isArray(t.role)?t.role:[t.role]}:t,"items"),ao=e=>{if(!(e!=null&&e.length))return null;const t=co(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return t.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},lo=e=>{if(!e)return null;const t={...e};return t.theme=io(t.theme),t.navigation=ao(uo(t.navigation)),t},uo=(e=[])=>ye(e,(t,n)=>{var r;return!!t.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),gt=(e,t)=>ye(e,(n,r)=>{var s;const o=!n.role||t&&n.role.includes(t);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),fo={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},po={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function xe({session:e,locale:t,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=e==null?void 0:e.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=A.useRef(null),i=Pt({open:!1}),a=jt((c=!i.open)=>{i.open=c});return o.length===0||!(e!=null&&e.user)?null:m.jsxs(m.Fragment,{children:[m.jsx(kt,{size:"medium",ref:s,onClick:()=>a(),children:m.jsx(Ce,{icon:fo,fontSize:n,style:{transform:"scale(1.08)"}})}),m.jsx(Lt,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>m.jsx(Mt,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:m.jsx(Ot,{...c,timeout:350,children:m.jsxs(Rt,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:P.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${P.gray6}, 0px 0px 0px 1px ${P.gray6}`},children:[m.jsx(_t,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u,d;return m.jsx(Gt,{disablePadding:!0,children:m.jsxs(Kt,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:P.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?m.jsx(Et,{component:"img",src:`${Nt}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):m.jsx(Ce,{fontSize:50,icon:l.icon||po,color:P.textSubtitle}),m.jsx(qt,{sx:{fontSize:"12px",color:P.textBase,textAlign:"center",lineHeight:"normal"},children:((d=l.title)==null?void 0:d[t])||l.title})]})},l.id)})}),m.jsx(Ft,{session:e,children:m.jsx($t,{variant:"outlined",fullWidth:!0,href:Bt,sx:{mt:1,borderRadius:2,color:P.textBase,borderColor:P.lineBorderStrong,"&:hover":{color:P.primaryBase,borderColor:P.primaryBase}},children:t==="zh"?"管理":"Manage"})})]})})})})]})}xe.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};xe.defaultProps={locale:"en",size:24};function we({formattedBlocklet:e,addons:t,sessionManagerProps:n}){var p,g,b,x;const r=A.useContext(De),{locale:o}=Ve()||{},{enableConnect:s=!0,enableLocale:i=!0}=e,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=ht((g=e==null?void 0:e.navigation)==null?void 0:g.sessionManager,o)||[];c=gt(c,(x=(b=r==null?void 0:r.session)==null?void 0:b.user)==null?void 0:x.role);const u=(()=>{if(t&&typeof t!="function")return Array.isArray(t)?t:[t];let C=[];if(i&&o&&C.push(m.jsx(Qt,{showText:!1},"locale-selector")),s&&r){const T=[];a&&(c?c.slice(0,5):[]).forEach(y=>{T.push({label:y.title,icon:y.icon?m.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),C.push(m.jsx(xe,{session:r.session,locale:o},"session-blocklet")),C.push(m.jsx(zt,{session:r.session,locale:o,menu:T,showRole:!0,...n},"session-user"))}return typeof t=="function"&&(C=t(C)||[]),C})();return A.createElement(m.Fragment,null,...Array.isArray(u)?u:[u])}we.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt};we.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const ho=()=>{const e=Ht();A.useEffect(()=>{e.wallet&&Dt(()=>import("./index-KaOUc2JH.js").then(t=>t.i),__vite__mapDeps([0,1,2])).then(t=>{t.call||(t=t.default),t.call("arcHideTopBar","{}")}).catch(t=>{console.error("load dsbridge error",t)})},[e])};function mt({meta:e,fallbackUrl:t,invalidPathFallback:n,headerAddons:r,sessionManagerProps:o,links:s,...i}){var O;ho();const a=A.useContext(De),c=(O=a==null?void 0:a.session)==null?void 0:O.user,l=c==null?void 0:c.role,{locale:u}=Ve()||{},d=A.useMemo(()=>{const v=Object.assign({},window.blocklet,e);try{return lo(v)}catch(h){return console.error("Failed to format blocklet info",h,v),v}},[e]),{localizedNav:p,flattened:g,matchedIndex:b}=A.useMemo(()=>{var j;let v=ht((j=d==null?void 0:d.navigation)==null?void 0:j.dashboard,u)||[];v=gt(v,l),v=H(v,S=>({title:S.title,url:S.link,icon:S.icon?m.jsx("iconify-icon",{height:"100%",width:"100%",icon:S.icon}):null,external:!0,children:S.items}),"items");const h=no(v).filter(S=>!!S.url),I=so(h.map(S=>S.url));return I!==-1&&(h[I].active=!0),{localizedNav:v,flattened:h,matchedIndex:I}},[d,u,l]),x=typeof s=="function"?s(p):[...p,...s];if(A.useLayoutEffect(()=>{c&&!(g!=null&&g.length)&&t&&(window.location.href=t)},[t]),A.useLayoutEffect(()=>{var v;c&&(g!=null&&g.length)&&b===-1&&(n?n():window.location.href=((v=g[0])==null?void 0:v.url)||X)},[n,g,b]),!d.appName)return null;const{appLogo:C,appLogoRect:T,appName:w}=d,y=m.jsx(we,{formattedBlocklet:d,addons:r,sessionManagerProps:o});return m.jsx(Vt,{title:w,fullWidth:!0,sidebarWidth:128,legacy:!1,links:x,...i,headerProps:{homeLink:X,logo:m.jsx("img",{src:T||C,alt:"logo"}),addons:y,...i.headerProps}})}mt.propTypes={meta:to,fallbackUrl:f.string,invalidPathFallback:f.func,headerAddons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt,links:f.oneOfType([f.array,f.func])};mt.defaultProps={meta:{},fallbackUrl:X,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=X}},links:[]};export{to as B,mt as D,we as H,Kt as L,pt as S,wo as a,no as b,so as c,lo as f,ht as g,oo as i,H as m,X as p,ho as u};
11
+ */const Ue=Object.freeze({left:0,top:0,width:16,height:16}),G=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),B=Object.freeze({...Ue,...G}),se=Object.freeze({...B,body:"",hidden:!1}),tn=Object.freeze({width:null,height:null}),Qe=Object.freeze({...tn,...G});function nn(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(e);return isNaN(o)?0:r(o)}else if(n!==e){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return t}const on=/[\s,]+/;function rn(e,t){t.split(on).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const We={...Qe,preserveAspectRatio:""};function Se(e){const t={...We},n=(r,o)=>e.getAttribute(r)||o;return t.width=n("width",null),t.height=n("height",null),t.rotate=nn(n("rotate","")),rn(t,n("flip","")),t.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),t}function sn(e,t){for(const n in We)if(e[n]!==t[n])return!0;return!1}const E=/^[a-z0-9]+(-[a-z0-9]+)*$/,z=(e,t,n,r="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return t&&!Q(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return t&&!Q(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return t&&!Q(a,n)?null:a}return null},Q=(e,t)=>e?!!((e.provider===""||e.provider.match(E))&&(t&&e.prefix===""||e.prefix.match(E))&&e.name.match(E)):!1;function cn(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function Te(e,t){const n=cn(e,t);for(const r in se)r in G?r in e&&!(r in n)&&(n[r]=G[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function an(e,t){const n=e.icons,r=e.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function ln(e,t,n){const r=e.icons,o=e.aliases||Object.create(null);let s={};function i(a){s=Te(r[a]||o[a],s)}return i(t),n.forEach(i),Te(e,s)}function Ze(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(o=>{t(o,null),n.push(o)});const r=an(e);for(const o in r){const s=r[o];s&&(t(o,ln(e,o,s)),n.push(o))}return n}const un={provider:"",aliases:{},not_found:{},...Ue};function te(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function Ge(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!te(e,un))return null;const n=t.icons;for(const o in n){const s=n[o];if(!o.match(E)||typeof s.body!="string"||!te(s,se))return null}const r=t.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(E)||typeof i!="string"||!n[i]&&!r[i]||!te(s,se))return null}return t}const J=Object.create(null);function fn(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function k(e,t){const n=J[e]||(J[e]=Object.create(null));return n[t]||(n[t]=fn(e,t))}function pe(e,t){return Ge(t)?Ze(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function dn(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function pn(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(J)).forEach(o=>{(typeof o=="string"&&typeof t=="string"?[t]:Object.keys(J[o]||{})).forEach(i=>{const a=k(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let q=!1;function Je(e){return typeof e=="boolean"&&(q=e),q}function F(e){const t=typeof e=="string"?z(e,!0,q):e;if(t){const n=k(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Xe(e,t){const n=z(e,!0,q);if(!n)return!1;const r=k(n.provider,n.prefix);return dn(r,n.name,t)}function Ae(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),q&&!t&&!e.prefix){let o=!1;return Ge(e)&&(e.prefix="",Ze(e,(s,i)=>{i&&Xe(s,i)&&(o=!0)})),o}const n=e.prefix;if(!Q({provider:t,prefix:n,name:"a"}))return!1;const r=k(t,n);return!!pe(r,e)}function hn(e){return!!F(e)}function gn(e){const t=F(e);return t?{...B,...t}:null}function mn(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return e.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=k(s,i));let u;a in l.icons?u=t.loaded:i===""||l.missing.has(a)?u=t.missing:u=t.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),t}function Ye(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==t))})}function bn(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,o=e.prefix;t.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(e.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(e.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Ye([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let yn=0;function xn(e,t,n){const r=yn++,o=Ye.bind(null,n,r);if(!t.pending.length)return o;const s={id:r,icons:t,callback:e,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const ie=Object.create(null);function Pe(e,t){ie[e]=t}function ce(e){return ie[e]||ie[""]}function wn(e,t=!0,n=!1){const r=[];return e.forEach(o=>{const s=typeof o=="string"?z(o,t,n):o;s&&r.push(s)}),r}var vn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function In(e,t,n,r){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let i;if(e.random){let h=e.resources.slice(0);for(i=[];h.length>1;){const I=Math.floor(Math.random()*h.length);i.push(h[I]),h=h.slice(0,I).concat(h.slice(I+1))}i=i.concat(h)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],g=[];typeof r=="function"&&g.push(r);function b(){d&&(clearTimeout(d),d=null)}function x(){c==="pending"&&(c="aborted"),b(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function C(h,I){I&&(g=[]),typeof h=="function"&&g.push(h)}function T(){return{startTime:a,payload:t,status:c,queriesSent:l,queriesPending:p.length,subscribe:C,abort:x}}function w(){c="failed",g.forEach(h=>{h(void 0,u)})}function y(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function O(h,I,j){const S=I!=="success";switch(p=p.filter(L=>L!==h),c){case"pending":break;case"failed":if(S||!e.dataAfterTimeout)return;break;default:return}if(I==="abort"){u=j,w();return}if(S){u=j,p.length||(i.length?v():w());return}if(b(),y(),!e.random){const L=e.resources.indexOf(h.resource);L!==-1&&L!==e.index&&(e.index=L)}c="completed",g.forEach(L=>{L(j)})}function v(){if(c!=="pending")return;b();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{b(),c==="pending"&&(y(),w())},e.timeout);return}w();return}const I={status:"pending",resource:h,callback:(j,S)=>{O(I,j,S)}};p.push(I),l++,d=setTimeout(v,e.rotate),n(h,t,I.callback)}return setTimeout(v),T}function Ke(e){const t={...vn,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=In(t,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{t.index=a},getIndex:()=>t.index,cleanup:r}}function he(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const K=Object.create(null),_=["https://api.simplesvg.com","https://api.unisvg.com"],W=[];for(;_.length>0;)_.length===1||Math.random()>.5?W.push(_.shift()):W.push(_.pop());K[""]=he({resources:["https://api.iconify.design"].concat(W)});function je(e,t){const n=he(t);return n===null?!1:(K[e]=n,!0)}function ee(e){return K[e]}function Cn(){return Object.keys(K)}function ke(){}const ne=Object.create(null);function Sn(e){if(!ne[e]){const t=ee(e);if(!t)return;const n=Ke(t),r={config:t,redundancy:n};ne[e]=r}return ne[e]}function et(e,t,n){let r,o;if(typeof e=="string"){const s=ce(e);if(!s)return n(void 0,424),ke;o=s.send;const i=Sn(e);i&&(r=i.redundancy)}else{const s=he(e);if(s){r=Ke(s);const i=e.resources?e.resources[0]:"",a=ce(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),ke):r.query(t,o,n)().abort}const Le="iconify2",$="iconify",tt=$+"-count",Me=$+"-version",nt=36e5,Tn=168;function ae(e,t){try{return e.getItem(t)}catch{}}function ge(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Oe(e,t){try{e.removeItem(t)}catch{}}function le(e,t){return ge(e,tt,t.toString())}function ue(e){return parseInt(ae(e,tt))||0}const M={local:!0,session:!0},ot={local:new Set,session:new Set};let me=!1;function An(e){me=e}let U=typeof window>"u"?{}:window;function rt(e){const t=e+"Storage";try{if(U&&U[t]&&typeof U[t].length=="number")return U[t]}catch{}M[e]=!1}function st(e,t){const n=rt(e);if(!n)return;const r=ae(n,Me);if(r!==Le){if(r){const a=ue(n);for(let c=0;c<a;c++)Oe(n,$+c.toString())}ge(n,Me,Le),le(n,0);return}const o=Math.floor(Date.now()/nt)-Tn,s=a=>{const c=$+a.toString(),l=ae(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&t(u,a))return!0}catch{}Oe(n,c)}};let i=ue(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,le(n,i)):ot[e].add(a))}function it(){if(!me){An(!0);for(const e in M)st(e,t=>{const n=t.data,r=t.provider,o=n.prefix,s=k(r,o);if(!pe(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function Pn(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in M)st(r,o=>{const s=o.data;return o.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function jn(e,t){me||it();function n(r){let o;if(!M[r]||!(o=rt(r)))return;const s=ot[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=ue(o),!le(o,i+1))return;const a={cached:Math.floor(Date.now()/nt),provider:e.provider,data:t};return ge(o,$+i.toString(),JSON.stringify(a))}t.lastModified&&!Pn(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Re(){}function kn(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,bn(e)}))}function Ln(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,o=e.iconsToLoad;delete e.iconsToLoad;let s;if(!o||!(s=ce(n)))return;s.prepare(n,r,o).forEach(a=>{et(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{e.missing.add(l)});else try{const l=pe(e,c);if(!l.length)return;const u=e.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),jn(e,c)}catch(l){console.error(l)}kn(e)})})}))}const be=(e,t)=>{const n=wn(e,!0,Je()),r=mn(n);if(!r.pending.length){let c=!0;return t&&setTimeout(()=>{c&&t(r.loaded,r.missing,r.pending,Re)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(k(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=k(l,u),g=p.pendingIcons||(p.pendingIcons=new Set);g.has(d)||(g.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&Ln(c,o[l][u])}),t?xn(t,r,s):Re},Mn=e=>new Promise((t,n)=>{const r=typeof e=="string"?z(e,!0):e;if(!r){n(e);return}be([r||e],o=>{if(o.length&&r){const s=F(r);if(s){t({...B,...s});return}}n(e)})});function On(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function Rn(e,t){const n=typeof e=="string"?z(e,!0,!0):null;if(!n){const s=On(e);return{value:e,data:s}}const r=F(n);if(r!==void 0||!n.prefix)return{value:e,name:n,data:r};const o=be([n],()=>t(e,n,F(n)));return{value:e,name:n,loading:o}}function oe(e){return e.hasAttribute("inline")}let ct=!1;try{ct=navigator.vendor.indexOf("Apple")===0}catch{}function _n(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(ct||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const En=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Nn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function fe(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(En);if(r===null||!r.length)return e;const o=[];let s=r.shift(),i=Nn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*t*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const qn=e=>e==="unset"||e==="undefined"||e==="none";function at(e,t){const n={...B,...e},r={...Qe,...t},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(b=>{const x=[],C=b.hFlip,T=b.vFlip;let w=b.rotate;C?T?w+=2:(x.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),x.push("scale(-1 1)"),o.top=o.left=0):T&&(x.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),x.push("scale(1 -1)"),o.top=o.left=0);let y;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:y=o.height/2+o.top,x.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:x.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:y=o.width/2+o.left,x.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}w%2===1&&(o.left!==o.top&&(y=o.left,o.left=o.top,o.top=y),o.width!==o.height&&(y=o.width,o.width=o.height,o.height=y)),x.length&&(s='<g transform="'+x.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=fe(d,c/l)):(u=i==="auto"?c:i,d=a===null?fe(u,l/c):a==="auto"?l:a);const p={},g=(b,x)=>{qn(x)||(p[b]=x.toString())};return g("width",u),g("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const Fn=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let X=Fn();function $n(e){X=e}function Bn(){return X}function zn(e,t){const n=ee(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=t+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function Hn(e){return e===404}const Dn=(e,t,n)=>{const r=[],o=zn(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:e,prefix:t,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Vn(e){if(typeof e=="string"){const t=ee(e);if(t)return t.path}return"/"}const Un=(e,t,n)=>{if(!X){n("abort",424);return}let r=Vn(t.provider);switch(t.type){case"icons":{const s=t.prefix,a=t.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=t.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;X(e+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(Hn(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},Qn={prepare:Dn,send:Un};function _e(e,t){switch(e){case"local":case"session":M[e]=t;break;case"all":for(const n in M)M[n]=t;break}}const re="data-style";let lt="";function Wn(e){lt=e}function Ee(e,t){let n=Array.from(e.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(re));n||(n=document.createElement("style"),n.setAttribute(re,re),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+lt}function ut(){Pe("",Qn),Je(!0);let e;try{e=window}catch{}if(e){if(it(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!Ae(o))&&console.error(r)}catch{console.error(r)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;je(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>_e(n,!0),disableCache:n=>_e(n,!1),iconExists:hn,getIcon:gn,listIcons:pn,addIcon:Xe,addCollection:Ae,calculateSize:fe,buildIcon:at,loadIcons:be,loadIcon:Mn,addAPIProvider:je,appendCustomStyle:Wn,_api:{getAPIConfig:ee,setAPIModule:Pe,sendAPIQuery:et,setFetch:$n,getFetch:Bn,listAPIProviders:Cn}}}function ft(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Zn(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Gn(e){return"data:image/svg+xml,"+Zn(e)}function Jn(e){return'url("'+Gn(e)+'")'}const de={"background-color":"currentColor"},dt={"background-color":"transparent"},Ne={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},qe={"-webkit-mask":de,mask:de,background:dt};for(const e in qe){const t=qe[e];for(const n in Ne)t[e+"-"+n]=Ne[n]}function Fe(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Xn(e,t,n){const r=document.createElement("span");let o=e.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=e.attributes,i=ft(o,{...s,width:t.width+"",height:t.height+""}),a=Jn(i),c=r.style,l={"--svg":a,width:Fe(s.width),height:Fe(s.height),...n?de:dt};for(const u in l)c.setProperty(u,l[u]);return r}let N;function Yn(){try{N=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{N=null}}function Kn(e){return N===void 0&&Yn(),N?N.createHTML(e):e}function eo(e){const t=document.createElement("span"),n=e.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ft(e.body,n);return t.innerHTML=Kn(o),t.firstChild}function $e(e,t){const n=t.icon.data,r=t.customisations,o=at(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=t.renderedMode;let i;switch(s){case"svg":i=eo(o);break;default:i=Xn(o,{...B,...n},s==="mask")}const a=Array.from(e.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):e.replaceChild(i,a):e.appendChild(i)}function Be(e,t,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:r}}function to(e="iconify-icon"){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;const r=t.get(e);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();D(this,"_shadowRoot");D(this,"_state");D(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=oe(this);Ee(c,l),this._state=Be({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=oe(this),u=this._state;l!==u.inline&&(u.inline=l,Ee(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return oe(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}$e(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=Se(this);(c.attrMode!==u||sn(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=Rn(c,(u,d,p)=>{const g=this._state;if(g.rendered||this.getAttribute("icon")!==u)return;const b={value:u,name:d,data:p};b.data?this._gotIconData(b):g.icon=b});l.data?this._gotIconData(l):this._state=Be(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,Se(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=_n(c.data.body,u),p=this._state.inline;$e(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ut();for(const a in i)s[a]=s.prototype[a]=i[a];return t.define(e,s),s}to()||ut();const no=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),pt=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),H=(e,t,n="children")=>e.map(r=>Array.isArray(r[n])?t({...r,[n]:H(r[n],t,n)}):t(r)),oo=(e,t="children")=>{const n=[];return H(e,r=>n.push(r),t),n},ye=(e,t,n="children")=>e.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=ye(o,t,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return t(r,s)}),ro=e=>/^https?:\/\//.test(e),vo=e=>/^[\w-]+:[\w-]+$/.test(e),so=e=>{if(!e||!(e!=null&&e.startsWith("/")))return!1;const t=o=>o.endsWith("/")?o:`${o}/`,n=t(window.location.pathname),r=t(new URL(e,window.location.origin).pathname);return n.startsWith(r)},io=(e=[])=>{const t=e.map((r,o)=>({path:r,index:o})).filter(r=>so(r.path));return t!=null&&t.length?t.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,t[0]).index:-1};var ze,He;const Y=((ze=window==null?void 0:window.blocklet)==null?void 0:ze.groupPrefix)||((He=window==null?void 0:window.blocklet)==null?void 0:He.prefix)||"/",co=e=>{const t={...e},n=e==null?void 0:e.background;return typeof n=="string"?t.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(t.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),t},ht=(e,t="en")=>{if(!(e!=null&&e.length))return e;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(ro(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return H(e,o=>{var s;return{...o,title:n(o.title,t),link:(s=o.items)!=null&&s.length?o.link:r(o.link,t),_rawLink:o.link}},"items")},ao=e=>H(e,t=>t.role?{...t,role:Array.isArray(t.role)?t.role:[t.role]}:t,"items"),lo=e=>{if(!(e!=null&&e.length))return null;const t=ao(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return t.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},uo=e=>{if(!e)return null;const t={...e};return t.theme=co(t.theme),t.navigation=lo(fo(t.navigation)),t},fo=(e=[])=>ye(e,(t,n)=>{var r;return!!t.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),gt=(e,t)=>ye(e,(n,r)=>{var s;const o=!n.role||t&&n.role.includes(t);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),po={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},ho={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function xe({session:e,locale:t,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=e==null?void 0:e.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=A.useRef(null),i=Pt({open:!1}),a=jt((c=!i.open)=>{i.open=c});return o.length===0||!(e!=null&&e.user)?null:m.jsxs(m.Fragment,{children:[m.jsx(kt,{size:"medium",ref:s,onClick:()=>a(),children:m.jsx(Ce,{icon:po,fontSize:n,style:{transform:"scale(1.08)"}})}),m.jsx(Lt,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>m.jsx(Mt,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:m.jsx(Ot,{...c,timeout:350,children:m.jsxs(Rt,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:P.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${P.gray6}, 0px 0px 0px 1px ${P.gray6}`},children:[m.jsx(_t,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u;return m.jsx(Wt,{disablePadding:!0,children:m.jsxs(en,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:P.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?m.jsx(Et,{component:"img",src:`${Nt}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):m.jsx(Ce,{fontSize:50,icon:l.icon||ho,color:P.textSubtitle}),m.jsx(qt,{sx:{fontSize:"12px",color:P.textBase,textAlign:"center",lineHeight:"normal"},children:Ft(l.title,t)})]})},l.id)})}),m.jsx($t,{session:e,children:m.jsx(Bt,{variant:"outlined",fullWidth:!0,href:zt,sx:{mt:1,borderRadius:2,color:P.textBase,borderColor:P.lineBorderStrong,"&:hover":{color:P.primaryBase,borderColor:P.primaryBase}},children:t==="zh"?"管理":"Manage"})})]})})})})]})}xe.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};xe.defaultProps={locale:"en",size:24};function we({formattedBlocklet:e,addons:t,sessionManagerProps:n}){var p,g,b,x;const r=A.useContext(De),{locale:o}=Ve()||{},{enableConnect:s=!0,enableLocale:i=!0}=e,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=ht((g=e==null?void 0:e.navigation)==null?void 0:g.sessionManager,o)||[];c=gt(c,(x=(b=r==null?void 0:r.session)==null?void 0:b.user)==null?void 0:x.role);const u=(()=>{if(t&&typeof t!="function")return Array.isArray(t)?t:[t];let C=[];if(i&&o&&C.push(m.jsx(Zt,{showText:!1},"locale-selector")),s&&r){const T=[];a&&(c?c.slice(0,5):[]).forEach(y=>{T.push({label:y.title,icon:y.icon?m.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),C.push(m.jsx(xe,{session:r.session,locale:o},"session-blocklet")),C.push(m.jsx(Ht,{session:r.session,locale:o,menu:T,showRole:!0,...n},"session-user"))}return typeof t=="function"&&(C=t(C)||[]),C})();return A.createElement(m.Fragment,null,...Array.isArray(u)?u:[u])}we.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt};we.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const go=()=>{const e=Dt();A.useEffect(()=>{e.wallet&&Vt(()=>import("./index-G4TxIvAp.js").then(t=>t.i),__vite__mapDeps([0,1,2])).then(t=>{t.call||(t=t.default),t.call("arcHideTopBar","{}")}).catch(t=>{console.error("load dsbridge error",t)})},[e])};function mt({meta:e,fallbackUrl:t,invalidPathFallback:n,headerAddons:r,sessionManagerProps:o,links:s,...i}){var O;go();const a=A.useContext(De),c=(O=a==null?void 0:a.session)==null?void 0:O.user,l=c==null?void 0:c.role,{locale:u}=Ve()||{},d=A.useMemo(()=>{const v=Object.assign({},window.blocklet,e);try{return uo(v)}catch(h){return console.error("Failed to format blocklet info",h,v),v}},[e]),{localizedNav:p,flattened:g,matchedIndex:b}=A.useMemo(()=>{var j;let v=ht((j=d==null?void 0:d.navigation)==null?void 0:j.dashboard,u)||[];v=gt(v,l),v=H(v,S=>({title:S.title,url:S.link,icon:S.icon?m.jsx("iconify-icon",{height:"100%",width:"100%",icon:S.icon}):null,external:!0,children:S.items}),"items");const h=oo(v).filter(S=>!!S.url),I=io(h.map(S=>S.url));return I!==-1&&(h[I].active=!0),{localizedNav:v,flattened:h,matchedIndex:I}},[d,u,l]),x=typeof s=="function"?s(p):[...p,...s];if(A.useLayoutEffect(()=>{c&&!(g!=null&&g.length)&&t&&(window.location.href=t)},[t]),A.useLayoutEffect(()=>{var v;c&&(g!=null&&g.length)&&b===-1&&(n?n():window.location.href=((v=g[0])==null?void 0:v.url)||Y)},[n,g,b]),!d.appName)return null;const{appLogo:C,appLogoRect:T,appName:w}=d,y=m.jsx(we,{formattedBlocklet:d,addons:r,sessionManagerProps:o});return m.jsx(Ut,{title:w,fullWidth:!0,sidebarWidth:128,legacy:!1,links:x,...i,headerProps:{homeLink:Y,logo:m.jsx("img",{src:T||C,alt:"logo"}),addons:y,...i.headerProps}})}mt.propTypes={meta:no,fallbackUrl:f.string,invalidPathFallback:f.func,headerAddons:f.oneOfType([f.func,f.node]),sessionManagerProps:pt,links:f.oneOfType([f.array,f.func])};mt.defaultProps={meta:{},fallbackUrl:Y,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=Y}},links:[]};export{no as B,mt as D,we as H,en as L,pt as S,vo as a,oo as b,io as c,uo as f,ht as g,ro as i,H as m,Y as p,go as u};
12
12
  function __vite__mapDeps(indexes) {
13
13
  if (!__vite__mapDeps.viteFileDeps) {
14
- __vite__mapDeps.viteFileDeps = ["assets/index-KaOUc2JH.js","assets/index-QvTDYv6X.js","assets/index-F9vDNwHQ.css"]
14
+ __vite__mapDeps.viteFileDeps = ["assets/index-G4TxIvAp.js","assets/index-4kDY-bSj.js","assets/index-F9vDNwHQ.css"]
15
15
  }
16
16
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
17
17
  }
@@ -1,12 +1,12 @@
1
- import{an as At,j as l,aB as K,cq as Lt,aE as $,f6 as ot,aD as se,az as Le,aA as _e,T as _,r as x,aI as Oe,aF as ht,aG as Me,aH as Ve,B as j,S as we,P,u as ne,aY as be,aZ as xe,by as ge,L as W,W as F,bB as bt,ax as Se,o as w,R as q,e as xt,y as _t,b3 as Ot,dd as Mt,a5 as z,c as me,x as pe,c1 as gt,cl as Vt,cu as he,cv as kt,bo as Ft,cL as zt,cp as Ne,f7 as yt,bz as Wt,bQ as lt,f8 as Fe,bI as Ut,cA as Kt,Y as qt,f9 as Te,aw as Ht,ak as Gt,al as Ie}from"./index-QvTDYv6X.js";import{d as jt}from"./Delete-jNg2gv9v.js";import{D as ze}from"./index-_N7xFgV-.js";import{T as Ct}from"./index-ZOtBXjp4.js";import{W as Jt}from"./did-address-LWSNRm3U.js";import{C as Nt}from"./confirm-Ol9jrnEp.js";import{B as We,d as Xt}from"./ChevronRight-aPnLeTB4.js";import{_ as Yt}from"./useLocalStorage-lFajT5Wt.js";import{u as Qt}from"./session-daRjp05u.js";import{T as X}from"./TextField-BmfH05Zr.js";import{M as $e}from"./InputAdornment-ZGszKDvC.js";import{d as st}from"./Download-MRLPGnEV.js";import{_ as Zt}from"./useSetState-VkVh8FSU.js";import{d as eo}from"./DeleteOutline--3VOI5hj.js";import{T as to}from"./MoreVert-w2xJDuVT.js";import{A as oo,f as Ee}from"./index-oDR_sdyF.js";import{C as lo}from"./click-to-copy-rNYVmm1q.js";import{c as Ue}from"./index-xp4s9IF1.js";import{i as so}from"./index-br4owYtx.js";import{d as no}from"./ExpandMore-inn6pwGR.js";import{d as ro}from"./OpenInNew-UfLZPW1_.js";import{F as io,C as De}from"./FormControlLabel-r9q0VfRf.js";import"./api-ovvSdkBc.js";import{A as co}from"./Avatar-d1HBhAcf.js";import"./FilterList-_UU_tsIc.js";import"./TableRow-j1fbGnXk.js";import"./Grid-GelBsPE2.js";import"./FormControl-8O72uE8H.js";import"./useFormControl-htyncNn_.js";import"./FormGroup-G3i9ndxk.js";import"./InputLabel-OaHIlADE.js";import"./ListItemText-JpoZJL1W.js";import"./Select-6x_KXv7T.js";import"./LastPage-JawdTEAU.js";import"./Toolbar-qIgYu3q0.js";import"./index-vOzMfhG6.js";import"./redux-x1KHLUJG.js";import"./Search-y1h18Mub.js";import"./Link-eUvm2eyV.js";import"./Alert-Jwofj9zD.js";import"./useSlot-o8ZWnVB_.js";const ao=At(l.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"),uo=["slots","slotProps"],po=K(Lt)(({theme: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.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":$({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:ot(e.palette.grey[200],.12)}:{backgroundColor:ot(e.palette.grey[600],.12)})})),fo=K(ao)({width:24,height:16});function mo(e){const{slots:t={},slotProps:o={}}=e,n=se(e,uo),d=e;return l.jsx("li",{children:l.jsx(po,$({focusRipple:!0},n,{ownerState:d,children:l.jsx(fo,$({as:t.CollapsedIcon,ownerState:d},o.collapsedIcon))}))})}function ho(e){return _e("MuiBreadcrumbs",e)}const bo=Le("MuiBreadcrumbs",["root","ol","li","separator"]),xo=bo,go=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ko=e=>{const{classes:t}=e;return Ve({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},ho,t)},yo=K(_,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${xo.li}`]:t.li},t.root]})({}),jo=K("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Co=K("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function No(e,t,o,n){return e.reduce((d,a,p)=>(p<e.length-1?d=d.concat(a,l.jsx(Co,{"aria-hidden":!0,className:t,ownerState:n,children:o},`separator-${p}`)):d.push(a),d),[])}const Io=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiBreadcrumbs"}),{children:d,className:a,component:p="nav",slots:c={},slotProps:h={},expandText:u="Show path",itemsAfterCollapse:b=1,itemsBeforeCollapse:m=1,maxItems:g=8,separator:r="/"}=n,s=se(n,go),[i,f]=x.useState(!1),k=$({},n,{component:p,expanded:i,expandText:u,itemsAfterCollapse:b,itemsBeforeCollapse:m,maxItems:g,separator:r}),C=ko(k),y=ht({elementType:c.CollapsedIcon,externalSlotProps:h.collapsedIcon,ownerState:k}),I=x.useRef(null),E=v=>{const D=()=>{f(!0);const T=I.current.querySelector("a[href],button,[tabindex]");T&&T.focus()};return m+b>=v.length?v:[...v.slice(0,m),l.jsx(mo,{"aria-label":u,slots:{CollapsedIcon:c.CollapsedIcon},slotProps:{collapsedIcon:y},onClick:D},"ellipsis"),...v.slice(v.length-b,v.length)]},S=x.Children.toArray(d).filter(v=>x.isValidElement(v)).map((v,D)=>l.jsx("li",{className:C.li,children:v},`child-${D}`));return l.jsx(yo,$({ref:o,component:p,color:"text.secondary",className:Me(C.root,a),ownerState:k},s,{children:l.jsx(jo,{className:C.ol,ref:I,ownerState:k,children:No(i||g&&S.length<=g?S:E(S),C.separator,r,k)})}))}),Ke=Io;function ke({size:e,...t}){return l.jsx(j,{display:"flex",mt:4,...t,children:l.jsx(we,{size:e})})}ke.propTypes={size:P.number};ke.defaultProps={size:24};function It(){const{t:e,locale:t}=ne(),{api:o}=be(),[n,d]=x.useState(!0),{blocklet:a}=xe(),[p,c]=x.useState(null),{componentDid:h=""}=ge(),[u,b]=x.useState(null),m=()=>{o.getProjects({input:{did:a.meta.did,componentDid:h}}).then(i=>{const f=(i==null?void 0:i.projects)||[];d(!1),b(f)}).catch(i=>{d(!1),w.error(i.message)})},g=i=>{c(i)},r=()=>{d(!1);const i=p.id;o.deleteProject({input:{did:a.meta.did,projectId:i}}).then(()=>{d(!1),m(),w.success(e("common.removeSuccess")),c(null)}).catch(f=>{d(!1),w.error(f.message)})};if(x.useEffect(()=>{m()},[]),!u&&n)return l.jsx(ke,{});if(!u)return null;if(!u.length)return l.jsxs(j,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[l.jsx(j,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.blockletEmptyTip")}),l.jsx(j,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createBlockletTip")}),l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createBlocklet")})})]});const s=[{label:"Blocklet",name:"blockletTitle",options:{customBodyRenderLite:i=>{const f=u[i];return l.jsx(W,{to:`${f.id}`,children:f.blockletTitle||"/"})}}},{label:"DID",name:"blockletDid",options:{customBodyRender:i=>l.jsx(Jt,{size:14,responsive:!0,did:i})}},{label:"Version",name:"blockletVersion",options:{customBodyRender:i=>i?l.jsx(Ct,{type:"success",children:i}):""}},h?null:{label:e("common.scope"),name:"componentDid",options:{customBodyRender:i=>{const f=(a.children||[]).find(k=>k.meta.did===i);return f?l.jsxs(j,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[l.jsx(We,{size:14,blocklet:f,ancestors:[a]}),l.jsx(j,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:f.meta.title})]},i):""}}},{label:e("common.updatedAt"),name:"updatedAt",options:{customBodyRender:i=>l.jsx(bt,{value:Number(i),locale:t})}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:i=>{const f=u[i];return l.jsx(j,{display:"flex",children:l.jsx(Se,{color:"error","aria-label":"delete",onClick:()=>g(f),children:l.jsx(jt,{sx:{fontSize:18}})})})}}}].filter(Boolean);return l.jsxs(To,{children:[l.jsx(j,{sx:{textAlign:"right"},children:l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createBlocklet")})})}),l.jsx(ze,{className:"main-table",locale:t,data:u,columns:s,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),p&&l.jsx(Nt,{title:`${e("common.delete")} ${p.blockletTitle}`,description:e("blocklet.publish.deleteBlockletTip"),confirm:e("common.confirm"),onConfirm:r,onCancel:()=>c(null)})]})}It.propTypes={};const To=q(j)`
1
+ import{ao as At,j as l,aC as K,cr as _t,aF as $,f9 as ot,aE as se,aA as _e,aB as Le,T as L,r as x,aJ as Oe,aG as ht,aH as Me,aI as Ve,B as j,S as we,P,u as ne,aZ as be,a_ as xe,bz as ge,L as W,X as F,bC as bt,ay as Se,o as w,U as q,e as xt,y as Lt,b4 as Ot,dd as Mt,a6 as z,c as me,x as pe,c2 as gt,cm as Vt,cv as he,cw as kt,bp as Ft,cM as zt,cq as Ne,fa as yt,bA as Wt,bR as lt,fb as Fe,bJ as Ut,cB as Kt,Z as qt,fc as Ie,ax as Ht,al as Jt,am as Te}from"./index-4kDY-bSj.js";import{d as jt}from"./Delete-scHxyggC.js";import{D as ze}from"./index-XNap50fg.js";import{T as Ct}from"./index-oX6ioTmv.js";import{W as Xt}from"./did-address-WwpjYrtA.js";import{C as Nt}from"./confirm-6i9aFJCn.js";import{B as We,d as Gt}from"./ChevronRight-EqClP1jF.js";import{_ as Zt}from"./useLocalStorage-wRnP8MV2.js";import{u as Qt}from"./session-h_IEacYq.js";import{T as G}from"./TextField-jXLk3dBz.js";import{M as $e}from"./InputAdornment-N_ls3xJ4.js";import{d as st}from"./Download-mcEPTVsB.js";import{_ as Yt}from"./useSetState-a6PKN2ar.js";import{d as eo}from"./DeleteOutline-A2WcZEL3.js";import{T as to}from"./MoreVert-_uT0_c7b.js";import{A as oo,f as Ee}from"./index-XABOL4Cf.js";import{C as lo}from"./click-to-copy-BRCse-Wz.js";import{c as Ue}from"./index-PmX2brdr.js";import{i as so}from"./index-NenHSVdJ.js";import{d as no}from"./ExpandMore-WQg_8AV_.js";import{d as ro}from"./OpenInNew-nofe5889.js";import{F as io,C as De}from"./FormControlLabel-N6kIDqLm.js";import"./api-udTY28jX.js";import{A as co}from"./Avatar-9aQtHFLk.js";import"./FilterList-ZQnUABNq.js";import"./TableRow-I6sJG9EK.js";import"./Grid-MyqNT_XI.js";import"./FormControl-uhlBMMeK.js";import"./useFormControl--zZqKVme.js";import"./FormGroup-rl0ncWja.js";import"./InputLabel-SMyOIavk.js";import"./ListItemText-IXOBm0cf.js";import"./Select-ZFaqiDJM.js";import"./LastPage-3di6NtYt.js";import"./Toolbar-mzmmamgr.js";import"./index-X8tXLwEv.js";import"./redux-OK0ujNpx.js";import"./Search-DtHNRy-_.js";import"./Link-7Neb7it0.js";import"./Alert-YuViHXR0.js";import"./useSlot-O2pDH7jV.js";const ao=At(l.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"),uo=["slots","slotProps"],po=K(_t)(({theme: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.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":$({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:ot(e.palette.grey[200],.12)}:{backgroundColor:ot(e.palette.grey[600],.12)})})),fo=K(ao)({width:24,height:16});function mo(e){const{slots:t={},slotProps:o={}}=e,n=se(e,uo),d=e;return l.jsx("li",{children:l.jsx(po,$({focusRipple:!0},n,{ownerState:d,children:l.jsx(fo,$({as:t.CollapsedIcon,ownerState:d},o.collapsedIcon))}))})}function ho(e){return Le("MuiBreadcrumbs",e)}const bo=_e("MuiBreadcrumbs",["root","ol","li","separator"]),xo=bo,go=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ko=e=>{const{classes:t}=e;return Ve({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},ho,t)},yo=K(L,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${xo.li}`]:t.li},t.root]})({}),jo=K("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),Co=K("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function No(e,t,o,n){return e.reduce((d,a,p)=>(p<e.length-1?d=d.concat(a,l.jsx(Co,{"aria-hidden":!0,className:t,ownerState:n,children:o},`separator-${p}`)):d.push(a),d),[])}const To=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiBreadcrumbs"}),{children:d,className:a,component:p="nav",slots:c={},slotProps:h={},expandText:u="Show path",itemsAfterCollapse:b=1,itemsBeforeCollapse:m=1,maxItems:g=8,separator:r="/"}=n,s=se(n,go),[i,f]=x.useState(!1),k=$({},n,{component:p,expanded:i,expandText:u,itemsAfterCollapse:b,itemsBeforeCollapse:m,maxItems:g,separator:r}),C=ko(k),y=ht({elementType:c.CollapsedIcon,externalSlotProps:h.collapsedIcon,ownerState:k}),T=x.useRef(null),E=v=>{const D=()=>{f(!0);const I=T.current.querySelector("a[href],button,[tabindex]");I&&I.focus()};return m+b>=v.length?v:[...v.slice(0,m),l.jsx(mo,{"aria-label":u,slots:{CollapsedIcon:c.CollapsedIcon},slotProps:{collapsedIcon:y},onClick:D},"ellipsis"),...v.slice(v.length-b,v.length)]},S=x.Children.toArray(d).filter(v=>x.isValidElement(v)).map((v,D)=>l.jsx("li",{className:C.li,children:v},`child-${D}`));return l.jsx(yo,$({ref:o,component:p,color:"text.secondary",className:Me(C.root,a),ownerState:k},s,{children:l.jsx(jo,{className:C.ol,ref:T,ownerState:k,children:No(i||g&&S.length<=g?S:E(S),C.separator,r,k)})}))}),Ke=To;function ke({size:e,...t}){return l.jsx(j,{display:"flex",mt:4,...t,children:l.jsx(we,{size:e})})}ke.propTypes={size:P.number};ke.defaultProps={size:24};function Tt(){const{t:e,locale:t}=ne(),{api:o}=be(),[n,d]=x.useState(!0),{blocklet:a}=xe(),[p,c]=x.useState(null),{componentDid:h=""}=ge(),[u,b]=x.useState(null),m=()=>{o.getProjects({input:{did:a.meta.did,componentDid:h}}).then(i=>{const f=(i==null?void 0:i.projects)||[];d(!1),b(f)}).catch(i=>{d(!1),w.error(i.message)})},g=i=>{c(i)},r=()=>{d(!1);const i=p.id;o.deleteProject({input:{did:a.meta.did,projectId:i}}).then(()=>{d(!1),m(),w.success(e("common.removeSuccess")),c(null)}).catch(f=>{d(!1),w.error(f.message)})};if(x.useEffect(()=>{m()},[]),!u&&n)return l.jsx(ke,{});if(!u)return null;if(!u.length)return l.jsxs(j,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[l.jsx(j,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.blockletEmptyTip")}),l.jsx(j,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createBlockletTip")}),l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createBlocklet")})})]});const s=[{label:"Blocklet",name:"blockletTitle",options:{customBodyRenderLite:i=>{const f=u[i];return l.jsx(W,{to:`${f.id}`,children:f.blockletTitle||"/"})}}},{label:"DID",name:"blockletDid",options:{customBodyRender:i=>l.jsx(Xt,{size:14,responsive:!0,did:i})}},{label:"Version",name:"blockletVersion",options:{customBodyRender:i=>i?l.jsx(Ct,{type:"success",children:i}):""}},h?null:{label:e("common.scope"),name:"componentDid",options:{customBodyRender:i=>{const f=(a.children||[]).find(k=>k.meta.did===i);return f?l.jsxs(j,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[l.jsx(We,{size:14,blocklet:f,ancestors:[a]}),l.jsx(j,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:f.meta.title})]},i):""}}},{label:e("common.updatedAt"),name:"updatedAt",options:{customBodyRender:i=>l.jsx(bt,{value:Number(i),locale:t})}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:i=>{const f=u[i];return l.jsx(j,{display:"flex",children:l.jsx(Se,{color:"error","aria-label":"delete",onClick:()=>g(f),children:l.jsx(jt,{sx:{fontSize:18}})})})}}}].filter(Boolean);return l.jsxs(Io,{children:[l.jsx(j,{sx:{textAlign:"right"},children:l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createBlocklet")})})}),l.jsx(ze,{className:"main-table",locale:t,data:u,columns:s,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),p&&l.jsx(Nt,{title:`${e("common.delete")} ${p.blockletTitle}`,description:e("blocklet.publish.deleteBlockletTip"),confirm:e("common.confirm"),onConfirm:r,onCancel:()=>c(null)})]})}Tt.propTypes={};const Io=q(j)`
2
2
  .main-table > div:first-child {
3
3
  display: none;
4
4
  }
5
- `,So=[{label:{en:"Resource",zh:"资源"},value:"resource"},{label:{en:"Application",zh:"应用"},value:"pack"}];function qe({...e}){const t=xt(),{t:o,locale:n}=ne(),{blocklet:d}=xe(),[a,p]=x.useState(""),[c,h]=x.useState(!1),[u,b]=x.useState("resource"),{api:m}=Qt(),{api:g}=be(),[r,s]=x.useState(),[i,f]=x.useState(!1),[k]=Yt("manual-create-blocklet-did",!1),{componentDid:C=""}=ge(),y=S=>{w.error(S.message),f(!1)},I=S=>{var D;const v=(D=S==null?void 0:S.blockletWallet)==null?void 0:D.address;v?s(v):w.error("Empty Blocklet DID"),f(!1)},E=()=>{if(!r){w.error(o("blocklet.publish.errorTip.noDid"));return}if(!a){w.error(o("blocklet.publish.errorTip.noTitle"));return}h(!0),g.createProject({input:{did:d.meta.did,blockletTitle:a||"",blockletDid:r,type:u,componentDid:C}}).then(()=>{h(!1),t("../",{replace:!0})}).catch(S=>{h(!1),w.error(S.message)})};return l.jsxs(Eo,{...e,children:[l.jsxs(Ke,{className:"breadcrumbs","aria-label":"breadcrumb",children:[l.jsx(W,{to:"..",children:o("common.publish")}),l.jsxs(_,{color:"text.primary",children:[o("common.create")," Blocklet"]})]}),l.jsxs(j,{style:{maxWidth:500},children:[l.jsx(X,{required:!0,sx:{mb:4},label:"Blocklet DID",fullWidth:!0,readonly:!0,autoComplete:"off",variant:"outlined",onChange:S=>k&&s(S.target.value),onClick:()=>!k&&!r&&f(!0),InputProps:{"data-cy":"export-blocklet-did",endAdornment:!k&&l.jsx($e,{position:"end",children:l.jsx(F,{onClick:()=>f(!0),children:o(r?"common.update":"common.create")})})},helperText:"",value:r||""}),i&&l.jsx(_t,{open:!0,popup:!0,onClose:()=>f(!1),action:"gen-blocklet-key-pair",locale:n,checkFn:m.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:I,onError:y,extraParams:{did:d.meta.did},messages:{title:o("blocklet.publish.connect.title"),scan:o("blocklet.publish.connect.scan"),confirm:o("blocklet.publish.connect.confirm"),success:o("blocklet.publish.connect.success")}}),l.jsx(X,{required:!0,label:`Blocklet ${o("common.title")}`,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-title"},fullWidth:!0,helperText:"",value:a||"",onChange:S=>{p(S.target.value)}}),l.jsx(X,{sx:{my:4},id:"blocklet-type",select:!0,label:`Blocklet ${o("common.type")}`,helperText:"",fullWidth:!0,value:u,onChange:S=>b(S.target.value),children:So.map(S=>l.jsx(Ot,{value:S.value,disabled:S.disabled,children:S.label[n]||S.label.en},S.value))})]}),l.jsx(F,{variant:"contained",disabled:c,onClick:E,children:o("common.create")})]})}qe.propTypes={};qe.defaultProps={};const Eo=q.div`
5
+ `,So=[{label:{en:"Resource",zh:"资源"},value:"resource"},{label:{en:"Application",zh:"应用"},value:"pack"}];function qe({...e}){const t=xt(),{t:o,locale:n}=ne(),{blocklet:d}=xe(),[a,p]=x.useState(""),[c,h]=x.useState(!1),[u,b]=x.useState("resource"),{api:m}=Qt(),{api:g}=be(),[r,s]=x.useState(),[i,f]=x.useState(!1),[k]=Zt("manual-create-blocklet-did",!1),{componentDid:C=""}=ge(),y=S=>{w.error(S.message),f(!1)},T=S=>{var D;const v=(D=S==null?void 0:S.blockletWallet)==null?void 0:D.address;v?s(v):w.error("Empty Blocklet DID"),f(!1)},E=()=>{if(!r){w.error(o("blocklet.publish.errorTip.noDid"));return}if(!a){w.error(o("blocklet.publish.errorTip.noTitle"));return}h(!0),g.createProject({input:{did:d.meta.did,blockletTitle:a||"",blockletDid:r,type:u,componentDid:C}}).then(()=>{h(!1),t("../",{replace:!0})}).catch(S=>{h(!1),w.error(S.message)})};return l.jsxs(Eo,{...e,children:[l.jsxs(Ke,{className:"breadcrumbs","aria-label":"breadcrumb",children:[l.jsx(W,{to:"..",children:o("common.publish")}),l.jsxs(L,{color:"text.primary",children:[o("common.create")," Blocklet"]})]}),l.jsxs(j,{style:{maxWidth:500},children:[l.jsx(G,{required:!0,sx:{mb:4},label:"Blocklet DID",fullWidth:!0,readonly:!0,autoComplete:"off",variant:"outlined",onChange:S=>k&&s(S.target.value),onClick:()=>!k&&!r&&f(!0),InputProps:{"data-cy":"export-blocklet-did",endAdornment:!k&&l.jsx($e,{position:"end",children:l.jsx(F,{onClick:()=>f(!0),children:o(r?"common.update":"common.create")})})},helperText:"",value:r||""}),i&&l.jsx(Lt,{open:!0,popup:!0,onClose:()=>f(!1),action:"gen-blocklet-key-pair",locale:n,checkFn:m.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:T,onError:y,extraParams:{did:d.meta.did},messages:{title:o("blocklet.publish.connect.title"),scan:o("blocklet.publish.connect.scan"),confirm:o("blocklet.publish.connect.confirm"),success:o("blocklet.publish.connect.success")}}),l.jsx(G,{required:!0,label:`Blocklet ${o("common.title")}`,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-title"},fullWidth:!0,helperText:"",value:a||"",onChange:S=>{p(S.target.value)}}),l.jsx(G,{sx:{my:4},id:"blocklet-type",select:!0,label:`Blocklet ${o("common.type")}`,helperText:"",fullWidth:!0,value:u,onChange:S=>b(S.target.value),children:So.map(S=>l.jsx(Ot,{value:S.value,disabled:S.disabled,children:S.label[n]||S.label.en},S.value))})]}),l.jsx(F,{variant:"contained",disabled:c,onClick:E,children:o("common.create")})]})}qe.propTypes={};qe.defaultProps={};const Eo=q.div`
6
6
  .breadcrumbs {
7
7
  margin-bottom: 24px;
8
8
  }
9
- `;function Tt(){const{t:e,locale:t}=ne(),{projectId:o}=ge(),{api:n}=be(),[d,a]=x.useState(!0),{blocklet:p}=xe(),[c,h]=x.useState(null),[u,b]=x.useState(null),[m,g]=x.useState(null),r=()=>{n.getReleases({input:{did:p.meta.did,projectId:o}}).then(y=>{const I=(y==null?void 0:y.releases)||[];a(!1),h(I)}).catch(y=>{a(!1),w.error(y.message)})},s=()=>{n.doBatchQuery({getProject:{input:{did:p.meta.did,projectId:o}},getReleases:{input:{did:p.meta.did,projectId:o}}}).then(y=>{b(y.getProject.project||{}),h(y.getReleases.releases||[]),a(!1)}).catch(y=>{a(!1),w.error(y.message)})};x.useEffect(()=>{s()},[]);const i=()=>{a(!1);const y=m.id;n.deleteRelease({input:{did:p.meta.did,projectId:o,releaseId:y}}).then(()=>{a(!1),r(),w.success(e("common.removeSuccess")),g(null)}).catch(I=>{a(!1),w.error(I.message)})},f=y=>{g(y)};if(!c&&d)return l.jsx(ke,{});if(!c)return null;const k=l.jsxs(Ke,{className:"breadcrumbs","aria-label":"breadcrumb",children:[l.jsx(W,{to:"..",children:e("common.publish")}),l.jsx(_,{color:"text.primary",children:u.blockletTitle})]});if(!c.length)return l.jsxs(l.Fragment,{children:[k,l.jsxs(j,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[l.jsx(j,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),l.jsx(j,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const C=[{label:e("common.version"),name:"blockletVersion",options:{customBodyRenderLite:y=>{const I=c[y];return l.jsx(W,{to:`${I.id}`,children:I.blockletVersion||"/"})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:y=>{const I=c[y];return l.jsx(_,{className:"note",children:I.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:y=>l.jsx(Ct,{type:y==="published"?"success":"warning",children:Mt(y)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:y=>{const I=c[y];return I.status!==z.PROJECT.RELEASE_STATUS.published?"":l.jsx(bt,{value:Number(I.updatedAt),locale:t})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:y=>{const I=c[y];return l.jsxs(j,{display:"flex",alignItems:"center",children:[l.jsx(Se,{color:"primary","aria-label":"download",disabled:I.status!=="published",children:I.status==="published"?l.jsx("a",{style:{display:"flex"},href:me(`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${u.id}/${I.id}/download/${(I.files||[])[0]}`),children:l.jsx(st,{sx:{fontSize:18}})}):l.jsx(st,{sx:{fontSize:18}})}),l.jsx(Se,{color:"error","aria-label":"delete",onClick:()=>f(I),children:l.jsx(jt,{sx:{fontSize:18}})})]})}}}];return l.jsxs(vo,{children:[l.jsxs(j,{className:"header",children:[k,l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createRelease")})})]}),l.jsx(ze,{className:"main-table",verticalKeyWidth:100,locale:t,data:c,columns:C,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),m&&l.jsx(Nt,{title:e(`${e("common.delete")} ${m.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:i,onCancel:()=>g(null)})]})}Tt.propTypes={};const vo=q(j)`
9
+ `;function It(){const{t:e,locale:t}=ne(),{projectId:o}=ge(),{api:n}=be(),[d,a]=x.useState(!0),{blocklet:p}=xe(),[c,h]=x.useState(null),[u,b]=x.useState(null),[m,g]=x.useState(null),r=()=>{n.getReleases({input:{did:p.meta.did,projectId:o}}).then(y=>{const T=(y==null?void 0:y.releases)||[];a(!1),h(T)}).catch(y=>{a(!1),w.error(y.message)})},s=()=>{n.doBatchQuery({getProject:{input:{did:p.meta.did,projectId:o}},getReleases:{input:{did:p.meta.did,projectId:o}}}).then(y=>{b(y.getProject.project||{}),h(y.getReleases.releases||[]),a(!1)}).catch(y=>{a(!1),w.error(y.message)})};x.useEffect(()=>{s()},[]);const i=()=>{a(!1);const y=m.id;n.deleteRelease({input:{did:p.meta.did,projectId:o,releaseId:y}}).then(()=>{a(!1),r(),w.success(e("common.removeSuccess")),g(null)}).catch(T=>{a(!1),w.error(T.message)})},f=y=>{g(y)};if(!c&&d)return l.jsx(ke,{});if(!c)return null;const k=l.jsxs(Ke,{className:"breadcrumbs","aria-label":"breadcrumb",children:[l.jsx(W,{to:"..",children:e("common.publish")}),l.jsx(L,{color:"text.primary",children:u.blockletTitle})]});if(!c.length)return l.jsxs(l.Fragment,{children:[k,l.jsxs(j,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[l.jsx(j,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),l.jsx(j,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const C=[{label:e("common.version"),name:"blockletVersion",options:{customBodyRenderLite:y=>{const T=c[y];return l.jsx(W,{to:`${T.id}`,children:T.blockletVersion||"/"})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:y=>{const T=c[y];return l.jsx(L,{className:"note",children:T.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:y=>l.jsx(Ct,{type:y==="published"?"success":"warning",children:Mt(y)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:y=>{const T=c[y];return T.status!==z.PROJECT.RELEASE_STATUS.published?"":l.jsx(bt,{value:Number(T.updatedAt),locale:t})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:y=>{const T=c[y];return l.jsxs(j,{display:"flex",alignItems:"center",children:[l.jsx(Se,{color:"primary","aria-label":"download",disabled:T.status!=="published",children:T.status==="published"?l.jsx("a",{style:{display:"flex"},href:me(`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${u.id}/${T.id}/download/${(T.files||[])[0]}`),children:l.jsx(st,{sx:{fontSize:18}})}):l.jsx(st,{sx:{fontSize:18}})}),l.jsx(Se,{color:"error","aria-label":"delete",onClick:()=>f(T),children:l.jsx(jt,{sx:{fontSize:18}})})]})}}}];return l.jsxs(vo,{children:[l.jsxs(j,{className:"header",children:[k,l.jsx(W,{to:"create",children:l.jsx(F,{variant:"contained",children:e("blocklet.publish.createRelease")})})]}),l.jsx(ze,{className:"main-table",verticalKeyWidth:100,locale:t,data:c,columns:C,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),m&&l.jsx(Nt,{title:e(`${e("common.delete")} ${m.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:i,onCancel:()=>g(null)})]})}It.propTypes={};const vo=q(j)`
10
10
  .header {
11
11
  display: flex;
12
12
  align-items: center;
@@ -19,7 +19,7 @@ import{an as At,j as l,aB as K,cq as Lt,aE as $,f6 as ot,aD as se,az as Le,aA as
19
19
  word-break: break-all;
20
20
  white-space: pre-line;
21
21
  }
22
- `;function Ro(e){return _e("MuiTreeView",e)}Le("MuiTreeView",["root"]);const St={instance:null,multiSelect:!1,disabledItemsFocusable:!1,treeId:void 0,icons:{defaultCollapseIcon:null,defaultExpandIcon:null,defaultParentIcon:null,defaultEndIcon:null}},Et=x.createContext(St),Po=(e,t)=>{const o=x.useRef({}),[n,d]=x.useState(()=>{const p={};return e.forEach(c=>{c.models&&Object.entries(c.models).forEach(([h,u])=>{o.current[h]={controlledProp:u.controlledProp,defaultProp:u.defaultProp,isControlled:t[u.controlledProp]!==void 0},p[h]=t[u.defaultProp]})}),p});return Object.fromEntries(Object.entries(o.current).map(([p,c])=>{const h=c.isControlled?t[c.controlledProp]:n[p];return[p,{value:h,setValue:u=>{c.isControlled||d(b=>$({},b,{[p]:u}))}}]}))};class wo{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,o,n={}){let d=this.events[t];d||(d={highPriority:new Map,regular:new Map},this.events[t]=d),n.isFirst?d.highPriority.set(o,!0):d.regular.set(o,!0)}removeListener(t,o){this.events[t]&&(this.events[t].regular.delete(o),this.events[t].highPriority.delete(o))}removeAllListeners(){this.events={}}emit(t,...o){const n=this.events[t];if(!n)return;const d=Array.from(n.highPriority.keys()),a=Array.from(n.regular.keys());for(let p=d.length-1;p>=0;p-=1){const c=d[p];n.highPriority.has(c)&&c.apply(this,o)}for(let p=0;p<a.length;p+=1){const c=a[p];n.regular.has(c)&&c.apply(this,o)}}once(t,o){const n=this;this.on(t,function d(...a){n.removeListener(t,d),o.apply(n,a)})}}const ve=(e,t)=>{const o=e.getNode(t),n=e.getNavigableChildrenIds(o.parentId),d=n.indexOf(t);if(d===0)return o.parentId;let a=n[d-1];for(;e.isNodeExpanded(a)&&e.getNavigableChildrenIds(a).length>0;)a=e.getNavigableChildrenIds(a).pop();return a},fe=(e,t)=>{if(e.isNodeExpanded(t)&&e.getNavigableChildrenIds(t).length>0)return e.getNavigableChildrenIds(t)[0];let o=e.getNode(t);for(;o!=null;){const n=e.getNavigableChildrenIds(o.parentId),d=n[n.indexOf(o.id)+1];if(d)return d;o=e.getNode(o.parentId)}return null},Be=e=>{let t=e.getNavigableChildrenIds(null).pop();for(;e.isNodeExpanded(t);)t=e.getNavigableChildrenIds(t).pop();return t},Ae=e=>e.getNavigableChildrenIds(null)[0],re=(e,t)=>{Object.assign(e,t)},$o=e=>e.isPropagationStopped!==void 0,Do=({instance:e})=>{const[t]=x.useState(()=>new wo),o=x.useCallback((...d)=>{const[a,p,c={}]=d;c.defaultMuiPrevented=!1,!($o(c)&&c.isPropagationStopped())&&t.emit(a,p,c)},[t]),n=x.useCallback((d,a)=>(t.on(d,a),()=>{t.removeListener(d,a)}),[t]);re(e,{$$publishEvent:o,$$subscribeEvent:n})},Bo=[Do],Ao=e=>{const t=[...Bo,...e.plugins],o=t.reduce((s,i)=>i.getDefaultizedParams?i.getDefaultizedParams(s):s,e),n=Po(t,o),a=x.useRef({}).current,p=x.useRef(null),c=gt(p,e.rootRef),[h,u]=x.useState(()=>{const s={};return t.forEach(i=>{i.getInitialState&&Object.assign(s,i.getInitialState(o))}),s}),b=[];let m=St;const g=s=>{const i=s({instance:a,params:o,state:h,setState:u,rootRef:p,models:n})||{};i.getRootProps&&b.push(i.getRootProps),i.contextValue&&(m=i.contextValue)};return t.forEach(g),{getRootProps:(s={})=>{const i=$({role:"tree",tabIndex:0},s,{ref:c});return b.forEach(f=>{Object.assign(i,f(s))}),i},rootRef:c,contextValue:m}},Lo=["element"];function _o(e,t){for(let o=0;o<e.length;o+=1)if(t(e[o]))return o;return-1}function Oo(e,t){let o=0,n=e.length-1;for(;o<=n;){const d=Math.floor((o+n)/2);if(e[d].element===t)return d;e[d].element.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING?n=d-1:o=d+1}return o}const vt=x.createContext({});function Mo(e){const t=x.useRef(null);return x.useEffect(()=>{t.current=e},[e]),t.current}const nt=()=>{};function Vo(e){const[,t]=x.useState(),{registerDescendant:o=nt,unregisterDescendant:n=nt,descendants:d=[],parentId:a=null}=x.useContext(vt),p=_o(d,u=>u.element===e.element),c=Mo(d),h=d.some((u,b)=>c&&c[b]&&c[b].element!==u.element);return Vt(()=>{if(e.element)return o($({},e,{index:p})),()=>{n(e.element)};t({})},[o,n,p,h,e]),{parentId:a,index:p}}function Rt(e){const{children:t,id:o}=e,[n,d]=x.useState([]),a=x.useCallback(h=>{let{element:u}=h,b=se(h,Lo);d(m=>{if(m.length===0)return[$({},b,{element:u,index:0})];const g=Oo(m,u);let r;if(m[g]&&m[g].element===u)r=m;else{const s=$({},b,{element:u,index:g});r=m.slice(),r.splice(g,0,s)}return r.forEach((s,i)=>{s.index=i}),r})},[]),p=x.useCallback(h=>{d(u=>u.filter(b=>h!==b.element))},[]),c=x.useMemo(()=>({descendants:n,registerDescendant:a,unregisterDescendant:p,parentId:o}),[n,a,p,o]);return l.jsx(vt.Provider,{value:c,children:t})}function Fo(e){const{value:t,children:o}=e;return l.jsx(Et.Provider,{value:t,children:l.jsx(Rt,{children:o})})}const zo=(e,t,o)=>{e.$$publishEvent(t,o)},Wo=({instance:e,params:t})=>{const o=x.useRef({}),n=x.useCallback(u=>o.current[u],[]),d=x.useCallback(u=>{o.current[u.id]=u},[]),a=x.useCallback(u=>{const b=$({},o.current);delete b[u],o.current=b,zo(e,"removeNode",{id:u})},[e]),p=x.useCallback(u=>{if(u==null)return!1;let b=e.getNode(u);if(!b)return!1;if(b.disabled)return!0;for(;b.parentId!=null;)if(b=e.getNode(b.parentId),b.disabled)return!0;return!1},[e]),c=he(u=>Object.values(o.current).filter(b=>b.parentId===u).sort((b,m)=>b.index-m.index).map(b=>b.id));re(e,{getNode:n,updateNode:d,removeNode:a,getChildrenIds:c,getNavigableChildrenIds:u=>{let b=e.getChildrenIds(u);return t.disabledItemsFocusable||(b=b.filter(m=>!e.isNodeDisabled(m))),b},isNodeDisabled:p})},He=({instance:e,params:t,models:o})=>{const n=x.useCallback(c=>Array.isArray(o.expanded.value)?o.expanded.value.indexOf(c)!==-1:!1,[o.expanded.value]),d=x.useCallback(c=>{var h;return!!((h=e.getNode(c))!=null&&h.expandable)},[e]),a=he((c,h)=>{if(h==null)return;let u;o.expanded.value.indexOf(h)!==-1?u=o.expanded.value.filter(b=>b!==h):u=[h].concat(o.expanded.value),t.onNodeToggle&&t.onNodeToggle(c,u),o.expanded.setValue(u)});re(e,{isNodeExpanded:n,isNodeExpandable:d,toggleNodeExpansion:a,expandAllSiblings:(c,h)=>{const u=e.getNode(h),m=e.getChildrenIds(u.parentId).filter(r=>e.isNodeExpandable(r)&&!e.isNodeExpanded(r)),g=o.expanded.value.concat(m);m.length>0&&(o.expanded.setValue(g),t.onNodeToggle&&t.onNodeToggle(c,g))}})};He.models={expanded:{controlledProp:"expanded",defaultProp:"defaultExpanded"}};const Uo=[];He.getDefaultizedParams=e=>{var t;return $({},e,{defaultExpanded:(t=e.defaultExpanded)!=null?t:Uo})};const Ko=(e,t,o)=>{if(t===o)return[t,o];const n=e.getNode(t),d=e.getNode(o);if(n.parentId===d.id||d.parentId===n.id)return d.parentId===n.id?[n.id,d.id]:[d.id,n.id];const a=[n.id],p=[d.id];let c=n.parentId,h=d.parentId,u=p.indexOf(c)!==-1,b=a.indexOf(h)!==-1,m=!0,g=!0;for(;!b&&!u;)m&&(a.push(c),u=p.indexOf(c)!==-1,m=c!==null,!u&&m&&(c=e.getNode(c).parentId)),g&&!u&&(p.push(h),b=a.indexOf(h)!==-1,g=h!==null,!b&&g&&(h=e.getNode(h).parentId));const r=u?c:h,s=e.getChildrenIds(r),i=a[a.indexOf(r)-1],f=p[p.indexOf(r)-1];return s.indexOf(i)<s.indexOf(f)?[t,o]:[o,t]},Ge=({instance:e,params:t,models:o})=>{const n=x.useRef(null),d=x.useRef(!1),a=x.useRef([]),p=s=>Array.isArray(o.selected.value)?o.selected.value.indexOf(s)!==-1:o.selected.value===s,c=(s,i,f=!1)=>{if(!t.disableSelection){if(f){if(Array.isArray(o.selected.value)){let k;o.selected.value.indexOf(i)!==-1?k=o.selected.value.filter(C=>C!==i):k=[i].concat(o.selected.value),t.onNodeSelect&&t.onNodeSelect(s,k),o.selected.setValue(k)}}else{const k=t.multiSelect?[i]:i;t.onNodeSelect&&t.onNodeSelect(s,k),o.selected.setValue(k)}n.current=i,d.current=!1,a.current=[]}},h=(s,i)=>{const[f,k]=Ko(e,s,i),C=[f];let y=f;for(;y!==k;)y=fe(e,y),C.push(y);return C},u=(s,i)=>{let f=o.selected.value.slice();const{start:k,next:C,current:y}=i;!C||!y||(a.current.indexOf(y)===-1&&(a.current=[]),d.current?a.current.indexOf(C)!==-1?(f=f.filter(I=>I===k||I!==y),a.current=a.current.filter(I=>I===k||I!==y)):(f.push(C),a.current.push(C)):(f.push(C),a.current.push(y,C)),t.onNodeSelect&&t.onNodeSelect(s,f),o.selected.setValue(f))},b=(s,i)=>{let f=o.selected.value.slice();const{start:k,end:C}=i;d.current&&(f=f.filter(E=>a.current.indexOf(E)===-1));let y=h(k,C);y=y.filter(E=>!e.isNodeDisabled(E)),a.current=y;let I=f.concat(y);I=I.filter((E,S)=>I.indexOf(E)===S),t.onNodeSelect&&t.onNodeSelect(s,I),o.selected.setValue(I)};return re(e,{isNodeSelected:p,selectNode:c,selectRange:(s,i,f=!1)=>{if(t.disableSelection)return;const{start:k=n.current,end:C,current:y}=i;f?u(s,{start:k,next:C,current:y}):k!=null&&C!=null&&b(s,{start:k,end:C}),d.current=!0},rangeSelectToLast:(s,i)=>{n.current||(n.current=i);const f=d.current?n.current:i;e.selectRange(s,{start:f,end:Be(e)})},rangeSelectToFirst:(s,i)=>{n.current||(n.current=i);const f=d.current?n.current:i;e.selectRange(s,{start:f,end:Ae(e)})}}),{getRootProps:()=>({"aria-multiselectable":t.multiSelect})}};Ge.models={selected:{controlledProp:"selected",defaultProp:"defaultSelected"}};const qo=[];Ge.getDefaultizedParams=e=>{var t,o,n;return $({},e,{disableSelection:(t=e.disableSelection)!=null?t:!1,multiSelect:(o=e.multiSelect)!=null?o:!1,defaultSelected:(n=e.defaultSelected)!=null?n:e.multiSelect?qo:null})};const rt=1e3;class Ho{constructor(t=rt){this.timeouts=new Map,this.cleanupTimeout=rt,this.cleanupTimeout=t}register(t,o,n){this.timeouts||(this.timeouts=new Map);const d=setTimeout(()=>{typeof o=="function"&&o(),this.timeouts.delete(n.cleanupToken)},this.cleanupTimeout);this.timeouts.set(n.cleanupToken,d)}unregister(t){const o=this.timeouts.get(t.cleanupToken);o&&(this.timeouts.delete(t.cleanupToken),clearTimeout(o))}reset(){this.timeouts&&(this.timeouts.forEach((t,o)=>{this.unregister({cleanupToken:o})}),this.timeouts=void 0)}}class Go{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,o,n){this.registry.register(t,o,n)}unregister(t){this.registry.unregister(t)}reset(){}}class Jo{}function Xo(e){let t=0;return function(n,d,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new Go:new Ho);const[p]=x.useState(new Jo),c=x.useRef(null),h=x.useRef();h.current=a;const u=x.useRef(null);if(!c.current&&h.current){const b=(m,g)=>{if(!g.defaultMuiPrevented){var r;(r=h.current)==null||r.call(h,m,g)}};c.current=n.$$subscribeEvent(d,b),t+=1,u.current={cleanupToken:t},e.registry.register(p,()=>{var m;(m=c.current)==null||m.call(c),c.current=null,u.current=null},u.current)}else!h.current&&c.current&&(c.current(),c.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));x.useEffect(()=>{if(!c.current&&h.current){const b=(m,g)=>{if(!g.defaultMuiPrevented){var r;(r=h.current)==null||r.call(h,m,g)}};c.current=n.$$subscribeEvent(d,b)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var b;(b=c.current)==null||b.call(c),c.current=null}},[n,d])}}const Yo={registry:null},Qo=Xo(Yo),Je=({instance:e,params:t,state:o,setState:n,models:d,rootRef:a})=>{const p=he(r=>{const s=typeof r=="function"?r(o.focusedNodeId):r;n(i=>$({},i,{focusedNodeId:s}))}),c=x.useCallback(r=>o.focusedNodeId===r,[o.focusedNodeId]),h=he((r,s)=>{s&&(p(s),t.onNodeFocus&&t.onNodeFocus(r,s))});re(e,{isNodeFocused:c,focusNode:h}),Qo(e,"removeNode",({id:r})=>{p(s=>s===r&&a.current===kt(a.current).activeElement?e.getChildrenIds(null)[0]:s)});const u=r=>s=>{var i;if((i=r.onFocus)==null||i.call(r,s),s.target===s.currentTarget){const f=C=>{const y=e.getNode(C);return y&&(y.parentId==null||e.isNodeExpanded(y.parentId))};let k;Array.isArray(d.selected.value)?k=d.selected.value.find(f):d.selected.value!=null&&f(d.selected.value)&&(k=d.selected.value),k==null&&(k=e.getNavigableChildrenIds(null)[0]),e.focusNode(s,k)}},b=r=>s=>{var i;(i=r.onBlur)==null||i.call(r,s),p(null)},m=e.getNode(o.focusedNodeId),g=m?m.idAttribute:null;return{getRootProps:r=>({onFocus:u(r),onBlur:b(r),"aria-activedescendant":g??void 0})}};Je.getInitialState=()=>({focusedNodeId:null});Je.getDefaultizedParams=e=>{var t;return $({},e,{disabledItemsFocusable:(t=e.disabledItemsFocusable)!=null?t:!1})};function Zo(e){return e&&e.length===1&&e.match(/\S/)}function it(e,t,o){for(let n=t;n<e.length;n+=1)if(o===e[n])return n;return-1}const el=({instance:e,params:t,state:o})=>{const d=Ft().direction==="rtl",a=x.useRef({}),p=he((r,s)=>(a.current[r]=s,()=>{const i=$({},a.current);delete i[r],a.current=i}));re(e,{mapFirstChar:p});const c=r=>(o.focusedNodeId!=null&&e.isNodeExpandable(o.focusedNodeId)&&(e.isNodeExpanded(o.focusedNodeId)?e.focusNode(r,fe(e,o.focusedNodeId)):e.isNodeDisabled(o.focusedNodeId)||e.toggleNodeExpansion(r,o.focusedNodeId)),!0),h=r=>{if(o.focusedNodeId==null)return!1;if(e.isNodeExpanded(o.focusedNodeId)&&!e.isNodeDisabled(o.focusedNodeId))return e.toggleNodeExpansion(r,o.focusedNodeId),!0;const s=e.getNode(o.focusedNodeId).parentId;return s?(e.focusNode(r,s),!0):!1},u=(r,s,i)=>{let f,k;const C=i.toLowerCase(),y=[],I=[];Object.keys(a.current).forEach(E=>{const S=e.getNode(E),v=S.parentId?e.isNodeExpanded(S.parentId):!0,D=t.disabledItemsFocusable?!1:e.isNodeDisabled(E);v&&!D&&(y.push(E),I.push(a.current[E]))}),f=y.indexOf(s)+1,f>=y.length&&(f=0),k=it(I,f,C),k===-1&&(k=it(I,0,C)),k>-1&&e.focusNode(r,y[k])},b=(r,s)=>{e.isNodeDisabled(fe(e,s))||e.selectRange(r,{end:fe(e,s),current:s},!0)},m=(r,s)=>{e.isNodeDisabled(ve(e,s))||e.selectRange(r,{end:ve(e,s),current:s},!0)},g=r=>s=>{var i;(i=r.onKeyDown)==null||i.call(r,s);let f=!1;const k=s.key;if(s.altKey||s.currentTarget!==s.target||o.focusedNodeId==null)return;const C=s.ctrlKey||s.metaKey;switch(k){case" ":!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&(f=!0,t.multiSelect&&s.shiftKey?e.selectRange(s,{end:o.focusedNodeId}):t.multiSelect?e.selectNode(s,o.focusedNodeId,!0):e.selectNode(s,o.focusedNodeId)),s.stopPropagation();break;case"Enter":e.isNodeDisabled(o.focusedNodeId)||(e.isNodeExpandable(o.focusedNodeId)?(e.toggleNodeExpansion(s,o.focusedNodeId),f=!0):t.disableSelection||(f=!0,t.multiSelect?e.selectNode(s,o.focusedNodeId,!0):e.selectNode(s,o.focusedNodeId))),s.stopPropagation();break;case"ArrowDown":t.multiSelect&&s.shiftKey&&!t.disableSelection&&b(s,o.focusedNodeId),e.focusNode(s,fe(e,o.focusedNodeId)),f=!0;break;case"ArrowUp":t.multiSelect&&s.shiftKey&&!t.disableSelection&&m(s,o.focusedNodeId),e.focusNode(s,ve(e,o.focusedNodeId)),f=!0;break;case"ArrowRight":d?f=h(s):f=c(s);break;case"ArrowLeft":d?f=c(s):f=h(s);break;case"Home":t.multiSelect&&C&&s.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&e.rangeSelectToFirst(s,o.focusedNodeId),e.focusNode(s,Ae(e)),f=!0;break;case"End":t.multiSelect&&C&&s.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&e.rangeSelectToLast(s,o.focusedNodeId),e.focusNode(s,Be(e)),f=!0;break;default:k==="*"?(e.expandAllSiblings(s,o.focusedNodeId),f=!0):t.multiSelect&&C&&k.toLowerCase()==="a"&&!t.disableSelection?(e.selectRange(s,{start:Ae(e),end:Be(e)}),f=!0):!C&&!s.shiftKey&&Zo(k)&&(u(s,o.focusedNodeId,k),f=!0)}f&&(s.preventDefault(),s.stopPropagation())};return{getRootProps:r=>({onKeyDown:g(r)})}},tl=({instance:e,params:t})=>{const o=zt(t.id);return{getRootProps:()=>({id:o}),contextValue:{treeId:o,instance:e,multiSelect:t.multiSelect,disabledItemsFocusable:t.disabledItemsFocusable,icons:{defaultCollapseIcon:t.defaultCollapseIcon,defaultEndIcon:t.defaultEndIcon,defaultExpandIcon:t.defaultExpandIcon,defaultParentIcon:t.defaultParentIcon}}}},ol=[Wo,He,Ge,Je,el,tl],ll=["disabledItemsFocusable","expanded","defaultExpanded","onNodeToggle","onNodeFocus","disableSelection","defaultSelected","selected","multiSelect","onNodeSelect","id","defaultCollapseIcon","defaultEndIcon","defaultExpandIcon","defaultParentIcon","children"],sl=e=>{const{classes:t}=e;return Ve({root:["root"]},Ro,t)},ct=K("ul",{name:"MuiTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0}),nl=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiTreeView"}),d=n,a=n,{disabledItemsFocusable:p,expanded:c,defaultExpanded:h,onNodeToggle:u,onNodeFocus:b,disableSelection:m,defaultSelected:g,selected:r,multiSelect:s,onNodeSelect:i,id:f,defaultCollapseIcon:k,defaultEndIcon:C,defaultExpandIcon:y,defaultParentIcon:I,children:E}=a,S=se(a,ll),{getRootProps:v,contextValue:D}=Ao({disabledItemsFocusable:p,expanded:c,defaultExpanded:h,onNodeToggle:u,onNodeFocus:b,disableSelection:m,defaultSelected:g,selected:r,multiSelect:s,onNodeSelect:i,id:f,defaultCollapseIcon:k,defaultEndIcon:C,defaultExpandIcon:y,defaultParentIcon:I,plugins:ol,rootRef:o}),T=sl(n),B=ht({elementType:ct,externalSlotProps:{},externalForwardedProps:S,className:T.root,getSlotProps:v,ownerState:d});return l.jsx(Fo,{value:D,children:l.jsx(ct,$({},B,{children:E}))})}),Pt=()=>x.useContext(Et);function rl(e){const{instance:t,multiSelect:o}=Pt(),n=t?t.isNodeExpandable(e):!1,d=t?t.isNodeExpanded(e):!1,a=t?t.isNodeFocused(e):!1,p=t?t.isNodeSelected(e):!1,c=t?t.isNodeDisabled(e):!1;return{disabled:c,expanded:d,selected:p,focused:a,handleExpansion:m=>{if(t&&!c){a||t.focusNode(m,e);const g=o&&(m.shiftKey||m.ctrlKey||m.metaKey);n&&!(g&&t.isNodeExpanded(e))&&t.toggleNodeExpansion(m,e)}},handleSelection:m=>{t&&!c&&(a||t.focusNode(m,e),o&&(m.shiftKey||m.ctrlKey||m.metaKey)?m.shiftKey?t.selectRange(m,{end:e}):t.selectNode(m,e,!0):t.selectNode(m,e))},preventSelection:m=>{(m.shiftKey||m.ctrlKey||m.metaKey||c)&&m.preventDefault()}}}const il=["classes","className","displayIcon","expansionIcon","icon","label","nodeId","onClick","onMouseDown"],wt=x.forwardRef(function(t,o){const{classes:n,className:d,displayIcon:a,expansionIcon:p,icon:c,label:h,nodeId:u,onClick:b,onMouseDown:m}=t,g=se(t,il),{disabled:r,expanded:s,selected:i,focused:f,handleExpansion:k,handleSelection:C,preventSelection:y}=rl(u),I=c||p||a,E=v=>{y(v),m&&m(v)},S=v=>{k(v),C(v),b&&b(v)};return l.jsxs("div",$({},g,{className:Me(d,n.root,s&&n.expanded,i&&n.selected,f&&n.focused,r&&n.disabled),onClick:S,onMouseDown:E,ref:o,children:[l.jsx("div",{className:n.iconContainer,children:I}),l.jsx("div",{className:n.label,children:h})]}))});function cl(e){return _e("MuiTreeItem",e)}const J=Le("MuiTreeItem",["root","group","content","expanded","selected","focused","disabled","iconContainer","label"]),al=["children","className","collapseIcon","ContentComponent","ContentProps","endIcon","expandIcon","disabled","icon","id","label","nodeId","onClick","onMouseDown","TransitionComponent","TransitionProps"],dl=e=>{const{classes:t}=e;return Ve({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],label:["label"],group:["group"]},cl,t)},ul=K("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),pl=K(wt,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${J.iconContainer}`]:t.iconContainer},t.label&&{[`& .${J.label}`]:t.label}]})(({theme:e})=>({padding:"0 8px",width:"100%",boxSizing:"border-box",display:"flex",alignItems:"center",cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${J.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${J.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${J.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${J.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${J.iconContainer}`]:{marginRight:4,width:15,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${J.label}`]:$({paddingLeft:4,width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1)})),fl=K(yt,{name:"MuiTreeItem",slot:"Group",overridesResolver:(e,t)=>t.group})({margin:0,padding:0,marginLeft:17}),ml=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiTreeItem"}),{children:d,className:a,collapseIcon:p,ContentComponent:c=wt,ContentProps:h,endIcon:u,expandIcon:b,disabled:m,icon:g,id:r,label:s,nodeId:i,onClick:f,onMouseDown:k,TransitionComponent:C=yt,TransitionProps:y}=n,I=se(n,al),{icons:E,multiSelect:S,disabledItemsFocusable:v,treeId:D,instance:T}=Pt();let B;r!=null?B=r:D&&i&&(B=`${D}-${i}`);const[H,ye]=x.useState(null),je=x.useRef(null),te=gt(ye,o),O=x.useMemo(()=>({element:H,id:i}),[i,H]),{index:oe,parentId:ie}=Vo(O),G=!!(Array.isArray(d)?d.length:d),Y=T?T.isNodeExpanded(i):!1,ce=T?T.isNodeFocused(i):!1,le=T?T.isNodeSelected(i):!1,ae=T?T.isNodeDisabled(i):!1,Q=$({},n,{expanded:Y,focused:ce,selected:le,disabled:ae}),V=dl(Q);let de,ue;G&&(Y?ue=p||E.defaultCollapseIcon:ue=b||E.defaultExpandIcon),G?de=E.defaultParentIcon:de=u||E.defaultEndIcon,x.useEffect(()=>{if(T&&oe!==-1)return T.updateNode({id:i,idAttribute:B,index:oe,parentId:ie,expandable:G,disabled:m}),()=>T.removeNode(i)},[T,ie,oe,i,G,m,B]),x.useEffect(()=>{if(T&&s){var L,ee;return T.mapFirstChar(i,((L=(ee=je.current)==null?void 0:ee.textContent)!=null?L:"").substring(0,1).toLowerCase())}},[T,i,s]);let Z;S?Z=le:le&&(Z=!0);function Ce(L){if(L.target===L.currentTarget){let N;typeof L.target.getRootNode=="function"?N=L.target.getRootNode():N=kt(L.target),N.getElementById(D).focus({preventScroll:!0})}const ee=!v&&ae;T&&!ce&&L.currentTarget===L.target&&!ee&&T.focusNode(L,i)}return l.jsxs(ul,$({className:Me(V.root,a),role:"treeitem","aria-expanded":G?Y:void 0,"aria-selected":Z,"aria-disabled":ae||void 0,id:B,tabIndex:-1},I,{ownerState:Q,onFocus:Ce,ref:te,children:[l.jsx(pl,$({as:c,ref:je,classes:{root:V.content,expanded:V.expanded,selected:V.selected,focused:V.focused,disabled:V.disabled,iconContainer:V.iconContainer,label:V.label},label:s,nodeId:i,onClick:f,onMouseDown:k,icon:g,expansionIcon:ue,displayIcon:de,ownerState:Q},h)),d&&l.jsx(Rt,{id:i,children:l.jsx(fl,$({as:C,unmountOnExit:!0,className:V.group,in:Y,component:"ul",role:"group"},y,{children:d}))})]}))});function Xe({data:e,...t}){return!e||!e.length?null:l.jsx(hl,{...t,children:e.map(o=>l.jsx("a",{href:o.url,target:"_blank",rel:"noreferrer",children:l.jsx("img",{src:o.url,alt:o.alt||""})},o.url))})}Xe.propTypes={data:P.arrayOf(P.shape({url:P.string,alt:P.string}))};Xe.defaultProps={data:[]};const hl=q(j)`
22
+ `;function Ro(e){return Le("MuiTreeView",e)}_e("MuiTreeView",["root"]);const St={instance:null,multiSelect:!1,disabledItemsFocusable:!1,treeId:void 0,icons:{defaultCollapseIcon:null,defaultExpandIcon:null,defaultParentIcon:null,defaultEndIcon:null}},Et=x.createContext(St),Po=(e,t)=>{const o=x.useRef({}),[n,d]=x.useState(()=>{const p={};return e.forEach(c=>{c.models&&Object.entries(c.models).forEach(([h,u])=>{o.current[h]={controlledProp:u.controlledProp,defaultProp:u.defaultProp,isControlled:t[u.controlledProp]!==void 0},p[h]=t[u.defaultProp]})}),p});return Object.fromEntries(Object.entries(o.current).map(([p,c])=>{const h=c.isControlled?t[c.controlledProp]:n[p];return[p,{value:h,setValue:u=>{c.isControlled||d(b=>$({},b,{[p]:u}))}}]}))};class wo{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,o,n={}){let d=this.events[t];d||(d={highPriority:new Map,regular:new Map},this.events[t]=d),n.isFirst?d.highPriority.set(o,!0):d.regular.set(o,!0)}removeListener(t,o){this.events[t]&&(this.events[t].regular.delete(o),this.events[t].highPriority.delete(o))}removeAllListeners(){this.events={}}emit(t,...o){const n=this.events[t];if(!n)return;const d=Array.from(n.highPriority.keys()),a=Array.from(n.regular.keys());for(let p=d.length-1;p>=0;p-=1){const c=d[p];n.highPriority.has(c)&&c.apply(this,o)}for(let p=0;p<a.length;p+=1){const c=a[p];n.regular.has(c)&&c.apply(this,o)}}once(t,o){const n=this;this.on(t,function d(...a){n.removeListener(t,d),o.apply(n,a)})}}const ve=(e,t)=>{const o=e.getNode(t),n=e.getNavigableChildrenIds(o.parentId),d=n.indexOf(t);if(d===0)return o.parentId;let a=n[d-1];for(;e.isNodeExpanded(a)&&e.getNavigableChildrenIds(a).length>0;)a=e.getNavigableChildrenIds(a).pop();return a},fe=(e,t)=>{if(e.isNodeExpanded(t)&&e.getNavigableChildrenIds(t).length>0)return e.getNavigableChildrenIds(t)[0];let o=e.getNode(t);for(;o!=null;){const n=e.getNavigableChildrenIds(o.parentId),d=n[n.indexOf(o.id)+1];if(d)return d;o=e.getNode(o.parentId)}return null},Be=e=>{let t=e.getNavigableChildrenIds(null).pop();for(;e.isNodeExpanded(t);)t=e.getNavigableChildrenIds(t).pop();return t},Ae=e=>e.getNavigableChildrenIds(null)[0],re=(e,t)=>{Object.assign(e,t)},$o=e=>e.isPropagationStopped!==void 0,Do=({instance:e})=>{const[t]=x.useState(()=>new wo),o=x.useCallback((...d)=>{const[a,p,c={}]=d;c.defaultMuiPrevented=!1,!($o(c)&&c.isPropagationStopped())&&t.emit(a,p,c)},[t]),n=x.useCallback((d,a)=>(t.on(d,a),()=>{t.removeListener(d,a)}),[t]);re(e,{$$publishEvent:o,$$subscribeEvent:n})},Bo=[Do],Ao=e=>{const t=[...Bo,...e.plugins],o=t.reduce((s,i)=>i.getDefaultizedParams?i.getDefaultizedParams(s):s,e),n=Po(t,o),a=x.useRef({}).current,p=x.useRef(null),c=gt(p,e.rootRef),[h,u]=x.useState(()=>{const s={};return t.forEach(i=>{i.getInitialState&&Object.assign(s,i.getInitialState(o))}),s}),b=[];let m=St;const g=s=>{const i=s({instance:a,params:o,state:h,setState:u,rootRef:p,models:n})||{};i.getRootProps&&b.push(i.getRootProps),i.contextValue&&(m=i.contextValue)};return t.forEach(g),{getRootProps:(s={})=>{const i=$({role:"tree",tabIndex:0},s,{ref:c});return b.forEach(f=>{Object.assign(i,f(s))}),i},rootRef:c,contextValue:m}},_o=["element"];function Lo(e,t){for(let o=0;o<e.length;o+=1)if(t(e[o]))return o;return-1}function Oo(e,t){let o=0,n=e.length-1;for(;o<=n;){const d=Math.floor((o+n)/2);if(e[d].element===t)return d;e[d].element.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING?n=d-1:o=d+1}return o}const vt=x.createContext({});function Mo(e){const t=x.useRef(null);return x.useEffect(()=>{t.current=e},[e]),t.current}const nt=()=>{};function Vo(e){const[,t]=x.useState(),{registerDescendant:o=nt,unregisterDescendant:n=nt,descendants:d=[],parentId:a=null}=x.useContext(vt),p=Lo(d,u=>u.element===e.element),c=Mo(d),h=d.some((u,b)=>c&&c[b]&&c[b].element!==u.element);return Vt(()=>{if(e.element)return o($({},e,{index:p})),()=>{n(e.element)};t({})},[o,n,p,h,e]),{parentId:a,index:p}}function Rt(e){const{children:t,id:o}=e,[n,d]=x.useState([]),a=x.useCallback(h=>{let{element:u}=h,b=se(h,_o);d(m=>{if(m.length===0)return[$({},b,{element:u,index:0})];const g=Oo(m,u);let r;if(m[g]&&m[g].element===u)r=m;else{const s=$({},b,{element:u,index:g});r=m.slice(),r.splice(g,0,s)}return r.forEach((s,i)=>{s.index=i}),r})},[]),p=x.useCallback(h=>{d(u=>u.filter(b=>h!==b.element))},[]),c=x.useMemo(()=>({descendants:n,registerDescendant:a,unregisterDescendant:p,parentId:o}),[n,a,p,o]);return l.jsx(vt.Provider,{value:c,children:t})}function Fo(e){const{value:t,children:o}=e;return l.jsx(Et.Provider,{value:t,children:l.jsx(Rt,{children:o})})}const zo=(e,t,o)=>{e.$$publishEvent(t,o)},Wo=({instance:e,params:t})=>{const o=x.useRef({}),n=x.useCallback(u=>o.current[u],[]),d=x.useCallback(u=>{o.current[u.id]=u},[]),a=x.useCallback(u=>{const b=$({},o.current);delete b[u],o.current=b,zo(e,"removeNode",{id:u})},[e]),p=x.useCallback(u=>{if(u==null)return!1;let b=e.getNode(u);if(!b)return!1;if(b.disabled)return!0;for(;b.parentId!=null;)if(b=e.getNode(b.parentId),b.disabled)return!0;return!1},[e]),c=he(u=>Object.values(o.current).filter(b=>b.parentId===u).sort((b,m)=>b.index-m.index).map(b=>b.id));re(e,{getNode:n,updateNode:d,removeNode:a,getChildrenIds:c,getNavigableChildrenIds:u=>{let b=e.getChildrenIds(u);return t.disabledItemsFocusable||(b=b.filter(m=>!e.isNodeDisabled(m))),b},isNodeDisabled:p})},He=({instance:e,params:t,models:o})=>{const n=x.useCallback(c=>Array.isArray(o.expanded.value)?o.expanded.value.indexOf(c)!==-1:!1,[o.expanded.value]),d=x.useCallback(c=>{var h;return!!((h=e.getNode(c))!=null&&h.expandable)},[e]),a=he((c,h)=>{if(h==null)return;let u;o.expanded.value.indexOf(h)!==-1?u=o.expanded.value.filter(b=>b!==h):u=[h].concat(o.expanded.value),t.onNodeToggle&&t.onNodeToggle(c,u),o.expanded.setValue(u)});re(e,{isNodeExpanded:n,isNodeExpandable:d,toggleNodeExpansion:a,expandAllSiblings:(c,h)=>{const u=e.getNode(h),m=e.getChildrenIds(u.parentId).filter(r=>e.isNodeExpandable(r)&&!e.isNodeExpanded(r)),g=o.expanded.value.concat(m);m.length>0&&(o.expanded.setValue(g),t.onNodeToggle&&t.onNodeToggle(c,g))}})};He.models={expanded:{controlledProp:"expanded",defaultProp:"defaultExpanded"}};const Uo=[];He.getDefaultizedParams=e=>{var t;return $({},e,{defaultExpanded:(t=e.defaultExpanded)!=null?t:Uo})};const Ko=(e,t,o)=>{if(t===o)return[t,o];const n=e.getNode(t),d=e.getNode(o);if(n.parentId===d.id||d.parentId===n.id)return d.parentId===n.id?[n.id,d.id]:[d.id,n.id];const a=[n.id],p=[d.id];let c=n.parentId,h=d.parentId,u=p.indexOf(c)!==-1,b=a.indexOf(h)!==-1,m=!0,g=!0;for(;!b&&!u;)m&&(a.push(c),u=p.indexOf(c)!==-1,m=c!==null,!u&&m&&(c=e.getNode(c).parentId)),g&&!u&&(p.push(h),b=a.indexOf(h)!==-1,g=h!==null,!b&&g&&(h=e.getNode(h).parentId));const r=u?c:h,s=e.getChildrenIds(r),i=a[a.indexOf(r)-1],f=p[p.indexOf(r)-1];return s.indexOf(i)<s.indexOf(f)?[t,o]:[o,t]},Je=({instance:e,params:t,models:o})=>{const n=x.useRef(null),d=x.useRef(!1),a=x.useRef([]),p=s=>Array.isArray(o.selected.value)?o.selected.value.indexOf(s)!==-1:o.selected.value===s,c=(s,i,f=!1)=>{if(!t.disableSelection){if(f){if(Array.isArray(o.selected.value)){let k;o.selected.value.indexOf(i)!==-1?k=o.selected.value.filter(C=>C!==i):k=[i].concat(o.selected.value),t.onNodeSelect&&t.onNodeSelect(s,k),o.selected.setValue(k)}}else{const k=t.multiSelect?[i]:i;t.onNodeSelect&&t.onNodeSelect(s,k),o.selected.setValue(k)}n.current=i,d.current=!1,a.current=[]}},h=(s,i)=>{const[f,k]=Ko(e,s,i),C=[f];let y=f;for(;y!==k;)y=fe(e,y),C.push(y);return C},u=(s,i)=>{let f=o.selected.value.slice();const{start:k,next:C,current:y}=i;!C||!y||(a.current.indexOf(y)===-1&&(a.current=[]),d.current?a.current.indexOf(C)!==-1?(f=f.filter(T=>T===k||T!==y),a.current=a.current.filter(T=>T===k||T!==y)):(f.push(C),a.current.push(C)):(f.push(C),a.current.push(y,C)),t.onNodeSelect&&t.onNodeSelect(s,f),o.selected.setValue(f))},b=(s,i)=>{let f=o.selected.value.slice();const{start:k,end:C}=i;d.current&&(f=f.filter(E=>a.current.indexOf(E)===-1));let y=h(k,C);y=y.filter(E=>!e.isNodeDisabled(E)),a.current=y;let T=f.concat(y);T=T.filter((E,S)=>T.indexOf(E)===S),t.onNodeSelect&&t.onNodeSelect(s,T),o.selected.setValue(T)};return re(e,{isNodeSelected:p,selectNode:c,selectRange:(s,i,f=!1)=>{if(t.disableSelection)return;const{start:k=n.current,end:C,current:y}=i;f?u(s,{start:k,next:C,current:y}):k!=null&&C!=null&&b(s,{start:k,end:C}),d.current=!0},rangeSelectToLast:(s,i)=>{n.current||(n.current=i);const f=d.current?n.current:i;e.selectRange(s,{start:f,end:Be(e)})},rangeSelectToFirst:(s,i)=>{n.current||(n.current=i);const f=d.current?n.current:i;e.selectRange(s,{start:f,end:Ae(e)})}}),{getRootProps:()=>({"aria-multiselectable":t.multiSelect})}};Je.models={selected:{controlledProp:"selected",defaultProp:"defaultSelected"}};const qo=[];Je.getDefaultizedParams=e=>{var t,o,n;return $({},e,{disableSelection:(t=e.disableSelection)!=null?t:!1,multiSelect:(o=e.multiSelect)!=null?o:!1,defaultSelected:(n=e.defaultSelected)!=null?n:e.multiSelect?qo:null})};const rt=1e3;class Ho{constructor(t=rt){this.timeouts=new Map,this.cleanupTimeout=rt,this.cleanupTimeout=t}register(t,o,n){this.timeouts||(this.timeouts=new Map);const d=setTimeout(()=>{typeof o=="function"&&o(),this.timeouts.delete(n.cleanupToken)},this.cleanupTimeout);this.timeouts.set(n.cleanupToken,d)}unregister(t){const o=this.timeouts.get(t.cleanupToken);o&&(this.timeouts.delete(t.cleanupToken),clearTimeout(o))}reset(){this.timeouts&&(this.timeouts.forEach((t,o)=>{this.unregister({cleanupToken:o})}),this.timeouts=void 0)}}class Jo{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,o,n){this.registry.register(t,o,n)}unregister(t){this.registry.unregister(t)}reset(){}}class Xo{}function Go(e){let t=0;return function(n,d,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new Jo:new Ho);const[p]=x.useState(new Xo),c=x.useRef(null),h=x.useRef();h.current=a;const u=x.useRef(null);if(!c.current&&h.current){const b=(m,g)=>{if(!g.defaultMuiPrevented){var r;(r=h.current)==null||r.call(h,m,g)}};c.current=n.$$subscribeEvent(d,b),t+=1,u.current={cleanupToken:t},e.registry.register(p,()=>{var m;(m=c.current)==null||m.call(c),c.current=null,u.current=null},u.current)}else!h.current&&c.current&&(c.current(),c.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));x.useEffect(()=>{if(!c.current&&h.current){const b=(m,g)=>{if(!g.defaultMuiPrevented){var r;(r=h.current)==null||r.call(h,m,g)}};c.current=n.$$subscribeEvent(d,b)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var b;(b=c.current)==null||b.call(c),c.current=null}},[n,d])}}const Zo={registry:null},Qo=Go(Zo),Xe=({instance:e,params:t,state:o,setState:n,models:d,rootRef:a})=>{const p=he(r=>{const s=typeof r=="function"?r(o.focusedNodeId):r;n(i=>$({},i,{focusedNodeId:s}))}),c=x.useCallback(r=>o.focusedNodeId===r,[o.focusedNodeId]),h=he((r,s)=>{s&&(p(s),t.onNodeFocus&&t.onNodeFocus(r,s))});re(e,{isNodeFocused:c,focusNode:h}),Qo(e,"removeNode",({id:r})=>{p(s=>s===r&&a.current===kt(a.current).activeElement?e.getChildrenIds(null)[0]:s)});const u=r=>s=>{var i;if((i=r.onFocus)==null||i.call(r,s),s.target===s.currentTarget){const f=C=>{const y=e.getNode(C);return y&&(y.parentId==null||e.isNodeExpanded(y.parentId))};let k;Array.isArray(d.selected.value)?k=d.selected.value.find(f):d.selected.value!=null&&f(d.selected.value)&&(k=d.selected.value),k==null&&(k=e.getNavigableChildrenIds(null)[0]),e.focusNode(s,k)}},b=r=>s=>{var i;(i=r.onBlur)==null||i.call(r,s),p(null)},m=e.getNode(o.focusedNodeId),g=m?m.idAttribute:null;return{getRootProps:r=>({onFocus:u(r),onBlur:b(r),"aria-activedescendant":g??void 0})}};Xe.getInitialState=()=>({focusedNodeId:null});Xe.getDefaultizedParams=e=>{var t;return $({},e,{disabledItemsFocusable:(t=e.disabledItemsFocusable)!=null?t:!1})};function Yo(e){return e&&e.length===1&&e.match(/\S/)}function it(e,t,o){for(let n=t;n<e.length;n+=1)if(o===e[n])return n;return-1}const el=({instance:e,params:t,state:o})=>{const d=Ft().direction==="rtl",a=x.useRef({}),p=he((r,s)=>(a.current[r]=s,()=>{const i=$({},a.current);delete i[r],a.current=i}));re(e,{mapFirstChar:p});const c=r=>(o.focusedNodeId!=null&&e.isNodeExpandable(o.focusedNodeId)&&(e.isNodeExpanded(o.focusedNodeId)?e.focusNode(r,fe(e,o.focusedNodeId)):e.isNodeDisabled(o.focusedNodeId)||e.toggleNodeExpansion(r,o.focusedNodeId)),!0),h=r=>{if(o.focusedNodeId==null)return!1;if(e.isNodeExpanded(o.focusedNodeId)&&!e.isNodeDisabled(o.focusedNodeId))return e.toggleNodeExpansion(r,o.focusedNodeId),!0;const s=e.getNode(o.focusedNodeId).parentId;return s?(e.focusNode(r,s),!0):!1},u=(r,s,i)=>{let f,k;const C=i.toLowerCase(),y=[],T=[];Object.keys(a.current).forEach(E=>{const S=e.getNode(E),v=S.parentId?e.isNodeExpanded(S.parentId):!0,D=t.disabledItemsFocusable?!1:e.isNodeDisabled(E);v&&!D&&(y.push(E),T.push(a.current[E]))}),f=y.indexOf(s)+1,f>=y.length&&(f=0),k=it(T,f,C),k===-1&&(k=it(T,0,C)),k>-1&&e.focusNode(r,y[k])},b=(r,s)=>{e.isNodeDisabled(fe(e,s))||e.selectRange(r,{end:fe(e,s),current:s},!0)},m=(r,s)=>{e.isNodeDisabled(ve(e,s))||e.selectRange(r,{end:ve(e,s),current:s},!0)},g=r=>s=>{var i;(i=r.onKeyDown)==null||i.call(r,s);let f=!1;const k=s.key;if(s.altKey||s.currentTarget!==s.target||o.focusedNodeId==null)return;const C=s.ctrlKey||s.metaKey;switch(k){case" ":!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&(f=!0,t.multiSelect&&s.shiftKey?e.selectRange(s,{end:o.focusedNodeId}):t.multiSelect?e.selectNode(s,o.focusedNodeId,!0):e.selectNode(s,o.focusedNodeId)),s.stopPropagation();break;case"Enter":e.isNodeDisabled(o.focusedNodeId)||(e.isNodeExpandable(o.focusedNodeId)?(e.toggleNodeExpansion(s,o.focusedNodeId),f=!0):t.disableSelection||(f=!0,t.multiSelect?e.selectNode(s,o.focusedNodeId,!0):e.selectNode(s,o.focusedNodeId))),s.stopPropagation();break;case"ArrowDown":t.multiSelect&&s.shiftKey&&!t.disableSelection&&b(s,o.focusedNodeId),e.focusNode(s,fe(e,o.focusedNodeId)),f=!0;break;case"ArrowUp":t.multiSelect&&s.shiftKey&&!t.disableSelection&&m(s,o.focusedNodeId),e.focusNode(s,ve(e,o.focusedNodeId)),f=!0;break;case"ArrowRight":d?f=h(s):f=c(s);break;case"ArrowLeft":d?f=c(s):f=h(s);break;case"Home":t.multiSelect&&C&&s.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&e.rangeSelectToFirst(s,o.focusedNodeId),e.focusNode(s,Ae(e)),f=!0;break;case"End":t.multiSelect&&C&&s.shiftKey&&!t.disableSelection&&!e.isNodeDisabled(o.focusedNodeId)&&e.rangeSelectToLast(s,o.focusedNodeId),e.focusNode(s,Be(e)),f=!0;break;default:k==="*"?(e.expandAllSiblings(s,o.focusedNodeId),f=!0):t.multiSelect&&C&&k.toLowerCase()==="a"&&!t.disableSelection?(e.selectRange(s,{start:Ae(e),end:Be(e)}),f=!0):!C&&!s.shiftKey&&Yo(k)&&(u(s,o.focusedNodeId,k),f=!0)}f&&(s.preventDefault(),s.stopPropagation())};return{getRootProps:r=>({onKeyDown:g(r)})}},tl=({instance:e,params:t})=>{const o=zt(t.id);return{getRootProps:()=>({id:o}),contextValue:{treeId:o,instance:e,multiSelect:t.multiSelect,disabledItemsFocusable:t.disabledItemsFocusable,icons:{defaultCollapseIcon:t.defaultCollapseIcon,defaultEndIcon:t.defaultEndIcon,defaultExpandIcon:t.defaultExpandIcon,defaultParentIcon:t.defaultParentIcon}}}},ol=[Wo,He,Je,Xe,el,tl],ll=["disabledItemsFocusable","expanded","defaultExpanded","onNodeToggle","onNodeFocus","disableSelection","defaultSelected","selected","multiSelect","onNodeSelect","id","defaultCollapseIcon","defaultEndIcon","defaultExpandIcon","defaultParentIcon","children"],sl=e=>{const{classes:t}=e;return Ve({root:["root"]},Ro,t)},ct=K("ul",{name:"MuiTreeView",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,margin:0,listStyle:"none",outline:0}),nl=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiTreeView"}),d=n,a=n,{disabledItemsFocusable:p,expanded:c,defaultExpanded:h,onNodeToggle:u,onNodeFocus:b,disableSelection:m,defaultSelected:g,selected:r,multiSelect:s,onNodeSelect:i,id:f,defaultCollapseIcon:k,defaultEndIcon:C,defaultExpandIcon:y,defaultParentIcon:T,children:E}=a,S=se(a,ll),{getRootProps:v,contextValue:D}=Ao({disabledItemsFocusable:p,expanded:c,defaultExpanded:h,onNodeToggle:u,onNodeFocus:b,disableSelection:m,defaultSelected:g,selected:r,multiSelect:s,onNodeSelect:i,id:f,defaultCollapseIcon:k,defaultEndIcon:C,defaultExpandIcon:y,defaultParentIcon:T,plugins:ol,rootRef:o}),I=sl(n),B=ht({elementType:ct,externalSlotProps:{},externalForwardedProps:S,className:I.root,getSlotProps:v,ownerState:d});return l.jsx(Fo,{value:D,children:l.jsx(ct,$({},B,{children:E}))})}),Pt=()=>x.useContext(Et);function rl(e){const{instance:t,multiSelect:o}=Pt(),n=t?t.isNodeExpandable(e):!1,d=t?t.isNodeExpanded(e):!1,a=t?t.isNodeFocused(e):!1,p=t?t.isNodeSelected(e):!1,c=t?t.isNodeDisabled(e):!1;return{disabled:c,expanded:d,selected:p,focused:a,handleExpansion:m=>{if(t&&!c){a||t.focusNode(m,e);const g=o&&(m.shiftKey||m.ctrlKey||m.metaKey);n&&!(g&&t.isNodeExpanded(e))&&t.toggleNodeExpansion(m,e)}},handleSelection:m=>{t&&!c&&(a||t.focusNode(m,e),o&&(m.shiftKey||m.ctrlKey||m.metaKey)?m.shiftKey?t.selectRange(m,{end:e}):t.selectNode(m,e,!0):t.selectNode(m,e))},preventSelection:m=>{(m.shiftKey||m.ctrlKey||m.metaKey||c)&&m.preventDefault()}}}const il=["classes","className","displayIcon","expansionIcon","icon","label","nodeId","onClick","onMouseDown"],wt=x.forwardRef(function(t,o){const{classes:n,className:d,displayIcon:a,expansionIcon:p,icon:c,label:h,nodeId:u,onClick:b,onMouseDown:m}=t,g=se(t,il),{disabled:r,expanded:s,selected:i,focused:f,handleExpansion:k,handleSelection:C,preventSelection:y}=rl(u),T=c||p||a,E=v=>{y(v),m&&m(v)},S=v=>{k(v),C(v),b&&b(v)};return l.jsxs("div",$({},g,{className:Me(d,n.root,s&&n.expanded,i&&n.selected,f&&n.focused,r&&n.disabled),onClick:S,onMouseDown:E,ref:o,children:[l.jsx("div",{className:n.iconContainer,children:T}),l.jsx("div",{className:n.label,children:h})]}))});function cl(e){return Le("MuiTreeItem",e)}const X=_e("MuiTreeItem",["root","group","content","expanded","selected","focused","disabled","iconContainer","label"]),al=["children","className","collapseIcon","ContentComponent","ContentProps","endIcon","expandIcon","disabled","icon","id","label","nodeId","onClick","onMouseDown","TransitionComponent","TransitionProps"],dl=e=>{const{classes:t}=e;return Ve({root:["root"],content:["content"],expanded:["expanded"],selected:["selected"],focused:["focused"],disabled:["disabled"],iconContainer:["iconContainer"],label:["label"],group:["group"]},cl,t)},ul=K("li",{name:"MuiTreeItem",slot:"Root",overridesResolver:(e,t)=>t.root})({listStyle:"none",margin:0,padding:0,outline:0}),pl=K(wt,{name:"MuiTreeItem",slot:"Content",overridesResolver:(e,t)=>[t.content,t.iconContainer&&{[`& .${X.iconContainer}`]:t.iconContainer},t.label&&{[`& .${X.label}`]:t.label}]})(({theme:e})=>({padding:"0 8px",width:"100%",boxSizing:"border-box",display:"flex",alignItems:"center",cursor:"pointer",WebkitTapHighlightColor:"transparent","&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${X.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,backgroundColor:"transparent"},[`&.${X.focused}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${X.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${X.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ne(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`& .${X.iconContainer}`]:{marginRight:4,width:15,display:"flex",flexShrink:0,justifyContent:"center","& svg":{fontSize:18}},[`& .${X.label}`]:$({paddingLeft:4,width:"100%",boxSizing:"border-box",minWidth:0,position:"relative"},e.typography.body1)})),fl=K(yt,{name:"MuiTreeItem",slot:"Group",overridesResolver:(e,t)=>t.group})({margin:0,padding:0,marginLeft:17}),ml=x.forwardRef(function(t,o){const n=Oe({props:t,name:"MuiTreeItem"}),{children:d,className:a,collapseIcon:p,ContentComponent:c=wt,ContentProps:h,endIcon:u,expandIcon:b,disabled:m,icon:g,id:r,label:s,nodeId:i,onClick:f,onMouseDown:k,TransitionComponent:C=yt,TransitionProps:y}=n,T=se(n,al),{icons:E,multiSelect:S,disabledItemsFocusable:v,treeId:D,instance:I}=Pt();let B;r!=null?B=r:D&&i&&(B=`${D}-${i}`);const[H,ye]=x.useState(null),je=x.useRef(null),te=gt(ye,o),O=x.useMemo(()=>({element:H,id:i}),[i,H]),{index:oe,parentId:ie}=Vo(O),J=!!(Array.isArray(d)?d.length:d),Z=I?I.isNodeExpanded(i):!1,ce=I?I.isNodeFocused(i):!1,le=I?I.isNodeSelected(i):!1,ae=I?I.isNodeDisabled(i):!1,Q=$({},n,{expanded:Z,focused:ce,selected:le,disabled:ae}),V=dl(Q);let de,ue;J&&(Z?ue=p||E.defaultCollapseIcon:ue=b||E.defaultExpandIcon),J?de=E.defaultParentIcon:de=u||E.defaultEndIcon,x.useEffect(()=>{if(I&&oe!==-1)return I.updateNode({id:i,idAttribute:B,index:oe,parentId:ie,expandable:J,disabled:m}),()=>I.removeNode(i)},[I,ie,oe,i,J,m,B]),x.useEffect(()=>{if(I&&s){var _,ee;return I.mapFirstChar(i,((_=(ee=je.current)==null?void 0:ee.textContent)!=null?_:"").substring(0,1).toLowerCase())}},[I,i,s]);let Y;S?Y=le:le&&(Y=!0);function Ce(_){if(_.target===_.currentTarget){let N;typeof _.target.getRootNode=="function"?N=_.target.getRootNode():N=kt(_.target),N.getElementById(D).focus({preventScroll:!0})}const ee=!v&&ae;I&&!ce&&_.currentTarget===_.target&&!ee&&I.focusNode(_,i)}return l.jsxs(ul,$({className:Me(V.root,a),role:"treeitem","aria-expanded":J?Z:void 0,"aria-selected":Y,"aria-disabled":ae||void 0,id:B,tabIndex:-1},T,{ownerState:Q,onFocus:Ce,ref:te,children:[l.jsx(pl,$({as:c,ref:je,classes:{root:V.content,expanded:V.expanded,selected:V.selected,focused:V.focused,disabled:V.disabled,iconContainer:V.iconContainer,label:V.label},label:s,nodeId:i,onClick:f,onMouseDown:k,icon:g,expansionIcon:ue,displayIcon:de,ownerState:Q},h)),d&&l.jsx(Rt,{id:i,children:l.jsx(fl,$({as:C,unmountOnExit:!0,className:V.group,in:Z,component:"ul",role:"group"},y,{children:d}))})]}))});function Ge({data:e,...t}){return!e||!e.length?null:l.jsx(hl,{...t,children:e.map(o=>l.jsx("a",{href:o.url,target:"_blank",rel:"noreferrer",children:l.jsx("img",{src:o.url,alt:o.alt||""})},o.url))})}Ge.propTypes={data:P.arrayOf(P.shape({url:P.string,alt:P.string}))};Ge.defaultProps={data:[]};const hl=q(j)`
23
23
  display: flex;
24
24
  justify-content: flex-start;
25
25
  flex-wrap: wrap;
@@ -33,7 +33,7 @@ import{an as At,j as l,aB as K,cq as Lt,aE as $,f6 as ot,aD as se,az as Le,aA as
33
33
  margin-right: 12px;
34
34
  margin-bottom: 12px;
35
35
  }
36
- `,Re=(e,t)=>{const o=[...e];for(;o.length>0;){const n=o.shift();if(n.id===t)return n;n.children&&o.push(...n.children)}return[]};function Ye({icon:e}){return e?so(e)?l.jsx("img",{className:"resource-icon",src:e,alt:"icon"}):l.jsx(Wt,{className:"resource-icon",icon:e}):null}Ye.propTypes={icon:P.string};Ye.defaultProps={icon:""};function Qe({disabled:e,data:t,onChange:o,value:n}){const d=n;function a(r,s=[]){return s.push(r.id),r.children&&r.children.forEach(i=>a(i,s)),s}const p=r=>a(Re(t,r)),c=(r,s=[])=>{const i=Re(t,r);return i.parent?(s.push(i.parent),c(i.parent,s)):s};function h(r,s){const i=p(r.id),f=i.indexOf(r.id);return i.splice(f,1),i.every(k=>d.concat(s).includes(k))}const u=(r,s)=>{r.stopPropagation();const i=p(s),f=c(s);if(d.includes(s)){const k=d.filter(C=>!i.concat(f).includes(C));o(k)}else{const k=i;for(let C=0;C<f.length;++C)h(Re(t,f[C]),k)&&k.push(f[C]);o([...d].concat(k))}},b=r=>{r.stopPropagation()},m=t.some(r=>{var s;return((s=r.children)==null?void 0:s.length)>0}),g=r=>{var s;return l.jsx(ml,{nodeId:r.id,label:l.jsx(io,{onClick:b,control:l.jsx(De,{size:"small",checked:d.indexOf(r.id)!==-1,tabIndex:-1,disableRipple:!0,onClick:i=>u(i,r.id),disabled:e}),label:l.jsxs(j,{className:"content",children:[l.jsxs(j,{display:"flex",alignItems:"center",children:[r.icon&&l.jsx(Ye,{icon:r.icon}),l.jsx(j,{className:"name",children:r.name}),r.url&&l.jsx("a",{href:r.url,target:"_blank",rel:"noreferrer",className:"link",children:l.jsx(ro,{className:"link-icon"})})]}),!!r.description&&l.jsx(j,{className:"description",children:r.description}),!!((s=r.images)!=null&&s.length)&&l.jsx(Xe,{className:"images",data:r.images})]})}),children:Array.isArray(r.children)?r.children.map(g):null},r.id)};return l.jsx(bl,{className:Ue(!m&&"no-children"),multiSelect:!0,defaultCollapseIcon:l.jsx(no,{}),defaultExpandIcon:l.jsx(Xt,{}),selected:d,children:t.map(r=>g(r))})}Qe.propTypes={data:P.array,value:P.array,onChange:P.func,disabled:P.bool};Qe.defaultProps={data:[],value:[],onChange:()=>{},disabled:!1};const bl=q(nl)`
36
+ `,Re=(e,t)=>{const o=[...e];for(;o.length>0;){const n=o.shift();if(n.id===t)return n;n.children&&o.push(...n.children)}return[]};function Ze({icon:e}){return e?so(e)?l.jsx("img",{className:"resource-icon",src:e,alt:"icon"}):l.jsx(Wt,{className:"resource-icon",icon:e}):null}Ze.propTypes={icon:P.string};Ze.defaultProps={icon:""};function Qe({disabled:e,data:t,onChange:o,value:n}){const d=n;function a(r,s=[]){return s.push(r.id),r.children&&r.children.forEach(i=>a(i,s)),s}const p=r=>a(Re(t,r)),c=(r,s=[])=>{const i=Re(t,r);return i.parent?(s.push(i.parent),c(i.parent,s)):s};function h(r,s){const i=p(r.id),f=i.indexOf(r.id);return i.splice(f,1),i.every(k=>d.concat(s).includes(k))}const u=(r,s)=>{r.stopPropagation();const i=p(s),f=c(s);if(d.includes(s)){const k=d.filter(C=>!i.concat(f).includes(C));o(k)}else{const k=i;for(let C=0;C<f.length;++C)h(Re(t,f[C]),k)&&k.push(f[C]);o([...d].concat(k))}},b=r=>{r.stopPropagation()},m=t.some(r=>{var s;return((s=r.children)==null?void 0:s.length)>0}),g=r=>{var s;return l.jsx(ml,{nodeId:r.id,label:l.jsx(io,{onClick:b,control:l.jsx(De,{size:"small",checked:d.indexOf(r.id)!==-1,tabIndex:-1,disableRipple:!0,onClick:i=>u(i,r.id),disabled:e}),label:l.jsxs(j,{className:"content",children:[l.jsxs(j,{display:"flex",alignItems:"center",children:[r.icon&&l.jsx(Ze,{icon:r.icon}),l.jsx(j,{className:"name",children:r.name}),r.url&&l.jsx("a",{href:r.url,target:"_blank",rel:"noreferrer",className:"link",children:l.jsx(ro,{className:"link-icon"})})]}),!!r.description&&l.jsx(j,{className:"description",children:r.description}),!!((s=r.images)!=null&&s.length)&&l.jsx(Ge,{className:"images",data:r.images})]})}),children:Array.isArray(r.children)?r.children.map(g):null},r.id)};return l.jsx(bl,{className:Ue(!m&&"no-children"),multiSelect:!0,defaultCollapseIcon:l.jsx(no,{}),defaultExpandIcon:l.jsx(Gt,{}),selected:d,children:t.map(r=>g(r))})}Qe.propTypes={data:P.array,value:P.array,onChange:P.func,disabled:P.bool};Qe.defaultProps={data:[],value:[],onChange:()=>{},disabled:!1};const bl=q(nl)`
37
37
  &.no-children {
38
38
  .MuiTreeItem-content {
39
39
  padding: 0;
@@ -88,7 +88,7 @@ import{an as At,j as l,aB as K,cq as Lt,aE as $,f6 as ot,aD as se,az as Le,aA as
88
88
  font-size: 14px;
89
89
  color: ${({theme:e})=>e.palette.text.secondary};
90
90
  }
91
- `,$t=(e,t)=>(e.forEach(o=>{t&&(o.parent=t),(o.children||[]).forEach(n=>{n.parent=o.id,$t(n.children||[],n.id)})}),e);function xl(e,t){return e.length!==t.length?!1:e.every((o,n)=>o===t[n])}function Ze({app:e,component:t,projectId:o,release:n,error:d,onSave:a}){const{t:p,locale:c}=ne(),{api:h}=be(),[u,b]=x.useState([]),[m,g]=x.useState([]),[r,s]=x.useState([]),[i,f]=x.useState(!1),k=x.useMemo(()=>xl(m,r)?null:p("blocklet.publish.resourceChangedWarning"),[m,r,p]),C=n.id,y=n.status==="published",{exportApi:I="/"}=(t==null?void 0:t.meta.resource)||{},E=new URL(me("http://127.0.0.1",t.mountPoint,I||"/").replace(/\/+/g,"/"));E.searchParams.set("projectId",o),E.searchParams.set("releaseId",C),E.searchParams.set("local",c);const S=`${E.pathname}${E.search}`,v=async T=>{try{await h.updateSelectedResources({input:{did:e.meta.did,projectId:o,releaseId:C,componentDid:t.meta.did,resources:T}})}catch(B){w.error(B.message)}},D=async()=>{const T=m;try{f(!0),await lt.post(S,{resources:T,projectId:o,releaseId:C,locale:c}),w.success(p("common.saveSuccess")),f(!1),v(m),s(m),a(m)}catch(B){f(!1),w.error(B.message)}};return x.useEffect(()=>{lt.get(S).then(T=>{var H;const B=$t(((H=T.data)==null?void 0:H.resources)||[]);b(B)}).catch(T=>{w.error(T.message)}),h.getSelectedResources({input:{did:e.meta.did,projectId:o,releaseId:C,componentDid:t.meta.did}}).then(T=>{const B=(T==null?void 0:T.resources)||[];g(B),s(B)}).catch(T=>{w.error(T.message)})},[S]),t.status!=="running"?l.jsx(at,{children:l.jsx(j,{pt:6,children:p("blocklet.publish.componentNotRunning",{name:t.meta.title})})}):[l.jsx(at,{className:Ue(d&&"error"),children:l.jsxs(j,{children:[l.jsx(Qe,{data:u,value:m,onChange:T=>{g(T)},disabled:i||y}),!y&&l.jsx(j,{className:"footer",children:l.jsx(F,{variant:"contained",disabled:i,onClick:()=>D(),children:p("common.save")})})]})}),!!k&&l.jsx(j,{color:"warning.main",mt:1,fontSize:14,children:k}),!!d&&l.jsx(j,{color:"error.main",mt:1,fontSize:14,children:d})]}Ze.propTypes={component:P.object.isRequired,app:P.object.isRequired,projectId:P.string.isRequired,error:P.string,release:P.shape({id:P.string.isRequired,status:P.string}),onSave:P.func};Ze.defaultProps={error:"",release:{id:""},onSave:()=>{}};const at=q(j)`
91
+ `,$t=(e,t)=>(e.forEach(o=>{t&&(o.parent=t),(o.children||[]).forEach(n=>{n.parent=o.id,$t(n.children||[],n.id)})}),e);function xl(e,t){return e.length!==t.length?!1:e.every((o,n)=>o===t[n])}function Ye({app:e,component:t,projectId:o,release:n,error:d,onSave:a}){const{t:p,locale:c}=ne(),{api:h}=be(),[u,b]=x.useState([]),[m,g]=x.useState([]),[r,s]=x.useState([]),[i,f]=x.useState(!1),k=x.useMemo(()=>xl(m,r)?null:p("blocklet.publish.resourceChangedWarning"),[m,r,p]),C=n.id,y=n.status==="published",{exportApi:T="/"}=(t==null?void 0:t.meta.resource)||{},E=new URL(me("http://127.0.0.1",t.mountPoint,T||"/").replace(/\/+/g,"/"));E.searchParams.set("projectId",o),E.searchParams.set("releaseId",C),E.searchParams.set("local",c);const S=`${E.pathname}${E.search}`,v=async I=>{try{await h.updateSelectedResources({input:{did:e.meta.did,projectId:o,releaseId:C,componentDid:t.meta.did,resources:I}})}catch(B){w.error(B.message)}},D=async()=>{const I=m;try{f(!0),await lt.post(S,{resources:I,projectId:o,releaseId:C,locale:c}),w.success(p("common.saveSuccess")),f(!1),v(m),s(m),a(m)}catch(B){f(!1),w.error(B.message)}};return x.useEffect(()=>{lt.get(S).then(I=>{var H;const B=$t(((H=I.data)==null?void 0:H.resources)||[]);b(B)}).catch(I=>{w.error(I.message)}),h.getSelectedResources({input:{did:e.meta.did,projectId:o,releaseId:C,componentDid:t.meta.did}}).then(I=>{const B=(I==null?void 0:I.resources)||[];g(B),s(B)}).catch(I=>{w.error(I.message)})},[S]),t.status!=="running"?l.jsx(at,{children:l.jsx(j,{pt:6,children:p("blocklet.publish.componentNotRunning",{name:t.meta.title})})}):[l.jsx(at,{className:Ue(d&&"error"),children:l.jsxs(j,{children:[l.jsx(Qe,{data:u,value:m,onChange:I=>{g(I)},disabled:i||y}),!y&&l.jsx(j,{className:"footer",children:l.jsx(F,{variant:"contained",disabled:i,onClick:()=>D(),children:p("common.save")})})]})}),!!k&&l.jsx(j,{color:"warning.main",mt:1,fontSize:14,children:k}),!!d&&l.jsx(j,{color:"error.main",mt:1,fontSize:14,children:d})]}Ye.propTypes={component:P.object.isRequired,app:P.object.isRequired,projectId:P.string.isRequired,error:P.string,release:P.shape({id:P.string.isRequired,status:P.string}),onSave:P.func};Ye.defaultProps={error:"",release:{id:""},onSave:()=>{}};const at=q(j)`
92
92
  border: 1px solid #ccc;
93
93
  &.error {
94
94
  border-color: ${e=>e.theme.palette.error.main};
@@ -132,7 +132,7 @@ import{an as At,j as l,aB as K,cq as Lt,aE as $,f6 as ot,aD as se,az as Le,aA as
132
132
  display: none;
133
133
  }
134
134
  }
135
- `,dt=["image/*",".jpg",".jpeg",".png",".gif",".svg"],ut=1024*1024*10;var mt;const Pe=(mt=window.env)==null?void 0:mt.serverEndpoint,pt=x.lazy(()=>qt(()=>import("./react-bSUPw7ox.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])).then(e=>({default:e.Uploader}))),kl=(e,t,o)=>{const n=[];return e.blockletTitle||n.push({param:"blockletTitle",message:o("blocklet.publish.errorTip.noTitle")}),e.blockletVersion?Te.valid(e.blockletVersion)||n.push({param:"blockletVersion",message:"Invalid Blocklet Version"}):n.push({param:"blockletVersion",message:o("blocklet.publish.errorTip.noVersion")}),t===z.PROJECT.RELEASE_STATUS.published&&(e.blockletDescription||n.push({param:"blockletDescription",message:o("blocklet.publish.errorTip.noDescription")}),e.note||n.push({param:"note",message:o("blocklet.publish.errorTip.noNote")})),n.length?n:null},yl=({tabs:e,blocklet:t,ancestors:o=[]})=>{const n=t.meta.did;e.push({label:l.jsxs(j,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[l.jsx(We,{size:24,blocklet:t,ancestors:o}),l.jsx(j,{ml:"4px",className:"text",children:l.jsx(j,{children:t.meta.title})})]},n),value:n})},ft=(e,t)=>{const o=Fe(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","blockletComponents","note"]);return o.blockletScreenshots||(o.blockletScreenshots=[]),o.blockletComponents?o.blockletComponents=o.blockletComponents.map(n=>({...n,included:!0})):o.blockletComponents=(t.children||[]).map(n=>({did:n.meta.did,included:!0,required:!0})),o};function tt({...e}){var Ce,L,ee;const t=xt(),{projectId:o,releaseId:n,componentDid:d}=ge(),{t:a}=ne(),{blocklet:p}=xe(),[c,h]=Zt(null),[u,b]=x.useState({}),[m,g]=x.useState(!1),[r,s]=x.useState(!1),[i,f]=x.useState(null),{api:k}=be(),C=x.useRef(null),y=x.useRef(null),[I,E]=x.useState(),[S,v]=x.useState(),D=n==="create"?"":n,T=n==="create"?"create":"edit",B=[],H=((p==null?void 0:p.children)||[]).filter(N=>{var A;return(A=N.meta.resource)==null?void 0:A.exportApi}).filter(N=>!d||N.meta.did===d);H.forEach(N=>{yl({tabs:B,blocklet:N,t:a,ancestors:[p]})});const[ye,je]=x.useState((Ce=B[0])==null?void 0:Ce.value),te=(i==null?void 0:i.status)==="published",O=te,oe=({typeOnly:N}={})=>{k.getProject({input:{did:p.meta.did,projectId:o}}).then(A=>{g(!1);const R=A.project||{};if(N){E(R.type);return}R.blockletVersion?Te.valid(R.blockletVersion)&&(R.blockletVersion=Te.inc(R.blockletVersion,"patch")):R.blockletVersion="1.0.0",h(ft(R,p)),E(R.type)}).catch(A=>{g(!1),w.error(Ee(A))})},ie=()=>{k.getRelease({input:{did:p.meta.did,projectId:o,releaseId:D}}).then(N=>{g(!1),h(ft(N==null?void 0:N.release,p)),f(N==null?void 0:N.release)}).catch(N=>{g(!1),w.error(Ee(N))})},G=x.useCallback(()=>{if(T==="edit"){if(!D){w.error("Empty release id");return}ie(),oe({typeOnly:!0})}T==="create"&&oe()},[T,D]);x.useEffect(()=>{G()},[G]);const Y=N=>{const A=kl(c,N,a);if(A){w.error(A.map(M=>M.message).join("; ")),b(A.reduce((M,U)=>({...M,[U.param]:U.message}),{}));return}const R={...c};if(R.blockletVersion=Te.valid(R.blockletVersion),!R.blockletVersion){w.error("Invalid Blocklet Version"),b({blockletVersion:"Invalid Blocklet Version"});return}R.blockletTitle=(R.blockletTitle||"").trim(),R.blockletDescription=(R.blockletDescription||"").trim(),R.blockletIntroduction=(R.blockletIntroduction||"").trim(),R.note=(R.note||"").trim(),I==="pack"?R.blockletComponents=(R.blockletComponents||[]).filter(M=>M.included).map(M=>Fe(M,["did","required"])).map(JSON.stringify):delete R.blockletComponents,s(N),g(!0),k.createRelease({input:{...R,did:p.meta.did,projectId:o,releaseId:D,status:N}}).then(M=>{var U;if(s(!1),g(!1),N==="draft"?w.success(a("blocklet.publish.saveDraftSuccess")):w.success(a("blocklet.publish.createReleaseSuccess")),T==="create"){const Bt=(U=M==null?void 0:M.release)==null?void 0:U.id;t(`../${o}/${Bt}`,{replace:!0})}else ie()}).catch(M=>{s(!1),g(!1);const U=Ee(M);w.error(U),/resource.*empty/.test(U)&&b({blockletResource:U})})};if(!c&&m)return l.jsx(ke,{});if(!c)return null;const ce=`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/logo/upload`,le=`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/screenshot/upload`,ae=c!=null&&c.blockletLogo?`${ce}/${c.blockletLogo}`:`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,Q=((c==null?void 0:c.blockletScreenshots)||[]).filter(Boolean).map(N=>`${le}/${N}`),V=H.find(N=>N.meta.did===ye),de=V?l.jsx(j,{children:l.jsx(Ze,{error:u.blockletResource,app:p,component:V,projectId:o,release:{...i,id:D},onSave:N=>{N.length&&b({blockletResource:""})}})}):l.jsx(j,{display:"flex",mt:-3,children:l.jsx(Ut,{children:a("common.empty")})}),ue=N=>{je(N)};let Z=null;if(te&&Pe){const N=me(Pe,`/api/project/${p.meta.did}/${o}/${D}/release/blocklet.json`);if(I==="pack"){const A=new URL(Pe);A.pathname=me(A.pathname,"/launch-blocklet/agreement"),A.searchParams.set("blocklet_meta_url",N),Z=l.jsx(F,{variant:"outlined",style:{marginRight:8},children:l.jsx("a",{href:A.href,target:"_blank",rel:"noreferrer",children:a("common.install")})})}else Z=l.jsxs(l.Fragment,{children:[l.jsx(F,{variant:"outlined",style:{marginRight:8},onClick:()=>v(N),children:a("common.install")}),l.jsx(Kt,{fullWidth:!0,maxWidth:"sm",open:S,onClose:()=>v(""),children:l.jsxs(j,{sx:{py:5,px:4,wordBreak:"break-all"},children:[l.jsx(_,{variant:"h6",sx:{mb:2},children:a("blocklet.publish.installResourceTip")}),l.jsx(lo,{children:S}),l.jsxs(_,{sx:{mt:2},children:[a("blocklet.publish.installResourceTip2"),l.jsx("a",{style:{marginLeft:4},href:"https://www.arcblock.io/docs/blocklet-developer/R3weqCy7WPI8ggudt0C2alWv",target:"_blank",rel:"noreferrer",children:a("blocklet.publish.installResourceHelp")})]})]})})]})}return l.jsxs(jl,{...e,children:[l.jsxs(j,{className:"sticky-header",children:[l.jsxs(Ke,{className:"breadcrumbs","aria-label":"breadcrumb",children:[l.jsx(W,{to:"../",children:a("common.publish")}),l.jsx(W,{to:`../${o}`,children:(c==null?void 0:c.blockletTitle)||"Blocklet"}),l.jsx(_,{color:"text.primary",children:T==="create"?a("common.create"):(c==null?void 0:c.blockletVersion)||a("common.edit")})]}),l.jsxs(j,{display:"flex",children:[!te&&l.jsxs(l.Fragment,{children:[l.jsxs(F,{variant:"outlined",disabled:m||r,onClick:()=>Y(z.PROJECT.RELEASE_STATUS.draft),style:{marginRight:12},children:[r===z.PROJECT.RELEASE_STATUS.draft&&l.jsx(we,{size:14,sx:{mr:.5}}),a("blocklet.publish.saveDraft")]}),l.jsxs(F,{variant:"contained",disabled:m||r,onClick:()=>Y(z.PROJECT.RELEASE_STATUS.published),children:[r===z.PROJECT.RELEASE_STATUS.published&&l.jsx(we,{size:14,sx:{mr:.5},color:"inherit"}),a("common.release")]})]}),te&&l.jsxs(l.Fragment,{children:[Z,l.jsx(F,{variant:"contained",children:l.jsx("a",{href:me(`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/${D}/download/${(i.files||[])[0]}`),children:a("common.download")})})]})]})]}),l.jsxs(j,{children:[I==="pack"&&l.jsx(oo,{type:"info",style:{width:"100%"},children:a("blocklet.publish.packTip")}),l.jsx(j,{pt:3}),l.jsxs(j,{display:"flex",className:"section",children:[l.jsx(_,{variant:"h3",className:"left",children:a("blocklet.publish.productTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(X,{label:`Blocklet ${a("common.title")}`,placeholder:`Blocklet ${a("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:O},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:c.blockletTitle||"",onChange:N=>{b({blockletTitle:""}),h({blockletTitle:N.target.value})},error:!!u.blockletTitle,helperText:u.blockletTitle||""}),l.jsx(X,{label:`Blocklet ${a("common.description")}`,placeholder:`Blocklet ${a("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:O},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:c.blockletDescription||"",onChange:N=>{b({blockletDescription:""}),h({blockletDescription:N.target.value})},error:!!u.blockletDescription,helperText:u.blockletDescription||"",sx:{mt:3}}),l.jsx(X,{label:`Blocklet ${a("common.introduction")}`,placeholder:`Blocklet ${a("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:O,endAdornment:l.jsxs($e,{position:"end",children:[((L=c==null?void 0:c.blockletIntroduction)==null?void 0:L.length)||0," / ",z.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:c.blockletIntroduction||"",onChange:N=>{b({blockletIntroduction:""}),h({blockletIntroduction:N.target.value.slice(0,z.PROJECT.MAX_INTRO_LENGTH)})},error:!!u.blockletIntroduction,helperText:u.blockletIntroduction||"",sx:{mt:3}})]})]}),l.jsxs(j,{display:"flex",mt:3,className:"section",children:[l.jsx(_,{variant:"h3",className:"left",children:a("blocklet.publish.versionTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(X,{required:!0,label:`Blocklet ${a("common.version")}`,placeholder:`Blocklet ${a("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:O},autoComplete:"off",variant:"outlined",fullWidth:!0,value:c.blockletVersion,onChange:N=>{b({blockletVersion:""}),h({blockletVersion:N.target.value})},error:!!u.blockletVersion,helperText:u.blockletVersion||""}),l.jsx(X,{label:a("blocklet.publish.releaseNote"),autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:O,endAdornment:l.jsxs($e,{position:"end",children:[((ee=c==null?void 0:c.note)==null?void 0:ee.length)||0," / ",z.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:c.note,onChange:N=>{b({note:""}),h({note:N.target.value.slice(0,z.PROJECT.MAX_NOTE_LENGTH)})},error:!!u.note,helperText:u.note||"",sx:{mt:3}})]})]}),l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(_,{variant:"h3",className:"left",children:a("blocklet.publish.imgTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsxs(j,{display:"flex",children:[l.jsx(_,{variant:"subtitle1",sx:{mr:2},children:a("common.logo")}),l.jsx(j,{sx:{flex:1,cursor:O?"default":"pointer"},children:l.jsx(co,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:ae,onClick:()=>!O&&C.current.open()})})]}),l.jsxs(j,{display:"flex",mt:3,children:[l.jsx(_,{variant:"subtitle1",sx:{mr:2},children:a("common.screenshot")}),l.jsxs(j,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[Q.map((N,A)=>l.jsxs(j,{className:"screenshot",children:[l.jsx("img",{alt:"screenshot",src:N}),!O&&l.jsx(Se,{className:"action",onClick:()=>{const R=[...c.blockletScreenshots];R.splice(A,1),h({blockletScreenshots:R})},children:l.jsx(eo,{})})]})),Q.length<5&&l.jsx(j,{sx:{width:200,height:140,background:"#eee",cursor:O?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>!O&&y.current.open(),children:"+"})]})]})]}),l.jsx(pt,{id:"​uploader-logo",ref:C,popup:!0,onUploadFinish:N=>{h({blockletLogo:N.data.filename}),C.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:ce,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:dt,maxFileSize:ut,maxNumberOfFiles:1}}},"uploader-logo"),l.jsx(pt,{id:"​uploader-screenshot",ref:y,popup:!0,onUploadFinish:N=>{var R;const A=c.blockletScreenshots||[];A.push((R=N.data)==null?void 0:R.filename),h({blockletScreenshots:A}),y.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:le,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:dt,maxFileSize:ut,maxNumberOfFiles:5-Q.length}}},"uploader-screenshot")]}),l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(j,{className:"left",children:l.jsx(_,{variant:"h3",children:a("blocklet.publish.resourceTitle")})}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(to,{tabs:B,current:ye,onChange:ue,sx:{ml:-2,mt:-1.5}}),l.jsx(j,{children:de})]})]}),I==="pack"&&l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(j,{className:"left",children:l.jsx(_,{variant:"h3",children:a("common.components")})}),l.jsx(j,{sx:{flex:1},children:l.jsx(et,{disabled:m||O,app:p,value:c.blockletComponents,onChange:N=>{h({blockletComponents:N})}})})]})]})]})}tt.propTypes={};tt.defaultProps={};const jl=q.div`
135
+ `,dt=["image/*",".jpg",".jpeg",".png",".gif",".svg"],ut=1024*1024*10;var mt;const Pe=(mt=window.env)==null?void 0:mt.serverEndpoint,pt=x.lazy(()=>qt(()=>import("./react-MJeba7Rg.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])).then(e=>({default:e.Uploader}))),kl=(e,t,o)=>{const n=[];return e.blockletTitle||n.push({param:"blockletTitle",message:o("blocklet.publish.errorTip.noTitle")}),e.blockletVersion?Ie.valid(e.blockletVersion)||n.push({param:"blockletVersion",message:"Invalid Blocklet Version"}):n.push({param:"blockletVersion",message:o("blocklet.publish.errorTip.noVersion")}),t===z.PROJECT.RELEASE_STATUS.published&&(e.blockletDescription||n.push({param:"blockletDescription",message:o("blocklet.publish.errorTip.noDescription")}),e.note||n.push({param:"note",message:o("blocklet.publish.errorTip.noNote")})),n.length?n:null},yl=({tabs:e,blocklet:t,ancestors:o=[]})=>{const n=t.meta.did;e.push({label:l.jsxs(j,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[l.jsx(We,{size:24,blocklet:t,ancestors:o}),l.jsx(j,{ml:"4px",className:"text",children:l.jsx(j,{children:t.meta.title})})]},n),value:n})},ft=(e,t)=>{const o=Fe(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","blockletComponents","note"]);return o.blockletScreenshots||(o.blockletScreenshots=[]),o.blockletComponents?o.blockletComponents=o.blockletComponents.map(n=>({...n,included:!0})):o.blockletComponents=(t.children||[]).map(n=>({did:n.meta.did,included:!0,required:!0})),o};function tt({...e}){var Ce,_,ee;const t=xt(),{projectId:o,releaseId:n,componentDid:d}=ge(),{t:a}=ne(),{blocklet:p}=xe(),[c,h]=Yt(null),[u,b]=x.useState({}),[m,g]=x.useState(!1),[r,s]=x.useState(!1),[i,f]=x.useState(null),{api:k}=be(),C=x.useRef(null),y=x.useRef(null),[T,E]=x.useState(),[S,v]=x.useState(),D=n==="create"?"":n,I=n==="create"?"create":"edit",B=[],H=((p==null?void 0:p.children)||[]).filter(N=>{var A;return(A=N.meta.resource)==null?void 0:A.exportApi}).filter(N=>!d||N.meta.did===d);H.forEach(N=>{yl({tabs:B,blocklet:N,t:a,ancestors:[p]})});const[ye,je]=x.useState((Ce=B[0])==null?void 0:Ce.value),te=(i==null?void 0:i.status)==="published",O=te,oe=({typeOnly:N}={})=>{k.getProject({input:{did:p.meta.did,projectId:o}}).then(A=>{g(!1);const R=A.project||{};if(N){E(R.type);return}R.blockletVersion?Ie.valid(R.blockletVersion)&&(R.blockletVersion=Ie.inc(R.blockletVersion,"patch")):R.blockletVersion="1.0.0",h(ft(R,p)),E(R.type)}).catch(A=>{g(!1),w.error(Ee(A))})},ie=()=>{k.getRelease({input:{did:p.meta.did,projectId:o,releaseId:D}}).then(N=>{g(!1),h(ft(N==null?void 0:N.release,p)),f(N==null?void 0:N.release)}).catch(N=>{g(!1),w.error(Ee(N))})},J=x.useCallback(()=>{if(I==="edit"){if(!D){w.error("Empty release id");return}ie(),oe({typeOnly:!0})}I==="create"&&oe()},[I,D]);x.useEffect(()=>{J()},[J]);const Z=N=>{const A=kl(c,N,a);if(A){w.error(A.map(M=>M.message).join("; ")),b(A.reduce((M,U)=>({...M,[U.param]:U.message}),{}));return}const R={...c};if(R.blockletVersion=Ie.valid(R.blockletVersion),!R.blockletVersion){w.error("Invalid Blocklet Version"),b({blockletVersion:"Invalid Blocklet Version"});return}R.blockletTitle=(R.blockletTitle||"").trim(),R.blockletDescription=(R.blockletDescription||"").trim(),R.blockletIntroduction=(R.blockletIntroduction||"").trim(),R.note=(R.note||"").trim(),T==="pack"?R.blockletComponents=(R.blockletComponents||[]).filter(M=>M.included).map(M=>Fe(M,["did","required"])).map(JSON.stringify):delete R.blockletComponents,s(N),g(!0),k.createRelease({input:{...R,did:p.meta.did,projectId:o,releaseId:D,status:N}}).then(M=>{var U;if(s(!1),g(!1),N==="draft"?w.success(a("blocklet.publish.saveDraftSuccess")):w.success(a("blocklet.publish.createReleaseSuccess")),I==="create"){const Bt=(U=M==null?void 0:M.release)==null?void 0:U.id;t(`../${o}/${Bt}`,{replace:!0})}else ie()}).catch(M=>{s(!1),g(!1);const U=Ee(M);w.error(U),/resource.*empty/.test(U)&&b({blockletResource:U})})};if(!c&&m)return l.jsx(ke,{});if(!c)return null;const ce=`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/logo/upload`,le=`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/screenshot/upload`,ae=c!=null&&c.blockletLogo?`${ce}/${c.blockletLogo}`:`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,Q=((c==null?void 0:c.blockletScreenshots)||[]).filter(Boolean).map(N=>`${le}/${N}`),V=H.find(N=>N.meta.did===ye),de=V?l.jsx(j,{children:l.jsx(Ye,{error:u.blockletResource,app:p,component:V,projectId:o,release:{...i,id:D},onSave:N=>{N.length&&b({blockletResource:""})}})}):l.jsx(j,{display:"flex",mt:-3,children:l.jsx(Ut,{children:a("common.empty")})}),ue=N=>{je(N)};let Y=null;if(te&&Pe){const N=me(Pe,`/api/project/${p.meta.did}/${o}/${D}/release/blocklet.json`);if(T==="pack"){const A=new URL(Pe);A.pathname=me(A.pathname,"/launch-blocklet/agreement"),A.searchParams.set("blocklet_meta_url",N),Y=l.jsx(F,{variant:"outlined",style:{marginRight:8},children:l.jsx("a",{href:A.href,target:"_blank",rel:"noreferrer",children:a("common.install")})})}else Y=l.jsxs(l.Fragment,{children:[l.jsx(F,{variant:"outlined",style:{marginRight:8},onClick:()=>v(N),children:a("common.install")}),l.jsx(Kt,{fullWidth:!0,maxWidth:"sm",open:S,onClose:()=>v(""),children:l.jsxs(j,{sx:{py:5,px:4,wordBreak:"break-all"},children:[l.jsx(L,{variant:"h6",sx:{mb:2},children:a("blocklet.publish.installResourceTip")}),l.jsx(lo,{children:S}),l.jsxs(L,{sx:{mt:2},children:[a("blocklet.publish.installResourceTip2"),l.jsx("a",{style:{marginLeft:4},href:"https://www.arcblock.io/docs/blocklet-developer/R3weqCy7WPI8ggudt0C2alWv",target:"_blank",rel:"noreferrer",children:a("blocklet.publish.installResourceHelp")})]})]})})]})}return l.jsxs(jl,{...e,children:[l.jsxs(j,{className:"sticky-header",children:[l.jsxs(Ke,{className:"breadcrumbs","aria-label":"breadcrumb",children:[l.jsx(W,{to:"../",children:a("common.publish")}),l.jsx(W,{to:`../${o}`,children:(c==null?void 0:c.blockletTitle)||"Blocklet"}),l.jsx(L,{color:"text.primary",children:I==="create"?a("common.create"):(c==null?void 0:c.blockletVersion)||a("common.edit")})]}),l.jsxs(j,{display:"flex",children:[!te&&l.jsxs(l.Fragment,{children:[l.jsxs(F,{variant:"outlined",disabled:m||r,onClick:()=>Z(z.PROJECT.RELEASE_STATUS.draft),style:{marginRight:12},children:[r===z.PROJECT.RELEASE_STATUS.draft&&l.jsx(we,{size:14,sx:{mr:.5}}),a("blocklet.publish.saveDraft")]}),l.jsxs(F,{variant:"contained",disabled:m||r,onClick:()=>Z(z.PROJECT.RELEASE_STATUS.published),children:[r===z.PROJECT.RELEASE_STATUS.published&&l.jsx(we,{size:14,sx:{mr:.5},color:"inherit"}),a("common.release")]})]}),te&&l.jsxs(l.Fragment,{children:[Y,l.jsx(F,{variant:"contained",children:l.jsx("a",{href:me(`${pe.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${p.meta.did}/${o}/${D}/download/${(i.files||[])[0]}`),children:a("common.download")})})]})]})]}),l.jsxs(j,{children:[T==="pack"&&l.jsx(oo,{type:"info",style:{width:"100%"},children:a("blocklet.publish.packTip")}),l.jsx(j,{pt:3}),l.jsxs(j,{display:"flex",className:"section",children:[l.jsx(L,{variant:"h3",className:"left",children:a("blocklet.publish.productTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(G,{label:`Blocklet ${a("common.title")}`,placeholder:`Blocklet ${a("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:O},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:c.blockletTitle||"",onChange:N=>{b({blockletTitle:""}),h({blockletTitle:N.target.value})},error:!!u.blockletTitle,helperText:u.blockletTitle||""}),l.jsx(G,{label:`Blocklet ${a("common.description")}`,placeholder:`Blocklet ${a("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:O},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:c.blockletDescription||"",onChange:N=>{b({blockletDescription:""}),h({blockletDescription:N.target.value})},error:!!u.blockletDescription,helperText:u.blockletDescription||"",sx:{mt:3}}),l.jsx(G,{label:`Blocklet ${a("common.introduction")}`,placeholder:`Blocklet ${a("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:O,endAdornment:l.jsxs($e,{position:"end",children:[((_=c==null?void 0:c.blockletIntroduction)==null?void 0:_.length)||0," / ",z.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:c.blockletIntroduction||"",onChange:N=>{b({blockletIntroduction:""}),h({blockletIntroduction:N.target.value.slice(0,z.PROJECT.MAX_INTRO_LENGTH)})},error:!!u.blockletIntroduction,helperText:u.blockletIntroduction||"",sx:{mt:3}})]})]}),l.jsxs(j,{display:"flex",mt:3,className:"section",children:[l.jsx(L,{variant:"h3",className:"left",children:a("blocklet.publish.versionTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(G,{required:!0,label:`Blocklet ${a("common.version")}`,placeholder:`Blocklet ${a("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:O},autoComplete:"off",variant:"outlined",fullWidth:!0,value:c.blockletVersion,onChange:N=>{b({blockletVersion:""}),h({blockletVersion:N.target.value})},error:!!u.blockletVersion,helperText:u.blockletVersion||""}),l.jsx(G,{label:a("blocklet.publish.releaseNote"),autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:O,endAdornment:l.jsxs($e,{position:"end",children:[((ee=c==null?void 0:c.note)==null?void 0:ee.length)||0," / ",z.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:c.note,onChange:N=>{b({note:""}),h({note:N.target.value.slice(0,z.PROJECT.MAX_NOTE_LENGTH)})},error:!!u.note,helperText:u.note||"",sx:{mt:3}})]})]}),l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(L,{variant:"h3",className:"left",children:a("blocklet.publish.imgTitle")}),l.jsxs(j,{sx:{flex:1},children:[l.jsxs(j,{display:"flex",children:[l.jsx(L,{variant:"subtitle1",sx:{mr:2},children:a("common.logo")}),l.jsx(j,{sx:{flex:1,cursor:O?"default":"pointer"},children:l.jsx(co,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:ae,onClick:()=>!O&&C.current.open()})})]}),l.jsxs(j,{display:"flex",mt:3,children:[l.jsx(L,{variant:"subtitle1",sx:{mr:2},children:a("common.screenshot")}),l.jsxs(j,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[Q.map((N,A)=>l.jsxs(j,{className:"screenshot",children:[l.jsx("img",{alt:"screenshot",src:N}),!O&&l.jsx(Se,{className:"action",onClick:()=>{const R=[...c.blockletScreenshots];R.splice(A,1),h({blockletScreenshots:R})},children:l.jsx(eo,{})})]})),Q.length<5&&l.jsx(j,{sx:{width:200,height:140,background:"#eee",cursor:O?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>!O&&y.current.open(),children:"+"})]})]})]}),l.jsx(pt,{id:"​uploader-logo",ref:C,popup:!0,onUploadFinish:N=>{h({blockletLogo:N.data.filename}),C.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:ce,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:dt,maxFileSize:ut,maxNumberOfFiles:1}}},"uploader-logo"),l.jsx(pt,{id:"​uploader-screenshot",ref:y,popup:!0,onUploadFinish:N=>{var R;const A=c.blockletScreenshots||[];A.push((R=N.data)==null?void 0:R.filename),h({blockletScreenshots:A}),y.current.close()},plugins:["ImageEditor"],apiPathProps:{uploader:le,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileTypes:dt,maxFileSize:ut,maxNumberOfFiles:5-Q.length}}},"uploader-screenshot")]}),l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(j,{className:"left",children:l.jsx(L,{variant:"h3",children:a("blocklet.publish.resourceTitle")})}),l.jsxs(j,{sx:{flex:1},children:[l.jsx(to,{tabs:B,current:ye,onChange:ue,sx:{ml:-2,mt:-1.5}}),l.jsx(j,{children:de})]})]}),T==="pack"&&l.jsxs(j,{display:"flex",mt:3,className:"section full-width",children:[l.jsx(j,{className:"left",children:l.jsx(L,{variant:"h3",children:a("common.components")})}),l.jsx(j,{sx:{flex:1},children:l.jsx(et,{disabled:m||O,app:p,value:c.blockletComponents,onChange:N=>{h({blockletComponents:N})}})})]})]})]})}tt.propTypes={};tt.defaultProps={};const jl=q.div`
136
136
  .sticky-header {
137
137
  margin-top: -12px;
138
138
  padding: 12px 0;
@@ -212,14 +212,14 @@ import{an as At,j as l,aB as K,cq as Lt,aE as $,f6 as ot,aD as se,az as Le,aA as
212
212
  }
213
213
  font-size: 0.8rem;
214
214
  }
215
- `;function Dt({padding:e}){const{blocklet:t}=xe(),o=Ht(),{componentDid:n}=ge();if(x.useEffect(()=>{if(n&&window.parent){const a=`${o.pathname}${o.search}`;window.parent.postMessage({event:"popstate",page:"publish",componentDid:n,path:a},"*")}},[n,o]),!t)return null;const d={};return e&&(d.padding=e),l.jsx(Cl,{style:d,children:l.jsxs(Gt,{children:[l.jsx(Ie,{path:"/",element:l.jsx(It,{})}),l.jsx(Ie,{path:"/create",element:l.jsx(qe,{})}),l.jsx(Ie,{path:"/:projectId",element:l.jsx(Tt,{})}),l.jsx(Ie,{path:"/:projectId/:releaseId",element:l.jsx(tt,{})})]})})}Dt.propTypes={padding:P.oneOfType([P.string,P.number])};Dt.defaultProps={padding:""};const Cl=q(j)`
215
+ `;function Dt({padding:e}){const{blocklet:t}=xe(),o=Ht(),{componentDid:n}=ge();if(x.useEffect(()=>{if(n&&window.parent){const a=`${o.pathname}${o.search}`;window.parent.postMessage({event:"popstate",page:"publish",componentDid:n,path:a},"*")}},[n,o]),!t)return null;const d={};return e&&(d.padding=e),l.jsx(Cl,{style:d,children:l.jsxs(Jt,{children:[l.jsx(Te,{path:"/",element:l.jsx(Tt,{})}),l.jsx(Te,{path:"/create",element:l.jsx(qe,{})}),l.jsx(Te,{path:"/:projectId",element:l.jsx(It,{})}),l.jsx(Te,{path:"/:projectId/:releaseId",element:l.jsx(tt,{})})]})})}Dt.propTypes={padding:P.oneOfType([P.string,P.number])};Dt.defaultProps={padding:""};const Cl=q(j)`
216
216
  a {
217
217
  color: ${({theme:e})=>e.palette.primary.main};
218
218
  }
219
219
  `;export{Dt as default};
220
220
  function __vite__mapDeps(indexes) {
221
221
  if (!__vite__mapDeps.viteFileDeps) {
222
- __vite__mapDeps.viteFileDeps = ["assets/react-bSUPw7ox.js","assets/index-QvTDYv6X.js","assets/index-F9vDNwHQ.css","assets/index-ucFrSwXM.js","assets/preact.module-CqtzSW6G.js","assets/index-yNszdAyn.js","assets/index-xp4s9IF1.js","assets/toUpper-9pPJLyHS.js","assets/index-Lz-j33m0.js","assets/fallback-WjzTKaZb.js","assets/index-goHsxnhy.js","assets/Toolbar-qIgYu3q0.js","assets/Hidden-mW8rjJ7H.js","assets/MoreHoriz-sd7FCyPf.js","assets/ExpandMore-inn6pwGR.js","assets/index-ZxfDwv5M.js","assets/ListItem-jR0DTbV4.js","assets/selector-8FMpyB2D.js","assets/Avatar-d1HBhAcf.js","assets/useSlot-o8ZWnVB_.js","assets/ua-parser-UbVJZWQu.js","assets/index-d-Rw6UM2.js","assets/OpenInNew-UfLZPW1_.js","assets/CloseOutlined--dnfQa2n.js","assets/MoreVert-w2xJDuVT.js","assets/index-zRf18La_.js","assets/FormControlLabel-r9q0VfRf.js","assets/useFormControl-htyncNn_.js","assets/index-_N7xFgV-.js","assets/FilterList-_UU_tsIc.js","assets/TableRow-j1fbGnXk.js","assets/Grid-GelBsPE2.js","assets/FormControl-8O72uE8H.js","assets/FormGroup-G3i9ndxk.js","assets/InputLabel-OaHIlADE.js","assets/ListItemText-JpoZJL1W.js","assets/Select-6x_KXv7T.js","assets/TextField-BmfH05Zr.js","assets/LastPage-JawdTEAU.js","assets/index-vOzMfhG6.js","assets/redux-x1KHLUJG.js","assets/Search-y1h18Mub.js","assets/Delete-jNg2gv9v.js","assets/uniqBy-MWaAHDmW.js","assets/react-i1f7jPtW.css"]
222
+ __vite__mapDeps.viteFileDeps = ["assets/react-MJeba7Rg.js","assets/index-4kDY-bSj.js","assets/index-F9vDNwHQ.css","assets/index-T8BvO7dt.js","assets/preact.module-CqtzSW6G.js","assets/index-Wv-uKXkq.js","assets/index-PmX2brdr.js","assets/toUpper-ihNYSzdF.js","assets/index-0B3E9YjN.js","assets/fallback-ETW39yfj.js","assets/index-DGEurGvE.js","assets/Toolbar-mzmmamgr.js","assets/Hidden-_SJ5u7tx.js","assets/MoreHoriz-ek7Nm6hB.js","assets/ExpandMore-WQg_8AV_.js","assets/index-6U66PG3E.js","assets/ListItem-cIUZMF-7.js","assets/selector-txSzpZlr.js","assets/Avatar-9aQtHFLk.js","assets/useSlot-O2pDH7jV.js","assets/ua-parser-7BcsJkdX.js","assets/index-d-Rw6UM2.js","assets/OpenInNew-nofe5889.js","assets/CloseOutlined-hMQSiN1m.js","assets/MoreVert-_uT0_c7b.js","assets/index-zdDzzHGv.js","assets/FormControlLabel-N6kIDqLm.js","assets/useFormControl--zZqKVme.js","assets/index-XNap50fg.js","assets/FilterList-ZQnUABNq.js","assets/TableRow-I6sJG9EK.js","assets/Grid-MyqNT_XI.js","assets/FormControl-uhlBMMeK.js","assets/FormGroup-rl0ncWja.js","assets/InputLabel-SMyOIavk.js","assets/ListItemText-IXOBm0cf.js","assets/Select-ZFaqiDJM.js","assets/TextField-jXLk3dBz.js","assets/LastPage-3di6NtYt.js","assets/index-X8tXLwEv.js","assets/redux-OK0ujNpx.js","assets/Search-DtHNRy-_.js","assets/Delete-scHxyggC.js","assets/uniqBy-m8IpmIgG.js","assets/react-i1f7jPtW.css"]
223
223
  }
224
224
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
225
225
  }