@abtnode/blocklet-services 1.16.21 → 1.16.22-beta-f47f2cf7
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-bt6SVv9G.js → Add-LDEf8DQg.js} +1 -1
- package/dist/assets/{Alert-fzSO0kDd.js → Alert-vWiM7yjS.js} +1 -1
- package/dist/assets/{ArrowDropDown-BVRz1Dl4.js → ArrowDropDown-VDOchtvn.js} +1 -1
- package/dist/assets/{Autocomplete-Mf7ySzwU.js → Autocomplete-i9jtdebF.js} +1 -1
- package/dist/assets/{Avatar-K6OaXDZ4.js → Avatar-yqyuIZ56.js} +1 -1
- package/dist/assets/{ButtonGroup-oHv_n3Uq.js → ButtonGroup-F595PjjB.js} +1 -1
- package/dist/assets/{CardContent-dbkBV230.js → CardContent-ekWcA9xq.js} +1 -1
- package/dist/assets/{CheckCircle-hL-IUT6q.js → CheckCircle-YDuvJgsY.js} +1 -1
- package/dist/assets/{Checkbox-9-rDGnGt.js → Checkbox-FAvvPRMi.js} +1 -1
- package/dist/assets/{ChevronRight-LWjgeEYU.js → ChevronRight-2zV-EBdQ.js} +1 -1
- package/dist/assets/{DeleteOutline-GkpxzkXa.js → DeleteOutline-Na5jYanp.js} +1 -1
- package/dist/assets/{DialogContentText-Vu-BdXEX.js → DialogContentText-rCKX8V2o.js} +1 -1
- package/dist/assets/{Done-j5eCF6jg.js → Done-6x0KAx6b.js} +1 -1
- package/dist/assets/{Download-i19pr97k.js → Download-SHFaFook.js} +1 -1
- package/dist/assets/{Edit-5qpZEtkS.js → Edit-Gp4Awbnb.js} +1 -1
- package/dist/assets/{EditIcon-PLG9-IL7.js → EditIcon-0Rwc1Sfx.js} +1 -1
- package/dist/assets/{ExpandMore-WRbnfWmE.js → ExpandMore-cCR6PfVd.js} +1 -1
- package/dist/assets/{FilterList-K9Uso_4u.js → FilterList-_e3TGjvk.js} +1 -1
- package/dist/assets/{FormControl-iRfjRIOl.js → FormControl-FuFP_-xW.js} +1 -1
- package/dist/assets/{FormControlLabel-AkL5QQtq.js → FormControlLabel-efXmMNAj.js} +1 -1
- package/dist/assets/{FormGroup-wvHZzmmD.js → FormGroup-62MBopyd.js} +1 -1
- package/dist/assets/{Google-ZWXikJO_.js → Google-bfk_WZie.js} +1 -1
- package/dist/assets/{Grid-zyeSJ3wZ.js → Grid-hq8tXmAE.js} +1 -1
- package/dist/assets/{Hidden-GHQEcd1H.js → Hidden-_2gAiz8I.js} +1 -1
- package/dist/assets/{Icon-tk1MFHkY.js → Icon-Hs_4R15m.js} +1 -1
- package/dist/assets/{InfoOutlined-n4SuHMob.js → InfoOutlined-BSQNe7N0.js} +1 -1
- package/dist/assets/{InputAdornment-xLAUWmxY.js → InputAdornment-tAiuMjJ3.js} +1 -1
- package/dist/assets/{InputLabel-9dhtp71X.js → InputLabel-sJuMXXTU.js} +1 -1
- package/dist/assets/{LastPage-oKswUEqc.js → LastPage-yJC3z7U6.js} +1 -1
- package/dist/assets/{Launch-_TuIFwCs.js → Launch-skY4QDHZ.js} +1 -1
- package/dist/assets/{LaunchOutlined-uyxHjAJt.js → LaunchOutlined-lpo-HuHe.js} +1 -1
- package/dist/assets/{ListItem-mXlOmPfw.js → ListItem-X7GPpG5G.js} +1 -1
- package/dist/assets/{LockIcon-_VbgQnyL.js → LockIcon-PHYGo9W9.js} +1 -1
- package/dist/assets/{Loop-Zt6IG1hV.js → Loop-QQNwh5zr.js} +1 -1
- package/dist/assets/{MoreHoriz-bNNdGHUX.js → MoreHoriz-UJyFgSQT.js} +1 -1
- package/dist/assets/{MoreVert-6ctaEpVo.js → MoreVert-P_r5HcyN.js} +1 -1
- package/dist/assets/{OpenInNew-EUWBnmvC.js → OpenInNew-wkpRYQBR.js} +1 -1
- package/dist/assets/{Pagination-xbaiLUoY.js → Pagination-tkn_cWWJ.js} +1 -1
- package/dist/assets/{PlayArrow-GRR1UfvW.js → PlayArrow-aZsZH5W7.js} +1 -1
- package/dist/assets/{RadioGroup-Wf8W3ZUP.js → RadioGroup-R24vXL2w.js} +1 -1
- package/dist/assets/{Search-R2YWOork.js → Search-mY4_Gjp8.js} +1 -1
- package/dist/assets/{Select-3f4a0_GV.js → Select-JkWGcMNY.js} +1 -1
- package/dist/assets/{ServerLogo-UIQ8H-JM.js → ServerLogo-CSR6LLNC.js} +1 -1
- package/dist/assets/{Skeleton-vOZfRyQG.js → Skeleton-MQVf1zeC.js} +1 -1
- package/dist/assets/{Slider-rJ5ZiJRq.js → Slider-xU9YvSC8.js} +1 -1
- package/dist/assets/{Stepper-qv7dWtzH.js → Stepper-cogqYRt3.js} +1 -1
- package/dist/assets/{TableRow-OaqX6Tqj.js → TableRow-S0z2jg7V.js} +1 -1
- package/dist/assets/{TextField-Wyekhk78.js → TextField-u2bxSAc-.js} +1 -1
- package/dist/assets/{Toolbar-7x5-T7Ys.js → Toolbar-xxqBJj87.js} +1 -1
- package/dist/assets/{access-control-sZ_373TF.js → access-control-j2dUeB1u.js} +1 -1
- package/dist/assets/{actions-Xb93Fqn6.js → actions-9-iCZmM3.js} +1 -1
- package/dist/assets/{add-component-core-eUon1xcH.js → add-component-core-lt9WbiLS.js} +1 -1
- package/dist/assets/add-resource-gfheYdrT.js +1 -0
- package/dist/assets/{addon-pPfT_C02.js → addon-pRI3jYW5.js} +1 -1
- package/dist/assets/{analytics-KWdMaioI.js → analytics-VArfUMdd.js} +1 -1
- package/dist/assets/api-VkXAZ8rS.js +1 -0
- package/dist/assets/{audit-logs-3otkosgL.js → audit-logs-vT1fZvTJ.js} +1 -1
- package/dist/assets/{button-wjV61tJk.js → button-zcH1UQ55.js} +1 -1
- package/dist/assets/{click-to-copy-y405iYqU.js → click-to-copy-0Jqh0K6m.js} +1 -1
- package/dist/assets/{complete-Y3Mpshc0.js → complete-r-PNcyt4.js} +1 -1
- package/dist/assets/{component-CVdfilGm.js → component-eg_2HfkJ.js} +2 -2
- package/dist/assets/{config-bkMq9ILx.js → config-C1zi8xBj.js} +1 -1
- package/dist/assets/{config-R4otABVI.js → config-fVHVFSN5.js} +1 -1
- package/dist/assets/{config-navigation-Ks0oWlhw.js → config-navigation-a_Pt_vLl.js} +1 -1
- package/dist/assets/{confirm-DzkZ2U7D.js → confirm-OAB3XwCu.js} +1 -1
- package/dist/assets/{confirm-HILJ5sgy.js → confirm-U8trI8sh.js} +1 -1
- package/dist/assets/{connect-UoScJBiD.js → connect-E3xXeAei.js} +1 -1
- package/dist/assets/{connect-Sa-PoCtv.js → connect-rbx5T2GT.js} +1 -1
- package/dist/assets/{content-layout-joIdD4Ha.js → content-layout-rHIg8LgN.js} +1 -1
- package/dist/assets/{dashboard-ucoCpVVE.js → dashboard-fV0BczKQ.js} +3 -3
- package/dist/assets/{did-address-EvLV_neh.js → did-address-zj1cM-u2.js} +1 -1
- package/dist/assets/{did-utils-FrjNFot0.js → did-utils-w4Fz-kUW.js} +1 -1
- package/dist/assets/{domain-oCL0AeM1.js → domain-99KBslEj.js} +1 -1
- package/dist/assets/{domain-list-MNvXMsCJ.js → domain-list-SBd0FAim.js} +1 -1
- package/dist/assets/{exchange-passport-pvHiGWDx.js → exchange-passport-XMcIXLjZ.js} +1 -1
- package/dist/assets/{fallback-kaIBtHL1.js → fallback-liNYH2Ir.js} +1 -1
- package/dist/assets/{format-error-wykwIGB8.js → format-error-2W3A06Jw.js} +1 -1
- package/dist/assets/{fuel-gttwIDgu.js → fuel-__ms_dWJ.js} +1 -1
- package/dist/assets/{fullpage-w--_Qfi_.js → fullpage-ZETP85XU.js} +1 -1
- package/dist/assets/{home-UnAPx__h.js → home-p-h3Ka4K.js} +1 -1
- package/dist/assets/{iframe-8GzqFlQD.js → iframe-ntkUMxwt.js} +1 -1
- package/dist/assets/{index-eQh3htj_.js → index-4oRyCjgx.js} +1 -1
- package/dist/assets/{index-dU1B41UW.js → index-4p4tVyyG.js} +1 -1
- package/dist/assets/{index-rFu-FqJl.js → index-J75uP8vG.js} +1 -1
- package/dist/assets/{index-KxeBO9YH.js → index-KGC-suTM.js} +1 -1
- package/dist/assets/{index-lm42cyj2.js → index-MMjnoZvc.js} +3 -3
- package/dist/assets/{index-48XKs7i2.js → index-Mw5sjLFX.js} +1 -1
- package/dist/assets/{index-dn0GLbuV.js → index-OcPycBwK.js} +1 -1
- package/dist/assets/{index-JHXd03yp.js → index-PR8Yfwm9.js} +1 -1
- package/dist/assets/{index-YYJ36RNU.js → index-SfrVnmj3.js} +1 -1
- package/dist/assets/{index-kISfyqYd.js → index-UVz8nDjF.js} +1 -1
- package/dist/assets/{index-ZrS9Yszi.js → index-VlbXENi2.js} +1 -1
- package/dist/assets/{index-QMHlq_j4.js → index-WO73mi9B.js} +1 -1
- package/dist/assets/{index-S4CEecHq.js → index-WOHYN7r2.js} +1 -1
- package/dist/assets/{index-Z3z1VFLe.js → index-YIV3ZeKw.js} +1 -1
- package/dist/assets/{index-hND2553g.js → index-ZWk0ce0v.js} +1 -1
- package/dist/assets/{index-srroQufO.js → index-bkJmmZxf.js} +1 -1
- package/dist/assets/{index-ndCevgQH.js → index-cClf5DR3.js} +1 -1
- package/dist/assets/{index-YMezvWCK.js → index-dbP1WPUp.js} +1 -1
- package/dist/assets/{index-QN3Atre9.js → index-g4tgCwv9.js} +1 -1
- package/dist/assets/{index-MOrXpk1I.js → index-gOYo1anT.js} +1 -1
- package/dist/assets/{index-q1L4Rt-P.js → index-kGlwpUUE.js} +1 -1
- package/dist/assets/{index-RvzSkwb-.js → index-oIQOqerV.js} +3 -3
- package/dist/assets/{index-5-pH2qe3.js → index-sHseTlJL.js} +3 -3
- package/dist/assets/{index-XXKdpKDI.js → index-sPvdoX0V.js} +1 -1
- package/dist/assets/{index-7qwO_l2S.js → index-t_Z0q1g_.js} +1 -1
- package/dist/assets/{index--5-hHGMr.js → index-ureJxRiy.js} +1 -1
- package/dist/assets/{index-zB3__yN7.js → index-xy2NREuZ.js} +1 -1
- package/dist/assets/{index.es-9cWgKEEj.js → index.es-OlH7_usn.js} +1 -1
- package/dist/assets/{index.esm--ulFpkOr.js → index.esm-seyLxH9D.js} +1 -1
- package/dist/assets/{invite-Kiuc4f3g.js → invite-kMtkdup7.js} +1 -1
- package/dist/assets/{issue-passport-EvC83isD.js → issue-passport-TlmpXOGE.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-6qLpgyYP.js → jss-plugin-props-sort.esm-U5ZnYCzJ.js} +1 -1
- package/dist/assets/{launch-result-message-G8Q-vMgj.js → launch-result-message-F8Ofxx_e.js} +1 -1
- package/dist/assets/{layout-Tv93dvg0.js → layout-BLaaNYtw.js} +1 -1
- package/dist/assets/{list-header-pWcDGww3.js → list-header-c_UCYd3h.js} +1 -1
- package/dist/assets/localization-RolchIpb.js +1 -0
- package/dist/assets/{log-DmAVug2U.js → log-4G78yJLN.js} +1 -1
- package/dist/assets/{login-mPK0ECCS.js → login-ihXqRdGT.js} +1 -1
- package/dist/assets/{logo-uploader--gyIl65f.js → logo-uploader-ka1rqsHQ.js} +3 -3
- package/dist/assets/{lost-passport-qglsNof1.js → lost-passport-aeYrHQyC.js} +3 -3
- package/dist/assets/{lottie-Ntb0WgKL.js → lottie-sh4s0pNq.js} +1 -1
- package/dist/assets/{memoize-one.esm-_hBYdtBF.js → memoize-one.esm-W-dn2p84.js} +1 -1
- package/dist/assets/{nav-menu-n-gHiZNN.js → nav-menu-q73bLcEq.js} +1 -1
- package/dist/assets/{notifications-ri_xK-DG.js → notifications-pZ9MHdfQ.js} +1 -1
- package/dist/assets/{overview-FS6q2bNX.js → overview-VaivnzQ7.js} +1 -1
- package/dist/assets/{page-header-k9pxrTyz.js → page-header-3dDUdORn.js} +1 -1
- package/dist/assets/{permission-nZTsZ0WS.js → permission-ZvEWJSxV.js} +1 -1
- package/dist/assets/preferences-O017YSkE.js +1 -0
- package/dist/assets/publish-resource-9olgaUUj.js +1 -0
- package/dist/assets/{react-P6LpeM6F.js → react-9u2r2plx.js} +3 -3
- package/dist/assets/{selector-U2IzDfpl.js → selector-aWeTH_Xy.js} +1 -1
- package/dist/assets/session-ieY35lEq.js +1 -0
- package/dist/assets/{setup-LJiMgRrA.js → setup-E-WnVF3c.js} +3 -3
- package/dist/assets/{slicedToArray-rvrRoJWm.js → slicedToArray-WD452XR4.js} +1 -1
- package/dist/assets/{spaces-Zfss07Dw.js → spaces-zU6EswmD.js} +1 -1
- package/dist/assets/{start-yx6hJR0G.js → start-OS7_x_to.js} +1 -1
- package/dist/assets/{step-actions-s65Gu0Gm.js → step-actions-aej3hvRe.js} +1 -1
- package/dist/assets/{studio-fPjrPx_W.js → studio-cTSL4ry_.js} +1 -1
- package/dist/assets/{switch-control-Ibk2Hq71.js → switch-control-AxKlF0qa.js} +1 -1
- package/dist/assets/{transfer-5j4o71oH.js → transfer-nZJ3uNpL.js} +1 -1
- package/dist/assets/{uniqBy-E9ysHx3q.js → uniqBy-MB2OLxCc.js} +1 -1
- package/dist/assets/{unsubscribe-UDtvo2es.js → unsubscribe-kdT3WbRL.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-ufLIGKTr.js → use-blocklet-info-for-connect-did-spaces-Zu5fLwEo.js} +1 -1
- package/dist/assets/{useAsync-c4_liX2s.js → useAsync-4TdvRTWi.js} +1 -1
- package/dist/assets/{useFormControl-74pXAYtI.js → useFormControl-Qd1sZJH7.js} +1 -1
- package/dist/assets/{useLocalStorage-DpKr2KRx.js → useLocalStorage-HSuIS8dC.js} +1 -1
- package/dist/assets/{useSetState-y2knwpSH.js → useSetState-MgFJAi6n.js} +1 -1
- package/dist/assets/{user-eRvHZyFC.js → user-IWQIFpC6.js} +1 -1
- package/dist/assets/{util-ERLM63JX.js → util-lFswG4bk.js} +1 -1
- package/dist/assets/{wallet-hidden-topbar-NDSHw08q.js → wallet-hidden-topbar-QxBPCxK0.js} +3 -3
- package/dist/assets/{wrap-locale-wQfZepjD.js → wrap-locale-muuCseT-.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +18 -18
- package/dist/assets/add-resource-F5pGDC5G.js +0 -1
- package/dist/assets/api-bPHHyjfQ.js +0 -1
- package/dist/assets/localization-PhFvv0Bs.js +0 -1
- package/dist/assets/preferences-aHNijIaU.js +0 -1
- package/dist/assets/publish-resource-9a-xQ2Bs.js +0 -1
- package/dist/assets/session-FvRnItWJ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bK as J,r as W,bL as Q,bM as _,al as w,j as e,d as L,aq as X,S as Y,u as S,bN as Z,aJ as ee,e as q,h as te,T as u,F as f,bO as B,bf as F,aK as U,bP as $,n as C,bJ as ne,N as se,$ as oe,B as V,bt as ae,bQ as D,by as N,w as O,R as re,G as ie,O as le}from"./index-lm42cyj2.js";import{H as ce}from"./index-XXKdpKDI.js";import{I as P}from"./index-S4CEecHq.js";import{T as me}from"./index-q1L4Rt-P.js";import{W as de}from"./did-address-EvLV_neh.js";import{g as pe,U as ue,P as he}from"./did-utils-FrjNFot0.js";import{i as xe}from"./index-srroQufO.js";import{u as ge,a as fe,C as v}from"./index.esm--ulFpkOr.js";import{u as be}from"./confirm-DzkZ2U7D.js";import{A as je}from"./Alert-fzSO0kDd.js";import{S as c,F as T}from"./FormControlLabel-AkL5QQtq.js";import{C as I}from"./Checkbox-9-rDGnGt.js";import{S as ve}from"./Select-3f4a0_GV.js";import{T as ye}from"./TextField-Wyekhk78.js";import{M as Ce}from"./InputAdornment-xLAUWmxY.js";import{f as H}from"./format-error-wykwIGB8.js";import{A as we}from"./Avatar-K6OaXDZ4.js";import"./fallback-kaIBtHL1.js";import"./nav-menu-n-gHiZNN.js";import"./MoreHoriz-bNNdGHUX.js";import"./ExpandMore-WRbnfWmE.js";import"./wallet-hidden-topbar-NDSHw08q.js";import"./ListItem-mXlOmPfw.js";import"./selector-U2IzDfpl.js";import"./useFormControl-74pXAYtI.js";import"./FormControl-iRfjRIOl.js";import"./InputLabel-9dhtp71X.js";var Se=function(n){var o=J(W.useState(n),2),i=o[0],t=o[1],a=W.useCallback(function(s){t(function(m){var d=Q(s)?s(m):s;return d?_(_({},m),d):m})},[]);return[i,a]};const ke=w(e.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddOutlined"),Ae=w(e.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined"),ze=w(e.jsx("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83V6.31l6-2.12 6 2.12v4.78zm-9.18-.5L7.4 12l3.54 3.54 5.66-5.66-1.41-1.41-4.24 4.24-2.13-2.12z"}),"GppGoodOutlined"),Te=w(e.jsx("path",{d:"m4.01 6.03 7.51 3.22-7.52-1 .01-2.22m7.5 8.72L4 17.97v-2.22l7.51-1M2.01 3 2 10l15 2-15 2 .01 7L23 12 2.01 3z"}),"SendOutlined");function Ie({data:n,user:o,onChange:i}){const{t}=S(),{api:a}=L(),[s,m]=Se({editing:!1,dirty:!1}),{control:d,getValues:g,setValue:p,formState:x,handleSubmit:k}=ge({defaultValues:Z({notifications:{email:!0,wallet:!0,phone:!1},webhooks:[]},n)}),{confirmApi:A,confirmHolder:y}=be(),M=ee(),E=new URLSearchParams(M.search),G=q(),b=fe({control:d,name:"webhooks"}),z=async r=>{try{await a.post("/api/user/extra",r),C.success(t("common.saveSuccess")),m({editing:!1}),await i()}catch(l){C.error(H(l))}};te(()=>{if(E.get("action")==="unsubscribe"){const r=E.get("channel");["email","wallet","phone"].includes(r)&&(G(M.pathname,{replace:!0}),A.open({title:t("notification.email.disable"),content:t("notification.email.disableDescription"),async onConfirm(l){await z({notifications:{[r]:!1}}),l()}}))}});const K=async r=>{try{const l=g();await a.put("/api/user/extra",l.webhooks[r]),C.success(t("team.member.settings.tested"))}catch(l){C.error(H(l))}};return e.jsxs(c,{spacing:3,children:[e.jsxs(c,{sx:{width:"100%"},children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(u,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.notification")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:k(z),disabled:x.isSubmitting,children:t("common.save")})]}),e.jsx(v,{name:"notifications.wallet",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.wallet,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.wallet"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:pe(o)})]})})}),e.jsx(v,{name:"notifications.email",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.email,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.email"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:o.email||""})]})})}),e.jsx(v,{name:"notifications.phone",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.phone,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,disabled:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.phone"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:o.phone||""})]})})})]}),e.jsxs(c,{children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(u,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.webhook")}),e.jsxs(c,{direction:"row",children:[s.editing&&e.jsx(f,{variant:"text",size:"small",color:"primary",style:{height:"32px"},onClick:()=>m({editing:!1}),children:t("common.cancel")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:s.editing?k(z):()=>m({editing:!0}),disabled:x.isSubmitting,children:s.editing?t("common.save"):t("common.edit")})]})]}),b.fields.map((r,l)=>{var R;const h=(R=B(x.errors,`webhooks.${l}.url`))==null?void 0:R.message;return s.editing?e.jsxs(c,{mt:2,spacing:2,sx:{width:"100%"},direction:"row",alignItems:"center",children:[e.jsxs(c,{direction:"row",spacing:2,sx:{width:"80%"},children:[e.jsx(v,{name:`webhooks.${l}.type`,control:d,rules:{required:t("common.required")},render:({field:j})=>e.jsxs(ve,{...j,sx:{flex:1},fullWidth:!0,size:"small",children:[e.jsx(F,{value:"api",children:t("team.member.settings.url")}),e.jsx(F,{value:"slack",children:t("team.member.settings.slack")})]})}),e.jsx(v,{name:`webhooks.${l}.url`,control:d,rules:{required:t("common.required"),validate:j=>xe(j)||t("common.invalid")},render:({field:j})=>e.jsx(ye,{sx:{flex:4},fullWidth:!0,size:"small",required:!0,...j,error:!!h,InputProps:{endAdornment:h?e.jsx(Ce,{position:"end",children:e.jsx(u,{component:"span",color:"error",children:h})}):null}})})]}),e.jsxs(c,{direction:"row",spacing:1,children:[e.jsx(U,{size:"small",onClick:()=>K(l),children:e.jsx(Te,{color:"primary",sx:{opacity:.75}})}),e.jsx(U,{size:"small",onClick:()=>b.remove(l),children:e.jsx(Ae,{color:"error",sx:{opacity:.75}})})]})]},r.id):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:r.type,children:r.url},r.id)}),!s.editing&&!b.fields.length&&e.jsx($,{children:t("common.empty")}),s.editing&&e.jsx(c,{mt:b.fields.length?2:1,direction:"row",justifyContent:"space-between",children:e.jsxs(f,{size:"small",variant:"outlined",color:"primary",onClick:()=>b.append({type:"slack",url:""}),children:[e.jsx(ke,{fontSize:"small"})," ",t("team.member.settings.add")]})})]}),y]})}function Pe({user:n}){const{api:o}=L(),{loading:i,error:t,runAsync:a,data:s}=X(()=>o.get("/api/user/extra").then(m=>m.data));return t?e.jsx(je,{severity:"error",children:t.message}):i||!s?e.jsx(Y,{}):e.jsx(Ie,{data:s,user:n,onChange:a})}function Le({user:n}){const{t:o,locale:i}=S(),t={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"};return[{name:o("team.member.name"),value:n.fullName},{name:o("common.email"),value:n.email},{name:o("common.phone"),value:n.phone},{name:o("team.member.lastLogin"),value:N(n.lastLoginAt,i)},{name:o("team.member.lastLoginIp"),value:n.lastLoginIp||""},{name:o("common.createdAt"),value:N(n.createdAt,i)},{name:o("team.member.source"),value:t[(n==null?void 0:n.sourceProvider)||O.USER_TYPE.WALLET]||(n==null?void 0:n.sourceProvider)}].filter(Boolean).map(s=>s.name===o("common.did")?e.jsx(P,{valueComponent:"div",nameWidth:120,name:s.name,nameFormatter:()=>o("common.did"),children:s.value},s.name):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:s.name,children:s.value},s.name))}function Oe({user:n}){const{t:o}=S(),i=(B(n,"passports")||[]).map(t=>({...t,revoked:t.status===O.PASSPORT_STATUS.REVOKED}));return i.length===0?e.jsx($,{children:o("common.empty")}):e.jsx(c,{direction:"row",spacing:3,children:i.map(t=>e.jsx(he,{passport:t,user:n,width:200,color:window.blocklet.passportColor,createPassportSvg:re,sx:{flexDirection:"column",alignItems:"center"}},t.id))})}function it(){const n=q(),o=ne(),{t:i}=S(),{session:t}=L(),a=se({user:t.user,tab:o.tab||"profile"}),s=p=>{a.tab=p,n(`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/user/${p}`)},m={info:{label:i("common.profile"),value:"profile",component:Le},oauth:{label:i("team.member.connections"),value:"connections",component:ue},passports:{label:i("team.member.passports"),value:"passports",component:Oe},settings:{label:i("common.setting"),value:"settings",component:Pe}},d=Object.values(m).map(({label:p,value:x})=>({label:p,value:x})).filter(p=>{var x;return p.value==="connections"?(((x=a.user)==null?void 0:x.connectedAccounts)||[]).find(A=>{var y;return A.provider!==(((y=a.user)==null?void 0:y.sourceProvider)||oe.LOGIN_PROVIDER.WALLET)}):!0}),g=m[a.tab]||m.info;return e.jsxs(e.Fragment,{children:[e.jsx(ce,{}),e.jsxs(Me,{sx:{mt:4},children:[e.jsxs(c,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(we,{src:a.user.avatar,variant:"rounded",style:{width:80,height:80,backgroundColor:"transparent",marginRight:8}}),e.jsxs(c,{direction:"column",spacing:.5,children:[e.jsx(u,{variant:"h4",fontWeight:"bold",children:a.user.fullName}),e.jsx(V,{children:e.jsx(ae,{label:a.user.role.toUpperCase(),size:"small",variant:"outlined",color:"success",sx:{height:"auto",fontWeight:"bold",fontSize:"12px"},icon:e.jsx(ze,{sx:{fontSize:"0.8em"}})})}),e.jsx(de,{did:a.user.did})]})]}),e.jsxs(c,{children:[a.tab==="profile"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchProfile(D,{}),children:i("team.member.switch.profile")}),a.tab==="passports"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchPassport(D,{}),children:i("team.member.switch.passport")})]})]}),e.jsx(V,{className:"tabs",sx:{my:3},children:e.jsx(me,{tabs:d,current:a.tab,onChange:s})}),e.jsx("div",{className:"body",children:e.jsx(g.component,{user:a.user})})]})]})}const Me=ie(le)`
|
|
1
|
+
import{bK as J,r as W,bL as Q,bM as _,al as w,j as e,d as L,aq as X,S as Y,u as S,bN as Z,aJ as ee,e as q,h as te,T as u,F as f,bO as B,bf as F,aK as U,bP as $,n as C,bJ as ne,N as se,$ as oe,B as V,bt as ae,bQ as D,by as N,w as O,R as re,G as ie,O as le}from"./index-MMjnoZvc.js";import{H as ce}from"./index-sPvdoX0V.js";import{I as P}from"./index-WOHYN7r2.js";import{T as me}from"./index-kGlwpUUE.js";import{W as de}from"./did-address-zj1cM-u2.js";import{g as pe,U as ue,P as he}from"./did-utils-w4Fz-kUW.js";import{i as xe}from"./index-bkJmmZxf.js";import{u as ge,a as fe,C as v}from"./index.esm-seyLxH9D.js";import{u as be}from"./confirm-OAB3XwCu.js";import{A as je}from"./Alert-vWiM7yjS.js";import{S as c,F as T}from"./FormControlLabel-efXmMNAj.js";import{C as I}from"./Checkbox-FAvvPRMi.js";import{S as ve}from"./Select-JkWGcMNY.js";import{T as ye}from"./TextField-u2bxSAc-.js";import{M as Ce}from"./InputAdornment-tAiuMjJ3.js";import{f as H}from"./format-error-2W3A06Jw.js";import{A as we}from"./Avatar-yqyuIZ56.js";import"./fallback-liNYH2Ir.js";import"./nav-menu-q73bLcEq.js";import"./MoreHoriz-UJyFgSQT.js";import"./ExpandMore-cCR6PfVd.js";import"./wallet-hidden-topbar-QxBPCxK0.js";import"./ListItem-X7GPpG5G.js";import"./selector-aWeTH_Xy.js";import"./useFormControl-Qd1sZJH7.js";import"./FormControl-FuFP_-xW.js";import"./InputLabel-sJuMXXTU.js";var Se=function(n){var o=J(W.useState(n),2),i=o[0],t=o[1],a=W.useCallback(function(s){t(function(m){var d=Q(s)?s(m):s;return d?_(_({},m),d):m})},[]);return[i,a]};const ke=w(e.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddOutlined"),Ae=w(e.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined"),ze=w(e.jsx("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83V6.31l6-2.12 6 2.12v4.78zm-9.18-.5L7.4 12l3.54 3.54 5.66-5.66-1.41-1.41-4.24 4.24-2.13-2.12z"}),"GppGoodOutlined"),Te=w(e.jsx("path",{d:"m4.01 6.03 7.51 3.22-7.52-1 .01-2.22m7.5 8.72L4 17.97v-2.22l7.51-1M2.01 3 2 10l15 2-15 2 .01 7L23 12 2.01 3z"}),"SendOutlined");function Ie({data:n,user:o,onChange:i}){const{t}=S(),{api:a}=L(),[s,m]=Se({editing:!1,dirty:!1}),{control:d,getValues:g,setValue:p,formState:x,handleSubmit:k}=ge({defaultValues:Z({notifications:{email:!0,wallet:!0,phone:!1},webhooks:[]},n)}),{confirmApi:A,confirmHolder:y}=be(),M=ee(),E=new URLSearchParams(M.search),G=q(),b=fe({control:d,name:"webhooks"}),z=async r=>{try{await a.post("/api/user/extra",r),C.success(t("common.saveSuccess")),m({editing:!1}),await i()}catch(l){C.error(H(l))}};te(()=>{if(E.get("action")==="unsubscribe"){const r=E.get("channel");["email","wallet","phone"].includes(r)&&(G(M.pathname,{replace:!0}),A.open({title:t("notification.email.disable"),content:t("notification.email.disableDescription"),async onConfirm(l){await z({notifications:{[r]:!1}}),l()}}))}});const K=async r=>{try{const l=g();await a.put("/api/user/extra",l.webhooks[r]),C.success(t("team.member.settings.tested"))}catch(l){C.error(H(l))}};return e.jsxs(c,{spacing:3,children:[e.jsxs(c,{sx:{width:"100%"},children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(u,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.notification")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:k(z),disabled:x.isSubmitting,children:t("common.save")})]}),e.jsx(v,{name:"notifications.wallet",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.wallet,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.wallet"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:pe(o)})]})})}),e.jsx(v,{name:"notifications.email",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.email,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.email"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:o.email||""})]})})}),e.jsx(v,{name:"notifications.phone",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.phone,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,disabled:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.phone"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:o.phone||""})]})})})]}),e.jsxs(c,{children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(u,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.webhook")}),e.jsxs(c,{direction:"row",children:[s.editing&&e.jsx(f,{variant:"text",size:"small",color:"primary",style:{height:"32px"},onClick:()=>m({editing:!1}),children:t("common.cancel")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:s.editing?k(z):()=>m({editing:!0}),disabled:x.isSubmitting,children:s.editing?t("common.save"):t("common.edit")})]})]}),b.fields.map((r,l)=>{var R;const h=(R=B(x.errors,`webhooks.${l}.url`))==null?void 0:R.message;return s.editing?e.jsxs(c,{mt:2,spacing:2,sx:{width:"100%"},direction:"row",alignItems:"center",children:[e.jsxs(c,{direction:"row",spacing:2,sx:{width:"80%"},children:[e.jsx(v,{name:`webhooks.${l}.type`,control:d,rules:{required:t("common.required")},render:({field:j})=>e.jsxs(ve,{...j,sx:{flex:1},fullWidth:!0,size:"small",children:[e.jsx(F,{value:"api",children:t("team.member.settings.url")}),e.jsx(F,{value:"slack",children:t("team.member.settings.slack")})]})}),e.jsx(v,{name:`webhooks.${l}.url`,control:d,rules:{required:t("common.required"),validate:j=>xe(j)||t("common.invalid")},render:({field:j})=>e.jsx(ye,{sx:{flex:4},fullWidth:!0,size:"small",required:!0,...j,error:!!h,InputProps:{endAdornment:h?e.jsx(Ce,{position:"end",children:e.jsx(u,{component:"span",color:"error",children:h})}):null}})})]}),e.jsxs(c,{direction:"row",spacing:1,children:[e.jsx(U,{size:"small",onClick:()=>K(l),children:e.jsx(Te,{color:"primary",sx:{opacity:.75}})}),e.jsx(U,{size:"small",onClick:()=>b.remove(l),children:e.jsx(Ae,{color:"error",sx:{opacity:.75}})})]})]},r.id):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:r.type,children:r.url},r.id)}),!s.editing&&!b.fields.length&&e.jsx($,{children:t("common.empty")}),s.editing&&e.jsx(c,{mt:b.fields.length?2:1,direction:"row",justifyContent:"space-between",children:e.jsxs(f,{size:"small",variant:"outlined",color:"primary",onClick:()=>b.append({type:"slack",url:""}),children:[e.jsx(ke,{fontSize:"small"})," ",t("team.member.settings.add")]})})]}),y]})}function Pe({user:n}){const{api:o}=L(),{loading:i,error:t,runAsync:a,data:s}=X(()=>o.get("/api/user/extra").then(m=>m.data));return t?e.jsx(je,{severity:"error",children:t.message}):i||!s?e.jsx(Y,{}):e.jsx(Ie,{data:s,user:n,onChange:a})}function Le({user:n}){const{t:o,locale:i}=S(),t={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"};return[{name:o("team.member.name"),value:n.fullName},{name:o("common.email"),value:n.email},{name:o("common.phone"),value:n.phone},{name:o("team.member.lastLogin"),value:N(n.lastLoginAt,i)},{name:o("team.member.lastLoginIp"),value:n.lastLoginIp||""},{name:o("common.createdAt"),value:N(n.createdAt,i)},{name:o("team.member.source"),value:t[(n==null?void 0:n.sourceProvider)||O.USER_TYPE.WALLET]||(n==null?void 0:n.sourceProvider)}].filter(Boolean).map(s=>s.name===o("common.did")?e.jsx(P,{valueComponent:"div",nameWidth:120,name:s.name,nameFormatter:()=>o("common.did"),children:s.value},s.name):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:s.name,children:s.value},s.name))}function Oe({user:n}){const{t:o}=S(),i=(B(n,"passports")||[]).map(t=>({...t,revoked:t.status===O.PASSPORT_STATUS.REVOKED}));return i.length===0?e.jsx($,{children:o("common.empty")}):e.jsx(c,{direction:"row",spacing:3,children:i.map(t=>e.jsx(he,{passport:t,user:n,width:200,color:window.blocklet.passportColor,createPassportSvg:re,sx:{flexDirection:"column",alignItems:"center"}},t.id))})}function it(){const n=q(),o=ne(),{t:i}=S(),{session:t}=L(),a=se({user:t.user,tab:o.tab||"profile"}),s=p=>{a.tab=p,n(`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/user/${p}`)},m={info:{label:i("common.profile"),value:"profile",component:Le},oauth:{label:i("team.member.connections"),value:"connections",component:ue},passports:{label:i("team.member.passports"),value:"passports",component:Oe},settings:{label:i("common.setting"),value:"settings",component:Pe}},d=Object.values(m).map(({label:p,value:x})=>({label:p,value:x})).filter(p=>{var x;return p.value==="connections"?(((x=a.user)==null?void 0:x.connectedAccounts)||[]).find(A=>{var y;return A.provider!==(((y=a.user)==null?void 0:y.sourceProvider)||oe.LOGIN_PROVIDER.WALLET)}):!0}),g=m[a.tab]||m.info;return e.jsxs(e.Fragment,{children:[e.jsx(ce,{}),e.jsxs(Me,{sx:{mt:4},children:[e.jsxs(c,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(we,{src:a.user.avatar,variant:"rounded",style:{width:80,height:80,backgroundColor:"transparent",marginRight:8}}),e.jsxs(c,{direction:"column",spacing:.5,children:[e.jsx(u,{variant:"h4",fontWeight:"bold",children:a.user.fullName}),e.jsx(V,{children:e.jsx(ae,{label:a.user.role.toUpperCase(),size:"small",variant:"outlined",color:"success",sx:{height:"auto",fontWeight:"bold",fontSize:"12px"},icon:e.jsx(ze,{sx:{fontSize:"0.8em"}})})}),e.jsx(de,{did:a.user.did})]})]}),e.jsxs(c,{children:[a.tab==="profile"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchProfile(D,{}),children:i("team.member.switch.profile")}),a.tab==="passports"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchPassport(D,{}),children:i("team.member.switch.passport")})]})]}),e.jsx(V,{className:"tabs",sx:{my:3},children:e.jsx(me,{tabs:d,current:a.tab,onChange:s})}),e.jsx("div",{className:"body",children:e.jsx(g.component,{user:a.user})})]})]})}const Me=ie(le)`
|
|
2
2
|
.MuiTab-root {
|
|
3
3
|
padding: 0;
|
|
4
4
|
margin-right: 24px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b4 as l,el as s,em as h,$ as P,w as u}from"./index-
|
|
1
|
+
import{b4 as l,el as s,em as h,$ as P,w as u}from"./index-MMjnoZvc.js";const d=s;var c=(e,r)=>d(e)===d(r);const E=l(c),x=(e,r)=>{if(e.type===u.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error(`${r("router.validation.redirectUrlRequired")}`);if(!e.redirectCode)return new Error(`redirect ${r("router.validation.redirectCodeRequired")}`)}else if(e.type===u.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(r("router.validation.didRequired"));return null},R=(e,r)=>{const t=x(e,r);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(r("router.validation.pathPrefixTooLong",{length:150})):null:new Error(r("router.validation.pathPrefixCannotBeEmpty")))},v=({params:e,blocklets:r,blocklet:t,locale:o="en"})=>{if(t){let i=(t.children||[]).find(f=>h(f.meta)&&E(f.mountPoint,e.pathPrefix));if(t.meta.group!=="gateway"&&e.pathPrefix==="/"&&(i="/"),i)return{zh:`挂载点 ${e.pathPrefix} 已存在,请使用其他挂载点`,en:`The mount point ${e.pathPrefix} already exist, please use another mount point`}[o]}const a=r.find(i=>i.meta.did===e.did);if(!a)return"";const n=a.meta.interfaces.find(i=>i.type==="web");return n&&n.prefix!==P.BLOCKLET_DYNAMIC_PATH_PREFIX&&e.pathPrefix!==n.prefix?{zh:`该 blocklet 只能挂载在 ${n.prefix}`,en:`This blocklet can only be mounted on ${n.prefix}`}[o]:""},T=e=>{if(!e||typeof e!="string")return e;let r=e.trim();try{return r=r.toLowerCase(),r.startsWith("http://")||r.startsWith("https://")?new URL(r).hostname:r}catch(t){return console.error("format domain failed",t),r}};export{R as a,T as p,v};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ue=Object.defineProperty;var fe=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var B=(t,e,n)=>(fe(t,typeof e!="symbol"?e+"":e,n),n);import{aO as de,bR as pe,bS as he,aS as D,bT as V,r as T,aQ as ge,aR as me,aW as xt,bU as be,bV as ye,j as b,aU as wt,aV as xe,P as f,N as we,f as ve,aK as Ie,bW as vt,bC as Ce,bD as Se,bX as Te,a7 as Ae,J as S,bA as Pe,B as je,bY as ke,T as Le,bZ as Oe,F as Me,b_ as Re,br as _e,u as Ee,aL as qe,_ as Ne,Q as Fe}from"./index-
|
|
1
|
+
var ue=Object.defineProperty;var fe=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var B=(t,e,n)=>(fe(t,typeof e!="symbol"?e+"":e,n),n);import{aO as de,bR as pe,bS as he,aS as D,bT as V,r as T,aQ as ge,aR as me,aW as xt,bU as be,bV as ye,j as b,aU as wt,aV as xe,P as f,N as we,f as ve,aK as Ie,bW as vt,bC as Ce,bD as Se,bX as Te,a7 as Ae,J as S,bA as Pe,B as je,bY as ke,T as Le,bZ as Oe,F as Me,b_ as Re,br as _e,u as Ee,aL as qe,_ as Ne,Q as Fe}from"./index-MMjnoZvc.js";import{l as L,g as $e,L as Be}from"./ListItem-X7GPpG5G.js";import{L as Ve}from"./selector-aWeTH_Xy.js";const ze=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],He=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},Ze=t=>{const{alignItems:e,classes:n,dense:r,disabled:o,disableGutters:s,divider:i,selected:a}=t,l=xe({root:["root",r&&"dense",!s&&"gutters",i&&"divider",o&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},$e,n);return D({},n,l)},De=de(pe,{shouldForwardProp:t=>he(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:He})(({theme:t,ownerState:e})=>D({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${L.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:V(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${L.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:V(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${L.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:V(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:V(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${L.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${L.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),Ue=T.forwardRef(function(e,n){const r=ge({props:e,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:s=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:x}=r,g=me(r,ze),y=T.useContext(xt),v=T.useMemo(()=>({dense:c||y.dense||!1,alignItems:o,disableGutters:l}),[o,y.dense,c,l]),C=T.useRef(null);be(()=>{s&&C.current&&C.current.focus()},[s]);const w=D({},r,{alignItems:o,dense:v.dense,disableGutters:l,divider:u,selected:p}),m=Ze(w),Y=ye(C,n);return b.jsx(xt.Provider,{value:v,children:b.jsx(De,D({ref:Y,href:g.href||g.to,component:(g.href||g.to)&&i==="div"?"button":i,focusVisibleClassName:wt(m.focusVisible,d),ownerState:w,className:wt(m.root,x)},g,{classes:m,children:a}))})}),Qe=Ue;/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -8,10 +8,10 @@ var ue=Object.defineProperty;var fe=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,config
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
* @version 1.0.8
|
|
11
|
-
*/const Vt=Object.freeze({left:0,top:0,width:16,height:16}),U=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N=Object.freeze({...Vt,...U}),rt=Object.freeze({...N,body:"",hidden:!1}),Ge=Object.freeze({width:null,height:null}),zt=Object.freeze({...Ge,...U});function We(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:r(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return e}const Je=/[\s,]+/;function Xe(t,e){e.split(Je).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const Ht={...zt,preserveAspectRatio:""};function It(t){const e={...Ht},n=(r,o)=>t.getAttribute(r)||o;return e.width=n("width",null),e.height=n("height",null),e.rotate=We(n("rotate","")),Xe(e,n("flip","")),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}function Ye(t,e){for(const n in Ht)if(t[n]!==e[n])return!0;return!1}const M=/^[a-z0-9]+(-[a-z0-9]+)*$/,F=(t,e,n,r="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return e&&!H(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return e&&!H(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return e&&!H(a,n)?null:a}return null},H=(t,e)=>t?!!((t.provider===""||t.provider.match(M))&&(e&&t.prefix===""||t.prefix.match(M))&&t.name.match(M)):!1;function Ke(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function Ct(t,e){const n=Ke(t,e);for(const r in rt)r in U?r in t&&!(r in n)&&(n[r]=U[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function tn(t,e){const n=t.icons,r=t.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function en(t,e,n){const r=t.icons,o=t.aliases||Object.create(null);let s={};function i(a){s=Ct(r[a]||o[a],s)}return i(e),n.forEach(i),Ct(t,s)}function Zt(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const r=tn(t);for(const o in r){const s=r[o];s&&(e(o,en(t,o,s)),n.push(o))}return n}const nn={provider:"",aliases:{},not_found:{},...Vt};function tt(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Dt(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!tt(t,nn))return null;const n=e.icons;for(const o in n){const s=n[o];if(!o.match(M)||typeof s.body!="string"||!tt(s,rt))return null}const r=e.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(M)||typeof i!="string"||!n[i]&&!r[i]||!tt(s,rt))return null}return e}const Q=Object.create(null);function on(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function A(t,e){const n=Q[t]||(Q[t]=Object.create(null));return n[e]||(n[e]=on(t,e))}function dt(t,e){return Dt(e)?Zt(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function rn(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}function sn(t,e){let n=[];return(typeof t=="string"?[t]:Object.keys(Q)).forEach(o=>{(typeof o=="string"&&typeof e=="string"?[e]:Object.keys(Q[o]||{})).forEach(i=>{const a=A(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let _=!1;function Ut(t){return typeof t=="boolean"&&(_=t),_}function E(t){const e=typeof t=="string"?F(t,!0,_):t;if(e){const n=A(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Qt(t,e){const n=F(t,!0,_);if(!n)return!1;const r=A(n.provider,n.prefix);return rn(r,n.name,e)}function St(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),_&&!e&&!t.prefix){let o=!1;return Dt(t)&&(t.prefix="",Zt(t,(s,i)=>{i&&Qt(s,i)&&(o=!0)})),o}const n=t.prefix;if(!H({provider:e,prefix:n,name:"a"}))return!1;const r=A(e,n);return!!dt(r,t)}function cn(t){return!!E(t)}function an(t){const e=E(t);return e?{...N,...e}:null}function ln(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return t.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=A(s,i));let u;a in l.icons?u=e.loaded:i===""||l.missing.has(a)?u=e.missing:u=e.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),e}function Gt(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==e))})}function un(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,o=t.prefix;e.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(t.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(t.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Gt([t],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let fn=0;function dn(t,e,n){const r=fn++,o=Gt.bind(null,n,r);if(!e.pending.length)return o;const s={id:r,icons:e,callback:t,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const st=Object.create(null);function Tt(t,e){st[t]=e}function it(t){return st[t]||st[""]}function pn(t,e=!0,n=!1){const r=[];return t.forEach(o=>{const s=typeof o=="string"?F(o,e,n):o;s&&r.push(s)}),r}var hn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function gn(t,e,n,r){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let h=t.resources.slice(0);for(i=[];h.length>1;){const I=Math.floor(Math.random()*h.length);i.push(h[I]),h=h.slice(0,I).concat(h.slice(I+1))}i=i.concat(h)}else i=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],x=[];typeof r=="function"&&x.push(r);function g(){d&&(clearTimeout(d),d=null)}function y(){c==="pending"&&(c="aborted"),g(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function v(h,I){I&&(x=[]),typeof h=="function"&&x.push(h)}function C(){return{startTime:a,payload:e,status:c,queriesSent:l,queriesPending:p.length,subscribe:v,abort:y}}function w(){c="failed",x.forEach(h=>{h(void 0,u)})}function m(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function Y(h,I,k){const $=I!=="success";switch(p=p.filter(P=>P!==h),c){case"pending":break;case"failed":if($||!t.dataAfterTimeout)return;break;default:return}if(I==="abort"){u=k,w();return}if($){u=k,p.length||(i.length?K():w());return}if(g(),m(),!t.random){const P=t.resources.indexOf(h.resource);P!==-1&&P!==t.index&&(t.index=P)}c="completed",x.forEach(P=>{P(k)})}function K(){if(c!=="pending")return;g();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{g(),c==="pending"&&(m(),w())},t.timeout);return}w();return}const I={status:"pending",resource:h,callback:(k,$)=>{Y(I,k,$)}};p.push(I),l++,d=setTimeout(K,t.rotate),n(h,e,I.callback)}return setTimeout(K),C}function Wt(t){const e={...hn,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=gn(e,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function pt(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const W=Object.create(null),O=["https://api.simplesvg.com","https://api.unisvg.com"],Z=[];for(;O.length>0;)O.length===1||Math.random()>.5?Z.push(O.shift()):Z.push(O.pop());W[""]=pt({resources:["https://api.iconify.design"].concat(Z)});function At(t,e){const n=pt(e);return n===null?!1:(W[t]=n,!0)}function J(t){return W[t]}function mn(){return Object.keys(W)}function Pt(){}const et=Object.create(null);function bn(t){if(!et[t]){const e=J(t);if(!e)return;const n=Wt(e),r={config:e,redundancy:n};et[t]=r}return et[t]}function Jt(t,e,n){let r,o;if(typeof t=="string"){const s=it(t);if(!s)return n(void 0,424),Pt;o=s.send;const i=bn(t);i&&(r=i.redundancy)}else{const s=pt(t);if(s){r=Wt(s);const i=t.resources?t.resources[0]:"",a=it(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Pt):r.query(e,o,n)().abort}const jt="iconify2",q="iconify",Xt=q+"-count",kt=q+"-version",Yt=36e5,yn=168;function ct(t,e){try{return t.getItem(e)}catch{}}function ht(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Lt(t,e){try{t.removeItem(e)}catch{}}function at(t,e){return ht(t,Xt,e.toString())}function lt(t){return parseInt(ct(t,Xt))||0}const j={local:!0,session:!0},Kt={local:new Set,session:new Set};let gt=!1;function xn(t){gt=t}let z=typeof window>"u"?{}:window;function te(t){const e=t+"Storage";try{if(z&&z[e]&&typeof z[e].length=="number")return z[e]}catch{}j[t]=!1}function ee(t,e){const n=te(t);if(!n)return;const r=ct(n,kt);if(r!==jt){if(r){const a=lt(n);for(let c=0;c<a;c++)Lt(n,q+c.toString())}ht(n,kt,jt),at(n,0);return}const o=Math.floor(Date.now()/Yt)-yn,s=a=>{const c=q+a.toString(),l=ct(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&e(u,a))return!0}catch{}Lt(n,c)}};let i=lt(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,at(n,i)):Kt[t].add(a))}function ne(){if(!gt){xn(!0);for(const t in j)ee(t,e=>{const n=e.data,r=e.provider,o=n.prefix,s=A(r,o);if(!dt(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function wn(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in j)ee(r,o=>{const s=o.data;return o.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function vn(t,e){gt||ne();function n(r){let o;if(!j[r]||!(o=te(r)))return;const s=Kt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=lt(o),!at(o,i+1))return;const a={cached:Math.floor(Date.now()/Yt),provider:t.provider,data:e};return ht(o,q+i.toString(),JSON.stringify(a))}e.lastModified&&!wn(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function Ot(){}function In(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,un(t)}))}function Cn(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,o=t.iconsToLoad;delete t.iconsToLoad;let s;if(!o||!(s=it(n)))return;s.prepare(n,r,o).forEach(a=>{Jt(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{t.missing.add(l)});else try{const l=dt(t,c);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),vn(t,c)}catch(l){console.error(l)}In(t)})})}))}const mt=(t,e)=>{const n=pn(t,!0,Ut()),r=ln(n);if(!r.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(r.loaded,r.missing,r.pending,Ot)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(A(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=A(l,u),x=p.pendingIcons||(p.pendingIcons=new Set);x.has(d)||(x.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&Cn(c,o[l][u])}),e?dn(e,r,s):Ot},Sn=t=>new Promise((e,n)=>{const r=typeof t=="string"?F(t,!0):t;if(!r){n(t);return}mt([r||t],o=>{if(o.length&&r){const s=E(r);if(s){e({...N,...s});return}}n(t)})});function Tn(t){try{const e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function An(t,e){const n=typeof t=="string"?F(t,!0,!0):null;if(!n){const s=Tn(t);return{value:t,data:s}}const r=E(n);if(r!==void 0||!n.prefix)return{value:t,name:n,data:r};const o=mt([n],()=>e(t,n,E(n)));return{value:t,name:n,loading:o}}function nt(t){return t.hasAttribute("inline")}let oe=!1;try{oe=navigator.vendor.indexOf("Apple")===0}catch{}function Pn(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(oe||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const jn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,kn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ut(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(jn);if(r===null||!r.length)return t;const o=[];let s=r.shift(),i=kn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*e*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const Ln=t=>t==="unset"||t==="undefined"||t==="none";function re(t,e){const n={...N,...t},r={...zt,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],v=g.hFlip,C=g.vFlip;let w=g.rotate;v?C?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):C&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let m;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:m=o.height/2+o.top,y.unshift("rotate(90 "+m.toString()+" "+m.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:m=o.width/2+o.left,y.unshift("rotate(-90 "+m.toString()+" "+m.toString()+")");break}w%2===1&&(o.left!==o.top&&(m=o.left,o.left=o.top,o.top=m),o.width!==o.height&&(m=o.width,o.width=o.height,o.height=m)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ut(d,c/l)):(u=i==="auto"?c:i,d=a===null?ut(u,l/c):a==="auto"?l:a);const p={},x=(g,y)=>{Ln(y)||(p[g]=y.toString())};return x("width",u),x("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const On=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let G=On();function Mn(t){G=t}function Rn(){return G}function _n(t,e){const n=J(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=e+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function En(t){return t===404}const qn=(t,e,n)=>{const r=[],o=_n(t,e),s="icons";let i={type:s,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:t,prefix:e,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Nn(t){if(typeof t=="string"){const e=J(t);if(e)return e.path}return"/"}const Fn=(t,e,n)=>{if(!G){n("abort",424);return}let r=Nn(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=e.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;G(t+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(En(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},$n={prepare:qn,send:Fn};function Mt(t,e){switch(t){case"local":case"session":j[t]=e;break;case"all":for(const n in j)j[n]=e;break}}const ot="data-style";let se="";function Bn(t){se=t}function Rt(t,e){let n=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(ot));n||(n=document.createElement("style"),n.setAttribute(ot,ot),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+se}function ie(){Tt("",$n),Ut(!0);let t;try{t=window}catch{}if(t){if(ne(),t.IconifyPreload!==void 0){const n=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!St(o))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const n=t.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;At(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Mt(n,!0),disableCache:n=>Mt(n,!1),iconExists:cn,getIcon:an,listIcons:sn,addIcon:Qt,addCollection:St,calculateSize:ut,buildIcon:re,loadIcons:mt,loadIcon:Sn,addAPIProvider:At,appendCustomStyle:Bn,_api:{getAPIConfig:J,setAPIModule:Tt,sendAPIQuery:Jt,setFetch:Mn,getFetch:Rn,listAPIProviders:mn}}}function ce(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Vn(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function zn(t){return"data:image/svg+xml,"+Vn(t)}function Hn(t){return'url("'+zn(t)+'")'}const ft={"background-color":"currentColor"},ae={"background-color":"transparent"},_t={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Et={"-webkit-mask":ft,mask:ft,background:ae};for(const t in Et){const e=Et[t];for(const n in _t)e[t+"-"+n]=_t[n]}function qt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Zn(t,e,n){const r=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=t.attributes,i=ce(o,{...s,width:e.width+"",height:e.height+""}),a=Hn(i),c=r.style,l={"--svg":a,width:qt(s.width),height:qt(s.height),...n?ft:ae};for(const u in l)c.setProperty(u,l[u]);return r}let R;function Dn(){try{R=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{R=null}}function Un(t){return R===void 0&&Dn(),R?R.createHTML(t):t}function Qn(t){const e=document.createElement("span"),n=t.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ce(t.body,n);return e.innerHTML=Un(o),e.firstChild}function Nt(t,e){const n=e.icon.data,r=e.customisations,o=re(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=e.renderedMode;let i;switch(s){case"svg":i=Qn(o);break;default:i=Zn(o,{...N,...n},s==="mask")}const a=Array.from(t.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,a):t.appendChild(i)}function Ft(t,e,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:r}}function Gn(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch{return}if(!e||!n)return;const r=e.get(t);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();B(this,"_shadowRoot");B(this,"_state");B(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=nt(this);Rt(c,l),this._state=Ft({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=nt(this),u=this._state;l!==u.inline&&(u.inline=l,Rt(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return nt(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Nt(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=It(this);(c.attrMode!==u||Ye(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=An(c,(u,d,p)=>{const x=this._state;if(x.rendered||this.getAttribute("icon")!==u)return;const g={value:u,name:d,data:p};g.data?this._gotIconData(g):x.icon=g});l.data?this._gotIconData(l):this._state=Ft(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,It(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=Pn(c.data.body,u),p=this._state.inline;Nt(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ie();for(const a in i)s[a]=s.prototype[a]=i[a];return e.define(t,s),s}Gn()||ie();const uo=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),Wn=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),X=(t,e,n="children")=>t.map(r=>Array.isArray(r[n])?e({...r,[n]:X(r[n],e,n)}):e(r)),fo=(t,e="children")=>{const n=[];return X(t,r=>n.push(r),e),n},bt=(t,e,n="children")=>t.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=bt(o,e,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return e(r,s)}),Jn=t=>/^https?:\/\//.test(t),po=t=>/^[\w-]+:[\w-]+$/.test(t),Xn=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const e=o=>o.endsWith("/")?o:`${o}/`,n=e(window.location.pathname),r=e(new URL(t,window.location.origin).pathname);return n.startsWith(r)},ho=(t=[])=>{const e=t.map((r,o)=>({path:r,index:o})).filter(r=>Xn(r.path));return e!=null&&e.length?e.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,e[0]).index:-1};var $t,Bt;const go=(($t=window==null?void 0:window.blocklet)==null?void 0:$t.groupPrefix)||((Bt=window==null?void 0:window.blocklet)==null?void 0:Bt.prefix)||"/",Yn=t=>{const e={...t},n=t==null?void 0:t.background;return typeof n=="string"?e.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(e.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),e},Kn=(t,e="en")=>{if(!(t!=null&&t.length))return t;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(Jn(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return X(t,o=>{var s;return{...o,title:n(o.title,e),link:(s=o.items)!=null&&s.length?o.link:r(o.link,e)}},"items")},to=t=>X(t,e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e,"items"),eo=t=>{if(!(t!=null&&t.length))return null;const e=to(t),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[]};return e.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},mo=t=>{if(!t)return null;const e={...t};return e.theme=Yn(e.theme),e.navigation=eo(no(e.navigation)),e},no=(t=[])=>bt(t,(e,n)=>{var r;return!!e.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),oo=(t,e)=>bt(t,(n,r)=>{var s;const o=!n.role||e&&n.role.includes(e);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),ro={width:24,height:24,body:'<path fill="currentColor" d="M13 8V4q0-.425.288-.713T14 3h6q.425 0 .713.288T21 4v4q0 .425-.288.713T20 9h-6q-.425 0-.713-.288T13 8ZM3 12V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v8q0 .425-.288.713T10 13H4q-.425 0-.713-.288T3 12Zm10 8v-8q0-.425.288-.713T14 11h6q.425 0 .713.288T21 12v8q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-4q0-.425.288-.713T4 15h6q.425 0 .713.288T11 16v4q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20Zm2-9h4V5H5v6Zm10 8h4v-6h-4v6Zm0-12h4V5h-4v2ZM5 19h4v-2H5v2Zm4-8Zm6-4Zm0 6Zm-6 4Z"/>'},so={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function yt({session:t,locale:e,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=t==null?void 0:t.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=T.useRef(null),i=we({open:!1}),a=ve((c=!i.open)=>{i.open=c});return o.length===0?null:b.jsxs(b.Fragment,{children:[b.jsx(Ie,{size:"medium",ref:s,onClick:()=>a(),children:b.jsx(vt,{icon:ro,fontSize:n,style:{transform:"scale(1.10)"}})}),b.jsx(Ce,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>b.jsx(Se,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:b.jsx(Te,{...c,timeout:350,children:b.jsxs(Ae,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:S.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${S.gray6}, 0px 0px 0px 1px ${S.gray6}`},children:[b.jsx(Pe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u,d;return b.jsx(Be,{disablePadding:!0,children:b.jsxs(Qe,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:S.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?b.jsx(je,{component:"img",src:`${ke}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):b.jsx(vt,{fontSize:50,icon:l.icon||so,color:S.textSubtitle}),b.jsx(Le,{sx:{fontSize:"12px",color:S.textBase,textAlign:"center",lineHeight:"normal"},children:((d=l.title)==null?void 0:d.zh)||l.title})]})},l.id)})}),b.jsx(Oe,{session:t,children:b.jsx(Me,{variant:"outlined",fullWidth:!0,href:Re,sx:{mt:1,borderRadius:2,color:S.textBase,borderColor:S.lineBorderStrong,"&:hover":{color:S.primaryBase,borderColor:S.primaryBase}},children:e==="zh"?"管理":"Manage"})})]})})})})]})}yt.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};yt.defaultProps={locale:"en",size:24};function le({formattedBlocklet:t,addons:e,sessionManagerProps:n}){var p,x,g,y;const r=T.useContext(_e),{locale:o}=Ee()||{},{enableConnect:s=!0,enableLocale:i=!0}=t,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=Kn((x=t==null?void 0:t.navigation)==null?void 0:x.sessionManager,o)||[];c=oo(c,(y=(g=r==null?void 0:r.session)==null?void 0:g.user)==null?void 0:y.role);const u=(()=>{if(e&&typeof e!="function")return Array.isArray(e)?e:[e];let v=[];if(i&&o&&v.push(b.jsx(Ve,{showText:!1},"locale-selector")),s&&r){const C=[];a&&(c?c.slice(0,5):[]).forEach(m=>{C.push({label:m.title,icon:m.icon?b.jsx("iconify-icon",{icon:m.icon,height:24,style:{marginRight:8}}):null,component:"a",href:m.link,key:m.link})}),v.push(b.jsx(yt,{session:r.session,locale:o},"session-blocklet")),v.push(b.jsx(qe,{session:r.session,locale:o,menu:C,showRole:!0,...n},"session-user"))}return typeof e=="function"&&(v=e(v)||[]),v})();return T.createElement(b.Fragment,null,...Array.isArray(u)?u:[u])}le.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:Wn};le.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const bo=()=>{const t=Ne();T.useEffect(()=>{t.wallet&&Fe(()=>import("./index-KxeBO9YH.js").then(e=>e.i),__vite__mapDeps([0,1,2])).then(e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")}).catch(e=>{console.error("load dsbridge error",e)})},[t])};export{le as H,Qe as L,oo as a,uo as b,fo as c,ho as d,po as e,mo as f,Kn as g,Jn as i,X as m,go as p,Wn as s,bo as u};
|
|
11
|
+
*/const Vt=Object.freeze({left:0,top:0,width:16,height:16}),U=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N=Object.freeze({...Vt,...U}),rt=Object.freeze({...N,body:"",hidden:!1}),Ge=Object.freeze({width:null,height:null}),zt=Object.freeze({...Ge,...U});function We(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:r(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return e}const Je=/[\s,]+/;function Xe(t,e){e.split(Je).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const Ht={...zt,preserveAspectRatio:""};function It(t){const e={...Ht},n=(r,o)=>t.getAttribute(r)||o;return e.width=n("width",null),e.height=n("height",null),e.rotate=We(n("rotate","")),Xe(e,n("flip","")),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}function Ye(t,e){for(const n in Ht)if(t[n]!==e[n])return!0;return!1}const M=/^[a-z0-9]+(-[a-z0-9]+)*$/,F=(t,e,n,r="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return e&&!H(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return e&&!H(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return e&&!H(a,n)?null:a}return null},H=(t,e)=>t?!!((t.provider===""||t.provider.match(M))&&(e&&t.prefix===""||t.prefix.match(M))&&t.name.match(M)):!1;function Ke(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function Ct(t,e){const n=Ke(t,e);for(const r in rt)r in U?r in t&&!(r in n)&&(n[r]=U[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function tn(t,e){const n=t.icons,r=t.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function en(t,e,n){const r=t.icons,o=t.aliases||Object.create(null);let s={};function i(a){s=Ct(r[a]||o[a],s)}return i(e),n.forEach(i),Ct(t,s)}function Zt(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const r=tn(t);for(const o in r){const s=r[o];s&&(e(o,en(t,o,s)),n.push(o))}return n}const nn={provider:"",aliases:{},not_found:{},...Vt};function tt(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Dt(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!tt(t,nn))return null;const n=e.icons;for(const o in n){const s=n[o];if(!o.match(M)||typeof s.body!="string"||!tt(s,rt))return null}const r=e.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(M)||typeof i!="string"||!n[i]&&!r[i]||!tt(s,rt))return null}return e}const Q=Object.create(null);function on(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function A(t,e){const n=Q[t]||(Q[t]=Object.create(null));return n[e]||(n[e]=on(t,e))}function dt(t,e){return Dt(e)?Zt(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function rn(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}function sn(t,e){let n=[];return(typeof t=="string"?[t]:Object.keys(Q)).forEach(o=>{(typeof o=="string"&&typeof e=="string"?[e]:Object.keys(Q[o]||{})).forEach(i=>{const a=A(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let _=!1;function Ut(t){return typeof t=="boolean"&&(_=t),_}function E(t){const e=typeof t=="string"?F(t,!0,_):t;if(e){const n=A(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Qt(t,e){const n=F(t,!0,_);if(!n)return!1;const r=A(n.provider,n.prefix);return rn(r,n.name,e)}function St(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),_&&!e&&!t.prefix){let o=!1;return Dt(t)&&(t.prefix="",Zt(t,(s,i)=>{i&&Qt(s,i)&&(o=!0)})),o}const n=t.prefix;if(!H({provider:e,prefix:n,name:"a"}))return!1;const r=A(e,n);return!!dt(r,t)}function cn(t){return!!E(t)}function an(t){const e=E(t);return e?{...N,...e}:null}function ln(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return t.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=A(s,i));let u;a in l.icons?u=e.loaded:i===""||l.missing.has(a)?u=e.missing:u=e.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),e}function Gt(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==e))})}function un(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,o=t.prefix;e.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(t.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(t.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Gt([t],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let fn=0;function dn(t,e,n){const r=fn++,o=Gt.bind(null,n,r);if(!e.pending.length)return o;const s={id:r,icons:e,callback:t,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const st=Object.create(null);function Tt(t,e){st[t]=e}function it(t){return st[t]||st[""]}function pn(t,e=!0,n=!1){const r=[];return t.forEach(o=>{const s=typeof o=="string"?F(o,e,n):o;s&&r.push(s)}),r}var hn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function gn(t,e,n,r){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let h=t.resources.slice(0);for(i=[];h.length>1;){const I=Math.floor(Math.random()*h.length);i.push(h[I]),h=h.slice(0,I).concat(h.slice(I+1))}i=i.concat(h)}else i=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],x=[];typeof r=="function"&&x.push(r);function g(){d&&(clearTimeout(d),d=null)}function y(){c==="pending"&&(c="aborted"),g(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function v(h,I){I&&(x=[]),typeof h=="function"&&x.push(h)}function C(){return{startTime:a,payload:e,status:c,queriesSent:l,queriesPending:p.length,subscribe:v,abort:y}}function w(){c="failed",x.forEach(h=>{h(void 0,u)})}function m(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function Y(h,I,k){const $=I!=="success";switch(p=p.filter(P=>P!==h),c){case"pending":break;case"failed":if($||!t.dataAfterTimeout)return;break;default:return}if(I==="abort"){u=k,w();return}if($){u=k,p.length||(i.length?K():w());return}if(g(),m(),!t.random){const P=t.resources.indexOf(h.resource);P!==-1&&P!==t.index&&(t.index=P)}c="completed",x.forEach(P=>{P(k)})}function K(){if(c!=="pending")return;g();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{g(),c==="pending"&&(m(),w())},t.timeout);return}w();return}const I={status:"pending",resource:h,callback:(k,$)=>{Y(I,k,$)}};p.push(I),l++,d=setTimeout(K,t.rotate),n(h,e,I.callback)}return setTimeout(K),C}function Wt(t){const e={...hn,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=gn(e,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function pt(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const W=Object.create(null),O=["https://api.simplesvg.com","https://api.unisvg.com"],Z=[];for(;O.length>0;)O.length===1||Math.random()>.5?Z.push(O.shift()):Z.push(O.pop());W[""]=pt({resources:["https://api.iconify.design"].concat(Z)});function At(t,e){const n=pt(e);return n===null?!1:(W[t]=n,!0)}function J(t){return W[t]}function mn(){return Object.keys(W)}function Pt(){}const et=Object.create(null);function bn(t){if(!et[t]){const e=J(t);if(!e)return;const n=Wt(e),r={config:e,redundancy:n};et[t]=r}return et[t]}function Jt(t,e,n){let r,o;if(typeof t=="string"){const s=it(t);if(!s)return n(void 0,424),Pt;o=s.send;const i=bn(t);i&&(r=i.redundancy)}else{const s=pt(t);if(s){r=Wt(s);const i=t.resources?t.resources[0]:"",a=it(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Pt):r.query(e,o,n)().abort}const jt="iconify2",q="iconify",Xt=q+"-count",kt=q+"-version",Yt=36e5,yn=168;function ct(t,e){try{return t.getItem(e)}catch{}}function ht(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Lt(t,e){try{t.removeItem(e)}catch{}}function at(t,e){return ht(t,Xt,e.toString())}function lt(t){return parseInt(ct(t,Xt))||0}const j={local:!0,session:!0},Kt={local:new Set,session:new Set};let gt=!1;function xn(t){gt=t}let z=typeof window>"u"?{}:window;function te(t){const e=t+"Storage";try{if(z&&z[e]&&typeof z[e].length=="number")return z[e]}catch{}j[t]=!1}function ee(t,e){const n=te(t);if(!n)return;const r=ct(n,kt);if(r!==jt){if(r){const a=lt(n);for(let c=0;c<a;c++)Lt(n,q+c.toString())}ht(n,kt,jt),at(n,0);return}const o=Math.floor(Date.now()/Yt)-yn,s=a=>{const c=q+a.toString(),l=ct(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&e(u,a))return!0}catch{}Lt(n,c)}};let i=lt(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,at(n,i)):Kt[t].add(a))}function ne(){if(!gt){xn(!0);for(const t in j)ee(t,e=>{const n=e.data,r=e.provider,o=n.prefix,s=A(r,o);if(!dt(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function wn(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in j)ee(r,o=>{const s=o.data;return o.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function vn(t,e){gt||ne();function n(r){let o;if(!j[r]||!(o=te(r)))return;const s=Kt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=lt(o),!at(o,i+1))return;const a={cached:Math.floor(Date.now()/Yt),provider:t.provider,data:e};return ht(o,q+i.toString(),JSON.stringify(a))}e.lastModified&&!wn(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function Ot(){}function In(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,un(t)}))}function Cn(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,o=t.iconsToLoad;delete t.iconsToLoad;let s;if(!o||!(s=it(n)))return;s.prepare(n,r,o).forEach(a=>{Jt(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{t.missing.add(l)});else try{const l=dt(t,c);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),vn(t,c)}catch(l){console.error(l)}In(t)})})}))}const mt=(t,e)=>{const n=pn(t,!0,Ut()),r=ln(n);if(!r.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(r.loaded,r.missing,r.pending,Ot)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(A(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=A(l,u),x=p.pendingIcons||(p.pendingIcons=new Set);x.has(d)||(x.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&Cn(c,o[l][u])}),e?dn(e,r,s):Ot},Sn=t=>new Promise((e,n)=>{const r=typeof t=="string"?F(t,!0):t;if(!r){n(t);return}mt([r||t],o=>{if(o.length&&r){const s=E(r);if(s){e({...N,...s});return}}n(t)})});function Tn(t){try{const e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function An(t,e){const n=typeof t=="string"?F(t,!0,!0):null;if(!n){const s=Tn(t);return{value:t,data:s}}const r=E(n);if(r!==void 0||!n.prefix)return{value:t,name:n,data:r};const o=mt([n],()=>e(t,n,E(n)));return{value:t,name:n,loading:o}}function nt(t){return t.hasAttribute("inline")}let oe=!1;try{oe=navigator.vendor.indexOf("Apple")===0}catch{}function Pn(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(oe||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const jn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,kn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ut(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(jn);if(r===null||!r.length)return t;const o=[];let s=r.shift(),i=kn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*e*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const Ln=t=>t==="unset"||t==="undefined"||t==="none";function re(t,e){const n={...N,...t},r={...zt,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],v=g.hFlip,C=g.vFlip;let w=g.rotate;v?C?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):C&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let m;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:m=o.height/2+o.top,y.unshift("rotate(90 "+m.toString()+" "+m.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:m=o.width/2+o.left,y.unshift("rotate(-90 "+m.toString()+" "+m.toString()+")");break}w%2===1&&(o.left!==o.top&&(m=o.left,o.left=o.top,o.top=m),o.width!==o.height&&(m=o.width,o.width=o.height,o.height=m)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ut(d,c/l)):(u=i==="auto"?c:i,d=a===null?ut(u,l/c):a==="auto"?l:a);const p={},x=(g,y)=>{Ln(y)||(p[g]=y.toString())};return x("width",u),x("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const On=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let G=On();function Mn(t){G=t}function Rn(){return G}function _n(t,e){const n=J(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=e+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function En(t){return t===404}const qn=(t,e,n)=>{const r=[],o=_n(t,e),s="icons";let i={type:s,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:t,prefix:e,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Nn(t){if(typeof t=="string"){const e=J(t);if(e)return e.path}return"/"}const Fn=(t,e,n)=>{if(!G){n("abort",424);return}let r=Nn(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=e.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;G(t+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(En(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},$n={prepare:qn,send:Fn};function Mt(t,e){switch(t){case"local":case"session":j[t]=e;break;case"all":for(const n in j)j[n]=e;break}}const ot="data-style";let se="";function Bn(t){se=t}function Rt(t,e){let n=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(ot));n||(n=document.createElement("style"),n.setAttribute(ot,ot),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+se}function ie(){Tt("",$n),Ut(!0);let t;try{t=window}catch{}if(t){if(ne(),t.IconifyPreload!==void 0){const n=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!St(o))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const n=t.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;At(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Mt(n,!0),disableCache:n=>Mt(n,!1),iconExists:cn,getIcon:an,listIcons:sn,addIcon:Qt,addCollection:St,calculateSize:ut,buildIcon:re,loadIcons:mt,loadIcon:Sn,addAPIProvider:At,appendCustomStyle:Bn,_api:{getAPIConfig:J,setAPIModule:Tt,sendAPIQuery:Jt,setFetch:Mn,getFetch:Rn,listAPIProviders:mn}}}function ce(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Vn(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function zn(t){return"data:image/svg+xml,"+Vn(t)}function Hn(t){return'url("'+zn(t)+'")'}const ft={"background-color":"currentColor"},ae={"background-color":"transparent"},_t={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Et={"-webkit-mask":ft,mask:ft,background:ae};for(const t in Et){const e=Et[t];for(const n in _t)e[t+"-"+n]=_t[n]}function qt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Zn(t,e,n){const r=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=t.attributes,i=ce(o,{...s,width:e.width+"",height:e.height+""}),a=Hn(i),c=r.style,l={"--svg":a,width:qt(s.width),height:qt(s.height),...n?ft:ae};for(const u in l)c.setProperty(u,l[u]);return r}let R;function Dn(){try{R=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{R=null}}function Un(t){return R===void 0&&Dn(),R?R.createHTML(t):t}function Qn(t){const e=document.createElement("span"),n=t.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ce(t.body,n);return e.innerHTML=Un(o),e.firstChild}function Nt(t,e){const n=e.icon.data,r=e.customisations,o=re(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=e.renderedMode;let i;switch(s){case"svg":i=Qn(o);break;default:i=Zn(o,{...N,...n},s==="mask")}const a=Array.from(t.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,a):t.appendChild(i)}function Ft(t,e,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:r}}function Gn(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch{return}if(!e||!n)return;const r=e.get(t);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();B(this,"_shadowRoot");B(this,"_state");B(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=nt(this);Rt(c,l),this._state=Ft({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=nt(this),u=this._state;l!==u.inline&&(u.inline=l,Rt(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return nt(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Nt(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=It(this);(c.attrMode!==u||Ye(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=An(c,(u,d,p)=>{const x=this._state;if(x.rendered||this.getAttribute("icon")!==u)return;const g={value:u,name:d,data:p};g.data?this._gotIconData(g):x.icon=g});l.data?this._gotIconData(l):this._state=Ft(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,It(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=Pn(c.data.body,u),p=this._state.inline;Nt(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ie();for(const a in i)s[a]=s.prototype[a]=i[a];return e.define(t,s),s}Gn()||ie();const uo=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),Wn=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),X=(t,e,n="children")=>t.map(r=>Array.isArray(r[n])?e({...r,[n]:X(r[n],e,n)}):e(r)),fo=(t,e="children")=>{const n=[];return X(t,r=>n.push(r),e),n},bt=(t,e,n="children")=>t.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=bt(o,e,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return e(r,s)}),Jn=t=>/^https?:\/\//.test(t),po=t=>/^[\w-]+:[\w-]+$/.test(t),Xn=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const e=o=>o.endsWith("/")?o:`${o}/`,n=e(window.location.pathname),r=e(new URL(t,window.location.origin).pathname);return n.startsWith(r)},ho=(t=[])=>{const e=t.map((r,o)=>({path:r,index:o})).filter(r=>Xn(r.path));return e!=null&&e.length?e.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,e[0]).index:-1};var $t,Bt;const go=(($t=window==null?void 0:window.blocklet)==null?void 0:$t.groupPrefix)||((Bt=window==null?void 0:window.blocklet)==null?void 0:Bt.prefix)||"/",Yn=t=>{const e={...t},n=t==null?void 0:t.background;return typeof n=="string"?e.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(e.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),e},Kn=(t,e="en")=>{if(!(t!=null&&t.length))return t;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(Jn(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return X(t,o=>{var s;return{...o,title:n(o.title,e),link:(s=o.items)!=null&&s.length?o.link:r(o.link,e)}},"items")},to=t=>X(t,e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e,"items"),eo=t=>{if(!(t!=null&&t.length))return null;const e=to(t),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[]};return e.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},mo=t=>{if(!t)return null;const e={...t};return e.theme=Yn(e.theme),e.navigation=eo(no(e.navigation)),e},no=(t=[])=>bt(t,(e,n)=>{var r;return!!e.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),oo=(t,e)=>bt(t,(n,r)=>{var s;const o=!n.role||e&&n.role.includes(e);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),ro={width:24,height:24,body:'<path fill="currentColor" d="M13 8V4q0-.425.288-.713T14 3h6q.425 0 .713.288T21 4v4q0 .425-.288.713T20 9h-6q-.425 0-.713-.288T13 8ZM3 12V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v8q0 .425-.288.713T10 13H4q-.425 0-.713-.288T3 12Zm10 8v-8q0-.425.288-.713T14 11h6q.425 0 .713.288T21 12v8q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-4q0-.425.288-.713T4 15h6q.425 0 .713.288T11 16v4q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20Zm2-9h4V5H5v6Zm10 8h4v-6h-4v6Zm0-12h4V5h-4v2ZM5 19h4v-2H5v2Zm4-8Zm6-4Zm0 6Zm-6 4Z"/>'},so={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function yt({session:t,locale:e,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=t==null?void 0:t.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=T.useRef(null),i=we({open:!1}),a=ve((c=!i.open)=>{i.open=c});return o.length===0?null:b.jsxs(b.Fragment,{children:[b.jsx(Ie,{size:"medium",ref:s,onClick:()=>a(),children:b.jsx(vt,{icon:ro,fontSize:n,style:{transform:"scale(1.10)"}})}),b.jsx(Ce,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>b.jsx(Se,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:b.jsx(Te,{...c,timeout:350,children:b.jsxs(Ae,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:S.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${S.gray6}, 0px 0px 0px 1px ${S.gray6}`},children:[b.jsx(Pe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u,d;return b.jsx(Be,{disablePadding:!0,children:b.jsxs(Qe,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:S.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?b.jsx(je,{component:"img",src:`${ke}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):b.jsx(vt,{fontSize:50,icon:l.icon||so,color:S.textSubtitle}),b.jsx(Le,{sx:{fontSize:"12px",color:S.textBase,textAlign:"center",lineHeight:"normal"},children:((d=l.title)==null?void 0:d.zh)||l.title})]})},l.id)})}),b.jsx(Oe,{session:t,children:b.jsx(Me,{variant:"outlined",fullWidth:!0,href:Re,sx:{mt:1,borderRadius:2,color:S.textBase,borderColor:S.lineBorderStrong,"&:hover":{color:S.primaryBase,borderColor:S.primaryBase}},children:e==="zh"?"管理":"Manage"})})]})})})})]})}yt.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};yt.defaultProps={locale:"en",size:24};function le({formattedBlocklet:t,addons:e,sessionManagerProps:n}){var p,x,g,y;const r=T.useContext(_e),{locale:o}=Ee()||{},{enableConnect:s=!0,enableLocale:i=!0}=t,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=Kn((x=t==null?void 0:t.navigation)==null?void 0:x.sessionManager,o)||[];c=oo(c,(y=(g=r==null?void 0:r.session)==null?void 0:g.user)==null?void 0:y.role);const u=(()=>{if(e&&typeof e!="function")return Array.isArray(e)?e:[e];let v=[];if(i&&o&&v.push(b.jsx(Ve,{showText:!1},"locale-selector")),s&&r){const C=[];a&&(c?c.slice(0,5):[]).forEach(m=>{C.push({label:m.title,icon:m.icon?b.jsx("iconify-icon",{icon:m.icon,height:24,style:{marginRight:8}}):null,component:"a",href:m.link,key:m.link})}),v.push(b.jsx(yt,{session:r.session,locale:o},"session-blocklet")),v.push(b.jsx(qe,{session:r.session,locale:o,menu:C,showRole:!0,...n},"session-user"))}return typeof e=="function"&&(v=e(v)||[]),v})();return T.createElement(b.Fragment,null,...Array.isArray(u)?u:[u])}le.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:Wn};le.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const bo=()=>{const t=Ne();T.useEffect(()=>{t.wallet&&Fe(()=>import("./index-KGC-suTM.js").then(e=>e.i),__vite__mapDeps([0,1,2])).then(e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")}).catch(e=>{console.error("load dsbridge error",e)})},[t])};export{le as H,Qe as L,oo as a,uo as b,fo as c,ho as d,po as e,mo as f,Kn as g,Jn as i,X as m,go as p,Wn as s,bo as u};
|
|
12
12
|
function __vite__mapDeps(indexes) {
|
|
13
13
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
14
|
-
__vite__mapDeps.viteFileDeps = ["assets/index-
|
|
14
|
+
__vite__mapDeps.viteFileDeps = ["assets/index-KGC-suTM.js","assets/index-MMjnoZvc.js","assets/index-Fay2ci-b.css"]
|
|
15
15
|
}
|
|
16
16
|
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{as as a,at as e,au as i,av as n,aw as o,ax as h,ay as p,az as u,aA as c,aB as d,aC as j,aD as l,aE as x,aF as f,aG as z,aH as v,j as s,aI as w}from"./index-
|
|
1
|
+
import{as as a,at as e,au as i,av as n,aw as o,ax as h,ay as p,az as u,aA as c,aB as d,aC as j,aD as l,aE as x,aF as f,aG as z,aH as v,j as s,aI as w}from"./index-MMjnoZvc.js";const m={ar:a(e),de:a(i),en:a(n),es:a(o),fr:a(h),hi:a(p),id:a(u),ja:a(c),ko:a(d),pt:a(j),ru:a(l),th:a(x),vi:a(f),"zh-TW":a(z),zh:a(v)};function E(r){return function(t){return s.jsx(w,{translations:m,children:s.jsx(r,{...t})})}}export{E as w};
|
package/dist/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
padding: 0;
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
|
-
<script type="module" crossorigin src="/.well-known/service/static/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/.well-known/service/static/assets/index-MMjnoZvc.js"></script>
|
|
18
18
|
<link rel="stylesheet" crossorigin href="/.well-known/service/static/assets/index-Fay2ci-b.css">
|
|
19
19
|
</head>
|
|
20
20
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.
|
|
6
|
+
"version": "1.16.22-beta-f47f2cf7",
|
|
7
7
|
"description": "Provide unified services for every blocklet",
|
|
8
8
|
"main": "api/index.js",
|
|
9
9
|
"files": [
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
33
33
|
"license": "Apache-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@abtnode/analytics": "1.16.
|
|
36
|
-
"@abtnode/auth": "1.16.
|
|
37
|
-
"@abtnode/client": "1.16.
|
|
38
|
-
"@abtnode/connect-storage": "1.16.
|
|
39
|
-
"@abtnode/constant": "1.16.
|
|
40
|
-
"@abtnode/core": "1.16.
|
|
41
|
-
"@abtnode/cron": "1.16.
|
|
42
|
-
"@abtnode/logger": "1.16.
|
|
43
|
-
"@abtnode/models": "1.16.
|
|
44
|
-
"@abtnode/router-templates": "1.16.
|
|
45
|
-
"@abtnode/util": "1.16.
|
|
35
|
+
"@abtnode/analytics": "1.16.22-beta-f47f2cf7",
|
|
36
|
+
"@abtnode/auth": "1.16.22-beta-f47f2cf7",
|
|
37
|
+
"@abtnode/client": "1.16.22-beta-f47f2cf7",
|
|
38
|
+
"@abtnode/connect-storage": "1.16.22-beta-f47f2cf7",
|
|
39
|
+
"@abtnode/constant": "1.16.22-beta-f47f2cf7",
|
|
40
|
+
"@abtnode/core": "1.16.22-beta-f47f2cf7",
|
|
41
|
+
"@abtnode/cron": "1.16.22-beta-f47f2cf7",
|
|
42
|
+
"@abtnode/logger": "1.16.22-beta-f47f2cf7",
|
|
43
|
+
"@abtnode/models": "1.16.22-beta-f47f2cf7",
|
|
44
|
+
"@abtnode/router-templates": "1.16.22-beta-f47f2cf7",
|
|
45
|
+
"@abtnode/util": "1.16.22-beta-f47f2cf7",
|
|
46
46
|
"@arcblock/did": "^1.18.108",
|
|
47
47
|
"@arcblock/did-auth": "1.18.108",
|
|
48
48
|
"@arcblock/did-ext": "^1.18.108",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@arcblock/jwt": "1.18.108",
|
|
52
52
|
"@arcblock/validator": "^1.18.108",
|
|
53
53
|
"@arcblock/ws": "1.18.108",
|
|
54
|
-
"@blocklet/constant": "1.16.
|
|
54
|
+
"@blocklet/constant": "1.16.22-beta-f47f2cf7",
|
|
55
55
|
"@blocklet/form-builder": "^0.1.11",
|
|
56
56
|
"@blocklet/form-collector": "^0.1.6",
|
|
57
|
-
"@blocklet/meta": "1.16.
|
|
58
|
-
"@blocklet/sdk": "1.16.
|
|
57
|
+
"@blocklet/meta": "1.16.22-beta-f47f2cf7",
|
|
58
|
+
"@blocklet/sdk": "1.16.22-beta-f47f2cf7",
|
|
59
59
|
"@did-connect/authenticator": "^2.2.1",
|
|
60
60
|
"@did-connect/relay-adapter-express": "^2.2.1",
|
|
61
61
|
"@ocap/client": "1.18.108",
|
|
@@ -94,12 +94,12 @@
|
|
|
94
94
|
},
|
|
95
95
|
"resolutions": {},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@abtnode/ux": "1.16.
|
|
97
|
+
"@abtnode/ux": "1.16.22-beta-f47f2cf7",
|
|
98
98
|
"@arcblock/did-connect": "^2.9.5",
|
|
99
99
|
"@arcblock/icons": "^2.9.5",
|
|
100
100
|
"@arcblock/ux": "^2.9.5",
|
|
101
101
|
"@blocklet/launcher-layout": "2.2.50",
|
|
102
|
-
"@blocklet/tracker": "1.16.
|
|
102
|
+
"@blocklet/tracker": "1.16.22-beta-f47f2cf7",
|
|
103
103
|
"@blocklet/ui-react": "^2.9.3",
|
|
104
104
|
"@emotion/react": "^11.10.4",
|
|
105
105
|
"@emotion/styled": "^11.10.4",
|
|
@@ -171,5 +171,5 @@
|
|
|
171
171
|
"url": "https://github.com/ArcBlock/blocklet-server/issues",
|
|
172
172
|
"email": "shijun@arcblock.io"
|
|
173
173
|
},
|
|
174
|
-
"gitHead": "
|
|
174
|
+
"gitHead": "428b62fcd74f971338b0852c0fce6ce367b0da90"
|
|
175
175
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as x,a8 as P,q as R,bJ as j,U as D,r as a,c as S,ce as W,bI as O,j as u,am as U}from"./index-lm42cyj2.js";import{A as k,S as A}from"./add-component-core-eUon1xcH.js";import"./uniqBy-E9ysHx3q.js";import"./page-header-k9pxrTyz.js";import"./index-YYJ36RNU.js";import"./Skeleton-vOZfRyQG.js";import"./Hidden-GHQEcd1H.js";import"./index-hND2553g.js";import"./lottie-Ntb0WgKL.js";import"./launch-result-message-G8Q-vMgj.js";import"./index-kISfyqYd.js";import"./EditIcon-PLG9-IL7.js";import"./Done-j5eCF6jg.js";import"./Google-ZWXikJO_.js";import"./TextField-Wyekhk78.js";import"./FormControl-iRfjRIOl.js";import"./useFormControl-74pXAYtI.js";import"./InputLabel-9dhtp71X.js";import"./Select-3f4a0_GV.js";import"./logo-uploader--gyIl65f.js";import"./index-YMezvWCK.js";import"./api-bPHHyjfQ.js";import"./jss-plugin-props-sort.esm-6qLpgyYP.js";import"./toPropertyKey-NzAT2yhV.js";import"./confirm-HILJ5sgy.js";import"./DialogContentText-Vu-BdXEX.js";import"./Alert-fzSO0kDd.js";import"./format-error-wykwIGB8.js";import"./ListItem-mXlOmPfw.js";import"./util-ERLM63JX.js";import"./index-QMHlq_j4.js";import"./TableRow-OaqX6Tqj.js";import"./index-S4CEecHq.js";import"./session-FvRnItWJ.js";import"./did-address-EvLV_neh.js";import"./Stepper-qv7dWtzH.js";import"./ArrowDropDown-BVRz1Dl4.js";import"./useLocalStorage-DpKr2KRx.js";import"./Add-bt6SVv9G.js";import"./Launch-_TuIFwCs.js";import"./DeleteOutline-GkpxzkXa.js";import"./click-to-copy-y405iYqU.js";import"./fallback-kaIBtHL1.js";import"./Search-R2YWOork.js";import"./Grid-zyeSJ3wZ.js";import"./InputAdornment-xLAUWmxY.js";import"./preact.module-yJdvQMHZ.js";import"./content-layout-joIdD4Ha.js";import"./use-blocklet-info-for-connect-did-spaces-ufLIGKTr.js";import"./spaces-Zfss07Dw.js";import"./index-srroQufO.js";import"./index-QN3Atre9.js";import"./ExpandMore-WRbnfWmE.js";import"./ButtonGroup-oHv_n3Uq.js";function Bt(){var l;const{t:d}=x(),{blocklet:r}=P(),[h]=R(),{componentDid:m}=j(),f=D(t=>t.breakpoints.down("md")),g=h.get("mode")==="dialog",e=(l=r==null?void 0:r.meta)==null?void 0:l.did,i=new URL(window.location.href),s=(i.searchParams.get("store")||"").split(",").filter(Boolean).map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t}`).origin}catch(o){return console.error(o),null}}).filter(Boolean),[w,C]=a.useState(s.map(t=>({url:t,name:t.replace("https://","")}))),p=i.searchParams.get("resourceType")||"",n=i.searchParams.get("resourceDid")||m;a.useEffect(()=>{(async()=>{try{const t=await Promise.all(s.map(async o=>{const E=S(o,"/api/store.json"),{data:b}=await W.get(E);return{url:o,name:b.name}}));C(t||[])}catch(t){console.error(t)}})()},[s.join(",")]);const y=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:m},"*")};a.useEffect(()=>{const t=O();return e&&t.connect(),()=>{e&&t.isConnected()&&t.disconnect()}},[e]);const c=({inDialog:t=!0}={})=>u.jsx(k,{stores:w,resourceType:p,resourceDid:n,mode:"embed",inDialog:t,storageKey:A(`${p}+${n}`)});return g?u.jsx(U,{className:"resource-dialog",title:d("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:f?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(t,o)=>{o!=="backdropClick"&&y()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:c()}):c({inDialog:!1})}export{Bt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ce as a}from"./index-lm42cyj2.js";a.defaults.timeout=10*1e3;const e=a.create();export{e as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-lm42cyj2.js";import{S as t}from"./studio-fPjrPx_W.js";import"./index-rFu-FqJl.js";import"./nav-menu-n-gHiZNN.js";import"./MoreHoriz-bNNdGHUX.js";import"./ExpandMore-WRbnfWmE.js";import"./Toolbar-7x5-T7Ys.js";import"./Hidden-GHQEcd1H.js";import"./fallback-kaIBtHL1.js";function d(){return o.jsx(t,{children:"Coming soon..."})}export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o,w as t,j as i}from"./index-lm42cyj2.js";import{I as s}from"./iframe-8GzqFlQD.js";import{S as a}from"./studio-fPjrPx_W.js";import"./index-rFu-FqJl.js";import"./nav-menu-n-gHiZNN.js";import"./MoreHoriz-bNNdGHUX.js";import"./ExpandMore-WRbnfWmE.js";import"./Toolbar-7x5-T7Ys.js";import"./Hidden-GHQEcd1H.js";import"./fallback-kaIBtHL1.js";function P(){const r=new URLSearchParams;r.set("title","Preference Builder"),r.set("schemaKey",o(window.location.origin,t.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/studio/preferences"));const e=`${o(window.location.origin,t.WELLKNOWN_SERVICE_PATH_PREFIX,"/hosted/form-builder/")}?${r.toString()}`;return i.jsx(a,{children:i.jsx(s,{url:e,width:"100%",height:"100%",frameBorder:0,styles:{border:0}})})}export{P as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as n,bJ as l,U as c,j as o,am as d,B as u}from"./index-lm42cyj2.js";import h from"./index-RvzSkwb-.js";import"./useSetState-y2knwpSH.js";import"./index-dn0GLbuV.js";import"./FilterList-K9Uso_4u.js";import"./TableRow-OaqX6Tqj.js";import"./Checkbox-9-rDGnGt.js";import"./FormControlLabel-AkL5QQtq.js";import"./useFormControl-74pXAYtI.js";import"./FormControl-iRfjRIOl.js";import"./FormGroup-wvHZzmmD.js";import"./InputLabel-9dhtp71X.js";import"./confirm-HILJ5sgy.js";import"./DialogContentText-Vu-BdXEX.js";import"./Alert-fzSO0kDd.js";import"./format-error-wykwIGB8.js";import"./Select-3f4a0_GV.js";import"./TextField-Wyekhk78.js";import"./index-q1L4Rt-P.js";import"./LastPage-oKswUEqc.js";import"./Toolbar-7x5-T7Ys.js";import"./index--5-hHGMr.js";import"./redux-XOuz_cVf.js";import"./toPropertyKey-NzAT2yhV.js";import"./Grid-zyeSJ3wZ.js";import"./Search-R2YWOork.js";import"./MoreVert-6ctaEpVo.js";import"./did-address-EvLV_neh.js";import"./ChevronRight-LWjgeEYU.js";import"./Avatar-K6OaXDZ4.js";import"./useLocalStorage-DpKr2KRx.js";import"./session-FvRnItWJ.js";import"./InputAdornment-xLAUWmxY.js";import"./Download-i19pr97k.js";import"./DeleteOutline-GkpxzkXa.js";import"./index-YMezvWCK.js";import"./index-srroQufO.js";import"./ExpandMore-WRbnfWmE.js";import"./OpenInNew-EUWBnmvC.js";import"./api-bPHHyjfQ.js";const i=new URL(window.location.href),r=i.searchParams.get("mode")==="dialog",g=r?"":i.searchParams.get("padding")||"";function io(){const{t:e}=n(),{componentDid:s}=l(),m=c(a=>a.breakpoints.down("md")),p=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")},t=o.jsx(h,{padding:g});return r?o.jsx(d,{className:"resource-dialog",title:e("blocklet.publish.createResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:m?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:p,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:o.jsx(u,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:t})}):t}export{io as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,br as t}from"./index-lm42cyj2.js";function e(){return o.useContext(t)}export{e as u};
|