@abtnode/blocklet-services 1.16.33-beta-20241028-164124-17cf3c21 → 1.16.33-beta-20241029-014847-2937778a
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/libs/connect/session.js +5 -3
- package/api/util/attach-shared-utils.js +20 -19
- package/api/util/index.js +2 -2
- package/dist/assets/{Add-DhnwVxhZ.js → Add-DEc5Gaew.js} +1 -1
- package/dist/assets/{Alert-C2mTW_RW.js → Alert-CupQqU2h.js} +1 -1
- package/dist/assets/{ArrowDropDown-wj9U9ZE8.js → ArrowDropDown-B1k8ApwT.js} +1 -1
- package/dist/assets/{Autocomplete-CmEAN8J-.js → Autocomplete-CjmKwyN3.js} +1 -1
- package/dist/assets/{Avatar-BZ_OPd3a.js → Avatar-DdU9cWoa.js} +1 -1
- package/dist/assets/{ButtonGroup-CFQqy_jV.js → ButtonGroup-DU8AIwgk.js} +1 -1
- package/dist/assets/{CSSTransition-CJDdpnYB.js → CSSTransition-DxkOmgMD.js} +1 -1
- package/dist/assets/{CheckCircle-DK6y1v0b.js → CheckCircle-BbFAKZQz.js} +1 -1
- package/dist/assets/{ChevronLeft-BqHB6tsg.js → ChevronLeft-ZH0Y8QQ5.js} +1 -1
- package/dist/assets/{ChevronRight-DwKqpeOS.js → ChevronRight-CBiHXwpN.js} +1 -1
- package/dist/assets/{Close-CdDd2weK.js → Close-D01F1-kH.js} +1 -1
- package/dist/assets/{CloseOutlined-KF-hdrv3.js → CloseOutlined-C_enpVct.js} +1 -1
- package/dist/assets/{Delete-P7WqUbyQ.js → Delete-CghY174I.js} +1 -1
- package/dist/assets/{DeleteOutline-BrrioL98.js → DeleteOutline-DTzpYuUU.js} +1 -1
- package/dist/assets/{DialogContentText-BECZzyeS.js → DialogContentText-KJ1VziGc.js} +1 -1
- package/dist/assets/{Done-B8u3JQ36.js → Done-CRBMAgWC.js} +1 -1
- package/dist/assets/{Download-DBU6UuKg.js → Download-0mTt88jR.js} +1 -1
- package/dist/assets/{EditIcon-BV3Q9c3s.js → EditIcon-BzYFGdY2.js} +1 -1
- package/dist/assets/{Error-CjCi6iqE.js → Error-D_y85can.js} +1 -1
- package/dist/assets/{ExpandMore-BjFaf3Fo.js → ExpandMore-BW_GpjfP.js} +1 -1
- package/dist/assets/{FormControl-B9P20sHZ.js → FormControl-y2eP2gzP.js} +1 -1
- package/dist/assets/{FormControlLabel-C2tfmf09.js → FormControlLabel-DsxW3p6G.js} +1 -1
- package/dist/assets/{FormGroup-QeEOGRIO.js → FormGroup-COgg0lwB.js} +1 -1
- package/dist/assets/{Google-B7LRQAsM.js → Google-CiCa62KH.js} +1 -1
- package/dist/assets/{Grid-BArO7d1G.js → Grid-Dne3bmfg.js} +1 -1
- package/dist/assets/{HelpOutline-It0-5Kn2.js → HelpOutline-X7u3GlNb.js} +1 -1
- package/dist/assets/{Hidden-CpExY3Hv.js → Hidden-BnLj1Yrh.js} +1 -1
- package/dist/assets/{InfoOutlined-DEMaFK-w.js → InfoOutlined-DKyb4neb.js} +1 -1
- package/dist/assets/{InputAdornment-BFyVcV9g.js → InputAdornment-vYojJBmt.js} +1 -1
- package/dist/assets/{InputLabel-FW_WnrBG.js → InputLabel-DlIX2kte.js} +1 -1
- package/dist/assets/{LastPage-BbNDF-1B.js → LastPage-BAT94flJ.js} +1 -1
- package/dist/assets/{Launch-CM54bxPy.js → Launch-BMtVhnlU.js} +1 -1
- package/dist/assets/{LaunchOutlined-DQOUx0IB.js → LaunchOutlined-JsW3bksQ.js} +1 -1
- package/dist/assets/{Link-BLv1ybKR.js → Link-BSkaanak.js} +1 -1
- package/dist/assets/{ListItemButton-BhIitXNK.js → ListItemButton-D3vwOyXA.js} +1 -1
- package/dist/assets/{LoadingButton-Do8QGr9D.js → LoadingButton-BG7mJBjy.js} +1 -1
- package/dist/assets/{LockIcon-uGDnriV5.js → LockIcon-CnRKDzuV.js} +1 -1
- package/dist/assets/{Loop-DQX1T4wF.js → Loop-C7A5hRBw.js} +1 -1
- package/dist/assets/{MarkEmailRead-BdVitMKq.js → MarkEmailRead-DXHnM-5J.js} +1 -1
- package/dist/assets/{Menu-B60nijwd.js → Menu-DAx78rf8.js} +1 -1
- package/dist/assets/{MoreHoriz-Cwgb_ZWA.js → MoreHoriz-Cix-ucsf.js} +1 -1
- package/dist/assets/{MoreVert-6z9sYyBh.js → MoreVert-pbCfz7_a.js} +1 -1
- package/dist/assets/{OpenInNew-B7MVFrbE.js → OpenInNew-DH9cfgTx.js} +1 -1
- package/dist/assets/{Pagination-C8kC-7d4.js → Pagination-ByraHmfi.js} +1 -1
- package/dist/assets/{PlayArrow-CyW2vtN8.js → PlayArrow-DUPHdx2w.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-Dkgs-LrD.js → QuestionMarkCircle-Nkpa63G6.js} +1 -1
- package/dist/assets/{RadioGroup-F9HJgTgP.js → RadioGroup-BFz6MuWT.js} +1 -1
- package/dist/assets/{Search-Bm4BV5ff.js → Search-RYv9IOCL.js} +1 -1
- package/dist/assets/{Select-DN5ZDrhq.js → Select-BJHtvl4z.js} +1 -1
- package/dist/assets/{ServerLogo-qj6BKZhH.js → ServerLogo-iBlSxiwt.js} +1 -1
- package/dist/assets/{Skeleton-BHxGQUwb.js → Skeleton-CCHHqylE.js} +1 -1
- package/dist/assets/{Slider-DZmSOFez.js → Slider-2IJG90i0.js} +1 -1
- package/dist/assets/{Stack-CcM0sATd.js → Stack-CzT1qtfF.js} +1 -1
- package/dist/assets/{Stepper-VAkPR7Rp.js → Stepper-DIDg14Y1.js} +1 -1
- package/dist/assets/{TextField-CVbbJh-y.js → TextField-DNDZQTge.js} +1 -1
- package/dist/assets/{Toolbar-DMWwm961.js → Toolbar-Czbh9Thi.js} +1 -1
- package/dist/assets/{Verified-CracX5_0.js → Verified-Bojb7V8h.js} +1 -1
- package/dist/assets/{ViewColumn-cHwmzgaQ.js → ViewColumn-adtX8zvr.js} +1 -1
- package/dist/assets/{ViewList-DEr3Y-iU.js → ViewList-nMxoCPSk.js} +1 -1
- package/dist/assets/{access-control-DEaRRq7A.js → access-control-DHNiwY6V.js} +1 -1
- package/dist/assets/{actions-BaCBwrwa.js → actions-DqT9_Wum.js} +1 -1
- package/dist/assets/{add-component-core-CTd25DO_.js → add-component-core-BubwveVU.js} +1 -1
- package/dist/assets/add-resource-Dm1L3xLV.js +1 -0
- package/dist/assets/{addon-B5M4Vtbg.js → addon-WHI8TbVR.js} +1 -1
- package/dist/assets/{analytics-DKUh0ZA1.js → analytics-Ce6JyEG_.js} +1 -1
- package/dist/assets/api-DLSmmaM3.js +1 -0
- package/dist/assets/{audit-logs-DEv30kSD.js → audit-logs-Dkx-0Fff.js} +1 -1
- package/dist/assets/{base32-BbBkrI_s.js → base32-DAaLo59X.js} +1 -1
- package/dist/assets/{bundle-avatar-DFcMZdHK.js → bundle-avatar-Dx1RwhB-.js} +1 -1
- package/dist/assets/{button-WHxIb92N.js → button-CHEw8JKq.js} +1 -1
- package/dist/assets/{click-to-copy-DSLKklSI.js → click-to-copy-CerMtW1G.js} +1 -1
- package/dist/assets/{complete-CAaHcOBS.js → complete-wWH5b1EO.js} +1 -1
- package/dist/assets/{component-_5q7tWN6.js → component-OeCmXcvV.js} +1 -1
- package/dist/assets/{config-COlGV3BW.js → config-CzogNM6s.js} +1 -1
- package/dist/assets/{config-_6fNEXak.js → config-DsPwqf9s.js} +1 -1
- package/dist/assets/{config-navigation-DdfU54Ga.js → config-navigation-CqoSpRZ8.js} +1 -1
- package/dist/assets/{confirm-CPhW4Ln4.js → confirm-CDYYkoPB.js} +1 -1
- package/dist/assets/{connect-CJYVrjZW.js → connect-BAaQDJdT.js} +1 -1
- package/dist/assets/{connect-CutE2j6W.js → connect-CoYghE61.js} +1 -1
- package/dist/assets/{connect-to-ByrmSC7Q.js → connect-to-DV1E9V_T.js} +1 -1
- package/dist/assets/{content-layout-NMxrW85n.js → content-layout-CZivV9iw.js} +1 -1
- package/dist/assets/{dashboard-yyANkyH0.js → dashboard-CMafJ63y.js} +3 -3
- package/dist/assets/{deprecate-TLU2j5Nl.js → deprecate-BG-RqYhQ.js} +1 -1
- package/dist/assets/{did-address-qp4O986k.js → did-address-DvBIH5D8.js} +1 -1
- package/dist/assets/{domain-BobgkNRn.js → domain-DPG1LqVo.js} +1 -1
- package/dist/assets/{domain-list-nelUcVaZ.js → domain-list-UwQfY0bQ.js} +1 -1
- package/dist/assets/{email-BmqNkTVh.js → email-D7QdjnnK.js} +3 -3
- package/dist/assets/emotion-cache.browser.esm-BjIoAnXy.js +1 -0
- package/dist/assets/{exchange-passport-YyjxxQGp.js → exchange-passport-DCHiwggG.js} +1 -1
- package/dist/assets/{fallback-DpZp1UKo.js → fallback-C9ko-lGM.js} +1 -1
- package/dist/assets/{form-text-input-Dnp-THZ5.js → form-text-input-BBMy63E9.js} +1 -1
- package/dist/assets/{format-error-BvNwPRch.js → format-error-B-leFeoI.js} +1 -1
- package/dist/assets/{fuel-DwAfHv3P.js → fuel-B8iWjDIC.js} +1 -1
- package/dist/assets/{fullpage-BFccehDH.js → fullpage-CV1kAnQT.js} +1 -1
- package/dist/assets/{home-BF01oQMN.js → home-CtjCpn32.js} +1 -1
- package/dist/assets/{iframe-CGjP6x7t.js → iframe-CNDgJKfZ.js} +1 -1
- package/dist/assets/{index-C6bJ8C3n.js → index-B2w_BGLq.js} +1 -1
- package/dist/assets/{index-BFsNvHHz.js → index-BB2DzNFr.js} +1 -1
- package/dist/assets/{index-BxX33nUX.js → index-BES9wlXn.js} +1 -1
- package/dist/assets/{index-BHRFloRH.js → index-BEaq4bck.js} +1 -1
- package/dist/assets/{index-DaRP45oo.js → index-BJ0k59Tf.js} +1 -1
- package/dist/assets/{index-B6rU6yZ1.js → index-BSHqUvvB.js} +1 -1
- package/dist/assets/{index-0R3zcGhj.js → index-BWRuELFp.js} +1 -1
- package/dist/assets/{index-Br6smtqw.js → index-BWW9wQ5i.js} +1 -1
- package/dist/assets/{index-DaCSO68v.js → index-BkOrkopm.js} +1 -1
- package/dist/assets/{index-DbC1wngE.js → index-C-yt1SFf.js} +1 -1
- package/dist/assets/{index-BZKKn0ch.js → index-CIO5rH3U.js} +1 -1
- package/dist/assets/{index-BEmU10Y0.js → index-CRupT51d.js} +4 -4
- package/dist/assets/{index-DH4lKXWs.js → index-CbJ7Ycw4.js} +1 -1
- package/dist/assets/{index-DsX4E8f1.js → index-Cdj39Rch.js} +1 -1
- package/dist/assets/{index-B1jXhAXk.js → index-Ch6BfLs4.js} +1 -1
- package/dist/assets/{index-4YjFb1t8.js → index-Cj2lRUvU.js} +1 -1
- package/dist/assets/{index-BowU-Rc8.js → index-D0ZDnsBw.js} +3 -3
- package/dist/assets/{index-DusV8FU1.js → index-D0vpGtYa.js} +1 -1
- package/dist/assets/{index-CxykcKWh.js → index-D2bv65kG.js} +1 -1
- package/dist/assets/{index-BZ9M67Kd.js → index-D9IhBRcZ.js} +1 -1
- package/dist/assets/{index-BnLNgi5J.js → index-DMhVY_t6.js} +1 -1
- package/dist/assets/{index-D5jbzTmg.js → index-DO83-4pr.js} +1 -1
- package/dist/assets/{index-BAsIkYmI.js → index-DQGd2MHm.js} +1 -1
- package/dist/assets/{index-LmZHdjQZ.js → index-DUvxK_pJ.js} +1 -1
- package/dist/assets/{index-Dnw0yymR.js → index-DZZkPDZs.js} +1 -1
- package/dist/assets/{index-RHJlosGb.js → index-DqdPWHh8.js} +3 -3
- package/dist/assets/{index-_uCAkv_0.js → index-DrGG84yQ.js} +1 -1
- package/dist/assets/{index-C_izWh42.js → index-Du1PLYcj.js} +1 -1
- package/dist/assets/{index-FWU8WNJ8.js → index-HSjmxikb.js} +1 -1
- package/dist/assets/{index-DtHgjXc_.js → index-HsQ3WMC6.js} +1 -1
- package/dist/assets/{index-B61Zk4zc.js → index-YhmyCsjd.js} +1 -1
- package/dist/assets/{index-C4-tvqA6.js → index-YwELWQn6.js} +1 -1
- package/dist/assets/{index-dmc3Tzez.js → index-l7ITn0fy.js} +1 -1
- package/dist/assets/{index-CDo-yvx8.js → index-ximM9jK2.js} +1 -1
- package/dist/assets/{index-D0Foc0Tz.js → index-yjZBmDn6.js} +1 -1
- package/dist/assets/{index.es-DjXtuSXa.js → index.es-LIQBW5LL.js} +1 -1
- package/dist/assets/{invitation-CitdNTlE.js → invitation-BQ9lcSxO.js} +1 -1
- package/dist/assets/{invite-8bX-82iQ.js → invite-QLtor_es.js} +1 -1
- package/dist/assets/{isEmail-DlDmj0fr.js → isEmail-CcvzeVrs.js} +1 -1
- package/dist/assets/{issue-passport-DlN6RZob.js → issue-passport-BkxmOMBs.js} +1 -1
- package/dist/assets/{item-CKNXAp6H.js → item-BAa88ldN.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-DoSjjNR1.js → jss-plugin-props-sort.esm-K8zlWBTt.js} +1 -1
- package/dist/assets/{launch-result-message-JFKmiVbN.js → launch-result-message-BNRTOFqk.js} +1 -1
- package/dist/assets/{layout-DEXenHhy.js → layout-BQshf_Yf.js} +1 -1
- package/dist/assets/{list-header-7vVYIW_T.js → list-header-C4fW2U4a.js} +1 -1
- package/dist/assets/localization-F2jCf7Q_.js +1 -0
- package/dist/assets/{log-ZCJiZb-D.js → log-9eHXCnTv.js} +1 -1
- package/dist/assets/{login-64rLho-5.js → login-DJz-LtJC.js} +1 -1
- package/dist/assets/{login-oauth-callback-nOgNHNCk.js → login-oauth-callback-CbXMk1Ee.js} +1 -1
- package/dist/assets/{logo-uploader-Cz1267Av.js → logo-uploader-BeuKpE1k.js} +3 -3
- package/dist/assets/{lost-passport-DjJtlNVj.js → lost-passport-71u3kgyM.js} +3 -3
- package/dist/assets/{lottie-DoYE5XDB.js → lottie-Bv4YQmjr.js} +1 -1
- package/dist/assets/{notifications-Cv1XH2yb.js → notifications-CxETkPC8.js} +1 -1
- package/dist/assets/{open-window-CN5TQ87C.js → open-window-C_Itzebs.js} +1 -1
- package/dist/assets/{overview-kalRt_uR.js → overview-DtN2iRHw.js} +1 -1
- package/dist/assets/{page-header-BmLNlOnD.js → page-header-6ic_pmoK.js} +1 -1
- package/dist/assets/{permission-DUsbjffq.js → permission-CRpG3m7P.js} +1 -1
- package/dist/assets/{preferences-ZO1kLbOx.js → preferences-5XMD5OzU.js} +1 -1
- package/dist/assets/publish-resource-u8MzIwsZ.js +1 -0
- package/dist/assets/{react-BTu1Y-_j.js → react-DnVaFLUv.js} +3 -3
- package/dist/assets/{redux-CJ8S87pk.js → redux-Ca86ARNo.js} +1 -1
- package/dist/assets/refType-DnzNeAJs.js +1 -0
- package/dist/assets/{resource-dialog-D_8tTarn.js → resource-dialog-BSFeyQ_K.js} +1 -1
- package/dist/assets/sdk-B-OBfaY_.js +1 -0
- package/dist/assets/{selector-Rhni_cbO.js → selector-Ckqt3gtd.js} +1 -1
- package/dist/assets/session-BT3UDuRe.js +1 -0
- package/dist/assets/{setup-BQ-DnQht.js → setup-DCuRY7pY.js} +3 -3
- package/dist/assets/{shorten-label-8aKNnW15.js → shorten-label-cwsaVcrz.js} +1 -1
- package/dist/assets/{simple-select-CNSx0Qbg.js → simple-select-QvzQDazL.js} +1 -1
- package/dist/assets/{slicedToArray-vg-R5s0s.js → slicedToArray-CJFgHG2-.js} +1 -1
- package/dist/assets/{spaces-BcZSz_wm.js → spaces-CUv_J9P5.js} +1 -1
- package/dist/assets/{start-CqQHbsvY.js → start-BTuxG98O.js} +1 -1
- package/dist/assets/{step-actions-DV3o9hve.js → step-actions-DVtaq0BG.js} +1 -1
- package/dist/assets/{studio-D_pIJx8G.js → studio-B3HuTZPP.js} +1 -1
- package/dist/assets/{switch-control-C-X_dl1C.js → switch-control-o6-nZs-T.js} +1 -1
- package/dist/assets/{toUpper-CqfCm6FQ.js → toUpper-o91NwuX3.js} +1 -1
- package/dist/assets/{transfer-CSfZjjyt.js → transfer-BRjjFrH2.js} +1 -1
- package/dist/assets/{trim-CXCEOOfq.js → trim-5l2FIQ1V.js} +1 -1
- package/dist/assets/{uniqBy--m6Xe_2K.js → uniqBy-Chi1M0dq.js} +1 -1
- package/dist/assets/{unsubscribe-BJWyVFrT.js → unsubscribe-Cq_wq5vC.js} +1 -1
- package/dist/assets/{url-join-CAnJBM33.js → url-join-Bx_A70NM.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-BWR6SXSQ.js → use-blocklet-info-for-connect-did-spaces-CCqkRF8J.js} +1 -1
- package/dist/assets/{use-mobile-BBtcVjXr.js → use-mobile-eTkOLV75.js} +1 -1
- package/dist/assets/{useAsync-DTvP9Zxi.js → useAsync-DOpY0MTF.js} +1 -1
- package/dist/assets/{useFormControl-CqDUGVwx.js → useFormControl-CXaDIKmg.js} +1 -1
- package/dist/assets/{useLocalStorage-BSk8yrmI.js → useLocalStorage-Aaw2jy7u.js} +1 -1
- package/dist/assets/{useSetState-Dvi1U0Nw.js → useSetState-7DwsrT08.js} +1 -1
- package/dist/assets/{useSlot-CBvar7i-.js → useSlot-CDeXSS5P.js} +1 -1
- package/dist/assets/{useSlotProps-BO61t83_.js → useSlotProps-y4Nw2SFi.js} +1 -1
- package/dist/assets/{useThemeProps-BVeww5NE.js → useThemeProps-CBbxmVEG.js} +1 -1
- package/dist/assets/{user-center-DxinbhvA.js → user-center-B5dWtyO9.js} +1 -1
- package/dist/assets/{user-sessions-BGeFoCxv.js → user-sessions-tail5lsl.js} +1 -1
- package/dist/assets/{util-DQZs28G6.js → util-C-9HO-wY.js} +1 -1
- package/dist/assets/{wrap-locale-B-fXOOcn.js → wrap-locale-CagvGD5F.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +18 -18
- package/dist/assets/add-resource-BcsfLDaF.js +0 -1
- package/dist/assets/api-noKs5rUY.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-CRw46sQ7.js +0 -1
- package/dist/assets/localization-DdE_yTeV.js +0 -1
- package/dist/assets/publish-resource-B2rKe7a9.js +0 -1
- package/dist/assets/refType-CT_vAXIZ.js +0 -1
- package/dist/assets/sdk-C3SAOjUt.js +0 -1
- package/dist/assets/session-4S4FY2oN.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aF as Se,aE as Ue,aG as Ge,ai as Ye,aH as Y,aK as _,r as p,aI as Xe,aJ as Je,j as n,aM as L,aN as Ke,V as Qe,db as Ze,dc as en,_ as nn,c4 as tn,at as ne,P as o,X as fe,Y as ge,bt as g,ac as on,aj as te,aB as oe,L as X,T as M,b as an,aC as be,B as k,bu as rn,I as D,dd as ve,H as ye,$ as sn,N as je,k as Z,de as ln,l as U,df as dn,dg as cn}from"./index-
|
|
1
|
+
import{aF as Se,aE as Ue,aG as Ge,ai as Ye,aH as Y,aK as _,r as p,aI as Xe,aJ as Je,j as n,aM as L,aN as Ke,V as Qe,db as Ze,dc as en,_ as nn,c4 as tn,at as ne,P as o,X as fe,Y as ge,bt as g,ac as on,aj as te,aB as oe,L as X,T as M,b as an,aC as be,B as k,bu as rn,I as D,dd as ve,H as ye,$ as sn,N as je,k as Z,de as ln,l as U,df as dn,dg as cn}from"./index-D0ZDnsBw.js";import{d as we,D as ke}from"./Menu-DAx78rf8.js";import{T as pn}from"./Toolbar-Czbh9Thi.js";import{H as $e}from"./Hidden-BnLj1Yrh.js";const ee={50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5"};function un(e){return Se("MuiAppBar",e)}Ue("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const hn=["className","color","enableColorOnDark","position"],xn=e=>{const{color:t,position:a,classes:r}=e,l={root:["root",`color${Y(t)}`,`position${Y(a)}`]};return Ke(l,un,r)},G=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,mn=Ge(Ye,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,t[`position${Y(a.position)}`],t[`color${Y(a.color)}`]]}})(({theme:e,ownerState:t})=>{const a=e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[900];return _({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0},t.position==="fixed"&&{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}},t.position==="absolute"&&{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="sticky"&&{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0},t.position==="static"&&{position:"static"},t.position==="relative"&&{position:"relative"},!e.vars&&_({},t.color==="default"&&{backgroundColor:a,color:e.palette.getContrastText(a)},t.color&&t.color!=="default"&&t.color!=="inherit"&&t.color!=="transparent"&&{backgroundColor:e.palette[t.color].main,color:e.palette[t.color].contrastText},t.color==="inherit"&&{color:"inherit"},e.palette.mode==="dark"&&!t.enableColorOnDark&&{backgroundColor:null,color:null},t.color==="transparent"&&_({backgroundColor:"transparent",color:"inherit"},e.palette.mode==="dark"&&{backgroundImage:"none"})),e.vars&&_({},t.color==="default"&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette.AppBar.defaultBg:G(e.vars.palette.AppBar.darkBg,e.vars.palette.AppBar.defaultBg),"--AppBar-color":t.enableColorOnDark?e.vars.palette.text.primary:G(e.vars.palette.AppBar.darkColor,e.vars.palette.text.primary)},t.color&&!t.color.match(/^(default|inherit|transparent)$/)&&{"--AppBar-background":t.enableColorOnDark?e.vars.palette[t.color].main:G(e.vars.palette.AppBar.darkBg,e.vars.palette[t.color].main),"--AppBar-color":t.enableColorOnDark?e.vars.palette[t.color].contrastText:G(e.vars.palette.AppBar.darkColor,e.vars.palette[t.color].contrastText)},!["inherit","transparent"].includes(t.color)&&{backgroundColor:"var(--AppBar-background)"},{color:t.color==="inherit"?"inherit":"var(--AppBar-color)"},t.color==="transparent"&&{backgroundImage:"none",backgroundColor:"transparent",color:"inherit"}))}),fn=p.forwardRef(function(t,a){const r=Xe({props:t,name:"MuiAppBar"}),{className:l,color:c="primary",enableColorOnDark:d=!1,position:i="fixed"}=r,u=Je(r,hn),s=_({},r,{color:c,position:i,enableColorOnDark:d}),x=xn(s);return n.jsx(mn,_({square:!0,component:"header",ownerState:s,elevation:4,className:L(x.root,l,i==="fixed"&&"mui-fixed"),ref:a},u))});function gn(e,t){var a,r=Qe(e),l=(a=t==null?void 0:t.wait)!==null&&a!==void 0?a:1e3,c=p.useMemo(function(){return Ze(function(){for(var d=[],i=0;i<arguments.length;i++)d[i]=arguments[i];return r.current.apply(r,en([],nn(d),!1))},l,t)},[]);return tn(function(){c.cancel()}),{run:c,cancel:c.cancel,flush:c.flush}}const bn=ne(n.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),vn=ne(n.jsx("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"Menu"),yn=ne(n.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),ze=p.createContext(),jn=e=>{const t=p.useContext(ze);return p.useLayoutEffect(()=>{},[]),t};function Ne({children:e,...t}){const[a,r]=p.useState({inFullPage:!1,showToggleButton:!1,headerVisibleInFullPage:!0,footerVisibleInFullPage:!1,sidebarVisibleInFullPage:!1}),l=()=>{r(d=>({...d,inFullPage:!d.inFullPage}))},c=p.useMemo(()=>({...a,headerVisible:!a.inFullPage||a.headerVisibleInFullPage,footerVisible:!a.inFullPage||a.footerVisibleInFullPage,sidebarVisible:!a.inFullPage||a.sidebarVisibleInFullPage,toggleFullPage:l,configure:d=>r(i=>({...i,...d}))}),[a]);return n.jsx(ze.Provider,{value:c,...t,children:e})}Ne.propTypes={children:o.node.isRequired};var ae={},wn=ge;Object.defineProperty(ae,"__esModule",{value:!0});var Ce=ae.default=void 0,kn=wn(fe()),$n=n;Ce=ae.default=(0,kn.default)((0,$n.jsx)("path",{d:"M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z"}),"OpenInFull");var re={},zn=ge;Object.defineProperty(re,"__esModule",{value:!0});var Pe=re.default=void 0,Nn=zn(fe()),Cn=n;Pe=re.default=(0,Nn.default)((0,Cn.jsx)("path",{d:"M22 3.41 16.71 8.7 20 12h-8V4l3.29 3.29L20.59 2zM3.41 22l5.29-5.29L12 20v-8H4l3.29 3.29L2 20.59z"}),"CloseFullscreen");function se({name:e,size:t,alt:a,color:r,style:l,prefix:c,showBadge:d,...i}){const u=`${c}/${e}-${r.replace(/^#/,"")}.png`;return n.jsxs(Pn,{style:{width:t,height:t},children:[n.jsx(on,{width:t,height:t,alt:a||e,src:u,style:Object.assign({width:t},l),...i}),d&&n.jsx("i",{className:"badge-point"})]})}se.propTypes={name:o.string.isRequired,size:o.number,color:o.string,alt:o.string,style:o.object,prefix:o.string,showBadge:o.bool};se.defaultProps={size:36,color:"#000000",alt:"",style:{},prefix:"/images",showBadge:!1};const Pn=g("div")`
|
|
2
2
|
position: relative;
|
|
3
3
|
.badge-point {
|
|
4
4
|
position: absolute;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cn as Ie,b7 as _a,eE as je,r as D,eF as Er,cv as Ea}from"./index-BowU-Rc8.js";import{c as Pa}from"./redux-CJ8S87pk.js";var Le={exports:{}};Le.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",a=1,o=2,s=9007199254740991,c="[object Arguments]",f="[object Array]",d="[object AsyncFunction]",v="[object Boolean]",b="[object Date]",O="[object Error]",m="[object Function]",S="[object GeneratorFunction]",I="[object Map]",N="[object Number]",G="[object Null]",P="[object Object]",T="[object Promise]",p="[object Proxy]",A="[object RegExp]",$="[object Set]",k="[object String]",Y="[object Symbol]",ue="[object Undefined]",se="[object WeakMap]",Ot="[object ArrayBuffer]",ye="[object DataView]",nn="[object Float32Array]",an="[object Float64Array]",on="[object Int8Array]",un="[object Int16Array]",sn="[object Int32Array]",cn="[object Uint8Array]",fn="[object Uint8ClampedArray]",ln="[object Uint16Array]",dn="[object Uint32Array]",gn=/[\\^$.*+?()[\]{}|]/g,hn=/^\[object .+?Constructor\]$/,pn=/^(?:0|[1-9]\d*)$/,w={};w[nn]=w[an]=w[on]=w[un]=w[sn]=w[cn]=w[fn]=w[ln]=w[dn]=!0,w[c]=w[f]=w[Ot]=w[v]=w[ye]=w[b]=w[O]=w[m]=w[I]=w[N]=w[P]=w[A]=w[$]=w[k]=w[se]=!1;var Tt=typeof Ie=="object"&&Ie&&Ie.Object===Object&&Ie,vn=typeof self=="object"&&self&&self.Object===Object&&self,W=Tt||vn||Function("return this")(),wt=t&&!t.nodeType&&t,Ct=wt&&!0&&e&&!e.nodeType&&e,It=Ct&&Ct.exports===wt,Xe=It&&Tt.process,_t=function(){try{return Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),Et=_t&&_t.isTypedArray;function yn(i,u){for(var l=-1,g=i==null?0:i.length,C=0,y=[];++l<g;){var E=i[l];u(E,l,i)&&(y[C++]=E)}return y}function mn(i,u){for(var l=-1,g=u.length,C=i.length;++l<g;)i[C+l]=u[l];return i}function bn(i,u){for(var l=-1,g=i==null?0:i.length;++l<g;)if(u(i[l],l,i))return!0;return!1}function Dn(i,u){for(var l=-1,g=Array(i);++l<i;)g[l]=u(l);return g}function Sn(i){return function(u){return i(u)}}function On(i,u){return i.has(u)}function Tn(i,u){return i==null?void 0:i[u]}function wn(i){var u=-1,l=Array(i.size);return i.forEach(function(g,C){l[++u]=[C,g]}),l}function Cn(i,u){return function(l){return i(u(l))}}function In(i){var u=-1,l=Array(i.size);return i.forEach(function(g){l[++u]=g}),l}var _n=Array.prototype,En=Function.prototype,me=Object.prototype,Ke=W["__core-js_shared__"],Pt=En.toString,B=me.hasOwnProperty,At=function(){var i=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),kt=me.toString,Pn=RegExp("^"+Pt.call(B).replace(gn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rt=It?W.Buffer:void 0,be=W.Symbol,Mt=W.Uint8Array,$t=me.propertyIsEnumerable,An=_n.splice,Z=be?be.toStringTag:void 0,xt=Object.getOwnPropertySymbols,kn=Rt?Rt.isBuffer:void 0,Rn=Cn(Object.keys,Object),Ye=ie(W,"DataView"),ce=ie(W,"Map"),Ve=ie(W,"Promise"),Qe=ie(W,"Set"),Je=ie(W,"WeakMap"),fe=ie(Object,"create"),Mn=re(Ye),$n=re(ce),xn=re(Ve),Nn=re(Qe),jn=re(Je),Nt=be?be.prototype:void 0,Ze=Nt?Nt.valueOf:void 0;function ee(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Ln(){this.__data__=fe?fe(null):{},this.size=0}function Hn(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function Un(i){var u=this.__data__;if(fe){var l=u[i];return l===n?void 0:l}return B.call(u,i)?u[i]:void 0}function Fn(i){var u=this.__data__;return fe?u[i]!==void 0:B.call(u,i)}function qn(i,u){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=fe&&u===void 0?n:u,this}ee.prototype.clear=Ln,ee.prototype.delete=Hn,ee.prototype.get=Un,ee.prototype.has=Fn,ee.prototype.set=qn;function X(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Gn(){this.__data__=[],this.size=0}function Bn(i){var u=this.__data__,l=Se(u,i);if(l<0)return!1;var g=u.length-1;return l==g?u.pop():An.call(u,l,1),--this.size,!0}function zn(i){var u=this.__data__,l=Se(u,i);return l<0?void 0:u[l][1]}function Wn(i){return Se(this.__data__,i)>-1}function Xn(i,u){var l=this.__data__,g=Se(l,i);return g<0?(++this.size,l.push([i,u])):l[g][1]=u,this}X.prototype.clear=Gn,X.prototype.delete=Bn,X.prototype.get=zn,X.prototype.has=Wn,X.prototype.set=Xn;function te(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Kn(){this.size=0,this.__data__={hash:new ee,map:new(ce||X),string:new ee}}function Yn(i){var u=Oe(this,i).delete(i);return this.size-=u?1:0,u}function Vn(i){return Oe(this,i).get(i)}function Qn(i){return Oe(this,i).has(i)}function Jn(i,u){var l=Oe(this,i),g=l.size;return l.set(i,u),this.size+=l.size==g?0:1,this}te.prototype.clear=Kn,te.prototype.delete=Yn,te.prototype.get=Vn,te.prototype.has=Qn,te.prototype.set=Jn;function De(i){var u=-1,l=i==null?0:i.length;for(this.__data__=new te;++u<l;)this.add(i[u])}function Zn(i){return this.__data__.set(i,n),this}function ea(i){return this.__data__.has(i)}De.prototype.add=De.prototype.push=Zn,De.prototype.has=ea;function V(i){var u=this.__data__=new X(i);this.size=u.size}function ta(){this.__data__=new X,this.size=0}function ra(i){var u=this.__data__,l=u.delete(i);return this.size=u.size,l}function na(i){return this.__data__.get(i)}function aa(i){return this.__data__.has(i)}function ia(i,u){var l=this.__data__;if(l instanceof X){var g=l.__data__;if(!ce||g.length<r-1)return g.push([i,u]),this.size=++l.size,this;l=this.__data__=new te(g)}return l.set(i,u),this.size=l.size,this}V.prototype.clear=ta,V.prototype.delete=ra,V.prototype.get=na,V.prototype.has=aa,V.prototype.set=ia;function oa(i,u){var l=Te(i),g=!l&&Sa(i),C=!l&&!g&&et(i),y=!l&&!g&&!C&&zt(i),E=l||g||C||y,R=E?Dn(i.length,String):[],M=R.length;for(var _ in i)B.call(i,_)&&!(E&&(_=="length"||C&&(_=="offset"||_=="parent")||y&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||va(_,M)))&&R.push(_);return R}function Se(i,u){for(var l=i.length;l--;)if(Ft(i[l][0],u))return l;return-1}function ua(i,u,l){var g=u(i);return Te(i)?g:mn(g,l(i))}function le(i){return i==null?i===void 0?ue:G:Z&&Z in Object(i)?ha(i):Da(i)}function jt(i){return de(i)&&le(i)==c}function Lt(i,u,l,g,C){return i===u?!0:i==null||u==null||!de(i)&&!de(u)?i!==i&&u!==u:sa(i,u,l,g,Lt,C)}function sa(i,u,l,g,C,y){var E=Te(i),R=Te(u),M=E?f:Q(i),_=R?f:Q(u);M=M==c?P:M,_=_==c?P:_;var j=M==P,q=_==P,x=M==_;if(x&&et(i)){if(!et(u))return!1;E=!0,j=!1}if(x&&!j)return y||(y=new V),E||zt(i)?Ht(i,u,l,g,C,y):da(i,u,M,l,g,C,y);if(!(l&a)){var L=j&&B.call(i,"__wrapped__"),H=q&&B.call(u,"__wrapped__");if(L||H){var J=L?i.value():i,K=H?u.value():u;return y||(y=new V),C(J,K,l,g,y)}}return x?(y||(y=new V),ga(i,u,l,g,C,y)):!1}function ca(i){if(!Bt(i)||ma(i))return!1;var u=qt(i)?Pn:hn;return u.test(re(i))}function fa(i){return de(i)&&Gt(i.length)&&!!w[le(i)]}function la(i){if(!ba(i))return Rn(i);var u=[];for(var l in Object(i))B.call(i,l)&&l!="constructor"&&u.push(l);return u}function Ht(i,u,l,g,C,y){var E=l&a,R=i.length,M=u.length;if(R!=M&&!(E&&M>R))return!1;var _=y.get(i);if(_&&y.get(u))return _==u;var j=-1,q=!0,x=l&o?new De:void 0;for(y.set(i,u),y.set(u,i);++j<R;){var L=i[j],H=u[j];if(g)var J=E?g(H,L,j,u,i,y):g(L,H,j,i,u,y);if(J!==void 0){if(J)continue;q=!1;break}if(x){if(!bn(u,function(K,ne){if(!On(x,ne)&&(L===K||C(L,K,l,g,y)))return x.push(ne)})){q=!1;break}}else if(!(L===H||C(L,H,l,g,y))){q=!1;break}}return y.delete(i),y.delete(u),q}function da(i,u,l,g,C,y,E){switch(l){case ye:if(i.byteLength!=u.byteLength||i.byteOffset!=u.byteOffset)return!1;i=i.buffer,u=u.buffer;case Ot:return!(i.byteLength!=u.byteLength||!y(new Mt(i),new Mt(u)));case v:case b:case N:return Ft(+i,+u);case O:return i.name==u.name&&i.message==u.message;case A:case k:return i==u+"";case I:var R=wn;case $:var M=g&a;if(R||(R=In),i.size!=u.size&&!M)return!1;var _=E.get(i);if(_)return _==u;g|=o,E.set(i,u);var j=Ht(R(i),R(u),g,C,y,E);return E.delete(i),j;case Y:if(Ze)return Ze.call(i)==Ze.call(u)}return!1}function ga(i,u,l,g,C,y){var E=l&a,R=Ut(i),M=R.length,_=Ut(u),j=_.length;if(M!=j&&!E)return!1;for(var q=M;q--;){var x=R[q];if(!(E?x in u:B.call(u,x)))return!1}var L=y.get(i);if(L&&y.get(u))return L==u;var H=!0;y.set(i,u),y.set(u,i);for(var J=E;++q<M;){x=R[q];var K=i[x],ne=u[x];if(g)var Wt=E?g(ne,K,x,u,i,y):g(K,ne,x,i,u,y);if(!(Wt===void 0?K===ne||C(K,ne,l,g,y):Wt)){H=!1;break}J||(J=x=="constructor")}if(H&&!J){var we=i.constructor,Ce=u.constructor;we!=Ce&&"constructor"in i&&"constructor"in u&&!(typeof we=="function"&&we instanceof we&&typeof Ce=="function"&&Ce instanceof Ce)&&(H=!1)}return y.delete(i),y.delete(u),H}function Ut(i){return ua(i,wa,pa)}function Oe(i,u){var l=i.__data__;return ya(u)?l[typeof u=="string"?"string":"hash"]:l.map}function ie(i,u){var l=Tn(i,u);return ca(l)?l:void 0}function ha(i){var u=B.call(i,Z),l=i[Z];try{i[Z]=void 0;var g=!0}catch{}var C=kt.call(i);return g&&(u?i[Z]=l:delete i[Z]),C}var pa=xt?function(i){return i==null?[]:(i=Object(i),yn(xt(i),function(u){return $t.call(i,u)}))}:Ca,Q=le;(Ye&&Q(new Ye(new ArrayBuffer(1)))!=ye||ce&&Q(new ce)!=I||Ve&&Q(Ve.resolve())!=T||Qe&&Q(new Qe)!=$||Je&&Q(new Je)!=se)&&(Q=function(i){var u=le(i),l=u==P?i.constructor:void 0,g=l?re(l):"";if(g)switch(g){case Mn:return ye;case $n:return I;case xn:return T;case Nn:return $;case jn:return se}return u});function va(i,u){return u=u??s,!!u&&(typeof i=="number"||pn.test(i))&&i>-1&&i%1==0&&i<u}function ya(i){var u=typeof i;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?i!=="__proto__":i===null}function ma(i){return!!At&&At in i}function ba(i){var u=i&&i.constructor,l=typeof u=="function"&&u.prototype||me;return i===l}function Da(i){return kt.call(i)}function re(i){if(i!=null){try{return Pt.call(i)}catch{}try{return i+""}catch{}}return""}function Ft(i,u){return i===u||i!==i&&u!==u}var Sa=jt(function(){return arguments}())?jt:function(i){return de(i)&&B.call(i,"callee")&&!$t.call(i,"callee")},Te=Array.isArray;function Oa(i){return i!=null&&Gt(i.length)&&!qt(i)}var et=kn||Ia;function Ta(i,u){return Lt(i,u)}function qt(i){if(!Bt(i))return!1;var u=le(i);return u==m||u==S||u==d||u==p}function Gt(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=s}function Bt(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function de(i){return i!=null&&typeof i=="object"}var zt=Et?Sn(Et):fa;function wa(i){return Oa(i)?oa(i):la(i)}function Ca(){return[]}function Ia(){return!1}e.exports=Ta})(Le,Le.exports);var Aa=Le.exports;const As=_a(Aa);var F;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(F||(F={}));function h(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];if(!e){var o;if(t===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;o=new Error(t.replace(/%s/g,function(){return n[s++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var gt="dnd-core/INIT_COORDS",qe="dnd-core/BEGIN_DRAG",ht="dnd-core/PUBLISH_DRAG_SOURCE",Ge="dnd-core/HOVER",Be="dnd-core/DROP",ze="dnd-core/END_DRAG";function Xt(e,t){return{type:gt,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function Pe(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(r){return typeof r}:Pe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Pe(e)}function ka(e,t,r){return t.split(".").reduce(function(n,a){return n&&n[a]?n[a]:r||null},e)}function Ra(e,t){return e.filter(function(r){return r!==t})}function Pr(e){return Pe(e)==="object"}function Ma(e,t){var r=new Map,n=function(s){r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);var a=[];return r.forEach(function(o,s){o===1&&a.push(s)}),a}function $a(e,t){return e.filter(function(r){return t.indexOf(r)>-1})}var xa={type:gt,payload:{clientOffset:null,sourceClientOffset:null}};function Na(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},a=n.publishSource,o=a===void 0?!0:a,s=n.clientOffset,c=n.getSourceClientOffset,f=e.getMonitor(),d=e.getRegistry();e.dispatch(Xt(s)),ja(r,f,d);var v=Ua(r,f);if(v===null){e.dispatch(xa);return}var b=null;if(s){if(!c)throw new Error("getSourceClientOffset must be defined");La(c),b=c(v)}e.dispatch(Xt(s,b));var O=d.getSource(v),m=O.beginDrag(f,v);Ha(m),d.pinSource(v);var S=d.getSourceType(v);return{type:qe,payload:{itemType:S,item:m,sourceId:v,clientOffset:s||null,sourceClientOffset:b||null,isSourcePublic:!!o}}}}function ja(e,t,r){h(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){h(r.getSource(n),"Expected sourceIds to be registered.")})}function La(e){h(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Ha(e){h(Pr(e),"Item must be an object.")}function Ua(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Fa(e){return function(){var r=e.getMonitor();if(r.isDragging())return{type:ht}}}function ot(e,t){return t===null?e===null:Array.isArray(e)?e.some(function(r){return r===t}):e===t}function qa(e){return function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.clientOffset;Ga(r);var o=r.slice(0),s=e.getMonitor(),c=e.getRegistry();Ba(o,s,c);var f=s.getItemType();return za(o,c,f),Wa(o,s,c),{type:Ge,payload:{targetIds:o,clientOffset:a||null}}}}function Ga(e){h(Array.isArray(e),"Expected targetIds to be an array.")}function Ba(e,t,r){h(t.isDragging(),"Cannot call hover while not dragging."),h(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var a=e[n];h(e.lastIndexOf(a)===n,"Expected targetIds to be unique in the passed array.");var o=r.getTarget(a);h(o,"Expected targetIds to be registered.")}}function za(e,t,r){for(var n=e.length-1;n>=0;n--){var a=e[n],o=t.getTargetType(a);ot(o,r)||e.splice(n,1)}}function Wa(e,t,r){e.forEach(function(n){var a=r.getTarget(n);a.hover(t,n)})}function Kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kt(Object(r),!0).forEach(function(n){Xa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ka(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.getMonitor(),a=e.getRegistry();Ya(n);var o=Ja(n);o.forEach(function(s,c){var f=Va(s,c,a,n),d={type:Be,payload:{dropResult:Yt(Yt({},r),f)}};e.dispatch(d)})}}function Ya(e){h(e.isDragging(),"Cannot call drop while not dragging."),h(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Va(e,t,r,n){var a=r.getTarget(e),o=a?a.drop(n,e):void 0;return Qa(o),typeof o>"u"&&(o=t===0?{}:n.getDropResult()),o}function Qa(e){h(typeof e>"u"||Pr(e),"Drop result must either be an object or undefined.")}function Ja(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Za(e){return function(){var r=e.getMonitor(),n=e.getRegistry();ei(r);var a=r.getSourceId();if(a!=null){var o=n.getSource(a,!0);o.endDrag(r,a),n.unpinSource()}return{type:ze}}}function ei(e){h(e.isDragging(),"Cannot call endDrag while not dragging.")}function ti(e){return{beginDrag:Na(e),publishDragSource:Fa(e),hover:qa(e),drop:Ka(e),endDrag:Za(e)}}var ri=function(t,r){return t===r};function ni(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function ai(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ri;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function Vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vt(Object(r),!0).forEach(function(n){ii(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ii(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Jt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function oi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jt,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case gt:case qe:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Ge:return ni(e.clientOffset,r.clientOffset)?e:Qt(Qt({},e),{},{clientOffset:r.clientOffset});case ze:case Be:return Jt;default:return e}}var pt="dnd-core/ADD_SOURCE",vt="dnd-core/ADD_TARGET",yt="dnd-core/REMOVE_SOURCE",We="dnd-core/REMOVE_TARGET";function ui(e){return{type:pt,payload:{sourceId:e}}}function si(e){return{type:vt,payload:{targetId:e}}}function ci(e){return{type:yt,payload:{sourceId:e}}}function fi(e){return{type:We,payload:{targetId:e}}}function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zt(Object(r),!0).forEach(function(n){li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function li(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var di={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function gi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:di,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case qe:return U(U({},e),{},{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case ht:return U(U({},e),{},{isSourcePublic:!0});case Ge:return U(U({},e),{},{targetIds:r.targetIds});case We:return e.targetIds.indexOf(r.targetId)===-1?e:U(U({},e),{},{targetIds:Ra(e.targetIds,r.targetId)});case Be:return U(U({},e),{},{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ze:return U(U({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function hi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case pt:case vt:return e+1;case yt:case We:return e-1;default:return e}}var He=[],mt=[];He.__IS_NONE__=!0;mt.__IS_ALL__=!0;function pi(e,t){if(e===He)return!1;if(e===mt||typeof t>"u")return!0;var r=$a(t,e);return r.length>0}function vi(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Ge:break;case pt:case vt:case We:case yt:return He;case qe:case ht:case ze:case Be:default:return mt}var t=e.payload,r=t.targetIds,n=r===void 0?[]:r,a=t.prevTargetIds,o=a===void 0?[]:a,s=Ma(n,o),c=s.length>0||!ai(n,o);if(!c)return He;var f=o[o.length-1],d=n[n.length-1];return f!==d&&(f&&s.push(f),d&&s.push(d)),s}function yi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return e+1}function er(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?er(Object(r),!0).forEach(function(n){mi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):er(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:vi(e.dirtyHandlerIds,{type:t.type,payload:tr(tr({},t.payload),{},{prevTargetIds:ka(e,"dragOperation.targetIds",[])})}),dragOffset:oi(e.dragOffset,t),refCount:hi(e.refCount,t),dragOperation:gi(e.dragOperation,t),stateId:yi(e.stateId)}}function Di(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ar(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Si(e){var t=e.clientOffset,r=e.initialClientOffset,n=e.initialSourceClientOffset;return!t||!r||!n?null:Ar(Di(t,n),r)}function Oi(e){var t=e.clientOffset,r=e.initialClientOffset;return!t||!r?null:Ar(t,r)}function Ti(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ci(e,t,r){return t&&wi(e.prototype,t),e}var Ii=function(){function e(t,r){Ti(this,e),this.store=t,this.registry=r}return Ci(e,[{key:"subscribeToStateChange",value:function(r){var n=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=a.handlerIds;h(typeof r=="function","listener must be a function."),h(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var s=this.store.getState().stateId,c=function(){var d=n.store.getState(),v=d.stateId;try{var b=v===s||v===s+1&&!pi(d.dirtyHandlerIds,o);b||r()}finally{s=v}};return this.store.subscribe(c)}},{key:"subscribeToOffsetChange",value:function(r){var n=this;h(typeof r=="function","listener must be a function.");var a=this.store.getState().dragOffset,o=function(){var c=n.store.getState().dragOffset;c!==a&&(a=c,r())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r);return h(n,"Expected to find a valid source."),this.isDragging()?!1:n.canDrag(this,r)}},{key:"canDropOnTarget",value:function(r){if(!r)return!1;var n=this.registry.getTarget(r);if(h(n,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var a=this.registry.getTargetType(r),o=this.getItemType();return ot(a,o)&&n.canDrop(this,r)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r,!0);if(h(n,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var a=this.registry.getSourceType(r),o=this.getItemType();return a!==o?!1:n.isDragging(this,r)}},{key:"isOverTarget",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!r)return!1;var a=n.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(r),s=this.getItemType();if(s&&!ot(o,s))return!1;var c=this.getTargetIds();if(!c.length)return!1;var f=c.indexOf(r);return a?f===c.length-1:f>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return Si(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return Oi(this.store.getState().dragOffset)}}]),e}(),_i=0;function Ei(){return _i++}function Ae(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ae=function(r){return typeof r}:Ae=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ae(e)}function Pi(e){h(typeof e.canDrag=="function","Expected canDrag to be a function."),h(typeof e.beginDrag=="function","Expected beginDrag to be a function."),h(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Ai(e){h(typeof e.canDrop=="function","Expected canDrop to be a function."),h(typeof e.hover=="function","Expected hover to be a function."),h(typeof e.drop=="function","Expected beginDrag to be a function.")}function ut(e,t){if(t&&Array.isArray(e)){e.forEach(function(r){return ut(r,!1)});return}h(typeof e=="string"||Ae(e)==="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const rr=typeof je<"u"?je:self,kr=rr.MutationObserver||rr.WebKitMutationObserver;function Rr(e){return function(){const r=setTimeout(a,0),n=setInterval(a,50);function a(){clearTimeout(r),clearInterval(n),e()}}}function ki(e){let t=1;const r=new kr(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Ri=typeof kr=="function"?ki:Rr;class Mi{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,a=t.length-this.index;n<a;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Ri(this.flush),this.requestErrorThrow=Rr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class $i{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class xi{create(t){const r=this.freeTasks,n=r.length?r.pop():new $i(this.onError,a=>r[r.length]=a);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const Mr=new Mi,Ni=new xi(Mr.registerPendingError);function ji(e){Mr.enqueueTask(Ni.create(e))}function Li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ui(e,t,r){return t&&Hi(e.prototype,t),e}function Fi(e,t){return zi(e)||Bi(e,t)||Gi(e,t)||qi()}function qi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1
|
+
import{cn as Ie,b7 as _a,eE as je,r as D,eF as Er,cv as Ea}from"./index-D0ZDnsBw.js";import{c as Pa}from"./redux-Ca86ARNo.js";var Le={exports:{}};Le.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",a=1,o=2,s=9007199254740991,c="[object Arguments]",f="[object Array]",d="[object AsyncFunction]",v="[object Boolean]",b="[object Date]",O="[object Error]",m="[object Function]",S="[object GeneratorFunction]",I="[object Map]",N="[object Number]",G="[object Null]",P="[object Object]",T="[object Promise]",p="[object Proxy]",A="[object RegExp]",$="[object Set]",k="[object String]",Y="[object Symbol]",ue="[object Undefined]",se="[object WeakMap]",Ot="[object ArrayBuffer]",ye="[object DataView]",nn="[object Float32Array]",an="[object Float64Array]",on="[object Int8Array]",un="[object Int16Array]",sn="[object Int32Array]",cn="[object Uint8Array]",fn="[object Uint8ClampedArray]",ln="[object Uint16Array]",dn="[object Uint32Array]",gn=/[\\^$.*+?()[\]{}|]/g,hn=/^\[object .+?Constructor\]$/,pn=/^(?:0|[1-9]\d*)$/,w={};w[nn]=w[an]=w[on]=w[un]=w[sn]=w[cn]=w[fn]=w[ln]=w[dn]=!0,w[c]=w[f]=w[Ot]=w[v]=w[ye]=w[b]=w[O]=w[m]=w[I]=w[N]=w[P]=w[A]=w[$]=w[k]=w[se]=!1;var Tt=typeof Ie=="object"&&Ie&&Ie.Object===Object&&Ie,vn=typeof self=="object"&&self&&self.Object===Object&&self,W=Tt||vn||Function("return this")(),wt=t&&!t.nodeType&&t,Ct=wt&&!0&&e&&!e.nodeType&&e,It=Ct&&Ct.exports===wt,Xe=It&&Tt.process,_t=function(){try{return Xe&&Xe.binding&&Xe.binding("util")}catch{}}(),Et=_t&&_t.isTypedArray;function yn(i,u){for(var l=-1,g=i==null?0:i.length,C=0,y=[];++l<g;){var E=i[l];u(E,l,i)&&(y[C++]=E)}return y}function mn(i,u){for(var l=-1,g=u.length,C=i.length;++l<g;)i[C+l]=u[l];return i}function bn(i,u){for(var l=-1,g=i==null?0:i.length;++l<g;)if(u(i[l],l,i))return!0;return!1}function Dn(i,u){for(var l=-1,g=Array(i);++l<i;)g[l]=u(l);return g}function Sn(i){return function(u){return i(u)}}function On(i,u){return i.has(u)}function Tn(i,u){return i==null?void 0:i[u]}function wn(i){var u=-1,l=Array(i.size);return i.forEach(function(g,C){l[++u]=[C,g]}),l}function Cn(i,u){return function(l){return i(u(l))}}function In(i){var u=-1,l=Array(i.size);return i.forEach(function(g){l[++u]=g}),l}var _n=Array.prototype,En=Function.prototype,me=Object.prototype,Ke=W["__core-js_shared__"],Pt=En.toString,B=me.hasOwnProperty,At=function(){var i=/[^.]+$/.exec(Ke&&Ke.keys&&Ke.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),kt=me.toString,Pn=RegExp("^"+Pt.call(B).replace(gn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rt=It?W.Buffer:void 0,be=W.Symbol,Mt=W.Uint8Array,$t=me.propertyIsEnumerable,An=_n.splice,Z=be?be.toStringTag:void 0,xt=Object.getOwnPropertySymbols,kn=Rt?Rt.isBuffer:void 0,Rn=Cn(Object.keys,Object),Ye=ie(W,"DataView"),ce=ie(W,"Map"),Ve=ie(W,"Promise"),Qe=ie(W,"Set"),Je=ie(W,"WeakMap"),fe=ie(Object,"create"),Mn=re(Ye),$n=re(ce),xn=re(Ve),Nn=re(Qe),jn=re(Je),Nt=be?be.prototype:void 0,Ze=Nt?Nt.valueOf:void 0;function ee(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Ln(){this.__data__=fe?fe(null):{},this.size=0}function Hn(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function Un(i){var u=this.__data__;if(fe){var l=u[i];return l===n?void 0:l}return B.call(u,i)?u[i]:void 0}function Fn(i){var u=this.__data__;return fe?u[i]!==void 0:B.call(u,i)}function qn(i,u){var l=this.__data__;return this.size+=this.has(i)?0:1,l[i]=fe&&u===void 0?n:u,this}ee.prototype.clear=Ln,ee.prototype.delete=Hn,ee.prototype.get=Un,ee.prototype.has=Fn,ee.prototype.set=qn;function X(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Gn(){this.__data__=[],this.size=0}function Bn(i){var u=this.__data__,l=Se(u,i);if(l<0)return!1;var g=u.length-1;return l==g?u.pop():An.call(u,l,1),--this.size,!0}function zn(i){var u=this.__data__,l=Se(u,i);return l<0?void 0:u[l][1]}function Wn(i){return Se(this.__data__,i)>-1}function Xn(i,u){var l=this.__data__,g=Se(l,i);return g<0?(++this.size,l.push([i,u])):l[g][1]=u,this}X.prototype.clear=Gn,X.prototype.delete=Bn,X.prototype.get=zn,X.prototype.has=Wn,X.prototype.set=Xn;function te(i){var u=-1,l=i==null?0:i.length;for(this.clear();++u<l;){var g=i[u];this.set(g[0],g[1])}}function Kn(){this.size=0,this.__data__={hash:new ee,map:new(ce||X),string:new ee}}function Yn(i){var u=Oe(this,i).delete(i);return this.size-=u?1:0,u}function Vn(i){return Oe(this,i).get(i)}function Qn(i){return Oe(this,i).has(i)}function Jn(i,u){var l=Oe(this,i),g=l.size;return l.set(i,u),this.size+=l.size==g?0:1,this}te.prototype.clear=Kn,te.prototype.delete=Yn,te.prototype.get=Vn,te.prototype.has=Qn,te.prototype.set=Jn;function De(i){var u=-1,l=i==null?0:i.length;for(this.__data__=new te;++u<l;)this.add(i[u])}function Zn(i){return this.__data__.set(i,n),this}function ea(i){return this.__data__.has(i)}De.prototype.add=De.prototype.push=Zn,De.prototype.has=ea;function V(i){var u=this.__data__=new X(i);this.size=u.size}function ta(){this.__data__=new X,this.size=0}function ra(i){var u=this.__data__,l=u.delete(i);return this.size=u.size,l}function na(i){return this.__data__.get(i)}function aa(i){return this.__data__.has(i)}function ia(i,u){var l=this.__data__;if(l instanceof X){var g=l.__data__;if(!ce||g.length<r-1)return g.push([i,u]),this.size=++l.size,this;l=this.__data__=new te(g)}return l.set(i,u),this.size=l.size,this}V.prototype.clear=ta,V.prototype.delete=ra,V.prototype.get=na,V.prototype.has=aa,V.prototype.set=ia;function oa(i,u){var l=Te(i),g=!l&&Sa(i),C=!l&&!g&&et(i),y=!l&&!g&&!C&&zt(i),E=l||g||C||y,R=E?Dn(i.length,String):[],M=R.length;for(var _ in i)B.call(i,_)&&!(E&&(_=="length"||C&&(_=="offset"||_=="parent")||y&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||va(_,M)))&&R.push(_);return R}function Se(i,u){for(var l=i.length;l--;)if(Ft(i[l][0],u))return l;return-1}function ua(i,u,l){var g=u(i);return Te(i)?g:mn(g,l(i))}function le(i){return i==null?i===void 0?ue:G:Z&&Z in Object(i)?ha(i):Da(i)}function jt(i){return de(i)&&le(i)==c}function Lt(i,u,l,g,C){return i===u?!0:i==null||u==null||!de(i)&&!de(u)?i!==i&&u!==u:sa(i,u,l,g,Lt,C)}function sa(i,u,l,g,C,y){var E=Te(i),R=Te(u),M=E?f:Q(i),_=R?f:Q(u);M=M==c?P:M,_=_==c?P:_;var j=M==P,q=_==P,x=M==_;if(x&&et(i)){if(!et(u))return!1;E=!0,j=!1}if(x&&!j)return y||(y=new V),E||zt(i)?Ht(i,u,l,g,C,y):da(i,u,M,l,g,C,y);if(!(l&a)){var L=j&&B.call(i,"__wrapped__"),H=q&&B.call(u,"__wrapped__");if(L||H){var J=L?i.value():i,K=H?u.value():u;return y||(y=new V),C(J,K,l,g,y)}}return x?(y||(y=new V),ga(i,u,l,g,C,y)):!1}function ca(i){if(!Bt(i)||ma(i))return!1;var u=qt(i)?Pn:hn;return u.test(re(i))}function fa(i){return de(i)&&Gt(i.length)&&!!w[le(i)]}function la(i){if(!ba(i))return Rn(i);var u=[];for(var l in Object(i))B.call(i,l)&&l!="constructor"&&u.push(l);return u}function Ht(i,u,l,g,C,y){var E=l&a,R=i.length,M=u.length;if(R!=M&&!(E&&M>R))return!1;var _=y.get(i);if(_&&y.get(u))return _==u;var j=-1,q=!0,x=l&o?new De:void 0;for(y.set(i,u),y.set(u,i);++j<R;){var L=i[j],H=u[j];if(g)var J=E?g(H,L,j,u,i,y):g(L,H,j,i,u,y);if(J!==void 0){if(J)continue;q=!1;break}if(x){if(!bn(u,function(K,ne){if(!On(x,ne)&&(L===K||C(L,K,l,g,y)))return x.push(ne)})){q=!1;break}}else if(!(L===H||C(L,H,l,g,y))){q=!1;break}}return y.delete(i),y.delete(u),q}function da(i,u,l,g,C,y,E){switch(l){case ye:if(i.byteLength!=u.byteLength||i.byteOffset!=u.byteOffset)return!1;i=i.buffer,u=u.buffer;case Ot:return!(i.byteLength!=u.byteLength||!y(new Mt(i),new Mt(u)));case v:case b:case N:return Ft(+i,+u);case O:return i.name==u.name&&i.message==u.message;case A:case k:return i==u+"";case I:var R=wn;case $:var M=g&a;if(R||(R=In),i.size!=u.size&&!M)return!1;var _=E.get(i);if(_)return _==u;g|=o,E.set(i,u);var j=Ht(R(i),R(u),g,C,y,E);return E.delete(i),j;case Y:if(Ze)return Ze.call(i)==Ze.call(u)}return!1}function ga(i,u,l,g,C,y){var E=l&a,R=Ut(i),M=R.length,_=Ut(u),j=_.length;if(M!=j&&!E)return!1;for(var q=M;q--;){var x=R[q];if(!(E?x in u:B.call(u,x)))return!1}var L=y.get(i);if(L&&y.get(u))return L==u;var H=!0;y.set(i,u),y.set(u,i);for(var J=E;++q<M;){x=R[q];var K=i[x],ne=u[x];if(g)var Wt=E?g(ne,K,x,u,i,y):g(K,ne,x,i,u,y);if(!(Wt===void 0?K===ne||C(K,ne,l,g,y):Wt)){H=!1;break}J||(J=x=="constructor")}if(H&&!J){var we=i.constructor,Ce=u.constructor;we!=Ce&&"constructor"in i&&"constructor"in u&&!(typeof we=="function"&&we instanceof we&&typeof Ce=="function"&&Ce instanceof Ce)&&(H=!1)}return y.delete(i),y.delete(u),H}function Ut(i){return ua(i,wa,pa)}function Oe(i,u){var l=i.__data__;return ya(u)?l[typeof u=="string"?"string":"hash"]:l.map}function ie(i,u){var l=Tn(i,u);return ca(l)?l:void 0}function ha(i){var u=B.call(i,Z),l=i[Z];try{i[Z]=void 0;var g=!0}catch{}var C=kt.call(i);return g&&(u?i[Z]=l:delete i[Z]),C}var pa=xt?function(i){return i==null?[]:(i=Object(i),yn(xt(i),function(u){return $t.call(i,u)}))}:Ca,Q=le;(Ye&&Q(new Ye(new ArrayBuffer(1)))!=ye||ce&&Q(new ce)!=I||Ve&&Q(Ve.resolve())!=T||Qe&&Q(new Qe)!=$||Je&&Q(new Je)!=se)&&(Q=function(i){var u=le(i),l=u==P?i.constructor:void 0,g=l?re(l):"";if(g)switch(g){case Mn:return ye;case $n:return I;case xn:return T;case Nn:return $;case jn:return se}return u});function va(i,u){return u=u??s,!!u&&(typeof i=="number"||pn.test(i))&&i>-1&&i%1==0&&i<u}function ya(i){var u=typeof i;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?i!=="__proto__":i===null}function ma(i){return!!At&&At in i}function ba(i){var u=i&&i.constructor,l=typeof u=="function"&&u.prototype||me;return i===l}function Da(i){return kt.call(i)}function re(i){if(i!=null){try{return Pt.call(i)}catch{}try{return i+""}catch{}}return""}function Ft(i,u){return i===u||i!==i&&u!==u}var Sa=jt(function(){return arguments}())?jt:function(i){return de(i)&&B.call(i,"callee")&&!$t.call(i,"callee")},Te=Array.isArray;function Oa(i){return i!=null&&Gt(i.length)&&!qt(i)}var et=kn||Ia;function Ta(i,u){return Lt(i,u)}function qt(i){if(!Bt(i))return!1;var u=le(i);return u==m||u==S||u==d||u==p}function Gt(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=s}function Bt(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function de(i){return i!=null&&typeof i=="object"}var zt=Et?Sn(Et):fa;function wa(i){return Oa(i)?oa(i):la(i)}function Ca(){return[]}function Ia(){return!1}e.exports=Ta})(Le,Le.exports);var Aa=Le.exports;const As=_a(Aa);var F;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(F||(F={}));function h(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),a=2;a<r;a++)n[a-2]=arguments[a];if(!e){var o;if(t===void 0)o=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=0;o=new Error(t.replace(/%s/g,function(){return n[s++]})),o.name="Invariant Violation"}throw o.framesToPop=1,o}}var gt="dnd-core/INIT_COORDS",qe="dnd-core/BEGIN_DRAG",ht="dnd-core/PUBLISH_DRAG_SOURCE",Ge="dnd-core/HOVER",Be="dnd-core/DROP",ze="dnd-core/END_DRAG";function Xt(e,t){return{type:gt,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}function Pe(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(r){return typeof r}:Pe=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Pe(e)}function ka(e,t,r){return t.split(".").reduce(function(n,a){return n&&n[a]?n[a]:r||null},e)}function Ra(e,t){return e.filter(function(r){return r!==t})}function Pr(e){return Pe(e)==="object"}function Ma(e,t){var r=new Map,n=function(s){r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);var a=[];return r.forEach(function(o,s){o===1&&a.push(s)}),a}function $a(e,t){return e.filter(function(r){return t.indexOf(r)>-1})}var xa={type:gt,payload:{clientOffset:null,sourceClientOffset:null}};function Na(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{publishSource:!0},a=n.publishSource,o=a===void 0?!0:a,s=n.clientOffset,c=n.getSourceClientOffset,f=e.getMonitor(),d=e.getRegistry();e.dispatch(Xt(s)),ja(r,f,d);var v=Ua(r,f);if(v===null){e.dispatch(xa);return}var b=null;if(s){if(!c)throw new Error("getSourceClientOffset must be defined");La(c),b=c(v)}e.dispatch(Xt(s,b));var O=d.getSource(v),m=O.beginDrag(f,v);Ha(m),d.pinSource(v);var S=d.getSourceType(v);return{type:qe,payload:{itemType:S,item:m,sourceId:v,clientOffset:s||null,sourceClientOffset:b||null,isSourcePublic:!!o}}}}function ja(e,t,r){h(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){h(r.getSource(n),"Expected sourceIds to be registered.")})}function La(e){h(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Ha(e){h(Pr(e),"Item must be an object.")}function Ua(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Fa(e){return function(){var r=e.getMonitor();if(r.isDragging())return{type:ht}}}function ot(e,t){return t===null?e===null:Array.isArray(e)?e.some(function(r){return r===t}):e===t}function qa(e){return function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.clientOffset;Ga(r);var o=r.slice(0),s=e.getMonitor(),c=e.getRegistry();Ba(o,s,c);var f=s.getItemType();return za(o,c,f),Wa(o,s,c),{type:Ge,payload:{targetIds:o,clientOffset:a||null}}}}function Ga(e){h(Array.isArray(e),"Expected targetIds to be an array.")}function Ba(e,t,r){h(t.isDragging(),"Cannot call hover while not dragging."),h(!t.didDrop(),"Cannot call hover after drop.");for(var n=0;n<e.length;n++){var a=e[n];h(e.lastIndexOf(a)===n,"Expected targetIds to be unique in the passed array.");var o=r.getTarget(a);h(o,"Expected targetIds to be registered.")}}function za(e,t,r){for(var n=e.length-1;n>=0;n--){var a=e[n],o=t.getTargetType(a);ot(o,r)||e.splice(n,1)}}function Wa(e,t,r){e.forEach(function(n){var a=r.getTarget(n);a.hover(t,n)})}function Kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Yt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kt(Object(r),!0).forEach(function(n){Xa(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ka(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.getMonitor(),a=e.getRegistry();Ya(n);var o=Ja(n);o.forEach(function(s,c){var f=Va(s,c,a,n),d={type:Be,payload:{dropResult:Yt(Yt({},r),f)}};e.dispatch(d)})}}function Ya(e){h(e.isDragging(),"Cannot call drop while not dragging."),h(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Va(e,t,r,n){var a=r.getTarget(e),o=a?a.drop(n,e):void 0;return Qa(o),typeof o>"u"&&(o=t===0?{}:n.getDropResult()),o}function Qa(e){h(typeof e>"u"||Pr(e),"Drop result must either be an object or undefined.")}function Ja(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Za(e){return function(){var r=e.getMonitor(),n=e.getRegistry();ei(r);var a=r.getSourceId();if(a!=null){var o=n.getSource(a,!0);o.endDrag(r,a),n.unpinSource()}return{type:ze}}}function ei(e){h(e.isDragging(),"Cannot call endDrag while not dragging.")}function ti(e){return{beginDrag:Na(e),publishDragSource:Fa(e),hover:qa(e),drop:Ka(e),endDrag:Za(e)}}var ri=function(t,r){return t===r};function ni(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function ai(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ri;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function Vt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Vt(Object(r),!0).forEach(function(n){ii(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ii(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Jt={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function oi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jt,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case gt:case qe:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Ge:return ni(e.clientOffset,r.clientOffset)?e:Qt(Qt({},e),{},{clientOffset:r.clientOffset});case ze:case Be:return Jt;default:return e}}var pt="dnd-core/ADD_SOURCE",vt="dnd-core/ADD_TARGET",yt="dnd-core/REMOVE_SOURCE",We="dnd-core/REMOVE_TARGET";function ui(e){return{type:pt,payload:{sourceId:e}}}function si(e){return{type:vt,payload:{targetId:e}}}function ci(e){return{type:yt,payload:{sourceId:e}}}function fi(e){return{type:We,payload:{targetId:e}}}function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zt(Object(r),!0).forEach(function(n){li(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function li(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var di={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function gi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:di,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case qe:return U(U({},e),{},{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case ht:return U(U({},e),{},{isSourcePublic:!0});case Ge:return U(U({},e),{},{targetIds:r.targetIds});case We:return e.targetIds.indexOf(r.targetId)===-1?e:U(U({},e),{},{targetIds:Ra(e.targetIds,r.targetId)});case Be:return U(U({},e),{},{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ze:return U(U({},e),{},{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function hi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case pt:case vt:return e+1;case yt:case We:return e-1;default:return e}}var He=[],mt=[];He.__IS_NONE__=!0;mt.__IS_ALL__=!0;function pi(e,t){if(e===He)return!1;if(e===mt||typeof t>"u")return!0;var r=$a(t,e);return r.length>0}function vi(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case Ge:break;case pt:case vt:case We:case yt:return He;case qe:case ht:case ze:case Be:default:return mt}var t=e.payload,r=t.targetIds,n=r===void 0?[]:r,a=t.prevTargetIds,o=a===void 0?[]:a,s=Ma(n,o),c=s.length>0||!ai(n,o);if(!c)return He;var f=o[o.length-1],d=n[n.length-1];return f!==d&&(f&&s.push(f),d&&s.push(d)),s}function yi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return e+1}function er(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?er(Object(r),!0).forEach(function(n){mi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):er(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bi(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:vi(e.dirtyHandlerIds,{type:t.type,payload:tr(tr({},t.payload),{},{prevTargetIds:ka(e,"dragOperation.targetIds",[])})}),dragOffset:oi(e.dragOffset,t),refCount:hi(e.refCount,t),dragOperation:gi(e.dragOperation,t),stateId:yi(e.stateId)}}function Di(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ar(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Si(e){var t=e.clientOffset,r=e.initialClientOffset,n=e.initialSourceClientOffset;return!t||!r||!n?null:Ar(Di(t,n),r)}function Oi(e){var t=e.clientOffset,r=e.initialClientOffset;return!t||!r?null:Ar(t,r)}function Ti(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ci(e,t,r){return t&&wi(e.prototype,t),e}var Ii=function(){function e(t,r){Ti(this,e),this.store=t,this.registry=r}return Ci(e,[{key:"subscribeToStateChange",value:function(r){var n=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{handlerIds:void 0},o=a.handlerIds;h(typeof r=="function","listener must be a function."),h(typeof o>"u"||Array.isArray(o),"handlerIds, when specified, must be an array of strings.");var s=this.store.getState().stateId,c=function(){var d=n.store.getState(),v=d.stateId;try{var b=v===s||v===s+1&&!pi(d.dirtyHandlerIds,o);b||r()}finally{s=v}};return this.store.subscribe(c)}},{key:"subscribeToOffsetChange",value:function(r){var n=this;h(typeof r=="function","listener must be a function.");var a=this.store.getState().dragOffset,o=function(){var c=n.store.getState().dragOffset;c!==a&&(a=c,r())};return this.store.subscribe(o)}},{key:"canDragSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r);return h(n,"Expected to find a valid source."),this.isDragging()?!1:n.canDrag(this,r)}},{key:"canDropOnTarget",value:function(r){if(!r)return!1;var n=this.registry.getTarget(r);if(h(n,"Expected to find a valid target."),!this.isDragging()||this.didDrop())return!1;var a=this.registry.getTargetType(r),o=this.getItemType();return ot(a,o)&&n.canDrop(this,r)}},{key:"isDragging",value:function(){return!!this.getItemType()}},{key:"isDraggingSource",value:function(r){if(!r)return!1;var n=this.registry.getSource(r,!0);if(h(n,"Expected to find a valid source."),!this.isDragging()||!this.isSourcePublic())return!1;var a=this.registry.getSourceType(r),o=this.getItemType();return a!==o?!1:n.isDragging(this,r)}},{key:"isOverTarget",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shallow:!1};if(!r)return!1;var a=n.shallow;if(!this.isDragging())return!1;var o=this.registry.getTargetType(r),s=this.getItemType();if(s&&!ot(o,s))return!1;var c=this.getTargetIds();if(!c.length)return!1;var f=c.indexOf(r);return a?f===c.length-1:f>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return!!this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return Si(this.store.getState().dragOffset)}},{key:"getDifferenceFromInitialOffset",value:function(){return Oi(this.store.getState().dragOffset)}}]),e}(),_i=0;function Ei(){return _i++}function Ae(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ae=function(r){return typeof r}:Ae=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ae(e)}function Pi(e){h(typeof e.canDrag=="function","Expected canDrag to be a function."),h(typeof e.beginDrag=="function","Expected beginDrag to be a function."),h(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Ai(e){h(typeof e.canDrop=="function","Expected canDrop to be a function."),h(typeof e.hover=="function","Expected hover to be a function."),h(typeof e.drop=="function","Expected beginDrag to be a function.")}function ut(e,t){if(t&&Array.isArray(e)){e.forEach(function(r){return ut(r,!1)});return}h(typeof e=="string"||Ae(e)==="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}const rr=typeof je<"u"?je:self,kr=rr.MutationObserver||rr.WebKitMutationObserver;function Rr(e){return function(){const r=setTimeout(a,0),n=setInterval(a,50);function a(){clearTimeout(r),clearInterval(n),e()}}}function ki(e){let t=1;const r=new kr(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const Ri=typeof kr=="function"?ki:Rr;class Mi{enqueueTask(t){const{queue:r,requestFlush:n}=this;r.length||(n(),this.flushing=!0),r[r.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.index<t.length;){const r=this.index;if(this.index++,t[r].call(),this.index>this.capacity){for(let n=0,a=t.length-this.index;n<a;n++)t[n]=t[n+this.index];t.length-=this.index,this.index=0}}t.length=0,this.index=0,this.flushing=!1},this.registerPendingError=t=>{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Ri(this.flush),this.requestErrorThrow=Rr(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class $i{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,r){this.onError=t,this.release=r,this.task=null}}class xi{create(t){const r=this.freeTasks,n=r.length?r.pop():new $i(this.onError,a=>r[r.length]=a);return n.task=t,n}constructor(t){this.onError=t,this.freeTasks=[]}}const Mr=new Mi,Ni=new xi(Mr.registerPendingError);function ji(e){Mr.enqueueTask(Ni.create(e))}function Li(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Ui(e,t,r){return t&&Hi(e.prototype,t),e}function Fi(e,t){return zi(e)||Bi(e,t)||Gi(e,t)||qi()}function qi(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gi(e,t){if(e){if(typeof e=="string")return nr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nr(e,t)}}function nr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Bi(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),c;!(n=(c=s.next()).done)&&(r.push(c.value),!(t&&r.length===t));n=!0);}catch(f){a=!0,o=f}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw o}}return r}}function zi(e){if(Array.isArray(e))return e}function Wi(e){var t=Ei().toString();switch(e){case F.SOURCE:return"S".concat(t);case F.TARGET:return"T".concat(t);default:throw new Error("Unknown Handler Role: ".concat(e))}}function ar(e){switch(e[0]){case"S":return F.SOURCE;case"T":return F.TARGET;default:h(!1,"Cannot parse handler ID: ".concat(e))}}function ir(e,t){var r=e.entries(),n=!1;do{var a=r.next(),o=a.done,s=Fi(a.value,2),c=s[1];if(c===t)return!0;n=!!o}while(!n);return!1}var Xi=function(){function e(t){Li(this,e),this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}return Ui(e,[{key:"addSource",value:function(r,n){ut(r),Pi(n);var a=this.addHandler(F.SOURCE,r,n);return this.store.dispatch(ui(a)),a}},{key:"addTarget",value:function(r,n){ut(r,!0),Ai(n);var a=this.addHandler(F.TARGET,r,n);return this.store.dispatch(si(a)),a}},{key:"containsHandler",value:function(r){return ir(this.dragSources,r)||ir(this.dropTargets,r)}},{key:"getSource",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;h(this.isSourceId(r),"Expected a valid source ID.");var a=n&&r===this.pinnedSourceId,o=a?this.pinnedSource:this.dragSources.get(r);return o}},{key:"getTarget",value:function(r){return h(this.isTargetId(r),"Expected a valid target ID."),this.dropTargets.get(r)}},{key:"getSourceType",value:function(r){return h(this.isSourceId(r),"Expected a valid source ID."),this.types.get(r)}},{key:"getTargetType",value:function(r){return h(this.isTargetId(r),"Expected a valid target ID."),this.types.get(r)}},{key:"isSourceId",value:function(r){var n=ar(r);return n===F.SOURCE}},{key:"isTargetId",value:function(r){var n=ar(r);return n===F.TARGET}},{key:"removeSource",value:function(r){var n=this;h(this.getSource(r),"Expected an existing source."),this.store.dispatch(ci(r)),ji(function(){n.dragSources.delete(r),n.types.delete(r)})}},{key:"removeTarget",value:function(r){h(this.getTarget(r),"Expected an existing target."),this.store.dispatch(fi(r)),this.dropTargets.delete(r),this.types.delete(r)}},{key:"pinSource",value:function(r){var n=this.getSource(r);h(n,"Expected an existing source."),this.pinnedSourceId=r,this.pinnedSource=n}},{key:"unpinSource",value:function(){h(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(r,n,a){var o=Wi(r);return this.types.set(o,n),r===F.SOURCE?this.dragSources.set(o,a):r===F.TARGET&&this.dropTargets.set(o,a),o}}]),e}();function Ki(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yi(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Vi(e,t,r){return t&&Yi(e.prototype,t),e}function Qi(e){var t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Pa(bi,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var Ji=function(){function e(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ki(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var a=t.store.getState().refCount>0;t.backend&&(a&&!t.isSetUp?(t.backend.setup(),t.isSetUp=!0):!a&&t.isSetUp&&(t.backend.teardown(),t.isSetUp=!1))};var n=Qi(r);this.store=n,this.monitor=new Ii(n,new Xi(n)),n.subscribe(this.handleRefCountChange)}return Vi(e,[{key:"receiveBackend",value:function(r){this.backend=r}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var r=this,n=this.store.dispatch;function a(s){return function(){for(var c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];var v=s.apply(r,f);typeof v<"u"&&n(v)}}var o=ti(this);return Object.keys(o).reduce(function(s,c){var f=o[c];return s[c]=a(f),s},{})}},{key:"dispatch",value:function(r){this.store.dispatch(r)}}]),e}();function Zi(e,t,r,n){var a=new Ji(n),o=e(a,t,r);return a.receiveBackend(o),a}var ve=D.createContext({dragDropManager:void 0});function $r(e,t,r,n){return{dragDropManager:Zi(e,t,r,n)}}function eo(e,t){return ao(e)||no(e,t)||ro(e,t)||to()}function to(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ro(e,t){if(e){if(typeof e=="string")return or(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return or(e,t)}}function or(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function no(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),c;!(n=(c=s.next()).done)&&(r.push(c.value),!(t&&r.length===t));n=!0);}catch(f){a=!0,o=f}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw o}}return r}}function ao(e){if(Array.isArray(e))return e}function io(e,t){if(e==null)return{};var r=oo(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)n=o[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function oo(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var tt=0,xr=D.memo(function(e){var t=e.children,r=io(e,["children"]),n=uo(r),a=eo(n,2),o=a[0],s=a[1];return D.useEffect(function(){return s&&tt++,function(){if(s&&(tt--,tt===0)){var c=Nr();c[ke]=null}}},[]),D.createElement(ve.Provider,{value:o},t)});xr.displayName="DndProvider";function uo(e){if("manager"in e){var t={dragDropManager:e.manager};return[t,!1]}var r=so(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[r,n]}var ke=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function so(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Nr(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,a=t;return a[ke]||(a[ke]=$r(e,t,r,n)),a[ke]}function Nr(){return typeof je<"u"?je:window}var jr=D.memo(function(e){var t=e.connect,r=e.src;return D.useEffect(function(){if(!(typeof Image>"u")){var n=!1,a=new Image;return a.src=r,a.onload=function(){t(a),n=!0},function(){n&&t(null)}}}),null});jr.displayName="DragPreviewImage";var ae=typeof window<"u"?D.useLayoutEffect:D.useEffect;function z(e,t,r,n){var a=r?r.call(n,e,t):void 0;if(a!==void 0)return!!a;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;var o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(t),f=0;f<o.length;f++){var d=o[f];if(!c(d))return!1;var v=e[d],b=t[d];if(a=r?r.call(n,v,b,d):void 0,a===!1||a===void 0&&v!==b)return!1}return!0}function co(e,t){return ho(e)||go(e,t)||lo(e,t)||fo()}function fo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lo(e,t){if(e){if(typeof e=="string")return ur(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ur(e,t)}}function ur(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function go(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),c;!(n=(c=s.next()).done)&&(r.push(c.value),!(t&&r.length===t));n=!0);}catch(f){a=!0,o=f}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw o}}return r}}function ho(e){if(Array.isArray(e))return e}function Lr(e,t,r){var n=D.useState(function(){return t(e)}),a=co(n,2),o=a[0],s=a[1],c=D.useCallback(function(){var f=t(e);z(o,f)||(s(f),r&&r())},[o,e,r]);return ae(c,[]),[o,c]}function po(e,t){return bo(e)||mo(e,t)||yo(e,t)||vo()}function vo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-
|
|
2
|
-
import{at as d2,j as o,aG as se,cQ as g0,aK as A,fG as X1,aJ as je,aE as $e,aF as Fe,T as G,r as R,aI as m1,aL as u2,aM as Ue,aN as qe,cX as p2,fH as l1,X as Se,Y as ke,B as z,n as Oe,P as h,$ as We,G as X,e as v1,u as te,aP as we,aY as Ve,bx as n1,a1 as e1,L as ue,bL as b0,a as ve,aC as ge,K as h2,t as $,Z as ae,dE as f2,aa as ye,c as pe,I as x2,bW as g1,ci as j0,cL as m2,cU as He,cV as w0,aj as v2,da as g2,cP as Je,bF as re,c3 as Qe,fs as b2,a8 as J1,fI as j2,b as ne,bm as R0,ek as C0,ai as b1,bn as y0,cz as z0,aT as Ae,aS as w2,a3 as S0,fJ as Q1,ff as Le,bk as R2,au as k0,d2 as C2,l as y2,aB as z2,aq as S2,ar as i1}from"./index-BowU-Rc8.js";import{d as j1}from"./Add-DhnwVxhZ.js";import{d as I0,a as k2}from"./Delete-P7WqUbyQ.js";import{d as I2}from"./Error-CjCi6iqE.js";import{D as w1}from"./index-B6rU6yZ1.js";import{T as M0,b as M2}from"./index-D5jbzTmg.js";import{C as R1}from"./confirm-CPhW4Ln4.js";import{u as s1}from"./session-4S4FY2oN.js";import{W as Y1}from"./did-address-qp4O986k.js";import{B as C1}from"./bundle-avatar-DFcMZdHK.js";import{S as be}from"./shorten-label-8aKNnW15.js";import{A as P0}from"./Avatar-BZ_OPd3a.js";import{d as P2}from"./Download-DBU6UuKg.js";import{d as L2}from"./QuestionMarkCircle-Dkgs-LrD.js";import{b as T2,c as Z1,T as N2}from"./index-B61Zk4zc.js";import{_ as Pe}from"./useSetState-Dvi1U0Nw.js";import{c as y1}from"./index-BnLNgi5J.js";import{C as u1,L as V2}from"./MoreVert-6z9sYyBh.js";import{A as L0}from"./Alert-C2mTW_RW.js";import{p as t1}from"./index-BZ9M67Kd.js";import"./api-noKs5rUY.js";import{i as D2}from"./index-D0Foc0Tz.js";import{d as _2}from"./ExpandMore-BjFaf3Fo.js";import{d as E2}from"./ChevronRight-DwKqpeOS.js";import{d as B2}from"./OpenInNew-B7MVFrbE.js";import{u as T0}from"./useThemeProps-BVeww5NE.js";import{F as p1}from"./FormControlLabel-C2tfmf09.js";import{u as A2}from"./useSlotProps-BO61t83_.js";import{d as O2}from"./DeleteOutline-BrrioL98.js";import{c as H2,A as N0,u as $2,S as F2,U as U2}from"./item-CKNXAp6H.js";import{d as q2}from"./ArrowDropDown-wj9U9ZE8.js";import{f as Ne}from"./format-error-BvNwPRch.js";import{B as h1}from"./ButtonGroup-CFQqy_jV.js";import{T as Te}from"./TextField-CVbbJh-y.js";import{I as z1}from"./InputAdornment-BFyVcV9g.js";import{C as W2}from"./click-to-copy-DSLKklSI.js";import{d as G2}from"./Launch-CM54bxPy.js";import{S as e0}from"./index-LmZHdjQZ.js";import{M as K2}from"./index-DtHgjXc_.js";import{p as X2}from"./purify.es-Bq0E5Q3l.js";import{r as J2}from"./index-C6bJ8C3n.js";import{d as Q2}from"./Done-B8u3JQ36.js";import{c as V0,d as D0,b as Y2,S as Z2,a as et}from"./Stepper-VAkPR7Rp.js";import{S as tt}from"./Stack-CcM0sATd.js";import{R as ot,a as t0}from"./RadioGroup-F9HJgTgP.js";import"./Grid-BArO7d1G.js";import"./emotion-cache.browser.esm-CRw46sQ7.js";import"./index-BZKKn0ch.js";import"./redux-CJ8S87pk.js";import"./ViewColumn-cHwmzgaQ.js";import"./FormControl-B9P20sHZ.js";import"./useFormControl-CqDUGVwx.js";import"./FormGroup-QeEOGRIO.js";import"./Select-DN5ZDrhq.js";import"./InputLabel-FW_WnrBG.js";import"./LastPage-BbNDF-1B.js";import"./Toolbar-DMWwm961.js";import"./Search-Bm4BV5ff.js";import"./index-CDo-yvx8.js";import"./DialogContentText-BECZzyeS.js";import"./Link-BLv1ybKR.js";import"./useSlot-CBvar7i-.js";import"./jss-plugin-props-sort.esm-DoSjjNR1.js";const lt=d2(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),nt=["slots","slotProps"],st=se(g0)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:X1(e.palette.grey[200],.12)}:{backgroundColor:X1(e.palette.grey[600],.12)})})),rt=se(lt)({width:24,height:16});function it(e){const{slots:t={},slotProps:l={}}=e,s=je(e,nt),r=e;return o.jsx("li",{children:o.jsx(st,A({focusRipple:!0},s,{ownerState:r,children:o.jsx(rt,A({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function at(e){return Fe("MuiBreadcrumbs",e)}const ct=$e("MuiBreadcrumbs",["root","ol","li","separator"]),dt=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ut=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},at,t)},pt=se(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ct.li}`]:t.li},t.root]})({}),ht=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ft=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function xt(e,t,l,s){return e.reduce((r,c,i)=>(i<e.length-1?r=r.concat(c,o.jsx(ft,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(c),r),[])}const _0=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:c,component:i="nav",slots:a={},slotProps:u={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=s,d=je(s,dt),[m,b]=R.useState(!1),v=A({},s,{component:i,expanded:m,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=ut(v),S=u2({elementType:a.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),N=R.useRef(null),T=I=>{const U=()=>{b(!0);const V=N.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=I.length?I:[...I.slice(0,g),o.jsx(it,{"aria-label":f,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:U},"ellipsis"),...I.slice(I.length-x,I.length)]},P=R.Children.toArray(r).filter(I=>R.isValidElement(I)).map((I,U)=>o.jsx("li",{className:C.li,children:I},`child-${U}`));return o.jsx(pt,A({ref:l,component:i,color:"text.secondary",className:Ue(C.root,c),ownerState:v},d,{children:o.jsx(ht,{className:C.ol,ref:N,ownerState:v,children:xt(m||y&&P.length<=y?P:T(P),C.separator,p,v)})}))});function mt(e){return Fe("MuiStepButton",e)}const o0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),vt=["children","className","icon","optional"],gt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},mt,t)},bt=se(g0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${o0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>A({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${o0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),jt=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepButton"}),{children:r,className:c,icon:i,optional:a}=s,u=je(s,vt),{disabled:f,active:x}=R.useContext(V0),{orientation:g}=R.useContext(D0),y=A({},s,{orientation:g}),p=gt(y),d={icon:i,optional:a},m=p2(r,["StepLabel"])?R.cloneElement(r,d):o.jsx(Y2,A({},d,{children:r}));return o.jsx(bt,A({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,c),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))});function wt(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const Rt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],Ct=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},wt,t)},yt=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>A({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),zt=se(l1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),St=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepContent"}),{children:r,className:c,TransitionComponent:i=l1,transitionDuration:a="auto",TransitionProps:u}=s,f=je(s,Rt);R.useContext(D0);const{active:x,last:g,expanded:y}=R.useContext(V0),p=A({},s,{last:g}),d=Ct(p);let m=a;return a==="auto"&&!i.muiSupportAuto&&(m=void 0),o.jsx(yt,A({className:Ue(d.root,c),ref:l,ownerState:p},f,{children:o.jsx(zt,A({as:i,in:x||y,className:d.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:r}))}))});var S1={},kt=ke;Object.defineProperty(S1,"__esModule",{value:!0});var E0=S1.default=void 0,It=kt(Se()),Mt=o;E0=S1.default=(0,It.default)((0,Mt.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var k1={},Pt=ke;Object.defineProperty(k1,"__esModule",{value:!0});var B0=k1.default=void 0,Lt=Pt(Se()),Tt=o;B0=k1.default=(0,Lt.default)((0,Tt.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var I1={},Nt=ke;Object.defineProperty(I1,"__esModule",{value:!0});var A0=I1.default=void 0,Vt=Nt(Se()),Dt=o;A0=I1.default=(0,Vt.default)((0,Dt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Ie({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(Oe,{size:e})})}Ie.propTypes={size:h.number};Ie.defaultProps={size:24};function M1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[a,u]=R.useState(!1),f=We(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(P0,{sx:{borderRadius:1},src:i}),o.jsxs(z,{children:[o.jsx(be,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(be,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:r||"/"})]})]})}M1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function P1({initUrl:e}){const t=v1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:c}=we(),{api:i}=s1(),[a,u]=R.useState(!0),{blocklet:f}=Ve(),[x,g]=R.useState(null),[y,p]=R.useState(!1),d=We(k=>k.breakpoints.down("xl")),{componentDid:m=""}=n1(),[b,v]=R.useState(null),C=()=>{c.getProjects({input:{did:f.meta.did,componentDid:m,tenantScope:l}}).then(k=>{const L=(k==null?void 0:k.projects)||[];u(!1),v(L)}).catch(k=>{u(!1),$.error(k.message)})},S=()=>{t(`${X.UNOWNED_DID}/create/none`,{replace:!0})},N=k=>{g(k)},T=()=>{u(!1),p(!0)},P=()=>{p(!1),g(null)},I=k=>{$.error(k.message),p(!1),g(null)},U=k=>{if(!(k!=null&&k.deleted)){$.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!b&&a)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Ie,{})});if(!b)return null;if(!b.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(e1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:k=>{const L=b[k];return o.jsx(ue,{to:`${L.id}`,children:o.jsx(M1,{did:f.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:k=>k?o.jsx(M0,{type:"success",children:k}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:k=>k?o.jsx(Y1,{size:14,compact:!0,responsive:!1,did:k}):null}},d||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:k=>k?o.jsx(Y1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${k}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:k}):null}},d||m?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:k=>{const L=(f.children||[]).find(E=>E.meta.did===k);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:14,blocklet:L,ancestors:[f]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},k):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:k=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(be,{children:k})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:k=>o.jsx(b0,{value:Number(k),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{const L=b[k];return o.jsxs(z,{display:"flex",children:[o.jsx(ue,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"create",children:o.jsx(E0,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"secondary","aria-label":"create",children:o.jsx(ue,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(B0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"delete",onClick:()=>N(L),children:o.jsx(I0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),M=y?o.jsx(h2,{open:!0,popup:!0,onClose:P,action:"check-has-project-id",locale:r,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:U,onError:I,extraParams:{projectId:x.id,did:f.meta.did,name:x.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(_t,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(A0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(e1,{onClick:S,variant:"contained",children:[o.jsx(j1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(w1,{className:"main-table",locale:r,data:b,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(R1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(k=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(I2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(G,{component:"span",variant:"inherit",color:"text.secondary",children:k})]}))})}),M]})}P1.propTypes={initUrl:h.object};P1.defaultProps={initUrl:null};const _t=ae(z)`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-DnVaFLUv.js","assets/index-D0ZDnsBw.js","assets/index-D8NuaJ66.css","assets/index-DZZkPDZs.js","assets/index-BJ0k59Tf.js","assets/index-DMhVY_t6.js","assets/toUpper-o91NwuX3.js","assets/index-YwELWQn6.js","assets/fallback-C9ko-lGM.js","assets/index-C-yt1SFf.js","assets/Menu-DAx78rf8.js","assets/Toolbar-Czbh9Thi.js","assets/Hidden-BnLj1Yrh.js","assets/index-CbJ7Ycw4.js","assets/MoreVert-pbCfz7_a.js","assets/FormControlLabel-DsxW3p6G.js","assets/useFormControl-CXaDIKmg.js","assets/Stack-CzT1qtfF.js","assets/ListItemButton-D3vwOyXA.js","assets/selector-Ckqt3gtd.js","assets/ExpandMore-BW_GpjfP.js","assets/Avatar-DdU9cWoa.js","assets/useSlot-CDeXSS5P.js","assets/resource-dialog-BSFeyQ_K.js","assets/index-D2bv65kG.js","assets/emotion-cache.browser.esm-BjIoAnXy.js","assets/OpenInNew-DH9cfgTx.js","assets/index-BB2DzNFr.js","assets/index-yjZBmDn6.js","assets/CloseOutlined-C_enpVct.js","assets/Link-BSkaanak.js","assets/index-YhmyCsjd.js","assets/index-ximM9jK2.js","assets/index-DUvxK_pJ.js","assets/index-BSHqUvvB.js","assets/useThemeProps-CBbxmVEG.js","assets/Grid-Dne3bmfg.js","assets/index-CIO5rH3U.js","assets/redux-Ca86ARNo.js","assets/ViewColumn-adtX8zvr.js","assets/FormControl-y2eP2gzP.js","assets/FormGroup-COgg0lwB.js","assets/Select-BJHtvl4z.js","assets/InputLabel-DlIX2kte.js","assets/Delete-CghY174I.js","assets/TextField-DNDZQTge.js","assets/LastPage-BAT94flJ.js","assets/Search-RYv9IOCL.js","assets/index-Cdj39Rch.js","assets/deprecate-BG-RqYhQ.js","assets/url-join-Bx_A70NM.js","assets/uniqBy-Chi1M0dq.js","assets/purify.es-Bq0E5Q3l.js","assets/react-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{at as d2,j as o,aG as se,cQ as g0,aK as A,fG as X1,aJ as je,aE as $e,aF as Fe,T as G,r as R,aI as m1,aL as u2,aM as Ue,aN as qe,cX as p2,fH as l1,X as Se,Y as ke,B as z,n as Oe,P as h,$ as We,G as X,e as v1,u as te,aP as we,aY as Ve,bx as n1,a1 as e1,L as ue,bL as b0,a as ve,aC as ge,K as h2,t as $,Z as ae,dE as f2,aa as ye,c as pe,I as x2,bW as g1,ci as j0,cL as m2,cU as He,cV as w0,aj as v2,da as g2,cP as Je,bF as re,c3 as Qe,fs as b2,a8 as J1,fI as j2,b as ne,bm as R0,ek as C0,ai as b1,bn as y0,cz as z0,aT as Ae,aS as w2,a3 as S0,fJ as Q1,ff as Le,bk as R2,au as k0,d2 as C2,l as y2,aB as z2,aq as S2,ar as i1}from"./index-D0ZDnsBw.js";import{d as j1}from"./Add-DEc5Gaew.js";import{d as I0,a as k2}from"./Delete-CghY174I.js";import{d as I2}from"./Error-D_y85can.js";import{D as w1}from"./index-BSHqUvvB.js";import{T as M0,b as M2}from"./index-DO83-4pr.js";import{C as R1}from"./confirm-CDYYkoPB.js";import{u as s1}from"./session-BT3UDuRe.js";import{W as Y1}from"./did-address-DvBIH5D8.js";import{B as C1}from"./bundle-avatar-Dx1RwhB-.js";import{S as be}from"./shorten-label-cwsaVcrz.js";import{A as P0}from"./Avatar-DdU9cWoa.js";import{d as P2}from"./Download-0mTt88jR.js";import{d as L2}from"./QuestionMarkCircle-Nkpa63G6.js";import{b as T2,c as Z1,T as N2}from"./index-YhmyCsjd.js";import{_ as Pe}from"./useSetState-7DwsrT08.js";import{c as y1}from"./index-DMhVY_t6.js";import{C as u1,L as V2}from"./MoreVert-pbCfz7_a.js";import{A as L0}from"./Alert-CupQqU2h.js";import{p as t1}from"./index-D9IhBRcZ.js";import"./api-DLSmmaM3.js";import{i as D2}from"./index-yjZBmDn6.js";import{d as _2}from"./ExpandMore-BW_GpjfP.js";import{d as E2}from"./ChevronRight-CBiHXwpN.js";import{d as B2}from"./OpenInNew-DH9cfgTx.js";import{u as T0}from"./useThemeProps-CBbxmVEG.js";import{F as p1}from"./FormControlLabel-DsxW3p6G.js";import{u as A2}from"./useSlotProps-y4Nw2SFi.js";import{d as O2}from"./DeleteOutline-DTzpYuUU.js";import{c as H2,A as N0,u as $2,S as F2,U as U2}from"./item-BAa88ldN.js";import{d as q2}from"./ArrowDropDown-B1k8ApwT.js";import{f as Ne}from"./format-error-B-leFeoI.js";import{B as h1}from"./ButtonGroup-DU8AIwgk.js";import{T as Te}from"./TextField-DNDZQTge.js";import{I as z1}from"./InputAdornment-vYojJBmt.js";import{C as W2}from"./click-to-copy-CerMtW1G.js";import{d as G2}from"./Launch-BMtVhnlU.js";import{S as e0}from"./index-DUvxK_pJ.js";import{M as K2}from"./index-HsQ3WMC6.js";import{p as X2}from"./purify.es-Bq0E5Q3l.js";import{r as J2}from"./index-B2w_BGLq.js";import{d as Q2}from"./Done-CRBMAgWC.js";import{c as V0,d as D0,b as Y2,S as Z2,a as et}from"./Stepper-DIDg14Y1.js";import{S as tt}from"./Stack-CzT1qtfF.js";import{R as ot,a as t0}from"./RadioGroup-BFz6MuWT.js";import"./Grid-Dne3bmfg.js";import"./emotion-cache.browser.esm-BjIoAnXy.js";import"./index-CIO5rH3U.js";import"./redux-Ca86ARNo.js";import"./ViewColumn-adtX8zvr.js";import"./FormControl-y2eP2gzP.js";import"./useFormControl-CXaDIKmg.js";import"./FormGroup-COgg0lwB.js";import"./Select-BJHtvl4z.js";import"./InputLabel-DlIX2kte.js";import"./LastPage-BAT94flJ.js";import"./Toolbar-Czbh9Thi.js";import"./Search-RYv9IOCL.js";import"./index-ximM9jK2.js";import"./DialogContentText-KJ1VziGc.js";import"./Link-BSkaanak.js";import"./useSlot-CDeXSS5P.js";import"./jss-plugin-props-sort.esm-K8zlWBTt.js";const lt=d2(o.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),nt=["slots","slotProps"],st=se(g0)(({theme:e})=>A({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":A({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":A({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:X1(e.palette.grey[200],.12)}:{backgroundColor:X1(e.palette.grey[600],.12)})})),rt=se(lt)({width:24,height:16});function it(e){const{slots:t={},slotProps:l={}}=e,s=je(e,nt),r=e;return o.jsx("li",{children:o.jsx(st,A({focusRipple:!0},s,{ownerState:r,children:o.jsx(rt,A({as:t.CollapsedIcon,ownerState:r},l.collapsedIcon))}))})}function at(e){return Fe("MuiBreadcrumbs",e)}const ct=$e("MuiBreadcrumbs",["root","ol","li","separator"]),dt=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],ut=e=>{const{classes:t}=e;return qe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},at,t)},pt=se(G,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${ct.li}`]:t.li},t.root]})({}),ht=se("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),ft=se("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function xt(e,t,l,s){return e.reduce((r,c,i)=>(i<e.length-1?r=r.concat(c,o.jsx(ft,{"aria-hidden":!0,className:t,ownerState:s,children:l},`separator-${i}`)):r.push(c),r),[])}const _0=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiBreadcrumbs"}),{children:r,className:c,component:i="nav",slots:a={},slotProps:u={},expandText:f="Show path",itemsAfterCollapse:x=1,itemsBeforeCollapse:g=1,maxItems:y=8,separator:p="/"}=s,d=je(s,dt),[m,b]=R.useState(!1),v=A({},s,{component:i,expanded:m,expandText:f,itemsAfterCollapse:x,itemsBeforeCollapse:g,maxItems:y,separator:p}),C=ut(v),S=u2({elementType:a.CollapsedIcon,externalSlotProps:u.collapsedIcon,ownerState:v}),N=R.useRef(null),T=I=>{const U=()=>{b(!0);const V=N.current.querySelector("a[href],button,[tabindex]");V&&V.focus()};return g+x>=I.length?I:[...I.slice(0,g),o.jsx(it,{"aria-label":f,slots:{CollapsedIcon:a.CollapsedIcon},slotProps:{collapsedIcon:S},onClick:U},"ellipsis"),...I.slice(I.length-x,I.length)]},P=R.Children.toArray(r).filter(I=>R.isValidElement(I)).map((I,U)=>o.jsx("li",{className:C.li,children:I},`child-${U}`));return o.jsx(pt,A({ref:l,component:i,color:"text.secondary",className:Ue(C.root,c),ownerState:v},d,{children:o.jsx(ht,{className:C.ol,ref:N,ownerState:v,children:xt(m||y&&P.length<=y?P:T(P),C.separator,p,v)})}))});function mt(e){return Fe("MuiStepButton",e)}const o0=$e("MuiStepButton",["root","horizontal","vertical","touchRipple"]),vt=["children","className","icon","optional"],gt=e=>{const{classes:t,orientation:l}=e;return qe({root:["root",l],touchRipple:["touchRipple"]},mt,t)},bt=se(g0,{name:"MuiStepButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[{[`& .${o0.touchRipple}`]:t.touchRipple},t.root,t[l.orientation]]}})(({ownerState:e})=>A({width:"100%",padding:"24px 16px",margin:"-24px -16px",boxSizing:"content-box"},e.orientation==="vertical"&&{justifyContent:"flex-start",padding:"8px",margin:"-8px"},{[`& .${o0.touchRipple}`]:{color:"rgba(0, 0, 0, 0.3)"}})),jt=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepButton"}),{children:r,className:c,icon:i,optional:a}=s,u=je(s,vt),{disabled:f,active:x}=R.useContext(V0),{orientation:g}=R.useContext(D0),y=A({},s,{orientation:g}),p=gt(y),d={icon:i,optional:a},m=p2(r,["StepLabel"])?R.cloneElement(r,d):o.jsx(Y2,A({},d,{children:r}));return o.jsx(bt,A({focusRipple:!0,disabled:f,TouchRippleProps:{className:p.touchRipple},className:Ue(p.root,c),ref:l,ownerState:y,"aria-current":x?"step":void 0},u,{children:m}))});function wt(e){return Fe("MuiStepContent",e)}$e("MuiStepContent",["root","last","transition"]);const Rt=["children","className","TransitionComponent","transitionDuration","TransitionProps"],Ct=e=>{const{classes:t,last:l}=e;return qe({root:["root",l&&"last"],transition:["transition"]},wt,t)},yt=se("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:l}=e;return[t.root,l.last&&t.last]}})(({ownerState:e,theme:t})=>A({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:t.vars?`1px solid ${t.vars.palette.StepContent.border}`:`1px solid ${t.palette.mode==="light"?t.palette.grey[400]:t.palette.grey[600]}`},e.last&&{borderLeft:"none"})),zt=se(l1,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),St=R.forwardRef(function(t,l){const s=m1({props:t,name:"MuiStepContent"}),{children:r,className:c,TransitionComponent:i=l1,transitionDuration:a="auto",TransitionProps:u}=s,f=je(s,Rt);R.useContext(D0);const{active:x,last:g,expanded:y}=R.useContext(V0),p=A({},s,{last:g}),d=Ct(p);let m=a;return a==="auto"&&!i.muiSupportAuto&&(m=void 0),o.jsx(yt,A({className:Ue(d.root,c),ref:l,ownerState:p},f,{children:o.jsx(zt,A({as:i,in:x||y,className:d.transition,ownerState:p,timeout:m,unmountOnExit:!0},u,{children:r}))}))});var S1={},kt=ke;Object.defineProperty(S1,"__esModule",{value:!0});var E0=S1.default=void 0,It=kt(Se()),Mt=o;E0=S1.default=(0,It.default)((0,Mt.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox");var k1={},Pt=ke;Object.defineProperty(k1,"__esModule",{value:!0});var B0=k1.default=void 0,Lt=Pt(Se()),Tt=o;B0=k1.default=(0,Lt.default)((0,Tt.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H15v-8h5V8zm-1 7V3.5L18.5 9zm4 12.66V16h5.66v2h-2.24l2.95 2.95-1.41 1.41L19 19.41v2.24h-2z"}),"FileOpen");var I1={},Nt=ke;Object.defineProperty(I1,"__esModule",{value:!0});var A0=I1.default=void 0,Vt=Nt(Se()),Dt=o;A0=I1.default=(0,Vt.default)((0,Dt.jsx)("path",{d:"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4"}),"HelpOutlineOutlined");function Ie({size:e,...t}){return o.jsx(z,{display:"flex",mt:4,...t,children:o.jsx(Oe,{size:e})})}Ie.propTypes={size:h.number};Ie.defaultProps={size:24};function M1({did:e,projectId:t,title:l,logo:s,describe:r}){const i=`${`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e}/${t}/logo/upload`}/${s}`,[a,u]=R.useState(!1),f=We(x=>x.breakpoints.down("md"));return o.jsxs(z,{sx:{display:"flex",flexDirection:"row",color:a?"primary.main":"grey.900",gap:1},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[o.jsx(P0,{sx:{borderRadius:1},src:i}),o.jsxs(z,{children:[o.jsx(be,{hiddenTip:!0,maxLength:"24",sx:{fontSize:"14px",fontWeight:"500",color:f?"primary.main":""},children:l||"/"}),o.jsx(be,{hiddenTip:!0,maxLength:"58",sx:{fontSize:"12px",color:f||a?"primary.main":"grey.700"},children:r||"/"})]})]})}M1.propTypes={projectId:h.string.isRequired,did:h.string.isRequired,title:h.string.isRequired,logo:h.string.isRequired,describe:h.string.isRequired};function P1({initUrl:e}){const t=v1(),l=(e==null?void 0:e.searchParams.get("tenantScope"))||"",{t:s,locale:r}=te(),{api:c}=we(),{api:i}=s1(),[a,u]=R.useState(!0),{blocklet:f}=Ve(),[x,g]=R.useState(null),[y,p]=R.useState(!1),d=We(k=>k.breakpoints.down("xl")),{componentDid:m=""}=n1(),[b,v]=R.useState(null),C=()=>{c.getProjects({input:{did:f.meta.did,componentDid:m,tenantScope:l}}).then(k=>{const L=(k==null?void 0:k.projects)||[];u(!1),v(L)}).catch(k=>{u(!1),$.error(k.message)})},S=()=>{t(`${X.UNOWNED_DID}/create/none`,{replace:!0})},N=k=>{g(k)},T=()=>{u(!1),p(!0)},P=()=>{p(!1),g(null)},I=k=>{$.error(k.message),p(!1),g(null)},U=k=>{if(!(k!=null&&k.deleted)){$.error("Delete project failed");return}C(),p(!1),g(null)};if(R.useEffect(()=>{C()},[]),!b&&a)return o.jsx(z,{sx:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:"40px"},children:o.jsx(Ie,{})});if(!b)return null;if(!b.length)return o.jsxs(z,{display:"flex",flexDirection:"column",alignItems:"center",pt:10,children:[o.jsx(z,{sx:{fontSize:20,fontWeight:"bold",mb:3},children:s("blocklet.publish.blockletEmptyTip")}),o.jsx(z,{sx:{fontSize:14,color:"text.secondary",mb:3},children:s("blocklet.publish.createBlockletTip")}),o.jsx(e1,{onClick:S,variant:"contained",children:s("blocklet.publish.createBlocklet")})]});const V=[{label:"Blocklet",name:"blockletTitle",minWidth:160,options:{customBodyRenderLite:k=>{const L=b[k];return o.jsx(ue,{to:`${L.id}`,children:o.jsx(M1,{did:f.meta.did,projectId:L.id,logo:L.blockletLogo,title:L.blockletTitle,describe:L.blockletDescription})})}}},{label:"Version",name:"blockletVersion",options:{customBodyRender:k=>k?o.jsx(M0,{type:"success",children:k}):""}},{label:"DID",name:"blockletDid",options:{customBodyRender:k=>k?o.jsx(Y1,{size:14,compact:!0,responsive:!1,did:k}):null}},d||m?null:{label:s("common.createdBy"),name:"createdBy",options:{customBodyRender:k=>k?o.jsx(Y1,{onClick:()=>{t(`/.well-known/service/admin/members?did=${k}`)},style:{cursor:"pointer"},size:14,compact:!0,copyable:!1,showQrcode:!1,responsive:!1,did:k}):null}},d||m?null:{label:s("common.scope"),name:"componentDid",options:{customBodyRender:k=>{const L=(f.children||[]).find(E=>E.meta.did===k);return L?o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:14,blocklet:L,ancestors:[f]}),o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:L.meta.title})]},k):""}}},d||l?null:{label:s("blocklet.publish.tenantScope"),name:"tenantScope",options:{customBodyRender:k=>o.jsx(z,{ml:.5,sx:{ml:.5,color:"text.primary",fontSize:14},children:o.jsx(be,{children:k})})}},{label:s("common.updatedAt"),name:"updatedAt",options:{customBodyRender:k=>o.jsx(b0,{value:Number(k),locale:r})}},{label:s("common.actions"),name:"actions",options:{customBodyRenderLite:k=>{const L=b[k];return o.jsxs(z,{display:"flex",children:[o.jsx(ue,{to:`${L.id}/new-release/${L.lastReleaseId}`,children:o.jsx(ve,{title:s("blocklet.publish.createRelease"),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"create",children:o.jsx(E0,{style:{fontSize:18}})})})}),!!L.lastReleaseId&&o.jsx(ve,{title:s("blocklet.publish.viewLastRelease",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"secondary","aria-label":"create",children:o.jsx(ue,{style:{display:"flex"},to:`${L.id}/view/${L.lastReleaseId}`,children:o.jsx(B0,{sx:{fontSize:18}})})})}),o.jsx(ve,{title:s("blocklet.publish.delete",{name:L.blockletTitle}),placement:"top",children:o.jsx(ge,{color:"primary","aria-label":"delete",onClick:()=>N(L),children:o.jsx(I0,{sx:{fontSize:18}})})})]})}}}].filter(Boolean),M=y?o.jsx(h2,{open:!0,popup:!0,onClose:P,action:"check-has-project-id",locale:r,checkFn:i.get,saveConnect:!1,forceConnected:!1,checkTimeout:5*60*1e3,onSuccess:U,onError:I,extraParams:{projectId:x.id,did:f.meta.did,name:x.blockletTitle},messages:{title:s("blocklet.publish.deleteProject.title",{name:x.blockletTitle}),scan:s("blocklet.publish.deleteProject.scan",{name:x.blockletTitle}),confirm:s("blocklet.publish.deleteProject.confirm"),success:s("blocklet.publish.deleteProject.success")}}):null;return o.jsxs(_t,{children:[o.jsxs(z,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[o.jsxs(z,{display:"flex",flexDirection:"row",alignItems:"center",children:[o.jsx(z,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:s("common.blockletStudio")}),o.jsx(ve,{title:s("blocklet.publish.createBlockletTip"),arrow:!0,placement:"right",children:o.jsx(A0,{sx:{opacity:.6,fontSize:"1.1em",ml:1}})})]}),o.jsxs(e1,{onClick:S,variant:"contained",children:[o.jsx(j1,{style:{fontSize:"1.3em",marginRight:4}}),s("blocklet.publish.createBlocklet")]})]}),o.jsx(z,{mt:3}),o.jsx(w1,{className:"main-table",locale:r,data:b,columns:V,options:{sort:!1,download:!1,filter:!1,print:!1,search:!1}}),x&&o.jsx(R1,{title:`${s("common.delete")} ${x.blockletTitle}`,description:s("blocklet.publish.deleteProject.description"),confirm:s("common.confirm"),onConfirm:T,onCancel:()=>g(null),children:o.jsx(z,{sx:{marginTop:2},children:[s("blocklet.publish.deleteProject.tip1"),s("blocklet.publish.deleteProject.tip2"),s("blocklet.publish.deleteProject.tip3")].map(k=>o.jsxs(z,{sx:{display:"flex",marginTop:1,flexDirection:"row",alignItems:"flex-start"},children:[o.jsx(I2,{color:"warning",sx:{marginRight:1,fontSize:20,marginTop:"2px"}}),o.jsx(G,{component:"span",variant:"inherit",color:"text.secondary",children:k})]}))})}),M]})}P1.propTypes={initUrl:h.object};P1.defaultProps={initUrl:null};const _t=ae(z)`
|
|
3
3
|
.main-table > div:first-child {
|
|
4
4
|
display: none;
|
|
5
5
|
}
|
|
@@ -133,7 +133,7 @@ import{at as d2,j as o,aG as se,cQ as g0,aK as A,fG as X1,aJ as je,aE as $e,aF a
|
|
|
133
133
|
background: #fff;
|
|
134
134
|
z-index: 10;
|
|
135
135
|
}
|
|
136
|
-
`,c0="lastWantToConnectStoreId";function Kl(e){var a,u;const[t,l]=R.useState(null),{session:s}=s1(),r=R.useCallback(f=>{l(f),localStorage.setItem(c0,f==null?void 0:f.id)},[l]),c=R.useMemo(()=>{var y,p,d,m;const f=localStorage.getItem(c0),x=f?(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(b=>b.id===f):null;if(x)return x;let g=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(b=>{var v;return!(b.id!==X.BLOCKLET_STORE.id||b.scope&&b.scope!=="studio"&&b.scope!==((v=s==null?void 0:s.user)==null?void 0:v.did))});return g||(g=(m=(d=e==null?void 0:e.settings)==null?void 0:d.storeList)==null?void 0:m[0]),g},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||c||{},r]}const d1={};async function K0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){d1[r]&&clearTimeout(d1[r]),await new Promise(a=>setTimeout(a,s));const c=Date.now(),i=async(a,u)=>{try{const f=await e();a(f)}catch(f){Date.now()-c>l?u(f):r?d1[r]=setTimeout(()=>i(a,u),t):setTimeout(()=>i(a,u),t)}};return new Promise(i)}function Xl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Jl(e,{did:t,projectId:l,messageId:s}){return K0(async()=>{var c;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((c=r==null?void 0:r.project)!=null&&c.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function Ql(e,{did:t,projectId:l,storeId:s}){return K0(async()=>{var i,a;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((a=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!r.project.connectedStores.find(u=>u.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const X0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,a;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let c=e?((a=l==null?void 0:l.settings)==null?void 0:a.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(c)||(c=[]),c=c.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:r,storeList:c}};function H1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:c,componentDid:i}){var L,E,B;const{t:a}=te(),{session:u}=s1(),{api:f,info:x,inService:g}=we(),y=Ve(),[p,d]=R.useState(!1),m=R.useRef(null),[b,v]=R.useState(!1),[C,S]=R.useState(null),N=O=>{l(O),d(!1)},T=()=>{d(!p)},P=O=>{m.current&&m.current.contains(O.target)||d(!1)},I=()=>{v(!0)},U=()=>{v(!1)},V=async()=>{var O;if(C)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((O=y==null?void 0:y.actions)==null?void 0:O.refreshBlocklet())}catch(K){$.error(`Remove Blocklet Store Error: ${Ne(K)}`)}finally{S(null)}},{storeList:M}=X0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:i,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),k=(E=e==null?void 0:e.meta)==null?void 0:E.did;return o.jsxs(o.Fragment,{children:[o.jsxs(h1,{disabled:r,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[c&&o.jsx(Oe,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${t.name||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx(q2,{})})]}),o.jsx(R0,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:O})=>o.jsx(C0,{...O,style:{transformOrigin:"center top"},children:o.jsx(b1,{children:o.jsx(y0,{onClickAway:P,children:o.jsxs(z0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[M==null?void 0:M.map(K=>{var J;return o.jsxs(Ae,{selected:K.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>N(K),children:[o.jsxs(z,{children:[o.jsx(be,{sx:{fontSize:"16px"},maxLength:24,children:K.name}),o.jsx(be,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:K.url})]}),H2({store:K,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(ge,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(K)},children:o.jsx(re,{icon:"ic:outline-delete"})})]},K.url)}),o.jsx(w2,{}),o.jsxs(Ae,{onClick:I,children:[o.jsx(j1,{font:!0}),o.jsx(G,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),b&&o.jsx(N0,{hiddenChildren:!0,open:!0,onClose:U,teamDid:k,storeList:M,scope:"studio",onAdd:(B=y==null?void 0:y.actions)==null?void 0:B.refreshBlocklet}),C&&o.jsx(R1,{displayError:!0,title:`${a("common.delete")} ${C.name}`,description:a("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:a("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}H1.propTypes={store:h.object,blocklet:h.object,onChangeStore:h.func.isRequired,onClick:h.func.isRequired,loading:h.bool.isRequired,disabled:h.bool.isRequired,componentDid:h.string.isRequired,projectType:h.string.isRequired,getData:h.func.isRequired};H1.defaultProps={store:null,blocklet:null};const d0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],u0=1024*1024*10,p0=R.lazy(()=>S0(()=>import("./react-BTu1Y-_j.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53])).then(e=>({default:e.Uploader})));function J0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:c,paramsErrTip:i,setParamsErrTip:a,setLoading:u,initUrl:f,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=te(),{api:d}=we(),m=v1(),b=R.useRef(null),v=R.useRef(null),[C,S]=Kl(s),N=$2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const E=setTimeout(()=>{u(!1)},2e4),B=await Jl(d,L);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${X.UNOWNED_DID}/create`,`${B}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){$.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){$.error(p("blocklet.publish.noStoreSelected"));return}const L=Xl();N(async(E,B)=>{var O,K,J;try{const W=await d.connectByStudio({input:{did:(O=s==null?void 0:s.meta)==null?void 0:O.did,blockletTitle:r==null?void 0:r.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((K=r==null?void 0:r.blockletComponents)==null?void 0:K.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){$.error("failed to connect to store");return}B(W.url),T({did:(J=s==null?void 0:s.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const Z=Ne(W);$.error(Z),u(!1)}})},I=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,U=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,M=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(L=>`${U}/${L}`),k=()=>t?!1:!e||e===X.UNOWNED_DID?($.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Yl,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Te,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:r.blockletTitle||"",onChange:L=>{a({blockletTitle:""}),c({blockletTitle:L.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Te,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===X.UNOWNED_DID&&o.jsx(z1,{position:"end",children:o.jsx(H1,{blocklet:s,store:C,componentDid:y,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===X.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Te,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:r.blockletDescription||"",onChange:L=>{a({blockletDescription:""}),c({blockletDescription:L.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(P0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{k()&&b.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[M.map((L,E)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(ge,{className:"action",onClick:()=>{c(B=>{const O=[...B.blockletScreenshots];return O.splice(E,1),{...B,blockletScreenshots:O}})},children:o.jsx(O2,{})})]},L)),M.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{k()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(Ie,{}),children:[o.jsx(p0,{ref:b,popup:!0,onUploadFinish:L=>{c({blockletLogo:L.data.filename}),g(""),b.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:d0,maxFileSize:u0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(p0,{ref:v,popup:!0,onUploadFinish:L=>{c(E=>{var O;const B=E.blockletScreenshots||[];return B.push((O=L.data)==null?void 0:O.filename),{...E,blockletScreenshots:B}}),v.current.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:U,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:d0,maxFileSize:u0,maxNumberOfFiles:5-M.length}}},"uploader-screenshot")]})]})}J0.propTypes={projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired,blocklet:h.object.isRequired,setLoading:h.func.isRequired,initUrl:h.object.isRequired,componentDid:h.isRequired,initLogoUrl:h.string.isRequired,setInitLogoUrl:h.func.isRequired};const Yl=ae.div`
|
|
136
|
+
`,c0="lastWantToConnectStoreId";function Kl(e){var a,u;const[t,l]=R.useState(null),{session:s}=s1(),r=R.useCallback(f=>{l(f),localStorage.setItem(c0,f==null?void 0:f.id)},[l]),c=R.useMemo(()=>{var y,p,d,m;const f=localStorage.getItem(c0),x=f?(((y=e==null?void 0:e.settings)==null?void 0:y.storeList)||[]).find(b=>b.id===f):null;if(x)return x;let g=(((p=e==null?void 0:e.settings)==null?void 0:p.storeList)||[]).find(b=>{var v;return!(b.id!==X.BLOCKLET_STORE.id||b.scope&&b.scope!=="studio"&&b.scope!==((v=s==null?void 0:s.user)==null?void 0:v.did))});return g||(g=(m=(d=e==null?void 0:e.settings)==null?void 0:d.storeList)==null?void 0:m[0]),g},[(a=e==null?void 0:e.settings)==null?void 0:a.storeList,(u=s==null?void 0:s.user)==null?void 0:u.did]);return[t||c||{},r]}const d1={};async function K0(e,{interval:t=1e3,maxDuration:l=120*1e3,intervalFirst:s=4e3,timerKey:r=""}){d1[r]&&clearTimeout(d1[r]),await new Promise(a=>setTimeout(a,s));const c=Date.now(),i=async(a,u)=>{try{const f=await e();a(f)}catch(f){Date.now()-c>l?u(f):r?d1[r]=setTimeout(()=>i(a,u),t):setTimeout(()=>i(a,u),t)}};return new Promise(i)}function Xl(){return Math.random().toString(36).slice(2)+Math.random().toString(36).slice(2)+`${Date.now()}`.slice(-6)}function Jl(e,{did:t,projectId:l,messageId:s}){return K0(async()=>{var c;const r=await e.getProject({input:{did:t,projectId:l,messageId:s}});if(!((c=r==null?void 0:r.project)!=null&&c.blockletDid))throw new Error("Connected store not found");return r.project.blockletDid},{timerKey:"connect-studio"})}function Ql(e,{did:t,projectId:l,storeId:s}){return K0(async()=>{var i,a;const r=await e.getProject({input:{did:t,projectId:l,messageId:""}});if(!((a=(i=r==null?void 0:r.project)==null?void 0:i.connectedStores)!=null&&a.length))throw new Error("Connected store not found");if(!r.project.connectedStores.find(u=>u.storeId===s))throw new Error("Connected store not found")},{timerKey:`connect-store-${s}`})}const X0=({fromBlocklet:e,nodeInfo:t,blocklet:l,userDid:s})=>{var i,a;const r=e?(i=l==null?void 0:l.meta)==null?void 0:i.did:t==null?void 0:t.did;let c=e?((a=l==null?void 0:l.settings)==null?void 0:a.storeList)||[]:(t==null?void 0:t.blockletRegistryList)||[];return Array.isArray(c)||(c=[]),c=c.filter(u=>u.protected||!u.scope||u.scope==="studio"||u.scope===s),{teamDid:r,storeList:c}};function H1({blocklet:e,store:t={},onChangeStore:l,onClick:s,disabled:r,loading:c,componentDid:i}){var L,E,B;const{t:a}=te(),{session:u}=s1(),{api:f,info:x,inService:g}=we(),y=Ve(),[p,d]=R.useState(!1),m=R.useRef(null),[b,v]=R.useState(!1),[C,S]=R.useState(null),N=O=>{l(O),d(!1)},T=()=>{d(!p)},P=O=>{m.current&&m.current.contains(O.target)||d(!1)},I=()=>{v(!0)},U=()=>{v(!1)},V=async()=>{var O;if(C)try{await f.deleteBlockletStore({input:{teamDid:e.meta.did,url:C.url,projectId:"",scope:C.scope||"studio"}}),await((O=y==null?void 0:y.actions)==null?void 0:O.refreshBlocklet())}catch(K){$.error(`Remove Blocklet Store Error: ${Ne(K)}`)}finally{S(null)}},{storeList:M}=X0({fromBlocklet:g,blocklet:e,nodeInfo:x,componentDid:i,userDid:(L=u==null?void 0:u.user)==null?void 0:L.did}),k=(E=e==null?void 0:e.meta)==null?void 0:E.did;return o.jsxs(o.Fragment,{children:[o.jsxs(h1,{disabled:r,ref:m,variant:"contained",color:"primary","aria-label":"Button group with connect store",children:[o.jsxs(ne,{onClick:s,children:[c&&o.jsx(Oe,{size:14,sx:{mr:.5}}),`${a("common.connect")} ${t.name||""}`]}),o.jsx(ne,{size:"small","aria-controls":p?"split-button-menu":void 0,"aria-expanded":p?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:T,children:o.jsx(q2,{})})]}),o.jsx(R0,{sx:{zIndex:10},open:p,anchorEl:m.current,placement:"bottom-end",role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:O})=>o.jsx(C0,{...O,style:{transformOrigin:"center top"},children:o.jsx(b1,{children:o.jsx(y0,{onClickAway:P,children:o.jsxs(z0,{id:"split-button-menu",autoFocusItem:!0,sx:{maxHeight:300,overflowY:"auto",zIndex:10},children:[M==null?void 0:M.map(K=>{var J;return o.jsxs(Ae,{selected:K.id===(t==null?void 0:t.id),sx:{height:56},onClick:()=>N(K),children:[o.jsxs(z,{children:[o.jsx(be,{sx:{fontSize:"16px"},maxLength:24,children:K.name}),o.jsx(be,{sx:{fontSize:"13px",opacity:.6},maxLength:30,children:K.url})]}),H2({store:K,userDid:(J=u==null?void 0:u.user)==null?void 0:J.did})&&o.jsx(ge,{sx:{ml:1},onClick:W=>{W.preventDefault(),W.stopPropagation(),S(K)},children:o.jsx(re,{icon:"ic:outline-delete"})})]},K.url)}),o.jsx(w2,{}),o.jsxs(Ae,{onClick:I,children:[o.jsx(j1,{font:!0}),o.jsx(G,{variant:"inherit",children:a("store.blockletRegistry.addRegistry")})]})]})})})})}),b&&o.jsx(N0,{hiddenChildren:!0,open:!0,onClose:U,teamDid:k,storeList:M,scope:"studio",onAdd:(B=y==null?void 0:y.actions)==null?void 0:B.refreshBlocklet}),C&&o.jsx(R1,{displayError:!0,title:`${a("common.delete")} ${C.name}`,description:a("blocklet.publish.deleteStoreTip",{name:C.name}),confirm:a("common.confirm"),onConfirm:V,onCancel:()=>S(null)})]})}H1.propTypes={store:h.object,blocklet:h.object,onChangeStore:h.func.isRequired,onClick:h.func.isRequired,loading:h.bool.isRequired,disabled:h.bool.isRequired,componentDid:h.string.isRequired,projectType:h.string.isRequired,getData:h.func.isRequired};H1.defaultProps={store:null,blocklet:null};const d0=[".webp",".jpg",".jpeg",".png",".gif",".svg"],u0=1024*1024*10,p0=R.lazy(()=>S0(()=>import("./react-DnVaFLUv.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53])).then(e=>({default:e.Uploader})));function J0({projectId:e,readOnly:t,loading:l,blocklet:s,params:r,setParams:c,paramsErrTip:i,setParamsErrTip:a,setLoading:u,initUrl:f,initLogoUrl:x,setInitLogoUrl:g,componentDid:y}){const{t:p}=te(),{api:d}=we(),m=v1(),b=R.useRef(null),v=R.useRef(null),[C,S]=Kl(s),N=$2({messageType:"connect-store-message",onOpen:()=>u(!0),onClose:()=>u(!1)}),T=async L=>{const E=setTimeout(()=>{u(!1)},2e4),B=await Jl(d,L);u(!1),clearTimeout(E),window.parent.postMessage({event:"studioDialog.connected",componentDid:y},"*"),m(window.location.pathname.replace(`${X.UNOWNED_DID}/create`,`${B}/create`),{replace:!0})},P=()=>{if(!r.blockletTitle){$.error(p("blocklet.publish.errorTip.noTitle"));return}if(!(C!=null&&C.url)){$.error(p("blocklet.publish.noStoreSelected"));return}const L=Xl();N(async(E,B)=>{var O,K,J;try{const W=await d.connectByStudio({input:{did:(O=s==null?void 0:s.meta)==null?void 0:O.did,blockletTitle:r==null?void 0:r.blockletTitle,storeUrl:C.url,storeId:C.id,storeName:C.name,type:((K=r==null?void 0:r.blockletComponents)==null?void 0:K.length)>0?"pack":"resource",componentDid:y,messageId:L,tenantScope:(f==null?void 0:f.searchParams.get("tenantScope"))||""}});if(!(W!=null&&W.url)){$.error("failed to connect to store");return}B(W.url),T({did:(J=s==null?void 0:s.meta)==null?void 0:J.did,projectId:"",messageId:L})}catch(W){const Z=Ne(W);$.error(Z),u(!1)}})},I=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/logo/upload`,U=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${s.meta.did}/${e}/screenshot/upload`,V=r!=null&&r.blockletLogo?`${I}/${r.blockletLogo}`:`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/static/images/logo.png`,M=((r==null?void 0:r.blockletScreenshots)||[]).filter(Boolean).map(L=>`${U}/${L}`),k=()=>t?!1:!e||e===X.UNOWNED_DID?($.error(p("blocklet.publish.errorTip.noFirstDid")),!1):!0;return o.jsxs(Yl,{children:[o.jsx(z,{display:"flex",className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Te,{disabled:l||t,label:`Blocklet ${p("common.title")}`,placeholder:`Blocklet ${p("common.title")}`,InputProps:{"data-cy":"blocklet-title",readOnly:t},autoComplete:"off",variant:"outlined",fullWidth:!0,required:!0,value:r.blockletTitle||"",onChange:L=>{a({blockletTitle:""}),c({blockletTitle:L.target.value})},error:!!i.blockletTitle,helperText:i.blockletTitle||""}),o.jsx(Te,{required:!0,label:"Blocklet DID",fullWidth:!0,readonly:!0,disabled:!0,autoComplete:"off",variant:"outlined",InputProps:{"data-cy":"export-blocklet-did",endAdornment:e===X.UNOWNED_DID&&o.jsx(z1,{position:"end",children:o.jsx(H1,{blocklet:s,store:C,componentDid:y,onChangeStore:S,disabled:!r.blockletTitle||t||l,loading:l,onClick:P})})},error:!!i.projectId,helperText:i.projectId||"",value:e===X.UNOWNED_DID?"":`did:abt:${e}`,sx:{mt:3}}),o.jsx(Te,{disabled:l||t,label:`Blocklet ${p("common.description")}`,placeholder:`Blocklet ${p("common.description")}`,InputProps:{"data-cy":"blocklet-description",readOnly:t},required:!0,autoComplete:"off",variant:"outlined",fullWidth:!0,value:r.blockletDescription||"",onChange:L=>{a({blockletDescription:""}),c({blockletDescription:L.target.value})},error:!!i.blockletDescription,helperText:i.blockletDescription||"",sx:{mt:3}})]})}),o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(z,{display:"flex",children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.logo")}),o.jsx(z,{sx:{flex:1,cursor:t?"default":"pointer"},children:o.jsx(P0,{variant:"square",sx:{width:80,height:80},alt:"Blocklet Logo",src:x||V,onClick:()=>{k()&&b.current.open()}})})]}),o.jsxs(z,{display:"flex",mt:3,children:[o.jsx(G,{variant:"subtitle1",sx:{mr:2},children:p("common.screenshot")}),o.jsxs(z,{display:"flex",alignItems:"center",sx:{flex:1,flexWrap:"wrap"},children:[M.map((L,E)=>o.jsxs(z,{className:"screenshot",children:[o.jsx("img",{alt:"screenshot",src:L}),!t&&o.jsx(ge,{className:"action",onClick:()=>{c(B=>{const O=[...B.blockletScreenshots];return O.splice(E,1),{...B,blockletScreenshots:O}})},children:o.jsx(O2,{})})]},L)),M.length<5&&o.jsx(z,{sx:{width:200,height:140,background:"#eee",cursor:t?"default":"pointer",color:"#999",mb:2},display:"flex",justifyContent:"center",alignItems:"center",fontSize:40,onClick:()=>{k()&&v.current.open()},children:"+"})]})]})]})}),o.jsxs(R.Suspense,{fallback:o.jsx(Ie,{}),children:[o.jsx(p0,{ref:b,popup:!0,onUploadFinish:L=>{c({blockletLogo:L.data.filename}),g(""),b.current.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:I,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:d0,maxFileSize:u0,maxNumberOfFiles:1}}},"uploader-logo"),o.jsx(p0,{ref:v,popup:!0,onUploadFinish:L=>{c(E=>{var O;const B=E.blockletScreenshots||[];return B.push((O=L.data)==null?void 0:O.filename),{...E,blockletScreenshots:B}}),v.current.close()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:U,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:d0,maxFileSize:u0,maxNumberOfFiles:5-M.length}}},"uploader-screenshot")]})]})}J0.propTypes={projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired,blocklet:h.object.isRequired,setLoading:h.func.isRequired,initUrl:h.object.isRequired,componentDid:h.isRequired,initLogoUrl:h.string.isRequired,setInitLogoUrl:h.func.isRequired};const Yl=ae.div`
|
|
137
137
|
margin-top: 24px;
|
|
138
138
|
.screenshot {
|
|
139
139
|
margin-bottom: 16px;
|
|
@@ -178,7 +178,7 @@ import{at as d2,j as o,aG as se,cQ as g0,aK as A,fG as X1,aJ as je,aE as $e,aF a
|
|
|
178
178
|
padding-bottom: 12px;
|
|
179
179
|
border-bottom: ${({theme:e})=>`1px solid ${e.palette.divider}`};
|
|
180
180
|
}
|
|
181
|
-
`;function o2({text:e}){return e?o.jsx(K2,{wrapperElement:{"data-color-mode":"light"},source:X2.sanitize(e),rehypePlugins:[[J2,{target:"_blank"}]]}):o.jsx(ze,{Icon:Ge})}o2.propTypes={text:h.string.isRequired};function l2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:c}){var x;const{t:i}=te(),[a,u]=R.useState(c?"preview":"write"),f=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(G,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(T2,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(Z1,{value:"write",label:"Write"}),o.jsx(Z1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Te,{disabled:s||c,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:c,endAdornment:o.jsxs(z1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ye.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{r({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ye.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:a==="preview"?"block":"none",mt:3,children:o.jsx(o2,{text:e.blockletIntroduction||""})})]})}l2.propTypes={params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,readOnly:h.bool.isRequired,loading:h.bool.isRequired};var U1={},a3=ke;Object.defineProperty(U1,"__esModule",{value:!0});var n2=U1.default=void 0,c3=a3(Se()),f0=o;n2=U1.default=(0,c3.default)([(0,f0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,f0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function q1({step:e,ok:t,active:l,error:s}){let r="grey.500",c=e+1;return t&&(c=o.jsx(Q2,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",c=o.jsx(n2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:c})}q1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};q1.defaultProps={step:0,ok:!1,active:0,error:""};function s2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:c,paramsErrTip:i,viewMode:a,projectId:u}){const{t:f}=te(),x=()=>{l(d=>d+1)},g=()=>{l(d=>d-1)},y=d=>d===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription):d===2?i==null?void 0:i.blockletResource:d>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=a||Y0({hasSelectedResources:s,params:r,projectId:u,t:f})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(Z2,{activeStep:t,orientation:"vertical",children:e.map((d,m)=>{const b={},v=c||!r3({hasSelectedResources:s,params:r,projectId:u,step:m,t:f}),C=c?"":y(m);return C&&(b.optional=o.jsx(G,{variant:"caption",color:"error",children:C}),b.error=!0),o.jsxs(et,{children:[o.jsx(jt,{icon:o.jsx(q1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...b,children:o.jsx(G,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:d.label})}),o.jsxs(St,{children:[o.jsx(G,{fontSize:12,children:d.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:f("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},d.label)})}),t>=e.length-1&&o.jsx(b1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(G,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}s2.propTypes={steps:h.array.isRequired,activeStep:h.number.isRequired,setActiveStep:h.func.isRequired,params:h.object.isRequired,viewMode:h.string.isRequired,loading:h.bool.isRequired,projectId:h.string.isRequired,hasSelectedResources:h.bool.isRequired,paramsErrTip:h.shape({projectId:h.string,blockletVersion:h.string,blockletTitle:h.string,blockletDescription:h.string,note:h.string,blockletResource:h.string}).isRequired};const d3=[".zip",".gz"],u3=1024*1024*100,p3=R.lazy(()=>S0(()=>import("./react-BTu1Y-_j.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53])).then(e=>({default:e.Uploader})));function W1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:c,error:i}){const{t:a}=te(),u=R.useRef(null),f=()=>l?!1:!t||t===X.UNOWNED_DID?($.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(G,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),o.jsxs(tt,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(G,{component:"a",href:`${x}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;f()&&((g=u.current)==null||g.open())},children:s.uploadedResource?a("common.change"):a("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(Ie,{}),children:o.jsx(p3,{ref:u,popup:!0,onUploadFinish:g=>{var y;r({uploadedResource:g.data.filename}),c({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:d3,maxFileSize:u3,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:i})]})}W1.propTypes={app:h.object.isRequired,projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,error:h.string.isRequired,setParamsErrTip:h.func.isRequired};W1.defaultProps={};function o1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:c}){var a;const{t:i}=te();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Te,{required:!0,disabled:c||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{r({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Te,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:c||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(z1,{position:"end",children:[((a=t==null?void 0:t.note)==null?void 0:a.length)||0," / ",ye.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{r({note:""}),l({note:u.target.value.slice(0,ye.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}o1.propTypes={readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired};o1.defaultProps={};function r2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&r2(e[t]);return e}const h3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},s),value:s})},x0=(e,t)=>{const l=g1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","autoUpload","possibleSameStore","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},f3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},m0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function G1({initUrl:e,...t}){var K1;const{projectId:l,mode:s,releaseId:r,componentDid:c=""}=n1(),{t:i}=te(),{blocklet:a}=Ve(),[u,f]=Pe({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Pe({}),[y,p]=R.useState(!1),[d,m]=Pe(null),{api:b}=we(),v=We(D=>D.breakpoints.down("md")),[C,S]=R.useState({}),[N,T]=R.useState(!1),P=R.useRef({}),[I,U]=Pe({}),[V,M]=R.useState(""),[k,L]=Pe({}),E=e==null?void 0:e.searchParams.get("dependentComponentsMode"),B=E==="readonly",O=R.useMemo(()=>{const D={};return Object.keys(k).forEach(_=>{const Ce=k[_];Ce&&Ce.forEach(c2=>{D[c2]=!0})}),D},[k]),K=R.useCallback(D=>{B&&f({blockletComponents:[]}),L(D)},[B,L,f]),J=R.useCallback((...D)=>{U(...D),g({blockletResource:""})},[]),W=r==="none"?(u==null?void 0:u.lastReleaseId)||"":r,[Z,Me]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const he=R.useMemo(()=>{var D;return(D=u==null?void 0:u.blockletComponents)!=null&&D.some(_=>_.included)||Object.keys(O).length||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource,O]),ce=[],oe=((a==null?void 0:a.children)||[]).filter(D=>{var _;return(_=D.meta.resource)==null?void 0:_.exportApi}).filter(D=>!c||D.meta.did===c);oe.forEach(D=>{h3({tabs:ce,blocklet:D,t:i,ancestors:[a]})});const[ee,ie]=R.useState((K1=ce[0])==null?void 0:K1.value),fe=!N&&(d==null?void 0:d.status)==="published",Q=fe,xe=y2(()=>{if(!e)return;M(e.searchParams.get("logo")),f(_=>{var Ce;return{..._,blockletTitle:(_==null?void 0:_.blockletTitle)||e.searchParams.get("title"),blockletDescription:(_==null?void 0:_.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(_==null?void 0:_.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(Ce=_==null?void 0:_.blockletComponents)!=null&&Ce.length?_==null?void 0:_.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(_==null?void 0:_.note)||e.searchParams.get("note")||"No note"}});const D=e.searchParams.get("resources");try{const _=JSON.parse(D);S(_)}catch{}}),q=async()=>{if(W)try{const D=await b.getRelease({input:{did:a.meta.did,projectId:l,releaseId:W}});if(p(!1),!D.release){$.error("Release not found");return}D.release=r2(D.release),s!=="view"&&(D.release.note=""),f(_=>x0({..._,...D.release,blockletVersion:s==="create"||s==="new-release"?Le.inc(D.release.blockletVersion,"patch"):D.release.blockletVersion},a)),m(D.release)}catch(D){p(!1),$.error(Ne(D))}},le=async()=>{if(l===X.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){$.error(i("blocklet.publish.errorTip.noDid"));return}try{const _=(await b.getProject({input:{did:a.meta.did,projectId:l}})).project||{};_.blockletVersion?(s==="create"||s==="new-release")&&Le.valid(_.blockletVersion)&&(_.blockletVersion=Le.inc(_.blockletVersion,"patch")):_.blockletVersion="1.0.0";const Ce=x0(_,a);f(Ce),_.lastReleaseId||xe()}catch(D){$.error(Ne(D))}},H=R.useCallback(async()=>{p(!0);try{if(s==="view"){if(!W){$.error("Empty release id");return}await le(),await q();return}await le(),W&&(T(!0),await q())}finally{p(!1)}},[s,W]),Ke=D=>{f({blockletComponents:D})};R.useEffect(()=>{H()},[H]),R.useEffect(()=>{l===X.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const _e=R.useMemo(()=>!!Object.keys(I).find(D=>!!I[D].length),[I]);if(!u&&y)return o.jsx(Ie,{});if(!u)return null;const Ee=oe.find(D=>D.meta.did===ee);if(oe.every(D=>D.status!=="running")&&(oe!=null&&oe.length))return o.jsx(ze,{children:i("blocklet.publish.allComponentsNotRunning")});const Xe=D=>{ie(D)},F=e==null?void 0:e.searchParams.get("resourcesTitle"),Y=e==null?void 0:e.searchParams.get("componentsTitle"),de=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:F||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Y||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],a2=de[Z]||de[de.length-1],Re=f3[Z];return o.jsxs(x3,{...t,children:[o.jsx(t2,{blocklet:a,release:d,getData:H,getRelease:q,mode:s,params:u,setParams:f,setParamsErrTip:g,readOnly:Q,isPublished:fe,loading:y,setLoading:p,initLogoUrl:V,releaseId:W,projectId:l,projectType:he,resourceComponents:oe,resourceComponentsMap:k,resourceRelateComponents:O,resourceItem:Ee,saveSelectedEventsRef:P,hasSelectedResources:_e,releaseUsedLast:N,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(s2,{steps:de,loading:y,viewMode:s==="view",params:u,hasSelectedResources:_e||u.uploadedResource,paramsErrTip:x,activeStep:Z,setActiveStep:Me,projectId:l,resourcesUrlTitle:F,componentsUrlTitle:Y}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&Re!=="introduction"&&o.jsxs(G,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[a2.label,Re==="branding"&&o.jsx(ve,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(L2,{})})})]}),(v||Re==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(J0,{projectId:l,setParams:f,setParamsErrTip:g,params:u,componentDid:c,blocklet:a,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Q,initLogoUrl:V,setInitLogoUrl:M})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})}),(v||Re==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(l2,{loading:y,readOnly:Q,params:u,setParams:f,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[m0.resources].label}),o.jsx(z,{display:v||Re==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(ot,{onChange:()=>f({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(t0,{size:"small",checked:u.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(t0,{size:"small",checked:!u.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!c&&o.jsx(N2,{tabs:ce,current:ee,onChange:Xe,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(O1,{loading:y,initialResources:C,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:J,setResourceComponentsMap:K,error:x.blockletResource,app:a,readOnly:Q,component:Ee,componentDid:c,initUrl:e,params:u,setParams:f,projectId:l===X.UNOWNED_DID?"":l,releaseUsedLast:N,release:{...d,id:W}})]}),!u.resourceFromSelect&&o.jsx(W1,{app:a,readOnly:Q,projectId:l===X.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:f,setParamsErrTip:g})]})})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[m0.blocklets].label}),(v||Re==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(N1,{projectType:he,disabled:y||Q,app:a,value:(u==null?void 0:u.blockletComponents)||[],onChange:Ke,resourceRelateComponents:O,dependentComponentsMode:E})})})}),!v&&Re==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})})]})]})]})]})}G1.propTypes={initUrl:h.object};G1.defaultProps={initUrl:null};const x3=ae.div`
|
|
181
|
+
`;function o2({text:e}){return e?o.jsx(K2,{wrapperElement:{"data-color-mode":"light"},source:X2.sanitize(e),rehypePlugins:[[J2,{target:"_blank"}]]}):o.jsx(ze,{Icon:Ge})}o2.propTypes={text:h.string.isRequired};function l2({params:e,setParams:t,paramsErrTip:l,loading:s,setParamsErrTip:r,readOnly:c}){var x;const{t:i}=te(),[a,u]=R.useState(c?"preview":"write"),f=(g,y)=>{u(y)};return o.jsxs(z,{sx:{border:"1px solid #fff",width:"100%",borderRadius:2},children:[o.jsxs(z,{sx:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o.jsx(G,{variant:"h6",fontWeight:"bold",sx:{},children:i("common.introduction")}),o.jsxs(T2,{value:a,onChange:f,"aria-label":"wrapped label tabs example",children:[o.jsx(Z1,{value:"write",label:"Write"}),o.jsx(Z1,{value:"preview",label:"Preview"})]})]}),o.jsx(z,{display:a==="write"?"block":"none",sx:{width:"100%",marginTop:3},children:o.jsx(Te,{disabled:s||c,sx:{border:"none"},placeholder:`Blocklet ${i("common.introduction")}`,InputProps:{"data-cy":"export-blocklet-introduction",readOnly:c,endAdornment:o.jsxs(z1,{position:"end",children:[((x=e==null?void 0:e.blockletIntroduction)==null?void 0:x.length)||0," / ",ye.PROJECT.MAX_INTRO_LENGTH]})},autoComplete:"off",variant:"outlined",fullWidth:!0,multiline:!0,minRows:4,value:e.blockletIntroduction||"",onChange:g=>{r({blockletIntroduction:""}),t({blockletIntroduction:g.target.value.slice(0,ye.PROJECT.MAX_INTRO_LENGTH)})},error:!!l.blockletIntroduction,helperText:l.blockletIntroduction||""})}),o.jsx(z,{display:a==="preview"?"block":"none",mt:3,children:o.jsx(o2,{text:e.blockletIntroduction||""})})]})}l2.propTypes={params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,readOnly:h.bool.isRequired,loading:h.bool.isRequired};var U1={},a3=ke;Object.defineProperty(U1,"__esModule",{value:!0});var n2=U1.default=void 0,c3=a3(Se()),f0=o;n2=U1.default=(0,c3.default)([(0,f0.jsx)("circle",{cx:"12",cy:"19",r:"2"},"0"),(0,f0.jsx)("path",{d:"M10 3h4v12h-4z"},"1")],"PriorityHigh");function q1({step:e,ok:t,active:l,error:s}){let r="grey.500",c=e+1;return t&&(c=o.jsx(Q2,{sx:{fontSize:18,margin:0},color:"white"})),s||!t&&l>e?(r="error.main",c=o.jsx(n2,{sx:{fontSize:18,margin:0},color:"white"})):l>=e&&(r="primary.main"),o.jsx(z,{width:24,height:24,bgcolor:r,borderRadius:"100%",color:"white",display:"flex",justifyContent:"center",fontWeight:"bold",fontSize:14,alignItems:"center",children:c})}q1.propTypes={step:h.number,ok:h.bool,active:h.number,error:h.string};q1.defaultProps={step:0,ok:!1,active:0,error:""};function s2({steps:e,activeStep:t,setActiveStep:l,hasSelectedResources:s,params:r,loading:c,paramsErrTip:i,viewMode:a,projectId:u}){const{t:f}=te(),x=()=>{l(d=>d+1)},g=()=>{l(d=>d-1)},y=d=>d===0?(i==null?void 0:i.blockletTitle)||(i==null?void 0:i.projectId)||(i==null?void 0:i.blockletDescription):d===2?i==null?void 0:i.blockletResource:d>=4?(i==null?void 0:i.blockletVersion)||(i==null?void 0:i.note):"",p=a||Y0({hasSelectedResources:s,params:r,projectId:u,t:f})===null;return o.jsxs(z,{sx:{width:300,maxWidth:300,minWidth:300,padding:2,border:"1px solid #ccc",borderRadius:2},children:[o.jsx(Z2,{activeStep:t,orientation:"vertical",children:e.map((d,m)=>{const b={},v=c||!r3({hasSelectedResources:s,params:r,projectId:u,step:m,t:f}),C=c?"":y(m);return C&&(b.optional=o.jsx(G,{variant:"caption",color:"error",children:C}),b.error=!0),o.jsxs(et,{children:[o.jsx(jt,{icon:o.jsx(q1,{error:C,active:p?99:t,step:m,ok:v}),sx:{cursor:"pointer",color:C?"error.main":"inherit"},disabled:!1,onClick:()=>l(m),...b,children:o.jsx(G,{fontSize:"14px",fontWeight:"500",color:C||!v&&t>m?"error.main":"inherit",children:d.label})}),o.jsxs(St,{children:[o.jsx(G,{fontSize:12,children:d.description}),!p&&o.jsx(z,{sx:{mb:2},children:o.jsxs("div",{children:[m<e.length-1&&o.jsx(ne,{variant:"contained",onClick:x,sx:{mt:1,mr:1},disabled:C||!v,children:f("common.continue")}),m>0&&o.jsx(ne,{disabled:m===0,onClick:g,sx:{mt:1,mr:1},children:f("common.back")})]})})]})]},d.label)})}),t>=e.length-1&&o.jsx(b1,{square:!0,elevation:0,sx:{p:3},children:o.jsx(G,{fontSize:12,sx:{opacity:.5},children:"Click right top button to release"})})]})}s2.propTypes={steps:h.array.isRequired,activeStep:h.number.isRequired,setActiveStep:h.func.isRequired,params:h.object.isRequired,viewMode:h.string.isRequired,loading:h.bool.isRequired,projectId:h.string.isRequired,hasSelectedResources:h.bool.isRequired,paramsErrTip:h.shape({projectId:h.string,blockletVersion:h.string,blockletTitle:h.string,blockletDescription:h.string,note:h.string,blockletResource:h.string}).isRequired};const d3=[".zip",".gz"],u3=1024*1024*100,p3=R.lazy(()=>S0(()=>import("./react-DnVaFLUv.js").then(e=>e.r),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53])).then(e=>({default:e.Uploader})));function W1({app:e,projectId:t,readOnly:l,params:s,setParams:r,setParamsErrTip:c,error:i}){const{t:a}=te(),u=R.useRef(null),f=()=>l?!1:!t||t===X.UNOWNED_DID?($.error(a("blocklet.publish.errorTip.noFirstDid")),!1):!0,x=`${X.WELLKNOWN_SERVICE_PATH_PREFIX}/api/project/${e.meta.did}/${t}/resource/upload`;return o.jsxs(z,{sx:{mt:3},children:[o.jsx(G,{gutterBottom:!0,children:a("blocklet.publish.resourceUpload")}),o.jsxs(tt,{direction:"row",alignItems:"center",spacing:1,sx:{flex:1,cursor:l?"default":"pointer"},children:[!!s.uploadedResource&&o.jsx(G,{component:"a",href:`${x}/params.uploadedResource`,children:s.uploadedResource}),!l&&o.jsx(ne,{variant:"outlined",size:"small",onClick:()=>{var g;f()&&((g=u.current)==null||g.open())},children:s.uploadedResource?a("common.change"):a("common.upload")})]}),o.jsx(R.Suspense,{fallback:o.jsx(Ie,{}),children:o.jsx(p3,{ref:u,popup:!0,onUploadFinish:g=>{var y;r({uploadedResource:g.data.filename}),c({blockletResource:""}),(y=u.current)==null||y.close()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:x,disableMediaKitPrefix:!0},coreProps:{restrictions:{allowedFileExts:d3,maxFileSize:u3,maxNumberOfFiles:1}}},"uploader-resource")}),!!i&&o.jsx(z,{color:"error.main",mt:1,fontSize:14,children:i})]})}W1.propTypes={app:h.object.isRequired,projectId:h.string.isRequired,readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,error:h.string.isRequired,setParamsErrTip:h.func.isRequired};W1.defaultProps={};function o1({readOnly:e,params:t,setParams:l,paramsErrTip:s,setParamsErrTip:r,loading:c}){var a;const{t:i}=te();return o.jsx(z,{display:"flex",mt:3,className:"section",children:o.jsxs(z,{sx:{flex:1},children:[o.jsx(Te,{required:!0,disabled:c||e,label:`Blocklet ${i("common.version")}`,placeholder:`Blocklet ${i("common.version")}`,InputProps:{"data-cy":"blocklet-version",readOnly:e},autoComplete:"off",variant:"outlined",fullWidth:!0,value:t.blockletVersion||"",onChange:u=>{r({blockletVersion:""}),l({blockletVersion:u.target.value})},error:!!s.blockletVersion,helperText:s.blockletVersion||""}),o.jsx(Te,{label:i("blocklet.publish.releaseNote"),autoComplete:"off",disabled:c||e,variant:"outlined",InputProps:{"data-cy":"release-note",readOnly:e,endAdornment:o.jsxs(z1,{position:"end",children:[((a=t==null?void 0:t.note)==null?void 0:a.length)||0," / ",ye.PROJECT.MAX_NOTE_LENGTH]})},fullWidth:!0,multiline:!0,minRows:4,required:!0,value:t.note||"",onChange:u=>{r({note:""}),l({note:u.target.value.slice(0,ye.PROJECT.MAX_NOTE_LENGTH)})},error:!!s.note,helperText:s.note||"",sx:{mt:3}})]})})}o1.propTypes={readOnly:h.bool.isRequired,params:h.object.isRequired,setParams:h.func.isRequired,paramsErrTip:h.object.isRequired,setParamsErrTip:h.func.isRequired,loading:h.bool.isRequired};o1.defaultProps={};function r2(e){for(const t in e)typeof e[t]=="string"?e[t]=e[t].replace(/\\\\/g,"\\"):typeof e[t]=="object"&&e[t]!==null&&r2(e[t]);return e}const h3=({tabs:e,blocklet:t,ancestors:l=[]})=>{const s=t.meta.did;e.push({label:o.jsxs(z,{display:"flex",alignItems:"center",justifyContent:"flex-start",children:[o.jsx(C1,{size:24,blocklet:t,ancestors:l}),o.jsx(z,{ml:"4px",className:"text",children:o.jsx(z,{children:t.meta.title})})]},s),value:s})},x0=(e,t)=>{const l=g1(e,["blockletVersion","blockletTitle","blockletDescription","blockletLogo","blockletIntroduction","blockletScreenshots","connectedStores","blockletComponents","lastReleaseId","uploadedResource","autoUpload","possibleSameStore","note"]);return l.blockletComponents?l.blockletComponents=l.blockletComponents.map(s=>({...s,included:!0})):l.blockletComponents=(t.children||[]).map(s=>({did:s.meta.did,included:!1,required:!1})),l.resourceFromSelect=!l.uploadedResource,l},f3={0:"branding",1:"introduction",2:"resources",3:"blocklets",4:"version"},m0={branding:0,introduction:1,resources:2,blocklets:3,version:4};function G1({initUrl:e,...t}){var K1;const{projectId:l,mode:s,releaseId:r,componentDid:c=""}=n1(),{t:i}=te(),{blocklet:a}=Ve(),[u,f]=Pe({blockletScreenshots:[],publishedStoreIds:[],connectedStores:[],uploadedResource:"",resourceFromSelect:!0}),[x,g]=Pe({}),[y,p]=R.useState(!1),[d,m]=Pe(null),{api:b}=we(),v=We(D=>D.breakpoints.down("md")),[C,S]=R.useState({}),[N,T]=R.useState(!1),P=R.useRef({}),[I,U]=Pe({}),[V,M]=R.useState(""),[k,L]=Pe({}),E=e==null?void 0:e.searchParams.get("dependentComponentsMode"),B=E==="readonly",O=R.useMemo(()=>{const D={};return Object.keys(k).forEach(_=>{const Ce=k[_];Ce&&Ce.forEach(c2=>{D[c2]=!0})}),D},[k]),K=R.useCallback(D=>{B&&f({blockletComponents:[]}),L(D)},[B,L,f]),J=R.useCallback((...D)=>{U(...D),g({blockletResource:""})},[]),W=r==="none"?(u==null?void 0:u.lastReleaseId)||"":r,[Z,Me]=R.useState(s==="new-release"?4:0);R.useEffect(()=>{l&&g({projectId:""})},[l,g]);const he=R.useMemo(()=>{var D;return(D=u==null?void 0:u.blockletComponents)!=null&&D.some(_=>_.included)||Object.keys(O).length||u!=null&&u.uploadedResource?"pack":"resource"},[u==null?void 0:u.blockletComponents,u==null?void 0:u.uploadedResource,O]),ce=[],oe=((a==null?void 0:a.children)||[]).filter(D=>{var _;return(_=D.meta.resource)==null?void 0:_.exportApi}).filter(D=>!c||D.meta.did===c);oe.forEach(D=>{h3({tabs:ce,blocklet:D,t:i,ancestors:[a]})});const[ee,ie]=R.useState((K1=ce[0])==null?void 0:K1.value),fe=!N&&(d==null?void 0:d.status)==="published",Q=fe,xe=y2(()=>{if(!e)return;M(e.searchParams.get("logo")),f(_=>{var Ce;return{..._,blockletTitle:(_==null?void 0:_.blockletTitle)||e.searchParams.get("title"),blockletDescription:(_==null?void 0:_.blockletDescription)||e.searchParams.get("description"),blockletIntroduction:(_==null?void 0:_.blockletIntroduction)||e.searchParams.get("introduction")||e.searchParams.get("description"),blockletComponents:(Ce=_==null?void 0:_.blockletComponents)!=null&&Ce.length?_==null?void 0:_.blockletComponents:JSON.parse(e.searchParams.get("components")||"[]"),note:(_==null?void 0:_.note)||e.searchParams.get("note")||"No note"}});const D=e.searchParams.get("resources");try{const _=JSON.parse(D);S(_)}catch{}}),q=async()=>{if(W)try{const D=await b.getRelease({input:{did:a.meta.did,projectId:l,releaseId:W}});if(p(!1),!D.release){$.error("Release not found");return}D.release=r2(D.release),s!=="view"&&(D.release.note=""),f(_=>x0({..._,...D.release,blockletVersion:s==="create"||s==="new-release"?Le.inc(D.release.blockletVersion,"patch"):D.release.blockletVersion},a)),m(D.release)}catch(D){p(!1),$.error(Ne(D))}},le=async()=>{if(l===X.UNOWNED_DID){f({blockletVersion:"1.0.0",blockletTitle:""});return}if(!l){$.error(i("blocklet.publish.errorTip.noDid"));return}try{const _=(await b.getProject({input:{did:a.meta.did,projectId:l}})).project||{};_.blockletVersion?(s==="create"||s==="new-release")&&Le.valid(_.blockletVersion)&&(_.blockletVersion=Le.inc(_.blockletVersion,"patch")):_.blockletVersion="1.0.0";const Ce=x0(_,a);f(Ce),_.lastReleaseId||xe()}catch(D){$.error(Ne(D))}},H=R.useCallback(async()=>{p(!0);try{if(s==="view"){if(!W){$.error("Empty release id");return}await le(),await q();return}await le(),W&&(T(!0),await q())}finally{p(!1)}},[s,W]),Ke=D=>{f({blockletComponents:D})};R.useEffect(()=>{H()},[H]),R.useEffect(()=>{l===X.UNOWNED_DID&&(s==="create"||s==="new-release")&&e&&xe()},[l,e,s,xe]);const _e=R.useMemo(()=>!!Object.keys(I).find(D=>!!I[D].length),[I]);if(!u&&y)return o.jsx(Ie,{});if(!u)return null;const Ee=oe.find(D=>D.meta.did===ee);if(oe.every(D=>D.status!=="running")&&(oe!=null&&oe.length))return o.jsx(ze,{children:i("blocklet.publish.allComponentsNotRunning")});const Xe=D=>{ie(D)},F=e==null?void 0:e.searchParams.get("resourcesTitle"),Y=e==null?void 0:e.searchParams.get("componentsTitle"),de=[{label:i("blocklet.publish.branding"),description:i("blocklet.publish.steps.branding")},{label:i("common.introduction"),description:i("blocklet.publish.steps.introduction")},{label:F||i("blocklet.publish.resourceTitle"),description:i("blocklet.publish.steps.resources")},{label:Y||i("common.components"),description:i("blocklet.publish.steps.blocklets")},{label:i("blocklet.publish.versionTitle"),description:i("blocklet.publish.steps.version")}],a2=de[Z]||de[de.length-1],Re=f3[Z];return o.jsxs(x3,{...t,children:[o.jsx(t2,{blocklet:a,release:d,getData:H,getRelease:q,mode:s,params:u,setParams:f,setParamsErrTip:g,readOnly:Q,isPublished:fe,loading:y,setLoading:p,initLogoUrl:V,releaseId:W,projectId:l,projectType:he,resourceComponents:oe,resourceComponentsMap:k,resourceRelateComponents:O,resourceItem:Ee,saveSelectedEventsRef:P,hasSelectedResources:_e,releaseUsedLast:N,setReleaseUsedLast:T,setRelease:m}),o.jsxs(z,{display:"flex",flexDirection:"column",sx:{width:"100%"},children:[o.jsx(z,{pt:3}),o.jsxs(z,{sx:{gap:3},display:"flex",flexDirection:v?"column":"row",children:[!v&&o.jsx(s2,{steps:de,loading:y,viewMode:s==="view",params:u,hasSelectedResources:_e||u.uploadedResource,paramsErrTip:x,activeStep:Z,setActiveStep:Me,projectId:l,resourcesUrlTitle:F,componentsUrlTitle:Y}),o.jsxs(z,{flex:"1",maxWidth:"720px",children:[!v&&Re!=="introduction"&&o.jsxs(G,{variant:"h6",fontWeight:"bold",display:"flex",flexDirection:"row",alignItems:"center",children:[a2.label,Re==="branding"&&o.jsx(ve,{title:i("blocklet.publish.brandingHelp"),placement:"right",children:o.jsx(z,{component:"a",target:"_blank",href:"https://www.arcblock.io/docs/blocklet-store/en/blocklet-detail-page",sx:{paddingTop:1,marginLeft:1},style:{color:"gray"},children:o.jsx(L2,{})})})]}),(v||Re==="branding")&&o.jsx(z,{flexDirection:"column",children:o.jsx(J0,{projectId:l,setParams:f,setParamsErrTip:g,params:u,componentDid:c,blocklet:a,initUrl:e,loading:y,setLoading:p,paramsErrTip:x,readOnly:Q,initLogoUrl:V,setInitLogoUrl:M})}),v&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})}),(v||Re==="introduction")&&o.jsx(z,{display:"flex",flexDirection:"column",sx:{mt:v?5:0,width:"100%"},children:o.jsx(l2,{loading:y,readOnly:Q,params:u,setParams:f,paramsErrTip:x,setParamsErrTip:g})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[m0.resources].label}),o.jsx(z,{display:v||Re==="resources"?"flex":"none",sx:{maxWidth:720},flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsxs(z,{sx:{flex:1},children:[o.jsxs(ot,{onChange:()=>f({resourceFromSelect:!u.resourceFromSelect}),children:[o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(t0,{size:"small",checked:u.resourceFromSelect}),label:i("blocklet.publish.resourceSelect")}),o.jsx(p1,{value:"select",disabled:Q,control:o.jsx(t0,{size:"small",checked:!u.resourceFromSelect}),label:i("blocklet.publish.resourceUpload")})]}),u.resourceFromSelect&&o.jsxs(o.Fragment,{children:[!c&&o.jsx(N2,{tabs:ce,current:ee,onChange:Xe,sx:{ml:-2,mt:2,maxWidth:v?window.innerWidth-24:"100%"}}),o.jsx(O1,{loading:y,initialResources:C,saveSelectedEventsRef:P,selectedResourceIds:I,setSelectedResourceIds:J,setResourceComponentsMap:K,error:x.blockletResource,app:a,readOnly:Q,component:Ee,componentDid:c,initUrl:e,params:u,setParams:f,projectId:l===X.UNOWNED_DID?"":l,releaseUsedLast:N,release:{...d,id:W}})]}),!u.resourceFromSelect&&o.jsx(W1,{app:a,readOnly:Q,projectId:l===X.UNOWNED_DID?"":l,params:u,error:x.blockletResource,setParams:f,setParamsErrTip:g})]})})}),v&&o.jsx(G,{variant:"h6",fontWeight:"bold",mt:5,children:de[m0.blocklets].label}),(v||Re==="blocklets")&&o.jsx(z,{flexDirection:"column",children:o.jsx(z,{display:"flex",mt:3,className:"section full-width",children:o.jsx(z,{sx:{flex:1},children:o.jsx(N1,{projectType:he,disabled:y||Q,app:a,value:(u==null?void 0:u.blockletComponents)||[],onChange:Ke,resourceRelateComponents:O,dependentComponentsMode:E})})})}),!v&&Re==="version"&&o.jsx(z,{flexDirection:"column",children:o.jsx(o1,{loading:y,params:u,paramsErrTip:x,setParams:f,setParamsErrTip:g,readOnly:Q})})]})]})]})]})}G1.propTypes={initUrl:h.object};G1.defaultProps={initUrl:null};const x3=ae.div`
|
|
182
182
|
.section {
|
|
183
183
|
&.full-width {
|
|
184
184
|
max-width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var dt=Object.defineProperty;var ht=(e,n,t)=>n in e?dt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var D=(e,n,t)=>ht(e,typeof n!="symbol"?n+"":n,t);import{P as f,r as j,N as pt,l as gt,j as m,aC as mt,bF as be,bm as yt,bn as bt,dh as wt,ai as xt,bE as C,bk as It,B as St,bB as vt,T as Tt,di as Ct,dj as At,a1 as jt,dk as Pt,bC as Fe,u as ze,aD as kt,f as Lt,E as Mt}from"./index-
|
|
1
|
+
var dt=Object.defineProperty;var ht=(e,n,t)=>n in e?dt(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var D=(e,n,t)=>ht(e,typeof n!="symbol"?n+"":n,t);import{P as f,r as j,N as pt,l as gt,j as m,aC as mt,bF as be,bm as yt,bn as bt,dh as wt,ai as xt,bE as C,bk as It,B as St,bB as vt,T as Tt,di as Ct,dj as At,a1 as jt,dk as Pt,bC as Fe,u as ze,aD as kt,f as Lt,E as Mt}from"./index-D0ZDnsBw.js";import{D as Et}from"./index-C-yt1SFf.js";import{L as Ot}from"./MoreVert-pbCfz7_a.js";import{L as Rt}from"./ListItemButton-D3vwOyXA.js";import{L as qt}from"./selector-Ckqt3gtd.js";/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{eY as b}from"./index-
|
|
1
|
+
import{eY as b}from"./index-D0ZDnsBw.js";function c(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function A(o,e){for(var r="",i=0,l=-1,t=0,n,f=0;f<=o.length;++f){if(f<o.length)n=o.charCodeAt(f);else{if(n===47)break;n=47}if(n===47){if(!(l===f-1||t===1))if(l!==f-1&&t===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){s===-1?(r="",i=0):(r=r.slice(0,s),i=r.length-1-r.lastIndexOf("/")),l=f,t=0;continue}}else if(r.length===2||r.length===1){r="",i=0,l=f,t=0;continue}}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+o.slice(l+1,f):r=o.slice(l+1,f),i=f-l-1;l=f,t=0}else n===46&&t!==-1?++t:t=-1}return r}function h(o,e){var r=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+i:r+o+i:i}var g={resolve:function(){for(var e="",r=!1,i,l=arguments.length-1;l>=-1&&!r;l--){var t;l>=0?t=arguments[l]:(i===void 0&&(i=b.cwd()),t=i),c(t),t.length!==0&&(e=t+"/"+e,r=t.charCodeAt(0)===47)}return e=A(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(c(e),e.length===0)return".";var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=A(e,!r),e.length===0&&!r&&(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return c(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];c(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":g.normalize(e)},relative:function(e,r){if(c(e),c(r),e===r||(e=g.resolve(e),r=g.resolve(r),e===r))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var l=e.length,t=l-i,n=1;n<r.length&&r.charCodeAt(n)===47;++n);for(var f=r.length,s=f-n,v=t<s?t:s,u=-1,a=0;a<=v;++a){if(a===v){if(s>v){if(r.charCodeAt(n+a)===47)return r.slice(n+a+1);if(a===0)return r.slice(n+a)}else t>v&&(e.charCodeAt(i+a)===47?u=a:a===0&&(u=0));break}var m=e.charCodeAt(i+a),C=r.charCodeAt(n+a);if(m!==C)break;m===47&&(u=a)}var d="";for(a=i+u+1;a<=l;++a)(a===l||e.charCodeAt(a)===47)&&(d.length===0?d+="..":d+="/..");return d.length>0?d+r.slice(n+u):(n+=u,r.charCodeAt(n)===47&&++n,r.slice(n))},_makeLong:function(e){return e},dirname:function(e){if(c(e),e.length===0)return".";for(var r=e.charCodeAt(0),i=r===47,l=-1,t=!0,n=e.length-1;n>=1;--n)if(r=e.charCodeAt(n),r===47){if(!t){l=n;break}}else t=!1;return l===-1?i?"/":".":i&&l===1?"//":e.slice(0,l)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');c(e);var i=0,l=-1,t=!0,n;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var f=r.length-1,s=-1;for(n=e.length-1;n>=0;--n){var v=e.charCodeAt(n);if(v===47){if(!t){i=n+1;break}}else s===-1&&(t=!1,s=n+1),f>=0&&(v===r.charCodeAt(f)?--f===-1&&(l=n):(f=-1,l=s))}return i===l?l=s:l===-1&&(l=e.length),e.slice(i,l)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!t){i=n+1;break}}else l===-1&&(t=!1,l=n+1);return l===-1?"":e.slice(i,l)}},extname:function(e){c(e);for(var r=-1,i=0,l=-1,t=!0,n=0,f=e.length-1;f>=0;--f){var s=e.charCodeAt(f);if(s===47){if(!t){i=f+1;break}continue}l===-1&&(t=!1,l=f+1),s===46?r===-1?r=f:n!==1&&(n=1):r!==-1&&(n=-1)}return r===-1||l===-1||n===0||n===1&&r===l-1&&r===i+1?"":e.slice(r,l)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return h("/",e)},parse:function(e){c(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var i=e.charCodeAt(0),l=i===47,t;l?(r.root="/",t=1):t=0;for(var n=-1,f=0,s=-1,v=!0,u=e.length-1,a=0;u>=t;--u){if(i=e.charCodeAt(u),i===47){if(!v){f=u+1;break}continue}s===-1&&(v=!1,s=u+1),i===46?n===-1?n=u:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===f+1?s!==-1&&(f===0&&l?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(f,s)):(f===0&&l?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(f,n),r.base=e.slice(f,s)),r.ext=e.slice(n,s)),f>0?r.dir=e.slice(0,f-1):l&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};g.posix=g;var y=g;export{y as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b7 as j,cn as O}from"./index-
|
|
1
|
+
import{b7 as j,cn as O}from"./index-D0ZDnsBw.js";function J(i,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const e in a)if(e!=="default"&&!(e in i)){const s=Object.getOwnPropertyDescriptor(a,e);s&&Object.defineProperty(i,e,s.get?s:{enumerable:!0,get:()=>a[e]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var d={default:O,call:function(i,t,r){var a="";typeof t=="function"&&(r=t,t={});var e={data:t===void 0?null:t};if(typeof r=="function"){var s="dscb"+window.dscb++;window[s]=r,e._dscbstub=s}return e=JSON.stringify(e),window._dsbridge?a=_dsbridge.call(i,e):(window._dswk||navigator.userAgent.indexOf("_dsbridge")!=-1)&&(a=prompt("_dsbridge="+i,e)),JSON.parse(a||"{}").data},register:function(i,t,r){var a=r?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){d.call("_dsb.dsinit")},0)),typeof t=="object"?a._obs[i]=t:a[i]=t},registerAsyn:function(i,t){this.register(i,t,!0)},hasNativeMethod:function(i,t){return this.call("_dsb.hasNativeMethod",{name:i,type:t||"all"})},disableJavascriptDialogBlock:function(i){this.call("_dsb.disableJavascriptDialogBlock",{disable:i!==!1})}};(function(){if(!window._dsf){var i={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:d,close:function(){d.call("_dsb.closePage")},_handleMessageFromNative:function(r){var a=JSON.parse(r.data),e={id:r.callbackId,complete:!0},s=this._dsf[r.method],o=this._dsaf[r.method],p=function(u,_){e.data=u.apply(_,a),d.call("_dsb.returnValue",e)},v=function(u,_){a.push(function(w,y){e.data=w,e.complete=y!==!1,d.call("_dsb.returnValue",e)}),u.apply(_,a)};if(s)p(s,this._dsf);else if(o)v(o,this._dsaf);else{var l=r.method.split(".");if(l.length<2)return;var b=l.pop(),g=l.join("."),c=this._dsf._obs,f=c[g]||{},n=f[b];if(n&&typeof n=="function"){p(n,f);return}if(c=this._dsaf._obs,f=c[g]||{},n=f[b],n&&typeof n=="function"){v(n,f);return}}}};for(var t in i)window[t]=i[t];d.register("_hasJavascriptMethod",function(r,a){var e=r.split(".");if(e.length<2)return!!(_dsf[e]||_dsaf[e]);var r=e.pop(),s=e.join("."),o=_dsf._obs[s]||_dsaf._obs[s];return o&&!!o[r]})}})();var h=d;const N=j(h),k=J({__proto__:null,default:N},[h]);export{k as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as r0,aY as hb,aP as aA,bX as nA,j as y,co as WA,cC as tb,t as tA,aa as dA,P,Z as v0,n as YM,cD as KM,cv as iA,cn as QM,cr as db,b7 as rA,$ as Xb,ac as sA,cE as fA,cF as uA,cG as RA,cH as lA,cI as LA,cJ as NA,T as BA,C as hA}from"./index-
|
|
1
|
+
import{r as r0,aY as hb,aP as aA,bX as nA,j as y,co as WA,cC as tb,t as tA,aa as dA,P,Z as v0,n as YM,cD as KM,cv as iA,cn as QM,cr as db,b7 as rA,$ as Xb,ac as sA,cE as fA,cF as uA,cG as RA,cH as lA,cI as LA,cJ as NA,T as BA,C as hA}from"./index-D0ZDnsBw.js";import{g as XA,a as mA,b as TA}from"./spaces-CUv_J9P5.js";import{j as yA}from"./url-join-Bx_A70NM.js";import{S as a2}from"./Skeleton-CCHHqylE.js";import{H as gA}from"./Hidden-BnLj1Yrh.js";function _A(){const[M,b]=r0.useState(null),{blocklet:O}=hb();return r0.useEffect(()=>{b(XA(O))},[O]),{storageEndpoint:M}}const mb=r0.createContext({}),{Provider:SA,Consumer:R5}=mb;function Tb({children:M}){const[b,O]=r0.useState(!1),[c,q]=r0.useState(null),{blocklet:a,actions:{refreshBlocklet:t}}=hb(),{storageEndpoint:i}=_A(),{api:X}=aA();nA(async()=>{try{if(O(!0),tb.isEmpty(i)){q(null);return}const E=await mA(i);q(E)}catch(E){console.error(E),tA.error(E.message)}finally{O(!1)}},[i]);const R=()=>{q(null),t()},w=async E=>{q(E),await Q(E.endpoint),t()},Q=async E=>{await X.configBlocklet({input:{did:[a.meta.did],configs:[{key:dA.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT,value:E}]}}),t()};r0.useEffect(()=>{async function E(){if(!c)return;const D=await TA(c.endpoint,c.name),W0=tb.merge(c,{name:D});q(W0)}E()},[]);const _=!!(i&&c);return y.jsx(SA,{value:{loading:b,spaceGateway:c,deleteSpaceGateway:R,updateSpaceGateway:w,storageEndpoint:i,settingStorageEndpoint:Q,hasStorageEndpoint:_},children:M})}Tb.propTypes={children:WA.node.isRequired};Tb.defaultProps={};function l5(){return r0.useContext(mb)}function JM({value:M,size:b,style:O,...c}){return y.jsxs(kA,{style:{width:b,height:b,...O},...c,children:[y.jsx(YM,{variant:"determinate",role:"progressbar",value:100,size:b,"aria-label":"decorative progress bar",thickness:10,style:{color:"#dddddd"}}),y.jsx(YM,{variant:"determinate",value:M,role:"progressbar",size:b,thickness:10,"aria-label":"main progress bar"})]})}JM.propTypes={value:P.number.isRequired,size:P.number,style:P.object};JM.defaultProps={size:10,style:{}};const kA=v0.span`
|
|
2
2
|
display: inline-block;
|
|
3
3
|
position: relative;
|
|
4
4
|
> * {
|