@abtnode/blocklet-services 1.16.38-beta-20250125-130409-89d4849d → 1.16.38-beta-20250126-132712-f36c6a8b

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 (111) hide show
  1. package/dist/assets/{Add-B2yJ7-eq.js → Add-0_yO_NcD.js} +1 -1
  2. package/dist/assets/{ArrowDropDown-D34En9iv.js → ArrowDropDown-CSe7vdhu.js} +1 -1
  3. package/dist/assets/{CheckCircle-BFXaMcKG.js → CheckCircle-C20J4AX-.js} +1 -1
  4. package/dist/assets/{ChevronLeft-BXNAWRN5.js → ChevronLeft-CYpg5M_K.js} +1 -1
  5. package/dist/assets/{ChevronRight-bqoO4ITE.js → ChevronRight-DORpkdoL.js} +1 -1
  6. package/dist/assets/{DeleteOutline-_fdI9SLO.js → DeleteOutline-BaOxCgo3.js} +1 -1
  7. package/dist/assets/{Done-BegjCX44.js → Done-Bsd0QwkQ.js} +1 -1
  8. package/dist/assets/{Download-ynxZ21_h.js → Download-BF8ec3kS.js} +1 -1
  9. package/dist/assets/{Error-Dy9JDlUO.js → Error-CmnuwZkD.js} +1 -1
  10. package/dist/assets/{Google-oUsdET4E.js → Google-F1HiAjHW.js} +1 -1
  11. package/dist/assets/{InfoOutlined-CNFvZjEE.js → InfoOutlined-DZAeG3v-.js} +1 -1
  12. package/dist/assets/{Launch-DrBfpSUO.js → Launch-DNY7Ut_B.js} +1 -1
  13. package/dist/assets/{LaunchOutlined-BstP_JKj.js → LaunchOutlined-BUOyH9Rv.js} +1 -1
  14. package/dist/assets/{Loop-CuBUpP_g.js → Loop-gZ2g1v3i.js} +1 -1
  15. package/dist/assets/{MoreHoriz-jduVqLUc.js → MoreHoriz-CwoKs0Gg.js} +1 -1
  16. package/dist/assets/{PlayArrow-CauLC4o_.js → PlayArrow-C6dXJHO6.js} +1 -1
  17. package/dist/assets/{ViewList-CePklU1n.js → ViewList-DfGpYdZ-.js} +1 -1
  18. package/dist/assets/{access-control-DMs8KTjf.js → access-control-DWS7Lowo.js} +1 -1
  19. package/dist/assets/{actions-B31e80dT.js → actions-BvtS-2sJ.js} +1 -1
  20. package/dist/assets/{add-component-core-BRZ3frb6.js → add-component-core-DZPE4BRe.js} +1 -1
  21. package/dist/assets/{add-resource-CpU17Psd.js → add-resource-CYNZTaOG.js} +1 -1
  22. package/dist/assets/{addon-DTkR7c7s.js → addon-CDVN9YCj.js} +1 -1
  23. package/dist/assets/{analytics-BdRFij_g.js → analytics-0lVXNyXs.js} +1 -1
  24. package/dist/assets/{audit-logs-B5tzv9w6.js → audit-logs-CJvI5okV.js} +1 -1
  25. package/dist/assets/{base32-Bxy_Ng3r.js → base32-Bl4ek2bl.js} +1 -1
  26. package/dist/assets/{branding-DEsr5kE0.js → branding-CfeUWBA7.js} +2 -2
  27. package/dist/assets/{bundle-avatar-BSrkMwWG.js → bundle-avatar-TEUPlhi2.js} +1 -1
  28. package/dist/assets/{button-CT_SqdC_.js → button-CzSgwkGN.js} +1 -1
  29. package/dist/assets/{click-to-copy-DG6oCsDy.js → click-to-copy-Ck4RKrL7.js} +1 -1
  30. package/dist/assets/{complete-B7fQAviW.js → complete-CPnz5QUF.js} +1 -1
  31. package/dist/assets/{component-L5_5YcjO.js → component-Srk2_SVH.js} +1 -1
  32. package/dist/assets/{config-Bi4mtKrp.js → config-Cp3L8D_L.js} +1 -1
  33. package/dist/assets/{config-DfNCVYae.js → config-kJZsVZD6.js} +1 -1
  34. package/dist/assets/{config-navigation-BEXQaINe.js → config-navigation-a3GJWM1m.js} +3 -3
  35. package/dist/assets/{config-space-C1WFdLmf.js → config-space-piVzY5c1.js} +1 -1
  36. package/dist/assets/{confirm-Cbx82b25.js → confirm-D7n9Rzfx.js} +1 -1
  37. package/dist/assets/{connect-Cp12hGV2.js → connect-BZUv1d-6.js} +1 -1
  38. package/dist/assets/{connect-kW-GMUG3.js → connect-rdXbvbmJ.js} +1 -1
  39. package/dist/assets/{connect-to-D5VZBQsq.js → connect-to-BzfmK9yx.js} +1 -1
  40. package/dist/assets/{dashboard-uG_G13IR.js → dashboard-B_hsqmQK.js} +3 -3
  41. package/dist/assets/{did-address-DhC4Z1Ef.js → did-address-CLeqbWiu.js} +1 -1
  42. package/dist/assets/{domain-DvrEWdQ8.js → domain-DgPzyf2N.js} +1 -1
  43. package/dist/assets/domain-list-BiYGOOY3.js +15 -0
  44. package/dist/assets/{email-Cs87G5pr.js → email-5azpRba_.js} +1 -1
  45. package/dist/assets/{exchange-passport-Crhw_vMf.js → exchange-passport-Cus1rYsJ.js} +1 -1
  46. package/dist/assets/{form-text-input-COijwVFy.js → form-text-input-Cf1j6PeI.js} +1 -1
  47. package/dist/assets/{fuel-DxcT-75B.js → fuel-BaqDy7AE.js} +1 -1
  48. package/dist/assets/{fullpage-CAAXK4pO.js → fullpage-Dx8PYbvz.js} +1 -1
  49. package/dist/assets/{get-safe-url-CJIsC1HE.js → get-safe-url-BF9qL1PD.js} +1 -1
  50. package/dist/assets/{get-safe-url-jf8X-XpV.js → get-safe-url-BsKINLVF.js} +1 -1
  51. package/dist/assets/{home-Ckf42YJd.js → home-D42zu2I_.js} +1 -1
  52. package/dist/assets/{iframe-BYvZHXU-.js → iframe-Cn--d9nR.js} +1 -1
  53. package/dist/assets/{index-BNCJw59G.js → index-6oQLUjq6.js} +1 -1
  54. package/dist/assets/{index-BJpEKQ4d.js → index-BDfZ8xEV.js} +22 -22
  55. package/dist/assets/{index-CRaD-3s4.js → index-BWKYj-2X.js} +4 -4
  56. package/dist/assets/{index-Xsfh2QSh.js → index-BgGF6utP.js} +1 -1
  57. package/dist/assets/{index-Dnxf7bfY.js → index-CEbjBHHi.js} +1 -1
  58. package/dist/assets/{index-B86l7aCe.js → index-CFT-L0SZ.js} +1 -1
  59. package/dist/assets/{index-3PobA81m.js → index-CKsz_iVM.js} +1 -1
  60. package/dist/assets/{index-2NCgoG1i.js → index-CSkA6M4K.js} +1 -1
  61. package/dist/assets/{index-KhsqOaMW.js → index-CXVY5UoP.js} +1 -1
  62. package/dist/assets/{index-Bw3pdP7q.js → index-DTzPwoh8.js} +1 -1
  63. package/dist/assets/{index-_ph5477y.js → index-DpNGP1ih.js} +1 -1
  64. package/dist/assets/{index-DBxnR425.js → index-DpOEjWGx.js} +1 -1
  65. package/dist/assets/index-fel1gHRy.js +61 -0
  66. package/dist/assets/{index-C7s7t2aN.js → index-kk2gduJr.js} +1 -1
  67. package/dist/assets/{index-PxlbAHCL.js → index-uosYiNLl.js} +3 -3
  68. package/dist/assets/{invitation-DbGm8k25.js → invitation-DpOgzXor.js} +1 -1
  69. package/dist/assets/{invite-6nyN-oEv.js → invite-DmpCzOPN.js} +1 -1
  70. package/dist/assets/{issue-passport-YNIanHYf.js → issue-passport--83QQUn2.js} +1 -1
  71. package/dist/assets/{item-DvkqLmAe.js → item-7Z8_UB5K.js} +1 -1
  72. package/dist/assets/{layout-BVSGD29L.js → layout-Dv_7-Fpq.js} +1 -1
  73. package/dist/assets/{list-header-Br_UsG2e.js → list-header-CfBPZZEw.js} +1 -1
  74. package/dist/assets/{list-DrMoP89n.js → list-yjVo8vxH.js} +1 -1
  75. package/dist/assets/{localization-V7oQS6wL.js → localization-CRwVeETn.js} +1 -1
  76. package/dist/assets/{log-DCaMhKsI.js → log-CNjGA-yl.js} +1 -1
  77. package/dist/assets/{login-CHKXy0wB.js → login-DWrSz67b.js} +1 -1
  78. package/dist/assets/{login-oauth-callback-BSX9wejc.js → login-oauth-callback-VNeZxFH0.js} +1 -1
  79. package/dist/assets/{logo-uploader-D3pYQBpx.js → logo-uploader-DZm2nb0s.js} +3 -3
  80. package/dist/assets/{lost-passport-BDU3b7Z_.js → lost-passport-DFh2B6Gl.js} +1 -1
  81. package/dist/assets/{open-window-DrK6iGmf.js → open-window-BvyLumiN.js} +1 -1
  82. package/dist/assets/{overview-BdW7-A5w.js → overview-DNQZ-tgj.js} +1 -1
  83. package/dist/assets/{page-header-JASV_XcR.js → page-header-CJHCTtBc.js} +1 -1
  84. package/dist/assets/{permission-BkijBCin.js → permission-B0xKCybj.js} +1 -1
  85. package/dist/assets/{preferences-CtlqLrD7.js → preferences-BMgF6Djl.js} +1 -1
  86. package/dist/assets/publish-resource-B_OOg2Om.js +1 -0
  87. package/dist/assets/{react-beautiful-dnd.esm-C5Uq3rbJ.js → react-beautiful-dnd.esm-DY38RjFx.js} +1 -1
  88. package/dist/assets/{relative-time-CQ0hJZC_.js → relative-time-C36uWHLw.js} +1 -1
  89. package/dist/assets/sdk-VtyRZZVE.js +1 -0
  90. package/dist/assets/{session-ClC5u_ou.js → session-DutPZhUI.js} +1 -1
  91. package/dist/assets/{setup-DdTSQTvr.js → setup-lHrzljce.js} +3 -3
  92. package/dist/assets/{start-Byudzjg5.js → start-DNIWxyMi.js} +1 -1
  93. package/dist/assets/{step-actions-Zk6bKoYE.js → step-actions-BYFwIhu4.js} +1 -1
  94. package/dist/assets/{studio-BGgRA_ZI.js → studio-DBfgF1ck.js} +1 -1
  95. package/dist/assets/{switch-control-BmI39UF6.js → switch-control-B8wYzo2_.js} +1 -1
  96. package/dist/assets/{traffic-B70zlTcA.js → traffic-1TtyUzFO.js} +1 -1
  97. package/dist/assets/{transfer-C-8HxdfL.js → transfer-Bh7VQuKL.js} +1 -1
  98. package/dist/assets/{unsubscribe-CrmlZkSk.js → unsubscribe-C_eX2N6S.js} +1 -1
  99. package/dist/assets/{useLocalStorage-CTToOZ4l.js → useLocalStorage-tmIJr51I.js} +1 -1
  100. package/dist/assets/{user-center-BB2CLc7Q.js → user-center-pv7oyGUu.js} +1 -1
  101. package/dist/assets/{util-DowdN-NO.js → util-BY6uUuCk.js} +1 -1
  102. package/dist/assets/{util-BnCdSUGw.js → util-CtKeCk_N.js} +1 -1
  103. package/dist/assets/{vendor-arcblock-CVRRnBv2.js → vendor-arcblock-Bf7AGBSd.js} +1 -1
  104. package/dist/assets/{wrap-locale-CNuv_qkt.js → wrap-locale-BjJvyHQM.js} +1 -1
  105. package/dist/index.html +2 -2
  106. package/dist/service-worker.js +1 -1
  107. package/package.json +25 -25
  108. package/dist/assets/domain-list-B1J4C6ST.js +0 -15
  109. package/dist/assets/index-BUstrRo5.js +0 -61
  110. package/dist/assets/publish-resource-CsuZRYMx.js +0 -1
  111. package/dist/assets/sdk-CncrP2i9.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BJpEKQ4d.js","assets/vendor-arcblock-CVRRnBv2.js","assets/vendor-react-D-afvo_7.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-mui-core-CCMNKHtm.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-C2fPoxDR.js","assets/index-PxlbAHCL.js","assets/index-DoZ2YM4T.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
