@abtnode/blocklet-services 1.16.47-beta-20250729-133234-77359596 → 1.16.47-beta-20250731-014139-e860268f
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/index.js +16 -3
- package/api/libs/auth/adapters/twitter.js +1 -1
- package/api/routes/csp-proxy.js +127 -12
- package/api/routes/oauth/client.js +9 -2
- package/dist/assets/{AdapterDayjs-BEkLDdDJ.js → AdapterDayjs-Dx6irzR8.js} +1 -1
- package/dist/assets/{Google-kE2qbn1K.js → Google-JeDCA1Ra.js} +1 -1
- package/dist/assets/{access-control-DYSDECUw.js → access-control-CqcbwJmg.js} +1 -1
- package/dist/assets/{actions-DvIZNF27.js → actions-CJMVMPKl.js} +1 -1
- package/dist/assets/{add-component-core-ofLBd0tu.js → add-component-core-DycwSgX5.js} +1 -1
- package/dist/assets/{add-resource-BJEI6PbV.js → add-resource-B2NC98Ho.js} +1 -1
- package/dist/assets/{addon-yoa0x6-0.js → addon-BaoB37xg.js} +1 -1
- package/dist/assets/{advanced-C40fcsMj.js → advanced-D8HEmDva.js} +1 -1
- package/dist/assets/aigne-B7-KeQ-z.js +10 -0
- package/dist/assets/api-B6VBwg-Z.js +1 -0
- package/dist/assets/{appearance-ChoNlV7r.js → appearance-B497VXFd.js} +1 -1
- package/dist/assets/{ar-7eC8LKj2.js → ar-DKohTs5n.js} +1 -1
- package/dist/assets/{arrow-down.svg-CW9W9wI1.js → arrow-down.svg-CVjG1TNQ.js} +1 -1
- package/dist/assets/{audit-logs-DjxskWcd.js → audit-logs-Dl8A9oRq.js} +1 -1
- package/dist/assets/authorize-Dq_NLQNa.js +1 -0
- package/dist/assets/{base-chart-Dhrxq8mT.js → base-chart-Bq5ougoU.js} +1 -1
- package/dist/assets/{base32-B9yl211y.js → base32-DdRv86ir.js} +1 -1
- package/dist/assets/{branding-M86FUBw6.js → branding-BoSGCdxD.js} +2 -2
- package/dist/assets/{branding-Da8E_HdC.js → branding-DGrOIsAX.js} +1 -1
- package/dist/assets/{bundle-avatar-JsO8Rdzw.js → bundle-avatar-CbWsxcdV.js} +1 -1
- package/dist/assets/button-NakGdoSQ.js +1 -0
- package/dist/assets/{click-to-copy-C43vd7DG.js → click-to-copy-D2vDgDFL.js} +1 -1
- package/dist/assets/{cloneDeep-DwV-xVQF.js → cloneDeep-Bp5oPxU3.js} +1 -1
- package/dist/assets/{collapse-B0wJmKRl.js → collapse-C3V-lD7M.js} +1 -1
- package/dist/assets/{complete-D_rU8GhU.js → complete-cbrNEz02.js} +1 -1
- package/dist/assets/{component-CYmSwtxC.js → component-Cpwp1opW.js} +56 -72
- package/dist/assets/{config-BICnV2kA.js → config-BVstS2Nm.js} +1 -1
- package/dist/assets/{config-Bel7KIi4.js → config-G8speQtC.js} +1 -1
- package/dist/assets/config-W238rhTW.js +263 -0
- package/dist/assets/{config-navigation-D8OXRCt9.js → config-navigation-C1cOMpGw.js} +3 -3
- package/dist/assets/{config-space-ODrN5Rt0.js → config-space-DkL2gOSr.js} +1 -1
- package/dist/assets/{confirm-CXK9v894.js → confirm-CRV2RKnN.js} +1 -1
- package/dist/assets/{connect-ig-5oJbW.js → connect-B1rcOd6B.js} +1 -1
- package/dist/assets/{connect-yrGsuleV.js → connect-DeAtTJ1r.js} +1 -1
- package/dist/assets/{connect-to-BpYFEl7i.js → connect-to-B8zygJqK.js} +1 -1
- package/dist/assets/{content-layout--aahhgT-.js → content-layout-CT98QJfh.js} +1 -1
- package/dist/assets/{createClass-BuE_i6UP.js → createClass-D_MAnszY.js} +1 -1
- package/dist/assets/dashboard-BDI5arRX.js +106 -0
- package/dist/assets/{de-DgwOa_mf.js → de-CYm7FmiN.js} +1 -1
- package/dist/assets/{delete-confirm-CpZStjie.js → delete-confirm-za4gd8zO.js} +1 -1
- package/dist/assets/{did-address-DrmEnz9K.js → did-address-DM13r0GC.js} +1 -1
- package/dist/assets/{domain-action-card-2vqk_Ni_.js → domain-action-card-Dt77CLty.js} +1 -1
- package/dist/assets/{domain-DbJ3kJI3.js → domain-nJ5cWvRr.js} +1 -1
- package/dist/assets/domains-BZ81E9og.js +1 -0
- package/dist/assets/{dot-BaR-8Dj-.js → dot-BD1gx_6x.js} +1 -1
- package/dist/assets/{email-D_7GvtZA.js → email-CvXCF8HC.js} +2 -2
- package/dist/assets/{empty-spinner-D6ajz4La.js → empty-spinner-BMuZ6jkU.js} +1 -1
- package/dist/assets/engine-B2vjFFt9.js +1 -0
- package/dist/assets/{es-B_gBSKp3.js → es-5zob_8Of.js} +1 -1
- package/dist/assets/{exchange-passport-BGTYcBca.js → exchange-passport-T_o_EXW7.js} +1 -1
- package/dist/assets/{form-CjYT8hk5.js → form-CXNMlv2k.js} +1 -1
- package/dist/assets/{form-text-input-x3g3qd72.js → form-text-input-CFrnnbRX.js} +1 -1
- package/dist/assets/{form-wrapper-DimyA4Kf.js → form-wrapper-CpayHdi1.js} +1 -1
- package/dist/assets/{fr-Bm0AhLrO.js → fr-GNzEzJIo.js} +1 -1
- package/dist/assets/{fuel-CBt1g8zp.js → fuel-LAjBSdqB.js} +1 -1
- package/dist/assets/{gen-access-key-DPNQGDvj.js → gen-access-key-BTl89uBT.js} +1 -1
- package/dist/assets/{gen-simple-access-key-Ctn_w0mo.js → gen-simple-access-key-CSNG83XC.js} +1 -1
- package/dist/assets/get-safe-url-BSYF437j.js +1 -0
- package/dist/assets/{hi-DO31L4at.js → hi-BMaS53lF.js} +1 -1
- package/dist/assets/{home-USnWZhK5.js → home-77gIsxv7.js} +1 -1
- package/dist/assets/{id-BYCjnoK8.js → id-CbyxMpli.js} +1 -1
- package/dist/assets/{iframe-Ci5Ay1y2.js → iframe-DUz4pKvd.js} +1 -1
- package/dist/assets/{index-CE07Exux.js → index--zSWr4mJ.js} +1 -1
- package/dist/assets/{index-DHLC0F8S.js → index-2oWhjD-V.js} +1 -1
- package/dist/assets/{index-CkuzlAat.js → index-9VirX3lP.js} +1 -1
- package/dist/assets/{index-DEDOywis.js → index-BRrSUEyB.js} +1 -1
- package/dist/assets/{index-DAg_a68C.js → index-BVknf90c.js} +1 -1
- package/dist/assets/{index-D8gGAVdB.js → index-BacwgICr.js} +1 -1
- package/dist/assets/{index-DoJKIwOt.js → index-BaofAoCa.js} +1 -1
- package/dist/assets/{index-B8KTykXs.js → index-BeEecuCm.js} +1 -1
- package/dist/assets/{index-DLDRrQJH.js → index-BeaB_cKh.js} +1 -1
- package/dist/assets/{index-D9r0lvN6.js → index-Bk_pomLR.js} +9 -9
- package/dist/assets/{index-CGHTnzaK.js → index-BlUiIWvp.js} +1 -1
- package/dist/assets/{index-BkSX50ri.js → index-C9-vpsBs.js} +1 -1
- package/dist/assets/{index-FrAYP-A_.js → index-CGzwVlpv.js} +8 -8
- package/dist/assets/{index-CiFQnBvO.js → index-CLLf5x5M.js} +1 -1
- package/dist/assets/{index-Bg6_NsC_.js → index-CSX4LtVd.js} +1 -1
- package/dist/assets/{index-CwdidKu0.js → index-CbB58MZZ.js} +1 -1
- package/dist/assets/{index-D_g21v0z.js → index-CdPVeM40.js} +19 -19
- package/dist/assets/{index-PcQgNtUn.js → index-Cvrw3K0w.js} +1 -1
- package/dist/assets/{index-BdKTdgAu.js → index-D1JnavLU.js} +1 -1
- package/dist/assets/index-D1UfZ73T.js +124 -0
- package/dist/assets/{index-CZiEDWpM.js → index-D7bQ7LFj.js} +1 -1
- package/dist/assets/{index-CoPcipTj.js → index-DE4S7LPJ.js} +1 -1
- package/dist/assets/{index-NhYP56dI.js → index-DFQY861i.js} +4 -4
- package/dist/assets/{index-IMquU8ZG.js → index-DL139d1R.js} +1 -1
- package/dist/assets/index-DnYdLG8x.js +1 -0
- package/dist/assets/{index-MJKS-RJU.js → index-Drthk0Vc.js} +1 -1
- package/dist/assets/{index-Bz6T9WJi.js → index-DwQuzZ6W.js} +1 -1
- package/dist/assets/{index-Cq-4YOTs.js → index-EQBtWV25.js} +1 -1
- package/dist/assets/{index-Bnhg3YZe.js → index-GX1AZaVf.js} +1 -1
- package/dist/assets/{index-cdAwhti6.js → index-GX7JwwIf.js} +1 -1
- package/dist/assets/{index-BFAR00t8.js → index-Vc0vthSd.js} +1 -1
- package/dist/assets/{index-Bga8wqEa.js → index-odXYgVVs.js} +1 -1
- package/dist/assets/{invitation-DRsYGsRz.js → invitation-CxN6bhPz.js} +1 -1
- package/dist/assets/invite-heDOi1Gk.js +1 -0
- package/dist/assets/{isURL-BKM8U6hZ.js → isURL-TswwHw1T.js} +1 -1
- package/dist/assets/issue-passport-Bw40L4Ic.js +1 -0
- package/dist/assets/{item-DMRC_0Pl.js → item-ouNpV3tA.js} +1 -1
- package/dist/assets/{ja-Ck2EVKeO.js → ja-BPCCKkW4.js} +1 -1
- package/dist/assets/{ko-Nk_6p6Jl.js → ko-Wbe93sio.js} +1 -1
- package/dist/assets/{landing-page-Dc4hRNuW.js → landing-page-DYuzaUFl.js} +1 -1
- package/dist/assets/{launch-result-message-C7170Bvt.js → launch-result-message-DDqxU5ge.js} +1 -1
- package/dist/assets/{layout-BGLUR5z_.js → layout-SbmsTmT-.js} +1 -1
- package/dist/assets/{list-X2F1RKzQ.js → list-9fyAFvMO.js} +1 -1
- package/dist/assets/{list-DgH58u4D.js → list-DtmR-6Z4.js} +2 -2
- package/dist/assets/{list-header-X0CL-_hO.js → list-header-BDPLDqO-.js} +1 -1
- package/dist/assets/localization-Bi90G6aS.js +1 -0
- package/dist/assets/{log-EgLjQcxJ.js → log-DvCqrgCp.js} +1 -1
- package/dist/assets/logger-DoOuw4D6.js +1 -0
- package/dist/assets/{login-BrQzzFXX.js → login-BVFzm3Co.js} +1 -1
- package/dist/assets/{login-oauth-callback-DaVwf7V2.js → login-oauth-callback-CMSYGfid.js} +1 -1
- package/dist/assets/{logo-uploader-DgSolZrp.js → logo-uploader-BshflYAa.js} +2 -2
- package/dist/assets/{lost-passport-DEW2BulR.js → lost-passport-CaPo9QEu.js} +1 -1
- package/dist/assets/{observability-DVi-zwiF.js → observability-C5Y6fafw.js} +1 -1
- package/dist/assets/{omit-8QDODHip.js → omit-DDVAqzZq.js} +1 -1
- package/dist/assets/{open-window-CcbW4k1o.js → open-window-BH5dHcbl.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-Ba3rEZjM.js → over-due-invoice-payment-BA9fs62q.js} +1 -1
- package/dist/assets/{overview-CS6bfsq0.js → overview-CHn4eBUK.js} +1 -1
- package/dist/assets/{page-header-1pVKKoSa.js → page-header-B9Q5ZOnJ.js} +1 -1
- package/dist/assets/{passport-item-BniPqqnO.js → passport-item-CqfuHfH-.js} +1 -1
- package/dist/assets/{permission-w0BesrB_.js → permission-BVTxHNeQ.js} +1 -1
- package/dist/assets/{playground-CveQRqPB.js → playground-DUuQxqZF.js} +1 -1
- package/dist/assets/preferences--2YETF2t.js +1 -0
- package/dist/assets/profile-embed-BPQR6Tpe.js +1 -0
- package/dist/assets/{pt-C-JzkWqR.js → pt-C1fHGXQk.js} +1 -1
- package/dist/assets/publish-resource-qtIS1W3s.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-CdYP6hjZ.js → react-beautiful-dnd.esm-DY5UIQEa.js} +1 -1
- package/dist/assets/{react-stripe.esm-3alxb6kT.js → react-stripe.esm-DlCFj5cL.js} +1 -1
- package/dist/assets/{required-qTx6pgJa.js → required-mwCee7dE.js} +1 -1
- package/dist/assets/{ru-DR6is0tr.js → ru-DJ3aNml8.js} +1 -1
- package/dist/assets/{runtime-CYnDo-HU.js → runtime-WLtCIkiy.js} +1 -1
- package/dist/assets/{sanitize-BSjwjSMl.js → sanitize-d0BswqQy.js} +1 -1
- package/dist/assets/sdk-CrmCUSu6.js +1 -0
- package/dist/assets/{section-DLNNkzJC.js → section-DkbgrVvQ.js} +1 -1
- package/dist/assets/{security-DLgKehuW.js → security-D5f09NAi.js} +3 -3
- package/dist/assets/{session-Ci_4G0CP.js → session-CJYcrokL.js} +1 -1
- package/dist/assets/setup-chjxGOpx.js +30 -0
- package/dist/assets/{shorten-label-C8Cay9FW.js → shorten-label-CzJmma8P.js} +1 -1
- package/dist/assets/{simple-select-DCCkM3zE.js → simple-select-WHx-v2hU.js} +1 -1
- package/dist/assets/{spaces-C1LV9UvU.js → spaces-B0VryU-h.js} +1 -1
- package/dist/assets/{start-CaaDhsmK.js → start-DdQSLbG1.js} +1 -1
- package/dist/assets/{starting-progress-4SearER_.js → starting-progress-BOAJA87-.js} +1 -1
- package/dist/assets/{status-BeqBWyAi.js → status-3ePg3iDr.js} +1 -1
- package/dist/assets/{step-actions-C8wc4rOR.js → step-actions-JxTPDo-C.js} +1 -1
- package/dist/assets/{studio-C-1N3D23.js → studio-BpropsaK.js} +1 -1
- package/dist/assets/{switch-control-Cd3JbWWV.js → switch-control-C3A7Bzd7.js} +1 -1
- package/dist/assets/{table-tips-3_n5uR-X.js → table-tips-BqAxYXjm.js} +1 -1
- package/dist/assets/{team-CD3vKVPJ.js → team-DL-1lYRh.js} +5 -5
- package/dist/assets/{th-Cn3755Vi.js → th-C22KCFdo.js} +1 -1
- package/dist/assets/{traffic-h7MLT42d.js → traffic-TO0gOocP.js} +1 -1
- package/dist/assets/{transfer-BgDlNRZV.js → transfer-y-ql-f3C.js} +1 -1
- package/dist/assets/{unsubscribe-DmHvwVjR.js → unsubscribe-ysldRIx6.js} +1 -1
- package/dist/assets/{use-mobile-B9FM-UBY.js → use-mobile-D0T_V7RQ.js} +1 -1
- package/dist/assets/{use-mobile-BC9t6zmM.js → use-mobile-IWOBvgsY.js} +1 -1
- package/dist/assets/{use-promise-window-open-ecxT8x1I.js → use-promise-window-open-C5suxy-U.js} +1 -1
- package/dist/assets/{use-server-logo-xLbI9v7G.js → use-server-logo-CUO3ZK3W.js} +1 -1
- package/dist/assets/{use-window-close-CleYtwbz.js → use-window-close-RhOoosk-.js} +1 -1
- package/dist/assets/{useAsync-BdgUavMa.js → useAsync-CQhKDImp.js} +1 -1
- package/dist/assets/{useAsync-DgPr_To1.js → useAsync-VHQLt8EO.js} +1 -1
- package/dist/assets/{useLocalStorage-Dgwq5dGM.js → useLocalStorage-DIjnXt7A.js} +1 -1
- package/dist/assets/user-center-B-cbZnEv.js +126 -0
- package/dist/assets/{user-sessions-D9ZCFiu3.js → user-sessions-0TRZeeJ5.js} +1 -1
- package/dist/assets/{util-CJadXi8V.js → util-CZwlQQjD.js} +1 -1
- package/dist/assets/{util-Bgqx2flh.js → util-h89lj_Gk.js} +1 -1
- package/dist/assets/{vendor-arcblock-BnbwP1kf.js → vendor-arcblock-CY7eM47O.js} +1 -1
- package/dist/assets/{vendor-hooks-DTeIFVkk.js → vendor-hooks-B2bT6Nqf.js} +1 -1
- package/dist/assets/{vendor-mui-core-CcrDM-5l.js → vendor-mui-core-Bw-IjQ9m.js} +1 -1
- package/dist/assets/{vendor-mui-x-BVRWKjdg.js → vendor-mui-x-tGuaJHw_.js} +14 -14
- package/dist/assets/{vendor-utils-BOkrEpKO.js → vendor-utils-B4mliPf7.js} +1 -1
- package/dist/assets/{vendor-ux-CUBj5GXM.js → vendor-ux-e4SIahY6.js} +2 -2
- package/dist/assets/{vi-7MIaoDt9.js → vi-D_AWh4Q3.js} +1 -1
- package/dist/assets/{wait-connect-Cht9WKDH.js → wait-connect-DrZC6ybw.js} +1 -1
- package/dist/assets/wrap-locale-vvkgV_w9.js +1 -0
- package/dist/assets/{zh-DswrR4Lx.js → zh-ZjW3xV_P.js} +1 -1
- package/dist/assets/{zh-DOMhcyY9.js → zh-mA44AG8z.js} +1 -1
- package/dist/assets/{zh-tw-De_IfliP.js → zh-tw-BuqwZI-0.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/service-worker.js +1 -1
- package/package.json +33 -32
- package/dist/assets/aigne-CO_-YbPk.js +0 -10
- package/dist/assets/api-Rnh95Dt4.js +0 -1
- package/dist/assets/authorize-u1RPtGlb.js +0 -1
- package/dist/assets/button-CPgviFPs.js +0 -1
- package/dist/assets/config-Dh0hZZiY.js +0 -26
- package/dist/assets/dashboard-VE3KX6Hk.js +0 -106
- package/dist/assets/domains-BsCL1ViY.js +0 -1
- package/dist/assets/engine-Ch-5kOUZ.js +0 -1
- package/dist/assets/get-safe-url-oiWXWYvc.js +0 -1
- package/dist/assets/index-Bgm1cW2N.js +0 -124
- package/dist/assets/index-BwxOZ_PS.js +0 -1
- package/dist/assets/invite-NVVbFYlq.js +0 -1
- package/dist/assets/issue-passport-7Rfhc8hs.js +0 -1
- package/dist/assets/localization-sp8DBpxc.js +0 -1
- package/dist/assets/logger-MoQC3rmC.js +0 -1
- package/dist/assets/preferences-YUKuGDai.js +0 -1
- package/dist/assets/profile-embed-D8T7nOel.js +0 -1
- package/dist/assets/publish-resource-DAqbWOIX.js +0 -1
- package/dist/assets/sdk-DAF46Tln.js +0 -1
- package/dist/assets/setup-Cq1C8BeD.js +0 -30
- package/dist/assets/user-center-Cveaoeez.js +0 -126
- package/dist/assets/wrap-locale-B4B-XHcF.js +0 -1
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import{r as V,f as he,p as Z}from"./vendor-react-Dvs43sk9.js";import{D as et,j as S,bb as rt,ak as Q,z as tt,M as nt,U as nr,I as Oe,a6 as ae,bE as st,aj as it,F as ot,bF as at,W as G,P as ct,T as Je,c1 as Ie,A as sr,am as me,dw as lt,bZ as ut,a3 as ft,dx as dt,dy as pt,Q as Te,ct as vt,dz as ht,at as mt,cs as gt,a$ as yt}from"./vendor-mui-core-CcrDM-5l.js";import{g as ir,b as se,a as pe}from"./vendor-hooks-DTeIFVkk.js";import{i as xt}from"./isURL-BKM8U6hZ.js";import{aI as _t,ap as zr,aJ as wt,aK as Ct,b as qr,I as or,H as te}from"./vendor-ux-CUBj5GXM.js";import{bT as Lr,bQ as bt,bU as Et,bv as St,bV as Pt,c as Nr,U as jt,a1 as Bt,aN as kt,f as At}from"./index-FrAYP-A_.js";import{S as ue}from"./section-DLNNkzJC.js";import{R as Ot}from"./required-qTx6pgJa.js";import{F as Dt}from"./form-wrapper-DimyA4Kf.js";import{I as It,F as ve}from"./form-text-input-x3g3qd72.js";import{u as Tt}from"./use-promise-window-open-ecxT8x1I.js";import{w as Rt}from"./wait-connect-Cht9WKDH.js";import{B as ar,b as Ft,C as zt}from"./vendor-utils-BOkrEpKO.js";import{r as De}from"./index-BPy8_fa2.js";import{r as Qe}from"./empty-DhZfJeme.js";import{f as fe}from"./index-DBs9Ljax.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BnbwP1kf.js";import"./edit.svg-DycWG9v3.js";import"./get-safe-url-oiWXWYvc.js";const qt=at`
|
|
2
|
-
0%, 100% {
|
|
3
|
-
transform: scale(1) translateX(0);
|
|
4
|
-
}
|
|
5
|
-
50% {
|
|
6
|
-
transform: scale(1.05) translateX(-3px);
|
|
7
|
-
}
|
|
8
|
-
25%, 75% {
|
|
9
|
-
transform: scale(1.1) translateX(3px);
|
|
10
|
-
}
|
|
11
|
-
`;function ge({src:v,alt:B,size:x=20}){return S.jsx("img",{src:v,alt:B,style:{width:x,height:x,display:"block",objectFit:"contain",borderRadius:"2px",flexShrink:0},onError:h=>{h.target.style.display="none"}})}ge.propTypes={src:G.string.isRequired,alt:G.string.isRequired,size:G.number};const Lt=48,Nt=8,cr={PaperProps:{style:{maxHeight:Lt*4.5+Nt,width:250}}},Ht=(v,B,x)=>({fontWeight:B.indexOf(v)===-1?x.typography.fontWeightRegular:x.typography.fontWeightMedium});function Hr({label:v="",disabled:B=!1,required:x=!1,initialValue:h="",onChange:D=()=>{},sx:b={},onSubmit:E=()=>{},triggers:u=[],options:o=[],formatterBeforeSubmit:t=g=>g.join(","),helperText:m="",config:_={},directEditing:f=!1,searchable:n=!0,...j}){const g=et(),[y,O]=V.useState(f),[r,e]=V.useState(!1),[c,d]=V.useState(""),{multiple:A=!1,labelField:T="name",valueField:z="code"}=_,[q,i]=V.useState(h),[p,k]=V.useState(q),[P,F]=V.useState(!1),[L,M]=V.useState(!1),$=V.useCallback(()=>{M(!0),setTimeout(()=>{M(!1)},500)},[]),C=async()=>{e(!0);try{await E(typeof t=="function"&&A?t(p):p)===!1?k(q):(k(p),i(p),F(!1))}catch{k(q)}finally{e(!1),O(!1)}},N=V.useCallback(()=>{f&&!B&&!r&&C(),P&&$(),!P&&!B&&!r&&(O(!1),F(!1))},[f,B,r,P,$]);V.useEffect(()=>{const s=h;s!==q&&(i(s),k(s),F(!1))},[h,q]);const R=o.filter(s=>{if(!c)return!0;const a=c.toLowerCase();return s[T]?.toLowerCase().includes(a)||s[z]?.toLowerCase().includes(a)}),l=s=>{let{value:a}=s.target;A&&(a=typeof a=="string"?a.split(","):a),F(a!==p),k(a),D(a)},w=y||f?S.jsxs(rt,{value:p,onChange:l,fullWidth:!0,multiple:A,variant:"outlined",margin:"dense",onBlur:N,disabled:B,renderValue:s=>{if(A)return S.jsx(Q,{sx:{display:"flex",flexWrap:"wrap"},children:s.filter(H=>o.some(J=>J[z]===H)).map(H=>S.jsx(nr,{label:o.find(J=>J[z]===H)[T],style:{marginRight:8},size:"small"},H))});if(!s)return null;const a=o.find(H=>H[z]===s);return S.jsxs(Q,{sx:{display:"flex",alignItems:"center",gap:1},children:[a?.logo&&S.jsx(ge,{src:a.logo,alt:a[T],size:20}),S.jsx("span",{children:a?a[T]:""})]})},MenuProps:{...cr,PaperProps:{...cr.PaperProps}},error:!!m,...j,children:[n?S.jsx(Q,{sx:{p:1,borderBottom:1,borderColor:"divider"},children:S.jsx(tt,{size:"small",placeholder:"Search...",value:c,onChange:s=>d(s.target.value),onClick:s=>s.stopPropagation(),onKeyDown:s=>s.stopPropagation(),fullWidth:!0,variant:"outlined"})}):null,R.map(s=>S.jsx(nt,{value:s[z],style:Ht(s[z],p,g),children:S.jsxs(Q,{sx:{display:"flex",alignItems:"center",gap:1},children:[s.logo&&S.jsx(ge,{src:s.logo,alt:s[T],size:20}),S.jsx("span",{children:s[T]})]})},s[z]))]}):S.jsx(Q,{"data-cy":"schema-form-item-edit",className:"form-item-input slot",style:{whiteSpace:"pre-wrap"},sx:{px:1},onClick:()=>{B||O(!0)},children:A?p.filter(s=>o.some(a=>a[z]===s)).map(s=>S.jsx(nr,{label:o.find(a=>a[z]===s)[T],style:{marginRight:8},size:"small"},s)):p&&o.some(s=>s[z]===p)&&S.jsxs(Q,{sx:{display:"flex",alignItems:"center",gap:1},children:[(()=>{const s=o.find(a=>a[z]===p);return s?.logo?S.jsx(ge,{src:s.logo,alt:s[T],size:20}):null})(),S.jsx("span",{children:o.find(s=>s[z]===p)[T]})]})});return S.jsx(Dt,{className:"form",sx:b,children:S.jsxs(Q,{className:"form-item",children:[S.jsxs(Q,{className:"form-item-label",children:[v,x&&S.jsx(Ot,{})]}),S.jsxs(Q,{className:"form-item-body",children:[S.jsx(Q,{className:"form-item-input",children:w}),S.jsx(Q,{className:"form-item-action",style:!y||f?{marginLeft:0}:{},children:y&&!f?S.jsxs(S.Fragment,{children:[P?S.jsx(Oe,{"data-cy":"schema-form-item-confirm",onClick:C,disabled:B||r,sx:{animation:L?`${qt} 0.5s linear`:"none"},size:"large",children:r?S.jsx(ae,{size:24}):S.jsx(st,{})}):null,S.jsx(Oe,{"data-cy":"schema-form-item-cancel",onClick:()=>{k(q),O(!1)},disabled:B||r,size:"large",children:S.jsx(it,{})})]}):S.jsx(Q,{children:u.length?S.jsx(It,{triggers:u,disabled:B}):null})})]}),y&&m&&S.jsx(ot,{error:!0,children:m})]})})}Hr.propTypes={sx:G.object,onSubmit:G.func,onChange:G.func,label:G.string,initialValue:G.string,required:G.bool,disabled:G.bool,triggers:G.array,options:G.array,helperText:G.string,formatterBeforeSubmit:G.func,config:G.object,directEditing:G.bool,searchable:G.bool};var X={},ye={exports:{}},xe={exports:{}},Mt=xe.exports,lr;function re(){return lr||(lr=1,function(v,B){(function(x,h){v.exports=h()})(Mt,function(){var x=x||function(h,D){var b;if(typeof window<"u"&&window.crypto&&(b=window.crypto),typeof self<"u"&&self.crypto&&(b=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(b=globalThis.crypto),!b&&typeof window<"u"&&window.msCrypto&&(b=window.msCrypto),!b&&typeof he<"u"&&he.crypto&&(b=he.crypto),!b&&typeof _t=="function")try{b=zr()}catch{}var E=function(){if(b){if(typeof b.getRandomValues=="function")try{return b.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof b.randomBytes=="function")try{return b.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},u=Object.create||function(){function r(){}return function(e){var c;return r.prototype=e,c=new r,r.prototype=null,c}}(),o={},t=o.lib={},m=t.Base=function(){return{extend:function(r){var e=u(this);return r&&e.mixIn(r),(!e.hasOwnProperty("init")||this.init===e.init)&&(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var r=this.extend();return r.init.apply(r,arguments),r},init:function(){},mixIn:function(r){for(var e in r)r.hasOwnProperty(e)&&(this[e]=r[e]);r.hasOwnProperty("toString")&&(this.toString=r.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),_=t.WordArray=m.extend({init:function(r,e){r=this.words=r||[],e!=D?this.sigBytes=e:this.sigBytes=r.length*4},toString:function(r){return(r||n).stringify(this)},concat:function(r){var e=this.words,c=r.words,d=this.sigBytes,A=r.sigBytes;if(this.clamp(),d%4)for(var T=0;T<A;T++){var z=c[T>>>2]>>>24-T%4*8&255;e[d+T>>>2]|=z<<24-(d+T)%4*8}else for(var q=0;q<A;q+=4)e[d+q>>>2]=c[q>>>2];return this.sigBytes+=A,this},clamp:function(){var r=this.words,e=this.sigBytes;r[e>>>2]&=4294967295<<32-e%4*8,r.length=h.ceil(e/4)},clone:function(){var r=m.clone.call(this);return r.words=this.words.slice(0),r},random:function(r){for(var e=[],c=0;c<r;c+=4)e.push(E());return new _.init(e,r)}}),f=o.enc={},n=f.Hex={stringify:function(r){for(var e=r.words,c=r.sigBytes,d=[],A=0;A<c;A++){var T=e[A>>>2]>>>24-A%4*8&255;d.push((T>>>4).toString(16)),d.push((T&15).toString(16))}return d.join("")},parse:function(r){for(var e=r.length,c=[],d=0;d<e;d+=2)c[d>>>3]|=parseInt(r.substr(d,2),16)<<24-d%8*4;return new _.init(c,e/2)}},j=f.Latin1={stringify:function(r){for(var e=r.words,c=r.sigBytes,d=[],A=0;A<c;A++){var T=e[A>>>2]>>>24-A%4*8&255;d.push(String.fromCharCode(T))}return d.join("")},parse:function(r){for(var e=r.length,c=[],d=0;d<e;d++)c[d>>>2]|=(r.charCodeAt(d)&255)<<24-d%4*8;return new _.init(c,e)}},g=f.Utf8={stringify:function(r){try{return decodeURIComponent(escape(j.stringify(r)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(r){return j.parse(unescape(encodeURIComponent(r)))}},y=t.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new _.init,this._nDataBytes=0},_append:function(r){typeof r=="string"&&(r=g.parse(r)),this._data.concat(r),this._nDataBytes+=r.sigBytes},_process:function(r){var e,c=this._data,d=c.words,A=c.sigBytes,T=this.blockSize,z=T*4,q=A/z;r?q=h.ceil(q):q=h.max((q|0)-this._minBufferSize,0);var i=q*T,p=h.min(i*4,A);if(i){for(var k=0;k<i;k+=T)this._doProcessBlock(d,k);e=d.splice(0,i),c.sigBytes-=p}return new _.init(e,p)},clone:function(){var r=m.clone.call(this);return r._data=this._data.clone(),r},_minBufferSize:0});t.Hasher=y.extend({cfg:m.extend(),init:function(r){this.cfg=this.cfg.extend(r),this.reset()},reset:function(){y.reset.call(this),this._doReset()},update:function(r){return this._append(r),this._process(),this},finalize:function(r){r&&this._append(r);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(r){return function(e,c){return new r.init(c).finalize(e)}},_createHmacHelper:function(r){return function(e,c){return new O.HMAC.init(r,c).finalize(e)}}});var O=o.algo={};return o}(Math);return x})}(xe)),xe.exports}var _e={exports:{}},Kt=_e.exports,ur;function Mr(){return ur||(ur=1,function(v,B){(function(x,h){v.exports=h(re())})(Kt,function(x){return function(){var h=x,D=h.lib,b=D.WordArray,E=h.enc;E.Base64={stringify:function(o){var t=o.words,m=o.sigBytes,_=this._map;o.clamp();for(var f=[],n=0;n<m;n+=3)for(var j=t[n>>>2]>>>24-n%4*8&255,g=t[n+1>>>2]>>>24-(n+1)%4*8&255,y=t[n+2>>>2]>>>24-(n+2)%4*8&255,O=j<<16|g<<8|y,r=0;r<4&&n+r*.75<m;r++)f.push(_.charAt(O>>>6*(3-r)&63));var e=_.charAt(64);if(e)for(;f.length%4;)f.push(e);return f.join("")},parse:function(o){var t=o.length,m=this._map,_=this._reverseMap;if(!_){_=this._reverseMap=[];for(var f=0;f<m.length;f++)_[m.charCodeAt(f)]=f}var n=m.charAt(64);if(n){var j=o.indexOf(n);j!==-1&&(t=j)}return u(o,t,_)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function u(o,t,m){for(var _=[],f=0,n=0;n<t;n++)if(n%4){var j=m[o.charCodeAt(n-1)]<<n%4*2,g=m[o.charCodeAt(n)]>>>6-n%4*2,y=j|g;_[f>>>2]|=y<<24-f%4*8,f++}return b.create(_,f)}}(),x.enc.Base64})}(_e)),_e.exports}var we={exports:{}},Ut=we.exports,fr;function Wt(){return fr||(fr=1,function(v,B){(function(x,h){v.exports=h(re())})(Ut,function(x){return function(h){var D=x,b=D.lib,E=b.WordArray,u=b.Hasher,o=D.algo,t=[];(function(){for(var g=0;g<64;g++)t[g]=h.abs(h.sin(g+1))*4294967296|0})();var m=o.MD5=u.extend({_doReset:function(){this._hash=new E.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(g,y){for(var O=0;O<16;O++){var r=y+O,e=g[r];g[r]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360}var c=this._hash.words,d=g[y+0],A=g[y+1],T=g[y+2],z=g[y+3],q=g[y+4],i=g[y+5],p=g[y+6],k=g[y+7],P=g[y+8],F=g[y+9],L=g[y+10],M=g[y+11],$=g[y+12],C=g[y+13],N=g[y+14],R=g[y+15],l=c[0],w=c[1],s=c[2],a=c[3];l=_(l,w,s,a,d,7,t[0]),a=_(a,l,w,s,A,12,t[1]),s=_(s,a,l,w,T,17,t[2]),w=_(w,s,a,l,z,22,t[3]),l=_(l,w,s,a,q,7,t[4]),a=_(a,l,w,s,i,12,t[5]),s=_(s,a,l,w,p,17,t[6]),w=_(w,s,a,l,k,22,t[7]),l=_(l,w,s,a,P,7,t[8]),a=_(a,l,w,s,F,12,t[9]),s=_(s,a,l,w,L,17,t[10]),w=_(w,s,a,l,M,22,t[11]),l=_(l,w,s,a,$,7,t[12]),a=_(a,l,w,s,C,12,t[13]),s=_(s,a,l,w,N,17,t[14]),w=_(w,s,a,l,R,22,t[15]),l=f(l,w,s,a,A,5,t[16]),a=f(a,l,w,s,p,9,t[17]),s=f(s,a,l,w,M,14,t[18]),w=f(w,s,a,l,d,20,t[19]),l=f(l,w,s,a,i,5,t[20]),a=f(a,l,w,s,L,9,t[21]),s=f(s,a,l,w,R,14,t[22]),w=f(w,s,a,l,q,20,t[23]),l=f(l,w,s,a,F,5,t[24]),a=f(a,l,w,s,N,9,t[25]),s=f(s,a,l,w,z,14,t[26]),w=f(w,s,a,l,P,20,t[27]),l=f(l,w,s,a,C,5,t[28]),a=f(a,l,w,s,T,9,t[29]),s=f(s,a,l,w,k,14,t[30]),w=f(w,s,a,l,$,20,t[31]),l=n(l,w,s,a,i,4,t[32]),a=n(a,l,w,s,P,11,t[33]),s=n(s,a,l,w,M,16,t[34]),w=n(w,s,a,l,N,23,t[35]),l=n(l,w,s,a,A,4,t[36]),a=n(a,l,w,s,q,11,t[37]),s=n(s,a,l,w,k,16,t[38]),w=n(w,s,a,l,L,23,t[39]),l=n(l,w,s,a,C,4,t[40]),a=n(a,l,w,s,d,11,t[41]),s=n(s,a,l,w,z,16,t[42]),w=n(w,s,a,l,p,23,t[43]),l=n(l,w,s,a,F,4,t[44]),a=n(a,l,w,s,$,11,t[45]),s=n(s,a,l,w,R,16,t[46]),w=n(w,s,a,l,T,23,t[47]),l=j(l,w,s,a,d,6,t[48]),a=j(a,l,w,s,k,10,t[49]),s=j(s,a,l,w,N,15,t[50]),w=j(w,s,a,l,i,21,t[51]),l=j(l,w,s,a,$,6,t[52]),a=j(a,l,w,s,z,10,t[53]),s=j(s,a,l,w,L,15,t[54]),w=j(w,s,a,l,A,21,t[55]),l=j(l,w,s,a,P,6,t[56]),a=j(a,l,w,s,R,10,t[57]),s=j(s,a,l,w,p,15,t[58]),w=j(w,s,a,l,C,21,t[59]),l=j(l,w,s,a,q,6,t[60]),a=j(a,l,w,s,M,10,t[61]),s=j(s,a,l,w,T,15,t[62]),w=j(w,s,a,l,F,21,t[63]),c[0]=c[0]+l|0,c[1]=c[1]+w|0,c[2]=c[2]+s|0,c[3]=c[3]+a|0},_doFinalize:function(){var g=this._data,y=g.words,O=this._nDataBytes*8,r=g.sigBytes*8;y[r>>>5]|=128<<24-r%32;var e=h.floor(O/4294967296),c=O;y[(r+64>>>9<<4)+15]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360,y[(r+64>>>9<<4)+14]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360,g.sigBytes=(y.length+1)*4,this._process();for(var d=this._hash,A=d.words,T=0;T<4;T++){var z=A[T];A[T]=(z<<8|z>>>24)&16711935|(z<<24|z>>>8)&4278255360}return d},clone:function(){var g=u.clone.call(this);return g._hash=this._hash.clone(),g}});function _(g,y,O,r,e,c,d){var A=g+(y&O|~y&r)+e+d;return(A<<c|A>>>32-c)+y}function f(g,y,O,r,e,c,d){var A=g+(y&r|O&~r)+e+d;return(A<<c|A>>>32-c)+y}function n(g,y,O,r,e,c,d){var A=g+(y^O^r)+e+d;return(A<<c|A>>>32-c)+y}function j(g,y,O,r,e,c,d){var A=g+(O^(y|~r))+e+d;return(A<<c|A>>>32-c)+y}D.MD5=u._createHelper(m),D.HmacMD5=u._createHmacHelper(m)}(Math),x.MD5})}(we)),we.exports}var Ce={exports:{}},be={exports:{}},$t=be.exports,dr;function Vt(){return dr||(dr=1,function(v,B){(function(x,h){v.exports=h(re())})($t,function(x){return function(){var h=x,D=h.lib,b=D.WordArray,E=D.Hasher,u=h.algo,o=[],t=u.SHA1=E.extend({_doReset:function(){this._hash=new b.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(m,_){for(var f=this._hash.words,n=f[0],j=f[1],g=f[2],y=f[3],O=f[4],r=0;r<80;r++){if(r<16)o[r]=m[_+r]|0;else{var e=o[r-3]^o[r-8]^o[r-14]^o[r-16];o[r]=e<<1|e>>>31}var c=(n<<5|n>>>27)+O+o[r];r<20?c+=(j&g|~j&y)+1518500249:r<40?c+=(j^g^y)+1859775393:r<60?c+=(j&g|j&y|g&y)-1894007588:c+=(j^g^y)-899497514,O=y,y=g,g=j<<30|j>>>2,j=n,n=c}f[0]=f[0]+n|0,f[1]=f[1]+j|0,f[2]=f[2]+g|0,f[3]=f[3]+y|0,f[4]=f[4]+O|0},_doFinalize:function(){var m=this._data,_=m.words,f=this._nDataBytes*8,n=m.sigBytes*8;return _[n>>>5]|=128<<24-n%32,_[(n+64>>>9<<4)+14]=Math.floor(f/4294967296),_[(n+64>>>9<<4)+15]=f,m.sigBytes=_.length*4,this._process(),this._hash},clone:function(){var m=E.clone.call(this);return m._hash=this._hash.clone(),m}});h.SHA1=E._createHelper(t),h.HmacSHA1=E._createHmacHelper(t)}(),x.SHA1})}(be)),be.exports}var Ee={exports:{}},Gt=Ee.exports,pr;function Yt(){return pr||(pr=1,function(v,B){(function(x,h){v.exports=h(re())})(Gt,function(x){(function(){var h=x,D=h.lib,b=D.Base,E=h.enc,u=E.Utf8,o=h.algo;o.HMAC=b.extend({init:function(t,m){t=this._hasher=new t.init,typeof m=="string"&&(m=u.parse(m));var _=t.blockSize,f=_*4;m.sigBytes>f&&(m=t.finalize(m)),m.clamp();for(var n=this._oKey=m.clone(),j=this._iKey=m.clone(),g=n.words,y=j.words,O=0;O<_;O++)g[O]^=1549556828,y[O]^=909522486;n.sigBytes=j.sigBytes=f,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var m=this._hasher,_=m.finalize(t);m.reset();var f=m.finalize(this._oKey.clone().concat(_));return f}})})()})}(Ee)),Ee.exports}var Zt=Ce.exports,vr;function Kr(){return vr||(vr=1,function(v,B){(function(x,h,D){v.exports=h(re(),Vt(),Yt())})(Zt,function(x){return function(){var h=x,D=h.lib,b=D.Base,E=D.WordArray,u=h.algo,o=u.MD5,t=u.EvpKDF=b.extend({cfg:b.extend({keySize:128/32,hasher:o,iterations:1}),init:function(m){this.cfg=this.cfg.extend(m)},compute:function(m,_){for(var f,n=this.cfg,j=n.hasher.create(),g=E.create(),y=g.words,O=n.keySize,r=n.iterations;y.length<O;){f&&j.update(f),f=j.update(m).finalize(_),j.reset();for(var e=1;e<r;e++)f=j.finalize(f),j.reset();g.concat(f)}return g.sigBytes=O*4,g}});h.EvpKDF=function(m,_,f){return t.create(f).compute(m,_)}}(),x.EvpKDF})}(Ce)),Ce.exports}var Se={exports:{}},Jt=Se.exports,hr;function Qt(){return hr||(hr=1,function(v,B){(function(x,h,D){v.exports=h(re(),Kr())})(Jt,function(x){x.lib.Cipher||function(h){var D=x,b=D.lib,E=b.Base,u=b.WordArray,o=b.BufferedBlockAlgorithm,t=D.enc;t.Utf8;var m=t.Base64,_=D.algo,f=_.EvpKDF,n=b.Cipher=o.extend({cfg:E.extend(),createEncryptor:function(i,p){return this.create(this._ENC_XFORM_MODE,i,p)},createDecryptor:function(i,p){return this.create(this._DEC_XFORM_MODE,i,p)},init:function(i,p,k){this.cfg=this.cfg.extend(k),this._xformMode=i,this._key=p,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(i){return this._append(i),this._process()},finalize:function(i){i&&this._append(i);var p=this._doFinalize();return p},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function i(p){return typeof p=="string"?q:A}return function(p){return{encrypt:function(k,P,F){return i(P).encrypt(p,k,P,F)},decrypt:function(k,P,F){return i(P).decrypt(p,k,P,F)}}}}()});b.StreamCipher=n.extend({_doFinalize:function(){var i=this._process(!0);return i},blockSize:1});var j=D.mode={},g=b.BlockCipherMode=E.extend({createEncryptor:function(i,p){return this.Encryptor.create(i,p)},createDecryptor:function(i,p){return this.Decryptor.create(i,p)},init:function(i,p){this._cipher=i,this._iv=p}}),y=j.CBC=function(){var i=g.extend();i.Encryptor=i.extend({processBlock:function(k,P){var F=this._cipher,L=F.blockSize;p.call(this,k,P,L),F.encryptBlock(k,P),this._prevBlock=k.slice(P,P+L)}}),i.Decryptor=i.extend({processBlock:function(k,P){var F=this._cipher,L=F.blockSize,M=k.slice(P,P+L);F.decryptBlock(k,P),p.call(this,k,P,L),this._prevBlock=M}});function p(k,P,F){var L,M=this._iv;M?(L=M,this._iv=h):L=this._prevBlock;for(var $=0;$<F;$++)k[P+$]^=L[$]}return i}(),O=D.pad={},r=O.Pkcs7={pad:function(i,p){for(var k=p*4,P=k-i.sigBytes%k,F=P<<24|P<<16|P<<8|P,L=[],M=0;M<P;M+=4)L.push(F);var $=u.create(L,P);i.concat($)},unpad:function(i){var p=i.words[i.sigBytes-1>>>2]&255;i.sigBytes-=p}};b.BlockCipher=n.extend({cfg:n.cfg.extend({mode:y,padding:r}),reset:function(){var i;n.reset.call(this);var p=this.cfg,k=p.iv,P=p.mode;this._xformMode==this._ENC_XFORM_MODE?i=P.createEncryptor:(i=P.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==i?this._mode.init(this,k&&k.words):(this._mode=i.call(P,this,k&&k.words),this._mode.__creator=i)},_doProcessBlock:function(i,p){this._mode.processBlock(i,p)},_doFinalize:function(){var i,p=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(p.pad(this._data,this.blockSize),i=this._process(!0)):(i=this._process(!0),p.unpad(i)),i},blockSize:128/32});var e=b.CipherParams=E.extend({init:function(i){this.mixIn(i)},toString:function(i){return(i||this.formatter).stringify(this)}}),c=D.format={},d=c.OpenSSL={stringify:function(i){var p,k=i.ciphertext,P=i.salt;return P?p=u.create([1398893684,1701076831]).concat(P).concat(k):p=k,p.toString(m)},parse:function(i){var p,k=m.parse(i),P=k.words;return P[0]==1398893684&&P[1]==1701076831&&(p=u.create(P.slice(2,4)),P.splice(0,4),k.sigBytes-=16),e.create({ciphertext:k,salt:p})}},A=b.SerializableCipher=E.extend({cfg:E.extend({format:d}),encrypt:function(i,p,k,P){P=this.cfg.extend(P);var F=i.createEncryptor(k,P),L=F.finalize(p),M=F.cfg;return e.create({ciphertext:L,key:k,iv:M.iv,algorithm:i,mode:M.mode,padding:M.padding,blockSize:i.blockSize,formatter:P.format})},decrypt:function(i,p,k,P){P=this.cfg.extend(P),p=this._parse(p,P.format);var F=i.createDecryptor(k,P).finalize(p.ciphertext);return F},_parse:function(i,p){return typeof i=="string"?p.parse(i,this):i}}),T=D.kdf={},z=T.OpenSSL={execute:function(i,p,k,P,F){if(P||(P=u.random(64/8)),F)var L=f.create({keySize:p+k,hasher:F}).compute(i,P);else var L=f.create({keySize:p+k}).compute(i,P);var M=u.create(L.words.slice(p),k*4);return L.sigBytes=p*4,e.create({key:L,iv:M,salt:P})}},q=b.PasswordBasedCipher=A.extend({cfg:A.cfg.extend({kdf:z}),encrypt:function(i,p,k,P){P=this.cfg.extend(P);var F=P.kdf.execute(k,i.keySize,i.ivSize,P.salt,P.hasher);P.iv=F.iv;var L=A.encrypt.call(this,i,p,F.key,P);return L.mixIn(F),L},decrypt:function(i,p,k,P){P=this.cfg.extend(P),p=this._parse(p,P.format);var F=P.kdf.execute(k,i.keySize,i.ivSize,p.salt,P.hasher);P.iv=F.iv;var L=A.decrypt.call(this,i,p,F.key,P);return L}})}()})}(Se)),Se.exports}var Xt=ye.exports,mr;function en(){return mr||(mr=1,function(v,B){(function(x,h,D){v.exports=h(re(),Mr(),Wt(),Kr(),Qt())})(Xt,function(x){return function(){var h=x,D=h.lib,b=D.BlockCipher,E=h.algo,u=[],o=[],t=[],m=[],_=[],f=[],n=[],j=[],g=[],y=[];(function(){for(var e=[],c=0;c<256;c++)c<128?e[c]=c<<1:e[c]=c<<1^283;for(var d=0,A=0,c=0;c<256;c++){var T=A^A<<1^A<<2^A<<3^A<<4;T=T>>>8^T&255^99,u[d]=T,o[T]=d;var z=e[d],q=e[z],i=e[q],p=e[T]*257^T*16843008;t[d]=p<<24|p>>>8,m[d]=p<<16|p>>>16,_[d]=p<<8|p>>>24,f[d]=p;var p=i*16843009^q*65537^z*257^d*16843008;n[T]=p<<24|p>>>8,j[T]=p<<16|p>>>16,g[T]=p<<8|p>>>24,y[T]=p,d?(d=z^e[e[e[i^z]]],A^=e[e[A]]):d=A=1}})();var O=[0,1,2,4,8,16,32,64,128,27,54],r=E.AES=b.extend({_doReset:function(){var e;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var c=this._keyPriorReset=this._key,d=c.words,A=c.sigBytes/4,T=this._nRounds=A+6,z=(T+1)*4,q=this._keySchedule=[],i=0;i<z;i++)i<A?q[i]=d[i]:(e=q[i-1],i%A?A>6&&i%A==4&&(e=u[e>>>24]<<24|u[e>>>16&255]<<16|u[e>>>8&255]<<8|u[e&255]):(e=e<<8|e>>>24,e=u[e>>>24]<<24|u[e>>>16&255]<<16|u[e>>>8&255]<<8|u[e&255],e^=O[i/A|0]<<24),q[i]=q[i-A]^e);for(var p=this._invKeySchedule=[],k=0;k<z;k++){var i=z-k;if(k%4)var e=q[i];else var e=q[i-4];k<4||i<=4?p[k]=e:p[k]=n[u[e>>>24]]^j[u[e>>>16&255]]^g[u[e>>>8&255]]^y[u[e&255]]}}},encryptBlock:function(e,c){this._doCryptBlock(e,c,this._keySchedule,t,m,_,f,u)},decryptBlock:function(e,c){var d=e[c+1];e[c+1]=e[c+3],e[c+3]=d,this._doCryptBlock(e,c,this._invKeySchedule,n,j,g,y,o);var d=e[c+1];e[c+1]=e[c+3],e[c+3]=d},_doCryptBlock:function(e,c,d,A,T,z,q,i){for(var p=this._nRounds,k=e[c]^d[0],P=e[c+1]^d[1],F=e[c+2]^d[2],L=e[c+3]^d[3],M=4,$=1;$<p;$++){var C=A[k>>>24]^T[P>>>16&255]^z[F>>>8&255]^q[L&255]^d[M++],N=A[P>>>24]^T[F>>>16&255]^z[L>>>8&255]^q[k&255]^d[M++],R=A[F>>>24]^T[L>>>16&255]^z[k>>>8&255]^q[P&255]^d[M++],l=A[L>>>24]^T[k>>>16&255]^z[P>>>8&255]^q[F&255]^d[M++];k=C,P=N,F=R,L=l}var C=(i[k>>>24]<<24|i[P>>>16&255]<<16|i[F>>>8&255]<<8|i[L&255])^d[M++],N=(i[P>>>24]<<24|i[F>>>16&255]<<16|i[L>>>8&255]<<8|i[k&255])^d[M++],R=(i[F>>>24]<<24|i[L>>>16&255]<<16|i[k>>>8&255]<<8|i[P&255])^d[M++],l=(i[L>>>24]<<24|i[k>>>16&255]<<16|i[P>>>8&255]<<8|i[F&255])^d[M++];e[c]=C,e[c+1]=N,e[c+2]=R,e[c+3]=l},keySize:256/32});h.AES=b._createHelper(r)}(),x.AES})}(ye)),ye.exports}var Pe={exports:{}},rn=Pe.exports,gr;function tn(){return gr||(gr=1,function(v,B){(function(x,h){v.exports=h(re())})(rn,function(x){return x.enc.Latin1})}(Pe)),Pe.exports}var je={exports:{}},nn=je.exports,yr;function sn(){return yr||(yr=1,function(v,B){(function(x,h){v.exports=h(re())})(nn,function(x){return x.enc.Utf8})}(je)),je.exports}var Be={exports:{}},on=Be.exports,xr;function an(){return xr||(xr=1,function(v,B){(function(x,h){v.exports=h(re())})(on,function(x){return function(){var h=x,D=h.lib,b=D.WordArray,E=h.enc;E.Utf16=E.Utf16BE={stringify:function(o){for(var t=o.words,m=o.sigBytes,_=[],f=0;f<m;f+=2){var n=t[f>>>2]>>>16-f%4*8&65535;_.push(String.fromCharCode(n))}return _.join("")},parse:function(o){for(var t=o.length,m=[],_=0;_<t;_++)m[_>>>1]|=o.charCodeAt(_)<<16-_%2*16;return b.create(m,t*2)}},E.Utf16LE={stringify:function(o){for(var t=o.words,m=o.sigBytes,_=[],f=0;f<m;f+=2){var n=u(t[f>>>2]>>>16-f%4*8&65535);_.push(String.fromCharCode(n))}return _.join("")},parse:function(o){for(var t=o.length,m=[],_=0;_<t;_++)m[_>>>1]|=u(o.charCodeAt(_)<<16-_%2*16);return b.create(m,t*2)}};function u(o){return o<<8&4278255360|o>>>8&16711935}}(),x.enc.Utf16})}(Be)),Be.exports}var ke={exports:{}},cn=ke.exports,_r;function ln(){return _r||(_r=1,function(v,B){(function(x,h){v.exports=h(re())})(cn,function(x){return x.enc.Hex})}(ke)),ke.exports}var ie={},wr;function un(){if(wr)return ie;wr=1;var v=ie&&ie.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(ie,"__esModule",{value:!0});const B=v(wt());return ie.default=B.default.create("encrypt","decrypt"),ie}var Cr;function fn(){if(Cr)return X;Cr=1;var v=X&&X.__createBinding||(Object.create?function(n,j,g,y){y===void 0&&(y=g);var O=Object.getOwnPropertyDescriptor(j,g);(!O||("get"in O?!j.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return j[g]}}),Object.defineProperty(n,y,O)}:function(n,j,g,y){y===void 0&&(y=g),n[y]=j[g]}),B=X&&X.__setModuleDefault||(Object.create?function(n,j){Object.defineProperty(n,"default",{enumerable:!0,value:j})}:function(n,j){n.default=j}),x=X&&X.__importStar||function(n){if(n&&n.__esModule)return n;var j={};if(n!=null)for(var g in n)g!=="default"&&Object.prototype.hasOwnProperty.call(n,g)&&v(j,n,g);return B(j,n),j},h=X&&X.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(X,"__esModule",{value:!0}),X.AesCrypter=void 0;const D=x(en()),b=h(tn()),E=h(sn()),u=h(an()),o=h(Mr()),t=h(ln()),m=h(un()),_={latin1:b.default,utf8:E.default,hex:t.default,utf16:u.default,base64:o.default};class f extends m.default{encrypt(j,g){const y=typeof j=="string"?j:JSON.stringify(j);return D.encrypt(y,g).toString()}decrypt(j,g,y="utf8"){return D.decrypt(j,g).toString(_[y])}}return X.AesCrypter=f,X.default=new f,X}const dn=!0,pn=">= 8",vn=">= 0.5 && < 0.9.7",hn=!0,mn=!0,gn=">= 0.5",yn=!0,xn=!0,_n=!0,wn=">= 1 && < 8",Cn="< 8",bn=!0,En=[">= 14.17 && < 15",">= 15.1"],Sn=!0,Pn=">= 0.7.12",jn=!0,Bn="< 6",kn=!0,An=">= 0.11.1",On=">= 0.11.1",Dn=">= 0.11.1",In=">= 0.11.1",Tn=">= 0.11.1",Rn=">= 0.11.1",Fn=!0,zn=">= 8.8",qn=!0,Ln=">= 8",Nn="< 8",Hn=!0,Mn=!0,Kn=!0,Un=!0,Wn=">= 8.5",$n=">= 1",Vn=">= 0.5",Gn=!0,Yn=!0,Zn=!0,Jn=">= 0.11.5 && < 3",Qn=">= 0.9.4",Xn=">= 0.9.4",es=">= 1.4.1",rs=">= 0.9.4",ts=">= 0.9.4",ns=">= 0.9.4",ss=!0,is=!0,os=[">= 0.4 && < 0.7",">= 0.8"],as=!0,cs=">= 0.11.13",ls=">= 0.11.3 && < 10",us=">= 0.11.3",fs=!0,ds=">= 10",ps=!0,vs=!0,hs=!0,ms=">= 1",gs=!0,ys=[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],xs=">= 11.7",_s=">= 0.5",ws={assert:dn,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:pn,"node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:vn,buffer:hn,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:mn,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:gn,"node:cluster":[">= 14.18 && < 15",">= 16"],console:yn,"node:console":[">= 14.18 && < 15",">= 16"],constants:xn,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:_n,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:wn,_debugger:Cn,dgram:bn,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:En,"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:Sn,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:Pn,"node:domain":[">= 14.18 && < 15",">= 16"],events:jn,"node:events":[">= 14.18 && < 15",">= 16"],freelist:Bn,fs:kn,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:An,"node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:On,"node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:Dn,"node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:In,"node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:Tn,"node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:Rn,"node:_http_server":[">= 14.18 && < 15",">= 16"],http:Fn,"node:http":[">= 14.18 && < 15",">= 16"],http2:zn,"node:http2":[">= 14.18 && < 15",">= 16"],https:qn,"node:https":[">= 14.18 && < 15",">= 16"],inspector:Ln,"node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:Nn,module:Hn,"node:module":[">= 14.18 && < 15",">= 16"],net:Mn,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:Kn,"node:os":[">= 14.18 && < 15",">= 16"],path:Un,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:Wn,"node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:$n,"node:process":[">= 14.18 && < 15",">= 16"],punycode:Vn,"node:punycode":[">= 14.18 && < 15",">= 16"],querystring:Gn,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:Yn,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:Zn,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:Jn,_stream_duplex:Qn,"node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:Xn,"node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:es,"node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:rs,"node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:ts,"node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:ns,"node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:ss,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:is,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:os,"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:as,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:cs,"node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:ls,_tls_wrap:us,"node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:fs,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:ds,"node:trace_events":[">= 14.18 && < 15",">= 16"],tty:ps,"node:tty":[">= 14.18 && < 15",">= 16"],url:vs,"node:url":[">= 14.18 && < 15",">= 16"],util:hs,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:ms,"node:v8":[">= 14.18 && < 15",">= 16"],vm:gs,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:ys,"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:xs,"node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:_s,"node:zlib":[">= 14.18 && < 15",">= 16"]};var Re,br;function Cs(){if(br)return Re;br=1;var v=Ct();function B(b,E){for(var u=b.split("."),o=E.split(" "),t=o.length>1?o[0]:"=",m=(o.length>1?o[1]:o[0]).split("."),_=0;_<3;++_){var f=parseInt(u[_]||0,10),n=parseInt(m[_]||0,10);if(f!==n)return t==="<"?f<n:t===">="?f>=n:!1}return t===">="}function x(b,E){var u=E.split(/ ?&& ?/);if(u.length===0)return!1;for(var o=0;o<u.length;++o)if(!B(b,u[o]))return!1;return!0}function h(b,E){if(typeof E=="boolean")return E;var u=typeof b>"u"?Z.versions&&Z.versions.node:b;if(typeof u!="string")throw new TypeError(typeof b>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(E&&typeof E=="object"){for(var o=0;o<E.length;++o)if(x(u,E[o]))return!0;return!1}return x(u,E)}var D=ws;return Re=function(E,u){return v(D,E)&&h(u,D[E])},Re}var Fe,Er;function bs(){if(Er)return Fe;Er=1;var v={},B=Lr();return Fe=B.homedir||function(){var h=v.HOME,D=v.LOGNAME||v.USER||v.LNAME||v.USERNAME;return Z.platform==="win32"?v.USERPROFILE||v.HOMEDRIVE+v.HOMEPATH||h||null:Z.platform==="darwin"?h||(D?"/Users/"+D:null):Z.platform==="linux"?h||(Z.getuid()===0?"/root":D?"/home/"+D:null):h||null},Fe}var ze,Sr;function Es(){return Sr||(Sr=1,ze=function(){var v=Error.prepareStackTrace;Error.prepareStackTrace=function(x,h){return h};var B=new Error().stack;return Error.prepareStackTrace=v,B[2].getFileName()}),ze}var oe={exports:{}},Pr;function Ss(){if(Pr)return oe.exports;Pr=1;var v=Z.platform==="win32",B=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,x={};function h(u){return B.exec(u).slice(1)}x.parse=function(u){if(typeof u!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof u);var o=h(u);if(!o||o.length!==5)throw new TypeError("Invalid path '"+u+"'");return{root:o[1],dir:o[0]===o[1]?o[0]:o[0].slice(0,-1),base:o[2],ext:o[4],name:o[3]}};var D=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,b={};function E(u){return D.exec(u).slice(1)}return b.parse=function(u){if(typeof u!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof u);var o=E(u);if(!o||o.length!==5)throw new TypeError("Invalid path '"+u+"'");return{root:o[1],dir:o[0].slice(0,-1),base:o[2],ext:o[4],name:o[3]}},v?oe.exports=x.parse:oe.exports=b.parse,oe.exports.posix=b.parse,oe.exports.win32=x.parse,oe.exports}var qe,jr;function Ps(){if(jr)return qe;jr=1;var v=De(),B=v.parse||Ss(),x=function(D,b){var E="/";/^([A-Za-z]:)/.test(D)?E="":/^\\\\/.test(D)&&(E="\\\\");for(var u=[D],o=B(D);o.dir!==u[u.length-1];)u.push(o.dir),o=B(o.dir);return u.reduce(function(t,m){return t.concat(b.map(function(_){return v.resolve(E,m,_)}))},[])};return qe=function(D,b,E){var u=b&&b.moduleDirectory?[].concat(b.moduleDirectory):["node_modules"];if(b&&typeof b.paths=="function")return b.paths(E,D,function(){return x(D,u)},b);var o=x(D,u);return b&&b.paths?o.concat(b.paths):o},qe}var Le,Br;function js(){return Br||(Br=1,Le=function(v,B){return B||{}}),Le}var Ne,kr;function Bs(){if(kr)return Ne;kr=1;var v=Cs(),B=Qe,x=De(),h=bs(),D=Es(),b=Ps(),E=js(),u=Z.platform!=="win32"&&B.realpathSync&&typeof B.realpathSync.native=="function"?B.realpathSync.native:B.realpathSync,o=h(),t=function(){return[x.join(o,".node_modules"),x.join(o,".node_libraries")]},m=function(O){try{var r=B.statSync(O,{throwIfNoEntry:!1})}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR"))return!1;throw e}return!!r&&(r.isFile()||r.isFIFO())},_=function(O){try{var r=B.statSync(O,{throwIfNoEntry:!1})}catch(e){if(e&&(e.code==="ENOENT"||e.code==="ENOTDIR"))return!1;throw e}return!!r&&r.isDirectory()},f=function(O){try{return u(O)}catch(r){if(r.code!=="ENOENT")throw r}return O},n=function(O,r,e){return e&&e.preserveSymlinks===!1?O(r):r},j=function(O,r){var e=O(r);try{var c=JSON.parse(e);return c}catch{}},g=function(O,r,e){for(var c=b(r,e,O),d=0;d<c.length;d++)c[d]=x.join(c[d],O);return c};return Ne=function(O,r){if(typeof O!="string")throw new TypeError("Path must be a string.");var e=E(O,r),c=e.isFile||m,d=e.readFileSync||B.readFileSync,A=e.isDirectory||_,T=e.realpathSync||f,z=e.readPackageSync||j;if(e.readFileSync&&e.readPackageSync)throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");var q=e.packageIterator,i=e.extensions||[".js"],p=e.includeCoreModules!==!1,k=e.basedir||x.dirname(D()),P=e.filename||k;e.paths=e.paths||t();var F=n(T,x.resolve(k),e);if(/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(O)){var L=x.resolve(F,O);(O==="."||O===".."||O.slice(-1)==="/")&&(L+="/");var M=N(L)||l(L);if(M)return n(T,M,e)}else{if(p&&v(O))return O;var $=w(O,F);if($)return n(T,$,e)}var C=new Error("Cannot find module '"+O+"' from '"+P+"'");throw C.code="MODULE_NOT_FOUND",C;function N(s){var a=R(x.dirname(s));if(a&&a.dir&&a.pkg&&e.pathFilter){var H=x.relative(a.dir,s),J=e.pathFilter(a.pkg,s,H);J&&(s=x.resolve(a.dir,J))}if(c(s))return s;for(var U=0;U<i.length;U++){var W=s+i[U];if(c(W))return W}}function R(s){if(!(s===""||s==="/")&&!(Z.platform==="win32"&&/^\w:[/\\]*$/.test(s))&&!/[/\\]node_modules[/\\]*$/.test(s)){var a=x.join(n(T,s,e),"package.json");if(!c(a))return R(x.dirname(s));var H=z(d,a);return H&&e.packageFilter&&(H=e.packageFilter(H,s)),{pkg:H,dir:s}}}function l(s){var a=x.join(n(T,s,e),"/package.json");if(c(a)){try{var H=z(d,a)}catch{}if(H&&e.packageFilter&&(H=e.packageFilter(H,s)),H&&H.main){if(typeof H.main!="string"){var J=new TypeError("package “"+H.name+"” `main` must be a string");throw J.code="INVALID_PACKAGE_MAIN",J}(H.main==="."||H.main==="./")&&(H.main="index");try{var U=N(x.resolve(s,H.main));if(U)return U;var W=l(x.resolve(s,H.main));if(W)return W}catch{}}}return N(x.join(s,"/index"))}function w(s,a){for(var H=function(){return g(s,a,e)},J=q?q(s,a,H,e):H(),U=0;U<J.length;U++){var W=J[U];if(A(x.dirname(W))){var ne=N(W);if(ne)return ne;var le=l(W);if(le)return le}}}},Ne}var He,Ar;function ks(){return Ar||(Ar=1,He=Bs()),He}var Me,Or;function As(){if(Or)return Me;Or=1;var v={};Me=D,D.sync=b;var B=Qe;function x(E,u){var o=u.pathExt!==void 0?u.pathExt:v.PATHEXT;if(!o||(o=o.split(";"),o.indexOf("")!==-1))return!0;for(var t=0;t<o.length;t++){var m=o[t].toLowerCase();if(m&&E.substr(-m.length).toLowerCase()===m)return!0}return!1}function h(E,u,o){return!E.isSymbolicLink()&&!E.isFile()?!1:x(u,o)}function D(E,u,o){B.stat(E,function(t,m){o(t,t?!1:h(m,E,u))})}function b(E,u){return h(B.statSync(E),E,u)}return Me}var Ke,Dr;function Os(){if(Dr)return Ke;Dr=1,Ke=B,B.sync=x;var v=Qe;function B(b,E,u){v.stat(b,function(o,t){u(o,o?!1:h(t,E))})}function x(b,E){return h(v.statSync(b),E)}function h(b,E){return b.isFile()&&D(b,E)}function D(b,E){var u=b.mode,o=b.uid,t=b.gid,m=E.uid!==void 0?E.uid:Z.getuid&&Z.getuid(),_=E.gid!==void 0?E.gid:Z.getgid&&Z.getgid(),f=parseInt("100",8),n=parseInt("010",8),j=parseInt("001",8),g=f|n,y=u&j||u&n&&t===_||u&f&&o===m||u&g&&m===0;return y}return Ke}var Ue,Ir;function Ds(){if(Ir)return Ue;Ir=1;var v;Z.platform==="win32"||he.TESTING_WINDOWS?v=As():v=Os(),Ue=B,B.sync=x;function B(h,D,b){if(typeof D=="function"&&(b=D,D={}),!b){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(E,u){B(h,D||{},function(o,t){o?u(o):E(t)})})}v(h,D||{},function(E,u){E&&(E.code==="EACCES"||D&&D.ignoreErrors)&&(E=null,u=!1),b(E,u)})}function x(h,D){try{return v.sync(h,D||{})}catch(b){if(D&&D.ignoreErrors||b.code==="EACCES")return!1;throw b}}return Ue}var We,Tr;function Is(){if(Tr)return We;Tr=1;var v={};const B=Z.platform==="win32"||v.OSTYPE==="cygwin"||v.OSTYPE==="msys",x=De(),h=B?";":":",D=Ds(),b=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),E=(t,m)=>{const _=m.colon||h,f=t.match(/\//)||B&&t.match(/\\/)?[""]:[...B?[Z.cwd()]:[],...(m.path||v.PATH||"").split(_)],n=B?m.pathExt||v.PATHEXT||".EXE;.CMD;.BAT;.COM":"",j=B?n.split(_):[""];return B&&t.indexOf(".")!==-1&&j[0]!==""&&j.unshift(""),{pathEnv:f,pathExt:j,pathExtExe:n}},u=(t,m,_)=>{typeof m=="function"&&(_=m,m={}),m||(m={});const{pathEnv:f,pathExt:n,pathExtExe:j}=E(t,m),g=[],y=r=>new Promise((e,c)=>{if(r===f.length)return m.all&&g.length?e(g):c(b(t));const d=f[r],A=/^".*"$/.test(d)?d.slice(1,-1):d,T=x.join(A,t),z=!A&&/^\.[\\\/]/.test(t)?t.slice(0,2)+T:T;e(O(z,r,0))}),O=(r,e,c)=>new Promise((d,A)=>{if(c===n.length)return d(y(e+1));const T=n[c];D(r+T,{pathExt:j},(z,q)=>{if(!z&&q)if(m.all)g.push(r+T);else return d(r+T);return d(O(r,e,c+1))})});return _?y(0).then(r=>_(null,r),_):y(0)},o=(t,m)=>{m=m||{};const{pathEnv:_,pathExt:f,pathExtExe:n}=E(t,m),j=[];for(let g=0;g<_.length;g++){const y=_[g],O=/^".*"$/.test(y)?y.slice(1,-1):y,r=x.join(O,t),e=!O&&/^\.[\\\/]/.test(t)?t.slice(0,2)+r:r;for(let c=0;c<f.length;c++){const d=e+f[c];try{if(D.sync(d,{pathExt:n}))if(m.all)j.push(d);else return d}catch{}}}if(m.all&&j.length)return j;if(m.nothrow)return null;throw b(t)};return We=u,u.sync=o,We}var $e,Rr;function Ts(){if(Rr)return $e;Rr=1;function v(B){if(!(typeof B>"u"))return JSON.parse(JSON.stringify(B))}return $e=v,$e}var Ve,Fr;function Rs(){if(Fr)return Ve;Fr=1;var v={};const{BLOCKLET_MODES:B}=bt(),x=zr(),h=fn().default,D=Et(),b=Pt,{dirname:E,join:u,sep:o}=De(),t=ks(),{tmpdir:m,homedir:_}=Lr(),f=Is(),{withHttps:n,withHttp:j}=St(),g=Ts(),y=(C,N,R)=>h.encrypt(C,x.pbkdf2Sync(R,N,256,32,"sha512").toString("hex")),O=(C,N,R)=>h.decrypt(C,x.pbkdf2Sync(R,N,256,32,"sha512").toString("hex")),r=(C,N=!0)=>{let R=C;return Array.isArray(R)&&R.every(l=>l.originFileObj&&l.url)&&(R=R.map(l=>l.url),R.length===1&&([R]=R)),N&&R&&typeof R=="object"&&(R=JSON.stringify(R)),R&&typeof R=="string"&&(R=R.replace(/(\r\n|\n|\r)/gm," ")),R},e=C=>C.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,""),c=C=>e(ar.from(C).toString("base64")),d=C=>(C+"===".slice((C.length+3)%4)).replace(/-/g,"+").replace(/_/g,"/"),A=C=>new Uint8Array(ar.from(d(C),"base64")),T="v21.6.0",z=()=>D.gte(Z.version,T),q=()=>{try{return t("@arcblock/pm2",{basedir:__dirname})}catch{return null}};function i(C){try{return f.sync(C)}catch{return null}}const p=(C,N=!0)=>{const R=v.NODE_OPTIONS??"";if(R.includes("--experimental-permission")||R.includes("--allow-fs-read")||R.includes("--allow-fs-write"))throw new Error("process.env.NODE_OPTIONS should not include --experimental-permission or --allow-fs-read or --allow-fs-write");if(!C)throw new Error("blocklet is not defined");const l=[R].filter(U=>!!U&&U!=="undefined");if(!z()||!N)return l.join(" ").trim();const w=q(),s=i("meilisearch"),a="/data/bin/meilisearch",H=i("blocklet"),J=[v.XDG_DATA_HOME?u(v.XDG_DATA_HOME,"pnpm/global/"):"",v.PNPM_HOME?u(v.PNPM_HOME,"global/"):""];return l.push("--experimental-permission",...[C.environmentObj.BLOCKLET_DATA_DIR,C.environmentObj.BLOCKLET_APP_DIR,C.environmentObj.BLOCKLET_LOG_DIR,C.environmentObj.BLOCKLET_CACHE_DIR,C.environmentObj.BLOCKLET_APP_DATA_DIR?u(C.environmentObj.BLOCKLET_APP_DATA_DIR,".projects"):"",m()].filter(Boolean).map(U=>`--allow-fs-write=${u(U,"/*")}`),"--allow-addons","--allow-child-process"),C.mode===B.DEVELOPMENT||C.environmentObj.BLOCKLET_MODE===B.DEVELOPMENT?(l.push("--allow-worker","--allow-fs-read=*"),l.push(`--allow-fs-write=${u(_(),".npm","_logs","/*")}`)):l.push(...[C.environmentObj.BLOCKLET_LOG_DIR,C.environmentObj.BLOCKLET_CACHE_DIR,C.environmentObj.BLOCKLET_APP_DATA_DIR,E(E(C.environmentObj.BLOCKLET_APP_DIR)),w&&E(E(E(E(w)))),H,s,a,E(E(Z.execPath)),Z.cwd(),m(),u(_(),".cursor-server"),...J].filter(Boolean).filter(U=>U!==o).map(U=>`--allow-fs-read=${u(U,"/*")}`)),b(l).join(" ").trim()},k={crossOriginEmbedderPolicy:!1,crossOriginOpenerPolicy:!1,crossOriginResourcePolicy:!1,originAgentCluster:!1,strictTransportSecurity:!0,xContentTypeOptions:!0,xDnsPrefetchControl:!1,xDownloadOptions:!1,xPermittedCrossDomainPolicies:!1,contentSecurityPolicy:!1,referrerPolicy:!1,xFrameOptions:!1,xPoweredBy:!0,xXssProtection:!1};function P(C,N,R){const l=g(C[N]||[]);return l.push(...R),[...new Set(l)]}async function F(C,{node:N,blocklet:R,trustedDomains:l=[]}){if(!C?.contentSecurityPolicy?.directives)return C;const w=g(C);w.contentSecurityPolicy.directives["default-src"]=P(w.contentSecurityPolicy.directives,"default-src",["'self'"]);const s=await N.getNodeInfo({useCache:!0});let a=await N.getBlockletDomainAliases({blocklet:R,nodeInfo:s});return a=(a||[]).map(H=>H.value),w.contentSecurityPolicy.directives["connect-src"]=P(w.contentSecurityPolicy.directives,"connect-src",["'self'",...a.filter(H=>H).map(H=>`http://${H}/.well-known/ping`),"https://api.simplesvg.com","https://api.iconify.design","https://api.unisvg.com"]),w.contentSecurityPolicy.directives["script-src"]=P(w.contentSecurityPolicy.directives,"script-src",["'self'","https://js.stripe.com"]),w.contentSecurityPolicy.directives["frame-src"]=P(w.contentSecurityPolicy.directives,"frame-src",["'self'","https://js.stripe.com"]),w.contentSecurityPolicy.directives["frame-ancestors"]=P(w.contentSecurityPolicy.directives,"frame-ancestors",["'self'",...(R.settings.userSpaceHosts||[]).map(H=>`https://${H}`),...l.filter(Boolean).map(H=>`http://${H}`)]),w}async function L(C,{node:N,blocklet:R}){const l=g(C);if(l?.origin?.smart){const w=[];w.push(...l.origin?.value||[]);const s=await N.getNodeInfo({useCache:!0});let a=await N.getBlockletDomainAliases({blocklet:R,nodeInfo:s});a=(a||[]).map(W=>W.value),w.push(...a.map(W=>n(W)),...a.map(W=>j(W)));const J=((R.settings.federated||{})?.sites||[]).filter(W=>W?.isMaster!==!1||W.status==="approved"),U=[];for(const W of J)U.push(new URL(W.appUrl).hostname),U.push(...W.aliasDomain||[]);w.push(...U.map(W=>n(W)),...U.map(W=>j(W))),l.origin.value=[...new Set(w)]}return l}function M(C){const N=g(C);for(const R of Object.keys(N))N[R]=N[R]?.value??N[R];return N}function $(C){const N=g(C);for(const R of Object.keys(N))N[R]=N[R]?.override??!1;return N}return Ve={encrypt:y,decrypt:O,formatEnv:r,encodeEncryptionKey:c,decodeEncryptionKey:A,canUseFileSystemIsolateApi:z,getSecurityNodeOptions:p,patchResponseHeader:F,patchCors:L,cleanConfigOverride:M,keepConfigOverride:$,DEFAULT_HELMET_CONFIG:k,SAFE_NODE_VERSION:T},Ve}var Ur=Rs();const Ge=(v,B)=>v&&Ur.encrypt(v,B||Nr.AIGNE_CONFIG_ENCRYPT_SALT,""),Ye=(v,B)=>v&&Ur.decrypt(v,B||Nr.AIGNE_CONFIG_ENCRYPT_SALT,""),de=v=>v==="aigneHub",Ae=v=>v==="bedrock",Fs=v=>{const B=["provider","model"];if(Ft(v))return[...B,"key"];const{provider:x}=v;let h=B;return de(x)?h=[...B,"key","url"]:Ae(x)?h=[...B,"accessKeyId","secretAccessKey"]:h=[...B,"key"],h.filter(D=>!v[D])},zs=v=>[{provider:"aigneHub",name:"AIGNE Hub",baseURL:"https://hub.aigne.io",logo:v?.imgPrefix?zt(v.imgPrefix,"/aigne-hub.jpg"):"/aigne-hub.jpg",documentation:"https://hub.aigne.io/docs",models:[]}];function ce({desc:v,docLink:B=null,provider:x="",orientation:h="vertical"}){const{t:D}=V.useContext(qr);return S.jsxs(Je,{variant:"body2",sx:{lineHeight:1.6,color:"text.secondary",fontSize:12,...h==="vertical"&&{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},title:v,children:[v,B&&S.jsx(me,{title:S.jsxs(S.Fragment,{children:[D("setting.aigne.desc.docLink"),B&&S.jsxs(S.Fragment,{children:[":"," ",S.jsx(yt,{href:B,target:"_blank",rel:"noopener noreferrer",sx:{ml:.5},children:x||"documentation"})]})]}),arrow:!0,children:S.jsx(gt,{fontSize:"small",sx:{ml:.25,fontSize:14,cursor:"pointer",verticalAlign:"middle"}})})]})}const Ze={provider:"",model:"",url:"",key:"",accessKeyId:"",testConnection:""};ce.propTypes={desc:G.string.isRequired,docLink:G.string,provider:G.string,orientation:G.oneOf(["vertical","horizontal"])};function Wr({orientation:v="vertical",hideDivider:B=!1,source:x="dashboard",forceValidate:h=!1},D){const[b,E]=V.useState(!1),[u,o]=V.useState(!1),[t,m]=V.useState(!1),[_,f]=V.useState(!1),{t:n}=V.useContext(qr),j=jt(),{api:g}=j,{did:y,blocklet:O,actions:r}=Bt(),[e,c]=V.useState(!1),d=ir({...Ze}),A=ir({loading:!1,success:!1}),{confirmApi:T,confirmHolder:z}=kt(),q=zs(j),i=Tt({messageType:"connect-aigne-message",onOpen:()=>E(!0),onClose:()=>E(!1)}),p=V.useMemo(()=>b||u||t||A.loading,[b,u,t,A.loading]),k=se(I=>q.find(K=>K.provider===I)),P=se(I=>k(I)?.models||[]),F=se(I=>{if(I)return I;const K=q[0]?.provider;return P(K)[0]?.name||"auto"}),L=se(()=>{Object.keys(Ze).forEach(I=>{d[I]=Ze[I]})}),M=pe(()=>{const{aigne:I={}}=O?.settings||{};return I},[O]),$=pe(()=>{const I={...M},K=I?.provider||q[0]?.provider,Y=k(K),ee=de(K),tr=Ae(K);return{...I,url:I?.url||ee&&Y?.baseURL||"",provider:K,model:F(I?.model),key:Ye(I?.key,y),accessKeyId:tr?Ye(I?.accessKeyId,y):I?.accessKeyId,secretAccessKey:tr?Ye(I?.secretAccessKey,y):I?.secretAccessKey}},[O,k,F]),[C,N]=V.useState($);V.useEffect(()=>{N($)},[$]);const R=V.useMemo(()=>C?.url&&C?.key&&C?.provider==="aigneHub",[C]),l=pe(()=>k(C.provider)?.name||C.provider,[C,k]),w=V.useMemo(()=>Fs(C),[C]),s=pe(()=>k(C.provider)?.documentation||"",[C,k]),a=async()=>{try{E(!0);const I=new Set(["running","error"]),K=O.children.filter(Y=>I.has(Y.status)).map(Y=>Y.meta.did);await g.restartBlocklet({input:{did:y,componentDids:K}}),r.refreshBlocklet()}catch(I){console.error("error",I),te.error(fe(I))}finally{E(!1)}},H=(I=!0)=>{if(x!=="setup")return new Promise(K=>{T.open({title:n("setting.aigne.restart.title"),content:I?n("setting.aigne.restart.connectedContent",{provider:l}):n("setting.aigne.restart.notConnectedContent",{provider:l}),confirmButtonText:n("setting.aigne.restart.confirm"),cancelButtonText:n("setting.aigne.restart.cancel"),onConfirm(Y){Y(),a(),K(!0)},onCancel(){K(!1)}})})},J=se(()=>new Promise(I=>{T.open({title:n("setting.aigne.revokeUrlAuthTitle",{url:n("setting.aigne.baseUrl",{provider:l})}),content:n("setting.aigne.revokeUrlAuth",{url:n("setting.aigne.baseUrl",{provider:l})}),confirmButtonText:n("common.confirm"),cancelButtonText:n("common.cancel"),onConfirm(K){K(),I(!0)},onCancel(){I(!1)}})})),U=async(I,K)=>{const Y={};if(N({...C,[I]:K}),I==="provider"){const ee=P(K);ee.length>0&&(Y.model=ee[0].name),Y.key=""}return R&&I==="url"&&K!==C.url&&(await J()?(Y.key="",Y.validationResult=""):Y.url=C.url),setTimeout(()=>{N({...C,[I]:K,...Y})},100),c(!0),!0},W=V.useMemo(()=>C.provider,[C.provider]),ne=se(I=>xt(I)?"":n("setting.aigne.invalidUrl",{provider:l})),le=(I=[])=>{const K=w.filter(ee=>!I.includes(ee));if(K.length)return K.forEach(ee=>{d[ee]="required"}),!K.includes("url")&&de(C.provider)&&(d.url=ne(C.url)),!1;const Y=de(C.provider)&&ne(C.url);return Y?(d.url=Y,!1):!0},$r=async()=>{try{m(!0),await g.disconnectToAigne({input:{did:y,url:C.url,key:C.key}}),c(!1),te.success(n("setting.aigne.disconnectSuccess")),setTimeout(()=>{H(!1)},300)}catch(I){console.error("disconnect error:",I),te.error(fe(I)||n("setting.aigne.disconnectFailed"))}finally{m(!1)}},Vr=()=>{T.open({title:n("setting.aigne.disconnect"),content:n("setting.aigne.disconnectConfirm"),confirmButtonText:n("setting.aigne.disconnect"),cancelButtonText:n("common.cancel"),onConfirm(I){I(),$r()}})},Xe=async()=>{if(!le())return;L();const I={...C,key:Ge(C.key,y)};Ae(I.provider)?(I.key="",C.accessKeyId&&(I.accessKeyId=Ge(C.accessKeyId,y)),C.secretAccessKey&&(I.secretAccessKey=Ge(C.secretAccessKey,y))):(I.accessKeyId="",I.secretAccessKey="");const K=await g.updateBlockletSettings({input:{did:y,aigne:I}});return r.refreshBlocklet(),K},Gr=async()=>{try{if(!e&&!h)return;E(!0);const I=await Xe();return I?(c(!1),te.success(n("userCenter.saveSuccess")),I):void 0}catch(I){throw console.error("error",I),te.error(fe(I)||n("setting.aigne.failed")),I}finally{E(!1)}},er=async(I=!1)=>{d.testConnection="";try{if(A.loading=!0,!I&&(await Xe())?.code!=="ok")return;await g.verifyAigneConnection({input:{did:y}}),te.success(n("setting.aigne.testSuccess",{provider:l})),A.success=!0}catch(K){throw console.error("error",K),d.testConnection=K.message,te.error(n("setting.aigne.testFailed")),K}finally{A.loading=!1,r.refreshBlocklet()}},Yr=async()=>{try{await Rt(g,{did:y,refresh:r.refreshBlocklet,t:n,providerName:l,values:{...M}}),H(!0),setTimeout(()=>{er(!0)},1e3)}catch(I){console.error("error",I),te.error(fe(I))}finally{c(!1)}},rr=()=>{le(["key"])&&(L(),i(async(I,K)=>{try{o(!0);const Y=await g.connectToAigne({input:{did:y,baseUrl:C.url||new URL(window.location.origin).origin,provider:C.provider,model:C.model}});if(!Y?.url){te.error("failed to connect to endpoint");return}K(Y.url),await Yr(),o(!1)}catch(Y){const ee=fe(Y);te.error(ee),o(!1)}}))};V.useImperativeHandle(D,()=>({onSubmit:Gr})),P(W);const Zr=W==="aigneHub",Jr=()=>{f(!_)},Qr=I=>{I.preventDefault()},Xr=V.useMemo(()=>d.url==="required"?n("common.requiredErrorText",{name:n("setting.aigne.baseUrl",{provider:l})}):d.url?d.url:d.key==="required"?n("setting.aigne.apiKeyNotAuthorized",{provider:l}):"",[d.url,d.key,n,l]);return S.jsxs(qs,{source:x,children:[S.jsxs(ct,{elevation:0,sx:{px:3,pt:3,pb:1.5,borderRadius:2,border:"1px solid",borderColor:"divider"},children:[S.jsx(Q,{sx:{mb:3},children:S.jsx(Je,{variant:"body2",color:"text.primary",sx:{lineHeight:1.6,"& a":{color:"primary.main"}},dangerouslySetInnerHTML:{__html:n("setting.aigne.configDesc",{url:"https://store.blocklet.dev/blocklets/z8ia3xzq2tMq8CRHfaXj1BTYJyYnEcHbqP8cJ"})}})}),S.jsxs(Q,{sx:{display:"flex",flexDirection:"column",gap:2},children:[S.jsxs(Ie,{container:!0,className:"config-container",spacing:2,sx:{width:"100%"},children:[S.jsx(Ie,{size:{xs:12,md:4},sx:{display:"none"},children:S.jsx(ue,{orientation:v,title:n("setting.aigne.modelAdapter"),required:!0,desc:S.jsx(ce,{desc:n("setting.aigne.desc.modelAdapter")}),children:S.jsx(Hr,{disabled:p,options:q,config:{multiple:!1,labelField:"name",valueField:"provider"},initialValue:C.provider,directEditing:!0,searchable:!1,helperText:d.provider==="required"?n("common.requiredErrorText",{name:n("setting.aigne.modelAdapter")}):d.provider,onChange:I=>U("provider",I)})})}),S.jsx(Ie,{size:12,children:S.jsx(ue,{orientation:v,title:n("setting.aigne.baseUrl",{provider:l}),required:de(C.provider),desc:S.jsx(ce,{desc:n("setting.aigne.desc.baseUrl",{example:"https://hub.aigne.io"})}),children:S.jsx(ve,{disabled:p,initialValue:C.url||"",directEditing:!0,onSubmit:I=>{U("url",I)},autoFocus:!1,errorTips:Xr,InputProps:R?{endAdornment:S.jsx(sr,{position:"end",children:A.loading||u?S.jsx(ae,{size:16}):S.jsxs(S.Fragment,{children:[C.validationResult==="success"?S.jsx(me,{title:n("setting.aigne.testSuccess",{provider:l}),children:S.jsx(lt,{sx:{fontSize:16,color:"success.main",cursor:"pointer"}})}):null,C.validationResult&&C.validationResult!=="success"?S.jsx(me,{title:C.validationResult,children:S.jsx(ut,{sx:{fontSize:16,color:"error.main",cursor:"pointer"}})}):null,C.validationResult?null:S.jsx(Oe,{"aria-label":"test connection",onClick:er,edge:"end",children:A.loading?S.jsx(ae,{size:16}):S.jsx(me,{title:n("setting.aigne.testConnection",{provider:l}),children:S.jsx(or,{style:{fontSize:16},icon:"tabler:location-check"})})})]})})}:{}})})}),null,Zr?null:S.jsx(S.Fragment,{children:Ae(C.provider)?S.jsxs(S.Fragment,{children:[S.jsx(ue,{orientation:v,title:"Access Key ID",required:!0,desc:S.jsx(ce,{desc:n("setting.aigne.desc.accessKeyId"),docLink:s,provider:l}),children:S.jsx(ve,{disabled:p,initialValue:C.accessKeyId||"",type:_?"text":"password",onChange:I=>U("accessKeyId",I),directEditing:!0,autoFocus:!1})}),!B&&S.jsx(Q,{className:"config-form",component:ft,sx:{my:3}}),S.jsx(ue,{orientation:v,title:"Secret Access Key",required:!0,desc:S.jsx(ce,{desc:n("setting.aigne.desc.secretAccessKey"),docLink:s,provider:l}),children:S.jsx(ve,{disabled:p,initialValue:C.secretAccessKey||"",type:_?"text":"password",onChange:I=>U("secretAccessKey",I),directEditing:!0,autoFocus:!1})})]}):S.jsx(ue,{orientation:v,title:"API Key",required:!0,desc:S.jsx(ce,{desc:n("setting.aigne.desc.key",{provider:l}),docLink:s,provider:l}),children:S.jsx(ve,{disabled:p,initialValue:C.key||"",type:_?"text":"password",onChange:I=>U("key",I),directEditing:!0,autoFocus:!1,InputProps:{endAdornment:S.jsx(sr,{position:"end",children:S.jsx(Oe,{"aria-label":"toggle password visibility",onClick:Jr,onMouseDown:Qr,edge:"end",children:_?S.jsx(pt,{}):S.jsx(dt,{})})})}})})})]}),S.jsx(Q,{className:"button-group",sx:{display:"flex",flexDirection:"row",gap:1,justifyContent:"flex-end"},children:R?S.jsxs(S.Fragment,{children:[S.jsx(Te,{variant:"outlined",color:"error",startIcon:t||u?S.jsx(ae,{size:16,sx:{mr:1}}):S.jsx(vt,{}),onClick:Vr,disabled:p,children:S.jsx("span",{style:{lineHeight:1},children:n("setting.aigne.disconnect")})}),S.jsx(Te,{variant:"outlined",color:"default",startIcon:t||u?S.jsx(ae,{size:16,sx:{mr:1}}):S.jsx(or,{style:{fontSize:16},icon:"tabler:switch-horizontal"}),onClick:rr,disabled:p,children:S.jsx("span",{style:{lineHeight:1},children:n("setting.aigne.switchUser")})})]}):S.jsx(Te,{variant:"contained",onClick:rr,startIcon:u?S.jsx(ae,{size:16,sx:{mr:1}}):S.jsx(ht,{}),disabled:p||!C.url,sx:{flexShrink:0},children:n("setting.aigne.authorizeAigneHub",{name:"AIGNE Hub"})})})]}),x!=="setup"&&S.jsxs(Je,{sx:{fontSize:12,color:"text.secondary",mt:3,fontStyle:"italic"},children:["* ",n("setting.aigne.description",{name:At.getDisplayName(O,!0)})]})]}),z]})}Wr.propTypes={orientation:G.oneOf(["vertical","horizontal"]),hideDivider:G.bool,source:G.oneOf(["dashboard","setup"]),forceValidate:G.bool};const qs=mt.div`
|
|
12
|
-
max-width: 920px;
|
|
13
|
-
.section-title {
|
|
14
|
-
line-height: 1.2 !important;
|
|
15
|
-
font-weight: ${({source:v})=>v==="setup"?"400":"500"};
|
|
16
|
-
color: ${({theme:v,source:B})=>B==="setup"?v.palette.text.secondary:v.palette.text.primary};
|
|
17
|
-
font-size: ${({source:v})=>v==="setup"?"14px":"16px"};
|
|
18
|
-
}
|
|
19
|
-
.section-left {
|
|
20
|
-
width: 100%;
|
|
21
|
-
}
|
|
22
|
-
.form-item {
|
|
23
|
-
margin-bottom: 0 !important;
|
|
24
|
-
margin-top: 0 !important;
|
|
25
|
-
}
|
|
26
|
-
`,oi=V.forwardRef(Wr);export{oi as default};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-EgLjQcxJ.js","assets/vendor-mui-core-CcrDM-5l.js","assets/vendor-react-Dvs43sk9.js","assets/useLocalStorage-Dgwq5dGM.js","assets/vendor-ux-CUBj5GXM.js","assets/vendor-utils-BOkrEpKO.js","assets/vendor-hooks-DTeIFVkk.js","assets/lottie-web-4koyQiv_.js","assets/vendor-ux-DYcPPYq2.css","assets/index-FrAYP-A_.js","assets/vendor-arcblock-BnbwP1kf.js","assets/index-DrVXX4fX.css","assets/bundle-avatar-JsO8Rdzw.js","assets/log-1sZ_L4eJ.css","assets/index-BdKTdgAu.js","assets/index-Bg6_NsC_.js","assets/user-sessions-D9ZCFiu3.js","assets/index-Bga8wqEa.js","assets/did-address-DrmEnz9K.js","assets/team-CD3vKVPJ.js","assets/session-Ci_4G0CP.js","assets/isURL-BKM8U6hZ.js","assets/permission-w0BesrB_.js","assets/click-to-copy-C43vd7DG.js","assets/index-DHLC0F8S.js","assets/arrow-down.svg-CW9W9wI1.js","assets/vendor-mui-x-BVRWKjdg.js","assets/AdapterDayjs-BEkLDdDJ.js","assets/index-DBs9Ljax.js","assets/useAsync-DgPr_To1.js","assets/useAsync-BdgUavMa.js","assets/index-DEDOywis.js","assets/confirm-CXK9v894.js","assets/index-MJKS-RJU.js","assets/util-CJadXi8V.js","assets/base32-B9yl211y.js","assets/sdk-DAF46Tln.js","assets/actions-DvIZNF27.js","assets/shorten-label-C8Cay9FW.js","assets/get-safe-url-oiWXWYvc.js","assets/dot-BaR-8Dj-.js","assets/useSetState-DFuQZPPV.js","assets/index-CoPcipTj.js","assets/over-due-invoice-payment-Ba3rEZjM.js","assets/use-mobile-BC9t6zmM.js","assets/index-BkSX50ri.js","assets/use-mobile-B9FM-UBY.js","assets/index.esm-JPZAjt0x.js","assets/table-tips-3_n5uR-X.js","assets/index-NhYP56dI.js","assets/empty-spinner-D6ajz4La.js","assets/list-header-X0CL-_hO.js","assets/question-mark-circle.svg-B4stD6SS.js","assets/engine-Ch-5kOUZ.js","assets/api-Rnh95Dt4.js","assets/react-beautiful-dnd.esm-CdYP6hjZ.js","assets/raf-schd.esm-CHNehTG3.js","assets/use-promise-window-open-ecxT8x1I.js","assets/wait-connect-Cht9WKDH.js","assets/item-DMRC_0Pl.js","assets/delete-confirm-CpZStjie.js","assets/index-CkuzlAat.js","assets/index-BFAR00t8.js","assets/index-gnjjKJuC.css","assets/index-DoJKIwOt.js","assets/overview-CS6bfsq0.js","assets/keyboard-arrow-down-rounded-8U0_i9QO.js","assets/index-BojVbZw0.js","assets/status-BeqBWyAi.js","assets/omit-8QDODHip.js","assets/spaces-C1LV9UvU.js","assets/domains-BsCL1ViY.js","assets/domain-action-card-2vqk_Ni_.js","assets/util-Bgqx2flh.js","assets/index-D9r0lvN6.js","assets/passport-item-BniPqqnO.js","assets/index-D8gGAVdB.js","assets/Google-kE2qbn1K.js","assets/cloneDeep-DwV-xVQF.js","assets/edit.svg-DycWG9v3.js","assets/lock.svg-COUP8tyO.js","assets/appearance-ChoNlV7r.js","assets/audit-logs-DjxskWcd.js","assets/index-cdAwhti6.js","assets/section-DLNNkzJC.js","assets/required-qTx6pgJa.js","assets/collapse-B0wJmKRl.js","assets/list-X2F1RKzQ.js","assets/server-logo-notext.svg-CKQB0tIp.js","assets/traffic-h7MLT42d.js","assets/iframe-Ci5Ay1y2.js","assets/index-CiFQnBvO.js","assets/base-chart-Dhrxq8mT.js","assets/index-DLDRrQJH.js","assets/config-navigation-D8OXRCt9.js","assets/index-BPy8_fa2.js","assets/createClass-BuE_i6UP.js","assets/simple-select-DCCkM3zE.js","assets/index-PcQgNtUn.js","assets/index-CZiEDWpM.js","assets/index-IMquU8ZG.js","assets/index-DRYJ0xIl.js","assets/connect-to-BpYFEl7i.js","assets/config-space-ODrN5Rt0.js","assets/switch-control-Cd3JbWWV.js","assets/index-B8KTykXs.js","assets/index-Cq-4YOTs.js","assets/security-DLgKehuW.js","assets/config-BICnV2kA.js","assets/branding-Da8E_HdC.js","assets/sanitize-BSjwjSMl.js","assets/form-text-input-x3g3qd72.js","assets/form-wrapper-DimyA4Kf.js","assets/logo-uploader-DgSolZrp.js","assets/advanced-C40fcsMj.js","assets/runtime-CYnDo-HU.js","assets/index-DAg_a68C.js","assets/list-DgH58u4D.js","assets/index-CE07Exux.js","assets/config-Dh0hZZiY.js","assets/empty-DhZfJeme.js","assets/observability-DVi-zwiF.js","assets/playground-CveQRqPB.js","assets/component-CYmSwtxC.js","assets/add-component-core-ofLBd0tu.js","assets/launch-result-message-C7170Bvt.js","assets/page-header-1pVKKoSa.js","assets/index-Bz6T9WJi.js","assets/content-layout--aahhgT-.js","assets/search-4YYphs0l.js","assets/add-component-core-G0iZE90Q.css","assets/index-CwdidKu0.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{b as Yt,n as pt,H as $,T as B,ar as en,as as mo,M as tn,a0 as ho,I as go,E as xo,h as bo,G as yo,_}from"./vendor-ux-CUBj5GXM.js";import{j as a,W as S,aZ as vo,cM as So,cQ as wo,ca as jo,cR as Co,cS as Eo,cO as ko,cT as Io,cU as _o,cV as Do,I as mt,aQ as To,aR as Lo,aX as ht,a3 as Ao,M as Po,aO as Ro,a6 as H,aP as Mo,bg as Oo,at as Oe,T as se,bp as No,b6 as Et,bq as kt,ak as I,D as Ne,J as ue,ah as Ue,ao as Uo,cW as $o,aj as Bo,cX as nn,cY as on,cZ as rn,a$ as Ee,am as De,c_ as It,U as G,aN as sn,bZ as Fo,c$ as zo,d0 as Vo,Q as Ho,d1 as qo}from"./vendor-mui-core-CcrDM-5l.js";import{r as x,L as an,i as cn,g as Wo,k as Ko,j as Go}from"./vendor-react-Dvs43sk9.js";import{U as $e,f as M,R as He,a9 as qe,c as P,T as _t,bc as Qo,af as Zo,a1 as Xo,v as Jo,bd as Yo,be as ln,ad as Y,bf as un,aK as er,bg as tr,Q as nr,a_ as or,a$ as rr,bh as sr,b0 as ir,bi as ar,bj as cr,a8 as lr,bk as We,bl as ur,bm as dr,aZ as fr,m as de,$ as pr,k as mr,a3 as hr,a as gr,n as Dt,bn as Tt,i as xr,l as br,r as yr,p as oe,o as vr,q as Sr,P as wr,E as jr,H as Cr,ap as Er,at as kr,bo as Ir,aq as _r,d as Lt,t as Dr}from"./index-FrAYP-A_.js";import{a5 as Tr,C as ee,J as Lr}from"./vendor-utils-BOkrEpKO.js";import{o as Te}from"./vendor-arcblock-BnbwP1kf.js";import{u as At}from"./useLocalStorage-Dgwq5dGM.js";import{f as gt}from"./index-DBs9Ljax.js";import{C as Pt}from"./confirm-CXK9v894.js";import{g as Rt}from"./get-safe-url-oiWXWYvc.js";import{u as dn}from"./session-Ci_4G0CP.js";import{a as Le,l as Ar}from"./vendor-hooks-DTeIFVkk.js";import{k as Pr,c as Rr,M as Mr,b as Or,T as Nr,N as Ur}from"./team-CD3vKVPJ.js";import{u as fn,D as $r}from"./dot-BaR-8Dj-.js";import{u as pn}from"./useSetState-DFuQZPPV.js";import{u as Br,d as Fr}from"./index-CoPcipTj.js";import{O as zr}from"./over-due-invoice-payment-Ba3rEZjM.js";import{u as Vr}from"./use-mobile-BC9t6zmM.js";const mn=x.createContext({});function hn({children:e,type:t="blocklets"}){const[n,o]=x.useState([]),r=x.useRef([]),s=l=>{if(!r.current.includes(l)){const u=[...r.current,l];o(u),r.current=u}},i=l=>{if(r.current.includes(l)){const u=r.current.filter(d=>d!==l);o(u),r.current=u}},c=l=>{const u=n.filter(p=>l.find(f=>f===p));Tr(u,n).forEach(p=>i(p))};return a.jsx(mn.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:s,removeDeletingDid:i,matchDeletingDid:c},children:e})}hn.propTypes={type:S.string,children:S.node.isRequired};function qa(){return x.useContext(mn)}const Hr=e=>x.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},x.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})),J={Start:vo,Stop:So,Restart:wo,Reload:Do,Remove:jo,Config:_o,Log:Io,Group:ko,Cancel:Co,Dashboard:Hr,Overview:Eo},qr=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),o=new URLSearchParams(n.searchParams),r=new URL(ee(n.origin,t));return r.search=o.toString(),r.toString()},Wr="internal",Kr="external";function gn({blocklet:e,onStart:t,onComplete:n,variant:o="menu",hasPermission:r=!1,getComponentUrl:s=null,useBlockletUrlEvaluation:i=()=>({loading:!1,recommendedUrl:window?.location?.href}),...c}){const l=$e(),[u,d]=x.useState(null),[p,f]=x.useState(null),[v,g]=x.useState(!1),[h,C]=x.useState(null),{t:m}=x.useContext(Yt),[j]=At("skip-blocklet-setup",!1),{loading:w,recommendedUrl:k}=i(e),[E]=At("blocklet-type-filter",Wr),y=M.isInProgress(e.status),[L,F]=x.useState(!1);x.useEffect(()=>{if(!e?.controller)return;F(e?.controller?.status?.value===He.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{try{const D=await l.api.getLauncherSession({input:{launcherSessionId:e?.controller?.launcherSessionId,launcherUrl:e?.controller?.launcherUrl}});if(D?.error){console.error("get launcher session failed",D.error);return}F([P.LAUNCH_SESSION_STATUS.overdue,P.LAUNCH_SESSION_STATUS.canceled,P.LAUNCH_SESSION_STATUS.terminated].includes(D?.launcherSession?.status))}catch(D){console.error("call getLauncherSession error",D)}})()},[]);const{inService:z}=l,R=(b,D,W=!1)=>async()=>{const K=async ye=>{t({action:b,blocklet:e}),g(!0),f(b);let ve=!1;try{if(b==="remove")await D(ye);else if(b==="start"){if(!M.hasRunnableComponent(e)){$.error(m("blocklet.noComponent"));return}if(!z&&!j&&!e.settings?.initialized&&e.mode!==He.BLOCKLET_MODES.DEVELOPMENT){if(!k||!_t(k)){$.error(m("blocklet.gotoVisitError"));return}const O=Qo(l.info),Ct=new URL(k);Ct.searchParams.set("serverUrl",O),window.open(Rt(Ct.href,{allowDomains:null})),n({action:b,blocklet:e});return}const U=e.children.filter(O=>!M.isInProgress(O.status)&&O.status!=="running").map(O=>O.meta.did),X={did:e.meta.did,componentDids:U};await D({input:X})}else if(["stop","restart","reload"].includes(b)){const U=e.children.filter(O=>O.status==="running").map(O=>O.meta.did),X={did:e.meta.did,componentDids:U};await D({input:X})}else{const U={did:e.meta.did};await D({input:U})}b==="remove"?ve=!0:await Zo(1e3),b==="reload"&&$.success(m("blocklet.reloadSuccess")),C(null),n({action:b,blocklet:e})}catch(U){const X=`Blocklet ${b} failed: ${gt(U)}`;throw n({action:b,blocklet:e,error:new Error(X)}),new Error(X)}finally{ve||g(!1)}},xe=()=>{g(!1),C(null)},be=M.getDisplayName(e,!0),fo=e.mode===He.BLOCKLET_MODES.DEVELOPMENT?{description:()=>a.jsx(se,{component:"div",children:a.jsx(se,{gutterBottom:!0,children:m("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(ye,ve)=>a.jsxs(se,{component:"div",children:[a.jsx(se,{gutterBottom:!0,children:m("blocklet.action.removeApplicationDescription")}),a.jsxs(No,{name:"removeType",value:ye.removeType,onChange:U=>ve({...ye,removeType:U.target.value}),children:[a.jsx(Et,{value:"backup",control:a.jsx(kt,{}),label:m("blocklet.action.removeApplicationAfterBackup")}),a.jsx(Et,{value:"complete",control:a.jsx(kt,{}),label:m("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},po={stop:{title:`${m("common.stop")} ${be}`,description:m("blocklet.action.stopDescription"),confirm:m("blocklet.action.confirmStop"),cancel:m("common.cancel"),onConfirm:K,onCancel:xe},restart:{title:`${m("common.restart")} ${be}`,description:m("blocklet.action.restartDescription"),confirm:m("blocklet.action.confirmRestart"),cancel:m("common.cancel"),onConfirm:K,onCancel:xe},remove:{title:`${m("common.remove")} ${be}`,confirm:m("blocklet.action.confirmRemove"),cancel:m("common.cancel"),onConfirm:K,onCancel:xe,...fo},cancelDownload:{title:`${m("common.cancel")}`,description:m("blocklet.action.cancelDownloadDescription",{name:be}),confirm:m("common.confirm"),cancel:m("common.cancel"),onConfirm:K,onCancel:xe}};W?C(po[b]):await K()},ro=!!u,so=b=>{try{b.stopPropagation(),b.preventDefault()}catch{}d(b.currentTarget)},io=b=>{try{b.stopPropagation(),b.preventDefault()}catch{}d(null)},jt=async(b,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof b.handler=="function")try{g(!0),f(b.action),await b.handler()}catch(W){console.error(`Blocklet ${b.name} failed: `,W)}finally{g(!1),d(null)}else d(null)},ao=!z&&M.isDeletableBlocklet(e)?{action:"remove",icon:J.Remove,name:m("common.remove"),handler:R("remove",async({removeType:b})=>{b==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:y}:null,co={action:"remove",icon:({sx:b,...D})=>a.jsx(J.Cancel,{sx:{...b,paddingRight:"2px",zoom:.95},...D}),name:m("common.cancel"),handler:R("cancelDownload",l.api.cancelDownloadBlocklet,!0)},lo=M.getAppMissingConfigs(e),uo=()=>{const b=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=s?.({mountPoint:b,blocklet:e});if(!D||!_t(D)){$.error(m("blocklet.gotoVisitError"));return}const W=e?.site?.domainAliases;window.open(Rt(qr(D,`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`),{allowDomains:W?.map(K=>K.value)}))};let ge=[{action:"start",icon:J.Start,inExternal:!0,name:m("common.start"),handler:R("start",l.api.startBlocklet),disabled:L||e.children.every(b=>b.status==="running")||qe(e.status)||w||y},{action:"stop",icon:J.Stop,inExternal:!0,name:m("common.stop"),handler:R("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:J.Restart,name:m("common.restart"),handler:R("restart",l.api.restartBlocklet,!0),disabled:L||e.status!=="running"},qe(e.status)?co:ao,{separator:!0},z?null:{action:"dashboard",icon:({style:b,...D})=>a.jsx(J.Dashboard,{...D,style:{...b,width:"26px",height:"26px",paddingRight:"3px"}}),name:m("sidebar.dashboard"),handler:uo}].filter(Boolean);return E===Kr&&(ge=ge.filter(b=>b.inExternal)),o==="menu"?a.jsxs(Mt,{"data-cy":"blocklet-actions",children:[a.jsx(mt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:so,size:"small",disabled:!r||!qe(e.status)&&v,children:a.jsx(To,{})}),a.jsxs(Lo,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:ro,onClose:io,PaperProps:{},children:[lo.length>0&&a.jsxs(ht,{style:{maxWidth:"400px"},severity:"error",children:[m("blocklet.config.missingRequired"),a.jsx("br",{}),a.jsx(an,{to:`/blocklets/${e.meta.did}/components`,children:m("blocklet.config.gotoFix")})]}),ge.map((b,D)=>b.separator?a.jsx(Ao,{},`separator-${D}`):a.jsxs(Po,{dense:!0,onClick:W=>jt(b,W),disabled:v||b.disabled,"data-cy":`${b.action}-blocklet`,children:[a.jsx(Ro,{style:{minWidth:24},children:p===b.action&&v?a.jsx(H,{size:16,sx:{marginRight:1}}):a.jsx(b.icon,{fontSize:"small"})}),a.jsx(Mo,{primary:b.name})]},b.name))]}),h&&a.jsx(Pt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):a.jsxs(Mt,{"data-cy":"blocklet-actions",...c,children:[a.jsx(Oo,{children:ge.filter(b=>!b.separator&&!b.onlyInMenu).map(b=>a.jsxs(pt,{title:b.name,"data-cy":`${b.action}-blocklet`,onClick:()=>jt(b),disabled:!!b.disabled||v,children:[p===b.action&&v?a.jsx(H,{size:16,sx:{marginRight:1}}):a.jsx(b.icon,{}),a.jsx("span",{className:"blocklet-action-text",children:b.name})]},b.name))}),h&&a.jsx(Pt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}gn.propTypes={getComponentUrl:S.func,blocklet:S.object.isRequired,onStart:S.func.isRequired,onComplete:S.func.isRequired,variant:S.oneOf(["menu","group"]),hasPermission:S.bool,useBlockletUrlEvaluation:S.func};const Mt=Oe.div`
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
|
|
6
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
7
|
-
.MuiButton-root {
|
|
8
|
-
padding: 4px;
|
|
9
|
-
font-size: 10px;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
`,Ot=x.memo(gn),Gr=e=>{const t={};let n=null;return M.forEachBlockletSync(e,o=>{t[o.meta.bundleDid]?n=M.getDisplayName(o,!0):o.meta.bundleDid&&(t[o.meta.bundleDid]=!0)}),n},Qr=(e,t,n)=>{const{hostname:o,href:r}=e;if(!t)return r;if(n){const i=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(o);if(!i)return r;const c=i[0],u=((t.site?.domainAliases||[]).map(d=>d.value).filter(Boolean).find(d=>d.endsWith(P.DEFAULT_DID_DOMAIN))||"").replace(`.${P.DEFAULT_DID_DOMAIN}`,"");return u?r.replace(o,`${u}-${c}.${P.DEFAULT_IP_DOMAIN_SUFFIX}`):r}return r.replace(t.meta.bundleDid,t.appPid)};function Zr(){const{t:e}=B(),{api:t}=dn(),{blocklet:n}=Xo(),{inService:o}=$e(),[r,s]=x.useState(!1),[i,c]=x.useState(5),l=n&&n.structVersion!==P.APP_STRUCT_VERSION,u=()=>{try{if(n.status==="running"){$.error(e("blocklet.migrate.tip.running"));return}const f=Gr(n);if(f){$.error(e("blocklet.migrate.tip.duplicate",{name:f}));return}s(!0)}catch(f){$.error(gt(f))}},d=()=>{const f=Qr(window.location,n,o);setTimeout(()=>{window.location.href=f},5e3),c(5),setInterval(()=>{c(v=>v-1)},1e3)},p=()=>s(!1);return[l&&a.jsxs(ht,{severity:"warning",style:{margin:"12px 0"},children:[a.jsxs(I,{sx:{display:"flex",alignItems:"center"},children:[a.jsx(pt,{variant:"contained",size:"small",color:"primary",onClick:()=>u(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),a.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(f=>a.jsx(I,{sx:{display:"flex",alignItems:"center"},children:e(`blocklet.migrate.intro.${f}`)},f))]},"alert"),n&&a.jsx(Jo,{popup:!0,open:r,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:t.get,checkTimeout:5*60*1e3,onSuccess:d,extraParams:{appDid:n.appDid,did:n.meta.did,wt:Yo(n,!0),title:M.getDisplayName(n)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:i>=0?e("blocklet.migrate.success",{sec:i}):"Redirecting..."},onClose:p},"connect")]}function Xr(){const e=Ne();return[...e.breakpoints.keys].reverse().reduce((n,o)=>{const r=ue(e.breakpoints.up(o));return!n&&r?o:n},null)||"xs"}function Jr(e){return a.jsx(Ue,{...e,children:a.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function Yr(e){return a.jsx(Ue,{...e,children:a.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function es(e){return a.jsx(Ue,{...e,children:a.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function ts(e){return a.jsx(Ue,{...e,children:a.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const Se={fontSize:20,marginInlineEnd:8},ns={success:a.jsx(Jr,{style:Se}),warning:a.jsx(Yr,{style:Se}),error:a.jsx(es,{style:Se}),info:a.jsx(ts,{style:Se})},os={xl:"400px",lg:"400px",md:"400px",sm:"300px"};function xn({keyId:e,notification:t={},viewAllUrl:n,content:o=null},r){const s=Ne(),i=ns[t.severity],{closeSnackbar:c}=en(),l=()=>c(e),u=cn(),d=()=>{c(e),u(n)},p=Le(()=>Pr(t),[t]),f=Le(()=>t?.activity,[t]),v=Rr({activity:f,users:[t?.actorInfo],actors:[t?.activity?.actor],extra:{linkColor:s.palette.primary.main,userDid:t?.receivers?.[0]?.did}}),g=Xr();return a.jsxs(I,{component:mo,ref:r,sx:[{...s.typography.body2,display:"flex",backgroundColor:s.palette.background.default,color:"#fff",alignItems:"center",pl:2.5,pr:2,py:.75,borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)",width:os[g]},t.severity==="success"?{backgroundColor:`${Uo[600]} !important`}:{},t.severity==="error"?{backgroundColor:`${s.palette.error.dark} !important`}:{},t.severity==="info"?{backgroundColor:`${s.palette.primary.main} !important`}:{},t.severity==="warning"?{backgroundColor:`${$o[700]} !important`}:{}],children:[a.jsxs(I,{sx:{display:"flex",alignItems:"center",py:1,flex:1},children:[i,a.jsx(ss,{onClick:d,sx:{flex:1},children:a.jsx(I,{children:p?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"title",children:v}),f.meta?a.jsx(Mr,{meta:f.meta,type:f.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}}):null]}):a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"title",children:t.title}),o||a.jsx("span",{className:"desc",children:t.description})]})})})]}),a.jsx(I,{sx:{display:"flex",alignItems:"center",ml:"auto",mr:-1,width:44},children:a.jsx(mt,{"aria-label":"close",color:"inherit",onClick:l,size:"large",children:a.jsx(I,{component:Bo,sx:{fontSize:20}})},"close")})]})}const rs=x.forwardRef(xn);xn.propTypes={viewAllUrl:S.string.isRequired,keyId:S.number.isRequired,notification:S.object.isRequired,content:S.node};const ss=Oe.div`
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
.title {
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
text-overflow: ellipsis;
|
|
19
|
-
display: -webkit-box;
|
|
20
|
-
-webkit-line-clamp: 1;
|
|
21
|
-
-webkit-box-orient: vertical;
|
|
22
|
-
font-weight: bold;
|
|
23
|
-
}
|
|
24
|
-
.desc {
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
text-overflow: ellipsis;
|
|
27
|
-
display: -webkit-box;
|
|
28
|
-
-webkit-line-clamp: 3;
|
|
29
|
-
-webkit-box-orient: vertical;
|
|
30
|
-
word-break: break-word;
|
|
31
|
-
}
|
|
32
|
-
`;var T=function(t,n,o){return nn.call(n,"css")?a.jsx(on,rn(t,n),o):a.jsx(t,n,o)},we=function(t,n,o){return nn.call(n,"css")?a.jsxs(on,rn(t,n),o):a.jsxs(t,n,o)};/**
|
|
33
|
-
* (c) Iconify
|
|
34
|
-
*
|
|
35
|
-
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
36
|
-
* files at https://github.com/iconify/iconify
|
|
37
|
-
*
|
|
38
|
-
* Licensed under MIT.
|
|
39
|
-
*
|
|
40
|
-
* @license MIT
|
|
41
|
-
* @version 3.1.1
|
|
42
|
-
*/const bn=Object.freeze({left:0,top:0,width:16,height:16}),Ae=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fe=Object.freeze({...bn,...Ae}),nt=Object.freeze({...fe,body:"",hidden:!1});function is(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function Nt(e,t){const n=is(e,t);for(const o in nt)o in Ae?o in e&&!(o in n)&&(n[o]=Ae[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function as(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function s(i){if(n[i])return r[i]=[];if(!(i in r)){r[i]=null;const c=o[i]&&o[i].parent,l=c&&s(c);l&&(r[i]=[c].concat(l))}return r[i]}return Object.keys(n).concat(Object.keys(o)).forEach(s),r}function cs(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let s={};function i(c){s=Nt(o[c]||r[c],s)}return i(t),n.forEach(i),Nt(e,s)}function ls(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=as(e);for(const r in o){const s=o[r];s&&(t(r,cs(e,r,s)),n.push(r))}return n}const ie=/^[a-z0-9]+(-[a-z0-9]+)*$/,ne=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const c=r.pop(),l=r.pop(),u={provider:r.length>0?r[0]:o,prefix:l,name:c};return t&&!ke(u)?null:u}const s=r[0],i=s.split("-");if(i.length>1){const c={provider:o,prefix:i.shift(),name:i.join("-")};return t&&!ke(c)?null:c}if(n&&o===""){const c={provider:o,prefix:"",name:s};return t&&!ke(c,n)?null:c}return null},ke=(e,t)=>e?!!((e.provider===""||e.provider.match(ie))&&(t&&e.prefix===""||e.prefix.match(ie))&&e.name.match(ie)):!1,us={provider:"",aliases:{},not_found:{},...bn};function Ke(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function ds(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ke(e,us))return null;const n=t.icons;for(const r in n){const s=n[r];if(!r.match(ie)||typeof s.body!="string"||!Ke(s,nt))return null}const o=t.aliases||Object.create(null);for(const r in o){const s=o[r],i=s.parent;if(!r.match(ie)||typeof i!="string"||!n[i]&&!o[i]||!Ke(s,nt))return null}return t}const Pe=Object.create(null);function fs(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function N(e,t){const n=Pe[e]||(Pe[e]=Object.create(null));return n[t]||(n[t]=fs(e,t))}function xt(e,t){return ds(t)?ls(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function ps(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function ms(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Pe)).forEach(r=>{(typeof r=="string"&&typeof t=="string"?[t]:Object.keys(Pe[r]||{})).forEach(i=>{const c=N(r,i);n=n.concat(Object.keys(c.icons).map(l=>(r!==""?"@"+r+":":"")+i+":"+l))})}),n}let bt=!1;function hs(e){return bt}function pe(e){const t=typeof e=="string"?ne(e,!0,bt):e;if(t){const n=N(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function gs(e,t){const n=ne(e,!0,bt);if(!n)return!1;const o=N(n.provider,n.prefix);return ps(o,n.name,t)}function yn(e,t){if(typeof e!="object")return!1;typeof t!="string"&&(t=e.provider||"");const n=e.prefix;if(!ke({provider:t,prefix:n,name:"a"}))return!1;const o=N(t,n);return!!xt(o,e)}function xs(e){return!!pe(e)}function bs(e){const t=pe(e);return t?{...fe,...t}:null}const vn=Object.freeze({width:null,height:null}),Sn=Object.freeze({...vn,...Ae}),ys=/(-?[0-9.]*[0-9]+[0-9.]*)/g,vs=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ot(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(ys);if(o===null||!o.length)return e;const r=[];let s=o.shift(),i=vs.test(s);for(;;){if(i){const c=parseFloat(s);isNaN(c)?r.push(s):r.push(Math.ceil(c*t*n)/n)}else r.push(s);if(s=o.shift(),s===void 0)return r.join("");i=!i}}const Ss=e=>e==="unset"||e==="undefined"||e==="none";function Be(e,t){const n={...fe,...e},o={...Sn,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,o].forEach(g=>{const h=[],C=g.hFlip,m=g.vFlip;let j=g.rotate;C?m?j+=2:(h.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),h.push("scale(-1 1)"),r.top=r.left=0):m&&(h.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),h.push("scale(1 -1)"),r.top=r.left=0);let w;switch(j<0&&(j-=Math.floor(j/4)*4),j=j%4,j){case 1:w=r.height/2+r.top,h.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:h.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:w=r.width/2+r.left,h.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}j%2===1&&(r.left!==r.top&&(w=r.left,r.left=r.top,r.top=w),r.width!==r.height&&(w=r.width,r.width=r.height,r.height=w)),h.length&&(s='<g transform="'+h.join(" ")+'">'+s+"</g>")});const i=o.width,c=o.height,l=r.width,u=r.height;let d,p;i===null?(p=c===null?"1em":c==="auto"?u:c,d=ot(p,l/u)):(d=i==="auto"?l:i,p=c===null?ot(d,u/l):c==="auto"?u:c);const f={},v=(g,h)=>{Ss(h)||(f[g]=h.toString())};return v("width",d),v("height",p),f.viewBox=r.left.toString()+" "+r.top.toString()+" "+l.toString()+" "+u.toString(),{attributes:f,body:s}}const ws=/\sid="(\S+)"/g,js="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Cs=0;function wn(e,t=js){const n=[];let o;for(;o=ws.exec(e);)n.push(o[1]);if(!n.length)return e;const r="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(s=>{const i=typeof t=="function"?t(s):t+(Cs++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+i+r+"$3")}),e=e.replace(new RegExp(r,"g"),""),e}const Q={local:!0,session:!0},jn={local:new Set,session:new Set};let yt=!1;function Es(e){yt=e}const Ut="iconify2",le="iconify",Cn=le+"-count",$t=le+"-version",En=36e5,ks=168;function rt(e,t){try{return e.getItem(t)}catch{}}function vt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Bt(e,t){try{e.removeItem(t)}catch{}}function st(e,t){return vt(e,Cn,t.toString())}function it(e){return parseInt(rt(e,Cn))||0}let je=typeof window>"u"?{}:window;function kn(e){const t=e+"Storage";try{if(je&&je[t]&&typeof je[t].length=="number")return je[t]}catch{}Q[e]=!1}function In(e,t){const n=kn(e);if(!n)return;const o=rt(n,$t);if(o!==Ut){if(o){const c=it(n);for(let l=0;l<c;l++)Bt(n,le+l.toString())}vt(n,$t,Ut),st(n,0);return}const r=Math.floor(Date.now()/En)-ks,s=c=>{const l=le+c.toString(),u=rt(n,l);if(typeof u=="string"){try{const d=JSON.parse(u);if(typeof d=="object"&&typeof d.cached=="number"&&d.cached>r&&typeof d.provider=="string"&&typeof d.data=="object"&&typeof d.data.prefix=="string"&&t(d,c))return!0}catch{}Bt(n,l)}};let i=it(n);for(let c=i-1;c>=0;c--)s(c)||(c===i-1?(i--,st(n,i)):jn[e].add(c))}function _n(){if(!yt){Es(!0);for(const e in Q)In(e,t=>{const n=t.data,o=t.provider,r=n.prefix,s=N(o,r);if(!xt(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function Dn(e,t){switch(e){case"local":case"session":Q[e]=t;break;case"all":for(const n in Q)Q[n]=t;break}}const at=Object.create(null);function Tn(e,t){at[e]=t}function ct(e){return at[e]||at[""]}function St(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Fe=Object.create(null),re=["https://api.simplesvg.com","https://api.unisvg.com"],Ie=[];for(;re.length>0;)re.length===1||Math.random()>.5?Ie.push(re.shift()):Ie.push(re.pop());Fe[""]=St({resources:["https://api.iconify.design"].concat(Ie)});function Ln(e,t){const n=St(t);return n===null?!1:(Fe[e]=n,!0)}function ze(e){return Fe[e]}function Is(){return Object.keys(Fe)}const _s=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Re=_s();function Ds(e){Re=e}function Ts(){return Re}function Ls(e,t){const n=ze(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(i=>{r=Math.max(r,i.length)});const s=t+".json?icons=";o=n.maxURL-r-n.path.length-s.length}return o}function As(e){return e===404}const Ps=(e,t,n)=>{const o=[],r=Ls(e,t),s="icons";let i={type:s,provider:e,prefix:t,icons:[]},c=0;return n.forEach((l,u)=>{c+=l.length+1,c>=r&&u>0&&(o.push(i),i={type:s,provider:e,prefix:t,icons:[]},c=l.length),i.icons.push(l)}),o.push(i),o};function Rs(e){if(typeof e=="string"){const t=ze(e);if(t)return t.path}return"/"}const Ms=(e,t,n)=>{if(!Re){n("abort",424);return}let o=Rs(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});o+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;o+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let r=503;Re(e+o).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(As(i)?"abort":"next",i)});return}return r=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",r)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",r)})},Os={prepare:Ps,send:Ms};function Ns(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,s)=>r.provider!==s.provider?r.provider.localeCompare(s.provider):r.prefix!==s.prefix?r.prefix.localeCompare(s.prefix):r.name.localeCompare(s.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const s=r.provider,i=r.prefix,c=r.name,l=n[s]||(n[s]=Object.create(null)),u=l[i]||(l[i]=N(s,i));let d;c in u.icons?d=t.loaded:i===""||u.missing.has(c)?d=t.missing:d=t.pending;const p={provider:s,prefix:i,name:c};d.push(p)}),t}function An(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function Us(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(s=>{const i=s.icons,c=i.pending.length;i.pending=i.pending.filter(l=>{if(l.prefix!==r)return!0;const u=l.name;if(e.icons[u])i.loaded.push({provider:o,prefix:r,name:u});else if(e.missing.has(u))i.missing.push({provider:o,prefix:r,name:u});else return n=!0,!0;return!1}),i.pending.length!==c&&(n||An([e],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let $s=0;function Bs(e,t,n){const o=$s++,r=An.bind(null,n,o);if(!t.pending.length)return r;const s={id:o,icons:t,callback:e,abort:r};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),r}function Fs(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const s=typeof r=="string"?ne(r,t,n):r;s&&o.push(s)}),o}var zs={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Vs(e,t,n,o){const r=e.resources.length,s=e.random?Math.floor(Math.random()*r):e.index;let i;if(e.random){let y=e.resources.slice(0);for(i=[];y.length>1;){const L=Math.floor(Math.random()*y.length);i.push(y[L]),y=y.slice(0,L).concat(y.slice(L+1))}i=i.concat(y)}else i=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",u=0,d,p=null,f=[],v=[];typeof o=="function"&&v.push(o);function g(){p&&(clearTimeout(p),p=null)}function h(){l==="pending"&&(l="aborted"),g(),f.forEach(y=>{y.status==="pending"&&(y.status="aborted")}),f=[]}function C(y,L){L&&(v=[]),typeof y=="function"&&v.push(y)}function m(){return{startTime:c,payload:t,status:l,queriesSent:u,queriesPending:f.length,subscribe:C,abort:h}}function j(){l="failed",v.forEach(y=>{y(void 0,d)})}function w(){f.forEach(y=>{y.status==="pending"&&(y.status="aborted")}),f=[]}function k(y,L,F){const z=L!=="success";switch(f=f.filter(R=>R!==y),l){case"pending":break;case"failed":if(z||!e.dataAfterTimeout)return;break;default:return}if(L==="abort"){d=F,j();return}if(z){d=F,f.length||(i.length?E():j());return}if(g(),w(),!e.random){const R=e.resources.indexOf(y.resource);R!==-1&&R!==e.index&&(e.index=R)}l="completed",v.forEach(R=>{R(F)})}function E(){if(l!=="pending")return;g();const y=i.shift();if(y===void 0){if(f.length){p=setTimeout(()=>{g(),l==="pending"&&(w(),j())},e.timeout);return}j();return}const L={status:"pending",resource:y,callback:(F,z)=>{k(L,F,z)}};f.push(L),u++,p=setTimeout(E,e.rotate),n(y,t,L.callback)}return setTimeout(E),m}function Pn(e){const t={...zs,...e};let n=[];function o(){n=n.filter(c=>c().status==="pending")}function r(c,l,u){const d=Vs(t,c,l,(p,f)=>{o(),u&&u(p,f)});return n.push(d),d}function s(c){return n.find(l=>c(l))||null}return{query:r,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:o}}function Ft(){}const Ge=Object.create(null);function Hs(e){if(!Ge[e]){const t=ze(e);if(!t)return;const n=Pn(t),o={config:t,redundancy:n};Ge[e]=o}return Ge[e]}function Rn(e,t,n){let o,r;if(typeof e=="string"){const s=ct(e);if(!s)return n(void 0,424),Ft;r=s.send;const i=Hs(e);i&&(o=i.redundancy)}else{const s=St(e);if(s){o=Pn(s);const i=e.resources?e.resources[0]:"",c=ct(i);c&&(r=c.send)}}return!o||!r?(n(void 0,424),Ft):o.query(t,r,n)().abort}function qs(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const o in Q)In(o,r=>{const s=r.data;return r.provider!==e.provider||s.prefix!==e.prefix||s.lastModified===t});return!0}function Ws(e,t){yt||_n();function n(o){let r;if(!Q[o]||!(r=kn(o)))return;const s=jn[o];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=it(r),!st(r,i+1))return;const c={cached:Math.floor(Date.now()/En),provider:e.provider,data:t};return vt(r,le+i.toString(),JSON.stringify(c))}t.lastModified&&!qs(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function zt(){}function Ks(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Us(e)}))}function Gs(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;delete e.iconsToLoad;let s;if(!r||!(s=ct(n)))return;s.prepare(n,o,r).forEach(c=>{Rn(n,c,l=>{if(typeof l!="object")c.icons.forEach(u=>{e.missing.add(u)});else try{const u=xt(e,l);if(!u.length)return;const d=e.pendingIcons;d&&u.forEach(p=>{d.delete(p)}),Ws(e,l)}catch(u){console.error(u)}Ks(e)})})}))}const Qs=e=>{const n=N(e.provider,e.prefix).pendingIcons;return!!(n&&n.has(e.name))},wt=(e,t)=>{const n=Fs(e,!0,hs()),o=Ns(n);if(!o.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(o.loaded,o.missing,o.pending,zt)}),()=>{l=!1}}const r=Object.create(null),s=[];let i,c;return o.pending.forEach(l=>{const{provider:u,prefix:d}=l;if(d===c&&u===i)return;i=u,c=d,s.push(N(u,d));const p=r[u]||(r[u]=Object.create(null));p[d]||(p[d]=[])}),o.pending.forEach(l=>{const{provider:u,prefix:d,name:p}=l,f=N(u,d),v=f.pendingIcons||(f.pendingIcons=new Set);v.has(p)||(v.add(p),r[u][d].push(p))}),s.forEach(l=>{const{provider:u,prefix:d}=l;r[u][d].length&&Gs(l,r[u][d])}),t?Bs(t,o,s):zt},Zs=e=>new Promise((t,n)=>{const o=typeof e=="string"?ne(e,!0):e;if(!o){n(e);return}wt([o||e],r=>{if(r.length&&o){const s=pe(o);if(s){t({...fe,...s});return}}n(e)})});function Mn(e,t){const n={...e};for(const o in t){const r=t[o],s=typeof r;o in vn?(r===null||r&&(s==="string"||s==="number"))&&(n[o]=r):s===typeof n[o]&&(n[o]=o==="rotate"?r%4:r)}return n}const Ve={...Sn,inline:!1},Qe="iconify",lt="iconify-inline",q="iconifyData"+Date.now();let Z=[];function me(e){for(let t=0;t<Z.length;t++){const n=Z[t];if((typeof n.node=="function"?n.node():n.node)===e)return n}}function On(e,t=!1){let n=me(e);return n?(n.temporary&&(n.temporary=t),n):(n={node:e,temporary:t},Z.push(n),n)}function Xs(){if(document.documentElement)return On(document.documentElement);Z.push({node:()=>document.documentElement})}function Js(e){Z=Z.filter(t=>e!==t&&e!==(typeof t.node=="function"?t.node():t.node))}function he(){return Z}function Ys(e){const t=document;t.readyState&&t.readyState!=="loading"?e():t.addEventListener("DOMContentLoaded",e)}let ae=null;const ei={childList:!0,subtree:!0,attributes:!0};function Nn(e){if(!e.observer)return;const t=e.observer;t.pendingScan||(t.pendingScan=setTimeout(()=>{delete t.pendingScan,ae&&ae(e)}))}function ti(e,t){if(!e.observer)return;const n=e.observer;if(!n.pendingScan)for(let o=0;o<t.length;o++){const r=t[o];if(r.addedNodes&&r.addedNodes.length>0||r.type==="attributes"&&r.target[q]!==void 0){n.paused||Nn(e);return}}}function Un(e,t){e.observer.instance.observe(t,ei)}function Me(e){let t=e.observer;if(t&&t.instance)return;const n=typeof e.node=="function"?e.node():e.node;!n||!window||(t||(t={paused:0},e.observer=t),t.instance=new window.MutationObserver(ti.bind(null,e)),Un(e,n),t.paused||Nn(e))}function Vt(){he().forEach(Me)}function $n(e){if(!e.observer)return;const t=e.observer;t.pendingScan&&(clearTimeout(t.pendingScan),delete t.pendingScan),t.instance&&(t.instance.disconnect(),delete t.instance)}function ni(e){const t=ae!==null;if(ae!==e&&(ae=e,t&&he().forEach($n)),t){Vt();return}Ys(Vt)}function ut(e){(e?[e]:he()).forEach(t=>{if(!t.observer){t.observer={paused:1};return}const n=t.observer;if(n.paused++,n.paused>1||!n.instance)return;n.instance.disconnect()})}function oi(e){if(e){const t=me(e);t&&ut(t)}else ut()}function dt(e){(e?[e]:he()).forEach(t=>{if(!t.observer){Me(t);return}const n=t.observer;if(n.paused&&(n.paused--,!n.paused)){const o=typeof t.node=="function"?t.node():t.node;if(o)n.instance?Un(t,o):Me(t);else return}})}function ri(e){if(e){const t=me(e);t&&dt(t)}else dt()}function Bn(e,t=!1){const n=On(e,t);return Me(n),n}function Fn(e){const t=me(e);t&&($n(t),Js(e))}function si(e,t){if(e.name!==t.name||e.mode!==t.mode)return!0;const n=e.customisations,o=t.customisations;for(const r in Ve)if(n[r]!==o[r])return!0;return!1}function ii(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let s=parseFloat(e.slice(0,e.length-n.length));return isNaN(s)?0:(s=s/r,s%1===0?o(s):0)}}return t}const ai=/[\s,]+/;function ci(e,t){t.split(ai).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const li=["width","height"],ui=["inline","hFlip","vFlip"];function di(e,t){return e===t||e==="true"?!0:e===""||e==="false"?!1:null}function fi(e){const t=e.getAttribute("data-icon"),n=typeof t=="string"&&ne(t,!0);if(!n)return null;const o={...Ve,inline:e.classList&&e.classList.contains(lt)};li.forEach(c=>{const l=e.getAttribute("data-"+c);l&&(o[c]=l)});const r=e.getAttribute("data-rotate");typeof r=="string"&&(o.rotate=ii(r));const s=e.getAttribute("data-flip");typeof s=="string"&&ci(o,s),ui.forEach(c=>{const l="data-"+c,u=di(e.getAttribute(l),l);typeof u=="boolean"&&(o[c]=u)});const i=e.getAttribute("data-mode");return{name:t,icon:n,customisations:o,mode:i}}const pi="svg."+Qe+", i."+Qe+", span."+Qe+", i."+lt+", span."+lt;function mi(e){const t=[];return e.querySelectorAll(pi).forEach(n=>{const o=n[q]||n.tagName.toLowerCase()!=="svg"?fi(n):null;o&&t.push({node:n,props:o})}),t}function zn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}let ce;function hi(){try{ce=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ce=null}}function gi(e){return ce===void 0&&hi(),ce?ce.createHTML(e):e}function Vn(e){const t=new Set(["iconify"]);return["provider","prefix"].forEach(n=>{e[n]&&t.add("iconify--"+e[n])}),t}function Hn(e,t,n,o){const r=e.classList;if(o){const i=o.classList;Array.from(i).forEach(c=>{r.add(c)})}const s=[];return t.forEach(i=>{r.contains(i)?n.has(i)&&s.push(i):(r.add(i),s.push(i))}),n.forEach(i=>{t.has(i)||r.remove(i)}),s}function qn(e,t,n){const o=e.style;(n||[]).forEach(s=>{o.removeProperty(s)});const r=[];for(const s in t)o.getPropertyValue(s)||(r.push(s),o.setProperty(s,t[s]));return r}function Wn(e,t,n){let o;try{o=document.createElement("span")}catch{return e}const r=t.customisations,s=Be(n,r),i=e[q],c=zn(wn(s.body),{"aria-hidden":"true",role:"img",...s.attributes});o.innerHTML=gi(c);const l=o.childNodes[0],u=e.attributes;for(let g=0;g<u.length;g++){const h=u.item(g),C=h.name;C!=="class"&&!l.hasAttribute(C)&&l.setAttribute(C,h.value)}const d=Vn(t.icon),p=Hn(l,d,new Set(i&&i.addedClasses),e),f=qn(l,r.inline?{"vertical-align":"-0.125em"}:{},i&&i.addedStyles),v={...t,status:"loaded",addedClasses:p,addedStyles:f};return l[q]=v,e.parentNode&&e.parentNode.replaceChild(l,e),l}function xi(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function bi(e){return"data:image/svg+xml,"+xi(e)}function yi(e){return'url("'+bi(e)+'")'}const vi={display:"inline-block"},ft={"background-color":"currentColor"},Kn={"background-color":"transparent"},Ht={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},qt={"-webkit-mask":ft,mask:ft,background:Kn};for(const e in qt){const t=qt[e];for(const n in Ht)t[e+"-"+n]=Ht[n]}function Wt(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function Si(e,t,n,o){const r=t.customisations,s=Be(n,r),i=s.attributes,c=e[q],l=zn(s.body,{...i,width:n.width+"",height:n.height+""}),u=Vn(t.icon),d=Hn(e,u,new Set(c&&c.addedClasses)),f={"--svg":yi(l),width:Wt(i.width),height:Wt(i.height),...vi,...o?ft:Kn};r.inline&&(f["vertical-align"]="-0.125em");const v=qn(e,f,c&&c.addedStyles),g={...t,status:"loaded",addedClasses:d,addedStyles:v};return e[q]=g,e}let Ce=!1;function wi(){Ce||(Ce=!0,setTimeout(()=>{Ce&&(Ce=!1,te())}))}function te(e,t=!1){const n=Object.create(null);function o(r,s){const{provider:i,prefix:c,name:l}=r,u=N(i,c),d=u.icons[l];if(d)return{status:"loaded",icon:d};if(u.missing.has(l))return{status:"missing"};if(s&&!Qs(r)){const p=n[i]||(n[i]=Object.create(null));(p[c]||(p[c]=new Set)).add(l)}return{status:"loading"}}(e?[e]:he()).forEach(r=>{const s=typeof r.node=="function"?r.node():r.node;if(!s||!s.querySelectorAll)return;let i=!1,c=!1;function l(u,d,p){if(c||(c=!0,ut(r)),u.tagName.toUpperCase()!=="SVG"){const f=d.mode,v=f==="mask"||(f==="bg"?!1:f==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof v=="boolean"){Si(u,d,{...fe,...p},v);return}}Wn(u,d,p)}mi(s).forEach(({node:u,props:d})=>{const p=u[q];if(!p){const{status:v,icon:g}=o(d.icon,!0);if(g){l(u,d,g);return}i=i||v==="loading",u[q]={...d,status:v};return}let f;if(si(p,d)){if(f=o(d.icon,p.name!==d.name),!f.icon){i=i||f.status==="loading",Object.assign(p,{...d,status:f.status});return}}else{if(p.status!=="loading")return;if(f=o(d.icon,!1),!f.icon){p.status=f.status;return}}l(u,d,f.icon)}),r.temporary&&!i?Fn(s):t&&i?Bn(s,!0):c&&r.observer&&dt(r)});for(const r in n){const s=n[r];for(const i in s){const c=s[i];wt(Array.from(c).map(l=>({provider:r,prefix:i,name:l})),wi)}}}function ji(e){const t=me(e);t?te(t):te({node:e,temporary:!0},!0)}function Gn(e,t,n=!1){const o=pe(e);if(!o)return null;const r=ne(e),s=Mn(Ve,t||{}),i=Wn(document.createElement("span"),{name:e,icon:r,customisations:s},o);return n?i.outerHTML:i}function Ci(){return"3.1.1"}function Ei(e,t){return Gn(e,t,!1)}function ki(e,t){return Gn(e,t,!0)}function Ii(e,t){const n=pe(e);if(!n)return null;const o=Mn(Ve,t||{});return Be(n,o)}function _i(e){e?ji(e):te()}if(typeof document<"u"&&typeof window<"u"){Xs();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!yn(o))&&console.error(n)}catch{console.error(n)}})}setTimeout(()=>{ni(te),te()})}function Di(e,t){Dn(e,t!==!1)}function Ti(e){Dn(e,!0)}Tn("",Os);if(typeof document<"u"&&typeof window<"u"){_n();const e=window;if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(const n in t){const o="IconifyProviders["+n+"] is invalid.";try{const r=t[n];if(typeof r!="object"||!r||r.resources===void 0)continue;Ln(n,r)||console.error(o)}catch{console.error(o)}}}}const Li={getAPIConfig:ze,setAPIModule:Tn,sendAPIQuery:Rn,setFetch:Ds,getFetch:Ts,listAPIProviders:Is},Ai={_api:Li,addAPIProvider:Ln,loadIcons:wt,loadIcon:Zs,iconExists:xs,getIcon:bs,listIcons:ms,addIcon:gs,addCollection:yn,replaceIDs:wn,calculateSize:ot,buildIcon:Be,getVersion:Ci,renderSVG:Ei,renderHTML:ki,renderIcon:Ii,scan:_i,observe:Bn,stopObserving:Fn,pauseObserver:oi,resumeObserver:ri,enableCache:Di,disableCache:Ti};try{self.Iconify===void 0&&(self.Iconify=Ai)}catch{}function Qn({infos:e=[]}){const{t}=B(),n=new URL("https://community.arcblock.io/discussions/add");e.forEach(r=>{n.searchParams.set(r.label,r.value)});const o=e.map(r=>`* ${r.label}: ${r.value}`).join(`
|
|
43
|
-
`);return n.searchParams.set("report","server"),n.searchParams.set("context",`[Enter feedback here]
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<!--
|
|
48
|
-
[Server Info]
|
|
49
|
-
${o}
|
|
50
|
-
* Page: ${window.location.href}
|
|
51
|
-
-->
|
|
52
|
-
`),T(I,{sx:{mx:{xs:0,md:2}},children:T(Ee,{sx:{color:"text.primary"},target:"_blank",href:n.href,rel:"noreferrer",style:{textDecoration:"underline"},children:t("common.reportIssue")})})}Qn.propTypes={infos:S.arrayOf(S.shape({label:S.string,value:S.string}))};var Ze,Kt;function Pi(){return Kt||(Kt=1,Ze={year:{long:"year",short:"y"},day:{long:"day",short:"d"},hour:{long:"hour",short:"h"},minute:{long:"minute",short:"m"},second:{long:"second",short:"s"},millisecond:{long:"millisecond",short:"ms"},microsecond:{long:"microsecond",short:"µs"},nanosecond:{long:"nanosecond",short:"ns"}}),Ze}var Xe,Gt;function Ri(){return Gt||(Gt=1,Xe={year:{long:"年",short:"年"},day:{long:"天",short:"天"},hour:{long:"小时",short:"小时"},minute:{long:"分钟",short:"分"},second:{long:"秒钟",short:"秒"},millisecond:{long:"毫秒",short:"毫秒"},microsecond:{long:"微秒",short:"微秒"},nanosecond:{long:"纳秒",short:"纳秒"}}),Xe}var Je,Qt;function Zn(){if(Qt)return Je;Qt=1;const e=new Map;return Je={registerLang:(o,r)=>{e.set(o,r)},getLang:(o="en_US")=>e.get(o)||e.get("en_US")},Je}var Ye,Zt;function Mi(){return Zt||(Zt=1,Ye=e=>{if(typeof e!="number")throw new TypeError("Expected a number");const t=e>0?Math.floor:Math.ceil;return{days:t(e/864e5),hours:t(e/36e5)%24,minutes:t(e/6e4)%60,seconds:t(e/1e3)%60,milliseconds:t(e)%1e3,microseconds:t(e*1e3)%1e3,nanoseconds:t(e*1e6)%1e3}}),Ye}var et,Xt;function Oi(){if(Xt)return et;Xt=1;const e=Mi(),{getLang:t}=Zn(),n=(r,s)=>s===1?r:`${r}s`,o=1e-7;return et=(r,s={})=>{if(!Number.isFinite(r))throw new TypeError("Expected a finite number");s.colonNotation&&(s.compact=!1,s.formatSubMilliseconds=!1,s.separateMilliseconds=!1,s.verbose=!1),s.compact&&(s.secondsDecimalDigits=0,s.millisecondsDecimalDigits=0);const i=t(s.locale),c=[],l=(p,f)=>{const v=Math.floor(p*10**f+o);return(Math.round(v)/10**f).toFixed(f)},u=(p,f,v)=>{if((c.length===0||!s.colonNotation)&&p===0&&!(s.colonNotation&&f==="minute"))return;const{long:g}=i[f]||t("en_US")[f],{short:h}=i[f]||t("en_US")[f];let C=(v||p||"0").toString(),m,j;if(s.colonNotation){m=c.length>0?":":"",j="";const w=C.includes(".")?C.split(".")[0].length:C.length,k=c.length>0?2:1;C="0".repeat(Math.max(0,k-w))+C}else m="",s.locale==="zh_CN"?Object.values(d).filter(w=>w>0).length>1?!d.days&&!d.hours&&d.minutes&&s.compact?j=g:j=h:d.minutes?j=g:j=h:j=s.verbose?` ${n(g,p)}`:h;c.push(m+C+j)},d=e(r);if(u(Math.trunc(d.days/365),"year"),u(d.days%365,"day"),u(d.hours,"hour"),u(d.minutes,"minute"),s.separateMilliseconds||s.formatSubMilliseconds||!s.colonNotation&&r<1e3)if(u(d.seconds,"second"),s.formatSubMilliseconds)u(d.milliseconds,"millisecond"),u(d.microseconds,"microsecond"),u(d.nanoseconds,"nanosecond");else{const p=d.milliseconds+d.microseconds/1e3+d.nanoseconds/1e6,f=typeof s.millisecondsDecimalDigits=="number"?s.millisecondsDecimalDigits:0,v=p>=1?Math.round(p):Math.ceil(p),g=f?p.toFixed(f):v;u(Number.parseFloat(g,10),"millisecond",g)}else{const p=r/1e3%60,f=typeof s.secondsDecimalDigits=="number"?s.secondsDecimalDigits:1,v=l(p,f),g=s.keepDecimalsOnWholeSeconds?v:v.replace(/\.0+$/,"");u(Number.parseFloat(g,10),"second",g)}if(c.length===0){const p=(i.millisecond||t("en_US").millisecond).long,f=(i.millisecond||t("en_US").millisecond).short;return s.locale==="zh_CN"?`0${s.verbose?`${p}`:f}`:`0${s.verbose?` ${p}s`:f}`}if(s.compact)return c[0];if(typeof s.unitCount=="number"){const p=s.colonNotation?"":" ";return c.slice(0,Math.max(s.unitCount,1)).join(p)}return s.colonNotation?c.join(""):c.join(" ")},et}var tt,Jt;function Ni(){if(Jt)return tt;Jt=1;const e=Pi(),t=Ri(),{registerLang:n}=Zn(),o=Oi();return n("en_US",e),n("zh_CN",t),o.registerLang=n,tt=o,tt}var Ui=Ni();const Xn=Wo(Ui);function V({children:e}){return ue(n=>n.breakpoints.down("md"))?a.jsx(De,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:a.jsx(I,{sx:{display:"flex",alignItems:"center",gap:1},children:a.jsx(It,{fontSize:"small"})})}):a.jsxs(I,{sx:{display:"flex",alignItems:"center",gap:1},children:[a.jsx(It,{fontSize:"small"}),e]})}V.propTypes={children:S.node.isRequired};const $i="https://launcher.arcblock.io/",Bi=30*24*60*60*1e3;function Jn({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:o="",retention:r=0,sx:s={},...i}){const{t:c,locale:l}=B(),u=$e(),[d,p]=pn({safeIframeRef:null,popoverAnchorEl:null}),f=x.useRef(null),v=Ne(),g=ue(y=>y.breakpoints.down("md")),h=g?"mobile":"desktop",C=fn(async()=>{const[y,L]=await Promise.all([u.api.getLauncherSession({input:{launcherSessionId:o,launcherUrl:e}}),ln({launcherUrl:e||$i,nftDid:n,launcherSessionId:o,locale:l,theme:v.palette.mode})]);if(y?.error)throw new Error(y.error);return{launcherSession:y.launcherSession,subscriptionURL:L}},[l]);if(C.loading)return a.jsx(G,{label:a.jsxs(V,{children:[!g&&c("expiration.desktop.loading"),a.jsx(H,{size:16})]}),variant:"success",sx:{cursor:"pointer",...s},...i,retention:r});if(C.error)return console.error(C.error),a.jsx(G,{label:a.jsx(V,{children:c(`expiration.${h}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...s},...i,retention:r,onClick:()=>C.retry()});const m=y=>{p({popoverAnchorEl:y.currentTarget})},j=()=>{p({popoverAnchorEl:null})},w=C.value?.launcherSession;let k="success";[P.LAUNCH_SESSION_STATUS.overdue,P.LAUNCH_SESSION_STATUS.canceled,P.LAUNCH_SESSION_STATUS.terminated].includes(C.value?.launcherSession?.status)&&(k="error");let E=null;if(w.expirationDate&&!w.subscription){const y=Y(w.expirationDate).diff(Y(),"ms");E=c(`expiration.${h}.tips.${k}`,{validity:Xn(y,{locale:un(l),compact:!0,verbose:!0})}),y>0&&y<=Bi&&(k="warning")}return a.jsxs(a.Fragment,{children:[a.jsx(G,{label:a.jsx(V,{children:E||w?.subscription?.product?.name||c("common.subscription")}),color:k,variant:k!=="success"?"contained":"outlined",sx:{cursor:"pointer",...s},...i,retention:r,onClick:m}),a.jsx(sn,{id:"popover-info",open:!!d.popoverAnchorEl,anchorEl:d.popoverAnchorEl,onClose:j,anchorOrigin:{vertical:"bottom",horizontal:"right"},sx:{"& .MuiPopover-paper":{minHeight:0}},transformOrigin:{vertical:"top",horizontal:"right"},children:a.jsx(I,{sx:{width:{xs:"360px",md:"450px"},display:"flex",flexDirection:"column"},children:a.jsx("iframe",{ref:f,title:c("common.subscription"),width:"100%",height:"600px",style:{border:0,maxHeight:"800px"},src:C.value?.subscriptionURL})})})]})}Jn.propTypes={chainHost:S.string.isRequired,nftId:S.string,launcherSessionId:S.string,sx:S.object,retention:S.number,launcherUrl:S.string.isRequired};const Fi=30*24*60*60*1e3,zi="https://launcher.arcblock.io/";function Yn({launcherUrl:e,chainHost:t,nftId:n="",launcherSessionId:o="",sx:r={},retention:s=0,...i}){const{t:c,locale:l}=B(),[u,d]=pn({safeIframeRef:null,popoverAnchorEl:null}),p=x.useRef(null),f=ue(y=>y.breakpoints.down("md")),v=$e(),g=f?"mobile":"desktop",h=fn(async()=>{const[y,L]=await Promise.all([v.api.getLauncherSession({input:{launcherSessionId:o||n,launcherUrl:e}}),ln({launcherUrl:e||zi,nftDid:n,launcherSessionId:o,locale:l})]);if(y?.error)throw new Error(y.error);return{launcherSession:y.launcherSession,subscriptionURL:L}},[l]);if(h.loading)return a.jsx(G,{label:a.jsxs(V,{children:[!f&&c("expiration.desktop.loading"),a.jsx(H,{size:16})]}),variant:"success",sx:{cursor:"pointer",...r},...i,retention:s});if(h.error)return console.error(h.error),a.jsx(G,{label:a.jsx(V,{children:c(`expiration.${g}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...r},...i,retention:s,onClick:()=>h.retry()});const C=h.value?.launcherSession?.expirationDate,m=Y(C).isBefore(Y()),j=Y(C).diff(Y(),"ms");let w="success";j<=Fi&&(w="warning"),m&&(w="error");const k=y=>{d({popoverAnchorEl:y.currentTarget})},E=()=>{d({popoverAnchorEl:null})};return a.jsxs(a.Fragment,{children:[h.value?.launcherSession?.subscription&&a.jsx(G,{label:a.jsx(V,{children:c("expiration.desktop.nextInvoice",{date:er(C,l)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...r},...i,retention:s,onClick:k}),!h.value?.launcherSession?.subscription&&a.jsx(G,{label:a.jsx(V,{children:c(`expiration.${g}.tips.${w}`,{validity:Xn(j,{locale:un(l),compact:!0,verbose:!0})})}),color:w,variant:w!=="success"?"contained":"outlined",sx:{cursor:"pointer",...r},...i,retention:s,onClick:k}),a.jsx(sn,{id:"popover-info",open:!!u.popoverAnchorEl,anchorEl:u.popoverAnchorEl,onClose:E,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:a.jsx(I,{sx:{width:{xs:"360px",md:"450px"}},children:a.jsx("iframe",{ref:p,title:c("common.subscription"),width:"100%",height:"600px",style:{border:0},src:h.value?.subscriptionURL})})})]})}Yn.propTypes={chainHost:S.string.isRequired,nftId:S.string,launcherSessionId:S.string,sx:S.object,retention:S.number,launcherUrl:S.string.isRequired};function eo({meta:e={},fallbackUrl:t=We,invalidPathFallback:n=null,headerAddons:o=void 0,sessionManagerProps:r={showRole:!0,onLogout:()=>{window.location.href=We}},links:s=[],showDomainWarningDialog:i=!0,...c}){tr();const l=x.use(nr)?.session?.user,u=l?.role,{locale:d}=B()||{},p=x.useMemo(()=>{const j=Object.assign({},window.blocklet,e);try{return or(j)}catch(w){return console.error("Failed to format blocklet info",w,j),j}},[e]),{localizedNav:f,flattened:v,matchedIndex:g}=x.useMemo(()=>{let j=rr(p?.navigation?.dashboard,d)||[];j=sr(j,u),j=ir(j,E=>{let y=null;return E.icon&&(E.icon.startsWith("http")||E.icon.startsWith("data:")?y=a.jsx(tn,{src:E.icon}):y=a.jsx("iconify-icon",{height:"100%",width:"100%",icon:E.icon})),{id:E.id,title:E.title,url:E.link,icon:y,external:!0,children:E.items}},"items");const w=ar(j).filter(E=>!!E.url),k=cr(w.map(E=>E.url));return k!==-1&&(w[k].active=!0),{localizedNav:j,flattened:w,matchedIndex:k}},[p,d,u]),h=typeof s=="function"?s(f):[...f,...s],C=lr({meta:e});if(x.useLayoutEffect(()=>{l&&!v?.length&&t&&(window.location.href=t)},[t]),x.useLayoutEffect(()=>{l&&v?.length&&g===-1&&n&&n()},[n,v,g]),!p.appName)return null;const{appName:m}=p;return a.jsx(Br,{title:m,fullWidth:!0,sidebarWidth:128,legacy:!1,links:h,...c,headerProps:{homeLink:We,logo:a.jsx("img",{src:C,alt:"logo"}),addons:a.jsx(ur,{formattedBlocklet:p,addons:o,sessionManagerProps:r,showDomainWarningDialog:i}),...c.headerProps}})}eo.propTypes={meta:fr,fallbackUrl:S.string,invalidPathFallback:S.func,headerAddons:S.oneOfType([S.func,S.node]),sessionManagerProps:dr,links:S.oneOfType([S.array,S.func]),showDomainWarningDialog:S.bool};const Vi={width:24,height:24,body:'<path fill="currentColor" d="M6.4 18L5 16.6L14.6 7H6V5h12v12h-2V8.4L6.4 18Z"/>'};function to({children:e,style:t={},...n}){return a.jsx(ho,{style:t,...n,children:e})}to.propTypes={children:S.any.isRequired,style:S.object};const A={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"},_e={added:A.grey,waiting:A.yellow,downloading:A.yellow,extracting:A.yellow,downloaded:A.grey,installing:A.yellow,installed:A.grey,starting:A.yellow,running:A.running,stopping:A.yellow,stopped:A.reverse,error:A.error,upgrading:A.yellow,restarting:A.yellow,corrupted:A.error,deleting:A.yellow,resource:A.primary},Hi={added:"primary",waiting:"info",downloading:"info",extracting:"info",downloaded:"primary",installing:"info",installed:"primary",starting:"info",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"info",restarting:"info",corrupted:"error",deleting:"warning",resource:"primary"};function qi({isResource:e=!1,status:t,variant:n="tag",progress:o=0,...r}){const{t:s}=x.useContext(Yt),i=M.isInProgress(t),c=e&&t==="stopped"?"resource":t,l=s(`blocklet.status.${c}`);return n==="pin"?a.jsx(De,{title:s("blocklet.statusTip",{status:l}),children:a.jsxs(I,{...r,sx:[{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:[a.jsx(I,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:_e[c]}}),a.jsx(I,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:_e[c]}})]})}):n==="dot"?a.jsx(De,{title:s("blocklet.statusTip",{status:l}),children:a.jsx($r,{color:_e[c],...r})}):a.jsxs(to,{type:Hi[c],...r,children:[i&&a.jsx(H,{size:12,color:"inherit",style:{marginRight:5}}),l,c==="downloading"&&o?a.jsx("div",{style:{marginLeft:5},children:`${o} %`}):null]})}qi.propTypes={status:S.string.isRequired,variant:S.oneOf(["dot","tag","pin"]),source:S.string,progress:S.number,isResource:S.bool};function Wi(){const{inFullPage:e,toggleFullPage:t}=Fr();return T(mt,{onClick:t,children:e?T(zo,{sx:{transform:"scale(1.3)"}}):T(Vo,{sx:{transform:"scale(1.3)"}})})}function no({children:e=null}){const{t}=B(),{loading:n,error:o,actions:{refreshBlocklet:r},env:s,blocklet:i}=de(),{info:c,imgPrefix:l}=pr(),u=Ko(),d=ue(w=>w.breakpoints.down("md")),p=Ne(),{appId:f,version:v}=s,g=[{label:"App ID",value:f},{label:"App Version",value:v},{label:"App Bundle Name",value:i?.meta?.bundleName},{label:"Server Id",value:c.did},{label:"Server Version",value:c.version}],h=w=>{const k=Array.isArray(w)?w:[w];if(d||k.unshift(T(Wi,{})),i){const E={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};hr(i)?k.unshift(T(Jn,{chainHost:i?.controller?.chainHost,nftId:i?.controller?.nftId,launcherSessionId:i?.controller?.launcherSessionId,launcherUrl:i?.controller?.launcherUrl,sx:E})):c.ownerNft&&c.launcher&&k.unshift(T(Yn,{chainHost:c.launcher.chainHost,launcherUrl:c.launcher.url,nftId:c.ownerNft.did,launcherSessionId:c.ownerNft.launcherSessionId,sx:E}))}return k},C=Or({blocklet:i}),m={logo:C?T("img",{src:C,alt:"logo"}):null,brandAddon:T(I,{children:i&&we(I,{component:"a",target:"_blank",href:window.blocklet.appUrl,rel:"noopener noreferrer",title:window.blocklet.appName,sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,py:1,px:2,border:"1px solid",borderColor:"text.disabled",borderRadius:"30px",cursor:"pointer"},children:[T(De,{title:M.isRunning(i?.status)?void 0:t(`blocklet.status.${i?.status}`),children:T(I,{sx:{bgcolor:_e[i?.status],width:8,height:8,borderRadius:"50%"}})}),T(I,{sx:{lineHeight:1,color:"text.secondary",maxWidth:d?66:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:M.getDisplayName(i)}),T(I,{component:go,icon:Vi,sx:{color:"text.secondary"}})]})})};return we(Ki,{legacy:!1,fullWidth:!0,headerAddons:h,headerProps:m,links:w=>w?.map(E=>(E.children=E.children?.map(y=>{if(y.id==="/team/aigne"){const L=l?ee(l,"/aigne-hub.png"):"/aigne-hub.pg";return{...y,icon:T(tn,{src:L,alt:"AIGNE Hub",style:p.palette.mode==="dark"?{filter:"invert(1)"}:{},fallback:y.icon})}}return y}),E)),footerProps:{addon:T(Qn,{infos:g})},children:[!i&&n&&T(Te,{relative:"parent",children:T(H,{})}),!i&&o&&we(Te,{relative:"parent",children:[we(I,{sx:{display:"flex",alignItems:"center"},children:[T(Fo,{color:"error",sx:{marginRight:1}}),gt(o)]}),T(pt,{onClick:()=>r(),children:T("span",{style:{textDecoration:"underline"},children:t("common.retry")})})]}),!!i&&T(I,{sx:{flex:1,padding:d?2:3,display:"flex",flexDirection:"column"},children:T(xo,{FallbackComponent:mr,resetKeys:[u.pathname],children:e})})]})}no.propTypes={children:S.any};const Ki=Oe(eo)`
|
|
53
|
-
div.dashboard-content {
|
|
54
|
-
padding: 0;
|
|
55
|
-
}
|
|
56
|
-
.header-addons .locales {
|
|
57
|
-
max-height: 400px;
|
|
58
|
-
overflow-y: auto;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.header-brand-addon {
|
|
62
|
-
display: block;
|
|
63
|
-
}
|
|
64
|
-
`;function Gi(){const{t:e,locale:t}=B(),{blocklet:n,launcherSession:o,refreshSubscription:r}=de(),{connectApi:s,session:i,api:c}=gr(),[l,u]=x.useState(!1),[d,p]=x.useState(""),[f,v]=Ar({subscriptionURL:"#"});if(x.useEffect(()=>{(Dt(n,o)||Tt(o))&&xr({launcherSessionId:n?.controller?.launcherSessionId,launcherUrl:n?.controller?.launcherUrl,locale:t}).then(m=>{v({subscriptionURL:m})}).catch(m=>{console.error("get subscription url error:",m)})},[n,o]),x.useEffect(()=>{if(n.controller?.launcherUrl){const m=ee(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(m).then(j=>j.json()).then(j=>{const w=j.componentMountPoints?.find(E=>E.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,k=ee(n.controller.launcherUrl,w);p(k)})}},[n.controller?.launcherUrl]),!n||!o)return"";let g=null,h="",C="error";return br(o)?(g=yr(o)?a.jsx(Ee,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}):a.jsx(Ho,{variant:"text",color:"error",onClick:()=>u(!0),sx:{lineHeight:"inherit",fontSize:"inherit"},children:e("blocklet.payNow")}),h=e("blocklet.suspendedCausedByPastDue",{deadline:oe(o?.reservedUntil,t)})):Tt(o)?(g=a.jsx(Ee,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),h=e("blocklet.willBeSuspendedSoon",{deadline:oe((o?.subscription?.cancel_at||0)*1e3,t)}),C="warning"):Dt(n,o)?(g=a.jsx(Ee,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),h=e("blocklet.suspendedCausedByExpired",{deadline:oe(o?.reservedUntil,t),canceledAt:oe((o?.subscription?.canceled_at||0)*1e3,t)})):vr(n,o)&&(g=a.jsx(an,{to:ee(P.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),h=e("blocklet.suspendedCausedByTerminated",{canceledAt:oe(o?.terminatedAt,t),deadline:Sr(o?.terminatedAt,t)})),h?a.jsxs(a.Fragment,{children:[a.jsxs(ht,{severity:C,sx:{mb:1},children:[h,a.jsx(se,{sx:{display:"inline-block",fontSize:"inherit",lineHeight:"inherit",ml:1,a:{textDecoration:"auto"},"& .MuiButtonBase-root":{p:0,minWidth:"auto"}},children:g})]}),l&&d&&o&&a.jsx(wr,{session:i,connect:s,baseUrl:d,authToken:o.subscription.authToken,children:a.jsx(zr,{dialogProps:{open:l,onClose:()=>u(!1)},subscriptionId:o.subscription.id,successToast:!0,onPaid:()=>{c.post("/blocklet/start?fromSetup=1"),r(),u(!1)}})})]}):null}const Qi=x.lazy(()=>_(()=>import("./log-EgLjQcxJ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),Zi=x.lazy(()=>_(()=>import("./index-BdKTdgAu.js"),__vite__mapDeps([14,2,1,5,4,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,3,39,40,41,42,43,44]))),Xi=x.lazy(()=>_(()=>import("./index-BkSX50ri.js"),__vite__mapDeps([45,4,2,1,5,6,7,8,15,9,10,11,19,20,21,46,47,32,28,37,48]))),Ji=x.lazy(()=>_(()=>import("./index-NhYP56dI.js"),__vite__mapDeps([49,2,1,9,4,5,6,7,8,10,11,32,28,20,18,50,12,38,51,23,52,41,53,54,26,55,56,57,39,58,59,60,61,62,63,64]))),Yi=x.lazy(()=>_(()=>import("./overview-CS6bfsq0.js"),__vite__mapDeps([65,1,2,4,5,6,7,8,66,67,9,10,11,31,40,30,19,20,21,18,68,69,70,54,3,28,32,39,41,42,43,44]))),ea=x.lazy(()=>_(()=>import("./domains-BsCL1ViY.js"),__vite__mapDeps([71,2,4,1,5,6,7,8,9,10,11,72,41,22,20,40,30,32,28,37,60,23,29,31,73,53]))),ta=x.lazy(()=>_(()=>import("./index-D9r0lvN6.js"),__vite__mapDeps([74,2,6,5,1,4,7,8,9,10,11,18,19,20,21,75,15,34,35,46,76,22,77,78,79,32,28,51,41,80]))),na=x.lazy(()=>_(()=>import("./appearance-ChoNlV7r.js"),__vite__mapDeps([81,5,2,9,1,4,6,7,8,10,11,46]))),oa=x.lazy(()=>_(()=>import("./audit-logs-DjxskWcd.js"),__vite__mapDeps([82,4,2,1,5,6,7,8,9,10,11,34,35,3,62,63,38,64,19,20,21]))),ra=x.lazy(()=>_(()=>import("./index-cdAwhti6.js"),__vite__mapDeps([83,2,1,5,4,6,7,8,9,10,11,47,21,84,85,86,38,31,87,88,12,19,20,15,34,35,18,89,40,30,90,91,28,92,93,26,27,46]))),sa=x.lazy(()=>_(()=>import("./config-navigation-D8OXRCt9.js"),__vite__mapDeps([94,2,1,4,5,6,7,8,9,10,11,69,78,95,96,47,97,19,20,21,54,98,55,56,90,28,3,32,39,40,30,41,42,43,44]))),ia=x.lazy(()=>_(()=>import("./index-CZiEDWpM.js"),__vite__mapDeps([99,1,2,6,5,9,4,7,8,10,11,46,100,101,67,76,54,102,103,70,28,31,93,39,104,61,51]))),aa=x.lazy(()=>_(()=>import("./index-B8KTykXs.js"),__vite__mapDeps([105,4,2,1,5,6,7,8,9,10,11,47,104,61,84,85,66,31,35,106,46]))),ca=x.lazy(()=>_(()=>import("./security-DLgKehuW.js"),__vite__mapDeps([107,4,2,1,5,6,7,8,9,10,11,47,97,19,20,21,108,46]))),la=x.lazy(()=>_(()=>import("./branding-Da8E_HdC.js"),__vite__mapDeps([109,2,1,4,5,6,7,8,9,10,11,110,69,95,111,85,112,79,22,20,19,21,113,84]))),ua=x.lazy(()=>_(()=>import("./advanced-C40fcsMj.js"),__vite__mapDeps([114,2,1,9,4,5,6,7,8,10,11,22,20,32,28,41,84,85,23,19,21,31,18,68,69]))),da=x.lazy(()=>_(()=>import("./traffic-h7MLT42d.js").then(e=>e.t),__vite__mapDeps([89,2,9,1,4,5,6,7,8,10,11,40,30,90,91,28,92,93,26,27]))),fa=x.lazy(()=>_(()=>import("./runtime-CYnDo-HU.js"),__vite__mapDeps([115,2,1,4,5,6,7,8,9,10,11,101,92,93,12,3,28,32,39,20,19,21,40,30,41,42,43,44]))),pa=x.lazy(()=>_(()=>import("./index-DAg_a68C.js"),__vite__mapDeps([116,2,1,4,5,6,7,8,28,15,9,10,11,75,18,34,35,19,20,21,24,25,26,27,32,23,67,60,22,12,37,46,48]))),ma=x.lazy(()=>_(()=>import("./list-DgH58u4D.js"),__vite__mapDeps([117,2,4,1,5,6,7,8,15,9,10,11,40,30,17,19,20,21,47,24,25,26,27,50,23,60,32,28,75,18,34,35,37,48,46]))),ha=x.lazy(()=>_(()=>import("./index-CE07Exux.js"),__vite__mapDeps([118,2,4,1,5,6,7,8,9,10,11,54,48,46,19,20,21]))),ga=x.lazy(()=>_(()=>import("./config-Dh0hZZiY.js"),__vite__mapDeps([119,2,1,6,5,21,9,4,7,8,10,11,84,85,112,111,79,57,39,58,95,120,28]))),xa=x.lazy(()=>_(()=>import("./observability-DVi-zwiF.js"),__vite__mapDeps([121,1,2]))),ba=x.lazy(()=>_(()=>import("./playground-CveQRqPB.js"),__vite__mapDeps([122,1,2]))),ya=x.lazy(()=>_(()=>import("./component-CYmSwtxC.js"),__vite__mapDeps([123,1,2,5,4,6,7,8,9,10,11,28,104,61,22,20,91,96,26,56,110,69,95,23,76,124,59,60,32,39,18,57,125,126,53,103,70,54,85,127,77,78,112,113,86,62,63,120,3,31,73,46,128,102,100,101,67,129,130,80,90,12,37,19,21,40,30,41,42,43,44]))),va=x.lazy(()=>_(()=>import("./index-CwdidKu0.js"),__vite__mapDeps([131,1,2,4,5,6,7,8,9,10,11]))),Sa=ee(P.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),wa=e=>{const{enqueueSnackbar:t}=en(),n=x.useCallback(o=>Lr(Sa,{id:o.id,severity:o.severity||"all",componentDid:o.source==="system"?"system":o.componentDid||"all"}),[]);Ir(`${e}/${P.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,o=>{const r=n(o),{severity:s,description:i}=o||{},c=["error","warning"].includes(s)||o.sticky;o.source==="system"&&t(i,{variant:s,autoHideDuration:c?null:5e3,content:l=>a.jsx(rs,{viewAllUrl:r,keyId:l,notification:o,content:a.jsx(Ur,{notification:o,minimal:!0,rows:0})})})},[],"user")};function oo({blocklet:e,isAdmin:t}){return t?a.jsx(ra,{blocklet:e}):a.jsx(Dr,{status:403})}oo.propTypes={blocklet:S.object.isRequired,isAdmin:S.bool.isRequired};const ja=e=>{const{t}=B(),{blocklet:n,actions:{refreshBlocklet:o},client:r,did:s}=de(),i=n?.meta?.did,c=!n||_r(n.status)?[]:M.getAppMissingConfigs(n),l={overview:[{label:t("common.overview"),value:"overview"},{label:a.jsx(qo,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!c.length,children:t("common.components")}),value:"components"}],"did-connect":[{label:t("common.members"),value:"members"},{label:t("team.member.passports"),value:"passports"},{label:t("common.setting"),value:"settings"},{label:t("common.security"),value:"security"},{label:t("oauth.client.tab"),value:"oauth"}],aigne:[{label:t("setup.aigne.config"),value:"aigne-config"}],website:[{label:t("common.domains"),value:"domains"},{label:t("common.branding"),value:"branding"},{label:t("common.theming"),value:"theming"},{label:t("common.navigation"),value:"navigation"}],operations:[{label:t("common.notificationRecords"),value:"notifications",show:e},{label:t("common.analytics"),value:"analytics"},{label:t("common.auditLogs"),value:"audit-logs"},{label:t("common.advancedConfig"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:t("common.accessKeys"),value:"access-keys"},{label:t("common.mcpServers"),value:"mcp-servers"}],developers:[{label:t("common.logs"),value:"logs",show:n?.children?.length&&n.structVersion===P.APP_STRUCT_VERSION},{label:t("common.performance"),value:"performance"},{label:t("common.docs"),value:"docs"}]},u={overview:Yi,components:ya,members:a.jsx(Zi,{type:"blocklet",createPassportSvg:Lt}),passports:a.jsx(ta,{createPassportSvg:Lt}),settings:a.jsx(aa,{orientation:"vertical"}),security:a.jsx(ca,{}),"did-spaces":a.jsx(ia,{navOrientation:"horizontal"}),domains:ea,branding:a.jsx(la,{blocklet:n,onUpdate:o}),theming:a.jsx(na,{}),navigation:sa,sitemap:a.jsx(yo,{children:t("common.comingSoon")}),notifications:a.jsx(oo,{blocklet:n,isAdmin:e}),"audit-logs":a.jsx(oa,{scope:i,categories:["blocklet","team","security","certificates","gateway"]}),analytics:a.jsx(da,{client:r,did:s}),advanced:a.jsx(ua,{blocklet:n,onUpdate:o}),webhooks:a.jsx(Xi,{}),"access-keys":a.jsx(pa,{}),"mcp-servers":a.jsx(ha,{}),logs:Qi,performance:a.jsx(fa,{client:r,did:s}),docs:va,publish:a.jsx(Ji,{}),oauth:a.jsx(ma,{}),"aigne-config":a.jsx(I,{sx:{maxWidth:1536},children:a.jsx(ga,{})}),"aigne-observability":a.jsx(xa,{}),"aigne-playground":a.jsx(ba,{})};return{tabGroups:l,renders:u}};function Ca(){const e=cn(),{tab:t="overview",subtab:n}=Go(),{blocklet:o,refreshFlag:r}=de(),{session:s}=dn(),i=Le(()=>s?.user?.did,[s]),c=Vr(),l=Le(()=>s.user?.role&&Er.includes(s.user.role),[s]);wa(i);const{tabGroups:u,renders:d}=ja(l),p=m=>{e(`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${m}`)},f=(u[t]||[]).filter(m=>m.show===void 0||m.show),v=(f||[]).find(m=>m.value===n)?.value||f?.[0]?.value||t,g=d[v]||d.overview,h=["overview"].includes(t),C=o?a.jsxs(hn,{type:"components",children:[f.length>0&&a.jsxs(I,{sx:{mb:2,display:"flex",alignItems:"center",gap:2},children:[a.jsx(bo,{tabs:f,current:v,onChange:p,scrollButtons:"auto"}),h&&!c&&a.jsx(I,{sx:{flex:1,display:"flex",justifyContent:"flex-end"},children:a.jsx(I,{component:"div",className:"page-header",children:o?a.jsx(Ot,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:m}={})=>{m&&$.error(m.message)},variant:"group"}):null})})]}),a.jsx(I,{className:"page-content",children:a.jsx(x.Suspense,{fallback:a.jsx(Te,{relative:"parent",children:a.jsx(H,{})}),children:x.isValidElement(g)?g:a.jsx(g,{blocklet:o})})})]}):a.jsx(Te,{relative:"parent",children:a.jsx(H,{})});return a.jsx(kr,{children:a.jsx(Nr,{children:a.jsx(no,{children:a.jsxs(ka,{children:[c&&h&&a.jsx(I,{component:"div",className:"page-header",sx:{mb:2},children:o?a.jsx(Ot,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:m}={})=>{m&&$.error(m.message)},variant:"group"}):null}),a.jsx(Zr,{}),a.jsx(Gi,{}),C]})},`${r}`)})})}function Ea(){const{blocklet:e}=de(),{t}=B(),n=e?.meta?.did;return x.useEffect(()=>{const o=jr();return n&&o.connect(),()=>{n&&o.isConnected()&&o.disconnect()}},[n]),a.jsxs(a.Fragment,{children:[a.jsx(Cr,{children:a.jsx("title",{children:t("pageTitle.dashboard")})}),a.jsx(Ca,{})]})}const ka=Oe.main`
|
|
65
|
-
.page-header {
|
|
66
|
-
display: flex;
|
|
67
|
-
justify-content: space-between;
|
|
68
|
-
align-items: center;
|
|
69
|
-
flex-wrap: wrap;
|
|
70
|
-
gap: 16px;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.page-title {
|
|
74
|
-
display: flex;
|
|
75
|
-
align-items: center;
|
|
76
|
-
|
|
77
|
-
.page-link {
|
|
78
|
-
font-size: 15px;
|
|
79
|
-
margin-top: 8px;
|
|
80
|
-
margin-left: 8px;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
85
|
-
.page-header {
|
|
86
|
-
flex-direction: column;
|
|
87
|
-
align-items: flex-start;
|
|
88
|
-
.page-actions,
|
|
89
|
-
.MuiButtonGroup-root {
|
|
90
|
-
width: 100%;
|
|
91
|
-
}
|
|
92
|
-
.MuiButtonGroup-root {
|
|
93
|
-
.MuiButtonBase-root {
|
|
94
|
-
flex: 1;
|
|
95
|
-
}
|
|
96
|
-
.blocklet-action-text {
|
|
97
|
-
display: none;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.page-title {
|
|
103
|
-
margin-bottom: 15px;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
`,Wa=Object.freeze(Object.defineProperty({__proto__:null,default:Ea},Symbol.toStringTag,{value:"Module"}));export{qi as B,eo as F,to as W,J as b,Wa as d,Xn as p,qa as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m}from"./vendor-react-Dvs43sk9.js";import{T as n}from"./vendor-ux-CUBj5GXM.js";import{a1 as p,U as l,a3 as c,f as u}from"./index-FrAYP-A_.js";import{a as x,b as d}from"./domain-action-card-2vqk_Ni_.js";import{j as t,ak as k,b1 as f,aX as h}from"./vendor-mui-core-CcrDM-5l.js";import"./vendor-utils-BOkrEpKO.js";import"./vendor-hooks-DTeIFVkk.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BnbwP1kf.js";import"./useSetState-DFuQZPPV.js";import"./permission-w0BesrB_.js";import"./session-Ci_4G0CP.js";import"./dot-BaR-8Dj-.js";import"./useAsync-BdgUavMa.js";import"./confirm-CXK9v894.js";import"./index-DBs9Ljax.js";import"./actions-DvIZNF27.js";import"./delete-confirm-CpZStjie.js";import"./click-to-copy-C43vd7DG.js";import"./useAsync-DgPr_To1.js";import"./index-DEDOywis.js";import"./util-Bgqx2flh.js";import"./engine-Ch-5kOUZ.js";function z(){const{blocklet:o,actions:{updateBlockletDomainAliases:i}}=p(),{inService:r}=l(),{t:e}=n(),a=m.useMemo(()=>{let s=!0;return c(o)&&(s=s&&r),s},[r,o]);return t.jsxs(k,{component:f,sx:{gap:3,maxWidth:820},children:[t.jsxs(t.Fragment,{children:[u.isAccessible(o.status)===!1&&t.jsx(h,{severity:"warning",children:e("blocklet.router.noRunning")}),a&&t.jsx(x,{blocklet:o,updateBlockletDomainAliases:i,connectDomainProps:{shouldCheckDomain:!0}})]}),t.jsx(d,{showAllDomains:!0,updateBlockletDomainAliases:i})]})}export{z as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{W as e}from"./index-FrAYP-A_.js";var i=e();export{i as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{K as t}from"./index-FrAYP-A_.js";import{H as e}from"./vendor-ux-CUBj5GXM.js";function c(...o){try{return t(...o)}catch(r){throw e.error("Invalid redirect url"),console.error("Invalid redirect url",r),r}}export{c as g};
|