@abtnode/blocklet-services 1.16.43 → 1.16.44-beta-20250513-030435-c2d99062
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.
- package/api/emails/_components/activity.js +2 -1
- package/api/index.js +5 -1
- package/api/libs/email.js +1 -1
- package/dist/assets/{AdapterDayjs-BiPHzcUP.js → AdapterDayjs-BD9H1lZ-.js} +1 -1
- package/dist/assets/{ArrowDropDown-Dghek9CI.js → ArrowDropDown-BrO-zDlb.js} +1 -1
- package/dist/assets/{CheckCircle-Dvhgeo9j.js → CheckCircle-Ds4QI0ey.js} +1 -1
- package/dist/assets/{ChevronLeft-DE33N57i.js → ChevronLeft-CnQaQ-rc.js} +1 -1
- package/dist/assets/{ChevronRight-BfbPIE2b.js → ChevronRight-a_2_x6Ew.js} +1 -1
- package/dist/assets/{Community-2MKVAbIk.js → Community-DW6DJTIs.js} +1 -1
- package/dist/assets/{DeleteOutline-B6efX_Fy.js → DeleteOutline-CFN4r-OG.js} +1 -1
- package/dist/assets/{Done-Ct5slWpT.js → Done-DqSE6KPe.js} +1 -1
- package/dist/assets/{Download-DKQGRFHf.js → Download-C_LRKzbG.js} +1 -1
- package/dist/assets/{Edit-BLsIdIOp.js → Edit-CbR4eoK8.js} +1 -1
- package/dist/assets/{EditIcon-CwTCQzs9.js → EditIcon-DxUWMw59.js} +1 -1
- package/dist/assets/{Email-DOy8vL0N.js → Email-DWueGk7t.js} +1 -1
- package/dist/assets/{Error-wpqrAfUT.js → Error-jEHdDLNk.js} +1 -1
- package/dist/assets/{ExpandLess-CJXkgMMr.js → ExpandLess-CkoEHpgk.js} +1 -1
- package/dist/assets/{Google-BbAgcDQ_.js → Google-DHEolkW-.js} +1 -1
- package/dist/assets/{Holiday-DT-VjgQP.js → Holiday-Dwvo6QkZ.js} +1 -1
- package/dist/assets/{InfoOutlined-Dy7jTc7H.js → InfoOutlined-DkG0jjos.js} +1 -1
- package/dist/assets/{Launch-DBKe0gh0.js → Launch-B-2Jomi6.js} +1 -1
- package/dist/assets/{LaunchOutlined-BIq6YUU8.js → LaunchOutlined-CXNijfqX.js} +1 -1
- package/dist/assets/{Location-C__VfR4D.js → Location-DUEOr9J2.js} +1 -1
- package/dist/assets/{LockIcon-DIGiHKHl.js → LockIcon-Cjg8jV1E.js} +1 -1
- package/dist/assets/{Meeting-Cn2X2Ix7.js → Meeting-CJaI_cKm.js} +1 -1
- package/dist/assets/{MoreHoriz-BxJelL2A.js → MoreHoriz-B6KdR0Y8.js} +1 -1
- package/dist/assets/{OffSick-Cnicwu8x.js → OffSick-C9VqqjrN.js} +1 -1
- package/dist/assets/{Phone-CoX1qzAs.js → Phone-DcHUzCa-.js} +1 -1
- package/dist/assets/{PlayArrow-C9IFmc-j.js → PlayArrow-BToG9L6q.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-DCM9zW3a.js → QuestionMarkCircle-BPVDAm8U.js} +1 -1
- package/dist/assets/{ServerLogo-CfbYjQbP.js → ServerLogo-s6cfhx92.js} +1 -1
- package/dist/assets/{Timezone-CCdgxxpv.js → Timezone-B-Ho_Uno.js} +1 -1
- package/dist/assets/{TuneOutlined-CB7t_nGq.js → TuneOutlined-BR2H7Mxj.js} +1 -1
- package/dist/assets/{ViewList-B4hmqizo.js → ViewList-D8vtMKQz.js} +1 -1
- package/dist/assets/{WorkingRemotely-DWT54kH1.js → WorkingRemotely-lJ6DUMCR.js} +1 -1
- package/dist/assets/{access-control-RJu7xYI3.js → access-control-Din7doVd.js} +1 -1
- package/dist/assets/{actions-BCWb2ez1.js → actions-BjTeIzgS.js} +1 -1
- package/dist/assets/{add-component-core-DRAzXCeg.js → add-component-core-5x4gTem5.js} +15 -15
- package/dist/assets/{add-resource-BDJuVU8K.js → add-resource-BrZnm53f.js} +1 -1
- package/dist/assets/{addon-ygDS7Fug.js → addon--u4EErgw.js} +1 -1
- package/dist/assets/{advanced-CFME3Vrl.js → advanced-CN6mCSES.js} +1 -1
- package/dist/assets/{appearance-BqJwEmtt.js → appearance-Bowm1Shj.js} +1 -1
- package/dist/assets/audit-logs-DczjqamJ.js +35 -0
- package/dist/assets/{authorize-WekjQ3_M.js → authorize-D2LCmekq.js} +1 -1
- package/dist/assets/{base32-BbrXtXL6.js → base32-_zEVBJUg.js} +1 -1
- package/dist/assets/{branding-CS-f1gMT.js → branding-B6AmOMI6.js} +6 -6
- package/dist/assets/{branding-BTfb8_b4.js → branding-CwhhJRKu.js} +2 -2
- package/dist/assets/{bundle-avatar-Db5l8MQ4.js → bundle-avatar-CDJRatFg.js} +1 -1
- package/dist/assets/button-D8hoY4xw.js +1 -0
- package/dist/assets/click-to-copy-CFiGx48J.js +1 -0
- package/dist/assets/{collapse-Bn_BDlF9.js → collapse-QV_2gdtM.js} +1 -1
- package/dist/assets/{complete-BRApuFsV.js → complete-CKhw9u_z.js} +2 -2
- package/dist/assets/{component-C7g4FGFm.js → component-Cb3m5qUw.js} +2 -2
- package/dist/assets/{config-qG8JCIJ_.js → config-LE_EJolF.js} +1 -1
- package/dist/assets/{config-C8AXD1JH.js → config-kGXJEkFJ.js} +2 -2
- package/dist/assets/{config-navigation-B7r4dV5S.js → config-navigation-CKVyFhfH.js} +4 -4
- package/dist/assets/{config-space-CSKkMgqX.js → config-space-CogRdhoQ.js} +1 -1
- package/dist/assets/{confirm-BvUfAlkx.js → confirm-SdqBW-ti.js} +1 -1
- package/dist/assets/{connect-B2HOOYzS.js → connect-BMn4CxDk.js} +1 -1
- package/dist/assets/{connect-DGPdKMcu.js → connect-HAC-YfHh.js} +1 -1
- package/dist/assets/{connect-to-BBtnljQ-.js → connect-to-eNQDY2rc.js} +1 -1
- package/dist/assets/{content-layout-DzqMXifY.js → content-layout-BzF-fNQz.js} +1 -1
- package/dist/assets/dashboard-BYxl5V9e.js +239 -0
- package/dist/assets/{delete-confirm-BBaXcAXg.js → delete-confirm-CKF_eljP.js} +1 -1
- package/dist/assets/{did-address-BKBBjFqv.js → did-address-DjwPl1uy.js} +1 -1
- package/dist/assets/{domain-DTrwCkop.js → domain-DotN6lCb.js} +1 -1
- package/dist/assets/{domain-action-card-D-WETV-f.js → domain-action-card-DHH9PLRG.js} +1 -1
- package/dist/assets/domains-BV2pykxi.js +1 -0
- package/dist/assets/{dot-C05enzim.js → dot-BA3EvSrh.js} +1 -1
- package/dist/assets/{email-Bc5KLu5Q.js → email-CHR0EOis.js} +1 -1
- package/dist/assets/{empty-spinner-BZlBh4vA.js → empty-spinner-n0_Ehns5.js} +1 -1
- package/dist/assets/{exchange-passport-DbNEDTaa.js → exchange-passport-D0iIXJxD.js} +1 -1
- package/dist/assets/{fuel-DzWcrU-I.js → fuel-nMTHNcy-.js} +1 -1
- package/dist/assets/{gen-access-key-D-ftFU9F.js → gen-access-key-DH4wNzRm.js} +1 -1
- package/dist/assets/get-safe-url-B5RJTMjC.js +1 -0
- package/dist/assets/get-safe-url-Bk6PlU7n.js +1 -0
- package/dist/assets/{home-DXj5oFeO.js → home-DzCwBE8F.js} +1 -1
- package/dist/assets/{iframe-CIVgAJuH.js → iframe-DW7zzzTG.js} +1 -1
- package/dist/assets/{index-BemEiFHE.js → index-8CHxrfFP.js} +1 -1
- package/dist/assets/{index-D64RNKdt.js → index-B54lTbup.js} +6 -6
- package/dist/assets/{index-CKheO_aT.js → index-B8r-LrrM.js} +1 -1
- package/dist/assets/{index-Bxd86KLJ.js → index-BA8C83iz.js} +4 -4
- package/dist/assets/index-BCNchyGN.js +141 -0
- package/dist/assets/{index-g0L_1foA.js → index-BCtmnJeV.js} +11 -11
- package/dist/assets/{index-BMD-pSqT.js → index-BDYaw77z.js} +1 -1
- package/dist/assets/{index-Ce2NSVmU.js → index-BIPRCLBG.js} +1 -1
- package/dist/assets/{index-BMPpz8ni.js → index-BJxv6GA4.js} +1 -1
- package/dist/assets/index-BLGGjT7N.js +284 -0
- package/dist/assets/{index-DjLLC6N3.js → index-BYCeMwoO.js} +1 -1
- package/dist/assets/{index-BVU8_1Ed.js → index-B_-kynzD.js} +3 -3
- package/dist/assets/{index-D09AfnR1.js → index-BuXc3Oag.js} +1 -1
- package/dist/assets/{index-u-w3iMC9.js → index-CIkPfxzG.js} +4 -4
- package/dist/assets/{index-CHDiquXf.js → index-CPfvVvHv.js} +11 -11
- package/dist/assets/index-CYeNo51G.js +113 -0
- package/dist/assets/{index-CUfP1M2j.js → index-CfxcUIhC.js} +1 -1
- package/dist/assets/index-Ctzl9JDw.js +55 -0
- package/dist/assets/{index-BmWVfEGP.js → index-CxwBhS0_.js} +1 -1
- package/dist/assets/{index--HbH1n1_.js → index-D7eC9ptO.js} +1 -1
- package/dist/assets/{index-DF3gHUuW.js → index-D9KfgDPN.js} +4 -4
- package/dist/assets/{index-wXCx8TFU.js → index-DcUhenm6.js} +1 -1
- package/dist/assets/{index-C0SLCehH.js → index-enM9Y412.js} +1 -1
- package/dist/assets/{invitation-CKfllvl5.js → invitation-DzT9Qa0A.js} +1 -1
- package/dist/assets/{invite-CCCSmPiy.js → invite-CQPeUOT4.js} +1 -1
- package/dist/assets/{issue-passport-C3zUptls.js → issue-passport-BYhvmLsl.js} +1 -1
- package/dist/assets/{item-CkcpHBHM.js → item-D942q-4T.js} +1 -1
- package/dist/assets/{landing-page-q-KgqE9Q.js → landing-page-Due4o1uF.js} +1 -1
- package/dist/assets/{launch-result-message-BaU6oEsi.js → launch-result-message-DIYoykBK.js} +1 -1
- package/dist/assets/{layout-CyCulQBn.js → layout-BcLfVSqs.js} +1 -1
- package/dist/assets/list-BiJWMg_P.js +236 -0
- package/dist/assets/list-DKUSPdB6.js +2 -0
- package/dist/assets/{list-header-CU9W30JD.js → list-header-HqBQs1yn.js} +1 -1
- package/dist/assets/localization-BUDtnbyU.js +1 -0
- package/dist/assets/{log-DNpJdgp3.js → log-Iko0jLNA.js} +1 -1
- package/dist/assets/{logger-CQ50TnpL.js → logger-BLZgTs_U.js} +1 -1
- package/dist/assets/{login-BKaJnfFX.js → login-4Yq_pPSw.js} +1 -1
- package/dist/assets/{login-oauth-callback-LJsgXC8E.js → login-oauth-callback-DZaPZfnA.js} +1 -1
- package/dist/assets/{logo-uploader-BYnd80uu.js → logo-uploader-Cnkdgyfv.js} +3 -3
- package/dist/assets/{lost-passport-Bk0k4I4s.js → lost-passport-D5jMtgH_.js} +1 -1
- package/dist/assets/{open-window-DV0D-Mov.js → open-window--2G6Qjbq.js} +1 -1
- package/dist/assets/overview-CaQ-tV1t.js +85 -0
- package/dist/assets/{page-header-CpNMTtn_.js → page-header-xyZktwBS.js} +1 -1
- package/dist/assets/{passport-item-BxfGrDcE.js → passport-item-DH3_49G1.js} +1 -1
- package/dist/assets/{permission-BkNXA8B5.js → permission-BH1TY_tz.js} +1 -1
- package/dist/assets/{preferences-_jTjKHvU.js → preferences-CfmnTXfl.js} +1 -1
- package/dist/assets/{profile-embed-8w4_vg5a.js → profile-embed-ZtzRYgXv.js} +1 -1
- package/dist/assets/publish-resource-BtFRgv4P.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-Cq_dOQ2z.js → react-beautiful-dnd.esm-7PS2VwOi.js} +1 -1
- package/dist/assets/runtime-B0207zk1.js +1 -0
- package/dist/assets/sdk-9eXJSWHG.js +1 -0
- package/dist/assets/section-Cv4udilp.js +41 -0
- package/dist/assets/{security-BQbSLSOe.js → security-CX01lhxW.js} +3 -3
- package/dist/assets/{session-6XaVDQaE.js → session-CHdTc1We.js} +1 -1
- package/dist/assets/{setup-CifjXQIf.js → setup-DIAgbS7c.js} +3 -3
- package/dist/assets/{shorten-label-Dq7bVuNa.js → shorten-label-Cng55547.js} +1 -1
- package/dist/assets/{simple-select-C-wGUGQR.js → simple-select-CP_Svi_D.js} +1 -1
- package/dist/assets/{slicedToArray-vWe02CJE.js → slicedToArray-C7EPqaHf.js} +1 -1
- package/dist/assets/{spaces-Cp7TgoZP.js → spaces-BVG-t3ND.js} +1 -1
- package/dist/assets/{start-CHmWCQE9.js → start-CMRQU8Px.js} +1 -1
- package/dist/assets/{starting-progress-CdpkXOrK.js → starting-progress-CiLZpNpg.js} +1 -1
- package/dist/assets/{status-46dMQnxA.js → status-DSQPLYSp.js} +1 -1
- package/dist/assets/{step-actions-Bu3Q5M4V.js → step-actions-BfGTFkaB.js} +1 -1
- package/dist/assets/{studio-BbeHx14I.js → studio-DikseKRr.js} +1 -1
- package/dist/assets/{switch-control-D6CqAlDY.js → switch-control-C5i52ixk.js} +1 -1
- package/dist/assets/{traffic-CY9Vj6w7.js → traffic-ClE631in.js} +2 -2
- package/dist/assets/{transfer-CSeo2FaW.js → transfer-BnR8fjLW.js} +1 -1
- package/dist/assets/{unsubscribe-BLaMmgbM.js → unsubscribe-rUE2LcLN.js} +1 -1
- package/dist/assets/{use-blocklet-logo-sEJnYyNL.js → use-blocklet-logo-Phq7jasP.js} +2 -2
- package/dist/assets/{use-mobile-BAjFH6d8.js → use-mobile-Boa_xu9A.js} +1 -1
- package/dist/assets/{use-mobile-Bh8CHBbH.js → use-mobile-DyX6Fl8Z.js} +1 -1
- package/dist/assets/{useLocalStorage-C6U1Aqya.js → useLocalStorage-DVnkpneF.js} +1 -1
- package/dist/assets/user-center-D25Vw-wP.js +76 -0
- package/dist/assets/{util-RWes6RwK.js → util-Btd7aQEC.js} +1 -1
- package/dist/assets/{util-Bg0WSJ-t.js → util-CEAObyfj.js} +1 -1
- package/dist/assets/{vendor-arcblock-CN2B_oTr.js → vendor-arcblock-uz9DVywv.js} +45 -45
- package/dist/assets/{vendor-mui-core-UZpb7wT7.js → vendor-mui-core-D_bnq77o.js} +1 -1
- package/dist/assets/{vendor-mui-x-whuSO90H.js → vendor-mui-x-R-0SFz4c.js} +1 -1
- package/dist/assets/{vendor-ux-did-connect-TEE6cGq6.js → vendor-ux-did-connect-DHrruicZ.js} +136 -136
- package/dist/assets/{wrap-locale-DZ79GW_G.js → wrap-locale-CPW6a0PM.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/service-worker.js +1 -1
- package/dist/share/shared-bridge.html +4 -4
- package/package.json +32 -32
- package/dist/assets/audit-logs-CtFZQHby.js +0 -35
- package/dist/assets/button-DotKXyjc.js +0 -1
- package/dist/assets/click-to-copy-BxhgzyYL.js +0 -1
- package/dist/assets/dashboard-C124DXmc.js +0 -279
- package/dist/assets/domains-BxkmGeZE.js +0 -1
- package/dist/assets/get-safe-url-2RcRY8gU.js +0 -1
- package/dist/assets/get-safe-url-CEvgWyL5.js +0 -1
- package/dist/assets/index-9ixwCOkw.js +0 -113
- package/dist/assets/index-B_fwtN9z.js +0 -55
- package/dist/assets/index-CyUXddLG.js +0 -284
- package/dist/assets/index-DsT9i24r.js +0 -141
- package/dist/assets/list-D1dIr8Je.js +0 -2
- package/dist/assets/list-TP-VNuzL.js +0 -236
- package/dist/assets/localization-BXLZxF1J.js +0 -1
- package/dist/assets/overview-UIMGVO1S.js +0 -85
- package/dist/assets/publish-resource-CcM3RwPR.js +0 -1
- package/dist/assets/relative-time-Cl7lOTkO.js +0 -1
- package/dist/assets/runtime-BVDdcpyT.js +0 -1
- package/dist/assets/sdk-7yPC_DtN.js +0 -1
- package/dist/assets/user-center-BHyd-rRF.js +0 -76
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{_ as Se}from"./vendor-arcblock-CN2B_oTr.js";import{a9 as Ie,j as e,al as z,T as P,aa as m,bd as Pe,ad as re,I as F,D as ue,H as w,aj as Re,t as ke,bV as Ee,N as oe,z as _e,y as $,ah as Ve}from"./vendor-mui-core-UZpb7wT7.js";import{r as De,u as Le,bb as Oe,j as L}from"./vendor-ux-did-connect-TEE6cGq6.js";import{E as M}from"./empty-spinner-BZlBh4vA.js";import{d as ie}from"./DeleteOutline-B6efX_Fy.js";import{m as Te,e as $e}from"./vendor-hooks-rDgu5KV9.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-Cq_dOQ2z.js";import{S as K}from"./studio-BbeHx14I.js";import"./vendor-utils-rHXShPKm.js";import"./lottie-web-jYmAQWuC.js";import"./raf-schd.esm-B3j6BePR.js";import"./TuneOutlined-CB7t_nGq.js";var C={};Object.defineProperty(C,"__esModule",{value:!0});C.getVideoId=O;var Ue=C.getEmbedUrl=ze,We=C.getVideoCoverUrl=Fe,Ae=C.getVideoCheckUrl=Ne;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=He;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 U={};function O(r){const t=r.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(U[t]||(U[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"]:[]})()),U[t])}const k={};function ze(r,{modestbranding:t=1,controls:s=0,autoplay:l=0}={}){const i=r.trim();if(!i)return"";if(k[i]!==void 0)return k[i];const[a,u]=O(i);return u==="youtube"?k[i]=`https://www.youtube.com/embed/${a}?modestbranding=${t}&controls=${s}&autoplay=${l}`:u==="vimeo"?k[i]=`https://player.vimeo.com/video/${a}?autoplay=${l}`:k[i]="",k[i]}const E={};function Fe(r){const t=r.trim();if(!t)return"";if(E[t]!==void 0)return E[t];const[s,l]=O(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]=O(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 He(r){const t=r.trim();return O(t).length>0}var X={},qe=Ie;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=qe(De()),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(()=>Se(()=>import("./index-BVU8_1Ed.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(r=>({default:r.Uploader}))),Me=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Xe=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ye=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,W=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,Je=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,ce=5,de=3;function ut(){var ee;const{t:r,locale:t}=Le(),[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,H]=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}),R=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})})},q=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 q(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(Pe,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ye}?t=${N}`,onClick:()=>{var c;return(c=R.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,V)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.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,D)=>{const te=`${W}/${b}`;return e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:D.isDragging?"scale(1.05)":"none",boxShadow:D.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,V)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.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,D)=>e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:D.isDragging?"scale(1.05)":"none",boxShadow:D.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:R,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=R.current)==null||o.close(),H(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 R;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=!!((R=navigator.clipboard)!=null&&R.readText),{run:H}=$e(p,{wait:500,leading:!0});return e.jsxs(ue,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(Re,{children:t(s?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(ke,{children:[e.jsx(Ee,{fullWidth:!0,value:i,onChange:f=>{const v=f.target.value.trim();a(v),v?H(v):j(!1)},placeholder:t("studio.videoInputLabel"),endAdornment:i?e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:()=>{a(""),p("")},children:e.jsx(Oe,{})})}):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:Ue(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(_e,{children:[e.jsx($,{onClick:()=>r(),children:t("studio.cancel")}),T&&e.jsx($,{variant:"contained",color:"error",onClick:()=>r(null,s),children:t("studio.delete")}),_&&e.jsx($,{variant:"contained",onClick:()=>p(i),disabled:!i||u,children:t("studio.preview")}),!T&&!_&&e.jsx($,{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(q=>{q.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-B_-kynzD.js","assets/vendor-ux-did-connect-DHrruicZ.js","assets/vendor-react-DEoibe3W.js","assets/vendor-utils-rHXShPKm.js","assets/vendor-mui-core-D_bnq77o.js","assets/vendor-hooks-rDgu5KV9.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/vendor-arcblock-uz9DVywv.js","assets/index-Bs1kxR8_.js","assets/index-CIkPfxzG.js","assets/index-DOq-_YXu.css","assets/index-DVQCgvFb.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as Se}from"./vendor-arcblock-uz9DVywv.js";import{a9 as Ie,j as e,al as z,T as P,aa as m,bd as Pe,ad as re,I as F,D as ue,H as w,aj as Re,t as ke,bV as Ee,N as oe,z as _e,y as $,ah as Ve}from"./vendor-mui-core-D_bnq77o.js";import{r as De,u as Le,ba as Oe,j as L}from"./vendor-ux-did-connect-DHrruicZ.js";import{E as M}from"./empty-spinner-n0_Ehns5.js";import{d as ie}from"./DeleteOutline-CFN4r-OG.js";import{m as Te,e as $e}from"./vendor-hooks-rDgu5KV9.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-7PS2VwOi.js";import{S as K}from"./studio-DikseKRr.js";import"./vendor-utils-rHXShPKm.js";import"./lottie-web-jYmAQWuC.js";import"./raf-schd.esm-B3j6BePR.js";import"./TuneOutlined-BR2H7Mxj.js";var C={};Object.defineProperty(C,"__esModule",{value:!0});C.getVideoId=O;var Ue=C.getEmbedUrl=ze,We=C.getVideoCoverUrl=Fe,Ae=C.getVideoCheckUrl=Ne;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=He;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 U={};function O(r){const t=r.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(U[t]||(U[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"]:[]})()),U[t])}const k={};function ze(r,{modestbranding:t=1,controls:s=0,autoplay:l=0}={}){const i=r.trim();if(!i)return"";if(k[i]!==void 0)return k[i];const[a,u]=O(i);return u==="youtube"?k[i]=`https://www.youtube.com/embed/${a}?modestbranding=${t}&controls=${s}&autoplay=${l}`:u==="vimeo"?k[i]=`https://player.vimeo.com/video/${a}?autoplay=${l}`:k[i]="",k[i]}const E={};function Fe(r){const t=r.trim();if(!t)return"";if(E[t]!==void 0)return E[t];const[s,l]=O(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]=O(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 He(r){const t=r.trim();return O(t).length>0}var X={},qe=Ie;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=qe(De()),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(()=>Se(()=>import("./index-B_-kynzD.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(r=>({default:r.Uploader}))),Me=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Xe=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ye=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,W=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,Je=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,ce=5,de=3;function ut(){var ee;const{t:r,locale:t}=Le(),[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,H]=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}),R=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})})},q=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 q(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(Pe,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ye}?t=${N}`,onClick:()=>{var c;return(c=R.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,V)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.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,D)=>{const te=`${W}/${b}`;return e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:D.isDragging?"scale(1.05)":"none",boxShadow:D.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,V)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:V.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:V.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,D)=>e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:D.isDragging?"scale(1.05)":"none",boxShadow:D.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:R,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=R.current)==null||o.close(),H(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 R;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=!!((R=navigator.clipboard)!=null&&R.readText),{run:H}=$e(p,{wait:500,leading:!0});return e.jsxs(ue,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(Re,{children:t(s?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(ke,{children:[e.jsx(Ee,{fullWidth:!0,value:i,onChange:f=>{const v=f.target.value.trim();a(v),v?H(v):j(!1)},placeholder:t("studio.videoInputLabel"),endAdornment:i?e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:()=>{a(""),p("")},children:e.jsx(Oe,{})})}):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:Ue(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(_e,{children:[e.jsx($,{onClick:()=>r(),children:t("studio.cancel")}),T&&e.jsx($,{variant:"contained",color:"error",onClick:()=>r(null,s),children:t("studio.delete")}),_&&e.jsx($,{variant:"contained",onClick:()=>p(i),disabled:!i||u,children:t("studio.preview")}),!T&&!_&&e.jsx($,{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(q=>{q.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,bd as j,H as a}from"./vendor-mui-core-
|
|
1
|
+
import{j as f,bd as j,H as a}from"./vendor-mui-core-D_bnq77o.js";import{j as P,Z as $}from"./vendor-ux-did-connect-DHrruicZ.js";import{A as g}from"./vendor-utils-rHXShPKm.js";import{z as y,A as E,W as h,X as A,Y as R}from"./index-CIkPfxzG.js";function w({blocklet:r,ancestors:p=[]}){var d,m;const s=y(),{inService:n}=s,i=E(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(R,P.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,A(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($,{did:r.meta.did||"",responsive:!0})),f.jsx(j,{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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./vendor-mui-core-D_bnq77o.js";import{B as n}from"./vendor-ux-did-connect-DHrruicZ.js";function m({...t}){return o.jsx(n,{className:"bottom-button",variant:"contained",color:"primary",...t})}export{m as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t}from"./vendor-react-DEoibe3W.js";import{j as i,H as e}from"./vendor-mui-core-D_bnq77o.js";import{b2 as s,bt as c}from"./vendor-ux-did-connect-DHrruicZ.js";function n({children:p,...r}){const{t:o}=t.useContext(s);return i.jsx(c,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...r,children:p})}n.propTypes={children:e.any.isRequired};export{n as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-react-DEoibe3W.js";import{a9 as s,j as e,s as o,
|
|
1
|
+
import"./vendor-react-DEoibe3W.js";import{a9 as s,j as e,s as o,c3 as d,c4 as i,c5 as n}from"./vendor-mui-core-D_bnq77o.js";import{r as c}from"./vendor-ux-did-connect-DHrruicZ.js";var a={},p=s;Object.defineProperty(a,"__esModule",{value:!0});var t=a.default=void 0,u=p(c()),l=e;t=a.default=(0,u.default)((0,l.jsx)("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIosSharp");const v=o(r=>e.jsx(d,{disableGutters:!0,elevation:0,square:!0,...r}))(({theme:r})=>({border:`1px solid ${r.palette.divider}`,"&:not(:last-child)":{borderBottom:0},"&::before":{display:"none"}})),b=o(r=>e.jsx(i,{expandIcon:e.jsx(t,{sx:{fontSize:"0.9rem"}}),...r}))(({theme:r})=>({backgroundColor:r.palette.mode==="dark"?"rgba(255, 255, 255, .05)":"rgba(0, 0, 0, .03)",flexDirection:"row-reverse","& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"rotate(90deg)"},"& .MuiAccordionSummary-content":{marginLeft:r.spacing(1)}})),g=o(n)(({theme:r})=>({padding:r.spacing(2),borderTop:"1px solid rgba(0, 0, 0, .125)"}));export{v as A,b as a,g as b,t as d};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{ah as x,j as e,aa as m,ab as M,H as z}from"./vendor-mui-core-
|
|
1
|
+
import{ah as x,j as e,aa as m,ab as M,H as z}from"./vendor-mui-core-D_bnq77o.js";import{u as A,M as F,a3 as N,_ as $,j as W}from"./vendor-ux-did-connect-DHrruicZ.js";import{n as D,o as H,ao as O,d as V,e as X,ag as K,ap as Q,P as q}from"./index-CIkPfxzG.js";import{r as u}from"./vendor-react-DEoibe3W.js";import{A as G}from"./vendor-utils-rHXShPKm.js";import{f as j}from"./vendor-hooks-rDgu5KV9.js";import{L as J}from"./launch-result-message-DIYoykBK.js";import{g as Y}from"./get-safe-url-Bk6PlU7n.js";import{S as C}from"./button-D8hoY4xw.js";import{S as Z}from"./layout-BcLfVSqs.js";import{S as ee,P as te,p as se}from"./starting-progress-CiLZpNpg.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-uz9DVywv.js";import"./content-layout-BzF-fNQz.js";const re=x(J)`
|
|
2
2
|
&& .result-footer {
|
|
3
3
|
height: 120px;
|
|
4
4
|
> div {
|
|
5
5
|
flex-wrap: wrap;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
`,ne=re;function T({onPrevious:o}){const{t:r}=A(),[k,w]=u.useState(!1),[a,d]=u.useState("starting"),[c,y]=u.useState(),{blocklet:s}=D(),[l,_]=u.useState(""),R=H("fromLauncher"),p=!["starting","running"].includes(a),S=a==="starting",L={stopped:r("blocklet.start"),starting:r("blocklet.starting"),running:r("blocklet.open")},v=()=>{const t=new URL(window.location.href).searchParams.get("redirect");if(!l||!N(l)){$.error(r("blocklet.gotoVisitError"));return}let n=new URL(l);t&&(n=new URL(t,l));const U=O.get("login_token");n.host!==window.location.host&&U&&(n.pathname=G(W.WELLKNOWN_SERVICE_PATH_PREFIX,"redirect-with-login"),n.searchParams.set("setupToken",U)),window.location.href=Y(n.href)},b=async()=>{var i;w(!0),d("starting");try{await V.post("/blocklet/start?fromSetup=1");const{blocklet:{status:t}={}}=await X.getBlocklet({input:{did:s.meta.did}});w(!1),d(t),y(t==="running"?null:r("setup.complete.notRunning"))}catch(t){const n=((i=t==null?void 0:t.response)==null?void 0:i.data)||t.message;$.error(n),w(!1),d("stopped"),y(n)}};u.useEffect(()=>{d(s.status),["starting","running"].includes(s.status)||b()},[]),u.useEffect(()=>{l||(async()=>{const t=await
|
|
8
|
+
`,ne=re;function T({onPrevious:o}){const{t:r}=A(),[k,w]=u.useState(!1),[a,d]=u.useState("starting"),[c,y]=u.useState(),{blocklet:s}=D(),[l,_]=u.useState(""),R=H("fromLauncher"),p=!["starting","running"].includes(a),S=a==="starting",L={stopped:r("blocklet.start"),starting:r("blocklet.starting"),running:r("blocklet.open")},v=()=>{const t=new URL(window.location.href).searchParams.get("redirect");if(!l||!N(l)){$.error(r("blocklet.gotoVisitError"));return}let n=new URL(l);t&&(n=new URL(t,l));const U=O.get("login_token");n.host!==window.location.host&&U&&(n.pathname=G(W.WELLKNOWN_SERVICE_PATH_PREFIX,"redirect-with-login"),n.searchParams.set("setupToken",U)),window.location.href=Y(n.href)},b=async()=>{var i;w(!0),d("starting");try{await V.post("/blocklet/start?fromSetup=1");const{blocklet:{status:t}={}}=await X.getBlocklet({input:{did:s.meta.did}});w(!1),d(t),y(t==="running"?null:r("setup.complete.notRunning"))}catch(t){const n=((i=t==null?void 0:t.response)==null?void 0:i.data)||t.message;$.error(n),w(!1),d("stopped"),y(n)}};u.useEffect(()=>{d(s.status),["starting","running"].includes(s.status)||b()},[]),u.useEffect(()=>{l||(async()=>{const t=await K.evaluateURLs(s.site.domainAliases.map(n=>Q(n.value,q)),{preferAccessible:!0});t.length>0&&_(t[0].url)})()},[s,l]);const g=j(()=>{var i;return(i=s==null?void 0:s.children)==null?void 0:i.length},[s]),f=j(()=>{var i,t;return((t=(i=s==null?void 0:s.children)==null?void 0:i.filter(n=>n.status==="running"))==null?void 0:t.length)||0},[s]),h=j(()=>!g||!f?0:Math.round(f/g*100),[f,g]),P=localStorage.getItem("blocklet-server-url"),E=S||!l;R&&!E&&(p?b():v());const B=F(se,p?{ml:3}:{},S?{width:`${h}%`,"&::after":{width:`${h}%`},"&::before":{width:`${h}%`,animation:"shimmer 1.5s infinite cubic-bezier(0.4, 0.0, 0.2, 1)","@keyframes shimmer":{"0%":{width:0},"100%":{width:`${h}%`}}}}:{}),I={starting:r("setup.complete.readyToStart"),running:r("setup.complete.title")};return e.jsx(oe,{children:e.jsx(ne,{variant:c?"error":"success",title:e.jsxs(m,{display:"flex",flexDirection:"column",alignItems:"center",gap:1,children:[e.jsx(m,{fontSize:24,fontWeight:600,children:c?r("setup.complete.failedTitle"):I[a]||""}),a==="starting"?e.jsx(ee,{blocklets:s.children??[]}):null]}),footer:e.jsxs(ie,{children:[p&&e.jsx(C,{variant:"outlined",disabled:k,onClick:()=>o(),children:r("setup.previous")}),R?e.jsxs(ae,{rel:"noreferrer",children:[e.jsx(M,{size:16,style:{marginRight:14}})," ",r("common.redirecting")]}):e.jsxs(e.Fragment,{children:[e.jsx(m,{display:"flex",flexDirection:"column",alignItems:"center",gap:1,children:e.jsx(te,{blocklets:s.children??[],status:a,debounce:!1,children:e.jsx(C,{sx:B,disabled:k||S,onClick:()=>p?b():v(),loading:E,children:e.jsx("span",{style:{position:"relative",zIndex:2},children:a==="starting"&&!c?`(${f}/${g}) ${r("blocklet.starting")}`:L[a]||L.stopped})})})}),(a==="running"||c)&&!!P&&e.jsx(m,{width:"100%",mt:2,children:e.jsx("a",{href:P,target:"_blank",rel:"noopener noreferrer",className:"back-to-server-link",children:r("setup.complete.backToServer")})}),c&&e.jsx(m,{className:"error-message",fontSize:14,color:"#888",mt:1,children:c})]})]})})})}const oe=x(Z)`
|
|
9
9
|
justify-content: center;
|
|
10
10
|
.icon-success {
|
|
11
11
|
width: 64px;
|
|
@@ -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{d4 as Uw,ct as Te,cs as Ze,cq as qw,a9 as Se,j as x,aa as Re,ad as Vn,H as oe,d5 as dv,d6 as fv,d7 as Hw,bE as pv,ah as Nt,d8 as el,
|
|
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{d4 as Uw,ct as Te,cs as Ze,cq as qw,a9 as Se,j as x,aa as Re,ad as Vn,H as oe,d5 as dv,d6 as fv,d7 as Hw,bE as pv,ah as Nt,d8 as el,c2 as Kt,J as tl,d9 as pi,b7 as Jn,cM as ft,b3 as It,da as Gw,db as Kw,c as Pe,_ as N,Y as yr,dc as Ke,dd as Yw,de as ys,b as qn,df as Xa,dg as Xw,cN as Qw,dh as Zw,c6 as Jw,d2 as eS,di as tS,cO as nS,g as ze,a as Le,k as Fe,dj as mv,u as Gt,dk as rS,d as nn,dl as nl,dm as Wp,o as on,dn as hv,i as Nr,dp as oS,dq as mi,dr as aS,ds as Vp,f as kd,dt as gv,du as iS,dv as sS,p as rl,K as lS,dw as cS,b0 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,bd as dS,ap as ol,dx as fS,bv as pS,bt as Au,bw as Hp,bh as yv,y as mS,D as Gp,aj as Kp,t as Yp,bS as Xp,bc as Li,z as hS,bu as gS}from"./vendor-mui-core-D_bnq77o.js";import{aN as Qp,a6 as bS,A as Cs,aO as vS}from"./vendor-utils-rHXShPKm.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{bV as Ce,r as Vr,u as Yt,_ as ot,c6 as xS,c7 as wS,bj as Zp,bk as SS,bl as PS,bm as TS,z as kS,b4 as gi,ba as Jp,bo as DS,U as RS,c8 as ES,b2 as Tr,am as al,j as Be,a3 as MS,b7 as $S,X as gc,a6 as OS,I as Mn,B as Ni,a0 as IS}from"./vendor-ux-did-connect-DHrruicZ.js";import{M as wv,c as Qn,a8 as _S}from"./vendor-arcblock-uz9DVywv.js";import{z as Qt,C as Ur,T as yo,f as dt,R as Qa,aG as AS,a6 as Sv,a7 as Co,ap as Pv,aH as Tv,b as Ia,aI as BS,a5 as jS}from"./index-CIkPfxzG.js";import{d as kv}from"./TuneOutlined-BR2H7Mxj.js";import{f as LS,W as xo,c as NS,g as Rd,B as Dv,a as FS}from"./dashboard-BYxl5V9e.js";import{S as zS}from"./switch-control-C5i52ixk.js";import{P as Bu,w as il}from"./permission-BH1TY_tz.js";import{d as Ed}from"./Edit-CbR4eoK8.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-C7EPqaHf.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-DcUhenm6.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{C as am}from"./click-to-copy-CFiGx48J.js";import{d as im}from"./ChevronRight-a_2_x6Ew.js";import{d as y1}from"./ChevronLeft-CnQaQ-rc.js";import{d as C1}from"./ArrowDropDown-BrO-zDlb.js";import{f as En}from"./format-error-BrmqJs5a.js";import{A as x1,a as w1,b as S1,d as _v,B as P1,f as T1,c as k1}from"./add-component-core-5x4gTem5.js";import{C as Mo}from"./confirm-SdqBW-ti.js";import{v as D1,b as Ss}from"./util-Btd7aQEC.js";import{L as R1}from"./LockIcon-Cjg8jV1E.js";import{d as Av}from"./Launch-B-2Jomi6.js";import{D as E1}from"./delete-confirm-CKF_eljP.js";import{d as M1}from"./InfoOutlined-DkG0jjos.js";import{I as $1}from"./iframe-DW7zzzTG.js";import{B as O1}from"./bundle-avatar-CDJRatFg.js";import{d as I1}from"./PlayArrow-BToG9L6q.js";import{A as Bv}from"./actions-BjTeIzgS.js";import{I as xc}from"./index-enM9Y412.js";import{W as _1}from"./did-address-DjwPl1uy.js";import{u as A1}from"./vendor-hooks-rDgu5KV9.js";import"./lottie-web-jYmAQWuC.js";import"./useLocalStorage-DVnkpneF.js";import"./get-safe-url-B5RJTMjC.js";import"./session-CHdTc1We.js";import"./use-blocklet-logo-Phq7jasP.js";import"./dot-BA3EvSrh.js";import"./useAsync-DV3NyLhI.js";import"./useSetState-CWq0AVWn.js";import"./use-mobile-DyX6Fl8Z.js";import"./item-D942q-4T.js";import"./Done-DqSE6KPe.js";import"./DeleteOutline-CFN4r-OG.js";import"./launch-result-message-DIYoykBK.js";import"./page-header-xyZktwBS.js";import"./config-space-CogRdhoQ.js";import"./spaces-BVG-t3ND.js";import"./api-BjteVZFg.js";import"./logo-uploader-Cnkdgyfv.js";import"./index-DVQCgvFb.js";import"./index-BuXc3Oag.js";import"./collapse-QV_2gdtM.js";import"./Google-DHEolkW-.js";import"./cloneDeep-UpFQ2VNg.js";import"./index-B8r-LrrM.js";import"./index-Bs1kxR8_.js";import"./use-mobile-Boa_xu9A.js";import"./content-layout-BzF-fNQz.js";import"./connect-to-eNQDY2rc.js";import"./MoreHoriz-B6KdR0Y8.js";var B1=36e5;function j1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*B1)}var L1=864e5;function N1(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)/L1)}var F1=6e4;function z1(e,t){Ye(2,arguments);var n=Xt(t);return Md(e,n*F1)}function W1(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 V1(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(N1(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)}},U1="trunc";function bi(e){return e?lm[e]:lm[U1]}function q1(e,t,n){Ye(2,arguments);var r=sl(e,t)/Rv;return bi(void 0)(r)}function H1(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 G1(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;G1(qe(e))&&a===1&&Fa(e,r)===1&&(s=!1),i=o*(a-Number(s))}return i===0?0:i}function K1(e,t,n){Ye(2,arguments);var r=Lv(e,t)/3;return bi(void 0)(r)}function Y1(e,t,n){Ye(2,arguments);var r=sl(e,t)/1e3;return bi(void 0)(r)}function X1(e,t,n){Ye(2,arguments);var r=jv(e,t)/7;return bi(void 0)(r)}function Q1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Fa(n,r),a=Math.abs(V1(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 Z1(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 J1(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 eP(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 tP(e){Ye(1,arguments);var t=qe(e),n=t.getDay();return n}function nP(e){Ye(1,arguments);var t=qe(e),n=t.getHours();return n}function rP(e){Ye(1,arguments);var t=qe(e),n=t.getMinutes();return n}function oP(e){Ye(1,arguments);var t=qe(e),n=t.getSeconds();return n}function aP(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 iP=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}(),sP=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),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",iP),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 sP(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(n,r,o){return!0}}]),e}(),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",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 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",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),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","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),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",["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),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","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),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",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),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:"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),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),"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),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",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 vP(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 yP=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(vP(o,i,s),s)}}]),n}(at);function CP(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 xP=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(CP(o,i))}}]),n}(at),wP=[31,28,31,30,31,30,31,31,30,31,30,31],SP=[31,29,31,30,31,30,31,31,30,31,30,31],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",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<=SP[c]:a>=1&&a<=wP[c]}},{key:"set",value:function(o,a,i){return o.setUTCDate(i),o.setUTCHours(0,0,0,0),o}}]),n}(at),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","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 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),"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),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",["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),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","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 EP(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 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",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=EP(o,i),o.setUTCHours(0,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",["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),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",["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),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","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",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),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",["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),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",["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),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",["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),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",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),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",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),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",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),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",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),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",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),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",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),qP={G:new cP,y:new uP,Y:new dP,R:new fP,u:new pP,Q:new mP,q:new hP,M:new gP,L:new bP,w:new yP,I:new xP,d:new PP,D:new TP,E:new kP,e:new DP,c:new RP,i:new MP,a:new $P,b:new OP,B:new IP,h:new _P,H:new AP,K:new BP,k:new jP,m:new LP,s:new NP,S:new FP,X:new zP,x:new WP,t:new VP,T:new UP},HP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,GP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,KP=/^'([^]*?)'?$/,YP=/''/g,XP=/\S/,QP=/[a-zA-Z]/;function ZP(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 lP],I=T.match(GP).map(function(H){var K=H[0];if(K in tm){var Q=tm[K];return Q(H,C.formatLong)}return H}).join("").match(HP),_=[],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=qP[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(QP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(K==="''"?K="'":Q==="'"&&(K=JP(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&&XP.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],J1(U,V[1])):q=V}}catch(H){j.e(H)}finally{j.f()}return q}function JP(e){return e.match(KP)[1].replace(YP,"'")}function um(e){Ye(1,arguments);var t=qe(e);return t.setMinutes(0,0,0),t}function eT(e,t){Ye(2,arguments);var n=um(e),r=um(t);return n.getTime()===r.getTime()}function tT(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()===r.getFullYear()}function nT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setDate(r),n}function rT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setHours(r),n}function oT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setMinutes(r),n}function aT(e,t){Ye(2,arguments);var n=qe(e),r=Xt(t);return n.setSeconds(r),n}var _d={},iT=Se;Object.defineProperty(_d,"__esModule",{value:!0});var Uv=_d.default=void 0,sT=iT(Vr()),lT=x;Uv=_d.default=(0,sT.default)((0,lT.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 cT(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 uT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function dT(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 fT(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)`},pT={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(uT(a.keys,s)){const c=dT(r.containerQueries?r:pT,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 mT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function hT(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 gT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const bT={m:"margin",p:"padding"},vT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},fm={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},yT=gT(e=>{if(e.length>2)if(fm[e])e=fm[e];else return[e];const[t,n]=e.split(""),r=bT[t],o=vT[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 CT(e,t){return n=>e.reduce((r,o)=>(r[o]=yi(t,n),r),{})}function xT(e,t,n,r){if(!t.includes(n))return null;const o=yT(n),a=CT(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=>xT(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 wT=Pn("border",mn),ST=Pn("borderTop",mn),PT=Pn("borderRight",mn),TT=Pn("borderBottom",mn),kT=Pn("borderLeft",mn),DT=Pn("borderColor"),RT=Pn("borderTopColor"),ET=Pn("borderRightColor"),MT=Pn("borderBottomColor"),$T=Pn("borderLeftColor"),OT=Pn("outline",mn),IT=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(wT,ST,PT,TT,kT,DT,RT,ET,MT,$T,dl,OT,IT);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 _T=Mt({prop:"gridColumn"}),AT=Mt({prop:"gridRow"}),BT=Mt({prop:"gridAutoFlow"}),jT=Mt({prop:"gridAutoColumns"}),LT=Mt({prop:"gridAutoRows"}),NT=Mt({prop:"gridTemplateColumns"}),FT=Mt({prop:"gridTemplateRows"}),zT=Mt({prop:"gridTemplateAreas"}),WT=Mt({prop:"gridArea"});ul(fl,pl,ml,_T,AT,BT,jT,LT,NT,FT,zT,WT);function mo(e,t){return t==="grey"?t:e}const VT=Mt({prop:"color",themeKey:"palette",transform:mo}),UT=Mt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:mo}),qT=Mt({prop:"backgroundColor",themeKey:"palette",transform:mo});ul(VT,UT,qT);function en(e){return e<=1&&e!==0?`${e*100}%`:e}const HT=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 GT=Mt({prop:"minWidth",transform:en}),KT=Mt({prop:"height",transform:en}),YT=Mt({prop:"maxHeight",transform:en}),XT=Mt({prop:"minHeight",transform:en});Mt({prop:"size",cssProperty:"width",transform:en});Mt({prop:"size",cssProperty:"height",transform:en});const QT=Mt({prop:"boxSizing"});ul(HT,Nd,GT,KT,YT,XT,QT);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 ZT(...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 JT(e,t){return typeof e=="function"?e(t):e}function ek(){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=mT(o.breakpoints),d=Object.keys(l);let u=l;return Object.keys(c).forEach(f=>{const m=JT(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}));ZT(g,m)?u[f]=t({sx:m,theme:o}):u=za(u,g)}else u=za(u,e(f,m,o,a))}),cT(o,hT(d,u))}return Array.isArray(r)?r.map(i):i(r)}return t}const Hr=ek();Hr.filterProps=["sx"];const tk=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}=tk(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 nk=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=nk({key:"css",prepend:!0}));function rk(e){const{injectFirst:t,children:n}=e;return t&&Vu?x.jsx(dv,{value:Vu,children:n}):n}function ok(e){return e==null||Object.keys(e).length===0}function Qv(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(ok(o)?n:o):t;return x.jsx(pv,{styles:r})}/**
|
|
3
3
|
* @mui/styled-engine v6.1.0
|
|
4
4
|
*
|
|
@@ -685,7 +685,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
685
685
|
&.Mui-disabled {
|
|
686
686
|
opacity: 0.5;
|
|
687
687
|
}
|
|
688
|
-
`;function _p({sourceInfo:e,blocklet:t}){var o;const{t:n}=S.useContext(Tr);let{source:r}=e;return r==="registry"&&(r="Blocklet Store"),x.jsxs(Re,{display:"flex",alignItems:"center",children:[x.jsx($S,{type:"success",children:vS(r)},"source"),e.source==="registry"&&x.jsx(ol,{href:Cs(e.deployedFrom,"blocklets",((o=t==null?void 0:t.meta)==null?void 0:o.bundleDid)||""),target:"_blank",className:"page-link",underline:"hover",style:{display:"flex",alignItems:"center",marginLeft:8},children:n("blocklet.overview.viewInStore")})]})}_p.propTypes={sourceInfo:oe.shape({source:oe.string,deployedFrom:oe.string}),blocklet:oe.object};_p.defaultProps={sourceInfo:{},blocklet:{}};var Ap={},UH=Se;Object.defineProperty(Ap,"__esModule",{value:!0});var Nw=Ap.default=void 0,qH=UH(Vr()),HH=x;Nw=Ap.default=(0,qH.default)((0,HH.jsx)("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward");function hc({blocklet:e,checkUpgrade:t,hasPermission:n,...r}){const{api:o}=Qt(),{t:a}=S.useContext(Tr),[i,s]=S.useState(!1),[c,l]=S.useState(""),[d,u]=S.useState(null),[f,m]=S.useState(null);S.useEffect(()=>{u(null),t&&(e.mode,Qn.BLOCKLET_MODES.DEVELOPMENT)},[e,t]);const g=()=>{s(!1),m(null)},h=async()=>{s(!0);try{const v={did:e.meta.did,version:d.version,storeUrl:d.registryUrl||""};await Ia(2e3),await o.upgradeBlocklet({input:v})}catch(v){ot.error(`Blocklet upgrade failed: ${En(v)}`)}finally{s(!1),m(null)}},w={title:`${a("common.upgrade")} ${a("common.blocklet")} ${dt.getDisplayName(e)}`,description:a("blocklet.action.upgradeDescription"),confirm:a("blocklet.action.confirmUpgrade"),cancel:a("common.cancel"),onConfirm:h,onCancel:g};return n&&d&&!dt.isInProgress(e.status)?x.jsxs(x.Fragment,{children:[x.jsx(xo,{...r,children:e.meta.version}),x.jsx(Vn,{title:a("common.updateAvailable",{version:d.version}),children:x.jsx(an,{size:"small",style:{marginLeft:8},disabled:i,onClick:()=>m(w),children:i?x.jsx(Fr,{size:16}):x.jsx(Nw,{style:{fontSize:16,color:"red"}})})}),!!c&&x.jsx(ot,{variant:"error",message:c,onClose:()=>l("")}),f&&x.jsx(Mo,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})]}):x.jsx(xo,{...r,children:e.meta.version})}hc.propTypes={blocklet:oe.object.isRequired,checkUpgrade:oe.bool,hasPermission:oe.bool};hc.defaultProps={checkUpgrade:!1,hasPermission:!1};const GH=il(hc,"mutate_blocklets"),KH=il(hc,"",Qa);function YH(e){const{inService:t}=Qt();return t?x.jsx(KH,{...e}):x.jsx(GH,{...e})}const XH=e=>{var t;return!((t=e==null?void 0:e.meta)!=null&&t.group)},QH=(e,t)=>e?[{name:t("common.name"),value:e.displayName},{name:t("common.description"),value:e.description},{name:t("common.version"),value:x.jsx(xo,{children:e.version})}]:[],ZH=e=>{const{source:t,deployedFrom:n,bundleSource:r}=e;if(t)return{source:t,deployedFrom:n};if(!r)return{source:"upload",deployedFrom:n};if(r.url){const o=n||Array.isArray(r.url)?r.url[0]:r.url;return{source:"url",deployedFrom:o,link:o}}if(r.store){const o=n||Array.isArray(r.store)?r.store[0]:r.store;return{source:"registry",deployedFrom:o,link:o}}return{}},JH=(e,t)=>{const n=e.split("/").slice(1);let r=t,o=0;const a=[];for(;r&&o<n.length;){const i=r.children.find(s=>s.meta.did===n[o]);r=i,o++,i&&a.push(i.meta.title)}return a.join(" / ")};function Bp({blocklet:e,depth:t,componentInfo:n,app:r,onClose:o}){var m,g;const{t:a,locale:i}=S.useContext(Tr),{deletingBlocklets:s}=Rd();let{status:c}=e;t===1&&s.includes(e.meta.did)&&(c="deleting");const l=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),d=h=>h.map(w=>w.name===a("common.did")||w.name===a("blocklet.appId")?x.jsx(xc,{valueComponent:"div",nameWidth:120,name:w.name,nameFormatter:()=>w.name,children:w.value},w.name):x.jsx(xc,{valueComponent:"div",nameWidth:120,name:w.name,children:w.link?x.jsx(ol,{href:w.link,target:"_blank",className:"page-link",underline:"hover",children:w.value}):w.value},w.name)),u=n?ZH(n):{},f=n?[{name:a("common.name"),value:dt.getDisplayName(n,!0)},{name:a("common.version"),value:x.jsx(YH,{blocklet:n,checkUpgrade:!1})},{name:a("common.status"),value:x.jsx(Dv,{isResource:XH(e),status:c,source:n.source,progress:e.progress})},e.status==="running"?{name:a("blocklet.startedAt"),value:gc
|
|
688
|
+
`;function _p({sourceInfo:e,blocklet:t}){var o;const{t:n}=S.useContext(Tr);let{source:r}=e;return r==="registry"&&(r="Blocklet Store"),x.jsxs(Re,{display:"flex",alignItems:"center",children:[x.jsx($S,{type:"success",children:vS(r)},"source"),e.source==="registry"&&x.jsx(ol,{href:Cs(e.deployedFrom,"blocklets",((o=t==null?void 0:t.meta)==null?void 0:o.bundleDid)||""),target:"_blank",className:"page-link",underline:"hover",style:{display:"flex",alignItems:"center",marginLeft:8},children:n("blocklet.overview.viewInStore")})]})}_p.propTypes={sourceInfo:oe.shape({source:oe.string,deployedFrom:oe.string}),blocklet:oe.object};_p.defaultProps={sourceInfo:{},blocklet:{}};var Ap={},UH=Se;Object.defineProperty(Ap,"__esModule",{value:!0});var Nw=Ap.default=void 0,qH=UH(Vr()),HH=x;Nw=Ap.default=(0,qH.default)((0,HH.jsx)("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"}),"ArrowUpward");function hc({blocklet:e,checkUpgrade:t,hasPermission:n,...r}){const{api:o}=Qt(),{t:a}=S.useContext(Tr),[i,s]=S.useState(!1),[c,l]=S.useState(""),[d,u]=S.useState(null),[f,m]=S.useState(null);S.useEffect(()=>{u(null),t&&(e.mode,Qn.BLOCKLET_MODES.DEVELOPMENT)},[e,t]);const g=()=>{s(!1),m(null)},h=async()=>{s(!0);try{const v={did:e.meta.did,version:d.version,storeUrl:d.registryUrl||""};await Ia(2e3),await o.upgradeBlocklet({input:v})}catch(v){ot.error(`Blocklet upgrade failed: ${En(v)}`)}finally{s(!1),m(null)}},w={title:`${a("common.upgrade")} ${a("common.blocklet")} ${dt.getDisplayName(e)}`,description:a("blocklet.action.upgradeDescription"),confirm:a("blocklet.action.confirmUpgrade"),cancel:a("common.cancel"),onConfirm:h,onCancel:g};return n&&d&&!dt.isInProgress(e.status)?x.jsxs(x.Fragment,{children:[x.jsx(xo,{...r,children:e.meta.version}),x.jsx(Vn,{title:a("common.updateAvailable",{version:d.version}),children:x.jsx(an,{size:"small",style:{marginLeft:8},disabled:i,onClick:()=>m(w),children:i?x.jsx(Fr,{size:16}):x.jsx(Nw,{style:{fontSize:16,color:"red"}})})}),!!c&&x.jsx(ot,{variant:"error",message:c,onClose:()=>l("")}),f&&x.jsx(Mo,{title:f.title,description:f.description,confirm:f.confirm,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})]}):x.jsx(xo,{...r,children:e.meta.version})}hc.propTypes={blocklet:oe.object.isRequired,checkUpgrade:oe.bool,hasPermission:oe.bool};hc.defaultProps={checkUpgrade:!1,hasPermission:!1};const GH=il(hc,"mutate_blocklets"),KH=il(hc,"",Qa);function YH(e){const{inService:t}=Qt();return t?x.jsx(KH,{...e}):x.jsx(GH,{...e})}const XH=e=>{var t;return!((t=e==null?void 0:e.meta)!=null&&t.group)},QH=(e,t)=>e?[{name:t("common.name"),value:e.displayName},{name:t("common.description"),value:e.description},{name:t("common.version"),value:x.jsx(xo,{children:e.version})}]:[],ZH=e=>{const{source:t,deployedFrom:n,bundleSource:r}=e;if(t)return{source:t,deployedFrom:n};if(!r)return{source:"upload",deployedFrom:n};if(r.url){const o=n||Array.isArray(r.url)?r.url[0]:r.url;return{source:"url",deployedFrom:o,link:o}}if(r.store){const o=n||Array.isArray(r.store)?r.store[0]:r.store;return{source:"registry",deployedFrom:o,link:o}}return{}},JH=(e,t)=>{const n=e.split("/").slice(1);let r=t,o=0;const a=[];for(;r&&o<n.length;){const i=r.children.find(s=>s.meta.did===n[o]);r=i,o++,i&&a.push(i.meta.title)}return a.join(" / ")};function Bp({blocklet:e,depth:t,componentInfo:n,app:r,onClose:o}){var m,g;const{t:a,locale:i}=S.useContext(Tr),{deletingBlocklets:s}=Rd();let{status:c}=e;t===1&&s.includes(e.meta.did)&&(c="deleting");const l=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),d=h=>h.map(w=>w.name===a("common.did")||w.name===a("blocklet.appId")?x.jsx(xc,{valueComponent:"div",nameWidth:120,name:w.name,nameFormatter:()=>w.name,children:w.value},w.name):x.jsx(xc,{valueComponent:"div",nameWidth:120,name:w.name,children:w.link?x.jsx(ol,{href:w.link,target:"_blank",className:"page-link",underline:"hover",children:w.value}):w.value},w.name)),u=n?ZH(n):{},f=n?[{name:a("common.name"),value:dt.getDisplayName(n,!0)},{name:a("common.version"),value:x.jsx(YH,{blocklet:n,checkUpgrade:!1})},{name:a("common.status"),value:x.jsx(Dv,{isResource:XH(e),status:c,source:n.source,progress:e.progress})},e.status==="running"?{name:a("blocklet.startedAt"),value:e.startedAt?x.jsx(gc,{value:e.startedAt,type:"all",locale:i}):"-"}:null,e.status!=="running"?{name:a("blocklet.stoppedAt"),value:e.stoppedAt?x.jsx(gc,{value:e.stoppedAt,type:"all",locale:i}):"-"}:null,e.installedAt?{name:a("blocklet.installedAt"),value:e.installedAt?x.jsx(gc,{value:e.installedAt,type:"all",locale:i}):"-"}:null,dt.hasStartEngine(e.meta)?{name:a("common.mountPoint"),value:l}:null,n.meta.group?{name:a("common.group"),value:x.jsx(xo,{type:"success",children:n.meta.group})}:null,{name:a("blocklet.overview.source"),value:x.jsx(_p,{sourceInfo:u,blocklet:e})},{name:a("blocklet.overview.deployedFrom"),value:u.deployedFrom||"-",link:u.link??""},{name:a("common.did"),value:x.jsx(_1,{did:n.meta.did,showQrcode:!0})},{name:a("common.author"),value:n.meta.owner?x.jsx(P1,{owner:n.meta.owner,locale:i}):T1.formatPerson(n.meta.author)},{name:a("common.engine"),value:QH(n.engine,a).map(({name:h,value:w})=>x.jsx(xc,{style:{marginBottom:4},nameWidth:120,name:h,children:w},h))},(m=e.dependents)!=null&&m.length?{name:a("common.dependents"),value:x.jsx(Re,{children:e.dependents.map(h=>x.jsx(Re,{children:`${JH(h.id,r)} ${h.required?`(${a("common.required")})`:""}`},h.id))})}:null,(g=e.meta.resources)!=null&&g.length?{name:a("common.resource"),value:e.meta.resources.join(", ")}:null].filter(Boolean):[];return n?x.jsx(al,{open:!0,title:a("common.componentBasicInfo"),showCloseButton:!0,fullWidth:!0,maxWidth:"md",onClose:()=>{o(null)},children:x.jsx(Re,{paddingBottom:1.5,children:d(f)},"dialog-wrapper")},"base-info-dialog"):null}Bp.propTypes={blocklet:oe.object.isRequired,depth:oe.number,app:oe.object,componentInfo:oe.object,onClose:oe.func.isRequired};Bp.defaultProps={depth:0,app:null,componentInfo:null};Nt(yv)`
|
|
689
689
|
.BaseBadge-badge {
|
|
690
690
|
top: ${e=>e.top*8||6}px;
|
|
691
691
|
right: ${e=>e.right*8||6}px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a9 as t,j as c}from"./vendor-mui-core-
|
|
1
|
+
import{a9 as t,j as c}from"./vendor-mui-core-D_bnq77o.js";import{r as a,j as e}from"./vendor-ux-did-connect-DHrruicZ.js";var r={},_=t;Object.defineProperty(r,"__esModule",{value:!0});var l=r.default=void 0,f=_(a()),h=c;l=r.default=(0,f.default)((0,h.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");var n={},p=t;Object.defineProperty(n,"__esModule",{value:!0});var u=n.default=void 0,m=p(a()),s=c;u=n.default=(0,m.default)([(0,s.jsx)("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),(0,s.jsx)("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")],"LockPerson");var i={},C=t;Object.defineProperty(i,"__esModule",{value:!0});var v=i.default=void 0,A=C(a()),O=c;v=i.default=(0,A.default)((0,O.jsx)("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"}),"ContactMail");var o={},S=t;Object.defineProperty(o,"__esModule",{value:!0});var d=o.default=void 0,j=S(a()),z=c;d=o.default=(0,j.default)((0,z.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}),"Public");const $=[{value:e.WHO_CAN_ACCESS.ALL,icon:d,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:e.WHO_CAN_ACCESS.INVITED,icon:v,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:e.WHO_CAN_ACCESS.ADMIN,icon:u,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:e.WHO_CAN_ACCESS.OWNER,icon:l,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];export{$ as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,ah as F,H as p}from"./vendor-mui-core-
|
|
1
|
+
import{j as r,ah as F,H as p}from"./vendor-mui-core-D_bnq77o.js";import{r as u}from"./vendor-react-DEoibe3W.js";import{A as G,a0 as q,am as H,J as M}from"./vendor-utils-rHXShPKm.js";import{u as z,j as D,_ as V}from"./vendor-ux-did-connect-DHrruicZ.js";import{S as Y}from"./index-BuXc3Oag.js";import{P as $}from"./page-header-xyZktwBS.js";import{n as Q,H as W,f as A}from"./index-CIkPfxzG.js";import{c as a}from"./vendor-arcblock-uz9DVywv.js";import{S as X}from"./layout-BcLfVSqs.js";import{S as J}from"./step-actions-BfGTFkaB.js";import{S as Z}from"./button-D8hoY4xw.js";import"./vendor-hooks-rDgu5KV9.js";import"./lottie-web-jYmAQWuC.js";import"./Done-DqSE6KPe.js";import"./collapse-QV_2gdtM.js";import"./Google-DHEolkW-.js";import"./cloneDeep-UpFQ2VNg.js";import"./logo-uploader-Cnkdgyfv.js";import"./index-DVQCgvFb.js";import"./content-layout-BzF-fNQz.js";import"./use-mobile-DyX6Fl8Z.js";function x({children:C,bottom:T,onBottomFix:m}){const i=u.useRef(null),l=u.useRef(null),h=u.useRef(null),c=u.useRef(null),[L,E]=u.useState(!1);return u.useEffect(()=>{let t;const d=()=>{t||(t=setTimeout(()=>{l.current&&(l.current.scrollHeight>i.current.clientHeight-h.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(d):window.addEventListener("resize",d),f.observe(i.current),f.observe(l.current),()=>{f?f.disconnect():window.removeEventListener("resize",d),t&&clearTimeout(t)}},[m]),r.jsxs(ee,{ref:i,className:`${L?"scroll-mode":""}`,children:[r.jsx("div",{className:"compact-context",ref:l,children:C}),r.jsx("div",{className:"fix-container",ref:h,children:T})]})}const ee=F.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -29,4 +29,4 @@ import{j as r,ah as F,H as p}from"./vendor-mui-core-UZpb7wT7.js";import{r as u}f
|
|
|
29
29
|
opacity: 1;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`;x.propTypes={children:p.any,bottom:p.element.isRequired,onBottomFix:p.func};x.defaultProps={children:[],onBottomFix:()=>{}};function S({onNext:C,onPrevious:T,buttonText:m}){var P;const{t:i}=z(),[l,h]=u.useState(!1),[c,L]=u.useState(null),{did:E,blocklet:t,actions:d}=
|
|
32
|
+
`;x.propTypes={children:p.any,bottom:p.element.isRequired,onBottomFix:p.func};x.defaultProps={children:[],onBottomFix:()=>{}};function S({onNext:C,onPrevious:T,buttonText:m}){var P;const{t:i}=z(),[l,h]=u.useState(!1),[c,L]=u.useState(null),{did:E,blocklet:t,actions:d}=Q(),{prefix:f,getSessionInHeader:R}=W();let O=(t.configs||[]).filter(e=>!a.BLOCKLET_CONFIGURABLE_KEY[e.key]);const v=t.environments.find(e=>e.key==="BLOCKLET_PASSPORT_COLOR"),N=G(D.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?v=${t==null?void 0:t.updatedAt}`),K=[{key:a.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE,description:i("blocklet.config.logoSquare"),value:(P=t.environments.find(e=>e.key==="BLOCKLET_APP_LOGO_SQUARE"))==null?void 0:P.value,componentType:"uploader",skipButtonDisabled:!0,solo:!0,componentProps:{url:N,height:120,width:120,type:"square",did:E,prefix:f,headers:R,onUploaded:d.refreshBlocklet}},{key:a.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:i("blocklet.config.name"),value:t.environments.find(e=>e.key==="BLOCKLET_APP_NAME").value},{key:a.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:i("blocklet.config.description"),value:t.environments.find(e=>e.key==="BLOCKLET_APP_DESCRIPTION").value},{key:a.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,description:i("blocklet.config.passportColor"),value:v?v.value:"auto",hidden:!0,componentType:"passport",componentProps:{blocklet:t}}],k=[];A.forEachChildSync(t,(e,{ancestors:o})=>{const n=o.slice(1).map(s=>s.meta.did);k.push((e.configs||[]).map(s=>({...s,childDid:n.concat(e.meta.did)})))}),t.meta.group===a.BlockletGroup.gateway&&(O=O.filter(e=>!e.secure&&e.shared));const b=q(H([...O,...k]),"key").filter(e=>!!e.key).sort((e,o)=>e.required&&!o.required?-1:o.required&&!e.required?1:0),j=A.getAppMissingConfigs(t).length,w=async e=>{const{childDid:o,...n}=c,s=[{...M(n,["key","value","description"]),value:e}];try{h(!0),await d.configBlocklet({configs:s,childDid:o})}catch(g){V.error(g.message)}finally{h(!1)}},B={},I=[...K,...b].reduce((e,o)=>{const{value:n,...s}=o;B[o.key]=n;const g=n?n.match(a.BLOCKLET_AUTOMATIC_ENV_VALUE_REGEX):null;if(g!==null||n===a.BLOCKLET_AUTOMATIC_ENV_VALUE){let y=e.find(_=>_.componentType==="collapse");return y||(y={key:"BLOCKLET_CONFIG_COLLAPSE",description:i("blocklet.config.advanced"),componentType:"collapse",children:[]}),g!==null&&(s.hidden=!0),y.children.push({...s}),[...e.filter(_=>_.componentType!=="collapse"),y]}return e.push({...s}),e},[]).map(e=>{if(e.componentType==="collapse"){const o=e.children.every(n=>n.hidden===!0);return{...e,hidden:o}}return e}),U=()=>{T()};return r.jsxs(X,{children:[r.jsx("div",{className:"header",style:{marginBottom:16},children:r.jsx($,{title:i("setup.config.title"),subTitle:i("setup.config.subTitle"),onClickBack:U})}),r.jsx("div",{className:"container-main",children:r.jsx("div",{className:"container-inner",children:r.jsx(x,{bottom:r.jsx(J,{mt:8,disabled:l||c,blocklet:t,onStartNow:()=>C("complete"),children:r.jsx(Z,{variant:"contained",disabled:l||j||c,onClick:()=>{d.refreshFuel({showError:!1}),C()},children:m||i("setup.next")})}),children:r.jsx(Y,{style:{margin:"0 auto 20px"},loading:l,schema:I,defaultValue:B,onChange:(e,{action:o,currentItem:n})=>{o==="edit"?L(n):["cancel","confirm"].includes(o)&&L(null),o==="confirm"&&w(e[n.key])}})})})})]})}S.propTypes={buttonText:p.string,onNext:p.func,onPrevious:p.func};S.defaultProps={buttonText:"",onNext:()=>{},onPrevious:()=>{}};export{S as default};
|