2
- import{r as R,k as Dt,l as lt,L as le,f as Hn,h as Gn,i as pt}from"./vendor-react-D-afvo_7.js";import{a1 as me,j as t,t as ze,a3 as u,aM as Wo,E as d,a4 as ue,I as oe,T as E,bT as Uo,aa as ae,aE as Xn,bJ as Ge,ad as Fo,aN as Xe,bq as jt,x as Q,a2 as et,P as Ho,G as Go,v as Tt,$ as Xo,ar as Jo,al as pe,ah as Jn,D as _t,ab as Qo,r as Yo,bG as Qn,K as Be,y as Zo,M as Y,ac as ke,aL as Yn,L as Zn,z as Kn,bn as es,aA as Ko,az as tt,bt as ts,bu as os,bU as ns,bV as ss,aP as en,bD as rs,bM as is,bx as ls,by as ft}from"./vendor-mui-core-CCMNKHtm.js";import{y as be,B as De,h as re,a5 as cs,f as mo,_ as tn,ad as bo}from"./index-PxlbAHCL.js";import{_ as xe,b as H,e as J,a1 as ot,aa as on,aQ as nn,a8 as sn,Y as as,aR as Pt,j as V,n as ds,aS as us,aT as ps,X as fs,ax as se,aU as hs,ah as ms,aI as Se,a5 as Lt,aV as ye,ap as bs,af as xs}from"./vendor-arcblock-CVRRnBv2.js";import{d as qt}from"./Add-B2yJ7-eq.js";import{d as gs}from"./Error-Dy9JDlUO.js";import{C as $t}from"./confirm-Cbx82b25.js";import{u as ct}from"./session-ClC5u_ou.js";import{W as xo}from"./did-address-DhC4Z1Ef.js";import{E as Ve,D as go,C as jo,P as ko}from"./react-beautiful-dnd.esm-C5Uq3rbJ.js";import{B as Nt}from"./bundle-avatar-BSrkMwWG.js";import{S as fe}from"./shorten-label-CYJeMT7h.js";import{T as js,x as ce,G as At,C as Je}from"./vendor-utils-5TjOM6td.js";import{d as ks}from"./Download-ynxZ21_h.js";import{d as ys}from"./QuestionMarkCircle-SCPzvU7T.js";import{u as vs}from"./vendor-hooks-BKxTDk_P.js";import{_ as Ce}from"./useSetState-Crt4S51m.js";import{c as Et}from"./index-DoZ2YM4T.js";import{E as Mt}from"./index-DE_r-gh_.js";import{p as nt}from"./index-DBxnR425.js";import"./api-K65cLqol.js";import{d as ws}from"./ChevronRight-bqoO4ITE.js";import{T as Cs,a as Ss}from"./vendor-mui-x-DmPVvZFJ.js";import{d as yo}from"./DeleteOutline-_fdI9SLO.js";import{c as Rs,A as rn,u as Is,S as Ds,U as Ts,a as ht,b as ln,n as _s,e as Ps,f as vo,g as Ls}from"./item-DvkqLmAe.js";import{d as qs}from"./ArrowDropDown-D34En9iv.js";import{f as Re}from"./format-error-C0Ke3VXF.js";import{C as $s}from"./click-to-copy-DG6oCsDy.js";import{d as Ns}from"./Launch-DrBfpSUO.js";import{M as As}from"./index-BvLMNAG0.js";import{r as Es}from"./index-C0uUrAqS.js";import{d as Ms}from"./Done-BegjCX44.js";import"./raf-schd.esm-Cxhj8umC.js";import"./get-safe-url-CJIsC1HE.js";var Ot={},Os=me;Object.defineProperty(Ot,"__esModule",{value:!0});var cn=Ot.default=void 0,zs=Os(xe()),Bs=t;cn=Ot.default=(0,zs.default)((0,Bs.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var zt={},Vs=me;Object.defineProperty(zt,"__esModule",{value:!0});var an=zt.default=void 0,Ws=Vs(xe()),Us=t;an=zt.default=(0,Ws.default)((0,Us.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var Bt={},Fs=me;Object.defineProperty(Bt,"__esModule",{value:!0});var dn=Bt.default=void 0,Hs=Fs(xe()),Gs=t;dn=Bt.default=(0,Hs.default)((0,Gs.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Vt({did:e,projectId:o,title:n,logo:r,describe:s}){const i=`${`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${o}/logo/upload`}/${r}`,[a,c]=R.useState(!1),f=ze(h=>h.breakpoints.down("md"));return t.jsxs(u,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[t.jsx(Wo,{sx:{borderRadius:1},src:i}),t.jsxs(u,{children:[t.jsx(fe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:n||"/"}),t.jsx(fe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:s||"/"})]})]})}Vt.propTypes={projectId:d.string.isRequired,did:d.string.isRequired,title:d.string.isRequired,logo:d.string.isRequired,describe:d.string.isRequired};function Wt({initUrl:e}){const o=Dt(),n=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:r,locale:s}=J(),{api:l}=be(),{api:i}=ct(),[a,c]=R.useState(!0),{blocklet:f}=De(),[h,x]=R.useState(null),[b,p]=R.useState(!1),v=ze(g=>g.breakpoints.down("xl")),{componentDid:C=""}=lt(),[D,j]=R.useState(null),m=()=>{l.getProjects({input:{did:f.meta.did,componentDid:C,tenantScope:n}}).then(g=>{const P=(g==null?void 0:g.projects)||[];c(!1),j(P)}).catch(g=>{c(!1),V.error(g.message)})},T=()=>{o(`${H.UNOWNED_DID}/create/none`,{replace:!0})},L=g=>{x(g)},I=()=>{c(!1),p(!0)},y=()=>{p(!1),x(null)},_=g=>{V.error(g.message),p(!1),x(null)},A=g=>{if(!(g!=null&&g.deleted)){V.error("Delete project failed");return}m(),p(!1),x(null)},W=(g,P,O)=>{let F=g==null?void 0:g.trim();return F?(F=ds.toAddress(F).toLocaleLowerCase(),O.some((w,$)=>{const q=P[$];return q&&w.searchable&&w.display!=="excluded"&&w.display!=="false"&&q.toLocaleLowerCase().includes(F)})):!0};if(R.useEffect(()=>{m()},[]),!D&&a)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!D)return null;if(!D.length)return t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:r("blocklet.publish.blockletEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:r("blocklet.publish.createBlockletTip")}),t.jsx(ot,{onClick:T,variant:"contained",children:r("blocklet.publish.createBlocklet")})]});const k=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:g=>{const P=D[g];return t.jsx(le,{to:`${P.id}`,children:t.jsx(Vt,{did:f.meta.did,projectId:P.id,logo:P.blockletLogo,title:P.blockletTitle,describe:P.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{searchable:!1,customBodyRender:g=>g?t.jsx(on,{type:"success",children:g}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:g=>g?t.jsx(xo,{size:14,compact:!0,responsive:!1,did:g}):null}},v||C?null:{label:r("common.createdBy"),name:"createdBy",options:{customBodyRender:g=>g?t.jsx(xo,{onClick:()=>{o(`/.well-known/service/admin/members?did=${g}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:g}):null}},v||C?null:{label:r("common.scope"),name:"componentDid",options:{customBodyRender:g=>{const P=(f.children||[]).find(O=>O.meta.did===g);return P?t.jsxs(u,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[t.jsx(Nt,{size:14,blocklet:P,ancestors:[f]}),t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:P.meta.title})]},g):""}}},v||n?null:{label:r("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:g=>t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:t.jsx(fe,{children:g})})}},{label:r("common.updatedAt"),name:"updatedAt",options:{searchable:!1,customBodyRender:g=>t.jsx(nn,{value:Number(g),locale:s})}},{label:r("common.actions"),name:"actions",options:{searchable:!1,customBodyRenderLite:g=>{const P=D[g];return t.jsxs(u,{display:"flex",children:[t.jsx(le,{to:`${P.id}/new-release/${P.lastReleaseId}`,children:t.jsx(ue,{title:r("blocklet.publish.createRelease"),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"create",children:t.jsx(cn,{style:{fontSize:18}})})})}),!!P.lastReleaseId&&t.jsx(ue,{title:r("blocklet.publish.viewLastRelease",{name:P.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx(le,{style:{display:"flex"},to:`${P.id}/view/${P.lastReleaseId}`,children:t.jsx(an,{sx:{fontSize:18}})})})}),t.jsx(ue,{title:r("blocklet.publish.delete",{name:P.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>L(P),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),S=b?t.jsx(as,{open:!0,popup:!0,onClose:y,action:"check-has-project-id",locale:s,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:A,onError:_,extraParams:{projectId:h.id,did:f.meta.did,name:h.blockletTitle},messages:{title:r("blocklet.publish.deleteProject.title",{name:h.blockletTitle}),scan:r("blocklet.publish.deleteProject.scan",{name:h.blockletTitle}),confirm:r("blocklet.publish.deleteProject.confirm"),success:r("blocklet.publish.deleteProject.success")}}):null;return t.jsxs(u,{children:[t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",children:[t.jsx(u,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:r("common.blockletStudio")}),t.jsx(ue,{title:r("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:t.jsx(dn,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),t.jsxs(ot,{onClick:T,variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),r("blocklet.publish.createBlocklet")]})]}),t.jsx(Pt,{className:"main-table",locale:s,data:D,columns:k,options:{sort:!1,download:!1,filter:!1,print:!1,search:!0,viewColumns:!1,searchAlwaysOpen:!0,rowsPerPageOptions:[10,20,50,100],searchPlaceholder:r("blocklet.list.searchPlaceholder"),searchDebounceTime:400,customSearch:W}}),h&&t.jsx($t,{title:`${r("common.delete")} ${h.blockletTitle}`,description:r("blocklet.publish.deleteProject.description"),confirm:r("common.confirm"),onConfirm:I,onCancel:()=>x(null),children:t.jsx(u,{sx:{marginTop:2},children:[r("blocklet.publish.deleteProject.tip1"),r("blocklet.publish.deleteProject.tip2"),r("blocklet.publish.deleteProject.tip3")].map(g=>t.jsxs(u,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[t.jsx(gs,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),t.jsx(E,{component:"span",variant:"inherit",color:"text.secondary",children:g})]}))})}),S]})}Wt.propTypes={initUrl:d.object};Wt.defaultProps={initUrl:null};var Ut={},Xs=me;Object.defineProperty(Ut,"__esModule",{value:!0});var un=Ut.default=void 0,Js=Xs(xe()),wo=t;un=Ut.default=(0,Js.default)([(0,wo.jsx)("path",{d:"M20 17H4V5h8V3H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2v-3h-2z"},"0"),(0,wo.jsx)("path",{d:"m17 14 5-5-1.41-1.41L18 10.17V3h-2v7.17l-2.59-2.58L12 9z"},"1")],"InstallDesktop");function Qs(){var I;const{t:e,locale:o}=J(),{projectId:n}=lt(),{api:r}=be(),[s,l]=R.useState(!0),{blocklet:i}=De(),a=ze(y=>y.breakpoints.down("md")),[c,f]=R.useState(null),[h,x]=R.useState(null),[b,p]=R.useState(null),v=(I=window.env)==null?void 0:I.serverEndpoint,C=()=>{r.getReleases({input:{did:i.meta.did,projectId:n}}).then(y=>{const _=(y==null?void 0:y.releases)||[];l(!1),f(_)}).catch(y=>{l(!1),V.error(y.message)})},D=()=>{r.doBatchQuery({getProject:{input:{did:i.meta.did,projectId:n}},getReleases:{input:{did:i.meta.did,projectId:n}}}).then(y=>{x(y.getProject.project||{}),f(y.getReleases.releases||[]),l(!1)}).catch(y=>{l(!1),V.error(y.message)})};R.useEffect(()=>{D()},[]);const j=()=>{l(!1);const y=b.id;r.deleteRelease({input:{did:i.meta.did,projectId:n,releaseId:y}}).then(()=>{l(!1),C(),V.success(e("common.removeSuccess")),p(null)}).catch(_=>{l(!1),V.error(_.message)})},m=y=>{p(y)};if(!c&&s)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!c)return null;const T=t.jsxs(Uo,{className:"breadcrumbs","aria-label":"breadcrumb",children:[t.jsx(le,{to:"..",children:e("common.blockletStudio")}),t.jsx(E,{color:"text.primary",children:t.jsx(fe,{maxLength:a?6:30,children:h.blockletTitle})})]});if(!c.length)return t.jsxs(t.Fragment,{children:[T,t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),t.jsx(le,{to:"create/none",children:t.jsx(ot,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const L=[{label:e("common.version"),name:"blockletVersion",minWidth:160,options:{customBodyRenderLite:y=>{const _=c[y];return t.jsx(le,{to:`view/${_.id}`,children:t.jsx(Vt,{did:i.meta.did,projectId:h.id,logo:_.blockletLogo,title:_.blockletVersion,describe:_.blockletTitle})})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:y=>{const _=c[y];return t.jsx(E,{className:"note",children:_.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:y=>t.jsx(on,{type:y==="published"?"success":"warning",children:y==="published"?"Released":js(y)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:y=>{const _=c[y];return _.status!==re.PROJECT.RELEASE_STATUS.published?"":t.jsx(nn,{value:Number(_.updatedAt),locale:o})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:y=>{var g;const _=c[y];let A="",W="";const k=_.status==="published";if(k){const P=ce(v,`/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/release/blocklet.json`),O=new URL(v);O.pathname=ce(O.pathname,"/launch-blocklet/agreement"),O.searchParams.set("blocklet_meta_url",P),A=O.href,W=ce(`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/download/${(h.lastReleaseFiles||[])[0]}`)}const S=(g=h.blockletComponents)!=null&&g.some(P=>P.included)||_.uploadedResource?"pack":"resource";return t.jsxs(u,{display:"flex",alignItems:"center",children:[k&&S==="pack"&&t.jsx(ue,{title:e("blocklet.publish.install",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx("a",{style:{display:"flex"},href:A,target:"_blank",rel:"noreferrer",children:t.jsx(un,{sx:{fontSize:18}})})})}),k&&t.jsx(ue,{title:e("blocklet.publish.download",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"download",children:t.jsx("a",{style:{display:"flex"},href:W,children:t.jsx(ks,{sx:{fontSize:18}})})})}),t.jsx(ue,{title:e("blocklet.publish.delete",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>m(_),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}];return t.jsxs(Ys,{children:[t.jsxs(u,{className:"header",children:[T,t.jsx(le,{to:"new-release/none",children:t.jsxs(ot,{variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),e("blocklet.publish.createRelease")]})})]}),t.jsx(Pt,{className:"main-table",verticalKeyWidth:100,locale:o,data:c,columns:L,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),b&&t.jsx($t,{title:e(`${e("common.delete")} ${b.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:j,onCancel:()=>p(null)})]})}const Ys=ae(u)`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BDfZ8xEV.js","assets/vendor-arcblock-Bf7AGBSd.js","assets/vendor-react-D-afvo_7.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-mui-core-CCMNKHtm.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-C2fPoxDR.js","assets/index-uosYiNLl.js","assets/index-DoZ2YM4T.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
2
+ import{r as R,k as Dt,l as lt,L as le,f as Hn,h as Gn,i as pt}from"./vendor-react-D-afvo_7.js";import{a1 as me,j as t,t as ze,a3 as u,aM as Wo,E as d,a4 as ue,I as oe,T as E,bT as Uo,aa as ae,aE as Xn,bJ as Ge,ad as Fo,aN as Xe,bq as jt,x as Q,a2 as et,P as Ho,G as Go,v as Tt,$ as Xo,ar as Jo,al as pe,ah as Jn,D as _t,ab as Qo,r as Yo,bG as Qn,K as Be,y as Zo,M as Y,ac as ke,aL as Yn,L as Zn,z as Kn,bn as es,aA as Ko,az as tt,bt as ts,bu as os,bU as ns,bV as ss,aP as en,bD as rs,bM as is,bx as ls,by as ft}from"./vendor-mui-core-CCMNKHtm.js";import{y as be,B as De,h as re,a5 as cs,f as mo,_ as tn,ad as bo}from"./index-uosYiNLl.js";import{_ as xe,b as H,e as J,a1 as ot,aa as on,aQ as nn,a8 as sn,Y as as,aR as Pt,j as V,n as ds,aS as us,aT as ps,X as fs,ax as se,aU as hs,ah as ms,aI as Se,a5 as Lt,aV as ye,ap as bs,af as xs}from"./vendor-arcblock-Bf7AGBSd.js";import{d as qt}from"./Add-0_yO_NcD.js";import{d as gs}from"./Error-CmnuwZkD.js";import{C as $t}from"./confirm-D7n9Rzfx.js";import{u as ct}from"./session-DutPZhUI.js";import{W as xo}from"./did-address-CLeqbWiu.js";import{E as Ve,D as go,C as jo,P as ko}from"./react-beautiful-dnd.esm-DY38RjFx.js";import{B as Nt}from"./bundle-avatar-TEUPlhi2.js";import{S as fe}from"./shorten-label-CYJeMT7h.js";import{T as js,x as ce,G as At,C as Je}from"./vendor-utils-5TjOM6td.js";import{d as ks}from"./Download-BF8ec3kS.js";import{d as ys}from"./QuestionMarkCircle-SCPzvU7T.js";import{u as vs}from"./vendor-hooks-BKxTDk_P.js";import{_ as Ce}from"./useSetState-Crt4S51m.js";import{c as Et}from"./index-DoZ2YM4T.js";import{E as Mt}from"./index-DE_r-gh_.js";import{p as nt}from"./index-DpOEjWGx.js";import"./api-K65cLqol.js";import{d as ws}from"./ChevronRight-DORpkdoL.js";import{T as Cs,a as Ss}from"./vendor-mui-x-DmPVvZFJ.js";import{d as yo}from"./DeleteOutline-BaOxCgo3.js";import{c as Rs,A as rn,u as Is,S as Ds,U as Ts,a as ht,b as ln,n as _s,e as Ps,f as vo,g as Ls}from"./item-7Z8_UB5K.js";import{d as qs}from"./ArrowDropDown-CSe7vdhu.js";import{f as Re}from"./format-error-C0Ke3VXF.js";import{C as $s}from"./click-to-copy-Ck4RKrL7.js";import{d as Ns}from"./Launch-DNY7Ut_B.js";import{M as As}from"./index-BvLMNAG0.js";import{r as Es}from"./index-C0uUrAqS.js";import{d as Ms}from"./Done-Bsd0QwkQ.js";import"./raf-schd.esm-Cxhj8umC.js";import"./get-safe-url-BsKINLVF.js";var Ot={},Os=me;Object.defineProperty(Ot,"__esModule",{value:!0});var cn=Ot.default=void 0,zs=Os(xe()),Bs=t;cn=Ot.default=(0,zs.default)((0,Bs.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var zt={},Vs=me;Object.defineProperty(zt,"__esModule",{value:!0});var an=zt.default=void 0,Ws=Vs(xe()),Us=t;an=zt.default=(0,Ws.default)((0,Us.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var Bt={},Fs=me;Object.defineProperty(Bt,"__esModule",{value:!0});var dn=Bt.default=void 0,Hs=Fs(xe()),Gs=t;dn=Bt.default=(0,Hs.default)((0,Gs.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Vt({did:e,projectId:o,title:n,logo:r,describe:s}){const i=`${`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${o}/logo/upload`}/${r}`,[a,c]=R.useState(!1),f=ze(h=>h.breakpoints.down("md"));return t.jsxs(u,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),children:[t.jsx(Wo,{sx:{borderRadius:1},src:i}),t.jsxs(u,{children:[t.jsx(fe,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:n||"/"}),t.jsx(fe,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:s||"/"})]})]})}Vt.propTypes={projectId:d.string.isRequired,did:d.string.isRequired,title:d.string.isRequired,logo:d.string.isRequired,describe:d.string.isRequired};function Wt({initUrl:e}){const o=Dt(),n=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:r,locale:s}=J(),{api:l}=be(),{api:i}=ct(),[a,c]=R.useState(!0),{blocklet:f}=De(),[h,x]=R.useState(null),[b,p]=R.useState(!1),v=ze(g=>g.breakpoints.down("xl")),{componentDid:C=""}=lt(),[D,j]=R.useState(null),m=()=>{l.getProjects({input:{did:f.meta.did,componentDid:C,tenantScope:n}}).then(g=>{const P=(g==null?void 0:g.projects)||[];c(!1),j(P)}).catch(g=>{c(!1),V.error(g.message)})},T=()=>{o(`${H.UNOWNED_DID}/create/none`,{replace:!0})},L=g=>{x(g)},I=()=>{c(!1),p(!0)},y=()=>{p(!1),x(null)},_=g=>{V.error(g.message),p(!1),x(null)},A=g=>{if(!(g!=null&&g.deleted)){V.error("Delete project failed");return}m(),p(!1),x(null)},W=(g,P,O)=>{let F=g==null?void 0:g.trim();return F?(F=ds.toAddress(F).toLocaleLowerCase(),O.some((w,$)=>{const q=P[$];return q&&w.searchable&&w.display!=="excluded"&&w.display!=="false"&&q.toLocaleLowerCase().includes(F)})):!0};if(R.useEffect(()=>{m()},[]),!D&&a)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!D)return null;if(!D.length)return t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:r("blocklet.publish.blockletEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:r("blocklet.publish.createBlockletTip")}),t.jsx(ot,{onClick:T,variant:"contained",children:r("blocklet.publish.createBlocklet")})]});const k=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:g=>{const P=D[g];return t.jsx(le,{to:`${P.id}`,children:t.jsx(Vt,{did:f.meta.did,projectId:P.id,logo:P.blockletLogo,title:P.blockletTitle,describe:P.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{searchable:!1,customBodyRender:g=>g?t.jsx(on,{type:"success",children:g}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:g=>g?t.jsx(xo,{size:14,compact:!0,responsive:!1,did:g}):null}},v||C?null:{label:r("common.createdBy"),name:"createdBy",options:{customBodyRender:g=>g?t.jsx(xo,{onClick:()=>{o(`/.well-known/service/admin/members?did=${g}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:g}):null}},v||C?null:{label:r("common.scope"),name:"componentDid",options:{customBodyRender:g=>{const P=(f.children||[]).find(O=>O.meta.did===g);return P?t.jsxs(u,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[t.jsx(Nt,{size:14,blocklet:P,ancestors:[f]}),t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:P.meta.title})]},g):""}}},v||n?null:{label:r("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:g=>t.jsx(u,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:t.jsx(fe,{children:g})})}},{label:r("common.updatedAt"),name:"updatedAt",options:{searchable:!1,customBodyRender:g=>t.jsx(nn,{value:Number(g),locale:s})}},{label:r("common.actions"),name:"actions",options:{searchable:!1,customBodyRenderLite:g=>{const P=D[g];return t.jsxs(u,{display:"flex",children:[t.jsx(le,{to:`${P.id}/new-release/${P.lastReleaseId}`,children:t.jsx(ue,{title:r("blocklet.publish.createRelease"),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"create",children:t.jsx(cn,{style:{fontSize:18}})})})}),!!P.lastReleaseId&&t.jsx(ue,{title:r("blocklet.publish.viewLastRelease",{name:P.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx(le,{style:{display:"flex"},to:`${P.id}/view/${P.lastReleaseId}`,children:t.jsx(an,{sx:{fontSize:18}})})})}),t.jsx(ue,{title:r("blocklet.publish.delete",{name:P.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>L(P),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),S=b?t.jsx(as,{open:!0,popup:!0,onClose:y,action:"check-has-project-id",locale:s,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:A,onError:_,extraParams:{projectId:h.id,did:f.meta.did,name:h.blockletTitle},messages:{title:r("blocklet.publish.deleteProject.title",{name:h.blockletTitle}),scan:r("blocklet.publish.deleteProject.scan",{name:h.blockletTitle}),confirm:r("blocklet.publish.deleteProject.confirm"),success:r("blocklet.publish.deleteProject.success")}}):null;return t.jsxs(u,{children:[t.jsxs(u,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsxs(u,{display:"flex",flexDirection:"row",alignItems:"center",children:[t.jsx(u,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:r("common.blockletStudio")}),t.jsx(ue,{title:r("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:t.jsx(dn,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),t.jsxs(ot,{onClick:T,variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),r("blocklet.publish.createBlocklet")]})]}),t.jsx(Pt,{className:"main-table",locale:s,data:D,columns:k,options:{sort:!1,download:!1,filter:!1,print:!1,search:!0,viewColumns:!1,searchAlwaysOpen:!0,rowsPerPageOptions:[10,20,50,100],searchPlaceholder:r("blocklet.list.searchPlaceholder"),searchDebounceTime:400,customSearch:W}}),h&&t.jsx($t,{title:`${r("common.delete")} ${h.blockletTitle}`,description:r("blocklet.publish.deleteProject.description"),confirm:r("common.confirm"),onConfirm:I,onCancel:()=>x(null),children:t.jsx(u,{sx:{marginTop:2},children:[r("blocklet.publish.deleteProject.tip1"),r("blocklet.publish.deleteProject.tip2"),r("blocklet.publish.deleteProject.tip3")].map(g=>t.jsxs(u,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[t.jsx(gs,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),t.jsx(E,{component:"span",variant:"inherit",color:"text.secondary",children:g})]}))})}),S]})}Wt.propTypes={initUrl:d.object};Wt.defaultProps={initUrl:null};var Ut={},Xs=me;Object.defineProperty(Ut,"__esModule",{value:!0});var un=Ut.default=void 0,Js=Xs(xe()),wo=t;un=Ut.default=(0,Js.default)([(0,wo.jsx)("path",{d:"M20 17H4V5h8V3H4c-1.11 0-2 .89-2 2v12c0 1.1.89 2 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2v-3h-2z"},"0"),(0,wo.jsx)("path",{d:"m17 14 5-5-1.41-1.41L18 10.17V3h-2v7.17l-2.59-2.58L12 9z"},"1")],"InstallDesktop");function Qs(){var I;const{t:e,locale:o}=J(),{projectId:n}=lt(),{api:r}=be(),[s,l]=R.useState(!0),{blocklet:i}=De(),a=ze(y=>y.breakpoints.down("md")),[c,f]=R.useState(null),[h,x]=R.useState(null),[b,p]=R.useState(null),v=(I=window.env)==null?void 0:I.serverEndpoint,C=()=>{r.getReleases({input:{did:i.meta.did,projectId:n}}).then(y=>{const _=(y==null?void 0:y.releases)||[];l(!1),f(_)}).catch(y=>{l(!1),V.error(y.message)})},D=()=>{r.doBatchQuery({getProject:{input:{did:i.meta.did,projectId:n}},getReleases:{input:{did:i.meta.did,projectId:n}}}).then(y=>{x(y.getProject.project||{}),f(y.getReleases.releases||[]),l(!1)}).catch(y=>{l(!1),V.error(y.message)})};R.useEffect(()=>{D()},[]);const j=()=>{l(!1);const y=b.id;r.deleteRelease({input:{did:i.meta.did,projectId:n,releaseId:y}}).then(()=>{l(!1),C(),V.success(e("common.removeSuccess")),p(null)}).catch(_=>{l(!1),V.error(_.message)})},m=y=>{p(y)};if(!c&&s)return t.jsx(u,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:t.jsx(Ve,{})});if(!c)return null;const T=t.jsxs(Uo,{className:"breadcrumbs","aria-label":"breadcrumb",children:[t.jsx(le,{to:"..",children:e("common.blockletStudio")}),t.jsx(E,{color:"text.primary",children:t.jsx(fe,{maxLength:a?6:30,children:h.blockletTitle})})]});if(!c.length)return t.jsxs(t.Fragment,{children:[T,t.jsxs(u,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[t.jsx(u,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:e("blocklet.publish.releaseEmptyTip")}),t.jsx(u,{sx:{fontSize:14,color:"text.secondary",mb:3},children:e("blocklet.publish.createReleaseTip")}),t.jsx(le,{to:"create/none",children:t.jsx(ot,{variant:"contained",children:e("blocklet.publish.createRelease")})})]})]});const L=[{label:e("common.version"),name:"blockletVersion",minWidth:160,options:{customBodyRenderLite:y=>{const _=c[y];return t.jsx(le,{to:`view/${_.id}`,children:t.jsx(Vt,{did:i.meta.did,projectId:h.id,logo:_.blockletLogo,title:_.blockletVersion,describe:_.blockletTitle})})}}},{label:e("blocklet.publish.releaseNote"),name:"note",options:{customBodyRenderLite:y=>{const _=c[y];return t.jsx(E,{className:"note",children:_.note||""})}}},{label:e("common.status"),name:"status",options:{customBodyRender:y=>t.jsx(on,{type:y==="published"?"success":"warning",children:y==="published"?"Released":js(y)})}},{label:e("common.lastPublishedAt"),name:"updatedAt",options:{customBodyRenderLite:y=>{const _=c[y];return _.status!==re.PROJECT.RELEASE_STATUS.published?"":t.jsx(nn,{value:Number(_.updatedAt),locale:o})}}},{label:e("common.actions"),name:"actions",options:{customBodyRenderLite:y=>{var g;const _=c[y];let A="",W="";const k=_.status==="published";if(k){const P=ce(v,`/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/release/blocklet.json`),O=new URL(v);O.pathname=ce(O.pathname,"/launch-blocklet/agreement"),O.searchParams.set("blocklet_meta_url",P),A=O.href,W=ce(`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${i.meta.did}/${h.id}/${h.lastReleaseId}/download/${(h.lastReleaseFiles||[])[0]}`)}const S=(g=h.blockletComponents)!=null&&g.some(P=>P.included)||_.uploadedResource?"pack":"resource";return t.jsxs(u,{display:"flex",alignItems:"center",children:[k&&S==="pack"&&t.jsx(ue,{title:e("blocklet.publish.install",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"secondary","aria-label":"create",children:t.jsx("a",{style:{display:"flex"},href:A,target:"_blank",rel:"noreferrer",children:t.jsx(un,{sx:{fontSize:18}})})})}),k&&t.jsx(ue,{title:e("blocklet.publish.download",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"download",children:t.jsx("a",{style:{display:"flex"},href:W,children:t.jsx(ks,{sx:{fontSize:18}})})})}),t.jsx(ue,{title:e("blocklet.publish.delete",{name:h.blockletTitle}),placement:"top",children:t.jsx(oe,{color:"primary","aria-label":"delete",onClick:()=>m(_),children:t.jsx(sn,{sx:{fontSize:18}})})})]})}}}];return t.jsxs(Ys,{children:[t.jsxs(u,{className:"header",children:[T,t.jsx(le,{to:"new-release/none",children:t.jsxs(ot,{variant:"contained",children:[t.jsx(qt,{style:{fontSize:"1.3em",marginRight:4}}),e("blocklet.publish.createRelease")]})})]}),t.jsx(Pt,{className:"main-table",verticalKeyWidth:100,locale:o,data:c,columns:L,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),b&&t.jsx($t,{title:e(`${e("common.delete")} ${b.blockletVersion}`),description:e("blocklet.publish.deleteReleaseTip"),confirm:e("common.confirm"),onConfirm:j,onCancel:()=>p(null)})]})}const Ys=ae(u)`
3
3
  .header {
4
4
  display: flex;
5
5
  align-items: center;
@@ -129,7 +129,7 @@ import{r as R,k as Dt,l as lt,L as le,f as Hn,h as Gn,i as pt}from"./vendor-reac
129
129
  background: #fff;
130
130
  z-index: 10;
131
131
  }
132
- `;var Yt={},cr=me;Object.defineProperty(Yt,"__esModule",{value:!0});var kt=Yt.default=void 0,ar=cr(xe()),dr=t;kt=Yt.default=(0,ar.default)((0,dr.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator");const Co="lastWantToConnectStoreId";function ur(e){var a,c;const[o,n]=R.useState(null),{session:r}=ct(),s=R.useCallback(f=>{n(f),localStorage.setItem(Co,f==null?void 0:f.id)},[n]),l=R.useMemo(()=>{var b,p,v,C;const f=localStorage.getItem(Co),h=f?(((b=e==null?void 0:e.settings)==null?void 0:b.storeList)||[]).find(D=>D.id===f):null;if(h)return h;let x=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(D=>{var j;return!(D.id!==H.BLOCKLET_STORE.id||D.scope&&D.scope!=="studio"&&D.scope!==((j=r==null?void 0:r.user)==null?void 0:j.did))});return x||(x=(C=(v=e==null?void 0:e.settings)==null?void 0:v.storeList)==null?void 0:C[0]),x},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(c=r==null?void 0:r.user)==null?void 0:c.did]);return[o||l||{},s]}const bt={};async function fn(e,{interval:o=1e3,maxDuration:n=120*1e3,intervalFirst:r=4e3,timerKey:s=""}){bt[s]&&clearTimeout(bt[s]),await new Promise(a=>setTimeout(a,r));const l=Date.now(),i=async(a,c)=>{try{const f=await e();a(f)}catch(f){Date.now()-l>n?c(f):s?bt[s]=setTimeout(()=>i(a,c),o):setTimeout(()=>i(a,c),o)}};return new Promise(i)}function pr(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function fr(e,{did:o,projectId:n,messageId:r}){return fn(async()=>{var l;const s=await e.getProject({input:{did:o,projectId:n,messageId:r}});if(!((l=s==null?void 0:s.project)!=null&&l.blockletDid))throw new Error("Connected store not found");return s.project.blockletDid},{timerKey:"connect-studio"})}function hr(e,{did:o,projectId:n,storeId:r}){return fn(async()=>{var i,a;const s=await e.getProject({input:{did:o,projectId:n,messageId:""}});if(!((a=(i=s==null?void 0:s.project)==null?void 0:i.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!s.project.connectedStores.find(c=>c.storeId===r))throw new Error("Connected store not found")},{timerKey:`connect-store-${r}`})}const hn=({fromBlocklet:e,nodeInfo:o,blocklet:n,userDid:r})=>{var i,a;const s=e?(i=n==null?void 0:n.meta)==null?void 0:i.did:o==null?void 0:o.did;let l=e?((a=n==null?void 0:n.settings)==null?void 0:a.storeList)||[]:(o==null?void 0:o.blockletRegistryList)||[];return Array.isArray(l)||(l=[]),l=l.filter(c=>c.protected||!c.scope||c.scope==="studio"||c.scope===r),{teamDid:s,storeList:l}};function Zt({blocklet:e,store:o={},onChangeStore:n,onClick:r,disabled:s,loading:l,componentDid:i}){var g,P,O;const{t:a}=J(),{session:c}=ct(),{api:f,info:h,inService:x}=be(),b=De(),[p,v]=R.useState(!1),C=R.useRef(null),[D,j]=R.useState(!1),[m,T]=R.useState(null),L=F=>{n(F),v(!1)},I=()=>{v(!p)},y=F=>{C.current&&C.current.contains(F.target)||v(!1)},_=()=>{j(!0)},A=()=>{j(!1)},W=async()=>{var F;if(m)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:m.url,projectId:"",scope:m.scope||"studio"}}),await((F=b==null?void 0:b.actions)==null?void 0:F.refreshBlocklet())}catch(w){V.error(`Remove Blocklet Store Error: ${Re(w)}`)}finally{T(null)}},{storeList:k}=hn({fromBlocklet:x,blocklet:e,nodeInfo:h,componentDid:i,userDid:(g=c==null?void 0:c.user)==null?void 0:g.did}),S=(P=e==null?void 0:e.meta)==null?void 0:P.did;return t.jsxs(t.Fragment,{children:[t.jsxs(jt,{disabled:s,ref:C,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[t.jsxs(Q,{onClick:r,children:[l&&t.jsx(et,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${o.name||""}`]}),t.jsx(Q,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:I,children:t.jsx(qs,{})})]}),t.jsx(Ho,{sx:{zIndex:10},open:p,anchorEl:C.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:F})=>t.jsx(Go,{...F,style:{transformOrigin:"center top"},children:t.jsx(Tt,{children:t.jsx(Xo,{onClickAway:y,children:t.jsxs(Jo,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[k==null?void 0:k.map(w=>{var $;return t.jsxs(pe,{selected:w.id===(o==null?void 0:o.id),sx:{height:56},onClick:()=>L(w),children:[t.jsxs(u,{children:[t.jsx(fe,{sx:{fontSize:"16px"},maxLength:24,children:w.name}),t.jsx(fe,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:w.url})]}),Rs({store:w,userDid:($=c==null?void 0:c.user)==null?void 0:$.did})&&t.jsx(oe,{sx:{ml:1},onClick:q=>{q.preventDefault(),q.stopPropagation(),T(w)},children:t.jsx(se,{icon:"ic:outline-delete"})})]},w.url)}),t.jsx(Jn,{}),t.jsxs(pe,{onClick:_,children:[t.jsx(qt,{font:!0}),t.jsx(E,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),D&&t.jsx(rn,{hiddenChildren:!0,open:!0,onClose:A,teamDid:S,storeList:k,scope:"studio",onAdd:(O=b==null?void 0:b.actions)==null?void 0:O.refreshBlocklet}),m&&t.jsx($t,{displayError:!0,title:`${a("common.delete")} ${m.name}`,description:a("blocklet.publish.deleteStoreTip",{name:m.name}),confirm:a("common.confirm"),onConfirm:W,onCancel:()=>T(null)})]})}Zt.propTypes={store:d.object,blocklet:d.object,onChangeStore:d.func.isRequired,onClick:d.func.isRequired,loading:d.bool.isRequired,disabled:d.bool.isRequired,componentDid:d.string.isRequired,projectType:d.string.isRequired,getData:d.func.isRequired};Zt.defaultProps={store:null,blocklet:null};var he=R;const Ae=/^[a-z0-9]+(-[a-z0-9]+)*$/,at=(e,o,n,r="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;r=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const a=s.pop(),c=s.pop(),f={provider:s.length>0?s[0]:r,prefix:c,name:a};return o&&!Ze(f)?null:f}const l=s[0],i=l.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return o&&!Ze(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:l};return o&&!Ze(a,n)?null:a}return null},Ze=(e,o)=>e?!!((e.provider===""||e.provider.match(Ae))&&(o&&e.prefix===""||e.prefix.match(Ae))&&e.name.match(Ae)):!1,mn=Object.freeze({left:0,top:0,width:16,height:16}),st=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Kt=Object.freeze({...mn,...st}),yt=Object.freeze({...Kt,body:"",hidden:!1});function mr(e,o){const n={};!e.hFlip!=!o.hFlip&&(n.hFlip=!0),!e.vFlip!=!o.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(o.rotate||0))%4;return r&&(n.rotate=r),n}function So(e,o){const n=mr(e,o);for(const r in yt)r in st?r in e&&!(r in n)&&(n[r]=st[r]):r in o?n[r]=o[r]:r in e&&(n[r]=e[r]);return n}function br(e,o){const n=e.icons,r=e.aliases||Object.create(null),s=Object.create(null);function l(i){if(n[i])return s[i]=[];if(!(i in s)){s[i]=null;const a=r[i]&&r[i].parent,c=a&&l(a);c&&(s[i]=[a].concat(c))}return s[i]}return Object.keys(n).concat(Object.keys(r)).forEach(l),s}function xr(e,o,n){const r=e.icons,s=e.aliases||Object.create(null);let l={};function i(a){l=So(r[a]||s[a],l)}return i(o),n.forEach(i),So(e,l)}function bn(e,o){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{o(s,null),n.push(s)});const r=br(e);for(const s in r){const l=r[s];l&&(o(s,xr(e,s,l)),n.push(s))}return n}const gr={provider:"",aliases:{},not_found:{},...mn};function xt(e,o){for(const n in o)if(n in e&&typeof e[n]!=typeof o[n])return!1;return!0}function xn(e){if(typeof e!="object"||e===null)return null;const o=e;if(typeof o.prefix!="string"||!e.icons||typeof e.icons!="object"||!xt(e,gr))return null;const n=o.icons;for(const s in n){const l=n[s];if(!s.match(Ae)||typeof l.body!="string"||!xt(l,yt))return null}const r=o.aliases||Object.create(null);for(const s in r){const l=r[s],i=l.parent;if(!s.match(Ae)||typeof i!="string"||!n[i]&&!r[i]||!xt(l,yt))return null}return o}const Ro=Object.create(null);function jr(e,o){return{provider:e,prefix:o,icons:Object.create(null),missing:new Set}}function ve(e,o){const n=Ro[e]||(Ro[e]=Object.create(null));return n[o]||(n[o]=jr(e,o))}function eo(e,o){return xn(o)?bn(o,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function kr(e,o,n){try{if(typeof n.body=="string")return e.icons[o]={...n},!0}catch{}return!1}let Me=!1;function gn(e){return typeof e=="boolean"&&(Me=e),Me}function yr(e){const o=typeof e=="string"?at(e,!0,Me):e;if(o){const n=ve(o.provider,o.prefix),r=o.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function vr(e,o){const n=at(e,!0,Me);if(!n)return!1;const r=ve(n.provider,n.prefix);return kr(r,n.name,o)}function wr(e,o){if(typeof e!="object")return!1;if(typeof o!="string"&&(o=e.provider||""),Me&&!o&&!e.prefix){let s=!1;return xn(e)&&(e.prefix="",bn(e,(l,i)=>{i&&vr(l,i)&&(s=!0)})),s}const n=e.prefix;if(!Ze({provider:o,prefix:n,name:"a"}))return!1;const r=ve(o,n);return!!eo(r,e)}const jn=Object.freeze({width:null,height:null}),kn=Object.freeze({...jn,...st}),Cr=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Sr=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Io(e,o,n){if(o===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*o*n)/n;if(typeof e!="string")return e;const r=e.split(Cr);if(r===null||!r.length)return e;const s=[];let l=r.shift(),i=Sr.test(l);for(;;){if(i){const a=parseFloat(l);isNaN(a)?s.push(l):s.push(Math.ceil(a*o*n)/n)}else s.push(l);if(l=r.shift(),l===void 0)return s.join("");i=!i}}const Rr=e=>e==="unset"||e==="undefined"||e==="none";function Ir(e,o){const n={...Kt,...e},r={...kn,...o},s={left:n.left,top:n.top,width:n.width,height:n.height};let l=n.body;[n,r].forEach(v=>{const C=[],D=v.hFlip,j=v.vFlip;let m=v.rotate;D?j?m+=2:(C.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),C.push("scale(-1 1)"),s.top=s.left=0):j&&(C.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),C.push("scale(1 -1)"),s.top=s.left=0);let T;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:T=s.height/2+s.top,C.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:C.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,C.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}m%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),C.length&&(l='<g transform="'+C.join(" ")+'">'+l+"</g>")});const i=r.width,a=r.height,c=s.width,f=s.height;let h,x;i===null?(x=a===null?"1em":a==="auto"?f:a,h=Io(x,c/f)):(h=i==="auto"?c:i,x=a===null?Io(h,f/c):a==="auto"?f:a);const b={},p=(v,C)=>{Rr(C)||(b[v]=C.toString())};return p("width",h),p("height",x),b.viewBox=s.left.toString()+" "+s.top.toString()+" "+c.toString()+" "+f.toString(),{attributes:b,body:l}}const Dr=/\sid="(\S+)"/g,Tr="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let _r=0;function Pr(e,o=Tr){const n=[];let r;for(;r=Dr.exec(e);)n.push(r[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(l=>{const i=typeof o=="function"?o(l):o+(_r++).toString(),a=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+i+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const vt=Object.create(null);function Lr(e,o){vt[e]=o}function wt(e){return vt[e]||vt[""]}function to(e){let o;if(typeof e.resources=="string")o=[e.resources];else if(o=e.resources,!(o instanceof Array)||!o.length)return null;return{resources:o,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 oo=Object.create(null),Ne=["https://api.simplesvg.com","https://api.unisvg.com"],Ke=[];for(;Ne.length>0;)Ne.length===1||Math.random()>.5?Ke.push(Ne.shift()):Ke.push(Ne.pop());oo[""]=to({resources:["https://api.iconify.design"].concat(Ke)});function qr(e,o){const n=to(o);return n===null?!1:(oo[e]=n,!0)}function no(e){return oo[e]}const $r=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Do=$r();function Nr(e,o){const n=no(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let s=0;n.resources.forEach(i=>{s=Math.max(s,i.length)});const l=o+".json?icons=";r=n.maxURL-s-n.path.length-l.length}return r}function Ar(e){return e===404}const Er=(e,o,n)=>{const r=[],s=Nr(e,o),l="icons";let i={type:l,provider:e,prefix:o,icons:[]},a=0;return n.forEach((c,f)=>{a+=c.length+1,a>=s&&f>0&&(r.push(i),i={type:l,provider:e,prefix:o,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Mr(e){if(typeof e=="string"){const o=no(e);if(o)return o.path}return"/"}const Or=(e,o,n)=>{if(!Do){n("abort",424);return}let r=Mr(o.provider);switch(o.type){case"icons":{const l=o.prefix,a=o.icons.join(","),c=new URLSearchParams({icons:a});r+=l+".json?"+c.toString();break}case"custom":{const l=o.uri;r+=l.slice(0,1)==="/"?l.slice(1):l;break}default:n("abort",400);return}let s=503;Do(e+r).then(l=>{const i=l.status;if(i!==200){setTimeout(()=>{n(Ar(i)?"abort":"next",i)});return}return s=501,l.json()}).then(l=>{if(typeof l!="object"||l===null){setTimeout(()=>{l===404?n("abort",l):n("next",s)});return}setTimeout(()=>{n("success",l)})}).catch(()=>{n("next",s)})},zr={prepare:Er,send:Or};function Br(e){const o={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,l)=>s.provider!==l.provider?s.provider.localeCompare(l.provider):s.prefix!==l.prefix?s.prefix.localeCompare(l.prefix):s.name.localeCompare(l.name));let r={provider:"",prefix:"",name:""};return e.forEach(s=>{if(r.name===s.name&&r.prefix===s.prefix&&r.provider===s.provider)return;r=s;const l=s.provider,i=s.prefix,a=s.name,c=n[l]||(n[l]=Object.create(null)),f=c[i]||(c[i]=ve(l,i));let h;a in f.icons?h=o.loaded:i===""||f.missing.has(a)?h=o.missing:h=o.pending;const x={provider:l,prefix:i,name:a};h.push(x)}),o}function yn(e,o){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(s=>s.id!==o))})}function Vr(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const o=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!o.length)return;let n=!1;const r=e.provider,s=e.prefix;o.forEach(l=>{const i=l.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==s)return!0;const f=c.name;if(e.icons[f])i.loaded.push({provider:r,prefix:s,name:f});else if(e.missing.has(f))i.missing.push({provider:r,prefix:s,name:f});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||yn([e],l.id),l.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),l.abort))})}))}let Wr=0;function Ur(e,o,n){const r=Wr++,s=yn.bind(null,n,r);if(!o.pending.length)return s;const l={id:r,icons:o,callback:e,abort:s};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(l)}),s}function Fr(e,o=!0,n=!1){const r=[];return e.forEach(s=>{const l=typeof s=="string"?at(s,o,n):s;l&&r.push(l)}),r}var Hr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Gr(e,o,n,r){const s=e.resources.length,l=e.random?Math.floor(Math.random()*s):e.index;let i;if(e.random){let y=e.resources.slice(0);for(i=[];y.length>1;){const _=Math.floor(Math.random()*y.length);i.push(y[_]),y=y.slice(0,_).concat(y.slice(_+1))}i=i.concat(y)}else i=e.resources.slice(l).concat(e.resources.slice(0,l));const a=Date.now();let c="pending",f=0,h,x=null,b=[],p=[];typeof r=="function"&&p.push(r);function v(){x&&(clearTimeout(x),x=null)}function C(){c==="pending"&&(c="aborted"),v(),b.forEach(y=>{y.status==="pending"&&(y.status="aborted")}),b=[]}function D(y,_){_&&(p=[]),typeof y=="function"&&p.push(y)}function j(){return{startTime:a,payload:o,status:c,queriesSent:f,queriesPending:b.length,subscribe:D,abort:C}}function m(){c="failed",p.forEach(y=>{y(void 0,h)})}function T(){b.forEach(y=>{y.status==="pending"&&(y.status="aborted")}),b=[]}function L(y,_,A){const W=_!=="success";switch(b=b.filter(k=>k!==y),c){case"pending":break;case"failed":if(W||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){h=A,m();return}if(W){h=A,b.length||(i.length?I():m());return}if(v(),T(),!e.random){const k=e.resources.indexOf(y.resource);k!==-1&&k!==e.index&&(e.index=k)}c="completed",p.forEach(k=>{k(A)})}function I(){if(c!=="pending")return;v();const y=i.shift();if(y===void 0){if(b.length){x=setTimeout(()=>{v(),c==="pending"&&(T(),m())},e.timeout);return}m();return}const _={status:"pending",resource:y,callback:(A,W)=>{L(_,A,W)}};b.push(_),f++,x=setTimeout(I,e.rotate),n(y,o,_.callback)}return setTimeout(I),j}function vn(e){const o={...Hr,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function s(a,c,f){const h=Gr(o,a,c,(x,b)=>{r(),f&&f(x,b)});return n.push(h),h}function l(a){return n.find(c=>a(c))||null}return{query:s,find:l,setIndex:a=>{o.index=a},getIndex:()=>o.index,cleanup:r}}function To(){}const gt=Object.create(null);function Xr(e){if(!gt[e]){const o=no(e);if(!o)return;const n=vn(o),r={config:o,redundancy:n};gt[e]=r}return gt[e]}function Jr(e,o,n){let r,s;if(typeof e=="string"){const l=wt(e);if(!l)return n(void 0,424),To;s=l.send;const i=Xr(e);i&&(r=i.redundancy)}else{const l=to(e);if(l){r=vn(l);const i=e.resources?e.resources[0]:"",a=wt(i);a&&(s=a.send)}}return!r||!s?(n(void 0,424),To):r.query(o,s,n)().abort}const _o="iconify2",Oe="iconify",wn=Oe+"-count",Po=Oe+"-version",Cn=36e5,Qr=168;function Ct(e,o){try{return e.getItem(o)}catch{}}function so(e,o,n){try{return e.setItem(o,n),!0}catch{}}function Lo(e,o){try{e.removeItem(o)}catch{}}function St(e,o){return so(e,wn,o.toString())}function Rt(e){return parseInt(Ct(e,wn))||0}const dt={local:!0,session:!0},Sn={local:new Set,session:new Set};let ro=!1;function Yr(e){ro=e}let He=typeof window>"u"?{}:window;function Rn(e){const o=e+"Storage";try{if(He&&He[o]&&typeof He[o].length=="number")return He[o]}catch{}dt[e]=!1}function In(e,o){const n=Rn(e);if(!n)return;const r=Ct(n,Po);if(r!==_o){if(r){const a=Rt(n);for(let c=0;c<a;c++)Lo(n,Oe+c.toString())}so(n,Po,_o),St(n,0);return}const s=Math.floor(Date.now()/Cn)-Qr,l=a=>{const c=Oe+a.toString(),f=Ct(n,c);if(typeof f=="string"){try{const h=JSON.parse(f);if(typeof h=="object"&&typeof h.cached=="number"&&h.cached>s&&typeof h.provider=="string"&&typeof h.data=="object"&&typeof h.data.prefix=="string"&&o(h,a))return!0}catch{}Lo(n,c)}};let i=Rt(n);for(let a=i-1;a>=0;a--)l(a)||(a===i-1?(i--,St(n,i)):Sn[e].add(a))}function Dn(){if(!ro){Yr(!0);for(const e in dt)In(e,o=>{const n=o.data,r=o.provider,s=n.prefix,l=ve(r,s);if(!eo(l,n).length)return!1;const i=n.lastModified||-1;return l.lastModifiedCached=l.lastModifiedCached?Math.min(l.lastModifiedCached,i):i,!0})}}function Zr(e,o){const n=e.lastModifiedCached;if(n&&n>=o)return n===o;if(e.lastModifiedCached=o,n)for(const r in dt)In(r,s=>{const l=s.data;return s.provider!==e.provider||l.prefix!==e.prefix||l.lastModified===o});return!0}function Kr(e,o){ro||Dn();function n(r){let s;if(!dt[r]||!(s=Rn(r)))return;const l=Sn[r];let i;if(l.size)l.delete(i=Array.from(l).shift());else if(i=Rt(s),!St(s,i+1))return;const a={cached:Math.floor(Date.now()/Cn),provider:e.provider,data:o};return so(s,Oe+i.toString(),JSON.stringify(a))}o.lastModified&&!Zr(e,o.lastModified)||Object.keys(o.icons).length&&(o.not_found&&(o=Object.assign({},o),delete o.not_found),n("local")||n("session"))}function qo(){}function ei(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Vr(e)}))}function ti(e,o){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(o).sort():e.iconsToLoad=o,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,s=e.iconsToLoad;delete e.iconsToLoad;let l;if(!s||!(l=wt(n)))return;l.prepare(n,r,s).forEach(a=>{Jr(n,a,c=>{if(typeof c!="object")a.icons.forEach(f=>{e.missing.add(f)});else try{const f=eo(e,c);if(!f.length)return;const h=e.pendingIcons;h&&f.forEach(x=>{h.delete(x)}),Kr(e,c)}catch(f){console.error(f)}ei(e)})})}))}const oi=(e,o)=>{const n=Fr(e,!0,gn()),r=Br(n);if(!r.pending.length){let c=!0;return o&&setTimeout(()=>{c&&o(r.loaded,r.missing,r.pending,qo)}),()=>{c=!1}}const s=Object.create(null),l=[];let i,a;return r.pending.forEach(c=>{const{provider:f,prefix:h}=c;if(h===a&&f===i)return;i=f,a=h,l.push(ve(f,h));const x=s[f]||(s[f]=Object.create(null));x[h]||(x[h]=[])}),r.pending.forEach(c=>{const{provider:f,prefix:h,name:x}=c,b=ve(f,h),p=b.pendingIcons||(b.pendingIcons=new Set);p.has(x)||(p.add(x),s[f][h].push(x))}),l.forEach(c=>{const{provider:f,prefix:h}=c;s[f][h].length&&ti(c,s[f][h])}),o?Ur(o,r,l):qo};function ni(e,o){const n={...e};for(const r in o){const s=o[r],l=typeof s;r in jn?(s===null||s&&(l==="string"||l==="number"))&&(n[r]=s):l===typeof n[r]&&(n[r]=r==="rotate"?s%4:s)}return n}const si=/[\s,]+/;function ri(e,o){o.split(si).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function ii(e,o=0){const n=e.replace(/^-?[0-9.]*/,"");function r(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:r(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let l=parseFloat(e.slice(0,e.length-n.length));return isNaN(l)?0:(l=l/s,l%1===0?r(l):0)}}return o}function li(e,o){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in o)n+=" "+r+'="'+o[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function ci(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ai(e){return"data:image/svg+xml,"+ci(e)}function di(e){return'url("'+ai(e)+'")'}let Ee;function ui(){try{Ee=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ee=null}}function pi(e){return Ee===void 0&&ui(),Ee?Ee.createHTML(e):e}const Tn={...kn,inline:!1},fi={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},hi={display:"inline-block"},It={backgroundColor:"currentColor"},_n={backgroundColor:"transparent"},$o={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},No={WebkitMask:It,mask:It,background:_n};for(const e in No){const o=No[e];for(const n in $o)o[e+n]=$o[n]}const mi={...Tn,inline:!0};function Ao(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const bi=(e,o,n,r)=>{const s=n?mi:Tn,l=ni(s,o),i=o.mode||"svg",a={},c=o.style||{},f={...i==="svg"?fi:{},ref:r};for(let j in o){const m=o[j];if(m!==void 0)switch(j){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":l[j]=m===!0||m==="true"||m===1;break;case"flip":typeof m=="string"&&ri(l,m);break;case"color":a.color=m;break;case"rotate":typeof m=="string"?l[j]=ii(m):typeof m=="number"&&(l[j]=m);break;case"ariaHidden":case"aria-hidden":m!==!0&&m!=="true"&&delete f["aria-hidden"];break;default:s[j]===void 0&&(f[j]=m)}}const h=Ir(e,l),x=h.attributes;if(l.inline&&(a.verticalAlign="-0.125em"),i==="svg"){f.style={...a,...c},Object.assign(f,x);let j=0,m=o.id;return typeof m=="string"&&(m=m.replace(/-/g,"_")),f.dangerouslySetInnerHTML={__html:pi(Pr(h.body,m?()=>m+"ID"+j++:"iconifyReact"))},he.createElement("svg",f)}const{body:b,width:p,height:v}=e,C=i==="mask"||(i==="bg"?!1:b.indexOf("currentColor")!==-1),D=li(b,{...x,width:p+"",height:v+""});return f.style={...a,"--svg":di(D),width:Ao(x.width),height:Ao(x.height),...hi,...C?It:_n,...c},he.createElement("span",f)};gn(!0);Lr("",zr);if(typeof document<"u"&&typeof window<"u"){Dn();const e=window;if(e.IconifyPreload!==void 0){const o=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof o=="object"&&o!==null&&(o instanceof Array?o:[o]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!wr(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const o=e.IconifyProviders;if(typeof o=="object"&&o!==null)for(let n in o){const r="IconifyProviders["+n+"] is invalid.";try{const s=o[n];if(typeof s!="object"||!s||s.resources===void 0)continue;qr(n,s)||console.error(r)}catch{console.error(r)}}}}class Pn extends he.Component{constructor(o){super(o),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(o){this.state.icon!==o&&this.setState({icon:o})}_checkIcon(o){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(o||n.icon===null)&&this._setData({data:r});return}let s;if(typeof r!="string"||(s=at(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const l=yr(s);if(!l){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),l!==null&&(this._loading={name:r,abort:oi([s],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const i=["iconify"];s.prefix!==""&&i.push("iconify--"+s.prefix),s.provider!==""&&i.push("iconify--"+s.provider),this._setData({data:l,classes:i}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(o){o.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const o=this.props,n=this.state.icon;if(n===null)return o.children?o.children:he.createElement("span",{});let r=o;return n.classes&&(r={...o,className:(typeof o.className=="string"?o.className+" ":"")+n.classes.join(" ")}),bi({...Kt,...n.data},r,o._inline,o._ref)}}const xi=he.forwardRef(function(o,n){const r={...o,_ref:n,_inline:!1};return he.createElement(Pn,r)});he.forwardRef(function(o,n){const r={...o,_ref:n,_inline:!0};return he.createElement(Pn,r)});var gi=xi;const ji=e=>{const o=e.includes("youtube.com")||e.includes("youtu.be"),n=e.includes("vimeo.com");return o||n};function ut({url:e,style:o,controls:n,modestbranding:r}){var a;const{t:s}=J(),l=e.includes("youtube.com")||e.includes("youtu.be"),i=e.includes("vimeo.com");if(l){const c=((a=e.split("v=")[1])==null?void 0:a.split("&")[0])||e.split("/").pop();return t.jsx("div",{style:{position:"relative",width:"100%",paddingTop:"56.25%",pointerEvents:(o==null?void 0:o.pointerEvents)||"auto"},children:t.jsx("iframe",{src:`https://www.youtube.com/embed/${c}?modestbranding=${r}&controls=${n}&rel=0`,title:"YouTube video player",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",...o},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})}if(i){const c=e.split("/").pop();return t.jsx("div",{style:{position:"relative",width:"100%",paddingTop:"56.25%",pointerEvents:o.pointerEvents||"auto"},children:t.jsx("iframe",{src:`https://player.vimeo.com/video/${c}`,title:"Vimeo video player",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",...o},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0})})}return t.jsx(u,{style:{position:"relative",width:"100%",paddingTop:"56.25%"},children:t.jsxs(u,{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",backgroundColor:"rgba(0, 0, 0, 0.04)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...o},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,children:[t.jsx(gi,{icon:"carbon:video-off",style:{fontSize:40,marginBottom:"10px",opacity:.5}}),t.jsx(E,{variant:"body1",sx:{opacity:.5},children:s("studio.videoDialogNoSrc")})]})})}ut.propTypes={url:d.string.isRequired,style:d.object,controls:d.number,modestbranding:d.number};ut.defaultProps={style:{},controls:1,modestbranding:1};function Ln({setParams:e,onClose:o,params:n}){const{t:r}=J(),[s,l]=R.useState(""),i=s&&n.blockletVideos.includes(s),a=ji(s),c=()=>{e(f=>{const h=[...f.blockletVideos];return h.push(s),{...f,blockletVideos:h}}),o()};return t.jsxs(_t,{open:!0,fullWidth:!0,maxWidth:"sm",children:[t.jsx(Qo,{children:r("studio.videoDialogTitle")}),t.jsxs(Yo,{children:[t.jsx(Qn,{fullWidth:!0,value:s,onChange:f=>l(f.target.value),placeholder:r("studio.videoInputLabel"),endAdornment:s?t.jsx(Be,{position:"end",children:t.jsx(oe,{onClick:()=>l(""),children:t.jsx(ms,{})})}):null,error:i}),i&&t.jsx(E,{variant:"body2",color:"error",children:r("studio.duplicateVideo")}),t.jsx(ut,{url:s,style:{marginTop:"20px",borderRadius:"4px"}})]}),t.jsxs(Zo,{children:[t.jsx(Q,{onClick:()=>o(),children:r("studio.cancel")}),t.jsx(Q,{disabled:!a||i,onClick:c,children:r("studio.confirm")})]})]})}Ln.propTypes={onClose:d.func.isRequired,params:d.object.isRequired,setParams:d.func.isRequired};const Eo=R.lazy(()=>tn(()=>import("./index-BJpEKQ4d.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.Uploader})));function qn({projectId:e,readOnly:o,loading:n,blocklet:r,params:s,setParams:l,paramsErrTip:i,setParamsErrTip:a,setLoading:c,initUrl:f,initLogoUrl:h,setInitLogoUrl:x,componentDid:b}){const{t:p}=J(),{api:v}=be(),C=Dt(),D=R.useRef(null),j=R.useRef(null),[m,T]=ur(r),[L,I]=R.useState(!1),y=Is({messageType:"connect-store-message",onOpen:()=>c(!0),onClose:()=>c(!1)}),_=async w=>{const $=setTimeout(()=>{c(!1)},2e4),q=await fr(v,w);c(!1),clearTimeout($),window.parent.postMessage({event:"studioDialog.connected",componentDid:b},"*"),C(window.location.pathname.replace(`${H.UNOWNED_DID}/create`,`${q}/create`),{replace:!0})},A=()=>{if(!s.blockletTitle){V.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(m!=null&&m.url)){V.error(p("blocklet.publish.noStoreSelected"));return}const w=pr();y(async($,q)=>{var U,G,ee;try{const X=await v.connectByStudio({input:{did:(U=r==null?void 0:r.meta)==null?void 0:U.did,blockletTitle:s==null?void 0:s.blockletTitle,storeUrl:m.url,storeId:m.id,storeName:m.name,type:((G=s==null?void 0:s.blockletComponents)==null?void 0:G.length)>0?"pack":"resource",componentDid:b,messageId:w,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(X!=null&&X.url)){V.error("failed to connect to store");return}q(X.url),_({did:(ee=r==null?void 0:r.meta)==null?void 0:ee.did,projectId:"",messageId:w})}catch(X){const ne=Re(X);V.error(ne),c(!1)}})},W=`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${r.meta.did}/${e}/logo/upload`,k=`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${r.meta.did}/${e}/screenshot/upload`,S=s!=null&&s.blockletLogo?`${W}/${s.blockletLogo}`:`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,g=((s==null?void 0:s.blockletScreenshots)||[]).filter(Boolean).map(w=>`${k}/${w}`),P=()=>o?!1:!e||e===H.UNOWNED_DID?(V.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0,O=w=>{if(!w.destination)return;const $=Array.from(s.blockletScreenshots),[q]=$.splice(w.source.index,1);$.splice(w.destination.index,0,q),l(U=>({...U,blockletScreenshots:$}))},F=w=>{if(!w.destination)return;const $=Array.from(s.blockletVideos),[q]=$.splice(w.source.index,1);$.splice(w.destination.index,0,q),l(U=>({...U,blockletVideos:$}))};return t.jsxs(ki,{children:[t.jsx(u,{display:"flex",className:"section",children:t.jsxs(u,{sx:{flex:1},children:[t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:s.blockletTitle||"",onChange:w=>{a({blockletTitle:""}),l({blockletTitle:w.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),t.jsx(Y,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===H.UNOWNED_DID&&t.jsx(Be,{position:"end",children:t.jsx(Zt,{blocklet:r,store:m,componentDid:b,onChangeStore:T,disabled:!s.blockletTitle||o||n,loading:n,onClick:A})})},error:!!i.projectId,helperText:i.projectId||"",value:e===H.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:o},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletDescription||"",onChange:w=>{a({blockletDescription:""}),l({blockletDescription:w.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.homepageTip")}`,placeholder:`Blocklet ${p("common.homepageTip")}`,InputProps:{"data-cy":"blocklet-homepage",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletHomepage||"",onChange:w=>{w.target.value&&!/^(http|https):\/\//.test(w.target.value)?a({blockletHomepage:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletHomepage:""}),l({blockletHomepage:w.target.value})},error:!!i.blockletHomepage,helperText:i.blockletHomepage||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.community")}`,placeholder:`Blocklet ${p("common.community")}`,InputProps:{"data-cy":"blocklet-community",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletCommunity||"",onChange:w=>{w.target.value&&!/^(http|https):\/\//.test(w.target.value)?a({blockletCommunity:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletCommunity:""}),l({blockletCommunity:w.target.value})},error:!!i.blockletCommunity,helperText:i.blockletCommunity||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.support")}`,placeholder:`Blocklet ${p("common.support")}`,InputProps:{"data-cy":"blocklet-support",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletSupport||"",onChange:w=>{w.target.value&&!/^(http|https):\/\//.test(w.target.value)&&!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(w.target.value)?a({blockletSupport:p("blocklet.publish.errorTip.invalidUrlOrEmail")}):a({blockletSupport:""}),l({blockletSupport:w.target.value})},error:!!i.blockletSupport,helperText:i.blockletSupport||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.repository")}`,placeholder:`Blocklet ${p("common.repository")}`,InputProps:{"data-cy":"blocklet-repository",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletRepository||"",onChange:w=>{w.target.value&&!/^(git|https|svn)/.test(w.target.value)?a({blockletRepository:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletRepository:""}),l({blockletRepository:w.target.value})},error:!!i.blockletRepository,helperText:i.blockletRepository||"",sx:{mt:3}})]})}),t.jsx(u,{display:"flex",mt:3,className:"section full-width",children:t.jsxs(u,{sx:{flex:1},children:[t.jsxs(u,{display:"flex",flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(ke,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(E,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.logo")}),t.jsxs(ke,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.type"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"png, jpg, webp, svg"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"256x256"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"<500Kb"})]})})]})]}),t.jsx(u,{sx:{flex:1,cursor:o?"default":"pointer",display:"flex",alignItems:"flex-end"},children:t.jsx(Wo,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:h||S,onClick:()=>{var w;P()&&((w=D.current)==null||w.open())}})})]}),t.jsxs(u,{display:"flex",mt:3,flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(ke,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(E,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.screenshot")}),t.jsxs(ke,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{sx:{border:"none"},variant:"outlined",size:"small",children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"16 / 9"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"1~5"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"<5MB"})]})}),!o&&t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]})})]})]}),t.jsx(go,{onDragEnd:o?void 0:O,children:t.jsx(jo,{droppableId:"screenshots",direction:"horizontal",isDropDisabled:o,children:(w,$)=>t.jsxs(u,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:$.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:$.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:w.innerRef,...w.droppableProps,children:[g.map((q,U)=>t.jsx(ko,{draggableId:q,index:U,isDragDisabled:o,children:(G,ee)=>t.jsxs(u,{ref:G.innerRef,...G.draggableProps,className:"screenshot",sx:{transform:ee.isDragging?"scale(1.05)":"none",boxShadow:ee.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[t.jsx("img",{alt:"screenshot",src:q}),!o&&t.jsx(oe,{...G.dragHandleProps,className:"action",style:{right:40,zIndex:10,color:"#fff"},children:t.jsx(kt,{})}),!o&&t.jsx(oe,{className:"action",onClick:()=>{l(X=>{const ne=[...X.blockletScreenshots];return ne.splice(U,1),{...X,blockletScreenshots:ne}})},children:t.jsx(yo,{})})]})},q)),w.placeholder,g.length<5&&t.jsx(u,{sx:{width:240,height:135,background:"#eee",cursor:o?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{var q;P()&&((q=j.current)==null||q.open())},children:"+"})]})})})]}),t.jsxs(u,{display:"flex",mt:3,flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(ke,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(E,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("studio.video")}),t.jsxs(ke,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.videoType"),":"," "]}),t.jsxs(u,{component:"span",sx:{color:"#007ec6"},children:[t.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",t.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"1~3"})]})}),!o&&t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]})})]})]}),t.jsx(go,{onDragEnd:o?void 0:F,children:t.jsx(jo,{droppableId:"videos",direction:"horizontal",isDropDisabled:o,children:(w,$)=>t.jsxs(u,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:$.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:$.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:w.innerRef,...w.droppableProps,children:[s.blockletVideos.map((q,U)=>t.jsx(ko,{draggableId:q,index:U,isDragDisabled:o,children:(G,ee)=>t.jsxs(u,{ref:G.innerRef,...G.draggableProps,className:"screenshot",sx:{transform:ee.isDragging?"scale(1.05)":"none",boxShadow:ee.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[t.jsx(ut,{url:q,style:{pointerEvents:ee.isDragging?"none":"auto"}}),!o&&t.jsx(oe,{...G.dragHandleProps,className:"action",style:{right:40,zIndex:10,color:"#fff"},children:t.jsx(kt,{})}),!o&&t.jsx(oe,{className:"action",onClick:()=>{l(X=>{const ne=[...X.blockletVideos];return ne.splice(U,1),{...X,blockletVideos:ne}})},children:t.jsx(yo,{})})]})},q)),w.placeholder,s.blockletVideos.length<3&&t.jsx(u,{sx:{width:240,height:135,background:"#eee",cursor:o?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{P()&&I(!0)},children:"+"})]})})})]})]})}),t.jsxs(R.Suspense,{fallback:t.jsx(Ve,{}),children:[t.jsx(Eo,{ref:D,popup:!0,onUploadFinish:w=>{var $;l({blockletLogo:w.data.filename}),x(""),($=D.current)==null||$.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:W,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","application/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),L&&t.jsx(Ln,{onClose:()=>I(!1),params:s,setParams:l}),t.jsx(Eo,{ref:j,popup:!0,onUploadFinish:w=>{var $;l(q=>{var G;const U=q.blockletScreenshots||[];return U.push((G=w.data)==null?void 0:G.filename),{...q,blockletScreenshots:U}}),($=j.current)==null||$.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:k,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-g.length}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})]})}qn.propTypes={projectId:d.string.isRequired,readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,loading:d.bool.isRequired,blocklet:d.object.isRequired,setLoading:d.func.isRequired,initUrl:d.object.isRequired,componentDid:d.isRequired,initLogoUrl:d.string.isRequired,setInitLogoUrl:d.func.isRequired};const ki=ae.div`
132
+ `;var Yt={},cr=me;Object.defineProperty(Yt,"__esModule",{value:!0});var kt=Yt.default=void 0,ar=cr(xe()),dr=t;kt=Yt.default=(0,ar.default)((0,dr.jsx)("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2m-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"DragIndicator");const Co="lastWantToConnectStoreId";function ur(e){var a,c;const[o,n]=R.useState(null),{session:r}=ct(),s=R.useCallback(f=>{n(f),localStorage.setItem(Co,f==null?void 0:f.id)},[n]),l=R.useMemo(()=>{var b,p,v,C;const f=localStorage.getItem(Co),h=f?(((b=e==null?void 0:e.settings)==null?void 0:b.storeList)||[]).find(D=>D.id===f):null;if(h)return h;let x=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(D=>{var j;return!(D.id!==H.BLOCKLET_STORE.id||D.scope&&D.scope!=="studio"&&D.scope!==((j=r==null?void 0:r.user)==null?void 0:j.did))});return x||(x=(C=(v=e==null?void 0:e.settings)==null?void 0:v.storeList)==null?void 0:C[0]),x},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(c=r==null?void 0:r.user)==null?void 0:c.did]);return[o||l||{},s]}const bt={};async function fn(e,{interval:o=1e3,maxDuration:n=120*1e3,intervalFirst:r=4e3,timerKey:s=""}){bt[s]&&clearTimeout(bt[s]),await new Promise(a=>setTimeout(a,r));const l=Date.now(),i=async(a,c)=>{try{const f=await e();a(f)}catch(f){Date.now()-l>n?c(f):s?bt[s]=setTimeout(()=>i(a,c),o):setTimeout(()=>i(a,c),o)}};return new Promise(i)}function pr(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function fr(e,{did:o,projectId:n,messageId:r}){return fn(async()=>{var l;const s=await e.getProject({input:{did:o,projectId:n,messageId:r}});if(!((l=s==null?void 0:s.project)!=null&&l.blockletDid))throw new Error("Connected store not found");return s.project.blockletDid},{timerKey:"connect-studio"})}function hr(e,{did:o,projectId:n,storeId:r}){return fn(async()=>{var i,a;const s=await e.getProject({input:{did:o,projectId:n,messageId:""}});if(!((a=(i=s==null?void 0:s.project)==null?void 0:i.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!s.project.connectedStores.find(c=>c.storeId===r))throw new Error("Connected store not found")},{timerKey:`connect-store-${r}`})}const hn=({fromBlocklet:e,nodeInfo:o,blocklet:n,userDid:r})=>{var i,a;const s=e?(i=n==null?void 0:n.meta)==null?void 0:i.did:o==null?void 0:o.did;let l=e?((a=n==null?void 0:n.settings)==null?void 0:a.storeList)||[]:(o==null?void 0:o.blockletRegistryList)||[];return Array.isArray(l)||(l=[]),l=l.filter(c=>c.protected||!c.scope||c.scope==="studio"||c.scope===r),{teamDid:s,storeList:l}};function Zt({blocklet:e,store:o={},onChangeStore:n,onClick:r,disabled:s,loading:l,componentDid:i}){var g,P,O;const{t:a}=J(),{session:c}=ct(),{api:f,info:h,inService:x}=be(),b=De(),[p,v]=R.useState(!1),C=R.useRef(null),[D,j]=R.useState(!1),[m,T]=R.useState(null),L=F=>{n(F),v(!1)},I=()=>{v(!p)},y=F=>{C.current&&C.current.contains(F.target)||v(!1)},_=()=>{j(!0)},A=()=>{j(!1)},W=async()=>{var F;if(m)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:m.url,projectId:"",scope:m.scope||"studio"}}),await((F=b==null?void 0:b.actions)==null?void 0:F.refreshBlocklet())}catch(w){V.error(`Remove Blocklet Store Error: ${Re(w)}`)}finally{T(null)}},{storeList:k}=hn({fromBlocklet:x,blocklet:e,nodeInfo:h,componentDid:i,userDid:(g=c==null?void 0:c.user)==null?void 0:g.did}),S=(P=e==null?void 0:e.meta)==null?void 0:P.did;return t.jsxs(t.Fragment,{children:[t.jsxs(jt,{disabled:s,ref:C,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[t.jsxs(Q,{onClick:r,children:[l&&t.jsx(et,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${o.name||""}`]}),t.jsx(Q,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:I,children:t.jsx(qs,{})})]}),t.jsx(Ho,{sx:{zIndex:10},open:p,anchorEl:C.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:F})=>t.jsx(Go,{...F,style:{transformOrigin:"center top"},children:t.jsx(Tt,{children:t.jsx(Xo,{onClickAway:y,children:t.jsxs(Jo,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[k==null?void 0:k.map(w=>{var $;return t.jsxs(pe,{selected:w.id===(o==null?void 0:o.id),sx:{height:56},onClick:()=>L(w),children:[t.jsxs(u,{children:[t.jsx(fe,{sx:{fontSize:"16px"},maxLength:24,children:w.name}),t.jsx(fe,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:w.url})]}),Rs({store:w,userDid:($=c==null?void 0:c.user)==null?void 0:$.did})&&t.jsx(oe,{sx:{ml:1},onClick:q=>{q.preventDefault(),q.stopPropagation(),T(w)},children:t.jsx(se,{icon:"ic:outline-delete"})})]},w.url)}),t.jsx(Jn,{}),t.jsxs(pe,{onClick:_,children:[t.jsx(qt,{font:!0}),t.jsx(E,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),D&&t.jsx(rn,{hiddenChildren:!0,open:!0,onClose:A,teamDid:S,storeList:k,scope:"studio",onAdd:(O=b==null?void 0:b.actions)==null?void 0:O.refreshBlocklet}),m&&t.jsx($t,{displayError:!0,title:`${a("common.delete")} ${m.name}`,description:a("blocklet.publish.deleteStoreTip",{name:m.name}),confirm:a("common.confirm"),onConfirm:W,onCancel:()=>T(null)})]})}Zt.propTypes={store:d.object,blocklet:d.object,onChangeStore:d.func.isRequired,onClick:d.func.isRequired,loading:d.bool.isRequired,disabled:d.bool.isRequired,componentDid:d.string.isRequired,projectType:d.string.isRequired,getData:d.func.isRequired};Zt.defaultProps={store:null,blocklet:null};var he=R;const Ae=/^[a-z0-9]+(-[a-z0-9]+)*$/,at=(e,o,n,r="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;r=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const a=s.pop(),c=s.pop(),f={provider:s.length>0?s[0]:r,prefix:c,name:a};return o&&!Ze(f)?null:f}const l=s[0],i=l.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return o&&!Ze(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:l};return o&&!Ze(a,n)?null:a}return null},Ze=(e,o)=>e?!!((e.provider===""||e.provider.match(Ae))&&(o&&e.prefix===""||e.prefix.match(Ae))&&e.name.match(Ae)):!1,mn=Object.freeze({left:0,top:0,width:16,height:16}),st=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Kt=Object.freeze({...mn,...st}),yt=Object.freeze({...Kt,body:"",hidden:!1});function mr(e,o){const n={};!e.hFlip!=!o.hFlip&&(n.hFlip=!0),!e.vFlip!=!o.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(o.rotate||0))%4;return r&&(n.rotate=r),n}function So(e,o){const n=mr(e,o);for(const r in yt)r in st?r in e&&!(r in n)&&(n[r]=st[r]):r in o?n[r]=o[r]:r in e&&(n[r]=e[r]);return n}function br(e,o){const n=e.icons,r=e.aliases||Object.create(null),s=Object.create(null);function l(i){if(n[i])return s[i]=[];if(!(i in s)){s[i]=null;const a=r[i]&&r[i].parent,c=a&&l(a);c&&(s[i]=[a].concat(c))}return s[i]}return Object.keys(n).concat(Object.keys(r)).forEach(l),s}function xr(e,o,n){const r=e.icons,s=e.aliases||Object.create(null);let l={};function i(a){l=So(r[a]||s[a],l)}return i(o),n.forEach(i),So(e,l)}function bn(e,o){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(s=>{o(s,null),n.push(s)});const r=br(e);for(const s in r){const l=r[s];l&&(o(s,xr(e,s,l)),n.push(s))}return n}const gr={provider:"",aliases:{},not_found:{},...mn};function xt(e,o){for(const n in o)if(n in e&&typeof e[n]!=typeof o[n])return!1;return!0}function xn(e){if(typeof e!="object"||e===null)return null;const o=e;if(typeof o.prefix!="string"||!e.icons||typeof e.icons!="object"||!xt(e,gr))return null;const n=o.icons;for(const s in n){const l=n[s];if(!s.match(Ae)||typeof l.body!="string"||!xt(l,yt))return null}const r=o.aliases||Object.create(null);for(const s in r){const l=r[s],i=l.parent;if(!s.match(Ae)||typeof i!="string"||!n[i]&&!r[i]||!xt(l,yt))return null}return o}const Ro=Object.create(null);function jr(e,o){return{provider:e,prefix:o,icons:Object.create(null),missing:new Set}}function ve(e,o){const n=Ro[e]||(Ro[e]=Object.create(null));return n[o]||(n[o]=jr(e,o))}function eo(e,o){return xn(o)?bn(o,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function kr(e,o,n){try{if(typeof n.body=="string")return e.icons[o]={...n},!0}catch{}return!1}let Me=!1;function gn(e){return typeof e=="boolean"&&(Me=e),Me}function yr(e){const o=typeof e=="string"?at(e,!0,Me):e;if(o){const n=ve(o.provider,o.prefix),r=o.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function vr(e,o){const n=at(e,!0,Me);if(!n)return!1;const r=ve(n.provider,n.prefix);return kr(r,n.name,o)}function wr(e,o){if(typeof e!="object")return!1;if(typeof o!="string"&&(o=e.provider||""),Me&&!o&&!e.prefix){let s=!1;return xn(e)&&(e.prefix="",bn(e,(l,i)=>{i&&vr(l,i)&&(s=!0)})),s}const n=e.prefix;if(!Ze({provider:o,prefix:n,name:"a"}))return!1;const r=ve(o,n);return!!eo(r,e)}const jn=Object.freeze({width:null,height:null}),kn=Object.freeze({...jn,...st}),Cr=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Sr=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Io(e,o,n){if(o===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*o*n)/n;if(typeof e!="string")return e;const r=e.split(Cr);if(r===null||!r.length)return e;const s=[];let l=r.shift(),i=Sr.test(l);for(;;){if(i){const a=parseFloat(l);isNaN(a)?s.push(l):s.push(Math.ceil(a*o*n)/n)}else s.push(l);if(l=r.shift(),l===void 0)return s.join("");i=!i}}const Rr=e=>e==="unset"||e==="undefined"||e==="none";function Ir(e,o){const n={...Kt,...e},r={...kn,...o},s={left:n.left,top:n.top,width:n.width,height:n.height};let l=n.body;[n,r].forEach(v=>{const C=[],D=v.hFlip,j=v.vFlip;let m=v.rotate;D?j?m+=2:(C.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),C.push("scale(-1 1)"),s.top=s.left=0):j&&(C.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),C.push("scale(1 -1)"),s.top=s.left=0);let T;switch(m<0&&(m-=Math.floor(m/4)*4),m=m%4,m){case 1:T=s.height/2+s.top,C.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:C.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,C.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}m%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),C.length&&(l='<g transform="'+C.join(" ")+'">'+l+"</g>")});const i=r.width,a=r.height,c=s.width,f=s.height;let h,x;i===null?(x=a===null?"1em":a==="auto"?f:a,h=Io(x,c/f)):(h=i==="auto"?c:i,x=a===null?Io(h,f/c):a==="auto"?f:a);const b={},p=(v,C)=>{Rr(C)||(b[v]=C.toString())};return p("width",h),p("height",x),b.viewBox=s.left.toString()+" "+s.top.toString()+" "+c.toString()+" "+f.toString(),{attributes:b,body:l}}const Dr=/\sid="(\S+)"/g,Tr="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let _r=0;function Pr(e,o=Tr){const n=[];let r;for(;r=Dr.exec(e);)n.push(r[1]);if(!n.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(l=>{const i=typeof o=="function"?o(l):o+(_r++).toString(),a=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+i+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}const vt=Object.create(null);function Lr(e,o){vt[e]=o}function wt(e){return vt[e]||vt[""]}function to(e){let o;if(typeof e.resources=="string")o=[e.resources];else if(o=e.resources,!(o instanceof Array)||!o.length)return null;return{resources:o,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 oo=Object.create(null),Ne=["https://api.simplesvg.com","https://api.unisvg.com"],Ke=[];for(;Ne.length>0;)Ne.length===1||Math.random()>.5?Ke.push(Ne.shift()):Ke.push(Ne.pop());oo[""]=to({resources:["https://api.iconify.design"].concat(Ke)});function qr(e,o){const n=to(o);return n===null?!1:(oo[e]=n,!0)}function no(e){return oo[e]}const $r=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Do=$r();function Nr(e,o){const n=no(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let s=0;n.resources.forEach(i=>{s=Math.max(s,i.length)});const l=o+".json?icons=";r=n.maxURL-s-n.path.length-l.length}return r}function Ar(e){return e===404}const Er=(e,o,n)=>{const r=[],s=Nr(e,o),l="icons";let i={type:l,provider:e,prefix:o,icons:[]},a=0;return n.forEach((c,f)=>{a+=c.length+1,a>=s&&f>0&&(r.push(i),i={type:l,provider:e,prefix:o,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Mr(e){if(typeof e=="string"){const o=no(e);if(o)return o.path}return"/"}const Or=(e,o,n)=>{if(!Do){n("abort",424);return}let r=Mr(o.provider);switch(o.type){case"icons":{const l=o.prefix,a=o.icons.join(","),c=new URLSearchParams({icons:a});r+=l+".json?"+c.toString();break}case"custom":{const l=o.uri;r+=l.slice(0,1)==="/"?l.slice(1):l;break}default:n("abort",400);return}let s=503;Do(e+r).then(l=>{const i=l.status;if(i!==200){setTimeout(()=>{n(Ar(i)?"abort":"next",i)});return}return s=501,l.json()}).then(l=>{if(typeof l!="object"||l===null){setTimeout(()=>{l===404?n("abort",l):n("next",s)});return}setTimeout(()=>{n("success",l)})}).catch(()=>{n("next",s)})},zr={prepare:Er,send:Or};function Br(e){const o={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((s,l)=>s.provider!==l.provider?s.provider.localeCompare(l.provider):s.prefix!==l.prefix?s.prefix.localeCompare(l.prefix):s.name.localeCompare(l.name));let r={provider:"",prefix:"",name:""};return e.forEach(s=>{if(r.name===s.name&&r.prefix===s.prefix&&r.provider===s.provider)return;r=s;const l=s.provider,i=s.prefix,a=s.name,c=n[l]||(n[l]=Object.create(null)),f=c[i]||(c[i]=ve(l,i));let h;a in f.icons?h=o.loaded:i===""||f.missing.has(a)?h=o.missing:h=o.pending;const x={provider:l,prefix:i,name:a};h.push(x)}),o}function yn(e,o){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(s=>s.id!==o))})}function Vr(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const o=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!o.length)return;let n=!1;const r=e.provider,s=e.prefix;o.forEach(l=>{const i=l.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==s)return!0;const f=c.name;if(e.icons[f])i.loaded.push({provider:r,prefix:s,name:f});else if(e.missing.has(f))i.missing.push({provider:r,prefix:s,name:f});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||yn([e],l.id),l.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),l.abort))})}))}let Wr=0;function Ur(e,o,n){const r=Wr++,s=yn.bind(null,n,r);if(!o.pending.length)return s;const l={id:r,icons:o,callback:e,abort:s};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(l)}),s}function Fr(e,o=!0,n=!1){const r=[];return e.forEach(s=>{const l=typeof s=="string"?at(s,o,n):s;l&&r.push(l)}),r}var Hr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Gr(e,o,n,r){const s=e.resources.length,l=e.random?Math.floor(Math.random()*s):e.index;let i;if(e.random){let y=e.resources.slice(0);for(i=[];y.length>1;){const _=Math.floor(Math.random()*y.length);i.push(y[_]),y=y.slice(0,_).concat(y.slice(_+1))}i=i.concat(y)}else i=e.resources.slice(l).concat(e.resources.slice(0,l));const a=Date.now();let c="pending",f=0,h,x=null,b=[],p=[];typeof r=="function"&&p.push(r);function v(){x&&(clearTimeout(x),x=null)}function C(){c==="pending"&&(c="aborted"),v(),b.forEach(y=>{y.status==="pending"&&(y.status="aborted")}),b=[]}function D(y,_){_&&(p=[]),typeof y=="function"&&p.push(y)}function j(){return{startTime:a,payload:o,status:c,queriesSent:f,queriesPending:b.length,subscribe:D,abort:C}}function m(){c="failed",p.forEach(y=>{y(void 0,h)})}function T(){b.forEach(y=>{y.status==="pending"&&(y.status="aborted")}),b=[]}function L(y,_,A){const W=_!=="success";switch(b=b.filter(k=>k!==y),c){case"pending":break;case"failed":if(W||!e.dataAfterTimeout)return;break;default:return}if(_==="abort"){h=A,m();return}if(W){h=A,b.length||(i.length?I():m());return}if(v(),T(),!e.random){const k=e.resources.indexOf(y.resource);k!==-1&&k!==e.index&&(e.index=k)}c="completed",p.forEach(k=>{k(A)})}function I(){if(c!=="pending")return;v();const y=i.shift();if(y===void 0){if(b.length){x=setTimeout(()=>{v(),c==="pending"&&(T(),m())},e.timeout);return}m();return}const _={status:"pending",resource:y,callback:(A,W)=>{L(_,A,W)}};b.push(_),f++,x=setTimeout(I,e.rotate),n(y,o,_.callback)}return setTimeout(I),j}function vn(e){const o={...Hr,...e};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function s(a,c,f){const h=Gr(o,a,c,(x,b)=>{r(),f&&f(x,b)});return n.push(h),h}function l(a){return n.find(c=>a(c))||null}return{query:s,find:l,setIndex:a=>{o.index=a},getIndex:()=>o.index,cleanup:r}}function To(){}const gt=Object.create(null);function Xr(e){if(!gt[e]){const o=no(e);if(!o)return;const n=vn(o),r={config:o,redundancy:n};gt[e]=r}return gt[e]}function Jr(e,o,n){let r,s;if(typeof e=="string"){const l=wt(e);if(!l)return n(void 0,424),To;s=l.send;const i=Xr(e);i&&(r=i.redundancy)}else{const l=to(e);if(l){r=vn(l);const i=e.resources?e.resources[0]:"",a=wt(i);a&&(s=a.send)}}return!r||!s?(n(void 0,424),To):r.query(o,s,n)().abort}const _o="iconify2",Oe="iconify",wn=Oe+"-count",Po=Oe+"-version",Cn=36e5,Qr=168;function Ct(e,o){try{return e.getItem(o)}catch{}}function so(e,o,n){try{return e.setItem(o,n),!0}catch{}}function Lo(e,o){try{e.removeItem(o)}catch{}}function St(e,o){return so(e,wn,o.toString())}function Rt(e){return parseInt(Ct(e,wn))||0}const dt={local:!0,session:!0},Sn={local:new Set,session:new Set};let ro=!1;function Yr(e){ro=e}let He=typeof window>"u"?{}:window;function Rn(e){const o=e+"Storage";try{if(He&&He[o]&&typeof He[o].length=="number")return He[o]}catch{}dt[e]=!1}function In(e,o){const n=Rn(e);if(!n)return;const r=Ct(n,Po);if(r!==_o){if(r){const a=Rt(n);for(let c=0;c<a;c++)Lo(n,Oe+c.toString())}so(n,Po,_o),St(n,0);return}const s=Math.floor(Date.now()/Cn)-Qr,l=a=>{const c=Oe+a.toString(),f=Ct(n,c);if(typeof f=="string"){try{const h=JSON.parse(f);if(typeof h=="object"&&typeof h.cached=="number"&&h.cached>s&&typeof h.provider=="string"&&typeof h.data=="object"&&typeof h.data.prefix=="string"&&o(h,a))return!0}catch{}Lo(n,c)}};let i=Rt(n);for(let a=i-1;a>=0;a--)l(a)||(a===i-1?(i--,St(n,i)):Sn[e].add(a))}function Dn(){if(!ro){Yr(!0);for(const e in dt)In(e,o=>{const n=o.data,r=o.provider,s=n.prefix,l=ve(r,s);if(!eo(l,n).length)return!1;const i=n.lastModified||-1;return l.lastModifiedCached=l.lastModifiedCached?Math.min(l.lastModifiedCached,i):i,!0})}}function Zr(e,o){const n=e.lastModifiedCached;if(n&&n>=o)return n===o;if(e.lastModifiedCached=o,n)for(const r in dt)In(r,s=>{const l=s.data;return s.provider!==e.provider||l.prefix!==e.prefix||l.lastModified===o});return!0}function Kr(e,o){ro||Dn();function n(r){let s;if(!dt[r]||!(s=Rn(r)))return;const l=Sn[r];let i;if(l.size)l.delete(i=Array.from(l).shift());else if(i=Rt(s),!St(s,i+1))return;const a={cached:Math.floor(Date.now()/Cn),provider:e.provider,data:o};return so(s,Oe+i.toString(),JSON.stringify(a))}o.lastModified&&!Zr(e,o.lastModified)||Object.keys(o.icons).length&&(o.not_found&&(o=Object.assign({},o),delete o.not_found),n("local")||n("session"))}function qo(){}function ei(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Vr(e)}))}function ti(e,o){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(o).sort():e.iconsToLoad=o,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,s=e.iconsToLoad;delete e.iconsToLoad;let l;if(!s||!(l=wt(n)))return;l.prepare(n,r,s).forEach(a=>{Jr(n,a,c=>{if(typeof c!="object")a.icons.forEach(f=>{e.missing.add(f)});else try{const f=eo(e,c);if(!f.length)return;const h=e.pendingIcons;h&&f.forEach(x=>{h.delete(x)}),Kr(e,c)}catch(f){console.error(f)}ei(e)})})}))}const oi=(e,o)=>{const n=Fr(e,!0,gn()),r=Br(n);if(!r.pending.length){let c=!0;return o&&setTimeout(()=>{c&&o(r.loaded,r.missing,r.pending,qo)}),()=>{c=!1}}const s=Object.create(null),l=[];let i,a;return r.pending.forEach(c=>{const{provider:f,prefix:h}=c;if(h===a&&f===i)return;i=f,a=h,l.push(ve(f,h));const x=s[f]||(s[f]=Object.create(null));x[h]||(x[h]=[])}),r.pending.forEach(c=>{const{provider:f,prefix:h,name:x}=c,b=ve(f,h),p=b.pendingIcons||(b.pendingIcons=new Set);p.has(x)||(p.add(x),s[f][h].push(x))}),l.forEach(c=>{const{provider:f,prefix:h}=c;s[f][h].length&&ti(c,s[f][h])}),o?Ur(o,r,l):qo};function ni(e,o){const n={...e};for(const r in o){const s=o[r],l=typeof s;r in jn?(s===null||s&&(l==="string"||l==="number"))&&(n[r]=s):l===typeof n[r]&&(n[r]=r==="rotate"?s%4:s)}return n}const si=/[\s,]+/;function ri(e,o){o.split(si).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function ii(e,o=0){const n=e.replace(/^-?[0-9.]*/,"");function r(s){for(;s<0;)s+=4;return s%4}if(n===""){const s=parseInt(e);return isNaN(s)?0:r(s)}else if(n!==e){let s=0;switch(n){case"%":s=25;break;case"deg":s=90}if(s){let l=parseFloat(e.slice(0,e.length-n.length));return isNaN(l)?0:(l=l/s,l%1===0?r(l):0)}}return o}function li(e,o){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in o)n+=" "+r+'="'+o[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function ci(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ai(e){return"data:image/svg+xml,"+ci(e)}function di(e){return'url("'+ai(e)+'")'}let Ee;function ui(){try{Ee=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{Ee=null}}function pi(e){return Ee===void 0&&ui(),Ee?Ee.createHTML(e):e}const Tn={...kn,inline:!1},fi={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},hi={display:"inline-block"},It={backgroundColor:"currentColor"},_n={backgroundColor:"transparent"},$o={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},No={WebkitMask:It,mask:It,background:_n};for(const e in No){const o=No[e];for(const n in $o)o[e+n]=$o[n]}const mi={...Tn,inline:!0};function Ao(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const bi=(e,o,n,r)=>{const s=n?mi:Tn,l=ni(s,o),i=o.mode||"svg",a={},c=o.style||{},f={...i==="svg"?fi:{},ref:r};for(let j in o){const m=o[j];if(m!==void 0)switch(j){case"icon":case"style":case"children":case"onLoad":case"mode":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":l[j]=m===!0||m==="true"||m===1;break;case"flip":typeof m=="string"&&ri(l,m);break;case"color":a.color=m;break;case"rotate":typeof m=="string"?l[j]=ii(m):typeof m=="number"&&(l[j]=m);break;case"ariaHidden":case"aria-hidden":m!==!0&&m!=="true"&&delete f["aria-hidden"];break;default:s[j]===void 0&&(f[j]=m)}}const h=Ir(e,l),x=h.attributes;if(l.inline&&(a.verticalAlign="-0.125em"),i==="svg"){f.style={...a,...c},Object.assign(f,x);let j=0,m=o.id;return typeof m=="string"&&(m=m.replace(/-/g,"_")),f.dangerouslySetInnerHTML={__html:pi(Pr(h.body,m?()=>m+"ID"+j++:"iconifyReact"))},he.createElement("svg",f)}const{body:b,width:p,height:v}=e,C=i==="mask"||(i==="bg"?!1:b.indexOf("currentColor")!==-1),D=li(b,{...x,width:p+"",height:v+""});return f.style={...a,"--svg":di(D),width:Ao(x.width),height:Ao(x.height),...hi,...C?It:_n,...c},he.createElement("span",f)};gn(!0);Lr("",zr);if(typeof document<"u"&&typeof window<"u"){Dn();const e=window;if(e.IconifyPreload!==void 0){const o=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof o=="object"&&o!==null&&(o instanceof Array?o:[o]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!wr(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const o=e.IconifyProviders;if(typeof o=="object"&&o!==null)for(let n in o){const r="IconifyProviders["+n+"] is invalid.";try{const s=o[n];if(typeof s!="object"||!s||s.resources===void 0)continue;qr(n,s)||console.error(r)}catch{console.error(r)}}}}class Pn extends he.Component{constructor(o){super(o),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(o){this.state.icon!==o&&this.setState({icon:o})}_checkIcon(o){const n=this.state,r=this.props.icon;if(typeof r=="object"&&r!==null&&typeof r.body=="string"){this._icon="",this._abortLoading(),(o||n.icon===null)&&this._setData({data:r});return}let s;if(typeof r!="string"||(s=at(r,!1,!0))===null){this._abortLoading(),this._setData(null);return}const l=yr(s);if(!l){(!this._loading||this._loading.name!==r)&&(this._abortLoading(),this._icon="",this._setData(null),l!==null&&(this._loading={name:r,abort:oi([s],this._checkIcon.bind(this,!1))}));return}if(this._icon!==r||n.icon===null){this._abortLoading(),this._icon=r;const i=["iconify"];s.prefix!==""&&i.push("iconify--"+s.prefix),s.provider!==""&&i.push("iconify--"+s.provider),this._setData({data:l,classes:i}),this.props.onLoad&&this.props.onLoad(r)}}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(o){o.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const o=this.props,n=this.state.icon;if(n===null)return o.children?o.children:he.createElement("span",{});let r=o;return n.classes&&(r={...o,className:(typeof o.className=="string"?o.className+" ":"")+n.classes.join(" ")}),bi({...Kt,...n.data},r,o._inline,o._ref)}}const xi=he.forwardRef(function(o,n){const r={...o,_ref:n,_inline:!1};return he.createElement(Pn,r)});he.forwardRef(function(o,n){const r={...o,_ref:n,_inline:!0};return he.createElement(Pn,r)});var gi=xi;const ji=e=>{const o=e.includes("youtube.com")||e.includes("youtu.be"),n=e.includes("vimeo.com");return o||n};function ut({url:e,style:o,controls:n,modestbranding:r}){var a;const{t:s}=J(),l=e.includes("youtube.com")||e.includes("youtu.be"),i=e.includes("vimeo.com");if(l){const c=((a=e.split("v=")[1])==null?void 0:a.split("&")[0])||e.split("/").pop();return t.jsx("div",{style:{position:"relative",width:"100%",paddingTop:"56.25%",pointerEvents:(o==null?void 0:o.pointerEvents)||"auto"},children:t.jsx("iframe",{src:`https://www.youtube.com/embed/${c}?modestbranding=${r}&controls=${n}&rel=0`,title:"YouTube video player",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",...o},allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})}if(i){const c=e.split("/").pop();return t.jsx("div",{style:{position:"relative",width:"100%",paddingTop:"56.25%",pointerEvents:o.pointerEvents||"auto"},children:t.jsx("iframe",{src:`https://player.vimeo.com/video/${c}`,title:"Vimeo video player",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",...o},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0})})}return t.jsx(u,{style:{position:"relative",width:"100%",paddingTop:"56.25%"},children:t.jsxs(u,{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none",backgroundColor:"rgba(0, 0, 0, 0.04)",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",...o},allow:"autoplay; fullscreen; picture-in-picture",allowFullScreen:!0,children:[t.jsx(gi,{icon:"carbon:video-off",style:{fontSize:40,marginBottom:"10px",opacity:.5}}),t.jsx(E,{variant:"body1",sx:{opacity:.5},children:s("studio.videoDialogNoSrc")})]})})}ut.propTypes={url:d.string.isRequired,style:d.object,controls:d.number,modestbranding:d.number};ut.defaultProps={style:{},controls:1,modestbranding:1};function Ln({setParams:e,onClose:o,params:n}){const{t:r}=J(),[s,l]=R.useState(""),i=s&&n.blockletVideos.includes(s),a=ji(s),c=()=>{e(f=>{const h=[...f.blockletVideos];return h.push(s),{...f,blockletVideos:h}}),o()};return t.jsxs(_t,{open:!0,fullWidth:!0,maxWidth:"sm",children:[t.jsx(Qo,{children:r("studio.videoDialogTitle")}),t.jsxs(Yo,{children:[t.jsx(Qn,{fullWidth:!0,value:s,onChange:f=>l(f.target.value),placeholder:r("studio.videoInputLabel"),endAdornment:s?t.jsx(Be,{position:"end",children:t.jsx(oe,{onClick:()=>l(""),children:t.jsx(ms,{})})}):null,error:i}),i&&t.jsx(E,{variant:"body2",color:"error",children:r("studio.duplicateVideo")}),t.jsx(ut,{url:s,style:{marginTop:"20px",borderRadius:"4px"}})]}),t.jsxs(Zo,{children:[t.jsx(Q,{onClick:()=>o(),children:r("studio.cancel")}),t.jsx(Q,{disabled:!a||i,onClick:c,children:r("studio.confirm")})]})]})}Ln.propTypes={onClose:d.func.isRequired,params:d.object.isRequired,setParams:d.func.isRequired};const Eo=R.lazy(()=>tn(()=>import("./index-BDfZ8xEV.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.Uploader})));function qn({projectId:e,readOnly:o,loading:n,blocklet:r,params:s,setParams:l,paramsErrTip:i,setParamsErrTip:a,setLoading:c,initUrl:f,initLogoUrl:h,setInitLogoUrl:x,componentDid:b}){const{t:p}=J(),{api:v}=be(),C=Dt(),D=R.useRef(null),j=R.useRef(null),[m,T]=ur(r),[L,I]=R.useState(!1),y=Is({messageType:"connect-store-message",onOpen:()=>c(!0),onClose:()=>c(!1)}),_=async w=>{const $=setTimeout(()=>{c(!1)},2e4),q=await fr(v,w);c(!1),clearTimeout($),window.parent.postMessage({event:"studioDialog.connected",componentDid:b},"*"),C(window.location.pathname.replace(`${H.UNOWNED_DID}/create`,`${q}/create`),{replace:!0})},A=()=>{if(!s.blockletTitle){V.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(m!=null&&m.url)){V.error(p("blocklet.publish.noStoreSelected"));return}const w=pr();y(async($,q)=>{var U,G,ee;try{const X=await v.connectByStudio({input:{did:(U=r==null?void 0:r.meta)==null?void 0:U.did,blockletTitle:s==null?void 0:s.blockletTitle,storeUrl:m.url,storeId:m.id,storeName:m.name,type:((G=s==null?void 0:s.blockletComponents)==null?void 0:G.length)>0?"pack":"resource",componentDid:b,messageId:w,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(X!=null&&X.url)){V.error("failed to connect to store");return}q(X.url),_({did:(ee=r==null?void 0:r.meta)==null?void 0:ee.did,projectId:"",messageId:w})}catch(X){const ne=Re(X);V.error(ne),c(!1)}})},W=`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${r.meta.did}/${e}/logo/upload`,k=`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${r.meta.did}/${e}/screenshot/upload`,S=s!=null&&s.blockletLogo?`${W}/${s.blockletLogo}`:`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,g=((s==null?void 0:s.blockletScreenshots)||[]).filter(Boolean).map(w=>`${k}/${w}`),P=()=>o?!1:!e||e===H.UNOWNED_DID?(V.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0,O=w=>{if(!w.destination)return;const $=Array.from(s.blockletScreenshots),[q]=$.splice(w.source.index,1);$.splice(w.destination.index,0,q),l(U=>({...U,blockletScreenshots:$}))},F=w=>{if(!w.destination)return;const $=Array.from(s.blockletVideos),[q]=$.splice(w.source.index,1);$.splice(w.destination.index,0,q),l(U=>({...U,blockletVideos:$}))};return t.jsxs(ki,{children:[t.jsx(u,{display:"flex",className:"section",children:t.jsxs(u,{sx:{flex:1},children:[t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:s.blockletTitle||"",onChange:w=>{a({blockletTitle:""}),l({blockletTitle:w.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),t.jsx(Y,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===H.UNOWNED_DID&&t.jsx(Be,{position:"end",children:t.jsx(Zt,{blocklet:r,store:m,componentDid:b,onChangeStore:T,disabled:!s.blockletTitle||o||n,loading:n,onClick:A})})},error:!!i.projectId,helperText:i.projectId||"",value:e===H.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:o},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletDescription||"",onChange:w=>{a({blockletDescription:""}),l({blockletDescription:w.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.homepageTip")}`,placeholder:`Blocklet ${p("common.homepageTip")}`,InputProps:{"data-cy":"blocklet-homepage",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletHomepage||"",onChange:w=>{w.target.value&&!/^(http|https):\/\//.test(w.target.value)?a({blockletHomepage:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletHomepage:""}),l({blockletHomepage:w.target.value})},error:!!i.blockletHomepage,helperText:i.blockletHomepage||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.community")}`,placeholder:`Blocklet ${p("common.community")}`,InputProps:{"data-cy":"blocklet-community",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletCommunity||"",onChange:w=>{w.target.value&&!/^(http|https):\/\//.test(w.target.value)?a({blockletCommunity:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletCommunity:""}),l({blockletCommunity:w.target.value})},error:!!i.blockletCommunity,helperText:i.blockletCommunity||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.support")}`,placeholder:`Blocklet ${p("common.support")}`,InputProps:{"data-cy":"blocklet-support",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletSupport||"",onChange:w=>{w.target.value&&!/^(http|https):\/\//.test(w.target.value)&&!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(w.target.value)?a({blockletSupport:p("blocklet.publish.errorTip.invalidUrlOrEmail")}):a({blockletSupport:""}),l({blockletSupport:w.target.value})},error:!!i.blockletSupport,helperText:i.blockletSupport||"",sx:{mt:3}}),t.jsx(Y,{disabled:n||o,label:`Blocklet ${p("common.repository")}`,placeholder:`Blocklet ${p("common.repository")}`,InputProps:{"data-cy":"blocklet-repository",readOnly:o},autoComplete:"off",variant:"outlined",fullWidth:!0,value:s.blockletRepository||"",onChange:w=>{w.target.value&&!/^(git|https|svn)/.test(w.target.value)?a({blockletRepository:p("blocklet.publish.errorTip.invalidUrl")}):a({blockletRepository:""}),l({blockletRepository:w.target.value})},error:!!i.blockletRepository,helperText:i.blockletRepository||"",sx:{mt:3}})]})}),t.jsx(u,{display:"flex",mt:3,className:"section full-width",children:t.jsxs(u,{sx:{flex:1},children:[t.jsxs(u,{display:"flex",flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(ke,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(E,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.logo")}),t.jsxs(ke,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.type"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"png, jpg, webp, svg"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"256x256"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"<500Kb"})]})})]})]}),t.jsx(u,{sx:{flex:1,cursor:o?"default":"pointer",display:"flex",alignItems:"flex-end"},children:t.jsx(Wo,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:h||S,onClick:()=>{var w;P()&&((w=D.current)==null||w.open())}})})]}),t.jsxs(u,{display:"flex",mt:3,flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(ke,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(E,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("common.screenshot")}),t.jsxs(ke,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{sx:{border:"none"},variant:"outlined",size:"small",children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.ratio"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"16 / 9"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"1~5"})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.size"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"<5MB"})]})}),!o&&t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]})})]})]}),t.jsx(go,{onDragEnd:o?void 0:O,children:t.jsx(jo,{droppableId:"screenshots",direction:"horizontal",isDropDisabled:o,children:(w,$)=>t.jsxs(u,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:$.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:$.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:w.innerRef,...w.droppableProps,children:[g.map((q,U)=>t.jsx(ko,{draggableId:q,index:U,isDragDisabled:o,children:(G,ee)=>t.jsxs(u,{ref:G.innerRef,...G.draggableProps,className:"screenshot",sx:{transform:ee.isDragging?"scale(1.05)":"none",boxShadow:ee.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[t.jsx("img",{alt:"screenshot",src:q}),!o&&t.jsx(oe,{...G.dragHandleProps,className:"action",style:{right:40,zIndex:10,color:"#fff"},children:t.jsx(kt,{})}),!o&&t.jsx(oe,{className:"action",onClick:()=>{l(X=>{const ne=[...X.blockletScreenshots];return ne.splice(U,1),{...X,blockletScreenshots:ne}})},children:t.jsx(yo,{})})]})},q)),w.placeholder,g.length<5&&t.jsx(u,{sx:{width:240,height:135,background:"#eee",cursor:o?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{var q;P()&&((q=j.current)==null||q.open())},children:"+"})]})})})]}),t.jsxs(u,{display:"flex",mt:3,flexDirection:"row",flexWrap:"wrap",children:[t.jsxs(ke,{direction:"column",spacing:1,sx:{mr:2,width:"160px"},children:[t.jsx(E,{variant:"subtitle1",sx:{fontWeight:"bold"},children:p("studio.video")}),t.jsxs(ke,{direction:"column",alignItems:"flex-start",spacing:1,sx:{opacity:.8,fontSize:"12px"},children:[t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.videoType"),":"," "]}),t.jsxs(u,{component:"span",sx:{color:"#007ec6"},children:[t.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",t.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})]})}),t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.count"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:"1~3"})]})}),!o&&t.jsx(u,{children:t.jsxs(u,{component:"span",children:[t.jsxs(u,{component:"span",sx:{color:"#555"},children:[p("studio.order"),":"," "]}),t.jsx(u,{component:"span",sx:{color:"#007ec6"},children:p("studio.orderTip")})]})})]})]}),t.jsx(go,{onDragEnd:o?void 0:F,children:t.jsx(jo,{droppableId:"videos",direction:"horizontal",isDropDisabled:o,children:(w,$)=>t.jsxs(u,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap",minHeight:160,background:$.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:$.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:w.innerRef,...w.droppableProps,children:[s.blockletVideos.map((q,U)=>t.jsx(ko,{draggableId:q,index:U,isDragDisabled:o,children:(G,ee)=>t.jsxs(u,{ref:G.innerRef,...G.draggableProps,className:"screenshot",sx:{transform:ee.isDragging?"scale(1.05)":"none",boxShadow:ee.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[t.jsx(ut,{url:q,style:{pointerEvents:ee.isDragging?"none":"auto"}}),!o&&t.jsx(oe,{...G.dragHandleProps,className:"action",style:{right:40,zIndex:10,color:"#fff"},children:t.jsx(kt,{})}),!o&&t.jsx(oe,{className:"action",onClick:()=>{l(X=>{const ne=[...X.blockletVideos];return ne.splice(U,1),{...X,blockletVideos:ne}})},children:t.jsx(yo,{})})]})},q)),w.placeholder,s.blockletVideos.length<3&&t.jsx(u,{sx:{width:240,height:135,background:"#eee",cursor:o?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{P()&&I(!0)},children:"+"})]})})})]})]})}),t.jsxs(R.Suspense,{fallback:t.jsx(Ve,{}),children:[t.jsx(Eo,{ref:D,popup:!0,onUploadFinish:w=>{var $;l({blockletLogo:w.data.filename}),x(""),($=D.current)==null||$.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:W,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","application/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),L&&t.jsx(Ln,{onClose:()=>I(!1),params:s,setParams:l}),t.jsx(Eo,{ref:j,popup:!0,onUploadFinish:w=>{var $;l(q=>{var G;const U=q.blockletScreenshots||[];return U.push((G=w.data)==null?void 0:G.filename),{...q,blockletScreenshots:U}}),($=j.current)==null||$.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:k,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-g.length}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})]})}qn.propTypes={projectId:d.string.isRequired,readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,loading:d.bool.isRequired,blocklet:d.object.isRequired,setLoading:d.func.isRequired,initUrl:d.object.isRequired,componentDid:d.isRequired,initLogoUrl:d.string.isRequired,setInitLogoUrl:d.func.isRequired};const ki=ae.div`
133
133
  margin-top: 24px;
134
134
  .screenshot {
135
135
  margin-bottom: 16px;
@@ -177,7 +177,7 @@ import{r as R,k as Dt,l as lt,L as le,f as Hn,h as Gn,i as pt}from"./vendor-reac
177
177
  padding-bottom: 12px;
178
178
  border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
179
179
  }
180
- `;function On({text:e}){return e?t.jsx(As,{wrapperElement:{"data-color-mode":"light"},source:bs.sanitize(e),rehypePlugins:[[Es,{target:"_blank"}]]}):t.jsx(Ie,{Icon:Mt})}On.propTypes={text:d.string.isRequired};function zn({params:e,setParams:o,paramsErrTip:n,loading:r,setParamsErrTip:s,readOnly:l}){var h;const{t:i}=J(),[a,c]=R.useState(l?"preview":"write"),f=(x,b)=>{c(b)};return t.jsxs(u,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[t.jsxs(u,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[t.jsx(E,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),t.jsxs(Ko,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[t.jsx(tt,{value:"write",label:"Write"}),t.jsx(tt,{value:"preview",label:"Preview"})]})]}),t.jsx(u,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:t.jsx(Y,{disabled:r||l,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:l,endAdornment:t.jsxs(Be,{position:"end",children:[((h=e==null?void 0:e.blockletIntroduction)==null?void 0:h.length)||0," / ",re.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:x=>{s({blockletIntroduction:""}),o({blockletIntroduction:x.target.value.slice(0,re.PROJECT.MAX_INTRO_LENGTH)})},error:!!n.blockletIntroduction,helperText:n.blockletIntroduction||""})}),t.jsx(u,{display:a==="preview"?"block":"none",mt:3,children:t.jsx(On,{text:e.blockletIntroduction||""})})]})}zn.propTypes={params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,readOnly:d.bool.isRequired,loading:d.bool.isRequired};var co={},_i=me;Object.defineProperty(co,"__esModule",{value:!0});var Bn=co.default=void 0,Pi=_i(xe()),Oo=t;Bn=co.default=(0,Pi.default)([(0,Oo.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,Oo.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function ao({step:e,ok:o,active:n,error:r}){let s="grey.500",l=e+1;return o&&(l=t.jsx(Ms,{sx:{fontSize:18,margin:0},color:"white"})),r||!o&&n>e?(s="error.main",l=t.jsx(Bn,{sx:{fontSize:18,margin:0},color:"white"})):n>=e&&(s="primary.main"),t.jsx(u,{width:24,height:24,bgcolor:s,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:l})}ao.propTypes={step:d.number,ok:d.bool,active:d.number,error:d.string};ao.defaultProps={step:0,ok:!1,active:0,error:""};function Vn({steps:e,activeStep:o,setActiveStep:n,hasSelectedResources:r,params:s,loading:l,paramsErrTip:i,viewMode:a,projectId:c}){const{t:f}=J(),h=()=>{n(v=>v+1)},x=()=>{n(v=>v-1)},b=v=>v===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription)||(i==null?void 0:i.blockletHomepage)||(i==null?void 0:i.blockletSupport)||(i==null?void 0:i.blockletCommunity)||(i==null?void 0:i.blockletRepository):v===2?(i==null?void 0:i.blockletResource)||(i==null?void 0:i.blockletDocker)||(i==null?void 0:i.dockerImageName):v>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=a||Nn({hasSelectedResources:r,params:s,projectId:c,t:f})===null;return t.jsxs(u,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[t.jsx(ts,{activeStep:o,orientation:"vertical",children:e.map((v,C)=>{const D={},j=l||!Di({hasSelectedResources:r,params:s,projectId:c,step:C,t:f}),m=l?"":b(C);return m&&(D.optional=t.jsx(E,{variant:"caption",color:"error",children:m}),D.error=!0),t.jsxs(os,{children:[t.jsx(ns,{icon:t.jsx(ao,{error:m,active:p?99:o,step:C,ok:j}),sx:{cursor:"pointer",color:m?"error.main":"inherit"},disabled:!1,onClick:()=>n(C),...D,children:t.jsx(E,{fontSize:"14px",fontWeight:"500",color:m||!j&&o>C?"error.main":"inherit",children:v.label})}),t.jsxs(ss,{children:[t.jsx(E,{fontSize:12,children:v.description}),!p&&t.jsx(u,{sx:{mb:2},children:t.jsxs("div",{children:[C<e.length-1&&t.jsx(Q,{variant:"contained",onClick:h,sx:{mt:1,mr:1},disabled:m||!j,children:f("common.continue")}),C>0&&t.jsx(Q,{disabled:C===0,onClick:x,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},v.label)})}),o>=e.length-1&&t.jsx(Tt,{square:!0,elevation:0,sx:{p:3},children:t.jsx(E,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}Vn.propTypes={steps:d.array.isRequired,activeStep:d.number.isRequired,setActiveStep:d.func.isRequired,params:d.object.isRequired,viewMode:d.string.isRequired,loading:d.bool.isRequired,projectId:d.string.isRequired,hasSelectedResources:d.bool.isRequired,paramsErrTip:d.shape({projectId:d.string,blockletVersion:d.string,blockletTitle:d.string,blockletDescription:d.string,note:d.string,blockletResource:d.string,blockletHomepage:d.string,blockletSupport:d.string,blockletCommunity:d.string,blockletRepository:d.string,blockletDocker:d.object,dockerImageName:d.string}).isRequired};const Li=[".zip",".gz"],qi=1024*1024*100,$i=R.lazy(()=>tn(()=>import("./index-BJpEKQ4d.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.Uploader})));function uo({app:e,projectId:o,readOnly:n,params:r,setParams:s,setParamsErrTip:l,error:i}){const{t:a}=J(),c=R.useRef(null),f=()=>n?!1:!o||o===H.UNOWNED_DID?(V.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,h=`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${o}/resource/upload`;return t.jsxs(u,{sx:{mt:3},children:[t.jsx(E,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),t.jsxs(ke,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:n?"default":"pointer"},children:[!!r.uploadedResource&&t.jsx(E,{component:"a",href:`${h}/params.uploadedResource`,children:r.uploadedResource}),!n&&t.jsx(Q,{variant:"outlined",size:"small",onClick:()=>{var x;f()&&((x=c.current)==null||x.open())},children:r.uploadedResource?a("common.change"):a("common.upload")})]}),t.jsx(R.Suspense,{fallback:t.jsx(Ve,{}),children:t.jsx($i,{ref:c,popup:!0,onUploadFinish:x=>{var b;s({uploadedResource:x.data.filename}),l({blockletResource:""}),(b=c.current)==null||b.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:h,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileExts:Li,maxFileSize:qi,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&t.jsx(u,{color:"error.main",mt:1,fontSize:14,children:i})]})}uo.propTypes={app:d.object.isRequired,projectId:d.string.isRequired,readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,error:d.string.isRequired,setParamsErrTip:d.func.isRequired};uo.defaultProps={};function rt({readOnly:e,params:o,setParams:n,paramsErrTip:r,setParamsErrTip:s,loading:l}){var a;const{t:i}=J();return t.jsx(u,{display:"flex",mt:3,className:"section",children:t.jsxs(u,{sx:{flex:1},children:[t.jsx(Y,{required:!0,disabled:l||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:o.blockletVersion||"",onChange:c=>{s({blockletVersion:""}),n({blockletVersion:c.target.value})},error:!!r.blockletVersion,helperText:r.blockletVersion||""}),t.jsx(Y,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:l||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:t.jsxs(Be,{position:"end",children:[((a=o==null?void 0:o.note)==null?void 0:a.length)||0," / ",re.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:o.note||"",onChange:c=>{s({note:""}),n({note:c.target.value.slice(0,re.PROJECT.MAX_NOTE_LENGTH)})},error:!!r.note,helperText:r.note||"",sx:{mt:3}})]})})}rt.propTypes={readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,loading:d.bool.isRequired};rt.defaultProps={};function Wn(e){for(const o in e)typeof e[o]=="string"?e[o]=e[o].replace(/\\\\/g,"\\"):typeof e[o]=="object"&&e[o]!==null&&Wn(e[o]);return e}function it({index:e,item:o,dockerParams:n,setDockerParams:r,dataKey:s,t:l,readOnly:i}){const a=(o==null?void 0:o.value)||"",[c,f]=R.useState(!1),h=()=>{var k;(k=n[s])==null||k.splice(e,1),r({...n,[s]:[...n[s]]})},x=(k,S)=>{var g;(g=n[s])!=null&&g[e]&&(S?(n[s][e].custom=n[s][e].value,n[s][e].value=`$${ht(o.key)}`):(n[s][e].value=n[s][e].custom||"",n[s][e].custom="")),r({...n,[s]:[...n[s]]})},b=(k,S)=>{var P;const g=((P=n[s][e])==null?void 0:P.value)||"";n[s][e]={...n[s][e],secure:S,value:S&&g===re.BLOCKLET_AUTOMATIC_ENV_VALUE?"":g},r({...n,[s]:[...n[s]]})},p=(k,S)=>{n[s][e]={...n[s][e],shared:S},r({...n,[s]:[...n[s]]})},v=(k,S)=>{var P;const g=((P=n[s][e])==null?void 0:P.value)||"";n[s][e]={...n[s][e],required:S,value:S&&g===re.BLOCKLET_AUTOMATIC_ENV_VALUE?"":g},r({...n,[s]:[...n[s]]})},C=(k,S)=>{n[s][e]={...n[s][e],value:S?re.BLOCKLET_AUTOMATIC_ENV_VALUE:"",secure:!1,required:!1},r({...n,[s]:[...n[s]]})},D=k=>{n[s][e]={...n[s][e],description:k.target.value},r({...n,[s]:[...n[s]]})},j=k=>{const S=k.target.value==="web"?"web":"docker";S==="web"&&n.dockerArgs.forEach(O=>{O.type="docker"});const P=`/${n.dockerImage.replace(/\W/g,"-")}-${e}`;n.dockerArgs[e]={...n.dockerArgs[e],type:S,path:S==="docker"?P:"/",protocol:"http",prefix:S==="docker"?P:"/",name:"publicUrl",port:"BLOCKLET_PORT"},r({...n,dockerArgs:[...n.dockerArgs]})},m=k=>{const S=k.target.value;n[s][e]={...n[s][e],prefix:S,path:S==="*"?"/":S},r({...n,[s]:[...n[s]]})},T=k=>{var S;(S=n[s])!=null&&S[e]&&(n[s][e].value=k.target.value),r({...n,[s]:[...n[s]]})},L=a===`$${ht(o.key)}`||o.custom,I=s==="dockerArgs"&&!ln[o.key],y=_s[o.key],_=s==="dockerEnvs",A=o.key==="--publish";let W=o.key;return A&&o.type==="web"?W="--publish (Web)":_&&(W=`--env ${o.key}`),t.jsxs(u,{sx:{display:"flex",flexDirection:"row",gap:2,alignItems:"center"},children:[t.jsx(u,{sx:{width:250},children:t.jsx(E,{sx:{textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:W})}),t.jsxs(u,{sx:{display:"flex",flexDirection:"column",gap:1,flex:1},children:[t.jsx(Y,{disabled:i||L||I||o.value===re.BLOCKLET_AUTOMATIC_ENV_VALUE,placeholder:"",value:L?`$${ht(o.key)}`:a,sx:{flex:1},InputProps:{endAdornment:t.jsxs(Be,{position:"end",sx:{zoom:.9},children:[(!(y||I)||_||A)&&t.jsx(oe,{onClick:()=>f(!0),children:t.jsx(se,{icon:"icon-park-outline:setting-config"})}),!i&&t.jsx(oe,{onClick:h,color:I?"error":"default",children:t.jsx(se,{icon:"ic:round-delete"})})]})},error:I,onChange:T}),I&&t.jsx(E,{variant:"caption",color:"error",children:l("blocklet.publish.docker.noAllowTheArg")}),o.key==="--publish"&&t.jsx(E,{variant:"caption",color:"text.secondary",children:l("blocklet.publish.docker.publishTips")}),o.key==="--volume"&&Ps[o.key](a)&&t.jsx(E,{variant:"caption",color:"error",children:l("blocklet.publish.docker.volumeTips")})]}),c&&t.jsx(Lt,{open:!0,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:0}},title:l(_?"blocklet.publish.docker.modifyEnv":"blocklet.publish.docker.modifyParam"),onClose:()=>f(!1),children:t.jsxs(u,{sx:{display:"flex",flexDirection:"column",gap:1,paddingBottom:2},children:[y||I||_?null:t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{children:l("blocklet.publish.docker.needCustomInput")}),t.jsx(ye,{disabled:i,checked:L,onChange:x,sx:{zoom:.9}})]}),_&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{children:l("blocklet.publish.docker.shared")}),t.jsx(ye,{disabled:i,checked:o.shared,onChange:p,sx:{zoom:.9}})]}),_&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{children:l("blocklet.publish.docker.required")}),t.jsx(ye,{disabled:i,checked:o.required,onChange:v,sx:{zoom:.9}})]}),_&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{children:l("blocklet.publish.docker.secure")}),t.jsx(ye,{disabled:i,checked:o.secure,onChange:b,sx:{zoom:.9}})]}),_&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{children:l("blocklet.publish.docker.autoGenerated")}),t.jsx(ye,{disabled:i,checked:o.value===re.BLOCKLET_AUTOMATIC_ENV_VALUE,onChange:C,sx:{zoom:.9}})]}),_&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{sx:{flex:1},children:l("blocklet.publish.docker.description")}),t.jsx(Y,{disabled:i,value:o.description,onChange:D,sx:{flex:1},label:l("blocklet.publish.docker.description")})]}),A&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{sx:{flex:1},children:l("blocklet.publish.docker.portType")}),t.jsxs(en,{value:o.type||"docker",onChange:j,children:[t.jsx(pe,{value:"docker",children:"Docker"}),t.jsx(pe,{value:"web",children:"Web"})]})]}),A&&o.type==="web"&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{sx:{flex:1},children:l("blocklet.publish.docker.prefix")}),t.jsx(Y,{disabled:i,value:o.prefix,onChange:m,sx:{flex:1},label:l("blocklet.publish.docker.prefix")})]})]})})]})}it.propTypes={dockerParams:d.object.isRequired,setDockerParams:d.func.isRequired,dataKey:d.string.isRequired,item:d.object.isRequired,t:d.func.isRequired,readOnly:d.bool.isRequired,index:d.number.isRequired};it.defaultProps={};const Ni=`
180
+ `;function On({text:e}){return e?t.jsx(As,{wrapperElement:{"data-color-mode":"light"},source:bs.sanitize(e),rehypePlugins:[[Es,{target:"_blank"}]]}):t.jsx(Ie,{Icon:Mt})}On.propTypes={text:d.string.isRequired};function zn({params:e,setParams:o,paramsErrTip:n,loading:r,setParamsErrTip:s,readOnly:l}){var h;const{t:i}=J(),[a,c]=R.useState(l?"preview":"write"),f=(x,b)=>{c(b)};return t.jsxs(u,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[t.jsxs(u,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[t.jsx(E,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),t.jsxs(Ko,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[t.jsx(tt,{value:"write",label:"Write"}),t.jsx(tt,{value:"preview",label:"Preview"})]})]}),t.jsx(u,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:t.jsx(Y,{disabled:r||l,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:l,endAdornment:t.jsxs(Be,{position:"end",children:[((h=e==null?void 0:e.blockletIntroduction)==null?void 0:h.length)||0," / ",re.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:x=>{s({blockletIntroduction:""}),o({blockletIntroduction:x.target.value.slice(0,re.PROJECT.MAX_INTRO_LENGTH)})},error:!!n.blockletIntroduction,helperText:n.blockletIntroduction||""})}),t.jsx(u,{display:a==="preview"?"block":"none",mt:3,children:t.jsx(On,{text:e.blockletIntroduction||""})})]})}zn.propTypes={params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,readOnly:d.bool.isRequired,loading:d.bool.isRequired};var co={},_i=me;Object.defineProperty(co,"__esModule",{value:!0});var Bn=co.default=void 0,Pi=_i(xe()),Oo=t;Bn=co.default=(0,Pi.default)([(0,Oo.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,Oo.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function ao({step:e,ok:o,active:n,error:r}){let s="grey.500",l=e+1;return o&&(l=t.jsx(Ms,{sx:{fontSize:18,margin:0},color:"white"})),r||!o&&n>e?(s="error.main",l=t.jsx(Bn,{sx:{fontSize:18,margin:0},color:"white"})):n>=e&&(s="primary.main"),t.jsx(u,{width:24,height:24,bgcolor:s,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:l})}ao.propTypes={step:d.number,ok:d.bool,active:d.number,error:d.string};ao.defaultProps={step:0,ok:!1,active:0,error:""};function Vn({steps:e,activeStep:o,setActiveStep:n,hasSelectedResources:r,params:s,loading:l,paramsErrTip:i,viewMode:a,projectId:c}){const{t:f}=J(),h=()=>{n(v=>v+1)},x=()=>{n(v=>v-1)},b=v=>v===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription)||(i==null?void 0:i.blockletHomepage)||(i==null?void 0:i.blockletSupport)||(i==null?void 0:i.blockletCommunity)||(i==null?void 0:i.blockletRepository):v===2?(i==null?void 0:i.blockletResource)||(i==null?void 0:i.blockletDocker)||(i==null?void 0:i.dockerImageName):v>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=a||Nn({hasSelectedResources:r,params:s,projectId:c,t:f})===null;return t.jsxs(u,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[t.jsx(ts,{activeStep:o,orientation:"vertical",children:e.map((v,C)=>{const D={},j=l||!Di({hasSelectedResources:r,params:s,projectId:c,step:C,t:f}),m=l?"":b(C);return m&&(D.optional=t.jsx(E,{variant:"caption",color:"error",children:m}),D.error=!0),t.jsxs(os,{children:[t.jsx(ns,{icon:t.jsx(ao,{error:m,active:p?99:o,step:C,ok:j}),sx:{cursor:"pointer",color:m?"error.main":"inherit"},disabled:!1,onClick:()=>n(C),...D,children:t.jsx(E,{fontSize:"14px",fontWeight:"500",color:m||!j&&o>C?"error.main":"inherit",children:v.label})}),t.jsxs(ss,{children:[t.jsx(E,{fontSize:12,children:v.description}),!p&&t.jsx(u,{sx:{mb:2},children:t.jsxs("div",{children:[C<e.length-1&&t.jsx(Q,{variant:"contained",onClick:h,sx:{mt:1,mr:1},disabled:m||!j,children:f("common.continue")}),C>0&&t.jsx(Q,{disabled:C===0,onClick:x,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},v.label)})}),o>=e.length-1&&t.jsx(Tt,{square:!0,elevation:0,sx:{p:3},children:t.jsx(E,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}Vn.propTypes={steps:d.array.isRequired,activeStep:d.number.isRequired,setActiveStep:d.func.isRequired,params:d.object.isRequired,viewMode:d.string.isRequired,loading:d.bool.isRequired,projectId:d.string.isRequired,hasSelectedResources:d.bool.isRequired,paramsErrTip:d.shape({projectId:d.string,blockletVersion:d.string,blockletTitle:d.string,blockletDescription:d.string,note:d.string,blockletResource:d.string,blockletHomepage:d.string,blockletSupport:d.string,blockletCommunity:d.string,blockletRepository:d.string,blockletDocker:d.object,dockerImageName:d.string}).isRequired};const Li=[".zip",".gz"],qi=1024*1024*100,$i=R.lazy(()=>tn(()=>import("./index-BDfZ8xEV.js").then(e=>e.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(e=>({default:e.Uploader})));function uo({app:e,projectId:o,readOnly:n,params:r,setParams:s,setParamsErrTip:l,error:i}){const{t:a}=J(),c=R.useRef(null),f=()=>n?!1:!o||o===H.UNOWNED_DID?(V.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,h=`${H.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${o}/resource/upload`;return t.jsxs(u,{sx:{mt:3},children:[t.jsx(E,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),t.jsxs(ke,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:n?"default":"pointer"},children:[!!r.uploadedResource&&t.jsx(E,{component:"a",href:`${h}/params.uploadedResource`,children:r.uploadedResource}),!n&&t.jsx(Q,{variant:"outlined",size:"small",onClick:()=>{var x;f()&&((x=c.current)==null||x.open())},children:r.uploadedResource?a("common.change"):a("common.upload")})]}),t.jsx(R.Suspense,{fallback:t.jsx(Ve,{}),children:t.jsx($i,{ref:c,popup:!0,onUploadFinish:x=>{var b;s({uploadedResource:x.data.filename}),l({blockletResource:""}),(b=c.current)==null||b.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:h,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileExts:Li,maxFileSize:qi,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&t.jsx(u,{color:"error.main",mt:1,fontSize:14,children:i})]})}uo.propTypes={app:d.object.isRequired,projectId:d.string.isRequired,readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,error:d.string.isRequired,setParamsErrTip:d.func.isRequired};uo.defaultProps={};function rt({readOnly:e,params:o,setParams:n,paramsErrTip:r,setParamsErrTip:s,loading:l}){var a;const{t:i}=J();return t.jsx(u,{display:"flex",mt:3,className:"section",children:t.jsxs(u,{sx:{flex:1},children:[t.jsx(Y,{required:!0,disabled:l||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:o.blockletVersion||"",onChange:c=>{s({blockletVersion:""}),n({blockletVersion:c.target.value})},error:!!r.blockletVersion,helperText:r.blockletVersion||""}),t.jsx(Y,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:l||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:t.jsxs(Be,{position:"end",children:[((a=o==null?void 0:o.note)==null?void 0:a.length)||0," / ",re.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:o.note||"",onChange:c=>{s({note:""}),n({note:c.target.value.slice(0,re.PROJECT.MAX_NOTE_LENGTH)})},error:!!r.note,helperText:r.note||"",sx:{mt:3}})]})})}rt.propTypes={readOnly:d.bool.isRequired,params:d.object.isRequired,setParams:d.func.isRequired,paramsErrTip:d.object.isRequired,setParamsErrTip:d.func.isRequired,loading:d.bool.isRequired};rt.defaultProps={};function Wn(e){for(const o in e)typeof e[o]=="string"?e[o]=e[o].replace(/\\\\/g,"\\"):typeof e[o]=="object"&&e[o]!==null&&Wn(e[o]);return e}function it({index:e,item:o,dockerParams:n,setDockerParams:r,dataKey:s,t:l,readOnly:i}){const a=(o==null?void 0:o.value)||"",[c,f]=R.useState(!1),h=()=>{var k;(k=n[s])==null||k.splice(e,1),r({...n,[s]:[...n[s]]})},x=(k,S)=>{var g;(g=n[s])!=null&&g[e]&&(S?(n[s][e].custom=n[s][e].value,n[s][e].value=`$${ht(o.key)}`):(n[s][e].value=n[s][e].custom||"",n[s][e].custom="")),r({...n,[s]:[...n[s]]})},b=(k,S)=>{var P;const g=((P=n[s][e])==null?void 0:P.value)||"";n[s][e]={...n[s][e],secure:S,value:S&&g===re.BLOCKLET_AUTOMATIC_ENV_VALUE?"":g},r({...n,[s]:[...n[s]]})},p=(k,S)=>{n[s][e]={...n[s][e],shared:S},r({...n,[s]:[...n[s]]})},v=(k,S)=>{var P;const g=((P=n[s][e])==null?void 0:P.value)||"";n[s][e]={...n[s][e],required:S,value:S&&g===re.BLOCKLET_AUTOMATIC_ENV_VALUE?"":g},r({...n,[s]:[...n[s]]})},C=(k,S)=>{n[s][e]={...n[s][e],value:S?re.BLOCKLET_AUTOMATIC_ENV_VALUE:"",secure:!1,required:!1},r({...n,[s]:[...n[s]]})},D=k=>{n[s][e]={...n[s][e],description:k.target.value},r({...n,[s]:[...n[s]]})},j=k=>{const S=k.target.value==="web"?"web":"docker";S==="web"&&n.dockerArgs.forEach(O=>{O.type="docker"});const P=`/${n.dockerImage.replace(/\W/g,"-")}-${e}`;n.dockerArgs[e]={...n.dockerArgs[e],type:S,path:S==="docker"?P:"/",protocol:"http",prefix:S==="docker"?P:"/",name:"publicUrl",port:"BLOCKLET_PORT"},r({...n,dockerArgs:[...n.dockerArgs]})},m=k=>{const S=k.target.value;n[s][e]={...n[s][e],prefix:S,path:S==="*"?"/":S},r({...n,[s]:[...n[s]]})},T=k=>{var S;(S=n[s])!=null&&S[e]&&(n[s][e].value=k.target.value),r({...n,[s]:[...n[s]]})},L=a===`$${ht(o.key)}`||o.custom,I=s==="dockerArgs"&&!ln[o.key],y=_s[o.key],_=s==="dockerEnvs",A=o.key==="--publish";let W=o.key;return A&&o.type==="web"?W="--publish (Web)":_&&(W=`--env ${o.key}`),t.jsxs(u,{sx:{display:"flex",flexDirection:"row",gap:2,alignItems:"center"},children:[t.jsx(u,{sx:{width:250},children:t.jsx(E,{sx:{textOverflow:"ellipsis",width:"100%",overflow:"hidden"},children:W})}),t.jsxs(u,{sx:{display:"flex",flexDirection:"column",gap:1,flex:1},children:[t.jsx(Y,{disabled:i||L||I||o.value===re.BLOCKLET_AUTOMATIC_ENV_VALUE,placeholder:"",value:L?`$${ht(o.key)}`:a,sx:{flex:1},InputProps:{endAdornment:t.jsxs(Be,{position:"end",sx:{zoom:.9},children:[(!(y||I)||_||A)&&t.jsx(oe,{onClick:()=>f(!0),children:t.jsx(se,{icon:"icon-park-outline:setting-config"})}),!i&&t.jsx(oe,{onClick:h,color:I?"error":"default",children:t.jsx(se,{icon:"ic:round-delete"})})]})},error:I,onChange:T}),I&&t.jsx(E,{variant:"caption",color:"error",children:l("blocklet.publish.docker.noAllowTheArg")}),o.key==="--publish"&&t.jsx(E,{variant:"caption",color:"text.secondary",children:l("blocklet.publish.docker.publishTips")}),o.key==="--volume"&&Ps[o.key](a)&&t.jsx(E,{variant:"caption",color:"error",children:l("blocklet.publish.docker.volumeTips")})]}),c&&t.jsx(Lt,{open:!0,fullWidth:!0,maxWidth:"sm",PaperProps:{style:{minHeight:0}},title:l(_?"blocklet.publish.docker.modifyEnv":"blocklet.publish.docker.modifyParam"),onClose:()=>f(!1),children:t.jsxs(u,{sx:{display:"flex",flexDirection:"column",gap:1,paddingBottom:2},children:[y||I||_?null:t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{children:l("blocklet.publish.docker.needCustomInput")}),t.jsx(ye,{disabled:i,checked:L,onChange:x,sx:{zoom:.9}})]}),_&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{children:l("blocklet.publish.docker.shared")}),t.jsx(ye,{disabled:i,checked:o.shared,onChange:p,sx:{zoom:.9}})]}),_&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{children:l("blocklet.publish.docker.required")}),t.jsx(ye,{disabled:i,checked:o.required,onChange:v,sx:{zoom:.9}})]}),_&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{children:l("blocklet.publish.docker.secure")}),t.jsx(ye,{disabled:i,checked:o.secure,onChange:b,sx:{zoom:.9}})]}),_&&t.jsxs(u,{sx:{width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{children:l("blocklet.publish.docker.autoGenerated")}),t.jsx(ye,{disabled:i,checked:o.value===re.BLOCKLET_AUTOMATIC_ENV_VALUE,onChange:C,sx:{zoom:.9}})]}),_&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{sx:{flex:1},children:l("blocklet.publish.docker.description")}),t.jsx(Y,{disabled:i,value:o.description,onChange:D,sx:{flex:1},label:l("blocklet.publish.docker.description")})]}),A&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{sx:{flex:1},children:l("blocklet.publish.docker.portType")}),t.jsxs(en,{value:o.type||"docker",onChange:j,children:[t.jsx(pe,{value:"docker",children:"Docker"}),t.jsx(pe,{value:"web",children:"Web"})]})]}),A&&o.type==="web"&&t.jsxs(u,{sx:{mt:1,width:"100%",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},children:[t.jsx(E,{sx:{flex:1},children:l("blocklet.publish.docker.prefix")}),t.jsx(Y,{disabled:i,value:o.prefix,onChange:m,sx:{flex:1},label:l("blocklet.publish.docker.prefix")})]})]})})]})}it.propTypes={dockerParams:d.object.isRequired,setDockerParams:d.func.isRequired,dataKey:d.string.isRequired,item:d.object.isRequired,t:d.func.isRequired,readOnly:d.bool.isRequired,index:d.number.isRequired};it.defaultProps={};const Ni=`
181
181
  docker run --name postgrest
182
182
  -p 3000:3000
183
183
  -e PGRST_DB_URI="postgres://username:password@host:port/database"
@@ -1,4 +1,4 @@
1
- import{r as d}from"./vendor-react-D-afvo_7.js";import{E as l,j as n,a3 as g,aj as A,M as G,I as L,a2 as H,bR as U,aa as Y}from"./vendor-mui-core-CCMNKHtm.js";import{a0 as J,w as Q,aE as Z}from"./vendor-arcblock-CVRRnBv2.js";import{d as v}from"./Done-BegjCX44.js";import{C as ee}from"./Google-oUsdET4E.js";import{aa as te,f as ne}from"./index-PxlbAHCL.js";import{R as re,F as oe,L as se}from"./logo-uploader-D3pYQBpx.js";const N={description:l.string,editing:l.bool,onChange:l.func,required:l.bool,value:l.any,componentProps:l.object,render:l.func,renderFormItem:l.func};function S({editing:r,value:o,onChange:a}){const[c,u]=d.useState(!1),m=d.useRef(),p=d.useRef(o);d.useEffect(()=>{let s=null;return r&&(s=setTimeout(()=>{u(!0)},50)),()=>{clearTimeout(s)}},[r]);const k=s=>{p.current=s,a(s)},b=()=>{u(!1),a(p.current)},I=n.jsx(g,{className:"form-item-input slot",px:1,children:n.jsxs(g,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&n.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=n.jsxs(g,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:b,children:[n.jsx(g,{display:"flex",alignItems:"center",onClick:()=>u(!0),children:n.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),n.jsx(A,{open:c,anchorEl:m.current,onClose:()=>u(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:n.jsx(ee,{color:o,onChange:s=>k(s.hex)})})]});return r?f:I}S.propTypes=N;function _({editing:r,description:o,value:a,onChange:c,componentProps:u,...m}){const{placeholder:p}=u,k=d.useRef(a),{t:b}=d.useContext(J),I=s=>{s.key==="Enter"&&c(k.current,"confirm")},f=s=>{k.current=s,c(s)};return r?n.jsx(G,{style:{flex:1},fullWidth:!0,value:a,onChange:s=>{s.persist(),f(s.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||p,onKeyDown:I,...m}):n.jsx(g,{px:1,className:"form-item-input slot",children:a||n.jsx("span",{className:"placeholder",children:b("common.requiredInputPlaceholder",{name:o||p})})})}_.propTypes=N;_.defaultProps={componentProps:{}};function T({editing:r,value:o,onChange:a,componentProps:c,...u}){const{blocklet:m}=c,p=o==="auto"?Q.getPassportColorFromDid(m.appDid):o;return n.jsxs(g,{display:"flex",alignItems:"center",children:[n.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:te({title:"Owner",issuer:ne.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:o||"auto"})}}),n.jsx(S,{...u,editing:r,value:r?p:o,onChange:a,componentProps:c})]})}T.propTypes={...N,componentProps:l.shape({blocklet:l.object.isRequired}).isRequired};T.defaultProps={};const ie=U`
1
+ import{r as d}from"./vendor-react-D-afvo_7.js";import{E as l,j as n,a3 as g,aj as A,M as G,I as L,a2 as H,bR as U,aa as Y}from"./vendor-mui-core-CCMNKHtm.js";import{a0 as J,w as Q,aE as Z}from"./vendor-arcblock-Bf7AGBSd.js";import{d as v}from"./Done-Bsd0QwkQ.js";import{C as ee}from"./Google-F1HiAjHW.js";import{aa as te,f as ne}from"./index-uosYiNLl.js";import{R as re,F as oe,L as se}from"./logo-uploader-DZm2nb0s.js";const N={description:l.string,editing:l.bool,onChange:l.func,required:l.bool,value:l.any,componentProps:l.object,render:l.func,renderFormItem:l.func};function S({editing:r,value:o,onChange:a}){const[c,u]=d.useState(!1),m=d.useRef(),p=d.useRef(o);d.useEffect(()=>{let s=null;return r&&(s=setTimeout(()=>{u(!0)},50)),()=>{clearTimeout(s)}},[r]);const k=s=>{p.current=s,a(s)},b=()=>{u(!1),a(p.current)},I=n.jsx(g,{className:"form-item-input slot",px:1,children:n.jsxs(g,{display:"flex",alignItems:"center",children:[o,o!=="auto"&&n.jsx("div",{style:{marginLeft:4,backgroundColor:o,width:"1em",height:"1em",borderRadius:"0.2em"}})]})}),f=n.jsxs(g,{display:"flex",flexGrow:1,alignItems:"center",height:"40px",onKeyDown:b,children:[n.jsx(g,{display:"flex",alignItems:"center",onClick:()=>u(!0),children:n.jsx("div",{ref:m,style:{flexShrink:0,marginLeft:"8px",backgroundColor:o,width:"32px",height:"32px",boxSizing:"border-box",borderRadius:"8px",border:"1px solid #eee",cursor:o==="auto"?"default":"pointer"}})}),n.jsx(A,{open:c,anchorEl:m.current,onClose:()=>u(!1),anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:n.jsx(ee,{color:o,onChange:s=>k(s.hex)})})]});return r?f:I}S.propTypes=N;function _({editing:r,description:o,value:a,onChange:c,componentProps:u,...m}){const{placeholder:p}=u,k=d.useRef(a),{t:b}=d.useContext(J),I=s=>{s.key==="Enter"&&c(k.current,"confirm")},f=s=>{k.current=s,c(s)};return r?n.jsx(G,{style:{flex:1},fullWidth:!0,value:a,onChange:s=>{s.persist(),f(s.target.value)},autoFocus:!0,size:"small",variant:"outlined",placeholder:o||p,onKeyDown:I,...m}):n.jsx(g,{px:1,className:"form-item-input slot",children:a||n.jsx("span",{className:"placeholder",children:b("common.requiredInputPlaceholder",{name:o||p})})})}_.propTypes=N;_.defaultProps={componentProps:{}};function T({editing:r,value:o,onChange:a,componentProps:c,...u}){const{blocklet:m}=c,p=o==="auto"?Q.getPassportColorFromDid(m.appDid):o;return n.jsxs(g,{display:"flex",alignItems:"center",children:[n.jsx("div",{style:{width:96,marginRight:12},dangerouslySetInnerHTML:{__html:te({title:"Owner",issuer:ne.getDisplayName(m),issuerDid:m.appDid,ownerName:"Your Name",ownerDid:m.appDid,preferredColor:o||"auto"})}}),n.jsx(S,{...u,editing:r,value:r?p:o,onChange:a,componentProps:c})]})}T.propTypes={...N,componentProps:l.shape({blocklet:l.object.isRequired}).isRequired};T.defaultProps={};const ie=U`
2
2
  0%, 100% {
3
3
  transform: scale(1) translateX(0);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as t,a2 as h,a3 as c,E as d,aa as g}from"./vendor-mui-core-CCMNKHtm.js";import{r as y}from"./vendor-react-D-afvo_7.js";import{a0 as v,C as w,a1 as m}from"./vendor-arcblock-CVRRnBv2.js";import{P}from"./page-header-JASV_XcR.js";import{B as E}from"./index-PxlbAHCL.js";import{u as T}from"./config-space-C1WFdLmf.js";import{C as B,D,a as N}from"./connect-to-D5VZBQsq.js";import{S as u}from"./step-actions-Zk6bKoYE.js";import{S as b}from"./layout-BVSGD29L.js";import"./vendor-utils-5TjOM6td.js";import"./vendor-hooks-BKxTDk_P.js";import"./api-K65cLqol.js";import"./DeleteOutline-_fdI9SLO.js";import"./format-error-C0Ke3VXF.js";import"./content-layout-CzrxMNjA.js";function l({onNext:o,onPrevious:x}){var n,r,p;const{t:a}=y.useContext(v),{blocklet:e}=E(),{spaceGateway:f,settingStorageEndpoint:C,updateSpaceGateway:j,hasStorageEndpoint:S,loading:i,storageEndpoint:s}=T();return i?t.jsx(w,{relative:"parent",children:t.jsx(h,{})}):t.jsxs(G,{children:[t.jsx("div",{className:"header",children:t.jsx(P,{title:a("setup.didSpace.title"),subTitle:a("setup.didSpace.subTitle"),onClickBack:x})}),t.jsx(c,{sx:{width:"100%",maxWidth:"720px"},children:S?t.jsx(B,{spaceGateway:f,settingStorageEndpoint:C}):t.jsx(D,{})}),((n=e==null?void 0:e.capabilities)==null?void 0:n.didSpace)&&t.jsx(c,{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px",children:t.jsx(N,{onConnect:j,storageEndpoint:s})}),((r=e==null?void 0:e.capabilities)==null?void 0:r.didSpace)==="required"&&t.jsx(u,{mt:8,children:t.jsx(m,{loading:i,variant:"contained",disabled:i||!s,onClick:()=>o(),children:a("setup.continue")})}),((p=e==null?void 0:e.capabilities)==null?void 0:p.didSpace)==="optional"&&t.jsx(u,{blocklet:e,onStartNow:()=>o("complete"),children:t.jsx(m,{className:"start-now",loading:i,variant:"contained",disabled:i,onClick:()=>o(),children:a(s?"setup.continue":"setup.skip")})})]})}l.propTypes={onNext:d.func,onPrevious:d.func};l.defaultProps={onNext:()=>{},onPrevious:()=>{}};const G=g(b)`
1
+ import{j as t,a2 as h,a3 as c,E as d,aa as g}from"./vendor-mui-core-CCMNKHtm.js";import{r as y}from"./vendor-react-D-afvo_7.js";import{a0 as v,C as w,a1 as m}from"./vendor-arcblock-Bf7AGBSd.js";import{P}from"./page-header-CJHCTtBc.js";import{B as E}from"./index-uosYiNLl.js";import{u as T}from"./config-space-piVzY5c1.js";import{C as B,D,a as N}from"./connect-to-BzfmK9yx.js";import{S as u}from"./step-actions-BYFwIhu4.js";import{S as b}from"./layout-Dv_7-Fpq.js";import"./vendor-utils-5TjOM6td.js";import"./vendor-hooks-BKxTDk_P.js";import"./api-K65cLqol.js";import"./DeleteOutline-BaOxCgo3.js";import"./format-error-C0Ke3VXF.js";import"./content-layout-CzrxMNjA.js";function l({onNext:o,onPrevious:x}){var n,r,p;const{t:a}=y.useContext(v),{blocklet:e}=E(),{spaceGateway:f,settingStorageEndpoint:C,updateSpaceGateway:j,hasStorageEndpoint:S,loading:i,storageEndpoint:s}=T();return i?t.jsx(w,{relative:"parent",children:t.jsx(h,{})}):t.jsxs(G,{children:[t.jsx("div",{className:"header",children:t.jsx(P,{title:a("setup.didSpace.title"),subTitle:a("setup.didSpace.subTitle"),onClickBack:x})}),t.jsx(c,{sx:{width:"100%",maxWidth:"720px"},children:S?t.jsx(B,{spaceGateway:f,settingStorageEndpoint:C}):t.jsx(D,{})}),((n=e==null?void 0:e.capabilities)==null?void 0:n.didSpace)&&t.jsx(c,{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px",children:t.jsx(N,{onConnect:j,storageEndpoint:s})}),((r=e==null?void 0:e.capabilities)==null?void 0:r.didSpace)==="required"&&t.jsx(u,{mt:8,children:t.jsx(m,{loading:i,variant:"contained",disabled:i||!s,onClick:()=>o(),children:a("setup.continue")})}),((p=e==null?void 0:e.capabilities)==null?void 0:p.didSpace)==="optional"&&t.jsx(u,{blocklet:e,onStartNow:()=>o("complete"),children:t.jsx(m,{className:"start-now",loading:i,variant:"contained",disabled:i,onClick:()=>o(),children:a(s?"setup.continue":"setup.skip")})})]})}l.propTypes={onNext:d.func,onPrevious:d.func};l.defaultProps={onNext:()=>{},onPrevious:()=>{}};const G=g(b)`
2
2
  height: 100%;
3
3
  overflow-y: auto;
4
4
  `;export{l as default};
@@ -1 +1 @@
1
- import{j as t,aa as r}from"./vendor-mui-core-CCMNKHtm.js";import{r as s}from"./vendor-react-D-afvo_7.js";import{a0 as a,R as e}from"./vendor-arcblock-CVRRnBv2.js";import"./vendor-utils-5TjOM6td.js";import"./vendor-hooks-BKxTDk_P.js";function u(){const{t:o}=s.useContext(a);return t.jsx(n,{style:{paddingTop:"25vh"},children:t.jsx(e,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const n=r.main``;export{u as default};
1
+ import{j as t,aa as r}from"./vendor-mui-core-CCMNKHtm.js";import{r as s}from"./vendor-react-D-afvo_7.js";import{a0 as a,R as e}from"./vendor-arcblock-Bf7AGBSd.js";import"./vendor-utils-5TjOM6td.js";import"./vendor-hooks-BKxTDk_P.js";function u(){const{t:o}=s.useContext(a);return t.jsx(n,{style:{paddingTop:"25vh"},children:t.jsx(e,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const n=r.main``;export{u as default};