@abtnode/blocklet-services 1.16.52-beta-20250912-112002-e3499e9c → 1.16.52-beta-20250917-070942-7ee57044

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/api/routes/mcp.js +235 -1
  2. package/api/routes/oauth/server.js +4 -4
  3. package/api/services/dashboard/index.js +24 -6
  4. package/api/services/mcp/server.js +1 -1
  5. package/api/services/notification/blocklet-events-notifier.js +2 -2
  6. package/api/services/notification/queue.js +9 -9
  7. package/dist/assets/{access-control-Cv9mJe55.js → access-control-CXa4XdTR.js} +1 -1
  8. package/dist/assets/{add-component-core-ETZM-c0n.js → add-component-core-C8Wvhlwd.js} +1 -1
  9. package/dist/assets/{add-resource-CefrvxMv.js → add-resource-CKVcDfq1.js} +1 -1
  10. package/dist/assets/{addon-CdW1jH1F.js → addon-CGYbwnAQ.js} +1 -1
  11. package/dist/assets/{advanced-BalF9O34.js → advanced-BHQ085Rc.js} +1 -1
  12. package/dist/assets/{aigne-BqpFNqN9.js → aigne-CSzB6EAi.js} +1 -1
  13. package/dist/assets/{appearance-CiCcnDqj.js → appearance-wlMh61hK.js} +1 -1
  14. package/dist/assets/{arrow-down.svg-C3DZxwUV.js → arrow-down.svg-2NUXhc9M.js} +1 -1
  15. package/dist/assets/{audit-logs-BiFwhSvl.js → audit-logs-OiH-ZCCu.js} +1 -1
  16. package/dist/assets/{authorize-FiuAZHUA.js → authorize-C1p1aX84.js} +1 -1
  17. package/dist/assets/{base32-Ccz4U5Ob.js → base32-Bs5DmmgZ.js} +1 -1
  18. package/dist/assets/{bind-account-BR2YWYwk.js → bind-account-CnWbtI8I.js} +1 -1
  19. package/dist/assets/{branding-DiGxInL8.js → branding-Bk8D93gd.js} +2 -2
  20. package/dist/assets/{branding-Cq_kEjOF.js → branding-BnhQzGq_.js} +1 -1
  21. package/dist/assets/{branding-B7YBinhB.js → branding-C1lgysY6.js} +1 -1
  22. package/dist/assets/{bundle-avatar-D8QkKBVi.js → bundle-avatar-CF-8YjIk.js} +1 -1
  23. package/dist/assets/{complete-uOY3lczm.js → complete-C_JNPzD5.js} +1 -1
  24. package/dist/assets/{component-CMw-pVd2.js → component-IFve4dXC.js} +3 -3
  25. package/dist/assets/{config-DIuLHS8J.js → config-BPieGs6J.js} +1 -1
  26. package/dist/assets/{config-T8EypEzR.js → config-CKpqEH5r.js} +1 -1
  27. package/dist/assets/{config-C7Wu3S5C.js → config-DBzwJyqc.js} +1 -1
  28. package/dist/assets/{config-navigation-CQlAn_Fg.js → config-navigation-pmywYpni.js} +3 -3
  29. package/dist/assets/{config-space-BVmSIh3O.js → config-space-Da0MmMPn.js} +1 -1
  30. package/dist/assets/{confirm-BAs5EAFg.js → confirm-BSaR4_fO.js} +1 -1
  31. package/dist/assets/{connect-BPVdZurv.js → connect-9m4Nmfes.js} +1 -1
  32. package/dist/assets/{connect-NnsibVv5.js → connect-BuRk8HoH.js} +1 -1
  33. package/dist/assets/{connect-to-D2kVCXUW.js → connect-to-DhIpK6hj.js} +1 -1
  34. package/dist/assets/{dashboard-CpCxXsDT.js → dashboard-DgmOVZgS.js} +3 -3
  35. package/dist/assets/{delete-confirm-ARBINDJj.js → delete-confirm-BR2z4Ljn.js} +1 -1
  36. package/dist/assets/{domain-B6x4146t.js → domain-CkwVqsGZ.js} +1 -1
  37. package/dist/assets/{domain-action-card-CVS3TpUQ.js → domain-action-card-DmX4ipuD.js} +1 -1
  38. package/dist/assets/{domains-BfVUABUm.js → domains-IK6JBOMk.js} +1 -1
  39. package/dist/assets/{email-o5PQki4m.js → email-C7dt-OoA.js} +1 -1
  40. package/dist/assets/engine-B4t4bO94.js +1 -0
  41. package/dist/assets/{exchange-passport-BIcDPCdx.js → exchange-passport-BlpeYXD-.js} +1 -1
  42. package/dist/assets/{form-DeTq6JLt.js → form-BoRGzdQH.js} +1 -1
  43. package/dist/assets/{fuel-CYXB7lNo.js → fuel-DPqYXNcT.js} +1 -1
  44. package/dist/assets/{gen-access-key-CK6ABJ7d.js → gen-access-key-DTf8XM_B.js} +1 -1
  45. package/dist/assets/{gen-simple-access-key-DSfDrkH_.js → gen-simple-access-key-BHpsJW1z.js} +1 -1
  46. package/dist/assets/{get-safe-url-C_gWJx9x.js → get-safe-url-C5Vpma4S.js} +1 -1
  47. package/dist/assets/{hdkey-CRIeweuD.js → hdkey-iF7Zd5Mt.js} +1 -1
  48. package/dist/assets/{home-keIz_0pz.js → home-Bq8Kaby6.js} +1 -1
  49. package/dist/assets/{iframe-7-UjiotN.js → iframe-BZdurKlN.js} +1 -1
  50. package/dist/assets/{index-DwFmgPTz.js → index-0r-rUxmD.js} +1 -1
  51. package/dist/assets/{index-CndEvJBJ.js → index-6k6hDX7K.js} +4 -4
  52. package/dist/assets/{index-DX_0Aq5L.js → index-BE6_aQqm.js} +1 -1
  53. package/dist/assets/{index-x_ddpRFT.js → index-BJftyOWK.js} +1 -1
  54. package/dist/assets/{index-74AbVj6G.js → index-BTbAsTsB.js} +1 -1
  55. package/dist/assets/{index-DWKcHcSX.js → index-BcOGe7jx.js} +1 -1
  56. package/dist/assets/{index-IfDPTJfj.js → index-BioPPNyR.js} +1 -1
  57. package/dist/assets/{index-2WK89lpX.js → index-BxgIheOv.js} +1 -1
  58. package/dist/assets/{index-C9c1djN6.js → index-C7WNgxRc.js} +1 -1
  59. package/dist/assets/{index-IbUh2bsl.js → index-C91ORskB.js} +1 -1
  60. package/dist/assets/{index-EyN3xjNK.js → index-CvK2LB0C.js} +3 -3
  61. package/dist/assets/{index-8j3VjBVi.js → index-Cw5ltvNg.js} +1 -1
  62. package/dist/assets/{index-BOhhZADu.js → index-D0zr5fnU.js} +4 -4
  63. package/dist/assets/{index-ClW80nSf.js → index-DGBu1iXZ.js} +1 -1
  64. package/dist/assets/{index-6ZWzS1uw.js → index-DIzco3bK.js} +1 -1
  65. package/dist/assets/{index-B0NAcL5r.js → index-DVNnjX93.js} +1 -1
  66. package/dist/assets/{index-DxR3NtV9.js → index-DlbJhxX4.js} +1 -1
  67. package/dist/assets/{index-DCk5kGsh.js → index-DtDqVnOd.js} +1 -1
  68. package/dist/assets/{index-BNPLpp0r.js → index-DzHxtRuX.js} +1 -1
  69. package/dist/assets/{index-B65XBOLV.js → index-VRhIKoNb.js} +1 -1
  70. package/dist/assets/{index-CsmgTpTJ.js → index-ZScchkNG.js} +1 -1
  71. package/dist/assets/{index-BMBJylNT.js → index-klWBrV7H.js} +1 -1
  72. package/dist/assets/{index-CjxZFYCF.js → index-ptPisY0K.js} +1 -1
  73. package/dist/assets/{invitation-BY2PtFvw.js → invitation-BbSlWYAY.js} +1 -1
  74. package/dist/assets/{invite-Cr9pbzvJ.js → invite-DKkAcNxp.js} +1 -1
  75. package/dist/assets/{isURL-CfmrW_0C.js → isURL-BOLVWN6q.js} +1 -1
  76. package/dist/assets/{issue-passport-D97rQRNT.js → issue-passport-kvrsHOXO.js} +1 -1
  77. package/dist/assets/{item-C1_2OTms.js → item-CRpPGQS5.js} +1 -1
  78. package/dist/assets/{landing-page-BoP0vrKb.js → landing-page-Bb2t2ubc.js} +1 -1
  79. package/dist/assets/{layout-BakYeqaY.js → layout-O4FRf5d2.js} +1 -1
  80. package/dist/assets/{list-DTe8sKwq.js → list-BeJAd6oJ.js} +3 -3
  81. package/dist/assets/{list-Bfj_fOi0.js → list-BmwWshfg.js} +1 -1
  82. package/dist/assets/{localization-DcpcwZBX.js → localization-EdFO66I_.js} +1 -1
  83. package/dist/assets/{log-BLHTF_kk.js → log-DwbFr2nR.js} +1 -1
  84. package/dist/assets/{login-PJHIZpiF.js → login-D2_PE9lX.js} +1 -1
  85. package/dist/assets/{login-oauth-callback-BjziPtPn.js → login-oauth-callback-BQNBl6bZ.js} +1 -1
  86. package/dist/assets/{logo-uploader-DNn2MCLm.js → logo-uploader-vRfbxowv.js} +2 -2
  87. package/dist/assets/{lost-passport-ChRfu4fx.js → lost-passport-pY1dhWDO.js} +1 -1
  88. package/dist/assets/{open-window-BRoSM1sQ.js → open-window-C0eYx4_v.js} +1 -1
  89. package/dist/assets/{over-due-invoice-payment-nX6ANuRm.js → over-due-invoice-payment-OBj9thMb.js} +1 -1
  90. package/dist/assets/{overview-CLlEtBem.js → overview-Rpt1OYCM.js} +1 -1
  91. package/dist/assets/{passport-item-BbcSxETN.js → passport-item-Bq1c8VJl.js} +1 -1
  92. package/dist/assets/{permission-D4s1M96M.js → permission-Doi0-9cF.js} +1 -1
  93. package/dist/assets/{preferences-B-KNknmh.js → preferences-zYe_BxLJ.js} +1 -1
  94. package/dist/assets/{profile-embed-0Ro9kKTX.js → profile-embed-BqOWDoBR.js} +1 -1
  95. package/dist/assets/{publish-resource-1jZoHwxW.js → publish-resource-CnXtK3LB.js} +1 -1
  96. package/dist/assets/{runtime-DiVv_EHB.js → runtime-DjdnpZoh.js} +1 -1
  97. package/dist/assets/sdk-ChXfsb2q.js +1 -0
  98. package/dist/assets/{security-Cmd-bjYK.js → security-Bdj-FYH4.js} +1 -1
  99. package/dist/assets/{session-BrZcMmG5.js → session-D-9YOhAy.js} +1 -1
  100. package/dist/assets/{setup-BVolXtjE.js → setup-CYAJarl4.js} +1 -1
  101. package/dist/assets/{spaces-CHljP8tP.js → spaces-Cq_dfNLt.js} +1 -1
  102. package/dist/assets/{start-CYrTYI-f.js → start-EO_1F43S.js} +1 -1
  103. package/dist/assets/{status--5cDGjcC.js → status-DJWbsb5u.js} +1 -1
  104. package/dist/assets/{step-actions-CqrWvcHB.js → step-actions-C91dncKW.js} +1 -1
  105. package/dist/assets/{studio-BsPkV54q.js → studio-B3QjabKr.js} +1 -1
  106. package/dist/assets/{team-DSjEanO-.js → team-RDmDo4cZ.js} +1 -1
  107. package/dist/assets/{traffic-mRcZHvLN.js → traffic-BUIhb2HS.js} +1 -1
  108. package/dist/assets/{transfer-CuD5trOJ.js → transfer-Dfbnhl7y.js} +1 -1
  109. package/dist/assets/{unsubscribe-yhkp0l4C.js → unsubscribe-Xjc5jAJO.js} +1 -1
  110. package/dist/assets/{use-app-logo-BZU1I0dB.js → use-app-logo-DesKuFha.js} +1 -1
  111. package/dist/assets/{user-center-5ESBGQA5.js → user-center-DdBnHKdX.js} +3 -3
  112. package/dist/assets/{user-follower-B6mKehgT.js → user-follower-DuL1BMYz.js} +1 -1
  113. package/dist/assets/{user-sessions-DN6scq-_.js → user-sessions-SImh8rHV.js} +1 -1
  114. package/dist/assets/{util-HCACAM-i.js → util-BlUZ4Q2D.js} +1 -1
  115. package/dist/assets/{util-BXcTwFDD.js → util-CHZLxs1T.js} +1 -1
  116. package/dist/assets/{wait-connect-CbVia-91.js → wait-connect-zz_yxj4x.js} +1 -1
  117. package/dist/assets/{wizard-B_NDaiA9.js → wizard-CRrvtL2U.js} +1 -1
  118. package/dist/assets/{wizard-components-DsmO8JXs.js → wizard-components-CR8h5HCI.js} +2 -2
  119. package/dist/assets/{wrap-locale-CScOhszz.js → wrap-locale-BraEpa0W.js} +1 -1
  120. package/dist/assets/{zh-C2gGkXmP.js → zh-DQDxmpdl.js} +1 -1
  121. package/dist/index.html +1 -1
  122. package/dist/service-worker.js +1 -1
  123. package/package.json +25 -25
  124. package/dist/assets/engine-Coh-wnMb.js +0 -1
  125. package/dist/assets/sdk-DqccdvPq.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-BLHTF_kk.js","assets/vendor-mui-core-CmD-NPnl.js","assets/vendor-react-Dvs43sk9.js","assets/useLocalStorage-vyIYLydJ.js","assets/vendor-ux-ESjuHpb6.js","assets/vendor-utils-DQK0pEML.js","assets/vendor-hooks-DLNZ8kxG.js","assets/lottie-web-4koyQiv_.js","assets/vendor-ux-DYcPPYq2.css","assets/index-CndEvJBJ.js","assets/vendor-arcblock-C-xQV6LY.js","assets/index-DrVXX4fX.css","assets/bundle-avatar-D8QkKBVi.js","assets/index-x_ddpRFT.js","assets/index-DX_0Aq5L.js","assets/user-sessions-DN6scq-_.js","assets/hdkey-CRIeweuD.js","assets/did-address-D6qV21Cc.js","assets/team-DSjEanO-.js","assets/session-BrZcMmG5.js","assets/isURL-CfmrW_0C.js","assets/use-app-logo-BZU1I0dB.js","assets/permission-D4s1M96M.js","assets/click-to-copy-BWrdBff2.js","assets/index-DxR3NtV9.js","assets/arrow-down.svg-C3DZxwUV.js","assets/vendor-mui-x--K2rEM1j.js","assets/AdapterDayjs-CRMDLq6K.js","assets/index-DBs9Ljax.js","assets/useAsync-DZevTxbv.js","assets/useAsync-CNAYLnLm.js","assets/index-1BANSka2.js","assets/confirm-BAs5EAFg.js","assets/index-B65XBOLV.js","assets/util-BXcTwFDD.js","assets/base32-Ccz4U5Ob.js","assets/sdk-DqccdvPq.js","assets/user-follower-B6mKehgT.js","assets/use-mobile-D93Bk2Ru.js","assets/actions-CL4xTGOh.js","assets/shorten-label-Cbu8wo9m.js","assets/get-safe-url-C_gWJx9x.js","assets/useAsyncRetry-6TjWJyO6.js","assets/useSetState-DFuQZPPV.js","assets/index-2WK89lpX.js","assets/over-due-invoice-payment-nX6ANuRm.js","assets/use-mobile-CQ7Tw4aD.js","assets/index-DwFmgPTz.js","assets/index.esm-JPZAjt0x.js","assets/table-tips-B7dQ0Rgb.js","assets/index-BOhhZADu.js","assets/empty-spinner-DCC7mgEb.js","assets/list-header-CoFZp82R.js","assets/question-mark-circle.svg-B4stD6SS.js","assets/engine-Coh-wnMb.js","assets/api-sewNv0AE.js","assets/react-beautiful-dnd.esm-5xsARSNi.js","assets/raf-schd.esm-CHNehTG3.js","assets/wait-connect-CbVia-91.js","assets/item-C1_2OTms.js","assets/delete-confirm-ARBINDJj.js","assets/index-DEdn8u__.js","assets/index-kiLQKwVa.js","assets/index-gnjjKJuC.css","assets/index-gcYTlYEZ.js","assets/overview-CLlEtBem.js","assets/keyboard-arrow-down-rounded-8U0_i9QO.js","assets/index-BojVbZw0.js","assets/status--5cDGjcC.js","assets/omit-C2ouGG7F.js","assets/spaces-CHljP8tP.js","assets/domains-BfVUABUm.js","assets/domain-action-card-CVS3TpUQ.js","assets/util-HCACAM-i.js","assets/index-DWKcHcSX.js","assets/passport-item-BbcSxETN.js","assets/index-BUKvf-Yt.js","assets/Google-Co0ES_Ef.js","assets/cloneDeep-sSKmkjV3.js","assets/edit.svg-DycWG9v3.js","assets/lock.svg-COUP8tyO.js","assets/appearance-CiCcnDqj.js","assets/audit-logs-BiFwhSvl.js","assets/index-IfDPTJfj.js","assets/section-CndbjVtx.js","assets/required-B2SKELXR.js","assets/collapse-GMtfQlRs.js","assets/list-Bfj_fOi0.js","assets/server-logo-notext.svg-CKQB0tIp.js","assets/traffic-mRcZHvLN.js","assets/iframe-7-UjiotN.js","assets/index-CGdAaiDX.js","assets/base-chart-BntWHeFy.js","assets/index-DO9UDa6G.js","assets/config-navigation-CQlAn_Fg.js","assets/index-BPy8_fa2.js","assets/createClass-BFCNnTU0.js","assets/simple-select-BqhbnnqN.js","assets/index-8j3VjBVi.js","assets/index-BMBJylNT.js","assets/index-CjxZFYCF.js","assets/index-DRYJ0xIl.js","assets/connect-to-D2kVCXUW.js","assets/config-space-BVmSIh3O.js","assets/switch-control-o8fDOnJX.js","assets/index-C9c1djN6.js","assets/security-Cmd-bjYK.js","assets/config-C7Wu3S5C.js","assets/branding-B7YBinhB.js","assets/sanitize-BwaMGjTb.js","assets/form-text-input-qFGxuulC.js","assets/form-wrapper-BCRhnWhi.js","assets/logo-uploader-DNn2MCLm.js","assets/advanced-BalF9O34.js","assets/runtime-DiVv_EHB.js","assets/index-DCk5kGsh.js","assets/list-DTe8sKwq.js","assets/index-6ZWzS1uw.js","assets/config-DIuLHS8J.js","assets/observability-oDc3dKFA.js","assets/playground-Dk2enS21.js","assets/component-CMw-pVd2.js","assets/add-component-core-ETZM-c0n.js","assets/launch-result-message-DN12F68Q.js","assets/page-header-8LlFejLk.js","assets/index-BNPLpp0r.js","assets/content-layout-DYZYIlLo.js","assets/search-4YYphs0l.js","assets/add-component-core-G0iZE90Q.css","assets/index-CsmgTpTJ.js"])))=>i.map(i=>d[i]);
