@abtnode/blocklet-services 1.16.22 → 1.16.23-beta-f3f10110
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/dist/assets/{Add-fjbSIcnc.js → Add-XAKcv5z7.js} +1 -1
- package/dist/assets/{Alert-nav821gk.js → Alert-MGbJy_rM.js} +1 -1
- package/dist/assets/{ArrowDropDown-HzxvBXz1.js → ArrowDropDown-804PlPsf.js} +1 -1
- package/dist/assets/{Autocomplete-FZ1Hog9u.js → Autocomplete-CxijjH09.js} +1 -1
- package/dist/assets/{Avatar-4W2iSGC-.js → Avatar-82N_IzTT.js} +1 -1
- package/dist/assets/{ButtonGroup-qjjm6C6u.js → ButtonGroup-AG1tRxzS.js} +1 -1
- package/dist/assets/{CardContent-hsa9cKyn.js → CardContent-ODF0v07z.js} +1 -1
- package/dist/assets/{CheckCircle-htlybHjr.js → CheckCircle-oS3DYWU-.js} +1 -1
- package/dist/assets/{Checkbox-iS0aPWS5.js → Checkbox-kTbf3Sl5.js} +1 -1
- package/dist/assets/{ChevronRight-7cKIhy5z.js → ChevronRight-k1zfc6_o.js} +1 -1
- package/dist/assets/{DeleteOutline-QxqDOFWu.js → DeleteOutline-Zql2OMmM.js} +1 -1
- package/dist/assets/{Done-ApQZxhfW.js → Done-ONuIAohJ.js} +1 -1
- package/dist/assets/{Download-eudDXSjG.js → Download-zV8eU_QJ.js} +1 -1
- package/dist/assets/{Edit-4h5n3zVg.js → Edit-DMG6qJA6.js} +1 -1
- package/dist/assets/{EditIcon-CEHYlrp-.js → EditIcon-hq3fk2GY.js} +1 -1
- package/dist/assets/{ExpandMore-JmnmUnd8.js → ExpandMore-D_RSmPkU.js} +1 -1
- package/dist/assets/{FilterList-rU96K2al.js → FilterList-7YPj6NEn.js} +1 -1
- package/dist/assets/{FormControl-U_6qW76h.js → FormControl-TQWGu6Eu.js} +1 -1
- package/dist/assets/{FormControlLabel-Yzi0VkLB.js → FormControlLabel-QjR5dMPU.js} +1 -1
- package/dist/assets/{FormGroup-6byJTUh5.js → FormGroup-ibKyzFt2.js} +1 -1
- package/dist/assets/{Google-0MAQRWrd.js → Google-oBEljGdm.js} +1 -1
- package/dist/assets/{Grid-G2b-U3nu.js → Grid-DNB3G9QF.js} +1 -1
- package/dist/assets/{Hidden-SKwxA9k1.js → Hidden-QJb-QlKr.js} +1 -1
- package/dist/assets/{Icon-9CFlKIHS.js → Icon-OY9kYgAv.js} +1 -1
- package/dist/assets/{InfoOutlined-0GqWWO-f.js → InfoOutlined-dKwuUI73.js} +1 -1
- package/dist/assets/{InputAdornment-iwL7P_Vm.js → InputAdornment-p6ZjH2CD.js} +1 -1
- package/dist/assets/{InputLabel-qtx_TKpe.js → InputLabel-IgDOTTEJ.js} +1 -1
- package/dist/assets/{LastPage-pHa4HGK_.js → LastPage-ZVfgNDRp.js} +1 -1
- package/dist/assets/{Launch-gJCQmpyL.js → Launch-ZmcLqzI1.js} +1 -1
- package/dist/assets/{LaunchOutlined-WAN0Led7.js → LaunchOutlined-3m-tMbii.js} +1 -1
- package/dist/assets/{ListItem-kYIyq9wN.js → ListItem-A9CD_j9i.js} +1 -1
- package/dist/assets/{LockIcon-e6UtCqfh.js → LockIcon-QX8joR1A.js} +1 -1
- package/dist/assets/{Loop-PXldOGkJ.js → Loop-NlcIC1Bk.js} +1 -1
- package/dist/assets/{MoreHoriz-1QS3N81v.js → MoreHoriz-H3078beE.js} +1 -1
- package/dist/assets/{MoreVert-b_wUncc4.js → MoreVert-luFLeyGM.js} +1 -1
- package/dist/assets/{OpenInNew-cyQNIeON.js → OpenInNew-eE03_3xI.js} +1 -1
- package/dist/assets/{Pagination-yeBOKJgc.js → Pagination-WqQKGPtj.js} +1 -1
- package/dist/assets/{PlayArrow-DsCR1WAD.js → PlayArrow-SAhKPV20.js} +1 -1
- package/dist/assets/{RadioGroup-MeoNWf5B.js → RadioGroup-RRlhJzK5.js} +1 -1
- package/dist/assets/{Search-pq50dDMP.js → Search-s0KIULwj.js} +1 -1
- package/dist/assets/{Select-1vnu6Wod.js → Select-_dtLnCt2.js} +1 -1
- package/dist/assets/{ServerLogo-RRmp6mc-.js → ServerLogo--Jbj3NzS.js} +1 -1
- package/dist/assets/{Skeleton-bmmJmS0u.js → Skeleton-oFPymdho.js} +1 -1
- package/dist/assets/{Slider-24UR9uuQ.js → Slider-obKDc4jn.js} +1 -1
- package/dist/assets/{Stepper-V9gE9w3-.js → Stepper-76LnpTmh.js} +1 -1
- package/dist/assets/{TableRow-7b-DLFKT.js → TableRow-7Dj41T_N.js} +1 -1
- package/dist/assets/{TextField-HfFRez76.js → TextField-aAyoTTob.js} +1 -1
- package/dist/assets/{Toolbar-z-FYIGbv.js → Toolbar-9-_-wvc9.js} +1 -1
- package/dist/assets/{access-control-140xtlbD.js → access-control-J1f9c4-q.js} +1 -1
- package/dist/assets/{actions-c_BF9d9e.js → actions-hMW-2OSO.js} +1 -1
- package/dist/assets/{add-component-core-cwUA8ONY.js → add-component-core-NCffMRn5.js} +4 -4
- package/dist/assets/add-resource-JA9UuktS.js +1 -0
- package/dist/assets/{addon-7yjXaIX_.js → addon-pqYQR9wk.js} +1 -1
- package/dist/assets/{analytics-b1UCJ6Cn.js → analytics-rBkS4rV3.js} +3 -3
- package/dist/assets/api-oZzGUegl.js +1 -0
- package/dist/assets/{audit-logs-poKE0OY8.js → audit-logs-LDtXSDnj.js} +3 -3
- package/dist/assets/{button-lOeSUgmq.js → button-QAPI6GyZ.js} +1 -1
- package/dist/assets/{click-to-copy-H2O9ZAs8.js → click-to-copy-qlrGoKsR.js} +1 -1
- package/dist/assets/{complete--aJHmuMX.js → complete-Mf2aUXVo.js} +1 -1
- package/dist/assets/{component-O_4jZEKT.js → component-StvuploP.js} +15 -15
- package/dist/assets/{config-Fxb0qTJ0.js → config-5harF_Po.js} +1 -1
- package/dist/assets/{config-navigation-YoH5FRo8.js → config-navigation-BPztyrDp.js} +2 -2
- package/dist/assets/{config-_s2-tqfS.js → config-vEUl7MhG.js} +1 -1
- package/dist/assets/{confirm-yusCbmM9.js → confirm-6Sabiio9.js} +1 -1
- package/dist/assets/confirm-IQ3toSkI.js +7 -0
- package/dist/assets/{connect-91kkXTrG.js → connect-G5MAB4xK.js} +1 -1
- package/dist/assets/{connect-tamQdAs3.js → connect-e_MU10YS.js} +1 -1
- package/dist/assets/{content-layout-P9P08qyU.js → content-layout-ZlpVS5iy.js} +1 -1
- package/dist/assets/{dashboard-wLNTNF45.js → dashboard-h7LrZcKz.js} +3 -3
- package/dist/assets/{did-address-fR8IBME6.js → did-address-v6szRxvt.js} +1 -1
- package/dist/assets/{did-utils-LIvwQDYN.js → did-utils-zpQb2LAL.js} +1 -1
- package/dist/assets/domain-Q8R4wub6.js +9 -0
- package/dist/assets/{domain-list-lVne43El.js → domain-list-ogWM8WG8.js} +1 -1
- package/dist/assets/{exchange-passport-T-h-OnRN.js → exchange-passport-0uB7qV8U.js} +1 -1
- package/dist/assets/{fallback-wCdaTD2t.js → fallback-JYdZZFFV.js} +1 -1
- package/dist/assets/{format-error-iCYgDtF5.js → format-error-kIg-iPFu.js} +1 -1
- package/dist/assets/{fuel-KNzdaW-g.js → fuel-VLVwod9B.js} +1 -1
- package/dist/assets/{fullpage-JCH-m3GS.js → fullpage-yIGvxmQC.js} +1 -1
- package/dist/assets/{home-Po2ga9wZ.js → home-RIdMOAZx.js} +1 -1
- package/dist/assets/{iframe-5bCtjLAp.js → iframe-3lZlzsQv.js} +1 -1
- package/dist/assets/{index-auhYXn_h.js → index-0JUMKCzJ.js} +3 -3
- package/dist/assets/{index-GsSFMKbP.js → index-1lPVnBZC.js} +1 -1
- package/dist/assets/{index-3S1MajfA.js → index-2jtcPzBH.js} +3 -3
- package/dist/assets/{index-GG6_BZrf.js → index-3uSjd9F4.js} +1 -1
- package/dist/assets/{index-4MBFFo4b.js → index-8qpfxht0.js} +1 -1
- package/dist/assets/{index-NURviigq.js → index-A57M68MW.js} +1 -1
- package/dist/assets/{index-7N0uMPlx.js → index-B_Bi4uHj.js} +1 -1
- package/dist/assets/{index-R3dXtQXo.js → index-FcshmQCl.js} +1 -1
- package/dist/assets/{index-nNJj_XhL.js → index-HNWvkPIJ.js} +1 -1
- package/dist/assets/{index-ax5KBcO9.js → index-ND-9TJ1L.js} +3 -3
- package/dist/assets/index-QahpWU7h.js +37 -0
- package/dist/assets/{index-KswRO1Cx.js → index-Rx1zNX-F.js} +1 -1
- package/dist/assets/{index-dQP0j7rR.js → index-TNGJlDOr.js} +1 -1
- package/dist/assets/{index-2HiYYWCO.js → index-UuFZJW6L.js} +1 -1
- package/dist/assets/{index-C7hr4YV8.js → index-UvxrnI0h.js} +1 -1
- package/dist/assets/{index-FT9kP6qN.js → index-VXs8EUQf.js} +1 -1
- package/dist/assets/{index-nXJuMgJq.js → index-WqnGi5T9.js} +1 -1
- package/dist/assets/{index-nBzqT-lu.js → index-ZVUSjoPt.js} +1 -1
- package/dist/assets/{index-q4YuEk6Y.js → index-a06SsDzR.js} +1 -1
- package/dist/assets/{index-FMCeh-OO.js → index-abVhBaDD.js} +1 -1
- package/dist/assets/index-bPmqZBgV.js +57 -0
- package/dist/assets/index-ff-bbioF.js +54 -0
- package/dist/assets/index-iMXo7QvS.js +203 -0
- package/dist/assets/{index-hnUD7mNC.js → index-nMl64N_V.js} +1 -1
- package/dist/assets/{index-3kUoZ2Ef.js → index-vxiR8pfK.js} +1 -1
- package/dist/assets/{index-lnLE9M77.js → index-xWYUgDbV.js} +1 -1
- package/dist/assets/{index-uIKkPDx2.js → index-y2KSkfLz.js} +40 -40
- package/dist/assets/{index.es-vxViMQsn.js → index.es-ALyZtlD4.js} +1 -1
- package/dist/assets/{index.esm-xVa55Zup.js → index.esm-xIl7e9gb.js} +1 -1
- package/dist/assets/{invite-EUhwRkSk.js → invite-dfEy8v_5.js} +1 -1
- package/dist/assets/{issue-passport-Z7ofkA6K.js → issue-passport-fEqwJXG6.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-NWykbogG.js → jss-plugin-props-sort.esm-kbFQzztD.js} +1 -1
- package/dist/assets/{launch-result-message-E79l1MGN.js → launch-result-message-L8kZXtzD.js} +1 -1
- package/dist/assets/{layout-ZhSAbpLd.js → layout-0pUBjxtB.js} +1 -1
- package/dist/assets/{list-header-OJgTzNF1.js → list-header-Hm2EdlIi.js} +1 -1
- package/dist/assets/localization-wJMD1m3f.js +1 -0
- package/dist/assets/{log-4VclxlhZ.js → log-OhxMkgRi.js} +1 -1
- package/dist/assets/{login-7XksV0rI.js → login-bHBlzpYF.js} +1 -1
- package/dist/assets/{logo-uploader-enkwnhCD.js → logo-uploader-0eInnbd3.js} +3 -3
- package/dist/assets/{lost-passport-cJF6p-67.js → lost-passport-03SqPwTA.js} +3 -3
- package/dist/assets/{lottie-2uuZhpDU.js → lottie-3AYsM-7p.js} +1 -1
- package/dist/assets/{memoize-one.esm-Y0hnttfr.js → memoize-one.esm-aR7zk5EL.js} +1 -1
- package/dist/assets/{nav-menu-2LU_iiMs.js → nav-menu-tHqNXHWZ.js} +1 -1
- package/dist/assets/notifications-ctBKCtPf.js +62 -0
- package/dist/assets/overview-m77Wq7B-.js +12 -0
- package/dist/assets/{page-header-CBzxlYad.js → page-header-vO63wFfQ.js} +1 -1
- package/dist/assets/{permission-K-J3su8S.js → permission-Hsi09aPo.js} +1 -1
- package/dist/assets/preferences-EiGJatlS.js +1 -0
- package/dist/assets/publish-resource-2FsX2H-A.js +1 -0
- package/dist/assets/{react-QMgqj51s.js → react-OLE2aLcA.js} +3 -3
- package/dist/assets/{selector-ykYLL3HG.js → selector-xJAQJIb9.js} +1 -1
- package/dist/assets/session-H9u-VoT_.js +1 -0
- package/dist/assets/setup-BrgZGPKn.js +19 -0
- package/dist/assets/{slicedToArray-ttVd16Np.js → slicedToArray-3JGHAhoK.js} +1 -1
- package/dist/assets/{spaces-ciJpOZGt.js → spaces-q-QDvYWh.js} +1 -1
- package/dist/assets/{start-uztJSUel.js → start-kEs1h_Ye.js} +1 -1
- package/dist/assets/{step-actions-DJIhDuRf.js → step-actions-eV0LaBPj.js} +1 -1
- package/dist/assets/{studio--sQ-x80O.js → studio-PPPoaHAt.js} +1 -1
- package/dist/assets/{switch-control-HdRcPAzs.js → switch-control-nBJQtAbl.js} +1 -1
- package/dist/assets/{transfer-3Gc3ycMl.js → transfer-4YbppiW9.js} +1 -1
- package/dist/assets/{uniqBy-k-IuKA35.js → uniqBy-5le2H7F2.js} +1 -1
- package/dist/assets/{unsubscribe-XLKaVY1Y.js → unsubscribe-yGcQHfSF.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-3Ylh35kg.js → use-blocklet-info-for-connect-did-spaces-4bwHmJH0.js} +1 -1
- package/dist/assets/{useAsync-eueWQMQv.js → useAsync-91bd-3QR.js} +1 -1
- package/dist/assets/{useFormControl-egCRc-oY.js → useFormControl-frW5uFmF.js} +1 -1
- package/dist/assets/{useLocalStorage--e-ZnzAS.js → useLocalStorage-emyZgE08.js} +1 -1
- package/dist/assets/{useSetState-FhUMbwgE.js → useSetState-Psz4YPxB.js} +1 -1
- package/dist/assets/{user-waJ6JIkq.js → user-gC6ljdhh.js} +1 -1
- package/dist/assets/{util-ScgYi65n.js → util-QxtiwoYp.js} +1 -1
- package/dist/assets/{wallet-hidden-topbar-4xE3Zmur.js → wallet-hidden-topbar-HQXafv5M.js} +3 -3
- package/dist/assets/{wrap-locale-eKtYETDv.js → wrap-locale--PMJXxtu.js} +1 -1
- package/dist/assets/{zh-ZEZ2eHqG.js → zh-lWXip989.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +18 -18
- package/dist/assets/DialogContentText-2StByoPg.js +0 -1
- package/dist/assets/add-resource-iCbxZ67X.js +0 -1
- package/dist/assets/api-Rgr2QdHb.js +0 -1
- package/dist/assets/confirm-Q5y49s7X.js +0 -7
- package/dist/assets/domain-zuaklUGn.js +0 -9
- package/dist/assets/index-8qpwDSzw.js +0 -203
- package/dist/assets/index-SVSv1xqW.js +0 -54
- package/dist/assets/index-_typwRVC.js +0 -37
- package/dist/assets/index-p4r1RVIJ.js +0 -57
- package/dist/assets/localization-cO5MmVsH.js +0 -1
- package/dist/assets/notifications-Y8Uw-nJi.js +0 -62
- package/dist/assets/overview-9xOIDQ82.js +0 -12
- package/dist/assets/preferences-d-eWeFvi.js +0 -1
- package/dist/assets/publish-resource-4G2Mwb1d.js +0 -1
- package/dist/assets/session-4pK31v9z.js +0 -1
- package/dist/assets/setup-vcogg-M1.js +0 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{P as f,gl as Wo,aS as Mt,aR as zo,e6 as Uo,K as Ko,M as qo,j as g,bU as q,B as Re,r as w,a7 as Kt,b0 as Lt,T as ge,bm as Yn,aw as Ye,b1 as yn,aD as ae,aC as me,aE as x,aG as be,bH as je,al as Be,az as xe,ay as we,aA as oe,bl as St,aH as De,cE as Ne,c8 as G,bD as Go,bF as Xe,bG as et,g9 as Bn,bJ as kt,g8 as Hn,U as Wn,cF as qt,cy as Zo,gb as bn,cw as Qo,bo as Jo,di as Xo,ga as er,c9 as jt,b as it,cx as tr,bf as nr,cf as Gt,gm as ye,gn as or,G as Ct,N as rr,bW as sr,bh as Ke,a9 as ar,u as Zt,S as ir,w as lr,c as cr,f7 as Dn,bj as ur,fY as Le,E as zn,fF as Un,aX as dr,b8 as fr,Y as xn,go as hr,a8 as mr,q as pr}from"./index-uIKkPDx2.js";import{T as gr}from"./index-FT9kP6qN.js";import{_ as yr}from"./permission-K-J3su8S.js";import{I as br}from"./iframe-5bCtjLAp.js";import{d as Dr}from"./LaunchOutlined-WAN0Led7.js";import{r as Qt,b as Kn,H as Ee,D as tt,B as Ve,y as xr,E as wr,I as Jt,z as _t,M as ut,N as dt,A as Ze,L as ft,e as ht,J as xt,K as wt,d as vr,Q as Yt,G as lt,F as wn,R as Xt,S as Pr,Z as Mr,T as Sr,O as kr,V as Cr,P as Tr,W as Ir}from"./index-7N0uMPlx.js";import{d as Vr,B as Rr}from"./ChevronRight-7cKIhy5z.js";import{_ as qn}from"./toPropertyKey-NzAT2yhV.js";import{G as he}from"./Grid-G2b-U3nu.js";import{L as Gn}from"./ListItem-kYIyq9wN.js";import{a as Or}from"./confirm-Q5y49s7X.js";import{F as vn}from"./FormControl-U_6qW76h.js";import{S as Pn}from"./Select-1vnu6Wod.js";import{C as Er,a as Fr}from"./CardContent-hsa9cKyn.js";import{A as Ar}from"./Alert-nav821gk.js";import{f as Lr}from"./format-error-iCYgDtF5.js";import{T as jr}from"./TextField-HfFRez76.js";import{M as Nr}from"./InputAdornment-iwL7P_Vm.js";import{p as $r}from"./dashboard-wLNTNF45.js";import{D as _r}from"./index-hnUD7mNC.js";import"./useAsync-eueWQMQv.js";import"./session-4pK31v9z.js";import"./index-nXJuMgJq.js";import"./nav-menu-2LU_iiMs.js";import"./MoreHoriz-1QS3N81v.js";import"./ExpandMore-JmnmUnd8.js";import"./Toolbar-z-FYIGbv.js";import"./Hidden-SKwxA9k1.js";import"./Avatar-4W2iSGC-.js";import"./DialogContentText-2StByoPg.js";import"./useFormControl-egCRc-oY.js";import"./InputLabel-qtx_TKpe.js";import"./MoreVert-b_wUncc4.js";import"./useLocalStorage--e-ZnzAS.js";import"./useSetState-FhUMbwgE.js";import"./PlayArrow-DsCR1WAD.js";import"./ButtonGroup-qjjm6C6u.js";import"./RadioGroup-MeoNWf5B.js";import"./FormControlLabel-Yzi0VkLB.js";import"./FormGroup-6byJTUh5.js";import"./index-_typwRVC.js";import"./spaces-ciJpOZGt.js";import"./index-KswRO1Cx.js";import"./api-Rgr2QdHb.js";import"./fallback-wCdaTD2t.js";import"./wallet-hidden-topbar-4xE3Zmur.js";import"./selector-ykYLL3HG.js";import"./Checkbox-iS0aPWS5.js";import"./FilterList-rU96K2al.js";import"./TableRow-7b-DLFKT.js";import"./LastPage-pHa4HGK_.js";import"./index-3kUoZ2Ef.js";import"./redux-XOuz_cVf.js";import"./Search-pq50dDMP.js";const Yr=f.oneOfType([f.func,f.object]),Zn=Yr;var Br=Wo;function Hr(e,t){var n=e.length;if(n)return t+=t<0?n:0,Br(t,n)?e[t]:void 0}var Wr=Hr,zr=Wr,Ur=zo,Kr=Uo;function qr(e){return e=Kr(e),Ur(function(t){return zr(t,e)})}var Gr=qr;const Zr=Mt(Gr);function Qn(e){Qt(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(qn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Kn(r);(n===void 0||n<a||isNaN(Number(a)))&&(n=a)}),n||new Date(NaN)}function Jn(e){Qt(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(qn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Kn(r);(n===void 0||n>a||isNaN(a.getDate()))&&(n=a)}),n||new Date(NaN)}function Qr(e){return Qt(1,arguments),Ee(e,Date.now())}var en={},Jr=qo;Object.defineProperty(en,"__esModule",{value:!0});var Xn=en.default=void 0,Xr=Jr(Ko()),es=g;Xn=en.default=(0,Xr.default)((0,es.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const ts=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t)),ns=(e,t)=>{const n=ut(ft(e),{locale:t}),r=dt(ht(e),{locale:t}),a=[];for(let o=n;lt(o,r);)a.push(o),o=_t(o,1);return a},os=({startDate:e},t)=>e&&Ee(t,e),rs=({endDate:e},t)=>e&&Ee(t,e),ss=({startDate:e,endDate:t},n)=>e&&t&&(Xt(n,{start:e,end:t})||Ee(n,e)||Ee(n,t)),as=({startDate:e,endDate:t})=>e&&t?Ee(e,t):!1,Mn=(e,t)=>{if(e){const n=e instanceof Date?e:xr(e);if(wr(n))return n}return t},is=(e,t,n)=>{const{startDate:r,endDate:a}=e;if(r&&a){const o=Qn([r,t]),s=Jn([a,n]);return[o,Jt(o,s)?Ve(o,1):s]}return[r,a]},ls=(e,t)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:_t(e,-1),endDate:_t(e,-1)},{label:"This Week",startDate:ut(e,{locale:t}),endDate:dt(e,{locale:t})},{label:"Last Week",startDate:ut(Ze(e,-1),{locale:t}),endDate:dt(Ze(e,-1),{locale:t})},{label:"Last 7 Days",startDate:Ze(e,-1),endDate:e},{label:"This Month",startDate:ft(e),endDate:ht(e)},{label:"Last Month",startDate:ft(Ve(e,-1)),endDate:ht(Ve(e,-1))},{label:"This Year",startDate:xt(e),endDate:wt(e)},{label:"Last Year",startDate:xt(tt(e,-1)),endDate:wt(tt(e,-1))}],cs=(e,t)=>{const n=Math.floor(t/2);return Array(t).fill(0).map((r,a)=>e.getFullYear()-n+a)},us=({date:e,setDate:t,nextDisabled:n,prevDisabled:r,onClickNext:a,onClickPrevious:o,locale:s})=>{const i=typeof s<"u"?[...Array(12).keys()].map(u=>{var y;return(y=s.localize)===null||y===void 0?void 0:y.month(u,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],c=u=>{t(Cr(e,parseInt(u.target.value,10)))},l=u=>{t(Tr(e,parseInt(u.target.value,10)))};return q.createElement(he,{container:!0,justifyContent:"space-between",alignItems:"center"},q.createElement(he,{item:!0,sx:{padding:"5px"}},q.createElement(Ye,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:r,onClick:o},q.createElement(Mr,{color:r?"disabled":"action"}))),q.createElement(he,{item:!0},q.createElement(vn,{variant:"standard"},q.createElement(Pn,{value:Sr(e),onChange:c,MenuProps:{disablePortal:!0}},i.map((u,y)=>q.createElement(yn,{key:u,value:y},u))))),q.createElement(he,{item:!0},q.createElement(vn,{variant:"standard"},q.createElement(Pn,{value:kr(e),onChange:l,MenuProps:{disablePortal:!0}},cs(e,30).map(u=>q.createElement(yn,{key:u,value:u},u))))),q.createElement(he,{item:!0,sx:{padding:"5px"}},q.createElement(Ye,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:n,onClick:a},q.createElement(Vr,{color:n?"disabled":"action"}))))},ds=({startOfRange:e,endOfRange:t,disabled:n,highlighted:r,outlined:a,filled:o,onClick:s,onHover:i,value:c})=>q.createElement(Re,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":t?"0 50% 50% 0":void 0,backgroundColor:l=>!n&&r?l.palette.primary.light:void 0}},q.createElement(Ye,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:l=>!n&&a?`1px solid ${l.palette.primary.dark}`:void 0},!n&&o?{"&:hover":{backgroundColor:l=>l.palette.primary.dark},backgroundColor:l=>l.palette.primary.dark}:{}),disabled:n,onClick:s,onMouseOver:i},q.createElement(ge,{sx:{lineHeight:1.6,color:l=>n?l.palette.text.secondary:o?l.palette.primary.contrastText:l.palette.text.primary},variant:"body2"},c)));var vt;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(vt||(vt={}));const Sn=e=>{var t;const{helpers:n,handlers:r,value:a,dateRange:o,marker:s,setValue:i,minDate:c,maxDate:l,locale:u}=e,y=((t=u==null?void 0:u.options)===null||t===void 0?void 0:t.weekStartsOn)||0,D=typeof u<"u"?[...Array(7).keys()].map(d=>{var p;return(p=u.localize)===null||p===void 0?void 0:p.day((d+y)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[h,S]=e.navState;return q.createElement(Kt,{square:!0,elevation:0,sx:{width:290}},q.createElement(he,{container:!0},q.createElement(us,{date:a,setDate:i,nextDisabled:!S,prevDisabled:!h,onClickPrevious:()=>r.onMonthNavigate(s,vt.Previous),onClickNext:()=>r.onMonthNavigate(s,vt.Next),locale:u}),q.createElement(he,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},D.map((d,p)=>q.createElement(ge,{color:"textSecondary",key:p,variant:"caption"},d))),q.createElement(he,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},ts(ns(a,u),7).map((d,p)=>q.createElement(he,{key:p,container:!0,direction:"row",justifyContent:"center"},d.map(b=>{const m=os(o,b),M=rs(o,b),k=as(o),P=ss(o,b)||n.inHoverRange(b);return q.createElement(ds,{key:Yt(b,"dd-MM-yyyy"),filled:m||M,outlined:Qr(b),highlighted:P&&!k,disabled:!Jt(a,b)||!Xt(b,{start:c,end:l}),startOfRange:m&&!k,endOfRange:M&&!k,onClick:()=>r.onDayClick(b),onHover:()=>r.onDayHover(b),value:Pr(b)})}))))))},kn=(e,t)=>{const{startDate:n,endDate:r}=e,{startDate:a,endDate:o}=t;return n&&a&&r&&o?Ee(n,a)&&Ee(r,o):!1},fs=({ranges:e,setRange:t,selectedRange:n})=>q.createElement(Yn,null,e.map((r,a)=>q.createElement(Gn,{button:!0,key:a,onClick:()=>t(r),sx:[kn(r,n)&&{backgroundColor:o=>o.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},q.createElement(Or,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:kn(r,n)?"bold":"normal"}}},r.label)))),Bt={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},hs=e=>{const{ranges:t,dateRange:n,minDate:r,maxDate:a,firstMonth:o,setFirstMonth:s,secondMonth:i,setSecondMonth:c,setDateRange:l,helpers:u,handlers:y,locale:D}=e,{startDate:h,endDate:S}=n,d=vr(i,o)>=2,p={dateRange:n,minDate:r,maxDate:a,helpers:u,handlers:y};return q.createElement(Kt,{elevation:5,square:!0},q.createElement(he,{container:!0,direction:"row",wrap:"nowrap"},q.createElement(he,null,q.createElement(fs,{selectedRange:n,ranges:t,setRange:l})),q.createElement(Lt,{orientation:"vertical",flexItem:!0}),q.createElement(he,null,q.createElement(he,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},q.createElement(he,{item:!0,sx:{flex:1,textAlign:"center"}},q.createElement(ge,{variant:"subtitle1"},h?Yt(h,"dd MMMM yyyy",{locale:D}):"Start Date")),q.createElement(he,{item:!0,sx:{flex:1,textAlign:"center"}},q.createElement(Xn,{color:"action"})),q.createElement(he,{item:!0,sx:{flex:1,textAlign:"center"}},q.createElement(ge,{variant:"subtitle1"},S?Yt(S,"dd MMMM yyyy",{locale:D}):"End Date"))),q.createElement(Lt,null),q.createElement(he,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},q.createElement(Sn,Object.assign({},p,{value:o,setValue:s,navState:[!0,d],marker:Bt.FIRST_MONTH,locale:D})),q.createElement(Lt,{orientation:"vertical",flexItem:!0}),q.createElement(Sn,Object.assign({},p,{value:i,setValue:c,navState:[d,!0],marker:Bt.SECOND_MONTH,locale:D}))))))},ms=e=>{const t=new Date,{open:n,onChange:r,initialDateRange:a,minDate:o,maxDate:s,definedRanges:i=ls(new Date,e.locale),locale:c}=e,l=Mn(o,tt(t,-10)),u=Mn(s,tt(t,10)),[y,D]=is(a||{},l,u),[h,S]=w.useState(Object.assign({},a)),[d,p]=w.useState(),[b,m]=w.useState(y||t),[M,k]=w.useState(D||Ve(b,1)),{startDate:P,endDate:O}=h,A=F=>{lt(F,M)&&m(F)},I=F=>{wn(F,b)&&k(F)},T=F=>{let{startDate:_,endDate:Y}=F;if(_&&Y)F.startDate=_=Qn([_,l]),F.endDate=Y=Jn([Y,u]),S(F),r(F),m(_),k(Jt(_,Y)?Ve(_,1):Y);else{const N={};S(N),r(N),m(t),k(Ve(b,1))}},L=F=>{if(P&&!O&&!lt(F,P)){const _={startDate:P,endDate:F};r(_),S(_)}else S({startDate:F,endDate:void 0});p(F)},V=(F,_)=>{if(F===Bt.FIRST_MONTH){const Y=Ve(b,_);lt(Y,M)&&m(Y)}else{const Y=Ve(M,_);lt(b,Y)&&k(Y)}},E=F=>{P&&!O&&(!d||!Ee(F,d))&&p(F)},C={inHoverRange:F=>P&&!O&&d&&wn(d,P)&&Xt(F,{start:P,end:d})},v={onDayClick:L,onDayHover:E,onMonthNavigate:V};return n?w.createElement(hs,{dateRange:h,minDate:l,maxDate:u,ranges:i,firstMonth:b,secondMonth:M,setFirstMonth:A,setSecondMonth:I,setDateRange:T,helpers:C,handlers:v,locale:c}):null},ps=e=>{const{closeOnClickOutside:t,wrapperClassName:n,toggle:r,open:a}=e,o=()=>{t!==!1&&r()},s=i=>(i==null?void 0:i.key)==="Escape"&&o();return q.createElement(Re,{sx:{position:"relative"}},a&&q.createElement(Re,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:s,onClick:o}),q.createElement(Re,{sx:{position:"relative",zIndex:1},className:n},q.createElement(ms,Object.assign({},e))))},gs=e=>q.createElement(ps,Object.assign({},e)),ys=["localeText"],Ht=w.createContext(null),tn=function(t){var n;const{localeText:r}=t,a=ae(t,ys),{utils:o,localeText:s}=(n=w.useContext(Ht))!=null?n:{utils:void 0,localeText:void 0},i=me({props:a,name:"MuiLocalizationProvider"}),{children:c,dateAdapter:l,dateFormats:u,dateLibInstance:y,adapterLocale:D,localeText:h}=i,S=w.useMemo(()=>x({},h,s,r),[h,s,r]),d=w.useMemo(()=>{if(!l)return o||null;const m=new l({locale:D,formats:u,instance:y});if(!m.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
|
|
1
|
+
import{P as f,gl as Wo,aS as Mt,aR as zo,e6 as Uo,K as Ko,M as qo,j as g,bU as q,B as Re,r as w,a7 as Kt,b0 as Lt,T as ge,bm as Yn,aw as Ye,b1 as yn,aD as ae,aC as me,aE as x,aG as be,bH as je,al as Be,az as xe,ay as we,aA as oe,bl as St,aH as De,cE as Ne,c8 as G,bD as Go,bF as Xe,bG as et,g9 as Bn,bJ as kt,g8 as Hn,U as Wn,cF as qt,cy as Zo,gb as bn,cw as Qo,bo as Jo,di as Xo,ga as er,c9 as jt,b as it,cx as tr,bf as nr,cf as Gt,gm as ye,gn as or,G as Ct,N as rr,bW as sr,bh as Ke,a9 as ar,u as Zt,S as ir,w as lr,c as cr,f7 as Dn,bj as ur,fY as Le,E as zn,fF as Un,aX as dr,b8 as fr,Y as xn,go as hr,a8 as mr,q as pr}from"./index-y2KSkfLz.js";import{T as gr}from"./index-VXs8EUQf.js";import{_ as yr}from"./permission-Hsi09aPo.js";import{I as br}from"./iframe-3lZlzsQv.js";import{d as Dr}from"./LaunchOutlined-3m-tMbii.js";import{r as Qt,b as Kn,H as Ee,D as tt,B as Ve,y as xr,E as wr,I as Jt,z as _t,M as ut,N as dt,A as Ze,L as ft,e as ht,J as xt,K as wt,d as vr,Q as Yt,G as lt,F as wn,R as Xt,S as Pr,Z as Mr,T as Sr,O as kr,V as Cr,P as Tr,W as Ir}from"./index-B_Bi4uHj.js";import{d as Vr,B as Rr}from"./ChevronRight-k1zfc6_o.js";import{_ as qn}from"./toPropertyKey-NzAT2yhV.js";import{G as he}from"./Grid-DNB3G9QF.js";import{L as Gn}from"./ListItem-A9CD_j9i.js";import{a as Or}from"./confirm-IQ3toSkI.js";import{F as vn}from"./FormControl-TQWGu6Eu.js";import{S as Pn}from"./Select-_dtLnCt2.js";import{C as Er,a as Fr}from"./CardContent-ODF0v07z.js";import{A as Ar}from"./Alert-MGbJy_rM.js";import{f as Lr}from"./format-error-kIg-iPFu.js";import{T as jr}from"./TextField-aAyoTTob.js";import{M as Nr}from"./InputAdornment-p6ZjH2CD.js";import{p as $r}from"./dashboard-h7LrZcKz.js";import{D as _r}from"./index-nMl64N_V.js";import"./useAsync-91bd-3QR.js";import"./session-H9u-VoT_.js";import"./index-WqnGi5T9.js";import"./nav-menu-tHqNXHWZ.js";import"./MoreHoriz-H3078beE.js";import"./ExpandMore-D_RSmPkU.js";import"./Toolbar-9-_-wvc9.js";import"./Hidden-QJb-QlKr.js";import"./Avatar-82N_IzTT.js";import"./index-QahpWU7h.js";import"./useFormControl-frW5uFmF.js";import"./InputLabel-IgDOTTEJ.js";import"./MoreVert-luFLeyGM.js";import"./useLocalStorage-emyZgE08.js";import"./useSetState-Psz4YPxB.js";import"./PlayArrow-SAhKPV20.js";import"./ButtonGroup-AG1tRxzS.js";import"./RadioGroup-RRlhJzK5.js";import"./FormControlLabel-QjR5dMPU.js";import"./FormGroup-ibKyzFt2.js";import"./spaces-q-QDvYWh.js";import"./index-Rx1zNX-F.js";import"./api-oZzGUegl.js";import"./fallback-JYdZZFFV.js";import"./wallet-hidden-topbar-HQXafv5M.js";import"./selector-xJAQJIb9.js";import"./Checkbox-kTbf3Sl5.js";import"./FilterList-7YPj6NEn.js";import"./TableRow-7Dj41T_N.js";import"./LastPage-ZVfgNDRp.js";import"./index-vxiR8pfK.js";import"./redux-XOuz_cVf.js";import"./Search-s0KIULwj.js";const Yr=f.oneOfType([f.func,f.object]),Zn=Yr;var Br=Wo;function Hr(e,t){var n=e.length;if(n)return t+=t<0?n:0,Br(t,n)?e[t]:void 0}var Wr=Hr,zr=Wr,Ur=zo,Kr=Uo;function qr(e){return e=Kr(e),Ur(function(t){return zr(t,e)})}var Gr=qr;const Zr=Mt(Gr);function Qn(e){Qt(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(qn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Kn(r);(n===void 0||n<a||isNaN(Number(a)))&&(n=a)}),n||new Date(NaN)}function Jn(e){Qt(1,arguments);var t;if(e&&typeof e.forEach=="function")t=e;else if(qn(e)==="object"&&e!==null)t=Array.prototype.slice.call(e);else return new Date(NaN);var n;return t.forEach(function(r){var a=Kn(r);(n===void 0||n>a||isNaN(a.getDate()))&&(n=a)}),n||new Date(NaN)}function Qr(e){return Qt(1,arguments),Ee(e,Date.now())}var en={},Jr=qo;Object.defineProperty(en,"__esModule",{value:!0});var Xn=en.default=void 0,Xr=Jr(Ko()),es=g;Xn=en.default=(0,Xr.default)((0,es.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const ts=(e,t)=>Array.from({length:Math.ceil(e.length/t)},(n,r)=>e.slice(r*t,r*t+t)),ns=(e,t)=>{const n=ut(ft(e),{locale:t}),r=dt(ht(e),{locale:t}),a=[];for(let o=n;lt(o,r);)a.push(o),o=_t(o,1);return a},os=({startDate:e},t)=>e&&Ee(t,e),rs=({endDate:e},t)=>e&&Ee(t,e),ss=({startDate:e,endDate:t},n)=>e&&t&&(Xt(n,{start:e,end:t})||Ee(n,e)||Ee(n,t)),as=({startDate:e,endDate:t})=>e&&t?Ee(e,t):!1,Mn=(e,t)=>{if(e){const n=e instanceof Date?e:xr(e);if(wr(n))return n}return t},is=(e,t,n)=>{const{startDate:r,endDate:a}=e;if(r&&a){const o=Qn([r,t]),s=Jn([a,n]);return[o,Jt(o,s)?Ve(o,1):s]}return[r,a]},ls=(e,t)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:_t(e,-1),endDate:_t(e,-1)},{label:"This Week",startDate:ut(e,{locale:t}),endDate:dt(e,{locale:t})},{label:"Last Week",startDate:ut(Ze(e,-1),{locale:t}),endDate:dt(Ze(e,-1),{locale:t})},{label:"Last 7 Days",startDate:Ze(e,-1),endDate:e},{label:"This Month",startDate:ft(e),endDate:ht(e)},{label:"Last Month",startDate:ft(Ve(e,-1)),endDate:ht(Ve(e,-1))},{label:"This Year",startDate:xt(e),endDate:wt(e)},{label:"Last Year",startDate:xt(tt(e,-1)),endDate:wt(tt(e,-1))}],cs=(e,t)=>{const n=Math.floor(t/2);return Array(t).fill(0).map((r,a)=>e.getFullYear()-n+a)},us=({date:e,setDate:t,nextDisabled:n,prevDisabled:r,onClickNext:a,onClickPrevious:o,locale:s})=>{const i=typeof s<"u"?[...Array(12).keys()].map(u=>{var y;return(y=s.localize)===null||y===void 0?void 0:y.month(u,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],c=u=>{t(Cr(e,parseInt(u.target.value,10)))},l=u=>{t(Tr(e,parseInt(u.target.value,10)))};return q.createElement(he,{container:!0,justifyContent:"space-between",alignItems:"center"},q.createElement(he,{item:!0,sx:{padding:"5px"}},q.createElement(Ye,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:r,onClick:o},q.createElement(Mr,{color:r?"disabled":"action"}))),q.createElement(he,{item:!0},q.createElement(vn,{variant:"standard"},q.createElement(Pn,{value:Sr(e),onChange:c,MenuProps:{disablePortal:!0}},i.map((u,y)=>q.createElement(yn,{key:u,value:y},u))))),q.createElement(he,{item:!0},q.createElement(vn,{variant:"standard"},q.createElement(Pn,{value:kr(e),onChange:l,MenuProps:{disablePortal:!0}},cs(e,30).map(u=>q.createElement(yn,{key:u,value:u},u))))),q.createElement(he,{item:!0,sx:{padding:"5px"}},q.createElement(Ye,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:n,onClick:a},q.createElement(Vr,{color:n?"disabled":"action"}))))},ds=({startOfRange:e,endOfRange:t,disabled:n,highlighted:r,outlined:a,filled:o,onClick:s,onHover:i,value:c})=>q.createElement(Re,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":t?"0 50% 50% 0":void 0,backgroundColor:l=>!n&&r?l.palette.primary.light:void 0}},q.createElement(Ye,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:l=>!n&&a?`1px solid ${l.palette.primary.dark}`:void 0},!n&&o?{"&:hover":{backgroundColor:l=>l.palette.primary.dark},backgroundColor:l=>l.palette.primary.dark}:{}),disabled:n,onClick:s,onMouseOver:i},q.createElement(ge,{sx:{lineHeight:1.6,color:l=>n?l.palette.text.secondary:o?l.palette.primary.contrastText:l.palette.text.primary},variant:"body2"},c)));var vt;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(vt||(vt={}));const Sn=e=>{var t;const{helpers:n,handlers:r,value:a,dateRange:o,marker:s,setValue:i,minDate:c,maxDate:l,locale:u}=e,y=((t=u==null?void 0:u.options)===null||t===void 0?void 0:t.weekStartsOn)||0,D=typeof u<"u"?[...Array(7).keys()].map(d=>{var p;return(p=u.localize)===null||p===void 0?void 0:p.day((d+y)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[h,S]=e.navState;return q.createElement(Kt,{square:!0,elevation:0,sx:{width:290}},q.createElement(he,{container:!0},q.createElement(us,{date:a,setDate:i,nextDisabled:!S,prevDisabled:!h,onClickPrevious:()=>r.onMonthNavigate(s,vt.Previous),onClickNext:()=>r.onMonthNavigate(s,vt.Next),locale:u}),q.createElement(he,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},D.map((d,p)=>q.createElement(ge,{color:"textSecondary",key:p,variant:"caption"},d))),q.createElement(he,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},ts(ns(a,u),7).map((d,p)=>q.createElement(he,{key:p,container:!0,direction:"row",justifyContent:"center"},d.map(b=>{const m=os(o,b),M=rs(o,b),k=as(o),P=ss(o,b)||n.inHoverRange(b);return q.createElement(ds,{key:Yt(b,"dd-MM-yyyy"),filled:m||M,outlined:Qr(b),highlighted:P&&!k,disabled:!Jt(a,b)||!Xt(b,{start:c,end:l}),startOfRange:m&&!k,endOfRange:M&&!k,onClick:()=>r.onDayClick(b),onHover:()=>r.onDayHover(b),value:Pr(b)})}))))))},kn=(e,t)=>{const{startDate:n,endDate:r}=e,{startDate:a,endDate:o}=t;return n&&a&&r&&o?Ee(n,a)&&Ee(r,o):!1},fs=({ranges:e,setRange:t,selectedRange:n})=>q.createElement(Yn,null,e.map((r,a)=>q.createElement(Gn,{button:!0,key:a,onClick:()=>t(r),sx:[kn(r,n)&&{backgroundColor:o=>o.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},q.createElement(Or,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:kn(r,n)?"bold":"normal"}}},r.label)))),Bt={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},hs=e=>{const{ranges:t,dateRange:n,minDate:r,maxDate:a,firstMonth:o,setFirstMonth:s,secondMonth:i,setSecondMonth:c,setDateRange:l,helpers:u,handlers:y,locale:D}=e,{startDate:h,endDate:S}=n,d=vr(i,o)>=2,p={dateRange:n,minDate:r,maxDate:a,helpers:u,handlers:y};return q.createElement(Kt,{elevation:5,square:!0},q.createElement(he,{container:!0,direction:"row",wrap:"nowrap"},q.createElement(he,null,q.createElement(fs,{selectedRange:n,ranges:t,setRange:l})),q.createElement(Lt,{orientation:"vertical",flexItem:!0}),q.createElement(he,null,q.createElement(he,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},q.createElement(he,{item:!0,sx:{flex:1,textAlign:"center"}},q.createElement(ge,{variant:"subtitle1"},h?Yt(h,"dd MMMM yyyy",{locale:D}):"Start Date")),q.createElement(he,{item:!0,sx:{flex:1,textAlign:"center"}},q.createElement(Xn,{color:"action"})),q.createElement(he,{item:!0,sx:{flex:1,textAlign:"center"}},q.createElement(ge,{variant:"subtitle1"},S?Yt(S,"dd MMMM yyyy",{locale:D}):"End Date"))),q.createElement(Lt,null),q.createElement(he,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},q.createElement(Sn,Object.assign({},p,{value:o,setValue:s,navState:[!0,d],marker:Bt.FIRST_MONTH,locale:D})),q.createElement(Lt,{orientation:"vertical",flexItem:!0}),q.createElement(Sn,Object.assign({},p,{value:i,setValue:c,navState:[d,!0],marker:Bt.SECOND_MONTH,locale:D}))))))},ms=e=>{const t=new Date,{open:n,onChange:r,initialDateRange:a,minDate:o,maxDate:s,definedRanges:i=ls(new Date,e.locale),locale:c}=e,l=Mn(o,tt(t,-10)),u=Mn(s,tt(t,10)),[y,D]=is(a||{},l,u),[h,S]=w.useState(Object.assign({},a)),[d,p]=w.useState(),[b,m]=w.useState(y||t),[M,k]=w.useState(D||Ve(b,1)),{startDate:P,endDate:O}=h,A=F=>{lt(F,M)&&m(F)},I=F=>{wn(F,b)&&k(F)},T=F=>{let{startDate:_,endDate:Y}=F;if(_&&Y)F.startDate=_=Qn([_,l]),F.endDate=Y=Jn([Y,u]),S(F),r(F),m(_),k(Jt(_,Y)?Ve(_,1):Y);else{const N={};S(N),r(N),m(t),k(Ve(b,1))}},L=F=>{if(P&&!O&&!lt(F,P)){const _={startDate:P,endDate:F};r(_),S(_)}else S({startDate:F,endDate:void 0});p(F)},V=(F,_)=>{if(F===Bt.FIRST_MONTH){const Y=Ve(b,_);lt(Y,M)&&m(Y)}else{const Y=Ve(M,_);lt(b,Y)&&k(Y)}},E=F=>{P&&!O&&(!d||!Ee(F,d))&&p(F)},C={inHoverRange:F=>P&&!O&&d&&wn(d,P)&&Xt(F,{start:P,end:d})},v={onDayClick:L,onDayHover:E,onMonthNavigate:V};return n?w.createElement(hs,{dateRange:h,minDate:l,maxDate:u,ranges:i,firstMonth:b,secondMonth:M,setFirstMonth:A,setSecondMonth:I,setDateRange:T,helpers:C,handlers:v,locale:c}):null},ps=e=>{const{closeOnClickOutside:t,wrapperClassName:n,toggle:r,open:a}=e,o=()=>{t!==!1&&r()},s=i=>(i==null?void 0:i.key)==="Escape"&&o();return q.createElement(Re,{sx:{position:"relative"}},a&&q.createElement(Re,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:s,onClick:o}),q.createElement(Re,{sx:{position:"relative",zIndex:1},className:n},q.createElement(ms,Object.assign({},e))))},gs=e=>q.createElement(ps,Object.assign({},e)),ys=["localeText"],Ht=w.createContext(null),tn=function(t){var n;const{localeText:r}=t,a=ae(t,ys),{utils:o,localeText:s}=(n=w.useContext(Ht))!=null?n:{utils:void 0,localeText:void 0},i=me({props:a,name:"MuiLocalizationProvider"}),{children:c,dateAdapter:l,dateFormats:u,dateLibInstance:y,adapterLocale:D,localeText:h}=i,S=w.useMemo(()=>x({},h,s,r),[h,s,r]),d=w.useMemo(()=>{if(!l)return o||null;const m=new l({locale:D,formats:u,instance:y});if(!m.isMUIAdapter)throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
|
|
2
2
|
`));return m},[l,D,u,y,o]),p=w.useMemo(()=>d?{minDate:d.date("1900-01-01T00:00:00.000"),maxDate:d.date("2099-12-31T00:00:00.000")}:null,[d]),b=w.useMemo(()=>({utils:d,defaultDates:p,localeText:S}),[p,d,S]);return g.jsx(Ht.Provider,{value:b,children:c})},bs=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:x({},e)}}}}),eo={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"open previous view",openNextView:"open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n)=>`Select ${e}. ${t===null?"No time selected":`Selected time is ${n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t)=>e!==null&&t.isValid(e)?`Choose date, selected date is ${t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t)=>e!==null&&t.isValid(e)?`Choose time, selected time is ${t.format(e,"fullTime")}`:"Choose time",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"},Ds=eo;bs(eo);const He=()=>{const e=w.useContext(Ht);if(e===null)throw new Error(["MUI: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(`
|
|
3
3
|
`));if(e.utils===null)throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(`
|
|
4
4
|
`));const t=w.useMemo(()=>x({},Ds,e.localeText),[e.localeText]);return w.useMemo(()=>x({},e,{localeText:t}),[e,t])},ue=()=>He().utils,pt=()=>He().defaultDates,We=()=>He().localeText,gt=e=>{const t=ue(),n=w.useRef();return n.current===void 0&&(n.current=t.dateWithTimezone(void 0,e)),n.current};function xs(e){return typeof e=="string"}function ws(e,t,n){return e===void 0||xs(e)?t:x({},t,{ownerState:x({},t.ownerState,n)})}function vs(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function nn(e,t,n){return typeof e=="function"?e(t,n):e}function Cn(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Ps(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:a,className:o}=e;if(!t){const h=be(n==null?void 0:n.className,o,a==null?void 0:a.className,r==null?void 0:r.className),S=x({},n==null?void 0:n.style,a==null?void 0:a.style,r==null?void 0:r.style),d=x({},n,a,r);return h.length>0&&(d.className=h),Object.keys(S).length>0&&(d.style=S),{props:d,internalRef:void 0}}const s=vs(x({},a,r)),i=Cn(r),c=Cn(a),l=t(s),u=be(l==null?void 0:l.className,n==null?void 0:n.className,o,a==null?void 0:a.className,r==null?void 0:r.className),y=x({},l==null?void 0:l.style,n==null?void 0:n.style,a==null?void 0:a.style,r==null?void 0:r.style),D=x({},l,n,c,i);return u.length>0&&(D.className=u),Object.keys(y).length>0&&(D.style=y),{props:D,internalRef:l.ref}}const Ms=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function pe(e){var t;const{elementType:n,externalSlotProps:r,ownerState:a,skipResolvingSlotProps:o=!1}=e,s=ae(e,Ms),i=o?{}:nn(r,a),{props:c,internalRef:l}=Ps(x({},s,{externalSlotProps:i})),u=je(l,i==null?void 0:i.ref,(t=e.additionalProps)==null?void 0:t.ref);return ws(n,x({},c,{ref:u}),a)}const Ss=Be(g.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ks=Be(g.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),Cs=Be(g.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),Ts=Be(g.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");Be(g.jsxs(w.Fragment,{children:[g.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),g.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");Be(g.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange");Be(g.jsxs(w.Fragment,{children:[g.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),g.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time");function Is(e){return xe("MuiPickersArrowSwitcher",e)}we("MuiPickersArrowSwitcher",["root","spacer","button"]);const Vs=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],Rs=["ownerState"],Os=["ownerState"],Es=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Fs=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Tn=oe(Ye,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})(({ownerState:e})=>x({},e.hidden&&{visibility:"hidden"})),As=e=>{const{classes:t}=e;return De({root:["root"],spacer:["spacer"],button:["button"]},Is,t)},Ls=w.forwardRef(function(t,n){var r,a,o,s;const c=St().direction==="rtl",l=me({props:t,name:"MuiPickersArrowSwitcher"}),{children:u,className:y,slots:D,slotProps:h,isNextDisabled:S,isNextHidden:d,onGoToNext:p,nextLabel:b,isPreviousDisabled:m,isPreviousHidden:M,onGoToPrevious:k,previousLabel:P}=l,O=ae(l,Vs),A=l,I=As(A),T={isDisabled:S,isHidden:d,goTo:p,label:b},L={isDisabled:m,isHidden:M,goTo:k,label:P},V=(r=D==null?void 0:D.previousIconButton)!=null?r:Tn,E=pe({elementType:V,externalSlotProps:h==null?void 0:h.previousIconButton,additionalProps:{size:"medium",title:L.label,"aria-label":L.label,disabled:L.isDisabled,edge:"end",onClick:L.goTo},ownerState:x({},A,{hidden:L.isHidden}),className:I.button}),R=(a=D==null?void 0:D.nextIconButton)!=null?a:Tn,C=pe({elementType:R,externalSlotProps:h==null?void 0:h.nextIconButton,additionalProps:{size:"medium",title:T.label,"aria-label":T.label,disabled:T.isDisabled,edge:"start",onClick:T.goTo},ownerState:x({},A,{hidden:T.isHidden}),className:I.button}),v=(o=D==null?void 0:D.leftArrowIcon)!=null?o:ks,F=pe({elementType:v,externalSlotProps:h==null?void 0:h.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),_=ae(F,Rs),Y=(s=D==null?void 0:D.rightArrowIcon)!=null?s:Cs,N=pe({elementType:Y,externalSlotProps:h==null?void 0:h.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),Z=ae(N,Os);return g.jsxs(Es,x({ref:n,className:be(I.root,y),ownerState:A},O,{children:[g.jsx(V,x({},E,{children:c?g.jsx(Y,x({},Z)):g.jsx(v,x({},_))})),u?g.jsx(ge,{variant:"subtitle1",component:"span",children:u}):g.jsx(Fs,{className:I.spacer,ownerState:A}),g.jsx(R,x({},C,{children:c?g.jsx(v,x({},_)):g.jsx(Y,x({},Z))}))]}))}),ot=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),js=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const a=n??r;let o;if(e!=null)o=e;else if(a.includes(t))o=t;else if(a.length>0)o=a[0];else throw new Error("MUI: The `views` prop must contain at least one view");return{views:a,openTo:o}},Ns=["hours","minutes","seconds"],$s=e=>Ns.includes(e),In=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),_s=(e,t)=>(n,r)=>e?t.isAfter(n,r):In(n,t)>In(r,t);function to({onChange:e,onViewChange:t,openTo:n,view:r,views:a,autoFocus:o,focusedView:s,onFocusedViewChange:i}){var c,l;const u=w.useRef(n),y=w.useRef(a),D=w.useRef(a.includes(n)?n:a[0]),[h,S]=Ne({name:"useViews",state:"view",controlled:r,default:D.current}),d=w.useRef(o?h:null),[p,b]=Ne({name:"useViews",state:"focusedView",controlled:s,default:d.current});w.useEffect(()=>{(u.current&&u.current!==n||y.current&&y.current.some(L=>!a.includes(L)))&&(S(a.includes(n)?n:a[0]),y.current=a,u.current=n)},[n,S,h,a]);const m=a.indexOf(h),M=(c=a[m-1])!=null?c:null,k=(l=a[m+1])!=null?l:null,P=G((L,V)=>{b(V?L:E=>L===E?null:E),i==null||i(L,V)}),O=G(L=>{L!==h&&(S(L),P(L,!0),t&&t(L))}),A=G(()=>{k&&O(k),P(k,!0)}),I=G((L,V,E)=>{const R=V==="finish",C=E?a.indexOf(E)<a.length-1:!!k;e(L,R&&C?"partial":V),R&&A()}),T=G((L,V,E)=>{e(L,V?"partial":"finish",E),V&&(O(V),P(V,!0))});return{view:h,setView:O,focusedView:p,setFocusedView:P,nextView:k,previousView:M,defaultView:D.current,goToNextView:A,setValueAndGoToNextView:I,setValueAndGoToView:T}}function Ys(e,{disableFuture:t,maxDate:n,timezone:r}){const a=ue();return w.useMemo(()=>{const o=a.dateWithTimezone(void 0,r),s=a.startOfMonth(t&&a.isBefore(o,n)?o:n);return!a.isAfter(s,e)},[t,n,e,a,r])}function Bs(e,{disablePast:t,minDate:n,timezone:r}){const a=ue();return w.useMemo(()=>{const o=a.dateWithTimezone(void 0,r),s=a.startOfMonth(t&&a.isAfter(o,n)?o:n);return!a.isBefore(s,e)},[t,n,e,a,r])}const mt=36,Tt=2,no=320,oo=358,Hs=oe("div")({overflow:"hidden",width:no,maxHeight:oo,display:"flex",flexDirection:"column",margin:"0 auto"}),ct=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:a,isDateDisabled:o,utils:s,timezone:i})=>{const c=s.startOfDay(s.dateWithTimezone(void 0,i));n&&s.isBefore(a,c)&&(a=c),t&&s.isAfter(r,c)&&(r=c);let l=e,u=e;for(s.isBefore(e,a)&&(l=a,u=null),s.isAfter(e,r)&&(u&&(u=r),l=null);l||u;){if(l&&s.isAfter(l,r)&&(l=null),u&&s.isBefore(u,a)&&(u=null),l){if(!o(l))return l;l=s.addDays(l,1)}if(u){if(!o(u))return u;u=s.addDays(u,-1)}}return null},Ws=(e,t)=>t==null||!e.isValid(t)?null:t,Se=(e,t,n)=>t==null||!e.isValid(t)?n:t,zs=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),on=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const a=r[r.length-1];r.push(e.addMonths(a,1))}return r},Wt=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r},ro=(e,t,n)=>n==="date"?e.startOfDay(e.dateWithTimezone(void 0,t)):e.dateWithTimezone(void 0,t),Us=["year","month","day"],Vn=e=>Us.includes(e),rn=(e,{format:t,views:n},r)=>{if(t!=null)return t;const a=e.formats;return ot(n,["year"])?a.year:ot(n,["month"])?a.month:ot(n,["day"])?a.dayOfMonth:ot(n,["month","year"])?`${a.month} ${a.year}`:ot(n,["day","month"])?`${a.month} ${a.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?a.normalDateWithWeekday:a.normalDate:a.keyboardDate},sn=({timezone:e,value:t,defaultValue:n,onChange:r,valueManager:a})=>{var o,s;const i=ue(),c=w.useRef(n),l=(o=t??c.current)!=null?o:a.emptyValue,u=w.useMemo(()=>a.getTimezone(i,l),[i,a,l]),y=G(d=>u==null?d:a.setTimezone(i,u,d)),D=(s=e??u)!=null?s:"default",h=w.useMemo(()=>a.setTimezone(i,D,l),[a,i,D,l]),S=G((d,...p)=>{const b=y(d);r==null||r(b,...p)});return{value:h,handleValueChange:S,timezone:D}},an=({name:e,timezone:t,value:n,defaultValue:r,onChange:a,valueManager:o})=>{const[s,i]=Ne({name:e,state:"value",controlled:n,default:r??o.emptyValue}),c=G((l,...u)=>{i(l),a==null||a(l,...u)});return sn({timezone:t,value:s,defaultValue:void 0,onChange:c,valueManager:o})},Ie={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},Ks=e=>Math.max(...e.map(t=>{var n;return(n=Ie[t.type])!=null?n:1})),rt=(e,t,n)=>{if(t===Ie.year)return e.startOfYear(n);if(t===Ie.month)return e.startOfMonth(n);if(t===Ie.day)return e.startOfDay(n);let r=n;return t<Ie.minutes&&(r=e.setMinutes(r,0)),t<Ie.seconds&&(r=e.setSeconds(r,0)),t<Ie.milliseconds&&(r=e.setMilliseconds(r,0)),r},qs=({props:e,utils:t,granularity:n,timezone:r,getTodayDate:a})=>{var o;let s=a?a():rt(t,n,ro(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,s)&&(s=rt(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,s)&&(s=rt(t,n,e.maxDate));const i=_s((o=e.disableIgnoringDatePartForTimeValidation)!=null?o:!1,t);return e.minTime!=null&&i(e.minTime,s)&&(s=rt(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:Wt(t,s,e.minTime))),e.maxTime!=null&&i(s,e.maxTime)&&(s=rt(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:Wt(t,s,e.maxTime))),s},so=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI: The token "${t}" is not supported by the Date and Time Pickers.`,"Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported."].join(`
|
|
@@ -39,7 +39,7 @@ import{P as f,gl as Wo,aS as Mt,aR as zo,e6 as Uo,K as Ko,M as qo,j as g,bU as q
|
|
|
39
39
|
fill: red;
|
|
40
40
|
stroke: red;
|
|
41
41
|
}
|
|
42
|
-
`;function yt({id:e,title:t,current:n,description:r,data:a,dateFn:o,valueFn:s}){const i=w.useRef(null),c=w.useRef(null),l=rr({style:{top:0,left:0},hidden:!0,textContent:""}),[u,y]=w.useState(null),D=sr(u),h={onmousemove(S,d){const{date:p,value:b}=d;l.textContent=`${o(p)}: ${s(b)}`,l.style.top=-30,l.style.left=80,l.hidden=!1},onmouseout(){l.hidden=!0}};return w.useEffect(()=>{setTimeout(()=>{y(document.querySelector(`.${e}`)),setTimeout(()=>{i.current&&ec(i.current,a||[],h)},400)})},[a]),g.jsx(cn,{title:t,value:n,graph:g.jsxs("div",{className:`card-sparkline ${e}`,style:{marginTop:16},children:[g.jsx("svg",{ref:i,className:"sparkline",width:(D==null?void 0:D.width)||100,height:30,strokeWidth:"2"}),g.jsx("span",{className:"tooltip",ref:c,hidden:l.hidden,style:{...l.style},children:l.textContent})]}),description:r})}yt.propTypes={id:f.string.isRequired,title:f.string.isRequired,current:f.any.isRequired,description:f.any,data:f.array,dateFn:f.func,valueFn:f.func};yt.defaultProps={description:null,data:[],dateFn:e=>e,valueFn:e=>e};const Oe=Zr(0),nc=(e,t)=>[{label:"This Week",startDate:ut(e,{locale:t}),endDate:dt(e,{locale:t})},{label:"Last Week",startDate:ut(Ze(e,-1),{locale:t}),endDate:dt(Ze(e,-1),{locale:t})},{label:"Last 7 Days",startDate:Ze(e,-1),endDate:e},{label:"This Month",startDate:ft(e),endDate:ht(e)},{label:"Last Month",startDate:ft(Ve(e,-1)),endDate:ht(Ve(e,-1))},{label:"This Year",startDate:xt(e),endDate:wt(e)},{label:"Last Year",startDate:xt(tt(e,-1)),endDate:wt(tt(e,-1))}];function oc({client:e,did:t}){const n=Ke().subtract(1,"day").toDate(),{info:r,inService:a}=ar(),{t:o,locale:s}=Zt(),[i,c]=w.useState(null),[l,u]=w.useState(!1),[y,D]=w.useState(n),[h,S]=w.useState({startDate:Ke().subtract(30,"day").toDate(),endDate:n}),d=yr(async()=>(await e.getTrafficInsights({input:{did:t,startDate:Ke(h.startDate).format("YYYY-MM-DD"),endDate:Ke(h.endDate).format("YYYY-MM-DD")}})).list);w.useEffect(()=>{d.loading||h.startDate&&h.endDate&&d.retry()},[h]);const p=R=>{c(i?null:R.currentTarget)},b=d.value||[],{loading:m,error:M}=d;if(!b.length&&m)return g.jsx(ir,{});if(M)return g.jsx(Ar,{severity:"error",children:Lr(M)});const k={totalRequests:Oe,validRequests:Oe,failedRequests:Oe,uniqueVisitors:Oe,uniqueFiles:Oe,uniqueReferrers:Oe,uniqueNotFound:Oe,uniqueStaticFiles:Oe,logSize:Le,bandwidth:Le},P=Object.keys(k).map(R=>({id:`${R}_chart`,title:o(`analytics.traffic.${R}`),current:b.length?k[R](b[0][R]):0,data:b.map(C=>({date:C.date,value:C[R]})).reverse(),dateFn:Oe,valueFn:k[R]})),O=!!i,A=O?"date-range-picker-popover":void 0,I=a?lr.WELLKNOWN_SERVICE_PATH_PREFIX:r.routing.adminPath,T=cr(window.location.origin,I,`/api/analytics/traffic?date=${Ke(y).format("YYYY-MM-DD")}&did=${t}`),L=R=>{S(R),c(null)},V=R=>{D(R.toDate()),u(!1)},E=()=>{window.open(T)};return g.jsxs("div",{children:[g.jsxs(ge,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:[o("analytics.trend"),g.jsxs(it,{onClick:p,variant:"outlined",size:"small",color:"secondary",children:[Dn(h.startDate,s)," - ",Dn(h.endDate,s)]})]}),g.jsx(ur,{id:A,open:O,anchorEl:i,onClose:()=>c(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsx(gs,{open:!0,toggle:p,maxDate:n,definedRanges:nc(y),onChange:L})}),g.jsx(he,{container:!0,spacing:4,children:P.map(R=>g.jsx(he,{item:!0,lg:3,md:6,sm:6,xs:12,children:g.jsx(yt,{...R})},R.id))}),g.jsxs(ge,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mt:4,mb:1,children:[o("analytics.detail"),g.jsxs("span",{children:[l&&g.jsx(Ye,{onClick:E,style:{marginRight:32},children:g.jsx(Dr,{})}),g.jsx(tn,{dateAdapter:Ql,children:g.jsx(_l,{disableFuture:!0,format:"ll",value:Ke(y),onChange:V,slotProps:{textField:{size:"small"}}})})]})]}),g.jsx(br,{url:T,width:"100%",height:"100%",frameBorder:0,onLoad:()=>u(!0),styles:{border:0,minHeight:"400vh"}})]})}const rc=e=>`${e}%`;function un({cpus:e,currentLoad:t,history:n}){const{t:r,locale:a}=w.useContext(zn);return g.jsx(yt,{id:"cpu-sparkline",title:r("common.cpu"),current:`${Math.floor(t||0)}%`,data:n,description:`${r("system.cores")}: ${(e==null?void 0:e.length)||0}`,dateFn:o=>Un(o,"HH:mm:ss",a),valueFn:rc})}un.propTypes={cpus:f.array,currentLoad:f.number,history:f.array};un.defaultProps={cpus:[],currentLoad:0,history:[]};function dn({instanceCount:e,title:t,total:n,used:r,history:a}){const{t:o,locale:s}=Zt(),i=!!n,c=n-r,l=i?`(${Math.floor(r/n*100)}%)`:"",u=[];return e&&u.push({title:o("system.instances"),metric:e}),u.push({title:o("system.used"),metric:Le(r)}),i&&u.push({title:o("system.free"),metric:Le(c)},{title:o("system.total"),metric:Le(n)}),g.jsx(yt,{id:"mem-sparkline",title:t||o("common.memory"),current:`${Le(Math.floor(r||0))} ${l}`,data:a,description:u.map((y,D)=>g.jsxs(Re,{sx:{marginLeft:D===0?0:2},children:[y.title,": ",y.metric]},y.title)),dateFn:y=>Un(y,"HH:mm:ss",s),valueFn:Le})}dn.propTypes={title:f.string,instanceCount:f.number,total:f.number,used:f.number,history:f.array};dn.defaultProps={title:"",instanceCount:null,total:null,used:null,history:[]};function fn({blocklet:e,cpuHistory:t,memoryHistory:n,...r}){const a=e.appRuntimeInfo||{};return g.jsx(sc,{component:"div",...r,children:g.jsxs(he,{className:"page-metrics",container:!0,spacing:5,children:[g.jsx(he,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!t.length&&g.jsx(un,{currentLoad:a.cpuUsage||0,history:t,style:{height:150}})},"cpu"),g.jsx(he,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&g.jsx(dn,{used:a.memoryUsage||0,history:n,style:{height:150}})},"memory")]})})}fn.propTypes={blocklet:f.object.isRequired,cpuHistory:f.arrayOf(f.shape({date:f.number,value:f.number})),memoryHistory:f.arrayOf(f.shape({date:f.number,value:f.number}))};fn.defaultProps={cpuHistory:[],memoryHistory:[]};const sc=Ct(ge)``;function Lo(){const{t:e,locale:t}=Zt(),{blocklet:n,runtimeHistory:r,actions:{refreshBlocklet:a}}=dr(),o=w.useMemo(()=>{const c=[];return fr(n,(l,{ancestors:u,id:y,level:D})=>{l.runtimeInfo&&c.push({type:"blocklet",groupId:n.meta.did,groupName:xn(n),id:y,name:xn(l,!0),blocklet:n,component:l,level:D-1>=0?D-1:0,runtimeInfo:l.runtimeInfo,ancestors:u})}),c},[n]);w.useEffect(()=>{const c=setInterval(()=>{a()},1e4);return()=>{clearInterval(c)}},[]);const s=c=>$r(Number(c||0),{locale:hr(t)}),i=[{label:e("common.name"),name:"name",options:{customBodyRenderLite(c){const{name:l,component:u,level:y,ancestors:D}=o[c];return g.jsxs(Re,{display:"flex",alignItems:"center",pl:y*2,children:[g.jsx(Rr,{size:14,blocklet:u,ancestors:D}),g.jsx(Re,{ml:1,children:l})]})}}},{label:e("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return s(l.uptime)}}},{label:e("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return Le((l==null?void 0:l.memoryUsage)||0)}}},{label:e("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return`${(l.cpuUsage||0).toFixed(1)}%`}}},{label:e("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:e("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return g.jsxs(ac,{component:"div",children:[g.jsx(ge,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:e("analytics.trend")}),n.status==="running"?[g.jsx(Re,{children:g.jsx(fn,{blocklet:n,cpuHistory:r.cpu,memoryHistory:r.memory})}),g.jsx(Re,{mt:3,children:g.jsx(_r,{title:e("analytics.detail"),className:"monitor-table",locale:t,data:o,columns:i,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:g.jsx(ge,{children:e("blocklet.runtimeInfo.noRunning")})]})}Lo.propTypes={};const ac=Ct(ge)``;function
|
|
42
|
+
`;function yt({id:e,title:t,current:n,description:r,data:a,dateFn:o,valueFn:s}){const i=w.useRef(null),c=w.useRef(null),l=rr({style:{top:0,left:0},hidden:!0,textContent:""}),[u,y]=w.useState(null),D=sr(u),h={onmousemove(S,d){const{date:p,value:b}=d;l.textContent=`${o(p)}: ${s(b)}`,l.style.top=-30,l.style.left=80,l.hidden=!1},onmouseout(){l.hidden=!0}};return w.useEffect(()=>{setTimeout(()=>{y(document.querySelector(`.${e}`)),setTimeout(()=>{i.current&&ec(i.current,a||[],h)},400)})},[a]),g.jsx(cn,{title:t,value:n,graph:g.jsxs("div",{className:`card-sparkline ${e}`,style:{marginTop:16},children:[g.jsx("svg",{ref:i,className:"sparkline",width:(D==null?void 0:D.width)||100,height:30,strokeWidth:"2"}),g.jsx("span",{className:"tooltip",ref:c,hidden:l.hidden,style:{...l.style},children:l.textContent})]}),description:r})}yt.propTypes={id:f.string.isRequired,title:f.string.isRequired,current:f.any.isRequired,description:f.any,data:f.array,dateFn:f.func,valueFn:f.func};yt.defaultProps={description:null,data:[],dateFn:e=>e,valueFn:e=>e};const Oe=Zr(0),nc=(e,t)=>[{label:"This Week",startDate:ut(e,{locale:t}),endDate:dt(e,{locale:t})},{label:"Last Week",startDate:ut(Ze(e,-1),{locale:t}),endDate:dt(Ze(e,-1),{locale:t})},{label:"Last 7 Days",startDate:Ze(e,-1),endDate:e},{label:"This Month",startDate:ft(e),endDate:ht(e)},{label:"Last Month",startDate:ft(Ve(e,-1)),endDate:ht(Ve(e,-1))},{label:"This Year",startDate:xt(e),endDate:wt(e)},{label:"Last Year",startDate:xt(tt(e,-1)),endDate:wt(tt(e,-1))}];function oc({client:e,did:t}){const n=Ke().subtract(1,"day").toDate(),{info:r,inService:a}=ar(),{t:o,locale:s}=Zt(),[i,c]=w.useState(null),[l,u]=w.useState(!1),[y,D]=w.useState(n),[h,S]=w.useState({startDate:Ke().subtract(30,"day").toDate(),endDate:n}),d=yr(async()=>(await e.getTrafficInsights({input:{did:t,startDate:Ke(h.startDate).format("YYYY-MM-DD"),endDate:Ke(h.endDate).format("YYYY-MM-DD")}})).list);w.useEffect(()=>{d.loading||h.startDate&&h.endDate&&d.retry()},[h]);const p=R=>{c(i?null:R.currentTarget)},b=d.value||[],{loading:m,error:M}=d;if(!b.length&&m)return g.jsx(ir,{});if(M)return g.jsx(Ar,{severity:"error",children:Lr(M)});const k={totalRequests:Oe,validRequests:Oe,failedRequests:Oe,uniqueVisitors:Oe,uniqueFiles:Oe,uniqueReferrers:Oe,uniqueNotFound:Oe,uniqueStaticFiles:Oe,logSize:Le,bandwidth:Le},P=Object.keys(k).map(R=>({id:`${R}_chart`,title:o(`analytics.traffic.${R}`),current:b.length?k[R](b[0][R]):0,data:b.map(C=>({date:C.date,value:C[R]})).reverse(),dateFn:Oe,valueFn:k[R]})),O=!!i,A=O?"date-range-picker-popover":void 0,I=a?lr.WELLKNOWN_SERVICE_PATH_PREFIX:r.routing.adminPath,T=cr(window.location.origin,I,`/api/analytics/traffic?date=${Ke(y).format("YYYY-MM-DD")}&did=${t}`),L=R=>{S(R),c(null)},V=R=>{D(R.toDate()),u(!1)},E=()=>{window.open(T)};return g.jsxs("div",{children:[g.jsxs(ge,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:[o("analytics.trend"),g.jsxs(it,{onClick:p,variant:"outlined",size:"small",color:"secondary",children:[Dn(h.startDate,s)," - ",Dn(h.endDate,s)]})]}),g.jsx(ur,{id:A,open:O,anchorEl:i,onClose:()=>c(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsx(gs,{open:!0,toggle:p,maxDate:n,definedRanges:nc(y),onChange:L})}),g.jsx(he,{container:!0,spacing:4,children:P.map(R=>g.jsx(he,{item:!0,lg:3,md:6,sm:6,xs:12,children:g.jsx(yt,{...R})},R.id))}),g.jsxs(ge,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mt:4,mb:1,children:[o("analytics.detail"),g.jsxs("span",{children:[l&&g.jsx(Ye,{onClick:E,style:{marginRight:32},children:g.jsx(Dr,{})}),g.jsx(tn,{dateAdapter:Ql,children:g.jsx(_l,{disableFuture:!0,format:"ll",value:Ke(y),onChange:V,slotProps:{textField:{size:"small"}}})})]})]}),g.jsx(br,{url:T,width:"100%",height:"100%",frameBorder:0,onLoad:()=>u(!0),styles:{border:0,minHeight:"400vh"}})]})}const rc=e=>`${e}%`;function un({cpus:e,currentLoad:t,history:n}){const{t:r,locale:a}=w.useContext(zn);return g.jsx(yt,{id:"cpu-sparkline",title:r("common.cpu"),current:`${Math.floor(t||0)}%`,data:n,description:`${r("system.cores")}: ${(e==null?void 0:e.length)||0}`,dateFn:o=>Un(o,"HH:mm:ss",a),valueFn:rc})}un.propTypes={cpus:f.array,currentLoad:f.number,history:f.array};un.defaultProps={cpus:[],currentLoad:0,history:[]};function dn({instanceCount:e,title:t,total:n,used:r,history:a}){const{t:o,locale:s}=Zt(),i=!!n,c=n-r,l=i?`(${Math.floor(r/n*100)}%)`:"",u=[];return e&&u.push({title:o("system.instances"),metric:e}),u.push({title:o("system.used"),metric:Le(r)}),i&&u.push({title:o("system.free"),metric:Le(c)},{title:o("system.total"),metric:Le(n)}),g.jsx(yt,{id:"mem-sparkline",title:t||o("common.memory"),current:`${Le(Math.floor(r||0))} ${l}`,data:a,description:u.map((y,D)=>g.jsxs(Re,{sx:{marginLeft:D===0?0:2},children:[y.title,": ",y.metric]},y.title)),dateFn:y=>Un(y,"HH:mm:ss",s),valueFn:Le})}dn.propTypes={title:f.string,instanceCount:f.number,total:f.number,used:f.number,history:f.array};dn.defaultProps={title:"",instanceCount:null,total:null,used:null,history:[]};function fn({blocklet:e,cpuHistory:t,memoryHistory:n,...r}){const a=e.appRuntimeInfo||{};return g.jsx(sc,{component:"div",...r,children:g.jsxs(he,{className:"page-metrics",container:!0,spacing:5,children:[g.jsx(he,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!t.length&&g.jsx(un,{currentLoad:a.cpuUsage||0,history:t,style:{height:150}})},"cpu"),g.jsx(he,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&g.jsx(dn,{used:a.memoryUsage||0,history:n,style:{height:150}})},"memory")]})})}fn.propTypes={blocklet:f.object.isRequired,cpuHistory:f.arrayOf(f.shape({date:f.number,value:f.number})),memoryHistory:f.arrayOf(f.shape({date:f.number,value:f.number}))};fn.defaultProps={cpuHistory:[],memoryHistory:[]};const sc=Ct(ge)``;function Lo(){const{t:e,locale:t}=Zt(),{blocklet:n,runtimeHistory:r,actions:{refreshBlocklet:a}}=dr(),o=w.useMemo(()=>{const c=[];return fr(n,(l,{ancestors:u,id:y,level:D})=>{l.runtimeInfo&&c.push({type:"blocklet",groupId:n.meta.did,groupName:xn(n),id:y,name:xn(l,!0),blocklet:n,component:l,level:D-1>=0?D-1:0,runtimeInfo:l.runtimeInfo,ancestors:u})}),c},[n]);w.useEffect(()=>{const c=setInterval(()=>{a()},1e4);return()=>{clearInterval(c)}},[]);const s=c=>$r(Number(c||0),{locale:hr(t)}),i=[{label:e("common.name"),name:"name",options:{customBodyRenderLite(c){const{name:l,component:u,level:y,ancestors:D}=o[c];return g.jsxs(Re,{display:"flex",alignItems:"center",pl:y*2,children:[g.jsx(Rr,{size:14,blocklet:u,ancestors:D}),g.jsx(Re,{ml:1,children:l})]})}}},{label:e("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return s(l.uptime)}}},{label:e("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return Le((l==null?void 0:l.memoryUsage)||0)}}},{label:e("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(c){const{runtimeInfo:l}=o[c];return`${(l.cpuUsage||0).toFixed(1)}%`}}},{label:e("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:e("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return g.jsxs(ac,{component:"div",children:[g.jsx(ge,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:e("analytics.trend")}),n.status==="running"?[g.jsx(Re,{children:g.jsx(fn,{blocklet:n,cpuHistory:r.cpu,memoryHistory:r.memory})}),g.jsx(Re,{mt:3,children:g.jsx(_r,{title:e("analytics.detail"),className:"monitor-table",locale:t,data:o,columns:i,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:g.jsx(ge,{children:e("blocklet.runtimeInfo.noRunning")})]})}Lo.propTypes={};const ac=Ct(ge)``;function iu(){const{t:e}=w.useContext(zn),{did:t,client:n}=mr(),[r,a]=pr(),[o,s]=w.useState(r.get("tab")||"traffic"),i=y=>{s(y)};w.useEffect(()=>{r.set("tab",o),a(r,{replace:!0})},[o]);const c=[{label:e("common.traffic"),value:"traffic"},{label:e("common.runtime"),value:"runtime"}],l={traffic:oc,runtime:Lo},u=l[o]||l.traffic;return g.jsxs(ic,{children:[g.jsx(gr,{tabs:c,current:o,onChange:i}),g.jsx("div",{className:"page-content",children:w.isValidElement(u)?u:g.jsx(u,{client:n,did:t})})]},o)}const ic=Ct.main`
|
|
43
43
|
.page-header {
|
|
44
44
|
display: flex;
|
|
45
45
|
justify-content: space-between;
|
|
@@ -49,4 +49,4 @@ import{P as f,gl as Wo,aS as Mt,aR as zo,e6 as Uo,K as Ko,M as qo,j as g,bU as q
|
|
|
49
49
|
.page-content {
|
|
50
50
|
margin-top: 16px;
|
|
51
51
|
}
|
|
52
|
-
`;export{
|
|
52
|
+
`;export{iu as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c0 as a}from"./index-y2KSkfLz.js";a.defaults.timeout=10*1e3;const o=a.create();export{o as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aS as Bt,bU as It,fC as Zg,P as V,aD as Qg,r as Nt,aE as _r,j as K,a9 as Xd,n as Jg,u as ef,S as tf,B as Lr,b1 as nf,bB as rf,G as af,A as L1,T as Yt,L as x1,w as sf}from"./index-
|
|
1
|
+
import{aS as Bt,bU as It,fC as Zg,P as V,aD as Qg,r as Nt,aE as _r,j as K,a9 as Xd,n as Jg,u as ef,S as tf,B as Lr,b1 as nf,bB as rf,G as af,A as L1,T as Yt,L as x1,w as sf}from"./index-y2KSkfLz.js";import{d as Zd,f as zn,a as Ei,b as bi,c as v1,S as of,s as Ct,h as un,p as F1,e as ti,n as M1,w as Hn}from"./index-FcshmQCl.js";import{T as lf}from"./MoreVert-luFLeyGM.js";import{_ as uf}from"./useLocalStorage-emyZgE08.js";import{R as cf}from"./dashboard-h7LrZcKz.js";import{F as df}from"./FormControl-TQWGu6Eu.js";import{I as pf}from"./InputLabel-IgDOTTEJ.js";import{S as gf}from"./Select-_dtLnCt2.js";import{P as ff}from"./Pagination-WqQKGPtj.js";import"./index-VXs8EUQf.js";import"./permission-Hsi09aPo.js";import"./useAsync-91bd-3QR.js";import"./session-H9u-VoT_.js";import"./confirm-IQ3toSkI.js";import"./index-QahpWU7h.js";import"./Alert-MGbJy_rM.js";import"./format-error-kIg-iPFu.js";import"./useSetState-Psz4YPxB.js";import"./PlayArrow-SAhKPV20.js";import"./ButtonGroup-AG1tRxzS.js";import"./RadioGroup-RRlhJzK5.js";import"./FormControlLabel-QjR5dMPU.js";import"./useFormControl-frW5uFmF.js";import"./FormGroup-ibKyzFt2.js";import"./Avatar-82N_IzTT.js";import"./spaces-q-QDvYWh.js";import"./index-Rx1zNX-F.js";import"./api-oZzGUegl.js";import"./fallback-JYdZZFFV.js";import"./wallet-hidden-topbar-HQXafv5M.js";import"./ListItem-A9CD_j9i.js";import"./selector-xJAQJIb9.js";import"./index-WqnGi5T9.js";import"./nav-menu-tHqNXHWZ.js";import"./MoreHoriz-H3078beE.js";import"./ExpandMore-D_RSmPkU.js";import"./Toolbar-9-_-wvc9.js";import"./Hidden-QJb-QlKr.js";import"./Checkbox-kTbf3Sl5.js";import"./LastPage-ZVfgNDRp.js";const B1=["http","https","mailto","tel"];function mf(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let a=-1;for(;++a<B1.length;){const i=B1[a];if(r===i.length&&t.slice(0,i.length).toLowerCase()===i)return t}return a=t.indexOf("?"),a!==-1&&r>a||(a=t.indexOf("#"),a!==-1&&r>a)?t:"javascript:void(0)"}/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -46,7 +46,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
46
46
|
`,position:{start:{line:r.position.start.line+l},end:{line:r.position.start.line+l}}})}return n}return Object.prototype.hasOwnProperty.call(r,"children")?(r.children=e(r.children),n.push(r),n):(n.push(r),n)},[])},zS=function(e){return function(t){return t===void 0&&(t={}),function(r){We(r,"element",n)};function n(r,a,i){if(i&&i.tagName==="pre"&&r.tagName==="code"){var s=r.data&&r.data.meta?r.data.meta:"";r.properties.className?typeof r.properties.className=="boolean"?r.properties.className=[]:Array.isArray(r.properties.className)||(r.properties.className=[r.properties.className]):r.properties.className=[],r.properties.className.push("code-highlight");var o,l=function(C){for(var N,k=mi(C.properties.className);!(N=k()).done;){var w=N.value;if(w.slice(0,9)==="language-")return w.slice(9).toLowerCase()}return null}(r);if(l)try{o=e.highlight(an(r),l),i.properties.className=(i.properties.className||[]).concat("language-"+l)}catch(C){if(!t.ignoreMissing||!/Unknown language/.test(C.message))throw C;o=r}else o=r;var u,d=(u=1,function C(N){return N.reduce(function(k,w){if(w.type==="text"){var I=(w.value.match(/\n/g)||"").length;return w.position={start:{line:u,column:0},end:{line:u+I,column:0}},u+=I,k.push(w),k}if(Object.prototype.hasOwnProperty.call(w,"children")){var O=u;return w.children=C(w.children),k.push(w),w.position={start:{line:O,column:0},end:{line:u,column:0}},k}return k.push(w),k},[])})(o.children);o.children=$S(d),o.children.length>0&&(o.position={start:{line:o.children[0].position.start.line,column:0},end:{line:o.children[o.children.length-1].position.end.line,column:0}});for(var p,h,m=function(C){var N=/{([\d,-]+)}/,k=C.split(",").map(function(O){return O.trim()}).join();if(N.test(k)){var w=N.exec(k)[1],I=_S(w);return function(O){return I.includes(O+1)}}return function(){return!1}}(s),f=function(C){var N=fi(/showLineNumbers=([0-9]+)/i,{lines:1});if(N.test(C)){var k=N.exec(C);return Number(k.groups.lines)}return 1}(s),E=((p=an(r).split(/\n/))[p.length-1].trim()===""&&p.pop(),p.map(function(C){return{type:"element",tagName:"span",properties:{className:["code-line"]},children:[{type:"text",value:C}]}})),T=function(){var C=h.value,N=C[0],k=C[1];(s.toLowerCase().includes("showLineNumbers".toLowerCase())||t.showLineNumbers)&&(k.properties.line=[(N+f).toString()],k.properties.className.push("line-number")),m(N)&&k.properties.className.push("highlight-line"),l==="diff"&&an(k).substring(0,1)==="-"?k.properties.className.push("deleted"):l==="diff"&&an(k).substring(0,1)==="+"&&k.properties.className.push("inserted");var w=AS(o,function(I){return I.position.start.line<=N+1&&I.position.end.line>=N+1});k.children=w.children},A=mi(E.entries());!(h=A()).done;)T();r.children=E}}}},jS=zS(g);const Dg="֑-߿יִ-﷽ﹰ-ﻼ",wg="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",VS=new RegExp("^[^"+wg+"]*["+Dg+"]"),WS=new RegExp("^[^"+Dg+"]*["+wg+"]");function KS(e){const t=String(e||"");return VS.test(t)?"rtl":WS.test(t)?"ltr":"neutral"}function YS(e,t){const n=e.schema,r=e.language,a=e.direction,i=e.editableOrEditingHost;let s;if(t.type==="element"&&t.properties){const u=t.properties.xmlLang||t.properties.lang,d=t.properties.type||"text",p=jd(t);u!=null&&(e.language=String(u)),n&&n.space==="html"?(t.properties.contentEditable==="true"&&(e.editableOrEditingHost=!0),t.tagName==="svg"&&(e.schema=Ct),p==="rtl"?s=p:p==="ltr"||p!=="auto"&&t.tagName==="html"||p!=="auto"&&t.tagName==="input"&&d==="tel"?s="ltr":(p==="auto"||t.tagName==="bdi")&&(t.tagName==="textarea"?s=Ja(an(t)):t.tagName==="input"&&(d==="email"||d==="search"||d==="tel"||d==="text")?s=t.properties.value?Ja(t.properties.value):"ltr":We(t,l)),s&&(e.direction=s)):e.editableOrEditingHost&&(e.editableOrEditingHost=!1)}return o;function o(){e.schema=n,e.language=r,e.direction=a,e.editableOrEditingHost=i}function l(u){if(u.type==="text")return s=Ja(u.value),s?oi:void 0;if(u!==t&&u.type==="element"&&(u.tagName==="bdi"||u.tagName==="script"||u.tagName==="style"||u.tagName==="textare"||jd(u)))return xn}}function Ja(e){const t=KS(e);return t==="neutral"?void 0:t}function jd(e){const t=e.type==="element"&&e.properties&&typeof e.properties.dir=="string"?e.properties.dir.toLowerCase():void 0;return t==="auto"||t==="ltr"||t==="rtl"?t:void 0}const qS=ea("operator",{unknown:a_,invalid:ZS,handlers:{"=":QS,"~=":JS,"|=":e_,"^=":t_,"$=":n_,"*=":r_}});function XS(e,t,n){const r=e.attrs;let a=-1;for(;++a<r.length;)if(!qS(r[a],t,zn(n,r[a].name)))return!1;return!0}function ZS(e,t,n){return Ie(t,n.property)}function QS(e,t,n){return!!(Ie(t,n.property)&&t.properties&&bn(t.properties[n.property],n)===e.value)}function JS(e,t,n){const r=t.properties&&t.properties[n.property];return!n.commaSeparated&&r&&typeof r=="object"&&e.value&&r.includes(e.value)||Ie(t,n.property)&&bn(r,n)===e.value}function e_(e,t,n){const r=bn(t.properties&&t.properties[n.property],n);return!!(Ie(t,n.property)&&e.value&&(r===e.value||r.slice(0,e.value.length)===e.value&&r.charAt(e.value.length)==="-"))}function t_(e,t,n){return!!(Ie(t,n.property)&&t.properties&&e.value&&bn(t.properties[n.property],n).slice(0,e.value.length)===e.value)}function n_(e,t,n){return!!(Ie(t,n.property)&&t.properties&&e.value&&bn(t.properties[n.property],n).slice(-e.value.length)===e.value)}function r_(e,t,n){return!!(Ie(t,n.property)&&t.properties&&e.value&&bn(t.properties[n.property],n).includes(e.value))}function a_(e){throw new Error("Unknown operator `"+e.operator+"`")}function bn(e,t){return typeof e=="boolean"?t.attribute:Array.isArray(e)?(t.commaSeparated?Ei:bi)(e):String(e)}function i_(e,t){const n=t.properties.className||[];let r=-1;if(e.classNames){for(;++r<e.classNames.length;)if(!n.includes(e.classNames[r]))return!1}return!0}function s_(e,t){return!!(t.properties&&t.properties.id===e.id)}function o_(e,t){return e.tagName==="*"||e.tagName===t.tagName}function l_(e,t){return function(n,r){let a=Vd(n,"tag");const i=Vd(r??"*","range"),s=[];let o=-1;for(;++o<i.length;){const l=i[o].toLowerCase();if(!t&&l==="*")continue;let u=-1;const d=[];for(;++u<a.length;)if(e(a[u].toLowerCase(),l)){if(!t)return a[u];s.push(a[u])}else d.push(a[u]);a=d}return t?s:void 0}}const u_=l_(function(e,t){const n=e.split("-"),r=t.split("-");let a=0,i=0;if(r[i]!=="*"&&n[a]!==r[i])return!1;for(a++,i++;i<r.length;){if(r[i]==="*"){i++;continue}if(!n[a])return!1;if(n[a]===r[i]){a++,i++;continue}if(n[a].length===1)return!1;a++}return!0},!0);function Vd(e,t){const n=e&&typeof e=="string"?[e]:e;if(!n||typeof n!="object"||!("length"in n))throw new Error("Invalid "+t+" `"+n+"`, expected non-empty string");return n}const c_=new Set([9,10,12,13,32]),Wd=48,d_=57;function p_(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,n=0,r=i(),a=s();if(t<e.length&&e.charAt(t)==="n"&&(t++,n=r*(a??1),o(),t<e.length?(r=i(),o(),a=s()):r=a=0),a===null||t<e.length)throw new Error(`n-th rule couldn't be parsed ('${e}')`);return[n,r*a];function i(){return e.charAt(t)==="-"?(t++,-1):(e.charAt(t)==="+"&&t++,1)}function s(){const l=t;let u=0;for(;t<e.length&&e.charCodeAt(t)>=Wd&&e.charCodeAt(t)<=d_;)u=u*10+(e.charCodeAt(t)-Wd),t++;return t===l?null:u}function o(){for(;t<e.length&&c_.has(e.charCodeAt(t));)t++}}var g_={trueFunc:function(){return!0},falseFunc:function(){return!1}};const Kd=Bt(g_);function f_(e){const t=e[0],n=e[1]-1;if(n<0&&t<=0)return Kd.falseFunc;if(t===-1)return i=>i<=n;if(t===0)return i=>i===n;if(t===1)return n<0?Kd.trueFunc:i=>i>=n;const r=Math.abs(t),a=(n%r+r)%r;return t>1?i=>i>=n&&i%r===a:i=>i<=n&&i%r===a}function Yd(e){return f_(p_(e))}const m_=Yd.default||Yd,h_=ea("name",{unknown:H_,invalid:G_,handlers:{any:hi,"any-link":E_,blank:b_,checked:T_,dir:A_,disabled:xg,empty:S_,enabled:__,"first-child":y_,"first-of-type":N_,has:I_,lang:C_,"last-child":R_,"last-of-type":O_,matches:hi,not:k_,"nth-child":D_,"nth-last-child":w_,"nth-of-type":x_,"nth-last-of-type":L_,"only-child":v_,"only-of-type":F_,optional:M_,"read-only":B_,"read-write":vg,required:Fg,root:P_,scope:U_}});Lg.needsIndex=["any","first-child","first-of-type","last-child","last-of-type","matches","not","nth-child","nth-last-child","nth-of-type","nth-last-of-type","only-child","only-of-type"];function Lg(e,t,n,r,a){const i=e.pseudos;let s=-1;for(;++s<i.length;)if(!h_(i[s],t,n,r,a))return!1;return!0}function E_(e,t){return(t.tagName==="a"||t.tagName==="area"||t.tagName==="link")&&Ie(t,"href")}function b_(e,t){return!Mg(t,n);function n(r){return r.type==="element"||r.type==="text"&&!Zd(r)}}function T_(e,t){return t.tagName==="input"||t.tagName==="menuitem"?!!(t.properties&&(t.properties.type==="checkbox"||t.properties.type==="radio")&&Ie(t,"checked")):t.tagName==="option"?Ie(t,"selected"):!1}function A_(e,t,n,r,a){return a.direction===e.value}function xg(e,t){return(t.tagName==="button"||t.tagName==="input"||t.tagName==="select"||t.tagName==="textarea"||t.tagName==="optgroup"||t.tagName==="option"||t.tagName==="menuitem"||t.tagName==="fieldset")&&Ie(t,"disabled")}function S_(e,t){return!Mg(t,n);function n(r){return r.type==="element"||r.type==="text"}}function __(e,t){return!xg(e,t)}function y_(e,t,n,r,a){return tt(a,e),a.elementIndex===0}function N_(e,t,n,r,a){return tt(a,e),a.typeIndex===0}function I_(e,t,n,r,a){const i={...a,found:!1,shallow:!1,one:!0,scopeElements:[t],results:[],rootQuery:S1(e.value)};return _1(i,{type:"root",children:t.children}),i.results.length>0}function C_(e,t,n,r,a){return a.language!==""&&a.language!==void 0&&u_(a.language,ti(e.value)).length>0}function R_(e,t,n,r,a){return tt(a,e),!!(a.elementCount&&a.elementIndex===a.elementCount-1)}function O_(e,t,n,r,a){return tt(a,e),typeof a.typeIndex=="number"&&typeof a.typeCount=="number"&&a.typeIndex===a.typeCount-1}function hi(e,t,n,r,a){const i={...a,found:!1,shallow:!1,one:!0,scopeElements:[t],results:[],rootQuery:S1(e.value)};return _1(i,t),i.results[0]===t}function k_(e,t,n,r,a){return!hi(e,t,n,r,a)}function D_(e,t,n,r,a){const i=Aa(e);return tt(a,e),typeof a.elementIndex=="number"&&i(a.elementIndex)}function w_(e,t,n,r,a){const i=Aa(e);return tt(a,e),!!(typeof a.elementCount=="number"&&typeof a.elementIndex=="number"&&i(a.elementCount-a.elementIndex-1))}function L_(e,t,n,r,a){const i=Aa(e);return tt(a,e),typeof a.typeCount=="number"&&typeof a.typeIndex=="number"&&i(a.typeCount-1-a.typeIndex)}function x_(e,t,n,r,a){const i=Aa(e);return tt(a,e),typeof a.typeIndex=="number"&&i(a.typeIndex)}function v_(e,t,n,r,a){return tt(a,e),a.elementCount===1}function F_(e,t,n,r,a){return tt(a,e),a.typeCount===1}function M_(e,t){return!Fg(e,t)}function B_(e,t,n,r,a){return!vg(e,t,n,r,a)}function vg(e,t,n,r,a){return t.tagName==="input"||t.tagName==="textarea"?!Ie(t,"readOnly")&&!Ie(t,"disabled"):!!a.editableOrEditingHost}function Fg(e,t){return(t.tagName==="input"||t.tagName==="textarea"||t.tagName==="select")&&Ie(t,"required")}function P_(e,t,n,r,a){return!!((!r||r.type==="root")&&a.schema&&(a.schema.space==="html"||a.schema.space==="svg")&&(t.tagName==="html"||t.tagName==="svg"))}function U_(e,t,n,r,a){return a.scopeElements.includes(t)}function G_(){throw new Error("Invalid pseudo-selector")}function H_(e){throw e.name?new Error("Unknown pseudo-selector `"+e.name+"`"):new Error("Unexpected pseudo-element or empty pseudo-class")}function Mg(e,t){const n=e.children;let r=-1;for(;++r<n.length;)if(t(n[r]))return!0;return!1}function tt(e,t){if(e.shallow)throw new Error("Cannot use `:"+t.name+"` without parent")}function Aa(e){let t=e._cachedFn;return t||(t=m_(e.value),e._cachedFn=t),t}function $_(e,t,n,r,a){return!!((!e.tagName||o_(e,t))&&(!e.classNames||i_(e,t))&&(!e.id||s_(e,t))&&(!e.attrs||XS(e,t,a.schema))&&(!e.pseudos||Lg(e,t,n,r,a)))}const z_=[];function S1(e){return e===null?{type:"selectors",selectors:[]}:e.type==="ruleSet"?{type:"selectors",selectors:[e]}:e}function _1(e,t){t&&Bg(e,[],t,void 0,void 0)}function Bg(e,t,n,r,a){let i={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0};const s=YS(e,n);return n.type==="element"&&(i=V_(e,Dr(t,e.rootQuery.selectors),n,r,a)),"children"in n&&!e.shallow&&!(e.one&&e.found)&&j_(e,i,n),s(),i}function j_(e,t,n){const r=Dr(t.descendant,t.directChild);let a,i=-1;const s={count:0,types:new Map},o={count:0,types:new Map};for(;++i<n.children.length;)qd(s,n.children[i]);for(i=-1;++i<n.children.length;){const l=n.children[i],u=l.type==="element"?l.tagName.toUpperCase():void 0;if(e.elementIndex=o.count,e.typeIndex=u&&o.types.get(u)||0,e.elementCount=s.count,e.typeCount=u?s.types.get(u):0,"children"in l){const d=Dr(r,a),p=Bg(e,d,n.children[i],i,n);a=Dr(p.generalSibling,p.adjacentSibling)}if(e.one&&e.found)break;qd(o,n.children[i])}}function V_(e,t,n,r,a){const i={directChild:void 0,descendant:void 0,adjacentSibling:void 0,generalSibling:void 0};let s=-1;for(;++s<t.length;){const o=t[s];if(e.one&&e.found)break;if(e.shallow&&o.rule.rule)throw new Error("Expected selector without nesting");if($_(o.rule,n,r,a,e)){const l=o.rule.rule;if(l){const u={type:"ruleSet",rule:l},d=l.nestingOperator==="+"?"adjacentSibling":l.nestingOperator==="~"?"generalSibling":l.nestingOperator===">"?"directChild":"descendant";ei(i,d,u)}else e.found=!0,e.results.includes(n)||e.results.push(n)}o.rule.nestingOperator===null?ei(i,"descendant",o):o.rule.nestingOperator==="~"&&ei(i,"generalSibling",o)}return i}function Dr(e,t){return e&&t&&e.length>0&&t.length>0?[...e,...t]:e&&e.length>0?e:t&&t.length>0?t:z_}function ei(e,t,n){const r=e[t];r?r.push(n):e[t]=[n]}function qd(e,t){if(t.type==="element"){const n=t.tagName.toUpperCase(),r=(e.types.get(n)||0)+1;e.count++,e.types.set(n,r)}}var Pg={},y1={},N1={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(s){return s>="a"&&s<="z"||s>="A"&&s<="Z"||s==="-"||s==="_"}e.isIdentStart=t;function n(s){return s>="a"&&s<="z"||s>="A"&&s<="Z"||s>="0"&&s<="9"||s==="-"||s==="_"}e.isIdent=n;function r(s){return s>="a"&&s<="f"||s>="A"&&s<="F"||s>="0"&&s<="9"}e.isHex=r;function a(s){for(var o=s.length,l="",u=0;u<o;){var d=s.charAt(u);if(e.identSpecialChars[d])l+="\\"+d;else if(d==="_"||d==="-"||d>="A"&&d<="Z"||d>="a"&&d<="z"||u!==0&&d>="0"&&d<="9")l+=d;else{var p=d.charCodeAt(0);if((p&63488)===55296){var h=s.charCodeAt(u++);if((p&64512)!==55296||(h&64512)!==56320)throw Error("UCS-2(decode): illegal sequence");p=((p&1023)<<10)+(h&1023)+65536}l+="\\"+p.toString(16)+" "}u++}return l}e.escapeIdentifier=a;function i(s){for(var o=s.length,l="",u=0,d;u<o;){var p=s.charAt(u);p==='"'?p='\\"':p==="\\"?p="\\\\":(d=e.strReplacementsRev[p])!==void 0&&(p=d),l+=p,u++}return'"'+l+'"'}e.escapeStr=i,e.identSpecialChars={"!":!0,'"':!0,"#":!0,$:!0,"%":!0,"&":!0,"'":!0,"(":!0,")":!0,"*":!0,"+":!0,",":!0,".":!0,"/":!0,";":!0,"<":!0,"=":!0,">":!0,"?":!0,"@":!0,"[":!0,"\\":!0,"]":!0,"^":!0,"`":!0,"{":!0,"|":!0,"}":!0,"~":!0},e.strReplacementsRev={"\n":"\\n","\r":"\\r"," ":"\\t","\f":"\\f","\v":"\\v"},e.singleQuoteEscapeChars={n:`
|
|
47
47
|
`,r:"\r",t:" ",f:"\f","\\":"\\","'":"'"},e.doubleQuotesEscapeChars={n:`
|
|
48
48
|
`,r:"\r",t:" ",f:"\f","\\":"\\",'"':'"'}})(N1);Object.defineProperty(y1,"__esModule",{value:!0});var $e=N1;function W_(e,t,n,r,a,i){var s=e.length,o="";function l(E,T){var A="";for(t++,o=e.charAt(t);t<s;){if(o===E)return t++,A;if(o==="\\"){t++,o=e.charAt(t);var C=void 0;if(o===E)A+=E;else if((C=T[o])!==void 0)A+=C;else if($e.isHex(o)){var N=o;for(t++,o=e.charAt(t);$e.isHex(o);)N+=o,t++,o=e.charAt(t);o===" "&&(t++,o=e.charAt(t)),A+=String.fromCharCode(parseInt(N,16));continue}else A+=o}else A+=o;t++,o=e.charAt(t)}return A}function u(){var E="";for(o=e.charAt(t);t<s;){if($e.isIdent(o))E+=o;else if(o==="\\"){if(t++,t>=s)throw Error("Expected symbol but end of file reached.");if(o=e.charAt(t),$e.identSpecialChars[o])E+=o;else if($e.isHex(o)){var T=o;for(t++,o=e.charAt(t);$e.isHex(o);)T+=o,t++,o=e.charAt(t);o===" "&&(t++,o=e.charAt(t)),E+=String.fromCharCode(parseInt(T,16));continue}else E+=o}else return E;t++,o=e.charAt(t)}return E}function d(){o=e.charAt(t);for(var E=!1;o===" "||o===" "||o===`
|
|
49
|
-
`||o==="\r"||o==="\f";)E=!0,t++,o=e.charAt(t);return E}function p(){var E=h();if(t<s)throw Error('Rule expected but "'+e.charAt(t)+'" found.');return E}function h(){var E=m();if(!E)return null;var T=E;for(o=e.charAt(t);o===",";){if(t++,d(),T.type!=="selectors"&&(T={type:"selectors",selectors:[E]}),E=m(),!E)throw Error('Rule expected after ",".');T.selectors.push(E)}return T}function m(){d();var E={type:"ruleSet"},T=f();if(!T)return null;for(var A=E;T&&(T.type="rule",A.rule=T,A=T,d(),o=e.charAt(t),!(t>=s||o===","||o===")"));)if(a[o]){var C=o;if(t++,d(),T=f(),!T)throw Error('Rule expected after "'+C+'".');T.nestingOperator=C}else T=f(),T&&(T.nestingOperator=null);return E}function f(){for(var E=null;t<s;)if(o=e.charAt(t),o==="*")t++,(E=E||{}).tagName="*";else if($e.isIdentStart(o)||o==="\\")(E=E||{}).tagName=u();else if(o===".")t++,E=E||{},(E.classNames=E.classNames||[]).push(u());else if(o==="#")t++,(E=E||{}).id=u();else if(o==="["){t++,d();var T={name:u()};if(d(),o==="]")t++;else{var A="";if(r[o]&&(A=o,t++,o=e.charAt(t)),t>=s)throw Error('Expected "=" but end of file reached.');if(o!=="=")throw Error('Expected "=" but "'+o+'" found.');T.operator=A+"=",t++,d();var C="";if(T.valueType="string",o==='"')C=l('"',$e.doubleQuotesEscapeChars);else if(o==="'")C=l("'",$e.singleQuoteEscapeChars);else if(i&&o==="$")t++,C=u(),T.valueType="substitute";else{for(;t<s&&o!=="]";)C+=o,t++,o=e.charAt(t);C=C.trim()}if(d(),t>=s)throw Error('Expected "]" but end of file reached.');if(o!=="]")throw Error('Expected "]" but "'+o+'" found.');t++,T.value=C}E=E||{},(E.attrs=E.attrs||[]).push(T)}else if(o===":"){t++;var N=u(),k={name:N};if(o==="("){t++;var w="";if(d(),n[N]==="selector")k.valueType="selector",w=h();else{if(k.valueType=n[N]||"string",o==='"')w=l('"',$e.doubleQuotesEscapeChars);else if(o==="'")w=l("'",$e.singleQuoteEscapeChars);else if(i&&o==="$")t++,w=u(),k.valueType="substitute";else{for(;t<s&&o!==")";)w+=o,t++,o=e.charAt(t);w=w.trim()}d()}if(t>=s)throw Error('Expected ")" but end of file reached.');if(o!==")")throw Error('Expected ")" but "'+o+'" found.');t++,k.value=w}E=E||{},(E.pseudos=E.pseudos||[]).push(k)}else break;return E}return p()}y1.parseCssSelector=W_;var I1={};Object.defineProperty(I1,"__esModule",{value:!0});var we=N1;function wr(e){var t="";switch(e.type){case"ruleSet":for(var n=e.rule,r=[];n;)n.nestingOperator&&r.push(n.nestingOperator),r.push(wr(n)),n=n.rule;t=r.join(" ");break;case"selectors":t=e.selectors.map(wr).join(", ");break;case"rule":e.tagName&&(e.tagName==="*"?t="*":t=we.escapeIdentifier(e.tagName)),e.id&&(t+="#"+we.escapeIdentifier(e.id)),e.classNames&&(t+=e.classNames.map(function(a){return"."+we.escapeIdentifier(a)}).join("")),e.attrs&&(t+=e.attrs.map(function(a){return"operator"in a?a.valueType==="substitute"?"["+we.escapeIdentifier(a.name)+a.operator+"$"+a.value+"]":"["+we.escapeIdentifier(a.name)+a.operator+we.escapeStr(a.value)+"]":"["+we.escapeIdentifier(a.name)+"]"}).join("")),e.pseudos&&(t+=e.pseudos.map(function(a){return a.valueType?a.valueType==="selector"?":"+we.escapeIdentifier(a.name)+"("+wr(a.value)+")":a.valueType==="substitute"?":"+we.escapeIdentifier(a.name)+"($"+a.value+")":a.valueType==="numeric"?":"+we.escapeIdentifier(a.name)+"("+a.value+")":":"+we.escapeIdentifier(a.name)+"("+we.escapeIdentifier(a.value)+")":":"+we.escapeIdentifier(a.name)}).join(""));break;default:throw Error('Unknown entity type: "'+e.type+'".')}return t}I1.renderEntity=wr;Object.defineProperty(Pg,"__esModule",{value:!0});var K_=y1,Y_=I1,q_=function(){function e(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}return e.prototype.registerSelectorPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];this.pseudos[i]="selector"}return this},e.prototype.unregisterSelectorPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];delete this.pseudos[i]}return this},e.prototype.registerNumericPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];this.pseudos[i]="numeric"}return this},e.prototype.unregisterNumericPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];delete this.pseudos[i]}return this},e.prototype.registerNestingOperators=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];this.ruleNestingOperators[i]=!0}return this},e.prototype.unregisterNestingOperators=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];delete this.ruleNestingOperators[i]}return this},e.prototype.registerAttrEqualityMods=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];this.attrEqualityMods[i]=!0}return this},e.prototype.unregisterAttrEqualityMods=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];delete this.attrEqualityMods[i]}return this},e.prototype.enableSubstitutes=function(){return this.substitutesEnabled=!0,this},e.prototype.disableSubstitutes=function(){return this.substitutesEnabled=!1,this},e.prototype.parse=function(t){return K_.parseCssSelector(t,0,this.pseudos,this.attrEqualityMods,this.ruleNestingOperators,this.substitutesEnabled)},e.prototype.render=function(t){return Y_.renderEntity(t).trim()},e}(),X_=Pg.CssSelectorParser=q_;const Sa=new X_;Sa.registerAttrEqualityMods("~","|","^","$","*");Sa.registerSelectorPseudos("any","matches","not","has");Sa.registerNestingOperators(">","+","~");function Z_(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return Sa.parse(e)}function Q_(e,t,n){const r=J_(e,t,n);return _1(r,t||void 0),r.results}function J_(e,t,n){return{rootQuery:S1(Z_(e)),results:[],scopeElements:t?t.type==="root"?t.children:[t]:[],one:!1,shallow:!1,found:!1,schema:n==="svg"?Ct:un,language:void 0,direction:"ltr",editableOrEditingHost:!1,typeIndex:void 0,elementIndex:void 0,typeCount:void 0,elementCount:void 0}}const Ug=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=Ug(n.children))}),t),e5=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const a=Q_(t,r);a&&a.length>0&&We(r,a,(i,s,o)=>{n(i,s,o)});return}We(r,(a,i,s)=>{n(a,i,s)})}}},t5=e5;var n5={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};function r5(e,t){const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;n.select();let a=!1;try{a=!!document.execCommand("copy")}catch{a=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(a)}function a5(e){return e===void 0&&(e=""),{type:"element",tagName:"div",properties:{onClick:t=>{var n=t.currentTarget||t.target;n.classList.add("active"),r5(n.dataset.code,function(){setTimeout(()=>{n.classList.remove("active")},2e3)})},"data-code":e,class:"copied"},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}}var i5=["prefixCls","className","source","style","onScroll","onMouseOver","pluginsFilter","warpperElement"],s5=(e,t,n)=>{if(e.type==="element"&&n&&n.type==="root"&&/h(1|2|3|4|5|6)/.test(e.tagName)){var r=e.children&&e.children[0];r&&r.properties&&r.properties.ariaHidden==="true"&&(r.properties=_r({class:"anchor"},r.properties),r.children=[n5])}if(e.type==="element"&&e.tagName==="pre"){var a=Ug(e.children);e.children.push(a5(a))}};const o5=It.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:a,style:i,onScroll:s,onMouseOver:o,pluginsFilter:l,warpperElement:u={}}=e,d=Qg(e,i5),p=It.createRef();Nt.useImperativeHandle(t,()=>_r({},e,{mdp:p}),[p,e]);var h=(n||"")+" "+(r||""),m=[[jS,{ignoreMissing:!0}],gS,D0,v0,[t5,{rewrite:s5}],[bS,{properties:"attr"}],...d.rehypePlugins||[]],f=[...d.remarkPlugins||[],S0];return K.jsx("div",_r({ref:p,onScroll:s,onMouseOver:o},u,{className:h,style:i,children:K.jsx(Ip,_r({},d,{rehypePlugins:l?l("rehype",m):m,remarkPlugins:l?l("remark",f):f,children:a||""}))}))}),Gg=Nt.createContext({}),{Provider:l5,Consumer:py}=Gg;function u5({children:e,scope:t="",categories:n=[],showScope:r,scopeFormatter:a}){const{api:i,info:s}=Xd(),[o,l]=Nt.useState([]),[u,d]=Nt.useState({total:0,pageSize:20,pageCount:0,page:1}),[p,h]=Nt.useState(!1),[m,f]=uf(`audit-log-category-${t}`,"all"),T=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(N=>n.length?N.value==="all"||n.includes(N.value):!0),A=async({page:N=1,silent:k=!0}={})=>{if(!p){k||h(!0);try{const w=await i.getAuditLogs({input:{paging:{page:N},category:m==="all"?"":m,scope:t}});r&&(w.list||[]).forEach(I=>{I.scope!==s.did&&(I.link=`/blocklets/${I.scope}/components`)}),l(w.list),d(w.paging),h(!1)}catch(w){Jg.error(w.message),h(!1)}}};Nt.useEffect(()=>{A({page:1,silent:!1})},[]),Nt.useEffect(()=>{A({page:1,silent:!1})},[m]);const C={loading:p,fetch:A,filter:{category:m,scope:t},categories:T,setCategory:f,data:o,paging:u,showScope:r,scopeFormatter:a};return K.jsx(l5,{value:{auditLogs:C},children:e})}function Hg(){const{auditLogs:e}=Nt.useContext(Gg);return e}const c5=({log:e,info:t,inService:n})=>n?`${sf.WELLKNOWN_BLOCKLET_ADMIN_PATH}/members?did=${e.actor.did}`:e.scope===t.did?`/team/members?did=${e.actor.did}`:`/blocklets/${e.scope}/members?did=${e.actor.did}`;function d5({log:e}){var s,o;const{inService:t,info:n}=Xd(),{showScope:r,scopeFormatter:a=l=>l}=Hg();if(!e.actor.did)return null;const i=!["blocklet",""].includes(e.actor.role);return K.jsxs(Lr,{className:"log-entry","data-cy":"log-entry",children:[K.jsx("div",{className:"log-author",children:i?K.jsx(L1,{did:e.actor.did,size:36,shape:"circle"}):K.jsx(L1,{did:e.actor.did,size:36})}),K.jsxs("div",{className:"log-body",children:[K.jsxs(Yt,{className:"log-header",color:"textSecondary",component:"p",gutterBottom:!0,display:"flex",alignItems:"center",children:[r&&K.jsx(x1,{to:e.link,children:K.jsx(lf,{style:{marginRight:8},children:a(e.scope)})}),i?K.jsxs(x1,{to:c5({log:e,inService:t,info:n}),target:"_blank",children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]}):K.jsxs("span",{children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]})," ",K.jsx("span",{style:{margin:"0 4px"},children:"-"})," ",e.action]}),K.jsx(Yt,{className:"log-content",maxWidth:"lg",color:"textPrimary",component:"div","data-color-mode":"light",gutterBottom:!0,children:K.jsx(o5,{source:e.content,linkTarget:"_blank"})}),K.jsxs(Lr,{className:"log-meta",variant:"body2",children:[!!e.ip&&K.jsx(Yt,{component:"span",color:"textSecondary",children:`IP: ${e.ip}`}),!!((s=e.env.os)!=null&&s.name)&&K.jsxs(Yt,{component:"span",color:"textSecondary",children:[e.env.os.name,"(",e.env.os.version,")"]}),!!((o=e.env.browser)!=null&&o.name)&&K.jsxs(Yt,{component:"span",color:"textSecondary",children:[e.env.browser.name,"(",e.env.browser.version,")"]}),K.jsx(Yt,{component:"span",color:"textSecondary",children:K.jsx(cf,{value:e.createdAt})})]})]})]})}function p5(){const{t:e}=ef(),{data:t,loading:n,paging:r,filter:a,categories:i,setCategory:s,fetch:o}=Hg();return n?K.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:K.jsx(tf,{})}):K.jsxs(g5,{"data-cy":"audit-logs",children:[K.jsx(Lr,{className:"log-controls",children:K.jsxs(df,{style:{width:"240px"},variant:"outlined",children:[K.jsx(pf,{children:e("common.filter")}),K.jsx(gf,{"data-cy":"filter-by-category-trigger",value:a.category,onChange:l=>s(l.target.value),fullWidth:!0,label:e("common.category"),disabled:n,children:i.map(l=>K.jsx(nf,{value:l.value,"data-cy":`filter-by-category-${l.value}`,children:K.jsx(Lr,{children:K.jsx("span",{children:l.label})})},l.label))})]})}),t.length===0&&K.jsx(rf,{children:e("common.empty")}),t.length>0&&t.map(l=>K.jsx(d5,{log:l},l.id)),r.pageCount>1&&K.jsx(ff,{page:r.page,count:r.pageCount,onChange:(l,u)=>o({page:u}),showFirstButton:!0,showLastButton:!0})]})}function gy({scope:e,categories:t,showScope:n,scopeFormatter:r}){return K.jsx(u5,{scope:e,categories:t,showScope:n,scopeFormatter:r,children:K.jsx(p5,{})})}const g5=af.div`
|
|
49
|
+
`||o==="\r"||o==="\f";)E=!0,t++,o=e.charAt(t);return E}function p(){var E=h();if(t<s)throw Error('Rule expected but "'+e.charAt(t)+'" found.');return E}function h(){var E=m();if(!E)return null;var T=E;for(o=e.charAt(t);o===",";){if(t++,d(),T.type!=="selectors"&&(T={type:"selectors",selectors:[E]}),E=m(),!E)throw Error('Rule expected after ",".');T.selectors.push(E)}return T}function m(){d();var E={type:"ruleSet"},T=f();if(!T)return null;for(var A=E;T&&(T.type="rule",A.rule=T,A=T,d(),o=e.charAt(t),!(t>=s||o===","||o===")"));)if(a[o]){var C=o;if(t++,d(),T=f(),!T)throw Error('Rule expected after "'+C+'".');T.nestingOperator=C}else T=f(),T&&(T.nestingOperator=null);return E}function f(){for(var E=null;t<s;)if(o=e.charAt(t),o==="*")t++,(E=E||{}).tagName="*";else if($e.isIdentStart(o)||o==="\\")(E=E||{}).tagName=u();else if(o===".")t++,E=E||{},(E.classNames=E.classNames||[]).push(u());else if(o==="#")t++,(E=E||{}).id=u();else if(o==="["){t++,d();var T={name:u()};if(d(),o==="]")t++;else{var A="";if(r[o]&&(A=o,t++,o=e.charAt(t)),t>=s)throw Error('Expected "=" but end of file reached.');if(o!=="=")throw Error('Expected "=" but "'+o+'" found.');T.operator=A+"=",t++,d();var C="";if(T.valueType="string",o==='"')C=l('"',$e.doubleQuotesEscapeChars);else if(o==="'")C=l("'",$e.singleQuoteEscapeChars);else if(i&&o==="$")t++,C=u(),T.valueType="substitute";else{for(;t<s&&o!=="]";)C+=o,t++,o=e.charAt(t);C=C.trim()}if(d(),t>=s)throw Error('Expected "]" but end of file reached.');if(o!=="]")throw Error('Expected "]" but "'+o+'" found.');t++,T.value=C}E=E||{},(E.attrs=E.attrs||[]).push(T)}else if(o===":"){t++;var N=u(),k={name:N};if(o==="("){t++;var w="";if(d(),n[N]==="selector")k.valueType="selector",w=h();else{if(k.valueType=n[N]||"string",o==='"')w=l('"',$e.doubleQuotesEscapeChars);else if(o==="'")w=l("'",$e.singleQuoteEscapeChars);else if(i&&o==="$")t++,w=u(),k.valueType="substitute";else{for(;t<s&&o!==")";)w+=o,t++,o=e.charAt(t);w=w.trim()}d()}if(t>=s)throw Error('Expected ")" but end of file reached.');if(o!==")")throw Error('Expected ")" but "'+o+'" found.');t++,k.value=w}E=E||{},(E.pseudos=E.pseudos||[]).push(k)}else break;return E}return p()}y1.parseCssSelector=W_;var I1={};Object.defineProperty(I1,"__esModule",{value:!0});var we=N1;function wr(e){var t="";switch(e.type){case"ruleSet":for(var n=e.rule,r=[];n;)n.nestingOperator&&r.push(n.nestingOperator),r.push(wr(n)),n=n.rule;t=r.join(" ");break;case"selectors":t=e.selectors.map(wr).join(", ");break;case"rule":e.tagName&&(e.tagName==="*"?t="*":t=we.escapeIdentifier(e.tagName)),e.id&&(t+="#"+we.escapeIdentifier(e.id)),e.classNames&&(t+=e.classNames.map(function(a){return"."+we.escapeIdentifier(a)}).join("")),e.attrs&&(t+=e.attrs.map(function(a){return"operator"in a?a.valueType==="substitute"?"["+we.escapeIdentifier(a.name)+a.operator+"$"+a.value+"]":"["+we.escapeIdentifier(a.name)+a.operator+we.escapeStr(a.value)+"]":"["+we.escapeIdentifier(a.name)+"]"}).join("")),e.pseudos&&(t+=e.pseudos.map(function(a){return a.valueType?a.valueType==="selector"?":"+we.escapeIdentifier(a.name)+"("+wr(a.value)+")":a.valueType==="substitute"?":"+we.escapeIdentifier(a.name)+"($"+a.value+")":a.valueType==="numeric"?":"+we.escapeIdentifier(a.name)+"("+a.value+")":":"+we.escapeIdentifier(a.name)+"("+we.escapeIdentifier(a.value)+")":":"+we.escapeIdentifier(a.name)}).join(""));break;default:throw Error('Unknown entity type: "'+e.type+'".')}return t}I1.renderEntity=wr;Object.defineProperty(Pg,"__esModule",{value:!0});var K_=y1,Y_=I1,q_=function(){function e(){this.pseudos={},this.attrEqualityMods={},this.ruleNestingOperators={},this.substitutesEnabled=!1}return e.prototype.registerSelectorPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];this.pseudos[i]="selector"}return this},e.prototype.unregisterSelectorPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];delete this.pseudos[i]}return this},e.prototype.registerNumericPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];this.pseudos[i]="numeric"}return this},e.prototype.unregisterNumericPseudos=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];delete this.pseudos[i]}return this},e.prototype.registerNestingOperators=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];this.ruleNestingOperators[i]=!0}return this},e.prototype.unregisterNestingOperators=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];delete this.ruleNestingOperators[i]}return this},e.prototype.registerAttrEqualityMods=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];this.attrEqualityMods[i]=!0}return this},e.prototype.unregisterAttrEqualityMods=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=0,a=t;r<a.length;r++){var i=a[r];delete this.attrEqualityMods[i]}return this},e.prototype.enableSubstitutes=function(){return this.substitutesEnabled=!0,this},e.prototype.disableSubstitutes=function(){return this.substitutesEnabled=!1,this},e.prototype.parse=function(t){return K_.parseCssSelector(t,0,this.pseudos,this.attrEqualityMods,this.ruleNestingOperators,this.substitutesEnabled)},e.prototype.render=function(t){return Y_.renderEntity(t).trim()},e}(),X_=Pg.CssSelectorParser=q_;const Sa=new X_;Sa.registerAttrEqualityMods("~","|","^","$","*");Sa.registerSelectorPseudos("any","matches","not","has");Sa.registerNestingOperators(">","+","~");function Z_(e){if(typeof e!="string")throw new TypeError("Expected `string` as selector, not `"+e+"`");return Sa.parse(e)}function Q_(e,t,n){const r=J_(e,t,n);return _1(r,t||void 0),r.results}function J_(e,t,n){return{rootQuery:S1(Z_(e)),results:[],scopeElements:t?t.type==="root"?t.children:[t]:[],one:!1,shallow:!1,found:!1,schema:n==="svg"?Ct:un,language:void 0,direction:"ltr",editableOrEditingHost:!1,typeIndex:void 0,elementIndex:void 0,typeCount:void 0,elementCount:void 0}}const Ug=(e=[],t="")=>(e.forEach(n=>{n.type==="text"?t+=n.value:n.type==="element"&&n.children&&Array.isArray(n.children)&&(t+=Ug(n.children))}),t),e5=e=>{const{selector:t,rewrite:n}=e||{};return r=>{if(!(!n||typeof n!="function")){if(t&&typeof t=="string"){const a=Q_(t,r);a&&a.length>0&&We(r,a,(i,s,o)=>{n(i,s,o)});return}We(r,(a,i,s)=>{n(a,i,s)})}}},t5=e5;var n5={type:"element",tagName:"svg",properties:{className:"octicon octicon-link",viewBox:"0 0 16 16",version:"1.1",width:"16",height:"16",ariaHidden:"true"},children:[{type:"element",tagName:"path",children:[],properties:{fillRule:"evenodd",d:"M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"}}]};function r5(e,t){const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly",""),n.style={position:"absolute",left:"-9999px"},document.body.appendChild(n);const r=document.getSelection().rangeCount>0?document.getSelection().getRangeAt(0):!1;n.select();let a=!1;try{a=!!document.execCommand("copy")}catch{a=!1}document.body.removeChild(n),r&&document.getSelection&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(r)),t&&t(a)}function a5(e){return e===void 0&&(e=""),{type:"element",tagName:"div",properties:{onClick:t=>{var n=t.currentTarget||t.target;n.classList.add("active"),r5(n.dataset.code,function(){setTimeout(()=>{n.classList.remove("active")},2e3)})},"data-code":e,class:"copied"},children:[{type:"element",tagName:"svg",properties:{className:"octicon-copy",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"},children:[]},{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"},children:[]}]},{type:"element",tagName:"svg",properties:{className:"octicon-check",ariaHidden:"true",viewBox:"0 0 16 16",fill:"currentColor",height:12,width:12},children:[{type:"element",tagName:"path",properties:{fillRule:"evenodd",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"},children:[]}]}]}}var i5=["prefixCls","className","source","style","onScroll","onMouseOver","pluginsFilter","warpperElement"],s5=(e,t,n)=>{if(e.type==="element"&&n&&n.type==="root"&&/h(1|2|3|4|5|6)/.test(e.tagName)){var r=e.children&&e.children[0];r&&r.properties&&r.properties.ariaHidden==="true"&&(r.properties=_r({class:"anchor"},r.properties),r.children=[n5])}if(e.type==="element"&&e.tagName==="pre"){var a=Ug(e.children);e.children.push(a5(a))}};const o5=It.forwardRef((e,t)=>{var{prefixCls:n="wmde-markdown wmde-markdown-color",className:r,source:a,style:i,onScroll:s,onMouseOver:o,pluginsFilter:l,warpperElement:u={}}=e,d=Qg(e,i5),p=It.createRef();Nt.useImperativeHandle(t,()=>_r({},e,{mdp:p}),[p,e]);var h=(n||"")+" "+(r||""),m=[[jS,{ignoreMissing:!0}],gS,D0,v0,[t5,{rewrite:s5}],[bS,{properties:"attr"}],...d.rehypePlugins||[]],f=[...d.remarkPlugins||[],S0];return K.jsx("div",_r({ref:p,onScroll:s,onMouseOver:o},u,{className:h,style:i,children:K.jsx(Ip,_r({},d,{rehypePlugins:l?l("rehype",m):m,remarkPlugins:l?l("remark",f):f,children:a||""}))}))}),Gg=Nt.createContext({}),{Provider:l5,Consumer:dy}=Gg;function u5({children:e,scope:t="",categories:n=[],showScope:r,scopeFormatter:a}){const{api:i,info:s}=Xd(),[o,l]=Nt.useState([]),[u,d]=Nt.useState({total:0,pageSize:20,pageCount:0,page:1}),[p,h]=Nt.useState(!1),[m,f]=uf(`audit-log-category-${t}`,"all"),T=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(N=>n.length?N.value==="all"||n.includes(N.value):!0),A=async({page:N=1,silent:k=!0}={})=>{if(!p){k||h(!0);try{const w=await i.getAuditLogs({input:{paging:{page:N},category:m==="all"?"":m,scope:t}});r&&(w.list||[]).forEach(I=>{I.scope!==s.did&&(I.link=`/blocklets/${I.scope}/components`)}),l(w.list),d(w.paging),h(!1)}catch(w){Jg.error(w.message),h(!1)}}};Nt.useEffect(()=>{A({page:1,silent:!1})},[]),Nt.useEffect(()=>{A({page:1,silent:!1})},[m]);const C={loading:p,fetch:A,filter:{category:m,scope:t},categories:T,setCategory:f,data:o,paging:u,showScope:r,scopeFormatter:a};return K.jsx(l5,{value:{auditLogs:C},children:e})}function Hg(){const{auditLogs:e}=Nt.useContext(Gg);return e}const c5=({log:e,info:t,inService:n})=>n?`${sf.WELLKNOWN_BLOCKLET_ADMIN_PATH}/members?did=${e.actor.did}`:e.scope===t.did?`/team/members?did=${e.actor.did}`:`/blocklets/${e.scope}/members?did=${e.actor.did}`;function d5({log:e}){var s,o;const{inService:t,info:n}=Xd(),{showScope:r,scopeFormatter:a=l=>l}=Hg();if(!e.actor.did)return null;const i=!["blocklet",""].includes(e.actor.role);return K.jsxs(Lr,{className:"log-entry","data-cy":"log-entry",children:[K.jsx("div",{className:"log-author",children:i?K.jsx(L1,{did:e.actor.did,size:36,shape:"circle"}):K.jsx(L1,{did:e.actor.did,size:36})}),K.jsxs("div",{className:"log-body",children:[K.jsxs(Yt,{className:"log-header",color:"textSecondary",component:"p",gutterBottom:!0,display:"flex",alignItems:"center",children:[r&&K.jsx(x1,{to:e.link,children:K.jsx(lf,{style:{marginRight:8},children:a(e.scope)})}),i?K.jsxs(x1,{to:c5({log:e,inService:t,info:n}),target:"_blank",children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]}):K.jsxs("span",{children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]})," ",K.jsx("span",{style:{margin:"0 4px"},children:"-"})," ",e.action]}),K.jsx(Yt,{className:"log-content",maxWidth:"lg",color:"textPrimary",component:"div","data-color-mode":"light",gutterBottom:!0,children:K.jsx(o5,{source:e.content,linkTarget:"_blank"})}),K.jsxs(Lr,{className:"log-meta",variant:"body2",children:[!!e.ip&&K.jsx(Yt,{component:"span",color:"textSecondary",children:`IP: ${e.ip}`}),!!((s=e.env.os)!=null&&s.name)&&K.jsxs(Yt,{component:"span",color:"textSecondary",children:[e.env.os.name,"(",e.env.os.version,")"]}),!!((o=e.env.browser)!=null&&o.name)&&K.jsxs(Yt,{component:"span",color:"textSecondary",children:[e.env.browser.name,"(",e.env.browser.version,")"]}),K.jsx(Yt,{component:"span",color:"textSecondary",children:K.jsx(cf,{value:e.createdAt})})]})]})]})}function p5(){const{t:e}=ef(),{data:t,loading:n,paging:r,filter:a,categories:i,setCategory:s,fetch:o}=Hg();return n?K.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:K.jsx(tf,{})}):K.jsxs(g5,{"data-cy":"audit-logs",children:[K.jsx(Lr,{className:"log-controls",children:K.jsxs(df,{style:{width:"240px"},variant:"outlined",children:[K.jsx(pf,{children:e("common.filter")}),K.jsx(gf,{"data-cy":"filter-by-category-trigger",value:a.category,onChange:l=>s(l.target.value),fullWidth:!0,label:e("common.category"),disabled:n,children:i.map(l=>K.jsx(nf,{value:l.value,"data-cy":`filter-by-category-${l.value}`,children:K.jsx(Lr,{children:K.jsx("span",{children:l.label})})},l.label))})]})}),t.length===0&&K.jsx(rf,{children:e("common.empty")}),t.length>0&&t.map(l=>K.jsx(d5,{log:l},l.id)),r.pageCount>1&&K.jsx(ff,{page:r.page,count:r.pageCount,onChange:(l,u)=>o({page:u}),showFirstButton:!0,showLastButton:!0})]})}function py({scope:e,categories:t,showScope:n,scopeFormatter:r}){return K.jsx(u5,{scope:e,categories:t,showScope:n,scopeFormatter:r,children:K.jsx(p5,{})})}const g5=af.div`
|
|
50
50
|
.log-controls {
|
|
51
51
|
display: flex;
|
|
52
52
|
justify-content: space-between;
|
|
@@ -103,4 +103,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
`;export{
|
|
106
|
+
`;export{py as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,F as n}from"./index-
|
|
1
|
+
import{j as o,F as n}from"./index-y2KSkfLz.js";function a({...t}){return o.jsx(n,{className:"bottom-button",variant:"contained",color:"primary",...t})}export{a as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,E as s,j as t,dM as r,P as c}from"./index-
|
|
1
|
+
import{r as i,E as s,j as t,dM as r,P as c}from"./index-y2KSkfLz.js";function n({children:p,...e}){const{t:o}=i.useContext(s);return t.jsx(r,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...e,children:p})}n.propTypes={children:c.any.isRequired};export{n as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{G as m,u as P,r,a8 as C,ad as T,j as t,S as B,B as h,fd as _,c as $,w as F,V as I,X as M,n as N,eV as A,fe as V,P as X,ag as z}from"./index-
|
|
1
|
+
import{G as m,u as P,r,a8 as C,ad as T,j as t,S as B,B as h,fd as _,c as $,w as F,V as I,X as M,n as N,eV as A,fe as V,P as X,ag as z}from"./index-y2KSkfLz.js";import{L as O}from"./launch-result-message-L8kZXtzD.js";import{S as v}from"./button-QAPI6GyZ.js";import{S as W}from"./layout-0pUBjxtB.js";import"./content-layout-ZlpVS5iy.js";const G=m(O)`
|
|
2
2
|
&& .result-footer {
|
|
3
3
|
height: 120px;
|
|
4
4
|
> div {
|