@abtnode/blocklet-services 1.16.45-beta-20250609-025419-7fd1f86c → 1.16.45-beta-20250609-111118-0d252ebe

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 (86) hide show
  1. package/dist/assets/{access-control-Bu9cwoFT.js → access-control-nyeEpwlF.js} +1 -1
  2. package/dist/assets/{add-component-core-CsW-bf6w.js → add-component-core-CaE3xcyT.js} +1 -1
  3. package/dist/assets/{add-resource-D1GK1xW7.js → add-resource-CG8u25Lv.js} +1 -1
  4. package/dist/assets/{advanced-BSxn1YDX.js → advanced-yrYBgA5T.js} +1 -1
  5. package/dist/assets/{appearance-rcoe4DP4.js → appearance-DB1QowgL.js} +1 -1
  6. package/dist/assets/{audit-logs-XAopC8XN.js → audit-logs-BamIXrWh.js} +1 -1
  7. package/dist/assets/{authorize-DNwNxF9-.js → authorize-B9LP0G9q.js} +1 -1
  8. package/dist/assets/{branding-DpIlP_xM.js → branding-C2Dm2Z1c.js} +1 -1
  9. package/dist/assets/{branding-moJCZl3a.js → branding-OlEgtAUT.js} +2 -2
  10. package/dist/assets/{bundle-avatar-D28BGkcC.js → bundle-avatar-C41ZXEbR.js} +1 -1
  11. package/dist/assets/{complete-C6_ojDUa.js → complete-gnnvUqGU.js} +1 -1
  12. package/dist/assets/{component-OYgpJSh4.js → component-ClWADDCr.js} +1 -1
  13. package/dist/assets/{config-C_hb7xhJ.js → config-2Sy6fCTJ.js} +1 -1
  14. package/dist/assets/{config-navigation-VPQM3i1K.js → config-navigation-CsVa3Hf0.js} +3 -3
  15. package/dist/assets/{config-space-CBoUabjP.js → config-space-B39Ur9Mf.js} +1 -1
  16. package/dist/assets/{confirm-BjCmRSAF.js → confirm-Bay3BcpN.js} +1 -1
  17. package/dist/assets/connect-B77rXeVL.js +5 -0
  18. package/dist/assets/{connect-CQ-AWW94.js → connect-T4cAO9om.js} +1 -1
  19. package/dist/assets/{connect-to-kM9lCXLX.js → connect-to-Dac7orQh.js} +1 -1
  20. package/dist/assets/{dashboard-B7qE-Md0.js → dashboard-k0XcV2m5.js} +3 -3
  21. package/dist/assets/{delete-confirm-Dow_C0jR.js → delete-confirm-B1F5wKdb.js} +1 -1
  22. package/dist/assets/domain-CEwb0Lyz.js +9 -0
  23. package/dist/assets/{domain-action-card-CCtkcxNz.js → domain-action-card-yyZstsWL.js} +1 -1
  24. package/dist/assets/domains-CRt4uYYF.js +1 -0
  25. package/dist/assets/dot-DR7_m3Np.js +7 -0
  26. package/dist/assets/{email-DDPCqu4Z.js → email-CYOorZ7K.js} +1 -1
  27. package/dist/assets/{exchange-passport-xdsOlfWE.js → exchange-passport-xHfEBrd8.js} +1 -1
  28. package/dist/assets/{fuel-D1fw-gpI.js → fuel-CtSAk9S3.js} +1 -1
  29. package/dist/assets/{gen-access-key-R0_DUG_D.js → gen-access-key-CoOxXtqa.js} +1 -1
  30. package/dist/assets/{index-DVLOAsDQ.js → index-8kcb4Nom.js} +1 -1
  31. package/dist/assets/{index-DQjZ74P0.js → index-B18R5SlV.js} +2 -2
  32. package/dist/assets/{index-CCrgDhTM.js → index-B1fP-8KR.js} +1 -1
  33. package/dist/assets/{index-B-K0Nvyz.js → index-B4wY8GsU.js} +1 -1
  34. package/dist/assets/{index-DWZfwLDs.js → index-B7qZ5OdP.js} +1 -1
  35. package/dist/assets/{index-BSiKOdsD.js → index-C5vFhD_w.js} +1 -1
  36. package/dist/assets/{index-BBuUqC0B.js → index-CI4cLtBE.js} +1 -1
  37. package/dist/assets/{index-BY-e9TG4.js → index-CTfYMqG2.js} +1 -1
  38. package/dist/assets/{index-DnDFazyx.js → index-CY9xLy04.js} +3 -3
  39. package/dist/assets/{index-BDw54V1q.js → index-Cx-ESLe9.js} +4 -4
  40. package/dist/assets/{index-NE1bWD-Q.js → index-CyS4mBmV.js} +1 -1
  41. package/dist/assets/{index-At5NExT-.js → index-DMSe2Qjx.js} +1 -1
  42. package/dist/assets/{index-B4FABIlz.js → index-DO-a7P7z.js} +1 -1
  43. package/dist/assets/{index-Drni9chH.js → index-DQl2QJod.js} +1 -1
  44. package/dist/assets/{index-Hs7lhrID.js → index-DaMn1fo9.js} +4 -4
  45. package/dist/assets/{index-By1VEzOz.js → index-j6UAnd8n.js} +1 -1
  46. package/dist/assets/{invitation-Sx6eoeir.js → invitation-BsuZg3B2.js} +1 -1
  47. package/dist/assets/{invite-CZ68j_lY.js → invite-YNiMO-nB.js} +1 -1
  48. package/dist/assets/{issue-passport-IkLenFGe.js → issue-passport-2R7-XHuR.js} +1 -1
  49. package/dist/assets/{item-RUDvbSOI.js → item-DHMVgmIa.js} +1 -1
  50. package/dist/assets/{layout-BCvTd67o.js → layout-BnunMkuP.js} +1 -1
  51. package/dist/assets/{list-BeFxJZxl.js → list-DZwgo-zf.js} +1 -1
  52. package/dist/assets/{list-DjvUHEwY.js → list-h4Ed_myi.js} +2 -2
  53. package/dist/assets/{log-BGQO-I2s.js → log-6M_J_pon.js} +1 -1
  54. package/dist/assets/{login-BF0iOJJn.js → login-C2ILZhOf.js} +1 -1
  55. package/dist/assets/{logo-uploader-BecsVnr8.js → logo-uploader-Dhh7Un4G.js} +2 -2
  56. package/dist/assets/{lost-passport-CaF7MO2m.js → lost-passport-JODD9Yck.js} +1 -1
  57. package/dist/assets/open-window-Dn44K3ur.js +1 -1
  58. package/dist/assets/{overview-DwmambxV.js → overview-Bjj9JLCV.js} +1 -1
  59. package/dist/assets/{passport-item-DEX2NwJD.js → passport-item-CoNRdRpk.js} +1 -1
  60. package/dist/assets/{publish-resource-Bk548CMo.js → publish-resource-AW43Z8jj.js} +1 -1
  61. package/dist/assets/{runtime-xdMFSsvP.js → runtime-1mGYl_p2.js} +1 -1
  62. package/dist/assets/{security-DCYPNDg3.js → security-C2l4SCkx.js} +1 -1
  63. package/dist/assets/setup-DxzbFXmd.js +30 -0
  64. package/dist/assets/{start-t5ebRJzD.js → start-BotjXVuZ.js} +1 -1
  65. package/dist/assets/{status-C4-MBX3k.js → status-DIJ9lK3F.js} +1 -1
  66. package/dist/assets/{step-actions-Brohu3S-.js → step-actions-DLZOEVat.js} +1 -1
  67. package/dist/assets/table-tips-Czrj7r52.js +1 -1
  68. package/dist/assets/{traffic-BI_ofO44.js → traffic-fPCLOWN3.js} +1 -1
  69. package/dist/assets/{transfer-SwfyIGYE.js → transfer-BqCYXmCB.js} +1 -1
  70. package/dist/assets/{unsubscribe-DFPfNrme.js → unsubscribe-BE77Etc2.js} +1 -1
  71. package/dist/assets/{use-blocklet-logo-6YMz11ob.js → use-blocklet-logo-DGSQQmh2.js} +1 -1
  72. package/dist/assets/use-server-logo-BbYHFDuK.js +1 -1
  73. package/dist/assets/useAsync-BMCqtJH2.js +1 -0
  74. package/dist/assets/useAsync-CBEJDwr0.js +1 -0
  75. package/dist/assets/{user-center-BjGMsOGg.js → user-center-olJmefSX.js} +1 -1
  76. package/dist/assets/{util-BBMAZSVn.js → util-xXGeezrD.js} +1 -1
  77. package/dist/assets/{wrap-locale-378mdIBS.js → wrap-locale-Byq7otyk.js} +1 -1
  78. package/dist/index.html +1 -1
  79. package/dist/service-worker.js +1 -1
  80. package/package.json +22 -22
  81. package/dist/assets/connect-B6S3YIgF.js +0 -5
  82. package/dist/assets/domain-B8NapX5o.js +0 -9
  83. package/dist/assets/domains-DzI4bWdK.js +0 -1
  84. package/dist/assets/dot-BID2dzD_.js +0 -7
  85. package/dist/assets/setup-CQ7O7nI0.js +0 -30
  86. package/dist/assets/useAsync-B6ZHbOEG.js +0 -1
@@ -1,4 +1,4 @@
1
- import{e as h,j as e,aa as c,bp as E,bv as g,bt as L,bw as N,H as y,ah as I}from"./vendor-mui-core-wlbruq2I.js";import{r as m}from"./vendor-react-DEoibe3W.js";import{a as b,k as o,a3 as j}from"./vendor-ux-did-connect-CX7qG3_M.js";import{A as O}from"./config-QpBBpp7d.js";import{P}from"./page-header-JH9JWGMg.js";import{k as T,f as v,e as R}from"./index-DQjZ74P0.js";import{S as Y}from"./layout-BCvTd67o.js";import{S as k}from"./step-actions-Brohu3S-.js";import{S as H}from"./button-C0Vra3Ak.js";import"./vendor-utils-B3iZkn2R.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";import"./content-layout-DuPlKBe3.js";import"./use-mobile-CXU9YBvX.js";function C({onNext:s}){const S=h(),{t:n,locale:p}=b(),[i,l]=m.useState(!1),[f,d]=m.useState(""),{blocklet:r}=T();m.useEffect(()=>{var a;const t=v.findServiceFromMeta(r.meta,o.NODE_SERVICES.AUTH);d(((a=t==null?void 0:t.config)==null?void 0:a.whoCanAccess)||o.WHO_CAN_ACCESS.ALL)},[r]);const u=async t=>{let a=o.ACCESS_POLICY_PUBLIC;t===o.WHO_CAN_ACCESS.ALL?a=o.ACCESS_POLICY_PUBLIC:t===o.WHO_CAN_ACCESS.INVITED?a=o.ACCESS_POLICY_INVITED_ONLY:t===o.WHO_CAN_ACCESS.OWNER?a=o.ACCESS_POLICY_OWNER_ONLY:t===o.WHO_CAN_ACCESS.ADMIN&&(a=o.ACCESS_POLICY_ADMIN_ONLY);try{l(!0),await R.updateBlockletSecurityRule({input:{did:r.meta.did,data:{id:o.SECURITY_RULE_DEFAULT_ID,accessPolicyId:a}}}),l(!1)}catch(A){l(!1),j.error(A.message)}},x=async t=>{i||(d(t.target.value),await u(t.target.value))},_={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:S.palette.text.secondary};return e.jsxs(D,{children:[e.jsx(c,{className:"header",children:e.jsx(P,{title:n("blocklet.config.access.title"),subTitle:n("blocklet.config.access.description")})}),e.jsx(E,{component:"fieldset",children:e.jsx(g,{name:"inherit",value:f,onChange:x,children:O.map(t=>e.jsxs(c,{sx:{mb:2},children:[e.jsx(L,{value:t.value,control:e.jsx(N,{size:"small",color:"primary"}),label:e.jsxs("span",{style:{display:"flex",alignItems:"center",position:"relative"},children:[e.jsx(t.icon,{style:_}),e.jsx("span",{style:{marginTop:2},children:t.title[p]})]})}),e.jsx(c,{className:"tip",children:t.description[p]})]},t.value))})}),e.jsx(k,{mt:8,disabled:i,blocklet:r,onStartNow:()=>s("complete"),children:e.jsx(H,{loading:i,variant:"contained",disabled:i,onClick:()=>s(),children:n("setup.continue")})})]})}C.propTypes={onNext:y.func};C.defaultProps={onNext:()=>{}};const D=I(Y)`
1
+ import{e as h,j as e,aa as c,bp as E,bv as g,bt as L,bw as N,H as y,ah as I}from"./vendor-mui-core-wlbruq2I.js";import{r as m}from"./vendor-react-DEoibe3W.js";import{a as b,k as o,a3 as j}from"./vendor-ux-did-connect-CX7qG3_M.js";import{A as O}from"./config-QpBBpp7d.js";import{P}from"./page-header-JH9JWGMg.js";import{k as T,f as v,e as R}from"./index-B18R5SlV.js";import{S as Y}from"./layout-BnunMkuP.js";import{S as k}from"./step-actions-DLZOEVat.js";import{S as H}from"./button-C0Vra3Ak.js";import"./vendor-utils-B3iZkn2R.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";import"./content-layout-DuPlKBe3.js";import"./use-mobile-CiFFAdJf.js";function C({onNext:s}){const S=h(),{t:n,locale:p}=b(),[i,l]=m.useState(!1),[f,d]=m.useState(""),{blocklet:r}=T();m.useEffect(()=>{var a;const t=v.findServiceFromMeta(r.meta,o.NODE_SERVICES.AUTH);d(((a=t==null?void 0:t.config)==null?void 0:a.whoCanAccess)||o.WHO_CAN_ACCESS.ALL)},[r]);const u=async t=>{let a=o.ACCESS_POLICY_PUBLIC;t===o.WHO_CAN_ACCESS.ALL?a=o.ACCESS_POLICY_PUBLIC:t===o.WHO_CAN_ACCESS.INVITED?a=o.ACCESS_POLICY_INVITED_ONLY:t===o.WHO_CAN_ACCESS.OWNER?a=o.ACCESS_POLICY_OWNER_ONLY:t===o.WHO_CAN_ACCESS.ADMIN&&(a=o.ACCESS_POLICY_ADMIN_ONLY);try{l(!0),await R.updateBlockletSecurityRule({input:{did:r.meta.did,data:{id:o.SECURITY_RULE_DEFAULT_ID,accessPolicyId:a}}}),l(!1)}catch(A){l(!1),j.error(A.message)}},x=async t=>{i||(d(t.target.value),await u(t.target.value))},_={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:S.palette.text.secondary};return e.jsxs(D,{children:[e.jsx(c,{className:"header",children:e.jsx(P,{title:n("blocklet.config.access.title"),subTitle:n("blocklet.config.access.description")})}),e.jsx(E,{component:"fieldset",children:e.jsx(g,{name:"inherit",value:f,onChange:x,children:O.map(t=>e.jsxs(c,{sx:{mb:2},children:[e.jsx(L,{value:t.value,control:e.jsx(N,{size:"small",color:"primary"}),label:e.jsxs("span",{style:{display:"flex",alignItems:"center",position:"relative"},children:[e.jsx(t.icon,{style:_}),e.jsx("span",{style:{marginTop:2},children:t.title[p]})]})}),e.jsx(c,{className:"tip",children:t.description[p]})]},t.value))})}),e.jsx(k,{mt:8,disabled:i,blocklet:r,onStartNow:()=>s("complete"),children:e.jsx(H,{loading:i,variant:"contained",disabled:i,onClick:()=>s(),children:n("setup.continue")})})]})}C.propTypes={onNext:y.func};C.defaultProps={onNext:()=>{}};const D=I(Y)`
2
2
  height: 100%;
3
3
  overflow-y: auto;