2
- import{G as tn,D as ht,H as F,T as U,aV as nn,aW as wo,al as So,M as on,ab as rn,E as Et,V as jo,L as Co,O as ko,_}from"./vendor-ux-ESjuHpb6.js";import{j as i,W as S,aZ as Eo,cJ as Io,d0 as _o,ch as To,dc as Lo,dd as Do,cL as Ao,de as Po,d4 as Ro,df as Mo,I as Ne,aQ as Oo,aR as No,aX as gt,a3 as Uo,M as zo,aO as Bo,a6 as V,aP as $o,bg as Fo,at as Ue,T as ee,bp as Vo,b6 as It,bq as _t,ak as I,D as pe,J as oe,ah as ze,ao as Ho,dg as Wo,aj as qo,dh as sn,di as an,dj as cn,am as de,a$ as _e,dk as Tt,U as Q,aN as ln,Y as un,bZ as Ko,dl as Go,dm as Qo,Q as Zo,dn as Xo}from"./vendor-mui-core-CmD-NPnl.js";import{r as m,L as dn,i as fn,g as Jo,k as Yo,j as er}from"./vendor-react-Dvs43sk9.js";import{Z as Be,f as N,X as qe,al as Ke,c as P,Y as Lt,bF as tr,ar as nr,a8 as or,v as rr,bG as sr,bH as pn,ap as te,bI as mn,aO as ir,bJ as ar,W as cr,b5 as lr,b6 as ur,bK as dr,b7 as fr,bL as pr,bM as mr,ak as hr,bN as Ge,bO as gr,bP as xr,b4 as br,a as hn,B as gn,m as me,a6 as yr,k as vr,aa as wr,n as Dt,bQ as At,i as Sr,l as jr,r as Cr,p as se,o as kr,q as Er,P as Ir,I as _r,N as Tr,bE as Lr,$ as Dr,d as Pt,t as Ar}from"./index-CndEvJBJ.js";import{a9 as Pr,C as W,J as xn,Q as Rr}from"./vendor-utils-DQK0pEML.js";import{o as Ae}from"./vendor-arcblock-C-xQV6LY.js";import{u as Rt}from"./useLocalStorage-vyIYLydJ.js";import{f as xt}from"./index-DBs9Ljax.js";import{C as Mt}from"./confirm-BAs5EAFg.js";import{g as Ot}from"./get-safe-url-C_gWJx9x.js";import{u as bn}from"./session-BrZcMmG5.js";import{a as ae,l as Mr}from"./vendor-hooks-DLNZ8kxG.js";import{j as Or,b as Nr,M as Ur,a as zr,T as Br,N as $r}from"./team-DSjEanO-.js";import{D as Fr,u as yn}from"./useAsyncRetry-6TjWJyO6.js";import{u as vn}from"./useSetState-DFuQZPPV.js";import{x as Vr,d as Hr}from"./index-2WK89lpX.js";import{O as Wr}from"./over-due-invoice-payment-nX6ANuRm.js";import{u as qr}from"./use-mobile-CQ7Tw4aD.js";const wn=m.createContext({});function Sn({children:e,type:t="blocklets"}){const[n,r]=m.useState([]),o=m.useRef([]),s=l=>{if(!o.current.includes(l)){const u=[...o.current,l];r(u),o.current=u}},a=l=>{if(o.current.includes(l)){const u=o.current.filter(d=>d!==l);r(u),o.current=u}},c=l=>{const u=n.filter(p=>l.find(f=>f===p));Pr(u,n).forEach(p=>a(p))};return i.jsx(wn.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:s,removeDeletingDid:a,matchDeletingDid:c},children:e})}Sn.propTypes={type:S.string,children:S.node.isRequired};function Xa(){return m.useContext(wn)}const Kr=e=>m.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.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"})),Y={Start:Eo,Stop:Io,Restart:_o,Reload:Mo,Remove:To,Config:Ro,Log:Po,Group:Ao,Cancel:Lo,Dashboard:Kr,Overview:Do},Gr=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(W(n.origin,t));return o.search=r.toString(),o.toString()},Qr="internal",Zr="external";function jn({blocklet:e,onStart:t,onComplete:n,variant:r="menu",hasPermission:o=!1,getComponentUrl:s=null,useBlockletUrlEvaluation:a=()=>({loading:!1,recommendedUrl:window?.location?.href}),...c}){const l=Be(),[u,d]=m.useState(null),[p,f]=m.useState(null),[x,y]=m.useState(!1),[h,C]=m.useState(null),{t:v}=m.useContext(tn),[j]=Rt("skip-blocklet-setup",!1),{loading:g,recommendedUrl:E}=a(e),[k]=Rt("blocklet-type-filter",Qr),b=N.isInProgress(e.status),[T,M]=m.useState(!1);m.useEffect(()=>{if(!e?.controller)return;M(e?.controller?.status?.value===qe.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}M([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:R}=l,O=(w,D,K=!1)=>async()=>{const G=async Se=>{t({action:w,blocklet:e}),y(!0),f(w);let je=!1;try{if(w==="remove")await D(Se);else if(w==="start"){if(!N.hasRunnableComponent(e)){F.error(v("blocklet.noComponent"));return}if(!R&&!j&&!e.settings?.initialized&&e.mode!==qe.BLOCKLET_MODES.DEVELOPMENT){if(!E||!Lt(E)){F.error(v("blocklet.gotoVisitError"));return}const z=tr(l.info),kt=new URL(E);kt.searchParams.set("serverUrl",z),window.open(Ot(kt.href,{allowDomains:null})),n({action:w,blocklet:e});return}const $=e.children.filter(z=>!N.isInProgress(z.status)&&z.status!=="running").map(z=>z.meta.did),J={did:e.meta.did,componentDids:$};await D({input:J})}else if(["stop","restart","reload"].includes(w)){const $=e.children.filter(z=>z.status==="running").map(z=>z.meta.did),J={did:e.meta.did,componentDids:$};await D({input:J})}else{const $={did:e.meta.did};await D({input:$})}w==="remove"?je=!0:await nr(1e3),w==="reload"&&F.success(v("blocklet.reloadSuccess")),C(null),n({action:w,blocklet:e})}catch($){const J=`Blocklet ${w} failed: ${xt($)}`;throw n({action:w,blocklet:e,error:new Error(J)}),new Error(J)}finally{je||y(!1)}},ve=()=>{y(!1),C(null)},we=N.getDisplayName(e,!0),yo=e.mode===qe.BLOCKLET_MODES.DEVELOPMENT?{description:()=>i.jsx(ee,{component:"div",children:i.jsx(ee,{gutterBottom:!0,children:v("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Se,je)=>i.jsxs(ee,{component:"div",children:[i.jsx(ee,{gutterBottom:!0,children:v("blocklet.action.removeApplicationDescription")}),i.jsxs(Vo,{name:"removeType",value:Se.removeType,onChange:$=>je({...Se,removeType:$.target.value}),children:[i.jsx(It,{value:"backup",control:i.jsx(_t,{}),label:v("blocklet.action.removeApplicationAfterBackup")}),i.jsx(It,{value:"complete",control:i.jsx(_t,{}),label:v("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},vo={stop:{title:`${v("common.stop")} ${we}`,description:v("blocklet.action.stopDescription"),confirm:v("blocklet.action.confirmStop"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve},restart:{title:`${v("common.restart")} ${we}`,description:v("blocklet.action.restartDescription"),confirm:v("blocklet.action.confirmRestart"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve},remove:{title:`${v("common.remove")} ${we}`,confirm:v("blocklet.action.confirmRemove"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve,...yo},cancelDownload:{title:`${v("common.cancel")}`,description:v("blocklet.action.cancelDownloadDescription",{name:we}),confirm:v("common.confirm"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve}};K?C(vo[w]):await G()},We=!!u,po=w=>{try{w.stopPropagation(),w.preventDefault()}catch{}d(w.currentTarget)},mo=w=>{try{w.stopPropagation(),w.preventDefault()}catch{}d(null)},Ct=async(w,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof w.handler=="function")try{y(!0),f(w.action),await w.handler()}catch(K){console.error(`Blocklet ${w.name} failed: `,K)}finally{y(!1),d(null)}else d(null)},ho=!R&&N.isDeletableBlocklet(e)?{action:"remove",icon:Y.Remove,name:v("common.remove"),handler:O("remove",async({removeType:w})=>{w==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:b}:null,go={action:"remove",icon:({sx:w,...D})=>i.jsx(Y.Cancel,{sx:{...w,paddingRight:"2px",zoom:.95},...D}),name:v("common.cancel"),handler:O("cancelDownload",l.api.cancelDownloadBlocklet,!0)},xo=N.getAppMissingConfigs(e),bo=()=>{const w=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=s?.({mountPoint:w,blocklet:e});if(!D||!Lt(D)){F.error(v("blocklet.gotoVisitError"));return}const K=e?.site?.domainAliases;window.open(Ot(Gr(D,`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`),{allowDomains:K?.map(G=>G.value)}))};let ye=[{action:"start",icon:Y.Start,inExternal:!0,name:v("common.start"),handler:O("start",l.api.startBlocklet),disabled:T||e.children.every(w=>w.status==="running")||Ke(e.status)||g||b},{action:"stop",icon:Y.Stop,inExternal:!0,name:v("common.stop"),handler:O("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:Y.Restart,name:v("common.restart"),handler:O("restart",l.api.restartBlocklet,!0),disabled:T||e.status!=="running"},Ke(e.status)?go:ho,{separator:!0},R?null:{action:"dashboard",icon:({style:w,...D})=>i.jsx(Y.Dashboard,{...D,style:{...w,width:"26px",height:"26px",paddingRight:"3px"}}),name:v("sidebar.dashboard"),handler:bo}].filter(Boolean);return k===Zr&&(ye=ye.filter(w=>w.inExternal)),r==="menu"?i.jsxs(Nt,{"data-cy":"blocklet-actions",children:[i.jsx(Ne,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:po,size:"small",disabled:!o||!Ke(e.status)&&x,children:i.jsx(Oo,{})}),i.jsxs(No,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:We,onClose:mo,PaperProps:{},children:[xo.length>0&&i.jsxs(gt,{style:{maxWidth:"400px"},severity:"error",children:[v("blocklet.config.missingRequired"),i.jsx("br",{}),i.jsx(dn,{to:`/blocklets/${e.meta.did}/components`,children:v("blocklet.config.gotoFix")})]}),ye.map((w,D)=>w.separator?i.jsx(Uo,{},`separator-${D}`):i.jsxs(zo,{dense:!0,onClick:K=>Ct(w,K),disabled:x||w.disabled,"data-cy":`${w.action}-blocklet`,children:[i.jsx(Bo,{style:{minWidth:24},children:p===w.action&&x?i.jsx(V,{size:16,sx:{marginRight:1}}):i.jsx(w.icon,{fontSize:"small"})}),i.jsx($o,{primary:w.name})]},w.name))]}),h&&i.jsx(Mt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):i.jsxs(Nt,{"data-cy":"blocklet-actions",...c,children:[i.jsx(Fo,{children:ye.filter(w=>!w.separator&&!w.onlyInMenu).map(w=>i.jsxs(ht,{title:w.name,"data-cy":`${w.action}-blocklet`,onClick:()=>Ct(w),disabled:!!w.disabled||x,children:[p===w.action&&x?i.jsx(V,{size:16,sx:{marginRight:1}}):i.jsx(w.icon,{}),i.jsx("span",{className:"blocklet-action-text",children:w.name})]},w.name))}),h&&i.jsx(Mt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}jn.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 Nt=Ue.div`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-DwbFr2nR.js","assets/vendor-mui-core-CmD-NPnl.js","assets/vendor-react-Dvs43sk9.js","assets/useLocalStorage-vyIYLydJ.js","assets/vendor-ux-ESjuHpb6.js","assets/vendor-utils-DQK0pEML.js","assets/vendor-hooks-DLNZ8kxG.js","assets/lottie-web-4koyQiv_.js","assets/vendor-ux-DYcPPYq2.css","assets/index-6k6hDX7K.js","assets/vendor-arcblock-C-xQV6LY.js","assets/index-DrVXX4fX.css","assets/bundle-avatar-CF-8YjIk.js","assets/index-BJftyOWK.js","assets/index-BE6_aQqm.js","assets/user-sessions-SImh8rHV.js","assets/hdkey-iF7Zd5Mt.js","assets/did-address-D6qV21Cc.js","assets/team-RDmDo4cZ.js","assets/session-D-9YOhAy.js","assets/isURL-BOLVWN6q.js","assets/use-app-logo-DesKuFha.js","assets/permission-Doi0-9cF.js","assets/click-to-copy-BWrdBff2.js","assets/index-DlbJhxX4.js","assets/arrow-down.svg-2NUXhc9M.js","assets/vendor-mui-x--K2rEM1j.js","assets/AdapterDayjs-CRMDLq6K.js","assets/index-DBs9Ljax.js","assets/useAsync-DZevTxbv.js","assets/useAsync-CNAYLnLm.js","assets/index-1BANSka2.js","assets/confirm-BSaR4_fO.js","assets/index-VRhIKoNb.js","assets/util-CHZLxs1T.js","assets/base32-Bs5DmmgZ.js","assets/sdk-ChXfsb2q.js","assets/user-follower-DuL1BMYz.js","assets/use-mobile-D93Bk2Ru.js","assets/actions-CL4xTGOh.js","assets/shorten-label-Cbu8wo9m.js","assets/get-safe-url-C5Vpma4S.js","assets/useAsyncRetry-6TjWJyO6.js","assets/useSetState-DFuQZPPV.js","assets/index-BxgIheOv.js","assets/over-due-invoice-payment-OBj9thMb.js","assets/use-mobile-CQ7Tw4aD.js","assets/index-0r-rUxmD.js","assets/index.esm-JPZAjt0x.js","assets/table-tips-B7dQ0Rgb.js","assets/index-D0zr5fnU.js","assets/empty-spinner-DCC7mgEb.js","assets/list-header-CoFZp82R.js","assets/question-mark-circle.svg-B4stD6SS.js","assets/engine-B4t4bO94.js","assets/api-sewNv0AE.js","assets/react-beautiful-dnd.esm-5xsARSNi.js","assets/raf-schd.esm-CHNehTG3.js","assets/wait-connect-zz_yxj4x.js","assets/item-CRpPGQS5.js","assets/delete-confirm-BR2z4Ljn.js","assets/index-DEdn8u__.js","assets/index-kiLQKwVa.js","assets/index-gnjjKJuC.css","assets/index-gcYTlYEZ.js","assets/overview-Rpt1OYCM.js","assets/keyboard-arrow-down-rounded-8U0_i9QO.js","assets/index-BojVbZw0.js","assets/status-DJWbsb5u.js","assets/omit-C2ouGG7F.js","assets/spaces-Cq_dfNLt.js","assets/domains-IK6JBOMk.js","assets/domain-action-card-DmX4ipuD.js","assets/util-BlUZ4Q2D.js","assets/index-BcOGe7jx.js","assets/passport-item-Bq1c8VJl.js","assets/index-BUKvf-Yt.js","assets/Google-Co0ES_Ef.js","assets/cloneDeep-sSKmkjV3.js","assets/edit.svg-DycWG9v3.js","assets/lock.svg-COUP8tyO.js","assets/appearance-wlMh61hK.js","assets/audit-logs-OiH-ZCCu.js","assets/index-BioPPNyR.js","assets/section-CndbjVtx.js","assets/required-B2SKELXR.js","assets/collapse-GMtfQlRs.js","assets/list-BmwWshfg.js","assets/server-logo-notext.svg-CKQB0tIp.js","assets/traffic-BUIhb2HS.js","assets/iframe-BZdurKlN.js","assets/index-CGdAaiDX.js","assets/base-chart-BntWHeFy.js","assets/index-DO9UDa6G.js","assets/config-navigation-pmywYpni.js","assets/index-BPy8_fa2.js","assets/createClass-BFCNnTU0.js","assets/simple-select-BqhbnnqN.js","assets/index-Cw5ltvNg.js","assets/index-klWBrV7H.js","assets/index-ptPisY0K.js","assets/index-DRYJ0xIl.js","assets/connect-to-DhIpK6hj.js","assets/config-space-Da0MmMPn.js","assets/switch-control-o8fDOnJX.js","assets/index-C7WNgxRc.js","assets/security-Bdj-FYH4.js","assets/config-DBzwJyqc.js","assets/branding-C1lgysY6.js","assets/sanitize-BwaMGjTb.js","assets/form-text-input-qFGxuulC.js","assets/form-wrapper-BCRhnWhi.js","assets/logo-uploader-vRfbxowv.js","assets/advanced-BHQ085Rc.js","assets/runtime-DjdnpZoh.js","assets/index-DtDqVnOd.js","assets/list-BeJAd6oJ.js","assets/index-DIzco3bK.js","assets/config-BPieGs6J.js","assets/observability-oDc3dKFA.js","assets/playground-Dk2enS21.js","assets/component-IFve4dXC.js","assets/add-component-core-C8Wvhlwd.js","assets/launch-result-message-DN12F68Q.js","assets/page-header-8LlFejLk.js","assets/index-DzHxtRuX.js","assets/content-layout-DYZYIlLo.js","assets/search-4YYphs0l.js","assets/add-component-core-G0iZE90Q.css","assets/index-ZScchkNG.js"])))=>i.map(i=>d[i]);
2
+ import{G as tn,D as ht,H as F,T as U,aV as nn,aW as wo,al as So,M as on,ab as rn,E as Et,V as jo,L as Co,O as ko,_}from"./vendor-ux-ESjuHpb6.js";import{j as i,W as S,aZ as Eo,cJ as Io,d0 as _o,ch as To,dc as Lo,dd as Do,cL as Ao,de as Po,d4 as Ro,df as Mo,I as Ne,aQ as Oo,aR as No,aX as gt,a3 as Uo,M as zo,aO as Bo,a6 as V,aP as $o,bg as Fo,at as Ue,T as ee,bp as Vo,b6 as It,bq as _t,ak as I,D as pe,J as oe,ah as ze,ao as Ho,dg as Wo,aj as qo,dh as sn,di as an,dj as cn,am as de,a$ as _e,dk as Tt,U as Q,aN as ln,Y as un,bZ as Ko,dl as Go,dm as Qo,Q as Zo,dn as Xo}from"./vendor-mui-core-CmD-NPnl.js";import{r as m,L as dn,i as fn,g as Jo,k as Yo,j as er}from"./vendor-react-Dvs43sk9.js";import{Z as Be,f as N,X as qe,al as Ke,c as P,Y as Lt,bF as tr,ar as nr,a8 as or,v as rr,bG as sr,bH as pn,ap as te,bI as mn,aO as ir,bJ as ar,W as cr,b5 as lr,b6 as ur,bK as dr,b7 as fr,bL as pr,bM as mr,ak as hr,bN as Ge,bO as gr,bP as xr,b4 as br,a as hn,B as gn,m as me,a6 as yr,k as vr,aa as wr,n as Dt,bQ as At,i as Sr,l as jr,r as Cr,p as se,o as kr,q as Er,P as Ir,I as _r,N as Tr,bE as Lr,$ as Dr,d as Pt,t as Ar}from"./index-6k6hDX7K.js";import{a9 as Pr,C as W,J as xn,Q as Rr}from"./vendor-utils-DQK0pEML.js";import{o as Ae}from"./vendor-arcblock-C-xQV6LY.js";import{u as Rt}from"./useLocalStorage-vyIYLydJ.js";import{f as xt}from"./index-DBs9Ljax.js";import{C as Mt}from"./confirm-BSaR4_fO.js";import{g as Ot}from"./get-safe-url-C5Vpma4S.js";import{u as bn}from"./session-D-9YOhAy.js";import{a as ae,l as Mr}from"./vendor-hooks-DLNZ8kxG.js";import{j as Or,b as Nr,M as Ur,a as zr,T as Br,N as $r}from"./team-RDmDo4cZ.js";import{D as Fr,u as yn}from"./useAsyncRetry-6TjWJyO6.js";import{u as vn}from"./useSetState-DFuQZPPV.js";import{x as Vr,d as Hr}from"./index-BxgIheOv.js";import{O as Wr}from"./over-due-invoice-payment-OBj9thMb.js";import{u as qr}from"./use-mobile-CQ7Tw4aD.js";const wn=m.createContext({});function Sn({children:e,type:t="blocklets"}){const[n,r]=m.useState([]),o=m.useRef([]),s=l=>{if(!o.current.includes(l)){const u=[...o.current,l];r(u),o.current=u}},a=l=>{if(o.current.includes(l)){const u=o.current.filter(d=>d!==l);r(u),o.current=u}},c=l=>{const u=n.filter(p=>l.find(f=>f===p));Pr(u,n).forEach(p=>a(p))};return i.jsx(wn.Provider,{value:{type:t,deletingBlocklets:n,addDeletingDid:s,removeDeletingDid:a,matchDeletingDid:c},children:e})}Sn.propTypes={type:S.string,children:S.node.isRequired};function Xa(){return m.useContext(wn)}const Kr=e=>m.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.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"})),Y={Start:Eo,Stop:Io,Restart:_o,Reload:Mo,Remove:To,Config:Ro,Log:Po,Group:Ao,Cancel:Lo,Dashboard:Kr,Overview:Do},Gr=(e,t)=>{if(!e)return"";if(!t)return e;const n=new URL(e),r=new URLSearchParams(n.searchParams),o=new URL(W(n.origin,t));return o.search=r.toString(),o.toString()},Qr="internal",Zr="external";function jn({blocklet:e,onStart:t,onComplete:n,variant:r="menu",hasPermission:o=!1,getComponentUrl:s=null,useBlockletUrlEvaluation:a=()=>({loading:!1,recommendedUrl:window?.location?.href}),...c}){const l=Be(),[u,d]=m.useState(null),[p,f]=m.useState(null),[x,y]=m.useState(!1),[h,C]=m.useState(null),{t:v}=m.useContext(tn),[j]=Rt("skip-blocklet-setup",!1),{loading:g,recommendedUrl:E}=a(e),[k]=Rt("blocklet-type-filter",Qr),b=N.isInProgress(e.status),[T,M]=m.useState(!1);m.useEffect(()=>{if(!e?.controller)return;M(e?.controller?.status?.value===qe.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}M([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:R}=l,O=(w,D,K=!1)=>async()=>{const G=async Se=>{t({action:w,blocklet:e}),y(!0),f(w);let je=!1;try{if(w==="remove")await D(Se);else if(w==="start"){if(!N.hasRunnableComponent(e)){F.error(v("blocklet.noComponent"));return}if(!R&&!j&&!e.settings?.initialized&&e.mode!==qe.BLOCKLET_MODES.DEVELOPMENT){if(!E||!Lt(E)){F.error(v("blocklet.gotoVisitError"));return}const z=tr(l.info),kt=new URL(E);kt.searchParams.set("serverUrl",z),window.open(Ot(kt.href,{allowDomains:null})),n({action:w,blocklet:e});return}const $=e.children.filter(z=>!N.isInProgress(z.status)&&z.status!=="running").map(z=>z.meta.did),J={did:e.meta.did,componentDids:$};await D({input:J})}else if(["stop","restart","reload"].includes(w)){const $=e.children.filter(z=>z.status==="running").map(z=>z.meta.did),J={did:e.meta.did,componentDids:$};await D({input:J})}else{const $={did:e.meta.did};await D({input:$})}w==="remove"?je=!0:await nr(1e3),w==="reload"&&F.success(v("blocklet.reloadSuccess")),C(null),n({action:w,blocklet:e})}catch($){const J=`Blocklet ${w} failed: ${xt($)}`;throw n({action:w,blocklet:e,error:new Error(J)}),new Error(J)}finally{je||y(!1)}},ve=()=>{y(!1),C(null)},we=N.getDisplayName(e,!0),yo=e.mode===qe.BLOCKLET_MODES.DEVELOPMENT?{description:()=>i.jsx(ee,{component:"div",children:i.jsx(ee,{gutterBottom:!0,children:v("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Se,je)=>i.jsxs(ee,{component:"div",children:[i.jsx(ee,{gutterBottom:!0,children:v("blocklet.action.removeApplicationDescription")}),i.jsxs(Vo,{name:"removeType",value:Se.removeType,onChange:$=>je({...Se,removeType:$.target.value}),children:[i.jsx(It,{value:"backup",control:i.jsx(_t,{}),label:v("blocklet.action.removeApplicationAfterBackup")}),i.jsx(It,{value:"complete",control:i.jsx(_t,{}),label:v("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},vo={stop:{title:`${v("common.stop")} ${we}`,description:v("blocklet.action.stopDescription"),confirm:v("blocklet.action.confirmStop"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve},restart:{title:`${v("common.restart")} ${we}`,description:v("blocklet.action.restartDescription"),confirm:v("blocklet.action.confirmRestart"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve},remove:{title:`${v("common.remove")} ${we}`,confirm:v("blocklet.action.confirmRemove"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve,...yo},cancelDownload:{title:`${v("common.cancel")}`,description:v("blocklet.action.cancelDownloadDescription",{name:we}),confirm:v("common.confirm"),cancel:v("common.cancel"),onConfirm:G,onCancel:ve}};K?C(vo[w]):await G()},We=!!u,po=w=>{try{w.stopPropagation(),w.preventDefault()}catch{}d(w.currentTarget)},mo=w=>{try{w.stopPropagation(),w.preventDefault()}catch{}d(null)},Ct=async(w,D)=>{try{D.stopPropagation(),D.preventDefault()}catch{}if(typeof w.handler=="function")try{y(!0),f(w.action),await w.handler()}catch(K){console.error(`Blocklet ${w.name} failed: `,K)}finally{y(!1),d(null)}else d(null)},ho=!R&&N.isDeletableBlocklet(e)?{action:"remove",icon:Y.Remove,name:v("common.remove"),handler:O("remove",async({removeType:w})=>{w==="backup"&&await l.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await l.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:b}:null,go={action:"remove",icon:({sx:w,...D})=>i.jsx(Y.Cancel,{sx:{...w,paddingRight:"2px",zoom:.95},...D}),name:v("common.cancel"),handler:O("cancelDownload",l.api.cancelDownloadBlocklet,!0)},xo=N.getAppMissingConfigs(e),bo=()=>{const w=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),D=s?.({mountPoint:w,blocklet:e});if(!D||!Lt(D)){F.error(v("blocklet.gotoVisitError"));return}const K=e?.site?.domainAliases;window.open(Ot(Gr(D,`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin`),{allowDomains:K?.map(G=>G.value)}))};let ye=[{action:"start",icon:Y.Start,inExternal:!0,name:v("common.start"),handler:O("start",l.api.startBlocklet),disabled:T||e.children.every(w=>w.status==="running")||Ke(e.status)||g||b},{action:"stop",icon:Y.Stop,inExternal:!0,name:v("common.stop"),handler:O("stop",l.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:Y.Restart,name:v("common.restart"),handler:O("restart",l.api.restartBlocklet,!0),disabled:T||e.status!=="running"},Ke(e.status)?go:ho,{separator:!0},R?null:{action:"dashboard",icon:({style:w,...D})=>i.jsx(Y.Dashboard,{...D,style:{...w,width:"26px",height:"26px",paddingRight:"3px"}}),name:v("sidebar.dashboard"),handler:bo}].filter(Boolean);return k===Zr&&(ye=ye.filter(w=>w.inExternal)),r==="menu"?i.jsxs(Nt,{"data-cy":"blocklet-actions",children:[i.jsx(Ne,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:po,size:"small",disabled:!o||!Ke(e.status)&&x,children:i.jsx(Oo,{})}),i.jsxs(No,{id:"actions-menu",anchorEl:u,keepMounted:!0,open:We,onClose:mo,PaperProps:{},children:[xo.length>0&&i.jsxs(gt,{style:{maxWidth:"400px"},severity:"error",children:[v("blocklet.config.missingRequired"),i.jsx("br",{}),i.jsx(dn,{to:`/blocklets/${e.meta.did}/components`,children:v("blocklet.config.gotoFix")})]}),ye.map((w,D)=>w.separator?i.jsx(Uo,{},`separator-${D}`):i.jsxs(zo,{dense:!0,onClick:K=>Ct(w,K),disabled:x||w.disabled,"data-cy":`${w.action}-blocklet`,children:[i.jsx(Bo,{style:{minWidth:24},children:p===w.action&&x?i.jsx(V,{size:16,sx:{marginRight:1}}):i.jsx(w.icon,{fontSize:"small"})}),i.jsx($o,{primary:w.name})]},w.name))]}),h&&i.jsx(Mt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]}):i.jsxs(Nt,{"data-cy":"blocklet-actions",...c,children:[i.jsx(Fo,{children:ye.filter(w=>!w.separator&&!w.onlyInMenu).map(w=>i.jsxs(ht,{title:w.name,"data-cy":`${w.action}-blocklet`,onClick:()=>Ct(w),disabled:!!w.disabled||x,children:[p===w.action&&x?i.jsx(V,{size:16,sx:{marginRight:1}}):i.jsx(w.icon,{}),i.jsx("span",{className:"blocklet-action-text",children:w.name})]},w.name))}),h&&i.jsx(Mt,{title:h.title,description:h.description,confirm:h.confirm,cancel:h.cancel,params:h.params,onConfirm:h.onConfirm,onCancel:h.onCancel})]})}jn.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 Nt=Ue.div`
3
3
  display: flex;
4
4
  align-items: center;
5
5
 
@@ -61,7 +61,7 @@ ${r}
61
61
  .header-brand-addon {
62
62
  display: block;
63
63
  }
64
- `;function ea(){const{t:e,locale:t}=U(),{blocklet:n,launcherSession:r,refreshSubscription:o}=me(),{connectApi:s,session:a,api:c}=hn(),[l,u]=m.useState(!1),[d,p]=m.useState(""),[f,x]=Mr({subscriptionURL:"#"});if(m.useEffect(()=>{(Dt(n,r)||At(r))&&Sr({launcherSessionId:n?.controller?.launcherSessionId,launcherUrl:n?.controller?.launcherUrl,locale:t}).then(v=>{x({subscriptionURL:v})}).catch(v=>{console.error("get subscription url error:",v)})},[n,r]),m.useEffect(()=>{if(n.controller?.launcherUrl){const v=W(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(v).then(j=>j.json()).then(j=>{const g=j.componentMountPoints?.find(k=>k.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,E=W(n.controller.launcherUrl,g);p(E)})}},[n.controller?.launcherUrl]),!n||!r)return"";let y=null,h="",C="error";return jr(r)?(y=Cr(r)?i.jsx(_e,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}):i.jsx(Zo,{variant:"text",color:"error",onClick:()=>u(!0),sx:{lineHeight:"inherit",fontSize:"inherit"},children:e("blocklet.payNow")}),h=e("blocklet.suspendedCausedByPastDue",{deadline:se(r?.reservedUntil,t)})):At(r)?(y=i.jsx(_e,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),h=e("blocklet.willBeSuspendedSoon",{deadline:se((r?.subscription?.cancel_at||0)*1e3,t)}),C="warning"):Dt(n,r)?(y=i.jsx(_e,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),h=e("blocklet.suspendedCausedByExpired",{deadline:se(r?.reservedUntil,t),canceledAt:se((r?.subscription?.canceled_at||0)*1e3,t)})):kr(n,r)&&(y=i.jsx(dn,{to:W(P.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),h=e("blocklet.suspendedCausedByTerminated",{canceledAt:se(r?.terminatedAt,t),deadline:Er(r?.terminatedAt,t)})),h?i.jsxs(i.Fragment,{children:[i.jsxs(gt,{severity:C,sx:{mb:1},children:[h,i.jsx(ee,{sx:{display:"inline-block",fontSize:"inherit",lineHeight:"inherit",ml:1,a:{textDecoration:"auto"},"& .MuiButtonBase-root":{p:0,minWidth:"auto"}},children:y})]}),l&&d&&r&&i.jsx(Ir,{session:a,connect:s,baseUrl:d,authToken:r.subscription.authToken,children:i.jsx(Wr,{dialogProps:{open:l,onClose:()=>u(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{c.post("/blocklet/start?fromSetup=1"),o(),u(!1)}})})]}):null}const ta=m.lazy(()=>_(()=>import("./log-BLHTF_kk.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),na=m.lazy(()=>_(()=>import("./index-x_ddpRFT.js"),__vite__mapDeps([13,2,1,5,4,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,3,41,42,43,44,45,46]))),oa=m.lazy(()=>_(()=>import("./index-DwFmgPTz.js"),__vite__mapDeps([47,4,2,1,5,6,7,8,14,9,10,11,18,19,20,21,38,48,32,28,39,49]))),ra=m.lazy(()=>_(()=>import("./index-BOhhZADu.js"),__vite__mapDeps([50,2,1,9,4,5,6,7,8,10,11,32,28,19,17,51,12,40,52,23,53,43,54,55,26,56,57,58,41,59,60,61,62,63,64]))),sa=m.lazy(()=>_(()=>import("./overview-CLlEtBem.js"),__vite__mapDeps([65,1,2,4,5,6,7,8,66,67,9,10,11,31,42,30,18,19,20,21,17,68,69,70,55,3,28,32,41,43,44,45,46]))),ia=m.lazy(()=>_(()=>import("./domains-BfVUABUm.js"),__vite__mapDeps([71,2,4,1,5,6,7,8,9,10,11,72,43,22,19,42,30,32,28,39,60,23,29,31,73,54]))),aa=m.lazy(()=>_(()=>import("./index-DWKcHcSX.js"),__vite__mapDeps([74,2,6,5,1,4,7,8,9,10,11,17,18,19,20,21,75,14,34,35,38,76,22,77,78,79,32,28,52,43,80]))),ca=m.lazy(()=>_(()=>import("./appearance-CiCcnDqj.js"),__vite__mapDeps([81,5,2,9,1,4,6,7,8,10,11,38]))),la=m.lazy(()=>_(()=>import("./audit-logs-BiFwhSvl.js"),__vite__mapDeps([82,4,2,1,5,6,7,8,9,10,11,34,35,3,62,63,40,64,18,19,20,21]))),ua=m.lazy(()=>_(()=>import("./index-IfDPTJfj.js"),__vite__mapDeps([83,2,1,5,4,6,7,8,9,10,11,48,20,84,85,86,40,31,87,88,12,18,19,21,14,34,35,17,89,42,30,90,91,28,92,93,26,27,38]))),da=m.lazy(()=>_(()=>import("./config-navigation-CQlAn_Fg.js"),__vite__mapDeps([94,2,1,4,5,6,7,8,9,10,11,69,78,95,96,48,97,18,19,20,21,55,98,56,57,90,28,3,32,41,42,30,43,44,45,46]))),fa=m.lazy(()=>_(()=>import("./index-BMBJylNT.js"),__vite__mapDeps([99,1,2,6,5,9,4,7,8,10,11,38,100,101,67,76,55,102,103,70,28,31,93,41,104,61,52]))),pa=m.lazy(()=>_(()=>import("./index-C9c1djN6.js"),__vite__mapDeps([105,4,2,1,5,6,7,8,9,10,11,48,104,61,84,85,66,31,35,38]))),ma=m.lazy(()=>_(()=>import("./security-Cmd-bjYK.js"),__vite__mapDeps([106,4,2,1,5,6,7,8,9,10,11,48,97,18,19,20,21,107,38]))),ha=m.lazy(()=>_(()=>import("./branding-B7YBinhB.js"),__vite__mapDeps([108,2,1,4,5,6,7,8,9,10,11,109,69,95,110,85,111,79,22,19,21,112,84]))),ga=m.lazy(()=>_(()=>import("./advanced-BalF9O34.js"),__vite__mapDeps([113,2,1,9,4,5,6,7,8,10,11,22,19,32,28,43,84,85,23,18,20,21,31,17,68,69]))),xa=m.lazy(()=>_(()=>import("./traffic-mRcZHvLN.js").then(e=>e.t),__vite__mapDeps([89,2,9,1,4,5,6,7,8,10,11,42,30,90,91,28,92,93,26,27]))),ba=m.lazy(()=>_(()=>import("./runtime-DiVv_EHB.js"),__vite__mapDeps([114,2,1,4,5,6,7,8,9,10,11,101,92,93,12,3,28,32,41,19,18,20,21,42,30,43,44,45,46]))),ya=m.lazy(()=>_(()=>import("./index-DCk5kGsh.js"),__vite__mapDeps([115,2,1,4,5,6,7,8,28,14,9,10,11,75,17,34,35,18,19,20,21,24,25,26,27,32,23,67,60,22,12,39,38,49]))),va=m.lazy(()=>_(()=>import("./list-DTe8sKwq.js"),__vite__mapDeps([116,2,4,1,5,6,7,8,14,9,10,11,42,30,16,18,19,20,21,48,24,25,26,27,51,23,60,32,28,75,17,34,35,39,49,38]))),wa=m.lazy(()=>_(()=>import("./index-6ZWzS1uw.js"),__vite__mapDeps([117,2,4,1,5,6,7,8,9,10,11,55,49,38,18,19,20,21]))),Sa=m.lazy(()=>_(()=>import("./config-DIuLHS8J.js").then(e=>e.c),__vite__mapDeps([118,2,1,6,5,20,9,4,7,8,10,11,84,85,111,110,79,58,41,95,28,14]))),ja=m.lazy(()=>_(()=>import("./observability-oDc3dKFA.js"),__vite__mapDeps([119,1,2]))),Ca=m.lazy(()=>_(()=>import("./playground-Dk2enS21.js"),__vite__mapDeps([120,1,2]))),ka=m.lazy(()=>_(()=>import("./component-CMw-pVd2.js"),__vite__mapDeps([121,1,2,5,4,6,7,8,9,10,11,28,104,61,22,19,26,91,96,57,109,69,95,23,76,122,59,60,32,41,17,58,123,124,54,103,70,55,85,125,77,78,111,112,86,62,63,118,20,84,110,79,14,3,31,73,38,126,102,100,101,67,127,128,80,90,12,39,18,21,42,30,43,44,45,46]))),Ea=m.lazy(()=>_(()=>import("./index-CsmgTpTJ.js"),__vite__mapDeps([129,1,2,4,5,6,7,8,9,10,11]))),Ia=W(P.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),_a=e=>{const{enqueueSnackbar:t}=nn(),n=m.useCallback(r=>xn(Ia,{id:r.id,severity:r.severity||"all",componentDid:r.source==="system"?"system":r.componentDid||"all"}),[]);Lr(`${e}/${P.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,r=>{const o=n(r),{severity:s,description:a}=r||{},c=["error","warning"].includes(s)||r.sticky;r.source==="system"&&t(a,{variant:s,autoHideDuration:c?null:5e3,content:l=>i.jsx(as,{viewAllUrl:o,keyId:l,notification:r,content:i.jsx($r,{notification:r,minimal:!0,rows:0})})})},[],"user")};function fo({blocklet:e,isAdmin:t}){return t?i.jsx(ua,{blocklet:e}):i.jsx(Ar,{status:403})}fo.propTypes={blocklet:S.object.isRequired,isAdmin:S.bool.isRequired};const Ta=e=>{const{t}=U(),{blocklet:n,actions:{refreshBlocklet:r},client:o,did:s}=me(),a=n?.meta?.did,c=!n||Dr(n.status)?[]:N.getAppMissingConfigs(n),l={overview:[{label:t("common.overview"),value:"overview"},{label:i.jsx(Xo,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!c.length,children:t("common.components")}),labelText: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:sa,components:ka,members:i.jsx(na,{type:"blocklet",createPassportSvg:Pt}),passports:i.jsx(aa,{createPassportSvg:Pt}),settings:i.jsx(pa,{orientation:"vertical"}),security:i.jsx(ma,{}),"did-spaces":i.jsx(fa,{navOrientation:"horizontal"}),domains:ia,branding:i.jsx(ha,{blocklet:n,onUpdate:r}),theming:i.jsx(ca,{}),navigation:da,sitemap:i.jsx(ko,{children:t("common.comingSoon")}),notifications:i.jsx(fo,{blocklet:n,isAdmin:e}),"audit-logs":i.jsx(la,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:i.jsx(xa,{client:o,did:s}),advanced:i.jsx(ga,{blocklet:n,onUpdate:r}),webhooks:i.jsx(oa,{}),"access-keys":i.jsx(ya,{}),"mcp-servers":i.jsx(wa,{}),logs:ta,performance:i.jsx(ba,{client:o,did:s}),docs:Ea,publish:i.jsx(ra,{}),oauth:i.jsx(va,{}),"aigne-config":i.jsx(I,{sx:{maxWidth:1536},children:i.jsx(Sa,{})}),"aigne-observability":i.jsx(ja,{}),"aigne-playground":i.jsx(Ca,{})};return{tabGroups:l,renders:u}};function La(){const e=fn(),{tab:t="overview",subtab:n}=er(),{locale:r}=U(),{blocklet:o,refreshFlag:s}=me(),{session:a}=bn(),c=ae(()=>a?.user?.did,[a]),l=qr(),u=ae(()=>a.user?.role&&gn.includes(a.user.role),[a]);_a(c);const{tabGroups:d,renders:p}=Ta(u),f=g=>{e(`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${g}`)},x=(d[t]||[]).filter(g=>g.show===void 0||g.show),y=(x||[]).find(g=>g.value===n)?.value||x?.[0]?.value||t,h=p[y]||p.overview,C=["overview"].includes(t),v=o?i.jsxs(Sn,{type:"components",children:[x.length>0&&i.jsxs(I,{sx:{mb:2,display:"flex",alignItems:"center",gap:2},children:[i.jsx(Co,{tabs:x,current:y,onChange:f,scrollButtons:"auto"}),C&&!l&&i.jsx(I,{sx:{flex:1,display:"flex",justifyContent:"flex-end"},children:i.jsx(I,{component:"div",className:"page-header",children:o?i.jsx(Ut,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:g}={})=>{g&&F.error(g.message)},variant:"group"}):null})})]}),i.jsx(I,{className:"page-content",children:i.jsx(m.Suspense,{fallback:i.jsx(Ae,{relative:"parent",children:i.jsx(V,{})}),children:m.isValidElement(h)?h:i.jsx(h,{blocklet:o})})})]}):i.jsx(Ae,{relative:"parent",children:i.jsx(V,{})}),j=ae(()=>{const g=window.blocklet?.navigation?.find(R=>R.id==="/team"&&R.section==="dashboard"),E=o?.meta?.title||"";let k="";if(g){const R=W(P.WELLKNOWN_BLOCKLET_ADMIN_PATH,t,t==="publish"?n:"");k=g.items.find(We=>We.link===R)?.title?.[r]||""}const b=x.find(R=>R.value===n),M=[b?.labelText||b?.label||x?.[0]?.labelText||x?.[0]?.label||"",k].filter(Boolean).join(" - ");return E?M?`${M} | ${E}`:E:M||""},[t,n,o,r]);return i.jsx(Tr,{children:i.jsx(Br,{children:i.jsx(uo,{title:j,children:i.jsxs(Aa,{children:[l&&C&&i.jsx(I,{component:"div",className:"page-header",sx:{mb:2},children:o?i.jsx(Ut,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:g}={})=>{g&&F.error(g.message)},variant:"group"}):null}),i.jsx(Yr,{}),i.jsx(ea,{}),v]})},`${s}`)})})}function Da(){const{blocklet:e}=me(),t=e?.meta?.did;return m.useEffect(()=>{const n=_r();return t&&n.connect(),()=>{t&&n.isConnected()&&n.disconnect()}},[t]),i.jsx(La,{})}const Aa=Ue.main`
64
+ `;function ea(){const{t:e,locale:t}=U(),{blocklet:n,launcherSession:r,refreshSubscription:o}=me(),{connectApi:s,session:a,api:c}=hn(),[l,u]=m.useState(!1),[d,p]=m.useState(""),[f,x]=Mr({subscriptionURL:"#"});if(m.useEffect(()=>{(Dt(n,r)||At(r))&&Sr({launcherSessionId:n?.controller?.launcherSessionId,launcherUrl:n?.controller?.launcherUrl,locale:t}).then(v=>{x({subscriptionURL:v})}).catch(v=>{console.error("get subscription url error:",v)})},[n,r]),m.useEffect(()=>{if(n.controller?.launcherUrl){const v=W(n.controller.launcherUrl,"__blocklet__.js?type=json");fetch(v).then(j=>j.json()).then(j=>{const g=j.componentMountPoints?.find(k=>k.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk")?.mountPoint,E=W(n.controller.launcherUrl,g);p(E)})}},[n.controller?.launcherUrl]),!n||!r)return"";let y=null,h="",C="error";return jr(r)?(y=Cr(r)?i.jsx(_e,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}):i.jsx(Zo,{variant:"text",color:"error",onClick:()=>u(!0),sx:{lineHeight:"inherit",fontSize:"inherit"},children:e("blocklet.payNow")}),h=e("blocklet.suspendedCausedByPastDue",{deadline:se(r?.reservedUntil,t)})):At(r)?(y=i.jsx(_e,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),h=e("blocklet.willBeSuspendedSoon",{deadline:se((r?.subscription?.cancel_at||0)*1e3,t)}),C="warning"):Dt(n,r)?(y=i.jsx(_e,{href:f.subscriptionURL,children:e("blocklet.manageSubscription")}),h=e("blocklet.suspendedCausedByExpired",{deadline:se(r?.reservedUntil,t),canceledAt:se((r?.subscription?.canceled_at||0)*1e3,t)})):kr(n,r)&&(y=i.jsx(dn,{to:W(P.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),h=e("blocklet.suspendedCausedByTerminated",{canceledAt:se(r?.terminatedAt,t),deadline:Er(r?.terminatedAt,t)})),h?i.jsxs(i.Fragment,{children:[i.jsxs(gt,{severity:C,sx:{mb:1},children:[h,i.jsx(ee,{sx:{display:"inline-block",fontSize:"inherit",lineHeight:"inherit",ml:1,a:{textDecoration:"auto"},"& .MuiButtonBase-root":{p:0,minWidth:"auto"}},children:y})]}),l&&d&&r&&i.jsx(Ir,{session:a,connect:s,baseUrl:d,authToken:r.subscription.authToken,children:i.jsx(Wr,{dialogProps:{open:l,onClose:()=>u(!1)},subscriptionId:r.subscription.id,successToast:!0,onPaid:()=>{c.post("/blocklet/start?fromSetup=1"),o(),u(!1)}})})]}):null}const ta=m.lazy(()=>_(()=>import("./log-DwbFr2nR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),na=m.lazy(()=>_(()=>import("./index-BJftyOWK.js"),__vite__mapDeps([13,2,1,5,4,6,7,8,9,10,11,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,3,41,42,43,44,45,46]))),oa=m.lazy(()=>_(()=>import("./index-0r-rUxmD.js"),__vite__mapDeps([47,4,2,1,5,6,7,8,14,9,10,11,18,19,20,21,38,48,32,28,39,49]))),ra=m.lazy(()=>_(()=>import("./index-D0zr5fnU.js"),__vite__mapDeps([50,2,1,9,4,5,6,7,8,10,11,32,28,19,17,51,12,40,52,23,53,43,54,55,26,56,57,58,41,59,60,61,62,63,64]))),sa=m.lazy(()=>_(()=>import("./overview-Rpt1OYCM.js"),__vite__mapDeps([65,1,2,4,5,6,7,8,66,67,9,10,11,31,42,30,18,19,20,21,17,68,69,70,55,3,28,32,41,43,44,45,46]))),ia=m.lazy(()=>_(()=>import("./domains-IK6JBOMk.js"),__vite__mapDeps([71,2,4,1,5,6,7,8,9,10,11,72,43,22,19,42,30,32,28,39,60,23,29,31,73,54]))),aa=m.lazy(()=>_(()=>import("./index-BcOGe7jx.js"),__vite__mapDeps([74,2,6,5,1,4,7,8,9,10,11,17,18,19,20,21,75,14,34,35,38,76,22,77,78,79,32,28,52,43,80]))),ca=m.lazy(()=>_(()=>import("./appearance-wlMh61hK.js"),__vite__mapDeps([81,5,2,9,1,4,6,7,8,10,11,38]))),la=m.lazy(()=>_(()=>import("./audit-logs-OiH-ZCCu.js"),__vite__mapDeps([82,4,2,1,5,6,7,8,9,10,11,34,35,3,62,63,40,64,18,19,20,21]))),ua=m.lazy(()=>_(()=>import("./index-BioPPNyR.js"),__vite__mapDeps([83,2,1,5,4,6,7,8,9,10,11,48,20,84,85,86,40,31,87,88,12,18,19,21,14,34,35,17,89,42,30,90,91,28,92,93,26,27,38]))),da=m.lazy(()=>_(()=>import("./config-navigation-pmywYpni.js"),__vite__mapDeps([94,2,1,4,5,6,7,8,9,10,11,69,78,95,96,48,97,18,19,20,21,55,98,56,57,90,28,3,32,41,42,30,43,44,45,46]))),fa=m.lazy(()=>_(()=>import("./index-klWBrV7H.js"),__vite__mapDeps([99,1,2,6,5,9,4,7,8,10,11,38,100,101,67,76,55,102,103,70,28,31,93,41,104,61,52]))),pa=m.lazy(()=>_(()=>import("./index-C7WNgxRc.js"),__vite__mapDeps([105,4,2,1,5,6,7,8,9,10,11,48,104,61,84,85,66,31,35,38]))),ma=m.lazy(()=>_(()=>import("./security-Bdj-FYH4.js"),__vite__mapDeps([106,4,2,1,5,6,7,8,9,10,11,48,97,18,19,20,21,107,38]))),ha=m.lazy(()=>_(()=>import("./branding-C1lgysY6.js"),__vite__mapDeps([108,2,1,4,5,6,7,8,9,10,11,109,69,95,110,85,111,79,22,19,21,112,84]))),ga=m.lazy(()=>_(()=>import("./advanced-BHQ085Rc.js"),__vite__mapDeps([113,2,1,9,4,5,6,7,8,10,11,22,19,32,28,43,84,85,23,18,20,21,31,17,68,69]))),xa=m.lazy(()=>_(()=>import("./traffic-BUIhb2HS.js").then(e=>e.t),__vite__mapDeps([89,2,9,1,4,5,6,7,8,10,11,42,30,90,91,28,92,93,26,27]))),ba=m.lazy(()=>_(()=>import("./runtime-DjdnpZoh.js"),__vite__mapDeps([114,2,1,4,5,6,7,8,9,10,11,101,92,93,12,3,28,32,41,19,18,20,21,42,30,43,44,45,46]))),ya=m.lazy(()=>_(()=>import("./index-DtDqVnOd.js"),__vite__mapDeps([115,2,1,4,5,6,7,8,28,14,9,10,11,75,17,34,35,18,19,20,21,24,25,26,27,32,23,67,60,22,12,39,38,49]))),va=m.lazy(()=>_(()=>import("./list-BeJAd6oJ.js"),__vite__mapDeps([116,2,4,1,5,6,7,8,14,9,10,11,42,30,16,18,19,20,21,48,24,25,26,27,51,23,60,32,28,75,17,34,35,39,49,38]))),wa=m.lazy(()=>_(()=>import("./index-DIzco3bK.js"),__vite__mapDeps([117,2,4,1,5,6,7,8,9,10,11,55,49,38,18,19,20,21]))),Sa=m.lazy(()=>_(()=>import("./config-BPieGs6J.js").then(e=>e.c),__vite__mapDeps([118,2,1,6,5,20,9,4,7,8,10,11,84,85,111,110,79,58,41,95,28,14]))),ja=m.lazy(()=>_(()=>import("./observability-oDc3dKFA.js"),__vite__mapDeps([119,1,2]))),Ca=m.lazy(()=>_(()=>import("./playground-Dk2enS21.js"),__vite__mapDeps([120,1,2]))),ka=m.lazy(()=>_(()=>import("./component-IFve4dXC.js"),__vite__mapDeps([121,1,2,5,4,6,7,8,9,10,11,28,104,61,22,19,26,91,96,57,109,69,95,23,76,122,59,60,32,41,17,58,123,124,54,103,70,55,85,125,77,78,111,112,86,62,63,118,20,84,110,79,14,3,31,73,38,126,102,100,101,67,127,128,80,90,12,39,18,21,42,30,43,44,45,46]))),Ea=m.lazy(()=>_(()=>import("./index-ZScchkNG.js"),__vite__mapDeps([129,1,2,4,5,6,7,8,9,10,11]))),Ia=W(P.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),_a=e=>{const{enqueueSnackbar:t}=nn(),n=m.useCallback(r=>xn(Ia,{id:r.id,severity:r.severity||"all",componentDid:r.source==="system"?"system":r.componentDid||"all"}),[]);Lr(`${e}/${P.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,r=>{const o=n(r),{severity:s,description:a}=r||{},c=["error","warning"].includes(s)||r.sticky;r.source==="system"&&t(a,{variant:s,autoHideDuration:c?null:5e3,content:l=>i.jsx(as,{viewAllUrl:o,keyId:l,notification:r,content:i.jsx($r,{notification:r,minimal:!0,rows:0})})})},[],"user")};function fo({blocklet:e,isAdmin:t}){return t?i.jsx(ua,{blocklet:e}):i.jsx(Ar,{status:403})}fo.propTypes={blocklet:S.object.isRequired,isAdmin:S.bool.isRequired};const Ta=e=>{const{t}=U(),{blocklet:n,actions:{refreshBlocklet:r},client:o,did:s}=me(),a=n?.meta?.did,c=!n||Dr(n.status)?[]:N.getAppMissingConfigs(n),l={overview:[{label:t("common.overview"),value:"overview"},{label:i.jsx(Xo,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!c.length,children:t("common.components")}),labelText: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:sa,components:ka,members:i.jsx(na,{type:"blocklet",createPassportSvg:Pt}),passports:i.jsx(aa,{createPassportSvg:Pt}),settings:i.jsx(pa,{orientation:"vertical"}),security:i.jsx(ma,{}),"did-spaces":i.jsx(fa,{navOrientation:"horizontal"}),domains:ia,branding:i.jsx(ha,{blocklet:n,onUpdate:r}),theming:i.jsx(ca,{}),navigation:da,sitemap:i.jsx(ko,{children:t("common.comingSoon")}),notifications:i.jsx(fo,{blocklet:n,isAdmin:e}),"audit-logs":i.jsx(la,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:i.jsx(xa,{client:o,did:s}),advanced:i.jsx(ga,{blocklet:n,onUpdate:r}),webhooks:i.jsx(oa,{}),"access-keys":i.jsx(ya,{}),"mcp-servers":i.jsx(wa,{}),logs:ta,performance:i.jsx(ba,{client:o,did:s}),docs:Ea,publish:i.jsx(ra,{}),oauth:i.jsx(va,{}),"aigne-config":i.jsx(I,{sx:{maxWidth:1536},children:i.jsx(Sa,{})}),"aigne-observability":i.jsx(ja,{}),"aigne-playground":i.jsx(Ca,{})};return{tabGroups:l,renders:u}};function La(){const e=fn(),{tab:t="overview",subtab:n}=er(),{locale:r}=U(),{blocklet:o,refreshFlag:s}=me(),{session:a}=bn(),c=ae(()=>a?.user?.did,[a]),l=qr(),u=ae(()=>a.user?.role&&gn.includes(a.user.role),[a]);_a(c);const{tabGroups:d,renders:p}=Ta(u),f=g=>{e(`${P.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${t}/${g}`)},x=(d[t]||[]).filter(g=>g.show===void 0||g.show),y=(x||[]).find(g=>g.value===n)?.value||x?.[0]?.value||t,h=p[y]||p.overview,C=["overview"].includes(t),v=o?i.jsxs(Sn,{type:"components",children:[x.length>0&&i.jsxs(I,{sx:{mb:2,display:"flex",alignItems:"center",gap:2},children:[i.jsx(Co,{tabs:x,current:y,onChange:f,scrollButtons:"auto"}),C&&!l&&i.jsx(I,{sx:{flex:1,display:"flex",justifyContent:"flex-end"},children:i.jsx(I,{component:"div",className:"page-header",children:o?i.jsx(Ut,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:g}={})=>{g&&F.error(g.message)},variant:"group"}):null})})]}),i.jsx(I,{className:"page-content",children:i.jsx(m.Suspense,{fallback:i.jsx(Ae,{relative:"parent",children:i.jsx(V,{})}),children:m.isValidElement(h)?h:i.jsx(h,{blocklet:o})})})]}):i.jsx(Ae,{relative:"parent",children:i.jsx(V,{})}),j=ae(()=>{const g=window.blocklet?.navigation?.find(R=>R.id==="/team"&&R.section==="dashboard"),E=o?.meta?.title||"";let k="";if(g){const R=W(P.WELLKNOWN_BLOCKLET_ADMIN_PATH,t,t==="publish"?n:"");k=g.items.find(We=>We.link===R)?.title?.[r]||""}const b=x.find(R=>R.value===n),M=[b?.labelText||b?.label||x?.[0]?.labelText||x?.[0]?.label||"",k].filter(Boolean).join(" - ");return E?M?`${M} | ${E}`:E:M||""},[t,n,o,r]);return i.jsx(Tr,{children:i.jsx(Br,{children:i.jsx(uo,{title:j,children:i.jsxs(Aa,{children:[l&&C&&i.jsx(I,{component:"div",className:"page-header",sx:{mb:2},children:o?i.jsx(Ut,{className:"page-actions",hasPermission:!0,blocklet:o,onStart:()=>{},onComplete:({error:g}={})=>{g&&F.error(g.message)},variant:"group"}):null}),i.jsx(Yr,{}),i.jsx(ea,{}),v]})},`${s}`)})})}function Da(){const{blocklet:e}=me(),t=e?.meta?.did;return m.useEffect(()=>{const n=_r();return t&&n.connect(),()=>{t&&n.isConnected()&&n.disconnect()}},[t]),i.jsx(La,{})}const Aa=Ue.main`
65
65
  .page-header {
66
66
  display: flex;
67
67
  justify-content: space-between;
@@ -1 +1 @@
1
- import{j as e,ak as o,aX as h,T as j,z as g,W as i}from"./vendor-mui-core-CmD-NPnl.js";import{T as _}from"./vendor-ux-ESjuHpb6.js";import{C as b}from"./click-to-copy-BWrdBff2.js";import{C as T}from"./confirm-BAs5EAFg.js";function k({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=_(),n={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(h,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(b,{"data-cy":"click-copy",children:t})]}),e.jsx(j,{component:"div",children:e.jsx(g,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(T,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})}k.propTypes={title:i.any.isRequired,keyName:i.any.isRequired,description:i.any.isRequired,confirmPlaceholder:i.any.isRequired,cancel:i.string,confirm:i.string,params:i.object,onCancel:i.func,onConfirm:i.func.isRequired};export{k as D};
1
+ import{j as e,ak as o,aX as h,T as j,z as g,W as i}from"./vendor-mui-core-CmD-NPnl.js";import{T as _}from"./vendor-ux-ESjuHpb6.js";import{C as b}from"./click-to-copy-BWrdBff2.js";import{C as T}from"./confirm-BSaR4_fO.js";function k({title:c,description:l,confirmPlaceholder:m,cancel:d="",confirm:u="Confirm",params:p={},onCancel:f=()=>{},onConfirm:C,keyName:t}){const{t:a}=_(),n={title:()=>e.jsx(o,{children:c}),description:(s,y)=>{const x=r=>{y({...r,__disableConfirm:r.__disableConfirm})};return e.jsxs(o,{children:[e.jsx(h,{severity:"warning",style:{width:"100%"},children:a("common.notice")}),e.jsx(o,{sx:{my:3,b:{wordBreak:"break-word"}},dangerouslySetInnerHTML:{__html:l}}),e.jsxs(o,{style:{marginBottom:24},children:[a("common.click"),":",e.jsx(b,{"data-cy":"click-copy",children:t})]}),e.jsx(j,{component:"div",children:e.jsx(g,{label:m,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:s.inputVal,onChange:r=>{x({...s,inputVal:r.target.value,__disableConfirm:t!==r.target.value})}})})]})},confirm:u,cancel:d,onConfirm:C,onCancel:f,params:{inputVal:"",__disableConfirm:!0,...p}};return e.jsx(T,{title:n.title,description:n.description,confirm:n.confirm,cancel:n.cancel,params:n.params,onConfirm:n.onConfirm,onCancel:n.onCancel})}k.propTypes={title:i.any.isRequired,keyName:i.any.isRequired,description:i.any.isRequired,confirmPlaceholder:i.any.isRequired,cancel:i.string,confirm:i.string,params:i.object,onCancel:i.func,onConfirm:i.func.isRequired};export{k as D};
@@ -1,4 +1,4 @@
1
- import{j as o,ak as i,at as k,W as u}from"./vendor-mui-core-CmD-NPnl.js";import{m as v,f as C,a9 as b,e as B}from"./index-CndEvJBJ.js";import{D as E,a as I,b as w}from"./domain-action-card-CVS3TpUQ.js";import{G as T}from"./vendor-ux-ESjuHpb6.js";import{a as W}from"./page-header-8LlFejLk.js";import{r,u as A}from"./vendor-react-Dvs43sk9.js";import{u as L}from"./useSetState-DFuQZPPV.js";import{S as x}from"./button-bUtVfsu_.js";import{S as $}from"./layout-BakYeqaY.js";import{S as z}from"./step-actions-CqrWvcHB.js";import"./vendor-arcblock-C-xQV6LY.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./permission-D4s1M96M.js";import"./session-BrZcMmG5.js";import"./useAsyncRetry-6TjWJyO6.js";import"./useAsync-CNAYLnLm.js";import"./confirm-BAs5EAFg.js";import"./index-DBs9Ljax.js";import"./actions-CL4xTGOh.js";import"./delete-confirm-ARBINDJj.js";import"./click-to-copy-BWrdBff2.js";import"./useAsync-DZevTxbv.js";import"./index-1BANSka2.js";import"./util-HCACAM-i.js";import"./engine-Coh-wnMb.js";import"./lottie-web-4koyQiv_.js";import"./content-layout-DYZYIlLo.js";import"./use-mobile-CQ7Tw4aD.js";function h({onNext:a=()=>{},onPrevious:f=()=>{}}){const{t:s}=r.useContext(T),[D,d]=r.useState(!1),{blocklet:e}=v(),[p,S]=r.useState(""),j=((e?.site||{}).domainAliases||[]).map(t=>C.replaceSlotToIp(t.value,p)),[n,m]=L({domain:"",invalidDNSDomain:null,type:"",addDomainState:{text:""}}),c=e.environments?.find(t=>t.key==="BLOCKLET_APP_PK")?.value,y=j.find(t=>b.isDidDomain(t)),[l,P]=A();return r.useEffect(()=>{B.get(`/dns-resolve?hostname=${window.location.hostname}`).then(({data:t})=>{S(t.address||"")}).catch(t=>{console.error(t.message)})},[]),o.jsxs(H,{children:[o.jsx(i,{className:"header",children:o.jsx(W,{title:s("setup.domain.title"),subTitle:s("setup.domain.subTitle"),onClickBack:f})}),o.jsxs(i,{className:"form form-container",sx:{display:"flex",flexDirection:"column",gap:3,overflowY:"auto"},children:[o.jsxs(i,{children:[o.jsx(i,{sx:{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem"},children:o.jsx(i,{sx:{display:"inline"},children:`${s("setup.domain.buyOrConnect")} (${s("common.optional")})`})}),o.jsx(i,{sx:{mt:1},children:o.jsx(I,{blocklet:e,bugDidDomainProps:{appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,inBlockletSetup:!0},connectDomainProps:{autoFocus:!1,appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,cnameDomain:y,currentIp:p,inBlockletSetup:!0,shouldCheckDomain:!0,onInputDomain:t=>{m({domain:t.domain,type:t.type}),d(t.error)},onStateChange:t=>m({addDomainState:t}),onSuccess:t=>{const g={domain:t.domain,type:t.type,nftDid:t.nftDid,chainHost:t.chainHost};l.set("redirect",t.domain),P(l,{replace:!0}),m(g),a()},onError:d}})})]}),o.jsx(i,{children:o.jsx(w,{inSetup:!0,showAllDomains:!0,systemTips:o.jsx(i,{sx:{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",mb:1},children:o.jsx(i,{sx:{display:"inline"},children:s("setup.domain.skipDescription")})})})})]}),o.jsx(z,{mt:8,disabled:!!n.addDomainState.text,blocklet:e,onStartNow:()=>a("complete"),children:n.domain?o.jsx(x,{variant:"contained",loading:!!n.addDomainState.text,disabled:D||!!n.addDomainState.text||!n.domain,onClick:()=>a(),children:n.addDomainState.text||s("setup.continue")}):o.jsx(x,{variant:"contained",disabled:!!n.addDomainState.text,onClick:()=>a(),children:s("setup.continue")})})]})}function ht(a){return o.jsx(E,{children:o.jsx(h,{...a})})}h.propTypes={onNext:u.func,onPrevious:u.func};const H=k($)`
1
+ import{j as o,ak as i,at as k,W as u}from"./vendor-mui-core-CmD-NPnl.js";import{m as v,f as C,a9 as b,e as B}from"./index-6k6hDX7K.js";import{D as E,a as I,b as w}from"./domain-action-card-DmX4ipuD.js";import{G as T}from"./vendor-ux-ESjuHpb6.js";import{a as W}from"./page-header-8LlFejLk.js";import{r,u as A}from"./vendor-react-Dvs43sk9.js";import{u as L}from"./useSetState-DFuQZPPV.js";import{S as x}from"./button-bUtVfsu_.js";import{S as $}from"./layout-O4FRf5d2.js";import{S as z}from"./step-actions-C91dncKW.js";import"./vendor-arcblock-C-xQV6LY.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./permission-Doi0-9cF.js";import"./session-D-9YOhAy.js";import"./useAsyncRetry-6TjWJyO6.js";import"./useAsync-CNAYLnLm.js";import"./confirm-BSaR4_fO.js";import"./index-DBs9Ljax.js";import"./actions-CL4xTGOh.js";import"./delete-confirm-BR2z4Ljn.js";import"./click-to-copy-BWrdBff2.js";import"./useAsync-DZevTxbv.js";import"./index-1BANSka2.js";import"./util-BlUZ4Q2D.js";import"./engine-B4t4bO94.js";import"./lottie-web-4koyQiv_.js";import"./content-layout-DYZYIlLo.js";import"./use-mobile-CQ7Tw4aD.js";function h({onNext:a=()=>{},onPrevious:f=()=>{}}){const{t:s}=r.useContext(T),[D,d]=r.useState(!1),{blocklet:e}=v(),[p,S]=r.useState(""),j=((e?.site||{}).domainAliases||[]).map(t=>C.replaceSlotToIp(t.value,p)),[n,m]=L({domain:"",invalidDNSDomain:null,type:"",addDomainState:{text:""}}),c=e.environments?.find(t=>t.key==="BLOCKLET_APP_PK")?.value,y=j.find(t=>b.isDidDomain(t)),[l,P]=A();return r.useEffect(()=>{B.get(`/dns-resolve?hostname=${window.location.hostname}`).then(({data:t})=>{S(t.address||"")}).catch(t=>{console.error(t.message)})},[]),o.jsxs(H,{children:[o.jsx(i,{className:"header",children:o.jsx(W,{title:s("setup.domain.title"),subTitle:s("setup.domain.subTitle"),onClickBack:f})}),o.jsxs(i,{className:"form form-container",sx:{display:"flex",flexDirection:"column",gap:3,overflowY:"auto"},children:[o.jsxs(i,{children:[o.jsx(i,{sx:{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem"},children:o.jsx(i,{sx:{display:"inline"},children:`${s("setup.domain.buyOrConnect")} (${s("common.optional")})`})}),o.jsx(i,{sx:{mt:1},children:o.jsx(I,{blocklet:e,bugDidDomainProps:{appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,inBlockletSetup:!0},connectDomainProps:{autoFocus:!1,appPk:c,appId:e.appPid,siteId:e.site.id,teamDid:e.meta.did,cnameDomain:y,currentIp:p,inBlockletSetup:!0,shouldCheckDomain:!0,onInputDomain:t=>{m({domain:t.domain,type:t.type}),d(t.error)},onStateChange:t=>m({addDomainState:t}),onSuccess:t=>{const g={domain:t.domain,type:t.type,nftDid:t.nftDid,chainHost:t.chainHost};l.set("redirect",t.domain),P(l,{replace:!0}),m(g),a()},onError:d}})})]}),o.jsx(i,{children:o.jsx(w,{inSetup:!0,showAllDomains:!0,systemTips:o.jsx(i,{sx:{color:"text.primary",fontWeight:"fontWeightBold",fontSize:"1.125rem",mb:1},children:o.jsx(i,{sx:{display:"inline"},children:s("setup.domain.skipDescription")})})})})]}),o.jsx(z,{mt:8,disabled:!!n.addDomainState.text,blocklet:e,onStartNow:()=>a("complete"),children:n.domain?o.jsx(x,{variant:"contained",loading:!!n.addDomainState.text,disabled:D||!!n.addDomainState.text||!n.domain,onClick:()=>a(),children:n.addDomainState.text||s("setup.continue")}):o.jsx(x,{variant:"contained",disabled:!!n.addDomainState.text,onClick:()=>a(),children:s("setup.continue")})})]})}function ht(a){return o.jsx(E,{children:o.jsx(h,{...a})})}h.propTypes={onNext:u.func,onPrevious:u.func};const H=k($)`
2
2
  height: 100%;
3
3
  overflow-y: hidden;
4
4
 
@@ -1,4 +1,4 @@
1
- import{aJ as bn,U as vn,T as A,F as Cn,H as E,D as te,O as wn,a9 as ze}from"./vendor-ux-ESjuHpb6.js";import{j as e,cN as Ne,cO as Sn,ak as h,a6 as z,b0 as Rn,T as R,aX as ye,D as H,J as ie,am as L,aN as $e,W as t,ch as Oe,M as _e,aO as An,aP as kn,cP as Tn,b7 as In,b9 as Pn,cQ as qn,cR as En,b1 as W,P as We,ci as Ln,bf as Fn,at as Mn,a$ as Bn,cS as Un,cT as zn,cU as Nn,cV as $n,cW as Te,cX as O,cY as On,z as _n,n as Wn,bd as Hn,cZ as Vn,cf as Gn}from"./vendor-mui-core-CmD-NPnl.js";import{C as ee,J as Qn,a as Xn,e as Zn,H as je,a4 as Jn,a5 as Yn,n as X}from"./vendor-utils-DQK0pEML.js";import{r as j,e as He,g as Kn}from"./vendor-react-Dvs43sk9.js";import{u as se}from"./useSetState-DFuQZPPV.js";import{l as et,k as nt,b as Z,m as tt,v as it}from"./vendor-hooks-DLNZ8kxG.js";import{bl as Ve,ah as Ge,bm as st,bn as Qe,Z as F,a8 as oe,X as Ie,ar as ot,aO as Pe,bo as rt,B as at,aa as lt,bp as Xe,a9 as fe,bq as Ze,br as ct,bs as dt,bt as mt,aY as ut,f as xe,bu as pt,bv as ft}from"./index-CndEvJBJ.js";import{w as Je}from"./permission-D4s1M96M.js";import{u as xt,D as qe}from"./useAsyncRetry-6TjWJyO6.js";import{C as re}from"./confirm-BAs5EAFg.js";import{A as ht}from"./actions-CL4xTGOh.js";import{D as gt}from"./delete-confirm-ARBINDJj.js";import{o as Ee}from"./vendor-arcblock-C-xQV6LY.js";import{u as Dt}from"./useAsync-DZevTxbv.js";import{f as N}from"./index-DBs9Ljax.js";import{v as yt}from"./index-1BANSka2.js";import{g as jt,p as Le}from"./util-HCACAM-i.js";import{C as bt}from"./click-to-copy-BWrdBff2.js";const vt=Ve({});vt.interceptors.request.use(n=>{const i=window.blocklet?window.blocklet.prefix:"/";return n.baseURL=i||"",n.url=ee("/api",String(n.url)),n.timeout=2e5,n.params=n.params||{},new URLSearchParams(n.url.split("?")[1]).has("locale")||(n.params.locale=bn()),n},n=>Promise.reject(n));const Ye=(...n)=>Ve(...n),Ct=(n,i)=>i?n?[n,...Array.isArray(i)?i:[i]]:i:n,wt=(n,{width:i=600,height:o=700,name:a="did-domain:popup"}={})=>{const s=window.screenX+(window.innerWidth-i)/2,r=window.screenY+(window.innerHeight-o)/2,u=[`left=${s}`,`top=${r}`,`width=${i}`,`height=${o}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],l=window.open("",a,u.join(","));if(l===null)throw new Error("Failed to open popup");return l.location.href=Qn(n,{opener:window.location.origin}),l},St="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",Ke=async n=>{if(!n||!n?.trim())return null;const i=Ye(),o=new URL(n);o.pathname="__blocklet__.js",o.searchParams.set("type","json");const{data:a}=await i.get(o.toString()),s=a?.componentMountPoints?.find(m=>m.did===St),r=new URL(n);r.pathname=s?.mountPoint;const u=r.toString(),l=ee(u,"/api");return{base:u,api:l}},Rt=Ge({embed:{iconTip:"Click to view subscription details"},buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),At=Ge({embed:{iconTip:"点击查看订阅详情"},buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),kt={zh:At,en:Rt},Tt=async({didDomainURL:n,delegatee:i,delegateePk:o})=>{const a=await Ke(n);if(!a)return null;const s=Ye({baseURL:a.api}),{data:r}=await s.post("/payment/session",{delegatee:i,delegateePk:o});return{sessionId:r.sessionId,baseURL:a.base}};function It({delegatee:n,delegateePk:i,didDomainURL:o,locale:a,title:s="",onSuccess:r=()=>{},...u}){const{t:l}=A(),[m,p]=et({currentState:1}),f=j.useRef(null),c=nt(async()=>{const d=await Tt({didDomainURL:o,delegatee:n,delegateePk:i});return d},{debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(d){console.error(d)}}),g=Z(d=>{d.data.type==="didDomain.success"&&(r?.({nftDid:d.data?.nftDid,domain:d.data?.domain,chainHost:d.data?.chainHost}),f.current?.close(),f.current=null,p({currentState:4}),setTimeout(()=>{p({currentState:8})},2e3))});tt(()=>{try{window.removeEventListener("message",g),f.current?.close(),f.current=null}catch(d){console.warn("Failed to close popup",d)}});const y=Z(()=>{p({currentState:1})}),x=Z(()=>{if(p({currentState:2}),!c.data){console.error("Failed to create session");return}b({sessionId:c.data.sessionId,baseURL:c.data.baseURL})}),b=Z(({sessionId:d,baseURL:w})=>{window.addEventListener("message",g);const C=new URL(w);C.searchParams.set("sessionId",d),C.searchParams.set("locale",a),C.searchParams.set("embed","1"),f.current=wt(C.toString());const q=setInterval(()=>{f.current?.closed&&(clearInterval(q),y())},1e3);return()=>clearInterval(q)});return e.jsxs(e.Fragment,{children:[e.jsx(Ne,{loading:c.loading,onClick:x,variant:"contained",startIcon:e.jsx(Sn,{}),...u,children:s||l("buy.button.title")}),e.jsxs(Cn,{fullWidth:!0,maxWidth:"xs",open:m.currentState>1&&m.currentState<8,onClose:y,children:[!c.error&&e.jsxs(h,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[m.currentState===2&&e.jsx(z,{size:50}),m.currentState===4&&e.jsx(Rn,{sx:{color:"primary.main",fontSize:"5rem"}}),m.currentState===2&&e.jsx(R,{children:l("buy.status.inProgress")}),m.currentState===4&&e.jsx(R,{children:l("buy.status.success")})]}),c.error&&e.jsx(ye,{severity:"error",children:l("buy.error.failedToCreateSession")})]})]})}function Pt(n){return e.jsx(vn,{locale:n.locale,translations:kt,children:e.jsx(It,{...n})})}function qt({nftDid:n,didDomainURL:i,locale:o,sx:a={}}){const{t:s}=A(),[r,u]=se({safeIframeRef:null,popoverAnchorEl:null}),l=j.useRef(null),m=H(),p=ie(m.breakpoints.down("md")),f=x=>{u({popoverAnchorEl:x.currentTarget})},c=()=>{u({popoverAnchorEl:null})},g=it(async()=>{const x=await Ke(i);return x?x.base:null});if(!g.value)return null;if(g.loading)return e.jsx(z,{});const y=ee(g.value,`/embed/domain?nft-did=${n}&locale=${o}`);return e.jsxs(e.Fragment,{children:[e.jsx(L,{title:s("embed.iconTip"),children:e.jsx(h,{component:"img",src:ee(i,"/.well-known/service/blocklet/logo"),alt:"logo",onClick:f,sx:[{width:16,height:16},Ct({cursor:"pointer"},a)]})}),e.jsx($e,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:c,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:l,title:s("common.subscription"),width:p?"320px":"400px",height:"350px",style:{border:0,display:"block"},src:y})})]})}const Et=n=>["waiting","creating","renewaling"].includes(n);function en({siteId:n,domain:i,onAdd:o=()=>{},children:a=null,did:s,issuing:r=!1,setIssuing:u=()=>{}}){const{t:l}=A(),[m,p]=j.useState(!1),{inService:f}=F(),[c,g]=j.useState(null),{api:y,ws:{useSubscription:x}}=F(),{mode:b,actions:{refreshDomainStatus:d}}=oe(),w=xt(async()=>{const{cert:T}=await y.findCertificateByDomain({input:{domain:i,did:s}});return T}),C=(T,S)=>{T.domain===i&&(u(!1),p(!1),f&&b!=="setup"&&(S==="success"?E.success(l("setup.domain.genCertSuccess",{domain:T.domain})):S==="error"&&E.error(l("setup.domain.genCertFailed",{domain:T.domain,message:T.message}))))};if(j.useEffect(()=>{w.loading||u(Et(w.value?.status))},[w.loading,w.value?.status,u]),x(Ie.BlockletEvents.certError,T=>C(T,"error")),x(Ie.BlockletEvents.certIssued,T=>{w.retry(),d(T.domain),C(T,"success")}),w.loading||w.value?.status==="normal")return"";const q=()=>{p(!1),g(null)},B=async()=>{p(!0);try{await y.issueLetsEncryptCert({input:{siteId:n,domain:i,did:s,inBlockletSetup:b==="setup"}}),o(),u(!0)}catch(T){console.error(T),u(!1)}finally{p(!1),g(null)}},M={title:l("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(ye,{severity:"success",children:l("router.cert.genLetsEncryptCert.dnsTip")}),l("router.cert.genLetsEncryptCert.description")]}),confirm:l("common.confirm"),onConfirm:B,onCancel:q},U=T=>{T.stopPropagation(),g(M)};return e.jsxs(e.Fragment,{children:[r?e.jsx(L,{title:l("router.cert.issuing"),children:e.jsx(z,{size:13,style:{fontSize:"13px"}})}):a({loading:m,open:U}),c&&e.jsx(re,{color:"primary",title:c.title,description:c.description,confirm:c.confirm,params:c.params,onConfirm:c.onConfirm,onCancel:c.onCancel})]})}en.propTypes={domain:t.string.isRequired,did:t.string.isRequired,siteId:t.string.isRequired,onAdd:t.func,children:t.any,issuing:t.bool,setIssuing:t.func};function nn({domain:n,domainStatus:i,did:o,onAdd:a=()=>{},children:s=null,issuing:r=!1,setIssuing:u=()=>{},...l}){return st(n)||!Qe(n)||Xn(i)||i?.isHttps?"":e.jsx(en,{...l,domain:n,did:o,onAdd:a,issuing:r,setIssuing:u,children:s})}nn.propTypes={domain:t.string.isRequired,domainStatus:t.shape({isHttps:t.bool}).isRequired,did:t.string.isRequired,onAdd:t.func,children:t.any,issuing:t.bool,setIssuing:t.func};function tn({id:n,domain:i,children:o=null,teamDid:a="",onDelete:s=null}){const{t:r}=A(),[u,l]=j.useState(!1),[m,p]=j.useState(null),{api:f}=F(),c=()=>{l(!1),p(null)},g=async()=>{l(!0);try{await f.deleteDomainAlias({input:{id:n,domainAlias:i,teamDid:a}}),s?.(),await ot(2e3)}catch(b){E.error(b.message)}finally{p(null),l(!1)}},y={keyName:i,title:r("router.domainAlias.delete.title"),description:r("router.domainAlias.delete.description",{domain:i}),confirmPlaceholder:r("router.domainAlias.delete.confirmPlaceholder",{domain:i}),confirm:r("common.delete"),onConfirm:g,onCancel:c},x=b=>{b.stopPropagation(),p(y)};return e.jsxs(e.Fragment,{children:[typeof o=="function"?o({loading:u,open:x}):e.jsxs(te,{edge:"end",onClick:x,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[u?e.jsx(z,{size:16}):e.jsx(Oe,{style:{fontSize:16}}),r("common.delete")]}),m&&e.jsx(gt,{keyName:m.keyName,title:m.title,description:m.description,confirmPlaceholder:m.confirmPlaceholder,confirm:m.confirm,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}tn.propTypes={id:t.string.isRequired,domain:t.string.isRequired,children:t.any,teamDid:t.string,onDelete:t.func};function sn({site:n,domain:i,blocklet:o,onDelete:a=()=>{}}){const{t:s}=A(),r=i.value===window.location.hostname;return e.jsx(ht,{"data-cy":"domain-actions",size:"large",actions:[({close:u})=>e.jsx(tn,{id:n.id,domain:i.value,teamDid:o?.meta?.did,onDelete:a,children:({open:l})=>e.jsx(L,{title:r?s("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(_e,{disabled:i.isProtected||r,dense:!0,onClick:m=>{u(),l(m)},"data-cy":"action-toggle-block",children:[e.jsx(An,{style:{minWidth:24,marginRight:8},children:e.jsx(Oe,{})}),e.jsx(kn,{primary:s("common.delete")})]},"remove")})})})]})}sn.propTypes={site:t.object.isRequired,domain:t.object.isRequired,blocklet:t.object.isRequired,onDelete:t.func};const ae=t.shape({href:t.string,accessibility:t.shape({loading:t.bool,accessible:t.bool}),domainStatus:t.shape({isHttps:t.bool,matchedCert:t.object}),dns:t.shape({resolved:t.bool,ip:t.string})});function on({certificate:n={}}){const[i,o]=j.useState(null),a=F(),{t:s,locale:r}=A(),u=p=>{o(p.currentTarget)},l=()=>{o(null)},m=!!i;return e.jsxs(e.Fragment,{children:[e.jsx(Tn,{"aria-owns":m?"mouse-over-popover":void 0,onMouseEnter:u,onMouseLeave:l,style:{color:"#44cdc6",fontSize:"1em",cursor:"pointer"}}),e.jsx($e,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:m,anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disableRestoreFocus:!0,children:e.jsx(In,{children:e.jsxs(Pn,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${a.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(R,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(R,{component:"div",style:{fontWeight:"bold"},children:n.domain}),e.jsx(R,{component:"div",children:`${s("common.issuer")}: ${Zn(n,"issuer.commonName","")}`}),e.jsx(R,{component:"div",children:`${s("router.cert.issuedOn")}: ${Pe(n.validFrom,r)}`}),e.jsx(R,{component:"div",children:`${s("router.cert.expiryOn")}: ${Pe(n.validTo,r)}`})]})]})})})]})}on.propTypes={certificate:t.object};function ne({domain:n,filters:i=["domain","http"]}){const{t:o}=A(),{value:a,domainStatus:s}=n;if(!Qe(a))return null;let r=null,u=null;const{isHttps:l,matchedCert:m}=s,{dns:{ip:p,isDnsResolved:f,isCnameMatch:c}={}}=s,g=f&&c;rt(a)||(g||p==="127.0.0.1"?r=e.jsx(L,{title:o("router.domain.verify.ok"),children:e.jsx(qe,{color:"success"})}):r=e.jsx(L,{title:o("router.domain.verify.notResolved"),children:e.jsx(qe,{color:"error"})})),g?l?u=e.jsx(on,{certificate:m}):u=e.jsx(L,{title:o("router.domain.https.bad"),children:e.jsx(qn,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})}):u=e.jsx(L,{title:o("router.domain.verify.notResolved"),children:e.jsx(En,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})});const y=i.map(x=>x==="domain"?r:x==="http"?u:null);return j.createElement(j.Fragment,null,...y)}ne.propTypes={domain:ae.isRequired,filters:t.array};const Lt=Je(be,"mutate_blocklets"),Ft=Je(be,"",at);function pi(n){const{inService:i}=F(),{blocklet:o,loadingRuntimeInfo:a}=oe();let s=Lt;return i&&(s=Ft),e.jsx(s,{...n,blocklet:o,inService:i,loadingRuntimeInfo:a})}const Fe="nft-domain";function be({hasPermission:n=!1,blocklet:i,loadingRuntimeInfo:o=!1,inService:a=!1,showAllDomains:s=!1,updateBlockletDomainAliases:r=()=>{},systemTips:u=null}){const{t:l}=A(),m=ie(d=>d.breakpoints.down("md")),p=j.useMemo(()=>{let d=n;return lt(i)&&(d=d&&a),d},[n,a,i]),{site:f}=i,c=j.useMemo(()=>Xe(i.site?.domainAliases),[i.site?.domainAliases]),g=j.useMemo(()=>c.filter(d=>!fe.isCustomDomain(d.value)),[c]),y=j.useMemo(()=>c.filter(d=>fe.isCustomDomain(d.value)),[c]),x=j.useMemo(()=>y.filter(d=>d.type!==Fe),[y]),b=j.useMemo(()=>y.filter(d=>d.type===Fe),[y]);return e.jsxs(e.Fragment,{children:[e.jsxs(W,{sx:{gap:3},children:[!!b.length&&e.jsx(K,{title:l("common.didDomains"),description:l("common.didDomainsDescription"),domains:b,hasMutatePermission:p,blocklet:i,site:f,mobile:m,showAllDomains:s,updateBlockletDomainAliases:r}),!!x.length&&e.jsx(K,{title:l("common.manualDomains"),description:l("common.manualDomainsDescription"),domains:x,hasMutatePermission:p,blocklet:i,site:f,mobile:m,showAllDomains:s,updateBlockletDomainAliases:r}),!!g.length&&e.jsxs(h,{children:[u,e.jsx(K,{title:l("common.systemDomains"),description:l("common.systemDomainsDescription"),domains:g,hasMutatePermission:p,blocklet:i,site:f,mobile:m,updateBlockletDomainAliases:r})]})]}),!c.length&&(o?e.jsx(z,{size:16}):e.jsx(wn,{children:l("common.empty")}))]})}be.propTypes={hasPermission:t.bool,blocklet:t.object.isRequired,loadingRuntimeInfo:t.bool,inService:t.bool.isRequired,showAllDomains:t.bool,updateBlockletDomainAliases:t.func,systemTips:t.node};function J({children:n=null}){return e.jsx(h,{component:"span",sx:{verticalAlign:"bottom"},children:n})}J.propTypes={children:t.node};function he({domain:n,children:i,suffix:o=null,...a}){const{t:s,locale:r}=A(),u=H(),{href:l,accessibility:m,value:p}=n,f=j.useCallback(()=>e.jsx(ze,{content:je(p),locale:r,style:{marginLeft:"4px",color:u.palette.text.secondary,fontSize:"0.8em"}}),[p,r,u]);return!m||m.loading?e.jsxs(me,{component:"span",...a,children:[e.jsx(L,{title:void 0,placement:"top-end",children:e.jsx(h,{component:"span",children:i})}),f(),e.jsx(J,{children:o}),e.jsx(L,{title:s("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx(h,{component:"span",className:"status",children:e.jsx(z,{size:13,style:{fontSize:"13px"}})})})]}):m.accessible?e.jsxs(me,{component:"span",...a,children:[e.jsx(h,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{color:n.loading?"text.disabled":void 0},children:e.jsx(L,{title:void 0,placement:"top-end",children:e.jsx(h,{component:"span",children:i})})}),f(),e.jsx(J,{children:o})]}):e.jsxs(me,{component:"span",...a,children:[e.jsx(L,{title:s("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx(h,{component:"span",children:i})}),!n.loading&&f(),e.jsx(J,{children:o})]})}he.propTypes={domain:ae.isRequired,children:t.any.isRequired,suffix:t.node};const me=Mn(h)`
1
+ import{aJ as bn,U as vn,T as A,F as Cn,H as E,D as te,O as wn,a9 as ze}from"./vendor-ux-ESjuHpb6.js";import{j as e,cN as Ne,cO as Sn,ak as h,a6 as z,b0 as Rn,T as R,aX as ye,D as H,J as ie,am as L,aN as $e,W as t,ch as Oe,M as _e,aO as An,aP as kn,cP as Tn,b7 as In,b9 as Pn,cQ as qn,cR as En,b1 as W,P as We,ci as Ln,bf as Fn,at as Mn,a$ as Bn,cS as Un,cT as zn,cU as Nn,cV as $n,cW as Te,cX as O,cY as On,z as _n,n as Wn,bd as Hn,cZ as Vn,cf as Gn}from"./vendor-mui-core-CmD-NPnl.js";import{C as ee,J as Qn,a as Xn,e as Zn,H as je,a4 as Jn,a5 as Yn,n as X}from"./vendor-utils-DQK0pEML.js";import{r as j,e as He,g as Kn}from"./vendor-react-Dvs43sk9.js";import{u as se}from"./useSetState-DFuQZPPV.js";import{l as et,k as nt,b as Z,m as tt,v as it}from"./vendor-hooks-DLNZ8kxG.js";import{bl as Ve,ah as Ge,bm as st,bn as Qe,Z as F,a8 as oe,X as Ie,ar as ot,aO as Pe,bo as rt,B as at,aa as lt,bp as Xe,a9 as fe,bq as Ze,br as ct,bs as dt,bt as mt,aY as ut,f as xe,bu as pt,bv as ft}from"./index-6k6hDX7K.js";import{w as Je}from"./permission-Doi0-9cF.js";import{u as xt,D as qe}from"./useAsyncRetry-6TjWJyO6.js";import{C as re}from"./confirm-BSaR4_fO.js";import{A as ht}from"./actions-CL4xTGOh.js";import{D as gt}from"./delete-confirm-BR2z4Ljn.js";import{o as Ee}from"./vendor-arcblock-C-xQV6LY.js";import{u as Dt}from"./useAsync-DZevTxbv.js";import{f as N}from"./index-DBs9Ljax.js";import{v as yt}from"./index-1BANSka2.js";import{g as jt,p as Le}from"./util-BlUZ4Q2D.js";import{C as bt}from"./click-to-copy-BWrdBff2.js";const vt=Ve({});vt.interceptors.request.use(n=>{const i=window.blocklet?window.blocklet.prefix:"/";return n.baseURL=i||"",n.url=ee("/api",String(n.url)),n.timeout=2e5,n.params=n.params||{},new URLSearchParams(n.url.split("?")[1]).has("locale")||(n.params.locale=bn()),n},n=>Promise.reject(n));const Ye=(...n)=>Ve(...n),Ct=(n,i)=>i?n?[n,...Array.isArray(i)?i:[i]]:i:n,wt=(n,{width:i=600,height:o=700,name:a="did-domain:popup"}={})=>{const s=window.screenX+(window.innerWidth-i)/2,r=window.screenY+(window.innerHeight-o)/2,u=[`left=${s}`,`top=${r}`,`width=${i}`,`height=${o}`,"resizable=no","scrollbars=yes","status=yes","popup=yes"],l=window.open("",a,u.join(","));if(l===null)throw new Error("Failed to open popup");return l.location.href=Qn(n,{opener:window.location.origin}),l},St="z2qaGosS3rZ7m5ttP3Nd4V4qczR9TryTcRV4p",Ke=async n=>{if(!n||!n?.trim())return null;const i=Ye(),o=new URL(n);o.pathname="__blocklet__.js",o.searchParams.set("type","json");const{data:a}=await i.get(o.toString()),s=a?.componentMountPoints?.find(m=>m.did===St),r=new URL(n);r.pathname=s?.mountPoint;const u=r.toString(),l=ee(u,"/api");return{base:u,api:l}},Rt=Ge({embed:{iconTip:"Click to view subscription details"},buy:{button:{title:"Buy DID Domain"},status:{inProgress:"Please wait while we are processing your request, the domain will be automatically resolved to the current app after the purchase...",success:"Purchase completed!"},error:{failedToCreateSession:"Failed to create session"}}}),At=Ge({embed:{iconTip:"点击查看订阅详情"},buy:{button:{title:"购买 DID 域名"},status:{inProgress:"请稍等,我们正在处理您的请求,购买域名后会自动解析到当前的应用...",success:"购买完成!"},error:{failedToCreateSession:"创建会话失败"}}}),kt={zh:At,en:Rt},Tt=async({didDomainURL:n,delegatee:i,delegateePk:o})=>{const a=await Ke(n);if(!a)return null;const s=Ye({baseURL:a.api}),{data:r}=await s.post("/payment/session",{delegatee:i,delegateePk:o});return{sessionId:r.sessionId,baseURL:a.base}};function It({delegatee:n,delegateePk:i,didDomainURL:o,locale:a,title:s="",onSuccess:r=()=>{},...u}){const{t:l}=A(),[m,p]=et({currentState:1}),f=j.useRef(null),c=nt(async()=>{const d=await Tt({didDomainURL:o,delegatee:n,delegateePk:i});return d},{debounceWait:500,debounceLeading:!0,debounceTrailing:!1,debounceMaxWait:3e3,refreshDeps:[],onError(d){console.error(d)}}),g=Z(d=>{d.data.type==="didDomain.success"&&(r?.({nftDid:d.data?.nftDid,domain:d.data?.domain,chainHost:d.data?.chainHost}),f.current?.close(),f.current=null,p({currentState:4}),setTimeout(()=>{p({currentState:8})},2e3))});tt(()=>{try{window.removeEventListener("message",g),f.current?.close(),f.current=null}catch(d){console.warn("Failed to close popup",d)}});const y=Z(()=>{p({currentState:1})}),x=Z(()=>{if(p({currentState:2}),!c.data){console.error("Failed to create session");return}b({sessionId:c.data.sessionId,baseURL:c.data.baseURL})}),b=Z(({sessionId:d,baseURL:w})=>{window.addEventListener("message",g);const C=new URL(w);C.searchParams.set("sessionId",d),C.searchParams.set("locale",a),C.searchParams.set("embed","1"),f.current=wt(C.toString());const q=setInterval(()=>{f.current?.closed&&(clearInterval(q),y())},1e3);return()=>clearInterval(q)});return e.jsxs(e.Fragment,{children:[e.jsx(Ne,{loading:c.loading,onClick:x,variant:"contained",startIcon:e.jsx(Sn,{}),...u,children:s||l("buy.button.title")}),e.jsxs(Cn,{fullWidth:!0,maxWidth:"xs",open:m.currentState>1&&m.currentState<8,onClose:y,children:[!c.error&&e.jsxs(h,{sx:{display:"flex",alignItems:"center",flexDirection:"column",gap:2},children:[m.currentState===2&&e.jsx(z,{size:50}),m.currentState===4&&e.jsx(Rn,{sx:{color:"primary.main",fontSize:"5rem"}}),m.currentState===2&&e.jsx(R,{children:l("buy.status.inProgress")}),m.currentState===4&&e.jsx(R,{children:l("buy.status.success")})]}),c.error&&e.jsx(ye,{severity:"error",children:l("buy.error.failedToCreateSession")})]})]})}function Pt(n){return e.jsx(vn,{locale:n.locale,translations:kt,children:e.jsx(It,{...n})})}function qt({nftDid:n,didDomainURL:i,locale:o,sx:a={}}){const{t:s}=A(),[r,u]=se({safeIframeRef:null,popoverAnchorEl:null}),l=j.useRef(null),m=H(),p=ie(m.breakpoints.down("md")),f=x=>{u({popoverAnchorEl:x.currentTarget})},c=()=>{u({popoverAnchorEl:null})},g=it(async()=>{const x=await Ke(i);return x?x.base:null});if(!g.value)return null;if(g.loading)return e.jsx(z,{});const y=ee(g.value,`/embed/domain?nft-did=${n}&locale=${o}`);return e.jsxs(e.Fragment,{children:[e.jsx(L,{title:s("embed.iconTip"),children:e.jsx(h,{component:"img",src:ee(i,"/.well-known/service/blocklet/logo"),alt:"logo",onClick:f,sx:[{width:16,height:16},Ct({cursor:"pointer"},a)]})}),e.jsx($e,{id:"popover-info",open:!!r.popoverAnchorEl,anchorEl:r.popoverAnchorEl,onClose:c,anchorOrigin:{vertical:"bottom",horizontal:"right"},children:e.jsx("iframe",{ref:l,title:s("common.subscription"),width:p?"320px":"400px",height:"350px",style:{border:0,display:"block"},src:y})})]})}const Et=n=>["waiting","creating","renewaling"].includes(n);function en({siteId:n,domain:i,onAdd:o=()=>{},children:a=null,did:s,issuing:r=!1,setIssuing:u=()=>{}}){const{t:l}=A(),[m,p]=j.useState(!1),{inService:f}=F(),[c,g]=j.useState(null),{api:y,ws:{useSubscription:x}}=F(),{mode:b,actions:{refreshDomainStatus:d}}=oe(),w=xt(async()=>{const{cert:T}=await y.findCertificateByDomain({input:{domain:i,did:s}});return T}),C=(T,S)=>{T.domain===i&&(u(!1),p(!1),f&&b!=="setup"&&(S==="success"?E.success(l("setup.domain.genCertSuccess",{domain:T.domain})):S==="error"&&E.error(l("setup.domain.genCertFailed",{domain:T.domain,message:T.message}))))};if(j.useEffect(()=>{w.loading||u(Et(w.value?.status))},[w.loading,w.value?.status,u]),x(Ie.BlockletEvents.certError,T=>C(T,"error")),x(Ie.BlockletEvents.certIssued,T=>{w.retry(),d(T.domain),C(T,"success")}),w.loading||w.value?.status==="normal")return"";const q=()=>{p(!1),g(null)},B=async()=>{p(!0);try{await y.issueLetsEncryptCert({input:{siteId:n,domain:i,did:s,inBlockletSetup:b==="setup"}}),o(),u(!0)}catch(T){console.error(T),u(!1)}finally{p(!1),g(null)}},M={title:l("router.cert.genLetsEncryptCert.title"),description:e.jsxs("div",{children:[e.jsx(ye,{severity:"success",children:l("router.cert.genLetsEncryptCert.dnsTip")}),l("router.cert.genLetsEncryptCert.description")]}),confirm:l("common.confirm"),onConfirm:B,onCancel:q},U=T=>{T.stopPropagation(),g(M)};return e.jsxs(e.Fragment,{children:[r?e.jsx(L,{title:l("router.cert.issuing"),children:e.jsx(z,{size:13,style:{fontSize:"13px"}})}):a({loading:m,open:U}),c&&e.jsx(re,{color:"primary",title:c.title,description:c.description,confirm:c.confirm,params:c.params,onConfirm:c.onConfirm,onCancel:c.onCancel})]})}en.propTypes={domain:t.string.isRequired,did:t.string.isRequired,siteId:t.string.isRequired,onAdd:t.func,children:t.any,issuing:t.bool,setIssuing:t.func};function nn({domain:n,domainStatus:i,did:o,onAdd:a=()=>{},children:s=null,issuing:r=!1,setIssuing:u=()=>{},...l}){return st(n)||!Qe(n)||Xn(i)||i?.isHttps?"":e.jsx(en,{...l,domain:n,did:o,onAdd:a,issuing:r,setIssuing:u,children:s})}nn.propTypes={domain:t.string.isRequired,domainStatus:t.shape({isHttps:t.bool}).isRequired,did:t.string.isRequired,onAdd:t.func,children:t.any,issuing:t.bool,setIssuing:t.func};function tn({id:n,domain:i,children:o=null,teamDid:a="",onDelete:s=null}){const{t:r}=A(),[u,l]=j.useState(!1),[m,p]=j.useState(null),{api:f}=F(),c=()=>{l(!1),p(null)},g=async()=>{l(!0);try{await f.deleteDomainAlias({input:{id:n,domainAlias:i,teamDid:a}}),s?.(),await ot(2e3)}catch(b){E.error(b.message)}finally{p(null),l(!1)}},y={keyName:i,title:r("router.domainAlias.delete.title"),description:r("router.domainAlias.delete.description",{domain:i}),confirmPlaceholder:r("router.domainAlias.delete.confirmPlaceholder",{domain:i}),confirm:r("common.delete"),onConfirm:g,onCancel:c},x=b=>{b.stopPropagation(),p(y)};return e.jsxs(e.Fragment,{children:[typeof o=="function"?o({loading:u,open:x}):e.jsxs(te,{edge:"end",onClick:x,size:"small",className:"rule-action",color:"error","data-cy":"action-delete-domain-alias",children:[u?e.jsx(z,{size:16}):e.jsx(Oe,{style:{fontSize:16}}),r("common.delete")]}),m&&e.jsx(gt,{keyName:m.keyName,title:m.title,description:m.description,confirmPlaceholder:m.confirmPlaceholder,confirm:m.confirm,params:m.params,onConfirm:m.onConfirm,onCancel:m.onCancel})]})}tn.propTypes={id:t.string.isRequired,domain:t.string.isRequired,children:t.any,teamDid:t.string,onDelete:t.func};function sn({site:n,domain:i,blocklet:o,onDelete:a=()=>{}}){const{t:s}=A(),r=i.value===window.location.hostname;return e.jsx(ht,{"data-cy":"domain-actions",size:"large",actions:[({close:u})=>e.jsx(tn,{id:n.id,domain:i.value,teamDid:o?.meta?.did,onDelete:a,children:({open:l})=>e.jsx(L,{title:r?s("blocklet.router.currentDomainTip"):"",children:e.jsx("span",{children:e.jsxs(_e,{disabled:i.isProtected||r,dense:!0,onClick:m=>{u(),l(m)},"data-cy":"action-toggle-block",children:[e.jsx(An,{style:{minWidth:24,marginRight:8},children:e.jsx(Oe,{})}),e.jsx(kn,{primary:s("common.delete")})]},"remove")})})})]})}sn.propTypes={site:t.object.isRequired,domain:t.object.isRequired,blocklet:t.object.isRequired,onDelete:t.func};const ae=t.shape({href:t.string,accessibility:t.shape({loading:t.bool,accessible:t.bool}),domainStatus:t.shape({isHttps:t.bool,matchedCert:t.object}),dns:t.shape({resolved:t.bool,ip:t.string})});function on({certificate:n={}}){const[i,o]=j.useState(null),a=F(),{t:s,locale:r}=A(),u=p=>{o(p.currentTarget)},l=()=>{o(null)},m=!!i;return e.jsxs(e.Fragment,{children:[e.jsx(Tn,{"aria-owns":m?"mouse-over-popover":void 0,onMouseEnter:u,onMouseLeave:l,style:{color:"#44cdc6",fontSize:"1em",cursor:"pointer"}}),e.jsx($e,{id:"mouse-over-popover",style:{pointerEvents:"none"},open:m,anchorEl:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:l,disableRestoreFocus:!0,children:e.jsx(In,{children:e.jsxs(Pn,{style:{display:"flex"},children:[e.jsx("div",{children:e.jsx("img",{src:`${a.imgPrefix}/https-certificate-icon.png`,alt:"certificate icon",style:{maxHeight:"100%",maxWidth:"100%"}})}),e.jsxs(R,{component:"div",style:{marginLeft:"16px"},children:[e.jsx(R,{component:"div",style:{fontWeight:"bold"},children:n.domain}),e.jsx(R,{component:"div",children:`${s("common.issuer")}: ${Zn(n,"issuer.commonName","")}`}),e.jsx(R,{component:"div",children:`${s("router.cert.issuedOn")}: ${Pe(n.validFrom,r)}`}),e.jsx(R,{component:"div",children:`${s("router.cert.expiryOn")}: ${Pe(n.validTo,r)}`})]})]})})})]})}on.propTypes={certificate:t.object};function ne({domain:n,filters:i=["domain","http"]}){const{t:o}=A(),{value:a,domainStatus:s}=n;if(!Qe(a))return null;let r=null,u=null;const{isHttps:l,matchedCert:m}=s,{dns:{ip:p,isDnsResolved:f,isCnameMatch:c}={}}=s,g=f&&c;rt(a)||(g||p==="127.0.0.1"?r=e.jsx(L,{title:o("router.domain.verify.ok"),children:e.jsx(qe,{color:"success"})}):r=e.jsx(L,{title:o("router.domain.verify.notResolved"),children:e.jsx(qe,{color:"error"})})),g?l?u=e.jsx(on,{certificate:m}):u=e.jsx(L,{title:o("router.domain.https.bad"),children:e.jsx(qn,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})}):u=e.jsx(L,{title:o("router.domain.verify.notResolved"),children:e.jsx(En,{style:{color:"#D0021B",fontSize:"1em",cursor:"pointer"}})});const y=i.map(x=>x==="domain"?r:x==="http"?u:null);return j.createElement(j.Fragment,null,...y)}ne.propTypes={domain:ae.isRequired,filters:t.array};const Lt=Je(be,"mutate_blocklets"),Ft=Je(be,"",at);function pi(n){const{inService:i}=F(),{blocklet:o,loadingRuntimeInfo:a}=oe();let s=Lt;return i&&(s=Ft),e.jsx(s,{...n,blocklet:o,inService:i,loadingRuntimeInfo:a})}const Fe="nft-domain";function be({hasPermission:n=!1,blocklet:i,loadingRuntimeInfo:o=!1,inService:a=!1,showAllDomains:s=!1,updateBlockletDomainAliases:r=()=>{},systemTips:u=null}){const{t:l}=A(),m=ie(d=>d.breakpoints.down("md")),p=j.useMemo(()=>{let d=n;return lt(i)&&(d=d&&a),d},[n,a,i]),{site:f}=i,c=j.useMemo(()=>Xe(i.site?.domainAliases),[i.site?.domainAliases]),g=j.useMemo(()=>c.filter(d=>!fe.isCustomDomain(d.value)),[c]),y=j.useMemo(()=>c.filter(d=>fe.isCustomDomain(d.value)),[c]),x=j.useMemo(()=>y.filter(d=>d.type!==Fe),[y]),b=j.useMemo(()=>y.filter(d=>d.type===Fe),[y]);return e.jsxs(e.Fragment,{children:[e.jsxs(W,{sx:{gap:3},children:[!!b.length&&e.jsx(K,{title:l("common.didDomains"),description:l("common.didDomainsDescription"),domains:b,hasMutatePermission:p,blocklet:i,site:f,mobile:m,showAllDomains:s,updateBlockletDomainAliases:r}),!!x.length&&e.jsx(K,{title:l("common.manualDomains"),description:l("common.manualDomainsDescription"),domains:x,hasMutatePermission:p,blocklet:i,site:f,mobile:m,showAllDomains:s,updateBlockletDomainAliases:r}),!!g.length&&e.jsxs(h,{children:[u,e.jsx(K,{title:l("common.systemDomains"),description:l("common.systemDomainsDescription"),domains:g,hasMutatePermission:p,blocklet:i,site:f,mobile:m,updateBlockletDomainAliases:r})]})]}),!c.length&&(o?e.jsx(z,{size:16}):e.jsx(wn,{children:l("common.empty")}))]})}be.propTypes={hasPermission:t.bool,blocklet:t.object.isRequired,loadingRuntimeInfo:t.bool,inService:t.bool.isRequired,showAllDomains:t.bool,updateBlockletDomainAliases:t.func,systemTips:t.node};function J({children:n=null}){return e.jsx(h,{component:"span",sx:{verticalAlign:"bottom"},children:n})}J.propTypes={children:t.node};function he({domain:n,children:i,suffix:o=null,...a}){const{t:s,locale:r}=A(),u=H(),{href:l,accessibility:m,value:p}=n,f=j.useCallback(()=>e.jsx(ze,{content:je(p),locale:r,style:{marginLeft:"4px",color:u.palette.text.secondary,fontSize:"0.8em"}}),[p,r,u]);return!m||m.loading?e.jsxs(me,{component:"span",...a,children:[e.jsx(L,{title:void 0,placement:"top-end",children:e.jsx(h,{component:"span",children:i})}),f(),e.jsx(J,{children:o}),e.jsx(L,{title:s("blocklet.router.checkUrlAccessible"),placement:"top-end",children:e.jsx(h,{component:"span",className:"status",children:e.jsx(z,{size:13,style:{fontSize:"13px"}})})})]}):m.accessible?e.jsxs(me,{component:"span",...a,children:[e.jsx(h,{component:"a",href:l,target:"_blank",rel:"noopener noreferrer",sx:{color:n.loading?"text.disabled":void 0},children:e.jsx(L,{title:void 0,placement:"top-end",children:e.jsx(h,{component:"span",children:i})})}),f(),e.jsx(J,{children:o})]}):e.jsxs(me,{component:"span",...a,children:[e.jsx(L,{title:s("blocklet.router.urlInaccessible"),placement:"top-end",children:e.jsx(h,{component:"span",children:i})}),!n.loading&&f(),e.jsx(J,{children:o})]})}he.propTypes={domain:ae.isRequired,children:t.any.isRequired,suffix:t.node};const me=Mn(h)`
2
2
  display: inline-block;
3
3
  vertical-align: middle;
4
4
 
@@ -1 +1 @@
1
- import{r as m}from"./vendor-react-Dvs43sk9.js";import{T as n}from"./vendor-ux-ESjuHpb6.js";import{a8 as p,Z as l,aa as c,f as u}from"./index-CndEvJBJ.js";import{a as x,b as d}from"./domain-action-card-CVS3TpUQ.js";import{j as t,ak as k,b1 as f,aX as h}from"./vendor-mui-core-CmD-NPnl.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./useSetState-DFuQZPPV.js";import"./permission-D4s1M96M.js";import"./session-BrZcMmG5.js";import"./useAsyncRetry-6TjWJyO6.js";import"./useAsync-CNAYLnLm.js";import"./confirm-BAs5EAFg.js";import"./index-DBs9Ljax.js";import"./actions-CL4xTGOh.js";import"./delete-confirm-ARBINDJj.js";import"./click-to-copy-BWrdBff2.js";import"./useAsync-DZevTxbv.js";import"./index-1BANSka2.js";import"./util-HCACAM-i.js";import"./engine-Coh-wnMb.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
+ import{r as m}from"./vendor-react-Dvs43sk9.js";import{T as n}from"./vendor-ux-ESjuHpb6.js";import{a8 as p,Z as l,aa as c,f as u}from"./index-6k6hDX7K.js";import{a as x,b as d}from"./domain-action-card-DmX4ipuD.js";import{j as t,ak as k,b1 as f,aX as h}from"./vendor-mui-core-CmD-NPnl.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./useSetState-DFuQZPPV.js";import"./permission-Doi0-9cF.js";import"./session-D-9YOhAy.js";import"./useAsyncRetry-6TjWJyO6.js";import"./useAsync-CNAYLnLm.js";import"./confirm-BSaR4_fO.js";import"./index-DBs9Ljax.js";import"./actions-CL4xTGOh.js";import"./delete-confirm-BR2z4Ljn.js";import"./click-to-copy-BWrdBff2.js";import"./useAsync-DZevTxbv.js";import"./index-1BANSka2.js";import"./util-BlUZ4Q2D.js";import"./engine-B4t4bO94.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,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CgdhTqWX.js","assets/vendor-react-Dvs43sk9.js"])))=>i.map(i=>d[i]);
2
- import{T as U,I as q,_ as w,H as C,J,K as Q}from"./vendor-ux-ESjuHpb6.js";import{j as t,b1 as f,b0 as X,b2 as Z,T as b,Q as T,a$ as ee,ak as B,z as $,a6 as te,at as se}from"./vendor-mui-core-CmD-NPnl.js";import{r as i,u as ne}from"./vendor-react-Dvs43sk9.js";import{H as g}from"./vendor-utils-DQK0pEML.js";import{a as ie,J as h,e as O,c as j,H as oe,K as re,M as ae}from"./index-CndEvJBJ.js";import{K as ce}from"./landing-page-BoP0vrKb.js";import{f as _}from"./index-DBs9Ljax.js";import{g as D}from"./get-safe-url-C_gWJx9x.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";const le=se.form`
2
+ import{T as U,I as q,_ as w,H as C,J,K as Q}from"./vendor-ux-ESjuHpb6.js";import{j as t,b1 as f,b0 as X,b2 as Z,T as b,Q as T,a$ as ee,ak as B,z as $,a6 as te,at as se}from"./vendor-mui-core-CmD-NPnl.js";import{r as i,u as ne}from"./vendor-react-Dvs43sk9.js";import{H as g}from"./vendor-utils-DQK0pEML.js";import{a as ie,J as h,e as O,c as j,H as oe,K as re,M as ae}from"./index-6k6hDX7K.js";import{K as ce}from"./landing-page-Bb2t2ubc.js";import{f as _}from"./index-DBs9Ljax.js";import{g as D}from"./get-safe-url-C5Vpma4S.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";const le=se.form`
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  align-items: center;
@@ -0,0 +1 @@
1
+ import{a1 as e}from"./index-6k6hDX7K.js";var a=e();export{a as e};
@@ -1 +1 @@
1
- import{j as e,a6 as P,ak as E}from"./vendor-mui-core-CmD-NPnl.js";import{r as T,i as k}from"./vendor-react-Dvs43sk9.js";import{o as j}from"./vendor-arcblock-C-xQV6LY.js";import{T as C,H as d,Q as S}from"./vendor-ux-ESjuHpb6.js";import{v as W,c as v,S as I,s as R,b as U}from"./index-CndEvJBJ.js";import{K as b}from"./landing-page-BoP0vrKb.js";import{w as L}from"./wrap-locale-CScOhszz.js";import{g as N}from"./get-safe-url-C_gWJx9x.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";function _({SessionContext:n,webWalletUrl:a,onSuccess:o}){const{api:t,session:i}=T.useContext(n),{t:s,locale:h}=C(),f=k(),{searchParams:p}=new URL(window.location.href),l=p.get("redirect"),g=async(r,w)=>{o(r,w),await i.refresh(),d.success(s("exchangePassport.success")),setTimeout(()=>{if(l){const c=decodeURIComponent(l);c.startsWith(v.WELLKNOWN_SERVICE_PATH_PREFIX)?f(c,{replace:!0}):window.location.href=N(c)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},u=r=>{d.error(r.message)},m={},x=p.get("componentId");return x&&(m.componentId=x),i.loading?e.jsx(j,{children:e.jsx(P,{})}):e.jsx(b,{did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(E,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(W,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:t.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:g,onError:u,locale:h,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:m,extraContent:null,hideCloseButton:!0})})})}const B=L(_);function y(){const n=S(),a=(o,t)=>{o.sessionToken&&(R(t(o.sessionToken)),U(t(o.refreshToken)))};return e.jsx(B,{SessionContext:I,webWalletUrl:n,onSuccess:a})}export{y as default};
1
+ import{j as e,a6 as P,ak as E}from"./vendor-mui-core-CmD-NPnl.js";import{r as T,i as k}from"./vendor-react-Dvs43sk9.js";import{o as j}from"./vendor-arcblock-C-xQV6LY.js";import{T as C,H as d,Q as S}from"./vendor-ux-ESjuHpb6.js";import{v as W,c as v,S as I,s as R,b as U}from"./index-6k6hDX7K.js";import{K as b}from"./landing-page-Bb2t2ubc.js";import{w as L}from"./wrap-locale-BraEpa0W.js";import{g as N}from"./get-safe-url-C5Vpma4S.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";function _({SessionContext:n,webWalletUrl:a,onSuccess:o}){const{api:t,session:i}=T.useContext(n),{t:s,locale:h}=C(),f=k(),{searchParams:p}=new URL(window.location.href),l=p.get("redirect"),g=async(r,w)=>{o(r,w),await i.refresh(),d.success(s("exchangePassport.success")),setTimeout(()=>{if(l){const c=decodeURIComponent(l);c.startsWith(v.WELLKNOWN_SERVICE_PATH_PREFIX)?f(c,{replace:!0}):window.location.href=N(c)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},u=r=>{d.error(r.message)},m={},x=p.get("componentId");return x&&(m.componentId=x),i.loading?e.jsx(j,{children:e.jsx(P,{})}):e.jsx(b,{did:window?.blocklet?.appPid||window?.env?.appPid,children:e.jsx(E,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(W,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:t.get,checkTimeout:10*60*1e3,webWalletUrl:a,onSuccess:g,onError:u,locale:h,messages:{title:s("exchangePassport.dialog.title"),scan:s("exchangePassport.dialog.scan"),confirm:s("exchangePassport.dialog.confirm"),success:s("exchangePassport.dialog.success")},extraParams:m,extraContent:null,hideCloseButton:!0})})})}const B=L(_);function y(){const n=S(),a=(o,t)=>{o.sessionToken&&(R(t(o.sessionToken)),U(t(o.refreshToken)))};return e.jsx(B,{SessionContext:I,webWalletUrl:n,onSuccess:a})}export{y as default};
@@ -1,4 +1,4 @@
1
- import{D as w,j as o,a6 as v,T as B,bo as S}from"./vendor-mui-core-CmD-NPnl.js";import{o as T}from"./vendor-arcblock-C-xQV6LY.js";import{T as k,F}from"./vendor-ux-ESjuHpb6.js";import{r as _}from"./vendor-react-Dvs43sk9.js";import{l as P}from"./vendor-hooks-DLNZ8kxG.js";import{a3 as M,L as D}from"./index-CndEvJBJ.js";import"./vendor-utils-DQK0pEML.js";import"./lottie-web-4koyQiv_.js";const{Elements:I,PaymentElement:R,useElements:z,useStripe:N,loadStripe:L,LinkAuthenticationElement:O}=globalThis.__STRIPE_COMPONENTS__,W=S("div")`
1
+ import{D as w,j as o,a6 as v,T as B,bo as S}from"./vendor-mui-core-CmD-NPnl.js";import{o as T}from"./vendor-arcblock-C-xQV6LY.js";import{T as k,F}from"./vendor-ux-ESjuHpb6.js";import{r as _}from"./vendor-react-Dvs43sk9.js";import{l as P}from"./vendor-hooks-DLNZ8kxG.js";import{a3 as M,L as D}from"./index-6k6hDX7K.js";import"./vendor-utils-DQK0pEML.js";import"./lottie-web-4koyQiv_.js";const{Elements:I,PaymentElement:R,useElements:z,useStripe:N,loadStripe:L,LinkAuthenticationElement:O}=globalThis.__STRIPE_COMPONENTS__,W=S("div")`
2
2
  width: 100%;
3
3
  opacity: 0;
4
4
  transition: opacity 300ms ease;
@@ -1,4 +1,4 @@
1
- import{j as e,ak as s,a6 as w,a$ as B,bc as N,at as v,W as d}from"./vendor-mui-core-CmD-NPnl.js";import{r as l}from"./vendor-react-Dvs43sk9.js";import{C as I}from"./vendor-utils-DQK0pEML.js";import{G as $}from"./vendor-ux-ESjuHpb6.js";import{m as L,a as E,v as z}from"./index-CndEvJBJ.js";import{W as A}from"./did-address-D6qV21Cc.js";import{a as D}from"./page-header-8LlFejLk.js";import{S as F}from"./layout-BakYeqaY.js";import{S as P}from"./step-actions-CqrWvcHB.js";import{S as m}from"./button-bUtVfsu_.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./content-layout-DYZYIlLo.js";import"./use-mobile-CQ7Tw4aD.js";function R({onNext:n=()=>{},onPrevious:x=()=>{}}){const{locale:u,t}=l.useContext($),{blocklet:a,gas:c,tokenInfo:f,actions:h}=L(),{api:j}=E(),[y,o]=l.useState(!1),{need:p="",current:g="",owe:r=99999,deficiency:k,symbol:b="",endpoint:i}=c||{},{origin:C="/"}=i?new URL(i):{};l.useEffect(()=>{const W=setInterval(()=>{h.refreshFuel()},2e3);return()=>{clearInterval(W)}},[]);const S=()=>{o(!1)};return c?e.jsxs(T,{children:[e.jsx("div",{className:"header",children:e.jsx(D,{title:t("setup.fuel.title"),onClickBack:x})}),e.jsxs(s,{className:"qr-body",children:[e.jsxs(s,{className:"tip",sx:{mb:6},children:[t("setup.fuel.tipStart").replace("slot",""),e.jsx("span",{className:"amount",children:`${p} ${b}`}),t("setup.fuel.tipEnd")]}),e.jsx(s,{sx:{fontSize:16,fontWeight:"fontWeightBold",mb:.5},children:t("setup.fuel.addressTitle")}),e.jsxs(s,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(A,{className:"address",did:a.appDid}),e.jsx(B,{style:{lineHeight:1},target:"_blank",href:I(C,"/explorer/accounts/",a.appDid),underline:"hover",children:e.jsx(N,{className:"icon-launch"})})]}),e.jsx(s,{sx:{my:2},children:e.jsx(m,{color:"primary",onClick:()=>o(!0),disabled:!r,children:t("setup.fuel.fuelApp")})}),e.jsx(z,{popup:!0,open:y,action:"fuel",checkFn:j.get,checkTimeout:10*60*1e3,onSuccess:S,onClose:()=>o(!1),locale:u,messages:{title:t("setup.connect.title"),scan:t("setup.connect.scan"),confirm:t("setup.connect.confirm"),success:t("setup.connect.success")},extraParams:{amount:k,...f,endpoint:i}}),e.jsxs(s,{sx:{display:"flex",color:"text.secondary"},children:[e.jsxs(s,{sx:{display:"flex"},children:[e.jsxs(s,{children:[t("setup.fuel.need"),":"]}),e.jsx(s,{sx:{ml:.5,color:"primary.main",fontWeight:"fontWeightBold"},children:p})]}),e.jsxs(s,{sx:{display:"flex",ml:3},children:[e.jsxs(s,{children:[t("setup.fuel.current"),":"]}),e.jsx(s,{sx:{ml:.5,color:r>0?"error.main":"primary.main",fontWeight:"fontWeightBold"},children:g})]})]})]}),e.jsx(P,{mt:8,children:e.jsx(m,{disabled:r>0,onClick:()=>n(),children:t("setup.next")})})]}):e.jsx(s,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},children:e.jsx(w,{})})}R.propTypes={onNext:d.func,onPrevious:d.func};const T=v(F)`
1
+ import{j as e,ak as s,a6 as w,a$ as B,bc as N,at as v,W as d}from"./vendor-mui-core-CmD-NPnl.js";import{r as l}from"./vendor-react-Dvs43sk9.js";import{C as I}from"./vendor-utils-DQK0pEML.js";import{G as $}from"./vendor-ux-ESjuHpb6.js";import{m as L,a as E,v as z}from"./index-6k6hDX7K.js";import{W as A}from"./did-address-D6qV21Cc.js";import{a as D}from"./page-header-8LlFejLk.js";import{S as F}from"./layout-O4FRf5d2.js";import{S as P}from"./step-actions-C91dncKW.js";import{S as m}from"./button-bUtVfsu_.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./content-layout-DYZYIlLo.js";import"./use-mobile-CQ7Tw4aD.js";function R({onNext:n=()=>{},onPrevious:x=()=>{}}){const{locale:u,t}=l.useContext($),{blocklet:a,gas:c,tokenInfo:f,actions:h}=L(),{api:j}=E(),[y,o]=l.useState(!1),{need:p="",current:g="",owe:r=99999,deficiency:k,symbol:b="",endpoint:i}=c||{},{origin:C="/"}=i?new URL(i):{};l.useEffect(()=>{const W=setInterval(()=>{h.refreshFuel()},2e3);return()=>{clearInterval(W)}},[]);const S=()=>{o(!1)};return c?e.jsxs(T,{children:[e.jsx("div",{className:"header",children:e.jsx(D,{title:t("setup.fuel.title"),onClickBack:x})}),e.jsxs(s,{className:"qr-body",children:[e.jsxs(s,{className:"tip",sx:{mb:6},children:[t("setup.fuel.tipStart").replace("slot",""),e.jsx("span",{className:"amount",children:`${p} ${b}`}),t("setup.fuel.tipEnd")]}),e.jsx(s,{sx:{fontSize:16,fontWeight:"fontWeightBold",mb:.5},children:t("setup.fuel.addressTitle")}),e.jsxs(s,{sx:{display:"flex",alignItems:"center"},children:[e.jsx(A,{className:"address",did:a.appDid}),e.jsx(B,{style:{lineHeight:1},target:"_blank",href:I(C,"/explorer/accounts/",a.appDid),underline:"hover",children:e.jsx(N,{className:"icon-launch"})})]}),e.jsx(s,{sx:{my:2},children:e.jsx(m,{color:"primary",onClick:()=>o(!0),disabled:!r,children:t("setup.fuel.fuelApp")})}),e.jsx(z,{popup:!0,open:y,action:"fuel",checkFn:j.get,checkTimeout:10*60*1e3,onSuccess:S,onClose:()=>o(!1),locale:u,messages:{title:t("setup.connect.title"),scan:t("setup.connect.scan"),confirm:t("setup.connect.confirm"),success:t("setup.connect.success")},extraParams:{amount:k,...f,endpoint:i}}),e.jsxs(s,{sx:{display:"flex",color:"text.secondary"},children:[e.jsxs(s,{sx:{display:"flex"},children:[e.jsxs(s,{children:[t("setup.fuel.need"),":"]}),e.jsx(s,{sx:{ml:.5,color:"primary.main",fontWeight:"fontWeightBold"},children:p})]}),e.jsxs(s,{sx:{display:"flex",ml:3},children:[e.jsxs(s,{children:[t("setup.fuel.current"),":"]}),e.jsx(s,{sx:{ml:.5,color:r>0?"error.main":"primary.main",fontWeight:"fontWeightBold"},children:g})]})]})]}),e.jsx(P,{mt:8,children:e.jsx(m,{disabled:r>0,onClick:()=>n(),children:t("setup.next")})})]}):e.jsx(s,{sx:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%"},children:e.jsx(w,{})})}R.propTypes={onNext:d.func,onPrevious:d.func};const T=v(F)`
2
2
  .qr-body {
3
3
  width: 580px;
4
4
  ${n=>n.theme.breakpoints.down("md")} {
@@ -1 +1 @@
1
- import{D as E,j as e,Q as S,b3 as P,b0 as R,ak as r,T as c,a6 as _}from"./vendor-mui-core-CmD-NPnl.js";import{a as I,T as L,c as N,t as p,U as T,V as U}from"./index-CndEvJBJ.js";import{o as W}from"./vendor-arcblock-C-xQV6LY.js";import{G as A}from"./vendor-ux-ESjuHpb6.js";import{g as D,b as w}from"./vendor-hooks-DLNZ8kxG.js";import{i as z,r as i,u as F}from"./vendor-react-Dvs43sk9.js";import{K as a}from"./landing-page-BoP0vrKb.js";import{C as K}from"./vendor-utils-DQK0pEML.js";import{u as M}from"./use-window-close-CN9L863w.js";import"./lottie-web-4koyQiv_.js";function Z(){const m=z(),l=i.useRef(null),{t:s,locale:d}=i.useContext(A),{api:x,connectApi:f}=I(),[h]=F(),j=E(),k=M(),n=D({ready:!1,success:!1,error:null,invalidSession:!1}),b=()=>{try{const o=new URL(window.location.href);if(o.hash.includes("invalid")){n.invalidSession=!0;return}const u=o.searchParams.get("__connect_url__"),v=T(u);if(!U(v))throw new Error("No token");n.ready=!0}catch{n.invalidSession=!0,m("#invalid",{replace:!0})}};i.useLayoutEffect(()=>b(),[]);const C=w(o=>{n.error=o.message,window.opener?.postMessage({type:"connect-endpoint-message",error:n.error},"*"),m("#invalid",{replace:!0})}),g=w(()=>{window.opener?.postMessage({type:"connect-endpoint-message",success:!0},"*"),n.success=!0}),t=h.get("source")||"Generate Access Key";i.useEffect(()=>{l.current&&n.ready&&f.open({locale:d,containerEl:l.current,action:"gen-access-key",extraParams:{remark:t},checkFn:x.get,saveConnect:!1,forceConnected:!1,className:"connect",popup:!1,baseUrl:window.location.origin,prefix:K(window.location.origin,N.WELLKNOWN_SERVICE_PATH_PREFIX,L),messages:{title:s("connectCli.title"),scan:s("connectCli.scan"),confirm:s("auth.confirm"),success:s("connectCli.success")},onSuccess:g,onError:C},{locale:d})},[f,n.ready,x,C,g,d,s,t]);const y=e.jsx(S,{variant:"outlined",color:"primary",size:"small",startIcon:e.jsx(P,{}),href:"/",style:{borderRadius:4},children:s("connectCli.home")});if(n.invalidSession)return e.jsx(a,{did:window.blocklet?.appPid,standalone:!0,children:e.jsx(p,{style:{backgroundColor:"transparent"},status:"error",title:s("connectCli.invalidSession"),description:s("connectCli.invalidSessionDesc"),extra:y})},"invalid");if(n.error){const o=n.error,u=y;return e.jsx(a,{did:window.blocklet?.appPid,standalone:!0,children:e.jsx(p,{style:{backgroundColor:"transparent"},status:"error",title:s("connectCli.connectionError"),description:o,extra:u})},"error")}return n.success?(h.has("closeOnSuccess")&&k(),e.jsx(a,{did:window.blocklet?.appPid,standalone:!0,children:e.jsx(p,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(R,{style:{color:j.palette.success.main,fontSize:72}}),title:s("connectCli.success",{source:t}),description:`${s("connectCli.successDesc",{source:t})} ${s("connectCli.upload")}`})},"success")):n.ready?e.jsx(a,{did:window.blocklet?.appPid,standalone:!0,children:e.jsxs(r,{sx:{maxWidth:"100%",height:"100%"},children:[e.jsxs(r,{sx:{mb:5},children:[e.jsx(c,{variant:"h4",component:"h1",sx:{mb:1,fontWeight:"bold",textAlign:"center"},children:s("connectCli.tips.title")}),e.jsxs(r,{sx:{display:"flex",flexDirection:"column",gap:1,alignItems:"center"},children:[e.jsx(c,{sx:{color:"text.secondary"},children:s("connectCli.tips.item1")}),e.jsx(c,{sx:{color:"text.secondary"},children:s("connectCli.tips.item2")}),e.jsx(c,{sx:{color:"text.secondary"},children:s("connectCli.tips.item3")})]})]}),e.jsx(r,{sx:{display:"inline-block"},ref:l})]})},"ready"):e.jsx(W,{children:e.jsx(_,{})})}export{Z as default};
1
+ import{D as E,j as e,Q as S,b3 as P,b0 as R,ak as r,T as c,a6 as _}from"./vendor-mui-core-CmD-NPnl.js";import{a as I,T as L,c as N,t as p,U as T,V as U}from"./index-6k6hDX7K.js";import{o as W}from"./vendor-arcblock-C-xQV6LY.js";import{G as A}from"./vendor-ux-ESjuHpb6.js";import{g as D,b as w}from"./vendor-hooks-DLNZ8kxG.js";import{i as z,r as i,u as F}from"./vendor-react-Dvs43sk9.js";import{K as a}from"./landing-page-Bb2t2ubc.js";import{C as K}from"./vendor-utils-DQK0pEML.js";import{u as M}from"./use-window-close-CN9L863w.js";import"./lottie-web-4koyQiv_.js";function Z(){const m=z(),l=i.useRef(null),{t:s,locale:d}=i.useContext(A),{api:x,connectApi:f}=I(),[h]=F(),j=E(),k=M(),n=D({ready:!1,success:!1,error:null,invalidSession:!1}),b=()=>{try{const o=new URL(window.location.href);if(o.hash.includes("invalid")){n.invalidSession=!0;return}const u=o.searchParams.get("__connect_url__"),v=T(u);if(!U(v))throw new Error("No token");n.ready=!0}catch{n.invalidSession=!0,m("#invalid",{replace:!0})}};i.useLayoutEffect(()=>b(),[]);const C=w(o=>{n.error=o.message,window.opener?.postMessage({type:"connect-endpoint-message",error:n.error},"*"),m("#invalid",{replace:!0})}),g=w(()=>{window.opener?.postMessage({type:"connect-endpoint-message",success:!0},"*"),n.success=!0}),t=h.get("source")||"Generate Access Key";i.useEffect(()=>{l.current&&n.ready&&f.open({locale:d,containerEl:l.current,action:"gen-access-key",extraParams:{remark:t},checkFn:x.get,saveConnect:!1,forceConnected:!1,className:"connect",popup:!1,baseUrl:window.location.origin,prefix:K(window.location.origin,N.WELLKNOWN_SERVICE_PATH_PREFIX,L),messages:{title:s("connectCli.title"),scan:s("connectCli.scan"),confirm:s("auth.confirm"),success:s("connectCli.success")},onSuccess:g,onError:C},{locale:d})},[f,n.ready,x,C,g,d,s,t]);const y=e.jsx(S,{variant:"outlined",color:"primary",size:"small",startIcon:e.jsx(P,{}),href:"/",style:{borderRadius:4},children:s("connectCli.home")});if(n.invalidSession)return e.jsx(a,{did:window.blocklet?.appPid,standalone:!0,children:e.jsx(p,{style:{backgroundColor:"transparent"},status:"error",title:s("connectCli.invalidSession"),description:s("connectCli.invalidSessionDesc"),extra:y})},"invalid");if(n.error){const o=n.error,u=y;return e.jsx(a,{did:window.blocklet?.appPid,standalone:!0,children:e.jsx(p,{style:{backgroundColor:"transparent"},status:"error",title:s("connectCli.connectionError"),description:o,extra:u})},"error")}return n.success?(h.has("closeOnSuccess")&&k(),e.jsx(a,{did:window.blocklet?.appPid,standalone:!0,children:e.jsx(p,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(R,{style:{color:j.palette.success.main,fontSize:72}}),title:s("connectCli.success",{source:t}),description:`${s("connectCli.successDesc",{source:t})} ${s("connectCli.upload")}`})},"success")):n.ready?e.jsx(a,{did:window.blocklet?.appPid,standalone:!0,children:e.jsxs(r,{sx:{maxWidth:"100%",height:"100%"},children:[e.jsxs(r,{sx:{mb:5},children:[e.jsx(c,{variant:"h4",component:"h1",sx:{mb:1,fontWeight:"bold",textAlign:"center"},children:s("connectCli.tips.title")}),e.jsxs(r,{sx:{display:"flex",flexDirection:"column",gap:1,alignItems:"center"},children:[e.jsx(c,{sx:{color:"text.secondary"},children:s("connectCli.tips.item1")}),e.jsx(c,{sx:{color:"text.secondary"},children:s("connectCli.tips.item2")}),e.jsx(c,{sx:{color:"text.secondary"},children:s("connectCli.tips.item3")})]})]}),e.jsx(r,{sx:{display:"inline-block"},ref:l})]})},"ready"):e.jsx(W,{children:e.jsx(_,{})})}export{Z as default};
@@ -1 +1 @@
1
- import{j as e,ak as r,T as v,a6 as E,b1 as J,Q as P,a$ as Q,D as V,aX as M,bM as O,b0 as X}from"./vendor-mui-core-CmD-NPnl.js";import{r as p,i as Y,u as Z}from"./vendor-react-Dvs43sk9.js";import{O as ee,a as ne,e as se,U as W,t as oe,au as te,c as re}from"./index-CndEvJBJ.js";import{n as S,C as R}from"./vendor-utils-DQK0pEML.js";import{g as K,b as d,p as ie,q as ae}from"./vendor-hooks-DLNZ8kxG.js";import{M as $,T as H,a5 as ce,C as q,a2 as le}from"./vendor-ux-ESjuHpb6.js";import{o as ue}from"./vendor-arcblock-C-xQV6LY.js";import{K as de}from"./landing-page-BoP0vrKb.js";import{B as pe,o as he,l as xe}from"./index-DX_0Aq5L.js";import{u as fe}from"./use-window-close-CN9L863w.js";import"./lottie-web-4koyQiv_.js";function ge({requestAppInfo:i,currentAppInfo:y}){return e.jsxs(r,{sx:{textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[e.jsxs(r,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx($,{src:y.appLogo,alt:"Server",width:48,height:48,useProxyFallback:!0}),e.jsxs(r,{sx:{mx:2,display:"flex",alignItems:"center","& .dot":{width:8,height:8,borderRadius:"50%",bgcolor:"grey.500",mx:.5}},children:[e.jsx(r,{className:"dot"}),e.jsx(r,{className:"dot"}),e.jsx(r,{className:"dot"})]}),e.jsx($,{src:i.appLogo,alt:i.appName,width:48,height:48,useProxyFallback:!0})]}),e.jsxs(v,{sx:{mb:1,fontSize:"1.2rem"},children:["Authorize"," ",e.jsx(r,{component:"span",sx:{color:"primary.main"},children:i.appName})]})]})}const me={en:{notThis:"Not you?",useAnother:"Use another account",authorize:"Authorize",connect:"Connect",cancel:"Cancel"},zh:{notThis:"不是这个?",useAnother:"使用其他账户",authorize:"授权",connect:"Connect",cancel:"取消"}};function je({session:i,requestAppInfo:y,currentAppInfo:T,children:_=null,userInfo:o=void 0,hideSwitchConnect:k=!1,hideAuthorize:n=!1,hideCancel:z=!1,hideButton:b=!1,notThisText:N=void 0,authorizeText:t=void 0,connectText:a=void 0,cancelText:L=void 0,useAnotherText:C=void 0,slotProps:l=void 0,onConnect:I=S,onAuthorize:U=S,onSwitchConnect:D=S,onCancel:x=S,ref:w}){const c=K({loading:!1}),{locale:A="en"}=H()||{},h=d((j,G={})=>ce(me,j,A,"en",G)),f=d(()=>{c.loading=!1}),s=d(()=>{c.loading=!0,I?.(f)}),u=d(()=>{c.loading=!0,D?.(f)}),g=d(()=>{c.loading=!0,U?.(f)}),B=d(()=>{x?.()});if(p.useImperativeHandle(w,()=>({closeLoading:f})),i.loading||!i.initialized)return e.jsx(ue,{children:e.jsx(E,{})});const m=o??i?.user;return e.jsx(de,{did:window.blocklet?.appPid,standalone:!0,children:e.jsx(r,{...l?.root,sx:q({width:420,maxWidth:"100%"},l?.root?.sx),children:e.jsx(ee,{hideCloseButton:!0,...l?.didConnectContainer,children:e.jsxs(r,{...l?.contentContainer,sx:q({display:"flex",flexDirection:"column",gap:1.5,p:{xs:2,lg:3,xl:4},pt:{xs:3,xl:4},bgcolor:"background.paper"},l?.contentContainer?.sx),children:[e.jsx(ge,{requestAppInfo:y,currentAppInfo:T}),m?e.jsxs(e.Fragment,{children:[e.jsx(pe,{user:m,showDid:!0,cardType:xe.Detailed,infoType:he.Minimal}),e.jsx(r,{})]}):null,_,b?null:e.jsxs(e.Fragment,{children:[e.jsx(r,{sx:{border:"1px solid",borderColor:"divider",borderRadius:2,overflow:"hidden",my:1}}),e.jsxs(J,{direction:"row",spacing:2,children:[z?null:e.jsx(P,{color:"inherit",variant:"outlined",size:"large",fullWidth:!0,onClick:B,sx:{color:"grey.500"},children:L||h("cancel")}),m&&!n?e.jsxs(P,{variant:"contained",size:"large",fullWidth:!0,onClick:g,disabled:c.loading,children:[c.loading?e.jsx(E,{size:20,sx:{mr:1}}):null,t||h("authorize")]}):e.jsxs(P,{variant:"contained",size:"large",fullWidth:!0,disabled:c.loading,onClick:s,children:[c.loading?e.jsx(E,{size:20,sx:{mr:1}}):null,a||h("connect")]})]})]}),k||!m?null:e.jsx(r,{sx:{textAlign:"center"},children:e.jsxs(v,{variant:"body2",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:1},children:[N||h("notThis")," ",e.jsx(Q,{underline:"hover",onClick:u,sx:{cursor:"pointer"},children:C||h("useAnother")})]})})]})})})})}const ye=R(window.location.origin,re.WELLKNOWN_BLOCKLET_USER_PATH,"settings#user-center-access-key-setting"),F=3e3;function Le(){const i=p.useRef(null),[y,T]=p.useState(),[_]=ie({targetDate:y}),{session:o}=ne(),k=V(),n=K({ready:!1,success:!1,error:null,invalidSession:!1,token:null}),[z,b]=ae("currentUserInfo",{defaultValue:null}),N=Y(),{t}=H(),[a]=Z(),L=fe(),[,C]=p.useState(!0),[l,I]=p.useState({appName:a.get("cli")?a.get("appName")??t("aigne.cli"):"",appLogo:a.get("cli")?a.get("appLogo"):""}),U=async()=>{C(!0);try{const s=a.get("__url__"),u=s?W(s):null;if(!u){C(!1);return}const g="__blocklet__.js?type=json",m=new URL(u).origin,{data:j}=await te.get(R(m,g));I({appName:j?.appName,appUrl:j?.appUrl,appLogo:R(j?.appUrl,j?.appLogo)})}catch(s){console.error(s)}finally{C(!1)}},D=()=>{U(),o.user&&b(o.user);try{const s=new URL(window.location.href);if(s.hash.includes("invalid")){n.invalidSession=!0;return}const u=s.searchParams.get("__token__"),g=u?W(u):null;if(!g)throw new Error("No token");n.token=g,n.ready=!0}catch(s){n.invalidSession=!0,n.error=s.message,window.opener?.postMessage({type:"connect-aigne-message",error:s.message},"*"),N("#invalid",{replace:!0})}};p.useLayoutEffect(()=>D(),[]);const x=window.blocklet,w=a.get("source")||"Generate Access Key",c=d(async s=>{try{await se.post("/access-key/authorize",{source:w,sid:n.token}),n.success=!0,window.opener?.postMessage({type:"connect-aigne-message",success:!0},"*"),a.has("closeOnSuccess")&&(T(Date.now()+F),setTimeout(()=>L(),F))}catch(u){console.error(u)}finally{s()}}),A=d(()=>{o.login()}),h=d(()=>{window.close()});p.useEffect(()=>{o.initialized&&!o.user&&(le()||A())},[o?.user,o?.initialized,A]),p.useEffect(()=>{o.open||i.current?.closeLoading?.()},[o.open]);const f=()=>n.error?e.jsxs(M,{severity:"error",children:[e.jsx(O,{children:t("aigne.notAuthorized")}),n.error]}):n.success?e.jsx(oe,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(X,{style:{color:k.palette.success.main,fontSize:72}}),title:t("connectCli.success",{source:w}),description:`${t("connectCli.successDesc",{source:w})} ${a.has("closeOnSuccess")?t("connectCli.closeDelay",{seconds:Math.ceil(_/1e3)}):""}`}):e.jsxs(M,{severity:"info",children:[e.jsx(O,{children:t("aigne.connectTo",{appName:x.appName})}),e.jsx(v,{component:"li",variant:"body2",children:t("aigne.accessTips.tips1",{appName:l.appName,accessAppName:x.appName})}),e.jsx(v,{component:"li",variant:"body2",children:t("aigne.accessTips.tips2",{appName:l.appName})}),e.jsx(v,{component:"li",variant:"body2",sx:{"& a":{color:"inherit",textDecoration:"underline"}},dangerouslySetInnerHTML:{__html:t("aigne.accessTips.tips3",{url:ye,accessAppName:x.appName})}})]});return e.jsx(je,{ref:i,session:o,requestAppInfo:l,currentAppInfo:x,userInfo:z,onAuthorize:c,onConnect:A,onSwitchConnect:o.switchDid,onCancel:h,hideAuthorize:!!n.error,hideSwitchConnect:n.success,hideButton:n.success,authorizeText:t("common.approve"),slotProps:{root:{sx:{width:500}}},children:f()})}export{Le as default};
1
+ import{j as e,ak as r,T as v,a6 as E,b1 as J,Q as P,a$ as Q,D as V,aX as M,bM as O,b0 as X}from"./vendor-mui-core-CmD-NPnl.js";import{r as p,i as Y,u as Z}from"./vendor-react-Dvs43sk9.js";import{O as ee,a as ne,e as se,U as W,t as oe,au as te,c as re}from"./index-6k6hDX7K.js";import{n as S,C as R}from"./vendor-utils-DQK0pEML.js";import{g as K,b as d,p as ie,q as ae}from"./vendor-hooks-DLNZ8kxG.js";import{M as $,T as H,a5 as ce,C as q,a2 as le}from"./vendor-ux-ESjuHpb6.js";import{o as ue}from"./vendor-arcblock-C-xQV6LY.js";import{K as de}from"./landing-page-Bb2t2ubc.js";import{B as pe,o as he,l as xe}from"./index-BE6_aQqm.js";import{u as fe}from"./use-window-close-CN9L863w.js";import"./lottie-web-4koyQiv_.js";function ge({requestAppInfo:i,currentAppInfo:y}){return e.jsxs(r,{sx:{textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[e.jsxs(r,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx($,{src:y.appLogo,alt:"Server",width:48,height:48,useProxyFallback:!0}),e.jsxs(r,{sx:{mx:2,display:"flex",alignItems:"center","& .dot":{width:8,height:8,borderRadius:"50%",bgcolor:"grey.500",mx:.5}},children:[e.jsx(r,{className:"dot"}),e.jsx(r,{className:"dot"}),e.jsx(r,{className:"dot"})]}),e.jsx($,{src:i.appLogo,alt:i.appName,width:48,height:48,useProxyFallback:!0})]}),e.jsxs(v,{sx:{mb:1,fontSize:"1.2rem"},children:["Authorize"," ",e.jsx(r,{component:"span",sx:{color:"primary.main"},children:i.appName})]})]})}const me={en:{notThis:"Not you?",useAnother:"Use another account",authorize:"Authorize",connect:"Connect",cancel:"Cancel"},zh:{notThis:"不是这个?",useAnother:"使用其他账户",authorize:"授权",connect:"Connect",cancel:"取消"}};function je({session:i,requestAppInfo:y,currentAppInfo:T,children:_=null,userInfo:o=void 0,hideSwitchConnect:k=!1,hideAuthorize:n=!1,hideCancel:z=!1,hideButton:b=!1,notThisText:N=void 0,authorizeText:t=void 0,connectText:a=void 0,cancelText:L=void 0,useAnotherText:C=void 0,slotProps:l=void 0,onConnect:I=S,onAuthorize:U=S,onSwitchConnect:D=S,onCancel:x=S,ref:w}){const c=K({loading:!1}),{locale:A="en"}=H()||{},h=d((j,G={})=>ce(me,j,A,"en",G)),f=d(()=>{c.loading=!1}),s=d(()=>{c.loading=!0,I?.(f)}),u=d(()=>{c.loading=!0,D?.(f)}),g=d(()=>{c.loading=!0,U?.(f)}),B=d(()=>{x?.()});if(p.useImperativeHandle(w,()=>({closeLoading:f})),i.loading||!i.initialized)return e.jsx(ue,{children:e.jsx(E,{})});const m=o??i?.user;return e.jsx(de,{did:window.blocklet?.appPid,standalone:!0,children:e.jsx(r,{...l?.root,sx:q({width:420,maxWidth:"100%"},l?.root?.sx),children:e.jsx(ee,{hideCloseButton:!0,...l?.didConnectContainer,children:e.jsxs(r,{...l?.contentContainer,sx:q({display:"flex",flexDirection:"column",gap:1.5,p:{xs:2,lg:3,xl:4},pt:{xs:3,xl:4},bgcolor:"background.paper"},l?.contentContainer?.sx),children:[e.jsx(ge,{requestAppInfo:y,currentAppInfo:T}),m?e.jsxs(e.Fragment,{children:[e.jsx(pe,{user:m,showDid:!0,cardType:xe.Detailed,infoType:he.Minimal}),e.jsx(r,{})]}):null,_,b?null:e.jsxs(e.Fragment,{children:[e.jsx(r,{sx:{border:"1px solid",borderColor:"divider",borderRadius:2,overflow:"hidden",my:1}}),e.jsxs(J,{direction:"row",spacing:2,children:[z?null:e.jsx(P,{color:"inherit",variant:"outlined",size:"large",fullWidth:!0,onClick:B,sx:{color:"grey.500"},children:L||h("cancel")}),m&&!n?e.jsxs(P,{variant:"contained",size:"large",fullWidth:!0,onClick:g,disabled:c.loading,children:[c.loading?e.jsx(E,{size:20,sx:{mr:1}}):null,t||h("authorize")]}):e.jsxs(P,{variant:"contained",size:"large",fullWidth:!0,disabled:c.loading,onClick:s,children:[c.loading?e.jsx(E,{size:20,sx:{mr:1}}):null,a||h("connect")]})]})]}),k||!m?null:e.jsx(r,{sx:{textAlign:"center"},children:e.jsxs(v,{variant:"body2",sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:1},children:[N||h("notThis")," ",e.jsx(Q,{underline:"hover",onClick:u,sx:{cursor:"pointer"},children:C||h("useAnother")})]})})]})})})})}const ye=R(window.location.origin,re.WELLKNOWN_BLOCKLET_USER_PATH,"settings#user-center-access-key-setting"),F=3e3;function Le(){const i=p.useRef(null),[y,T]=p.useState(),[_]=ie({targetDate:y}),{session:o}=ne(),k=V(),n=K({ready:!1,success:!1,error:null,invalidSession:!1,token:null}),[z,b]=ae("currentUserInfo",{defaultValue:null}),N=Y(),{t}=H(),[a]=Z(),L=fe(),[,C]=p.useState(!0),[l,I]=p.useState({appName:a.get("cli")?a.get("appName")??t("aigne.cli"):"",appLogo:a.get("cli")?a.get("appLogo"):""}),U=async()=>{C(!0);try{const s=a.get("__url__"),u=s?W(s):null;if(!u){C(!1);return}const g="__blocklet__.js?type=json",m=new URL(u).origin,{data:j}=await te.get(R(m,g));I({appName:j?.appName,appUrl:j?.appUrl,appLogo:R(j?.appUrl,j?.appLogo)})}catch(s){console.error(s)}finally{C(!1)}},D=()=>{U(),o.user&&b(o.user);try{const s=new URL(window.location.href);if(s.hash.includes("invalid")){n.invalidSession=!0;return}const u=s.searchParams.get("__token__"),g=u?W(u):null;if(!g)throw new Error("No token");n.token=g,n.ready=!0}catch(s){n.invalidSession=!0,n.error=s.message,window.opener?.postMessage({type:"connect-aigne-message",error:s.message},"*"),N("#invalid",{replace:!0})}};p.useLayoutEffect(()=>D(),[]);const x=window.blocklet,w=a.get("source")||"Generate Access Key",c=d(async s=>{try{await se.post("/access-key/authorize",{source:w,sid:n.token}),n.success=!0,window.opener?.postMessage({type:"connect-aigne-message",success:!0},"*"),a.has("closeOnSuccess")&&(T(Date.now()+F),setTimeout(()=>L(),F))}catch(u){console.error(u)}finally{s()}}),A=d(()=>{o.login()}),h=d(()=>{window.close()});p.useEffect(()=>{o.initialized&&!o.user&&(le()||A())},[o?.user,o?.initialized,A]),p.useEffect(()=>{o.open||i.current?.closeLoading?.()},[o.open]);const f=()=>n.error?e.jsxs(M,{severity:"error",children:[e.jsx(O,{children:t("aigne.notAuthorized")}),n.error]}):n.success?e.jsx(oe,{style:{backgroundColor:"transparent"},status:"info",icon:e.jsx(X,{style:{color:k.palette.success.main,fontSize:72}}),title:t("connectCli.success",{source:w}),description:`${t("connectCli.successDesc",{source:w})} ${a.has("closeOnSuccess")?t("connectCli.closeDelay",{seconds:Math.ceil(_/1e3)}):""}`}):e.jsxs(M,{severity:"info",children:[e.jsx(O,{children:t("aigne.connectTo",{appName:x.appName})}),e.jsx(v,{component:"li",variant:"body2",children:t("aigne.accessTips.tips1",{appName:l.appName,accessAppName:x.appName})}),e.jsx(v,{component:"li",variant:"body2",children:t("aigne.accessTips.tips2",{appName:l.appName})}),e.jsx(v,{component:"li",variant:"body2",sx:{"& a":{color:"inherit",textDecoration:"underline"}},dangerouslySetInnerHTML:{__html:t("aigne.accessTips.tips3",{url:ye,accessAppName:x.appName})}})]});return e.jsx(je,{ref:i,session:o,requestAppInfo:l,currentAppInfo:x,userInfo:z,onAuthorize:c,onConnect:A,onSwitchConnect:o.switchDid,onCancel:h,hideAuthorize:!!n.error,hideSwitchConnect:n.success,hideButton:n.success,authorizeText:t("common.approve"),slotProps:{root:{sx:{width:500}}},children:f()})}export{Le as default};
@@ -1 +1 @@
1
- import{R as t}from"./index-CndEvJBJ.js";import{H as e}from"./vendor-ux-ESjuHpb6.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};
1
+ import{R as t}from"./index-6k6hDX7K.js";import{H as e}from"./vendor-ux-ESjuHpb6.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};
@@ -1,4 +1,4 @@
1
- import{p as ae}from"./vendor-react-Dvs43sk9.js";import{ax as Se,ay as Rr,az as Ir,aA as qr,aB as jr,aC as Nr,aD as wr,aE as xr,aF as We,aG as _r,s as Kr,aH as Tr,aI as Ur}from"./vendor-ux-ESjuHpb6.js";import{bk as mr}from"./index-CndEvJBJ.js";var Pe={exports:{}},Re={},Xe;function Sr(){if(Xe)return Re;Xe=1;function h(u){"@babel/helpers - typeof";return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},h(u)}function w(u,p,S){return Object.defineProperty(u,"prototype",{writable:!1}),u}function s(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}function b(u,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(p&&p.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),p&&K(u,p)}function K(u,p){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,M){return x.__proto__=M,x},K(u,p)}function L(u){var p=n();return function(){var x=e(u),M;if(p){var U=e(this).constructor;M=Reflect.construct(x,arguments,U)}else M=x.apply(this,arguments);return v(this,M)}}function v(u,p){if(p&&(h(p)==="object"||typeof p=="function"))return p;if(p!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(u)}function f(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function n(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(u){return e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},e(u)}var t={},d,y;function l(u,p,S){S||(S=Error);function x(U,H,V){return typeof p=="string"?p:p(U,H,V)}var M=function(U){b(V,U);var H=L(V);function V(X,te,Z){var J;return s(this,V),J=H.call(this,x(X,te,Z)),J.code=u,J}return w(V)}(S);t[u]=M}function q(u,p){if(Array.isArray(u)){var S=u.length;return u=u.map(function(x){return String(x)}),S>2?"one of ".concat(p," ").concat(u.slice(0,S-1).join(", "),", or ")+u[S-1]:S===2?"one of ".concat(p," ").concat(u[0]," or ").concat(u[1]):"of ".concat(p," ").concat(u[0])}else return"of ".concat(p," ").concat(String(u))}function O(u,p,S){return u.substr(0,p.length)===p}function A(u,p,S){return(S===void 0||S>u.length)&&(S=u.length),u.substring(S-p.length,S)===p}function j(u,p,S){return typeof S!="number"&&(S=0),S+p.length>u.length?!1:u.indexOf(p,S)!==-1}return l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",function(u,p,S){d===void 0&&(d=He()),d(typeof u=="string","'name' must be a string");var x;typeof p=="string"&&O(p,"not ")?(x="must not be",p=p.replace(/^not /,"")):x="must be";var M;if(A(u," argument"))M="The ".concat(u," ").concat(x," ").concat(q(p,"type"));else{var U=j(u,".")?"property":"argument";M='The "'.concat(u,'" ').concat(U," ").concat(x," ").concat(q(p,"type"))}return M+=". Received type ".concat(h(S)),M},TypeError),l("ERR_INVALID_ARG_VALUE",function(u,p){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";y===void 0&&(y=Se());var x=y.inspect(p);return x.length>128&&(x="".concat(x.slice(0,128),"...")),"The argument '".concat(u,"' ").concat(S,". Received ").concat(x)},TypeError),l("ERR_INVALID_RETURN_VALUE",function(u,p,S){var x;return S&&S.constructor&&S.constructor.name?x="instance of ".concat(S.constructor.name):x="type ".concat(h(S)),"Expected ".concat(u,' to be returned from the "').concat(p,'"')+" function but got ".concat(x,".")},TypeError),l("ERR_MISSING_ARGS",function(){for(var u=arguments.length,p=new Array(u),S=0;S<u;S++)p[S]=arguments[S];d===void 0&&(d=He()),d(p.length>0,"At least one arg needs to be specified");var x="The ",M=p.length;switch(p=p.map(function(U){return'"'.concat(U,'"')}),M){case 1:x+="".concat(p[0]," argument");break;case 2:x+="".concat(p[0]," and ").concat(p[1]," arguments");break;default:x+=p.slice(0,M-1).join(", "),x+=", and ".concat(p[M-1]," arguments");break}return"".concat(x," must be specified")},TypeError),Re.codes=t,Re}var Ie,Je;function Br(){if(Je)return Ie;Je=1;function h(g,E){var T=Object.keys(g);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(g);E&&(N=N.filter(function(C){return Object.getOwnPropertyDescriptor(g,C).enumerable})),T.push.apply(T,N)}return T}function w(g){for(var E=1;E<arguments.length;E++){var T=arguments[E]!=null?arguments[E]:{};E%2?h(Object(T),!0).forEach(function(N){s(g,N,T[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(T)):h(Object(T)).forEach(function(N){Object.defineProperty(g,N,Object.getOwnPropertyDescriptor(T,N))})}return g}function s(g,E,T){return E=v(E),E in g?Object.defineProperty(g,E,{value:T,enumerable:!0,configurable:!0,writable:!0}):g[E]=T,g}function b(g,E){if(!(g instanceof E))throw new TypeError("Cannot call a class as a function")}function K(g,E){for(var T=0;T<E.length;T++){var N=E[T];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(g,v(N.key),N)}}function L(g,E,T){return E&&K(g.prototype,E),Object.defineProperty(g,"prototype",{writable:!1}),g}function v(g){var E=f(g,"string");return u(E)==="symbol"?E:String(E)}function f(g,E){if(u(g)!=="object"||g===null)return g;var T=g[Symbol.toPrimitive];if(T!==void 0){var N=T.call(g,E);if(u(N)!=="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}function n(g,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(E&&E.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),Object.defineProperty(g,"prototype",{writable:!1}),E&&A(g,E)}function e(g){var E=q();return function(){var N=j(g),C;if(E){var a=j(this).constructor;C=Reflect.construct(N,arguments,a)}else C=N.apply(this,arguments);return t(this,C)}}function t(g,E){if(E&&(u(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d(g)}function d(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}function y(g){var E=typeof Map=="function"?new Map:void 0;return y=function(N){if(N===null||!O(N))return N;if(typeof N!="function")throw new TypeError("Super expression must either be null or a function");if(typeof E<"u"){if(E.has(N))return E.get(N);E.set(N,C)}function C(){return l(N,arguments,j(this).constructor)}return C.prototype=Object.create(N.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),A(C,N)},y(g)}function l(g,E,T){return q()?l=Reflect.construct.bind():l=function(C,a,i){var c=[null];c.push.apply(c,a);var R=Function.bind.apply(C,c),m=new R;return i&&A(m,i.prototype),m},l.apply(null,arguments)}function q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function O(g){return Function.toString.call(g).indexOf("[native code]")!==-1}function A(g,E){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,C){return N.__proto__=C,N},A(g,E)}function j(g){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},j(g)}function u(g){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},u(g)}var p=Se(),S=p.inspect,x=Sr(),M=x.codes.ERR_INVALID_ARG_TYPE;function U(g,E,T){return(T===void 0||T>g.length)&&(T=g.length),g.substring(T-E.length,T)===E}function H(g,E){if(E=Math.floor(E),g.length==0||E==0)return"";var T=g.length*E;for(E=Math.floor(Math.log(E)/Math.log(2));E;)g+=g,E--;return g+=g.substring(0,T-g.length),g}var V="",X="",te="",Z="",J={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},he=10;function de(g){var E=Object.keys(g),T=Object.create(Object.getPrototypeOf(g));return E.forEach(function(N){T[N]=g[N]}),Object.defineProperty(T,"message",{value:g.message}),T}function oe(g){return S(g,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ye(g,E,T){var N="",C="",a=0,i="",c=!1,R=oe(g),m=R.split(`
1
+ import{p as ae}from"./vendor-react-Dvs43sk9.js";import{ax as Se,ay as Rr,az as Ir,aA as qr,aB as jr,aC as Nr,aD as wr,aE as xr,aF as We,aG as _r,s as Kr,aH as Tr,aI as Ur}from"./vendor-ux-ESjuHpb6.js";import{bk as mr}from"./index-6k6hDX7K.js";var Pe={exports:{}},Re={},Xe;function Sr(){if(Xe)return Re;Xe=1;function h(u){"@babel/helpers - typeof";return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},h(u)}function w(u,p,S){return Object.defineProperty(u,"prototype",{writable:!1}),u}function s(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}function b(u,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(p&&p.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),Object.defineProperty(u,"prototype",{writable:!1}),p&&K(u,p)}function K(u,p){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,M){return x.__proto__=M,x},K(u,p)}function L(u){var p=n();return function(){var x=e(u),M;if(p){var U=e(this).constructor;M=Reflect.construct(x,arguments,U)}else M=x.apply(this,arguments);return v(this,M)}}function v(u,p){if(p&&(h(p)==="object"||typeof p=="function"))return p;if(p!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f(u)}function f(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function n(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(u){return e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},e(u)}var t={},d,y;function l(u,p,S){S||(S=Error);function x(U,H,V){return typeof p=="string"?p:p(U,H,V)}var M=function(U){b(V,U);var H=L(V);function V(X,te,Z){var J;return s(this,V),J=H.call(this,x(X,te,Z)),J.code=u,J}return w(V)}(S);t[u]=M}function q(u,p){if(Array.isArray(u)){var S=u.length;return u=u.map(function(x){return String(x)}),S>2?"one of ".concat(p," ").concat(u.slice(0,S-1).join(", "),", or ")+u[S-1]:S===2?"one of ".concat(p," ").concat(u[0]," or ").concat(u[1]):"of ".concat(p," ").concat(u[0])}else return"of ".concat(p," ").concat(String(u))}function O(u,p,S){return u.substr(0,p.length)===p}function A(u,p,S){return(S===void 0||S>u.length)&&(S=u.length),u.substring(S-p.length,S)===p}function j(u,p,S){return typeof S!="number"&&(S=0),S+p.length>u.length?!1:u.indexOf(p,S)!==-1}return l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",function(u,p,S){d===void 0&&(d=He()),d(typeof u=="string","'name' must be a string");var x;typeof p=="string"&&O(p,"not ")?(x="must not be",p=p.replace(/^not /,"")):x="must be";var M;if(A(u," argument"))M="The ".concat(u," ").concat(x," ").concat(q(p,"type"));else{var U=j(u,".")?"property":"argument";M='The "'.concat(u,'" ').concat(U," ").concat(x," ").concat(q(p,"type"))}return M+=". Received type ".concat(h(S)),M},TypeError),l("ERR_INVALID_ARG_VALUE",function(u,p){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";y===void 0&&(y=Se());var x=y.inspect(p);return x.length>128&&(x="".concat(x.slice(0,128),"...")),"The argument '".concat(u,"' ").concat(S,". Received ").concat(x)},TypeError),l("ERR_INVALID_RETURN_VALUE",function(u,p,S){var x;return S&&S.constructor&&S.constructor.name?x="instance of ".concat(S.constructor.name):x="type ".concat(h(S)),"Expected ".concat(u,' to be returned from the "').concat(p,'"')+" function but got ".concat(x,".")},TypeError),l("ERR_MISSING_ARGS",function(){for(var u=arguments.length,p=new Array(u),S=0;S<u;S++)p[S]=arguments[S];d===void 0&&(d=He()),d(p.length>0,"At least one arg needs to be specified");var x="The ",M=p.length;switch(p=p.map(function(U){return'"'.concat(U,'"')}),M){case 1:x+="".concat(p[0]," argument");break;case 2:x+="".concat(p[0]," and ").concat(p[1]," arguments");break;default:x+=p.slice(0,M-1).join(", "),x+=", and ".concat(p[M-1]," arguments");break}return"".concat(x," must be specified")},TypeError),Re.codes=t,Re}var Ie,Je;function Br(){if(Je)return Ie;Je=1;function h(g,E){var T=Object.keys(g);if(Object.getOwnPropertySymbols){var N=Object.getOwnPropertySymbols(g);E&&(N=N.filter(function(C){return Object.getOwnPropertyDescriptor(g,C).enumerable})),T.push.apply(T,N)}return T}function w(g){for(var E=1;E<arguments.length;E++){var T=arguments[E]!=null?arguments[E]:{};E%2?h(Object(T),!0).forEach(function(N){s(g,N,T[N])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(T)):h(Object(T)).forEach(function(N){Object.defineProperty(g,N,Object.getOwnPropertyDescriptor(T,N))})}return g}function s(g,E,T){return E=v(E),E in g?Object.defineProperty(g,E,{value:T,enumerable:!0,configurable:!0,writable:!0}):g[E]=T,g}function b(g,E){if(!(g instanceof E))throw new TypeError("Cannot call a class as a function")}function K(g,E){for(var T=0;T<E.length;T++){var N=E[T];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(g,v(N.key),N)}}function L(g,E,T){return E&&K(g.prototype,E),Object.defineProperty(g,"prototype",{writable:!1}),g}function v(g){var E=f(g,"string");return u(E)==="symbol"?E:String(E)}function f(g,E){if(u(g)!=="object"||g===null)return g;var T=g[Symbol.toPrimitive];if(T!==void 0){var N=T.call(g,E);if(u(N)!=="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(g)}function n(g,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");g.prototype=Object.create(E&&E.prototype,{constructor:{value:g,writable:!0,configurable:!0}}),Object.defineProperty(g,"prototype",{writable:!1}),E&&A(g,E)}function e(g){var E=q();return function(){var N=j(g),C;if(E){var a=j(this).constructor;C=Reflect.construct(N,arguments,a)}else C=N.apply(this,arguments);return t(this,C)}}function t(g,E){if(E&&(u(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d(g)}function d(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}function y(g){var E=typeof Map=="function"?new Map:void 0;return y=function(N){if(N===null||!O(N))return N;if(typeof N!="function")throw new TypeError("Super expression must either be null or a function");if(typeof E<"u"){if(E.has(N))return E.get(N);E.set(N,C)}function C(){return l(N,arguments,j(this).constructor)}return C.prototype=Object.create(N.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),A(C,N)},y(g)}function l(g,E,T){return q()?l=Reflect.construct.bind():l=function(C,a,i){var c=[null];c.push.apply(c,a);var R=Function.bind.apply(C,c),m=new R;return i&&A(m,i.prototype),m},l.apply(null,arguments)}function q(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function O(g){return Function.toString.call(g).indexOf("[native code]")!==-1}function A(g,E){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,C){return N.__proto__=C,N},A(g,E)}function j(g){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},j(g)}function u(g){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},u(g)}var p=Se(),S=p.inspect,x=Sr(),M=x.codes.ERR_INVALID_ARG_TYPE;function U(g,E,T){return(T===void 0||T>g.length)&&(T=g.length),g.substring(T-E.length,T)===E}function H(g,E){if(E=Math.floor(E),g.length==0||E==0)return"";var T=g.length*E;for(E=Math.floor(Math.log(E)/Math.log(2));E;)g+=g,E--;return g+=g.substring(0,T-g.length),g}var V="",X="",te="",Z="",J={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},he=10;function de(g){var E=Object.keys(g),T=Object.create(Object.getPrototypeOf(g));return E.forEach(function(N){T[N]=g[N]}),Object.defineProperty(T,"message",{value:g.message}),T}function oe(g){return S(g,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function ye(g,E,T){var N="",C="",a=0,i="",c=!1,R=oe(g),m=R.split(`
2
2
  `),I=oe(E).split(`
3
3
  `),B=0,z="";if(T==="strictEqual"&&u(g)==="object"&&u(E)==="object"&&g!==null&&E!==null&&(T="strictEqualObject"),m.length===1&&I.length===1&&m[0]!==I[0]){var W=m[0].length+I[0].length;if(W<=he){if((u(g)!=="object"||g===null)&&(u(E)!=="object"||E===null)&&(g!==0||E!==0))return"".concat(J[T],`
4
4
 
@@ -1 +1 @@
1
- import{j as o,b1 as n}from"./vendor-mui-core-CmD-NPnl.js";import{L as r}from"./vendor-react-Dvs43sk9.js";import{D as i}from"./vendor-ux-ESjuHpb6.js";import{c as t}from"./index-CndEvJBJ.js";import{S as e}from"./studio-BsPkV54q.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./index-2WK89lpX.js";function L(){return o.jsx(e,{children:o.jsxs(n,{direction:"row",spacing:2,sx:{m:4},children:[o.jsx(i,{component:r,to:`${t.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/preferences`,size:"large",color:"primary",variant:"outlined",children:"Preference Builder"}),o.jsx(i,{component:r,to:`${t.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/branding`,size:"large",color:"primary",variant:"outlined",children:"Branding Images"}),o.jsx(i,{component:r,to:`${t.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/localization`,size:"large",color:"primary",variant:"outlined",children:"Localization"})]})})}export{L as default};
1
+ import{j as o,b1 as n}from"./vendor-mui-core-CmD-NPnl.js";import{L as r}from"./vendor-react-Dvs43sk9.js";import{D as i}from"./vendor-ux-ESjuHpb6.js";import{c as t}from"./index-6k6hDX7K.js";import{S as e}from"./studio-B3QjabKr.js";import"./vendor-utils-DQK0pEML.js";import"./vendor-hooks-DLNZ8kxG.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-C-xQV6LY.js";import"./index-BxgIheOv.js";function L(){return o.jsx(e,{children:o.jsxs(n,{direction:"row",spacing:2,sx:{m:4},children:[o.jsx(i,{component:r,to:`${t.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/preferences`,size:"large",color:"primary",variant:"outlined",children:"Preference Builder"}),o.jsx(i,{component:r,to:`${t.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/branding`,size:"large",color:"primary",variant:"outlined",children:"Branding Images"}),o.jsx(i,{component:r,to:`${t.WELLKNOWN_SERVICE_PATH_PREFIX}/studio/localization`,size:"large",color:"primary",variant:"outlined",children:"Localization"})]})})}export{L as default};
@@ -1 +1 @@
1
- import{a as E}from"./vendor-react-Dvs43sk9.js";import{a0 as L}from"./index-CndEvJBJ.js";const $=({url:r,allowFullScreen:o,position:a,display:i,height:u,width:y,overflow:c,styles:f,onLoad:p,onMouseOver:m,onMouseOut:w,scrolling:b,id:d,frameBorder:n,ariaHidden:O,sandbox:s,allow:j,className:g,title:h,ariaLabel:k,ariaLabelledby:P,name:v,target:A,loading:F,importance:I,referrerpolicy:M,allowpaymentrequest:S,src:q,key:x})=>{const t=L({src:q||r,target:A||null,style:{position:a||null,display:i||"initial",overflow:c||null},scrolling:b||null,allowpaymentrequest:S||null,importance:I||null,sandbox:s&&[...s].join(" ")||null,loading:F||null,styles:f||null,name:v||null,className:g||null,allowFullScreen:"allowFullScreen",referrerpolicy:M||null,title:h||null,allow:j||null,id:d||null,"aria-labelledby":P||null,"aria-hidden":O||null,"aria-label":k||null,width:y||null,height:u||null,onLoad:p||null,onMouseOver:m||null,onMouseOut:w||null,key:x||"iframe"});let l=Object.create(null);for(let e of Object.keys(t))t[e]!=null&&(l[e]=t[e]);for(let e of Object.keys(l.style))l.style[e]==null&&delete l.style[e];if(l.styles)for(let e of Object.keys(l.styles))l.styles.hasOwnProperty(e)&&(l.style[e]=l.styles[e]),Object.keys(l.styles).pop()==e&&delete l.styles;if(o)if("allow"in l){const e=l.allow.replace("fullscreen","");l.allow=`fullscreen ${e.trim()}`.trim()}else l.allow="fullscreen";return n>=0&&(l.style.hasOwnProperty("border")||(l.style.border=n)),E.createElement("iframe",Object.assign({},l))};export{$ as I};
1
+ import{a as E}from"./vendor-react-Dvs43sk9.js";import{a0 as L}from"./index-6k6hDX7K.js";const $=({url:r,allowFullScreen:o,position:a,display:i,height:u,width:y,overflow:c,styles:f,onLoad:p,onMouseOver:m,onMouseOut:w,scrolling:b,id:d,frameBorder:n,ariaHidden:O,sandbox:s,allow:j,className:g,title:h,ariaLabel:k,ariaLabelledby:P,name:v,target:A,loading:F,importance:I,referrerpolicy:M,allowpaymentrequest:S,src:q,key:x})=>{const t=L({src:q||r,target:A||null,style:{position:a||null,display:i||"initial",overflow:c||null},scrolling:b||null,allowpaymentrequest:S||null,importance:I||null,sandbox:s&&[...s].join(" ")||null,loading:F||null,styles:f||null,name:v||null,className:g||null,allowFullScreen:"allowFullScreen",referrerpolicy:M||null,title:h||null,allow:j||null,id:d||null,"aria-labelledby":P||null,"aria-hidden":O||null,"aria-label":k||null,width:y||null,height:u||null,onLoad:p||null,onMouseOver:m||null,onMouseOut:w||null,key:x||"iframe"});let l=Object.create(null);for(let e of Object.keys(t))t[e]!=null&&(l[e]=t[e]);for(let e of Object.keys(l.style))l.style[e]==null&&delete l.style[e];if(l.styles)for(let e of Object.keys(l.styles))l.styles.hasOwnProperty(e)&&(l.style[e]=l.styles[e]),Object.keys(l.styles).pop()==e&&delete l.styles;if(o)if("allow"in l){const e=l.allow.replace("fullscreen","");l.allow=`fullscreen ${e.trim()}`.trim()}else l.allow="fullscreen";return n>=0&&(l.style.hasOwnProperty("border")||(l.style.border=n)),E.createElement("iframe",Object.assign({},l))};export{$ as I};