@abtnode/webapp 1.16.47-beta-20250731-014139-e860268f → 1.16.47-beta-20250805-095401-14eb156b
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{AdapterDayjs-BiAcanOe.js → AdapterDayjs-CyzsqR5_.js} +6 -6
- package/dist/assets/{Add-CMaOaJcy.js → Add-Dz07LTiF.js} +1 -1
- package/dist/assets/ArrowDropDown-aOYNuiBx.js +1 -0
- package/dist/assets/{Autocomplete-Jvr3OBqO.js → Autocomplete-CdF3wUNl.js} +1 -1
- package/dist/assets/{Breadcrumbs-CWrPLIEE.js → Breadcrumbs-D1NlQ5xh.js} +1 -1
- package/dist/assets/{ButtonGroup-BHDJ_xHw.js → ButtonGroup-uxUU66vm.js} +1 -1
- package/dist/assets/{CSSTransition-BKoPfTin.js → CSSTransition-mHEnDsZF.js} +1 -1
- package/dist/assets/{CallMerge-B_44wajA.js → CallMerge-CopeOpd1.js} +1 -1
- package/dist/assets/{CardContent-C9FF8zmo.js → CardContent-BkgRp6bH.js} +1 -1
- package/dist/assets/{ChevronLeft-C_5SFpZ3.js → ChevronLeft-R8Ol9Jib.js} +1 -1
- package/dist/assets/{ChevronRight-D5Dv2KwC.js → ChevronRight-DhuR3yky.js} +1 -1
- package/dist/assets/{Clear-DUjqNsqY.js → Clear-DZY_aw6a.js} +1 -1
- package/dist/assets/{DeleteOutline-BJkxA9W_.js → DeleteOutline-BtMPtKeR.js} +1 -1
- package/dist/assets/{Done-1e3LsE76.js → Done-ER9JHu1b.js} +1 -1
- package/dist/assets/{Edit-Brfok_V9.js → Edit-j7VDFfpA.js} +1 -1
- package/dist/assets/{ErrorOutline-DU8Lm-me.js → ErrorOutline-DjQP6yIy.js} +1 -1
- package/dist/assets/{FilterList-DdUKcAm_.js → FilterList-DZx93Kc7.js} +1 -1
- package/dist/assets/{Google-MHF3yZux.js → Google-BbJKv6O-.js} +1 -1
- package/dist/assets/{HelpOutline-r64pe9r_.js → HelpOutline-BgVjrAGA.js} +1 -1
- package/dist/assets/{Launch-BSO75Y-o.js → Launch-YZATuLri.js} +1 -1
- package/dist/assets/{Link-DxZkbVyA.js → Link-COWFXcCt.js} +1 -1
- package/dist/assets/{ListItemButton-CWYI6B1i.js → ListItemButton-f3yxZH17.js} +1 -1
- package/dist/assets/{ListSubheader-B5z3JXVs.js → ListSubheader-C9PLdgB7.js} +1 -1
- package/dist/assets/{LoadingButton-BvBtyajW.js → LoadingButton-DmT6qJ1L.js} +1 -1
- package/dist/assets/{MoreVert-B3-V93zF.js → MoreVert-DlCir_2U.js} +1 -1
- package/dist/assets/{OpenInNew-2p7Osi_B.js → OpenInNew-CTp6YVKn.js} +1 -1
- package/dist/assets/{Refresh-BwUIw44i.js → Refresh-aslnaYGc.js} +1 -1
- package/dist/assets/{Search-CVsnDnpP.js → Search-g9dL6AXZ.js} +1 -1
- package/dist/assets/{Slider-BUlXyua5.js → Slider-D3n3io44.js} +1 -1
- package/dist/assets/{Stepper-Yd1ce1vv.js → Stepper-ClmwtFAh.js} +1 -1
- package/dist/assets/{Switch-C1fxxz5n.js → Switch-DDtRD7Ag.js} +1 -1
- package/dist/assets/{TableSearch-CKX4rVuU.js → TableSearch-CU4SCCEn.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-DrT1SlJe.js → ToggleButtonGroup-BRX0t8dr.js} +1 -1
- package/dist/assets/{Verified-DYk2lw3M.js → Verified-BEx-BQ_w.js} +1 -1
- package/dist/assets/{VerifiedUser-NPP4tmwS.js → VerifiedUser-B_EunK8E.js} +1 -1
- package/dist/assets/{ViewList-Dxw4_fs_.js → ViewList-BIrMn57E.js} +1 -1
- package/dist/assets/{_createAggregator-BgffVIEW.js → _createAggregator-Bl3Xjuwm.js} +1 -1
- package/dist/assets/{actions-BWsi7i72.js → actions-DgP23YrP.js} +1 -1
- package/dist/assets/{actions-G3fsUkti.js → actions-LKjymUyt.js} +1 -1
- package/dist/assets/{agreement-DQuDFy25.js → agreement-DCYaG4s5.js} +1 -1
- package/dist/assets/api-COXhSEV8.js +1 -0
- package/dist/assets/{appearance-Se_lMnLq.js → appearance-Bhbkhb--.js} +1 -1
- package/dist/assets/{ar-DKohTs5n.js → ar-DDlrXmSt.js} +1 -1
- package/dist/assets/{audit-logs-CqQ2o-hd.js → audit-logs-Bi84fzD5.js} +1 -1
- package/dist/assets/{base-chart-_QOGjOWD.js → base-chart-C1S0U_BX.js} +1 -1
- package/dist/assets/{blocklet-BWShyefZ.js → blocklet-z9OAo2CJ.js} +1 -1
- package/dist/assets/{chain-4QRvY1Fq.js → chain-j7CK8IPn.js} +1 -1
- package/dist/assets/{click-to-copy-BgnS-qFa.js → click-to-copy-4j6qdr_t.js} +1 -1
- package/dist/assets/client-DyRCaRSb.js +1 -0
- package/dist/assets/cloneDeep-DX20zoeh.js +1 -0
- package/dist/assets/{collapse-DhWx6Fiz.js → collapse-Ca-budpd.js} +1 -1
- package/dist/assets/{config-navigation-CsJNd9mk.js → config-navigation-Dc_Yuos8.js} +4 -4
- package/dist/assets/{connect-to-BJU3I-tO.js → connect-to-DkDYpPl7.js} +3 -3
- package/dist/assets/{cssMode-BfuAy7Af.js → cssMode-D7_ytgKa.js} +1 -1
- package/dist/assets/{de-CYm7FmiN.js → de-DSALrqI8.js} +1 -1
- package/dist/assets/{delete-confirm-DRlMHX1Z.js → delete-confirm-D1CqCnLh.js} +1 -1
- package/dist/assets/{depsEqual-D0AotRxG.js → depsEqual-D3Ncz4Yx.js} +1 -1
- package/dist/assets/{detail-D5mwafWs.js → detail-Am0WihrQ.js} +3 -3
- package/dist/assets/{domains-Uw1IUOhz.js → domains-Vko2vOA7.js} +1 -1
- package/dist/assets/{download-BITZfYyH.js → download-BcxHfCLi.js} +1 -1
- package/dist/assets/emotion-cache.browser.esm-bc8DqDkz.js +1 -0
- package/dist/assets/engine-Ct4ncwVx.js +1 -0
- package/dist/assets/{es-5zob_8Of.js → es-DQvY5fGr.js} +1 -1
- package/dist/assets/{fr-GNzEzJIo.js → fr-BgvhEJ06.js} +1 -1
- package/dist/assets/{freemarker2-RPBEtbdT.js → freemarker2-D9-lW7Mk.js} +1 -1
- package/dist/assets/{get-safe-url-Dqogbkdq.js → get-safe-url-C7HfAhAi.js} +1 -1
- package/dist/assets/getValidReactChildren-kX991muZ.js +1 -0
- package/dist/assets/{graphqlMode-CaadduEK.js → graphqlMode-DDZi9DQx.js} +2 -2
- package/dist/assets/{handlebars-D8A3QMQA.js → handlebars-DCVJzWa3.js} +1 -1
- package/dist/assets/hi-DtMqBGN3.js +5 -0
- package/dist/assets/{html-mPnmQbuN.js → html-BcQyRYSJ.js} +1 -1
- package/dist/assets/{html-title-CacFoTyg.js → html-title-B7JhB9o9.js} +1 -1
- package/dist/assets/{htmlMode-DI5mRJJV.js → htmlMode-7GNcwLFo.js} +1 -1
- package/dist/assets/{id-CbyxMpli.js → id-DfDk8Cxy.js} +1 -1
- package/dist/assets/{iframe-Czk-UT3-.js → iframe-CNy-ihld.js} +1 -1
- package/dist/assets/{index-BOGGfGZP.js → index-5c1W3d0U.js} +1 -1
- package/dist/assets/{index-BwAWqOYq.js → index-B03ectPB.js} +1 -1
- package/dist/assets/{index-BbLteX_9.js → index-B1jSn7Zu.js} +3 -3
- package/dist/assets/{index-D_ZRDcUb.js → index-B3WOoGKx.js} +1 -1
- package/dist/assets/{index-CLTTHohk.js → index-B6rX45UB.js} +1 -1
- package/dist/assets/{index-CGfr_Xf0.js → index-B6sGfCw6.js} +1 -1
- package/dist/assets/{index-B9eEN6Ex.js → index-B9cjZqr-.js} +1 -1
- package/dist/assets/{index-sraicR1d.js → index-BBNuetwa.js} +1 -1
- package/dist/assets/{index-D4Q12FU6.js → index-BC9jQ-mn.js} +1 -1
- package/dist/assets/{index-CZj-IeN0.js → index-BJxvxA7W.js} +1 -1
- package/dist/assets/{index-CC-3XMOt.js → index-BLQWI1Qu.js} +1 -1
- package/dist/assets/{index-Bk2swyn_.js → index-BRCLi9vG.js} +13 -13
- package/dist/assets/{index-BiSZbdUR.js → index-BU5TxHl6.js} +1 -1
- package/dist/assets/{index-C7J9Tf7N.js → index-BX1Mzg80.js} +1 -1
- package/dist/assets/{index-BeXjeW_D.js → index-BXizf2Pp.js} +2 -2
- package/dist/assets/{index-B-8U8lYj.js → index-B_7Dkk-C.js} +1 -1
- package/dist/assets/{index-Df8aFWjk.js → index-BlQxTNpA.js} +1 -1
- package/dist/assets/{index-B1iMTf-1.js → index-Bx4n6xpl.js} +1 -1
- package/dist/assets/{index-CSsjxwWr.js → index-BxnGnnjI.js} +1 -1
- package/dist/assets/{index-jUWkwezj.js → index-C8xGRx5a.js} +3 -3
- package/dist/assets/{index-CqSRbifn.js → index-CJtHMYtz.js} +1 -1
- package/dist/assets/index-CTY9xV4o.js +332 -0
- package/dist/assets/{index-CwxkXQDN.js → index-CV5WCtNN.js} +1 -1
- package/dist/assets/{index-CjzEBnHB.js → index-CjiX3zf7.js} +30 -30
- package/dist/assets/{index-DFaykc-l.js → index-Cksc-yI0.js} +1 -1
- package/dist/assets/{index-DGqI12Zh.js → index-CwjJAtma.js} +1 -1
- package/dist/assets/{index-CmGv3elb.js → index-CxKaSt0u.js} +1 -1
- package/dist/assets/{index-DuWuA4Qr.js → index-D2lASthG.js} +1 -1
- package/dist/assets/{index-CmwksVS0.js → index-D3xIdBXo.js} +1 -1
- package/dist/assets/{index-C0IoSN2J.js → index-D8chmWoH.js} +1 -1
- package/dist/assets/{index-9W_t0LqL.js → index-DMzxl-va.js} +1 -1
- package/dist/assets/{index-C2SQKbgp.js → index-DUA4mTCX.js} +1 -1
- package/dist/assets/{index-BCt6EuqV.js → index-DXnwsaut.js} +1 -1
- package/dist/assets/{index-CagsSpuh.js → index-Db9FICR5.js} +9 -9
- package/dist/assets/{index-D-Icpyc2.js → index-DerVp_bY.js} +1 -1
- package/dist/assets/{index-n35bDjPH.js → index-Dh6GfRKJ.js} +1 -1
- package/dist/assets/{index-Cz0waa_4.js → index-DjR1zbg3.js} +1 -1
- package/dist/assets/{index-C7H9Stfd.js → index-DkN1HlHV.js} +1 -1
- package/dist/assets/{index-WWc-YnJr.js → index-Dl7BKvf8.js} +1 -1
- package/dist/assets/{index-COsQ2pDX.js → index-GdreGZBa.js} +1 -1
- package/dist/assets/{index-CsVDrMMd.js → index-VN8y-f9l.js} +2 -2
- package/dist/assets/{index-Cyh9wrDu.js → index-ck9n8wVf.js} +2 -2
- package/dist/assets/{index-DSZpPG9s.js → index-fpNGCDJ-.js} +3 -3
- package/dist/assets/index-obW-fHMI.js +1 -0
- package/dist/assets/{index-CWfqG7JG.js → index-rJc4vIFz.js} +3 -3
- package/dist/assets/{index-dQzdi1Hq.js → index-vlWnPMrO.js} +1 -1
- package/dist/assets/{index.esm-CXCRSK_f.js → index.esm-CXsEW-BA.js} +1 -1
- package/dist/assets/{install-from-url-Bpa-muAm.js → install-from-url-DHXHVZNV.js} +1 -1
- package/dist/assets/{invitation-hZO0WzEZ.js → invitation-DnatJs8M.js} +6 -6
- package/dist/assets/{is-path-prefix-equal-CpCr5Pp2.js → is-path-prefix-equal-DlMcxVqF.js} +1 -1
- package/dist/assets/{item-Ds6r8B85.js → item-DOeBStbn.js} +1 -1
- package/dist/assets/{ja-BPCCKkW4.js → ja-GXo4l4Hp.js} +1 -1
- package/dist/assets/{javascript-CGPbA1CY.js → javascript-CiNqhInB.js} +1 -1
- package/dist/assets/{jsonMode-Dlg8sdnH.js → jsonMode-B7si7AYS.js} +1 -1
- package/dist/assets/{ko-Wbe93sio.js → ko-1dMP3P8A.js} +1 -1
- package/dist/assets/{liquid-D13SNYj1.js → liquid-DcLgsUvA.js} +1 -1
- package/dist/assets/{list-header-DZTbN58s.js → list-header-BdwPdjEP.js} +1 -1
- package/dist/assets/{log-C--AbUmH.js → log-DX5somNu.js} +1 -1
- package/dist/assets/{lottie-react.esm-bHdqVYkV.js → lottie-react.esm-D9qFGrGF.js} +1 -1
- package/dist/assets/{mdx-geJ5pn3l.js → mdx-CbnSSmgy.js} +1 -1
- package/dist/assets/memory-CVZNDADf.js +1 -0
- package/dist/assets/{metric-nF2Xx_cP.js → metric-DmHEA1lS.js} +1 -1
- package/dist/assets/omit-D1IP94c4.js +1 -0
- package/dist/assets/{overview-DbcbGc2C.js → overview-CZ8zBS1b.js} +1 -1
- package/dist/assets/{permission-DG9uH24n.js → permission-CnIxTKRh.js} +1 -1
- package/dist/assets/{preference-DQfFXuWW.js → preference-DcZfJHnf.js} +3 -3
- package/dist/assets/pt-5iS1WU13.js +5 -0
- package/dist/assets/{python-Cdls_5iy.js → python-_uXH3fED.js} +1 -1
- package/dist/assets/{raf-schd.esm-BfNfEe8D.js → raf-schd.esm-Do0aHYtf.js} +1 -1
- package/dist/assets/{razor-DxOaQqxx.js → razor-DhTHbO3O.js} +1 -1
- package/dist/assets/{rotate-session-key-BXcd-5Zn.js → rotate-session-key-B6HMRYtM.js} +1 -1
- package/dist/assets/ru-DpIRvFxj.js +5 -0
- package/dist/assets/{runtime-CzuKUbuj.js → runtime-CnPiGt6o.js} +1 -1
- package/dist/assets/schema-DOBfBFVN.js +1 -0
- package/dist/assets/sdk-CPHYuCqn.js +1 -0
- package/dist/assets/{service-zTgtva4o.js → service-I0FamUaY.js} +1 -1
- package/dist/assets/{shorten-label-BCEJK9kd.js → shorten-label-CgafvTt_.js} +1 -1
- package/dist/assets/{simple-select-DGcxx-W-.js → simple-select-BW8_mJw0.js} +1 -1
- package/dist/assets/{spaces-CUI-UEB-.js → spaces-Cvskr3ib.js} +1 -1
- package/dist/assets/{status-mS0PFNHr.js → status-CIqN1RmX.js} +1 -1
- package/dist/assets/{status-Bi_Pou8g.js → status-D40uoqg7.js} +1 -1
- package/dist/assets/{switch-control-BBKsCU2Y.js → switch-control-BS39XMMs.js} +1 -1
- package/dist/assets/{table-icons-hZGjJ2eg.js → table-icons-Chd4Cuaw.js} +1 -1
- package/dist/assets/team-CPlGWHuv.js +1 -0
- package/dist/assets/th-BjX3AJzF.js +5 -0
- package/dist/assets/{toLower-p7cMPP8n.js → toLower-CwsAVGut.js} +1 -1
- package/dist/assets/toUpper-Coiq1GUC.js +1 -0
- package/dist/assets/{traffic-B8RUG_pS.js → traffic-hsYNJcij.js} +1 -1
- package/dist/assets/{tsMode-B0Ss7AK7.js → tsMode-Dt01ellK.js} +1 -1
- package/dist/assets/{typescript-Cq9RZqPR.js → typescript-D1Rqiexu.js} +1 -1
- package/dist/assets/{url-evaluation-BMLhywvu.js → url-evaluation-BvP4dPCg.js} +1 -1
- package/dist/assets/{url-join-CBh7FZtG.js → url-join-CB5VZRlf.js} +1 -1
- package/dist/assets/{use-mobile-BHeriyen.js → use-mobile-BPNr-WoZ.js} +1 -1
- package/dist/assets/{use-mobile-Dn3IunVN.js → use-mobile-BkJ6PliY.js} +1 -1
- package/dist/assets/{useAsync-ByzD9-iZ.js → useAsync-C5j0evHu.js} +1 -1
- package/dist/assets/{useAsyncRetry-CrZGrFzH.js → useAsyncRetry-BIIM28KL.js} +1 -1
- package/dist/assets/{useLocalStorage-BHL7RS8q.js → useLocalStorage-8wesT5Qc.js} +1 -1
- package/dist/assets/{useThemeProps-DooTQWd6.js → useThemeProps-CKs40G8i.js} +1 -1
- package/dist/assets/{util-BErsOHdh.js → util-DJbBaKoW.js} +1 -1
- package/dist/assets/vi-0Dtw7069.js +5 -0
- package/dist/assets/{wait-container-DfL-msy6.js → wait-container-DHjIvBSg.js} +1 -1
- package/dist/assets/{without-wallet-BwvrV6Xc.js → without-wallet-C5aGlhvw.js} +1 -1
- package/dist/assets/wrap-locale-nZymQBqL.js +1 -0
- package/dist/assets/{xml-Cr_Y_Yft.js → xml-CttGgm-h.js} +1 -1
- package/dist/assets/{yaml-RBxoeLGe.js → yaml-DJW2yM3_.js} +1 -1
- package/dist/assets/{zh-ZjW3xV_P.js → zh-BoO0jdid.js} +2 -2
- package/dist/assets/{zh-tw-BuqwZI-0.js → zh-tw-D4_7lUjD.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/ArrowDropDown-BidZ6YZa.js +0 -1
- package/dist/assets/api-BJGpnzKK.js +0 -1
- package/dist/assets/client-a5hg5ILL.js +0 -1
- package/dist/assets/cloneDeep-DUxbCdHx.js +0 -1
- package/dist/assets/emotion-cache.browser.esm-BDnrC0c-.js +0 -1
- package/dist/assets/engine-3IdUdjkH.js +0 -1
- package/dist/assets/getValidReactChildren-SkwQHrW1.js +0 -1
- package/dist/assets/hi-BMaS53lF.js +0 -5
- package/dist/assets/index-DcxGCVz2.js +0 -1
- package/dist/assets/index-Pb0zzrzv.js +0 -332
- package/dist/assets/memory-DLJFi013.js +0 -1
- package/dist/assets/omit-CMtjAJiD.js +0 -1
- package/dist/assets/pt-C1fHGXQk.js +0 -5
- package/dist/assets/ru-DJ3aNml8.js +0 -5
- package/dist/assets/schema-CgZR3vFp.js +0 -1
- package/dist/assets/sdk-CJb0Z10-.js +0 -1
- package/dist/assets/team-1bg7ZL8j.js +0 -1
- package/dist/assets/th-C22KCFdo.js +0 -5
- package/dist/assets/toUpper-g96Av6xB.js +0 -1
- package/dist/assets/vi-D_AWh4Q3.js +0 -5
- package/dist/assets/wrap-locale-DdILYRop.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as v,j as t,N as a,dc as w,m as z,f as p,dj as E}from"./index-
|
|
1
|
+
import{aG as v,j as t,N as a,dc as w,m as z,f as p,dj as E}from"./index-CjiX3zf7.js";const I=v(t.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m4.3 14.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0a.996.996 0 0 1 0-1.41L10.59 12 7.7 9.11a.996.996 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41"}));function r({icon:e=null,title:n="",description:o="",extra:b=null,...y}){return t.jsxs(P,{...y,children:[e,typeof n=="string"?t.jsx(a,{sx:{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center"},children:n}):n,typeof o=="string"?t.jsx(a,{sx:{mt:1,fontSize:14,color:"#7F828B",textAlign:"center"},children:o}):o,t.jsx(a,{sx:{mt:3},children:b})]})}const P=w("div")`
|
|
2
2
|
box-sizing: border-box;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,g as n,j as t,s as r}from"./index-
|
|
1
|
+
import{r as o,g as n,j as t,s as r}from"./index-CjiX3zf7.js";import{p as a}from"./index-DerVp_bY.js";function c(){const{t:s}=o.useContext(n);return t.jsx(e,{style:{paddingTop:"25vh"},children:t.jsx(a,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const e=r.main``;export{c as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,N as g,_ as ue,s as R,a0 as K,m as U,r as f,a1 as fe,y as v,a2 as Me,a3 as ze,o as E,a4 as oe,a5 as We,H as I,Y as Q,T as $,a6 as He,v as B,$ as qe,D as Ve,t as Ye,X as xe,C as ge,a7 as Ke,a8 as Qe,a9 as Xe,u as N,g as Je,aa as M,n as se,B as Ze,ab as re,A as ye,q as ae,ac as et,W as ne,L as X,w as we,x as J,ad as tt,ae as ke,af as st,b as P,ag as le,ah as ot,K as rt,ai as at,aj as nt,O as it,f as lt,ak as ct,al as be,am as Se,an as ve,ao as L,ap as je,aq as Re,ar as Ce,as as Pe,at as Te,au as dt,av as ce}from"./index-
|
|
1
|
+
import{j as e,N as g,_ as ue,s as R,a0 as K,m as U,r as f,a1 as fe,y as v,a2 as Me,a3 as ze,o as E,a4 as oe,a5 as We,H as I,Y as Q,T as $,a6 as He,v as B,$ as qe,D as Ve,t as Ye,X as xe,C as ge,a7 as Ke,a8 as Qe,a9 as Xe,u as N,g as Je,aa as M,n as se,B as Ze,ab as re,A as ye,q as ae,ac as et,W as ne,L as X,w as we,x as J,ad as tt,ae as ke,af as st,b as P,ag as le,ah as ot,K as rt,ai as at,aj as nt,O as it,f as lt,ak as ct,al as be,am as Se,an as ve,ao as L,ap as je,aq as Re,ar as Ce,as as Pe,at as Te,au as dt,av as ce}from"./index-CjiX3zf7.js";import{t as pt}from"./toLower-CwsAVGut.js";import{a as W,u as mt,W as ht,P as Ee,L as Be}from"./index-B03ectPB.js";import{A as ut,D as ie,u as ft,W as xt,P as gt,a as De,L as Ue}from"./wait-container-DHjIvBSg.js";import{g as Z}from"./get-safe-url-C7HfAhAi.js";import{u as de}from"./useLocalStorage-8wesT5Qc.js";import{L as yt}from"./Launch-YZATuLri.js";import{D as wt}from"./DeleteOutline-BtMPtKeR.js";import{g as kt,i as bt}from"./spaces-Cvskr3ib.js";import{I as St}from"./MoreVert-DlCir_2U.js";import{y as vt}from"./index-vlWnPMrO.js";import"./url-join-CB5VZRlf.js";import"./use-mobile-BPNr-WoZ.js";import"./api-COXhSEV8.js";function Oe({children:s,selected:n=!1}){return e.jsxs(jt,{children:[s,e.jsx(g,{className:`selected-container ${n?"selected":""}`,children:e.jsx(ue,{className:"selected-icon"})})]})}const jt=R(g)`
|
|
2
2
|
position: relative;
|
|
3
3
|
|
|
4
4
|
.selected-container {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as Ge,j as e,bn as gt,r as g,by as X,bf as H,H as U,E as D,p as xt,o as d,h as te,au as bt,az as jt,N as y,T as $,m as Q,eM as Fe,Q as Pe,ic as Ye,bj as Te,aU as Ie,V as Ee,dG as we,b3 as qe,b1 as Ae,C as Xe,f as Qe,e_ as Je,aP as De,W as yt,at as Ze,id as et,v as Oe,f0 as tt,fq as ye,fG as st,dA as St,s as ie,ag as pe,G as Ue,av as vt,ie as Ct,ig as Nt,$ as nt,ih as wt,ii as Rt,ij as Tt,ik as It,P as Et,bt as it,M as At,R as Dt,S as Ot,U as $e,il as Lt,a4 as kt}from"./index-CjzEBnHB.js";import{d as Ft,H as at,g as Pt}from"./index-CLTTHohk.js";import{R as _e,S as _t}from"./actions-BWsi7i72.js";import{B as Bt}from"./index-DuWuA4Qr.js";import{S as me}from"./shorten-label-BCEJK9kd.js";import{v as ot}from"./index-B-8U8lYj.js";import{T as zt}from"./html-title-CacFoTyg.js";import{R as Wt}from"./Refresh-BwUIw44i.js";import{D as Mt,g as Kt}from"./traffic-B8RUG_pS.js";import{u as Ht}from"./use-mobile-BHeriyen.js";import"./FilterList-DdUKcAm_.js";import"./CSSTransition-BKoPfTin.js";import"./emotion-cache.browser.esm-BDnrC0c-.js";import"./index-CqSRbifn.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-D0AotRxG.js";import"./index-dQzdi1Hq.js";import"./TableSearch-CKX4rVuU.js";import"./Search-CVsnDnpP.js";import"./Clear-DUjqNsqY.js";import"./MoreVert-B3-V93zF.js";import"./useLocalStorage-BHL7RS8q.js";import"./url-evaluation-BMLhywvu.js";import"./get-safe-url-Dqogbkdq.js";import"./ButtonGroup-BHDJ_xHw.js";import"./getValidReactChildren-SkwQHrW1.js";import"./permission-DG9uH24n.js";import"./index.esm-CXCRSK_f.js";import"./collapse-DhWx6Fiz.js";import"./blocklet-BWShyefZ.js";import"./Switch-C1fxxz5n.js";import"./iframe-Czk-UT3-.js";import"./ChevronLeft-C_5SFpZ3.js";import"./ChevronRight-D5Dv2KwC.js";import"./index-DBii9-f-.js";import"./base-chart-_QOGjOWD.js";import"./index-DGqI12Zh.js";import"./AdapterDayjs-BiAcanOe.js";import"./useThemeProps-DooTQWd6.js";import"./visuallyHidden-Dan1xhjv.js";const qt=Ge(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"})),Ut=Ge(e.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 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-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),rt=g.createContext({}),{Provider:$t,Consumer:an}=rt;function Vt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:a}}=gt(),[l,x]=g.useState([]),[u,T]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),f=X(()=>s.meta?.did,[s]),[v,C]=g.useState([]),[F,_]=g.useState({}),N=X(()=>l.length?new Set(l.map(h=>h.id)):new Set,[l]),V=async({page:h=1,pageSize:S=20,...I}={})=>{if(!f)return[];try{const w={paging:{page:h,pageSize:S},...I,teamDid:f,dateRange:I.dateRange?[H(I.dateRange[0]).toISOString(),H(I.dateRange[1]).toISOString()]:void 0},{dids:E,...k}=w;let B="";E&&E.includes("system")&&(B="system");const ae=E?E.filter(oe=>oe!=="system"):[],ne={...k,source:B,componentDids:ae},ee=await n.getNotificationSendLog({input:ne});return _(ne),x(ee.list),T(ee.paging),ee.list}catch(w){return U.error(w.message),[]}},P=async()=>{const h=await n.getNotificationComponents({input:{teamDid:f}});C(h.componentDids)},L=g.useCallback(h=>{const S=s.children.find(I=>I.meta?.did===h);if(S)return S.ancestors=[s],S},[s]),W=async({notificationId:h,receivers:S,channels:I,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:h,receivers:S,channels:I.map(E=>E==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:E==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:E),...w}})},q=g.useCallback(async h=>(await n.getUser({input:{teamDid:f,user:{did:h}}})).user,[n,f]),Y=g.useCallback(async({page:h=1,pageSize:S=20,...I}={})=>{try{const w={paging:{page:h,pageSize:S},...I,userName:I.searchText||"",teamDid:f,dateRange:I.dateRange?[H(I.dateRange[0]).toISOString(),H(I.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw U.error(w.message),w}},[n,f]);g.useEffect(()=>{f&&P()},[f]),a(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,h=>{N.has(h.notificationId)&&V(F)},[N,F]),a(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,h=>{N.has(h.id)||V(F)},[N,F]);const Z={fetch:V,data:l,paging:u,blocklet:s,getComponent:L,resendNotification:W,getUser:q,componentDids:v,getReceivers:Y,inService:r,teamDid:f};return e.jsx($t,{value:{notificationRecords:Z},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Gt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Gt[t],children:t})}const Yt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:a,reason:l="",channel:x="wallet"}=n,u=a?t("notification.sendStatus.sentTime",{date:bt(a,s)}):"",T=Yt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:T}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=te(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Qt=(t,s)=>{const n=te(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Jt=t=>({enabled:te(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:te(t,"extra.webhooks",[]).length>0}),be=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),es=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],je=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},ts=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=te(t,l,[]);return je(x)}const n=te(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return je(l)}const a={};return ke.forEach(l=>{const x=`${l}SendRecord`,u=te(t,x,[]),T=je(u);a[l]=T}),r.length>0&&r.forEach(l=>{const x=n[l]??[],u=je(x);a[l]=u}),a},Se=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ss=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function se({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:a,title:l="",sentTime:x="",reason:u=""}=t,T=[l,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx($,{color:"inherit",sx:{fontSize:12},children:T}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(y,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(y,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a]}}),e.jsx(y,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]}})]}),e.jsx($,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}se.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Ce({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:a}=Q();return e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs($,{children:[s,": "]}),t.map(l=>{const x=lt(r,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(se,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,l)},l)})]})}ze.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function ze({filterList:t,onChange:s,index:n,column:r,filterValues:a,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(u=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(u.value??u)>-1,onChange:T=>{const f=[...t];T.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(v=>v!==(u.value??u)),s(f[n],n,r)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(se,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:a}){const{t:l,locale:x}=Q(),u=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(se,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=Q(),r=H().toDate(),[a,l]=g.useState(null),x=g.useCallback(f=>{l(a?null:f.currentTarget)},[a]),u=!!a,T=g.useCallback(f=>{if(!f.startDate||!f.endDate){U.error("Please select a date range");return}if(H(f.startDate).isAfter(f.endDate)||!H(f.startDate).isValid()||!H(f.endDate).isValid()){U.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx($,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(we,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[qe(t[0],n)," - ",qe(t[1],n)]})}),e.jsx(Ae,{open:u,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Mt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Kt(r),onChange:T})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=Q();return!s?.filterList?.filter(a=>a.length).length?null:e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Ft.TableFilterList,{...s,ItemComponent:t})})]})}function Ke({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const a=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}Ke.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const ns=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Q(),[a,l]=g.useState(ns),[x,u]=g.useState(!0),T=(v,C)=>{C.checked=v.target.checked;const F=a.map(_=>({..._,checked:_.value===C.value?C.checked:_.checked}));l(F)},f=v=>{v.stopPropagation(),n({channels:a.filter(C=>C.checked).map(C=>C.value),isResendFailedOnly:x})};return e.jsxs(y,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx($,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(y,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(v=>e.jsx(Ie,{control:e.jsx(Ee,{checked:v.checked,onChange:C=>T(C,v),name:v.value}),label:v.label},v.value))})]})}),e.jsx(y,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:v=>u(v.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(y,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(we,{onClick:v=>{v.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Xe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:a}=Q(),l=Qe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:u,inService:T,teamDid:f,getUser:v,blocklet:C}=Be(),[F,_]=g.useState(!1),[N,V]=g.useState([]),P=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[W,q]=g.useState(null),[Y,Z]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[h,S]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[I,w]=g.useState([]),E=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],k=async()=>{if(!F&&t)try{_(!0);const i=await u({notificationId:t,...h}),o=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,f,T)}}));V(o),Z(i.paging),_(!1)}catch(i){U.error(i.message),_(!1)}};g.useEffect(()=>{k()},[h]);const B=i=>{i.stopPropagation();const o=i.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:B,children:r("notification.resend")})}):null,ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:Y.page-1,rowsPerPage:Y.pageSize,count:Y.total,searchText:h.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:I,onRowSelectionChange:(i,o)=>{w(o.map(c=>c.dataIndex))},customToolbarSelect:ae},ee=({page:i,rowsPerPage:o,searchText:c,filterList:j})=>{const[,z=[],G=[],K=[]]=j;h.pageSize!==o?S(M=>({...M,pageSize:o,page:1})):h.page!==i+1?S(M=>({...M,page:i+1})):h.searchText!==c?S(M=>({...M,searchText:c,page:1})):pe(z,h.walletSendStatus)?pe(G,h.pushKitSendStatus)?pe(K,h.emailSendStatus)||S(M=>({...M,emailSendStatus:K,page:1})):S(M=>({...M,pushKitSendStatus:G,page:1})):S(M=>({...M,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,o)=>{if(!o)return!1;const c=await v(o);return c?i==="wallet"?Jt(c):i==="email"?Xt(C,c):i==="pushKit"?Qt(C,c):i==="webhook"?Zt(c):!0:!1},[v,C]),ge=g.useCallback(i=>es(r,i),[r]),re=()=>{P.anchorEl=null,P.position=null,q(null)},le=()=>{L.anchorEl=null,L.position=null},m=async(i,o,c=!0,j="")=>{if(!(!o.length||!i.length))try{s(i,o,c,j),L.anchorEl||(await be(.5),re())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:o})=>{const c=I.map(j=>N[j].receiver);await m(i,c,o),await be(.5),le(),w([])},b=async(i,o=[],c=!0)=>{try{await m(["webhook"],[i.receiver],c,o)}catch(j){U.error(j.response?j.response.statusText:j.message)}},R=async(i,o,c,j=[],z=!0)=>{if(i.stopPropagation(),ts(o,c)>=4){U.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await b(o,j,z);return}if(i){const K=i.currentTarget,M=K.getBoundingClientRect();P.anchorEl=K,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}q({channel:c});try{const K=await oe(c,o.receiver);await be(1),q({channel:c,result:K}),(typeof K=="boolean"&&K||St(K)&&Object.values(K).every(M=>!!M))&&(await s([c],[o.receiver],z),L.anchorEl||(await be(.5),re()))}catch(K){U.error(K.message)}},O=i=>{S(o=>({...o,dateRange:i,page:1}))},A=(i,o,c,j)=>{i.stopPropagation();const z=c.filter(G=>G!==o);S(G=>({...G,[j]:z,page:1}))},J=X(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:o,receiver:c}=N[i];return o?e.jsxs(y,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${o.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:o.fullName})]},c):e.jsx(yt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:h.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[1].options.filterList,"walletSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:o,index:c,column:j,filterValues:E})},customBodyRenderLite:i=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"wallet",onResend:z=>R(z,N[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"pushkit",onResend:z=>R(z,N[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:h.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[2].options.filterList,"pushKitSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"email",onResend:z=>R(z,N[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:h.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[3].options.filterList,"emailSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Email",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:o}=N[i];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[j,z]=c,G=z[0];return e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(y,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:j},j),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:K=>R(K,N[i],"webhook",[j],!1)})]},j)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:o}=N[i];return e.jsx(et,{value:o,locale:a,shouldUpdate:!0})}}}],[N,a,h,r]),xe=[e.jsx(We,{value:h.dateRange,onChange:O},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:F,startIcon:e.jsx(Wt,{}),onClick:()=>k(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(y,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(as,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:a,loading:F,columns:J,data:N,onChange:ee,options:ne,customButtons:xe,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:o=>e.jsx(Ke,{...o,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Ae,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(os,{children:[e.jsxs($,{variant:"body1",component:"div",className:"check-title",children:[W?.channel," Checking"]}),e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:ge(W?.channel).map(i=>{const{type:o,pass:c,fail:j}=i;return!W?.result||W?.result?.[o]?e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:W?.result?.[o]?ye.success.main:"inherit"},children:[W?.result?e.jsx(Ut,{}):e.jsx(Xe,{size:12,sx:{color:ye.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:ye.error.main},children:[e.jsx(qt,{}),e.jsx("span",{children:j})]},o)})})]})}),L.anchorEl&&e.jsx(Ae,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:le,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:le,onConfirm:p})})]})})})}const is=g.memo(ft),as=ie.div`
|
|
1
|
+
import{aG as Ge,j as e,bn as gt,r as g,by as X,bf as H,H as U,E as D,p as xt,o as d,h as te,au as bt,az as jt,N as y,T as $,m as Q,eM as Fe,Q as Pe,ic as Ye,bj as Te,aU as Ie,V as Ee,dG as we,b3 as qe,b1 as Ae,C as Xe,f as Qe,e_ as Je,aP as De,W as yt,at as Ze,id as et,v as Oe,f0 as tt,fq as ye,fG as st,dA as St,s as ie,ag as pe,G as Ue,av as vt,ie as Ct,ig as Nt,$ as nt,ih as wt,ii as Rt,ij as Tt,ik as It,P as Et,bt as it,M as At,R as Dt,S as Ot,U as $e,il as Lt,a4 as kt}from"./index-CjiX3zf7.js";import{d as Ft,H as at,g as Pt}from"./index-B6rX45UB.js";import{R as _e,S as _t}from"./actions-DgP23YrP.js";import{B as Bt}from"./index-D2lASthG.js";import{S as me}from"./shorten-label-CgafvTt_.js";import{v as ot}from"./index-B_7Dkk-C.js";import{T as zt}from"./html-title-B7JhB9o9.js";import{R as Wt}from"./Refresh-aslnaYGc.js";import{D as Mt,g as Kt}from"./traffic-hsYNJcij.js";import{u as Ht}from"./use-mobile-BPNr-WoZ.js";import"./FilterList-DZx93Kc7.js";import"./CSSTransition-mHEnDsZF.js";import"./emotion-cache.browser.esm-bc8DqDkz.js";import"./index-CJtHMYtz.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-D3Ncz4Yx.js";import"./index-vlWnPMrO.js";import"./TableSearch-CU4SCCEn.js";import"./Search-g9dL6AXZ.js";import"./Clear-DZY_aw6a.js";import"./MoreVert-DlCir_2U.js";import"./useLocalStorage-8wesT5Qc.js";import"./url-evaluation-BvP4dPCg.js";import"./get-safe-url-C7HfAhAi.js";import"./ButtonGroup-uxUU66vm.js";import"./getValidReactChildren-kX991muZ.js";import"./permission-CnIxTKRh.js";import"./index.esm-CXsEW-BA.js";import"./collapse-Ca-budpd.js";import"./blocklet-z9OAo2CJ.js";import"./Switch-DDtRD7Ag.js";import"./iframe-CNy-ihld.js";import"./ChevronLeft-R8Ol9Jib.js";import"./ChevronRight-DhuR3yky.js";import"./index-DBii9-f-.js";import"./base-chart-C1S0U_BX.js";import"./index-CwjJAtma.js";import"./AdapterDayjs-CyzsqR5_.js";import"./useThemeProps-CKs40G8i.js";import"./visuallyHidden-Dan1xhjv.js";const qt=Ge(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"})),Ut=Ge(e.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 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-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),rt=g.createContext({}),{Provider:$t,Consumer:an}=rt;function Vt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:a}}=gt(),[l,x]=g.useState([]),[u,T]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),f=X(()=>s.meta?.did,[s]),[v,C]=g.useState([]),[F,_]=g.useState({}),N=X(()=>l.length?new Set(l.map(h=>h.id)):new Set,[l]),V=async({page:h=1,pageSize:S=20,...I}={})=>{if(!f)return[];try{const w={paging:{page:h,pageSize:S},...I,teamDid:f,dateRange:I.dateRange?[H(I.dateRange[0]).toISOString(),H(I.dateRange[1]).toISOString()]:void 0},{dids:E,...k}=w;let B="";E&&E.includes("system")&&(B="system");const ae=E?E.filter(oe=>oe!=="system"):[],ne={...k,source:B,componentDids:ae},ee=await n.getNotificationSendLog({input:ne});return _(ne),x(ee.list),T(ee.paging),ee.list}catch(w){return U.error(w.message),[]}},P=async()=>{const h=await n.getNotificationComponents({input:{teamDid:f}});C(h.componentDids)},L=g.useCallback(h=>{const S=s.children.find(I=>I.meta?.did===h);if(S)return S.ancestors=[s],S},[s]),W=async({notificationId:h,receivers:S,channels:I,...w})=>{await n.resendNotification({input:{teamDid:f,notificationId:h,receivers:S,channels:I.map(E=>E==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:E==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:E),...w}})},q=g.useCallback(async h=>(await n.getUser({input:{teamDid:f,user:{did:h}}})).user,[n,f]),Y=g.useCallback(async({page:h=1,pageSize:S=20,...I}={})=>{try{const w={paging:{page:h,pageSize:S},...I,userName:I.searchText||"",teamDid:f,dateRange:I.dateRange?[H(I.dateRange[0]).toISOString(),H(I.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:w})}catch(w){throw U.error(w.message),w}},[n,f]);g.useEffect(()=>{f&&P()},[f]),a(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,h=>{N.has(h.notificationId)&&V(F)},[N,F]),a(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,h=>{N.has(h.id)||V(F)},[N,F]);const Z={fetch:V,data:l,paging:u,blocklet:s,getComponent:L,resendNotification:W,getUser:q,componentDids:v,getReceivers:Y,inService:r,teamDid:f};return e.jsx($t,{value:{notificationRecords:Z},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Gt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Gt[t],children:t})}const Yt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:a,reason:l="",channel:x="wallet"}=n,u=a?t("notification.sendStatus.sentTime",{date:bt(a,s)}):"",T=Yt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:u,reason:T}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:u}:{status:"pending",title:t("notification.sendStatus.pending"),reason:T,sentTime:u}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=te(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Qt=(t,s)=>{const n=te(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Jt=t=>({enabled:te(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:te(t,"extra.webhooks",[]).length>0}),be=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),es=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],je=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},ts=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=te(t,l,[]);return je(x)}const n=te(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return je(l)}const a={};return ke.forEach(l=>{const x=`${l}SendRecord`,u=te(t,x,[]),T=je(u);a[l]=T}),r.length>0&&r.forEach(l=>{const x=n[l]??[],u=je(x);a[l]=u}),a},Se=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},ve=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ss=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function se({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:a,title:l="",sentTime:x="",reason:u=""}=t,T=[l,u].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx($,{color:"inherit",sx:{fontSize:12},children:T}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(y,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(y,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(y,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a]}}),e.jsx(y,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]}})]}),e.jsx($,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}se.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};Ce.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function Ce({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:a}=Q();return e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs($,{children:[s,": "]}),t.map(l=>{const x=lt(r,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(y,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(se,{config:x,enableTooltip:!1,children:x.title})}),onDelete:u=>n(u,l)},l)})]})}ze.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function ze({filterList:t,onChange:s,index:n,column:r,filterValues:a,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(u=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(u.value??u)>-1,onChange:T=>{const f=[...t];T.target.checked?f[n]=[...f[n],u.value??u]:f[n]=f[n].filter(v=>v!==(u.value??u)),s(f[n],n,r)},name:u.value??u}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(u)})},u.value??u))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(se,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:a}){const{t:l,locale:x}=Q(),u=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(y,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(se,{config:u,showTitle:!0}),u.status!=="success"&&e.jsx(we,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=Q(),r=H().toDate(),[a,l]=g.useState(null),x=g.useCallback(f=>{l(a?null:f.currentTarget)},[a]),u=!!a,T=g.useCallback(f=>{if(!f.startDate||!f.endDate){U.error("Please select a date range");return}if(H(f.startDate).isAfter(f.endDate)||!H(f.startDate).isValid()||!H(f.endDate).isValid()){U.error("Invalid date range");return}s([f.startDate,f.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx($,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(we,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[qe(t[0],n)," - ",qe(t[1],n)]})}),e.jsx(Ae,{open:u,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Mt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Kt(r),onChange:T})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=Q();return!s?.filterList?.filter(a=>a.length).length?null:e.jsxs(y,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Ft.TableFilterList,{...s,ItemComponent:t})})]})}function Ke({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const a=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}Ke.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const ns=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=Q(),[a,l]=g.useState(ns),[x,u]=g.useState(!0),T=(v,C)=>{C.checked=v.target.checked;const F=a.map(_=>({..._,checked:_.value===C.value?C.checked:_.checked}));l(F)},f=v=>{v.stopPropagation(),n({channels:a.filter(C=>C.checked).map(C=>C.value),isResendFailedOnly:x})};return e.jsxs(y,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx($,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(y,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(v=>e.jsx(Ie,{control:e.jsx(Ee,{checked:v.checked,onChange:C=>T(C,v),name:v.value}),label:v.label},v.value))})]})}),e.jsx(y,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:v=>u(v.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(y,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(we,{onClick:v=>{v.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(we,{onClick:f,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Xe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:a}=Q(),l=Qe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:u,inService:T,teamDid:f,getUser:v,blocklet:C}=Be(),[F,_]=g.useState(!1),[N,V]=g.useState([]),P=De({anchorEl:null,position:null}),L=De({anchorEl:null,position:null}),[W,q]=g.useState(null),[Y,Z]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[h,S]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[I,w]=g.useState([]),E=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],k=async()=>{if(!F&&t)try{_(!0);const i=await u({notificationId:t,...h}),o=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,f,T)}}));V(o),Z(i.paging),_(!1)}catch(i){U.error(i.message),_(!1)}};g.useEffect(()=>{k()},[h]);const B=i=>{i.stopPropagation();const o=i.currentTarget;L.anchorEl=o;const c=o.getBoundingClientRect();L.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:B,children:r("notification.resend")})}):null,ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:Y.page-1,rowsPerPage:Y.pageSize,count:Y.total,searchText:h.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:I,onRowSelectionChange:(i,o)=>{w(o.map(c=>c.dataIndex))},customToolbarSelect:ae},ee=({page:i,rowsPerPage:o,searchText:c,filterList:j})=>{const[,z=[],G=[],K=[]]=j;h.pageSize!==o?S(M=>({...M,pageSize:o,page:1})):h.page!==i+1?S(M=>({...M,page:i+1})):h.searchText!==c?S(M=>({...M,searchText:c,page:1})):pe(z,h.walletSendStatus)?pe(G,h.pushKitSendStatus)?pe(K,h.emailSendStatus)||S(M=>({...M,emailSendStatus:K,page:1})):S(M=>({...M,pushKitSendStatus:G,page:1})):S(M=>({...M,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,o)=>{if(!o)return!1;const c=await v(o);return c?i==="wallet"?Jt(c):i==="email"?Xt(C,c):i==="pushKit"?Qt(C,c):i==="webhook"?Zt(c):!0:!1},[v,C]),ge=g.useCallback(i=>es(r,i),[r]),re=()=>{P.anchorEl=null,P.position=null,q(null)},le=()=>{L.anchorEl=null,L.position=null},m=async(i,o,c=!0,j="")=>{if(!(!o.length||!i.length))try{s(i,o,c,j),L.anchorEl||(await be(.5),re())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:o})=>{const c=I.map(j=>N[j].receiver);await m(i,c,o),await be(.5),le(),w([])},b=async(i,o=[],c=!0)=>{try{await m(["webhook"],[i.receiver],c,o)}catch(j){U.error(j.response?j.response.statusText:j.message)}},R=async(i,o,c,j=[],z=!0)=>{if(i.stopPropagation(),ts(o,c)>=4){U.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await b(o,j,z);return}if(i){const K=i.currentTarget,M=K.getBoundingClientRect();P.anchorEl=K,P.position={top:M.top+window.scrollY,left:M.left+window.scrollX}}q({channel:c});try{const K=await oe(c,o.receiver);await be(1),q({channel:c,result:K}),(typeof K=="boolean"&&K||St(K)&&Object.values(K).every(M=>!!M))&&(await s([c],[o.receiver],z),L.anchorEl||(await be(.5),re()))}catch(K){U.error(K.message)}},O=i=>{S(o=>({...o,dateRange:i,page:1}))},A=(i,o,c,j)=>{i.stopPropagation();const z=c.filter(G=>G!==o);S(G=>({...G,[j]:z,page:1}))},J=X(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:o,receiver:c}=N[i];return o?e.jsxs(y,{"data-cy":`member-name-${o.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${o.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:o.fullName})]},c):e.jsx(yt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:h.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Wallet",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[1].options.filterList,"walletSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:o,index:c,column:j,filterValues:E})},customBodyRenderLite:i=>{const{walletSendStatus:o,walletSendAt:c,walletSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"wallet",onResend:z=>R(z,N[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:o,pushKitSendAt:c,pushKitSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"pushkit",onResend:z=>R(z,N[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:h.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Push Kit",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[2].options.filterList,"pushKitSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:o,emailSendAt:c,emailSendFailedReason:j}=N[i];return e.jsx(ce,{status:o,updatedAt:c,reason:j,channel:"email",onResend:z=>R(z,N[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:h.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(Ce,{list:i,label:"Email",onDelete:(o,c)=>{o.stopPropagation(),A(o,c,J[3].options.filterList,"emailSendStatus")}}),update:Se},filterOptions:{names:E,fullWidth:!0,logic:ve,display:(i,o,c,j)=>e.jsx(Re,{label:"Email",filterList:i,onChange:o,index:c,column:j,filterValues:E})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:o}=N[i];if(!o)return null;const c=Object.entries(o)[0];if(!c)return null;const[j,z]=c,G=z[0];return e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(y,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:j},j),e.jsx(ce,{status:G.status,updatedAt:G.sendAt,reason:G.failedReason,channel:"webhook",onResend:K=>R(K,N[i],"webhook",[j],!1)})]},j)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:o}=N[i];return e.jsx(et,{value:o,locale:a,shouldUpdate:!0})}}}],[N,a,h,r]),xe=[e.jsx(We,{value:h.dateRange,onChange:O},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:F,startIcon:e.jsx(Wt,{}),onClick:()=>k(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(y,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(as,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:a,loading:F,columns:J,data:N,onChange:ee,options:ne,customButtons:xe,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:o=>e.jsx(Ke,{...o,canDelete:()=>!1})})}}),P.anchorEl&&e.jsx(Ae,{open:!!P.anchorEl,anchorReference:"anchorPosition",anchorPosition:P.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(os,{children:[e.jsxs($,{variant:"body1",component:"div",className:"check-title",children:[W?.channel," Checking"]}),e.jsx(y,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:ge(W?.channel).map(i=>{const{type:o,pass:c,fail:j}=i;return!W?.result||W?.result?.[o]?e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:W?.result?.[o]?ye.success.main:"inherit"},children:[W?.result?e.jsx(Ut,{}):e.jsx(Xe,{size:12,sx:{color:ye.primary.main}}),e.jsx("span",{children:c})]},o):e.jsxs($,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:ye.error.main},children:[e.jsx(qt,{}),e.jsx("span",{children:j})]},o)})})]})}),L.anchorEl&&e.jsx(Ae,{open:!!L.anchorEl,anchorReference:"anchorPosition",anchorPosition:L.position,onClose:le,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:le,onConfirm:p})})]})})})}const is=g.memo(ft),as=ie.div`
|
|
2
2
|
td.MuiTableCell-footer {
|
|
3
3
|
border: none !important;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as g,bm as v,u as y,j as r,Q as f,S as x,U as h}from"./index-
|
|
1
|
+
import{A as g,bm as v,u as y,j as r,Q as f,S as x,U as h}from"./index-CjiX3zf7.js";import{L as S,D as j}from"./download-BcxHfCLi.js";import{u as L}from"./useLocalStorage-8wesT5Qc.js";import"./ButtonGroup-uxUU66vm.js";import"./getValidReactChildren-kX991muZ.js";function I(){const c=g(),[s,i]=L("server-logs-filter",{name:"abtnode",type:{abtnode:"error"}}),{name:t=s.name}=v(),{info:l}=y(),n=l.routing.provider,a=[{id:"abtnode",name:"Blocklet Server",types:["error","info","access","stdout","stderr","pm2"]},{id:"blocklet-services",name:"Blocklet Services",types:["error","info","access","stdout","stderr"]}];if(n){const e=`Service Gateway(${n})`;a.push({id:`service-gateway-${n}`,name:e,types:["error","access","security"]})}const d=e=>{i({...s,name:e.target.value}),c(`/logs/${e.target.value}`)},m=r.jsx(f,{sx:{minWidth:240},children:r.jsx(x,{value:t,onChange:d,size:"small",children:a.map(e=>r.jsx(h,{value:e.id,children:e.name},e.id))})}),o=a.find(e=>e.id===t)||a[0],p=o.types.indexOf(s.type[t]||"error"),u=e=>{i({name:t,type:{...s.type,[t]:e}})};return r.jsx(S,{name:o.name,logId:o.id,types:o.types,prepend:m,postpend:r.jsx(j,{id:l.did,name:"blocklet-server"}),defaultTypeIndex:p,onTypeChange:u},o.id)}export{I as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{r as t,g as n,j as r,bE as i,d0 as a}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Db9FICR5.js","./index-CjiX3zf7.js","./index-DGkT7afN.css","./decode-DPztD6kB.js","./index-CX3PrUL2.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as t,g as n,j as r,bE as i,d0 as a}from"./index-CjiX3zf7.js";const s=t.lazy(()=>i(()=>import("./index-Db9FICR5.js").then(o=>o.i),__vite__mapDeps([0,1,2,3,4]),import.meta.url)),d=`{
|
|
3
3
|
getNodeInfo {
|
|
4
4
|
code
|
|
5
5
|
info {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aG as xe,j as e,r as R,aV as he,cw as Xt,T as H,az as ye,o as S,m as F,be as et,b8 as Pt,N as j,P as Qe,W as Ie,eM as Et,fG as Ot,by as pi,bq as mi,br as fi,bs as hi,aO as Zt,aP as xi,$ as le,s as ce,bn as N,cq as tt,C as J,X as ks,au as gi,dj as bi,bf as Rs,bg as wi,E as me,H as M,bz as Oe,ge as vi,gf as yi,J as ji,v as V,b as Ci,a3 as Ae,t as te,U as st,a4 as ae,aS as Ke,Y as Ve,I as Is,ad as _t,bd as As,gg as Si,q as Ti,fo as ki,R as Ds,fg as Ps,bi as Es,p as Ri,D as Ii,c4 as Os,aU as Ai,V as Di,F as Pi,dG as Ei,gh as Jt,fE as Oi,gi as _i,S as zi}from"./index-CjzEBnHB.js";import{H as zt,g as Li}from"./index-CLTTHohk.js";import{T as Mi}from"./html-title-CacFoTyg.js";import{u as X}from"./team-1bg7ZL8j.js";import{u as Ni}from"./use-mobile-BHeriyen.js";import{v as ze}from"./index-BiSZbdUR.js";import{w as ge,P as _s}from"./permission-DG9uH24n.js";import{C as Fi,a as Bi}from"./Google-MHF3yZux.js";import{u as Hi}from"./blocklet-BWShyefZ.js";import{A as Lt}from"./Add-CMaOaJcy.js";import{y as Mt}from"./index-dQzdi1Hq.js";import{e as at,g as Ui}from"./chain-4QRvY1Fq.js";import{M as zs}from"./TableSearch-CKX4rVuU.js";import{L as Ls}from"./list-header-DZTbN58s.js";import{T as Ms,a as We}from"./ToggleButtonGroup-DrT1SlJe.js";const qi=xe(e.jsx("path",{d:"m17.6 9.48 1.84-3.18c.16-.31.04-.69-.26-.85-.29-.15-.65-.06-.83.22l-1.88 3.24c-2.86-1.21-6.08-1.21-8.94 0L5.65 5.67c-.19-.29-.58-.38-.87-.2-.28.18-.37.54-.22.83L6.4 9.48C3.3 11.25 1.28 14.44 1 18h22c-.28-3.56-2.3-6.75-5.4-8.52M7 15.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25m10 0c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25"})),Qt=xe(e.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})),Ns=xe(e.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),dt=xe(e.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6v2H8v2h8v-2h-2v-2h6c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"})),$i=xe(e.jsx("path",{d:"M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2zM4 6h16v10H4z"})),Wi=xe(e.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"})),Vi=xe(e.jsx("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2m-2 14H5V6h14z"})),ut=xe(e.jsx("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z"})),nt=t=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},R.createElement("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"}));var Gi="2.0.3",Rt=500,es="user-agent",De="",ts="?",it="function",fe="undefined",Pe="object",It="string",q="browser",ie="cpu",ee="device",Z="engine",K="os",ke="result",w="name",f="type",b="vendor",y="version",$="architecture",Ge="major",g="model",qe="console",D="mobile",E="tablet",z="smarttv",Q="wearable",pt="xr",$e="embedded",Le="inapp",Nt="brands",ve="formFactors",Ft="fullVersionList",Re="platform",Bt="platformVersion",lt="bitness",be="sec-ch-ua",Yi=be+"-full-version-list",Ki=be+"-arch",Xi=be+"-"+lt,Zi=be+"-form-factors",Ji=be+"-"+D,Qi=be+"-"+g,Fs=be+"-"+Re,er=Fs+"-version",Bs=[Nt,Ft,D,g,Re,Bt,$,ve,lt],Xe="Amazon",Se="Apple",ss="ASUS",is="BlackBerry",we="Google",rs="Huawei",os="Lenovo",as="Honor",Ze="LG",mt="Microsoft",ft="Motorola",ht="Nvidia",ns="OnePlus",xt="OPPO",Me="Samsung",ls="Sharp",Ne="Sony",gt="Xiaomi",bt="Zebra",cs="Chrome",ds="Chromium",de="Chromecast",tr="Edge",Fe="Firefox",Be="Opera",wt="Facebook",us="Sogou",Te="Mobile ",He=" Browser",At="Windows",sr=typeof window!==fe,W=sr&&window.navigator?window.navigator:void 0,ue=W&&W.userAgentData?W.userAgentData:void 0,ir=function(t,s){var i={},u=s;if(!rt(s)){u={};for(var n in s)for(var p in s[n])u[p]=s[n][p].concat(u[p]?u[p]:[])}for(var m in t)i[m]=u[m]&&u[m].length%2===0?u[m].concat(t[m]):t[m];return i},ct=function(t){for(var s={},i=0;i<t.length;i++)s[t[i].toUpperCase()]=t[i];return s},Dt=function(t,s){if(typeof t===Pe&&t.length>0){for(var i in t)if(re(t[i])==re(s))return!0;return!1}return _e(t)?re(s).indexOf(re(t))!==-1:!1},rt=function(t,s){for(var i in t)return/^(browser|cpu|device|engine|os)$/.test(i)||(s?rt(t[i]):!1)},_e=function(t){return typeof t===It},vt=function(t){if(t){for(var s=[],i=Ee(/\\?\"/g,t).split(","),u=0;u<i.length;u++)if(i[u].indexOf(";")>-1){var n=Ye(i[u]).split(";v=");s[u]={brand:n[0],version:n[1]}}else s[u]=Ye(i[u]);return s}},re=function(t){return _e(t)?t.toLowerCase():t},yt=function(t){return _e(t)?Ee(/[^\d\.]/g,t).split(".")[0]:void 0},oe=function(t){for(var s in t){var i=t[s];typeof i==Pe&&i.length==2?this[i[0]]=i[1]:this[i]=void 0}return this},Ee=function(t,s){return _e(s)?s.replace(t,De):s},Ue=function(t){return Ee(/\\?\"/g,t)},Ye=function(t,s){if(_e(t))return t=Ee(/^\s\s*/,t),typeof s===fe?t:t.substring(0,Rt)},jt=function(t,s){if(!(!t||!s))for(var i=0,u,n,p,m,o,d;i<s.length&&!o;){var r=s[i],l=s[i+1];for(u=n=0;u<r.length&&!o&&r[u];)if(o=r[u++].exec(t),o)for(p=0;p<l.length;p++)d=o[++n],m=l[p],typeof m===Pe&&m.length>0?m.length===2?typeof m[1]==it?this[m[0]]=m[1].call(this,d):this[m[0]]=m[1]:m.length===3?typeof m[1]===it&&!(m[1].exec&&m[1].test)?this[m[0]]=d?m[1].call(this,d,m[2]):void 0:this[m[0]]=d?d.replace(m[1],m[2]):void 0:m.length===4&&(this[m[0]]=d?m[3].call(this,d.replace(m[1],m[2])):void 0):this[m]=d||void 0;i+=2}},pe=function(t,s){for(var i in s)if(typeof s[i]===Pe&&s[i].length>0){for(var u=0;u<s[i].length;u++)if(Dt(s[i][u],t))return i===ts?void 0:i}else if(Dt(s[i],t))return i===ts?void 0:i;return s.hasOwnProperty("*")?s["*"]:t},ps={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ms={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},fs={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[w,Te+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[w,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[w,y],[/opios[\/ ]+([\w\.]+)/i],[y,[w,Be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[w,Be+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[w,Be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[w,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[w,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[w,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[w,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[w,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[w,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[w,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[w,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[w,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[w,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[w,"Smart "+os+He]],[/(avast|avg)\/([\w\.]+)/i],[[w,/(.+)/,"$1 Secure"+He],y],[/\bfocus\/([\w\.]+)/i],[y,[w,Fe+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[w,Be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[w,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[w,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[w,Be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[w,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[y,[w,Te+Fe]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[w,"360"]],[/\b(qq)\/([\w\.]+)/i],[[w,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[w,/(.+)/,"$1"+He],y],[/samsungbrowser\/([\w\.]+)/i],[y,[w,Me+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[w,us+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[w,us+" Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[w,y],[/(lbbrowser|rekonq)/i],[w],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,w],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[w,wt],y,[f,Le]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[w,y,[f,Le]],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[w,"GSA"],[f,Le]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[w,"TikTok"],[f,Le]],[/\[(linkedin)app\]/i],[w,[f,Le]],[/(chromium)[\/ ]([-\w\.]+)/i],[w,y],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[w,cs+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[w,cs+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[w,"Android"+He]],[/chrome\/([\w\.]+) mobile/i],[y,[w,Te+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[w,y],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[y,[w,Te+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[w,Te+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[y,w],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[w,[y,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[w,y],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[w,Te+Fe],y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[w,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[w,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[w,Fe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[w,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[w,[y,/[^\d\.]+./,De]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[$,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[$,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[$,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[$,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[$,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[$,/ower/,De,re]],[/ sun4\w[;\)]/i],[[$,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[$,re]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[b,Me],[f,E]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[g,[b,Me],[f,D]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[b,Se],[f,D]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[b,Se],[f,E]],[/(macintosh);/i],[g,[b,Se]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[b,ls],[f,D]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[g,[b,as],[f,E]],[/honor([-\w ]+)[;\)]/i],[g,[b,as],[f,D]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[g,[b,rs],[f,E]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[b,rs],[f,D]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[g,/_/g," "],[b,gt],[f,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[g,/_/g," "],[b,gt],[f,D]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[b,xt],[f,D]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[g,[b,pe,{OnePlus:["304","403","203"],"*":xt}],[f,E]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[g,[b,"BLU"],[f,D]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[b,"Vivo"],[f,D]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[b,"Realme"],[f,D]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[b,ft],[f,D]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[b,ft],[f,E]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[b,Ze],[f,E]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[b,Ze],[f,D]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[g,[b,os],[f,E]],[/(nokia) (t[12][01])/i],[b,g,[f,E]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[g,/_/g," "],[f,D],[b,"Nokia"]],[/(pixel (c|tablet))\b/i],[g,[b,we],[f,E]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[b,we],[f,D]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[b,Ne],[f,D]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[b,Ne],[f,E]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[b,ns],[f,D]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[b,Xe],[f,E]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[b,Xe],[f,D]],[/(playbook);[-\w\),; ]+(rim)/i],[g,b,[f,E]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[b,is],[f,D]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[b,ss],[f,E]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[b,ss],[f,D]],[/(nexus 9)/i],[g,[b,"HTC"],[f,E]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[g,/_/g," "],[f,D]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[f,E]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[f,D]],[/(itel) ((\w+))/i],[[b,re],g,[f,pe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[b,"Acer"],[f,E]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[b,"Meizu"],[f,D]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[b,"Ulefone"],[f,D]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[g,[b,"Energizer"],[f,D]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[g,[b,"Cat"],[f,D]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[g,[b,"Smartfren"],[f,D]],[/droid.+; (a(?:015|06[35]|142p?))/i],[g,[b,"Nothing"],[f,D]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[g,[b,"Archos"],[f,E]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[g,[b,"Archos"],[f,D]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[b,g,[f,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[b,g,[f,D]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[b,g,[f,E]],[/(surface duo)/i],[g,[b,mt],[f,E]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[b,"Fairphone"],[f,D]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[g,[b,ht],[f,E]],[/(sprint) (\w+)/i],[b,g,[f,D]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[b,mt],[f,D]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[b,bt],[f,E]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[b,bt],[f,D]],[/smart-tv.+(samsung)/i],[b,[f,z]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[b,Me],[f,z]],[/tcast.+(lg)e?. ([-\w]+)/i],[b,g,[f,z]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,Ze],[f,z]],[/(apple) ?tv/i],[b,[g,Se+" TV"],[f,z]],[/crkey.*devicetype\/chromecast/i],[[g,de+" Third Generation"],[b,we],[f,z]],[/crkey.*devicetype\/([^/]*)/i],[[g,/^/,"Chromecast "],[b,we],[f,z]],[/fuchsia.*crkey/i],[[g,de+" Nest Hub"],[b,we],[f,z]],[/crkey/i],[[g,de],[b,we],[f,z]],[/(portaltv)/i],[g,[b,wt],[f,z]],[/droid.+aft(\w+)( bui|\))/i],[g,[b,Xe],[f,z]],[/(shield \w+ tv)/i],[g,[b,ht],[f,z]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[b,ls],[f,z]],[/(bravia[\w ]+)( bui|\))/i],[g,[b,Ne],[f,z]],[/(mi(tv|box)-?\w+) bui/i],[g,[b,gt],[f,z]],[/Hbbtv.*(technisat) (.*);/i],[b,g,[f,z]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,Ye],[g,Ye],[f,z]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[g,[f,z]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,z]],[/(ouya)/i,/(nintendo) (\w+)/i],[b,g,[f,qe]],[/droid.+; (shield)( bui|\))/i],[g,[b,ht],[f,qe]],[/(playstation \w+)/i],[g,[b,Ne],[f,qe]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[b,mt],[f,qe]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[g,[b,Me],[f,Q]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[b,g,[f,Q]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[g,[b,xt],[f,Q]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[b,Se],[f,Q]],[/(opwwe\d{3})/i],[g,[b,ns],[f,Q]],[/(moto 360)/i],[g,[b,ft],[f,Q]],[/(smartwatch 3)/i],[g,[b,Ne],[f,Q]],[/(g watch r)/i],[g,[b,Ze],[f,Q]],[/droid.+; (wt63?0{2,3})\)/i],[g,[b,bt],[f,Q]],[/droid.+; (glass) \d/i],[g,[b,we],[f,pt]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,g,[f,pt]],[/(quest( \d| pro)?s?).+vr/i],[g,[b,wt],[f,pt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[f,$e]],[/(aeobc)\b/i],[g,[b,Xe],[f,$e]],[/(homepod).+mac os/i],[g,[b,Se],[f,$e]],[/windows iot/i],[[f,$e]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[g,[f,pe,{mobile:"Mobile",xr:"VR","*":E}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,E]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,D]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[g,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[w,tr+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[w,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[w,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[w,y],[/ladybird\//i],[[w,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,w]],os:[[/microsoft (windows) (vista|xp)/i],[w,y],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[w,[y,pe,ps]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[y,pe,ps],[w,At]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[w,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[w,"macOS"],[y,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[y,[w,de+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[y,[w,de+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[y,[w,de+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[y,[w,de+" Linux"]],[/crkey\/([\d\.]+)/i],[y,[w,de]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,w],[/(ubuntu) ([\w\.]+) like android/i],[[w,/(.+)/,"$1 Touch"],y],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[w,y],[/\(bb(10);/i],[y,[w,is]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[w,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[w,Fe+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[w,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[w,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[w,"Chrome OS"],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[w,y],[/(sunos) ?([\w\.\d]*)/i],[[w,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[w,y]]},Je=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return oe.call(t.init,[[q,[w,y,Ge,f]],[ie,[$]],[ee,[f,g,b]],[Z,[w,y]],[K,[w,y]]]),oe.call(t.isIgnore,[[q,[y,Ge]],[Z,[y]],[K,[y]]]),oe.call(t.isIgnoreRgx,[[q,/ ?browser$/i],[K,/ ?os$/i]]),oe.call(t.toString,[[q,[w,y]],[ie,[$]],[ee,[b,g]],[Z,[w,y]],[K,[w,y]]]),t}(),rr=function(t,s){var i=Je.init[s],u=Je.isIgnore[s]||0,n=Je.isIgnoreRgx[s]||0,p=Je.toString[s]||0;function m(){oe.call(this,i)}return m.prototype.getItem=function(){return t},m.prototype.withClientHints=function(){return ue?ue.getHighEntropyValues(Bs).then(function(o){return t.setCH(new Hs(o,!1)).parseCH().get()}):t.parseCH().get()},m.prototype.withFeatureCheck=function(){return t.detectFeature().get()},s!=ke&&(m.prototype.is=function(o){var d=!1;for(var r in this)if(this.hasOwnProperty(r)&&!Dt(u,r)&&re(n?Ee(n,this[r]):this[r])==re(n?Ee(n,o):o)){if(d=!0,o!=fe)break}else if(o==fe&&d){d=!d;break}return d},m.prototype.toString=function(){var o=De;for(var d in p)typeof this[p[d]]!==fe&&(o+=(o?" ":De)+this[p[d]]);return o||fe}),ue||(m.prototype.then=function(o){var d=this,r=function(){for(var a in d)d.hasOwnProperty(a)&&(this[a]=d[a])};r.prototype={is:m.prototype.is,toString:m.prototype.toString};var l=new r;return o(l),l}),new m};function Hs(t,s){if(t=t||{},oe.call(this,Bs),s)oe.call(this,[[Nt,vt(t[be])],[Ft,vt(t[Yi])],[D,/\?1/.test(t[Ji])],[g,Ue(t[Qi])],[Re,Ue(t[Fs])],[Bt,Ue(t[er])],[$,Ue(t[Ki])],[ve,vt(t[Zi])],[lt,Ue(t[Xi])]]);else for(var i in t)this.hasOwnProperty(i)&&typeof t[i]!==fe&&(this[i]=t[i])}function hs(t,s,i,u){return this.get=function(n){return n?this.data.hasOwnProperty(n)?this.data[n]:void 0:this.data},this.set=function(n,p){return this.data[n]=p,this},this.setCH=function(n){return this.uaCH=n,this},this.detectFeature=function(){if(W&&W.userAgent==this.ua)switch(this.itemType){case q:W.brave&&typeof W.brave.isBrave==it&&this.set(w,"Brave");break;case ee:!this.get(f)&&ue&&ue[D]&&this.set(f,D),this.get(g)=="Macintosh"&&W&&typeof W.standalone!==fe&&W.maxTouchPoints&&W.maxTouchPoints>2&&this.set(g,"iPad").set(f,E);break;case K:!this.get(w)&&ue&&ue[Re]&&this.set(w,ue[Re]);break;case ke:var n=this.data,p=function(m){return n[m].getItem().detectFeature().get()};this.set(q,p(q)).set(ie,p(ie)).set(ee,p(ee)).set(Z,p(Z)).set(K,p(K))}return this},this.parseUA=function(){return this.itemType!=ke&&jt.call(this.data,this.ua,this.rgxMap),this.itemType==q&&this.set(Ge,yt(this.get(y))),this},this.parseCH=function(){var n=this.uaCH,p=this.rgxMap;switch(this.itemType){case q:case Z:var m=n[Ft]||n[Nt],o;if(m)for(var d in m){var r=m[d].brand||m[d],l=m[d].version;this.itemType==q&&!/not.a.brand/i.test(r)&&(!o||/chrom/i.test(o)&&r!=ds)&&(r=pe(r,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(w,r).set(y,l).set(Ge,yt(l)),o=r),this.itemType==Z&&r==ds&&this.set(y,l)}break;case ie:var a=n[$];a&&(a&&n[lt]=="64"&&(a+="64"),jt.call(this.data,a+";",p));break;case ee:if(n[D]&&this.set(f,D),n[g]&&(this.set(g,n[g]),!this.get(f)||!this.get(b))){var c={};jt.call(c,"droid 9; "+n[g]+")",p),!this.get(f)&&c.type&&this.set(f,c.type),!this.get(b)&&c.vendor&&this.set(b,c.vendor)}if(n[ve]){var h;if(typeof n[ve]!="string")for(var C=0;!h&&C<n[ve].length;)h=pe(n[ve][C++],ms);else h=pe(n[ve],ms);this.set(f,h)}break;case K:var v=n[Re];if(v){var x=n[Bt];v==At&&(x=parseInt(yt(x),10)>=13?"11":"10"),this.set(w,v).set(y,x)}this.get(w)==At&&n[g]=="Xbox"&&this.set(w,"Xbox").set(y,void 0);break;case ke:var T=this.data,I=function(P){return T[P].getItem().setCH(n).parseCH().get()};this.set(q,I(q)).set(ie,I(ie)).set(ee,I(ee)).set(Z,I(Z)).set(K,I(K))}return this},oe.call(this,[["itemType",t],["ua",s],["uaCH",u],["rgxMap",i],["data",rr(this,t)]]),this}function ne(t,s,i){if(typeof t===Pe?(rt(t,!0)?(typeof s===Pe&&(i=s),s=t):(i=t,s=void 0),t=void 0):typeof t===It&&!rt(s,!0)&&(i=s,s=void 0),i&&typeof i.append===it){var u={};i.forEach(function(d,r){u[r]=d}),i=u}if(!(this instanceof ne))return new ne(t,s,i).getResult();var n=typeof t===It?t:i&&i[es]?i[es]:W&&W.userAgent?W.userAgent:De,p=new Hs(i,!0),m=s?ir(fs,s):fs,o=function(d){return d==ke?function(){return new hs(d,n,m,p).set("ua",n).set(q,this.getBrowser()).set(ie,this.getCPU()).set(ee,this.getDevice()).set(Z,this.getEngine()).set(K,this.getOS()).get()}:function(){return new hs(d,n,m[d],p).parseUA().get()}};return oe.call(this,[["getBrowser",o(q)],["getCPU",o(ie)],["getDevice",o(ee)],["getEngine",o(Z)],["getOS",o(K)],["getResult",o(ke)],["getUA",function(){return n}],["setUA",function(d){return _e(d)&&(n=d.length>Rt?Ye(d,Rt):d),this}]]).setUA(n),this}ne.VERSION=Gi;ne.BROWSER=ct([w,y,Ge,f]);ne.CPU=ct([$]);ne.DEVICE=ct([g,b,f,qe,D,z,E,Q,$e]);ne.ENGINE=ne.OS=ct([w,y]);function or(t){return!t||typeof t!="string"?"break-all":t.includes(" ")?"break-word":"break-all"}function Us({logo:t="",name:s="",description:i="",size:u=40,variant:n="rounded",sx:p={},className:m="",logoName:o="",tooltip:d=null}){const r={width:u,height:u,...p},l=typeof s=="string"?s:t,a=e.jsxs(he,{direction:"row",spacing:1,className:`info-card-wrapper ${m}`,sx:{alignItems:"center",cursor:d?"pointer":"default"},children:[t?e.jsx(Xt,{src:t,alt:o??l,variant:n,sx:r}):e.jsx(Xt,{variant:n,sx:r,children:l?.slice(0,1)}),e.jsxs(he,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:or(s),minWidth:{xs:100,sm:140}},children:[e.jsx(H,{variant:"body1",component:"div",sx:{color:"text.primary"},children:s}),i&&e.jsx(H,{variant:"subtitle1",sx:{color:"text.secondary"},children:i})]})]});return d?e.jsx(ye,{title:d,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff",color:c=>c.palette.mode==="dark"?"#ffffff":c.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:a}):a}Us.propTypes={logo:S.string,name:S.oneOfType([S.string,S.node]).isRequired,description:S.oneOfType([S.string,S.node]),size:S.oneOfType([S.number,S.string]),variant:S.oneOf(["square","rounded","circular"]),sx:S.object,className:S.string,logoName:S.string,tooltip:S.oneOfType([S.string,S.node])};function ar(t){try{if(!t.trim())return{device:{icon:e.jsx(dt,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(ut,{fontSize:"small"}),text:"Unknown Browser"}};const i=new ne(t).getResult();let u="";const n=t.split(/\s+/).find(d=>d.startsWith("arcwallet"));if(n){const d=n.split("/");d.length>1&&Zt.coerce(d[1])&&(u=Zt.coerce(d[1]).version)}const p=(()=>{const{type:d="",model:r=""}=i.device;return d==="mobile"?{icon:e.jsx(Wi,{fontSize:"small"}),text:r||"Mobile Device"}:d==="tablet"?{icon:e.jsx(Vi,{fontSize:"small"}),text:r||"Tablet"}:{icon:e.jsx($i,{fontSize:"small"}),text:r||"Desktop"}})(),m=(()=>{const{name:d="",version:r=""}=i.os;return d.toLowerCase().includes("mac")?{icon:e.jsx(Qt,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("ios")?{icon:e.jsx(Qt,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("android")?{icon:e.jsx(qi,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("windows")?{icon:e.jsx(dt,{fontSize:"small"}),text:`${d} ${r}`}:{icon:null,text:d?`${d} ${r}`:"Unknown OS"}})(),o=(()=>{const{name:d="",version:r=""}=i.browser;return{icon:e.jsx(ut,{fontSize:"small"}),text:d?`${d} ${r}`:"Unknown Browser"}})();return{device:p,os:m,browser:o,...u?{walletVersion:{icon:null,text:u}}:{}}}catch(s){return console.error("Error parsing user agent:",s),{device:{icon:e.jsx(dt,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(ut,{fontSize:"small"}),text:"Unknown Browser"}}}}function qs({ua:t}){const s=ar(t);return e.jsx(he,{spacing:1,children:Object.entries(s).map(([i,{icon:u,text:n}])=>e.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(j,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:u}),e.jsx(H,{variant:"body2",sx:{display:"flex"},children:n})]},i))})}qs.propTypes={ua:S.string.isRequired};const $s=()=>{const{t}=F(),s={$all:t("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:s,formatRoleName:u=>{const n=(u||"").toLowerCase();return n.startsWith("$")?s[n]||n.slice(1):s[n]||n}}},nr=(t,s=!1)=>{const i=s?1:.6;switch(t){case"owner":return`rgba(232, 222, 255, ${i})`;case"admin":return`rgba(227, 242, 253, ${i})`;case"member":return`rgba(232, 245, 233, ${i})`;case"guest":return`rgba(245, 245, 245, ${i})`;default:return`rgba(245, 245, 245, ${i})`}},lr=Pt(Et)(({role:t})=>({backgroundColor:nr(t.toLowerCase()),color:"#000000"})),cr=t=>{switch(t){case"valid":return s=>s.palette.success.light;case"expired":return s=>s.palette.text.disabled;case"revoked":return s=>s.palette.error.light;default:return s=>s.palette.warning.light}},dr=Pt(Et)(({theme:t,status:s})=>({backgroundColor:cr(s)(t),color:"#FFFFFF"}));function Ws({did:t}){return e.jsx(Ie,{size:14,responsive:!1,compact:!0,copyable:!1,did:t})}Ws.propTypes={did:S.string.isRequired};function Vs({timestamp:t,locale:s}){return e.jsx(j,{sx:{minWidth:"100px"},children:e.jsx(Qe,{value:t,locale:s})})}Vs.propTypes={timestamp:S.number.isRequired,locale:S.string.isRequired};function Gs({name:t="",role:s}){const{formatRoleName:i}=$s();return e.jsx(lr,{label:i(t||s),size:"small",role:t||s,sx:{borderRadius:1}})}Gs.propTypes={role:S.string.isRequired,name:S.string};function Ys({status:t}){const{t:s}=F();return e.jsx(dr,{label:s(`team.passport.statusMap.${t}`),size:"small",status:t,sx:{borderRadius:1}})}Ys.propTypes={status:S.string.isRequired};function Ks({source:t}){const{t:s}=F();return t?s(`team.passport.sourceMaps.${t}`):"-"}Ks.propTypes={source:S.string.isRequired};function Xs({user:t,size:s="default",tooltip:i=!1,inService:u=!1}){const{teamDid:n}=X(),p=et.useMemo(()=>Ot(t.avatar,n,u),[t.avatar,n,u]),m=et.useMemo(()=>e.jsx(Ie,{did:t?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[t?.did]),o=pi(()=>({...t,avatar:p}),[t,p]);return s==="small"?e.jsx(Us,{variant:"circular",logo:p,name:e.jsx(H,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:t.fullName||t.email}),...s==="small"?{tooltip:i?e.jsx(Ie,{did:t?.did}):!1,size:24}:{description:m,size:36}}):e.jsx(mi,{user:o,avatarSize:s==="small"?24:36,cardType:hi.Detailed,infoType:fi.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}Xs.propTypes={user:S.object.isRequired,size:S.string,tooltip:S.bool,inService:S.bool};const ur=et.memo(Xs),pr=t=>e.jsx(Ws,{did:t}),Ht=(t,s)=>e.jsx(Gs,{name:t,role:s}),Ut=t=>e.jsx(Ys,{status:t}),Zs=(t,s)=>e.jsx(Vs,{timestamp:t,locale:s}),ot=t=>e.jsx(Ks,{source:t}),qt=(t,s=!1)=>e.jsx(ur,{user:t,inService:s}),mr=t=>e.jsx(qs,{ua:t}),xs="info";function Js({createPassportSvg:t,passport:s,onCancel:i,onSwitchPassport:u=()=>{}}){const{t:n}=F(),p=xi({tab:xs}),m={info:{label:n("common.basicInfo"),value:xs,component:()=>e.jsx(Qs,{passport:s,createPassportSvg:t})},logs:{label:n("common.logs"),value:"logs",component:()=>e.jsx(si,{passport:s})},related:{label:n("team.passport.related"),value:"related",component:()=>e.jsx(ii,{passport:s,onSwitchPassport:u})}},o=Object.values(m).map(({label:l,value:a})=>({label:l,value:a})).filter(l=>l.value==="related"?s.parentDid:!0),d=m[p.tab]||m.info,r=l=>{p.tab=l};return e.jsx(le,{title:n("common.passport"),onClose:i,open:!0,PaperProps:{style:{maxWidth:800,minHeight:"80vh"}},fullWidth:!0,children:e.jsxs(fr,{children:[e.jsx(j,{className:"tabs",children:e.jsx(Mi,{tabs:o,current:p.tab,onChange:r,scrollButtons:"auto"})}),e.jsx(j,{className:"body",children:e.jsx(d.component,{})})]})})}Js.propTypes={createPassportSvg:S.func.isRequired,passport:S.object.isRequired,onCancel:S.func.isRequired,onSwitchPassport:S.func};const fr=ce(j)`
|
|
1
|
+
import{aG as xe,j as e,r as R,aV as he,cw as Xt,T as H,az as ye,o as S,m as F,be as et,b8 as Pt,N as j,P as Qe,W as Ie,eM as Et,fG as Ot,by as pi,bq as mi,br as fi,bs as hi,aO as Zt,aP as xi,$ as le,s as ce,bn as N,cq as tt,C as J,X as ks,au as gi,dj as bi,bf as Rs,bg as wi,E as me,H as M,bz as Oe,ge as vi,gf as yi,J as ji,v as V,b as Ci,a3 as Ae,t as te,U as st,a4 as ae,aS as Ke,Y as Ve,I as Is,ad as _t,bd as As,gg as Si,q as Ti,fo as ki,R as Ds,fg as Ps,bi as Es,p as Ri,D as Ii,c4 as Os,aU as Ai,V as Di,F as Pi,dG as Ei,gh as Jt,fE as Oi,gi as _i,S as zi}from"./index-CjiX3zf7.js";import{H as zt,g as Li}from"./index-B6rX45UB.js";import{T as Mi}from"./html-title-B7JhB9o9.js";import{u as X}from"./team-CPlGWHuv.js";import{u as Ni}from"./use-mobile-BPNr-WoZ.js";import{v as ze}from"./index-BU5TxHl6.js";import{w as ge,P as _s}from"./permission-CnIxTKRh.js";import{C as Fi,a as Bi}from"./Google-BbJKv6O-.js";import{u as Hi}from"./blocklet-z9OAo2CJ.js";import{A as Lt}from"./Add-Dz07LTiF.js";import{y as Mt}from"./index-vlWnPMrO.js";import{e as at,g as Ui}from"./chain-j7CK8IPn.js";import{M as zs}from"./TableSearch-CU4SCCEn.js";import{L as Ls}from"./list-header-BdwPdjEP.js";import{T as Ms,a as We}from"./ToggleButtonGroup-BRX0t8dr.js";const qi=xe(e.jsx("path",{d:"m17.6 9.48 1.84-3.18c.16-.31.04-.69-.26-.85-.29-.15-.65-.06-.83.22l-1.88 3.24c-2.86-1.21-6.08-1.21-8.94 0L5.65 5.67c-.19-.29-.58-.38-.87-.2-.28.18-.37.54-.22.83L6.4 9.48C3.3 11.25 1.28 14.44 1 18h22c-.28-3.56-2.3-6.75-5.4-8.52M7 15.25c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25m10 0c-.69 0-1.25-.56-1.25-1.25s.56-1.25 1.25-1.25 1.25.56 1.25 1.25-.56 1.25-1.25 1.25"})),Qt=xe(e.jsx("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z"})),Ns=xe(e.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"})),dt=xe(e.jsx("path",{d:"M20 3H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6v2H8v2h8v-2h-2v-2h6c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"})),$i=xe(e.jsx("path",{d:"M20 18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2zM4 6h16v10H4z"})),Wi=xe(e.jsx("path",{d:"M15.5 1h-8C6.12 1 5 2.12 5 3.5v17C5 21.88 6.12 23 7.5 23h8c1.38 0 2.5-1.12 2.5-2.5v-17C18 2.12 16.88 1 15.5 1m-4 21c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5m4.5-4H7V4h9z"})),Vi=xe(e.jsx("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2m-2 14H5V6h14z"})),ut=xe(e.jsx("path",{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2m-5 14H4v-4h11zm0-5H4V9h11zm5 5h-4V9h4z"})),nt=t=>R.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...t},R.createElement("path",{d:"M8.4375 4.3125H8.25C8.35313 4.3125 8.4375 4.22812 8.4375 4.125V4.3125H15.5625V4.125C15.5625 4.22812 15.6469 4.3125 15.75 4.3125H15.5625V6H17.25V4.125C17.25 3.29766 16.5773 2.625 15.75 2.625H8.25C7.42266 2.625 6.75 3.29766 6.75 4.125V6H8.4375V4.3125ZM20.25 6H3.75C3.33516 6 3 6.33516 3 6.75V7.5C3 7.60313 3.08437 7.6875 3.1875 7.6875H4.60312L5.18203 19.9453C5.21953 20.7445 5.88047 21.375 6.67969 21.375H17.3203C18.1219 21.375 18.7805 20.7469 18.818 19.9453L19.3969 7.6875H20.8125C20.9156 7.6875 21 7.60313 21 7.5V6.75C21 6.33516 20.6648 6 20.25 6ZM17.1398 19.6875H6.86016L6.29297 7.6875H17.707L17.1398 19.6875Z"}));var Gi="2.0.3",Rt=500,es="user-agent",De="",ts="?",it="function",fe="undefined",Pe="object",It="string",q="browser",ie="cpu",ee="device",Z="engine",K="os",ke="result",w="name",f="type",b="vendor",y="version",$="architecture",Ge="major",g="model",qe="console",D="mobile",E="tablet",z="smarttv",Q="wearable",pt="xr",$e="embedded",Le="inapp",Nt="brands",ve="formFactors",Ft="fullVersionList",Re="platform",Bt="platformVersion",lt="bitness",be="sec-ch-ua",Yi=be+"-full-version-list",Ki=be+"-arch",Xi=be+"-"+lt,Zi=be+"-form-factors",Ji=be+"-"+D,Qi=be+"-"+g,Fs=be+"-"+Re,er=Fs+"-version",Bs=[Nt,Ft,D,g,Re,Bt,$,ve,lt],Xe="Amazon",Se="Apple",ss="ASUS",is="BlackBerry",we="Google",rs="Huawei",os="Lenovo",as="Honor",Ze="LG",mt="Microsoft",ft="Motorola",ht="Nvidia",ns="OnePlus",xt="OPPO",Me="Samsung",ls="Sharp",Ne="Sony",gt="Xiaomi",bt="Zebra",cs="Chrome",ds="Chromium",de="Chromecast",tr="Edge",Fe="Firefox",Be="Opera",wt="Facebook",us="Sogou",Te="Mobile ",He=" Browser",At="Windows",sr=typeof window!==fe,W=sr&&window.navigator?window.navigator:void 0,ue=W&&W.userAgentData?W.userAgentData:void 0,ir=function(t,s){var i={},u=s;if(!rt(s)){u={};for(var n in s)for(var p in s[n])u[p]=s[n][p].concat(u[p]?u[p]:[])}for(var m in t)i[m]=u[m]&&u[m].length%2===0?u[m].concat(t[m]):t[m];return i},ct=function(t){for(var s={},i=0;i<t.length;i++)s[t[i].toUpperCase()]=t[i];return s},Dt=function(t,s){if(typeof t===Pe&&t.length>0){for(var i in t)if(re(t[i])==re(s))return!0;return!1}return _e(t)?re(s).indexOf(re(t))!==-1:!1},rt=function(t,s){for(var i in t)return/^(browser|cpu|device|engine|os)$/.test(i)||(s?rt(t[i]):!1)},_e=function(t){return typeof t===It},vt=function(t){if(t){for(var s=[],i=Ee(/\\?\"/g,t).split(","),u=0;u<i.length;u++)if(i[u].indexOf(";")>-1){var n=Ye(i[u]).split(";v=");s[u]={brand:n[0],version:n[1]}}else s[u]=Ye(i[u]);return s}},re=function(t){return _e(t)?t.toLowerCase():t},yt=function(t){return _e(t)?Ee(/[^\d\.]/g,t).split(".")[0]:void 0},oe=function(t){for(var s in t){var i=t[s];typeof i==Pe&&i.length==2?this[i[0]]=i[1]:this[i]=void 0}return this},Ee=function(t,s){return _e(s)?s.replace(t,De):s},Ue=function(t){return Ee(/\\?\"/g,t)},Ye=function(t,s){if(_e(t))return t=Ee(/^\s\s*/,t),typeof s===fe?t:t.substring(0,Rt)},jt=function(t,s){if(!(!t||!s))for(var i=0,u,n,p,m,o,d;i<s.length&&!o;){var r=s[i],l=s[i+1];for(u=n=0;u<r.length&&!o&&r[u];)if(o=r[u++].exec(t),o)for(p=0;p<l.length;p++)d=o[++n],m=l[p],typeof m===Pe&&m.length>0?m.length===2?typeof m[1]==it?this[m[0]]=m[1].call(this,d):this[m[0]]=m[1]:m.length===3?typeof m[1]===it&&!(m[1].exec&&m[1].test)?this[m[0]]=d?m[1].call(this,d,m[2]):void 0:this[m[0]]=d?d.replace(m[1],m[2]):void 0:m.length===4&&(this[m[0]]=d?m[3].call(this,d.replace(m[1],m[2])):void 0):this[m]=d||void 0;i+=2}},pe=function(t,s){for(var i in s)if(typeof s[i]===Pe&&s[i].length>0){for(var u=0;u<s[i].length;u++)if(Dt(s[i][u],t))return i===ts?void 0:i}else if(Dt(s[i],t))return i===ts?void 0:i;return s.hasOwnProperty("*")?s["*"]:t},ps={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ms={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},fs={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[w,Te+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[w,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[w,y],[/opios[\/ ]+([\w\.]+)/i],[y,[w,Be+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[y,[w,Be+" GX"]],[/\bopr\/([\w\.]+)/i],[y,[w,Be]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[y,[w,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[y,[w,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[w,y],[/quark(?:pc)?\/([-\w\.]+)/i],[y,[w,"Quark"]],[/\bddg\/([\w\.]+)/i],[y,[w,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[w,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[y,[w,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[w,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[w,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[w,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[y,[w,"Smart "+os+He]],[/(avast|avg)\/([\w\.]+)/i],[[w,/(.+)/,"$1 Secure"+He],y],[/\bfocus\/([\w\.]+)/i],[y,[w,Fe+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[w,Be+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[w,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[w,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[w,Be+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[w,"MIUI"+He]],[/fxios\/([\w\.-]+)/i],[y,[w,Te+Fe]],[/\bqihoobrowser\/?([\w\.]*)/i],[y,[w,"360"]],[/\b(qq)\/([\w\.]+)/i],[[w,/(.+)/,"$1Browser"],y],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[w,/(.+)/,"$1"+He],y],[/samsungbrowser\/([\w\.]+)/i],[y,[w,Me+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[y,[w,us+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[w,us+" Mobile"],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[w,y],[/(lbbrowser|rekonq)/i],[w],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[y,w],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[w,wt],y,[f,Le]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[w,y,[f,Le]],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[w,"GSA"],[f,Le]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[w,"TikTok"],[f,Le]],[/\[(linkedin)app\]/i],[w,[f,Le]],[/(chromium)[\/ ]([-\w\.]+)/i],[w,y],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[w,cs+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[w,cs+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[w,"Android"+He]],[/chrome\/([\w\.]+) mobile/i],[y,[w,Te+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[w,y],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[y,[w,Te+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[w,Te+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[y,w],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[w,[y,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[w,y],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[w,Te+Fe],y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[w,"Netscape"],y],[/(wolvic|librewolf)\/([\w\.]+)/i],[w,y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[w,Fe+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[w,[y,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[w,[y,/[^\d\.]+./,De]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[$,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[$,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[$,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[$,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[$,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[$,/ower/,De,re]],[/ sun4\w[;\)]/i],[[$,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[$,re]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[g,[b,Me],[f,E]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[g,[b,Me],[f,D]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[g,[b,Se],[f,D]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[g,[b,Se],[f,E]],[/(macintosh);/i],[g,[b,Se]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[g,[b,ls],[f,D]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[g,[b,as],[f,E]],[/honor([-\w ]+)[;\)]/i],[g,[b,as],[f,D]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[g,[b,rs],[f,E]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[g,[b,rs],[f,D]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[g,/_/g," "],[b,gt],[f,E]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[g,/_/g," "],[b,gt],[f,D]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[g,[b,xt],[f,D]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[g,[b,pe,{OnePlus:["304","403","203"],"*":xt}],[f,E]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[g,[b,"BLU"],[f,D]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[g,[b,"Vivo"],[f,D]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[g,[b,"Realme"],[f,D]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[g,[b,ft],[f,D]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[g,[b,ft],[f,E]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[g,[b,Ze],[f,E]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[g,[b,Ze],[f,D]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[g,[b,os],[f,E]],[/(nokia) (t[12][01])/i],[b,g,[f,E]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[g,/_/g," "],[f,D],[b,"Nokia"]],[/(pixel (c|tablet))\b/i],[g,[b,we],[f,E]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[g,[b,we],[f,D]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[g,[b,Ne],[f,D]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[g,"Xperia Tablet"],[b,Ne],[f,E]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[g,[b,ns],[f,D]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[g,[b,Xe],[f,E]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[g,/(.+)/g,"Fire Phone $1"],[b,Xe],[f,D]],[/(playbook);[-\w\),; ]+(rim)/i],[g,b,[f,E]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[g,[b,is],[f,D]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[g,[b,ss],[f,E]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[g,[b,ss],[f,D]],[/(nexus 9)/i],[g,[b,"HTC"],[f,E]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[b,[g,/_/g," "],[f,D]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[f,E]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[g,[b,"TCL"],[f,D]],[/(itel) ((\w+))/i],[[b,re],g,[f,pe,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[g,[b,"Acer"],[f,E]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[g,[b,"Meizu"],[f,D]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[g,[b,"Ulefone"],[f,D]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[g,[b,"Energizer"],[f,D]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[g,[b,"Cat"],[f,D]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[g,[b,"Smartfren"],[f,D]],[/droid.+; (a(?:015|06[35]|142p?))/i],[g,[b,"Nothing"],[f,D]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[g,[b,"Archos"],[f,E]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[g,[b,"Archos"],[f,D]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[b,g,[f,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[b,g,[f,D]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[b,g,[f,E]],[/(surface duo)/i],[g,[b,mt],[f,E]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[g,[b,"Fairphone"],[f,D]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[g,[b,ht],[f,E]],[/(sprint) (\w+)/i],[b,g,[f,D]],[/(kin\.[onetw]{3})/i],[[g,/\./g," "],[b,mt],[f,D]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[g,[b,bt],[f,E]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[g,[b,bt],[f,D]],[/smart-tv.+(samsung)/i],[b,[f,z]],[/hbbtv.+maple;(\d+)/i],[[g,/^/,"SmartTV"],[b,Me],[f,z]],[/tcast.+(lg)e?. ([-\w]+)/i],[b,g,[f,z]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[b,Ze],[f,z]],[/(apple) ?tv/i],[b,[g,Se+" TV"],[f,z]],[/crkey.*devicetype\/chromecast/i],[[g,de+" Third Generation"],[b,we],[f,z]],[/crkey.*devicetype\/([^/]*)/i],[[g,/^/,"Chromecast "],[b,we],[f,z]],[/fuchsia.*crkey/i],[[g,de+" Nest Hub"],[b,we],[f,z]],[/crkey/i],[[g,de],[b,we],[f,z]],[/(portaltv)/i],[g,[b,wt],[f,z]],[/droid.+aft(\w+)( bui|\))/i],[g,[b,Xe],[f,z]],[/(shield \w+ tv)/i],[g,[b,ht],[f,z]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[g,[b,ls],[f,z]],[/(bravia[\w ]+)( bui|\))/i],[g,[b,Ne],[f,z]],[/(mi(tv|box)-?\w+) bui/i],[g,[b,gt],[f,z]],[/Hbbtv.*(technisat) (.*);/i],[b,g,[f,z]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[b,Ye],[g,Ye],[f,z]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[g,[f,z]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,z]],[/(ouya)/i,/(nintendo) (\w+)/i],[b,g,[f,qe]],[/droid.+; (shield)( bui|\))/i],[g,[b,ht],[f,qe]],[/(playstation \w+)/i],[g,[b,Ne],[f,qe]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[g,[b,mt],[f,qe]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[g,[b,Me],[f,Q]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[b,g,[f,Q]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[g,[b,xt],[f,Q]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[g,[b,Se],[f,Q]],[/(opwwe\d{3})/i],[g,[b,ns],[f,Q]],[/(moto 360)/i],[g,[b,ft],[f,Q]],[/(smartwatch 3)/i],[g,[b,Ne],[f,Q]],[/(g watch r)/i],[g,[b,Ze],[f,Q]],[/droid.+; (wt63?0{2,3})\)/i],[g,[b,bt],[f,Q]],[/droid.+; (glass) \d/i],[g,[b,we],[f,pt]],[/(pico) (4|neo3(?: link|pro)?)/i],[b,g,[f,pt]],[/(quest( \d| pro)?s?).+vr/i],[g,[b,wt],[f,pt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[b,[f,$e]],[/(aeobc)\b/i],[g,[b,Xe],[f,$e]],[/(homepod).+mac os/i],[g,[b,Se],[f,$e]],[/windows iot/i],[[f,$e]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[g,[f,pe,{mobile:"Mobile",xr:"VR","*":E}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,E]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,D]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[g,[b,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[w,tr+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[w,y],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[w,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[w,y],[/ladybird\//i],[[w,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,w]],os:[[/microsoft (windows) (vista|xp)/i],[w,y],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[w,[y,pe,ps]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[y,pe,ps],[w,At]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[w,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[w,"macOS"],[y,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[y,[w,de+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[y,[w,de+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[y,[w,de+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[y,[w,de+" Linux"]],[/crkey\/([\d\.]+)/i],[y,[w,de]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,w],[/(ubuntu) ([\w\.]+) like android/i],[[w,/(.+)/,"$1 Touch"],y],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[w,y],[/\(bb(10);/i],[y,[w,is]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[y,[w,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[w,Fe+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[w,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[w,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[w,"Chrome OS"],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[w,y],[/(sunos) ?([\w\.\d]*)/i],[[w,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[w,y]]},Je=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return oe.call(t.init,[[q,[w,y,Ge,f]],[ie,[$]],[ee,[f,g,b]],[Z,[w,y]],[K,[w,y]]]),oe.call(t.isIgnore,[[q,[y,Ge]],[Z,[y]],[K,[y]]]),oe.call(t.isIgnoreRgx,[[q,/ ?browser$/i],[K,/ ?os$/i]]),oe.call(t.toString,[[q,[w,y]],[ie,[$]],[ee,[b,g]],[Z,[w,y]],[K,[w,y]]]),t}(),rr=function(t,s){var i=Je.init[s],u=Je.isIgnore[s]||0,n=Je.isIgnoreRgx[s]||0,p=Je.toString[s]||0;function m(){oe.call(this,i)}return m.prototype.getItem=function(){return t},m.prototype.withClientHints=function(){return ue?ue.getHighEntropyValues(Bs).then(function(o){return t.setCH(new Hs(o,!1)).parseCH().get()}):t.parseCH().get()},m.prototype.withFeatureCheck=function(){return t.detectFeature().get()},s!=ke&&(m.prototype.is=function(o){var d=!1;for(var r in this)if(this.hasOwnProperty(r)&&!Dt(u,r)&&re(n?Ee(n,this[r]):this[r])==re(n?Ee(n,o):o)){if(d=!0,o!=fe)break}else if(o==fe&&d){d=!d;break}return d},m.prototype.toString=function(){var o=De;for(var d in p)typeof this[p[d]]!==fe&&(o+=(o?" ":De)+this[p[d]]);return o||fe}),ue||(m.prototype.then=function(o){var d=this,r=function(){for(var a in d)d.hasOwnProperty(a)&&(this[a]=d[a])};r.prototype={is:m.prototype.is,toString:m.prototype.toString};var l=new r;return o(l),l}),new m};function Hs(t,s){if(t=t||{},oe.call(this,Bs),s)oe.call(this,[[Nt,vt(t[be])],[Ft,vt(t[Yi])],[D,/\?1/.test(t[Ji])],[g,Ue(t[Qi])],[Re,Ue(t[Fs])],[Bt,Ue(t[er])],[$,Ue(t[Ki])],[ve,vt(t[Zi])],[lt,Ue(t[Xi])]]);else for(var i in t)this.hasOwnProperty(i)&&typeof t[i]!==fe&&(this[i]=t[i])}function hs(t,s,i,u){return this.get=function(n){return n?this.data.hasOwnProperty(n)?this.data[n]:void 0:this.data},this.set=function(n,p){return this.data[n]=p,this},this.setCH=function(n){return this.uaCH=n,this},this.detectFeature=function(){if(W&&W.userAgent==this.ua)switch(this.itemType){case q:W.brave&&typeof W.brave.isBrave==it&&this.set(w,"Brave");break;case ee:!this.get(f)&&ue&&ue[D]&&this.set(f,D),this.get(g)=="Macintosh"&&W&&typeof W.standalone!==fe&&W.maxTouchPoints&&W.maxTouchPoints>2&&this.set(g,"iPad").set(f,E);break;case K:!this.get(w)&&ue&&ue[Re]&&this.set(w,ue[Re]);break;case ke:var n=this.data,p=function(m){return n[m].getItem().detectFeature().get()};this.set(q,p(q)).set(ie,p(ie)).set(ee,p(ee)).set(Z,p(Z)).set(K,p(K))}return this},this.parseUA=function(){return this.itemType!=ke&&jt.call(this.data,this.ua,this.rgxMap),this.itemType==q&&this.set(Ge,yt(this.get(y))),this},this.parseCH=function(){var n=this.uaCH,p=this.rgxMap;switch(this.itemType){case q:case Z:var m=n[Ft]||n[Nt],o;if(m)for(var d in m){var r=m[d].brand||m[d],l=m[d].version;this.itemType==q&&!/not.a.brand/i.test(r)&&(!o||/chrom/i.test(o)&&r!=ds)&&(r=pe(r,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(w,r).set(y,l).set(Ge,yt(l)),o=r),this.itemType==Z&&r==ds&&this.set(y,l)}break;case ie:var a=n[$];a&&(a&&n[lt]=="64"&&(a+="64"),jt.call(this.data,a+";",p));break;case ee:if(n[D]&&this.set(f,D),n[g]&&(this.set(g,n[g]),!this.get(f)||!this.get(b))){var c={};jt.call(c,"droid 9; "+n[g]+")",p),!this.get(f)&&c.type&&this.set(f,c.type),!this.get(b)&&c.vendor&&this.set(b,c.vendor)}if(n[ve]){var h;if(typeof n[ve]!="string")for(var C=0;!h&&C<n[ve].length;)h=pe(n[ve][C++],ms);else h=pe(n[ve],ms);this.set(f,h)}break;case K:var v=n[Re];if(v){var x=n[Bt];v==At&&(x=parseInt(yt(x),10)>=13?"11":"10"),this.set(w,v).set(y,x)}this.get(w)==At&&n[g]=="Xbox"&&this.set(w,"Xbox").set(y,void 0);break;case ke:var T=this.data,I=function(P){return T[P].getItem().setCH(n).parseCH().get()};this.set(q,I(q)).set(ie,I(ie)).set(ee,I(ee)).set(Z,I(Z)).set(K,I(K))}return this},oe.call(this,[["itemType",t],["ua",s],["uaCH",u],["rgxMap",i],["data",rr(this,t)]]),this}function ne(t,s,i){if(typeof t===Pe?(rt(t,!0)?(typeof s===Pe&&(i=s),s=t):(i=t,s=void 0),t=void 0):typeof t===It&&!rt(s,!0)&&(i=s,s=void 0),i&&typeof i.append===it){var u={};i.forEach(function(d,r){u[r]=d}),i=u}if(!(this instanceof ne))return new ne(t,s,i).getResult();var n=typeof t===It?t:i&&i[es]?i[es]:W&&W.userAgent?W.userAgent:De,p=new Hs(i,!0),m=s?ir(fs,s):fs,o=function(d){return d==ke?function(){return new hs(d,n,m,p).set("ua",n).set(q,this.getBrowser()).set(ie,this.getCPU()).set(ee,this.getDevice()).set(Z,this.getEngine()).set(K,this.getOS()).get()}:function(){return new hs(d,n,m[d],p).parseUA().get()}};return oe.call(this,[["getBrowser",o(q)],["getCPU",o(ie)],["getDevice",o(ee)],["getEngine",o(Z)],["getOS",o(K)],["getResult",o(ke)],["getUA",function(){return n}],["setUA",function(d){return _e(d)&&(n=d.length>Rt?Ye(d,Rt):d),this}]]).setUA(n),this}ne.VERSION=Gi;ne.BROWSER=ct([w,y,Ge,f]);ne.CPU=ct([$]);ne.DEVICE=ct([g,b,f,qe,D,z,E,Q,$e]);ne.ENGINE=ne.OS=ct([w,y]);function or(t){return!t||typeof t!="string"?"break-all":t.includes(" ")?"break-word":"break-all"}function Us({logo:t="",name:s="",description:i="",size:u=40,variant:n="rounded",sx:p={},className:m="",logoName:o="",tooltip:d=null}){const r={width:u,height:u,...p},l=typeof s=="string"?s:t,a=e.jsxs(he,{direction:"row",spacing:1,className:`info-card-wrapper ${m}`,sx:{alignItems:"center",cursor:d?"pointer":"default"},children:[t?e.jsx(Xt,{src:t,alt:o??l,variant:n,sx:r}):e.jsx(Xt,{variant:n,sx:r,children:l?.slice(0,1)}),e.jsxs(he,{direction:"column",sx:{alignItems:"flex-start",justifyContent:"space-around",wordBreak:or(s),minWidth:{xs:100,sm:140}},children:[e.jsx(H,{variant:"body1",component:"div",sx:{color:"text.primary"},children:s}),i&&e.jsx(H,{variant:"subtitle1",sx:{color:"text.secondary"},children:i})]})]});return d?e.jsx(ye,{title:d,placement:"top-start",slotProps:{tooltip:{sx:{bgcolor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff",color:c=>c.palette.mode==="dark"?"#ffffff":c.palette.text.primary,boxShadow:"0 2px 10px rgba(0, 0, 0, 0.15)",borderRadius:2,padding:"10px 16px",fontSize:14,maxWidth:400,minWidth:240,wordBreak:"break-word",border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0","& .MuiTooltip-arrow":{color:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff","&::before":{border:c=>c.palette.mode==="dark"?"1px solid #3a3f48":"1px solid #e0e0e0",backgroundColor:c=>c.palette.mode==="dark"?"#2a2e37":"#ffffff"}}}}},children:a}):a}Us.propTypes={logo:S.string,name:S.oneOfType([S.string,S.node]).isRequired,description:S.oneOfType([S.string,S.node]),size:S.oneOfType([S.number,S.string]),variant:S.oneOf(["square","rounded","circular"]),sx:S.object,className:S.string,logoName:S.string,tooltip:S.oneOfType([S.string,S.node])};function ar(t){try{if(!t.trim())return{device:{icon:e.jsx(dt,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(ut,{fontSize:"small"}),text:"Unknown Browser"}};const i=new ne(t).getResult();let u="";const n=t.split(/\s+/).find(d=>d.startsWith("arcwallet"));if(n){const d=n.split("/");d.length>1&&Zt.coerce(d[1])&&(u=Zt.coerce(d[1]).version)}const p=(()=>{const{type:d="",model:r=""}=i.device;return d==="mobile"?{icon:e.jsx(Wi,{fontSize:"small"}),text:r||"Mobile Device"}:d==="tablet"?{icon:e.jsx(Vi,{fontSize:"small"}),text:r||"Tablet"}:{icon:e.jsx($i,{fontSize:"small"}),text:r||"Desktop"}})(),m=(()=>{const{name:d="",version:r=""}=i.os;return d.toLowerCase().includes("mac")?{icon:e.jsx(Qt,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("ios")?{icon:e.jsx(Qt,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("android")?{icon:e.jsx(qi,{fontSize:"small"}),text:`${d} ${r}`}:d.toLowerCase().includes("windows")?{icon:e.jsx(dt,{fontSize:"small"}),text:`${d} ${r}`}:{icon:null,text:d?`${d} ${r}`:"Unknown OS"}})(),o=(()=>{const{name:d="",version:r=""}=i.browser;return{icon:e.jsx(ut,{fontSize:"small"}),text:d?`${d} ${r}`:"Unknown Browser"}})();return{device:p,os:m,browser:o,...u?{walletVersion:{icon:null,text:u}}:{}}}catch(s){return console.error("Error parsing user agent:",s),{device:{icon:e.jsx(dt,{fontSize:"small"}),text:"Unknown Device"},os:{icon:null,text:"Unknown OS"},browser:{icon:e.jsx(ut,{fontSize:"small"}),text:"Unknown Browser"}}}}function qs({ua:t}){const s=ar(t);return e.jsx(he,{spacing:1,children:Object.entries(s).map(([i,{icon:u,text:n}])=>e.jsxs(j,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(j,{sx:{display:"flex",alignItems:"center",justifyContent:"center"},children:u}),e.jsx(H,{variant:"body2",sx:{display:"flex"},children:n})]},i))})}qs.propTypes={ua:S.string.isRequired};const $s=()=>{const{t}=F(),s={$all:t("common.all"),owner:"Owner",admin:"Admin",member:"Member",guest:"Guest"};return{SYSTEM_ROLES:s,formatRoleName:u=>{const n=(u||"").toLowerCase();return n.startsWith("$")?s[n]||n.slice(1):s[n]||n}}},nr=(t,s=!1)=>{const i=s?1:.6;switch(t){case"owner":return`rgba(232, 222, 255, ${i})`;case"admin":return`rgba(227, 242, 253, ${i})`;case"member":return`rgba(232, 245, 233, ${i})`;case"guest":return`rgba(245, 245, 245, ${i})`;default:return`rgba(245, 245, 245, ${i})`}},lr=Pt(Et)(({role:t})=>({backgroundColor:nr(t.toLowerCase()),color:"#000000"})),cr=t=>{switch(t){case"valid":return s=>s.palette.success.light;case"expired":return s=>s.palette.text.disabled;case"revoked":return s=>s.palette.error.light;default:return s=>s.palette.warning.light}},dr=Pt(Et)(({theme:t,status:s})=>({backgroundColor:cr(s)(t),color:"#FFFFFF"}));function Ws({did:t}){return e.jsx(Ie,{size:14,responsive:!1,compact:!0,copyable:!1,did:t})}Ws.propTypes={did:S.string.isRequired};function Vs({timestamp:t,locale:s}){return e.jsx(j,{sx:{minWidth:"100px"},children:e.jsx(Qe,{value:t,locale:s})})}Vs.propTypes={timestamp:S.number.isRequired,locale:S.string.isRequired};function Gs({name:t="",role:s}){const{formatRoleName:i}=$s();return e.jsx(lr,{label:i(t||s),size:"small",role:t||s,sx:{borderRadius:1}})}Gs.propTypes={role:S.string.isRequired,name:S.string};function Ys({status:t}){const{t:s}=F();return e.jsx(dr,{label:s(`team.passport.statusMap.${t}`),size:"small",status:t,sx:{borderRadius:1}})}Ys.propTypes={status:S.string.isRequired};function Ks({source:t}){const{t:s}=F();return t?s(`team.passport.sourceMaps.${t}`):"-"}Ks.propTypes={source:S.string.isRequired};function Xs({user:t,size:s="default",tooltip:i=!1,inService:u=!1}){const{teamDid:n}=X(),p=et.useMemo(()=>Ot(t.avatar,n,u),[t.avatar,n,u]),m=et.useMemo(()=>e.jsx(Ie,{did:t?.did,compact:!0,responsive:!1,sx:{whiteSpace:"nowrap"},size:12}),[t?.did]),o=pi(()=>({...t,avatar:p}),[t,p]);return s==="small"?e.jsx(Us,{variant:"circular",logo:p,name:e.jsx(H,{sx:{maxWidth:320,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},className:"customer-link-name",children:t.fullName||t.email}),...s==="small"?{tooltip:i?e.jsx(Ie,{did:t?.did}):!1,size:24}:{description:m,size:36}}):e.jsx(mi,{user:o,avatarSize:s==="small"?24:36,cardType:hi.Detailed,infoType:fi.Minimal,sx:{padding:0,border:"none"},showDid:!0,didProps:{compact:!0,responsive:!1},showHoverCard:!1})}Xs.propTypes={user:S.object.isRequired,size:S.string,tooltip:S.bool,inService:S.bool};const ur=et.memo(Xs),pr=t=>e.jsx(Ws,{did:t}),Ht=(t,s)=>e.jsx(Gs,{name:t,role:s}),Ut=t=>e.jsx(Ys,{status:t}),Zs=(t,s)=>e.jsx(Vs,{timestamp:t,locale:s}),ot=t=>e.jsx(Ks,{source:t}),qt=(t,s=!1)=>e.jsx(ur,{user:t,inService:s}),mr=t=>e.jsx(qs,{ua:t}),xs="info";function Js({createPassportSvg:t,passport:s,onCancel:i,onSwitchPassport:u=()=>{}}){const{t:n}=F(),p=xi({tab:xs}),m={info:{label:n("common.basicInfo"),value:xs,component:()=>e.jsx(Qs,{passport:s,createPassportSvg:t})},logs:{label:n("common.logs"),value:"logs",component:()=>e.jsx(si,{passport:s})},related:{label:n("team.passport.related"),value:"related",component:()=>e.jsx(ii,{passport:s,onSwitchPassport:u})}},o=Object.values(m).map(({label:l,value:a})=>({label:l,value:a})).filter(l=>l.value==="related"?s.parentDid:!0),d=m[p.tab]||m.info,r=l=>{p.tab=l};return e.jsx(le,{title:n("common.passport"),onClose:i,open:!0,PaperProps:{style:{maxWidth:800,minHeight:"80vh"}},fullWidth:!0,children:e.jsxs(fr,{children:[e.jsx(j,{className:"tabs",children:e.jsx(Mi,{tabs:o,current:p.tab,onChange:r,scrollButtons:"auto"})}),e.jsx(j,{className:"body",children:e.jsx(d.component,{})})]})})}Js.propTypes={createPassportSvg:S.func.isRequired,passport:S.object.isRequired,onCancel:S.func.isRequired,onSwitchPassport:S.func};const fr=ce(j)`
|
|
2
2
|
margin-top: -16px;
|
|
3
3
|
|
|
4
4
|
.tabs {
|
|
@@ -132,7 +132,7 @@ import{aG as xe,j as e,r as R,aV as he,cw as Xt,T as H,az as ye,o as S,m as F,be
|
|
|
132
132
|
*
|
|
133
133
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
134
134
|
* @license MIT
|
|
135
|
-
*/var kt,ys;function Er(){if(ys)return kt;ys=1,kt=function(i){return i!=null&&(t(i)||s(i)||!!i._isBuffer)};function t(i){return!!i.constructor&&typeof i.constructor.isBuffer=="function"&&i.constructor.isBuffer(i)}function s(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&t(i.slice(0,0))}return kt}var js;function Or(){return js||(js=1,function(){var t=Pr(),s=vs().utf8,i=Er(),u=vs().bin,n=function(p,m){p.constructor==String?m&&m.encoding==="binary"?p=u.stringToBytes(p):p=s.stringToBytes(p):i(p)?p=Array.prototype.slice.call(p,0):!Array.isArray(p)&&p.constructor!==Uint8Array&&(p=p.toString());for(var o=t.bytesToWords(p),d=p.length*8,r=1732584193,l=-271733879,a=-1732584194,c=271733878,h=0;h<o.length;h++)o[h]=(o[h]<<8|o[h]>>>24)&16711935|(o[h]<<24|o[h]>>>8)&4278255360;o[d>>>5]|=128<<d%32,o[(d+64>>>9<<4)+14]=d;for(var C=n._ff,v=n._gg,x=n._hh,T=n._ii,h=0;h<o.length;h+=16){var I=r,P=l,A=a,L=c;r=C(r,l,a,c,o[h+0],7,-680876936),c=C(c,r,l,a,o[h+1],12,-389564586),a=C(a,c,r,l,o[h+2],17,606105819),l=C(l,a,c,r,o[h+3],22,-1044525330),r=C(r,l,a,c,o[h+4],7,-176418897),c=C(c,r,l,a,o[h+5],12,1200080426),a=C(a,c,r,l,o[h+6],17,-1473231341),l=C(l,a,c,r,o[h+7],22,-45705983),r=C(r,l,a,c,o[h+8],7,1770035416),c=C(c,r,l,a,o[h+9],12,-1958414417),a=C(a,c,r,l,o[h+10],17,-42063),l=C(l,a,c,r,o[h+11],22,-1990404162),r=C(r,l,a,c,o[h+12],7,1804603682),c=C(c,r,l,a,o[h+13],12,-40341101),a=C(a,c,r,l,o[h+14],17,-1502002290),l=C(l,a,c,r,o[h+15],22,1236535329),r=v(r,l,a,c,o[h+1],5,-165796510),c=v(c,r,l,a,o[h+6],9,-1069501632),a=v(a,c,r,l,o[h+11],14,643717713),l=v(l,a,c,r,o[h+0],20,-373897302),r=v(r,l,a,c,o[h+5],5,-701558691),c=v(c,r,l,a,o[h+10],9,38016083),a=v(a,c,r,l,o[h+15],14,-660478335),l=v(l,a,c,r,o[h+4],20,-405537848),r=v(r,l,a,c,o[h+9],5,568446438),c=v(c,r,l,a,o[h+14],9,-1019803690),a=v(a,c,r,l,o[h+3],14,-187363961),l=v(l,a,c,r,o[h+8],20,1163531501),r=v(r,l,a,c,o[h+13],5,-1444681467),c=v(c,r,l,a,o[h+2],9,-51403784),a=v(a,c,r,l,o[h+7],14,1735328473),l=v(l,a,c,r,o[h+12],20,-1926607734),r=x(r,l,a,c,o[h+5],4,-378558),c=x(c,r,l,a,o[h+8],11,-2022574463),a=x(a,c,r,l,o[h+11],16,1839030562),l=x(l,a,c,r,o[h+14],23,-35309556),r=x(r,l,a,c,o[h+1],4,-1530992060),c=x(c,r,l,a,o[h+4],11,1272893353),a=x(a,c,r,l,o[h+7],16,-155497632),l=x(l,a,c,r,o[h+10],23,-1094730640),r=x(r,l,a,c,o[h+13],4,681279174),c=x(c,r,l,a,o[h+0],11,-358537222),a=x(a,c,r,l,o[h+3],16,-722521979),l=x(l,a,c,r,o[h+6],23,76029189),r=x(r,l,a,c,o[h+9],4,-640364487),c=x(c,r,l,a,o[h+12],11,-421815835),a=x(a,c,r,l,o[h+15],16,530742520),l=x(l,a,c,r,o[h+2],23,-995338651),r=T(r,l,a,c,o[h+0],6,-198630844),c=T(c,r,l,a,o[h+7],10,1126891415),a=T(a,c,r,l,o[h+14],15,-1416354905),l=T(l,a,c,r,o[h+5],21,-57434055),r=T(r,l,a,c,o[h+12],6,1700485571),c=T(c,r,l,a,o[h+3],10,-1894986606),a=T(a,c,r,l,o[h+10],15,-1051523),l=T(l,a,c,r,o[h+1],21,-2054922799),r=T(r,l,a,c,o[h+8],6,1873313359),c=T(c,r,l,a,o[h+15],10,-30611744),a=T(a,c,r,l,o[h+6],15,-1560198380),l=T(l,a,c,r,o[h+13],21,1309151649),r=T(r,l,a,c,o[h+4],6,-145523070),c=T(c,r,l,a,o[h+11],10,-1120210379),a=T(a,c,r,l,o[h+2],15,718787259),l=T(l,a,c,r,o[h+9],21,-343485551),r=r+I>>>0,l=l+P>>>0,a=a+A>>>0,c=c+L>>>0}return t.endian([r,l,a,c])};n._ff=function(p,m,o,d,r,l,a){var c=p+(m&o|~m&d)+(r>>>0)+a;return(c<<l|c>>>32-l)+m},n._gg=function(p,m,o,d,r,l,a){var c=p+(m&d|o&~d)+(r>>>0)+a;return(c<<l|c>>>32-l)+m},n._hh=function(p,m,o,d,r,l,a){var c=p+(m^o^d)+(r>>>0)+a;return(c<<l|c>>>32-l)+m},n._ii=function(p,m,o,d,r,l,a){var c=p+(o^(m|~d))+(r>>>0)+a;return(c<<l|c>>>32-l)+m},n._blocksize=16,n._digestsize=16,Ct.exports=function(p,m){if(p==null)throw new Error("Illegal argument "+p);var o=t.wordsToBytes(n(p,m));return m&&m.asBytes?o:m&&m.asString?u.bytesToString(o):t.bytesToHex(o)}}()),Ct.exports}var _r=Or();const zr=As(_r);function Gt({teamDid:t,onCancel:s,onSuccess:i,onError:u=()=>{},mode:n="create",item:p={}}){const{api:m}=N(),[o,d]=R.useState(!1),[r,l]=R.useState(""),{t:a}=F(),[c,h]=R.useState(p.title||""),[C,v]=R.useState(p.description||""),[x,T]=R.useState(p?.extra?.display||"builtin"),[I,P]=R.useState(p?.extra?.types?p.extra.types.join(","):""),A=async()=>{const O=c.trim();if(!O){l(a("team.passport.error.titleEmpty"));return}if(O.length>64){l(a("team.passport.error.titleTooLong",{length:64}));return}const G=C.replace(/\n/g," ");if(!G){l(a("team.passport.error.descriptionEmpty"));return}const je=n==="create"?zr(O):p.name;l(null),d(!0);try{if(n==="create"){const Y={teamDid:t,name:je,title:O,description:G};x==="custom"&&(Y.extra=JSON.stringify({display:"custom",types:I.split(",")})),await m.createRole({input:Y})}else{const Y={teamDid:t,role:{name:je,title:O,description:G}};await m.updateRole({input:Y})}i()}catch(Y){const Ce=Ve(Y);l(Ce),u(Y)}finally{d(!1)}},L=e.jsxs("div",{children:[n==="update"&&e.jsx(H,{component:"div",style:{paddingTop:16},children:e.jsx(te,{label:"ID",autoComplete:"off",variant:"outlined",name:"url","data-cy":"mutate-role-input-name",fullWidth:!0,autoFocus:!0,value:p.name,disabled:!0})}),e.jsx(H,{component:"div",style:{marginTop:16},children:e.jsx(te,{label:a("common.title"),autoComplete:"off",variant:"outlined",name:"title","data-cy":"mutate-role-input-title",fullWidth:!0,autoFocus:!0,value:c,onChange:O=>{l(null),h(O.target.value)},disabled:n==="update"||o,helperText:a("team.passport.create.titleTip")})}),e.jsx(H,{component:"div",style:{marginTop:16,marginBottom:16},children:e.jsx(te,{label:a("common.description"),autoComplete:"off",variant:"outlined",name:"description","data-cy":"mutate-role-input-description",fullWidth:!0,autoFocus:!0,value:C,onChange:O=>{l(null),v(O.target.value)},disabled:o,multiline:!0,rows:3})}),n==="create"&&e.jsxs("div",{style:{marginBottom:16},children:[e.jsx(Ds,{children:a("common.display")}),e.jsxs(Ms,{color:"primary",size:"small",value:x,exclusive:!0,style:{marginTop:16},disabled:o,onChange:(O,G)=>T(G),"data-cy":"input-role-display",children:[e.jsx(We,{value:"builtin","data-cy":"input-role-display-builtin",children:e.jsx(H,{children:a("team.passport.displayBuiltin")})}),e.jsx(We,{value:"custom","data-cy":"input-role-display-custom",children:e.jsx(H,{children:a("team.passport.displayCustom")})})]}),x==="custom"&&e.jsxs(e.Fragment,{children:[e.jsx(Ps,{fullWidth:!0,type:"text",style:{marginTop:16},"data-cy":"input-role-types",value:I,disabled:o,onChange:O=>{P(O.target.value)}}),e.jsx(Es,{children:a("team.passport.typesTip")})]})]})]});return e.jsxs(le,{title:n==="create"?a("team.passport.create.title"):"",fullWidth:!0,open:!0,onClose:s,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[e.jsx(V,{onClick:s,color:"inherit",children:a("common.cancel")}),e.jsxs(V,{"data-cy":"mutate-role-confirm",onClick:A,color:"primary",disabled:o,variant:"contained",autoFocus:!0,children:[o&&e.jsx(J,{size:16}),a(n==="create"?"common.create":"common.update")]})]}),children:[e.jsx(Ii,{component:"div",children:L}),!!r&&e.jsx(ks,{severity:"error",variant:"icon",style:{width:"100%",margin:0},children:r})]})}Gt.propTypes={teamDid:S.string.isRequired,onCancel:S.func.isRequired,onSuccess:S.func.isRequired,onError:S.func,mode:S.oneOf(["create","update"]),item:S.object};function Yt({onCancel:t,onSuccess:s,onDelete:i,roleName:u,hasPermission:n=!1}){const{api:p}=N(),{roles:m,permissions:o,teamDid:d,refresh:r,isNodeTeam:l}=X(),{t:a}=F(),[c,h]=R.useState([]),[C,v]=R.useState(!1),[x,T]=R.useState(null),[I,P]=R.useState(!1),A=Ae(m.find(B=>B.name===u)),L=Os(u),O=async B=>{if(!I)try{P(!0),await p.deleteRole({input:{teamDid:d,name:B}}),i()}catch(k){M.error(k.message)}finally{P(!1),T(null)}},G=async(B,k)=>{const U=(await p.getPermissionsByRole({input:{teamDid:B,role:{name:k}}})).permissions||[],se=o.map(Kt=>({...Kt,bind:U.some(ui=>ui.name===Kt.name)}));h(se)},je=async()=>{P(!0);const B=c.filter(k=>k.bind).map(k=>k.name);try{await p.updatePermissionsForRole({input:{teamDid:d,roleName:A.name,grantNames:B}}),M.success(a("common.saveSuccess")),s()}catch(k){M.error(Ve(k))}finally{P(!1)}};R.useEffect(()=>{d&&u&&G(d,u)},[d,u]);const Y=l||!n;let Ce=null;return l&&(Ce=e.jsxs("div",{className:"bind",children:[e.jsx("div",{className:"title",children:a("common.permission")}),e.jsx("div",{className:"list",children:c.filter(B=>Y?B.bind:!0).map(B=>e.jsx("div",{className:"item",children:e.jsx(Ai,{control:e.jsx(Di,{disabled:Y,checked:B.bind,onChange:()=>{h(k=>k.map(_=>(_.name===B.name&&(_.bind=!_.bind),_)))},name:B.name}),label:B.description})}))})]})),e.jsxs(le,{title:a("common.passport"),onClose:t,open:!0,fullWidth:!0,toolbar:n&&!L&&e.jsxs(e.Fragment,{children:[e.jsx(ae,{onClick:()=>v(A),"data-cy":`edit-passport-${A.name}`,size:"large",children:e.jsx(at,{fill:"#bfbfbf"})}),e.jsx(ae,{onClick:()=>T({title:a("team.passport.delete.title"),description:a("team.passport.delete.description",{name:A.title}),confirm:a("common.delConfirm"),cancel:a("common.cancel"),onConfirm:()=>{O(A.name)},onCancel:()=>{P(!1),T(null)}}),"data-cy":`delete-passport-${A.name}`,size:"large",children:e.jsx(nt,{"data-cy":"close-passport-dialog",fill:"#bfbfbf"})})]}),actions:l&&!Y&&e.jsxs(e.Fragment,{children:[e.jsx(V,{onClick:t,color:"inherit",children:a("common.cancel")}),e.jsxs(V,{onClick:je,color:"primary",disabled:I||!A,variant:"contained",autoFocus:!0,"data-cy":"bind-permission-btn-confirm",children:[I&&e.jsx(J,{size:16}),a("common.save")]})]}),children:[e.jsxs(Fr,{children:[!A&&e.jsx(Br,{children:e.jsx(J,{})}),A&&e.jsxs("div",{className:"dialog-content",children:[e.jsxs("div",{className:"header",children:[e.jsx("div",{className:"title",children:A.title}),e.jsx("div",{className:"description",style:{marginTop:l?16:48},children:A.description})]}),Ce]})]}),C&&e.jsx(Gt,{teamDid:d,onCancel:()=>v(null),onSuccess:()=>{v(null),r()},mode:"update",roleName:C.name,item:C}),x&&e.jsx(_t,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}const Lr=ge(Yt,"mutate_team"),Mr=ge(Yt,"",Oe);function Nr(t){const{inService:s}=N();return s?e.jsx(Mr,{...t}):e.jsx(Lr,{...t})}Yt.propTypes={roleName:S.string.isRequired,onCancel:S.func.isRequired,onSuccess:S.func.isRequired,onDelete:S.func.isRequired,hasPermission:S.bool};const Fr=ce.div`
|
|
135
|
+
*/var kt,ys;function Er(){if(ys)return kt;ys=1,kt=function(i){return i!=null&&(t(i)||s(i)||!!i._isBuffer)};function t(i){return!!i.constructor&&typeof i.constructor.isBuffer=="function"&&i.constructor.isBuffer(i)}function s(i){return typeof i.readFloatLE=="function"&&typeof i.slice=="function"&&t(i.slice(0,0))}return kt}var js;function Or(){return js||(js=1,function(){var t=Pr(),s=vs().utf8,i=Er(),u=vs().bin,n=function(p,m){p.constructor==String?m&&m.encoding==="binary"?p=u.stringToBytes(p):p=s.stringToBytes(p):i(p)?p=Array.prototype.slice.call(p,0):!Array.isArray(p)&&p.constructor!==Uint8Array&&(p=p.toString());for(var o=t.bytesToWords(p),d=p.length*8,r=1732584193,l=-271733879,a=-1732584194,c=271733878,h=0;h<o.length;h++)o[h]=(o[h]<<8|o[h]>>>24)&16711935|(o[h]<<24|o[h]>>>8)&4278255360;o[d>>>5]|=128<<d%32,o[(d+64>>>9<<4)+14]=d;for(var C=n._ff,v=n._gg,x=n._hh,T=n._ii,h=0;h<o.length;h+=16){var I=r,P=l,A=a,L=c;r=C(r,l,a,c,o[h+0],7,-680876936),c=C(c,r,l,a,o[h+1],12,-389564586),a=C(a,c,r,l,o[h+2],17,606105819),l=C(l,a,c,r,o[h+3],22,-1044525330),r=C(r,l,a,c,o[h+4],7,-176418897),c=C(c,r,l,a,o[h+5],12,1200080426),a=C(a,c,r,l,o[h+6],17,-1473231341),l=C(l,a,c,r,o[h+7],22,-45705983),r=C(r,l,a,c,o[h+8],7,1770035416),c=C(c,r,l,a,o[h+9],12,-1958414417),a=C(a,c,r,l,o[h+10],17,-42063),l=C(l,a,c,r,o[h+11],22,-1990404162),r=C(r,l,a,c,o[h+12],7,1804603682),c=C(c,r,l,a,o[h+13],12,-40341101),a=C(a,c,r,l,o[h+14],17,-1502002290),l=C(l,a,c,r,o[h+15],22,1236535329),r=v(r,l,a,c,o[h+1],5,-165796510),c=v(c,r,l,a,o[h+6],9,-1069501632),a=v(a,c,r,l,o[h+11],14,643717713),l=v(l,a,c,r,o[h+0],20,-373897302),r=v(r,l,a,c,o[h+5],5,-701558691),c=v(c,r,l,a,o[h+10],9,38016083),a=v(a,c,r,l,o[h+15],14,-660478335),l=v(l,a,c,r,o[h+4],20,-405537848),r=v(r,l,a,c,o[h+9],5,568446438),c=v(c,r,l,a,o[h+14],9,-1019803690),a=v(a,c,r,l,o[h+3],14,-187363961),l=v(l,a,c,r,o[h+8],20,1163531501),r=v(r,l,a,c,o[h+13],5,-1444681467),c=v(c,r,l,a,o[h+2],9,-51403784),a=v(a,c,r,l,o[h+7],14,1735328473),l=v(l,a,c,r,o[h+12],20,-1926607734),r=x(r,l,a,c,o[h+5],4,-378558),c=x(c,r,l,a,o[h+8],11,-2022574463),a=x(a,c,r,l,o[h+11],16,1839030562),l=x(l,a,c,r,o[h+14],23,-35309556),r=x(r,l,a,c,o[h+1],4,-1530992060),c=x(c,r,l,a,o[h+4],11,1272893353),a=x(a,c,r,l,o[h+7],16,-155497632),l=x(l,a,c,r,o[h+10],23,-1094730640),r=x(r,l,a,c,o[h+13],4,681279174),c=x(c,r,l,a,o[h+0],11,-358537222),a=x(a,c,r,l,o[h+3],16,-722521979),l=x(l,a,c,r,o[h+6],23,76029189),r=x(r,l,a,c,o[h+9],4,-640364487),c=x(c,r,l,a,o[h+12],11,-421815835),a=x(a,c,r,l,o[h+15],16,530742520),l=x(l,a,c,r,o[h+2],23,-995338651),r=T(r,l,a,c,o[h+0],6,-198630844),c=T(c,r,l,a,o[h+7],10,1126891415),a=T(a,c,r,l,o[h+14],15,-1416354905),l=T(l,a,c,r,o[h+5],21,-57434055),r=T(r,l,a,c,o[h+12],6,1700485571),c=T(c,r,l,a,o[h+3],10,-1894986606),a=T(a,c,r,l,o[h+10],15,-1051523),l=T(l,a,c,r,o[h+1],21,-2054922799),r=T(r,l,a,c,o[h+8],6,1873313359),c=T(c,r,l,a,o[h+15],10,-30611744),a=T(a,c,r,l,o[h+6],15,-1560198380),l=T(l,a,c,r,o[h+13],21,1309151649),r=T(r,l,a,c,o[h+4],6,-145523070),c=T(c,r,l,a,o[h+11],10,-1120210379),a=T(a,c,r,l,o[h+2],15,718787259),l=T(l,a,c,r,o[h+9],21,-343485551),r=r+I>>>0,l=l+P>>>0,a=a+A>>>0,c=c+L>>>0}return t.endian([r,l,a,c])};n._ff=function(p,m,o,d,r,l,a){var c=p+(m&o|~m&d)+(r>>>0)+a;return(c<<l|c>>>32-l)+m},n._gg=function(p,m,o,d,r,l,a){var c=p+(m&d|o&~d)+(r>>>0)+a;return(c<<l|c>>>32-l)+m},n._hh=function(p,m,o,d,r,l,a){var c=p+(m^o^d)+(r>>>0)+a;return(c<<l|c>>>32-l)+m},n._ii=function(p,m,o,d,r,l,a){var c=p+(o^(m|~d))+(r>>>0)+a;return(c<<l|c>>>32-l)+m},n._blocksize=16,n._digestsize=16,Ct.exports=function(p,m){if(p==null)throw new Error("Illegal argument "+p);var o=t.wordsToBytes(n(p,m));return m&&m.asBytes?o:m&&m.asString?u.bytesToString(o):t.bytesToHex(o)}}()),Ct.exports}var _r=Or();const zr=As(_r);function Gt({teamDid:t,onCancel:s,onSuccess:i,onError:u=()=>{},mode:n="create",item:p={}}){const{api:m}=N(),[o,d]=R.useState(!1),[r,l]=R.useState(""),{t:a}=F(),[c,h]=R.useState(p.title||""),[C,v]=R.useState(p.description||""),[x,T]=R.useState(p?.extra?.display||"builtin"),[I,P]=R.useState(p?.extra?.types?p.extra.types.join(","):""),A=async()=>{const O=c.trim();if(!O){l(a("team.passport.error.titleEmpty"));return}if(O.length>64){l(a("team.passport.error.titleTooLong",{length:64}));return}const G=C.replace(/\n/g," ");if(!G){l(a("team.passport.error.descriptionEmpty"));return}const je=n==="create"?zr(O):p.name;l(null),d(!0);try{if(n==="create"){const Y={teamDid:t,name:je,title:O,description:G};x==="custom"&&(Y.extra=JSON.stringify({display:"custom",types:I.split(",")})),await m.createRole({input:Y})}else{const Y={teamDid:t,role:{name:je,title:O,description:G}};await m.updateRole({input:Y})}i()}catch(Y){const Ce=Ve(Y);l(Ce),u(Y)}finally{d(!1)}},L=e.jsxs("div",{children:[n==="update"&&e.jsx(H,{component:"div",style:{paddingTop:16},children:e.jsx(te,{label:"ID",autoComplete:"off",variant:"outlined",name:"url","data-cy":"mutate-role-input-name",fullWidth:!0,autoFocus:!0,value:p.name,disabled:!0})}),e.jsx(H,{component:"div",style:{marginTop:16},children:e.jsx(te,{label:a("common.title"),autoComplete:"off",variant:"outlined",name:"title","data-cy":"mutate-role-input-title",fullWidth:!0,autoFocus:!0,value:c,onChange:O=>{l(null),h(O.target.value)},disabled:n==="update"||o,helperText:a("team.passport.create.titleTip")})}),e.jsx(H,{component:"div",style:{marginTop:16,marginBottom:16},children:e.jsx(te,{label:a("common.description"),autoComplete:"off",variant:"outlined",name:"description","data-cy":"mutate-role-input-description",fullWidth:!0,autoFocus:!0,value:C,onChange:O=>{l(null),v(O.target.value)},disabled:o,multiline:!0,rows:3})}),n==="create"&&e.jsxs("div",{style:{marginBottom:16},children:[e.jsx(Ds,{children:a("common.display")}),e.jsxs(Ms,{color:"primary",size:"small",value:x,exclusive:!0,style:{marginTop:16},disabled:o,onChange:(O,G)=>T(G),"data-cy":"input-role-display",children:[e.jsx(We,{value:"builtin","data-cy":"input-role-display-builtin",children:e.jsx(H,{children:a("team.passport.displayBuiltin")})}),e.jsx(We,{value:"custom","data-cy":"input-role-display-custom",children:e.jsx(H,{children:a("team.passport.displayCustom")})})]}),x==="custom"&&e.jsxs(e.Fragment,{children:[e.jsx(Ps,{fullWidth:!0,type:"text",style:{marginTop:16},"data-cy":"input-role-types",value:I,disabled:o,onChange:O=>{P(O.target.value)}}),e.jsx(Es,{children:a("team.passport.typesTip")})]})]})]});return e.jsxs(le,{title:n==="create"?a("team.passport.create.title"):"",fullWidth:!0,open:!0,onClose:s,showCloseButton:!1,actions:e.jsxs(e.Fragment,{children:[e.jsx(V,{onClick:s,color:"inherit",children:a("common.cancel")}),e.jsxs(V,{"data-cy":"mutate-role-confirm",onClick:A,color:"primary",disabled:o,variant:"contained",autoFocus:!0,children:[o&&e.jsx(J,{size:16}),a(n==="create"?"common.create":"common.update")]})]}),children:[e.jsx(Ii,{component:"div",children:L}),!!r&&e.jsx(ks,{severity:"error",style:{width:"100%",margin:0},children:r})]})}Gt.propTypes={teamDid:S.string.isRequired,onCancel:S.func.isRequired,onSuccess:S.func.isRequired,onError:S.func,mode:S.oneOf(["create","update"]),item:S.object};function Yt({onCancel:t,onSuccess:s,onDelete:i,roleName:u,hasPermission:n=!1}){const{api:p}=N(),{roles:m,permissions:o,teamDid:d,refresh:r,isNodeTeam:l}=X(),{t:a}=F(),[c,h]=R.useState([]),[C,v]=R.useState(!1),[x,T]=R.useState(null),[I,P]=R.useState(!1),A=Ae(m.find(B=>B.name===u)),L=Os(u),O=async B=>{if(!I)try{P(!0),await p.deleteRole({input:{teamDid:d,name:B}}),i()}catch(k){M.error(k.message)}finally{P(!1),T(null)}},G=async(B,k)=>{const U=(await p.getPermissionsByRole({input:{teamDid:B,role:{name:k}}})).permissions||[],se=o.map(Kt=>({...Kt,bind:U.some(ui=>ui.name===Kt.name)}));h(se)},je=async()=>{P(!0);const B=c.filter(k=>k.bind).map(k=>k.name);try{await p.updatePermissionsForRole({input:{teamDid:d,roleName:A.name,grantNames:B}}),M.success(a("common.saveSuccess")),s()}catch(k){M.error(Ve(k))}finally{P(!1)}};R.useEffect(()=>{d&&u&&G(d,u)},[d,u]);const Y=l||!n;let Ce=null;return l&&(Ce=e.jsxs("div",{className:"bind",children:[e.jsx("div",{className:"title",children:a("common.permission")}),e.jsx("div",{className:"list",children:c.filter(B=>Y?B.bind:!0).map(B=>e.jsx("div",{className:"item",children:e.jsx(Ai,{control:e.jsx(Di,{disabled:Y,checked:B.bind,onChange:()=>{h(k=>k.map(_=>(_.name===B.name&&(_.bind=!_.bind),_)))},name:B.name}),label:B.description})}))})]})),e.jsxs(le,{title:a("common.passport"),onClose:t,open:!0,fullWidth:!0,toolbar:n&&!L&&e.jsxs(e.Fragment,{children:[e.jsx(ae,{onClick:()=>v(A),"data-cy":`edit-passport-${A.name}`,size:"large",children:e.jsx(at,{fill:"#bfbfbf"})}),e.jsx(ae,{onClick:()=>T({title:a("team.passport.delete.title"),description:a("team.passport.delete.description",{name:A.title}),confirm:a("common.delConfirm"),cancel:a("common.cancel"),onConfirm:()=>{O(A.name)},onCancel:()=>{P(!1),T(null)}}),"data-cy":`delete-passport-${A.name}`,size:"large",children:e.jsx(nt,{"data-cy":"close-passport-dialog",fill:"#bfbfbf"})})]}),actions:l&&!Y&&e.jsxs(e.Fragment,{children:[e.jsx(V,{onClick:t,color:"inherit",children:a("common.cancel")}),e.jsxs(V,{onClick:je,color:"primary",disabled:I||!A,variant:"contained",autoFocus:!0,"data-cy":"bind-permission-btn-confirm",children:[I&&e.jsx(J,{size:16}),a("common.save")]})]}),children:[e.jsxs(Fr,{children:[!A&&e.jsx(Br,{children:e.jsx(J,{})}),A&&e.jsxs("div",{className:"dialog-content",children:[e.jsxs("div",{className:"header",children:[e.jsx("div",{className:"title",children:A.title}),e.jsx("div",{className:"description",style:{marginTop:l?16:48},children:A.description})]}),Ce]})]}),C&&e.jsx(Gt,{teamDid:d,onCancel:()=>v(null),onSuccess:()=>{v(null),r()},mode:"update",roleName:C.name,item:C}),x&&e.jsx(_t,{title:x.title,description:x.description,confirm:x.confirm,cancel:x.cancel,params:x.params,onConfirm:x.onConfirm,onCancel:x.onCancel})]})}const Lr=ge(Yt,"mutate_team"),Mr=ge(Yt,"",Oe);function Nr(t){const{inService:s}=N();return s?e.jsx(Mr,{...t}):e.jsx(Lr,{...t})}Yt.propTypes={roleName:S.string.isRequired,onCancel:S.func.isRequired,onSuccess:S.func.isRequired,onDelete:S.func.isRequired,hasPermission:S.bool};const Fr=ce.div`
|
|
136
136
|
.header {
|
|
137
137
|
.title {
|
|
138
138
|
font-weight: 400;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{aG as Ve,j as e,dq as vo,gr as Ro,ip as So,m as A,bn as H,N as b,az as xe,H as N,o as i,f as lt,r as d,g as Ce,bA as Me,b as K,J as L,X as Tt,bz as Ge,Y as ae,iq as ko,t as Z,s as B,a4 as J,aV as bn,T as te,$ as ct,dF as Xt,y as Ye,b8 as wo,bE as Eo,E as U,b1 as To,ge as Io,gf as Po,C as me,f3 as Uo,hf as _o,x as Do,ax as Jt,w as No,ir as Lo,is as Bo,v as pe,it as Oo,Z as Mo,a0 as Ao,iu as jn,bo as vn,U as Re,f9 as qo,f0 as Fo,aB as zo,aC as $o,bk as Go,aD as Wo,aE as X,aO as Vo,cN as Yo,F as Rn,bm as Ko,_ as Ho,O as ot,aZ as Nt,iv as Zo,a_ as ye,ho as Qo,aA as en,cL as Xo,ad as Ae,aM as Sn,bS as Lt,cw as Jo,L as dt,iw as es,b9 as ts,A as kn,aU as It,p as ns,aS as $e,P as vt,W as os,bB as wn,fK as ss,cr as is,aJ as rs,bt as as,aR as ls,dG as cs,ff as tn,ix as nn,gJ as on,V as sn,G as st,cK as ds,gH as us,bR as ps,iy as ms}from"./index-CjzEBnHB.js";import{y as fs}from"./index-dQzdi1Hq.js";import{a as hs,c as gs,d as xs,u as Bt,R as ys}from"./actions-BWsi7i72.js";import{S as Cs}from"./switch-control-BBKsCU2Y.js";import{u as fe}from"./blocklet-BWShyefZ.js";import{P as Pt,w as ut}from"./permission-DG9uH24n.js";import{E as En}from"./Edit-Brfok_V9.js";import{T as bs,M as js,t as vs}from"./table-icons-hZGjJ2eg.js";import{s as Rs,F as Ss,L as ks,S as ws,B as Es}from"./preference-DQfFXuWW.js";import{C as rn}from"./click-to-copy-BgnS-qFa.js";import{v as Rt}from"./index-BiSZbdUR.js";import{A as Ts}from"./Add-CMaOaJcy.js";import{A as Ot}from"./Link-DxZkbVyA.js";import{C as Is,c as Ps,b as Us,f as Tn,A as _s,_ as Ds,a as Ns,e as Ls,d as In,s as Bs,g as Os,S as Ms}from"./item-Ds6r8B85.js";import{T as As,L as qs,a as Pn,u as an,W as Fs,P as zs}from"./index-BwAWqOYq.js";import{e as Un}from"./engine-3IdUdjkH.js";import{u as $s,C as Gs,D as Ws,a as Vs,b as Ys}from"./connect-to-BJU3I-tO.js";import{C as Ks,u as Hs,A as Zs}from"./agreement-DQuDFy25.js";import{A as Qs,a as Xs,b as Js,c as ei,R as rt}from"./collapse-DhWx6Fiz.js";import{D as ti}from"./Done-1e3LsE76.js";import{C as ni,a as oi}from"./Google-MHF3yZux.js";import{I as _n,f as si,a as ii,B as ri}from"./install-from-url-Bpa-muAm.js";import{a as ln}from"./api-BJGpnzKK.js";import{v as Dn,e as ai,a as at}from"./util-BErsOHdh.js";import{u as Nn}from"./use-mobile-BHeriyen.js";import{A as li}from"./ArrowDropDown-BidZ6YZa.js";import{u as ci}from"./useLocalStorage-BHL7RS8q.js";import{D as pt,W as We,R as di,a as cn}from"./url-evaluation-BMLhywvu.js";import{L as Ln}from"./Launch-BSO75Y-o.js";import{D as ui}from"./delete-confirm-DRlMHX1Z.js";import{B as Bn}from"./status-mS0PFNHr.js";import{A as On}from"./actions-G3fsUkti.js";import{v as St}from"./index-B-8U8lYj.js";import{t as pi}from"./toUpper-g96Av6xB.js";import{S as mi}from"./Switch-C1fxxz5n.js";import{a as fi}from"./team-1bg7ZL8j.js";import"./MoreVert-B3-V93zF.js";import"./get-safe-url-Dqogbkdq.js";import"./ButtonGroup-BHDJ_xHw.js";import"./getValidReactChildren-SkwQHrW1.js";import"./FilterList-DdUKcAm_.js";import"./CSSTransition-BKoPfTin.js";import"./emotion-cache.browser.esm-BDnrC0c-.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./raf-schd.esm-BfNfEe8D.js";import"./redux-DfszZyTl.js";import"./useThemeProps-DooTQWd6.js";import"./html-title-CacFoTyg.js";import"./Clear-DUjqNsqY.js";import"./ChevronRight-D5Dv2KwC.js";import"./ChevronLeft-C_5SFpZ3.js";import"./Search-CVsnDnpP.js";import"./omit-CMtjAJiD.js";import"./index-B9eEN6Ex.js";import"./index-Cz0waa_4.js";import"./iframe-Czk-UT3-.js";import"./Autocomplete-Jvr3OBqO.js";import"./ListSubheader-B5z3JXVs.js";import"./Verified-DYk2lw3M.js";import"./VerifiedUser-NPP4tmwS.js";import"./DeleteOutline-BJkxA9W_.js";import"./url-join-CBh7FZtG.js";import"./index-BojVbZw0.js";import"./spaces-CUI-UEB-.js";import"./OpenInNew-2p7Osi_B.js";import"./index-DRYJ0xIl.js";import"./HelpOutline-r64pe9r_.js";import"./index-CGfr_Xf0.js";import"./decode-DPztD6kB.js";import"./cloneDeep-DUxbCdHx.js";import"./without-wallet-BwvrV6Xc.js";import"./ListItemButton-CWYI6B1i.js";import"./Stepper-Yd1ce1vv.js";import"./is-path-prefix-equal-CpCr5Pp2.js";const hi=Ve(e.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"})),gi=Ve(e.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"})),Mn=Ve(e.jsx("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"})),xi=Ve(e.jsx("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"})),yi=Ve(e.jsx("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}));function dn(t,o){var n={};return o=vo(o),Ro(t,function(a,s,r){So(n,s,o(a,s,r))}),n}function An({children:t=null,...o}){const{t:n}=A(),{api:a}=H(),{blocklet:s}=fe(),r=s?.settings?.autoCheckUpdate,f=async h=>{await a.updateAutoCheckUpdate({input:{did:s.meta.did,autoCheckUpdate:h}})},c=async()=>{try{const h=!r?.enabled;await f({enabled:h}),N.success(n(h?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(h){N.error(h.message)}},u=!!r?.enabled;return e.jsxs(b,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[t,e.jsx(xe,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(Cs,{checked:u,onChange:c,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}An.propTypes={children:i.any};function un(t){function o({sx:n,...a}){return e.jsx(t,{...a,sx:{color:"text.primary",...n}})}return o}const Ci={...dn(vs,un),...dn(hs,un)},bi=(t,o)=>{let{description:n}=t;return(Object.values(K.CHAIN_PROP_MAP).includes(t.key)||L.isEnvShareable(t))&&(n?n=`${n} (${o("blocklet.config.sharedToAllComponents")})`:n=o("blocklet.config.sharedToAllComponents")),n&&e.jsx("div",{style:{marginLeft:12},children:n})},kt=(t,o,n=[])=>!n?.length&&!t.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(t.key)&&!o.meta.environments.find(a=>a.name===t.key)&&o.children.every(a=>!a.meta.environments.find(s=>s.name===t.key))?!0:t.custom,pn=t=>[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)?!0:!(t.startsWith("BLOCKLET_")||t.startsWith("COMPONENT_")),wt=t=>[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)===!1;function qn({blocklet:t,ancestors:o=[]}){const n=H(),{palette:a}=lt(),{inService:s}=n,{t:r}=d.useContext(Ce),f=[...o.map(m=>m.meta.did),t.meta.did],c=()=>N.success(r("blocklet.config.changedTip")),u=m=>kt(m,t,o);if(Me(t.status)||t.status==="unknown"&&Me(t.status))return null;const h=m=>new Promise(async(g,v)=>{if(!m.key.trim()||!m.value.trim()){N.error(r("blocklet.config.environment.keyValueRequired")),v();return}if(pn(m.key)===!1){N.error(r("blocklet.config.environment.invalidKey")),v();return}m.custom=wt(m.key);try{const k=await n.api.configBlocklet({input:{did:f,configs:[m]}});c(k.blocklet),g()}catch(k){N.error(ae(k)),v()}}),y=(m,g)=>new Promise(async(v,k)=>{if(m.required&&(!m.key.trim()||!m.value.trim())){N.error(r("blocklet.config.environment.keyValueRequired")),k();return}if(pn(m.key)===!1){N.error(r("blocklet.config.environment.invalidKey")),k();return}if(m.key===K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const O=ko(m);if(O){N.error(O),k();return}}const j=[{...m,value:m.secure&&m.value==="__encrypted__"?"":m.value}];if(m.key!==g.key){if(!kt(m,t,o)){N.error("Only key of custom env can be changed"),k();return}j.push({key:g.key,custom:wt(m.key)})}try{const O=await n.api.configBlocklet({input:{did:f,configs:j}});c(O.blocklet),v()}catch(O){N.error(ae(O)),k()}}),l=m=>new Promise(async(g,v)=>{if(m.required){N.error(r("blocklet.config.environment.deleteForbidden")),v();return}if(!kt(m,t,o)){N.error("Only key of custom env can be changed"),v();return}try{const k=await n.api.configBlocklet({input:{did:f,configs:[{key:m.key,custom:wt(m.key)}]}});c(k.blocklet),g()}catch(k){N.error(ae(k)),v()}}),R=(t.configs||[]).filter(m=>!K.BLOCKLET_CONFIGURABLE_KEY[m.key]||[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(m.key)),C=L.getSharedConfigObj(o[0],t),p=L.getComponentMissingConfigs(t,o[0]),E=R.map(m=>({...m,value:Object.values(K.CHAIN_PROP_MAP).includes(m.key)&&Object.keys(C).includes(m.key)?C[m.key]:C[m.key]||m.value})),S=E.some(m=>m.key&&m.key.startsWith("BWA_")),w={onRowAdd:h,onRowUpdate:y,onRowDelete:l,isDeletable:u},x=()=>[{title:r("common.key"),field:"key",initialEditValue:"",width:"30%",render:m=>e.jsx(rn,{value:m.value,style:{color:m.required&&!m.value?a.error.main:a.text.primary,fontWeight:m.required?"bold":"normal"},children:m.key}),editComponent:m=>{const{value:g,rowData:v,onChange:k}=m;return e.jsx(mn,{children:e.jsx(Z,{fullWidth:!0,size:"small",value:Rs.escapeTag(g),onChange:j=>k(j.target.value),variant:"outlined",label:"Key",placeholder:r("blocklet.config.environment.key"),margin:"dense",autoFocus:!0,slotProps:{input:{readOnly:u(v)===!1}}})})}},{title:r("common.value"),field:"value",initialEditValue:"",width:"calc((100% - (96px + 30%)) / 1)",render:m=>m.value?m.secure?"******":e.jsx(rn,{unstyled:!0,value:m.value,style:{wordBreak:"break-all"},children:m.value}):null,editComponent:m=>{const{value:g,rowData:v,onChange:k}=m;return e.jsxs(mn,{children:[e.jsx(Z,{fullWidth:!0,size:"small",value:g==="__encrypted__"?"":g,onChange:j=>k(j.target.value),variant:"outlined",label:r("common.value"),placeholder:r("blocklet.config.environment.value"),margin:"dense"}),bi(v,r)]})}}];return e.jsxs(ji,{children:[!!p.length&&e.jsx(Tt,{severity:"error",style:{marginTop:24},children:r("blocklet.config.missingRequired")}),S&&e.jsx(Tt,{severity:"info",children:r("blocklet.config.environment.tip")}),e.jsx(Pt,{permission:s?"":"mutate_blocklets",role:s?Ge:[],children:m=>e.jsx(bs,{className:"config-table",children:e.jsx(js,{title:e.jsx(b,{sx:{fontWeight:"bold"},children:r("common.environments")}),columns:x(),icons:Ci,options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1,actionsCellStyle:{padding:"0",textAlign:"right",width:"80px"}},localization:{header:{actions:r("common.actions")},body:{emptyDataSourceMessage:r("common.noData")}},data:E,editable:m?w:{}})})})]})}qn.propTypes={blocklet:i.object.isRequired,ancestors:i.array};const ji=B.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B1jSn7Zu.js","./index-CjiX3zf7.js","./index-DGkT7afN.css","./url-join-CB5VZRlf.js","./index-B9cjZqr-.js","./_createAggregator-Bl3Xjuwm.js","./depsEqual-D3Ncz4Yx.js","./index-DjR1zbg3.js","./index-DRYJ0xIl.js","./toUpper-Coiq1GUC.js","./index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{aG as Ve,j as e,dq as vo,gr as Ro,ip as So,m as A,bn as H,N as b,az as xe,H as N,o as i,f as lt,r as d,g as Ce,bA as Me,b as K,J as L,X as Tt,bz as Ge,Y as ae,iq as ko,t as Z,s as B,a4 as J,aV as bn,T as te,$ as ct,dF as Xt,y as Ye,b8 as wo,bE as Eo,E as U,b1 as To,ge as Io,gf as Po,C as me,f3 as Uo,hf as _o,x as Do,ax as Jt,w as No,ir as Lo,is as Bo,v as pe,it as Oo,Z as Mo,a0 as Ao,iu as jn,bo as vn,U as Re,f9 as qo,f0 as Fo,aB as zo,aC as $o,bk as Go,aD as Wo,aE as X,aO as Vo,cN as Yo,F as Rn,bm as Ko,_ as Ho,O as ot,aZ as Nt,iv as Zo,a_ as ye,ho as Qo,aA as en,cL as Xo,ad as Ae,aM as Sn,bS as Lt,cw as Jo,L as dt,iw as es,b9 as ts,A as kn,aU as It,p as ns,aS as $e,P as vt,W as os,bB as wn,fK as ss,cr as is,aJ as rs,bt as as,aR as ls,dG as cs,ff as tn,ix as nn,gJ as on,V as sn,G as st,cK as ds,gH as us,bR as ps,iy as ms}from"./index-CjiX3zf7.js";import{y as fs}from"./index-vlWnPMrO.js";import{a as hs,c as gs,d as xs,u as Bt,R as ys}from"./actions-DgP23YrP.js";import{S as Cs}from"./switch-control-BS39XMMs.js";import{u as fe}from"./blocklet-z9OAo2CJ.js";import{P as Pt,w as ut}from"./permission-CnIxTKRh.js";import{E as En}from"./Edit-j7VDFfpA.js";import{T as bs,M as js,t as vs}from"./table-icons-Chd4Cuaw.js";import{s as Rs,F as Ss,L as ks,S as ws,B as Es}from"./preference-DcZfJHnf.js";import{C as rn}from"./click-to-copy-4j6qdr_t.js";import{v as Rt}from"./index-BU5TxHl6.js";import{A as Ts}from"./Add-Dz07LTiF.js";import{A as Ot}from"./Link-COWFXcCt.js";import{C as Is,c as Ps,b as Us,f as Tn,A as _s,_ as Ds,a as Ns,e as Ls,d as In,s as Bs,g as Os,S as Ms}from"./item-DOeBStbn.js";import{T as As,L as qs,a as Pn,u as an,W as Fs,P as zs}from"./index-B03ectPB.js";import{e as Un}from"./engine-Ct4ncwVx.js";import{u as $s,C as Gs,D as Ws,a as Vs,b as Ys}from"./connect-to-DkDYpPl7.js";import{C as Ks,u as Hs,A as Zs}from"./agreement-DCYaG4s5.js";import{A as Qs,a as Xs,b as Js,c as ei,R as rt}from"./collapse-Ca-budpd.js";import{D as ti}from"./Done-ER9JHu1b.js";import{C as ni,a as oi}from"./Google-BbJKv6O-.js";import{I as _n,f as si,a as ii,B as ri}from"./install-from-url-DHXHVZNV.js";import{a as ln}from"./api-COXhSEV8.js";import{v as Dn,e as ai,a as at}from"./util-DJbBaKoW.js";import{u as Nn}from"./use-mobile-BPNr-WoZ.js";import{A as li}from"./ArrowDropDown-aOYNuiBx.js";import{u as ci}from"./useLocalStorage-8wesT5Qc.js";import{D as pt,W as We,R as di,a as cn}from"./url-evaluation-BvP4dPCg.js";import{L as Ln}from"./Launch-YZATuLri.js";import{D as ui}from"./delete-confirm-D1CqCnLh.js";import{B as Bn}from"./status-CIqN1RmX.js";import{A as On}from"./actions-LKjymUyt.js";import{v as St}from"./index-B_7Dkk-C.js";import{t as pi}from"./toUpper-Coiq1GUC.js";import{S as mi}from"./Switch-DDtRD7Ag.js";import{a as fi}from"./team-CPlGWHuv.js";import"./MoreVert-DlCir_2U.js";import"./get-safe-url-C7HfAhAi.js";import"./ButtonGroup-uxUU66vm.js";import"./getValidReactChildren-kX991muZ.js";import"./FilterList-DZx93Kc7.js";import"./CSSTransition-mHEnDsZF.js";import"./emotion-cache.browser.esm-bc8DqDkz.js";import"./index-DBii9-f-.js";import"./typeof-QjJsDpFa.js";import"./raf-schd.esm-Do0aHYtf.js";import"./redux-DfszZyTl.js";import"./useThemeProps-CKs40G8i.js";import"./html-title-B7JhB9o9.js";import"./Clear-DZY_aw6a.js";import"./ChevronRight-DhuR3yky.js";import"./ChevronLeft-R8Ol9Jib.js";import"./Search-g9dL6AXZ.js";import"./omit-D1IP94c4.js";import"./index-B9cjZqr-.js";import"./index-DjR1zbg3.js";import"./iframe-CNy-ihld.js";import"./Autocomplete-CdF3wUNl.js";import"./ListSubheader-C9PLdgB7.js";import"./Verified-BEx-BQ_w.js";import"./VerifiedUser-B_EunK8E.js";import"./DeleteOutline-BtMPtKeR.js";import"./url-join-CB5VZRlf.js";import"./index-BojVbZw0.js";import"./spaces-Cvskr3ib.js";import"./OpenInNew-CTp6YVKn.js";import"./index-DRYJ0xIl.js";import"./HelpOutline-BgVjrAGA.js";import"./index-B6sGfCw6.js";import"./decode-DPztD6kB.js";import"./cloneDeep-DX20zoeh.js";import"./without-wallet-C5aGlhvw.js";import"./ListItemButton-f3yxZH17.js";import"./Stepper-ClmwtFAh.js";import"./is-path-prefix-equal-DlMcxVqF.js";const hi=Ve(e.jsx("path",{d:"m4 12 1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8z"})),gi=Ve(e.jsx("path",{d:"M14.17 5 19 9.83V19H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9.83c0-.53-.21-1.04-.59-1.41l-4.83-4.83c-.37-.38-.88-.59-1.41-.59M7 15h10v2H7zm0-4h10v2H7zm0-4h7v2H7z"})),Mn=Ve(e.jsx("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"})),xi=Ve(e.jsx("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"})),yi=Ve(e.jsx("path",{d:"M5 20h14v-2H5zm0-10h4v6h6v-6h4l-7-7z"}));function dn(t,o){var n={};return o=vo(o),Ro(t,function(a,s,r){So(n,s,o(a,s,r))}),n}function An({children:t=null,...o}){const{t:n}=A(),{api:a}=H(),{blocklet:s}=fe(),r=s?.settings?.autoCheckUpdate,f=async h=>{await a.updateAutoCheckUpdate({input:{did:s.meta.did,autoCheckUpdate:h}})},c=async()=>{try{const h=!r?.enabled;await f({enabled:h}),N.success(n(h?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(h){N.error(h.message)}},u=!!r?.enabled;return e.jsxs(b,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[t,e.jsx(xe,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:e.jsx("div",{children:e.jsx(Cs,{checked:u,onChange:c,name:"enableWelcomePage",style:{...o.style,zoom:.8}})})})]})}An.propTypes={children:i.any};function un(t){function o({sx:n,...a}){return e.jsx(t,{...a,sx:{color:"text.primary",...n}})}return o}const Ci={...dn(vs,un),...dn(hs,un)},bi=(t,o)=>{let{description:n}=t;return(Object.values(K.CHAIN_PROP_MAP).includes(t.key)||L.isEnvShareable(t))&&(n?n=`${n} (${o("blocklet.config.sharedToAllComponents")})`:n=o("blocklet.config.sharedToAllComponents")),n&&e.jsx("div",{style:{marginLeft:12},children:n})},kt=(t,o,n=[])=>!n?.length&&!t.custom&&!["CHAIN_ID","CHAIN_HOST"].includes(t.key)&&!o.meta.environments.find(a=>a.name===t.key)&&o.children.every(a=>!a.meta.environments.find(s=>s.name===t.key))?!0:t.custom,pn=t=>[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)?!0:!(t.startsWith("BLOCKLET_")||t.startsWith("COMPONENT_")),wt=t=>[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(t)===!1;function qn({blocklet:t,ancestors:o=[]}){const n=H(),{palette:a}=lt(),{inService:s}=n,{t:r}=d.useContext(Ce),f=[...o.map(m=>m.meta.did),t.meta.did],c=()=>N.success(r("blocklet.config.changedTip")),u=m=>kt(m,t,o);if(Me(t.status)||t.status==="unknown"&&Me(t.status))return null;const h=m=>new Promise(async(g,v)=>{if(!m.key.trim()||!m.value.trim()){N.error(r("blocklet.config.environment.keyValueRequired")),v();return}if(pn(m.key)===!1){N.error(r("blocklet.config.environment.invalidKey")),v();return}m.custom=wt(m.key);try{const k=await n.api.configBlocklet({input:{did:f,configs:[m]}});c(k.blocklet),g()}catch(k){N.error(ae(k)),v()}}),y=(m,g)=>new Promise(async(v,k)=>{if(m.required&&(!m.key.trim()||!m.value.trim())){N.error(r("blocklet.config.environment.keyValueRequired")),k();return}if(pn(m.key)===!1){N.error(r("blocklet.config.environment.invalidKey")),k();return}if(m.key===K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE){const O=ko(m);if(O){N.error(O),k();return}}const j=[{...m,value:m.secure&&m.value==="__encrypted__"?"":m.value}];if(m.key!==g.key){if(!kt(m,t,o)){N.error("Only key of custom env can be changed"),k();return}j.push({key:g.key,custom:wt(m.key)})}try{const O=await n.api.configBlocklet({input:{did:f,configs:j}});c(O.blocklet),v()}catch(O){N.error(ae(O)),k()}}),l=m=>new Promise(async(g,v)=>{if(m.required){N.error(r("blocklet.config.environment.deleteForbidden")),v();return}if(!kt(m,t,o)){N.error("Only key of custom env can be changed"),v();return}try{const k=await n.api.configBlocklet({input:{did:f,configs:[{key:m.key,custom:wt(m.key)}]}});c(k.blocklet),g()}catch(k){N.error(ae(k)),v()}}),R=(t.configs||[]).filter(m=>!K.BLOCKLET_CONFIGURABLE_KEY[m.key]||[K.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_CLUSTER_SIZE].includes(m.key)),C=L.getSharedConfigObj(o[0],t),p=L.getComponentMissingConfigs(t,o[0]),E=R.map(m=>({...m,value:Object.values(K.CHAIN_PROP_MAP).includes(m.key)&&Object.keys(C).includes(m.key)?C[m.key]:C[m.key]||m.value})),S=E.some(m=>m.key&&m.key.startsWith("BWA_")),w={onRowAdd:h,onRowUpdate:y,onRowDelete:l,isDeletable:u},x=()=>[{title:r("common.key"),field:"key",initialEditValue:"",width:"30%",render:m=>e.jsx(rn,{value:m.value,style:{color:m.required&&!m.value?a.error.main:a.text.primary,fontWeight:m.required?"bold":"normal"},children:m.key}),editComponent:m=>{const{value:g,rowData:v,onChange:k}=m;return e.jsx(mn,{children:e.jsx(Z,{fullWidth:!0,size:"small",value:Rs.escapeTag(g),onChange:j=>k(j.target.value),variant:"outlined",label:"Key",placeholder:r("blocklet.config.environment.key"),margin:"dense",autoFocus:!0,slotProps:{input:{readOnly:u(v)===!1}}})})}},{title:r("common.value"),field:"value",initialEditValue:"",width:"calc((100% - (96px + 30%)) / 1)",render:m=>m.value?m.secure?"******":e.jsx(rn,{unstyled:!0,value:m.value,style:{wordBreak:"break-all"},children:m.value}):null,editComponent:m=>{const{value:g,rowData:v,onChange:k}=m;return e.jsxs(mn,{children:[e.jsx(Z,{fullWidth:!0,size:"small",value:g==="__encrypted__"?"":g,onChange:j=>k(j.target.value),variant:"outlined",label:r("common.value"),placeholder:r("blocklet.config.environment.value"),margin:"dense"}),bi(v,r)]})}}];return e.jsxs(ji,{children:[!!p.length&&e.jsx(Tt,{severity:"error",style:{marginTop:24},children:r("blocklet.config.missingRequired")}),S&&e.jsx(Tt,{severity:"info",children:r("blocklet.config.environment.tip")}),e.jsx(Pt,{permission:s?"":"mutate_blocklets",role:s?Ge:[],children:m=>e.jsx(bs,{className:"config-table",children:e.jsx(js,{title:e.jsx(b,{sx:{fontWeight:"bold"},children:r("common.environments")}),columns:x(),icons:Ci,options:{emptyRowsWhenPaging:!1,actionsColumnIndex:-1,tableLayout:"auto",maxBodyHeight:"100%",paging:!1,search:!1,actionsCellStyle:{padding:"0",textAlign:"right",width:"80px"}},localization:{header:{actions:r("common.actions")},body:{emptyDataSourceMessage:r("common.noData")}},data:E,editable:m?w:{}})})})]})}qn.propTypes={blocklet:i.object.isRequired,ancestors:i.array};const ji=B.div`
|
|
3
3
|
.config-table {
|
|
4
4
|
margin-bottom: 24px;
|
|
5
5
|
position: relative;
|
|
@@ -66,7 +66,7 @@ import{aG as Ve,j as e,dq as vo,gr as Ro,ip as So,m as A,bn as H,N as b,az as xe
|
|
|
66
66
|
.ux-dialog_closeButton {
|
|
67
67
|
margin: 0;
|
|
68
68
|
}
|
|
69
|
-
`,Ri=d.lazy(()=>Eo(()=>import("./index-
|
|
69
|
+
`,Ri=d.lazy(()=>Eo(()=>import("./index-B1jSn7Zu.js").then(t=>t.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url).then(t=>({default:t.Uploader}))),Si="/blocklet/component/upload",fn=[".html",".htm",".tgz",".zip"],ki=Number(window.env?.MAX_UPLOAD_FILE_SIZE)||U.MAX_UPLOAD_FILE_SIZE,wi=ki*1024*1024;function Fn({did:t,prefix:o,headers:n=()=>({}),onUploaded:a=Xt,open:s=!1,onClose:r=Xt}){const{t:f,locale:c}=A(),u=d.useRef(null),h=d.useCallback(y=>{const{status:l,data:R}=y;if(l===200){a(R);return}N.error(f("blocklet.component.addComponentTip.uploadFailed"))},[a,f]);return d.useEffect(()=>{s?u.current?.open():u.current?.close()},[s]),e.jsx(Ei,{id:`component-uploader-${t}`,children:e.jsx(Ri,{ref:u,locale:c,popup:!0,onUploadFinish:h,plugins:[],onClose:r,installerProps:{disabled:!0},apiPathProps:{uploader:Ye(o,Si,t),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:fn,maxFileSize:wi,maxNumberOfFiles:1}},tusProps:{headers:n},dashboardProps:{note:f("blocklet.component.addComponentTip.allowedFileTypes",{types:fn.map(y=>y.replace(".","")).join(", ")})}})},`component-uploader-${t}`)}Fn.propTypes={did:i.string.isRequired,prefix:i.string.isRequired,open:i.bool,headers:i.func,onUploaded:i.func,onClose:i.func};const Ei=wo(b)`
|
|
70
70
|
.uploader-wrapper {
|
|
71
71
|
display: inline-flex;
|
|
72
72
|
position: relative;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c0 as c,r as _,cr as f,gZ as S,cR as r}from"./index-CjiX3zf7.js";var m=function(n){var a=c(_.useState(n),2),u=a[0],o=a[1],i=f(function(t){o(function(e){var s=S(t)?t(e):t;return s?r(r({},e),s):e})});return[u,i]};export{m as u};
|