4
4
  .header {
@@ -1,4 +1,4 @@
1
- import{a9 as Il,j as o,H as N,ab as xt,ah as Ve,aa as Y,T as ge,v as qt,bt as wi,bS as Ei,I as js,bK as ks,bZ as Os,A as Is,bf as Rl,b9 as Rs,br as Cl,O as Sr,bF as Pl,bG as Ll,bH as _l,by as Nl,ak as Cs,L as Al,b8 as Dl,b6 as Ml,q as Si,ad as Ps,af as Fl,al as rt,e as Kt,bL as Bl,y as ir,Z as Ls,a1 as _s,M as Ns,bU as As,an as $l,ai as zt,as as To,E as jo,a7 as Ul,P as Wl,G as zl,w as ql,a8 as Gl,D as Kl,N as ko}from"./vendor-mui-core-wlbruq2I.js";import{r as F,g as Ti,h as Hl,f as Vl,a as ji,e as Se,b as Mt,l as Xl}from"./vendor-react-DEoibe3W.js";import{j as Ds,d as Yl,S as Ql,s as Ms,A as Jl}from"./item-RUDvbSOI.js";import{r as Zl,B as dt,ar as ki,a1 as Fs,k as Bs,a as gt,I as pt,aR as ec,aI as tc,i as Tr,bd as nc,at as $s,bA as Oo,aw as rc,a3 as Oi,F as ic,s as Ht,a2 as br,aD as Io,ao as Us,bB as mr,d as Ii,bh as Ws,E as zs,a5 as oc,bC as sc,b as ii,bD as ac}from"./vendor-ux-did-connect-CX7qG3_M.js";import{m as Ro,c as kt,n as lc,E as jr,q as cc,s as uc,t as dc,L as hc,S as fc}from"./vendor-arcblock-B4hgrXYM.js";import{L as Co}from"./launch-result-message-DNgJY11G.js";import{P as qs}from"./page-header-JH9JWGMg.js";import{e as ut,v as pc,B as mc,E as Po,A as Jn,a1 as Gs,a9 as gc,ai as vc,J as yc,o as Dr,z as Ri,$ as bc,aj as xc,ak as wc,al as Ec,b as Hn,am as Sc,c as Tc}from"./vendor-utils-B3iZkn2R.js";import{f as Ks}from"./index-8eXqqyHQ.js";import{D as Ln,f as Dt,a0 as jc,a1 as kc,a2 as Oc,H as Ic,a3 as Rc,a4 as Cc,a5 as Pc,G as kr,a6 as Hs,_ as Lc,a7 as _c,a8 as Nc,a9 as Ac,aa as lr,ab as Lo,ac as Dc}from"./index-DQjZ74P0.js";import{u as Mc,C as Fc}from"./config-space-CBoUabjP.js";import{R as Mr}from"./logo-uploader-BecsVnr8.js";import{S as Bc}from"./index-BBuUqC0B.js";import{s as Vs,h as $c,w as Uc,f as Wc,a as zc,b as qc,c as Gc,M as Kc}from"./index-BXjOxZPH.js";import{l as or,b as Hc,a as Vc,f as Xs,t as Xc}from"./vendor-hooks-BCm626KH.js";import{g as Yc}from"./get-safe-url-BWDUV79Q.js";import{p as Qc}from"./index-BpvW-cUy.js";import{r as Jc}from"./cloneDeep-ro06l5HL.js";import{I as _o}from"./index-BnR8uU0R.js";import{u as Zc}from"./session-1k8BRnYA.js";import{W as eu}from"./did-address-bJAfhuZx.js";import{_ as Ys}from"./useLocalStorage-BF3BqN1O.js";import{a as No}from"./api-CQoRx33p.js";import{d as tu,a as nu,v as ru,e as iu}from"./util-BBMAZSVn.js";import{u as Qs}from"./use-mobile-CiFFAdJf.js";import{C as ou}from"./content-layout-DuPlKBe3.js";import{C as su,D as au,a as lu}from"./connect-to-kM9lCXLX.js";import{d as cu}from"./ArrowDropDown-Ce8TY3aP.js";import{d as uu}from"./ChevronLeft-02OWcWpH.js";import{d as du}from"./ChevronRight-CB8w0u2n.js";const ag="blocklet-add-component-registry",lg="server-add-registry",cg=e=>`resource-${e}-add-registry`;var Ci={},hu=Il;Object.defineProperty(Ci,"__esModule",{value:!0});var Js=Ci.default=void 0,fu=hu(Zl()),pu=o;Js=Ci.default=(0,fu.default)((0,pu.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function Zs(e){const{info:t}=Ln();return F.useMemo(()=>{var n,r,i;return!e||!((n=e.docker)!=null&&n.image)||(r=e.docker)!=null&&r.image&&((i=e.docker)!=null&&i.runBaseScript)?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:t.enableDocker&&t.enableDockerNetwork},[e,t])}function Pi({disabled:e,children:t,onConfirm:n}){return F.useEffect(()=>{if(e)return()=>{};const r=i=>{i.code==="Enter"&&(i.metaKey===!0||i.ctrlKey===!0)&&(i.preventDefault(),i.stopPropagation(),n())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,n]),t}Pi.propTypes={disabled:N.bool,children:N.any.isRequired,onConfirm:N.func.isRequired};Pi.defaultProps={disabled:!1};function Li({onContinue:e,nextDisabled:t,launching:n,texts:r,description:i}){const[s,a]=F.useState(!1),c=()=>a(p=>!p);return o.jsxs(o.Fragment,{children:[o.jsx(mu,{children:o.jsxs(Pi,{disabled:t,onConfirm:e,children:[o.jsx("div",{className:"eula-trigger",onClick:c,children:r.listenName}),o.jsx(dt,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?o.jsxs(o.Fragment,{children:[o.jsx(xt,{size:14}),r.launchingText]}):r.buttonNext})]})}),o.jsx(ki,{open:s,title:r.listenName,onClose:()=>a(!1),children:i})]})}Li.propTypes={onContinue:N.func.isRequired,nextDisabled:N.bool,launching:N.bool,description:N.any,texts:N.object};Li.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const mu=Ve.div`
1
+ import{a9 as Il,j as o,H as N,ab as xt,ah as Ve,aa as Y,T as ge,v as qt,bt as wi,bS as Ei,I as js,bK as ks,bZ as Os,A as Is,bf as Rl,b9 as Rs,br as Cl,O as Sr,bF as Pl,bG as Ll,bH as _l,by as Nl,ak as Cs,L as Al,b8 as Dl,b6 as Ml,q as Si,ad as Ps,af as Fl,al as rt,e as Kt,bL as Bl,y as ir,Z as Ls,a1 as _s,M as Ns,bU as As,an as $l,ai as zt,as as To,E as jo,a7 as Ul,P as Wl,G as zl,w as ql,a8 as Gl,D as Kl,N as ko}from"./vendor-mui-core-wlbruq2I.js";import{r as F,g as Ti,h as Hl,f as Vl,a as ji,e as Se,b as Mt,l as Xl}from"./vendor-react-DEoibe3W.js";import{j as Ds,d as Yl,S as Ql,s as Ms,A as Jl}from"./item-DHMVgmIa.js";import{r as Zl,B as dt,ar as ki,a1 as Fs,k as Bs,a as gt,I as pt,aR as ec,aI as tc,i as Tr,bd as nc,at as $s,bA as Oo,aw as rc,a3 as Oi,F as ic,s as Ht,a2 as br,aD as Io,ao as Us,bB as mr,d as Ii,bh as Ws,E as zs,a5 as oc,bC as sc,b as ii,bD as ac}from"./vendor-ux-did-connect-CX7qG3_M.js";import{m as Ro,c as kt,n as lc,E as jr,q as cc,s as uc,t as dc,L as hc,S as fc}from"./vendor-arcblock-B4hgrXYM.js";import{L as Co}from"./launch-result-message-DNgJY11G.js";import{P as qs}from"./page-header-JH9JWGMg.js";import{e as ut,v as pc,B as mc,E as Po,A as Jn,a1 as Gs,a9 as gc,ai as vc,J as yc,o as Dr,z as Ri,$ as bc,aj as xc,ak as wc,al as Ec,b as Hn,am as Sc,c as Tc}from"./vendor-utils-B3iZkn2R.js";import{f as Ks}from"./index-8eXqqyHQ.js";import{D as Ln,f as Dt,a0 as jc,a1 as kc,a2 as Oc,H as Ic,a3 as Rc,a4 as Cc,a5 as Pc,G as kr,a6 as Hs,_ as Lc,a7 as _c,a8 as Nc,a9 as Ac,aa as lr,ab as Lo,ac as Dc}from"./index-B18R5SlV.js";import{u as Mc,C as Fc}from"./config-space-B39Ur9Mf.js";import{R as Mr}from"./logo-uploader-Dhh7Un4G.js";import{S as Bc}from"./index-CI4cLtBE.js";import{s as Vs,h as $c,w as Uc,f as Wc,a as zc,b as qc,c as Gc,M as Kc}from"./index-BXjOxZPH.js";import{l as or,b as Hc,a as Vc,f as Xs,t as Xc}from"./vendor-hooks-BCm626KH.js";import{g as Yc}from"./get-safe-url-CwT4-jkw.js";import{p as Qc}from"./index-BpvW-cUy.js";import{r as Jc}from"./cloneDeep-ro06l5HL.js";import{I as _o}from"./index-BnR8uU0R.js";import{u as Zc}from"./session-1k8BRnYA.js";import{W as eu}from"./did-address-bJAfhuZx.js";import{_ as Ys}from"./useLocalStorage-BF3BqN1O.js";import{a as No}from"./api-CQoRx33p.js";import{d as tu,a as nu,v as ru,e as iu}from"./util-xXGeezrD.js";import{u as Qs}from"./use-mobile-CXU9YBvX.js";import{C as ou}from"./content-layout-DuPlKBe3.js";import{C as su,D as au,a as lu}from"./connect-to-Dac7orQh.js";import{d as cu}from"./ArrowDropDown-Ce8TY3aP.js";import{d as uu}from"./ChevronLeft-02OWcWpH.js";import{d as du}from"./ChevronRight-CB8w0u2n.js";const ag="blocklet-add-component-registry",lg="server-add-registry",cg=e=>`resource-${e}-add-registry`;var Ci={},hu=Il;Object.defineProperty(Ci,"__esModule",{value:!0});var Js=Ci.default=void 0,fu=hu(Zl()),pu=o;Js=Ci.default=(0,fu.default)((0,pu.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function Zs(e){const{info:t}=Ln();return F.useMemo(()=>{var n,r,i;return!e||!((n=e.docker)!=null&&n.image)||(r=e.docker)!=null&&r.image&&((i=e.docker)!=null&&i.runBaseScript)?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:t.enableDocker&&t.enableDockerNetwork},[e,t])}function Pi({disabled:e,children:t,onConfirm:n}){return F.useEffect(()=>{if(e)return()=>{};const r=i=>{i.code==="Enter"&&(i.metaKey===!0||i.ctrlKey===!0)&&(i.preventDefault(),i.stopPropagation(),n())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,n]),t}Pi.propTypes={disabled:N.bool,children:N.any.isRequired,onConfirm:N.func.isRequired};Pi.defaultProps={disabled:!1};function Li({onContinue:e,nextDisabled:t,launching:n,texts:r,description:i}){const[s,a]=F.useState(!1),c=()=>a(p=>!p);return o.jsxs(o.Fragment,{children:[o.jsx(mu,{children:o.jsxs(Pi,{disabled:t,onConfirm:e,children:[o.jsx("div",{className:"eula-trigger",onClick:c,children:r.listenName}),o.jsx(dt,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?o.jsxs(o.Fragment,{children:[o.jsx(xt,{size:14}),r.launchingText]}):r.buttonNext})]})}),o.jsx(ki,{open:s,title:r.listenName,onClose:()=>a(!1),children:i})]})}Li.propTypes={onContinue:N.func.isRequired,nextDisabled:N.bool,launching:N.bool,description:N.any,texts:N.object};Li.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const mu=Ve.div`
2
2
  margin: 0 auto;
3
3
  display: flex;
4
4
  justify-content: space-between;
@@ -1 +1 @@
1
- import{v as B,j as h}from"./vendor-mui-core-wlbruq2I.js";import{l as L,r}from"./vendor-react-DEoibe3W.js";import{A as W,E as A}from"./vendor-utils-B3iZkn2R.js";import{a as O,ar as T}from"./vendor-ux-did-connect-CX7qG3_M.js";import{m as w,u as _,s as F}from"./vendor-hooks-BCm626KH.js";import{A as K,S as $}from"./add-component-core-CsW-bf6w.js";import{k as z,U as G}from"./index-DQjZ74P0.js";import"./lottie-web-jYmAQWuC.js";import"./item-RUDvbSOI.js";import"./vendor-arcblock-B4hgrXYM.js";import"./index-8eXqqyHQ.js";import"./Launch-BwVeOcBz.js";import"./Done-CcJLRcBY.js";import"./DeleteOutline-1-hBNY1U.js";import"./delete-confirm-Dow_C0jR.js";import"./click-to-copy-BUVqg1RQ.js";import"./confirm-BjCmRSAF.js";import"./session-1k8BRnYA.js";import"./get-safe-url-BWDUV79Q.js";import"./did-address-bJAfhuZx.js";import"./launch-result-message-DNgJY11G.js";import"./page-header-JH9JWGMg.js";import"./config-space-CBoUabjP.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./logo-uploader-BecsVnr8.js";import"./index-DVQCgvFb.js";import"./index-BBuUqC0B.js";import"./collapse--nd2JDBL.js";import"./Google-WGwK551e.js";import"./cloneDeep-ro06l5HL.js";import"./index-BXjOxZPH.js";import"./index-BpvW-cUy.js";import"./index-BnR8uU0R.js";import"./useLocalStorage-BF3BqN1O.js";import"./util-BBMAZSVn.js";import"./use-mobile-CiFFAdJf.js";import"./content-layout-DuPlKBe3.js";import"./connect-to-kM9lCXLX.js";import"./ArrowDropDown-Ce8TY3aP.js";import"./ChevronLeft-02OWcWpH.js";import"./ChevronRight-CB8w0u2n.js";function Be(){var u;const{t:f}=O(),{blocklet:i}=z(),{componentDid:s}=L(),g=B(e=>e.breakpoints.down("md")),o=new URL(window.location.href),C=o.searchParams.get("mode")==="dialog",c=o.searchParams.get("resourceType")||"",p=o.searchParams.get("resourceDid")||s,R=o.searchParams.get("store")||"",E=o.searchParams.get("showFromUrl")!=="false",S=o.searchParams.get("showResourcesSwitch")!=="false",y=o.searchParams.get("enableRunBackground")!=="false",P=o.searchParams.get("showCategory")!=="false",n=(u=i==null?void 0:i.meta)==null?void 0:u.did,m=R.split(",").filter(Boolean).map(e=>{try{return new URL(e.startsWith("http")?e:`https://${e}`).origin}catch(t){return console.error(t),null}}).filter(Boolean),[D,U]=r.useState(m.map(e=>({url:e,name:e.replace("https://","")}))),[b,x]=r.useState(null),[j,M]=r.useState("");r.useEffect(()=>{(async()=>{try{const e=await Promise.all(m.map(async t=>{const a=W(t,"/api/store.json"),{data:v}=await A.get(a);return{url:t,name:v.name}}));U(e||[])}catch(e){console.error(e)}})()},[m.join(",")]);const k=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const e=G();return n&&e.connect(),()=>{n&&e.isConnected()&&e.disconnect()}},[n]),w(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const l=_(e=>{var t,a;((t=e.data)==null?void 0:t.event)==="resourceDialog.select"&&((a=e.data)==null?void 0:a.componentDid)===s&&(x(e.data.data),M(e.data.storeUrl))});w(()=>{window.addEventListener("message",l)}),F(()=>{window.removeEventListener("message",l)});const d=({inDialog:e=!0}={})=>h.jsx(K,{stores:D,selectedMeta:b,storeUrl:j,resourceType:c,resourceDid:p,mode:"embed",inDialog:e,storageKey:$(`${c}+${p}`),showResourcesSwitch:S,showFromUrl:E,enableRunBackground:y,showCategory:P});return C?h.jsx(T,{className:"resource-dialog",title:f("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:g?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(e,t)=>{t!=="backdropClick"&&k()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:d()}):d({inDialog:!1})}export{Be as default};
1
+ import{v as B,j as h}from"./vendor-mui-core-wlbruq2I.js";import{l as L,r}from"./vendor-react-DEoibe3W.js";import{A as W,E as A}from"./vendor-utils-B3iZkn2R.js";import{a as O,ar as T}from"./vendor-ux-did-connect-CX7qG3_M.js";import{m as w,u as _,s as F}from"./vendor-hooks-BCm626KH.js";import{A as K,S as $}from"./add-component-core-CaE3xcyT.js";import{k as z,U as G}from"./index-B18R5SlV.js";import"./lottie-web-jYmAQWuC.js";import"./item-DHMVgmIa.js";import"./vendor-arcblock-B4hgrXYM.js";import"./index-8eXqqyHQ.js";import"./Launch-BwVeOcBz.js";import"./Done-CcJLRcBY.js";import"./DeleteOutline-1-hBNY1U.js";import"./delete-confirm-B1F5wKdb.js";import"./click-to-copy-BUVqg1RQ.js";import"./confirm-Bay3BcpN.js";import"./session-1k8BRnYA.js";import"./get-safe-url-CwT4-jkw.js";import"./did-address-bJAfhuZx.js";import"./launch-result-message-DNgJY11G.js";import"./page-header-JH9JWGMg.js";import"./config-space-B39Ur9Mf.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./logo-uploader-Dhh7Un4G.js";import"./index-DVQCgvFb.js";import"./index-CI4cLtBE.js";import"./collapse--nd2JDBL.js";import"./Google-WGwK551e.js";import"./cloneDeep-ro06l5HL.js";import"./index-BXjOxZPH.js";import"./index-BpvW-cUy.js";import"./index-BnR8uU0R.js";import"./useLocalStorage-BF3BqN1O.js";import"./util-xXGeezrD.js";import"./use-mobile-CXU9YBvX.js";import"./content-layout-DuPlKBe3.js";import"./connect-to-Dac7orQh.js";import"./ArrowDropDown-Ce8TY3aP.js";import"./ChevronLeft-02OWcWpH.js";import"./ChevronRight-CB8w0u2n.js";function Be(){var u;const{t:f}=O(),{blocklet:i}=z(),{componentDid:s}=L(),g=B(e=>e.breakpoints.down("md")),o=new URL(window.location.href),C=o.searchParams.get("mode")==="dialog",c=o.searchParams.get("resourceType")||"",p=o.searchParams.get("resourceDid")||s,R=o.searchParams.get("store")||"",E=o.searchParams.get("showFromUrl")!=="false",S=o.searchParams.get("showResourcesSwitch")!=="false",y=o.searchParams.get("enableRunBackground")!=="false",P=o.searchParams.get("showCategory")!=="false",n=(u=i==null?void 0:i.meta)==null?void 0:u.did,m=R.split(",").filter(Boolean).map(e=>{try{return new URL(e.startsWith("http")?e:`https://${e}`).origin}catch(t){return console.error(t),null}}).filter(Boolean),[D,U]=r.useState(m.map(e=>({url:e,name:e.replace("https://","")}))),[b,x]=r.useState(null),[j,M]=r.useState("");r.useEffect(()=>{(async()=>{try{const e=await Promise.all(m.map(async t=>{const a=W(t,"/api/store.json"),{data:v}=await A.get(a);return{url:t,name:v.name}}));U(e||[])}catch(e){console.error(e)}})()},[m.join(",")]);const k=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const e=G();return n&&e.connect(),()=>{n&&e.isConnected()&&e.disconnect()}},[n]),w(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const l=_(e=>{var t,a;((t=e.data)==null?void 0:t.event)==="resourceDialog.select"&&((a=e.data)==null?void 0:a.componentDid)===s&&(x(e.data.data),M(e.data.storeUrl))});w(()=>{window.addEventListener("message",l)}),F(()=>{window.removeEventListener("message",l)});const d=({inDialog:e=!0}={})=>h.jsx(K,{stores:D,selectedMeta:b,storeUrl:j,resourceType:c,resourceDid:p,mode:"embed",inDialog:e,storageKey:$(`${c}+${p}`),showResourcesSwitch:S,showFromUrl:E,enableRunBackground:y,showCategory:P});return C?h.jsx(T,{className:"resource-dialog",title:f("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:g?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(e,t)=>{t!=="backdropClick"&&k()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:d()}):d({inDialog:!1})}export{Be as default};
@@ -1,4 +1,4 @@
1
- import{r as Ee,e as ze}from"./vendor-react-DEoibe3W.js";import{a9 as bt,j as q,ab as Ze,H as Oe,aa as U,y as hr,T as Be,ah as _t,bt as dr,bS as mr,by as pr,ak as gr,E as yr,al as wt,O as vr,N as br,bu as We,X as Le,ad as _r}from"./vendor-mui-core-wlbruq2I.js";import{D as Je,G as wr,f as xr,aM as Mr,n as $r,aE as kr,z as Qt,W as tr,V as rr}from"./index-DQjZ74P0.js";import{P as jr,w as He}from"./permission-B7ZHEOJv.js";import{r as xt,a as Ve,B as qe,a3 as Te,at as sr,f as Sr,ar as nr,c2 as Rr,aR as Ar,i as De,k as Or,a1 as Xt,bb as Er}from"./vendor-ux-did-connect-CX7qG3_M.js";import{x as ir}from"./vendor-hooks-BCm626KH.js";import{c as Ne}from"./vendor-arcblock-B4hgrXYM.js";import{d as Cr}from"./InfoOutlined-CLiL5VeK.js";import{C as Mt}from"./confirm-BjCmRSAF.js";import{f as Ue}from"./index-8eXqqyHQ.js";import{_ as Dr}from"./useSetState-CWq0AVWn.js";import{u as ar}from"./session-1k8BRnYA.js";import{S as Ie}from"./section-Bb547IGJ.js";import{C as Ir}from"./click-to-copy-BUVqg1RQ.js";import{u as or}from"./dashboard-B7qE-Md0.js";import{r as Tr,aL as Lr}from"./vendor-utils-B3iZkn2R.js";import{I as qr}from"./index-BnR8uU0R.js";import{W as Nr}from"./did-address-bJAfhuZx.js";import{V as Pr}from"./status-C4-MBX3k.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./PlayArrow-B_ZNrQDa.js";import"./get-safe-url-BWDUV79Q.js";import"./use-blocklet-logo-6YMz11ob.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./use-mobile-CXU9YBvX.js";import"./omit-O1pUD7ku.js";var $t={},zr=bt;Object.defineProperty($t,"__esModule",{value:!0});var lr=$t.default=void 0,Fr=zr(xt()),Br=q;lr=$t.default=(0,Fr.default)((0,Br.jsx)("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}),"VolunteerActivismOutlined");var kt={},Jr=bt;Object.defineProperty(kt,"__esModule",{value:!0});var jt=kt.default=void 0,Ur=Jr(xt()),er=q;jt=kt.default=(0,Ur.default)([(0,er.jsx)("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),(0,er.jsx)("circle",{cx:"16",cy:"12",r:"1.5"},"1")],"AccountBalanceWalletOutlined");const Vr=localStorage.getItem("enableDebug")==="true";function Wr({teamDid:I,size:P="small",...B}){const{t:T}=Ve(),{api:L}=Je(),[p,_]=Ee.useState(!1),[l,x]=Ee.useState(null),b=()=>{_(!1),x(null)},m=async()=>{var a;try{_(!0);const i=await L.clearCache({input:{teamDid:I}});Te.success(T("blocklet.config.clearCache.success",{count:((a=i.removed)==null?void 0:a.length)||0}))}catch(i){Te.error(Ue(i))}finally{_(!1),x(null)}},e={title:T("blocklet.config.clearCache.title"),description:T("blocklet.config.clearCache.description"),confirm:T("common.confirm"),cancel:T("common.cancel"),onConfirm:m,onCancel:b};return q.jsxs("div",{...B,children:[q.jsxs(qe,{onClick:()=>x(e),color:"error",variant:"outlined",size:P,children:[p?q.jsx(Ze,{size:16,style:{marginRight:5}}):null,T("blocklet.config.clearCache.action")]}),l&&q.jsx(Mt,{title:l.title,description:l.description,confirm:l.confirm,cancel:l.cancel,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}var St={},Kr=bt;Object.defineProperty(St,"__esModule",{value:!0});var cr=St.default=void 0,Zr=Kr(xt()),Hr=q;cr=St.default=(0,Zr.default)((0,Hr.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"KeyOutlined");function Rt({onChange:I,disabled:P,loading:B,inService:T}){const{t:L}=Ve(),{api:p,session:_}=ar(),{blocklet:l}=wr(),[x,b]=Dr({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),m=()=>b({isConnectOpen:!1}),e=()=>{if(xr.isInProgress(l.status)){Te.error(L("blocklet.error.isInProgress"));return}b({confirmDialogOpen:!0})};return q.jsxs(q.Fragment,{children:[q.jsx(Ie,{title:L("blocklet.config.migrate.button"),desc:L("blocklet.config.migrate.description"),children:q.jsx(U,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:q.jsxs(hr,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:P||B,onClick:e,children:[q.jsx(cr,{style:{fontSize:"1.3em",marginRight:4}}),L("blocklet.config.migrate.button")]})})}),q.jsxs(q.Fragment,{children:[x.isConnectOpen&&q.jsx(sr,{popup:!0,open:x.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:p.get,checkTimeout:5*60*1e3,onSuccess:()=>{I(),T&&_.logout(),m()},extraParams:{appDid:l.appDid},messages:{title:L("setup.keyPair.title"),scan:L("setup.keyPair.scan"),confirm:L("setup.keyPair.confirm"),success:L("setup.keyPair.success")},onClose:m}),x.confirmDialogOpen&&q.jsx(Mt,{title:q.jsx(Be,{sx:{fontSize:"20px",fontWeight:"500"},children:L("blocklet.config.migrate.title")}),description:q.jsx(Be,{sx:{fontSize:"14px",color:"#9397A1"},children:L("blocklet.config.migrate.confirm")}),confirm:L("common.confirm"),cancel:L("common.cancel"),onConfirm:()=>b({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>b({confirmDialogOpen:!1})})]})]})}Rt.propTypes={onChange:Oe.func,disabled:Oe.bool,loading:Oe.bool,inService:Oe.bool};Rt.defaultProps={onChange:()=>{},disabled:!1,loading:!1,inService:!1};function At({onCancel:I,onSuccess:P,onError:B}){const{api:T}=Ee.useContext(Sr),[L,p]=Ee.useState(!1),{t:_,locale:l}=Ve(),[x,b]=Ee.useState(""),[m,e]=Ee.useState(!1),[a,i]=Ee.useState(0),[r,t]=Ee.useState(""),{endpoint:c}=or(),[s,o]=Ee.useState(!1),h=f=>{b(null),p(!0);try{t(f.result),i(R.length-1)}catch(y){const M=Ue(y);b(M),B(y)}finally{p(!1)}},g=()=>{e(!0),i(1)},w=()=>{e(!1),i(0)},R=[{body:q.jsxs(U,{children:[q.jsx(Be,{children:_("team.transferApp.transferDialog.tips.progress")}),q.jsx(Be,{mt:3,mb:2,children:_("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:_("common.cancel"),confirm:_("team.transferApp.transferDialog.createTransferLink"),onCancel:I,onConfirm:g},{cancel:_("common.cancel"),confirm:_("team.transferApp.transferDialog.createTransferLink"),body:()=>q.jsx(sr,{action:"transfer-app-owner",open:m,locale:l,checkFn:T.get,onClose:w,onSuccess:h,checkTimeout:5*60*1e3,extraParams:{},messages:{title:_("team.transferApp.connectDialog.title"),scan:_("team.transferApp.connectDialog.scan"),confirm:_("team.transferApp.connectDialog.confirm"),success:_("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const f=Mr({transferId:r.transferId,endpoint:c});return q.jsxs(q.Fragment,{children:[q.jsx(U,{component:Fe,dangerouslySetInnerHTML:{__html:_("team.transferApp.transferDialog.createSuccessTip1")}}),q.jsx(U,{component:Fe,mt:2,children:q.jsx(Fe,{children:_("team.transferApp.transferDialog.createSuccessTip3")})}),q.jsxs(U,{children:[q.jsx(U,{component:Fe,mt:2,children:q.jsx(Fe,{children:_("team.transferApp.transferDialog.createSuccessTip2",{expireDate:$r(r.expireDate,l)})})}),q.jsx(U,{my:1,children:q.jsx(Ir,{children:f})})]}),q.jsx("div",{children:q.jsx(dr,{value:"end",control:q.jsx(mr,{checked:s,onChange:y=>o(y.target.checked)}),label:_("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:_("common.confirm"),onConfirm:P}],j=R[a];return q.jsxs(nr,{title:q.jsx(Fe,{className:"title",children:_("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:q.jsxs(q.Fragment,{children:[j.cancel&&q.jsx(qe,{onClick:j.onCancel,color:"inherit",children:j.cancel}),q.jsxs(qe,{onClick:j.onConfirm,color:"error",disabled:L||a===R.length-1&&!s,variant:"contained",autoFocus:!0,children:[L&&q.jsx(Ze,{size:16}),j.confirm]})]}),children:[q.jsx(pr,{component:"div",children:typeof j.body=="function"?j.body():j.body}),!!x&&q.jsx(gr,{severity:"error",variant:"icon",children:x})]})}At.propTypes={onCancel:Oe.func.isRequired,onSuccess:Oe.func.isRequired,onError:Oe.func};At.defaultProps={onError:()=>{}};const Fe=_t.div`
1
+ import{r as Ee,e as ze}from"./vendor-react-DEoibe3W.js";import{a9 as bt,j as q,ab as Ze,H as Oe,aa as U,y as hr,T as Be,ah as _t,bt as dr,bS as mr,by as pr,ak as gr,E as yr,al as wt,O as vr,N as br,bu as We,X as Le,ad as _r}from"./vendor-mui-core-wlbruq2I.js";import{D as Je,G as wr,f as xr,aM as Mr,n as $r,aE as kr,z as Qt,W as tr,V as rr}from"./index-B18R5SlV.js";import{P as jr,w as He}from"./permission-B7ZHEOJv.js";import{r as xt,a as Ve,B as qe,a3 as Te,at as sr,f as Sr,ar as nr,c2 as Rr,aR as Ar,i as De,k as Or,a1 as Xt,bb as Er}from"./vendor-ux-did-connect-CX7qG3_M.js";import{x as ir}from"./vendor-hooks-BCm626KH.js";import{c as Ne}from"./vendor-arcblock-B4hgrXYM.js";import{d as Cr}from"./InfoOutlined-CLiL5VeK.js";import{C as Mt}from"./confirm-Bay3BcpN.js";import{f as Ue}from"./index-8eXqqyHQ.js";import{_ as Dr}from"./useSetState-CWq0AVWn.js";import{u as ar}from"./session-1k8BRnYA.js";import{S as Ie}from"./section-Bb547IGJ.js";import{C as Ir}from"./click-to-copy-BUVqg1RQ.js";import{u as or}from"./dashboard-k0XcV2m5.js";import{r as Tr,aL as Lr}from"./vendor-utils-B3iZkn2R.js";import{I as qr}from"./index-BnR8uU0R.js";import{W as Nr}from"./did-address-bJAfhuZx.js";import{V as Pr}from"./status-DIJ9lK3F.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./PlayArrow-B_ZNrQDa.js";import"./get-safe-url-CwT4-jkw.js";import"./use-blocklet-logo-DGSQQmh2.js";import"./dot-DR7_m3Np.js";import"./useAsync-BMCqtJH2.js";import"./use-mobile-CiFFAdJf.js";import"./omit-O1pUD7ku.js";var $t={},zr=bt;Object.defineProperty($t,"__esModule",{value:!0});var lr=$t.default=void 0,Fr=zr(xt()),Br=q;lr=$t.default=(0,Fr.default)((0,Br.jsx)("path",{d:"M16 13c3.09-2.81 6-5.44 6-7.7C22 3.45 20.55 2 18.7 2c-1.04 0-2.05.49-2.7 1.25C15.34 2.49 14.34 2 13.3 2 11.45 2 10 3.45 10 5.3c0 2.26 2.91 4.89 6 7.7m-2.7-9c.44 0 .89.21 1.18.55L16 6.34l1.52-1.79c.29-.34.74-.55 1.18-.55.74 0 1.3.56 1.3 1.3 0 1.12-2.04 3.17-4 4.99-1.96-1.82-4-3.88-4-4.99 0-.74.56-1.3 1.3-1.3M19 16h-2c0-1.2-.75-2.28-1.87-2.7L8.97 11H1v11h6v-1.44l7 1.94 8-2.5v-1c0-1.66-1.34-3-3-3M3 20v-7h2v7zm10.97.41L7 18.48V13h1.61l5.82 2.17c.34.13.57.46.57.83 0 0-1.99-.05-2.3-.15l-2.38-.79-.63 1.9 2.38.79c.51.17 1.04.26 1.58.26H19c.39 0 .74.23.9.56z"}),"VolunteerActivismOutlined");var kt={},Jr=bt;Object.defineProperty(kt,"__esModule",{value:!0});var jt=kt.default=void 0,Ur=Jr(xt()),er=q;jt=kt.default=(0,Ur.default)([(0,er.jsx)("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.37-1-1.72M20 9v6h-7V9zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2z"},"0"),(0,er.jsx)("circle",{cx:"16",cy:"12",r:"1.5"},"1")],"AccountBalanceWalletOutlined");const Vr=localStorage.getItem("enableDebug")==="true";function Wr({teamDid:I,size:P="small",...B}){const{t:T}=Ve(),{api:L}=Je(),[p,_]=Ee.useState(!1),[l,x]=Ee.useState(null),b=()=>{_(!1),x(null)},m=async()=>{var a;try{_(!0);const i=await L.clearCache({input:{teamDid:I}});Te.success(T("blocklet.config.clearCache.success",{count:((a=i.removed)==null?void 0:a.length)||0}))}catch(i){Te.error(Ue(i))}finally{_(!1),x(null)}},e={title:T("blocklet.config.clearCache.title"),description:T("blocklet.config.clearCache.description"),confirm:T("common.confirm"),cancel:T("common.cancel"),onConfirm:m,onCancel:b};return q.jsxs("div",{...B,children:[q.jsxs(qe,{onClick:()=>x(e),color:"error",variant:"outlined",size:P,children:[p?q.jsx(Ze,{size:16,style:{marginRight:5}}):null,T("blocklet.config.clearCache.action")]}),l&&q.jsx(Mt,{title:l.title,description:l.description,confirm:l.confirm,cancel:l.cancel,onConfirm:l.onConfirm,onCancel:l.onCancel})]})}var St={},Kr=bt;Object.defineProperty(St,"__esModule",{value:!0});var cr=St.default=void 0,Zr=Kr(xt()),Hr=q;cr=St.default=(0,Zr.default)((0,Hr.jsx)("path",{d:"M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"}),"KeyOutlined");function Rt({onChange:I,disabled:P,loading:B,inService:T}){const{t:L}=Ve(),{api:p,session:_}=ar(),{blocklet:l}=wr(),[x,b]=Dr({newAppSk:"",isConnectOpen:!1,confirmDialogOpen:!1}),m=()=>b({isConnectOpen:!1}),e=()=>{if(xr.isInProgress(l.status)){Te.error(L("blocklet.error.isInProgress"));return}b({confirmDialogOpen:!0})};return q.jsxs(q.Fragment,{children:[q.jsx(Ie,{title:L("blocklet.config.migrate.button"),desc:L("blocklet.config.migrate.description"),children:q.jsx(U,{sx:{alignSelf:{xs:"flex-start",md:"flex-end"}},children:q.jsxs(hr,{style:{flexShrink:0},variant:"contained",color:"primary",size:"small","data-cy":"config-did",disabled:P||B,onClick:e,children:[q.jsx(cr,{style:{fontSize:"1.3em",marginRight:4}}),L("blocklet.config.migrate.button")]})})}),q.jsxs(q.Fragment,{children:[x.isConnectOpen&&q.jsx(sr,{popup:!0,open:x.isConnectOpen,forceConnected:!1,saveConnect:!1,action:"rotate-key-pair",checkFn:p.get,checkTimeout:5*60*1e3,onSuccess:()=>{I(),T&&_.logout(),m()},extraParams:{appDid:l.appDid},messages:{title:L("setup.keyPair.title"),scan:L("setup.keyPair.scan"),confirm:L("setup.keyPair.confirm"),success:L("setup.keyPair.success")},onClose:m}),x.confirmDialogOpen&&q.jsx(Mt,{title:q.jsx(Be,{sx:{fontSize:"20px",fontWeight:"500"},children:L("blocklet.config.migrate.title")}),description:q.jsx(Be,{sx:{fontSize:"14px",color:"#9397A1"},children:L("blocklet.config.migrate.confirm")}),confirm:L("common.confirm"),cancel:L("common.cancel"),onConfirm:()=>b({confirmDialogOpen:!1,isConnectOpen:!0}),onCancel:()=>b({confirmDialogOpen:!1})})]})]})}Rt.propTypes={onChange:Oe.func,disabled:Oe.bool,loading:Oe.bool,inService:Oe.bool};Rt.defaultProps={onChange:()=>{},disabled:!1,loading:!1,inService:!1};function At({onCancel:I,onSuccess:P,onError:B}){const{api:T}=Ee.useContext(Sr),[L,p]=Ee.useState(!1),{t:_,locale:l}=Ve(),[x,b]=Ee.useState(""),[m,e]=Ee.useState(!1),[a,i]=Ee.useState(0),[r,t]=Ee.useState(""),{endpoint:c}=or(),[s,o]=Ee.useState(!1),h=f=>{b(null),p(!0);try{t(f.result),i(R.length-1)}catch(y){const M=Ue(y);b(M),B(y)}finally{p(!1)}},g=()=>{e(!0),i(1)},w=()=>{e(!1),i(0)},R=[{body:q.jsxs(U,{children:[q.jsx(Be,{children:_("team.transferApp.transferDialog.tips.progress")}),q.jsx(Be,{mt:3,mb:2,children:_("team.transferApp.transferDialog.tips.newOwnerPermissions")})]}),cancel:_("common.cancel"),confirm:_("team.transferApp.transferDialog.createTransferLink"),onCancel:I,onConfirm:g},{cancel:_("common.cancel"),confirm:_("team.transferApp.transferDialog.createTransferLink"),body:()=>q.jsx(sr,{action:"transfer-app-owner",open:m,locale:l,checkFn:T.get,onClose:w,onSuccess:h,checkTimeout:5*60*1e3,extraParams:{},messages:{title:_("team.transferApp.connectDialog.title"),scan:_("team.transferApp.connectDialog.scan"),confirm:_("team.transferApp.connectDialog.confirm"),success:_("team.transferApp.connectDialog.success")},popup:!0})},{body:()=>{const f=Mr({transferId:r.transferId,endpoint:c});return q.jsxs(q.Fragment,{children:[q.jsx(U,{component:Fe,dangerouslySetInnerHTML:{__html:_("team.transferApp.transferDialog.createSuccessTip1")}}),q.jsx(U,{component:Fe,mt:2,children:q.jsx(Fe,{children:_("team.transferApp.transferDialog.createSuccessTip3")})}),q.jsxs(U,{children:[q.jsx(U,{component:Fe,mt:2,children:q.jsx(Fe,{children:_("team.transferApp.transferDialog.createSuccessTip2",{expireDate:$r(r.expireDate,l)})})}),q.jsx(U,{my:1,children:q.jsx(Ir,{children:f})})]}),q.jsx("div",{children:q.jsx(dr,{value:"end",control:q.jsx(mr,{checked:s,onChange:y=>o(y.target.checked)}),label:_("team.transferApp.transferDialog.iKnow"),labelPlacement:"end"})})]})},confirm:_("common.confirm"),onConfirm:P}],j=R[a];return q.jsxs(nr,{title:q.jsx(Fe,{className:"title",children:_("team.transferApp.transferDialog.title")}),fullWidth:!0,open:!0,showCloseButton:!1,actions:q.jsxs(q.Fragment,{children:[j.cancel&&q.jsx(qe,{onClick:j.onCancel,color:"inherit",children:j.cancel}),q.jsxs(qe,{onClick:j.onConfirm,color:"error",disabled:L||a===R.length-1&&!s,variant:"contained",autoFocus:!0,children:[L&&q.jsx(Ze,{size:16}),j.confirm]})]}),children:[q.jsx(pr,{component:"div",children:typeof j.body=="function"?j.body():j.body}),!!x&&q.jsx(gr,{severity:"error",variant:"icon",children:x})]})}At.propTypes={onCancel:Oe.func.isRequired,onSuccess:Oe.func.isRequired,onError:Oe.func};At.defaultProps={onError:()=>{}};const Fe=_t.div`
2
2
  font-size: 16px;
3
3
  font-weight: bold;
4
4
  &.title {
@@ -1 +1 @@
1
- import{A as p,J as _}from"./vendor-utils-B3iZkn2R.js";import{k as C}from"./vendor-ux-did-connect-CX7qG3_M.js";import{r as e}from"./vendor-react-DEoibe3W.js";import{D as T,G as j}from"./index-DQjZ74P0.js";import{u as k}from"./use-mobile-CiFFAdJf.js";import{e as B,j as o,aa as h,ab as H}from"./vendor-mui-core-wlbruq2I.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";function $(){const{info:g,inService:u}=T(),{blocklet:E}=j(),c=e.useRef(null),s=B(),[w,x]=e.useState(0),f=k(),[i,y]=e.useState(!0),d=e.useRef(null);let r="";u?r=C.WELLKNOWN_SERVICE_PATH_PREFIX:r=g.routing.adminPath;const l=new URLSearchParams;u||l.set("authKey","__sst"),l.set("schemaKey",p(window.location.origin,r,`/api/theme?id=${encodeURIComponent(E.meta.did)}`));const a=e.useCallback(()=>{if(d.current){const n=window.location.origin,t=_(JSON.parse(JSON.stringify(s)),["palette","typography","shape","direction","breakpoints","mixins","shadows","transitions","zIndex"]);d.current.contentWindow.postMessage({type:"SEND_THEME",payload:t},n)}},[s]);return e.useEffect(()=>{const n=t=>{t.origin===window.location.origin&&(t.data.type==="REQUEST_THEME"&&a(),t.data.type==="THEME_BUILDER_LOADED"&&y(!1))};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[a]),e.useEffect(()=>{i===!1&&a()},[s,i,a]),e.useEffect(()=>{const n=document.querySelector("#arc__dashboard-main"),t=document.querySelector(".dashboard-content"),m=()=>{if(c.current){const{height:R}=n.getBoundingClientRect(),{top:S}=t.getBoundingClientRect(),{top:b}=c.current.getBoundingClientRect(),L=R-b+S-(f?108:164);x(L)}};return m(),window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[f,s]),o.jsxs(o.Fragment,{children:[o.jsx(h,{ref:c}),i&&o.jsx(h,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"500px"},children:o.jsx(H,{})}),o.jsx("iframe",{title:"Theme Builder",ref:d,src:`${p(window.location.origin,r,"/hosted/theme-builder/")}?${l.toString()}`,style:{border:0,width:"100%",height:`${w}px`,display:i?"none":"block"}})]})}export{$ as default};
1
+ import{A as p,J as _}from"./vendor-utils-B3iZkn2R.js";import{k as C}from"./vendor-ux-did-connect-CX7qG3_M.js";import{r as e}from"./vendor-react-DEoibe3W.js";import{D as T,G as j}from"./index-B18R5SlV.js";import{u as k}from"./use-mobile-CXU9YBvX.js";import{e as B,j as o,aa as h,ab as H}from"./vendor-mui-core-wlbruq2I.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";function $(){const{info:g,inService:u}=T(),{blocklet:E}=j(),c=e.useRef(null),s=B(),[w,x]=e.useState(0),f=k(),[i,y]=e.useState(!0),d=e.useRef(null);let r="";u?r=C.WELLKNOWN_SERVICE_PATH_PREFIX:r=g.routing.adminPath;const l=new URLSearchParams;u||l.set("authKey","__sst"),l.set("schemaKey",p(window.location.origin,r,`/api/theme?id=${encodeURIComponent(E.meta.did)}`));const a=e.useCallback(()=>{if(d.current){const n=window.location.origin,t=_(JSON.parse(JSON.stringify(s)),["palette","typography","shape","direction","breakpoints","mixins","shadows","transitions","zIndex"]);d.current.contentWindow.postMessage({type:"SEND_THEME",payload:t},n)}},[s]);return e.useEffect(()=>{const n=t=>{t.origin===window.location.origin&&(t.data.type==="REQUEST_THEME"&&a(),t.data.type==="THEME_BUILDER_LOADED"&&y(!1))};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[a]),e.useEffect(()=>{i===!1&&a()},[s,i,a]),e.useEffect(()=>{const n=document.querySelector("#arc__dashboard-main"),t=document.querySelector(".dashboard-content"),m=()=>{if(c.current){const{height:R}=n.getBoundingClientRect(),{top:S}=t.getBoundingClientRect(),{top:b}=c.current.getBoundingClientRect(),L=R-b+S-(f?108:164);x(L)}};return m(),window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[f,s]),o.jsxs(o.Fragment,{children:[o.jsx(h,{ref:c}),i&&o.jsx(h,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"500px"},children:o.jsx(H,{})}),o.jsx("iframe",{title:"Theme Builder",ref:d,src:`${p(window.location.origin,r,"/hosted/theme-builder/")}?${l.toString()}`,style:{border:0,width:"100%",height:`${w}px`,display:i?"none":"block"}})]})}export{$ as default};
@@ -1,4 +1,4 @@
1
- import{a3 as U,r as H,a as $,k as V,$ as F,bv as Z,bI as q,a5 as G}from"./vendor-ux-did-connect-CX7qG3_M.js";import{j as e,a9 as K,e as B,aa as u,aq as Q,T as j,ad as X,I as M,ab as J,bp as Y,bs as ee,bo as te,q as re,bQ as ae,ah as oe}from"./vendor-mui-core-wlbruq2I.js";import{p as se}from"./util-CS4PqVkK.js";import{r as s,L as ne}from"./vendor-react-DEoibe3W.js";import{_ as ie}from"./useLocalStorage-BF3BqN1O.js";import{D}from"./index-DQjZ74P0.js";import{M as I}from"./index-BXjOxZPH.js";import{O as le}from"./vendor-arcblock-B4hgrXYM.js";import{d as ce}from"./InfoOutlined-CLiL5VeK.js";import{d as de,e as _}from"./vendor-utils-B3iZkn2R.js";import{S as T}from"./shorten-label-CTSJhlwO.js";import{r as O}from"./index-DWgnwzKO.js";import{u as ue}from"./dashboard-B7qE-Md0.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./base32-CmYq1ikq.js";import"./index-8eXqqyHQ.js";import"./confirm-BjCmRSAF.js";import"./PlayArrow-B_ZNrQDa.js";import"./get-safe-url-BWDUV79Q.js";import"./session-1k8BRnYA.js";import"./use-blocklet-logo-6YMz11ob.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CXU9YBvX.js";const R=s.createContext({}),{Provider:pe,Consumer:Xe}=R;function me(){return localStorage.getItem("audit-log-page-size")&&Number(localStorage.getItem("audit-log-page-size"))||10}function fe({children:t,scope:l="",categories:r=[],showScope:n,scopeFormatter:p}){const{api:m,info:v}=D(),[L,C]=s.useState([]),[c,h]=s.useState({total:0,pageSize:me(),pageCount:0,page:1}),[f,d]=s.useState(!1),[x,a]=s.useState(""),[i,S]=ie(`audit-log-category-${l}`,"all"),z=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(b=>r.length?b.value==="all"||r.includes(b.value):!0),w=async({page:b=1,pageSize:o=20,silent:y=!0}={})=>{if(!f){y||d(!0);try{const g=await m.getAuditLogs({input:{paging:{page:b,pageSize:o},category:i==="all"?"":i,scope:l,actionOrContent:x}});n&&(g.list||[]).forEach(P=>{P.scope!==v.did&&(P.link=`/blocklets/${P.scope}/components`)}),C(g.list),h(g.paging),d(!1)}catch(g){U.error(g.message),d(!1)}}};s.useEffect(()=>{localStorage.setItem("audit-log-page-size",c.pageSize)},[c.pageSize]),s.useEffect(()=>{w({page:1,pageSize:c.pageSize,silent:!1})},[]),s.useEffect(()=>{w({page:1,pageSize:c.pageSize,silent:!1})},[i,x]);const k={loading:f,fetch:w,filter:{category:i,scope:l},categories:z,setCategory:S,data:L,paging:c,setPaging:h,showScope:n,scopeFormatter:p,actionOrContent:x,setActionOrContent:a};return e.jsx(pe,{value:{auditLogs:k},children:t})}function W(){const{auditLogs:t}=s.useContext(R);return t}var A={},ge=K;Object.defineProperty(A,"__esModule",{value:!0});var N=A.default=void 0,xe=ge(H()),Le=e;N=A.default=(0,xe.default)((0,Le.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore");function he(t){if(!t)return[];const l=/\[([^\]]+)\]\(([^)]+)\)/g,r=[];let n;for(;(n=l.exec(t))!==null;)r.push({text:n[1],url:n[2]});return r}const ve=`
1
+ import{a3 as U,r as H,a as $,k as V,$ as F,bv as Z,bI as q,a5 as G}from"./vendor-ux-did-connect-CX7qG3_M.js";import{j as e,a9 as K,e as B,aa as u,aq as Q,T as j,ad as X,I as M,ab as J,bp as Y,bs as ee,bo as te,q as re,bQ as ae,ah as oe}from"./vendor-mui-core-wlbruq2I.js";import{p as se}from"./util-CS4PqVkK.js";import{r as s,L as ne}from"./vendor-react-DEoibe3W.js";import{_ as ie}from"./useLocalStorage-BF3BqN1O.js";import{D}from"./index-B18R5SlV.js";import{M as I}from"./index-BXjOxZPH.js";import{O as le}from"./vendor-arcblock-B4hgrXYM.js";import{d as ce}from"./InfoOutlined-CLiL5VeK.js";import{d as de,e as _}from"./vendor-utils-B3iZkn2R.js";import{S as T}from"./shorten-label-CTSJhlwO.js";import{r as O}from"./index-DWgnwzKO.js";import{u as ue}from"./dashboard-k0XcV2m5.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./base32-CmYq1ikq.js";import"./index-8eXqqyHQ.js";import"./confirm-Bay3BcpN.js";import"./PlayArrow-B_ZNrQDa.js";import"./get-safe-url-CwT4-jkw.js";import"./session-1k8BRnYA.js";import"./use-blocklet-logo-DGSQQmh2.js";import"./dot-DR7_m3Np.js";import"./useAsync-BMCqtJH2.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CiFFAdJf.js";const R=s.createContext({}),{Provider:pe,Consumer:Xe}=R;function me(){return localStorage.getItem("audit-log-page-size")&&Number(localStorage.getItem("audit-log-page-size"))||10}function fe({children:t,scope:l="",categories:r=[],showScope:n,scopeFormatter:p}){const{api:m,info:v}=D(),[L,C]=s.useState([]),[c,h]=s.useState({total:0,pageSize:me(),pageCount:0,page:1}),[f,d]=s.useState(!1),[x,a]=s.useState(""),[i,S]=ie(`audit-log-category-${l}`,"all"),z=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(b=>r.length?b.value==="all"||r.includes(b.value):!0),w=async({page:b=1,pageSize:o=20,silent:y=!0}={})=>{if(!f){y||d(!0);try{const g=await m.getAuditLogs({input:{paging:{page:b,pageSize:o},category:i==="all"?"":i,scope:l,actionOrContent:x}});n&&(g.list||[]).forEach(P=>{P.scope!==v.did&&(P.link=`/blocklets/${P.scope}/components`)}),C(g.list),h(g.paging),d(!1)}catch(g){U.error(g.message),d(!1)}}};s.useEffect(()=>{localStorage.setItem("audit-log-page-size",c.pageSize)},[c.pageSize]),s.useEffect(()=>{w({page:1,pageSize:c.pageSize,silent:!1})},[]),s.useEffect(()=>{w({page:1,pageSize:c.pageSize,silent:!1})},[i,x]);const k={loading:f,fetch:w,filter:{category:i,scope:l},categories:z,setCategory:S,data:L,paging:c,setPaging:h,showScope:n,scopeFormatter:p,actionOrContent:x,setActionOrContent:a};return e.jsx(pe,{value:{auditLogs:k},children:t})}function W(){const{auditLogs:t}=s.useContext(R);return t}var A={},ge=K;Object.defineProperty(A,"__esModule",{value:!0});var N=A.default=void 0,xe=ge(H()),Le=e;N=A.default=(0,xe.default)((0,Le.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore");function he(t){if(!t)return[];const l=/\[([^\]]+)\]\(([^)]+)\)/g,r=[];let n;for(;(n=l.exec(t))!==null;)r.push({text:n[1],url:n[2]});return r}const ve=`
2
2
  <svg style="width:38px;height:38px;" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path fill-rule="evenodd" clip-rule="evenodd" d="M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z" fill="url(#paint0_linear_606_96)"/>
4
4
  <path fill-rule="evenodd" clip-rule="evenodd" d="M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z" fill="url(#paint1_linear_606_96)"/>
@@ -1 +1 @@
1
- import{v as I,j as e,aa as t,ab as z,y as d,T as a,aq as L,ad as D,bR as O,bt as T,bS as F,X as B,ap as w,al as U}from"./vendor-mui-core-wlbruq2I.js";import{r as x}from"./vendor-react-DEoibe3W.js";import{x as H}from"./vendor-hooks-BCm626KH.js";import{A as v}from"./vendor-utils-B3iZkn2R.js";import{a as M,k as u,b6 as p,bq as X,D as C}from"./vendor-ux-did-connect-CX7qG3_M.js";import{R as q,H as K}from"./vendor-arcblock-B4hgrXYM.js";import{W as Q}from"./did-address-bJAfhuZx.js";import{d as V}from"./Home-DeTVRhMG.js";import{u as $,d as G}from"./index-DQjZ74P0.js";import"./lottie-web-jYmAQWuC.js";function oe(){var f,b,y,_;const{searchParams:r}=new URL(window.location.href),{session:o}=$(),{t:c}=M(),m=r.get("client_id"),k=r.get("scope")||"profile:read",[g,S]=x.useState(k.split(" ").filter(Boolean)),P=I("(max-width: 600px)"),A=v(window.location.origin,u.WELLKNOWN_SERVICE_PATH_PREFIX,"/oauth/authorize"),N=x.useCallback(i=>i?i.startsWith("http")?i:`${v(u.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/media/upload",window.blocklet.appPid)}/${i}`:"",[]),[h,j]=H({client:null,loading:!0});x.useEffect(()=>{(async()=>{const{data:n}=await G.get("/oauth/client",{params:{clientId:m}});j({client:n,loading:!1})})()},[m,j]);const R=i=>{i!=="profile:read"&&S(n=>n.includes(i)?n.filter(E=>E!==i):[...n,i])};if(h.loading||!(o!=null&&o.user))return e.jsx(p,{did:(f=window.blocklet)==null?void 0:f.appPid,standalone:!0,children:e.jsx(t,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:e.jsx(z,{})})});if(!h.client)return e.jsx(p,{did:(b=window.blocklet)==null?void 0:b.appPid,standalone:!0,children:e.jsx(t,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:e.jsx(q,{style:{backgroundColor:"transparent"},status:"error",title:c("notFoundOauthClient"),extra:e.jsx(d,{variant:"outlined",color:"primary",size:"small",startIcon:e.jsx(V,{}),href:"/",style:{borderRadius:4},children:c("connectCli.home")})})})});const{client:s}=h,{user:l}=o,W=(s.scope||"").split(" ");return e.jsxs(p,{did:(y=window.blocklet)==null?void 0:y.appPid,standalone:!0,children:[e.jsx(K,{children:e.jsx("title",{children:c("oauth.authorize")})}),e.jsx(X,{hideCloseButton:!0,children:e.jsxs(t,{sx:{display:"flex",flexDirection:"column",p:{xs:2,lg:3,xl:4},pt:{xs:3,xl:4},bgcolor:"background.paper"},className:"page-authorize",children:[e.jsxs(t,{sx:{textAlign:"center",mb:2},children:[e.jsxs(t,{sx:{display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:[e.jsx(C,{src:(_=window.blocklet)==null?void 0:_.appLogo,alt:"Server",width:48,height:48}),e.jsxs(t,{sx:{mx:2,display:"flex",alignItems:"center","& .dot":{width:8,height:8,borderRadius:"50%",bgcolor:"divider",mx:.5}},children:[e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"})]}),e.jsx(C,{src:N(s.logo_uri),alt:s.client_name,width:48,height:48})]}),e.jsxs(a,{sx:{mb:1,fontSize:"1.2rem","& .app-name":{color:"primary.main"}},children:["Authorize ",e.jsx("span",{className:"app-name",children:s.client_name})]})]}),e.jsxs(t,{sx:{display:"flex",alignItems:"center",width:"100%",overflow:"hidden",mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},className:"info",children:[e.jsx(L,{src:l.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),e.jsxs(t,{sx:{flex:1,overflow:"hidden"},children:[e.jsx(D,{title:l.fullName,children:e.jsx(t,{className:"name",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:l.fullName})}),e.jsx(t,{className:"did",children:e.jsx(Q,{compact:!0,responsive:!1,did:l.did,showQrcode:!P})})]})]}),e.jsxs(a,{variant:"subtitle1",sx:{mb:2,fontWeight:500},children:["Allow ",s.client_name," to do the following on your behalf:"]}),e.jsxs(t,{sx:{border:"1px solid",borderColor:"divider",borderRadius:2,overflow:"hidden"},children:[e.jsx(t,{sx:{p:2},children:e.jsx(O,{children:Object.entries(u.OAUTH_SCOPES).filter(([i])=>W.includes(i)).map(([i,n])=>e.jsx(T,{control:e.jsx(F,{checked:g.includes(i),onChange:()=>R(i),disabled:i==="profile:read"||["blocklet:read","blocklet:write"].includes(i)&&!["owner","admin","member"].includes(l.role),color:"primary",sx:{"&.Mui-checked":{color:"success.main"}}}),label:e.jsx(t,{children:e.jsx(a,{variant:"body1",sx:{fontWeight:500},children:n})}),sx:{mb:0}},i))})}),(s.tos_uri||s.policy_uri)&&e.jsxs(e.Fragment,{children:[e.jsx(B,{}),e.jsx(t,{sx:{height:1,bgcolor:"divider"}}),e.jsx(t,{sx:{p:2,color:"text.secondary"},children:e.jsxs(a,{variant:"body2",children:["By authorize the access, you also agree with the"," ",!!s.tos_uri&&e.jsx(w,{href:s.tos_uri,target:"_blank",children:"Terms of Use"}),!!s.tos_uri&&!!s.policy_uri&&" and ",!!s.policy_uri&&e.jsx(w,{href:s.policy_uri,target:"_blank",children:"Privacy Policy"})]})})]})]}),e.jsxs("form",{method:"POST",action:A,children:[r.get("client_id")&&e.jsx("input",{type:"hidden",name:"client_id",value:r.get("client_id")}),r.get("response_type")&&e.jsx("input",{type:"hidden",name:"response_type",value:r.get("response_type")}),r.get("redirect_uri")&&e.jsx("input",{type:"hidden",name:"redirect_uri",value:r.get("redirect_uri")}),r.get("code_challenge")&&e.jsx("input",{type:"hidden",name:"code_challenge",value:r.get("code_challenge")}),r.get("code_challenge_method")&&e.jsx("input",{type:"hidden",name:"code_challenge_method",value:r.get("code_challenge_method")}),r.get("state")&&e.jsx("input",{type:"hidden",name:"state",value:r.get("state")}),e.jsx("input",{type:"hidden",name:"scope",value:g.join(" ")}),e.jsx(t,{sx:{mt:"auto",pt:3},children:e.jsxs(U,{direction:"row",spacing:2,children:[e.jsx(d,{variant:"outlined",size:"large",fullWidth:!0,type:"submit",name:"action",value:"deny",children:"Cancel"}),e.jsx(d,{variant:"contained",size:"large",fullWidth:!0,type:"submit",name:"action",value:"allow",children:"Authorize"})]})}),r.get("redirect_uri")&&e.jsxs(t,{sx:{mt:3,textAlign:"center"},children:[e.jsx(a,{variant:"body2",color:"text.secondary",children:"You will be redirected to"}),e.jsx(a,{variant:"body2",color:"text.secondary",sx:{wordBreak:"break-all"},children:r.get("redirect_uri")})]}),e.jsx(t,{sx:{mt:2,textAlign:"center"},children:e.jsxs(a,{variant:"body2",children:["Not you?"," ",e.jsx(d,{variant:"text",color:"primary",onClick:()=>o.switchDid(),sx:{p:0,minWidth:"auto",textTransform:"none",verticalAlign:"baseline",fontWeight:"inherit",fontSize:"inherit","&:hover":{background:"none",textDecoration:"underline"}},children:"Use another account"})]})})]})]})})]})}export{oe as default};
1
+ import{v as I,j as e,aa as t,ab as z,y as d,T as a,aq as L,ad as D,bR as O,bt as T,bS as F,X as B,ap as w,al as U}from"./vendor-mui-core-wlbruq2I.js";import{r as x}from"./vendor-react-DEoibe3W.js";import{x as H}from"./vendor-hooks-BCm626KH.js";import{A as v}from"./vendor-utils-B3iZkn2R.js";import{a as M,k as u,b6 as p,bq as X,D as C}from"./vendor-ux-did-connect-CX7qG3_M.js";import{R as q,H as K}from"./vendor-arcblock-B4hgrXYM.js";import{W as Q}from"./did-address-bJAfhuZx.js";import{d as V}from"./Home-DeTVRhMG.js";import{u as $,d as G}from"./index-B18R5SlV.js";import"./lottie-web-jYmAQWuC.js";function oe(){var f,b,y,_;const{searchParams:r}=new URL(window.location.href),{session:o}=$(),{t:c}=M(),m=r.get("client_id"),k=r.get("scope")||"profile:read",[g,S]=x.useState(k.split(" ").filter(Boolean)),P=I("(max-width: 600px)"),A=v(window.location.origin,u.WELLKNOWN_SERVICE_PATH_PREFIX,"/oauth/authorize"),N=x.useCallback(i=>i?i.startsWith("http")?i:`${v(u.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/media/upload",window.blocklet.appPid)}/${i}`:"",[]),[h,j]=H({client:null,loading:!0});x.useEffect(()=>{(async()=>{const{data:n}=await G.get("/oauth/client",{params:{clientId:m}});j({client:n,loading:!1})})()},[m,j]);const R=i=>{i!=="profile:read"&&S(n=>n.includes(i)?n.filter(E=>E!==i):[...n,i])};if(h.loading||!(o!=null&&o.user))return e.jsx(p,{did:(f=window.blocklet)==null?void 0:f.appPid,standalone:!0,children:e.jsx(t,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:e.jsx(z,{})})});if(!h.client)return e.jsx(p,{did:(b=window.blocklet)==null?void 0:b.appPid,standalone:!0,children:e.jsx(t,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:e.jsx(q,{style:{backgroundColor:"transparent"},status:"error",title:c("notFoundOauthClient"),extra:e.jsx(d,{variant:"outlined",color:"primary",size:"small",startIcon:e.jsx(V,{}),href:"/",style:{borderRadius:4},children:c("connectCli.home")})})})});const{client:s}=h,{user:l}=o,W=(s.scope||"").split(" ");return e.jsxs(p,{did:(y=window.blocklet)==null?void 0:y.appPid,standalone:!0,children:[e.jsx(K,{children:e.jsx("title",{children:c("oauth.authorize")})}),e.jsx(X,{hideCloseButton:!0,children:e.jsxs(t,{sx:{display:"flex",flexDirection:"column",p:{xs:2,lg:3,xl:4},pt:{xs:3,xl:4},bgcolor:"background.paper"},className:"page-authorize",children:[e.jsxs(t,{sx:{textAlign:"center",mb:2},children:[e.jsxs(t,{sx:{display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:[e.jsx(C,{src:(_=window.blocklet)==null?void 0:_.appLogo,alt:"Server",width:48,height:48}),e.jsxs(t,{sx:{mx:2,display:"flex",alignItems:"center","& .dot":{width:8,height:8,borderRadius:"50%",bgcolor:"divider",mx:.5}},children:[e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"})]}),e.jsx(C,{src:N(s.logo_uri),alt:s.client_name,width:48,height:48})]}),e.jsxs(a,{sx:{mb:1,fontSize:"1.2rem","& .app-name":{color:"primary.main"}},children:["Authorize ",e.jsx("span",{className:"app-name",children:s.client_name})]})]}),e.jsxs(t,{sx:{display:"flex",alignItems:"center",width:"100%",overflow:"hidden",mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},className:"info",children:[e.jsx(L,{src:l.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),e.jsxs(t,{sx:{flex:1,overflow:"hidden"},children:[e.jsx(D,{title:l.fullName,children:e.jsx(t,{className:"name",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:l.fullName})}),e.jsx(t,{className:"did",children:e.jsx(Q,{compact:!0,responsive:!1,did:l.did,showQrcode:!P})})]})]}),e.jsxs(a,{variant:"subtitle1",sx:{mb:2,fontWeight:500},children:["Allow ",s.client_name," to do the following on your behalf:"]}),e.jsxs(t,{sx:{border:"1px solid",borderColor:"divider",borderRadius:2,overflow:"hidden"},children:[e.jsx(t,{sx:{p:2},children:e.jsx(O,{children:Object.entries(u.OAUTH_SCOPES).filter(([i])=>W.includes(i)).map(([i,n])=>e.jsx(T,{control:e.jsx(F,{checked:g.includes(i),onChange:()=>R(i),disabled:i==="profile:read"||["blocklet:read","blocklet:write"].includes(i)&&!["owner","admin","member"].includes(l.role),color:"primary",sx:{"&.Mui-checked":{color:"success.main"}}}),label:e.jsx(t,{children:e.jsx(a,{variant:"body1",sx:{fontWeight:500},children:n})}),sx:{mb:0}},i))})}),(s.tos_uri||s.policy_uri)&&e.jsxs(e.Fragment,{children:[e.jsx(B,{}),e.jsx(t,{sx:{height:1,bgcolor:"divider"}}),e.jsx(t,{sx:{p:2,color:"text.secondary"},children:e.jsxs(a,{variant:"body2",children:["By authorize the access, you also agree with the"," ",!!s.tos_uri&&e.jsx(w,{href:s.tos_uri,target:"_blank",children:"Terms of Use"}),!!s.tos_uri&&!!s.policy_uri&&" and ",!!s.policy_uri&&e.jsx(w,{href:s.policy_uri,target:"_blank",children:"Privacy Policy"})]})})]})]}),e.jsxs("form",{method:"POST",action:A,children:[r.get("client_id")&&e.jsx("input",{type:"hidden",name:"client_id",value:r.get("client_id")}),r.get("response_type")&&e.jsx("input",{type:"hidden",name:"response_type",value:r.get("response_type")}),r.get("redirect_uri")&&e.jsx("input",{type:"hidden",name:"redirect_uri",value:r.get("redirect_uri")}),r.get("code_challenge")&&e.jsx("input",{type:"hidden",name:"code_challenge",value:r.get("code_challenge")}),r.get("code_challenge_method")&&e.jsx("input",{type:"hidden",name:"code_challenge_method",value:r.get("code_challenge_method")}),r.get("state")&&e.jsx("input",{type:"hidden",name:"state",value:r.get("state")}),e.jsx("input",{type:"hidden",name:"scope",value:g.join(" ")}),e.jsx(t,{sx:{mt:"auto",pt:3},children:e.jsxs(U,{direction:"row",spacing:2,children:[e.jsx(d,{variant:"outlined",size:"large",fullWidth:!0,type:"submit",name:"action",value:"deny",children:"Cancel"}),e.jsx(d,{variant:"contained",size:"large",fullWidth:!0,type:"submit",name:"action",value:"allow",children:"Authorize"})]})}),r.get("redirect_uri")&&e.jsxs(t,{sx:{mt:3,textAlign:"center"},children:[e.jsx(a,{variant:"body2",color:"text.secondary",children:"You will be redirected to"}),e.jsx(a,{variant:"body2",color:"text.secondary",sx:{wordBreak:"break-all"},children:r.get("redirect_uri")})]}),e.jsx(t,{sx:{mt:2,textAlign:"center"},children:e.jsxs(a,{variant:"body2",children:["Not you?"," ",e.jsx(d,{variant:"text",color:"primary",onClick:()=>o.switchDid(),sx:{p:0,minWidth:"auto",textTransform:"none",verticalAlign:"baseline",fontWeight:"inherit",fontSize:"inherit","&:hover":{background:"none",textDecoration:"underline"}},children:"Use another account"})]})})]})]})})]})}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{b as AA,r as C}from"./vendor-react-DEoibe3W.js";import{H as P,j as A,I as i,bx as xA,y as p,P as gA,w as QA,a8 as sA,M as jA,q as MA,c1 as yA,O as PA,aa as g,ab as BA,ah as h,d1 as fA,bZ as IA,E as EA,br as LA,al as YA,T,X as o}from"./vendor-mui-core-wlbruq2I.js";import{bb as zA,d as q,a3 as TA}from"./vendor-ux-did-connect-CX7qG3_M.js";import{x as ZA}from"./vendor-hooks-BCm626KH.js";import{c as M}from"./vendor-arcblock-B4hgrXYM.js";import{s as lA}from"./sanitize-DbZs1H_T.js";import{d as eA}from"./Done-CcJLRcBY.js";import{F as nA,R as wA,L as m}from"./logo-uploader-BecsVnr8.js";import{E as GA}from"./EditIcon-DiM9RB8U.js";import{d as JA}from"./ArrowDropDown-Ce8TY3aP.js";import{D as dA,V as NA,W as mA}from"./index-DQjZ74P0.js";import{w as DA}from"./permission-B7ZHEOJv.js";import{h as kA}from"./use-blocklet-logo-6YMz11ob.js";import{S as W}from"./section-Bb547IGJ.js";import"./vendor-utils-B3iZkn2R.js";import"./lottie-web-jYmAQWuC.js";import"./omit-O1pUD7ku.js";import"./index-BpvW-cUy.js";import"./index-DVQCgvFb.js";import"./session-1k8BRnYA.js";function U({triggers:f,onEnterEdit:B,disabled:X}){const H=AA.useRef(null),[y,t]=AA.useState(!1),b=D=>{t(!1),D()},v=()=>{t(D=>!D)},n=D=>{H.current&&H.current.contains(D.target)||t(!1)};return f.length===0?A.jsx(i,{"data-cy":"schema-form-item-edit",onClick:B,disabled:X,size:"large",children:A.jsx(GA,{})}):A.jsxs(A.Fragment,{children:[A.jsx(xA,{variant:"outlined",ref:H,"aria-label":"split button",children:A.jsx(p,{size:"large","aria-controls":y?"split-button-menu":void 0,"aria-expanded":y?"true":void 0,sx:{paddingLeft:"12px",paddingRight:"12px"},onClick:v,children:A.jsx(JA,{})})}),A.jsx(gA,{sx:{zIndex:9999},open:y,anchorEl:H.current,role:void 0,placement:"bottom-end",children:A.jsx(QA,{children:A.jsx(sA,{onClickAway:n,children:A.jsx(jA,{id:"split-button-menu",autoFocusItem:!0,children:f.map(D=>A.jsx(MA,{onClick:()=>b(D.handler),children:D.title},D.key))})})})})]})}U.propTypes={triggers:P.arrayOf(P.shape({key:P.string.isRequired,title:P.string.isRequired,handler:P.func.isRequired})),onEnterEdit:P.func.isRequired,disabled:P.bool.isRequired};U.defaultProps={triggers:[]};const vA=(f,B,X)=>f===null&&B&&X?"******":f?B?"******":f:"",aA=yA`
1
+ import{b as AA,r as C}from"./vendor-react-DEoibe3W.js";import{H as P,j as A,I as i,bx as xA,y as p,P as gA,w as QA,a8 as sA,M as jA,q as MA,c1 as yA,O as PA,aa as g,ab as BA,ah as h,d1 as fA,bZ as IA,E as EA,br as LA,al as YA,T,X as o}from"./vendor-mui-core-wlbruq2I.js";import{bb as zA,d as q,a3 as TA}from"./vendor-ux-did-connect-CX7qG3_M.js";import{x as ZA}from"./vendor-hooks-BCm626KH.js";import{c as M}from"./vendor-arcblock-B4hgrXYM.js";import{s as lA}from"./sanitize-DbZs1H_T.js";import{d as eA}from"./Done-CcJLRcBY.js";import{F as nA,R as wA,L as m}from"./logo-uploader-Dhh7Un4G.js";import{E as GA}from"./EditIcon-DiM9RB8U.js";import{d as JA}from"./ArrowDropDown-Ce8TY3aP.js";import{D as dA,V as NA,W as mA}from"./index-B18R5SlV.js";import{w as DA}from"./permission-B7ZHEOJv.js";import{h as kA}from"./use-blocklet-logo-DGSQQmh2.js";import{S as W}from"./section-Bb547IGJ.js";import"./vendor-utils-B3iZkn2R.js";import"./lottie-web-jYmAQWuC.js";import"./omit-O1pUD7ku.js";import"./index-BpvW-cUy.js";import"./index-DVQCgvFb.js";import"./session-1k8BRnYA.js";function U({triggers:f,onEnterEdit:B,disabled:X}){const H=AA.useRef(null),[y,t]=AA.useState(!1),b=D=>{t(!1),D()},v=()=>{t(D=>!D)},n=D=>{H.current&&H.current.contains(D.target)||t(!1)};return f.length===0?A.jsx(i,{"data-cy":"schema-form-item-edit",onClick:B,disabled:X,size:"large",children:A.jsx(GA,{})}):A.jsxs(A.Fragment,{children:[A.jsx(xA,{variant:"outlined",ref:H,"aria-label":"split button",children:A.jsx(p,{size:"large","aria-controls":y?"split-button-menu":void 0,"aria-expanded":y?"true":void 0,sx:{paddingLeft:"12px",paddingRight:"12px"},onClick:v,children:A.jsx(JA,{})})}),A.jsx(gA,{sx:{zIndex:9999},open:y,anchorEl:H.current,role:void 0,placement:"bottom-end",children:A.jsx(QA,{children:A.jsx(sA,{onClickAway:n,children:A.jsx(jA,{id:"split-button-menu",autoFocusItem:!0,children:f.map(D=>A.jsx(MA,{onClick:()=>b(D.handler),children:D.title},D.key))})})})})]})}U.propTypes={triggers:P.arrayOf(P.shape({key:P.string.isRequired,title:P.string.isRequired,handler:P.func.isRequired})),onEnterEdit:P.func.isRequired,disabled:P.bool.isRequired};U.defaultProps={triggers:[]};const vA=(f,B,X)=>f===null&&B&&X?"******":f?B?"******":f:"",aA=yA`
2
2
  0%, 100% {
3
3
  transform: scale(1) translateX(0);
4
4
  }
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DnDFazyx.js","assets/vendor-ux-did-connect-CX7qG3_M.js","assets/vendor-react-DEoibe3W.js","assets/vendor-utils-B3iZkn2R.js","assets/vendor-mui-core-wlbruq2I.js","assets/vendor-hooks-BCm626KH.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/vendor-arcblock-B4hgrXYM.js","assets/index-BpvW-cUy.js","assets/index-DQjZ74P0.js","assets/index-DOq-_YXu.css","assets/index-DVQCgvFb.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
2
- import{r as Se,a as Ie,_ as Pe,bn as ke,k as O}from"./vendor-ux-did-connect-CX7qG3_M.js";import{a9 as Re,j as e,al as z,T as P,aa as m,aq as Ee,ad as re,I as F,D as ue,H as w,aj as _e,t as De,bU as Le,N as oe,z as Oe,y as U,ah as Ve}from"./vendor-mui-core-wlbruq2I.js";import{E as M}from"./empty-spinner-DSwpCqdd.js";import{d as ie}from"./DeleteOutline-1-hBNY1U.js";import{l as Te,f as Ue}from"./vendor-hooks-BCm626KH.js";import{r as h}from"./vendor-react-DEoibe3W.js";import{D as se,C as ne,P as ae}from"./react-beautiful-dnd.esm-DCPrD7-r.js";import{S as K}from"./studio-Cua13-ul.js";import"./vendor-utils-B3iZkn2R.js";import"./lottie-web-jYmAQWuC.js";import"./raf-schd.esm-B3j6BePR.js";import"./vendor-arcblock-B4hgrXYM.js";import"./TuneOutlined-0oMZE8a4.js";var C={};Object.defineProperty(C,"__esModule",{value:!0});C.getVideoId=V;var $e=C.getEmbedUrl=ze,We=C.getVideoCoverUrl=Fe,Ae=C.getVideoCheckUrl=Ne;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=qe;function pe(r){var s,l,i;const t=r.trim();return t.includes("youtu.be/")?(s=t.split("youtu.be/")[1])==null?void 0:s.split("?")[0]:t.includes("/embed/")?(l=t.split("/embed/")[1])==null?void 0:l.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?(i=t.split("/shorts/")[1])==null?void 0:i.split("?")[0]:""}function he(r){var s,l,i,a,u,y,g;const t=r.trim();return t.includes("/embed/")?(s=t.split("/embed/")[1])==null?void 0:s.split("?")[0]:t.includes("vimeo.com/video/")?(l=t.split("/video/")[1])==null?void 0:l.split("?")[0]:t.includes("vimeo.com/channels/")?(a=(i=t.split("/channels/")[1])==null?void 0:i.split("/")[1])==null?void 0:a.split("?")[0]:t.includes("vimeo.com/groups/")?(y=(u=t.split("/groups/")[1])==null?void 0:u.split("/")[1])==null?void 0:y.split("?")[0]:t.includes("vimeo.com/")?(g=t.split("vimeo.com/")[1])==null?void 0:g.split("?")[0]:""}const $={};function V(r){const t=r.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:($[t]||($[t]=(()=>{const s=new URL(t);return s.host.includes("youtube.com")||s.host.includes("youtu.be")?[pe(t),"youtube"]:s.host.includes("vimeo.com")?[he(t),"vimeo"]:[]})()),$[t])}const R={};function ze(r,{modestbranding:t=1,controls:s=0,autoplay:l=0}={}){const i=r.trim();if(!i)return"";if(R[i]!==void 0)return R[i];const[a,u]=V(i);return u==="youtube"?R[i]=`https://www.youtube.com/embed/${a}?modestbranding=${t}&controls=${s}&autoplay=${l}`:u==="vimeo"?R[i]=`https://player.vimeo.com/video/${a}?autoplay=${l}`:R[i]="",R[i]}const E={};function Fe(r){const t=r.trim();if(!t)return"";if(E[t]!==void 0)return E[t];const[s,l]=V(t);return l==="youtube"?E[t]=`https://img.youtube.com/vi/${s}/mqdefault.jpg`:l==="vimeo"?E[t]=`https://i.vimeocdn.com/${s}/1000x563`:E[t]="",E[t]}function Ne(r){const t=r.trim();if(!t)return"";const[s,l]=V(t);return l==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${s}&format=json`:l==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${s}`:""}function qe(r){const t=r.trim();return V(t).length>0}var X={},He=Re;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=He(Se()),Ke=e;me=X.default=(0,Be.default)((0,Ke.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste");const le=h.lazy(()=>Pe(()=>import("./index-DnDFazyx.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(r=>({default:r.Uploader}))),Me=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Xe=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ye=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,W=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,Je=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,ce=5,de=3;function ut(){var ee;const{t:r,locale:t}=Ie(),[s,l]=h.useState(!1),[i,a]=h.useState(!1),[u,y]=h.useState([]),[g,j]=h.useState([]),[x,S]=h.useState(""),[T,_]=h.useState(""),[N,q]=h.useState(Date.now()),p=Te(async()=>{var c;const n=await(await fetch(W)).json();return y(n.screenshots||[]),j(((c=n.videos)==null?void 0:c.filter(d=>!!d))||[]),n}),k=h.useRef(null),f=h.useRef(null);if(p.loading&&!p.data)return e.jsx(K,{children:e.jsx(M,{size:40})});if(p.error)return e.jsx(K,{children:e.jsx(z,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(P,{color:"error.main",sx:{fontWeight:"bold"},children:p.error.message})})});const v=async o=>{const n=o.filter(c=>!!c);j(n),await fetch(Je,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:n})})},H=async o=>{const n=Array.from(g),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),await v(n)},ge=async o=>{const n=Array.from(u),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),y(n),await fetch(`${W}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:n})})},J=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await ge(o):o.source.droppableId==="videos"&&await H(o),p.runAsync())},Z=o=>{_(o.trim()),a(!0)},G=async(o,n="")=>{let c=[];n?c=o?g.map(d=>d===n?o.trim():d):g.filter(d=>d!==n):o&&(c=[...g,o.trim()]),_(""),a(!1),(o||n)&&await v(c),p.runAsync()},xe=o=>{l(!0),S(o)},Q=()=>{l(!1),S("")};function be(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],n=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx(A,{title:r("common.logo"),rules:o,tips:n,children:e.jsx(m,{sx:{flex:1,cursor:"pointer"},children:e.jsx(Ee,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ye}?t=${N}`,onClick:()=>{var c;return(c=k.current)==null?void 0:c.open()}})})})}function ve(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${ce}`},{label:r("studio.size"),value:"<5MB"}],n=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx(A,{title:r("common.screenshot"),tips:n,rules:o,children:e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"screenshots",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[u.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>{const te=`${W}/${b}`;return e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"screenshot",src:te,onClick:()=>xe(b),style:{cursor:"pointer"}}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(te,{method:"DELETE"}),p.runAsync()},children:e.jsx(ie,{})})})]})}},b)),d.placeholder,u.length<ce&&c()]})})})});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>{var d;return(d=f.current)==null?void 0:d.open()},children:"+"})}}function je(){const o=[{label:r("studio.count"),value:`1~${de}`},{label:r("studio.videoType"),value:e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",e.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})}],n=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs(A,{title:r("studio.video"),tips:n,rules:o,children:[e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"videos",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[g.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"videos",src:We(b),onClick:()=>Z(b),style:{cursor:"pointer"}}),e.jsx(m,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>Z(b),children:e.jsx(fe,{})}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>G(null,b),children:e.jsx(ie,{})})})]})},b)),d.placeholder,g.length<de&&c()]})})}),i&&e.jsx(Y,{t:r,handleOperateVideo:G,defaultUrl:T,videos:g})]});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>a(!0),children:"+"})}}function ye(){return e.jsx(ue,{open:s,onClose:Q,maxWidth:"xl",PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none"}},children:e.jsx("img",{src:`${W}/${x}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:Q})})}function we(){return e.jsxs(h.Suspense,{fallback:e.jsx(M,{size:40}),children:[e.jsx(le,{ref:k,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=k.current)==null||o.close(),q(Date.now()),p.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Me,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/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"),e.jsx(le,{ref:f,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=f.current)==null||o.close(),p.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Xe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-u.length}},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")]})}const Ce=`https://www.arcblock.io/docs/blocklet-store/${t}/supplying-images`;return e.jsx(K,{children:e.jsxs(Ze,{children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(P,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:(ee=p.data)==null?void 0:ee.title})}),e.jsxs(P,{variant:"body2",color:"text.secondary",children:[r("studio.description")," ",e.jsx("a",{href:Ce,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),be(),ve(),je(),ye(),we()]})})}function A({title:r,rules:t,tips:s,children:l}){return e.jsxs(m,{display:"flex",flexDirection:"column",sx:{mb:4},children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(P,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(z,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:t.map(a=>i(a.label,a.value))}),s.map(a=>e.jsx(m,{sx:{fontSize:"13px",opacity:.8},children:i(a.label,a.value)}))]}),l]});function i(a,u){return e.jsxs(m,{component:"span",children:[e.jsxs(m,{component:"span",sx:{color:"#555",mr:.5},children:[a,":"]}),e.jsx(m,{component:"span",sx:{color:"#007ec6"},children:u})]})}}A.propTypes={title:w.string.isRequired,rules:w.array.isRequired,tips:w.array.isRequired,children:w.node.isRequired};function Y({handleOperateVideo:r,t,defaultUrl:s="",videos:l}){var k;const[i,a]=h.useState(s),[u,y]=h.useState(!1),[g,j]=h.useState(!1),x=h.useRef(i),S=i!==s&&l.includes(i),T=!i&&s,_=!S&&(i&&i!==x.current||u),N=!!((k=navigator.clipboard)!=null&&k.readText),{run:q}=Ue(p,{wait:500,leading:!0});return e.jsxs(ue,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(_e,{children:t(s?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(De,{children:[e.jsx(Le,{fullWidth:!0,value:i,onChange:f=>{const v=f.target.value.trim();a(v),v?q(v):j(!1)},placeholder:t("studio.videoInputLabel"),endAdornment:i?e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:()=>{a(""),p("")},children:e.jsx(ke,{})})}):N&&e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:async()=>{try{const f=(await navigator.clipboard.readText()||"").trim();a(f),p(f)}catch(f){console.error(f)}},children:e.jsx(me,{})})})}),e.jsxs(m,{mb:2,mt:.5,children:[S&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.duplicateVideo")}),!S&&g&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.videoDialogNoSrc")})]}),x.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${x.current}`,src:$e(x.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(m,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:u?e.jsx(M,{size:40}):e.jsx(P,{variant:"h5",color:"text.secondary",children:e.jsx(fe,{})})})]}),e.jsxs(Oe,{children:[e.jsx(U,{onClick:()=>r(),children:t("studio.cancel")}),T&&e.jsx(U,{variant:"contained",color:"error",onClick:()=>r(null,s),children:t("studio.delete")}),_&&e.jsx(U,{variant:"contained",onClick:()=>p(i),disabled:!i||u,children:t("studio.preview")}),!T&&!_&&e.jsx(U,{variant:"contained",onClick:()=>r(x.current),disabled:!x.current||s===x.current||S,children:t("studio.confirm")})]})]});function p(f){x.current="";const v=Ae(f);j(f?!v:!1),v&&(y(!0),fetch(v).then(H=>{H.ok?(x.current=f,j(!1)):j(!0)}).catch(()=>{j(!0)}).finally(()=>y(!1)))}}Y.propTypes={handleOperateVideo:w.func.isRequired,t:w.func.isRequired,defaultUrl:w.string,videos:w.array.isRequired};Y.defaultProps={defaultUrl:""};function fe(){return e.jsxs("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:48,width:48,children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"black","fill-opacity":"0.54"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39.6667 28L21 17.5V38.5L39.6667 28Z",fill:"white"})]})}const Ze=Ve.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CY9xLy04.js","assets/vendor-ux-did-connect-CX7qG3_M.js","assets/vendor-react-DEoibe3W.js","assets/vendor-utils-B3iZkn2R.js","assets/vendor-mui-core-wlbruq2I.js","assets/vendor-hooks-BCm626KH.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/vendor-arcblock-B4hgrXYM.js","assets/index-BpvW-cUy.js","assets/index-B18R5SlV.js","assets/index-DOq-_YXu.css","assets/index-DVQCgvFb.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
2
+ import{r as Se,a as Ie,_ as Pe,bn as ke,k as O}from"./vendor-ux-did-connect-CX7qG3_M.js";import{a9 as Re,j as e,al as z,T as P,aa as m,aq as Ee,ad as re,I as F,D as ue,H as w,aj as _e,t as De,bU as Le,N as oe,z as Oe,y as U,ah as Ve}from"./vendor-mui-core-wlbruq2I.js";import{E as M}from"./empty-spinner-DSwpCqdd.js";import{d as ie}from"./DeleteOutline-1-hBNY1U.js";import{l as Te,f as Ue}from"./vendor-hooks-BCm626KH.js";import{r as h}from"./vendor-react-DEoibe3W.js";import{D as se,C as ne,P as ae}from"./react-beautiful-dnd.esm-DCPrD7-r.js";import{S as K}from"./studio-Cua13-ul.js";import"./vendor-utils-B3iZkn2R.js";import"./lottie-web-jYmAQWuC.js";import"./raf-schd.esm-B3j6BePR.js";import"./vendor-arcblock-B4hgrXYM.js";import"./TuneOutlined-0oMZE8a4.js";var C={};Object.defineProperty(C,"__esModule",{value:!0});C.getVideoId=V;var $e=C.getEmbedUrl=ze,We=C.getVideoCoverUrl=Fe,Ae=C.getVideoCheckUrl=Ne;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=qe;function pe(r){var s,l,i;const t=r.trim();return t.includes("youtu.be/")?(s=t.split("youtu.be/")[1])==null?void 0:s.split("?")[0]:t.includes("/embed/")?(l=t.split("/embed/")[1])==null?void 0:l.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?(i=t.split("/shorts/")[1])==null?void 0:i.split("?")[0]:""}function he(r){var s,l,i,a,u,y,g;const t=r.trim();return t.includes("/embed/")?(s=t.split("/embed/")[1])==null?void 0:s.split("?")[0]:t.includes("vimeo.com/video/")?(l=t.split("/video/")[1])==null?void 0:l.split("?")[0]:t.includes("vimeo.com/channels/")?(a=(i=t.split("/channels/")[1])==null?void 0:i.split("/")[1])==null?void 0:a.split("?")[0]:t.includes("vimeo.com/groups/")?(y=(u=t.split("/groups/")[1])==null?void 0:u.split("/")[1])==null?void 0:y.split("?")[0]:t.includes("vimeo.com/")?(g=t.split("vimeo.com/")[1])==null?void 0:g.split("?")[0]:""}const $={};function V(r){const t=r.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:($[t]||($[t]=(()=>{const s=new URL(t);return s.host.includes("youtube.com")||s.host.includes("youtu.be")?[pe(t),"youtube"]:s.host.includes("vimeo.com")?[he(t),"vimeo"]:[]})()),$[t])}const R={};function ze(r,{modestbranding:t=1,controls:s=0,autoplay:l=0}={}){const i=r.trim();if(!i)return"";if(R[i]!==void 0)return R[i];const[a,u]=V(i);return u==="youtube"?R[i]=`https://www.youtube.com/embed/${a}?modestbranding=${t}&controls=${s}&autoplay=${l}`:u==="vimeo"?R[i]=`https://player.vimeo.com/video/${a}?autoplay=${l}`:R[i]="",R[i]}const E={};function Fe(r){const t=r.trim();if(!t)return"";if(E[t]!==void 0)return E[t];const[s,l]=V(t);return l==="youtube"?E[t]=`https://img.youtube.com/vi/${s}/mqdefault.jpg`:l==="vimeo"?E[t]=`https://i.vimeocdn.com/${s}/1000x563`:E[t]="",E[t]}function Ne(r){const t=r.trim();if(!t)return"";const[s,l]=V(t);return l==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${s}&format=json`:l==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${s}`:""}function qe(r){const t=r.trim();return V(t).length>0}var X={},He=Re;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=He(Se()),Ke=e;me=X.default=(0,Be.default)((0,Ke.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste");const le=h.lazy(()=>Pe(()=>import("./index-CY9xLy04.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(r=>({default:r.Uploader}))),Me=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Xe=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ye=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,W=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,Je=`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,ce=5,de=3;function ut(){var ee;const{t:r,locale:t}=Ie(),[s,l]=h.useState(!1),[i,a]=h.useState(!1),[u,y]=h.useState([]),[g,j]=h.useState([]),[x,S]=h.useState(""),[T,_]=h.useState(""),[N,q]=h.useState(Date.now()),p=Te(async()=>{var c;const n=await(await fetch(W)).json();return y(n.screenshots||[]),j(((c=n.videos)==null?void 0:c.filter(d=>!!d))||[]),n}),k=h.useRef(null),f=h.useRef(null);if(p.loading&&!p.data)return e.jsx(K,{children:e.jsx(M,{size:40})});if(p.error)return e.jsx(K,{children:e.jsx(z,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(P,{color:"error.main",sx:{fontWeight:"bold"},children:p.error.message})})});const v=async o=>{const n=o.filter(c=>!!c);j(n),await fetch(Je,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:n})})},H=async o=>{const n=Array.from(g),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),await v(n)},ge=async o=>{const n=Array.from(u),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),y(n),await fetch(`${W}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:n})})},J=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await ge(o):o.source.droppableId==="videos"&&await H(o),p.runAsync())},Z=o=>{_(o.trim()),a(!0)},G=async(o,n="")=>{let c=[];n?c=o?g.map(d=>d===n?o.trim():d):g.filter(d=>d!==n):o&&(c=[...g,o.trim()]),_(""),a(!1),(o||n)&&await v(c),p.runAsync()},xe=o=>{l(!0),S(o)},Q=()=>{l(!1),S("")};function be(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],n=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx(A,{title:r("common.logo"),rules:o,tips:n,children:e.jsx(m,{sx:{flex:1,cursor:"pointer"},children:e.jsx(Ee,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ye}?t=${N}`,onClick:()=>{var c;return(c=k.current)==null?void 0:c.open()}})})})}function ve(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${ce}`},{label:r("studio.size"),value:"<5MB"}],n=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx(A,{title:r("common.screenshot"),tips:n,rules:o,children:e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"screenshots",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[u.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>{const te=`${W}/${b}`;return e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"screenshot",src:te,onClick:()=>xe(b),style:{cursor:"pointer"}}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(te,{method:"DELETE"}),p.runAsync()},children:e.jsx(ie,{})})})]})}},b)),d.placeholder,u.length<ce&&c()]})})})});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>{var d;return(d=f.current)==null?void 0:d.open()},children:"+"})}}function je(){const o=[{label:r("studio.count"),value:`1~${de}`},{label:r("studio.videoType"),value:e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",e.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})}],n=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs(A,{title:r("studio.video"),tips:n,rules:o,children:[e.jsx(se,{onDragEnd:J,children:e.jsx(ne,{droppableId:"videos",direction:"horizontal",children:(d,D)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:D.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:D.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[g.map((b,B)=>e.jsx(ae,{draggableId:b,index:B,children:(I,L)=>e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:L.isDragging?"scale(1.05)":"none",boxShadow:L.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"videos",src:We(b),onClick:()=>Z(b),style:{cursor:"pointer"}}),e.jsx(m,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>Z(b),children:e.jsx(fe,{})}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>G(null,b),children:e.jsx(ie,{})})})]})},b)),d.placeholder,g.length<de&&c()]})})}),i&&e.jsx(Y,{t:r,handleOperateVideo:G,defaultUrl:T,videos:g})]});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>a(!0),children:"+"})}}function ye(){return e.jsx(ue,{open:s,onClose:Q,maxWidth:"xl",PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none"}},children:e.jsx("img",{src:`${W}/${x}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:Q})})}function we(){return e.jsxs(h.Suspense,{fallback:e.jsx(M,{size:40}),children:[e.jsx(le,{ref:k,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=k.current)==null||o.close(),q(Date.now()),p.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Me,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/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"),e.jsx(le,{ref:f,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=f.current)==null||o.close(),p.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Xe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-u.length}},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")]})}const Ce=`https://www.arcblock.io/docs/blocklet-store/${t}/supplying-images`;return e.jsx(K,{children:e.jsxs(Ze,{children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(P,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:(ee=p.data)==null?void 0:ee.title})}),e.jsxs(P,{variant:"body2",color:"text.secondary",children:[r("studio.description")," ",e.jsx("a",{href:Ce,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),be(),ve(),je(),ye(),we()]})})}function A({title:r,rules:t,tips:s,children:l}){return e.jsxs(m,{display:"flex",flexDirection:"column",sx:{mb:4},children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(P,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(z,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:t.map(a=>i(a.label,a.value))}),s.map(a=>e.jsx(m,{sx:{fontSize:"13px",opacity:.8},children:i(a.label,a.value)}))]}),l]});function i(a,u){return e.jsxs(m,{component:"span",children:[e.jsxs(m,{component:"span",sx:{color:"#555",mr:.5},children:[a,":"]}),e.jsx(m,{component:"span",sx:{color:"#007ec6"},children:u})]})}}A.propTypes={title:w.string.isRequired,rules:w.array.isRequired,tips:w.array.isRequired,children:w.node.isRequired};function Y({handleOperateVideo:r,t,defaultUrl:s="",videos:l}){var k;const[i,a]=h.useState(s),[u,y]=h.useState(!1),[g,j]=h.useState(!1),x=h.useRef(i),S=i!==s&&l.includes(i),T=!i&&s,_=!S&&(i&&i!==x.current||u),N=!!((k=navigator.clipboard)!=null&&k.readText),{run:q}=Ue(p,{wait:500,leading:!0});return e.jsxs(ue,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(_e,{children:t(s?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(De,{children:[e.jsx(Le,{fullWidth:!0,value:i,onChange:f=>{const v=f.target.value.trim();a(v),v?q(v):j(!1)},placeholder:t("studio.videoInputLabel"),endAdornment:i?e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:()=>{a(""),p("")},children:e.jsx(ke,{})})}):N&&e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:async()=>{try{const f=(await navigator.clipboard.readText()||"").trim();a(f),p(f)}catch(f){console.error(f)}},children:e.jsx(me,{})})})}),e.jsxs(m,{mb:2,mt:.5,children:[S&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.duplicateVideo")}),!S&&g&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.videoDialogNoSrc")})]}),x.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${x.current}`,src:$e(x.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(m,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:u?e.jsx(M,{size:40}):e.jsx(P,{variant:"h5",color:"text.secondary",children:e.jsx(fe,{})})})]}),e.jsxs(Oe,{children:[e.jsx(U,{onClick:()=>r(),children:t("studio.cancel")}),T&&e.jsx(U,{variant:"contained",color:"error",onClick:()=>r(null,s),children:t("studio.delete")}),_&&e.jsx(U,{variant:"contained",onClick:()=>p(i),disabled:!i||u,children:t("studio.preview")}),!T&&!_&&e.jsx(U,{variant:"contained",onClick:()=>r(x.current),disabled:!x.current||s===x.current||S,children:t("studio.confirm")})]})]});function p(f){x.current="";const v=Ae(f);j(f?!v:!1),v&&(y(!0),fetch(v).then(H=>{H.ok?(x.current=f,j(!1)):j(!0)}).catch(()=>{j(!0)}).finally(()=>y(!1)))}}Y.propTypes={handleOperateVideo:w.func.isRequired,t:w.func.isRequired,defaultUrl:w.string,videos:w.array.isRequired};Y.defaultProps={defaultUrl:""};function fe(){return e.jsxs("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:48,width:48,children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"black","fill-opacity":"0.54"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39.6667 28L21 17.5V38.5L39.6667 28Z",fill:"white"})]})}const Ze=Ve.div`
3
3
  margin-top: 24px;
4
4
  .image-wrapper {
5
5
  margin-bottom: 16px;
@@ -1 +1 @@
1
- import{j as f,aq as $,H as a}from"./vendor-mui-core-wlbruq2I.js";import{k as E,a2 as P}from"./vendor-ux-did-connect-CX7qG3_M.js";import{A as g}from"./vendor-utils-B3iZkn2R.js";import{D as y,E as j,Z as h,_ as R,$ as A}from"./index-DQjZ74P0.js";function w({blocklet:r,ancestors:p=[]}){var d,m;const s=y(),{inService:n}=s,i=j(r==null?void 0:r.status)||h(r==null?void 0:r.status),o=`?v=${(d=r==null?void 0:r.meta)==null?void 0:d.version}${i?"~":""}`;let t=n?`${g(A,E.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${o}`:g(s.imgPrefix,"blocklet.png");if(r.source==="registry"&&r.deployedFrom&&r.meta.logo)t=`${g(r.deployedFrom,R(r.meta.bundleDid,r.meta.logo))}${o}`;else{const u=((m=window.env)==null?void 0:m.apiPrefix)||"/",e=p.concat(r),c=n?e.slice(1):e;t=`${g(u,`/blocklet/logo-bundle${c.map(x=>`/${x.meta.did}`).join("")}`)}${o}`}return{logoUrl:t,inService:n}}function v({blocklet:r,style:p,size:s,ancestors:n,...i}){const o=y(),{logoUrl:t,inService:d}=w({blocklet:r,ancestors:n}),{variant:m}=i,u=d?()=>{}:c=>{c.target.src=`${o.imgPrefix}/blocklet.png`};let e=f.jsx("img",{src:t,onError:u,alt:r.meta.name,style:{width:s}});return r.meta.logo||(e=f.jsx(P,{did:r.meta.did||"",responsive:!0})),f.jsx($,{variant:m||"square",style:Object.assign({backgroundColor:"transparent",width:s,height:s,borderRadius:10},p),...i,children:e})}v.propTypes={blocklet:a.object.isRequired,style:a.object,size:a.oneOfType([a.number,a.string]),ancestors:a.array};v.defaultProps={style:{},size:40,ancestors:[]};export{v as B};
1
+ import{j as f,aq as $,H as a}from"./vendor-mui-core-wlbruq2I.js";import{k as E,a2 as P}from"./vendor-ux-did-connect-CX7qG3_M.js";import{A as g}from"./vendor-utils-B3iZkn2R.js";import{D as y,E as j,Z as h,_ as R,$ as A}from"./index-B18R5SlV.js";function w({blocklet:r,ancestors:p=[]}){var d,m;const s=y(),{inService:n}=s,i=j(r==null?void 0:r.status)||h(r==null?void 0:r.status),o=`?v=${(d=r==null?void 0:r.meta)==null?void 0:d.version}${i?"~":""}`;let t=n?`${g(A,E.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${o}`:g(s.imgPrefix,"blocklet.png");if(r.source==="registry"&&r.deployedFrom&&r.meta.logo)t=`${g(r.deployedFrom,R(r.meta.bundleDid,r.meta.logo))}${o}`;else{const u=((m=window.env)==null?void 0:m.apiPrefix)||"/",e=p.concat(r),c=n?e.slice(1):e;t=`${g(u,`/blocklet/logo-bundle${c.map(x=>`/${x.meta.did}`).join("")}`)}${o}`}return{logoUrl:t,inService:n}}function v({blocklet:r,style:p,size:s,ancestors:n,...i}){const o=y(),{logoUrl:t,inService:d}=w({blocklet:r,ancestors:n}),{variant:m}=i,u=d?()=>{}:c=>{c.target.src=`${o.imgPrefix}/blocklet.png`};let e=f.jsx("img",{src:t,onError:u,alt:r.meta.name,style:{width:s}});return r.meta.logo||(e=f.jsx(P,{did:r.meta.did||"",responsive:!0})),f.jsx($,{variant:m||"square",style:Object.assign({backgroundColor:"transparent",width:s,height:s,borderRadius:10},p),...i,children:e})}v.propTypes={blocklet:a.object.isRequired,style:a.object,size:a.oneOfType([a.number,a.string]),ancestors:a.array};v.defaultProps={style:{},size:40,ancestors:[]};export{v as B};
@@ -1,4 +1,4 @@
1
- import{ah as P,j as t,aa as m,H as W}from"./vendor-mui-core-wlbruq2I.js";import{a as oe,Q as ae,a8 as ie,a3 as Q,k as ce}from"./vendor-ux-did-connect-CX7qG3_M.js";import{am as K,k as le,t as H,av as O,d as ue,e as de,aw as me,r as pe,x as he}from"./index-DQjZ74P0.js";import{r as d}from"./vendor-react-DEoibe3W.js";import{A as X,z as fe}from"./vendor-utils-B3iZkn2R.js";import{u as ge,b as j}from"./vendor-hooks-BCm626KH.js";import{L as we}from"./launch-result-message-DNgJY11G.js";import{g as xe}from"./get-safe-url-CwT4-jkw.js";import{g as be,a as ye}from"./setup-CQ7O7nI0.js";import{S as q}from"./button-C0Vra3Ak.js";import{S as ke}from"./layout-BCvTd67o.js";import{P as Ue,S as ve,p as Le}from"./starting-progress-a7uoLG-L.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";import"./config-space-CBoUabjP.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./addon-e-JO0VU3.js";import"./QuestionMarkCircle-BMcwgPWr.js";import"./use-server-logo-BbYHFDuK.js";import"./use-mobile-CiFFAdJf.js";import"./content-layout-DuPlKBe3.js";const Re=P(we)`
1
+ import{ah as P,j as t,aa as m,H as W}from"./vendor-mui-core-wlbruq2I.js";import{a as oe,Q as ae,a8 as ie,a3 as Q,k as ce}from"./vendor-ux-did-connect-CX7qG3_M.js";import{am as K,k as le,t as H,av as O,d as ue,e as de,aw as me,r as pe,x as he}from"./index-B18R5SlV.js";import{r as d}from"./vendor-react-DEoibe3W.js";import{A as X,z as fe}from"./vendor-utils-B3iZkn2R.js";import{u as ge,b as j}from"./vendor-hooks-BCm626KH.js";import{L as we}from"./launch-result-message-DNgJY11G.js";import{g as xe}from"./get-safe-url-BWDUV79Q.js";import{g as be,a as ye}from"./setup-DxzbFXmd.js";import{S as q}from"./button-C0Vra3Ak.js";import{S as ke}from"./layout-BnunMkuP.js";import{P as Ue,S as ve,p as Le}from"./starting-progress-a7uoLG-L.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-B4hgrXYM.js";import"./config-space-B39Ur9Mf.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./addon-e-JO0VU3.js";import"./QuestionMarkCircle-BMcwgPWr.js";import"./use-server-logo-BbYHFDuK.js";import"./use-mobile-CXU9YBvX.js";import"./content-layout-DuPlKBe3.js";const Re=P(we)`
2
2
  && .result-footer {
3
3
  height: 120px;
4
4
  > div {
@@ -1,4 +1,4 @@
1
- var Ww=Object.defineProperty;var Vw=(e,t,n)=>t in e?Ww(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ho=(e,t,n)=>Vw(e,typeof t!="symbol"?t+"":t,n);import{d2 as Uw,cr as Te,cq as Ze,co as qw,a9 as Se,j as x,aa as Re,ad as Vn,H as oe,d3 as dv,d4 as fv,d5 as Hw,bE as pv,ah as Nt,d6 as el,c1 as Kt,J as tl,d7 as pi,ba as Jn,cK as ft,b6 as It,d8 as Gw,d9 as Kw,c as Pe,_ as N,Y as yr,da as Ke,db as Yw,dc as ys,b as qn,dd as Xa,de as Xw,cL as Qw,df as Zw,c5 as Jw,d0 as eS,dg as tS,cM as nS,g as ze,a as Le,k as Fe,dh as mv,u as Gt,di as rS,d as nn,dj as nl,dk as Wp,o as on,dl as hv,i as Nr,dm as oS,dn as mi,dp as aS,dq as Vp,f as kd,dr as gv,ds as iS,dt as sS,p as rl,K as lS,du as cS,b3 as Up,e as bv,ak as qp,O as Jt,I as an,al as vv,T as Un,v as uS,q as Xn,ab as Fr,aq as dS,ap as ol,dv as fS,bv as pS,bt as Au,bw as Hp,bi as yv,y as mS,D as Gp,aj as Kp,t as Yp,bS as Xp,as as Li,z as hS,bu as gS}from"./vendor-mui-core-wlbruq2I.js";import{aN as Qp,a7 as bS,A as Cs,aO as vS}from"./vendor-utils-B3iZkn2R.js";import{r as S,R as yS,d as hi,a as $e,g as Dd,b as tt,e as Cv,c as CS,f as xv}from"./vendor-react-DEoibe3W.js";import{c5 as Ce,r as Vr,a as Yt,a3 as ot,ci as xS,cj as wS,bw as Zp,bx as SS,by as PS,bz as TS,E as kS,bd as gi,bn as Jp,bB as DS,R as RS,ck as ES,bb as Tr,ar as al,k as Be,a8 as MS,bg as $S,$ as gc,ab as OS,I as Mn,B as Ni,a5 as IS}from"./vendor-ux-did-connect-CX7qG3_M.js";import{v as wv,c as Qn,_ as _S}from"./vendor-arcblock-B4hgrXYM.js";import{D as Qt,G as Ur,W as yo,f as dt,V as Qa,aO as AS,a9 as Sv,aa as Co,aw as Pv,aP as Tv,b as Ia,aQ as BS,a8 as jS}from"./index-DQjZ74P0.js";import{f as En}from"./index-8eXqqyHQ.js";import{d as kv}from"./TuneOutlined-0oMZE8a4.js";import{f as LS,W as xo,c as NS,g as Rd,B as Dv,a as FS}from"./dashboard-B7qE-Md0.js";import{S as zS}from"./switch-control-CzaI2YNK.js";import{P as Bu,w as il}from"./permission-B7ZHEOJv.js";import{d as Ed}from"./Edit-hd-cDU5C.js";import{d as em,c as WS,b as nt,_ as Je,o as VS,e as US,i as qS,p as HS,g as GS,r as kr}from"./slicedToArray-CRrLoxQ4.js";import{r as Ye,A as Md,B as Xt,C as xs,D as ju,t as qe,E as Rv,F as Ev,j as Lu,m as KS,G as lr,H as YS,I as XS,J as Nu,K as Mv,L as QS,M as ZS,N as $v,O as $d,P as tm,Q as JS,R as nm,S as e1,T as t1,p as n1,e as rm,g as r1,b as bc,a as om,c as o1,q as Fi,o as Qr,i as a1,d as i1,k as zi,l as vc,h as Wi,s as yc,f as Cc,x as s1,z as l1,n as c1,u as u1,v as d1,w as f1,U as p1,y as m1,V as h1,W as g1}from"./index-BoQJXOtZ.js";import{a as Qe,u as Me,r as Za,d as qr,b as b1,w as ws,g as Ov,e as Iv,c as v1,o as Fu}from"./raf-schd.esm-B3j6BePR.js";import{s as y1}from"./sanitize-DbZs1H_T.js";import{C as am}from"./click-to-copy-BUVqg1RQ.js";import{d as im}from"./ChevronRight-CB8w0u2n.js";import{d as C1}from"./ChevronLeft-02OWcWpH.js";import{d as x1}from"./ArrowDropDown-Ce8TY3aP.js";import{A as w1,a as S1,b as P1,d as _v,B as T1,f as k1,c as D1}from"./add-component-core-CsW-bf6w.js";import{C as Mo}from"./confirm-BjCmRSAF.js";import{v as R1,b as Ss}from"./util-BBMAZSVn.js";import{L as E1}from"./LockIcon-QnxDGvZv.js";import{d as Av}from"./Launch-BwVeOcBz.js";import{D as M1}from"./delete-confirm-Dow_C0jR.js";import{d as $1}from"./InfoOutlined-CLiL5VeK.js";import{I as O1}from"./iframe-DsIqy16E.js";import{B as I1}from"./bundle-avatar-D28BGkcC.js";import{d as _1}from"./PlayArrow-B_ZNrQDa.js";import{A as Bv}from"./actions-DtL6bYnA.js";import{I as xc}from"./index-BnR8uU0R.js";import{W as A1}from"./did-address-bJAfhuZx.js";import{u as B1}from"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./get-safe-url-BWDUV79Q.js";import"./session-1k8BRnYA.js";import"./use-blocklet-logo-6YMz11ob.js";import"./dot-BID2dzD_.js";import"./useAsync-B6ZHbOEG.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CXU9YBvX.js";import"./omit-O1pUD7ku.js";import"./index-BpvW-cUy.js";import"./item-RUDvbSOI.js";import"./Done-CcJLRcBY.js";import"./DeleteOutline-1-hBNY1U.js";import"./launch-result-message-DNgJY11G.js";import"./page-header-JH9JWGMg.js";import"./config-space-CBoUabjP.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./logo-uploader-BecsVnr8.js";import"./index-DVQCgvFb.js";import"./index-BBuUqC0B.js";import"./collapse--nd2JDBL.js";import"./Google-WGwK551e.js";import"./cloneDeep-ro06l5HL.js";import"./index-BXjOxZPH.js";import"./use-mobile-CiFFAdJf.js";import"./content-layout-DuPlKBe3.js";import"./connect-to-kM9lCXLX.js";import"./MoreHoriz-9E3q8aHi.js";var j1=36e5;function L1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*j1)}var N1=864e5;function F1(e,t){Ye(2,arguments);var n=xs(e),r=xs(t),o=n.getTime()-ju(n),a=r.getTime()-ju(r);return Math.round((o-a)/N1)}var z1=6e4;function W1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*z1)}function V1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*1e3)}function Fa(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function U1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()-r.getFullYear()}function sm(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function jv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=sm(n,r),a=Math.abs(F1(n,r));n.setDate(n.getDate()-o*a);var i=+(sm(n,r)===-o),s=o*(a-i);return s===0?0:s}function sl(e,t){return Ye(2,arguments),qe(e).getTime()-qe(t).getTime()}var lm={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},q1="trunc";function bi(e){return e?lm[e]:lm[q1]}function H1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Rv;return bi(void 0)(r)}function G1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Ev;return bi(void 0)(r)}function zu(e){Ye(1,arguments);var t=qe(e);return t.setHours(23,59,59,999),t}function K1(e){Ye(1,arguments);var t=qe(e);return zu(t).getTime()===Lu(t).getTime()}function Lv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(KS(n,r)),i;if(a<1)i=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);var s=Fa(n,r)===-o;K1(qe(e))&&a===1&&Fa(e,r)===1&&(s=!1),i=o*(a-Number(s))}return i===0?0:i}function Y1(e,t,n){Ye(2,arguments);var r=Lv(e,t)/3;return bi(void 0)(r)}function X1(e,t,n){Ye(2,arguments);var r=sl(e,t)/1e3;return bi(void 0)(r)}function Q1(e,t,n){Ye(2,arguments);var r=jv(e,t)/7;return bi(void 0)(r)}function Z1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(U1(n,r));n.setFullYear(1584),r.setFullYear(1584);var i=Fa(n,r)===-o,s=o*(a-Number(i));return s===0?0:s}function J1(e,t){var n;Ye(1,arguments);var r=e||{},o=qe(r.start),a=qe(r.end),i=a.getTime();if(!(o.getTime()<=i))throw new RangeError("Invalid interval");var s=[],c=o;c.setHours(0,0,0,0);var l=Number((n=void 0)!==null&&n!==void 0?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;c.getTime()<=i;)s.push(qe(c)),c.setDate(c.getDate()+l),c.setHours(0,0,0,0);return s}function eP(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function tP(e,t){var n,r;Ye(1,arguments);var o=qe(e);if(isNaN(o.getTime()))throw new RangeError("Invalid time value");var a=String((n=t==null?void 0:t.format)!==null&&n!==void 0?n:"extended"),i=String((r=t==null?void 0:t.representation)!==null&&r!==void 0?r:"complete");if(a!=="extended"&&a!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var s="",c="",l=a==="extended"?"-":"",d=a==="extended"?":":"";if(i!=="time"){var u=lr(o.getDate(),2),f=lr(o.getMonth()+1,2),m=lr(o.getFullYear(),4);s="".concat(m).concat(l).concat(f).concat(l).concat(u)}if(i!=="date"){var g=o.getTimezoneOffset();if(g!==0){var h=Math.abs(g),w=lr(Math.floor(h/60),2),v=lr(h%60,2),b=g<0?"+":"-";c="".concat(b).concat(w,":").concat(v)}else c="Z";var p=lr(o.getHours(),2),y=lr(o.getMinutes(),2),D=lr(o.getSeconds(),2),P=s===""?"":"T",T=[p,y,D].join(d);s="".concat(s).concat(P).concat(T).concat(c)}return s}function nP(e){Ye(1,arguments);var t=qe(e),n=t.getDay();return n}function rP(e){Ye(1,arguments);var t=qe(e),n=t.getHours();return n}function oP(e){Ye(1,arguments);var t=qe(e),n=t.getMinutes();return n}function aP(e){Ye(1,arguments);var t=qe(e),n=t.getSeconds();return n}function iP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getTime()===r.getTime()}function cm(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Uw(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1
+ var Ww=Object.defineProperty;var Vw=(e,t,n)=>t in e?Ww(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ho=(e,t,n)=>Vw(e,typeof t!="symbol"?t+"":t,n);import{d2 as Uw,cr as Te,cq as Ze,co as qw,a9 as Se,j as x,aa as Re,ad as Vn,H as oe,d3 as dv,d4 as fv,d5 as Hw,bE as pv,ah as Nt,d6 as el,c1 as Kt,J as tl,d7 as pi,ba as Jn,cK as ft,b6 as It,d8 as Gw,d9 as Kw,c as Pe,_ as N,Y as yr,da as Ke,db as Yw,dc as ys,b as qn,dd as Xa,de as Xw,cL as Qw,df as Zw,c5 as Jw,d0 as eS,dg as tS,cM as nS,g as ze,a as Le,k as Fe,dh as mv,u as Gt,di as rS,d as nn,dj as nl,dk as Wp,o as on,dl as hv,i as Nr,dm as oS,dn as mi,dp as aS,dq as Vp,f as kd,dr as gv,ds as iS,dt as sS,p as rl,K as lS,du as cS,b3 as Up,e as bv,ak as qp,O as Jt,I as an,al as vv,T as Un,v as uS,q as Xn,ab as Fr,aq as dS,ap as ol,dv as fS,bv as pS,bt as Au,bw as Hp,bi as yv,y as mS,D as Gp,aj as Kp,t as Yp,bS as Xp,as as Li,z as hS,bu as gS}from"./vendor-mui-core-wlbruq2I.js";import{aN as Qp,a7 as bS,A as Cs,aO as vS}from"./vendor-utils-B3iZkn2R.js";import{r as S,R as yS,d as hi,a as $e,g as Dd,b as tt,e as Cv,c as CS,f as xv}from"./vendor-react-DEoibe3W.js";import{c5 as Ce,r as Vr,a as Yt,a3 as ot,ci as xS,cj as wS,bw as Zp,bx as SS,by as PS,bz as TS,E as kS,bd as gi,bn as Jp,bB as DS,R as RS,ck as ES,bb as Tr,ar as al,k as Be,a8 as MS,bg as $S,$ as gc,ab as OS,I as Mn,B as Ni,a5 as IS}from"./vendor-ux-did-connect-CX7qG3_M.js";import{v as wv,c as Qn,_ as _S}from"./vendor-arcblock-B4hgrXYM.js";import{D as Qt,G as Ur,W as yo,f as dt,V as Qa,aO as AS,a9 as Sv,aa as Co,aw as Pv,aP as Tv,b as Ia,aQ as BS,a8 as jS}from"./index-B18R5SlV.js";import{f as En}from"./index-8eXqqyHQ.js";import{d as kv}from"./TuneOutlined-0oMZE8a4.js";import{f as LS,W as xo,c as NS,g as Rd,B as Dv,a as FS}from"./dashboard-k0XcV2m5.js";import{S as zS}from"./switch-control-CzaI2YNK.js";import{P as Bu,w as il}from"./permission-B7ZHEOJv.js";import{d as Ed}from"./Edit-hd-cDU5C.js";import{d as em,c as WS,b as nt,_ as Je,o as VS,e as US,i as qS,p as HS,g as GS,r as kr}from"./slicedToArray-CRrLoxQ4.js";import{r as Ye,A as Md,B as Xt,C as xs,D as ju,t as qe,E as Rv,F as Ev,j as Lu,m as KS,G as lr,H as YS,I as XS,J as Nu,K as Mv,L as QS,M as ZS,N as $v,O as $d,P as tm,Q as JS,R as nm,S as e1,T as t1,p as n1,e as rm,g as r1,b as bc,a as om,c as o1,q as Fi,o as Qr,i as a1,d as i1,k as zi,l as vc,h as Wi,s as yc,f as Cc,x as s1,z as l1,n as c1,u as u1,v as d1,w as f1,U as p1,y as m1,V as h1,W as g1}from"./index-BoQJXOtZ.js";import{a as Qe,u as Me,r as Za,d as qr,b as b1,w as ws,g as Ov,e as Iv,c as v1,o as Fu}from"./raf-schd.esm-B3j6BePR.js";import{s as y1}from"./sanitize-DbZs1H_T.js";import{C as am}from"./click-to-copy-BUVqg1RQ.js";import{d as im}from"./ChevronRight-CB8w0u2n.js";import{d as C1}from"./ChevronLeft-02OWcWpH.js";import{d as x1}from"./ArrowDropDown-Ce8TY3aP.js";import{A as w1,a as S1,b as P1,d as _v,B as T1,f as k1,c as D1}from"./add-component-core-CaE3xcyT.js";import{C as Mo}from"./confirm-Bay3BcpN.js";import{v as R1,b as Ss}from"./util-xXGeezrD.js";import{L as E1}from"./LockIcon-QnxDGvZv.js";import{d as Av}from"./Launch-BwVeOcBz.js";import{D as M1}from"./delete-confirm-B1F5wKdb.js";import{d as $1}from"./InfoOutlined-CLiL5VeK.js";import{I as O1}from"./iframe-DsIqy16E.js";import{B as I1}from"./bundle-avatar-C41ZXEbR.js";import{d as _1}from"./PlayArrow-B_ZNrQDa.js";import{A as Bv}from"./actions-DtL6bYnA.js";import{I as xc}from"./index-BnR8uU0R.js";import{W as A1}from"./did-address-bJAfhuZx.js";import{u as B1}from"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-BF3BqN1O.js";import"./get-safe-url-CwT4-jkw.js";import"./session-1k8BRnYA.js";import"./use-blocklet-logo-DGSQQmh2.js";import"./dot-DR7_m3Np.js";import"./useAsync-BMCqtJH2.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-CiFFAdJf.js";import"./omit-O1pUD7ku.js";import"./index-BpvW-cUy.js";import"./item-DHMVgmIa.js";import"./Done-CcJLRcBY.js";import"./DeleteOutline-1-hBNY1U.js";import"./launch-result-message-DNgJY11G.js";import"./page-header-JH9JWGMg.js";import"./config-space-B39Ur9Mf.js";import"./spaces-CpSu6mVL.js";import"./api-CQoRx33p.js";import"./logo-uploader-Dhh7Un4G.js";import"./index-DVQCgvFb.js";import"./index-CI4cLtBE.js";import"./collapse--nd2JDBL.js";import"./Google-WGwK551e.js";import"./cloneDeep-ro06l5HL.js";import"./index-BXjOxZPH.js";import"./use-mobile-CXU9YBvX.js";import"./content-layout-DuPlKBe3.js";import"./connect-to-Dac7orQh.js";import"./MoreHoriz-9E3q8aHi.js";var j1=36e5;function L1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*j1)}var N1=864e5;function F1(e,t){Ye(2,arguments);var n=xs(e),r=xs(t),o=n.getTime()-ju(n),a=r.getTime()-ju(r);return Math.round((o-a)/N1)}var z1=6e4;function W1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*z1)}function V1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*1e3)}function Fa(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function U1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()-r.getFullYear()}function sm(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function jv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=sm(n,r),a=Math.abs(F1(n,r));n.setDate(n.getDate()-o*a);var i=+(sm(n,r)===-o),s=o*(a-i);return s===0?0:s}function sl(e,t){return Ye(2,arguments),qe(e).getTime()-qe(t).getTime()}var lm={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},q1="trunc";function bi(e){return e?lm[e]:lm[q1]}function H1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Rv;return bi(void 0)(r)}function G1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Ev;return bi(void 0)(r)}function zu(e){Ye(1,arguments);var t=qe(e);return t.setHours(23,59,59,999),t}function K1(e){Ye(1,arguments);var t=qe(e);return zu(t).getTime()===Lu(t).getTime()}function Lv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(KS(n,r)),i;if(a<1)i=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);var s=Fa(n,r)===-o;K1(qe(e))&&a===1&&Fa(e,r)===1&&(s=!1),i=o*(a-Number(s))}return i===0?0:i}function Y1(e,t,n){Ye(2,arguments);var r=Lv(e,t)/3;return bi(void 0)(r)}function X1(e,t,n){Ye(2,arguments);var r=sl(e,t)/1e3;return bi(void 0)(r)}function Q1(e,t,n){Ye(2,arguments);var r=jv(e,t)/7;return bi(void 0)(r)}function Z1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(U1(n,r));n.setFullYear(1584),r.setFullYear(1584);var i=Fa(n,r)===-o,s=o*(a-Number(i));return s===0?0:s}function J1(e,t){var n;Ye(1,arguments);var r=e||{},o=qe(r.start),a=qe(r.end),i=a.getTime();if(!(o.getTime()<=i))throw new RangeError("Invalid interval");var s=[],c=o;c.setHours(0,0,0,0);var l=Number((n=void 0)!==null&&n!==void 0?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;c.getTime()<=i;)s.push(qe(c)),c.setDate(c.getDate()+l),c.setHours(0,0,0,0);return s}function eP(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function tP(e,t){var n,r;Ye(1,arguments);var o=qe(e);if(isNaN(o.getTime()))throw new RangeError("Invalid time value");var a=String((n=t==null?void 0:t.format)!==null&&n!==void 0?n:"extended"),i=String((r=t==null?void 0:t.representation)!==null&&r!==void 0?r:"complete");if(a!=="extended"&&a!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var s="",c="",l=a==="extended"?"-":"",d=a==="extended"?":":"";if(i!=="time"){var u=lr(o.getDate(),2),f=lr(o.getMonth()+1,2),m=lr(o.getFullYear(),4);s="".concat(m).concat(l).concat(f).concat(l).concat(u)}if(i!=="date"){var g=o.getTimezoneOffset();if(g!==0){var h=Math.abs(g),w=lr(Math.floor(h/60),2),v=lr(h%60,2),b=g<0?"+":"-";c="".concat(b).concat(w,":").concat(v)}else c="Z";var p=lr(o.getHours(),2),y=lr(o.getMinutes(),2),D=lr(o.getSeconds(),2),P=s===""?"":"T",T=[p,y,D].join(d);s="".concat(s).concat(P).concat(T).concat(c)}return s}function nP(e){Ye(1,arguments);var t=qe(e),n=t.getDay();return n}function rP(e){Ye(1,arguments);var t=qe(e),n=t.getHours();return n}function oP(e){Ye(1,arguments);var t=qe(e),n=t.getMinutes();return n}function aP(e){Ye(1,arguments);var t=qe(e),n=t.getSeconds();return n}function iP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getTime()===r.getTime()}function cm(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Uw(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){s=!0,a=l},f:function(){try{i||n.return==null||n.return()}finally{if(s)throw a}}}}function Nv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nv=function(){return!!e})()}function rt(e){var t=Nv();return function(){var n,r=em(e);if(t){var o=em(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return WS(this,n)}}var sP=10,Fv=function(){function e(){Je(this,e),Ce(this,"priority",void 0),Ce(this,"subPriority",0)}return Ze(e,[{key:"validate",value:function(n,r){return!0}}]),e}(),lP=function(e){nt(n,e);var t=rt(n);function n(r,o,a,i,s){var c;return Je(this,n),c=t.call(this),c.value=r,c.validateValue=o,c.setValue=a,c.priority=i,s&&(c.subPriority=s),c}return Ze(n,[{key:"validate",value:function(o,a){return this.validateValue(o,this.value,a)}},{key:"set",value:function(o,a,i){return this.setValue(o,a,this.value,i)}}]),n}(Fv),cP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",sP),Ce(Te(r),"subPriority",-1),r}return Ze(n,[{key:"set",value:function(o,a){if(a.timestampIsSet)return o;var i=new Date(0);return i.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),i.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),i}}]),n}(Fv),at=function(){function e(){Je(this,e),Ce(this,"incompatibleTokens",void 0),Ce(this,"priority",void 0),Ce(this,"subPriority",void 0)}return Ze(e,[{key:"run",value:function(n,r,o,a){var i=this.parse(n,r,o,a);return i?{setter:new lP(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(n,r,o){return!0}}]),e}(),uP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",140),Ce(Te(r),"incompatibleTokens",["R","u","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"});case"GGGGG":return i.era(o,{width:"narrow"});case"GGGG":default:return i.era(o,{width:"wide"})||i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"})}}},{key:"set",value:function(o,a,i){return a.era=i,o.setUTCFullYear(i,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),Dt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Fn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Rt(e,t){return e&&{value:t(e.value),rest:e.rest}}function vt(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function zn(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*Rv+a*Ev+i*YS),rest:t.slice(n[0].length)}}function zv(e){return vt(Dt.anyDigitsSigned,e)}function kt(e,t){switch(e){case 1:return vt(Dt.singleDigit,t);case 2:return vt(Dt.twoDigits,t);case 3:return vt(Dt.threeDigits,t);case 4:return vt(Dt.fourDigits,t);default:return vt(new RegExp("^\\d{1,"+e+"}"),t)}}function Ps(e,t){switch(e){case 1:return vt(Dt.singleDigitSigned,t);case 2:return vt(Dt.twoDigitsSigned,t);case 3:return vt(Dt.threeDigitsSigned,t);case 4:return vt(Dt.fourDigitsSigned,t);default:return vt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Od(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Wv(e,t){var n=t>0,r=n?t:1-t,o;if(r<=50)o=e||100;else{var a=r+50,i=Math.floor(a/100)*100,s=e>=a%100;o=e+i-(s?100:0)}return n?o:1-o}function Vv(e){return e%400===0||e%4===0&&e%100!==0}var dP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return{year:l,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Rt(kt(4,o),s);case"yo":return Rt(i.ordinalNumber(o,{unit:"year"}),s);default:return Rt(kt(a.length,o),s)}}},{key:"validate",value:function(o,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(o,a,i){var s=o.getUTCFullYear();if(i.isTwoDigitYear){var c=Wv(i.year,s);return o.setUTCFullYear(c,0,1),o.setUTCHours(0,0,0,0),o}var l=!("era"in a)||a.era===1?i.year:1-i.year;return o.setUTCFullYear(l,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),fP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return{year:l,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Rt(kt(4,o),s);case"Yo":return Rt(i.ordinalNumber(o,{unit:"year"}),s);default:return Rt(kt(a.length,o),s)}}},{key:"validate",value:function(o,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(o,a,i,s){var c=XS(o,s);if(i.isTwoDigitYear){var l=Wv(i.year,c);return o.setUTCFullYear(l,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Nu(o,s)}var d=!("era"in a)||a.era===1?i.year:1-i.year;return o.setUTCFullYear(d,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Nu(o,s)}}]),n}(at),pP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){return Ps(a==="R"?4:a.length,o)}},{key:"set",value:function(o,a,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),Mv(s)}}]),n}(at),mP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){return Ps(a==="u"?4:a.length,o)}},{key:"set",value:function(o,a,i){return o.setUTCFullYear(i,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),hP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",120),Ce(Te(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"Q":case"QQ":return kt(a.length,o);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"})||i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(o,{width:"wide",context:"formatting"})||i.quarter(o,{width:"abbreviated",context:"formatting"})||i.quarter(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=1&&a<=4}},{key:"set",value:function(o,a,i){return o.setUTCMonth((i-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),gP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",120),Ce(Te(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"q":case"qq":return kt(a.length,o);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"})||i.quarter(o,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(o,{width:"wide",context:"standalone"})||i.quarter(o,{width:"abbreviated",context:"standalone"})||i.quarter(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=1&&a<=4}},{key:"set",value:function(o,a,i){return o.setUTCMonth((i-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),bP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Ce(Te(r),"priority",110),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l-1};switch(a){case"M":return Rt(vt(Dt.month,o),s);case"MM":return Rt(kt(2,o),s);case"Mo":return Rt(i.ordinalNumber(o,{unit:"month"}),s);case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"})||i.month(o,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(o,{width:"wide",context:"formatting"})||i.month(o,{width:"abbreviated",context:"formatting"})||i.month(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){return o.setUTCMonth(i,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),vP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",110),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l-1};switch(a){case"L":return Rt(vt(Dt.month,o),s);case"LL":return Rt(kt(2,o),s);case"Lo":return Rt(i.ordinalNumber(o,{unit:"month"}),s);case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"})||i.month(o,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(o,{width:"wide",context:"standalone"})||i.month(o,{width:"abbreviated",context:"standalone"})||i.month(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){return o.setUTCMonth(i,1),o.setUTCHours(0,0,0,0),o}}]),n}(at);function yP(e,t,n){Ye(2,arguments);var r=qe(e),o=Xt(t),a=QS(r,n)-o;return r.setUTCDate(r.getUTCDate()-a*7),r}var CP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",100),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"w":return vt(Dt.week,o);case"wo":return i.ordinalNumber(o,{unit:"week"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=53}},{key:"set",value:function(o,a,i,s){return Nu(yP(o,i,s),s)}}]),n}(at);function xP(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t),o=ZS(n)-r;return n.setUTCDate(n.getUTCDate()-o*7),n}var wP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",100),Ce(Te(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"I":return vt(Dt.week,o);case"Io":return i.ordinalNumber(o,{unit:"week"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=53}},{key:"set",value:function(o,a,i){return Mv(xP(o,i))}}]),n}(at),SP=[31,28,31,30,31,30,31,31,30,31,30,31],PP=[31,29,31,30,31,30,31,31,30,31,30,31],TP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"subPriority",1),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"d":return vt(Dt.date,o);case"do":return i.ordinalNumber(o,{unit:"date"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){var i=o.getUTCFullYear(),s=Vv(i),c=o.getUTCMonth();return s?a>=1&&a<=PP[c]:a>=1&&a<=SP[c]}},{key:"set",value:function(o,a,i){return o.setUTCDate(i),o.setUTCHours(0,0,0,0),o}}]),n}(at),kP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"subpriority",1),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"D":case"DD":return vt(Dt.dayOfYear,o);case"Do":return i.ordinalNumber(o,{unit:"date"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){var i=o.getUTCFullYear(),s=Vv(i);return s?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(o,a,i){return o.setUTCMonth(0,i),o.setUTCHours(0,0,0,0),o}}]),n}(at);function Id(e,t,n){var r,o,a,i,s,c,l,d;Ye(2,arguments);var u=$v(),f=Xt((r=(o=(a=(i=n==null?void 0:n.weekStartsOn)!==null&&i!==void 0?i:n==null||(s=n.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&o!==void 0?o:(l=u.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=qe(e),g=Xt(t),h=m.getUTCDay(),w=g%7,v=(w+7)%7,b=(v<f?7:0)+g-h;return m.setUTCDate(m.getUTCDate()+b),m}var DP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Id(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at),RP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"e":case"ee":return Rt(kt(a.length,o),c);case"eo":return Rt(i.ordinalNumber(o,{unit:"day"}),c);case"eee":return i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Id(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at),EP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"c":case"cc":return Rt(kt(a.length,o),c);case"co":return Rt(i.ordinalNumber(o,{unit:"day"}),c);case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"})||i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(o,{width:"wide",context:"standalone"})||i.day(o,{width:"abbreviated",context:"standalone"})||i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Id(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at);function MP(e,t){Ye(2,arguments);var n=Xt(t);n%7===0&&(n=n-7);var r=1,o=qe(e),a=o.getUTCDay(),i=n%7,s=(i+7)%7,c=(s<r?7:0)+n-a;return o.setUTCDate(o.getUTCDate()+c),o}var $P=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l===0?7:l};switch(a){case"i":case"ii":return kt(a.length,o);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return Rt(i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s);case"iiiii":return Rt(i.day(o,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Rt(i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Rt(i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(o,a){return a>=1&&a<=7}},{key:"set",value:function(o,a,i){return o=MP(o,i),o.setUTCHours(0,0,0,0),o}}]),n}(at),OP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"a":case"aa":case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Od(i),0,0,0),o}}]),n}(at),IP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"b":case"bb":case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Od(i),0,0,0),o}}]),n}(at),_P=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["a","b","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Od(i),0,0,0),o}}]),n}(at),AP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["H","K","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"h":return vt(Dt.hour12h,o);case"ho":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=12}},{key:"set",value:function(o,a,i){var s=o.getUTCHours()>=12;return s&&i<12?o.setUTCHours(i+12,0,0,0):!s&&i===12?o.setUTCHours(0,0,0,0):o.setUTCHours(i,0,0,0),o}}]),n}(at),BP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"H":return vt(Dt.hour23h,o);case"Ho":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=23}},{key:"set",value:function(o,a,i){return o.setUTCHours(i,0,0,0),o}}]),n}(at),jP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["h","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"K":return vt(Dt.hour11h,o);case"Ko":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){var s=o.getUTCHours()>=12;return s&&i<12?o.setUTCHours(i+12,0,0,0):o.setUTCHours(i,0,0,0),o}}]),n}(at),LP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"k":return vt(Dt.hour24h,o);case"ko":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=24}},{key:"set",value:function(o,a,i){var s=i<=24?i%24:i;return o.setUTCHours(s,0,0,0),o}}]),n}(at),NP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",60),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"m":return vt(Dt.minute,o);case"mo":return i.ordinalNumber(o,{unit:"minute"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=59}},{key:"set",value:function(o,a,i){return o.setUTCMinutes(i,0,0),o}}]),n}(at),FP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",50),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"s":return vt(Dt.second,o);case"so":return i.ordinalNumber(o,{unit:"second"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=59}},{key:"set",value:function(o,a,i){return o.setUTCSeconds(i,0),o}}]),n}(at),zP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",30),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){var i=function(c){return Math.floor(c*Math.pow(10,-a.length+3))};return Rt(kt(a.length,o),i)}},{key:"set",value:function(o,a,i){return o.setUTCMilliseconds(i),o}}]),n}(at),WP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",10),Ce(Te(r),"incompatibleTokens",["t","T","x"]),r}return Ze(n,[{key:"parse",value:function(o,a){switch(a){case"X":return zn(Fn.basicOptionalMinutes,o);case"XX":return zn(Fn.basic,o);case"XXXX":return zn(Fn.basicOptionalSeconds,o);case"XXXXX":return zn(Fn.extendedOptionalSeconds,o);case"XXX":default:return zn(Fn.extended,o)}}},{key:"set",value:function(o,a,i){return a.timestampIsSet?o:new Date(o.getTime()-i)}}]),n}(at),VP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",10),Ce(Te(r),"incompatibleTokens",["t","T","X"]),r}return Ze(n,[{key:"parse",value:function(o,a){switch(a){case"x":return zn(Fn.basicOptionalMinutes,o);case"xx":return zn(Fn.basic,o);case"xxxx":return zn(Fn.basicOptionalSeconds,o);case"xxxxx":return zn(Fn.extendedOptionalSeconds,o);case"xxx":default:return zn(Fn.extended,o)}}},{key:"set",value:function(o,a,i){return a.timestampIsSet?o:new Date(o.getTime()-i)}}]),n}(at),UP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",40),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return zv(o)}},{key:"set",value:function(o,a,i){return[new Date(i*1e3),{timestampIsSet:!0}]}}]),n}(at),qP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",20),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return zv(o)}},{key:"set",value:function(o,a,i){return[new Date(i),{timestampIsSet:!0}]}}]),n}(at),HP={G:new uP,y:new dP,Y:new fP,R:new pP,u:new mP,Q:new hP,q:new gP,M:new bP,L:new vP,w:new CP,I:new wP,d:new TP,D:new kP,E:new DP,e:new RP,c:new EP,i:new $P,a:new OP,b:new IP,B:new _P,h:new AP,H:new BP,K:new jP,k:new LP,m:new NP,s:new FP,S:new zP,X:new WP,x:new VP,t:new UP,T:new qP},GP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,YP=/^'([^]*?)'?$/,XP=/''/g,QP=/\S/,ZP=/[a-zA-Z]/;function JP(e,t,n,r){var o,a,i,s,c,l,d,u,f,m,g,h,w,v,b,p,y,D;Ye(3,arguments);var P=String(e),T=String(t),k=$v(),C=(o=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:k.locale)!==null&&o!==void 0?o:$d;if(!C.match)throw new RangeError("locale must contain match property");var R=Xt((i=(s=(c=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(d=r.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&c!==void 0?c:k.firstWeekContainsDate)!==null&&s!==void 0?s:(f=k.locale)===null||f===void 0||(m=f.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=Xt((g=(h=(w=(v=r==null?void 0:r.weekStartsOn)!==null&&v!==void 0?v:r==null||(b=r.locale)===null||b===void 0||(p=b.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&w!==void 0?w:k.weekStartsOn)!==null&&h!==void 0?h:(y=k.locale)===null||y===void 0||(D=y.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&g!==void 0?g:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(T==="")return P===""?qe(n):new Date(NaN);var $={firstWeekContainsDate:R,weekStartsOn:M,locale:C},O=[new cP],I=T.match(KP).map(function(H){var K=H[0];if(K in tm){var Q=tm[K];return Q(H,C.formatLong)}return H}).join("").match(GP),_=[],A=cm(I),F;try{var L=function(){var K=F.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&JS(K)&&nm(K,T,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&e1(K)&&nm(K,T,e);var Q=K[0],ie=HP[Q];if(ie){var Y=ie.incompatibleTokens;if(Array.isArray(Y)){var J=_.find(function(ge){return Y.includes(ge.token)||ge.token===Q});if(J)throw new RangeError("The format string mustn't contain `".concat(J.fullToken,"` and `").concat(K,"` at the same time"))}else if(ie.incompatibleTokens==="*"&&_.length>0)throw new RangeError("The format string mustn't contain `".concat(K,"` and any other token at the same time"));_.push({token:Q,fullToken:K});var ne=ie.run(P,K,C.match,$);if(!ne)return{v:new Date(NaN)};O.push(ne.setter),P=ne.rest}else{if(Q.match(ZP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(K==="''"?K="'":Q==="'"&&(K=eT(K)),P.indexOf(K)===0)P=P.slice(K.length);else return{v:new Date(NaN)}}};for(A.s();!(F=A.n()).done;){var W=L();if(qw(W)==="object")return W.v}}catch(H){A.e(H)}finally{A.f()}if(P.length>0&&QP.test(P))return new Date(NaN);var G=O.map(function(H){return H.priority}).sort(function(H,K){return K-H}).filter(function(H,K,Q){return Q.indexOf(H)===K}).map(function(H){return O.filter(function(K){return K.priority===H}).sort(function(K,Q){return Q.subPriority-K.subPriority})}).map(function(H){return H[0]}),E=qe(n);if(isNaN(E.getTime()))return new Date(NaN);var q=t1(E,ju(E)),U={},j=cm(G),z;try{for(j.s();!(z=j.n()).done;){var B=z.value;if(!B.validate(q,$))return new Date(NaN);var V=B.set(q,U,$);Array.isArray(V)?(q=V[0],eP(U,V[1])):q=V}}catch(H){j.e(H)}finally{j.f()}return q}function eT(e){return e.match(YP)[1].replace(XP,"'")}function um(e){Ye(1,arguments);var t=qe(e);return t.setMinutes(0,0,0),t}function tT(e,t){Ye(2,arguments);var n=um(e),r=um(t);return n.getTime()===r.getTime()}function nT(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()===r.getFullYear()}function rT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setDate(r),n}function oT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setHours(r),n}function aT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setMinutes(r),n}function iT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setSeconds(r),n}var _d={},sT=Se;Object.defineProperty(_d,"__esModule",{value:!0});var Uv=_d.default=void 0,lT=sT(Vr()),cT=x;Uv=_d.default=(0,lT.default)((0,cT.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");function Ad({children:e,...t}){var l;const{t:n}=Yt(),{api:r}=Qt(),{blocklet:o}=Ur(),a=(l=o==null?void 0:o.settings)==null?void 0:l.autoCheckUpdate,i=async d=>{await r.updateAutoCheckUpdate({input:{did:o.meta.did,autoCheckUpdate:d}})},s=async()=>{try{const d=!(a!=null&&a.enabled);await i({enabled:d}),ot.success(n(d?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(d){ot.error(d.message)}},c=!!(a!=null&&a.enabled);return x.jsxs(Re,{display:"flex",flexDirection:"row",alignItems:"center",children:[e,x.jsx(Vn,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:x.jsx("div",{children:x.jsx(zS,{checked:c,onChange:s,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}Ad.propTypes={children:oe.any};Ad.defaultProps={children:null};var qv={},Go={},wc={};function Hv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Hv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ye(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hv(e))&&(r&&(r+=" "),r+=t);return r}function Ne(e,t,n=void 0){const r={};for(const o in e){const a=e[o];let i="",s=!0;for(let c=0;c<a.length;c+=1){const l=a[c];l&&(i+=(s===!0?"":" ")+t(l),s=!1,n&&n[l]&&(i+=" "+n[l]))}r[o]=i}return r}function Ts(e){return typeof e=="string"}function Wu(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function Gv(e){if(typeof e!="string")throw new Error(Wu(7));return e.charAt(0).toUpperCase()+e.slice(1)}function hr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Kv(e){if(!hr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Kv(e[n])}),t}function Lr(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return hr(e)&&hr(t)&&Object.keys(t).forEach(o=>{hr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&hr(e[o])?r[o]=Lr(e[o],t[o],n):n.clone?r[o]=hr(t[o])?Kv(t[o]):t[o]:r[o]=t[o]}),r}function za(e,t){return t?Lr(e,t,{clone:!1}):e}function uT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var i,s;const a=/min-width:\s*([0-9.]+)/;return+(((i=r.match(a))==null?void 0:i[1])||0)-+(((s=o.match(a))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const a=t[o];return delete r[o],r[o]=a,r},{...t}):t}function dT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function fT(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(a)}function pT(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function n(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const c=t(e.breakpoints.not(...s),i);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},o=a=>(n(r,a),r);return n(o),{...e,containerQueries:o}}const ll={xs:0,sm:600,md:900,lg:1200,xl:1536},dm={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ll[e]}px)`},mT={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ll[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function er(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||dm;return t.reduce((i,s,c)=>(i[a.up(a.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const a=r.breakpoints||dm;return Object.keys(t).reduce((i,s)=>{if(dT(a.keys,s)){const c=fT(r.containerQueries?r:mT,s);c&&(i[c]=n(t[s],s))}else if(Object.keys(a.values||ll).includes(s)){const c=a.up(s);i[c]=n(t[s],s)}else{const c=s;i[c]=t[c]}return i},{})}return n(t)}function hT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function gT(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function cl(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function ks(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=cl(e,n)||r,t&&(o=t(o,r,e)),o}function Mt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,a=i=>{if(i[t]==null)return null;const s=i[t],c=i.theme,l=cl(c,r)||{};return er(i,s,u=>{let f=ks(l,o,u);return u===f&&typeof u=="string"&&(f=ks(l,o,`${t}${u==="default"?"":Gv(u)}`,u)),n===!1?f:{[n]:f}})};return a.propTypes={},a.filterProps=[t],a}function bT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const vT={m:"margin",p:"padding"},yT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},fm={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},CT=bT(e=>{if(e.length>2)if(fm[e])e=fm[e];else return[e];const[t,n]=e.split(""),r=vT[t],o=yT[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),Bd=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],jd=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Bd,...jd];function vi(e,t,n,r){const o=cl(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:typeof o=="string"?`calc(${a} * ${o})`:o*a:Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a),s=o[i];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function Ld(e){return vi(e,"spacing",8)}function yi(e,t){return typeof t=="string"||t==null?t:e(t)}function xT(e,t){return n=>e.reduce((r,o)=>(r[o]=yi(t,n),r),{})}function wT(e,t,n,r){if(!t.includes(n))return null;const o=CT(n),a=xT(o,r),i=e[n];return er(e,i,a)}function Yv(e,t){const n=Ld(e.theme);return Object.keys(e).map(r=>wT(e,t,r,n)).reduce(za,{})}function xt(e){return Yv(e,Bd)}xt.propTypes={};xt.filterProps=Bd;function wt(e){return Yv(e,jd)}wt.propTypes={};wt.filterProps=jd;function ul(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),n=r=>Object.keys(r).reduce((o,a)=>t[a]?za(o,t[a](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function mn(e){return typeof e!="number"?e:`${e}px solid`}function Pn(e,t){return Mt({prop:e,themeKey:"borders",transform:t})}const ST=Pn("border",mn),PT=Pn("borderTop",mn),TT=Pn("borderRight",mn),kT=Pn("borderBottom",mn),DT=Pn("borderLeft",mn),RT=Pn("borderColor"),ET=Pn("borderTopColor"),MT=Pn("borderRightColor"),$T=Pn("borderBottomColor"),OT=Pn("borderLeftColor"),IT=Pn("outline",mn),_T=Pn("outlineColor"),dl=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=vi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:yi(t,r)});return er(e,e.borderRadius,n)}return null};dl.propTypes={};dl.filterProps=["borderRadius"];ul(ST,PT,TT,kT,DT,RT,ET,MT,$T,OT,dl,IT,_T);const fl=e=>{if(e.gap!==void 0&&e.gap!==null){const t=vi(e.theme,"spacing",8),n=r=>({gap:yi(t,r)});return er(e,e.gap,n)}return null};fl.propTypes={};fl.filterProps=["gap"];const pl=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=vi(e.theme,"spacing",8),n=r=>({columnGap:yi(t,r)});return er(e,e.columnGap,n)}return null};pl.propTypes={};pl.filterProps=["columnGap"];const ml=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=vi(e.theme,"spacing",8),n=r=>({rowGap:yi(t,r)});return er(e,e.rowGap,n)}return null};ml.propTypes={};ml.filterProps=["rowGap"];const AT=Mt({prop:"gridColumn"}),BT=Mt({prop:"gridRow"}),jT=Mt({prop:"gridAutoFlow"}),LT=Mt({prop:"gridAutoColumns"}),NT=Mt({prop:"gridAutoRows"}),FT=Mt({prop:"gridTemplateColumns"}),zT=Mt({prop:"gridTemplateRows"}),WT=Mt({prop:"gridTemplateAreas"}),VT=Mt({prop:"gridArea"});ul(fl,pl,ml,AT,BT,jT,LT,NT,FT,zT,WT,VT);function mo(e,t){return t==="grey"?t:e}const UT=Mt({prop:"color",themeKey:"palette",transform:mo}),qT=Mt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:mo}),HT=Mt({prop:"backgroundColor",themeKey:"palette",transform:mo});ul(UT,qT,HT);function en(e){return e<=1&&e!==0?`${e*100}%`:e}const GT=Mt({prop:"width",transform:en}),Nd=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,a,i,s,c;const r=((i=(a=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:a.values)==null?void 0:i[n])||ll[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:en(n)}};return er(e,e.maxWidth,t)}return null};Nd.filterProps=["maxWidth"];const KT=Mt({prop:"minWidth",transform:en}),YT=Mt({prop:"height",transform:en}),XT=Mt({prop:"maxHeight",transform:en}),QT=Mt({prop:"minHeight",transform:en});Mt({prop:"size",cssProperty:"width",transform:en});Mt({prop:"size",cssProperty:"height",transform:en});const ZT=Mt({prop:"boxSizing"});ul(GT,Nd,KT,YT,XT,QT,ZT);const Ci={border:{themeKey:"borders",transform:mn},borderTop:{themeKey:"borders",transform:mn},borderRight:{themeKey:"borders",transform:mn},borderBottom:{themeKey:"borders",transform:mn},borderLeft:{themeKey:"borders",transform:mn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:mn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:dl},color:{themeKey:"palette",transform:mo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:mo},backgroundColor:{themeKey:"palette",transform:mo},p:{style:wt},pt:{style:wt},pr:{style:wt},pb:{style:wt},pl:{style:wt},px:{style:wt},py:{style:wt},padding:{style:wt},paddingTop:{style:wt},paddingRight:{style:wt},paddingBottom:{style:wt},paddingLeft:{style:wt},paddingX:{style:wt},paddingY:{style:wt},paddingInline:{style:wt},paddingInlineStart:{style:wt},paddingInlineEnd:{style:wt},paddingBlock:{style:wt},paddingBlockStart:{style:wt},paddingBlockEnd:{style:wt},m:{style:xt},mt:{style:xt},mr:{style:xt},mb:{style:xt},ml:{style:xt},mx:{style:xt},my:{style:xt},margin:{style:xt},marginTop:{style:xt},marginRight:{style:xt},marginBottom:{style:xt},marginLeft:{style:xt},marginX:{style:xt},marginY:{style:xt},marginInline:{style:xt},marginInlineStart:{style:xt},marginInlineEnd:{style:xt},marginBlock:{style:xt},marginBlockStart:{style:xt},marginBlockEnd:{style:xt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:fl},rowGap:{style:ml},columnGap:{style:pl},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:en},maxWidth:{style:Nd},minWidth:{transform:en},height:{transform:en},maxHeight:{transform:en},minHeight:{transform:en},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function JT(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function ek(e,t){return typeof e=="function"?e(t):e}function tk(){function e(n,r,o,a){const i={[n]:r,theme:o},s=a[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:l,transform:d,style:u}=s;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const f=cl(o,l)||{};return u?u(i):er(i,r,g=>{let h=ks(f,d,g);return g===h&&typeof g=="string"&&(h=ks(f,d,`${n}${g==="default"?"":Gv(g)}`,g)),c===!1?h:{[c]:h}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const a=o.unstable_sxConfig??Ci;function i(s){let c=s;if(typeof s=="function")c=s(o);else if(typeof s!="object")return s;if(!c)return null;const l=hT(o.breakpoints),d=Object.keys(l);let u=l;return Object.keys(c).forEach(f=>{const m=ek(c[f],o);if(m!=null)if(typeof m=="object")if(a[f])u=za(u,e(f,m,o,a));else{const g=er({theme:o},m,h=>({[f]:h}));JT(g,m)?u[f]=t({sx:m,theme:o}):u=za(u,g)}else u=za(u,e(f,m,o,a))}),uT(o,gT(d,u))}return Array.isArray(r)?r.map(i):i(r)}return t}const Hr=tk();Hr.filterProps=["sx"];const nk=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??Ci;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function Xv(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=nk(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...i)=>{const s=t(...i);return hr(s)?{...r,...s}:r}:a={...r,...t},{...o,sx:a}}const rk=e=>{const t=fv(e);class n extends Hw{constructor(o){super(o),this.prepend=t.sheet.prepend}}return t.sheet=new n({key:t.key,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy,prepend:t.sheet.prepend,insertionPoint:t.sheet.insertionPoint}),t};let Vu;typeof document=="object"&&(Vu=rk({key:"css",prepend:!0}));function ok(e){const{injectFirst:t,children:n}=e;return t&&Vu?x.jsx(dv,{value:Vu,children:n}):n}function ak(e){return e==null||Object.keys(e).length===0}function Qv(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(ak(o)?n:o):t;return x.jsx(pv,{styles:r})}/**
3
3
  * @mui/styled-engine v6.1.0
