@abtnode/blocklet-services 1.16.42-beta-20250408-072924-4b6a877a → 1.16.42-beta-20250409-161010-b0a88c5c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +1 -1
- package/api/routes/user-session.js +2 -2
- package/api/routes/user.js +36 -0
- package/api/services/auth/connect/destroy-myself.js +64 -0
- package/api/services/auth/index.js +2 -0
- package/api/services/auth/session.js +36 -16
- package/dist/assets/{ArrowDropDown-WXsjNpSB.js → ArrowDropDown-CDjPVis_.js} +1 -1
- package/dist/assets/{CheckCircle-D7CrWlJ6.js → CheckCircle-BHD7aj9l.js} +1 -1
- package/dist/assets/{ChevronLeft-DeulnkX8.js → ChevronLeft-CUdxcGLW.js} +1 -1
- package/dist/assets/{ChevronRight-CACHNf5Y.js → ChevronRight-Bol9kSyE.js} +1 -1
- package/dist/assets/{Community-BKnwgGcO.js → Community-Ds1NG5Zj.js} +1 -1
- package/dist/assets/{DeleteOutline-DT1G93_1.js → DeleteOutline-BiIEYa8g.js} +1 -1
- package/dist/assets/{Done-D9sjuoNQ.js → Done-kAy_Y9ti.js} +1 -1
- package/dist/assets/{Download-CBzqKt6X.js → Download-COul5Jpx.js} +1 -1
- package/dist/assets/{EditIcon-Bww8_WRx.js → EditIcon-Bt91o1l6.js} +1 -1
- package/dist/assets/{Email-C6-GXQIV.js → Email-C7SKOpM8.js} +1 -1
- package/dist/assets/{Error-l_WxG8z-.js → Error-xVtnHALO.js} +1 -1
- package/dist/assets/{ExpandLess-uIJAqSZm.js → ExpandLess-CW9G6ynD.js} +1 -1
- package/dist/assets/{Google-BchHLUIl.js → Google-D98Bf-5Y.js} +1 -1
- package/dist/assets/{Holiday-BSfwdA-4.js → Holiday-Dfj3kBBI.js} +1 -1
- package/dist/assets/{InfoOutlined-DFTm-vVr.js → InfoOutlined-jnMrCCfZ.js} +1 -1
- package/dist/assets/{Launch-DQCS90NS.js → Launch-DFNlDQlk.js} +1 -1
- package/dist/assets/{LaunchOutlined-DttrDnYo.js → LaunchOutlined-yZsgpXar.js} +1 -1
- package/dist/assets/{Location-CT1S5M1P.js → Location--4ueDivQ.js} +1 -1
- package/dist/assets/{LockIcon-kY343jXt.js → LockIcon-B84lMZao.js} +1 -1
- package/dist/assets/{Meeting-PVrGyQbK.js → Meeting-CVVnP-bH.js} +1 -1
- package/dist/assets/{MoreHoriz-BD8SroCJ.js → MoreHoriz-BqdKN70-.js} +1 -1
- package/dist/assets/{OffSick-DD3oLLQu.js → OffSick-C_2x7yDI.js} +1 -1
- package/dist/assets/{Phone-BcpEH3XZ.js → Phone-CaKOX2Yu.js} +1 -1
- package/dist/assets/{PlayArrow-BEUAi9Bt.js → PlayArrow-CXtQLadK.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-BHP2onYz.js → QuestionMarkCircle-5K6WR8Pc.js} +1 -1
- package/dist/assets/{ServerLogo-Bi89KNz4.js → ServerLogo-C4P-qXGV.js} +1 -1
- package/dist/assets/{Timezone-Ce85fX7w.js → Timezone-Bgwxnj29.js} +1 -1
- package/dist/assets/{TuneOutlined-CzDTcEdK.js → TuneOutlined-EaV8HxdX.js} +1 -1
- package/dist/assets/{ViewList-6gwww-su.js → ViewList-BPuXZDcI.js} +1 -1
- package/dist/assets/{WorkingRemotely-DfgJTsRm.js → WorkingRemotely-Dm2BOs5c.js} +1 -1
- package/dist/assets/{access-control-BCncVk0F.js → access-control-CuKW2kRZ.js} +1 -1
- package/dist/assets/{actions-C9vqEgMU.js → actions-DqeM3yie.js} +1 -1
- package/dist/assets/{add-component-core-DmGxO5Gt.js → add-component-core-DXPSI3Ti.js} +15 -15
- package/dist/assets/add-resource-S3Z1zjbJ.js +1 -0
- package/dist/assets/{addon-BNDsoean.js → addon-B5UBB-pU.js} +1 -1
- package/dist/assets/{advanced-0AsHuHlx.js → advanced-Cvboset8.js} +1 -1
- package/dist/assets/api-BVwAqPhr.js +1 -0
- package/dist/assets/appearance-DmQgth7a.js +1 -0
- package/dist/assets/{audit-logs-7qd9PUxe.js → audit-logs-LLoqbniS.js} +3 -3
- package/dist/assets/{base32-CEWQZb_G.js → base32-CMrsHquD.js} +1 -1
- package/dist/assets/{branding-BZ7cTCXC.js → branding-BfxdFbW1.js} +2 -2
- package/dist/assets/{branding-NhPjoLxG.js → branding-DcviCyPr.js} +3 -3
- package/dist/assets/bundle-avatar-Ci9fNblN.js +1 -0
- package/dist/assets/button-OxbVr1Od.js +1 -0
- package/dist/assets/click-to-copy-q_I2l6Sg.js +1 -0
- package/dist/assets/cloneDeep-g5lbcy6_.js +1 -0
- package/dist/assets/complete-ogipf6id.js +45 -0
- package/dist/assets/{component-D1Fsjeuf.js → component-DVhWy5jQ.js} +1 -1
- package/dist/assets/{config-DXNBk8Sr.js → config-BdUShvO-.js} +1 -1
- package/dist/assets/{config-DoKTS37s.js → config-YsfQuvvt.js} +2 -2
- package/dist/assets/{config-navigation-DO0UJG5K.js → config-navigation-C4hgzi4R.js} +3 -3
- package/dist/assets/config-space-DJ-fZ6j4.js +1 -0
- package/dist/assets/{confirm-C-7TGRgW.js → confirm-C1Nde1Nq.js} +1 -1
- package/dist/assets/connect-BkxyLG9H.js +1 -0
- package/dist/assets/{connect-ZYp_tU0D.js → connect-dGBjAgNF.js} +1 -1
- package/dist/assets/connect-to-CdG3TX0A.js +1 -0
- package/dist/assets/{content-layout-uPtoKIAs.js → content-layout-Bs-vdQ_U.js} +1 -1
- package/dist/assets/dashboard-2jQIZ8v5.js +222 -0
- package/dist/assets/{delete-confirm-C_4zg33B.js → delete-confirm-CpPzqeJx.js} +1 -1
- package/dist/assets/{did-address-_2BUka_2.js → did-address-D-fI5ZyH.js} +1 -1
- package/dist/assets/{domain-3zeLA-KU.js → domain-1X_uRV9L.js} +1 -1
- package/dist/assets/{domain-action-card-BQASO--e.js → domain-action-card-Crwneu7N.js} +2 -2
- package/dist/assets/domains-BHkUaPc7.js +1 -0
- package/dist/assets/{email-hHeKrz9y.js → email-DGh9v0en.js} +3 -3
- package/dist/assets/{empty-spinner-CoimPnT0.js → empty-spinner-Cia24BVr.js} +1 -1
- package/dist/assets/exchange-passport-CgGOJDm9.js +1 -0
- package/dist/assets/{format-error-LAoTjvJe.js → format-error-BrmqJs5a.js} +1 -1
- package/dist/assets/{fuel-CDRdGVHi.js → fuel-CItPP5Vk.js} +1 -1
- package/dist/assets/{get-safe-url-B2pIo8YT.js → get-safe-url-B2BlmlqT.js} +1 -1
- package/dist/assets/{get-safe-url-M62JolcK.js → get-safe-url-C2N97NJc.js} +1 -1
- package/dist/assets/{home-D8xdbvkr.js → home-12LB7wlV.js} +1 -1
- package/dist/assets/{iframe-BGb_KeKZ.js → iframe-54rcs7kU.js} +1 -1
- package/dist/assets/{index-B9lZsGBd.js → index-0CgHVUpB.js} +1 -1
- package/dist/assets/{index-C07T63uR.js → index-3dawiJIg.js} +3 -3
- package/dist/assets/{index-CgA3yF4z.js → index-4WjT4o1e.js} +5 -5
- package/dist/assets/{index-C-E-0SKx.js → index-643kpB1h.js} +1 -1
- package/dist/assets/{index-BKSHPTts.js → index-9XJ5HzSd.js} +1 -1
- package/dist/assets/index-BIu-u1kW.js +1 -0
- package/dist/assets/{index-CKv9guDo.js → index-BTOIZL6e.js} +1 -1
- package/dist/assets/{index-DvDiL1rm.js → index-BYsXlcQC.js} +1 -1
- package/dist/assets/{index-BnqjZUkY.js → index-Bj10Vbvc.js} +4 -4
- package/dist/assets/index-C4dzrN-k.js +290 -0
- package/dist/assets/{index-BvyQFiS_.js → index-CB6NPYWM.js} +3 -3
- package/dist/assets/index-CFs0La6o.js +15 -0
- package/dist/assets/{index-pV_0wOyY.js → index-CPE8Apzb.js} +1 -1
- package/dist/assets/{index-_IytyGrM.js → index-CTpJt8AJ.js} +45 -45
- package/dist/assets/{index-BYC998Xz.js → index-Cuoxr9xB.js} +1 -1
- package/dist/assets/{index-IqOEMaG7.js → index-D5G2v7wN.js} +2 -2
- package/dist/assets/{index-CqRb1YIC.js → index-DKPGWA5E.js} +1 -1
- package/dist/assets/{index-D1iI5v2e.js → index-DQC9zneB.js} +11 -11
- package/dist/assets/{index-tUQxVYYQ.js → index-DVQCgvFb.js} +1 -1
- package/dist/assets/index-DVogNW6l.js +1 -0
- package/dist/assets/{index-CDJctLrv.js → index-DkZfhapD.js} +1 -1
- package/dist/assets/{index-Br2EGTW4.js → index-Du71d9ZJ.js} +1 -1
- package/dist/assets/{index-CfxqxAZd.js → index-G26gYrxE.js} +2 -2
- package/dist/assets/{index-Cc1EUVvj.js → index-YqrAgavD.js} +1 -1
- package/dist/assets/{index-njqCeZqY.js → index-jny05NvM.js} +30 -30
- package/dist/assets/{invitation-CXLQmmNG.js → invitation-BBqRmSx1.js} +6 -6
- package/dist/assets/invite-CKxzd-7d.js +1 -0
- package/dist/assets/issue-passport-BA7u3NC-.js +1 -0
- package/dist/assets/{item-BMOFJ72c.js → item-DssQyiFI.js} +2 -2
- package/dist/assets/landing-page-2uYUfHoY.js +1 -0
- package/dist/assets/{launch-result-message-DvcvHHH1.js → launch-result-message-C0Ao1hE-.js} +1 -1
- package/dist/assets/{layout-DdaOYlXg.js → layout-R4Ynfcbq.js} +2 -2
- package/dist/assets/{list-Df4vHNiY.js → list-BhXWs05I.js} +18 -9
- package/dist/assets/{list-header-DvakxkxK.js → list-header-BibBP5t1.js} +1 -1
- package/dist/assets/localization-BsSUbpzO.js +1 -0
- package/dist/assets/{log-B1ojA9lx.js → log-D4PQ7UF3.js} +7 -7
- package/dist/assets/{login-BkqQC8IM.js → login-CuCcTu--.js} +1 -1
- package/dist/assets/{login-oauth-callback-CfaWz0tg.js → login-oauth-callback-BzcAZfXM.js} +1 -1
- package/dist/assets/{logo-uploader-D6hawLMA.js → logo-uploader-C9TwiAKx.js} +3 -3
- package/dist/assets/{lost-passport-CnWrxxcj.js → lost-passport-DD7XCIgg.js} +4 -4
- package/dist/assets/{lottie-react.esm-CPHH620R.js → lottie-react.esm-D2t-u0YU.js} +1 -1
- package/dist/assets/{lottie-web-B6s7dDoL.js → lottie-web-jYmAQWuC.js} +1 -1
- package/dist/assets/omit-DF3Nt1_-.js +1 -0
- package/dist/assets/{open-window-DMkA-B_A.js → open-window-Dsc5mHei.js} +1 -1
- package/dist/assets/{overview-vOO_cwfO.js → overview-BjFpvrpN.js} +2 -2
- package/dist/assets/{page-header-D3dCkXy7.js → page-header-B7j9M6Zp.js} +1 -1
- package/dist/assets/{permission-ClAqVelD.js → permission-CLAOGeOf.js} +1 -1
- package/dist/assets/preferences-qZW-dsds.js +1 -0
- package/dist/assets/profile-embed-6mTqkL03.js +1 -0
- package/dist/assets/publish-resource-DO-PRxdk.js +1 -0
- package/dist/assets/{raf-schd.esm-GV-XhwE0.js → raf-schd.esm-B3j6BePR.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-Cx5BcFIr.js → react-beautiful-dnd.esm-Bu3K07pf.js} +1 -1
- package/dist/assets/{relative-time-BnXa0sIK.js → relative-time-Cu4jaQ9H.js} +1 -1
- package/dist/assets/{runtime-DmT1MY2S.js → runtime-kNyRK8Hy.js} +1 -1
- package/dist/assets/sdk-BjsIctsl.js +1 -0
- package/dist/assets/{security-CQrJSvNH.js → security-Dkk4FgYt.js} +4 -4
- package/dist/assets/session-UJ7B0EdV.js +1 -0
- package/dist/assets/{setup-CH6etNsI.js → setup-SAEzURDR.js} +3 -3
- package/dist/assets/{shorten-label-C642GTxb.js → shorten-label-DDBwv81M.js} +1 -1
- package/dist/assets/{simple-select-i-SepLIh.js → simple-select-vCKkiHhG.js} +1 -1
- package/dist/assets/{slicedToArray-B6WXjdrb.js → slicedToArray-Da5X2Yv5.js} +1 -1
- package/dist/assets/spaces-B_lJq3Uz.js +1 -0
- package/dist/assets/{start-BC37Pmt4.js → start-C53MN0u7.js} +1 -1
- package/dist/assets/status-5Z1CW-le.js +1 -0
- package/dist/assets/{step-actions-BIyonirh.js → step-actions-CujnheOz.js} +1 -1
- package/dist/assets/{studio-Bv91lan_.js → studio-BYzuzhpL.js} +1 -1
- package/dist/assets/{switch-control-DjMziEFc.js → switch-control-DWiX5YiK.js} +1 -1
- package/dist/assets/{traffic-D72BUoUS.js → traffic-WemHsP0B.js} +3 -3
- package/dist/assets/{transfer-DCQoefO3.js → transfer-CF7CWbdm.js} +1 -1
- package/dist/assets/{unsubscribe-DiXKNJyN.js → unsubscribe-Dfof7yLG.js} +1 -1
- package/dist/assets/{use-mobile-B_Gqv6b6.js → use-mobile-DjnNmGRG.js} +1 -1
- package/dist/assets/{use-mobile-DudfIz3d.js → use-mobile-DpXDDjat.js} +1 -1
- package/dist/assets/{useAsync-BmuLIImU.js → useAsync-De6s-0n9.js} +1 -1
- package/dist/assets/{useAsyncRetry-CwtLImQi.js → useAsyncRetry-B6OdNqyX.js} +1 -1
- package/dist/assets/{useLocalStorage-C1_Fkr6_.js → useLocalStorage-DLwAkPmo.js} +1 -1
- package/dist/assets/{useSetState-BL3ktMon.js → useSetState-CWq0AVWn.js} +1 -1
- package/dist/assets/{user-center-BjZ6YsoY.js → user-center-CowUpoIn.js} +3 -3
- package/dist/assets/{util-CORzDFgw.js → util-B6E4W35Y.js} +1 -1
- package/dist/assets/util-C57yoAn6.js +1 -0
- package/dist/assets/{vendor-arcblock-D8eCUoJY.js → vendor-arcblock-CD8CMsgQ.js} +148 -81
- package/dist/assets/{vendor-hooks-DtYI0-rF.js → vendor-hooks-8r-lvvPs.js} +1 -1
- package/dist/assets/{vendor-mui-core-C-PhacC8.js → vendor-mui-core-1jJmAutq.js} +2 -2
- package/dist/assets/{vendor-mui-x-BiTj3AZC.js → vendor-mui-x-CPwlD3uT.js} +1 -1
- package/dist/assets/{vendor-react-DoD83n6N.js → vendor-react-DEoibe3W.js} +1 -1
- package/dist/assets/{vendor-utils-CRBr0QUY.js → vendor-utils-Cm2BKG2b.js} +6 -6
- package/dist/assets/{vendor-ux-did-connect-BQ3cvv_1.js → vendor-ux-did-connect-DlrX4cqq.js} +4 -4
- package/dist/assets/{wrap-locale-Bn6cqCkC.js → wrap-locale-NNP_yq5G.js} +1 -1
- package/dist/index.html +8 -8
- package/dist/service-worker.js +1 -1
- package/package.json +29 -29
- package/dist/assets/add-resource-CJU0s3QQ.js +0 -1
- package/dist/assets/api-DlN8K5Jg.js +0 -1
- package/dist/assets/appearance-Bw3QRuyJ.js +0 -1
- package/dist/assets/bundle-avatar-Ue_TyBqv.js +0 -1
- package/dist/assets/button-BQLtMsfK.js +0 -1
- package/dist/assets/click-to-copy-CkbZjUXU.js +0 -1
- package/dist/assets/cloneDeep-C7Ok409J.js +0 -1
- package/dist/assets/complete-Tyckm-4M.js +0 -45
- package/dist/assets/config-space-BNW8EpAm.js +0 -1
- package/dist/assets/connect-BLlTMxXk.js +0 -1
- package/dist/assets/connect-to-h4a_nz1y.js +0 -1
- package/dist/assets/dashboard-B9esZ0M-.js +0 -213
- package/dist/assets/domains-DTccX50O.js +0 -1
- package/dist/assets/exchange-passport-Bt6kGDIV.js +0 -1
- package/dist/assets/index-Be9flGYn.js +0 -1
- package/dist/assets/index-BvyKTiWe.js +0 -15
- package/dist/assets/index-C7X4Y3ad.js +0 -1
- package/dist/assets/index-IaaNyqXG.js +0 -290
- package/dist/assets/invite-BZt83O3H.js +0 -1
- package/dist/assets/issue-passport-CrCyp4XY.js +0 -1
- package/dist/assets/landing-page-Dl8nGCZh.js +0 -1
- package/dist/assets/localization-rR3sV7At.js +0 -1
- package/dist/assets/omit-r8RGw6zD.js +0 -1
- package/dist/assets/preferences-YM19d1y9.js +0 -1
- package/dist/assets/profile-embed-DJJJzari.js +0 -1
- package/dist/assets/publish-resource-OeE_Sv8p.js +0 -1
- package/dist/assets/sdk-DRBcrGrS.js +0 -1
- package/dist/assets/session-Clq9kJzg.js +0 -1
- package/dist/assets/spaces-BBAv0vs3.js +0 -1
- package/dist/assets/status-Dz-0ViGp.js +0 -1
- package/dist/assets/util-CllYCEyt.js +0 -1
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-B1ojA9lx.js","assets/vendor-mui-core-C-PhacC8.js","assets/vendor-react-DoD83n6N.js","assets/useLocalStorage-C1_Fkr6_.js","assets/vendor-ux-did-connect-BQ3cvv_1.js","assets/vendor-utils-CRBr0QUY.js","assets/vendor-hooks-DtYI0-rF.js","assets/lottie-web-B6s7dDoL.js","assets/vendor-ux-did-connect-BDmhBveY.css","assets/index-_IytyGrM.js","assets/vendor-arcblock-D8eCUoJY.js","assets/Download-CBzqKt6X.js","assets/bundle-avatar-Ue_TyBqv.js","assets/log-D33dFtt_.css","assets/index-njqCeZqY.js","assets/index-tUQxVYYQ.js","assets/ViewList-6gwww-su.js","assets/did-address-_2BUka_2.js","assets/permission-ClAqVelD.js","assets/session-Clq9kJzg.js","assets/click-to-copy-CkbZjUXU.js","assets/format-error-LAoTjvJe.js","assets/useAsync-BmuLIImU.js","assets/index-CqRb1YIC.js","assets/DeleteOutline-DT1G93_1.js","assets/confirm-C-7TGRgW.js","assets/util-CORzDFgw.js","assets/base32-CEWQZb_G.js","assets/sdk-DRBcrGrS.js","assets/index-Cc1EUVvj.js","assets/actions-C9vqEgMU.js","assets/MoreHoriz-BD8SroCJ.js","assets/shorten-label-C642GTxb.js","assets/PlayArrow-BEUAi9Bt.js","assets/get-safe-url-M62JolcK.js","assets/index-C7X4Y3ad.js","assets/useAsyncRetry-CwtLImQi.js","assets/InfoOutlined-DFTm-vVr.js","assets/useSetState-BL3ktMon.js","assets/use-mobile-B_Gqv6b6.js","assets/index-CfxqxAZd.js","assets/ExpandLess-uIJAqSZm.js","assets/index-D1iI5v2e.js","assets/Error-l_WxG8z-.js","assets/empty-spinner-CoimPnT0.js","assets/list-header-DvakxkxK.js","assets/QuestionMarkCircle-BHP2onYz.js","assets/index-BYC998Xz.js","assets/api-DlN8K5Jg.js","assets/ChevronRight-CACHNf5Y.js","assets/vendor-mui-x-BiTj3AZC.js","assets/react-beautiful-dnd.esm-Cx5BcFIr.js","assets/raf-schd.esm-GV-XhwE0.js","assets/item-BMOFJ72c.js","assets/Launch-DQCS90NS.js","assets/Done-D9sjuoNQ.js","assets/delete-confirm-C_4zg33B.js","assets/ArrowDropDown-WXsjNpSB.js","assets/index-CKv9guDo.js","assets/index-D4PP6P2d.css","assets/index-DvDiL1rm.js","assets/overview-vOO_cwfO.js","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/status-Dz-0ViGp.js","assets/omit-r8RGw6zD.js","assets/spaces-BBAv0vs3.js","assets/domains-DTccX50O.js","assets/domain-action-card-BQASO--e.js","assets/util-CllYCEyt.js","assets/CheckCircle-D7CrWlJ6.js","assets/index-IaaNyqXG.js","assets/Google-BchHLUIl.js","assets/cloneDeep-C7Ok409J.js","assets/EditIcon-Bww8_WRx.js","assets/LockIcon-kY343jXt.js","assets/appearance-Bw3QRuyJ.js","assets/iframe-BGb_KeKZ.js","assets/audit-logs-7qd9PUxe.js","assets/relative-time-BnXa0sIK.js","assets/index-BnqjZUkY.js","assets/list-Df4vHNiY.js","assets/traffic-D72BUoUS.js","assets/LaunchOutlined-DttrDnYo.js","assets/ChevronLeft-DeulnkX8.js","assets/index-CDJctLrv.js","assets/config-navigation-DO0UJG5K.js","assets/slicedToArray-B6WXjdrb.js","assets/index-B9lZsGBd.js","assets/simple-select-i-SepLIh.js","assets/index-C07T63uR.js","assets/use-mobile-DudfIz3d.js","assets/connect-to-h4a_nz1y.js","assets/config-space-BNW8EpAm.js","assets/index-C-E-0SKx.js","assets/switch-control-DjMziEFc.js","assets/index-BvyKTiWe.js","assets/security-CQrJSvNH.js","assets/config-DXNBk8Sr.js","assets/branding-NhPjoLxG.js","assets/logo-uploader-D6hawLMA.js","assets/advanced-0AsHuHlx.js","assets/runtime-DmT1MY2S.js","assets/component-D1Fsjeuf.js","assets/TuneOutlined-CzDTcEdK.js","assets/add-component-core-DmGxO5Gt.js","assets/launch-result-message-DvcvHHH1.js","assets/page-header-D3dCkXy7.js","assets/index-IqOEMaG7.js","assets/content-layout-uPtoKIAs.js","assets/add-component-core-D-IRi6XF.css","assets/index-Br2EGTW4.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{p as io,b as gn,c as oo,i as ao,e as lo,m as co,f as $s,D as uo,E as fo,u as po,H as mo,_ as Y,R as ho}from"./vendor-arcblock-D8eCUoJY.js";import{E as O,j as o,a2 as we,aa as Ve,I as Qt,aj as go,ad as yn,al as Wr,ak as yo,b3 as xo,a3 as He,b4 as vo,br as bo,T as pe,bA as _o,bp as gt,bB as Ns,a4 as U,a5 as Ot,bC as wo,t as Ie,$ as Zt,bD as jo,a6 as So,bE as Co,ai as Kr,bF as xn,bG as Ao,am as Eo,ab as To,M as Te,bq as Er,bl as Pe,bH as vn,bI as bn,bJ as _n,A as Ge,b2 as wn,bh as Ro}from"./vendor-mui-core-C-PhacC8.js";import{r as L,L as jn,k as Sn,b as H,g as Cn,u as Io,l as ko}from"./vendor-react-DoD83n6N.js";import{r as je,a$ as Do,aZ as Jt,b0 as Lo,B as Ze,m as ie,_ as Us,V as ne,u as he,al as Po,b1 as Fo,b2 as An,h as Gr,b3 as Oo,d as Vo,P as Qr,E as Mo,Q as $o,a1 as En,ap as Tn,C as Vt,b4 as No,b5 as Uo,X as Bs,aj as Bo}from"./vendor-ux-did-connect-BQ3cvv_1.js";import{A as ot,f as xe,h as Fe,B as ar,C as Ho,b as zo,D as Zr,E as qo,F as Rn,G as In,v as rt,H as kn,I as Wo,o as at,J as Ko,K as Go,k as Hs,g as Qo,j as Zo,m as zs,l as Jo,n as Yo,L as kt,e as At,M as Xo,O as ea,N as ta,Q as lr,c as qs}from"./index-_IytyGrM.js";import{a9 as ra,y as Yt,aa as sa,z as Dt,H as Dn,x as Ln}from"./vendor-utils-CRBr0QUY.js";import{_ as Ws}from"./useLocalStorage-C1_Fkr6_.js";import{C as Ks}from"./confirm-C-7TGRgW.js";import{d as na}from"./PlayArrow-BEUAi9Bt.js";import{g as Gs}from"./get-safe-url-M62JolcK.js";import{f as Jr}from"./format-error-LAoTjvJe.js";import{i as ia,u as oa,M as aa,c as yt,s as Mt,H as la,h as $t,f as Pn,p as Fn,B as ca}from"./index-C7X4Y3ad.js";import{u as On}from"./session-Clq9kJzg.js";import{D as ua,_ as Vn}from"./useAsyncRetry-CwtLImQi.js";import{f as Je,a as Mn,u as fe,v as da}from"./vendor-hooks-DtYI0-rF.js";import{d as fa}from"./InfoOutlined-DFTm-vVr.js";import{_ as $n}from"./useSetState-BL3ktMon.js";import{u as pa}from"./use-mobile-B_Gqv6b6.js";const Nn=L.createContext({});function Yr({children:e,type:r}){const[t,s]=L.useState([]),n=L.useRef([]),i=c=>{if(!n.current.includes(c)){const d=[...n.current,c];s(d),n.current=d}},a=c=>{if(n.current.includes(c)){const d=n.current.filter(f=>f!==c);s(d),n.current=d}},l=c=>{const d=t.filter(p=>c.find(g=>g===p));ra(d,t).forEach(p=>a(p))};return o.jsx(Nn.Provider,{value:{type:r,deletingBlocklets:t,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:l},children:e})}Yr.propTypes={type:O.string,children:O.node.isRequired};Yr.defaultProps={type:"blocklets"};function Ad(){return L.useContext(Nn)}var Xr={},ma=we;Object.defineProperty(Xr,"__esModule",{value:!0});var Un=Xr.default=void 0,ha=ma(je()),ga=o;Un=Xr.default=(0,ha.default)((0,ga.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var es={},ya=we;Object.defineProperty(es,"__esModule",{value:!0});var Bn=es.default=void 0,xa=ya(je()),va=o;Bn=es.default=(0,xa.default)((0,va.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var ts={},ba=we;Object.defineProperty(ts,"__esModule",{value:!0});var Hn=ts.default=void 0,_a=ba(je()),wa=o;Hn=ts.default=(0,_a.default)((0,wa.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var rs={},ja=we;Object.defineProperty(rs,"__esModule",{value:!0});var ss=rs.default=void 0,Sa=ja(je()),Ca=o;ss=rs.default=(0,Sa.default)((0,Ca.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var ns={},Aa=we;Object.defineProperty(ns,"__esModule",{value:!0});var zn=ns.default=void 0,Ea=Aa(je()),Ta=o;zn=ns.default=(0,Ea.default)((0,Ta.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var is={},Ra=we;Object.defineProperty(is,"__esModule",{value:!0});var qn=is.default=void 0,Ia=Ra(je()),ka=o;qn=is.default=(0,Ia.default)((0,ka.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var os={},Da=we;Object.defineProperty(os,"__esModule",{value:!0});var Wn=os.default=void 0,La=Da(je()),Pa=o;Wn=os.default=(0,La.default)((0,Pa.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var as=function(e){return o.jsx("svg",{...e,children:o.jsx("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"})})};as.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};as.displayName="dashboard";var ls={},Fa=we;Object.defineProperty(ls,"__esModule",{value:!0});var Kn=ls.default=void 0,Oa=Fa(je()),Va=o;Kn=ls.default=(0,Oa.default)((0,Va.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const et={Start:na,Stop:Un,Restart:Bn,Reload:Hn,Remove:Do,Config:ss,Log:zn,Group:qn,Cancel:Wn,Dashboard:as,Overview:Kn},Ma=(e,r)=>{if(!e)return"";const t=new URL(e),s=new URLSearchParams(t.searchParams),n=new URL(Yt(t.origin,r));return n.search=s.toString(),n.toString()},$a="internal",Na="external";function cs({blocklet:e,onStart:r,onComplete:t,variant:s,hasPermission:n,getComponentUrl:i,useBlockletUrlEvaluation:a,...l}){const c=ot(),[d,f]=L.useState(null),[p,g]=L.useState(null),[j,T]=L.useState(!1),[R,V]=L.useState(null),{t:y}=L.useContext(Jt),[v]=Ws("skip-blocklet-setup",!1),{loading:k,recommendedUrl:B}=a(e),[_]=Ws("blocklet-type-filter",$a),h=xe.isInProgress(e.status),[w,S]=L.useState(!1);L.useEffect(()=>{var Q,ae;if(!(e!=null&&e.controller))return;S(((ae=(Q=e==null?void 0:e.controller)==null?void 0:Q.status)==null?void 0:ae.value)===Fe.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var ge,ve,De;try{const le=await c.api.getLauncherSession({input:{launcherSessionId:(ge=e==null?void 0:e.controller)==null?void 0:ge.launcherSessionId,launcherUrl:(ve=e==null?void 0:e.controller)==null?void 0:ve.launcherUrl}});if(le!=null&&le.error){console.error("get launcher session failed",le.error);return}S([ie.LAUNCH_SESSION_STATUS.overdue,ie.LAUNCH_SESSION_STATUS.canceled,ie.LAUNCH_SESSION_STATUS.terminated].includes((De=le==null?void 0:le.launcherSession)==null?void 0:De.status))}catch(le){console.error("call getLauncherSession error",le)}})()},[]);const{inService:A}=c,b=(F,Q,ae=!1)=>async()=>{const ge=async Me=>{var Xe;r({action:F,blocklet:e}),T(!0),g(F);let We=!1;try{if(F==="remove")await Q(Me);else if(F==="start"){if(!xe.hasRunnableComponent(e)){ne.error(y("blocklet.noComponent"));return}if(!A&&!v&&!((Xe=e.settings)!=null&&Xe.initialized)&&e.mode!==Fe.BLOCKLET_MODES.DEVELOPMENT){if(!B||!Us(B)){ne.error(y("blocklet.gotoVisitError"));return}const ye=Ho(c.info),ct=new URL(B);ct.searchParams.set("serverUrl",ye),window.open(Gs(ct.href,{allowDomains:null})),t({action:F,blocklet:e});return}const Ee=e.children.filter(ye=>!xe.isInProgress(ye.status)&&ye.status!=="running").map(ye=>ye.meta.did),$e={did:e.meta.did,componentDids:Ee};await Q({input:$e})}else if(["stop","restart","reload"].includes(F)){const Ee=e.children.filter(ye=>ye.status==="running").map(ye=>ye.meta.did),$e={did:e.meta.did,componentDids:Ee};await Q({input:$e})}else{const Ee={did:e.meta.did};await Q({input:Ee})}F==="remove"?We=!0:await zo(1e3),F==="reload"&&ne.success(y("blocklet.reloadSuccess")),V(null),t({action:F,blocklet:e})}catch(Ee){const $e=`Blocklet ${F} failed: ${Jr(Ee)}`;throw t({action:F,blocklet:e,error:new Error($e)}),new Error($e)}finally{We||T(!1)}},ve=()=>{T(!1),V(null)},De=xe.getDisplayName(e,!0),le=e.mode===Fe.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(pe,{component:"div",children:o.jsx(pe,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:(Me,We)=>o.jsxs(pe,{component:"div",children:[o.jsx(pe,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")}),o.jsxs(_o,{name:"removeType",value:Me.removeType,onChange:Xe=>We({...Me,removeType:Xe.target.value}),children:[o.jsx(gt,{value:"backup",control:o.jsx(Ns,{}),label:y("blocklet.action.removeApplicationAfterBackup")}),o.jsx(gt,{value:"complete",control:o.jsx(Ns,{}),label:y("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},Ct={stop:{title:`${y("common.stop")} ${De}`,description:y("blocklet.action.stopDescription"),confirm:y("blocklet.action.confirmStop"),cancel:y("common.cancel"),onConfirm:ge,onCancel:ve},restart:{title:`${y("common.restart")} ${De}`,description:y("blocklet.action.restartDescription"),confirm:y("blocklet.action.confirmRestart"),cancel:y("common.cancel"),onConfirm:ge,onCancel:ve},remove:{title:`${y("common.remove")} ${De}`,confirm:y("blocklet.action.confirmRemove"),cancel:y("common.cancel"),onConfirm:ge,onCancel:ve,...le},cancelDownload:{title:`${y("common.cancel")}`,description:y("blocklet.action.cancelDownloadDescription",{name:De}),confirm:y("common.confirm"),cancel:y("common.cancel"),onConfirm:ge,onCancel:ve}};ae?V(Ct[F]):await ge()},P=!!d,M=F=>{try{F.stopPropagation(),F.preventDefault()}catch{}f(F.currentTarget)},$=F=>{try{F.stopPropagation(),F.preventDefault()}catch{}f(null)},z=async(F,Q)=>{try{Q.stopPropagation(),Q.preventDefault()}catch{}if(typeof F.handler=="function")try{T(!0),g(F.action),await F.handler()}catch(ae){console.error(`Blocklet ${F.name} failed: `,ae)}finally{T(!1),f(null)}else f(null)},W=!A&&xe.isDeletableBlocklet(e)?{action:"remove",icon:et.Remove,name:y("common.remove"),handler:b("remove",async({removeType:F})=>{F==="backup"&&await c.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await c.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:h}:null,oe={action:"remove",icon:({sx:F,...Q})=>o.jsx(et.Cancel,{sx:{...F,paddingRight:"2px",zoom:.95},...Q}),name:y("common.cancel"),handler:b("cancelDownload",c.api.cancelDownloadBlocklet,!0)},de=xe.getAppMissingConfigs(e),qe=()=>{var ge;const F=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),Q=i==null?void 0:i({mountPoint:F,blocklet:e});if(!Q||!Us(Q)){ne.error(y("blocklet.gotoVisitError"));return}const ae=(ge=e==null?void 0:e.site)==null?void 0:ge.domainAliases;window.open(Gs(Ma(Q,".well-known/service/admin"),{allowDomains:ae==null?void 0:ae.map(ve=>ve.value)}))};let Ae=[{action:"start",icon:et.Start,inExternal:!0,name:y("common.start"),handler:b("start",c.api.startBlocklet),disabled:w||e.children.every(F=>F.status==="running")||ar(e.status)||k||h},{action:"stop",icon:et.Stop,inExternal:!0,name:y("common.stop"),handler:b("stop",c.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:et.Restart,name:y("common.restart"),handler:b("restart",c.api.restartBlocklet,!0),disabled:w||e.status!=="running"},ar(e.status)?oe:W,{separator:!0},A?null:{action:"dashboard",icon:({style:F,...Q})=>o.jsx(et.Dashboard,{...Q,style:{...F,width:"26px",height:"26px",paddingRight:"3px"}}),name:y("sidebar.dashboard"),handler:qe}].filter(Boolean);return _===Na&&(Ae=Ae.filter(F=>F.inExternal)),s==="menu"?o.jsxs(Qs,{"data-cy":"blocklet-actions",children:[o.jsx(Qt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:M,size:"small",disabled:!n||!ar(e.status)&&j,children:o.jsx(Lo,{})}),o.jsxs(go,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:P,onClose:$,PaperProps:{},children:[de.length>0&&o.jsxs(yn,{style:{maxWidth:"400px"},severity:"error",children:[y("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(jn,{to:`/blocklets/${e.meta.did}/components`,children:y("blocklet.config.gotoFix")})]}),Ae.map((F,Q)=>F.separator?o.jsx(Wr,{},`separator-${Q}`):o.jsxs(yo,{dense:!0,onClick:ae=>z(F,ae),disabled:j||F.disabled,"data-cy":`${F.action}-blocklet`,children:[o.jsx(xo,{style:{minWidth:24},children:p===F.action&&j?o.jsx(He,{size:16,sx:{marginRight:1}}):o.jsx(F.icon,{fontSize:"small"})}),o.jsx(vo,{primary:F.name})]},F.name))]}),R&&o.jsx(Ks,{title:R.title,description:R.description,confirm:R.confirm,cancel:R.cancel,params:R.params,onConfirm:R.onConfirm,onCancel:R.onCancel})]}):o.jsxs(Qs,{"data-cy":"blocklet-actions",...l,children:[o.jsx(bo,{children:Ae.filter(F=>!F.separator&&!F.onlyInMenu).map(F=>o.jsxs(Ze,{title:F.name,"data-cy":`${F.action}-blocklet`,onClick:()=>z(F),disabled:!!F.disabled||j,children:[p===F.action&&j?o.jsx(He,{size:16,sx:{marginRight:1}}):o.jsx(F.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:F.name})]},F.name))}),R&&o.jsx(Ks,{title:R.title,description:R.description,confirm:R.confirm,cancel:R.cancel,params:R.params,onConfirm:R.onConfirm,onCancel:R.onCancel})]})}cs.propTypes={getComponentUrl:O.func,blocklet:O.object.isRequired,onStart:O.func.isRequired,onComplete:O.func.isRequired,variant:O.oneOf(["menu","group"]),hasPermission:O.bool,useBlockletUrlEvaluation:O.func};cs.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const Qs=Ve.div`
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
|
|
6
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
7
|
-
.MuiButton-root {
|
|
8
|
-
padding: 4px;
|
|
9
|
-
font-size: 10px;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
`,Ua=L.memo(cs),Ba=e=>{const r={};let t=null;return xe.forEachBlockletSync(e,s=>{r[s.meta.bundleDid]?t=xe.getDisplayName(s,!0):s.meta.bundleDid&&(r[s.meta.bundleDid]=!0)}),t},Ha=(e,r,t)=>{var i;const{hostname:s,href:n}=e;if(!r)return n;if(t){const l=/\d+[-.]\d+[-.]\d+[-.]\d+/.exec(s);if(!l)return n;const c=l[0],f=((((i=r.site)==null?void 0:i.domainAliases)||[]).map(p=>p.value).filter(Boolean).find(p=>p.endsWith(ie.DEFAULT_DID_DOMAIN))||"").replace(`.${ie.DEFAULT_DID_DOMAIN}`,"");return f?n.replace(s,`${f}-${c}.${ie.DEFAULT_IP_DOMAIN_SUFFIX}`):n}return n.replace(r.meta.bundleDid,r.appPid)};function Gn(){const{t:e}=he(),{api:r}=On(),{blocklet:t}=Zr(),{inService:s}=ot(),[n,i]=L.useState(!1),[a,l]=L.useState(5),c=t&&t.structVersion!==ie.APP_STRUCT_VERSION,d=()=>{try{if(t.status==="running"){ne.error(e("blocklet.migrate.tip.running"));return}const g=Ba(t);if(g){ne.error(e("blocklet.migrate.tip.duplicate",{name:g}));return}i(!0)}catch(g){ne.error(Jr(g))}},f=()=>{const g=Ha(window.location,t,s);setTimeout(()=>{window.location.href=g},5e3),l(5),setInterval(()=>{l(j=>j-1)},1e3)},p=()=>i(!1);return[c&&o.jsxs(yn,{severity:"warning",style:{margin:"12px 0"},children:[o.jsxs(U,{display:"flex",alignItems:"center",children:[o.jsx(Ze,{variant:"contained",size:"small",color:"primary",onClick:()=>d(),style:{marginRight:8},children:e("blocklet.migrate.intro.l1")}),o.jsx("span",{children:e("blocklet.migrate.intro.l2")})]}),["l3","l4","l5","l6"].map(g=>o.jsx(U,{display:"flex",alignItems:"center",children:e(`blocklet.migrate.intro.${g}`)},g))]},"alert"),t&&o.jsx(Po,{popup:!0,open:n,saveConnect:!1,forceConnected:!1,action:"migrate-app-to-struct-v2",checkFn:r.get,checkTimeout:5*60*1e3,onSuccess:f,extraParams:{appDid:t.appDid,did:t.meta.did,wt:qo(t,!0),title:xe.getDisplayName(t)},messages:{title:e("blocklet.migrate.title"),scan:e("blocklet.migrate.scan"),confirm:e("blocklet.migrate.confirm"),success:a>=0?e("blocklet.migrate.success",{sec:a}):"Redirecting..."},onClose:p},"connect")]}Gn.propTypes={};function us({children:e,style:r,...t}){return o.jsx(Fo,{style:r,...t,children:e})}us.propTypes={children:O.any.isRequired,style:O.object};us.defaultProps={style:{}};const re={yellow:"#FFCF71",grey:"#aaaaaa",reverse:"#444",success:"#3ab39d",running:"#34BE74",error:"#D0021B",primary:"#1DC1C7"};function ds({isResource:e,status:r,variant:t,source:s,progress:n,...i}){const{t:a}=L.useContext(Jt),l={added:"primary",waiting:"warning",downloading:"warning",extracting:"warning",downloaded:"primary",installing:"warning",installed:"primary",starting:"warning",running:"success",stopping:"warning",stopped:"reverse",error:"error",upgrading:"warning",restarting:"warning",corrupted:"error",deleting:"warning",resource:"primary"},c={added:re.grey,waiting:re.yellow,downloading:re.yellow,extracting:re.yellow,downloaded:re.grey,installing:re.yellow,installed:re.grey,starting:re.yellow,running:re.running,stopping:re.yellow,stopped:re.reverse,error:re.error,upgrading:re.yellow,restarting:re.yellow,corrupted:re.error,deleting:re.yellow,resource:re.primary},d=xe.isInProgress(r),f=e&&r==="stopped"?"resource":r,p=a(`blocklet.status.${f}`);return t==="pin"?o.jsx(Ot,{title:a("blocklet.statusTip",{status:p}),children:o.jsxs(U,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",...i,children:[o.jsx(U,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:c[f],style:{opacity:.15}}),o.jsx(U,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:c[f]})]})}):t==="dot"?o.jsx(Ot,{title:a("blocklet.statusTip",{status:p}),children:o.jsx(ua,{color:c[f],...i})}):o.jsxs(us,{type:l[f],...i,children:[d&&o.jsx(He,{size:12,color:"inherit",style:{marginRight:5}}),p,f==="downloading"&&n?o.jsx("div",{style:{marginLeft:5},children:`${n} %`}):null]})}ds.propTypes={status:O.string.isRequired,variant:O.oneOf(["dot","tag","pin"]),source:O.string,progress:O.number,isResource:O.bool};ds.defaultProps={isResource:!1,variant:"tag",source:"",progress:0};function za(){const e=wo();return[...e.breakpoints.keys].reverse().reduce((t,s)=>{const n=Ie(e.breakpoints.up(s));return!t&&n?s:t},null)||"xs"}function qa(e){return o.jsx(Zt,{...e,children:o.jsx("path",{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z"})})}function Wa(e){return o.jsx(Zt,{...e,children:o.jsx("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"})})}function Ka(e){return o.jsx(Zt,{...e,children:o.jsx("path",{d:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2, 6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12, 13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"})})}function Ga(e){return o.jsx(Zt,{...e,children:o.jsx("path",{d:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12A10,10 0 0,0 12,2Z"})})}const Et={fontSize:20,marginInlineEnd:8},Qa={success:o.jsx(qa,{style:Et}),warning:o.jsx(Wa,{style:Et}),error:o.jsx(Ka,{style:Et}),info:o.jsx(Ga,{style:Et})},Za=jo(e=>{const r={xl:"400px",lg:"400px",md:"400px",sm:"300px"},t=e.palette.background.default;return{lessPadding:{paddingLeft:8*2.5},contentRoot:{...e.typography.body2,display:"flex",backgroundColor:t,color:"#fff",alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"},success:s=>({backgroundColor:`${So[600]} !important`,width:r[s.breakpoint]}),error:s=>({backgroundColor:`${e.palette.error.dark} !important`,width:r[s.breakpoint]}),info:s=>({backgroundColor:`${e.palette.primary.main} !important`,width:r[s.breakpoint]}),warning:s=>({backgroundColor:`${Co[700]} !important`,width:r[s.breakpoint]}),icon:{fontSize:20},message:{display:"flex",alignItems:"center",padding:"8px 0",flex:1,width:0},action:{display:"flex",alignItems:"center",marginLeft:"auto",marginRight:-8,width:44}}});function fs({keyId:e,notification:r={},viewAllUrl:t,content:s},n){var R;const i=Za({breakpoint:za()}),a=[i.contentRoot,i.lessPadding,i[r.severity]].join(" "),l=Qa[r.severity],{closeSnackbar:c}=An(),d=()=>c(e),f=Sn(),p=()=>{c(e),f(t)},g=Je(()=>ia(r),[r]),j=Je(()=>r==null?void 0:r.activity,[r]),T=oa({activity:j,users:[r==null?void 0:r.actorInfo],actors:[(R=r==null?void 0:r.activity)==null?void 0:R.actor],extra:{linkColor:Gr.primaryBase}});return o.jsxs(Oo,{ref:n,className:a,children:[o.jsxs("div",{className:i.message,children:[l,o.jsx(Ya,{onClick:p,style:{width:"calc(100% - 30px)"},children:o.jsx(U,{onClick:V=>V.stopPropagation(),children:g?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:T}),o.jsx(aa,{meta:j.meta,type:j.type,sx:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitLineClamp:3,WebkitBoxOrient:"vertical",color:"#fff"}})]}):o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"title",children:r.title}),s||o.jsx("span",{className:"desc",children:r.description})]})})})]}),o.jsx("div",{className:i.action,children:o.jsx(Qt,{"aria-label":"close",color:"inherit",onClick:d,size:"large",children:o.jsx(Vo,{className:i.icon})},"close")})]})}const Ja=L.forwardRef(fs);fs.propTypes={viewAllUrl:O.string.isRequired,keyId:O.number.isRequired,notification:O.object.isRequired,content:O.node};fs.defaultProps={content:null};const Ya=Ve.div`
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: column;
|
|
16
|
-
.title {
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
text-overflow: ellipsis;
|
|
19
|
-
display: -webkit-box;
|
|
20
|
-
-webkit-line-clamp: 1;
|
|
21
|
-
-webkit-box-orient: vertical;
|
|
22
|
-
font-weight: bold;
|
|
23
|
-
}
|
|
24
|
-
.desc {
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
text-overflow: ellipsis;
|
|
27
|
-
display: -webkit-box;
|
|
28
|
-
-webkit-line-clamp: 3;
|
|
29
|
-
-webkit-box-orient: vertical;
|
|
30
|
-
word-break: break-word;
|
|
31
|
-
}
|
|
32
|
-
`;function Qn({attachment:e}){const{data:r}=e;let t="";try{t=new URL(r.url).host}catch{t=r.url}return o.jsxs(Kr,{target:"_blank",rel:"noopener noreferrer",href:r.url,className:"link",style:{wordBreak:"break-all"},onClick:s=>{s.customPreventRedirect=!0},children:[!!t&&o.jsx("span",{className:"url",children:t}),!!r.title&&o.jsx(U,{className:"title",style:{whiteSpace:"unset"},children:r.title}),!!r.description&&o.jsx(U,{className:"description",style:{whiteSpace:"unset",color:"rgba(75, 85, 99, 1)"},children:r.description}),!!r.image&&o.jsx("img",{src:Rn.getImagePath(r.image),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}Qn.propTypes={attachment:O.object.isRequired};function Zn({attachment:e}){const{data:r}=e;return o.jsx("img",{src:Rn.getImagePath(r.url),alt:r.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}Zn.propTypes={attachment:O.object.isRequired};function ps({attachment:e,...r}){var l;const{data:t}=e,s=((l=t.color)==null?void 0:l.toLowerCase())||r.color,n=t.size||r.size,i=t.fontWeight||r.fontWeight||400;let a="14px";return n==="small"?a="12px":n==="normal"?a="14px":n==="big"?a="16px":n==="large"&&(a="18px"),o.jsx("span",{className:"title",style:{fontSize:a,color:s,whiteSpace:"unset",fontWeight:i},children:t.text})}ps.propTypes={attachment:O.object.isRequired};ms.propTypes={locale:O.string,data:O.object.isRequired};ms.defaultProps={locale:"en"};function ms({locale:e="en",data:r}){const t={zh:"来自",en:"from"}[e]||"from",s={zh:"接收",en:"Received"}[e]||"Received",i=`https://${yt.getUrlHost(r.chainHost)||yt.getChainHost(r.chainId)}/explorer/tokens/${r.address}/tx`;let a=r.amount;r.decimal&&(a=r.amount/10**r.decimal);const l=Je(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx("a",{href:i,target:"_blank",rel:"noreferrer",onClick:c=>{c.customPreventRedirect=!0},children:o.jsxs(U,{display:"flex",flexDirection:"column",children:[o.jsxs(U,{sx:l,children:[o.jsx(pe,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:s}),o.jsxs(pe,{component:"div",align:"right",style:Mt.summaryStyle,flex:1,children:["+",a," ",r.symbol]})]}),o.jsxs(U,{sx:l,children:[o.jsx(pe,{component:"div",style:{...Mt.remarkStyle,fontSize:14},children:t}),o.jsx(U,{sx:{maxWidth:"252px",fontSize:"14px"},children:o.jsx(Qr,{did:r.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}hs.propTypes={locale:O.string,data:O.object.isRequired};hs.defaultProps={locale:"en"};function hs({locale:e,data:r}){var c,d;const t={zh:"接收",en:"Received"}[e]||"Received",s={zh:"来自",en:"from"}[e]||"from",n=yt.getUrlHost(r.chainHost)||yt.getChainHost(r.chainId),i=r.did||((d=(c=r==null?void 0:r.credential)==null?void 0:c.issuer)==null?void 0:d.id)||"",a=`https://${n}/explorer/assets/${i}`,l=Je(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return o.jsx(U,{sx:{pr:1},children:o.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:f=>{f.customPreventRedirect=!0},rel:"noreferrer",children:o.jsxs(U,{display:"flex",flexDirection:"column",children:[o.jsxs(U,{sx:l,children:[o.jsx(pe,{component:"div",sx:{fontWeight:700,color:"rgba(3, 7, 18, 1)"},children:t}),o.jsx(pe,{component:"div",align:"right",style:Mt.summaryStyle,children:"+1 Asset"})]}),i?o.jsxs(U,{sx:l,children:[o.jsx(pe,{component:"div",style:{...Mt.remarkStyle,fontSize:14},children:s}),o.jsx(U,{sx:{maxWidth:"252px",fontSize:"14px"},children:o.jsx(Qr,{did:i,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}Jn.propTypes={data:O.object.isRequired,locale:O.string};function Jn({data:e,locale:r="en"}){return o.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:t=>{t.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),o.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[o.jsx("div",{style:{marginBottom:"6px"},children:e.title}),o.jsx("div",{style:{color:"#a5a5a5",fontSize:10,maxWidth:"252px"},children:o.jsx(Qr,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:r})})]})]})}gs.propTypes={locale:O.string,data:O.object.isRequired};gs.defaultProps={locale:"en"};function gs({locale:e,data:r}){const t=yt.getChainHost(r.chainId),s=`https://${t}/explorer/txs/${r.hash}`,n={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",i={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash";return o.jsxs("a",{href:s,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block",fontSize:14},onClick:a=>{a.customPreventRedirect=!0},rel:"noreferrer",children:[o.jsx("h6",{style:{color:"#a5a5a5",margin:0},children:t}),o.jsx("p",{style:{color:"#4598fa",margin:0},children:n}),o.jsxs("div",{style:{wordBreak:"break-all"},children:[i,": ",r.hash]})]})}function Yn({data:e,isMd:r=!1}){return o.jsx(U,{display:"flex",flexDirection:r?"row":"column",justifyContent:"space-between",sx:{width:r?"100%":"auto",flexWrap:"nowrap",gap:1},children:e.items.map((t,s)=>o.jsx(ps,{attachment:t,color:s===0?"rgba(156, 163, 175, 1)":"",size:s===0?"normal":"big",fontWeight:s===0?400:600,sx:Mo(s===0?{flexShrink:0}:{flex:1})},s))})}Yn.propTypes={data:O.array.isRequired,isMd:O.bool};function Xn({attachment:e,...r}){const{local:t}=L.useContext(Jt),s=Ie(n=>n.breakpoints.down("md"));return o.jsxs(Xa,{"data-testid":"attachment-preview",...r,isMd:s,children:[e.type==="link"&&o.jsx(Qn,{attachment:e,...r,isMd:s}),e.type==="image"&&o.jsx(Zn,{attachment:e,isMd:s}),e.type==="text"&&o.jsx(ps,{attachment:e,isMd:s}),e.type==="token"&&o.jsx(ms,{data:e.data,local:t,isMd:s}),e.type==="asset"||e.type==="vc"?o.jsx(hs,{data:e.data,local:t,isMd:s}):null,e.type==="dapp"&&o.jsx(Jn,{data:e.data,local:t,isMd:s}),e.type==="transaction"&&o.jsx(gs,{data:e.data,local:t,...r,isMd:s}),e.type==="divider"&&o.jsx(Wr,{sx:{mb:1,mt:1},style:{color:Gr.dividerColor}}),e.type==="combined"&&o.jsx(Yn,{data:e,isMd:s})]})}const Xa=Ve.div`
|
|
33
|
-
display: ${({sx:e={}})=>e.display||"flex"};
|
|
34
|
-
flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
|
|
35
|
-
gap: ${({sx:e={}})=>e.gap||1};
|
|
36
|
-
width: ${({isMd:e=!1})=>e?"100%":"auto"};
|
|
37
|
-
&:last-child {
|
|
38
|
-
margin-bottom: 0;
|
|
39
|
-
}
|
|
40
|
-
`;Xn.propTypes={attachment:O.object.isRequired};function ei({data:e,...r}){const{items:t}=e;return o.jsx(el,{...r,children:t.map(s=>o.jsxs(xn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[o.jsxs(U,{display:"flex",alignItems:"center",gap:1,children:[s.icon?o.jsx("img",{src:s.icon,alt:s.title,style:{width:16,height:16}}):null,o.jsxs(U,{className:"metric-name",display:"flex",alignItems:"center",children:[s.title,s.subtitle?o.jsx(Ot,{title:s.subtitle,arrow:!0,placement:"top",children:o.jsx(fa,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),o.jsxs(U,{className:"metric-number",sx:{color:s.content_color||"rgba(3, 7, 18, 1)"},children:[s.content,s.sub_content?o.jsxs("span",{className:"sub-content",style:{color:s.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",s.sub_content,")"]}):null]})]},s.title))})}const el=Ve(U)`
|
|
41
|
-
display: flex;
|
|
42
|
-
justify-content: flex-start;
|
|
43
|
-
flex-wrap: wrap;
|
|
44
|
-
gap: 16px;
|
|
45
|
-
.metric-number {
|
|
46
|
-
font-size: 18px;
|
|
47
|
-
font-weight: 600;
|
|
48
|
-
.sub-content {
|
|
49
|
-
font-size: 12px;
|
|
50
|
-
font-weight: 400;
|
|
51
|
-
margin-left: 4px;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
.metric-name {
|
|
55
|
-
font-size: 14px;
|
|
56
|
-
color: rgba(156, 163, 175, 1);
|
|
57
|
-
}
|
|
58
|
-
`;ei.propTypes={data:O.object.isRequired};function ti({data:e}){const{items:r}=e,t=Ie(a=>a.breakpoints.down("sm")),s=Ie(a=>a.breakpoints.down("md")),n=Ie(a=>a.breakpoints.down("lg")),i=()=>t?1:s?3:n?4:6;return o.jsx(Ao,{variant:"quilted",cols:i(),gap:8,rowHeight:128,sx:{margin:0},children:r.map(a=>{const l=a.cover||a.display;return l?o.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:o.jsx(Eo,{children:o.jsx("img",{src:l,alt:a.title||"",style:{borderRadius:"8px"}})})},l):null})})}ti.propTypes={data:O.object.isRequired};function ys({data:e,feedType:r,...t}){return o.jsxs(tl,{...t,children:[r==="data-tracker"&&e.type==="table"&&o.jsx(ei,{data:e}),(r==="graphic"||r==="gallery")&&o.jsx(ti,{data:e})]})}const tl=Ve.div`
|
|
59
|
-
display: flex;
|
|
60
|
-
flex-direction: column;
|
|
61
|
-
width: 100%;
|
|
62
|
-
margin-bottom: 4px;
|
|
63
|
-
&:last-child {
|
|
64
|
-
margin-bottom: 0;
|
|
65
|
-
}
|
|
66
|
-
`;ys.propTypes={data:O.object.isRequired,feedType:O.string};ys.defaultProps={feedType:"data-tracker"};const rl=e=>{let r="rgba(0, 0, 0, 0.12)";return e==="warning"?r="#DE9E37":e==="error"?r="#F16E6E":r="rgba(0, 0, 0, 0.12)",r},sl=e=>e.every(r=>r.type==="text"),nl=e=>e.every(r=>r.type==="image"),il=e=>sa(e,2).map(r=>({type:"combined",items:r})).filter(r=>(r.items||[]).every(t=>{var s,n,i;return(i=(n=(s=t==null?void 0:t.data)==null?void 0:s.text)==null?void 0:n.trim)==null?void 0:i.call(n)})),ol=e=>{if(!e.length||e.length<=1)return!1;const r=e[0].type;return e.every(t=>t.type===r)},al=async(e,r)=>{const s=new $o().user;if(s)try{return await s.getUserPublicInfo({did:e})?await s.getProfileUrl({did:e,locale:r}):void 0}catch(n){console.error(n);return}};function xs({notification:e,severity:r,showSke:t=!0}){const{attachments:s,data:n,...i}=e,a=Ie(f=>f.breakpoints.down("md"));if((!s||!s.length)&&Dt(n))return null;const l=rl(r),c=(f,p=!1)=>{if(!f&&!Array.isArray(f))return null;let g=f,j={},T="horizontal";p&&sl(f)&&(g=il(f),T="vertical",j={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%"});const R=ol(g);return o.jsx(U,{sx:{width:"100%",display:"flex",gap:1,flexDirection:p?"row":"column",justifyContent:"flex-start",alignItems:p?"center":"unset",flexWrap:"wrap"},children:g.map((V,y)=>V.type==="section"?o.jsx(L.Fragment,{children:c(V.fields,!0)},y):o.jsxs(L.Fragment,{children:[o.jsx(Xn,{attachment:V,sx:j,...i}),!(a&&T==="vertical")&&R&&g.length>1&&y!==g.length-1?o.jsx(Wr,{orientation:T,style:{color:Gr.dividerColor},sx:T==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},y))})},d=nl(s);return o.jsx(ll,{children:o.jsxs("div",{className:"message-in-list",children:[s.length>0&&o.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:d?c(s):o.jsx(xn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:l},children:c(s)})}),!Dt(n)&&o.jsx("div",{className:"message-container",children:o.jsx("div",{className:"data-container",children:o.jsx(ys,{data:n,feedType:e.feedType})})}),s.length===0&&Dt(n)&&t&&o.jsx(To,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const ll=Ve.div`
|
|
67
|
-
display: flex;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
.message-in-list {
|
|
70
|
-
padding: 8px 8px 8px 0;
|
|
71
|
-
display: flex;
|
|
72
|
-
border-radius: 8px;
|
|
73
|
-
}
|
|
74
|
-
.message-title {
|
|
75
|
-
color: #25292f;
|
|
76
|
-
font-size: 18px;
|
|
77
|
-
font-weight: bold;
|
|
78
|
-
word-break: break-all;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.attach-ske {
|
|
82
|
-
position: relative;
|
|
83
|
-
margin-left: 10px;
|
|
84
|
-
&::after {
|
|
85
|
-
content: '';
|
|
86
|
-
position: absolute;
|
|
87
|
-
left: -10px;
|
|
88
|
-
top: 0;
|
|
89
|
-
height: 100%;
|
|
90
|
-
width: 4px;
|
|
91
|
-
background-color: ${e=>e.leftLineColor};
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.message-body {
|
|
96
|
-
color: #25292f;
|
|
97
|
-
font-size: 16px;
|
|
98
|
-
word-break: break-all;
|
|
99
|
-
white-space: pre-line;
|
|
100
|
-
}
|
|
101
|
-
.message-container {
|
|
102
|
-
display: flex;
|
|
103
|
-
flex-direction: column;
|
|
104
|
-
justify-content: flex-start;
|
|
105
|
-
.data-container,
|
|
106
|
-
.attachment-container {
|
|
107
|
-
display: flex;
|
|
108
|
-
flex-direction: column;
|
|
109
|
-
width: 100%;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
.actions-container {
|
|
113
|
-
margin-top: 10px;
|
|
114
|
-
.actions-item {
|
|
115
|
-
margin-right: 8px;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
`;xs.propTypes={severity:O.string.isRequired,notification:O.object.isRequired,showSke:O.bool};xs.defaultProps={showSke:!0};const cr=e=>io.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),cl=async(e,r)=>{const{type:t,did:s}=e;return Pn.isSameAddr(t,"did")?await al(s,r)||$t.getLink(e):$t.getLink(e)},ul=async(e,r,t=!0)=>{const s=$t.toTextList(e);return await Promise.all(s.map(async i=>{if(i instanceof $t.Link){if(t){const a=await cl(i,r),{type:l,chainId:c,did:d}=i;return Pn.isSameAddr(l,"dapp")?`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${d}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${d}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};ri.propTypes={notification:O.object,rows:O.number,minimal:O.bool};function ri({notification:e,rows:r=2,minimal:t=!1}){const[s,n]=L.useState(!1),[i,a]=L.useState(""),{t:l,locale:c}=he(),d=L.useMemo(()=>{const{attachments:V}=e||{};if(!V)return!1;try{return V.length>0}catch{return!1}},[e]),f=L.useMemo(()=>{const{blocks:V}=e||{};if(!V)return!1;try{return V.length>0}catch{return!1}},[e]),p=L.useMemo(()=>{const{description:V}=e||{};return!!V},[e]),g=L.useMemo(()=>{const{data:V}=e||{};return!Dt(V)},[e]),j=L.useMemo(()=>d||f||p||g,[d,f,p,g]);if(L.useEffect(()=>{ul((e==null?void 0:e.description)??"",c).then(V=>{a(V)})},[e==null?void 0:e.description,c]),!j)return null;const T=()=>r===0?"":s?`<span class='toggle-btn' data-name='toggle-expanded'>${l("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${l("common.expand")}</span>`,R=V=>{const{target:y}=V;y.getAttribute("data-name")==="toggle-expanded"&&(n(!s),V.customPreventRedirect=!0)};return o.jsxs(dl,{color:t?"#fff":"",children:[o.jsx(U,{className:"text-container",component:"div",onClick:R,children:i&&(!s&&r>0?o.jsx(la,{basedOn:"letters",unsafeHTML:cr(i),maxLine:r,ellipsisHTML:cr(T())}):o.jsx(pe,{component:"div",className:`content ${r===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:cr(`${i}${T()}`)}}))}),!t&&(d||g)?o.jsx(xs,{severity:e.severity,notification:e}):null]})}const dl=Ve(U)`
|
|
119
|
-
width: 100%;
|
|
120
|
-
color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
|
|
121
|
-
.text-container {
|
|
122
|
-
word-wrap: break-word;
|
|
123
|
-
word-break: break-all;
|
|
124
|
-
color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
|
|
125
|
-
.toggle-btn {
|
|
126
|
-
display: inline-block;
|
|
127
|
-
white-space: nowrap;
|
|
128
|
-
cursor: pointer;
|
|
129
|
-
margin-left: 4px;
|
|
130
|
-
color: rgba(59, 130, 246, 1);
|
|
131
|
-
}
|
|
132
|
-
.content.ellipsis {
|
|
133
|
-
overflow: hidden;
|
|
134
|
-
text-overflow: ellipsis;
|
|
135
|
-
word-break: break-all;
|
|
136
|
-
display: block;
|
|
137
|
-
display: -webkit-box;
|
|
138
|
-
-webkit-box-orient: vertical;
|
|
139
|
-
-webkit-line-clamp: 2;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
`,fl=L.memo(ri);var vt=e=>e.type==="checkbox",st=e=>e instanceof Date,ue=e=>e==null;const si=e=>typeof e=="object";var J=e=>!ue(e)&&!Array.isArray(e)&&si(e)&&!st(e),ni=e=>J(e)&&e.target?vt(e.target)?e.target.checked:e.target.value:e,pl=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ii=(e,r)=>e.has(pl(r)),ml=e=>{const r=e.constructor&&e.constructor.prototype;return J(r)&&r.hasOwnProperty("isPrototypeOf")},vs=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function X(e){let r;const t=Array.isArray(e);if(e instanceof Date)r=new Date(e);else if(e instanceof Set)r=new Set(e);else if(!(vs&&(e instanceof Blob||e instanceof FileList))&&(t||J(e)))if(r=t?[]:{},!t&&!ml(e))r=e;else for(const s in e)e.hasOwnProperty(s)&&(r[s]=X(e[s]));else return e;return r}var bt=e=>Array.isArray(e)?e.filter(Boolean):[],G=e=>e===void 0,E=(e,r,t)=>{if(!r||!J(e))return t;const s=bt(r.split(/[,[\].]+?/)).reduce((n,i)=>ue(n)?n:n[i],e);return G(s)||s===e?G(e[r])?t:e[r]:s},be=e=>typeof e=="boolean",bs=e=>/^\w*$/.test(e),oi=e=>bt(e.replace(/["|']|\]/g,"").split(/\.|\[/)),K=(e,r,t)=>{let s=-1;const n=bs(r)?[r]:oi(r),i=n.length,a=i-1;for(;++s<i;){const l=n[s];let c=t;if(s!==a){const d=e[l];c=J(d)||Array.isArray(d)?d:isNaN(+n[s+1])?{}:[]}if(l==="__proto__")return;e[l]=c,e=e[l]}return e};const Nt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Le={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},hl=H.createContext(null),Xt=()=>H.useContext(hl);var ai=(e,r,t,s=!0)=>{const n={defaultValues:r._defaultValues};for(const i in e)Object.defineProperty(n,i,{get:()=>{const a=i;return r._proxyFormState[a]!==_e.all&&(r._proxyFormState[a]=!s||_e.all),t&&(t[a]=!0),e[a]}});return n},ce=e=>J(e)&&!Object.keys(e).length,li=(e,r,t,s)=>{t(e);const{name:n,...i}=e;return ce(i)||Object.keys(i).length>=Object.keys(r).length||Object.keys(i).find(a=>r[a]===(!s||_e.all))},me=e=>Array.isArray(e)?e:[e],ci=(e,r,t)=>!e||!r||e===r||me(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s)));function er(e){const r=H.useRef(e);r.current=e,H.useEffect(()=>{const t=!e.disabled&&r.current.subject&&r.current.subject.subscribe({next:r.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function gl(e){const r=Xt(),{control:t=r.control,disabled:s,name:n,exact:i}=e||{},[a,l]=H.useState(t._formState),c=H.useRef(!0),d=H.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=H.useRef(n);return f.current=n,er({disabled:s,next:p=>c.current&&ci(f.current,p.name,i)&&li(p,d.current,t._updateFormState)&&l({...t._formState,...p}),subject:t._subjects.state}),H.useEffect(()=>(c.current=!0,d.current.isValid&&t._updateValid(!0),()=>{c.current=!1}),[t]),ai(a,t,d.current,!1)}var Re=e=>typeof e=="string",ui=(e,r,t,s,n)=>Re(e)?(s&&r.watch.add(e),E(t,e,n)):Array.isArray(e)?e.map(i=>(s&&r.watch.add(i),E(t,i))):(s&&(r.watchAll=!0),t);function yl(e){const r=Xt(),{control:t=r.control,name:s,defaultValue:n,disabled:i,exact:a}=e||{},l=H.useRef(s);l.current=s,er({disabled:i,subject:t._subjects.values,next:f=>{ci(l.current,f.name,a)&&d(X(ui(l.current,t._names,f.values||t._formValues,!1,n)))}});const[c,d]=H.useState(t._getWatch(s,n));return H.useEffect(()=>t._removeUnmounted()),c}function xl(e){const r=Xt(),{name:t,disabled:s,control:n=r.control,shouldUnregister:i}=e,a=ii(n._names.array,t),l=yl({control:n,name:t,defaultValue:E(n._formValues,t,E(n._defaultValues,t,e.defaultValue)),exact:!0}),c=gl({control:n,name:t,exact:!0}),d=H.useRef(n.register(t,{...e.rules,value:l,...be(e.disabled)?{disabled:e.disabled}:{}}));return H.useEffect(()=>{const f=n._options.shouldUnregister||i,p=(g,j)=>{const T=E(n._fields,g);T&&T._f&&(T._f.mount=j)};if(p(t,!0),f){const g=X(E(n._options.defaultValues,t));K(n._defaultValues,t,g),G(E(n._formValues,t))&&K(n._formValues,t,g)}return()=>{(a?f&&!n._state.action:f)?n.unregister(t):p(t,!1)}},[t,n,a,i]),H.useEffect(()=>{E(n._fields,t)&&n._updateDisabledField({disabled:s,fields:n._fields,name:t,value:E(n._fields,t)._f.value})},[s,t,n]),{field:{name:t,value:l,...be(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:H.useCallback(f=>d.current.onChange({target:{value:ni(f),name:t},type:Nt.CHANGE}),[t]),onBlur:H.useCallback(()=>d.current.onBlur({target:{value:E(n._formValues,t),name:t},type:Nt.BLUR}),[t,n]),ref:H.useCallback(f=>{const p=E(n._fields,t);p&&f&&(p._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:g=>f.setCustomValidity(g),reportValidity:()=>f.reportValidity()})},[n._fields,t])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!E(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!E(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!E(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!E(c.validatingFields,t)},error:{enumerable:!0,get:()=>E(c.errors,t)}})}}const Ce=e=>e.render(xl(e));var vl=(e,r,t,s,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:n||!0}}:{},Ne=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const t=(Math.random()*16+e)%16|0;return(r=="x"?t:t&3|8).toString(16)})},ur=(e,r,t={})=>t.shouldFocus||G(t.shouldFocus)?t.focusName||`${e}.${G(t.focusIndex)?r:t.focusIndex}.`:"",ft=e=>({isOnSubmit:!e||e===_e.onSubmit,isOnBlur:e===_e.onBlur,isOnChange:e===_e.onChange,isOnAll:e===_e.all,isOnTouch:e===_e.onTouched}),Tr=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const nt=(e,r,t,s)=>{for(const n of t||Object.keys(e)){const i=E(e,n);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&r(a.refs[0],n)&&!s)return!0;if(a.ref&&r(a.ref,a.name)&&!s)return!0;if(nt(l,r))break}else if(J(l)&&nt(l,r))break}}};var di=(e,r,t)=>{const s=me(E(e,t));return K(s,"root",r[t]),K(e,t,s),e},_s=e=>e.type==="file",Oe=e=>typeof e=="function",Ut=e=>{if(!vs)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Lt=e=>Re(e),ws=e=>e.type==="radio",Bt=e=>e instanceof RegExp;const Zs={value:!1,isValid:!1},Js={value:!0,isValid:!0};var fi=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!G(e[0].attributes.value)?G(e[0].value)||e[0].value===""?Js:{value:e[0].value,isValid:!0}:Js:Zs}return Zs};const Ys={isValid:!1,value:null};var pi=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,Ys):Ys;function Xs(e,r,t="validate"){if(Lt(e)||Array.isArray(e)&&e.every(Lt)||be(e)&&!e)return{type:t,message:Lt(e)?e:"",ref:r}}var tt=e=>J(e)&&!Bt(e)?e:{value:e,message:""},Rr=async(e,r,t,s,n)=>{const{ref:i,refs:a,required:l,maxLength:c,minLength:d,min:f,max:p,pattern:g,validate:j,name:T,valueAsNumber:R,mount:V,disabled:y}=e._f,v=E(r,T);if(!V||y)return{};const k=a?a[0]:i,B=M=>{s&&k.reportValidity&&(k.setCustomValidity(be(M)?"":M||""),k.reportValidity())},_={},h=ws(i),w=vt(i),S=h||w,A=(R||_s(i))&&G(i.value)&&G(v)||Ut(i)&&i.value===""||v===""||Array.isArray(v)&&!v.length,b=vl.bind(null,T,t,_),P=(M,$,z,W=Le.maxLength,oe=Le.minLength)=>{const de=M?$:z;_[T]={type:M?W:oe,message:de,ref:i,...b(M?W:oe,de)}};if(n?!Array.isArray(v)||!v.length:l&&(!S&&(A||ue(v))||be(v)&&!v||w&&!fi(a).isValid||h&&!pi(a).isValid)){const{value:M,message:$}=Lt(l)?{value:!!l,message:l}:tt(l);if(M&&(_[T]={type:Le.required,message:$,ref:k,...b(Le.required,$)},!t))return B($),_}if(!A&&(!ue(f)||!ue(p))){let M,$;const z=tt(p),W=tt(f);if(!ue(v)&&!isNaN(v)){const oe=i.valueAsNumber||v&&+v;ue(z.value)||(M=oe>z.value),ue(W.value)||($=oe<W.value)}else{const oe=i.valueAsDate||new Date(v),de=F=>new Date(new Date().toDateString()+" "+F),qe=i.type=="time",Ae=i.type=="week";Re(z.value)&&v&&(M=qe?de(v)>de(z.value):Ae?v>z.value:oe>new Date(z.value)),Re(W.value)&&v&&($=qe?de(v)<de(W.value):Ae?v<W.value:oe<new Date(W.value))}if((M||$)&&(P(!!M,z.message,W.message,Le.max,Le.min),!t))return B(_[T].message),_}if((c||d)&&!A&&(Re(v)||n&&Array.isArray(v))){const M=tt(c),$=tt(d),z=!ue(M.value)&&v.length>+M.value,W=!ue($.value)&&v.length<+$.value;if((z||W)&&(P(z,M.message,$.message),!t))return B(_[T].message),_}if(g&&!A&&Re(v)){const{value:M,message:$}=tt(g);if(Bt(M)&&!v.match(M)&&(_[T]={type:Le.pattern,message:$,ref:i,...b(Le.pattern,$)},!t))return B($),_}if(j){if(Oe(j)){const M=await j(v,r),$=Xs(M,k);if($&&(_[T]={...$,...b(Le.validate,$.message)},!t))return B($.message),_}else if(J(j)){let M={};for(const $ in j){if(!ce(M)&&!t)break;const z=Xs(await j[$](v,r),k,$);z&&(M={...z,...b($,z.message)},B(z.message),t&&(_[T]=M))}if(!ce(M)&&(_[T]={ref:k,...M},!t))return _}}return B(!0),_},dr=(e,r)=>[...e,...me(r)],fr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function pr(e,r,t){return[...e.slice(0,r),...me(t),...e.slice(r)]}var mr=(e,r,t)=>Array.isArray(e)?(G(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(r,1)[0]),e):[],hr=(e,r)=>[...me(r),...me(e)];function bl(e,r){let t=0;const s=[...e];for(const n of r)s.splice(n-t,1),t++;return bt(s).length?s:[]}var gr=(e,r)=>G(r)?[]:bl(e,me(r).sort((t,s)=>t-s)),yr=(e,r,t)=>{[e[r],e[t]]=[e[t],e[r]]};function _l(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=G(e)?s++:e[r[s++]];return e}function wl(e){for(const r in e)if(e.hasOwnProperty(r)&&!G(e[r]))return!1;return!0}function Z(e,r){const t=Array.isArray(r)?r:bs(r)?[r]:oi(r),s=t.length===1?e:_l(e,t),n=t.length-1,i=t[n];return s&&delete s[i],n!==0&&(J(s)&&ce(s)||Array.isArray(s)&&wl(s))&&Z(e,t.slice(0,-1)),e}var en=(e,r,t)=>(e[r]=t,e);function Ed(e){const r=Xt(),{control:t=r.control,name:s,keyName:n="id",shouldUnregister:i}=e,[a,l]=H.useState(t._getFieldArray(s)),c=H.useRef(t._getFieldArray(s).map(Ne)),d=H.useRef(a),f=H.useRef(s),p=H.useRef(!1);f.current=s,d.current=a,t._names.array.add(s),e.rules&&t.register(s,e.rules),er({next:({values:_,name:h})=>{if(h===f.current||!h){const w=E(_,f.current);Array.isArray(w)&&(l(w),c.current=w.map(Ne))}},subject:t._subjects.array});const g=H.useCallback(_=>{p.current=!0,t._updateFieldArray(s,_)},[t,s]),j=(_,h)=>{const w=me(X(_)),S=dr(t._getFieldArray(s),w);t._names.focus=ur(s,S.length-1,h),c.current=dr(c.current,w.map(Ne)),g(S),l(S),t._updateFieldArray(s,S,dr,{argA:fr(_)})},T=(_,h)=>{const w=me(X(_)),S=hr(t._getFieldArray(s),w);t._names.focus=ur(s,0,h),c.current=hr(c.current,w.map(Ne)),g(S),l(S),t._updateFieldArray(s,S,hr,{argA:fr(_)})},R=_=>{const h=gr(t._getFieldArray(s),_);c.current=gr(c.current,_),g(h),l(h),t._updateFieldArray(s,h,gr,{argA:_})},V=(_,h,w)=>{const S=me(X(h)),A=pr(t._getFieldArray(s),_,S);t._names.focus=ur(s,_,w),c.current=pr(c.current,_,S.map(Ne)),g(A),l(A),t._updateFieldArray(s,A,pr,{argA:_,argB:fr(h)})},y=(_,h)=>{const w=t._getFieldArray(s);yr(w,_,h),yr(c.current,_,h),g(w),l(w),t._updateFieldArray(s,w,yr,{argA:_,argB:h},!1)},v=(_,h)=>{const w=t._getFieldArray(s);mr(w,_,h),mr(c.current,_,h),g(w),l(w),t._updateFieldArray(s,w,mr,{argA:_,argB:h},!1)},k=(_,h)=>{const w=X(h),S=en(t._getFieldArray(s),_,w);c.current=[...S].map((A,b)=>!A||b===_?Ne():c.current[b]),g(S),l([...S]),t._updateFieldArray(s,S,en,{argA:_,argB:w},!0,!1)},B=_=>{const h=me(X(_));c.current=h.map(Ne),g([...h]),l([...h]),t._updateFieldArray(s,[...h],w=>w,{},!0,!1)};return H.useEffect(()=>{if(t._state.action=!1,Tr(s,t._names)&&t._subjects.state.next({...t._formState}),p.current&&(!ft(t._options.mode).isOnSubmit||t._formState.isSubmitted))if(t._options.resolver)t._executeSchema([s]).then(_=>{const h=E(_.errors,s),w=E(t._formState.errors,s);(w?!h&&w.type||h&&(w.type!==h.type||w.message!==h.message):h&&h.type)&&(h?K(t._formState.errors,s,h):Z(t._formState.errors,s),t._subjects.state.next({errors:t._formState.errors}))});else{const _=E(t._fields,s);_&&_._f&&!(ft(t._options.reValidateMode).isOnSubmit&&ft(t._options.mode).isOnSubmit)&&Rr(_,t._formValues,t._options.criteriaMode===_e.all,t._options.shouldUseNativeValidation,!0).then(h=>!ce(h)&&t._subjects.state.next({errors:di(t._formState.errors,h,s)}))}t._subjects.values.next({name:s,values:{...t._formValues}}),t._names.focus&&nt(t._fields,(_,h)=>{if(t._names.focus&&h.startsWith(t._names.focus)&&_.focus)return _.focus(),1}),t._names.focus="",t._updateValid(),p.current=!1},[a,s,t]),H.useEffect(()=>(!E(t._formValues,s)&&t._updateFieldArray(s),()=>{(t._options.shouldUnregister||i)&&t.unregister(s)}),[s,t,n,i]),{swap:H.useCallback(y,[g,s,t]),move:H.useCallback(v,[g,s,t]),prepend:H.useCallback(T,[g,s,t]),append:H.useCallback(j,[g,s,t]),remove:H.useCallback(R,[g,s,t]),insert:H.useCallback(V,[g,s,t]),update:H.useCallback(k,[g,s,t]),replace:H.useCallback(B,[g,s,t]),fields:H.useMemo(()=>a.map((_,h)=>({..._,[n]:c.current[h]||Ne()})),[a,n])}}var xr=()=>{let e=[];return{get observers(){return e},next:n=>{for(const i of e)i.next&&i.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(i=>i!==n)}}),unsubscribe:()=>{e=[]}}},Ht=e=>ue(e)||!si(e);function Ue(e,r){if(Ht(e)||Ht(r))return e===r;if(st(e)&&st(r))return e.getTime()===r.getTime();const t=Object.keys(e),s=Object.keys(r);if(t.length!==s.length)return!1;for(const n of t){const i=e[n];if(!s.includes(n))return!1;if(n!=="ref"){const a=r[n];if(st(i)&&st(a)||J(i)&&J(a)||Array.isArray(i)&&Array.isArray(a)?!Ue(i,a):i!==a)return!1}}return!0}var mi=e=>e.type==="select-multiple",jl=e=>ws(e)||vt(e),vr=e=>Ut(e)&&e.isConnected,hi=e=>{for(const r in e)if(Oe(e[r]))return!0;return!1};function zt(e,r={}){const t=Array.isArray(e);if(J(e)||t)for(const s in e)Array.isArray(e[s])||J(e[s])&&!hi(e[s])?(r[s]=Array.isArray(e[s])?[]:{},zt(e[s],r[s])):ue(e[s])||(r[s]=!0);return r}function gi(e,r,t){const s=Array.isArray(e);if(J(e)||s)for(const n in e)Array.isArray(e[n])||J(e[n])&&!hi(e[n])?G(r)||Ht(t[n])?t[n]=Array.isArray(e[n])?zt(e[n],[]):{...zt(e[n])}:gi(e[n],ue(r)?{}:r[n],t[n]):t[n]=!Ue(e[n],r[n]);return t}var Tt=(e,r)=>gi(e,r,zt(r)),yi=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>G(e)?e:r?e===""?NaN:e&&+e:t&&Re(e)?new Date(e):s?s(e):e;function br(e){const r=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):r.disabled))return _s(r)?r.files:ws(r)?pi(e.refs).value:mi(r)?[...r.selectedOptions].map(({value:t})=>t):vt(r)?fi(e.refs).value:yi(G(r.value)?e.ref.value:r.value,e)}var Sl=(e,r,t,s)=>{const n={};for(const i of e){const a=E(r,i);a&&K(n,i,a._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:s}},ut=e=>G(e)?e:Bt(e)?e.source:J(e)?Bt(e.value)?e.value.source:e.value:e;const tn="AsyncFunction";var Cl=e=>(!e||!e.validate)&&!!(Oe(e.validate)&&e.validate.constructor.name===tn||J(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===tn)),Al=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function rn(e,r,t){const s=E(e,t);if(s||bs(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const i=n.join("."),a=E(r,i),l=E(e,i);if(a&&!Array.isArray(a)&&t!==i)return{name:t};if(l&&l.type)return{name:i,error:l};n.pop()}return{name:t}}var El=(e,r,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?s.isOnBlur:n.isOnBlur)?!e:(t?s.isOnChange:n.isOnChange)?e:!0,Tl=(e,r)=>!bt(E(e,r)).length&&Z(e,r);const Rl={mode:_e.onSubmit,reValidateMode:_e.onChange,shouldFocusError:!0};function Il(e={}){let r={...Rl,...e},t={submitCount:0,isDirty:!1,isLoading:Oe(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},n=J(r.defaultValues)||J(r.values)?X(r.defaultValues||r.values)||{}:{},i=r.shouldUnregister?{}:X(n),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:xr(),array:xr(),state:xr()},g=ft(r.mode),j=ft(r.reValidateMode),T=r.criteriaMode===_e.all,R=u=>m=>{clearTimeout(d),d=setTimeout(u,m)},V=async u=>{if(f.isValid||u){const m=r.resolver?ce((await S()).errors):await b(s,!0);m!==t.isValid&&p.state.next({isValid:m})}},y=(u,m)=>{(f.isValidating||f.validatingFields)&&((u||Array.from(l.mount)).forEach(x=>{x&&(m?K(t.validatingFields,x,m):Z(t.validatingFields,x))}),p.state.next({validatingFields:t.validatingFields,isValidating:!ce(t.validatingFields)}))},v=(u,m=[],x,D,I=!0,C=!0)=>{if(D&&x){if(a.action=!0,C&&Array.isArray(E(s,u))){const N=x(E(s,u),D.argA,D.argB);I&&K(s,u,N)}if(C&&Array.isArray(E(t.errors,u))){const N=x(E(t.errors,u),D.argA,D.argB);I&&K(t.errors,u,N),Tl(t.errors,u)}if(f.touchedFields&&C&&Array.isArray(E(t.touchedFields,u))){const N=x(E(t.touchedFields,u),D.argA,D.argB);I&&K(t.touchedFields,u,N)}f.dirtyFields&&(t.dirtyFields=Tt(n,i)),p.state.next({name:u,isDirty:M(u,m),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else K(i,u,m)},k=(u,m)=>{K(t.errors,u,m),p.state.next({errors:t.errors})},B=u=>{t.errors=u,p.state.next({errors:t.errors,isValid:!1})},_=(u,m,x,D)=>{const I=E(s,u);if(I){const C=E(i,u,G(x)?E(n,u):x);G(C)||D&&D.defaultChecked||m?K(i,u,m?C:br(I._f)):W(u,C),a.mount&&V()}},h=(u,m,x,D,I)=>{let C=!1,N=!1;const q={name:u},ee=!!(E(s,u)&&E(s,u)._f&&E(s,u)._f.disabled);if(!x||D){f.isDirty&&(N=t.isDirty,t.isDirty=q.isDirty=M(),C=N!==q.isDirty);const te=ee||Ue(E(n,u),m);N=!!(!ee&&E(t.dirtyFields,u)),te||ee?Z(t.dirtyFields,u):K(t.dirtyFields,u,!0),q.dirtyFields=t.dirtyFields,C=C||f.dirtyFields&&N!==!te}if(x){const te=E(t.touchedFields,u);te||(K(t.touchedFields,u,x),q.touchedFields=t.touchedFields,C=C||f.touchedFields&&te!==x)}return C&&I&&p.state.next(q),C?q:{}},w=(u,m,x,D)=>{const I=E(t.errors,u),C=f.isValid&&be(m)&&t.isValid!==m;if(e.delayError&&x?(c=R(()=>k(u,x)),c(e.delayError)):(clearTimeout(d),c=null,x?K(t.errors,u,x):Z(t.errors,u)),(x?!Ue(I,x):I)||!ce(D)||C){const N={...D,...C&&be(m)?{isValid:m}:{},errors:t.errors,name:u};t={...t,...N},p.state.next(N)}},S=async u=>{y(u,!0);const m=await r.resolver(i,r.context,Sl(u||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return y(u),m},A=async u=>{const{errors:m}=await S(u);if(u)for(const x of u){const D=E(m,x);D?K(t.errors,x,D):Z(t.errors,x)}else t.errors=m;return m},b=async(u,m,x={valid:!0})=>{for(const D in u){const I=u[D];if(I){const{_f:C,...N}=I;if(C){const q=l.array.has(C.name),ee=I._f&&Cl(I._f);ee&&f.validatingFields&&y([D],!0);const te=await Rr(I,i,T,r.shouldUseNativeValidation&&!m,q);if(ee&&f.validatingFields&&y([D]),te[C.name]&&(x.valid=!1,m))break;!m&&(E(te,C.name)?q?di(t.errors,te,C.name):K(t.errors,C.name,te[C.name]):Z(t.errors,C.name))}!ce(N)&&await b(N,m,x)}}return x.valid},P=()=>{for(const u of l.unMount){const m=E(s,u);m&&(m._f.refs?m._f.refs.every(x=>!vr(x)):!vr(m._f.ref))&&le(u)}l.unMount=new Set},M=(u,m)=>(u&&m&&K(i,u,m),!Ue(Q(),n)),$=(u,m,x)=>ui(u,l,{...a.mount?i:G(m)?n:Re(u)?{[u]:m}:m},x,m),z=u=>bt(E(a.mount?i:n,u,e.shouldUnregister?E(n,u,[]):[])),W=(u,m,x={})=>{const D=E(s,u);let I=m;if(D){const C=D._f;C&&(!C.disabled&&K(i,u,yi(m,C)),I=Ut(C.ref)&&ue(m)?"":m,mi(C.ref)?[...C.ref.options].forEach(N=>N.selected=I.includes(N.value)):C.refs?vt(C.ref)?C.refs.length>1?C.refs.forEach(N=>(!N.defaultChecked||!N.disabled)&&(N.checked=Array.isArray(I)?!!I.find(q=>q===N.value):I===N.value)):C.refs[0]&&(C.refs[0].checked=!!I):C.refs.forEach(N=>N.checked=N.value===I):_s(C.ref)?C.ref.value="":(C.ref.value=I,C.ref.type||p.values.next({name:u,values:{...i}})))}(x.shouldDirty||x.shouldTouch)&&h(u,I,x.shouldTouch,x.shouldDirty,!0),x.shouldValidate&&F(u)},oe=(u,m,x)=>{for(const D in m){const I=m[D],C=`${u}.${D}`,N=E(s,C);(l.array.has(u)||!Ht(I)||N&&!N._f)&&!st(I)?oe(C,I,x):W(C,I,x)}},de=(u,m,x={})=>{const D=E(s,u),I=l.array.has(u),C=X(m);K(i,u,C),I?(p.array.next({name:u,values:{...i}}),(f.isDirty||f.dirtyFields)&&x.shouldDirty&&p.state.next({name:u,dirtyFields:Tt(n,i),isDirty:M(u,C)})):D&&!D._f&&!ue(C)?oe(u,C,x):W(u,C,x),Tr(u,l)&&p.state.next({...t}),p.values.next({name:a.mount?u:void 0,values:{...i}})},qe=async u=>{a.mount=!0;const m=u.target;let x=m.name,D=!0;const I=E(s,x),C=()=>m.type?br(I._f):ni(u),N=q=>{D=Number.isNaN(q)||Ue(q,E(i,x,q))};if(I){let q,ee;const te=C(),Ke=u.type===Nt.BLUR||u.type===Nt.FOCUS_OUT,ro=!Al(I._f)&&!r.resolver&&!E(t.errors,x)&&!I._f.deps||El(Ke,E(t.touchedFields,x),t.isSubmitted,j,g),ir=Tr(x,l,Ke);K(i,x,te),Ke?(I._f.onBlur&&I._f.onBlur(u),c&&c(0)):I._f.onChange&&I._f.onChange(u);const or=h(x,te,Ke,!1),so=!ce(or)||ir;if(!Ke&&p.values.next({name:x,type:u.type,values:{...i}}),ro)return f.isValid&&(e.mode==="onBlur"?Ke&&V():V()),so&&p.state.next({name:x,...ir?{}:or});if(!Ke&&ir&&p.state.next({...t}),r.resolver){const{errors:Vs}=await S([x]);if(N(te),D){const no=rn(t.errors,s,x),Ms=rn(Vs,s,no.name||x);q=Ms.error,x=Ms.name,ee=ce(Vs)}}else y([x],!0),q=(await Rr(I,i,T,r.shouldUseNativeValidation))[x],y([x]),N(te),D&&(q?ee=!1:f.isValid&&(ee=await b(s,!0)));D&&(I._f.deps&&F(I._f.deps),w(x,ee,q,or))}},Ae=(u,m)=>{if(E(t.errors,m)&&u.focus)return u.focus(),1},F=async(u,m={})=>{let x,D;const I=me(u);if(r.resolver){const C=await A(G(u)?u:I);x=ce(C),D=u?!I.some(N=>E(C,N)):x}else u?(D=(await Promise.all(I.map(async C=>{const N=E(s,C);return await b(N&&N._f?{[C]:N}:N)}))).every(Boolean),!(!D&&!t.isValid)&&V()):D=x=await b(s);return p.state.next({...!Re(u)||f.isValid&&x!==t.isValid?{}:{name:u},...r.resolver||!u?{isValid:x}:{},errors:t.errors}),m.shouldFocus&&!D&&nt(s,Ae,u?I:l.mount),D},Q=u=>{const m={...a.mount?i:n};return G(u)?m:Re(u)?E(m,u):u.map(x=>E(m,x))},ae=(u,m)=>({invalid:!!E((m||t).errors,u),isDirty:!!E((m||t).dirtyFields,u),error:E((m||t).errors,u),isValidating:!!E(t.validatingFields,u),isTouched:!!E((m||t).touchedFields,u)}),ge=u=>{u&&me(u).forEach(m=>Z(t.errors,m)),p.state.next({errors:u?t.errors:{}})},ve=(u,m,x)=>{const D=(E(s,u,{_f:{}})._f||{}).ref,I=E(t.errors,u)||{},{ref:C,message:N,type:q,...ee}=I;K(t.errors,u,{...ee,...m,ref:D}),p.state.next({name:u,errors:t.errors,isValid:!1}),x&&x.shouldFocus&&D&&D.focus&&D.focus()},De=(u,m)=>Oe(u)?p.values.subscribe({next:x=>u($(void 0,m),x)}):$(u,m,!0),le=(u,m={})=>{for(const x of u?me(u):l.mount)l.mount.delete(x),l.array.delete(x),m.keepValue||(Z(s,x),Z(i,x)),!m.keepError&&Z(t.errors,x),!m.keepDirty&&Z(t.dirtyFields,x),!m.keepTouched&&Z(t.touchedFields,x),!m.keepIsValidating&&Z(t.validatingFields,x),!r.shouldUnregister&&!m.keepDefaultValue&&Z(n,x);p.values.next({values:{...i}}),p.state.next({...t,...m.keepDirty?{isDirty:M()}:{}}),!m.keepIsValid&&V()},Ct=({disabled:u,name:m,field:x,fields:D,value:I})=>{if(be(u)&&a.mount||u){const C=u?void 0:G(I)?br(x?x._f:E(D,m)._f):I;K(i,m,C),h(m,C,!1,!1,!0)}},Me=(u,m={})=>{let x=E(s,u);const D=be(m.disabled)||be(e.disabled);return K(s,u,{...x||{},_f:{...x&&x._f?x._f:{ref:{name:u}},name:u,mount:!0,...m}}),l.mount.add(u),x?Ct({field:x,disabled:be(m.disabled)?m.disabled:e.disabled,name:u,value:m.value}):_(u,!0,m.value),{...D?{disabled:m.disabled||e.disabled}:{},...r.progressive?{required:!!m.required,min:ut(m.min),max:ut(m.max),minLength:ut(m.minLength),maxLength:ut(m.maxLength),pattern:ut(m.pattern)}:{},name:u,onChange:qe,onBlur:qe,ref:I=>{if(I){Me(u,m),x=E(s,u);const C=G(I.value)&&I.querySelectorAll&&I.querySelectorAll("input,select,textarea")[0]||I,N=jl(C),q=x._f.refs||[];if(N?q.find(ee=>ee===C):C===x._f.ref)return;K(s,u,{_f:{...x._f,...N?{refs:[...q.filter(vr),C,...Array.isArray(E(n,u))?[{}]:[]],ref:{type:C.type,name:u}}:{ref:C}}}),_(u,!1,void 0,C)}else x=E(s,u,{}),x._f&&(x._f.mount=!1),(r.shouldUnregister||m.shouldUnregister)&&!(ii(l.array,u)&&a.action)&&l.unMount.add(u)}}},We=()=>r.shouldFocusError&&nt(s,Ae,l.mount),Xe=u=>{be(u)&&(p.state.next({disabled:u}),nt(s,(m,x)=>{const D=E(s,x);D&&(m.disabled=D._f.disabled||u,Array.isArray(D._f.refs)&&D._f.refs.forEach(I=>{I.disabled=D._f.disabled||u}))},0,!1))},Ee=(u,m)=>async x=>{let D;x&&(x.preventDefault&&x.preventDefault(),x.persist&&x.persist());let I=X(i);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:C,values:N}=await S();t.errors=C,I=N}else await b(s);if(Z(t.errors,"root"),ce(t.errors)){p.state.next({errors:{}});try{await u(I,x)}catch(C){D=C}}else m&&await m({...t.errors},x),We(),setTimeout(We);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ce(t.errors)&&!D,submitCount:t.submitCount+1,errors:t.errors}),D)throw D},$e=(u,m={})=>{E(s,u)&&(G(m.defaultValue)?de(u,X(E(n,u))):(de(u,m.defaultValue),K(n,u,X(m.defaultValue))),m.keepTouched||Z(t.touchedFields,u),m.keepDirty||(Z(t.dirtyFields,u),t.isDirty=m.defaultValue?M(u,X(E(n,u))):M()),m.keepError||(Z(t.errors,u),f.isValid&&V()),p.state.next({...t}))},ye=(u,m={})=>{const x=u?X(u):n,D=X(x),I=ce(u),C=I?n:D;if(m.keepDefaultValues||(n=x),!m.keepValues){if(m.keepDirtyValues)for(const N of l.mount)E(t.dirtyFields,N)?K(C,N,E(i,N)):de(N,E(C,N));else{if(vs&&G(u))for(const N of l.mount){const q=E(s,N);if(q&&q._f){const ee=Array.isArray(q._f.refs)?q._f.refs[0]:q._f.ref;if(Ut(ee)){const te=ee.closest("form");if(te){te.reset();break}}}}s={}}i=e.shouldUnregister?m.keepDefaultValues?X(n):{}:X(C),p.array.next({values:{...C}}),p.values.next({values:{...C}})}l={mount:m.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!f.isValid||!!m.keepIsValid||!!m.keepDirtyValues,a.watch=!!e.shouldUnregister,p.state.next({submitCount:m.keepSubmitCount?t.submitCount:0,isDirty:I?!1:m.keepDirty?t.isDirty:!!(m.keepDefaultValues&&!Ue(u,n)),isSubmitted:m.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:I?{}:m.keepDirtyValues?m.keepDefaultValues&&i?Tt(n,i):t.dirtyFields:m.keepDefaultValues&&u?Tt(n,u):m.keepDirty?t.dirtyFields:{},touchedFields:m.keepTouched?t.touchedFields:{},errors:m.keepErrors?t.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},ct=(u,m)=>ye(Oe(u)?u(i):u,m);return{control:{register:Me,unregister:le,getFieldState:ae,handleSubmit:Ee,setError:ve,_executeSchema:S,_getWatch:$,_getDirty:M,_updateValid:V,_removeUnmounted:P,_updateFieldArray:v,_updateDisabledField:Ct,_getFieldArray:z,_reset:ye,_resetDefaultValues:()=>Oe(r.defaultValues)&&r.defaultValues().then(u=>{ct(u,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:u=>{t={...t,...u}},_disableForm:Xe,_subjects:p,_proxyFormState:f,_setErrors:B,get _fields(){return s},get _formValues(){return i},get _state(){return a},set _state(u){a=u},get _defaultValues(){return n},get _names(){return l},set _names(u){l=u},get _formState(){return t},set _formState(u){t=u},get _options(){return r},set _options(u){r={...r,...u}}},trigger:F,register:Me,handleSubmit:Ee,watch:De,setValue:de,getValues:Q,reset:ct,resetField:$e,clearErrors:ge,unregister:le,setError:ve,setFocus:(u,m={})=>{const x=E(s,u),D=x&&x._f;if(D){const I=D.refs?D.refs[0]:D.ref;I.focus&&(I.focus(),m.shouldSelect&&I.select())}},getFieldState:ae}}function xi(e={}){const r=H.useRef(),t=H.useRef(),[s,n]=H.useState({isDirty:!1,isValidating:!1,isLoading:Oe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Oe(e.defaultValues)?void 0:e.defaultValues});r.current||(r.current={...Il(e),formState:s});const i=r.current.control;return i._options=e,er({subject:i._subjects.state,next:a=>{li(a,i._proxyFormState,i._updateFormState,!0)&&n({...i._formState})}}),H.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),H.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==s.isDirty&&i._subjects.state.next({isDirty:a})}},[i,s.isDirty]),H.useEffect(()=>{e.values&&!Ue(e.values,t.current)?(i._reset(e.values,i._options.resetOptions),t.current=e.values,n(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),H.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),H.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),H.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),r.current.formState=ai(s,i),r.current}var Ir={exports:{}};(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=V;var t=l(gn),s=l(oo),n=l(ao),i=l(lo),a=l(co);function l(y){return y&&y.__esModule?y:{default:y}}function c(y,v){return j(y)||g(y,v)||f(y,v)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
143
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(y,v){if(y){if(typeof y=="string")return p(y,v);var k={}.toString.call(y).slice(8,-1);return k==="Object"&&y.constructor&&(k=y.constructor.name),k==="Map"||k==="Set"?Array.from(y):k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k)?p(y,v):void 0}}function p(y,v){(v==null||v>y.length)&&(v=y.length);for(var k=0,B=Array(v);k<v;k++)B[k]=y[k];return B}function g(y,v){var k=y==null?null:typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(k!=null){var B,_,h,w,S=[],A=!0,b=!1;try{if(h=(k=k.call(y)).next,v!==0)for(;!(A=(B=h.call(k)).done)&&(S.push(B.value),S.length!==v);A=!0);}catch(P){b=!0,_=P}finally{try{if(!A&&k.return!=null&&(w=k.return(),Object(w)!==w))return}finally{if(b)throw _}}return S}}function j(y){if(Array.isArray(y))return y}var T={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},R=/^\[([^\]]+)\](?::([0-9]+))?$/;function V(y,v){if((0,t.default)(y),!y||/[\s<>]/.test(y)||y.indexOf("mailto:")===0||(v=(0,a.default)(v,T),v.validate_length&&y.length>v.max_allowed_length)||!v.allow_fragments&&y.includes("#")||!v.allow_query_components&&(y.includes("?")||y.includes("&")))return!1;var k,B,_,h,w,S,A,b;if(A=y.split("#"),y=A.shift(),A=y.split("?"),y=A.shift(),A=y.split("://"),A.length>1){if(k=A.shift().toLowerCase(),v.require_valid_protocol&&v.protocols.indexOf(k)===-1)return!1}else{if(v.require_protocol)return!1;if(y.slice(0,2)==="//"){if(!v.allow_protocol_relative_urls)return!1;A[0]=y.slice(2)}}if(y=A.join("://"),y==="")return!1;if(A=y.split("/"),y=A.shift(),y===""&&!v.require_host)return!0;if(A=y.split("@"),A.length>1){if(v.disallow_auth||A[0]===""||(B=A.shift(),B.indexOf(":")>=0&&B.split(":").length>2))return!1;var P=B.split(":"),M=c(P,2),$=M[0],z=M[1];if($===""&&z==="")return!1}h=A.join("@"),S=null,b=null;var W=h.match(R);if(W?(_="",b=W[1],S=W[2]||null):(A=h.split(":"),_=A.shift(),A.length&&(S=A.join(":"))),S!==null&&S.length>0){if(w=parseInt(S,10),!/^[0-9]+$/.test(S)||w<=0||w>65535)return!1}else if(v.require_port)return!1;return v.host_whitelist?(0,s.default)(_,v.host_whitelist):_===""&&!v.require_host?!0:!(!(0,i.default)(_)&&!(0,n.default)(_,v)&&(!b||!(0,i.default)(b,6))||(_=_||b,v.host_blacklist&&(0,s.default)(_,v.host_blacklist)))}e.exports=r.default,e.exports.default=r.default})(Ir,Ir.exports);var kl=Ir.exports;const vi=Cn(kl);var kr={exports:{}},Dr={exports:{}},Lr={exports:{}};(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=t;function t(s){return s==null}e.exports=r.default,e.exports.default=r.default})(Lr,Lr.exports);var Dl=Lr.exports;(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=l;var t=n(gn),s=n(Dl);function n(c){return c&&c.__esModule?c:{default:c}}var i=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;function l(c,d){(0,t.default)(c),d=d||{};var f=d.allow_leading_zeroes===!1?i:a,p=!d.hasOwnProperty("min")||(0,s.default)(d.min)||c>=d.min,g=!d.hasOwnProperty("max")||(0,s.default)(d.max)||c<=d.max,j=!d.hasOwnProperty("lt")||(0,s.default)(d.lt)||c<d.lt,T=!d.hasOwnProperty("gt")||(0,s.default)(d.gt)||c>d.gt;return f.test(c)&&p&&g&&j&&T}e.exports=r.default,e.exports.default=r.default})(Dr,Dr.exports);var Ll=Dr.exports;(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var t=s(Ll);function s(i){return i&&i.__esModule?i:{default:i}}function n(i){return(0,t.default)(i,{allow_leading_zeroes:!1,min:0,max:65535})}e.exports=r.default,e.exports.default=r.default})(kr,kr.exports);var Pl=kr.exports;const Fl=Cn(Pl),_r={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};function Ol(){var w,S,A;const{api:e}=ot(),{blocklet:r}=Zr(),{t}=he(),{confirmApi:s,confirmHolder:n}=En(),i=(w=r==null?void 0:r.meta)==null?void 0:w.did,a=Object.assign({..._r},((A=(S=r==null?void 0:r.settings)==null?void 0:S.notification)==null?void 0:A.email)||{}),{handleSubmit:l,control:c,formState:d,watch:f,reset:p}=xi({defaultValues:Dn(a,Object.keys(_r))}),g=Mn({testReceiver:"",testReceiverError:""}),j=f("enabled"),T=fe(async(b,P,M=!0)=>{var $,z;try{const{blocklet:W}=await e.configNotification({input:{did:i,notification:JSON.stringify({email:b})}}),oe=Object.assign({..._r},((z=($=W==null?void 0:W.settings)==null?void 0:$.notification)==null?void 0:z.email)||{});p(oe),M&&ne.success(t("oauth.saveSuccess"))}catch(W){if(M)ne.error(W.message||t("oauth.saveFailed"));else throw W}}),R=fe(async(b,P,M)=>{try{d.isDirty&&await T(b,P,!1),await e.sendEmail({input:{did:i,receiver:M,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),ne.success(t("notification.email.testSuccess"))}catch($){ne.error($.message||t("notification.email.testfailed"))}}),V=fe((b,P)=>{g.testReceiver="",g.testReceiverError="",s.open({title:t("notification.email.testSendEmail"),content:()=>o.jsx(U,{sx:{width:"300px"},children:o.jsx(Te,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:g.testReceiver,onChange:M=>{g.testReceiver=M.target.value},error:!!g.testReceiverError,helperText:g.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(M){var z;const $=(z=g.testReceiver)==null?void 0:z.trim();if(!$){g.testReceiverError=t("notification.email.receiverRequired");return}if(!$s($)){g.testReceiverError=t("notification.email.receiverInvalid");return}g.testReceiverError="",await R(b,P,$),M()}})}),y=fe(b=>{const P=b==null?void 0:b.trim();return P?$s(P)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),v=fe(b=>{const P=b==null?void 0:b.trim();return P?vi(P,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),k=fe(b=>b?Fl(b)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),B=fe(b=>b!=null&&b.trim()?!0:t("notification.email.userRequired")),_=fe(b=>b!=null&&b.trim()?!0:t("notification.email.passwordRequired")),h=fe(()=>!0);return o.jsxs(U,{children:[o.jsxs("form",{onSubmit:l(T),disabled:!0,children:[o.jsx(Ce,{name:"enabled",control:c,render:({field:b})=>o.jsx(gt,{control:o.jsx(Er,{checked:b.value,...b}),label:t("notification.email.enable"),sx:{marginBottom:"8px"}})}),o.jsx(Ce,{name:"from",control:c,rules:{validate:j?y:h},render:({field:b})=>{var P;return o.jsx(Pe,{fullWidth:!0,children:o.jsx(Te,{...b,required:!0,label:t("notification.email.from"),error:!!d.errors[b.name],helperText:((P=d.errors[b.name])==null?void 0:P.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"host",control:c,rules:{validate:j?v:h},render:({field:b})=>{var P;return o.jsx(Pe,{fullWidth:!0,children:o.jsx(Te,{...b,required:!0,error:!!d.errors[b.name],label:t("notification.email.host"),helperText:((P=d.errors[b.name])==null?void 0:P.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"port",control:c,rules:{validate:j?k:h},render:({field:b})=>{var P;return o.jsx(Pe,{fullWidth:!0,children:o.jsx(Te,{...b,required:!0,type:"number",error:!!d.errors[b.name],label:t("notification.email.port"),helperText:((P=d.errors[b.name])==null?void 0:P.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"user",control:c,rules:{validate:j?B:h},render:({field:b})=>{var P;return o.jsx(Pe,{fullWidth:!0,children:o.jsx(Te,{...b,required:!0,error:!!d.errors[b.name],label:t("notification.email.user"),helperText:((P=d.errors[b.name])==null?void 0:P.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"password",control:c,rules:{validate:j?_:h},render:({field:b})=>{var P;return o.jsx(Pe,{fullWidth:!0,children:o.jsx(Te,{...b,required:!0,type:"password",error:!!d.errors[b.name],label:t("notification.email.password"),helperText:((P=d.errors[b.name])==null?void 0:P.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"secure",control:c,rules:{validate:h},render:({field:b})=>o.jsx(Pe,{fullWidth:!0,children:o.jsx(gt,{control:o.jsx(Er,{checked:b.value,...b,disabled:!j}),label:t("notification.email.secure"),style:{marginBottom:16,marginLeft:1}})})}),o.jsx(Ze,{variant:"outlined",color:"warning",onClick:l(V),sx:{mr:2},disabled:!j,children:t("oauth.runTest")}),o.jsx(Ze,{type:"submit",variant:"contained",disabled:!d.isDirty,children:t("oauth.save")})]}),n]})}const wr={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function Vl(){var k,B,_;const{api:e}=ot(),{blocklet:r}=Zr(),{t}=he(),{confirmApi:s,confirmHolder:n}=En(),i=(k=r==null?void 0:r.meta)==null?void 0:k.did,a=Object.assign({...wr},((_=(B=r==null?void 0:r.settings)==null?void 0:B.notification)==null?void 0:_.pushKit)||{}),{handleSubmit:l,control:c,formState:d,watch:f,reset:p}=xi({defaultValues:Dn(a,Object.keys(wr))}),g=Mn({testReceiver:"",testReceiverError:""}),j=f("enabled"),T=fe(async(h,w,S=!0)=>{var A,b;try{const{blocklet:P}=await e.configNotification({input:{did:i,notification:JSON.stringify({pushKit:h})}}),M=Object.assign({...wr},((b=(A=P==null?void 0:P.settings)==null?void 0:A.notification)==null?void 0:b.pushKit)||{});p(M),S&&ne.success(t("oauth.saveSuccess"))}catch(P){if(S)ne.error(P.message||t("oauth.saveFailed"));else throw P}}),R=fe(async(h,w)=>{var S,A,b;try{d.isDirty&&await T(h,w,!1);const P=(S=((r==null?void 0:r.configs)||[]).find(z=>z.key==="BLOCKLET_APP_URL"))==null?void 0:S.value,M=Ln(Yt(P,"/.well-known/service/blocklet/logo"),{v:(A=r==null?void 0:r.meta)==null?void 0:A.version,t:new Date((r==null?void 0:r.updatedAt)||0).getTime()}),$={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:r==null?void 0:r.appDid,fullName:(b=r==null?void 0:r.meta)==null?void 0:b.title,avatar:M}}}};await e.sendPush({input:{did:i,receiver:g.testReceiver,notification:JSON.stringify($)}}),ne.success(t("notification.pushKit.testSuccess"))}catch(P){ne.error(P.message||t("notification.pushKit.testfailed"))}}),V=fe((h,w)=>{g.testReceiverError="",s.open({title:t("notification.pushKit.testSend"),content:()=>o.jsx(U,{sx:{width:"450px",maxWidth:"100%"},children:o.jsx(Te,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:g.testReceiver,onChange:S=>{g.testReceiver=S.target.value},error:!!g.testReceiverError,helperText:g.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(S){var b;if(!((b=g.testReceiver)==null?void 0:b.trim())){g.testReceiverError=t("notification.pushKit.receiverRequired");return}g.testReceiverError="",await R(h,w),S()}})}),y=fe(h=>{const w=h==null?void 0:h.trim();return w?vi(w)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),v=fe(()=>!0);return o.jsxs(U,{children:[o.jsxs("form",{onSubmit:l(T),disabled:!0,children:[o.jsx(Ce,{name:"enabled",control:c,render:({field:h})=>o.jsx(gt,{control:o.jsx(Er,{checked:h.value,...h}),label:t("notification.pushKit.enable"),sx:{marginBottom:"8px"}})}),o.jsx(Ce,{name:"endpoint",control:c,rules:{validate:j?y:v},render:({field:h})=>{var w;return o.jsx(Pe,{fullWidth:!0,children:o.jsx(Te,{...h,required:!0,label:t("notification.pushKit.endpoint"),error:!!d.errors[h.name],helperText:((w=d.errors[h.name])==null?void 0:w.message)||" ",disabled:!j})})}}),o.jsxs(U,{component:"details",sx:{pl:"1em"},children:[o.jsx(U,{component:"summary",sx:{mb:1,ml:"-1em"},children:t("notification.pushKit.customOptions")}),o.jsx(Ce,{name:"did",control:c,render:({field:h})=>{var w;return o.jsx(Pe,{fullWidth:!0,children:o.jsx(Te,{...h,label:t("notification.pushKit.did"),error:!!d.errors[h.name],helperText:((w=d.errors[h.name])==null?void 0:w.message)||" ",disabled:!j})})}}),o.jsx(Ce,{name:"pushPath",control:c,render:({field:h})=>{var w;return o.jsx(Pe,{fullWidth:!0,children:o.jsx(Te,{...h,label:t("notification.pushKit.pushPath"),error:!!d.errors[h.name],helperText:((w=d.errors[h.name])==null?void 0:w.message)||" ",disabled:!j})})}})]}),o.jsx(Ze,{variant:"outlined",color:"warning",onClick:l(V),sx:{mr:2},disabled:!j,children:t("oauth.runTest")}),o.jsx(Ze,{type:"submit",variant:"contained",disabled:!d.isDirty,children:t("oauth.save")})]}),n]})}const sn=[{label:o.jsx(U,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:o.jsx(U,{textAlign:"center",width:"100%",children:"Push Kit"}),value:"pushKit"}];function Ml(){const[e,r]=L.useState(sn[0].value),{locale:t}=L.useContext(Jt),s=Je(()=>({email:o.jsx(Ol,{}),pushKit:o.jsx(Vl,{})}),[t]),n=L.useMemo(()=>({padding:"10px 0"}),[]);return o.jsxs(U,{children:[o.jsx(Tn,{tabs:sn,current:e,onChange:r}),o.jsx(U,{style:n,children:s[e]})]})}function se(e,r,t){return vn.call(r,"css")?o.jsx(bn,_n(e,r),t):o.jsx(e,r,t)}function jr(e,r,t){return vn.call(r,"css")?o.jsxs(bn,_n(e,r),t):o.jsxs(e,r,t)}/**
|
|
144
|
-
* (c) Iconify
|
|
145
|
-
*
|
|
146
|
-
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
147
|
-
* files at https://github.com/iconify/iconify
|
|
148
|
-
*
|
|
149
|
-
* Licensed under MIT.
|
|
150
|
-
*
|
|
151
|
-
* @license MIT
|
|
152
|
-
* @version 3.1.1
|
|
153
|
-
*/const bi=Object.freeze({left:0,top:0,width:16,height:16}),qt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),_t=Object.freeze({...bi,...qt}),Pr=Object.freeze({..._t,body:"",hidden:!1});function $l(e,r){const t={};!e.hFlip!=!r.hFlip&&(t.hFlip=!0),!e.vFlip!=!r.vFlip&&(t.vFlip=!0);const s=((e.rotate||0)+(r.rotate||0))%4;return s&&(t.rotate=s),t}function nn(e,r){const t=$l(e,r);for(const s in Pr)s in qt?s in e&&!(s in t)&&(t[s]=qt[s]):s in r?t[s]=r[s]:s in e&&(t[s]=e[s]);return t}function Nl(e,r){const t=e.icons,s=e.aliases||Object.create(null),n=Object.create(null);function i(a){if(t[a])return n[a]=[];if(!(a in n)){n[a]=null;const l=s[a]&&s[a].parent,c=l&&i(l);c&&(n[a]=[l].concat(c))}return n[a]}return Object.keys(t).concat(Object.keys(s)).forEach(i),n}function Ul(e,r,t){const s=e.icons,n=e.aliases||Object.create(null);let i={};function a(l){i=nn(s[l]||n[l],i)}return a(r),t.forEach(a),nn(e,i)}function Bl(e,r){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(n=>{r(n,null),t.push(n)});const s=Nl(e);for(const n in s){const i=s[n];i&&(r(n,Ul(e,n,i)),t.push(n))}return t}const pt=/^[a-z0-9]+(-[a-z0-9]+)*$/,lt=(e,r,t,s="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;s=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const l=n.pop(),c=n.pop(),d={provider:n.length>0?n[0]:s,prefix:c,name:l};return r&&!Pt(d)?null:d}const i=n[0],a=i.split("-");if(a.length>1){const l={provider:s,prefix:a.shift(),name:a.join("-")};return r&&!Pt(l)?null:l}if(t&&s===""){const l={provider:s,prefix:"",name:i};return r&&!Pt(l,t)?null:l}return null},Pt=(e,r)=>e?!!((e.provider===""||e.provider.match(pt))&&(r&&e.prefix===""||e.prefix.match(pt))&&e.name.match(pt)):!1,Hl={provider:"",aliases:{},not_found:{},...bi};function Sr(e,r){for(const t in r)if(t in e&&typeof e[t]!=typeof r[t])return!1;return!0}function zl(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Sr(e,Hl))return null;const t=r.icons;for(const n in t){const i=t[n];if(!n.match(pt)||typeof i.body!="string"||!Sr(i,Pr))return null}const s=r.aliases||Object.create(null);for(const n in s){const i=s[n],a=i.parent;if(!n.match(pt)||typeof a!="string"||!t[a]&&!s[a]||!Sr(i,Pr))return null}return r}const Wt=Object.create(null);function ql(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function ke(e,r){const t=Wt[e]||(Wt[e]=Object.create(null));return t[r]||(t[r]=ql(e,r))}function js(e,r){return zl(r)?Bl(r,(t,s)=>{s?e.icons[t]=s:e.missing.add(t)}):[]}function Wl(e,r,t){try{if(typeof t.body=="string")return e.icons[r]={...t},!0}catch{}return!1}function Kl(e,r){let t=[];return(typeof e=="string"?[e]:Object.keys(Wt)).forEach(n=>{(typeof n=="string"&&typeof r=="string"?[r]:Object.keys(Wt[n]||{})).forEach(a=>{const l=ke(n,a);t=t.concat(Object.keys(l.icons).map(c=>(n!==""?"@"+n+":":"")+a+":"+c))})}),t}let Ss=!1;function Gl(e){return Ss}function wt(e){const r=typeof e=="string"?lt(e,!0,Ss):e;if(r){const t=ke(r.provider,r.prefix),s=r.name;return t.icons[s]||(t.missing.has(s)?null:void 0)}}function Ql(e,r){const t=lt(e,!0,Ss);if(!t)return!1;const s=ke(t.provider,t.prefix);return Wl(s,t.name,r)}function _i(e,r){if(typeof e!="object")return!1;typeof r!="string"&&(r=e.provider||"");const t=e.prefix;if(!Pt({provider:r,prefix:t,name:"a"}))return!1;const s=ke(r,t);return!!js(s,e)}function Zl(e){return!!wt(e)}function Jl(e){const r=wt(e);return r?{..._t,...r}:null}const wi=Object.freeze({width:null,height:null}),ji=Object.freeze({...wi,...qt}),Yl=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Xl=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Fr(e,r,t){if(r===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*r*t)/t;if(typeof e!="string")return e;const s=e.split(Yl);if(s===null||!s.length)return e;const n=[];let i=s.shift(),a=Xl.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?n.push(i):n.push(Math.ceil(l*r*t)/t)}else n.push(i);if(i=s.shift(),i===void 0)return n.join("");a=!a}}const ec=e=>e==="unset"||e==="undefined"||e==="none";function tr(e,r){const t={..._t,...e},s={...ji,...r},n={left:t.left,top:t.top,width:t.width,height:t.height};let i=t.body;[t,s].forEach(T=>{const R=[],V=T.hFlip,y=T.vFlip;let v=T.rotate;V?y?v+=2:(R.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),R.push("scale(-1 1)"),n.top=n.left=0):y&&(R.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),R.push("scale(1 -1)"),n.top=n.left=0);let k;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:k=n.height/2+n.top,R.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:R.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:k=n.width/2+n.left,R.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}v%2===1&&(n.left!==n.top&&(k=n.left,n.left=n.top,n.top=k),n.width!==n.height&&(k=n.width,n.width=n.height,n.height=k)),R.length&&(i='<g transform="'+R.join(" ")+'">'+i+"</g>")});const a=s.width,l=s.height,c=n.width,d=n.height;let f,p;a===null?(p=l===null?"1em":l==="auto"?d:l,f=Fr(p,c/d)):(f=a==="auto"?c:a,p=l===null?Fr(f,d/c):l==="auto"?d:l);const g={},j=(T,R)=>{ec(R)||(g[T]=R.toString())};return j("width",f),j("height",p),g.viewBox=n.left.toString()+" "+n.top.toString()+" "+c.toString()+" "+d.toString(),{attributes:g,body:i}}const tc=/\sid="(\S+)"/g,rc="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let sc=0;function Si(e,r=rc){const t=[];let s;for(;s=tc.exec(e);)t.push(s[1]);if(!t.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(i=>{const a=typeof r=="function"?r(i):r+(sc++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const Qe={local:!0,session:!0},Ci={local:new Set,session:new Set};let Cs=!1;function nc(e){Cs=e}const on="iconify2",xt="iconify",Ai=xt+"-count",an=xt+"-version",Ei=36e5,ic=168;function Or(e,r){try{return e.getItem(r)}catch{}}function As(e,r,t){try{return e.setItem(r,t),!0}catch{}}function ln(e,r){try{e.removeItem(r)}catch{}}function Vr(e,r){return As(e,Ai,r.toString())}function Mr(e){return parseInt(Or(e,Ai))||0}let Rt=typeof window>"u"?{}:window;function Ti(e){const r=e+"Storage";try{if(Rt&&Rt[r]&&typeof Rt[r].length=="number")return Rt[r]}catch{}Qe[e]=!1}function Ri(e,r){const t=Ti(e);if(!t)return;const s=Or(t,an);if(s!==on){if(s){const l=Mr(t);for(let c=0;c<l;c++)ln(t,xt+c.toString())}As(t,an,on),Vr(t,0);return}const n=Math.floor(Date.now()/Ei)-ic,i=l=>{const c=xt+l.toString(),d=Or(t,c);if(typeof d=="string"){try{const f=JSON.parse(d);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>n&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&r(f,l))return!0}catch{}ln(t,c)}};let a=Mr(t);for(let l=a-1;l>=0;l--)i(l)||(l===a-1?(a--,Vr(t,a)):Ci[e].add(l))}function Ii(){if(!Cs){nc(!0);for(const e in Qe)Ri(e,r=>{const t=r.data,s=r.provider,n=t.prefix,i=ke(s,n);if(!js(i,t).length)return!1;const a=t.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function ki(e,r){switch(e){case"local":case"session":Qe[e]=r;break;case"all":for(const t in Qe)Qe[t]=r;break}}const $r=Object.create(null);function Di(e,r){$r[e]=r}function Nr(e){return $r[e]||$r[""]}function Es(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const rr=Object.create(null),dt=["https://api.simplesvg.com","https://api.unisvg.com"],Ft=[];for(;dt.length>0;)dt.length===1||Math.random()>.5?Ft.push(dt.shift()):Ft.push(dt.pop());rr[""]=Es({resources:["https://api.iconify.design"].concat(Ft)});function Li(e,r){const t=Es(r);return t===null?!1:(rr[e]=t,!0)}function sr(e){return rr[e]}function oc(){return Object.keys(rr)}const ac=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Kt=ac();function lc(e){Kt=e}function cc(){return Kt}function uc(e,r){const t=sr(e);if(!t)return 0;let s;if(!t.maxURL)s=0;else{let n=0;t.resources.forEach(a=>{n=Math.max(n,a.length)});const i=r+".json?icons=";s=t.maxURL-n-t.path.length-i.length}return s}function dc(e){return e===404}const fc=(e,r,t)=>{const s=[],n=uc(e,r),i="icons";let a={type:i,provider:e,prefix:r,icons:[]},l=0;return t.forEach((c,d)=>{l+=c.length+1,l>=n&&d>0&&(s.push(a),a={type:i,provider:e,prefix:r,icons:[]},l=c.length),a.icons.push(c)}),s.push(a),s};function pc(e){if(typeof e=="string"){const r=sr(e);if(r)return r.path}return"/"}const mc=(e,r,t)=>{if(!Kt){t("abort",424);return}let s=pc(r.provider);switch(r.type){case"icons":{const i=r.prefix,l=r.icons.join(","),c=new URLSearchParams({icons:l});s+=i+".json?"+c.toString();break}case"custom":{const i=r.uri;s+=i.slice(0,1)==="/"?i.slice(1):i;break}default:t("abort",400);return}let n=503;Kt(e+s).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{t(dc(a)?"abort":"next",a)});return}return n=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?t("abort",i):t("next",n)});return}setTimeout(()=>{t("success",i)})}).catch(()=>{t("next",n)})},hc={prepare:fc,send:mc};function gc(e){const r={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((n,i)=>n.provider!==i.provider?n.provider.localeCompare(i.provider):n.prefix!==i.prefix?n.prefix.localeCompare(i.prefix):n.name.localeCompare(i.name));let s={provider:"",prefix:"",name:""};return e.forEach(n=>{if(s.name===n.name&&s.prefix===n.prefix&&s.provider===n.provider)return;s=n;const i=n.provider,a=n.prefix,l=n.name,c=t[i]||(t[i]=Object.create(null)),d=c[a]||(c[a]=ke(i,a));let f;l in d.icons?f=r.loaded:a===""||d.missing.has(l)?f=r.missing:f=r.pending;const p={provider:i,prefix:a,name:l};f.push(p)}),r}function Pi(e,r){e.forEach(t=>{const s=t.loaderCallbacks;s&&(t.loaderCallbacks=s.filter(n=>n.id!==r))})}function yc(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let t=!1;const s=e.provider,n=e.prefix;r.forEach(i=>{const a=i.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==n)return!0;const d=c.name;if(e.icons[d])a.loaded.push({provider:s,prefix:n,name:d});else if(e.missing.has(d))a.missing.push({provider:s,prefix:n,name:d});else return t=!0,!0;return!1}),a.pending.length!==l&&(t||Pi([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let xc=0;function vc(e,r,t){const s=xc++,n=Pi.bind(null,t,s);if(!r.pending.length)return n;const i={id:s,icons:r,callback:e,abort:n};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),n}function bc(e,r=!0,t=!1){const s=[];return e.forEach(n=>{const i=typeof n=="string"?lt(n,r,t):n;i&&s.push(i)}),s}var _c={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function wc(e,r,t,s){const n=e.resources.length,i=e.random?Math.floor(Math.random()*n):e.index;let a;if(e.random){let h=e.resources.slice(0);for(a=[];h.length>1;){const w=Math.floor(Math.random()*h.length);a.push(h[w]),h=h.slice(0,w).concat(h.slice(w+1))}a=a.concat(h)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",d=0,f,p=null,g=[],j=[];typeof s=="function"&&j.push(s);function T(){p&&(clearTimeout(p),p=null)}function R(){c==="pending"&&(c="aborted"),T(),g.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),g=[]}function V(h,w){w&&(j=[]),typeof h=="function"&&j.push(h)}function y(){return{startTime:l,payload:r,status:c,queriesSent:d,queriesPending:g.length,subscribe:V,abort:R}}function v(){c="failed",j.forEach(h=>{h(void 0,f)})}function k(){g.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),g=[]}function B(h,w,S){const A=w!=="success";switch(g=g.filter(b=>b!==h),c){case"pending":break;case"failed":if(A||!e.dataAfterTimeout)return;break;default:return}if(w==="abort"){f=S,v();return}if(A){f=S,g.length||(a.length?_():v());return}if(T(),k(),!e.random){const b=e.resources.indexOf(h.resource);b!==-1&&b!==e.index&&(e.index=b)}c="completed",j.forEach(b=>{b(S)})}function _(){if(c!=="pending")return;T();const h=a.shift();if(h===void 0){if(g.length){p=setTimeout(()=>{T(),c==="pending"&&(k(),v())},e.timeout);return}v();return}const w={status:"pending",resource:h,callback:(S,A)=>{B(w,S,A)}};g.push(w),d++,p=setTimeout(_,e.rotate),t(h,r,w.callback)}return setTimeout(_),y}function Fi(e){const r={..._c,...e};let t=[];function s(){t=t.filter(l=>l().status==="pending")}function n(l,c,d){const f=wc(r,l,c,(p,g)=>{s(),d&&d(p,g)});return t.push(f),f}function i(l){return t.find(c=>l(c))||null}return{query:n,find:i,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:s}}function cn(){}const Cr=Object.create(null);function jc(e){if(!Cr[e]){const r=sr(e);if(!r)return;const t=Fi(r),s={config:r,redundancy:t};Cr[e]=s}return Cr[e]}function Oi(e,r,t){let s,n;if(typeof e=="string"){const i=Nr(e);if(!i)return t(void 0,424),cn;n=i.send;const a=jc(e);a&&(s=a.redundancy)}else{const i=Es(e);if(i){s=Fi(i);const a=e.resources?e.resources[0]:"",l=Nr(a);l&&(n=l.send)}}return!s||!n?(t(void 0,424),cn):s.query(r,n,t)().abort}function Sc(e,r){const t=e.lastModifiedCached;if(t&&t>=r)return t===r;if(e.lastModifiedCached=r,t)for(const s in Qe)Ri(s,n=>{const i=n.data;return n.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===r});return!0}function Cc(e,r){Cs||Ii();function t(s){let n;if(!Qe[s]||!(n=Ti(s)))return;const i=Ci[s];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=Mr(n),!Vr(n,a+1))return;const l={cached:Math.floor(Date.now()/Ei),provider:e.provider,data:r};return As(n,xt+a.toString(),JSON.stringify(l))}r.lastModified&&!Sc(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),t("local")||t("session"))}function un(){}function Ac(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,yc(e)}))}function Ec(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:s}=e,n=e.iconsToLoad;delete e.iconsToLoad;let i;if(!n||!(i=Nr(t)))return;i.prepare(t,s,n).forEach(l=>{Oi(t,l,c=>{if(typeof c!="object")l.icons.forEach(d=>{e.missing.add(d)});else try{const d=js(e,c);if(!d.length)return;const f=e.pendingIcons;f&&d.forEach(p=>{f.delete(p)}),Cc(e,c)}catch(d){console.error(d)}Ac(e)})})}))}const Tc=e=>{const t=ke(e.provider,e.prefix).pendingIcons;return!!(t&&t.has(e.name))},Ts=(e,r)=>{const t=bc(e,!0,Gl()),s=gc(t);if(!s.pending.length){let c=!0;return r&&setTimeout(()=>{c&&r(s.loaded,s.missing,s.pending,un)}),()=>{c=!1}}const n=Object.create(null),i=[];let a,l;return s.pending.forEach(c=>{const{provider:d,prefix:f}=c;if(f===l&&d===a)return;a=d,l=f,i.push(ke(d,f));const p=n[d]||(n[d]=Object.create(null));p[f]||(p[f]=[])}),s.pending.forEach(c=>{const{provider:d,prefix:f,name:p}=c,g=ke(d,f),j=g.pendingIcons||(g.pendingIcons=new Set);j.has(p)||(j.add(p),n[d][f].push(p))}),i.forEach(c=>{const{provider:d,prefix:f}=c;n[d][f].length&&Ec(c,n[d][f])}),r?vc(r,s,i):un},Rc=e=>new Promise((r,t)=>{const s=typeof e=="string"?lt(e,!0):e;if(!s){t(e);return}Ts([s||e],n=>{if(n.length&&s){const i=wt(s);if(i){r({..._t,...i});return}}t(e)})});function Vi(e,r){const t={...e};for(const s in r){const n=r[s],i=typeof n;s in wi?(n===null||n&&(i==="string"||i==="number"))&&(t[s]=n):i===typeof t[s]&&(t[s]=s==="rotate"?n%4:n)}return t}const nr={...ji,inline:!1},Ar="iconify",Ur="iconify-inline",ze="iconifyData"+Date.now();let Ye=[];function jt(e){for(let r=0;r<Ye.length;r++){const t=Ye[r];if((typeof t.node=="function"?t.node():t.node)===e)return t}}function Mi(e,r=!1){let t=jt(e);return t?(t.temporary&&(t.temporary=r),t):(t={node:e,temporary:r},Ye.push(t),t)}function Ic(){if(document.documentElement)return Mi(document.documentElement);Ye.push({node:()=>document.documentElement})}function kc(e){Ye=Ye.filter(r=>e!==r&&e!==(typeof r.node=="function"?r.node():r.node))}function St(){return Ye}function Dc(e){const r=document;r.readyState&&r.readyState!=="loading"?e():r.addEventListener("DOMContentLoaded",e)}let mt=null;const Lc={childList:!0,subtree:!0,attributes:!0};function $i(e){if(!e.observer)return;const r=e.observer;r.pendingScan||(r.pendingScan=setTimeout(()=>{delete r.pendingScan,mt&&mt(e)}))}function Pc(e,r){if(!e.observer)return;const t=e.observer;if(!t.pendingScan)for(let s=0;s<r.length;s++){const n=r[s];if(n.addedNodes&&n.addedNodes.length>0||n.type==="attributes"&&n.target[ze]!==void 0){t.paused||$i(e);return}}}function Ni(e,r){e.observer.instance.observe(r,Lc)}function Gt(e){let r=e.observer;if(r&&r.instance)return;const t=typeof e.node=="function"?e.node():e.node;!t||!window||(r||(r={paused:0},e.observer=r),r.instance=new window.MutationObserver(Pc.bind(null,e)),Ni(e,t),r.paused||$i(e))}function dn(){St().forEach(Gt)}function Ui(e){if(!e.observer)return;const r=e.observer;r.pendingScan&&(clearTimeout(r.pendingScan),delete r.pendingScan),r.instance&&(r.instance.disconnect(),delete r.instance)}function Fc(e){const r=mt!==null;if(mt!==e&&(mt=e,r&&St().forEach(Ui)),r){dn();return}Dc(dn)}function Br(e){(e?[e]:St()).forEach(r=>{if(!r.observer){r.observer={paused:1};return}const t=r.observer;if(t.paused++,t.paused>1||!t.instance)return;t.instance.disconnect()})}function Oc(e){if(e){const r=jt(e);r&&Br(r)}else Br()}function Hr(e){(e?[e]:St()).forEach(r=>{if(!r.observer){Gt(r);return}const t=r.observer;if(t.paused&&(t.paused--,!t.paused)){const s=typeof r.node=="function"?r.node():r.node;if(s)t.instance?Ni(r,s):Gt(r);else return}})}function Vc(e){if(e){const r=jt(e);r&&Hr(r)}else Hr()}function Bi(e,r=!1){const t=Mi(e,r);return Gt(t),t}function Hi(e){const r=jt(e);r&&(Ui(r),kc(e))}function Mc(e,r){if(e.name!==r.name||e.mode!==r.mode)return!0;const t=e.customisations,s=r.customisations;for(const n in nr)if(t[n]!==s[n])return!0;return!1}function $c(e,r=0){const t=e.replace(/^-?[0-9.]*/,"");function s(n){for(;n<0;)n+=4;return n%4}if(t===""){const n=parseInt(e);return isNaN(n)?0:s(n)}else if(t!==e){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/n,i%1===0?s(i):0)}}return r}const Nc=/[\s,]+/;function Uc(e,r){r.split(Nc).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Bc=["width","height"],Hc=["inline","hFlip","vFlip"];function zc(e,r){return e===r||e==="true"?!0:e===""||e==="false"?!1:null}function qc(e){const r=e.getAttribute("data-icon"),t=typeof r=="string"&<(r,!0);if(!t)return null;const s={...nr,inline:e.classList&&e.classList.contains(Ur)};Bc.forEach(l=>{const c=e.getAttribute("data-"+l);c&&(s[l]=c)});const n=e.getAttribute("data-rotate");typeof n=="string"&&(s.rotate=$c(n));const i=e.getAttribute("data-flip");typeof i=="string"&&Uc(s,i),Hc.forEach(l=>{const c="data-"+l,d=zc(e.getAttribute(c),c);typeof d=="boolean"&&(s[l]=d)});const a=e.getAttribute("data-mode");return{name:r,icon:t,customisations:s,mode:a}}const Wc="svg."+Ar+", i."+Ar+", span."+Ar+", i."+Ur+", span."+Ur;function Kc(e){const r=[];return e.querySelectorAll(Wc).forEach(t=>{const s=t[ze]||t.tagName.toLowerCase()!=="svg"?qc(t):null;s&&r.push({node:t,props:s})}),r}function zi(e,r){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in r)t+=" "+s+'="'+r[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}let ht;function Gc(){try{ht=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{ht=null}}function Qc(e){return ht===void 0&&Gc(),ht?ht.createHTML(e):e}function qi(e){const r=new Set(["iconify"]);return["provider","prefix"].forEach(t=>{e[t]&&r.add("iconify--"+e[t])}),r}function Wi(e,r,t,s){const n=e.classList;if(s){const a=s.classList;Array.from(a).forEach(l=>{n.add(l)})}const i=[];return r.forEach(a=>{n.contains(a)?t.has(a)&&i.push(a):(n.add(a),i.push(a))}),t.forEach(a=>{r.has(a)||n.remove(a)}),i}function Ki(e,r,t){const s=e.style;(t||[]).forEach(i=>{s.removeProperty(i)});const n=[];for(const i in r)s.getPropertyValue(i)||(n.push(i),s.setProperty(i,r[i]));return n}function Gi(e,r,t){let s;try{s=document.createElement("span")}catch{return e}const n=r.customisations,i=tr(t,n),a=e[ze],l=zi(Si(i.body),{"aria-hidden":"true",role:"img",...i.attributes});s.innerHTML=Qc(l);const c=s.childNodes[0],d=e.attributes;for(let T=0;T<d.length;T++){const R=d.item(T),V=R.name;V!=="class"&&!c.hasAttribute(V)&&c.setAttribute(V,R.value)}const f=qi(r.icon),p=Wi(c,f,new Set(a&&a.addedClasses),e),g=Ki(c,n.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),j={...r,status:"loaded",addedClasses:p,addedStyles:g};return c[ze]=j,e.parentNode&&e.parentNode.replaceChild(c,e),c}function Zc(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Jc(e){return"data:image/svg+xml,"+Zc(e)}function Yc(e){return'url("'+Jc(e)+'")'}const Xc={display:"inline-block"},zr={"background-color":"currentColor"},Qi={"background-color":"transparent"},fn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},pn={"-webkit-mask":zr,mask:zr,background:Qi};for(const e in pn){const r=pn[e];for(const t in fn)r[e+"-"+t]=fn[t]}function mn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function eu(e,r,t,s){const n=r.customisations,i=tr(t,n),a=i.attributes,l=e[ze],c=zi(i.body,{...a,width:t.width+"",height:t.height+""}),d=qi(r.icon),f=Wi(e,d,new Set(l&&l.addedClasses)),g={"--svg":Yc(c),width:mn(a.width),height:mn(a.height),...Xc,...s?zr:Qi};n.inline&&(g["vertical-align"]="-0.125em");const j=Ki(e,g,l&&l.addedStyles),T={...r,status:"loaded",addedClasses:f,addedStyles:j};return e[ze]=T,e}let It=!1;function tu(){It||(It=!0,setTimeout(()=>{It&&(It=!1,it())}))}function it(e,r=!1){const t=Object.create(null);function s(n,i){const{provider:a,prefix:l,name:c}=n,d=ke(a,l),f=d.icons[c];if(f)return{status:"loaded",icon:f};if(d.missing.has(c))return{status:"missing"};if(i&&!Tc(n)){const p=t[a]||(t[a]=Object.create(null));(p[l]||(p[l]=new Set)).add(c)}return{status:"loading"}}(e?[e]:St()).forEach(n=>{const i=typeof n.node=="function"?n.node():n.node;if(!i||!i.querySelectorAll)return;let a=!1,l=!1;function c(d,f,p){if(l||(l=!0,Br(n)),d.tagName.toUpperCase()!=="SVG"){const g=f.mode,j=g==="mask"||(g==="bg"?!1:g==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof j=="boolean"){eu(d,f,{..._t,...p},j);return}}Gi(d,f,p)}Kc(i).forEach(({node:d,props:f})=>{const p=d[ze];if(!p){const{status:j,icon:T}=s(f.icon,!0);if(T){c(d,f,T);return}a=a||j==="loading",d[ze]={...f,status:j};return}let g;if(Mc(p,f)){if(g=s(f.icon,p.name!==f.name),!g.icon){a=a||g.status==="loading",Object.assign(p,{...f,status:g.status});return}}else{if(p.status!=="loading")return;if(g=s(f.icon,!1),!g.icon){p.status=g.status;return}}c(d,f,g.icon)}),n.temporary&&!a?Hi(i):r&&a?Bi(i,!0):l&&n.observer&&Hr(n)});for(const n in t){const i=t[n];for(const a in i){const l=i[a];Ts(Array.from(l).map(c=>({provider:n,prefix:a,name:c})),tu)}}}function ru(e){const r=jt(e);r?it(r):it({node:e,temporary:!0},!0)}function Zi(e,r,t=!1){const s=wt(e);if(!s)return null;const n=lt(e),i=Vi(nr,r||{}),a=Gi(document.createElement("span"),{name:e,icon:n,customisations:i},s);return t?a.outerHTML:a}function su(){return"3.1.1"}function nu(e,r){return Zi(e,r,!1)}function iu(e,r){return Zi(e,r,!0)}function ou(e,r){const t=wt(e);if(!t)return null;const s=Vi(nr,r||{});return tr(t,s)}function au(e){e?ru(e):it()}if(typeof document<"u"&&typeof window<"u"){Ic();const e=window;if(e.IconifyPreload!==void 0){const r=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof r=="object"&&r!==null&&(r instanceof Array?r:[r]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!_i(s))&&console.error(t)}catch{console.error(t)}})}setTimeout(()=>{Fc(it),it()})}function lu(e,r){ki(e,r!==!1)}function cu(e){ki(e,!0)}Di("",hc);if(typeof document<"u"&&typeof window<"u"){Ii();const e=window;if(e.IconifyProviders!==void 0){const r=e.IconifyProviders;if(typeof r=="object"&&r!==null)for(const t in r){const s="IconifyProviders["+t+"] is invalid.";try{const n=r[t];if(typeof n!="object"||!n||n.resources===void 0)continue;Li(t,n)||console.error(s)}catch{console.error(s)}}}}const uu={getAPIConfig:sr,setAPIModule:Di,sendAPIQuery:Oi,setFetch:lc,getFetch:cc,listAPIProviders:oc},du={_api:uu,addAPIProvider:Li,loadIcons:Ts,loadIcon:Rc,iconExists:Zl,getIcon:Jl,listIcons:Kl,addIcon:Ql,addCollection:_i,replaceIDs:Si,calculateSize:Fr,buildIcon:tr,getVersion:su,renderSVG:nu,renderHTML:iu,renderIcon:ou,scan:au,observe:Bi,stopObserving:Hi,pauseObserver:Oc,resumeObserver:Vc,enableCache:lu,disableCache:cu};try{self.Iconify===void 0&&(self.Iconify=du)}catch{}var Rs={},fu=we;Object.defineProperty(Rs,"__esModule",{value:!0});var Ji=Rs.default=void 0,pu=fu(je()),mu=o;Ji=Rs.default=(0,pu.default)((0,mu.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function Is({infos:e}){const{t:r}=he(),t=new URL("https://community.arcblock.io/discussions/add");e.forEach(n=>{t.searchParams.set(n.label,n.value)});const s=e.map(n=>`* ${n.label}: ${n.value}`).join(`
|
|
154
|
-
`);return t.searchParams.set("report","server"),t.searchParams.set("context",`[Enter feedback here]
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<!--
|
|
159
|
-
[Server Info]
|
|
160
|
-
${s}
|
|
161
|
-
* Page: ${window.location.href}
|
|
162
|
-
-->
|
|
163
|
-
`),se(U,{sx:{mx:{xs:0,md:2}},children:se(Kr,{sx:{color:"text.primary"},target:"_blank",href:t.href,rel:"noreferrer",style:{textDecoration:"underline"},children:r("common.reportIssue")})})}Is.propTypes={infos:O.arrayOf(O.shape({label:O.string,value:O.string}))};Is.defaultProps={infos:[]};var ks={},hu=we;Object.defineProperty(ks,"__esModule",{value:!0});var qr=ks.default=void 0,gu=hu(je()),hn=o;qr=ks.default=(0,gu.default)([(0,hn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,hn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function Be({children:e}){return Ie(t=>t.breakpoints.down("md"))?o.jsx(Ot,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:o.jsx(U,{sx:{display:"flex",alignItems:"center",gap:1},children:o.jsx(qr,{fontSize:"small"})})}):o.jsxs(U,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(qr,{fontSize:"small"}),e]})}Be.propTypes={children:O.node.isRequired};const yu="https://launcher.arcblock.io/",xu=30*24*60*60*1e3;function Ds({launcherUrl:e,chainHost:r,nftId:t,launcherSessionId:s,...n}){var _,h,w,S,A,b;const{t:i,locale:a}=he(),l=ot(),[c,d]=$n({safeIframeRef:null,popoverAnchorEl:null}),f=L.useRef(null),p=Ie(P=>P.breakpoints.down("md")),{sx:g={},...j}=n,T=p?"mobile":"desktop",R=Vn(async()=>{const[P,M]=await Promise.all([l.api.getLauncherSession({input:{launcherSessionId:s,launcherUrl:e}}),In({launcherUrl:e||yu,nftDid:t,launcherSessionId:s,locale:a})]);if(P!=null&&P.error)throw new Error(P.error);return{launcherSession:P.launcherSession,subscriptionURL:M}},[a]);if(R.loading)return o.jsx(Ge,{label:o.jsxs(Be,{children:[!p&&i("expiration.desktop.loading"),o.jsx(He,{size:16})]}),variant:"success",sx:{cursor:"pointer",...g},...j});if(R.error)return console.error(R.error),o.jsx(Ge,{label:o.jsx(Be,{children:i(`expiration.${T}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...g},...j,onClick:()=>R.retry()});const V=P=>{d({popoverAnchorEl:P.currentTarget})},y=()=>{d({popoverAnchorEl:null})},v=(_=R.value)==null?void 0:_.launcherSession;let k="success";[ie.LAUNCH_SESSION_STATUS.overdue,ie.LAUNCH_SESSION_STATUS.canceled,ie.LAUNCH_SESSION_STATUS.terminated].includes((w=(h=R.value)==null?void 0:h.launcherSession)==null?void 0:w.status)&&(k="error");let B=null;if(v.expirationDate&&!v.subscription){const P=rt(v.expirationDate).diff(rt(),"ms");B=i(`expiration.${T}.tips.${k}`,{validity:Fn(P,{locale:kn(a),compact:!0,verbose:!0})}),P>0&&P<=xu&&(k="warning")}return o.jsxs(o.Fragment,{children:[o.jsx(Ge,{label:o.jsx(Be,{children:B||((A=(S=v==null?void 0:v.subscription)==null?void 0:S.product)==null?void 0:A.name)||i("common.subscription")}),color:k,variant:k!=="success"?"contained":"outlined",sx:{cursor:"pointer",...g},...j,onClick:V}),o.jsx(wn,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(U,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:f,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(b=R.value)==null?void 0:b.subscriptionURL})})})]})}Ds.propTypes={chainHost:O.string.isRequired,nftId:O.string,launcherSessionId:O.string,sx:O.object,retention:O.number,launcherUrl:O.string.isRequired};Ds.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const vu=30*24*60*60*1e3,bu="https://launcher.arcblock.io/";function Ls({launcherUrl:e,chainHost:r,nftId:t,launcherSessionId:s,...n}){var h,w,S,A,b,P,M;const{t:i,locale:a}=he(),[l,c]=$n({safeIframeRef:null,popoverAnchorEl:null}),d=L.useRef(null),f=Ie($=>$.breakpoints.down("md")),p=ot(),{sx:g={},...j}=n,T=f?"mobile":"desktop",R=Vn(async()=>{const[$,z]=await Promise.all([p.api.getLauncherSession({input:{launcherSessionId:s||t,launcherUrl:e}}),In({launcherUrl:e||bu,nftDid:t,launcherSessionId:s,locale:a})]);if($!=null&&$.error)throw new Error($.error);return{launcherSession:$.launcherSession,subscriptionURL:z}},[a]);if(R.loading)return o.jsx(Ge,{label:o.jsxs(Be,{children:[!f&&i("expiration.desktop.loading"),o.jsx(He,{size:16})]}),variant:"success",sx:{cursor:"pointer",...g},...j});if(R.error)return console.error(R.error),o.jsx(Ge,{label:o.jsx(Be,{children:i(`expiration.${T}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...g},...j,onClick:()=>R.retry()});const V=(w=(h=R.value)==null?void 0:h.launcherSession)==null?void 0:w.expirationDate,y=rt(V).isBefore(rt()),v=rt(V).diff(rt(),"ms");let k="success";v<=vu&&(k="warning"),y&&(k="error");const B=$=>{c({popoverAnchorEl:$.currentTarget})},_=()=>{c({popoverAnchorEl:null})};return o.jsxs(o.Fragment,{children:[((A=(S=R.value)==null?void 0:S.launcherSession)==null?void 0:A.subscription)&&o.jsx(Ge,{label:o.jsx(Be,{children:i("expiration.desktop.nextInvoice",{date:Wo(V,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...g},...j,onClick:B}),!((P=(b=R.value)==null?void 0:b.launcherSession)!=null&&P.subscription)&&o.jsx(Ge,{label:o.jsx(Be,{children:i(`expiration.${T}.tips.${k}`,{validity:Fn(v,{locale:kn(a),compact:!0,verbose:!0})})}),color:k,variant:k!=="success"?"contained":"outlined",sx:{cursor:"pointer",...g},...j,onClick:B}),o.jsx(wn,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:_,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(U,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:d,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(M=R.value)==null?void 0:M.subscriptionURL})})})]})}Ls.propTypes={chainHost:O.string.isRequired,nftId:O.string,launcherSessionId:O.string,sx:O.object,retention:O.number,launcherUrl:O.string.isRequired};Ls.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var Ps={},_u=we;Object.defineProperty(Ps,"__esModule",{value:!0});var Yi=Ps.default=void 0,wu=_u(je()),ju=o;Yi=Ps.default=(0,wu.default)((0,ju.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var Fs={},Su=we;Object.defineProperty(Fs,"__esModule",{value:!0});var Xi=Fs.default=void 0,Cu=Su(je()),Au=o;Xi=Fs.default=(0,Cu.default)((0,Au.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");function Eu(){const{inFullPage:e,toggleFullPage:r}=po();return se(Qt,{onClick:r,children:e?se(Xi,{sx:{transform:"scale(1.3)"}}):se(Yi,{sx:{transform:"scale(1.3)"}})})}function Os({children:e}){var k,B,_;const{t:r}=he(),{loading:t,error:s,actions:{refreshBlocklet:n},env:i,blocklet:a}=at(),{info:l}=Ko(),c=Io(),d=Ie(h=>h.breakpoints.down("md")),[f,p]=L.useState(null),{appId:g,version:j}=i,T=[{label:"App ID",value:g},{label:"App Version",value:j},{label:"App Bundle Name",value:(k=a==null?void 0:a.meta)==null?void 0:k.bundleName},{label:"Server Id",value:l.did},{label:"Server Version",value:l.version}],R=h=>{var S,A,b,P;const w=Array.isArray(h)?h:[h];if(d||w.unshift(se(Eu,{})),a){const M={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};Go(a)?w.unshift(se(Ds,{chainHost:(S=a==null?void 0:a.controller)==null?void 0:S.chainHost,nftId:(A=a==null?void 0:a.controller)==null?void 0:A.nftId,launcherSessionId:(b=a==null?void 0:a.controller)==null?void 0:b.launcherSessionId,launcherUrl:(P=a==null?void 0:a.controller)==null?void 0:P.launcherUrl,sx:M})):l.ownerNft&&l.launcher&&w.unshift(se(Ls,{chainHost:l.launcher.chainHost,launcherUrl:l.launcher.url,nftId:l.ownerNft.did,launcherSessionId:l.ownerNft.launcherSessionId,sx:M}))}return w},V=(B=((a==null?void 0:a.environments)||[]).find(h=>h.key===Fe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:B.value,y=(_=((a==null?void 0:a.environments)||[]).find(h=>h.key===Fe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:_.value;return L.useEffect(()=>{if(d)p(null);else{const{appLogo:h,appLogoRect:w}=window.blocklet??{};(w||h)&&p(`${w||h}&v=${Date.now()}`)}},[V,y,d]),jr(Tu,{legacy:!1,fullWidth:!0,headerAddons:R,headerProps:{logo:f?se("img",{src:f,alt:"logo"}):null},footerProps:{addon:se(Is,{infos:T})},children:[!a&&t&&se(Vt,{relative:"parent",children:se(He,{})}),!a&&s&&jr(Vt,{relative:"parent",children:[jr(U,{display:"flex",alignItems:"center",children:[se(Ji,{color:"error",sx:{marginRight:1}}),Jr(s)]}),se(Ze,{onClick:()=>n(),children:se("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!a&&se(U,{flex:1,padding:d?2:3,display:"flex",flexDirection:"column",children:se(No,{FallbackComponent:fo,resetKeys:[c.pathname],children:e})})]})}Os.propTypes={children:O.any};Os.defaultProps={children:null};const Tu=Ve(uo)`
|
|
164
|
-
div.dashboard-content {
|
|
165
|
-
padding: 0;
|
|
166
|
-
}
|
|
167
|
-
.header-addons .locales {
|
|
168
|
-
max-height: 400px;
|
|
169
|
-
overflow-y: auto;
|
|
170
|
-
}
|
|
171
|
-
`;function Ru(){const{t:e,locale:r}=he(),{blocklet:t,launcherSession:s}=at(),[n,i]=da({subscriptionURL:"#"});if(L.useEffect(()=>{var c,d;Hs(t,s)&&Qo({launcherSessionId:(c=t==null?void 0:t.controller)==null?void 0:c.launcherSessionId,launcherUrl:(d=t==null?void 0:t.controller)==null?void 0:d.launcherUrl,locale:r}).then(f=>{i({subscriptionURL:f})}).catch(f=>{console.error("get subscription url error:",f)})},[t,s]),!t||!s||!Zo(t)||s.status===ie.LAUNCH_SESSION_STATUS.installed)return"";let a=null,l="";return Hs(t,s)?(a=o.jsx(Kr,{href:n.subscriptionURL,children:e("blocklet.manageSubscription")}),l=e("blocklet.suspendedCausedByExpired",{deadline:zs(s==null?void 0:s.reservedUntil,r)})):Jo(t,s)&&(a=o.jsx(jn,{to:Yt(ie.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),l=e("blocklet.suspendedCausedByTerminated",{canceledAt:zs(s==null?void 0:s.terminatedAt,r),deadline:Yo(s==null?void 0:s.terminatedAt,r)})),o.jsxs(U,{component:Uo,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[l,o.jsx(pe,{component:"span",sx:{marginLeft:"4px"},children:a})]})}const eo=L.createContext({});function Td(){return L.useContext(eo)}const{Provider:Iu,Consumer:Rd}=eo,{did:Se,appId:ku}=window.env;function Du({children:e}){var h,w;const{t:r,locale:t}=he(),{blocklet:s}=at(),[n,i]=L.useState([]),[a,l]=L.useState([]),[c,d]=L.useState([]),f=xe.getDisplayName(s),p=((h=((s==null?void 0:s.environments)||[]).find(S=>S.key===Fe.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:h.value)||"auto",g=(s==null?void 0:s.trustedPassports)||[],j=(s==null?void 0:s.trustedFactories)||[],T=(s==null?void 0:s.enablePassportIssuance)!==!1,R=async()=>{try{const S=await At.doBatchQuery({getRoles:{input:{teamDid:Se}},getPermissions:{input:{teamDid:Se}},getInvitations:{input:{teamDid:Se}}});l((S.getRoles.roles||[]).filter(A=>!ie.RBAC_CONFIG.roles.some(b=>b.name===A.name&&(!b.passport||b.ci))).map(A=>(A.hasDescription=!!A.description,A.hasDescription||(A.description=r("team.passport.description",{teamName:f,title:A.title})),A))),d(S.getPermissions.permissions||[]),i(S.getInvitations.invitations||[])}catch(S){ne.error(S.message)}},V=({did:S}={})=>{const A={teamDid:Se,user:{did:S}};return At.getUser({input:A})},y=({query:S,paging:A}={})=>{const b={teamDid:Se};return A&&(b.paging=A),S&&(b.query=S),b.sort={lastLoginAt:-1},At.getUsers({input:b})},v=()=>At.getUsersCountPerRole({input:{teamDid:Se}}),k=()=>R();L.useEffect(()=>{var S;(S=s==null?void 0:s.meta)!=null&&S.did&&R()},[(w=s==null?void 0:s.meta)==null?void 0:w.did]),L.useEffect(()=>{l(S=>S.map(A=>(A.hasDescription||(A.description=r("team.passport.description",{teamName:f,title:A.title})),{...A})))},[r,t]);const B=S=>{S.teamDid===Se&&R()};kt(Fe.TeamEvents.userAdded,B,[Se]),kt(Fe.TeamEvents.userRemoved,B,[Se]),kt(Fe.TeamEvents.userUpdated,B,[Se]);const _={teamDid:Se,teamIssuerDid:ku,teamName:f,invitations:n,roles:a,permissions:c,trustedPassports:g,trustedFactories:j,isNodeTeam:!1,enablePassportIssuance:T,refresh:k,passportColor:p,endpoint:window.location.origin,blocklet:s,api:{getUser:V,getUsers:y,getUsersCountPerRole:v}};return o.jsx(Iu,{value:_,children:e})}const Lu=L.lazy(()=>Y(()=>import("./log-B1ojA9lx.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),Pu=L.lazy(()=>Y(()=>import("./index-njqCeZqY.js"),__vite__mapDeps([14,2,1,5,15,4,6,7,8,10,16,9,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,3,33,34,35,36,37,38,39]))),Fu=L.lazy(()=>Y(()=>import("./index-CfxqxAZd.js"),__vite__mapDeps([40,4,2,5,1,6,7,8,37,9,10,41,25,21,30,31,3,33,34,35,19,36,22,38,39]))),Ou=L.lazy(()=>Y(()=>import("./index-D1iI5v2e.js"),__vite__mapDeps([42,2,1,9,10,4,5,6,7,8,43,25,21,19,17,44,12,32,45,11,20,46,38,15,47,29,48,49,50,24,51,52,53,54,55,56,34,57,58,59,60]))),Vu=L.lazy(()=>Y(()=>import("./overview-vOO_cwfO.js"),__vite__mapDeps([61,1,2,4,5,6,7,8,10,37,62,35,9,23,36,22,17,63,64,65,48,3,25,21,33,34,19,38,39]))),Mu=L.lazy(()=>Y(()=>import("./domains-DTccX50O.js"),__vite__mapDeps([66,2,4,5,1,6,7,8,9,10,67,41,18,19,36,22,25,21,30,31,56,20,32,68,38,37,23,69]))),$u=L.lazy(()=>Y(()=>import("./index-IaaNyqXG.js"),__vite__mapDeps([70,2,6,5,1,4,7,8,15,9,10,17,26,27,18,19,71,72,73,25,21,45,38,74,3,33,34,35,36,22,37,39]))),Nu=L.lazy(()=>Y(()=>import("./appearance-Bw3QRuyJ.js"),__vite__mapDeps([75,76,2,10,1,4,5,6,7,8,9]))),Uu=L.lazy(()=>Y(()=>import("./audit-logs-7qd9PUxe.js"),__vite__mapDeps([77,4,2,5,1,6,7,8,26,27,3,9,10,58,59,37,78,35,32,60,25,21,33,34,19,36,22,38,39]))),Bu=L.lazy(()=>Y(()=>import("./index-BnqjZUkY.js"),__vite__mapDeps([79,2,1,5,4,6,7,8,9,10,32,23,80,47,12,35,78,37,69,26,27,17,81,36,22,76,82,83,49,84,21,50,3,25,33,34,19,38,39]))),Hu=L.lazy(()=>Y(()=>import("./config-navigation-DO0UJG5K.js"),__vite__mapDeps([85,2,4,5,1,6,7,8,86,10,9,64,72,87,88,48,35,51,52,21,3,25,33,34,19,36,22,37,38,39]))),zu=L.lazy(()=>Y(()=>import("./index-C07T63uR.js"),__vite__mapDeps([89,1,2,6,5,9,10,4,7,8,90,48,91,92,65,24,21,23,93,31,34,94,45,3,25,33,35,19,36,22,37,38,39]))),qu=L.lazy(()=>Y(()=>import("./index-BvyKTiWe.js"),__vite__mapDeps([95,4,2,5,1,6,7,8,9,10,94,62,23,27,90,3,25,21,33,34,35,19,36,22,37,38,39]))),Wu=L.lazy(()=>Y(()=>import("./security-CQrJSvNH.js"),__vite__mapDeps([96,4,2,5,1,6,7,8,9,10,88,97,90,3,25,21,33,34,35,19,36,22,37,38,39]))),Ku=L.lazy(()=>Y(()=>import("./branding-NhPjoLxG.js"),__vite__mapDeps([98,2,1,4,5,6,7,8,9,10,55,99,15,73,57,18,19,35]))),Gu=L.lazy(()=>Y(()=>import("./advanced-0AsHuHlx.js"),__vite__mapDeps([100,2,1,9,10,4,5,6,7,8,18,19,25,21,38,20,23,17,63,64,3,33,34,35,36,22,37,39]))),Qu=L.lazy(()=>Y(()=>import("./traffic-D72BUoUS.js").then(e=>e.t),__vite__mapDeps([81,2,9,1,10,4,5,6,7,8,36,22,76,82,83,49,84,21,50]))),Zu=L.lazy(()=>Y(()=>import("./runtime-DmT1MY2S.js"),__vite__mapDeps([101,2,1,35,5,9,10,4,6,7,8,93,12,3,25,21,33,34,19,36,22,37,38,39]))),Ju=L.lazy(()=>Y(()=>import("./component-D1Fsjeuf.js"),__vite__mapDeps([102,1,2,5,4,6,7,8,10,9,103,94,18,19,86,84,52,20,49,83,57,21,104,53,54,55,24,56,32,25,34,17,105,106,92,65,48,99,15,107,71,72,58,59,87,23,3,68,90,108,91,109,74,37,76,12,33,30,31,35,36,22,38,39]))),Yu=L.lazy(()=>Y(()=>import("./index-Br2EGTW4.js"),__vite__mapDeps([110,1,2,9,10,4,5,6,7,8]))),Xu=Yt(ie.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),ed=e=>{const{enqueueSnackbar:r}=An(),t=L.useCallback(s=>Ln(Xu,{id:s.id,severity:s.severity||"all",componentDid:s.source==="system"?"system":s.componentDid||"all"}),[]);kt(`${e}/${ie.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,s=>{const n=t(s),{severity:i,description:a}=s||{},l=["error","warning"].includes(i)||s.sticky;r(a,{variant:i,autoHideDuration:l?null:5e3,content:c=>o.jsx(Ja,{viewAllUrl:n,keyId:c,notification:s,content:o.jsx(fl,{notification:s,minimal:!0,rows:0})})})},[],"user")};function to({blocklet:e,isAdmin:r}){const[t,s]=L.useState(!1),{t:n}=he(),i=pa();return r?o.jsxs(o.Fragment,{children:[o.jsx(Bu,{blocklet:e,customTableButtons:[o.jsxs(U,{display:"flex",alignItems:"center",gap:1.5,children:[o.jsx(Qt,{onClick:()=>s(!0),sx:{p:i?0:void 0},children:o.jsx(ss,{})},"settings"),i?o.jsx(pe,{children:n("common.setting")}):null]})]}),o.jsx(Bo,{title:`${n("common.notification")} ${n("common.setting")}`,fullWidth:!0,maxWidth:"md",open:t,onClose:()=>s(!1),PaperProps:{style:{minHeight:"500px"}},children:o.jsx(U,{sx:{mt:"-16px",overflowY:"hidden"},children:o.jsx(Ml,{})})})]}):o.jsx(ho,{status:403})}to.propTypes={blocklet:O.object.isRequired,isAdmin:O.bool.isRequired};const td=e=>{var f,p;const{t:r}=he(),{blocklet:t,actions:{refreshBlocklet:s},client:n,did:i}=at(),a=(f=t==null?void 0:t.meta)==null?void 0:f.did,l=!t||lr(t.status)?[]:xe.getAppMissingConfigs(t),c={overview:[{label:r("common.overview"),value:"overview"},{label:o.jsx(Ro,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!l.length,children:r("common.components")}),value:"components"}],"did-connect":[{label:r("common.members"),value:"members"},{label:r("team.member.passports"),value:"passports"},{label:r("common.setting"),value:"settings"},{label:r("common.security"),value:"security"}],website:[{label:r("common.domains"),value:"domains"},{label:r("common.branding"),value:"branding",show:!lr(t==null?void 0:t.status)},{label:r("common.theming"),value:"theming",show:!lr(t==null?void 0:t.status)},{label:r("common.navigation"),value:"navigation"},{label:r("common.sitemap"),value:"sitemap"}],operations:[{label:r("common.notificationRecords"),value:"notifications",show:e},{label:r("common.analytics"),value:"analytics"},{label:r("common.auditLogs"),value:"audit-logs"},{label:r("common.advanced"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:r("common.accessKeys"),value:"access-keys"}],developers:[{label:r("common.logs"),value:"logs",show:((p=t==null?void 0:t.children)==null?void 0:p.length)&&t.structVersion===ie.APP_STRUCT_VERSION},{label:r("common.performance"),value:"performance"},{label:r("common.docs"),value:"docs"}]},d={overview:o.jsx(Vu,{}),components:Ju,members:o.jsx(Pu,{type:"blocklet",createPassportSvg:qs}),passports:o.jsx($u,{createPassportSvg:qs}),settings:o.jsx(qu,{orientation:"vertical"}),security:o.jsx(Wu,{}),"did-spaces":o.jsx(zu,{navOrientation:"horizontal"}),branding:o.jsx(Ku,{blocklet:t,onUpdate:s}),theming:o.jsx(Nu,{}),navigation:Hu,domains:o.jsx(Mu,{}),sitemap:o.jsx(Bs,{children:r("common.comingSoon")}),notifications:o.jsx(to,{blocklet:t,isAdmin:e}),"audit-logs":o.jsx(Uu,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:o.jsx(Qu,{client:n,did:i}),advanced:o.jsx(Gu,{blocklet:t,onUpdate:s}),webhooks:o.jsx(Fu,{}),"access-keys":o.jsx(Bs,{children:r("common.comingSoon")}),logs:Lu,performance:o.jsx(Zu,{client:n,did:i}),docs:o.jsx(Yu,{}),publish:o.jsx(Ou,{})};return{tabGroups:c,renders:d}};function rd(){var V,y;const e=Sn(),{tab:r="overview",subtab:t}=ko(),{blocklet:s}=at(),{t:n}=he(),{session:i}=On(),a=Je(()=>{var v;return(v=i==null?void 0:i.user)==null?void 0:v.did},[i]),l=Je(()=>{var v;return((v=i.user)==null?void 0:v.role)&&ea.includes(i.user.role)},[i]);ed(a);const{tabGroups:c,renders:d}=td(l),f=v=>{e(`${ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${r}/${v}`)},p=(c[r]||[]).filter(v=>v.show===void 0||v.show),g=((V=(p||[]).find(v=>v.value===t))==null?void 0:V.value)||((y=p==null?void 0:p[0])==null?void 0:y.value)||r,j=d[g]||d.overview,T=["overview"].includes(r),R=s?o.jsxs(Yr,{type:"components",children:[p.length>0&&o.jsx(U,{pt:T?3:0,mb:2,children:o.jsx(Tn,{tabs:p,current:g,onChange:f,scrollButtons:"auto"})}),o.jsx(U,{className:"page-content",children:o.jsx(L.Suspense,{fallback:o.jsx(Vt,{relative:"parent",children:o.jsx(He,{})}),children:L.isValidElement(j)?j:o.jsx(j,{blocklet:s})})})]}):o.jsx(Vt,{relative:"parent",children:o.jsx(He,{})});return o.jsx(ta,{children:o.jsx(Du,{children:o.jsx(Os,{children:o.jsxs(nd,{children:[T&&o.jsxs(U,{component:"div",className:"page-header",children:[o.jsxs(pe,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[s?o.jsx(ca,{blocklet:s,style:{marginRight:16}}):null,s?o.jsxs(U,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[o.jsx(U,{children:xe.getDisplayName(s)}),(s==null?void 0:s.status)!=="unknown"&&o.jsx(ds,{size:"12px",status:s.status,source:s.source,progress:s.progress})]}):`${n("common.blocklet")} ${n("common.detail")}`]}),s?o.jsx(Ua,{className:"page-actions",hasPermission:!0,blocklet:s,onStart:()=>{},onComplete:({error:v}={})=>{v&&ne.error(v.message)},variant:"group"}):null]}),o.jsx(Gn,{}),o.jsx(Ru,{}),R]})})})})}function sd(){var s;const{blocklet:e}=at(),{t:r}=he(),t=(s=e==null?void 0:e.meta)==null?void 0:s.did;return L.useEffect(()=>{const n=Xo();return t&&n.connect(),()=>{t&&n.isConnected()&&n.disconnect()}},[t]),o.jsxs(o.Fragment,{children:[o.jsx(mo,{children:o.jsx("title",{children:r("pageTitle.dashboard")})}),o.jsx(rd,{})]})}const nd=Ve.main`
|
|
172
|
-
.page-header {
|
|
173
|
-
display: flex;
|
|
174
|
-
justify-content: space-between;
|
|
175
|
-
align-items: center;
|
|
176
|
-
flex-wrap: wrap;
|
|
177
|
-
gap: 16px;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.page-title {
|
|
181
|
-
display: flex;
|
|
182
|
-
align-items: center;
|
|
183
|
-
|
|
184
|
-
.page-link {
|
|
185
|
-
font-size: 15px;
|
|
186
|
-
margin-top: 8px;
|
|
187
|
-
margin-left: 8px;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
192
|
-
.page-header {
|
|
193
|
-
flex-direction: column;
|
|
194
|
-
align-items: flex-start;
|
|
195
|
-
.page-actions,
|
|
196
|
-
.MuiButtonGroup-root {
|
|
197
|
-
width: 100%;
|
|
198
|
-
}
|
|
199
|
-
.MuiButtonGroup-root {
|
|
200
|
-
.MuiButtonBase-root {
|
|
201
|
-
flex: 1;
|
|
202
|
-
}
|
|
203
|
-
.blocklet-action-text {
|
|
204
|
-
display: none;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.page-title {
|
|
210
|
-
margin-bottom: 15px;
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
`,Id=Object.freeze(Object.defineProperty({__proto__:null,default:sd},Symbol.toStringTag,{value:"Module"}));export{ds as B,Ce as C,us as W,xi as a,Bn as b,Un as c,Ji as d,Ed as e,qn as f,et as g,Ad as h,Id as i,Td as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m}from"./vendor-react-DoD83n6N.js";import{u as a}from"./vendor-ux-did-connect-BQ3cvv_1.js";import{D as p,A as n,K as l,f as c}from"./index-_IytyGrM.js";import{a as u,b as x}from"./domain-action-card-BQASO--e.js";import{j as t,a4 as f,ae as d,ad as h}from"./vendor-mui-core-C-PhacC8.js";import"./vendor-utils-CRBr0QUY.js";import"./vendor-hooks-DtYI0-rF.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-D8eCUoJY.js";import"./ExpandLess-uIJAqSZm.js";import"./permission-ClAqVelD.js";import"./session-Clq9kJzg.js";import"./useAsyncRetry-CwtLImQi.js";import"./useAsync-BmuLIImU.js";import"./confirm-C-7TGRgW.js";import"./format-error-LAoTjvJe.js";import"./actions-C9vqEgMU.js";import"./MoreHoriz-BD8SroCJ.js";import"./delete-confirm-C_4zg33B.js";import"./click-to-copy-CkbZjUXU.js";import"./shorten-label-C642GTxb.js";import"./util-CllYCEyt.js";import"./useSetState-BL3ktMon.js";import"./InfoOutlined-DFTm-vVr.js";import"./index-CqRb1YIC.js";import"./CheckCircle-D7CrWlJ6.js";function j(){const{blocklet:o}=p(),{inService:i}=n(),{t:s}=a(),e=m.useMemo(()=>{let r=!0;return l(o)&&(r=r&&i),r},[i,o]);return t.jsxs(f,{component:d,sx:{maxWidth:820},gap:3,children:[t.jsxs(t.Fragment,{children:[c.isAccessible(o.status)===!1&&t.jsx(h,{severity:"warning",children:s("blocklet.router.noRunning")}),e&&t.jsx(u,{blocklet:o})]}),t.jsx(x,{showAllDomains:!0})]})}j.propTypes={};export{j as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,a3 as E,a4 as T}from"./vendor-mui-core-C-PhacC8.js";import{r as k,k as W}from"./vendor-react-DoD83n6N.js";import{u as j,C as L,al as S,V as h,m as I,aY as R}from"./vendor-ux-did-connect-BQ3cvv_1.js";import{L as U}from"./landing-page-Dl8nGCZh.js";import{w as v}from"./wrap-locale-Bn6cqCkC.js";import{g as b}from"./get-safe-url-M62JolcK.js";import{S as N,s as _,a as B}from"./index-_IytyGrM.js";import"./vendor-utils-CRBr0QUY.js";import"./vendor-hooks-DtYI0-rF.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-D8eCUoJY.js";function F({SessionContext:a,webWalletUrl:n,onSuccess:s}){var d,g;const{api:t,session:i}=k.useContext(a),{t:o,locale:f}=j(),u=W(),{searchParams:l}=new URL(window.location.href),p=l.get("redirect"),w=async(r,C)=>{s(r,C),await i.refresh(),h.success(o("exchangePassport.success")),setTimeout(()=>{if(p){const c=decodeURIComponent(p);c.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?u(c,{replace:!0}):window.location.href=b(c)}else window.location.href=window.env.pathPrefix||window.env.apiPrefix||"/"},3e3)},P=r=>{h.error(r.message)},m={},x=l.get("componentId");return x&&(m.componentId=x),i.loading?e.jsx(L,{children:e.jsx(E,{})}):e.jsx(U,{did:((d=window==null?void 0:window.blocklet)==null?void 0:d.appPid)||((g=window==null?void 0:window.env)==null?void 0:g.appPid),children:e.jsx(T,{sx:{maxWidth:"100%",height:"100%"},children:e.jsx(S,{popup:!0,open:!0,className:"connect",action:"exchange-passport",checkFn:t.get,checkTimeout:10*60*1e3,webWalletUrl:n,onSuccess:w,onError:P,locale:f,messages:{title:o("exchangePassport.dialog.title"),scan:o("exchangePassport.dialog.scan"),confirm:o("exchangePassport.dialog.confirm"),success:o("exchangePassport.dialog.success")},extraParams:m,extraContent:null,hideCloseButton:!0})})})}const V=v(F);function G(){const a=R(),n=(s,t)=>{s.sessionToken&&(_(t(s.sessionToken)),B(t(s.refreshToken)))};return e.jsx(V,{SessionContext:N,webWalletUrl:a,onSuccess:n})}export{G as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,aa as r}from"./vendor-mui-core-C-PhacC8.js";import{r as s}from"./vendor-react-DoD83n6N.js";import{aZ as a}from"./vendor-ux-did-connect-BQ3cvv_1.js";import{R as e}from"./vendor-arcblock-D8eCUoJY.js";import"./vendor-utils-CRBr0QUY.js";import"./vendor-hooks-DtYI0-rF.js";import"./lottie-web-B6s7dDoL.js";function x(){const{t:o}=s.useContext(a);return t.jsx(n,{style:{paddingTop:"25vh"},children:t.jsx(e,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const n=r.main``;export{x as default};
|