@abtnode/blocklet-services 1.17.4-beta-20251204-080001-08643fbe → 1.17.4-beta-20251205-104405-28838df1
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/middlewares/verify-sig.js +29 -10
- package/dist/assets/{AdapterDayjs-BuAhqT20.js → AdapterDayjs-DEl3BogQ.js} +1 -1
- package/dist/assets/{Google-Dp7qGnxg.js → Google-FE-PKKgg.js} +1 -1
- package/dist/assets/{access-control-D1ovo6-o.js → access-control-DOpkbifA.js} +1 -1
- package/dist/assets/{add-component-core-BIhDwpuV.js → add-component-core-wpc1J2BH.js} +1 -1
- package/dist/assets/{add-resource-C4TkG7UD.js → add-resource-CslAO771.js} +1 -1
- package/dist/assets/{addon-DAMRKj2r.js → addon-DdNYGDp4.js} +1 -1
- package/dist/assets/{advanced-BPAoOjLm.js → advanced-QWXBTgpB.js} +1 -1
- package/dist/assets/{aigne-B6ByRL09.js → aigne-DoudzB_0.js} +1 -1
- package/dist/assets/api-uGeIZn4a.js +1 -0
- package/dist/assets/{appearance-EkIyryBQ.js → appearance-C--T1yEy.js} +1 -1
- package/dist/assets/ar-Cwm1-0yA.js +7 -0
- package/dist/assets/{arrow-down.svg-Cn1jfZom.js → arrow-down.svg-BE-0knfW.js} +1 -1
- package/dist/assets/{audit-logs-C9C7P-Sv.js → audit-logs-CBGJi3D2.js} +1 -1
- package/dist/assets/{authorize-DrmC8YuR.js → authorize-QdLwmrZR.js} +1 -1
- package/dist/assets/{base-chart-DJyGks5q.js → base-chart-CcNdwghd.js} +1 -1
- package/dist/assets/{base32-CnxuWLTI.js → base32-eAS52qli.js} +1 -1
- package/dist/assets/{bind-account-BBEcbwvl.js → bind-account-D5vP44eh.js} +1 -1
- package/dist/assets/{branding-BznRcuN9.js → branding-B0sUWGQz.js} +1 -1
- package/dist/assets/branding-De5qPtGR.js +1 -0
- package/dist/assets/{branding-ChfGbwwx.js → branding-_1kxBl_k.js} +1 -1
- package/dist/assets/{bundle-avatar-DGFHJNB_.js → bundle-avatar-32N3x3xU.js} +1 -1
- package/dist/assets/{button-pTTwNqRf.js → button-DqhIB3De.js} +1 -1
- package/dist/assets/{click-to-copy-CAd3nEo4.js → click-to-copy-BuSTGPjJ.js} +1 -1
- package/dist/assets/{cloneDeep-B7kH4W7U.js → cloneDeep-DHlHhGOY.js} +1 -1
- package/dist/assets/{complete-DGRt8hbz.js → complete-Dow8rsOd.js} +1 -1
- package/dist/assets/{component-7HXhlkqA.js → component-BAz0O6p3.js} +57 -57
- package/dist/assets/{config-jsIGlbhn.js → config-CpjVTk_0.js} +1 -1
- package/dist/assets/{config-hYngbDX9.js → config-CzKzlfrL.js} +5 -5
- package/dist/assets/{config-De0LSoek.js → config-S1ErpcbM.js} +1 -1
- package/dist/assets/{config-navigation-Dnu_lIYd.js → config-navigation-CDLoKHDM.js} +3 -3
- package/dist/assets/{config-space-Cjm8zHqm.js → config-space-BywO8K6k.js} +1 -1
- package/dist/assets/{confirm-g44rz8hw.js → confirm-CsXep4ZX.js} +1 -1
- package/dist/assets/{connect-DiOZmi5p.js → connect-BVziqmk-.js} +1 -1
- package/dist/assets/{connect-CdDqD7_5.js → connect-Dg3BjAlC.js} +1 -1
- package/dist/assets/{connect-to-Bi5k3ZXU.js → connect-to-DvsUYNJv.js} +1 -1
- package/dist/assets/{create-passport-svg-BLBQxsEK.js → create-passport-svg-CIUyZVGt.js} +1 -1
- package/dist/assets/{createClass-mqcDPFI4.js → createClass-C4n9PQtV.js} +1 -1
- package/dist/assets/dashboard-CL6mI9qw.js +106 -0
- package/dist/assets/de-XQM4sDLo.js +7 -0
- package/dist/assets/{delete-confirm-Cw0wPOzJ.js → delete-confirm-BSzvSp8_.js} +1 -1
- package/dist/assets/{did-address-BOsJWqi1.js → did-address-j4poFq12.js} +1 -1
- package/dist/assets/{domain-BpCcezRq.js → domain-CNIwNykZ.js} +1 -1
- package/dist/assets/{domain-action-card-FG12ETj5.js → domain-action-card-BWxruxm4.js} +1 -1
- package/dist/assets/domains-CYSnteZ-.js +1 -0
- package/dist/assets/{email-DmAbJJ8K.js → email-BUE0xhg8.js} +1 -1
- package/dist/assets/engine-D_YTKCbf.js +1 -0
- package/dist/assets/es-D4zFwVhj.js +9 -0
- package/dist/assets/{exchange-passport-C3TLdHrh.js → exchange-passport-B_YUy8xg.js} +1 -1
- package/dist/assets/{form-BGvxztTN.js → form-C3lQx0_f.js} +1 -1
- package/dist/assets/{form-text-input-BFJU5Psq.js → form-text-input-Sp9mVO8Z.js} +1 -1
- package/dist/assets/fr-BQXlmrTL.js +7 -0
- package/dist/assets/{fuel-BHnBcNst.js → fuel-8vtXn14o.js} +1 -1
- package/dist/assets/{gen-access-key-DMekoh9G.js → gen-access-key-Cv0mVir2.js} +1 -1
- package/dist/assets/{gen-simple-access-key-CKo8-San.js → gen-simple-access-key-CG7rkGCK.js} +1 -1
- package/dist/assets/get-safe-url-DB8WYPm8.js +1 -0
- package/dist/assets/hi-Cdz2GskJ.js +5 -0
- package/dist/assets/{home-Disgh1zw.js → home-Da9sD5LZ.js} +1 -1
- package/dist/assets/id-Q9i8FdSt.js +7 -0
- package/dist/assets/{iframe-DWt09ONv.js → iframe-BOu2WQ8Y.js} +1 -1
- package/dist/assets/{index-Cbz9zwoD.js → index-9EeZkpuz.js} +1 -1
- package/dist/assets/index-B3lpnLC0.js +1 -0
- package/dist/assets/{index-C3cD5fjJ.js → index-B7Hwfql4.js} +1 -1
- package/dist/assets/{index-B87ktLq-.js → index-BHyRI_gV.js} +1 -1
- package/dist/assets/{index-BnfJXuxc.js → index-BO-5QIwf.js} +1 -1
- package/dist/assets/{index-CG-mH6e1.js → index-BmFAdUmE.js} +2 -2
- package/dist/assets/{index-DA2Pny4B.js → index-BnOhhAn2.js} +1 -1
- package/dist/assets/{index-CwAM1jrM.js → index-BpulWIIa.js} +1 -1
- package/dist/assets/{index-DxaRhCwJ.js → index-ByefI9hC.js} +1 -1
- package/dist/assets/{index-DxQFjZlw.js → index-BzDzFVcf.js} +2 -2
- package/dist/assets/{index-CPDkpfNV.js → index-C5-jy29d.js} +1 -1
- package/dist/assets/{index-D5tCTUjA.js → index-CC4kGiqP.js} +1 -1
- package/dist/assets/{index-CSfyeeXh.js → index-CEbTLr_A.js} +1 -1
- package/dist/assets/{index-BIJNkmLb.js → index-CJ1z6qNA.js} +1 -1
- package/dist/assets/{index-Dgb4cDcB.js → index-CJongjoV.js} +1 -1
- package/dist/assets/{index-C_W4n3wb.js → index-CVclk1-n.js} +1 -1
- package/dist/assets/{index-Duu9lR4r.js → index-CY8CdteZ.js} +1 -1
- package/dist/assets/{index-Cke5eCl6.js → index-Cmd4UiOo.js} +1 -1
- package/dist/assets/{index-fJzIwqxQ.js → index-CzTPIbVu.js} +1 -1
- package/dist/assets/{index--6oAMl0L.js → index-DFfEr4If.js} +1 -1
- package/dist/assets/{index-bb9HF7R1.js → index-DQCqwXpW.js} +1 -1
- package/dist/assets/{index-Hh69Xj8u.js → index-DSbS9vii.js} +2 -2
- package/dist/assets/{index-CJ1a35hD.js → index-DdXkI8FK.js} +1 -1
- package/dist/assets/{index-CYxU-iOV.js → index-DiNmJxr2.js} +1 -1
- package/dist/assets/{index-gy2ZIEt_.js → index-DkaI7B4e.js} +1 -1
- package/dist/assets/{index-EH5vv2Ba.js → index-d0ayyNAl.js} +3 -3
- package/dist/assets/{index-Cx5JU0Ln.js → index-jPmRCtiq.js} +7 -7
- package/dist/assets/{index-BC_wNmTA.js → index-o-_irE6S.js} +1 -1
- package/dist/assets/{index-7uZYu-Ep.js → index-y-XalrLG.js} +1 -1
- package/dist/assets/{index-Ca4Ccmqm.js → index-ySP_m_Ux.js} +1 -1
- package/dist/assets/{index-k8gDRcJR.js → index-z0V_qaSH.js} +1 -1
- package/dist/assets/{invitation-C9uUexLK.js → invitation-Dr0R_Zm3.js} +1 -1
- package/dist/assets/{invitations-sELORD_h.js → invitations-DgB-ff90.js} +1 -1
- package/dist/assets/{invite-CXR3ZLRS.js → invite-DM8gXHE_.js} +1 -1
- package/dist/assets/{isURL-CohjRVvR.js → isURL-CTWDUgGm.js} +1 -1
- package/dist/assets/{issue-passport-q8H-mSA2.js → issue-passport-5xsfQh4x.js} +1 -1
- package/dist/assets/{item-BIqA21iq.js → item-B7J3-doM.js} +1 -1
- package/dist/assets/ja-CH8WZngC.js +9 -0
- package/dist/assets/ko-Nli9PwTV.js +9 -0
- package/dist/assets/{landing-page-DgPDUi6Y.js → landing-page-D5rNUC4m.js} +1 -1
- package/dist/assets/{layout-Cr6KApqq.js → layout-Dqc1Rw-q.js} +1 -1
- package/dist/assets/{list-DaqruRvJ.js → list-Dm7-Jiww.js} +1 -1
- package/dist/assets/{list-DZKko9y8.js → list-uwVz32FG.js} +1 -1
- package/dist/assets/localization-ByyQzA4g.js +1 -0
- package/dist/assets/{log-DwPeERno.js → log-DmRGsyT9.js} +17 -17
- package/dist/assets/logger-Du6zTrGC.js +1 -0
- package/dist/assets/{login-Fd_qnrRk.js → login-DVxbUkmV.js} +1 -1
- package/dist/assets/{login-oauth-callback-BWKfq40w.js → login-oauth-callback-D3NWzIdd.js} +1 -1
- package/dist/assets/{logo-uploader-_reea4L6.js → logo-uploader-Bs_7E0-m.js} +1 -1
- package/dist/assets/{lost-passport-DmkXn2Nz.js → lost-passport-DR_9dtm9.js} +1 -1
- package/dist/assets/{omit-W13eVnqC.js → omit-CpvduH4b.js} +1 -1
- package/dist/assets/{open-window-DCReXykr.js → open-window-n4P49X8a.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-Bsp5V3AP.js → over-due-invoice-payment-C-ZuUAsL.js} +1 -1
- package/dist/assets/{overview-CXMCgIAo.js → overview-Tdx-8ilS.js} +3 -3
- package/dist/assets/passport-DnUeoVIR.js +1 -0
- package/dist/assets/{passport-item-CEM3FQ2i.js → passport-item-DAeIvzgs.js} +1 -1
- package/dist/assets/{permission-G7gi0qR2.js → permission-iIDMQlq_.js} +1 -1
- package/dist/assets/{preferences-DalbRqbk.js → preferences-RXCdhC2X.js} +1 -1
- package/dist/assets/profile-embed-xkS3CrGD.js +1 -0
- package/dist/assets/pt-eVksFEJb.js +5 -0
- package/dist/assets/{publish-resource-BqB_XJ-d.js → publish-resource-CcexZ4v9.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-Clor-N66.js → react-beautiful-dnd.esm-DFHKVO-K.js} +1 -1
- package/dist/assets/ru-ycnIgUGb.js +5 -0
- package/dist/assets/runtime-DeZdhum6.js +1 -0
- package/dist/assets/{sanitize-Bm63FeNh.js → sanitize-CdfxCSD9.js} +1 -1
- package/dist/assets/sdk-DxKHN0C9.js +1 -0
- package/dist/assets/{security-CnSkbe_3.js → security-C6PwatSL.js} +1 -1
- package/dist/assets/{session-CAOgTWka.js → session-L__eR8rN.js} +1 -1
- package/dist/assets/{setup-B6xOe2m-.js → setup-C6HhC4jt.js} +1 -1
- package/dist/assets/{simple-select-Cg51s1gv.js → simple-select-CxoXsQVr.js} +1 -1
- package/dist/assets/{spaces-3bFBxoYi.js → spaces-24WmguiI.js} +1 -1
- package/dist/assets/{start-CkQJJ_tn.js → start-CEgdy1zB.js} +1 -1
- package/dist/assets/{starting-progress-C1yUqqL2.js → starting-progress-BoRrvgWe.js} +1 -1
- package/dist/assets/{status-6KTOVV9E.js → status-viNRhemG.js} +1 -1
- package/dist/assets/{step-actions-DHdqImlg.js → step-actions-C_mNllFC.js} +1 -1
- package/dist/assets/{studio-B65PiAI_.js → studio-CH0XVaW0.js} +1 -1
- package/dist/assets/{switch-CjOUxynL.js → switch-D2wksu-s.js} +1 -1
- package/dist/assets/{switch-control-BFsTsyuN.js → switch-control-D-yLpfsT.js} +1 -1
- package/dist/assets/{table-tips-EHWVzPWe.js → table-tips-sMVI7VOu.js} +1 -1
- package/dist/assets/{team-CG74iq-4.js → team-Caq5y5Xs.js} +1 -1
- package/dist/assets/th-BvLhxkpi.js +5 -0
- package/dist/assets/{traffic-Cyi-eL2B.js → traffic-KlkugfEB.js} +1 -1
- package/dist/assets/{transfer-BNHZEvsT.js → transfer-CXj22i68.js} +1 -1
- package/dist/assets/{unsubscribe-DmlsM6iA.js → unsubscribe-Bm4Jw2Kh.js} +1 -1
- package/dist/assets/{use-app-logo-BAJtA-EN.js → use-app-logo-C_3MNDVC.js} +1 -1
- package/dist/assets/{use-window-close-Bo92fPIm.js → use-window-close-CgevJhno.js} +1 -1
- package/dist/assets/{useAsync-Cc-dQGZL.js → useAsync-BCC9JxQR.js} +1 -1
- package/dist/assets/{useAsync-Be4McwD-.js → useAsync-P_Velqz1.js} +1 -1
- package/dist/assets/{useAsyncRetry-a2Wewn3F.js → useAsyncRetry-LJm0Fhbe.js} +1 -1
- package/dist/assets/{useLocalStorage-BBhMedc2.js → useLocalStorage-6wbaKET6.js} +1 -1
- package/dist/assets/{user-center-CNFpJssw.js → user-center-eZZBxCnH.js} +2 -2
- package/dist/assets/{user-follower-BsFDOo99.js → user-follower-udSlTR0u.js} +1 -1
- package/dist/assets/{util-B41ySVcQ.js → util-9a6OMNK7.js} +1 -1
- package/dist/assets/{util-DkhTntVV.js → util-BQfBCQq1.js} +1 -1
- package/dist/assets/{vendor-arcblock-BL_VyzmH.js → vendor-arcblock-D8WYBDYe.js} +1 -1
- package/dist/assets/{vendor-hooks-fhL5FJET.js → vendor-hooks-PN9SWiQm.js} +1 -1
- package/dist/assets/{vendor-utils-BSZ4yJws.js → vendor-utils-BgSaqjGx.js} +1 -1
- package/dist/assets/{vendor-ux-D507n6h6.js → vendor-ux-r9bApERu.js} +2 -2
- package/dist/assets/vi-BmM-09Iq.js +5 -0
- package/dist/assets/{wait-connect-48vXA6Ey.js → wait-connect-D-anNiug.js} +1 -1
- package/dist/assets/{wizard-BwJoQAJL.js → wizard-DnHSYuTP.js} +1 -1
- package/dist/assets/{wizard-components-C4msLQny.js → wizard-components-C6KwiiLp.js} +1 -1
- package/dist/assets/wrap-locale--xtBp5yb.js +1 -0
- package/dist/assets/{zh-DZI4Yy2m.js → zh-BkVzTN9N.js} +2 -2
- package/dist/assets/{zh-BNKpRkuo.js → zh-Djej3j0D.js} +1 -1
- package/dist/assets/zh-tw-CW4J6ddt.js +9 -0
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +24 -24
- package/dist/assets/api-DIucIOLX.js +0 -1
- package/dist/assets/ar-C89Z16Ql.js +0 -7
- package/dist/assets/branding-GuXEK2Lx.js +0 -1
- package/dist/assets/dashboard-Bcb81CDA.js +0 -106
- package/dist/assets/de-BsCDrfBl.js +0 -7
- package/dist/assets/domains-Cgl-LcPh.js +0 -1
- package/dist/assets/engine-BXpJ8aB3.js +0 -1
- package/dist/assets/es-BJh_XsEm.js +0 -9
- package/dist/assets/fr-DRJMwn7V.js +0 -7
- package/dist/assets/get-safe-url-DHtEly1m.js +0 -1
- package/dist/assets/hi-h-9Yl5g9.js +0 -5
- package/dist/assets/id-BDWggRsa.js +0 -7
- package/dist/assets/index-DLvroCDC.js +0 -1
- package/dist/assets/ja-R9EF3xbB.js +0 -9
- package/dist/assets/ko-C_QLPZyk.js +0 -9
- package/dist/assets/localization-B72YTR3I.js +0 -1
- package/dist/assets/logger-CjpdOowp.js +0 -1
- package/dist/assets/observability-SEfRhcXj.js +0 -1
- package/dist/assets/passport-Dsw-sETA.js +0 -1
- package/dist/assets/playground-Bo63Spph.js +0 -1
- package/dist/assets/profile-embed-CQgwIw3w.js +0 -1
- package/dist/assets/pt-DpYO8djd.js +0 -5
- package/dist/assets/ru-DkZtar3s.js +0 -5
- package/dist/assets/runtime-k8xPJwHr.js +0 -1
- package/dist/assets/sdk-BLKW-lxg.js +0 -1
- package/dist/assets/th-04iX5CrT.js +0 -5
- package/dist/assets/vi-kOP0E9Ga.js +0 -5
- package/dist/assets/wrap-locale-D5uKJYzr.js +0 -1
- package/dist/assets/zh-tw-BLapUUeq.js +0 -9
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,u as c}from"./vendor-ux-r9bApERu.js";const s=e("blocklet-services");c("blocklet-services");export{s as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,ak as p,T as I,W as r,am as O,Q,bO as pe,a6 as fe}from"./vendor-mui-core-BPQ6AEW_.js";import{f as ge,a as ue,b as me,h as he}from"./vendor-hooks-
|
|
1
|
+
import{j as e,ak as p,T as I,W as r,am as O,Q,bO as pe,a6 as fe}from"./vendor-mui-core-BPQ6AEW_.js";import{f as ge,a as ue,b as me,h as he}from"./vendor-hooks-PN9SWiQm.js";import{r as X,i as we}from"./vendor-react-CUXIiAnY.js";import{a as xe,a8 as ye,R as ke,c as _,au as Pe,H as $,s as je,av as ve,b as be,a2 as B,aw as Te,ax as Ie}from"./index-jPmRCtiq.js";import{C as A,b as R,J as Ce,c as Le}from"./vendor-utils-BgSaqjGx.js";import{o as _e}from"./vendor-arcblock-D8WYBDYe.js";import{$ as Re,e as We,V as G,B as M,d as Ae,C as Ee,D as Ne,H as V,y as Se,F as z}from"./vendor-ux-r9bApERu.js";import{u as Ue}from"./use-passport-id-B-b-_oYF.js";import{g as J}from"./get-safe-url-DB8WYPm8.js";import{d as W}from"./logger-Du6zTrGC.js";import"./lottie-web-4koyQiv_.js";function Y({blocklet:c=window.blocklet}){return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between"},children:[e.jsx(Re,{variant:"rounded",shape:"square",did:c.appPid,src:c.appLogo,size:80}),e.jsx(I,{component:"h2",variant:"h6",children:c.appName}),e.jsx(We,{did:c.appPid})]})}const De=X.memo(Y);Y.propTypes={blocklet:r.shape({appName:r.string,appLogo:r.string,appPid:r.string})};const qe=()=>window.blocklet?.componentMountPoints?.find(s=>s.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint;function Z({children:c=null,cta:s=null,...i}){return e.jsxs(p,{...i,children:[c?e.jsx(p,{sx:{maxHeight:"50vh",overflow:"hidden",position:"relative",":after":{content:'""',position:"absolute",left:0,right:0,bottom:0,height:"80%",background:"linear-gradient(transparent, #fff 85%)"}},children:c}):null,s?e.jsx(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",py:4,borderRadius:2},children:s}):null]})}Z.propTypes={children:r.node,cta:r.node};function ee({passports:c=[],onConnect:s=()=>{},redirect:i,...y}){const{t:f}=G(),k=qe(),P=a=>{const m=a?.payable;return k&&m?A(k,`/api/redirect/checkout/${m}?redirect=${i}`):null};return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minHeight:"100vh",maxWidth:"400px",margin:"auto",paddingBottom:{sx:0,md:15}},children:[e.jsx(De,{}),e.jsx(Z,{...y,cta:e.jsxs(e.Fragment,{children:[e.jsx(I,{variant:"h4",sx:{mx:2,textAlign:"center",fontWeight:"bold",color:"warning.main"},children:f("login.accessLimit.title")}),e.jsx(I,{variant:"body1",sx:{maxWidth:620,mt:2,mx:2,textAlign:"center",color:"gray"},children:f("login.accessLimit.description")}),e.jsx(p,{sx:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:1,mt:5},children:c?.map(a=>{const m=P(a);return m?e.jsx(O,{title:f("login.accessLimit.buyPassport"),arrow:!0,placement:"top",children:e.jsx(Q,{color:"primary",variant:"contained",endIcon:e.jsx(pe,{}),href:m,target:"_blank",children:a.title||a.name})},a.name):e.jsx(O,{title:f("login.connectWithPassport"),arrow:!0,placement:"top",children:e.jsx(Q,{color:"inherit",variant:"contained",onClick:s,children:a.title||a.name})},a.name)})}),e.jsxs(I,{variant:"body1",sx:{mt:2,color:"grey.400"},children:[e.jsx(p,{component:"span",sx:{display:"inline-block",mr:1},children:f("login.accessLimit.alreadyHavePassport")}),e.jsx(p,{component:"span",sx:{textDecoration:"underline",cursor:"pointer",color:"primary.main"},onClick:s,children:f("common.connect")})]})]})})]})}ee.propTypes={passports:r.arrayOf(r.shape({name:r.string.isRequired,title:r.string,payable:r.string})),onConnect:r.func,onClose:r.func,redirect:r.string.isRequired};function Xe(){const c=X.useRef(null),{session:s}=xe(),{t:i,locale:y}=G(),{getPassportId:f}=Ue(),k=we(),P=M(),a=Ae(),{encryptKey:m,decrypt:ne}=ye(),j=ge(s),{searchParams:o}=new URL(window.location.href),h={passportId:f()},E=o.get("componentId"),N=o.get("authenticated"),te=o.get("sessionToken"),oe=o.get("csrfToken"),ie=o.get("refreshToken"),se=o.get("requiredRoles"),g=o.get("redirect"),d=o.get("forceConnected"),v=o.get("sourceAppPid"),C=o.get("origin"),S=o.get("autoConnectWebview"),U=o.get("popup"),D=o.get("showQuickConnect");let w=o.get("inviter");if(!w&&g)try{w=(g.startsWith("http")?new URL(g):new URL(g,window.location.origin)).searchParams.get("inviter")}catch{}w=w||localStorage.getItem("inviter"),E&&(h.componentId=E),P&&(h.visitorId=P),w&&(h.inviter=w),Le(v)||(v==="null"?h.sourceAppPid=null:v!==null&&(h.sourceAppPid=v));let q=[];try{q=JSON.parse(se)}catch{}const re=async n=>{const t=o.get("fromWallet");W("login page notifyWallet",{data:n,fromWallet:t,"browser.wallet":a.wallet}),n&&String(t)==="1"&&a.wallet&&await Promise.any([z.asyncCall("arcSetToken",n),B(3e3)])},b=n=>n&&(o.get("encrypted")?ne(n):n),H=async n=>{n&&await re(n),setTimeout(()=>{if(g){const t=decodeURIComponent(g);t.startsWith(_.WELLKNOWN_SERVICE_PATH_PREFIX)?k(t,{replace:!0}):window.location.replace(J(t))}else window.location.replace(window.env.pathPrefix||"/")},50)},ce=n=>{const t={did:n.user.did,host:window.location.host,appPid:window.blocklet.appPid,visitorId:M(),sourceAppPid:n.user.sourceAppPid,fullName:n.user.fullName};W("bridge callArc: onLogin",t),z.callArc("onLogin",t)},F=async(n,t)=>{const L=t(n.csrfToken),T=t(n.sessionToken),x=t(n.refreshToken),u=t(n.visitorId);W("login page onLogin",{result:n,decodeSessionToken:T,decodeRefreshToken:x,decodeVisitorId:u}),je(T),ve(L),be(x),n.visitorId&&Se(u),await s.refresh(),await B(100),ce(j.current);const l={};o.get("saveConnect")?(l.connected_did=j.current.user.did,l.connected_pk=j.current.user.pk,l.connected_wallet_os=j.current.walletOS,l.connected_app=Te()):(l.connected_did=o.get("connected_did"),l.connected_pk=o.get("connected_pk"),l.connected_app=o.get("connected_app"),l.connected_wallet_os=o.get("connected_wallet_os")),Ie(l,!0),H({sessionToken:T,refreshToken:x,visitorId:u})},ae=ue(()=>C==="switch-did"?d&&typeof d=="string"?{title:i("login.switchSpecifiedDid.title"),scan:i("login.switchSpecifiedDid.scan",{did:d}),confirm:i("login.switchSpecifiedDid.confirm"),success:i("login.switchSpecifiedDid.success")}:{title:i("login.switchDid.title"),scan:i("login.switchDid.scan"),confirm:i("login.switchDid.confirm"),success:i("login.switchDid.success")}:{title:i("login.connect.title"),scan:i("login.connect.scan"),confirm:i("login.connect.confirm"),success:i("login.connect.success")},[d,C,i]),K=me(()=>{const n=window?.blocklet,t={className:"connect",popup:!1,action:"login",passkeyBehavior:"both",onSuccess:F,onError:le,locale:y,messages:ae,extraParams:h,baseUrl:window.location.origin,prefix:A(window.location.origin,_.WELLKNOWN_SERVICE_PATH_PREFIX,ke)};d&&(t.forceConnected=d,t.extraParams.enableSwitchApp=!1,t.extraParams.forceConnected=d),t.options||(t.options={}),C==="switch-did"?t.options.showQuickConnect=!0:R(D)||([!1,"false"].includes(D)?t.options.showQuickConnect=!1:t.options.showQuickConnect=!0);const L=Ee();Ne()&&(t.extraParams.sourceAppPid=L.appPid);const x=A(window.location.origin,_.WELLKNOWN_SERVICE_PATH_PREFIX,"connect"),u={params:Pe(encodeURIComponent(JSON.stringify(t))),appPid:n?.appPid,appName:n?.appName,locale:y,redirect:window.location.href,_ek_:m};R(S)||(u.autoConnectWebview=S),R(U)||(u.popup=U),u.disableClose=!0;const l=J(Ce(x,u),{allowDomains:null});window.location.href=l});he(()=>{if(o.get("sessionToken")){const n=o.get("visitorId");if(!n){V.error("Unexpected login response from server: visitorId is required");return}F({sessionToken:b(te),csrfToken:b(oe),refreshToken:b(ie),visitorId:b(n)},t=>t)}else!s.user||d&&s.user.did!==d?K():!N&&!o.get("sessionToken")&&H()});const le=n=>{V.error(n.message)},de=o.has("popup");if(s.loading||s.user){if(!N||o.get("sessionToken"))return e.jsxs(e.Fragment,{children:[e.jsx($,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(_e,{children:de?null:e.jsx(fe,{})})]});const n=g?new URL(g,window.location.origin).href:window.location.href;return e.jsx(ee,{onConnect:K,passports:q,redirect:n})}return e.jsxs(e.Fragment,{children:[e.jsx($,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(p,{sx:{"box-sizing":"border-box",width:"100%",height:"100vh",position:"relative",display:"flex","flex-direction":"column",".connect":{background:"#fafafa"}},ref:c})]})}export{Xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,av as d,ak as r,T as m,aX as p,Q as u}from"./vendor-mui-core-BPQ6AEW_.js";import{g as x,j as f,h}from"./vendor-hooks-
|
|
1
|
+
import{j as e,av as d,ak as r,T as m,aX as p,Q as u}from"./vendor-mui-core-BPQ6AEW_.js";import{g as x,j as f,h}from"./vendor-hooks-PN9SWiQm.js";import{u as c}from"./vendor-react-CUXIiAnY.js";import{g as j,c as y,k as w,u as C}from"./index-jPmRCtiq.js";import{V as v}from"./vendor-ux-r9bApERu.js";import{C as k}from"./vendor-utils-BgSaqjGx.js";import"./vendor-arcblock-D8WYBDYe.js";import"./lottie-web-4koyQiv_.js";const M="authorization_response",A=j();function L(){const{t:s}=v(),[n]=c(),a=()=>{window.close()};return h(()=>{const i=n.get("state"),l=n.get("code"),t={type:M,response:{code:l}};if(window.opener)try{const o=new URL(i);window.opener.postMessage(t,o.origin),setTimeout(()=>{window.close()},2e3)}catch(o){console.error("Invalid login caller",o)}}),e.jsx(p,{severity:"success",children:e.jsxs(r,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",gap:1},children:[s("login.needManualClose"),e.jsx(r,{sx:{textAlign:"center"},children:e.jsx(u,{variant:"outlined",size:"small",onClick:a,children:s("login.closeWindow")})})]})})}function b(){const{blocklet:s}=window,[n]=c(),a=n.get("error"),i=n.get("error_description"),l=n.get("state"),t=x({errorMesage:"",loading:!0});f(async()=>{if(a)t.errorMesage=i,t.loading=!1;else try{const g=new URL(l);(await A.federated.getTrustedDomains()).includes(g.hostname)||(t.errorMesage="Invalid login caller")}catch{t.errorMesage="Invalid login caller"}finally{t.loading=!1}},[a,i,l]);const o=k(y.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?&version=${s?.meta?.version||""}`);return e.jsx(d,{sx:{display:"flex",flexDirection:"column",minHeight:"100vh",justifyContent:"center",alignContent:"center"},children:e.jsxs(r,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minHeight:"100vh",margin:"auto",paddingBottom:{sx:0,md:15}},children:[e.jsxs(r,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:.5},children:[e.jsx(r,{component:"img",src:o,alt:`${s?.appName||"site"} logo`,sx:{width:80}}),e.jsx(m,{variant:"h6",component:"p",children:s?.appName})]}),t.loading?t.errorMesage?e.jsx(w,{error:{message:t.errorMesage}}):e.jsx(L,{}):null,e.jsx(C,{sx:{mt:4}})]})})}export{b as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.__toCdnUrl("assets/vendor-ux-DYcPPYq2.css"),window.__toCdnUrl("assets/index-DrVXX4fX.css"),window.__toCdnUrl("assets/index-B5LvOF-F.css")])))=>i.map(i=>d[i]);
|
|
2
|
-
import{V as O,q as _,_ as q}from"./vendor-ux-
|
|
2
|
+
import{V as O,q as _,_ as q}from"./vendor-ux-r9bApERu.js";import{r as m}from"./vendor-react-CUXIiAnY.js";import{j as o,ak as u,at as k,W as e}from"./vendor-mui-core-BPQ6AEW_.js";import{n as d,C as z}from"./vendor-utils-BgSaqjGx.js";const C=m.lazy(()=>q(()=>import("./index-BzDzFVcf.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(t=>({default:t.Uploader}))),F="/blocklet/logo/upload",c=[".png",".jpg",".jpeg",".webp",".bmp",".ico"];function U({url:t,height:f=80,width:g="auto",enabled:s=!0,allowSVG:h=!0,type:r,did:a,prefix:b,headers:x=d,aspectRatio:l=1,minWidth:P=256,minHeight:R=256,onUploaded:j=d,children:n=null}){const{t:v,locale:w}=O(),i=m.useRef(null),p=()=>{i.current?.open()},y=()=>{j(),i.current?.close()},E={cursor:s?"pointer":"default","&::after":{content:`"${v("common.switch")}"`}};return o.jsxs(S,{id:`uploader-${a}-${r}`,children:[o.jsx(C,{ref:i,locale:w,popup:!0,onUploadFinish:y,plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:z(b,F,r,a),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileExts:h?[...c,".svg"]:c,maxFileSize:1024*1024*5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:l,initialAspectRatio:l,croppedCanvasOptions:{minWidth:P,minHeight:R}}},tusProps:{headers:x}}),n?o.jsx(u,{onClick:p,children:n}):o.jsx(u,{className:_("uploader-wrapper",s&&"enabled"),sx:E,onClick:p,children:o.jsx("img",{alt:r,src:t,style:{width:g,height:f}})})]},`uploader-${a}-${r}`)}U.propTypes={url:e.string.isRequired,type:e.oneOf(["square","rect","favicon","splash-portrait","splash-landscape","og-image"]).isRequired,did:e.string.isRequired,prefix:e.string.isRequired,headers:e.func,onUploaded:e.func,height:e.number,width:e.any,enabled:e.bool,allowSVG:e.bool,aspectRatio:e.number,minWidth:e.number,minHeight:e.number,children:e.node};const S=k.div`
|
|
3
3
|
.uploader-wrapper {
|
|
4
4
|
display: inline-flex;
|
|
5
5
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,at as $,W as b,J as A,ak as r,b4 as F,b0 as U,T as N,bP as z,bQ as X,bR as H,a$ as B,av as J,bF as V,bS as G,bT as Q}from"./vendor-mui-core-BPQ6AEW_.js";import{p as O,d as q,n as I,_ as K,s as Y,V as Z}from"./vendor-ux-
|
|
1
|
+
import{j as e,at as $,W as b,J as A,ak as r,b4 as F,b0 as U,T as N,bP as z,bQ as X,bR as H,a$ as B,av as J,bF as V,bS as G,bT as Q}from"./vendor-mui-core-BPQ6AEW_.js";import{p as O,d as q,n as I,_ as K,s as Y,V as Z}from"./vendor-ux-r9bApERu.js";import{r as m}from"./vendor-react-CUXIiAnY.js";import{g as ee,n as te}from"./vendor-hooks-PN9SWiQm.js";import{v as D,J as L,H as se,S as oe,s as ne,b as ae,av as re}from"./index-jPmRCtiq.js";import{T as ie}from"./vendor-utils-BgSaqjGx.js";import{N as ce}from"./index-z0V_qaSH.js";import{W as le}from"./did-address-j4poFq12.js";import{w as pe}from"./wrap-locale--xtBp5yb.js";import{u as de}from"./use-passport-id-B-b-_oYF.js";import{g as me}from"./get-safe-url-DB8WYPm8.js";import{c as ue}from"./passport-DnUeoVIR.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-D8WYBDYe.js";import"./index-B3lpnLC0.js";import"./create-passport-svg-CIUyZVGt.js";function W({list:s=[],width:l=300,height:u=400,cardSpace:p=40,onSelect:i=()=>{},defaultIndex:f=0}){const[x,g]=m.useState(0),[o,d]=m.useState(0),w=m.useRef(null),v=a=>{if(a<0||a>s.length-1)return;g(a);const c=w.current.clientWidth;d(a*(l+p)-(c-l)/2+p*.5),i(a)};m.useEffect(()=>{v(f);const a=c=>c.preventDefault();w.current.addEventListener("touchmove",a,{passive:!1})},[]);let n;const k=a=>{n=a.touches[0].clientX},y=a=>{const c=a.changedTouches[0],j=n-c.clientX;Math.abs(j)>60&&(j>0?v(x+1):v(x-1))};return e.jsx(he,{ref:w,onTouchStart:k,onTouchEnd:y,children:e.jsx("div",{className:"card-container",style:{transform:`translate(${-o}px, 0)`},children:s.map((a,c)=>e.jsx("div",{className:`card-item ${c===x?"selected":""}`,style:{width:l,height:u,margin:p/2},onClick:()=>v(c),children:a.display?e.jsx("div",{className:"card-content",children:e.jsx(ce,{data:a.display,style:{width:"100%",height:"100%"}})}):e.jsx("div",{className:"card-content",dangerouslySetInnerHTML:{__html:a.src}})},a.id))})})}const he=$.div`
|
|
2
2
|
overflow: hidden;
|
|
3
3
|
mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
|
|
4
4
|
overflow: hidden;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e}from"./vendor-react-CUXIiAnY.js";import{N as r}from"./vendor-utils-
|
|
1
|
+
import{e}from"./vendor-react-CUXIiAnY.js";import{N as r}from"./vendor-utils-BgSaqjGx.js";const t=e(r);export{t as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./vendor-mui-core-BPQ6AEW_.js";import{r as e}from"./vendor-react-CUXIiAnY.js";import{g as m}from"./get-safe-url-
|
|
1
|
+
import{j as s}from"./vendor-mui-core-BPQ6AEW_.js";import{r as e}from"./vendor-react-CUXIiAnY.js";import{g as m}from"./get-safe-url-DB8WYPm8.js";import"./index-jPmRCtiq.js";import"./vendor-ux-r9bApERu.js";import"./vendor-utils-BgSaqjGx.js";import"./vendor-hooks-PN9SWiQm.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-D8WYBDYe.js";function S(){const r=e.useRef(null),n=e.useRef(Date.now());return e.useEffect(()=>{const t=`open-window-url-${new URLSearchParams(window.location.search).get("key")}`;return r.current=setInterval(()=>{if(Date.now()-n.current>10*1e3){localStorage.removeItem(t),clearInterval(r.current);return}const o=localStorage.getItem(t);if(o)try{const{url:a,time:i}=JSON.parse(o);localStorage.removeItem(t),Date.now()-i<10*1e3&&(window.location.href=m(a,{allowDomains:null}))}catch{}},200),()=>clearInterval(r.current)},[]),s.jsx("div",{})}export{S as default};
|
package/dist/assets/{over-due-invoice-payment-Bsp5V3AP.js → over-due-invoice-payment-C-ZuUAsL.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as ge,j as t,b1 as h,aX as ie,Q as M,T as S,b0 as Ce}from"./vendor-mui-core-BPQ6AEW_.js";import{r as d}from"./vendor-react-CUXIiAnY.js";import{V as je,d as ke,b as Se,H as x}from"./vendor-ux-
|
|
1
|
+
import{D as ge,j as t,b1 as h,aX as ie,Q as M,T as S,b0 as Ce}from"./vendor-mui-core-BPQ6AEW_.js";import{r as d}from"./vendor-react-CUXIiAnY.js";import{V as je,d as ke,b as Se,H as x}from"./vendor-ux-r9bApERu.js";import{C as w,d as we}from"./vendor-utils-BgSaqjGx.js";import{k as Pe}from"./vendor-hooks-PN9SWiQm.js";import{w as De,x as z,y as Ee,z as Re,C as H,D as $e,E as Te,F as _e,L as ce,G as Ie}from"./index-jPmRCtiq.js";const q=async r=>{if(!r.subscriptionId&&!r.customerId)throw new Error("Either subscriptionId or customerId must be provided");let f;return r.subscriptionId?f=`/api/subscriptions/${r.subscriptionId}/overdue/invoices`:f=`/api/customers/${r.customerId}/overdue/invoices`,(await $e.get(r.authToken?w(f,`?authToken=${r.authToken}`):f)).data};function Oe({subscriptionId:r=void 0,customerId:f=void 0,mode:O="default",dialogProps:g={open:!0},children:P=void 0,onPaid:N=()=>{},detailLinkOptions:y={enabled:!0},successToast:U=!0,alertMessage:V="",authToken:D=void 0}){const{t:n,locale:ae}=je(),W=ke()?.arcSphere,E=ge(),{connect:R,session:ue}=De(),[le,de]=d.useState(""),[G,v]=d.useState(!1),[me,$]=d.useState(g.open||!1),[pe,ye]=d.useState({}),[fe,p]=d.useState({}),[T,_]=d.useState({}),K=d.useRef(T),L=r?"subscription":"customer",u=f||ue?.user?.did,Q=r||u,C=d.useRef(u);d.useEffect(()=>{K.current=T},[T]);const{data:c={summary:{},invoices:[]},error:X,loading:ve,runAsync:J}=Pe(()=>q({subscriptionId:r,customerId:u,authToken:D}),{ready:!!r||!!u,onSuccess:e=>{e.customer?.id&&e.customer?.id!==C.current&&(C.current=e.customer?.id)}}),I=d.useMemo(()=>r?w(z(),`/customer/subscription/${r}`):u?w(z(),"/customer/invoice/past-due"):"",[r,u]),l=d.useMemo(()=>c?.summary?Object.values(c.summary):[],[c?.summary]),Y=async e=>{if(K.current[e])try{if((await q({subscriptionId:r,customerId:u,authToken:D})).invoices?.some(a=>a.currency_id===e))return;_(a=>{const m={...a};return delete m[e],m}),p(a=>({...a,[e]:"success"}))}catch(i){console.error("Error checking Stripe payment completion:",i);return}U&&(x.close(),x.success(n("payment.customer.invoice.paySuccess"))),v(!1),(await J()).invoices?.length===0&&($(!1),N(Q,e,L))},he=we(e=>Y(e),1e3,{leading:!1,trailing:!0,maxWait:5e3}),F=Ee(),j=Re("events"),xe=async e=>{let s=!1;return await Ie(async()=>(s=!(await q({subscriptionId:r,customerId:u,authToken:D})).invoices?.some(a=>a.currency_id===e),s),{interval:2e3,timeout:3*60*1e3}),s},Z=async(e,s=!1)=>{if(F||W)try{if(await xe(e)){p(a=>({...a,[e]:"success"}));const o=await J();U&&(x.close(),x.success(n("payment.customer.invoice.paySuccess"))),o.invoices?.length===0&&($(!1),N(Q,e,L))}}catch(i){console.error("Check payment status failed:",i),p(o=>({...o,[e]:"error"}))}finally{v(!1)}else s&&(_(i=>({...i,[e]:!0})),p(i=>({...i,[e]:"processing"})))};d.useEffect(()=>{if(!j||F||W)return;const e=({response:s})=>{const o=`${r||s.customer_id}-${s.currency_id}`;(r&&s.subscription_id===r||u&&u===s.customer_id||C.current&&C.current===s.customer_id)&&(pe[o]||(ye(a=>({...a,[o]:1})),he(s.currency_id)))};return j.on("invoice.paid",e),()=>{j.off("invoice.paid",e)}},[j,r,u]);const ee=e=>{const{currency:s,method:i}=e;if(i.type==="stripe"){x.error(n("payment.subscription.overdue.notSupport"));return}if(!G&&(de(s.id),v(!0),p(o=>({...o,[s.id]:"idle"})),["arcblock","ethereum","base"].includes(i.type))){const o={currencyId:s.id};r?o.subscriptionId=r:u&&(o.customerId=u),R.open({locale:ae,containerEl:void 0,saveConnect:!1,action:"collect-batch",prefix:w(z(),"/api/did"),useSocket:!F,extraParams:o,messages:{scan:n("common.connect.defaultScan"),title:n("payment.customer.invoice.payBatch"),confirm:n("common.connect.confirm")},onSuccess:()=>{R.close(),Z(s.id),v(!1),p(a=>({...a,[s.id]:"success"}))},onClose:()=>{R.close(),v(!1)},onError:a=>{x.error(Te(a)),p(m=>({...m,[s.id]:"error"})),v(!1)}})}},k=()=>{$(!1),g.onClose?.()},te=e=>{y.onClick?(e.preventDefault(),y.onClick(e)):y.enabled||(e.preventDefault(),k())};if(ve)return null;const re=()=>y.title?y.title:n(r?"payment.subscription.overdue.view":"payment.customer.pastDue.view"),ne=(e,s=!0,i={variant:"contained"})=>{const{currency:o}=e,a=G&&le===o.id,m=fe[o.id]||"idle";if(m==="success")return t.jsx(M,{variant:i?.variant||"contained",size:"small",onClick:()=>Y(o.id),...s?{}:{color:"success",startIcon:t.jsx(Ce,{})},children:n("payment.subscription.overdue.paid")});if(e.method.type==="stripe"){let B=n("payment.subscription.overdue.payNow");return m==="error"?B=n("payment.subscription.overdue.retry"):m==="processing"&&(B=n("payment.subscription.overdue.processing")),t.jsx(_e,{subscriptionId:r,customerId:r?void 0:u,currencyId:o.id,paymentMethod:e.method,onSuccess:()=>{Z(o.id,!0)},onError:()=>{p(b=>({...b,[o.id]:"error"})),_(b=>({...b,[o.id]:!1}))},children:(b,oe)=>t.jsx(ce,{variant:i?.variant||"contained",size:"small",disabled:oe||m==="processing",loading:oe||m==="processing",onClick:b,sx:i?.sx,children:B})})}return t.jsx(ce,{variant:i?.variant||"contained",size:"small",disabled:a,loading:a,onClick:()=>ee(e),sx:i?.sx,children:n(m==="error"?"payment.subscription.overdue.retry":"payment.subscription.overdue.payNow")})},A=e=>e.name&&e.type!=="arcblock"?` (${e.name})`:"",se=()=>{if(r&&c.subscription)return l.length===1?n("payment.subscription.overdue.title",{name:c.subscription?.description,count:c.invoices?.length,total:H(l[0]?.amount,l[0]?.currency?.decimal),symbol:l[0]?.currency?.symbol,method:A(l[0]?.method)}):n("payment.subscription.overdue.simpleTitle",{name:c.subscription?.description,count:c.invoices?.length});if(u){let e="";return l.length===1?e=n("payment.customer.overdue.title",{subscriptionCount:c.subscriptionCount||0,count:c.invoices?.length,total:H(l[0]?.amount,l[0]?.currency?.decimal),symbol:l[0]?.currency?.symbol,method:A(l[0]?.method)}):e=n("payment.customer.overdue.simpleTitle",{subscriptionCount:c.subscriptionCount||0,count:c.invoices?.length}),V?`${e}${V}`:`${e}${n("payment.customer.overdue.defaultAlert")}`}return""},be=()=>r&&c.subscription?n("payment.subscription.overdue.empty",{name:c.subscription?.description}):n("payment.customer.overdue.empty");return O==="custom"&&P&&typeof P=="function"?t.jsx(h,{children:P(ee,{subscription:c?.subscription,summary:c?.summary,invoices:c?.invoices,subscriptionCount:c?.subscriptionCount,detailUrl:I})}):t.jsx(Se,{PaperProps:{style:{minHeight:"auto"}},...g||{},open:me,title:g?.title||n("payment.subscription.overdue.pastDue"),sx:{"& .MuiDialogContent-root":{pt:0}},onClose:k,children:X?t.jsx(ie,{severity:"error",children:X.message}):t.jsxs(h,{sx:{gap:1},children:[l.length===0&&t.jsxs(t.Fragment,{children:[t.jsx(ie,{severity:"success",children:be()}),t.jsx(h,{direction:"row",sx:{justifyContent:"flex-end",mt:2},children:t.jsx(M,{variant:"outlined",color:"primary",onClick:k,sx:{width:"fit-content"},children:n("common.know")})})]}),l.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(S,{variant:"body1",sx:{color:"text.secondary"},children:[se(),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),n("payment.subscription.overdue.description"),t.jsx("a",{href:I,target:"_blank",onClick:te,rel:"noreferrer",style:{color:E.palette.text.link},children:re()})]})]}),t.jsxs(h,{direction:"row",sx:{justifyContent:"flex-end",gap:2,mt:2},children:[t.jsx(M,{variant:"outlined",color:"primary",onClick:k,children:n("common.cancel")}),ne(l[0])]})]}),l.length>1&&t.jsxs(t.Fragment,{children:[t.jsxs(S,{variant:"body1",sx:{color:"text.secondary"},children:[se(),y.enabled&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),n("payment.subscription.overdue.description"),t.jsx("a",{href:I,target:"_blank",rel:"noreferrer",onClick:te,style:{color:E.palette.text.link},children:re()})]})]}),t.jsx(S,{variant:"body1",sx:{color:"text.secondary"},children:n("payment.subscription.overdue.list")}),t.jsx(h,{children:l.map(e=>t.jsxs(h,{direction:"row",sx:{justifyContent:"space-between",alignItems:"center",py:1,px:.5,borderBottom:"1px solid",borderColor:"divider","&:hover":{backgroundColor:()=>E.palette.grey[100]},mt:0},children:[t.jsx(S,{children:n("payment.subscription.overdue.total",{total:H(e?.amount,e?.currency?.decimal),currency:e?.currency?.symbol,method:A(e?.method)})}),ne(e,!1,{variant:"text",sx:{color:"text.link"}})]},e?.currency?.id))})]})]})})}export{Oe as O};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,ak as n,ar as E,a$ as te,at as Q,W as p,am as k,cq as ne,T,c2 as L,bf as M}from"./vendor-mui-core-BPQ6AEW_.js";import{r as u,a as oe}from"./vendor-react-CUXIiAnY.js";import{U as h,V as A,n as se,z as ae,Q as ie}from"./vendor-ux-
|
|
1
|
+
import{j as e,ak as n,ar as E,a$ as te,at as Q,W as p,am as k,cq as ne,T,c2 as L,bf as M}from"./vendor-mui-core-BPQ6AEW_.js";import{r as u,a as oe}from"./vendor-react-CUXIiAnY.js";import{U as h,V as A,n as se,z as ae,Q as ie}from"./vendor-ux-r9bApERu.js";import{d as re}from"./keyboard-arrow-down-rounded-8U0_i9QO.js";import{f as D}from"./index-BojVbZw0.js";import{p as le}from"./dashboard-CL6mI9qw.js";import{_ as ce,ac as me,ae as de,aU as pe,ad as ue,c as _,e as he,a1 as q}from"./index-jPmRCtiq.js";import{v as xe}from"./index-ySP_m_Ux.js";import{u as ge}from"./useAsyncRetry-LJm0Fhbe.js";import{C as fe}from"./vendor-utils-BgSaqjGx.js";import{u as ve}from"./team-Caq5y5Xs.js";import{W as v}from"./did-address-j4poFq12.js";import{V as be}from"./status-viNRhemG.js";import{c as je}from"./spaces-24WmguiI.js";import"./vendor-hooks-PN9SWiQm.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-D8WYBDYe.js";import"./useLocalStorage-6wbaKET6.js";import"./index-DBs9Ljax.js";import"./confirm-CsXep4ZX.js";import"./get-safe-url-DB8WYPm8.js";import"./session-L__eR8rN.js";import"./passport-DnUeoVIR.js";import"./create-passport-svg-CIUyZVGt.js";import"./useSetState-cWrp7qoX.js";import"./index-Cmd4UiOo.js";import"./over-due-invoice-payment-C-ZuUAsL.js";import"./useAsync-BCC9JxQR.js";import"./isURL-CTWDUgGm.js";import"./use-app-logo-C_3MNDVC.js";import"./omit-CpvduH4b.js";import"./api-uGeIZn4a.js";const ke={width:24,height:24,body:'<path fill="currentColor" d="m12 10.8l-3.9 3.9q-.275.275-.7.275t-.7-.275q-.275-.275-.275-.7t.275-.7l4.6-4.6q.3-.3.7-.3t.7.3l4.6 4.6q.275.275.275.7t-.275.7q-.275.275-.7.275t-.7-.275L12 10.8Z"/>'},ye={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 17a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm12 0a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2zM6 15v-1a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v1m-6-6v3"/>'},we={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 7a4 4 0 1 0 8 0a4 4 0 1 0-8 0M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2m1-17.87a4 4 0 0 1 0 7.75M21 21v-2a4 4 0 0 0-3-3.85"/>'},Se={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 12h3v4H7z"/><path d="M10 6H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-6"/><path d="M10 4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1zm4 12h2m-2-4h4"/></g>'},_e={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M19.5 7A9 9 0 0 0 12 3a8.991 8.991 0 0 0-7.484 4"/><path d="M11.5 3a16.989 16.989 0 0 0-1.826 4M12.5 3a16.989 16.989 0 0 1 1.828 4M19.5 17a9 9 0 0 1-7.5 4a8.991 8.991 0 0 1-7.484-4"/><path d="M11.5 21a16.989 16.989 0 0 1-1.826-4m2.826 4a16.989 16.989 0 0 0 1.828-4M2 10l1 4l1.5-4L6 14l1-4m10 0l1 4l1.5-4l1.5 4l1-4M9.5 10l1 4l1.5-4l1.5 4l1-4"/></g>'},O={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0"/><path d="M12 7v5l3 3"/></g>'},Te={width:24,height:24,body:'<path fill="currentColor" d="M12 14q-.825 0-1.413-.588T10 12q0-.825.588-1.413T12 10q.825 0 1.413.588T14 12q0 .825-.588 1.413T12 14Zm0 7q-3.475 0-6.025-2.288T3.05 13H5.1q.35 2.6 2.313 4.3T12 19q2.925 0 4.963-2.038T19 12q0-2.925-2.038-4.963T12 5q-1.725 0-3.225.8T6.25 8H9v2H3V4h2v2.35q1.275-1.6 3.113-2.475T12 3q1.875 0 3.513.713t2.85 1.924q1.212 1.213 1.925 2.85T21 12q0 1.875-.713 3.513t-1.924 2.85q-1.213 1.212-2.85 1.925T12 21Z"/>'};function W({icon:t,value:s,name:o,url:i="",animated:l=!1,LinkComponent:d=te,loading:x=!1}){const g=()=>oe.isValidElement(t)?t:e.jsx(n,{component:h,icon:t,alt:typeof o=="string"?o:"",sx:{fontSize:30}});if(x)return e.jsxs(V,{children:[t&&e.jsx(n,{className:"metric__image",children:e.jsx(E,{variant:"circular",width:32,height:32})}),e.jsxs(n,{children:[e.jsx(E,{className:`metric__number ${l?"metric__number--animated":""}`,variant:"rounded",width:160,height:"36px",sx:{mb:1}}),e.jsx(E,{className:"metric__name",variant:"rounded",width:80,height:20})]})]});const f=e.jsxs(e.Fragment,{children:[t&&e.jsx(n,{className:"metric__image",children:g()}),e.jsxs(n,{children:[u.isValidElement(s)?e.jsx(n,{className:`metric__number ${l?"metric__number--animated":""}`,children:s}):e.jsx(n,{className:`metric__number ${l?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:s}}),e.jsx(n,{className:"metric__name",children:o})]})]});return e.jsx(V,{children:i?e.jsx(d,{href:i,sx:{textDecoration:"none"},children:f}):f})}W.propTypes={icon:p.string.isRequired,value:p.string.isRequired,name:p.string.isRequired,url:p.string,animated:p.bool,LinkComponent:p.elementType,loading:p.bool};const V=Q(n)`
|
|
2
2
|
border-left: 1px solid ${t=>t.theme.palette.divider};
|
|
3
3
|
padding: 10px 0 10px 16px;
|
|
4
4
|
@media (max-width: ${t=>t.theme.breakpoints.values.sm}px) {
|
|
@@ -70,7 +70,7 @@ import{j as e,ak as n,ar as E,a$ as te,at as Q,W as p,am as k,cq as ne,T,c2 as L
|
|
|
70
70
|
opacity: 1;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
`,b={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},Ae=(t,s)=>{const[o,i]=u.useState(0),l=g=>g>=b.oneDay?b.oneDay:g>=b.oneHour?b.oneHour:g>=b.oneMin?b.oneMin:b.oneSecond,[d,x]=u.useState(l(t/1e3));return u.useEffect(()=>{const g=setInterval(()=>{i(o+d);const f=l(t/1e3+o+d);d!==f&&x(f)},d*1e3);return()=>clearInterval(g)},[d,o]),u.useEffect(()=>{i(0),x(l(t/1e3))},[t]),s(t+o*1e3)};p.number.isRequired,p.func;const Ie={arcblock:"ArcBlock",ethereum:"Ethereum"};function F({source:t,migrated:s}){const{t:o}=A();return t?t.startsWith("managed")?e.jsxs(n,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(T,{children:t}),e.jsx(k,{title:o(s?"blocklet.skSourceMigratedTip":"blocklet.skSourceManagedTip"),children:e.jsx(M,{sx:{fontSize:16,color:s?"text.secondary":"warning.main"}})})]}):e.jsx(T,{children:t}):null}F.propTypes={source:p.string.isRequired,migrated:p.bool.isRequired};const $e=t=>{const{t:s}=A();let o=0,i=0;t&&(o=t.length,i=t.filter(d=>he.isBlockletRunning(d)).length);let l=o;return i&&(l+=`<small>${s("common.running")} ${i}</small>`),l},Me=(t,s)=>{const{t:o}=A();return s.length?e.jsxs(n,{component:"small",children:[o("router.domainAlias.custom")," ",s.length]}):e.jsxs(n,{component:"small",sx:{display:"flex",alignItems:"center",gap:.5,color:s.length?"text.primary":"warning.main"},children:[o("router.domainAlias.noCustom"),e.jsx(k,{title:o("router.domainAlias.noCustomTip"),children:e.jsx(M,{sx:{fontSize:16}})})]})},ze=(t,s)=>{const o=t===_.BACKUPS.STATUS.PROGRESS&&q().diff(s,"hours")>=_.BACKUPS.TIMEOUT_HOURS,i=t===_.BACKUPS.STATUS.PROGRESS&&!o;return t===_.BACKUPS.STATUS.SUCCEEDED&&!o?e.jsx(n,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"success.main"}}):i?e.jsx(n,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"error.main"}}):e.jsx(n,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"warning.main"}})},Ce=(t,s)=>{const{t:o,locale:i}=A(),l=s?.createdAt;return t&&l?e.jsxs(n,{sx:{display:"flex",alignItems:"baseline",gap:.5,color:q(l).add(1,"day").isAfter(q())?"text.primary":"warning.main"},children:[D(l,i==="tw"?"zh":i),e.jsx(k,{title:o("storage.spaces.backup.lastBackupTip",{time:D(l,i==="tw"?"zh":i)}),children:e.jsx(M,{sx:{fontSize:16}})})]}):e.jsxs(n,{sx:{display:"flex",alignItems:"baseline",gap:.5,color:"warning.main",fontSize:30},children:[o("storage.spaces.backup.noBackup"),e.jsx(k,{title:o("storage.spaces.backup.noBackupTip"),children:e.jsx(M,{sx:{fontSize:16}})})]})},j={fontSize:30,color:"text.primary"};function
|
|
73
|
+
`,b={oneSecond:1,oneMin:1*60,oneHour:1*60*60,oneDay:24*60*60},Ae=(t,s)=>{const[o,i]=u.useState(0),l=g=>g>=b.oneDay?b.oneDay:g>=b.oneHour?b.oneHour:g>=b.oneMin?b.oneMin:b.oneSecond,[d,x]=u.useState(l(t/1e3));return u.useEffect(()=>{const g=setInterval(()=>{i(o+d);const f=l(t/1e3+o+d);d!==f&&x(f)},d*1e3);return()=>clearInterval(g)},[d,o]),u.useEffect(()=>{i(0),x(l(t/1e3))},[t]),s(t+o*1e3)};p.number.isRequired,p.func;const Ie={arcblock:"ArcBlock",ethereum:"Ethereum"};function F({source:t,migrated:s}){const{t:o}=A();return t?t.startsWith("managed")?e.jsxs(n,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(T,{children:t}),e.jsx(k,{title:o(s?"blocklet.skSourceMigratedTip":"blocklet.skSourceManagedTip"),children:e.jsx(M,{sx:{fontSize:16,color:s?"text.secondary":"warning.main"}})})]}):e.jsx(T,{children:t}):null}F.propTypes={source:p.string.isRequired,migrated:p.bool.isRequired};const $e=t=>{const{t:s}=A();let o=0,i=0;t&&(o=t.length,i=t.filter(d=>he.isBlockletRunning(d)).length);let l=o;return i&&(l+=`<small>${s("common.running")} ${i}</small>`),l},Me=(t,s)=>{const{t:o}=A();return s.length?e.jsxs(n,{component:"small",children:[o("router.domainAlias.custom")," ",s.length]}):e.jsxs(n,{component:"small",sx:{display:"flex",alignItems:"center",gap:.5,color:s.length?"text.primary":"warning.main"},children:[o("router.domainAlias.noCustom"),e.jsx(k,{title:o("router.domainAlias.noCustomTip"),children:e.jsx(M,{sx:{fontSize:16}})})]})},ze=(t,s)=>{const o=t===_.BACKUPS.STATUS.PROGRESS&&q().diff(s,"hours")>=_.BACKUPS.TIMEOUT_HOURS,i=t===_.BACKUPS.STATUS.PROGRESS&&!o;return t===_.BACKUPS.STATUS.SUCCEEDED&&!o?e.jsx(n,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"success.main"}}):i?e.jsx(n,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"error.main"}}):e.jsx(n,{sx:{width:8,height:8,borderRadius:"100%",bgcolor:"warning.main"}})},Ce=(t,s)=>{const{t:o,locale:i}=A(),l=s?.createdAt;return t&&l?e.jsxs(n,{sx:{display:"flex",alignItems:"baseline",gap:.5,color:q(l).add(1,"day").isAfter(q())?"text.primary":"warning.main"},children:[D(l,i==="tw"?"zh":i),e.jsx(k,{title:o("storage.spaces.backup.lastBackupTip",{time:D(l,i==="tw"?"zh":i)}),children:e.jsx(M,{sx:{fontSize:16}})})]}):e.jsxs(n,{sx:{display:"flex",alignItems:"baseline",gap:.5,color:"warning.main",fontSize:30},children:[o("storage.spaces.backup.noBackup"),e.jsx(k,{title:o("storage.spaces.backup.noBackupTip"),children:e.jsx(M,{sx:{fontSize:16}})})]})},j={fontSize:30,color:"text.primary"};function pt(){const{t,locale:s}=A(),{info:o,inService:i,api:l}=ce(),{teamDid:d}=ve(),[x,g]=u.useState(!1),{did:f,blocklet:a}=me(),c=ge(()=>l.getBlockletBaseInfo({input:{teamDid:d}})),{appDid:z,appPid:C,migratedFrom:y=[]}=a,B=a.environments.find(r=>r.key==="BLOCKLET_APP_CHAIN_TYPE")?.value,I=r=>typeof r!="number"||Number.isNaN(r)?"0":r>=1e4?new Intl.NumberFormat(s,{notation:"compact",compactDisplay:"short"}).format(r):new Intl.NumberFormat(s).format(r),N=[z?{name:t("blocklet.appId"),value:e.jsx(v,{did:z,showQrcode:!0})}:null,C&&z!==C?{name:e.jsxs(n,{children:[t("blocklet.appPid"),e.jsx(k,{title:t("blocklet.whyNeedAppPid"),style:{cursor:"help",fontSize:16},children:e.jsx(ne,{sx:{verticalAlign:"middle",mt:"-2px",ml:"2px"}})})]}),value:e.jsx(v,{did:C,showQrcode:!0})}:null,y?.length>1?{name:t("blocklet.alsoKnownAs"),value:e.jsxs("div",{children:[(x?y.slice(1):y.slice(1,2)).map(r=>e.jsx(v,{did:r.appDid,showQrcode:!0})),y.length>2&&e.jsx(se,{sx:{pl:0,"&:hover":{backgroundColor:"transparent"}},endIcon:x?e.jsx(h,{icon:ke}):e.jsx(h,{icon:re}),onClick:()=>g(!x),children:t(x?"common.collapseAll":"blocklet.router.showAllDIDs")})]})}:null,de(a)?{name:"NFT",value:e.jsx(v,{external:!0,href:pe(a?.controller?.chainHost,a?.controller?.nftId,"asset"),did:a?.controller?.nftId,showQrcode:!0})}:null,{name:t("common.owner"),value:a.settings?.owner?e.jsx(v,{did:a.settings.owner.did,showQrcode:!0}):"-"},a.vaults?.length?{name:t("blocklet.config.vault.name"),value:e.jsxs(n,{sx:{display:"flex",alignItems:"center",gap:.5,"& > span":{width:"auto"}},children:[e.jsx(v,{did:a.vaults[a.vaults.length-1].did,showQrcode:!0}),e.jsx(be,{vaults:a.vaults,appPid:a.appPid})]})}:null,{name:t("blocklet.installedAt"),value:a.installedAt?e.jsx(ae,{value:a.installedAt,type:"all",locale:s}):"-"},{name:t("blocklet.config.walletType.name"),value:Ie[B||"arcblock"]||B},a.externalSkSource?{name:t("blocklet.skSource"),value:e.jsx(F,{source:a.externalSkSource,migrated:y.length>0})}:null].filter(Boolean);i&&N.push({name:t("common.serverDid"),value:e.jsx(v,{did:o.did,showQrcode:!0})},{name:t("common.serverVersion"),value:e.jsx(ie,{children:o.version})});const K=r=>r.map(m=>e.jsx(xe,{style:{display:"flex",alignItems:"flex-start"},valueComponent:"div",nameWidth:150,name:m.name,nameFormatter:()=>m.name,children:m.value},m.name)),G=$e(a.children),R=Number(c?.value?.appRuntimeInfo?.uptime||0),Z=Ae(R,r=>le(r,{compact:!0,verbose:!0,locale:s==="tw"?"zh":s})),$=u.useMemo(()=>a?.site?.domainAliases||[],[a?.site?.domainAliases]),X=u.useMemo(()=>$.filter(r=>ue.isCustomDomain(r.value)),[$]),Y=Me($,X),P=u.useMemo(()=>c?.value?.passport||{},[c?.value?.passport]),U=u.useMemo(()=>c?.value?.user||{},[c?.value?.user]),H=u.useMemo(()=>je(a?.environments),[a?.environments]),J=Ce(H,c?.value?.backup),w=(r,m)=>`${_.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${r}/${m}`,S=r=>{const m=o?.routing?.adminPath;return fe(m,`/blocklets/${f}/${r}`)},ee=[{name:t("common.blocklets"),value:G,icon:e.jsx(n,{component:h,icon:ye,sx:j}),url:i?w("overview","components"):S("components")},{loading:c?.loading,name:t("common.members"),value:`${I(U?.users||0)}<small>${t("common.active")} ${I(U?.approvedUsers)}</small>`,icon:e.jsx(n,{component:h,icon:we,sx:j}),url:i?w("did-connect","members"):S("members")},{loading:c?.loading,name:t("team.member.passports"),value:`${I(P?.passports||0)}<small>${t("common.active")} ${I(P?.activePassports)}</small>`,icon:e.jsx(n,{component:h,icon:Se,sx:j}),url:i?w("did-connect","passports"):S("passports")},{loading:c?.loading,name:t("common.domains"),value:e.jsxs(n,{sx:{display:"flex",alignItems:"baseline"},children:[$.length,Y]}),icon:e.jsx(n,{component:h,icon:_e,sx:j}),url:i?w("website","domains"):S("domains")},{loading:c?.loading,name:t("common.uptime"),value:R?Z:e.jsx(n,{sx:{fontSize:28,color:"text.secondary"},children:`${t("common.waiting")}...`}),icon:e.jsx(n,{component:h,icon:O,sx:j})},a.createdAt&&+new Date(a.createdAt)!=+new Date(0)?{name:t("common.created"),value:D(new Date(a.createdAt).getTime(),s==="tw"?"zh":s),icon:e.jsx(n,{component:h,icon:O,sx:j})}:null,{loading:c?.loading,name:e.jsxs(n,{sx:{display:"flex",alignItems:"baseline",gap:.5},children:[t("storage.spaces.backup.lastBackup"),c?.value?.backup&&H&&e.jsx(k,{children:ze(c?.value?.backup?.status,c?.value?.backup?.createdAt)})]}),value:J,icon:e.jsx(n,{component:h,icon:Te,sx:j}),url:i?w("did-spaces","backups"):S("didSpaces")}].filter(Boolean);return e.jsxs(Ee,{component:"div",children:[e.jsxs(n,{className:"section",children:[e.jsx(T,{className:"section__header",color:"textPrimary",children:t("common.overview")}),e.jsx(L,{className:"page-metrics",container:!0,spacing:5,children:ee.map(({icon:r,...m})=>e.jsx(L,{sx:{small:{ml:.5}},size:{xl:1.5,lg:3,md:4,sm:6,xs:6},children:e.jsx(W,{...m})},m.name))})]}),e.jsxs(n,{className:"section",children:[e.jsx(T,{className:"section__header",color:"textPrimary",children:t("common.basicInfo")}),e.jsx(n,{className:"basicInfo",children:K(N)})]})]})}const Ee=Q(T)`
|
|
74
74
|
.section {
|
|
75
75
|
display: flex;
|
|
76
76
|
flex-direction: column;
|
|
@@ -82,4 +82,4 @@ import{j as e,ak as n,ar as E,a$ as te,at as Q,W as p,am as k,cq as ne,T,c2 as L
|
|
|
82
82
|
margin-bottom: 24px;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
`;export{
|
|
85
|
+
`;export{pt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as r}from"./create-passport-svg-CIUyZVGt.js";import{C as t}from"./vendor-utils-BgSaqjGx.js";import{c as s}from"./index-jPmRCtiq.js";const e=o=>r({...o,issuerAvatarUrl:t(window.location.origin,s.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo")});export{e as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,b1 as b,b4 as k,T as m,am as M,W as s,s as T,U as $,ak as g,bH as f,bI as x,bJ as q,bK as N,bL as L,bM as R,bN as B}from"./vendor-mui-core-BPQ6AEW_.js";import{V as h,z as F,A as S}from"./vendor-ux-
|
|
1
|
+
import{j as t,b1 as b,b4 as k,T as m,am as M,W as s,s as T,U as $,ak as g,bH as f,bI as x,bJ as q,bK as N,bL as L,bM as R,bN as B}from"./vendor-mui-core-BPQ6AEW_.js";import{V as h,z as F,A as S}from"./vendor-ux-r9bApERu.js";import{ar as E,as as P,at as V}from"./index-jPmRCtiq.js";import{U as H}from"./ua-parser-DP5omx3I.js";import{a as w}from"./vendor-react-CUXIiAnY.js";import{a as G}from"./vendor-hooks-PN9SWiQm.js";import{W as j}from"./did-address-j4poFq12.js";import{p as J}from"./util-9a6OMNK7.js";import{u as K}from"./team-Caq5y5Xs.js";function Y(e){return!e||typeof e!="string"?"break-all":e.includes(" ")?"break-word":"break-all"}function z({logo:e="",name:r="",description:n="",size:l=40,variant:a="rounded",sx:d={},className:p="",logoName:u="",tooltip:o=null}){const i={width:l,height:l,...d},y=typeof r=="string"?r:e,v=t.jsxs(b,{direction:"row",spacing:1,className:`info-card-wrapper ${p}`,sx:{alignItems:"center",cursor:o?"pointer":"default"},children:[e?t.jsx(k,{src:e,alt:u??y,variant:a,sx:i}):t.jsx(k,{variant:a,sx:i,children:y?.slice(0,1)}),t.jsxs(b,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:Y(r),minWidth:{xs:100,sm:140}},children:[t.jsx(m,{variant:"body1",component:"div",sx:{color:"text.primary"},children:r}),n&&t.jsx(m,{variant:"subtitle1",sx:{color:"text.secondary"},children:n})]})]});return o?t.jsx(M,{title:o,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff",color:c=>c.palette.mode==="dark"?"#ffffff":c.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:v}):v}z.propTypes={logo:s.string,name:s.oneOfType([s.string,s.node]).isRequired,description:s.oneOfType([s.string,s.node]),size:s.oneOfType([s.number,s.string]),variant:s.oneOf(["square","rounded","circular"]),sx:s.object,className:s.string,logoName:s.string,tooltip:s.oneOfType([s.string,s.node])};function _(e){try{if(!e.trim())return{device:{icon:t.jsx(x,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:t.jsx(f,{fontSize:"small"}),text:"Unknown Browser"}};const n=new H(e).getResult();let l="";const a=e.split(/\s+/).find(o=>o.startsWith("arcwallet"));if(a){const o=a.split("/");o.length>1&&S.coerce(o[1])&&(l=S.coerce(o[1]).version)}const d=(()=>{const{type:o="",model:i=""}=n.device;return o==="mobile"?{icon:t.jsx(q,{fontSize:"small"}),text:i||"Mobile Device"}:o==="tablet"?{icon:t.jsx(N,{fontSize:"small"}),text:i||"Tablet"}:{icon:t.jsx(L,{fontSize:"small"}),text:i||"Desktop"}})(),p=(()=>{const{name:o="",version:i=""}=n.os;return o.toLowerCase().includes("mac")?{icon:t.jsx(R,{fontSize:"small"}),text:`${o} ${i}`}:o.toLowerCase().includes("ios")?{icon:t.jsx(R,{fontSize:"small"}),text:`${o} ${i}`}:o.toLowerCase().includes("android")?{icon:t.jsx(B,{fontSize:"small"}),text:`${o} ${i}`}:o.toLowerCase().includes("windows")?{icon:t.jsx(x,{fontSize:"small"}),text:`${o} ${i}`}:{icon:null,text:o?`${o} ${i}`:"Unknown OS"}})(),u=(()=>{const{name:o="",version:i=""}=n.browser;return{icon:t.jsx(f,{fontSize:"small"}),text:o?`${o} ${i}`:"Unknown Browser"}})();return{device:d,os:p,browser:u,...l?{walletVersion:{icon:null,text:l}}:{}}}catch(r){return console.error("Error parsing user agent:",r),{device:{icon:t.jsx(x,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:t.jsx(f,{fontSize:"small"}),text:"Unknown Browser"}}}}function C({ua:e}){const r=_(e);return t.jsx(b,{spacing:1,children:Object.entries(r).map(([n,{icon:l,text:a}])=>t.jsxs(g,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.jsx(g,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:l}),t.jsx(m,{variant:"body2",sx:{display:"flex"},children:a})]},n))})}C.propTypes={ua:s.string.isRequired};const Q=()=>{const{t:e}=h(),r={$all:e("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:r,formatRoleName:l=>{const a=(l||"").toLowerCase();return a.startsWith("$")?r[a]||a.slice(1):r[a]||a}}},X=(e,r=!1)=>{const n=r?1:.6;switch(e){case"owner":return`rgba(232, 222, 255, ${n})`;case"admin":return`rgba(227, 242, 253, ${n})`;case"member":return`rgba(232, 245, 233, ${n})`;case"guest":return`rgba(245, 245, 245, ${n})`;default:return`rgba(245, 245, 245, ${n})`}},Z=T($)(({role:e})=>({backgroundColor:X(e.toLowerCase()),color:"#000000"})),ee=e=>{switch(e){case"valid":return r=>r.palette.success.light;case"expired":return r=>r.palette.text.disabled;case"revoked":return r=>r.palette.error.light;default:return r=>r.palette.warning.light}},re=T($)(({theme:e,status:r})=>({backgroundColor:ee(r)(e),color:"#FFFFFF"}));function U({did:e}){return t.jsx(j,{size:14,responsive:!1,compact:!0,copyable:!1,did:e})}U.propTypes={did:s.string.isRequired};function I({timestamp:e,locale:r}){return t.jsx(g,{sx:{minWidth:"100px"},children:t.jsx(F,{value:e,locale:r})})}I.propTypes={timestamp:s.number.isRequired,locale:s.string.isRequired};function W({name:e="",role:r}){const{formatRoleName:n}=Q();return t.jsx(Z,{label:n(e||r),size:"small",role:e||r,sx:{borderRadius:1}})}W.propTypes={role:s.string.isRequired,name:s.string};function O({status:e}){const{t:r}=h();return t.jsx(re,{label:r(`team.passport.statusMap.${e}`),size:"small",status:e,sx:{borderRadius:1}})}O.propTypes={status:s.string.isRequired};function A({source:e}){const{t:r}=h();return e?r(`team.passport.sourceMaps.${e}`):"-"}A.propTypes={source:s.string.isRequired};function D({user:e,size:r="default",tooltip:n=!1,inService:l=!1}){const{teamDid:a}=K(),d=w.useMemo(()=>J(e.avatar,a,l),[e.avatar,a,l]),p=w.useMemo(()=>t.jsx(j,{did:e?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[e?.did]),u=G(()=>({...e,avatar:d}),[e,d]);return r==="small"?t.jsx(z,{variant:"circular",logo:d,name:t.jsx(m,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:e.fullName||e.email}),...r==="small"?{tooltip:n?t.jsx(j,{did:e?.did}):!1,size:24}:{description:p,size:36}}):t.jsx(E,{user:u,avatarSize:r==="small"?24:36,cardType:V.Detailed,infoType:P.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}D.propTypes={user:s.object.isRequired,size:s.string,tooltip:s.bool,inService:s.bool};const te=w.memo(D),ue=e=>t.jsx(U,{did:e}),me=(e,r)=>t.jsx(W,{name:e,role:r}),fe=e=>t.jsx(O,{status:e}),xe=(e,r)=>t.jsx(I,{timestamp:e,locale:r}),be=e=>t.jsx(A,{source:e}),ge=(e,r=!1)=>t.jsx(te,{user:e,inService:r}),we=e=>t.jsx(C,{ua:e});export{me as a,fe as b,xe as c,be as d,we as e,ue as f,ge as r,Q as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l,W as n}from"./vendor-mui-core-BPQ6AEW_.js";import{u as m}from"./session-
|
|
1
|
+
import{j as l,W as n}from"./vendor-mui-core-BPQ6AEW_.js";import{u as m}from"./session-L__eR8rN.js";function c({permission:i="",role:t="",component:e=null,children:o=null}){const{session:r}=m();let s=!0;const u=[].concat(i).filter(Boolean),f=[].concat(t).filter(Boolean);if(u.length){const p=r.user&&r.user.permissions||[];s=u.some(a=>p.includes(a))}return s&&f.length&&(s=f.includes(r.user.role)),typeof e=="function"?e(s):typeof o=="function"?o(s):s&&(e||o)||null}function x(i,t,e){return function(r){return l.jsx(c,{permission:t,role:e,children:s=>l.jsx(i,{...r,hasPermission:s})})}}c.propTypes={permission:n.oneOfType([n.string,n.arrayOf(n.string)]),role:n.oneOfType([n.string,n.arrayOf(n.string)]),component:n.oneOfType([n.func,n.node]),children:n.oneOfType([n.func,n.node])};export{c as P,x as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o}from"./vendor-mui-core-BPQ6AEW_.js";import{C as t}from"./vendor-utils-
|
|
1
|
+
import{j as o}from"./vendor-mui-core-BPQ6AEW_.js";import{C as t}from"./vendor-utils-BgSaqjGx.js";import{I as s}from"./iframe-BOu2WQ8Y.js";import{c as e}from"./index-jPmRCtiq.js";import{S as m}from"./studio-CH0XVaW0.js";import"./vendor-react-CUXIiAnY.js";import"./vendor-ux-r9bApERu.js";import"./vendor-hooks-PN9SWiQm.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-D8WYBDYe.js";import"./index-Cmd4UiOo.js";function L(){const r=new URLSearchParams;r.set("title","Preference Builder"),r.set("schemaKey",t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/studio/preferences"));const i=`${t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/hosted/form-builder/")}?${r.toString()}`;return o.jsx(m,{children:o.jsx(s,{url:i,width:"100%",height:"100%",frameBorder:0,styles:{border:0}})})}export{L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./vendor-mui-core-BPQ6AEW_.js";import{$ as o}from"./user-center-eZZBxCnH.js";import{H as i}from"./index-jPmRCtiq.js";import{V as e}from"./vendor-ux-r9bApERu.js";import"./vendor-react-CUXIiAnY.js";import"./vendor-hooks-PN9SWiQm.js";import"./vendor-utils-BgSaqjGx.js";import"./index-DdXkI8FK.js";import"./arrow-down.svg-BE-0knfW.js";import"./revoke.svg-CuiCGfVW.js";import"./index-z0V_qaSH.js";import"./index-B7Hwfql4.js";import"./vendor-arcblock-D8WYBDYe.js";import"./index-DkaI7B4e.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-CJ1z6qNA.js";import"./lottie-web-4koyQiv_.js";function R(){const{t}=e();return r.jsxs(r.Fragment,{children:[r.jsx(i,{children:r.jsx("title",{children:t("pageTitle.userCenter")})}),r.jsx(o,{onlyProfile:!0,currentTab:"",disableAutoRedirect:!0})]})}export{R as default};
|