4
4
  *
@@ -1,4 +1,4 @@
1
- import{j as r,ah as F,H as p}from"./vendor-mui-core-wlbruq2I.js";import{r as d}from"./vendor-react-DEoibe3W.js";import{A as G,a1 as q,am as H,J as M}from"./vendor-utils-B3iZkn2R.js";import{a as z,k as D,a3 as V}from"./vendor-ux-did-connect-CX7qG3_M.js";import{S as Y}from"./index-BBuUqC0B.js";import{P as $}from"./page-header-JH9JWGMg.js";import{k as Q,L as W,f as A}from"./index-DQjZ74P0.js";import{c as a}from"./vendor-arcblock-B4hgrXYM.js";import{S as X}from"./layout-BCvTd67o.js";import{S as J}from"./step-actions-Brohu3S-.js";import{S as Z}from"./button-C0Vra3Ak.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./Done-CcJLRcBY.js";import"./collapse--nd2JDBL.js";import"./Google-WGwK551e.js";import"./cloneDeep-ro06l5HL.js";import"./logo-uploader-BecsVnr8.js";import"./index-DVQCgvFb.js";import"./content-layout-DuPlKBe3.js";import"./use-mobile-CXU9YBvX.js";function x({children:h,bottom:T,onBottomFix:m}){const i=d.useRef(null),l=d.useRef(null),L=d.useRef(null),c=d.useRef(null),[C,E]=d.useState(!1);return d.useEffect(()=>{let t;const u=()=>{t||(t=setTimeout(()=>{l.current&&(l.current.scrollHeight>i.current.clientHeight-L.current.clientHeight?(c.current!=="fix"&&(m("fix"),c.current="fix"),E(!0)):(c.current!=="scroll"&&(m("scroll"),c.current="scroll"),E(!1))),t=null},50))};let f;return window.ResizeObserver?f=new ResizeObserver(u):window.addEventListener("resize",u),f.observe(i.current),f.observe(l.current),()=>{f?f.disconnect():window.removeEventListener("resize",u),t&&clearTimeout(t)}},[m]),r.jsxs(ee,{ref:i,className:`${C?"scroll-mode":""}`,children:[r.jsx("div",{className:"compact-context",ref:l,children:h}),r.jsx("div",{className:"fix-container",ref:L,children:T})]})}const ee=F.div`
1
+ import{j as r,ah as F,H as p}from"./vendor-mui-core-wlbruq2I.js";import{r as d}from"./vendor-react-DEoibe3W.js";import{A as G,a1 as q,am as H,J as M}from"./vendor-utils-B3iZkn2R.js";import{a as z,k as D,a3 as V}from"./vendor-ux-did-connect-CX7qG3_M.js";import{S as Y}from"./index-CI4cLtBE.js";import{P as $}from"./page-header-JH9JWGMg.js";import{k as Q,L as W,f as A}from"./index-B18R5SlV.js";import{c as a}from"./vendor-arcblock-B4hgrXYM.js";import{S as X}from"./layout-BnunMkuP.js";import{S as J}from"./step-actions-DLZOEVat.js";import{S as Z}from"./button-C0Vra3Ak.js";import"./vendor-hooks-BCm626KH.js";import"./lottie-web-jYmAQWuC.js";import"./Done-CcJLRcBY.js";import"./collapse--nd2JDBL.js";import"./Google-WGwK551e.js";import"./cloneDeep-ro06l5HL.js";import"./logo-uploader-Dhh7Un4G.js";import"./index-DVQCgvFb.js";import"./content-layout-DuPlKBe3.js";import"./use-mobile-CiFFAdJf.js";function x({children:h,bottom:T,onBottomFix:m}){const i=d.useRef(null),l=d.useRef(null),L=d.useRef(null),c=d.useRef(null),[C,E]=d.useState(!1);return d.useEffect(()=>{let t;const u=()=>{t||(t=setTimeout(()=>{l.current&&(l.current.scrollHeight>i.current.clientHeight-L.current.clientHeight?(c.current!=="fix"&&(m("fix"),c.current="fix"),E(!0)):(c.current!=="scroll"&&(m("scroll"),c.current="scroll"),E(!1))),t=null},50))};let f;return window.ResizeObserver?f=new ResizeObserver(u):window.addEventListener("resize",u),f.observe(i.current),f.observe(l.current),()=>{f?f.disconnect():window.removeEventListener("resize",u),t&&clearTimeout(t)}},[m]),r.jsxs(ee,{ref:i,className:`${C?"scroll-mode":""}`,children:[r.jsx("div",{className:"compact-context",ref:l,children:h}),r.jsx("div",{className:"fix-container",ref:L,children:T})]})}const ee=F.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;