@abtnode/blocklet-services 1.16.41-beta-20250331-010247-966fcfb0 → 1.16.41
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-component-core-CE0nArG4.js +1 -1
- package/dist/assets/add-resource-BYM4JwzE.js +1 -1
- package/dist/assets/analytics-BXLe73MI.js +1 -1
- package/dist/assets/audit-logs-D8H5E0fC.js +1 -1
- package/dist/assets/complete-BNf0-iqY.js +1 -1
- package/dist/assets/component-1r0VSsqq.js +1 -1
- package/dist/assets/config-navigation-DtN0_qFZ.js +1 -1
- package/dist/assets/connect-BfSOEYV-.js +1 -1
- package/dist/assets/dashboard-C_Q4TjPa.js +2 -2
- package/dist/assets/email-mj0bVFDS.js +1 -1
- package/dist/assets/exchange-passport--DeUPzbW.js +1 -1
- package/dist/assets/index-B4Q2DAdn.js +1 -1
- package/dist/assets/index-BJ2lJo7L.js +1 -1
- package/dist/assets/index-BsUr7wGb.js +1 -1
- package/dist/assets/index-C44fECmB.js +1 -1
- package/dist/assets/index-CGK3FEjY.js +1 -1
- package/dist/assets/index-CmKAznDh.js +1 -1
- package/dist/assets/index-eCY24sH9.js +1 -1
- package/dist/assets/index-gTQQ3SoE.js +1 -1
- package/dist/assets/invite-BBaF_vyc.js +1 -1
- package/dist/assets/issue-passport-DC-ly7xg.js +1 -1
- package/dist/assets/item-BSGXym2I.js +1 -1
- package/dist/assets/login-BQozrLDm.js +1 -1
- package/dist/assets/lost-passport-DkETH2Lu.js +1 -1
- package/dist/assets/open-window-BOl-kTC2.js +1 -1
- package/dist/assets/overview-Bxm05EH6.js +1 -1
- package/dist/assets/publish-resource-V53U1NNv.js +1 -1
- package/dist/assets/setup-7Gq9K_8k.js +2 -2
- package/dist/assets/start-BSUY3DBl.js +1 -1
- package/package.json +21 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a2 as Cl,j as o,E as N,a3 as xt,aa as He,a4 as Y,T as ge,t as qt,bp as Ei,bM as Si,I as ks,bD as Os,bS as Is,z as Cs,bg as Rl,b4 as Rs,bn as Pl,M as Tr,bw as Ll,bx as _l,by as Nl,bs as Al,ad as Ps,L as Dl,b3 as Ml,b1 as Fl,ak as Ti,a5 as Ls,a7 as Bl,ae as rt,e as ir,bF as $l,x as or,R as _s,W as Ns,an as As,bN as Ds,ag as Ul,ab as zt,bf as jo,A as ko,$ as Wl,P as zl,G as ql,v as Kl,a0 as Vl,D as Gl,K as Oo}from"./vendor-mui-core-DxqV1NVn.js";import{r as M,g as ji,f as Hl,k as Xl,a as ki,e as Se,b as Mt,l as Yl}from"./vendor-react-DoD83n6N.js";import{j as Ms,d as Ql,S as Jl,s as Fs,A as Zl}from"./item-BSGXym2I.js";import{r as ec,B as dt,ak as Oi,Q as Bs,p as $s,u as gt,i as pt,a as tc,l as nc,aj as jr,a$ as rc,am as Us,be as Io,ap as ic,W as Ii,C as oc,s as Vt,V as xr,aw as Co,af as Ws,bf as gr,f as Ci,b4 as zs,g as qs,Y as sc,bg as ac,ai as oi,bh as lc}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{A as Pn,f as Dt,Z as cc,_ as uc,h as kt,$ as dc,E as hc,a0 as fc,a1 as pc,a2 as mc,D as kr,a3 as Ks,X as gc,a4 as vc,a5 as yc,a6 as bc,a7 as cr,a8 as Ro,a9 as xc}from"./index-BsUr7wGb.js";import{j as Po,f as wc,E as Or,g as Ec,h as Sc,k as Tc,L as jc,S as kc}from"./vendor-arcblock-DvaaLvvM.js";import{L as Lo}from"./launch-result-message-ByEG8r_7.js";import{P as Vs}from"./page-header-Dm1v9v5q.js";import{c as ut,p as Oc,B as Ic,D as _o,y as Jn,Y as Gs,a0 as Cc,ab as Rc,H as Pc,o as Mr,x as Ri,W as Lc,ac as _c,ad as Nc,ae as Ac,z as Gn,af as Dc,b as Mc}from"./vendor-utils-DR57WNxP.js";import{u as Fc,C as Bc}from"./config-space-DlwZewcm.js";import{R as Fr}from"./logo-uploader-CUQ3aWZJ.js";import{S as $c}from"./index-BVOYP6aR.js";import{s as Hs,h as Uc,w as Wc,f as zc,a as qc,b as Kc,c as Vc,M as Gc}from"./index-m8CaSxXx.js";import{m as sr,f as Hc,a as Xc,e as Xs,x as Yc}from"./vendor-hooks-sw5wvnca.js";import{g as Qc}from"./get-safe-url-
|
|
1
|
+
import{a2 as Cl,j as o,E as N,a3 as xt,aa as He,a4 as Y,T as ge,t as qt,bp as Ei,bM as Si,I as ks,bD as Os,bS as Is,z as Cs,bg as Rl,b4 as Rs,bn as Pl,M as Tr,bw as Ll,bx as _l,by as Nl,bs as Al,ad as Ps,L as Dl,b3 as Ml,b1 as Fl,ak as Ti,a5 as Ls,a7 as Bl,ae as rt,e as ir,bF as $l,x as or,R as _s,W as Ns,an as As,bN as Ds,ag as Ul,ab as zt,bf as jo,A as ko,$ as Wl,P as zl,G as ql,v as Kl,a0 as Vl,D as Gl,K as Oo}from"./vendor-mui-core-DxqV1NVn.js";import{r as M,g as ji,f as Hl,k as Xl,a as ki,e as Se,b as Mt,l as Yl}from"./vendor-react-DoD83n6N.js";import{j as Ms,d as Ql,S as Jl,s as Fs,A as Zl}from"./item-BSGXym2I.js";import{r as ec,B as dt,ak as Oi,Q as Bs,p as $s,u as gt,i as pt,a as tc,l as nc,aj as jr,a$ as rc,am as Us,be as Io,ap as ic,W as Ii,C as oc,s as Vt,V as xr,aw as Co,af as Ws,bf as gr,f as Ci,b4 as zs,g as qs,Y as sc,bg as ac,ai as oi,bh as lc}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{A as Pn,f as Dt,Z as cc,_ as uc,h as kt,$ as dc,E as hc,a0 as fc,a1 as pc,a2 as mc,D as kr,a3 as Ks,X as gc,a4 as vc,a5 as yc,a6 as bc,a7 as cr,a8 as Ro,a9 as xc}from"./index-BsUr7wGb.js";import{j as Po,f as wc,E as Or,g as Ec,h as Sc,k as Tc,L as jc,S as kc}from"./vendor-arcblock-DvaaLvvM.js";import{L as Lo}from"./launch-result-message-ByEG8r_7.js";import{P as Vs}from"./page-header-Dm1v9v5q.js";import{c as ut,p as Oc,B as Ic,D as _o,y as Jn,Y as Gs,a0 as Cc,ab as Rc,H as Pc,o as Mr,x as Ri,W as Lc,ac as _c,ad as Nc,ae as Ac,z as Gn,af as Dc,b as Mc}from"./vendor-utils-DR57WNxP.js";import{u as Fc,C as Bc}from"./config-space-DlwZewcm.js";import{R as Fr}from"./logo-uploader-CUQ3aWZJ.js";import{S as $c}from"./index-BVOYP6aR.js";import{s as Hs,h as Uc,w as Wc,f as zc,a as qc,b as Kc,c as Vc,M as Gc}from"./index-m8CaSxXx.js";import{m as sr,f as Hc,a as Xc,e as Xs,x as Yc}from"./vendor-hooks-sw5wvnca.js";import{g as Qc}from"./get-safe-url-BKl2A9x2.js";import{p as Jc}from"./index-CJCg9yIK.js";import{r as Zc}from"./Google-DNUuYFIA.js";import{I as No}from"./index-BZvVDfZ4.js";import{u as eu}from"./session-6ZeN-aF2.js";import{W as tu}from"./did-address-BC-0j4Pt.js";import{_ as Ys}from"./useLocalStorage-Dd4pybDP.js";import{f as Qs}from"./format-error-LAoTjvJe.js";import{a as Ao}from"./api-D9Yi7Zdr.js";import{d as nu,a as ru,v as iu,e as ou}from"./util-C_BCTHfw.js";import{u as Js}from"./use-mobile-CUT5hy9q.js";import{C as su}from"./content-layout-7vu3yv_f.js";import{C as au,D as lu,a as cu}from"./connect-to-CzffwD9G.js";import{d as uu}from"./ArrowDropDown-odHjNJIs.js";import{d as du}from"./ChevronLeft-Dv7rlUf5.js";import{d as hu}from"./ChevronRight-CWeJn1iz.js";const lg="blocklet-add-component-registry",cg="server-add-registry",ug=e=>`resource-${e}-add-registry`;var Pi={},fu=Cl;Object.defineProperty(Pi,"__esModule",{value:!0});var Zs=Pi.default=void 0,pu=fu(ec()),mu=o;Zs=Pi.default=(0,pu.default)((0,mu.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function ea(e){const{info:t}=Pn();return M.useMemo(()=>{var n,r,i;return!e||!((n=e.docker)!=null&&n.image)||(r=e.docker)!=null&&r.image&&((i=e.docker)!=null&&i.runBaseScript)?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:t.enableDocker&&t.enableDockerNetwork},[e,t])}function Li({disabled:e,children:t,onConfirm:n}){return M.useEffect(()=>{if(e)return()=>{};const r=i=>{i.code==="Enter"&&(i.metaKey===!0||i.ctrlKey===!0)&&(i.preventDefault(),i.stopPropagation(),n())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,n]),t}Li.propTypes={disabled:N.bool,children:N.any.isRequired,onConfirm:N.func.isRequired};Li.defaultProps={disabled:!1};function _i({onContinue:e,nextDisabled:t,launching:n,texts:r,description:i}){const[s,a]=M.useState(!1),c=()=>a(f=>!f);return o.jsxs(o.Fragment,{children:[o.jsx(gu,{children:o.jsxs(Li,{disabled:t,onConfirm:e,children:[o.jsx("div",{className:"eula-trigger",onClick:c,children:r.listenName}),o.jsx(dt,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?o.jsxs(o.Fragment,{children:[o.jsx(xt,{size:14}),r.launchingText]}):r.buttonNext})]})}),o.jsx(Oi,{open:s,title:r.listenName,onClose:()=>a(!1),children:i})]})}_i.propTypes={onContinue:N.func.isRequired,nextDisabled:N.bool,launching:N.bool,description:N.any,texts:N.object};_i.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const gu=He.div`
|
|
2
2
|
margin: 0 auto;
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as B,j as h}from"./vendor-mui-core-DxqV1NVn.js";import{l as L,r}from"./vendor-react-DoD83n6N.js";import{y as W,D as O}from"./vendor-utils-DR57WNxP.js";import{u as A,ak as T}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{l as w,u as _,s as F}from"./vendor-hooks-sw5wvnca.js";import{A as K,S as $}from"./add-component-core-CE0nArG4.js";import{o as z,M as G}from"./index-BsUr7wGb.js";import"./lottie-web-B6s7dDoL.js";import"./item-BSGXym2I.js";import"./vendor-arcblock-DvaaLvvM.js";import"./format-error-LAoTjvJe.js";import"./Launch-BUTOr3cR.js";import"./Done-C1TA1wbA.js";import"./DeleteOutline-Cr-TyrUV.js";import"./delete-confirm-BTaU_6Kx.js";import"./click-to-copy-B0HMuCN_.js";import"./shorten-label-DkFTGSoy.js";import"./confirm-DmMN-34s.js";import"./session-6ZeN-aF2.js";import"./get-safe-url-
|
|
1
|
+
import{t as B,j as h}from"./vendor-mui-core-DxqV1NVn.js";import{l as L,r}from"./vendor-react-DoD83n6N.js";import{y as W,D as O}from"./vendor-utils-DR57WNxP.js";import{u as A,ak as T}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{l as w,u as _,s as F}from"./vendor-hooks-sw5wvnca.js";import{A as K,S as $}from"./add-component-core-CE0nArG4.js";import{o as z,M as G}from"./index-BsUr7wGb.js";import"./lottie-web-B6s7dDoL.js";import"./item-BSGXym2I.js";import"./vendor-arcblock-DvaaLvvM.js";import"./format-error-LAoTjvJe.js";import"./Launch-BUTOr3cR.js";import"./Done-C1TA1wbA.js";import"./DeleteOutline-Cr-TyrUV.js";import"./delete-confirm-BTaU_6Kx.js";import"./click-to-copy-B0HMuCN_.js";import"./shorten-label-DkFTGSoy.js";import"./confirm-DmMN-34s.js";import"./session-6ZeN-aF2.js";import"./get-safe-url-BKl2A9x2.js";import"./did-address-BC-0j4Pt.js";import"./launch-result-message-ByEG8r_7.js";import"./page-header-Dm1v9v5q.js";import"./config-space-DlwZewcm.js";import"./api-D9Yi7Zdr.js";import"./logo-uploader-CUQ3aWZJ.js";import"./index-tUQxVYYQ.js";import"./index-BVOYP6aR.js";import"./Google-DNUuYFIA.js";import"./index-m8CaSxXx.js";import"./index-CJCg9yIK.js";import"./index-BZvVDfZ4.js";import"./useLocalStorage-Dd4pybDP.js";import"./util-C_BCTHfw.js";import"./use-mobile-CUT5hy9q.js";import"./content-layout-7vu3yv_f.js";import"./connect-to-CzffwD9G.js";import"./ArrowDropDown-odHjNJIs.js";import"./ChevronLeft-Dv7rlUf5.js";import"./ChevronRight-CWeJn1iz.js";function ke(){var d;const{t:f}=A(),{blocklet:i}=z(),{componentDid:s}=L(),g=B(e=>e.breakpoints.down("md")),o=new URL(window.location.href),C=o.searchParams.get("mode")==="dialog",c=o.searchParams.get("resourceType")||"",l=o.searchParams.get("resourceDid")||s,R=o.searchParams.get("store")||"",y=o.searchParams.get("showFromUrl")!=="false",S=o.searchParams.get("showResourcesSwitch")!=="false",D=o.searchParams.get("enableRunBackground")!=="false",E=o.searchParams.get("showCategory")!=="false",n=(d=i==null?void 0:i.meta)==null?void 0:d.did,m=R.split(",").filter(Boolean).map(e=>{try{return new URL(e.startsWith("http")?e:`https://${e}`).origin}catch(t){return console.error(t),null}}).filter(Boolean),[P,U]=r.useState(m.map(e=>({url:e,name:e.replace("https://","")}))),[b,x]=r.useState(null),[M,j]=r.useState("");r.useEffect(()=>{(async()=>{try{const e=await Promise.all(m.map(async t=>{const a=W(t,"/api/store.json"),{data:v}=await O.get(a);return{url:t,name:v.name}}));U(e||[])}catch(e){console.error(e)}})()},[m.join(",")]);const k=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const e=G();return n&&e.connect(),()=>{n&&e.isConnected()&&e.disconnect()}},[n]),w(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const p=_(e=>{var t,a;((t=e.data)==null?void 0:t.event)==="resourceDialog.select"&&((a=e.data)==null?void 0:a.componentDid)===s&&(x(e.data.data),j(e.data.storeUrl))});w(()=>{window.addEventListener("message",p)}),F(()=>{window.removeEventListener("message",p)});const u=({inDialog:e=!0}={})=>h.jsx(K,{stores:P,selectedMeta:b,storeUrl:M,resourceType:c,resourceDid:l,mode:"embed",inDialog:e,storageKey:$(`${c}+${l}`),showResourcesSwitch:S,showFromUrl:y,enableRunBackground:D,showCategory:E});return C?h.jsx(T,{className:"resource-dialog",title:f("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:g?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(e,t)=>{t!=="backdropClick"&&k()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:u()}):u({inDialog:!1})}export{ke as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as m,e as G,j as s,bF as F,T as L,a4 as w,aa as U,bf as C,a5 as S,c0 as X,c1 as v}from"./vendor-mui-core-DxqV1NVn.js";import{r as f,f as H}from"./vendor-react-DoD83n6N.js";import{u as P,Y as tt,i as et,a3 as st,aZ as nt,aq as at}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{T as it}from"./traffic-CJDIGmp5.js";import{p as rt}from"./index-DyTFEgKr.js";import{ax as q,aw as O,A as ot,D as Y,f as z,aF as lt,o as ct}from"./index-BsUr7wGb.js";import{z as B,aH as mt}from"./vendor-utils-DR57WNxP.js";import{P as D}from"./vendor-arcblock-DvaaLvvM.js";import{E as Z}from"./index-79U1RPaq.js";import{B as ut}from"./bundle-avatar-DHwmIozH.js";import{B as pt}from"./dashboard-C_Q4TjPa.js";import{L as dt}from"./list-header-BmTDmRY0.js";import"./vendor-hooks-sw5wvnca.js";import"./lottie-web-B6s7dDoL.js";import"./useAsyncRetry-B7SbzXVI.js";import"./useAsync-DM8qaMe4.js";import"./iframe-B9mCpo4I.js";import"./LaunchOutlined-QHq-RUJt.js";import"./ChevronLeft-Dv7rlUf5.js";import"./ChevronRight-CWeJn1iz.js";import"./index-BMSA5TdD.js";import"./format-error-LAoTjvJe.js";import"./vendor-mui-x-BjL1xCkk.js";import"./useLocalStorage-Dd4pybDP.js";import"./confirm-DmMN-34s.js";import"./PlayArrow-D7cGSxeN.js";import"./get-safe-url-QFq5JNoE.js";import"./session-6ZeN-aF2.js";import"./InfoOutlined-CEUhR4DY.js";import"./useSetState-BL3ktMon.js";const _=a=>{const h=new Date(Math.min(...a)),r=(new Date(Math.max(...a))-h)/(1e3*60);return c=>{if(r<=10){const e=(a.length-a.length%r)/r;return c%e===0}const o=(a.length-a.length%6)/6;return c%o===0}},R=a=>`${a}%`;function N({title:a,cpus:h,currentLoad:l,history:u,empty:r,onHover:c,hoverIndex:i}){const{t:o,locale:x}=P(),e=G(),t=f.useRef(null),n=B(u)?[]:u.map(d=>q(d.date,"HH:mm",x)),j=`${a||o("common.cpu")} (${Math.floor(l||0)}%)`,T=f.useCallback(()=>{c==null||c(null)},[c]);if(f.useEffect(()=>{if(!t.current||(i==null?void 0:i.ref)===t)return;const d=t.current.getEchartsInstance(),$=i==null?void 0:i.seriesIndex,M=n.findIndex(g=>g===(i==null?void 0:i.dataValue));i&&M!==-1?d.dispatchAction({type:"showTip",seriesIndex:$,dataIndex:M}):(d.dispatchAction({type:"hideTip"}),d.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:-1}))},[i]),!B(u)){const M={tooltip:{trigger:"axis",formatter(g){const E=g[0].data,{seriesIndex:y,dataIndex:b}=g[0];return c==null||c({seriesIndex:y,dataIndex:b,dataValue:n[b],ref:(i==null?void 0:i.ref)||t}),`${g[0].name}: <b>${R(E)}</b>`}},grid:{top:"48px",left:"16px",right:"16px",bottom:"0px",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:n,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{interval:_(u.map(g=>new Date(g.date)))}},yAxis:{type:"value",axisTick:{show:!1},splitLine:{show:!1},min:0,max:100,interval:Math.ceil(50),axisLabel:{formatter:R}},visualMap:{show:!1,type:"piecewise",dimension:1,seriesIndex:0,pieces:[{max:80,color:"#e9f8f9"},{min:80,max:100,color:e.palette.warning.light},{min:100,color:"#ff4d4f"}]},series:[{name:"CPU Usage",type:"line",smooth:!0,symbol:"none",lineStyle:{color:e.palette.primary.main,width:2.5},areaStyle:{},itemStyle:{},emphasis:{disabled:!0},data:u.map(g=>g.value),markLine:{silent:!0,symbol:["none","none"],lineStyle:{color:"#ff4d4f",type:"dashed",width:1.5},label:{formatter:`${R(100)}`,position:"insideEndTop"},data:[{yAxis:100},{yAxis:80,lineStyle:{color:e.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${R(80)}`,position:"insideEndTop"}}]}}]};return s.jsxs(F,{sx:{p:1,position:"relative"},onMouseLeave:T,children:[s.jsx(L,{sx:{position:"absolute",top:8,left:16,zIndex:10},fontSize:"16px",fontWeight:"bold",color:"text.secondary",children:j}),s.jsx(Z,{ref:t,option:M,style:{width:"100%",height:"200px"},onEvents:{globalout:T}}),s.jsxs(w,{sx:{ml:2,mt:1,fontSize:12},color:"text.secondary",children:[`${o("system.cores")}: ${(h==null?void 0:h.length)||0}`," "]})]})}return r}N.propTypes={title:m.string,cpus:m.array,currentLoad:m.number,history:m.array,empty:m.node,onHover:m.func,hoverIndex:m.number};N.defaultProps={title:"",cpus:[],currentLoad:0,history:[],empty:null,onHover:()=>{},hoverIndex:null};function V({instanceCount:a,title:h,total:l,used:u,history:r,empty:c,onHover:i,hoverIndex:o}){const{t:x,locale:e}=P(),t=G(),n=!!l,j=l-u,T=n?`(${O(u)}, ${Math.floor(u/l*100)}%)`:"",d=f.useRef(null),$=`${h||x("common.memory")} ${T}`,M=B(r)?[]:r.map(y=>q(y.date,"HH:mm",e));f.useEffect(()=>{if(!d.current||(o==null?void 0:o.ref)===d)return;const y=d.current.getEchartsInstance(),b=o==null?void 0:o.seriesIndex,k=M.findIndex(p=>p===(o==null?void 0:o.dataValue));o&&k!==-1?y.dispatchAction({type:"showTip",seriesIndex:b,dataIndex:k}):(y.dispatchAction({type:"hideTip"}),y.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:-1}))},[o==null?void 0:o.dataIndex]);const g=f.useCallback(()=>{i==null||i(null)},[i]);f.useEffect(()=>{if(d.current){const y=d.current.getEchartsInstance(),b=y.getDom(),k=p=>{g(p)};return b.addEventListener("mouseleave",k),()=>{b&&b.removeEventListener("mouseleave",k),y&&y.dispose()}}},[g]);const E=[];if(a&&E.push({title:x("system.instances"),metric:a}),n&&E.push({title:x("system.free"),metric:D(j,{short:!0,iec:!0})}),!B(r)){const y=Math.max(...r.map(p=>p.value),l,0),b=Math.ceil(l*.8),k={tooltip:{trigger:"axis",formatter(p){const A=p[0].data,K=D(A,{short:!0,iec:!0}),{seriesIndex:Q,dataIndex:W}=p[0];return i==null||i({seriesIndex:Q,dataIndex:W,dataValue:M[W],ref:(o==null?void 0:o.ref)||d}),`${p[0].name}: <b>${K}</b>`}},grid:{top:"48px",left:"16px",right:"16px",bottom:"0px",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:M,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{interval:_(r.map(p=>new Date(p.date)))}},yAxis:{type:"value",axisTick:{show:!1},splitLine:{show:!1},min:0,max:y,interval:Math.ceil(y/2),axisLabel:{formatter:p=>D(p,{short:!0,iec:!0}),padding:[5,0,0,0]}},visualMap:{show:!1,type:"piecewise",dimension:1,seriesIndex:0,pieces:[{max:b,color:"#e9f8f9"},{min:b,max:l,color:t.palette.warning.light},{min:l,color:"#ff4d4f"}]},series:[{name:"Memory Usage",type:"line",smooth:!0,symbol:"none",lineStyle:{color:t.palette.primary.main,width:2.5},areaStyle:{},itemStyle:{},emphasis:{disabled:!0},data:r.map(p=>p.value),markLine:{silent:!0,symbol:["none","none"],data:[{yAxis:l,lineStyle:{color:"#ff4d4f",type:"dashed",width:1.5},label:{formatter:`${D(l,{short:!0,iec:!0})}`,position:"insideEndTop"}},{yAxis:b,lineStyle:{color:t.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${D(b,{short:!0,iec:!0})}`,position:"insideEndTop"}}]}}]};return s.jsxs(F,{sx:{p:1,position:"relative"},onMouseLeave:g,children:[s.jsx(L,{sx:{position:"absolute",top:8,left:16,zIndex:10},fontSize:"16px",fontWeight:"bold",color:"text.secondary",children:$}),s.jsx(Z,{ref:d,option:k,style:{width:"100%",height:"200px"}}),s.jsx(w,{sx:{ml:2,mt:1,fontSize:12},color:"text.secondary",children:E.map((p,A)=>s.jsxs(w,{sx:{marginLeft:A===0?0:1,display:"inline-flex"},children:[p.title,": ",p.metric]},p.title))})]})}return c}V.propTypes={title:m.string,instanceCount:m.number,total:m.number,used:m.number,history:m.array,empty:m.node,onHover:m.func,hoverIndex:m.number};V.defaultProps={title:"",instanceCount:null,total:null,used:null,history:[],empty:null,onHover:()=>{},hoverIndex:null};function I({blocklet:a,...h}){const{t:l}=P(),{info:u}=ot(),{runtimeHistory:r}=Y(),[c,i]=f.useState(null),o=f.useCallback(e=>a.status!=="running"?s.jsx(L,{children:l("blocklet.runtimeInfo.noRunning")}):e.length?null:s.jsx(tt,{children:l("common.empty")}),[a.status,l]),x=f.useCallback(e=>{i(e)},[]);return r.length===0?s.jsx(L,{children:l("blocklet.runtimeInfo.noRunning")}):s.jsxs(ft,{component:"div",...h,children:[s.jsxs(C,{className:"page-metrics",container:!0,spacing:5,children:[s.jsx(C,{item:!0,xs:12,sx:{pt:"16px !important"},children:s.jsx(L,{fontSize:"16px",fontWeight:"bold",children:"CPU"})}),r==null?void 0:r.map(e=>{var t,n;return s.jsx(C,{item:!0,lg:4,md:6,sm:6,xs:12,sx:{pt:"16px !important"},children:s.jsx(N,{title:`${e.name} CPU`,empty:o(e.cpu),currentLoad:((t=e.appRuntimeInfo)==null?void 0:t.cpuUsage)||0,cpus:((n=e.appRuntimeInfo)==null?void 0:n.cpus)||[],history:e.cpu,onHover:x,hoverIndex:c,style:{height:150}})},`${e.key}-cpu`)})]}),s.jsxs(C,{className:"page-metrics",container:!0,spacing:5,sx:{mt:1},children:[s.jsx(C,{item:!0,xs:12,sx:{pt:"16px !important"},children:s.jsx(L,{fontSize:"16px",fontWeight:"bold",children:"Memory"})}),r==null?void 0:r.map(e=>{var t,n,j;return s.jsx(C,{item:!0,lg:4,md:6,sm:6,xs:12,sx:{pt:"16px !important"},children:s.jsx(V,{title:`${e.name} Memory`,empty:o(e.memory),total:(t=u.runtimeConfig)!=null&&t.blockletMaxMemoryLimit?D.parseSize(`${u.runtimeConfig.blockletMaxMemoryLimit*(e.key===((n=a==null?void 0:a.meta)==null?void 0:n.did)?r.length-1:1)}MiB`):0,used:((j=e.appRuntimeInfo)==null?void 0:j.memoryUsage)||0,history:e.memory,onHover:x,hoverIndex:c,style:{height:150}})},`${e.key}-memory`)})]})]})}I.propTypes={blocklet:m.object.isRequired,cpuHistory:m.arrayOf(m.shape({date:m.number,value:m.number})),memoryHistory:m.arrayOf(m.shape({date:m.number,value:m.number}))};I.defaultProps={cpuHistory:[],memoryHistory:[]};const ft=U(L)``;function J(){const{t:a,locale:h}=P(),[l,u]=f.useState(6),{blocklet:r,actions:{refreshBlocklet:c}}=Y(),i=f.useMemo(()=>{const e=[];return z.forEachBlockletSync(r,(t,{ancestors:n,id:j,level:T})=>{var d;(d=t==null?void 0:t.meta)!=null&&d.did&&t.meta.did!==r.meta.did&&e.push({type:"blocklet",groupId:r.meta.did,groupName:z.getDisplayName(r),id:j,name:z.getDisplayName(t,!0),blocklet:r,component:t,level:T-1>=0?T-1:0,runtimeInfo:t.runtimeInfo,ancestors:n})}),e},[r]);f.useEffect(()=>{c({hours:l});const e=setInterval(()=>{c({hours:l})},1e3*10);return()=>{clearInterval(e)}},[l]);const o=e=>rt(Number(e||0),{locale:lt(h)}),x=[{label:a("common.name"),name:"name",options:{customBodyRenderLite(e){const{name:t,component:n,level:j,ancestors:T}=i[e];return s.jsxs(w,{display:"flex",alignItems:"center",pl:j*2,children:[s.jsx(ut,{size:20,blocklet:n,ancestors:T}),s.jsx(w,{ml:1,children:t}),s.jsx(pt,{variant:"pin",style:{marginLeft:8},status:n.status,source:n.source,progress:n.progress})]})}}},{label:a("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(e){const{runtimeInfo:t,component:n}=i[e];return!(n!=null&&n.status)||n.status!=="running"?s.jsx(S,{title:a("common.noData"),children:"--"}):o(t==null?void 0:t.uptime)}}},{label:a("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(e){const{runtimeInfo:t,component:n}=i[e];return!(n!=null&&n.status)||n.status!=="running"?s.jsx(S,{title:a("common.noData"),children:"--"}):O((t==null?void 0:t.memoryUsage)||0)}}},{label:a("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(e){const{runtimeInfo:t,component:n}=i[e];return!(n!=null&&n.status)||n.status!=="running"?s.jsx(S,{title:a("common.noData"),children:"--"}):`${((t==null?void 0:t.cpuUsage)||0).toFixed(1)}%`}}},{label:a("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(e){const{runtimeInfo:t}=i[e];return t!=null&&t.uptime?s.jsxs(w,{display:"flex",alignItems:"center",children:[s.jsx(et,{icon:t!=null&&t.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),s.jsx(w,{ml:1,children:t!=null&&t.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:a("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid",options:{customBodyRenderLite(e){const{runtimeInfo:t,component:n}=i[e];return!(n!=null&&n.status)||n.status!=="running"?s.jsx(S,{title:a("common.noData"),children:"--"}):t==null?void 0:t.pid}}},{label:a("blocklet.runtimeInfo.port"),name:"runtimeInfo.port",options:{customBodyRenderLite(e){const{runtimeInfo:t,component:n}=i[e];return!(n!=null&&n.status)||n.status!=="running"?s.jsx(S,{title:a("common.noData"),children:"--"}):t==null?void 0:t.port}}}];return s.jsxs(ht,{component:"div",children:[s.jsxs(w,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[s.jsx(L,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:a("analytics.trend")}),s.jsx(X,{size:"small",exclusive:!0,value:l,onChange:(e,t)=>{mt(t)&&u(t)},children:[1,3,6,12,24].map(e=>s.jsxs(v,{value:e,children:[e,"H"]},e))})]}),s.jsx(w,{children:s.jsx(I,{blocklet:r})}),s.jsx(w,{mt:3,children:s.jsx(st,{title:a("analytics.detail"),className:"monitor-table",locale:h,data:i,columns:x,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]})}J.propTypes={};const ht=U(L)``;function _t(){const{t:a}=f.useContext(nt),{did:h,client:l}=ct(),[u,r]=H(),[c,i]=f.useState(u.get("tab")||"traffic"),o=n=>{i(n)};f.useEffect(()=>{u.set("tab",c),r(u,{replace:!0})},[c]);const x=[{label:a("common.traffic"),value:"traffic"},{label:a("common.runtime"),value:"runtime"}],e={traffic:it,runtime:J},t=e[c]||e.traffic;return s.jsxs(yt,{children:[s.jsx(dt,{left:s.jsx(at,{tabs:x,current:c,onChange:o})}),s.jsx("div",{className:"page-content",children:f.isValidElement(t)?t:s.jsx(t,{client:l,did:h})})]},c)}const yt=U.main`
|
|
1
|
+
import{E as m,e as G,j as s,bF as F,T as L,a4 as w,aa as U,bf as C,a5 as S,c0 as X,c1 as v}from"./vendor-mui-core-DxqV1NVn.js";import{r as f,f as H}from"./vendor-react-DoD83n6N.js";import{u as P,Y as tt,i as et,a3 as st,aZ as nt,aq as at}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{T as it}from"./traffic-CJDIGmp5.js";import{p as rt}from"./index-DyTFEgKr.js";import{ax as q,aw as O,A as ot,D as Y,f as z,aF as lt,o as ct}from"./index-BsUr7wGb.js";import{z as B,aH as mt}from"./vendor-utils-DR57WNxP.js";import{P as D}from"./vendor-arcblock-DvaaLvvM.js";import{E as Z}from"./index-79U1RPaq.js";import{B as ut}from"./bundle-avatar-DHwmIozH.js";import{B as pt}from"./dashboard-C_Q4TjPa.js";import{L as dt}from"./list-header-BmTDmRY0.js";import"./vendor-hooks-sw5wvnca.js";import"./lottie-web-B6s7dDoL.js";import"./useAsyncRetry-B7SbzXVI.js";import"./useAsync-DM8qaMe4.js";import"./iframe-B9mCpo4I.js";import"./LaunchOutlined-QHq-RUJt.js";import"./ChevronLeft-Dv7rlUf5.js";import"./ChevronRight-CWeJn1iz.js";import"./index-BMSA5TdD.js";import"./format-error-LAoTjvJe.js";import"./vendor-mui-x-BjL1xCkk.js";import"./useLocalStorage-Dd4pybDP.js";import"./confirm-DmMN-34s.js";import"./PlayArrow-D7cGSxeN.js";import"./get-safe-url-BKl2A9x2.js";import"./session-6ZeN-aF2.js";import"./InfoOutlined-CEUhR4DY.js";import"./useSetState-BL3ktMon.js";const _=a=>{const h=new Date(Math.min(...a)),r=(new Date(Math.max(...a))-h)/(1e3*60);return c=>{if(r<=10){const e=(a.length-a.length%r)/r;return c%e===0}const o=(a.length-a.length%6)/6;return c%o===0}},R=a=>`${a}%`;function N({title:a,cpus:h,currentLoad:l,history:u,empty:r,onHover:c,hoverIndex:i}){const{t:o,locale:x}=P(),e=G(),t=f.useRef(null),n=B(u)?[]:u.map(d=>q(d.date,"HH:mm",x)),j=`${a||o("common.cpu")} (${Math.floor(l||0)}%)`,T=f.useCallback(()=>{c==null||c(null)},[c]);if(f.useEffect(()=>{if(!t.current||(i==null?void 0:i.ref)===t)return;const d=t.current.getEchartsInstance(),$=i==null?void 0:i.seriesIndex,M=n.findIndex(g=>g===(i==null?void 0:i.dataValue));i&&M!==-1?d.dispatchAction({type:"showTip",seriesIndex:$,dataIndex:M}):(d.dispatchAction({type:"hideTip"}),d.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:-1}))},[i]),!B(u)){const M={tooltip:{trigger:"axis",formatter(g){const E=g[0].data,{seriesIndex:y,dataIndex:b}=g[0];return c==null||c({seriesIndex:y,dataIndex:b,dataValue:n[b],ref:(i==null?void 0:i.ref)||t}),`${g[0].name}: <b>${R(E)}</b>`}},grid:{top:"48px",left:"16px",right:"16px",bottom:"0px",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:n,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{interval:_(u.map(g=>new Date(g.date)))}},yAxis:{type:"value",axisTick:{show:!1},splitLine:{show:!1},min:0,max:100,interval:Math.ceil(50),axisLabel:{formatter:R}},visualMap:{show:!1,type:"piecewise",dimension:1,seriesIndex:0,pieces:[{max:80,color:"#e9f8f9"},{min:80,max:100,color:e.palette.warning.light},{min:100,color:"#ff4d4f"}]},series:[{name:"CPU Usage",type:"line",smooth:!0,symbol:"none",lineStyle:{color:e.palette.primary.main,width:2.5},areaStyle:{},itemStyle:{},emphasis:{disabled:!0},data:u.map(g=>g.value),markLine:{silent:!0,symbol:["none","none"],lineStyle:{color:"#ff4d4f",type:"dashed",width:1.5},label:{formatter:`${R(100)}`,position:"insideEndTop"},data:[{yAxis:100},{yAxis:80,lineStyle:{color:e.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${R(80)}`,position:"insideEndTop"}}]}}]};return s.jsxs(F,{sx:{p:1,position:"relative"},onMouseLeave:T,children:[s.jsx(L,{sx:{position:"absolute",top:8,left:16,zIndex:10},fontSize:"16px",fontWeight:"bold",color:"text.secondary",children:j}),s.jsx(Z,{ref:t,option:M,style:{width:"100%",height:"200px"},onEvents:{globalout:T}}),s.jsxs(w,{sx:{ml:2,mt:1,fontSize:12},color:"text.secondary",children:[`${o("system.cores")}: ${(h==null?void 0:h.length)||0}`," "]})]})}return r}N.propTypes={title:m.string,cpus:m.array,currentLoad:m.number,history:m.array,empty:m.node,onHover:m.func,hoverIndex:m.number};N.defaultProps={title:"",cpus:[],currentLoad:0,history:[],empty:null,onHover:()=>{},hoverIndex:null};function V({instanceCount:a,title:h,total:l,used:u,history:r,empty:c,onHover:i,hoverIndex:o}){const{t:x,locale:e}=P(),t=G(),n=!!l,j=l-u,T=n?`(${O(u)}, ${Math.floor(u/l*100)}%)`:"",d=f.useRef(null),$=`${h||x("common.memory")} ${T}`,M=B(r)?[]:r.map(y=>q(y.date,"HH:mm",e));f.useEffect(()=>{if(!d.current||(o==null?void 0:o.ref)===d)return;const y=d.current.getEchartsInstance(),b=o==null?void 0:o.seriesIndex,k=M.findIndex(p=>p===(o==null?void 0:o.dataValue));o&&k!==-1?y.dispatchAction({type:"showTip",seriesIndex:b,dataIndex:k}):(y.dispatchAction({type:"hideTip"}),y.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:-1}))},[o==null?void 0:o.dataIndex]);const g=f.useCallback(()=>{i==null||i(null)},[i]);f.useEffect(()=>{if(d.current){const y=d.current.getEchartsInstance(),b=y.getDom(),k=p=>{g(p)};return b.addEventListener("mouseleave",k),()=>{b&&b.removeEventListener("mouseleave",k),y&&y.dispose()}}},[g]);const E=[];if(a&&E.push({title:x("system.instances"),metric:a}),n&&E.push({title:x("system.free"),metric:D(j,{short:!0,iec:!0})}),!B(r)){const y=Math.max(...r.map(p=>p.value),l,0),b=Math.ceil(l*.8),k={tooltip:{trigger:"axis",formatter(p){const A=p[0].data,K=D(A,{short:!0,iec:!0}),{seriesIndex:Q,dataIndex:W}=p[0];return i==null||i({seriesIndex:Q,dataIndex:W,dataValue:M[W],ref:(o==null?void 0:o.ref)||d}),`${p[0].name}: <b>${K}</b>`}},grid:{top:"48px",left:"16px",right:"16px",bottom:"0px",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:M,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{interval:_(r.map(p=>new Date(p.date)))}},yAxis:{type:"value",axisTick:{show:!1},splitLine:{show:!1},min:0,max:y,interval:Math.ceil(y/2),axisLabel:{formatter:p=>D(p,{short:!0,iec:!0}),padding:[5,0,0,0]}},visualMap:{show:!1,type:"piecewise",dimension:1,seriesIndex:0,pieces:[{max:b,color:"#e9f8f9"},{min:b,max:l,color:t.palette.warning.light},{min:l,color:"#ff4d4f"}]},series:[{name:"Memory Usage",type:"line",smooth:!0,symbol:"none",lineStyle:{color:t.palette.primary.main,width:2.5},areaStyle:{},itemStyle:{},emphasis:{disabled:!0},data:r.map(p=>p.value),markLine:{silent:!0,symbol:["none","none"],data:[{yAxis:l,lineStyle:{color:"#ff4d4f",type:"dashed",width:1.5},label:{formatter:`${D(l,{short:!0,iec:!0})}`,position:"insideEndTop"}},{yAxis:b,lineStyle:{color:t.palette.warning.light,type:"dashed",width:1.5},label:{formatter:`${D(b,{short:!0,iec:!0})}`,position:"insideEndTop"}}]}}]};return s.jsxs(F,{sx:{p:1,position:"relative"},onMouseLeave:g,children:[s.jsx(L,{sx:{position:"absolute",top:8,left:16,zIndex:10},fontSize:"16px",fontWeight:"bold",color:"text.secondary",children:$}),s.jsx(Z,{ref:d,option:k,style:{width:"100%",height:"200px"}}),s.jsx(w,{sx:{ml:2,mt:1,fontSize:12},color:"text.secondary",children:E.map((p,A)=>s.jsxs(w,{sx:{marginLeft:A===0?0:1,display:"inline-flex"},children:[p.title,": ",p.metric]},p.title))})]})}return c}V.propTypes={title:m.string,instanceCount:m.number,total:m.number,used:m.number,history:m.array,empty:m.node,onHover:m.func,hoverIndex:m.number};V.defaultProps={title:"",instanceCount:null,total:null,used:null,history:[],empty:null,onHover:()=>{},hoverIndex:null};function I({blocklet:a,...h}){const{t:l}=P(),{info:u}=ot(),{runtimeHistory:r}=Y(),[c,i]=f.useState(null),o=f.useCallback(e=>a.status!=="running"?s.jsx(L,{children:l("blocklet.runtimeInfo.noRunning")}):e.length?null:s.jsx(tt,{children:l("common.empty")}),[a.status,l]),x=f.useCallback(e=>{i(e)},[]);return r.length===0?s.jsx(L,{children:l("blocklet.runtimeInfo.noRunning")}):s.jsxs(ft,{component:"div",...h,children:[s.jsxs(C,{className:"page-metrics",container:!0,spacing:5,children:[s.jsx(C,{item:!0,xs:12,sx:{pt:"16px !important"},children:s.jsx(L,{fontSize:"16px",fontWeight:"bold",children:"CPU"})}),r==null?void 0:r.map(e=>{var t,n;return s.jsx(C,{item:!0,lg:4,md:6,sm:6,xs:12,sx:{pt:"16px !important"},children:s.jsx(N,{title:`${e.name} CPU`,empty:o(e.cpu),currentLoad:((t=e.appRuntimeInfo)==null?void 0:t.cpuUsage)||0,cpus:((n=e.appRuntimeInfo)==null?void 0:n.cpus)||[],history:e.cpu,onHover:x,hoverIndex:c,style:{height:150}})},`${e.key}-cpu`)})]}),s.jsxs(C,{className:"page-metrics",container:!0,spacing:5,sx:{mt:1},children:[s.jsx(C,{item:!0,xs:12,sx:{pt:"16px !important"},children:s.jsx(L,{fontSize:"16px",fontWeight:"bold",children:"Memory"})}),r==null?void 0:r.map(e=>{var t,n,j;return s.jsx(C,{item:!0,lg:4,md:6,sm:6,xs:12,sx:{pt:"16px !important"},children:s.jsx(V,{title:`${e.name} Memory`,empty:o(e.memory),total:(t=u.runtimeConfig)!=null&&t.blockletMaxMemoryLimit?D.parseSize(`${u.runtimeConfig.blockletMaxMemoryLimit*(e.key===((n=a==null?void 0:a.meta)==null?void 0:n.did)?r.length-1:1)}MiB`):0,used:((j=e.appRuntimeInfo)==null?void 0:j.memoryUsage)||0,history:e.memory,onHover:x,hoverIndex:c,style:{height:150}})},`${e.key}-memory`)})]})]})}I.propTypes={blocklet:m.object.isRequired,cpuHistory:m.arrayOf(m.shape({date:m.number,value:m.number})),memoryHistory:m.arrayOf(m.shape({date:m.number,value:m.number}))};I.defaultProps={cpuHistory:[],memoryHistory:[]};const ft=U(L)``;function J(){const{t:a,locale:h}=P(),[l,u]=f.useState(6),{blocklet:r,actions:{refreshBlocklet:c}}=Y(),i=f.useMemo(()=>{const e=[];return z.forEachBlockletSync(r,(t,{ancestors:n,id:j,level:T})=>{var d;(d=t==null?void 0:t.meta)!=null&&d.did&&t.meta.did!==r.meta.did&&e.push({type:"blocklet",groupId:r.meta.did,groupName:z.getDisplayName(r),id:j,name:z.getDisplayName(t,!0),blocklet:r,component:t,level:T-1>=0?T-1:0,runtimeInfo:t.runtimeInfo,ancestors:n})}),e},[r]);f.useEffect(()=>{c({hours:l});const e=setInterval(()=>{c({hours:l})},1e3*10);return()=>{clearInterval(e)}},[l]);const o=e=>rt(Number(e||0),{locale:lt(h)}),x=[{label:a("common.name"),name:"name",options:{customBodyRenderLite(e){const{name:t,component:n,level:j,ancestors:T}=i[e];return s.jsxs(w,{display:"flex",alignItems:"center",pl:j*2,children:[s.jsx(ut,{size:20,blocklet:n,ancestors:T}),s.jsx(w,{ml:1,children:t}),s.jsx(pt,{variant:"pin",style:{marginLeft:8},status:n.status,source:n.source,progress:n.progress})]})}}},{label:a("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(e){const{runtimeInfo:t,component:n}=i[e];return!(n!=null&&n.status)||n.status!=="running"?s.jsx(S,{title:a("common.noData"),children:"--"}):o(t==null?void 0:t.uptime)}}},{label:a("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(e){const{runtimeInfo:t,component:n}=i[e];return!(n!=null&&n.status)||n.status!=="running"?s.jsx(S,{title:a("common.noData"),children:"--"}):O((t==null?void 0:t.memoryUsage)||0)}}},{label:a("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(e){const{runtimeInfo:t,component:n}=i[e];return!(n!=null&&n.status)||n.status!=="running"?s.jsx(S,{title:a("common.noData"),children:"--"}):`${((t==null?void 0:t.cpuUsage)||0).toFixed(1)}%`}}},{label:a("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(e){const{runtimeInfo:t}=i[e];return t!=null&&t.uptime?s.jsxs(w,{display:"flex",alignItems:"center",children:[s.jsx(et,{icon:t!=null&&t.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),s.jsx(w,{ml:1,children:t!=null&&t.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:a("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid",options:{customBodyRenderLite(e){const{runtimeInfo:t,component:n}=i[e];return!(n!=null&&n.status)||n.status!=="running"?s.jsx(S,{title:a("common.noData"),children:"--"}):t==null?void 0:t.pid}}},{label:a("blocklet.runtimeInfo.port"),name:"runtimeInfo.port",options:{customBodyRenderLite(e){const{runtimeInfo:t,component:n}=i[e];return!(n!=null&&n.status)||n.status!=="running"?s.jsx(S,{title:a("common.noData"),children:"--"}):t==null?void 0:t.port}}}];return s.jsxs(ht,{component:"div",children:[s.jsxs(w,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[s.jsx(L,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:a("analytics.trend")}),s.jsx(X,{size:"small",exclusive:!0,value:l,onChange:(e,t)=>{mt(t)&&u(t)},children:[1,3,6,12,24].map(e=>s.jsxs(v,{value:e,children:[e,"H"]},e))})]}),s.jsx(w,{children:s.jsx(I,{blocklet:r})}),s.jsx(w,{mt:3,children:s.jsx(st,{title:a("analytics.detail"),className:"monitor-table",locale:h,data:i,columns:x,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]})}J.propTypes={};const ht=U(L)``;function _t(){const{t:a}=f.useContext(nt),{did:h,client:l}=ct(),[u,r]=H(),[c,i]=f.useState(u.get("tab")||"traffic"),o=n=>{i(n)};f.useEffect(()=>{u.set("tab",c),r(u,{replace:!0})},[c]);const x=[{label:a("common.traffic"),value:"traffic"},{label:a("common.runtime"),value:"runtime"}],e={traffic:it,runtime:J},t=e[c]||e.traffic;return s.jsxs(yt,{children:[s.jsx(dt,{left:s.jsx(at,{tabs:x,current:c,onChange:o})}),s.jsx("div",{className:"page-content",children:f.isValidElement(t)?t:s.jsx(t,{client:l,did:h})})]},c)}const yt=U.main`
|
|
2
2
|
.page-header {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{W,r as U,b9 as N,u as V,bl as H,Y as Z,p as F}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{j as e,a2 as G,a4 as p,bi as q,T as w,a5 as K,I as $,a3 as Y,bl as J,bo as Q,bk as X,ak as ee,bK as te,aa as re}from"./vendor-mui-core-DxqV1NVn.js";import{p as oe}from"./util-YyWTpLT7.js";import{r as l,L as ae}from"./vendor-react-DoD83n6N.js";import{_ as se}from"./useLocalStorage-Dd4pybDP.js";import{A as O}from"./index-BsUr7wGb.js";import{M}from"./index-m8CaSxXx.js";import{I as ie}from"./vendor-arcblock-DvaaLvvM.js";import{d as ne}from"./InfoOutlined-CEUhR4DY.js";import{d as le}from"./vendor-utils-DR57WNxP.js";import{R as ce}from"./relative-time-RQnsWZQc.js";import{S as E}from"./shorten-label-DkFTGSoy.js";import{r as I}from"./index-fWGZM-oP.js";import{u as de}from"./dashboard-C_Q4TjPa.js";import"./vendor-hooks-sw5wvnca.js";import"./lottie-web-B6s7dDoL.js";import"./base32-BNpDT-6Q.js";import"./index-DyTFEgKr.js";import"./confirm-DmMN-34s.js";import"./format-error-LAoTjvJe.js";import"./PlayArrow-D7cGSxeN.js";import"./get-safe-url-
|
|
1
|
+
import{W,r as U,b9 as N,u as V,bl as H,Y as Z,p as F}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{j as e,a2 as G,a4 as p,bi as q,T as w,a5 as K,I as $,a3 as Y,bl as J,bo as Q,bk as X,ak as ee,bK as te,aa as re}from"./vendor-mui-core-DxqV1NVn.js";import{p as oe}from"./util-YyWTpLT7.js";import{r as l,L as ae}from"./vendor-react-DoD83n6N.js";import{_ as se}from"./useLocalStorage-Dd4pybDP.js";import{A as O}from"./index-BsUr7wGb.js";import{M}from"./index-m8CaSxXx.js";import{I as ie}from"./vendor-arcblock-DvaaLvvM.js";import{d as ne}from"./InfoOutlined-CEUhR4DY.js";import{d as le}from"./vendor-utils-DR57WNxP.js";import{R as ce}from"./relative-time-RQnsWZQc.js";import{S as E}from"./shorten-label-DkFTGSoy.js";import{r as I}from"./index-fWGZM-oP.js";import{u as de}from"./dashboard-C_Q4TjPa.js";import"./vendor-hooks-sw5wvnca.js";import"./lottie-web-B6s7dDoL.js";import"./base32-BNpDT-6Q.js";import"./index-DyTFEgKr.js";import"./confirm-DmMN-34s.js";import"./format-error-LAoTjvJe.js";import"./PlayArrow-D7cGSxeN.js";import"./get-safe-url-BKl2A9x2.js";import"./session-6ZeN-aF2.js";import"./useAsyncRetry-B7SbzXVI.js";import"./useAsync-DM8qaMe4.js";import"./useSetState-BL3ktMon.js";const T=l.createContext({}),{Provider:pe,Consumer:Ke}=T;function ue(){return localStorage.getItem("audit-log-page-size")&&Number(localStorage.getItem("audit-log-page-size"))||10}function fe({children:t,scope:o="",categories:i=[],showScope:c,scopeFormatter:m}){const{api:f,info:C}=O(),[x,L]=l.useState([]),[a,h]=l.useState({total:0,pageSize:ue(),pageCount:0,page:1}),[v,g]=l.useState(!1),[r,n]=l.useState(""),[d,z]=se(`audit-log-category-${o}`,"all"),s=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(S=>i.length?S.value==="all"||i.includes(S.value):!0),u=async({page:S=1,pageSize:k=20,silent:P=!0}={})=>{if(!v){P||g(!0);try{const b=await f.getAuditLogs({input:{paging:{page:S,pageSize:k},category:d==="all"?"":d,scope:o,actionOrContent:r}});c&&(b.list||[]).forEach(_=>{_.scope!==C.did&&(_.link=`/blocklets/${_.scope}/components`)}),L(b.list),h(b.paging),g(!1)}catch(b){W.error(b.message),g(!1)}}};l.useEffect(()=>{localStorage.setItem("audit-log-page-size",a.pageSize)},[a.pageSize]),l.useEffect(()=>{u({page:1,pageSize:a.pageSize,silent:!1})},[]),l.useEffect(()=>{u({page:1,pageSize:a.pageSize,silent:!1})},[d,r]);const j={loading:v,fetch:u,filter:{category:d,scope:o},categories:s,setCategory:z,data:x,paging:a,setPaging:h,showScope:c,scopeFormatter:m,actionOrContent:r,setActionOrContent:n};return e.jsx(pe,{value:{auditLogs:j},children:t})}function B(){const{auditLogs:t}=l.useContext(T);return t}var A={},ge=G;Object.defineProperty(A,"__esModule",{value:!0});var R=A.default=void 0,me=ge(U()),xe=e;R=A.default=(0,me.default)((0,xe.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore");const Le=`
|
|
2
2
|
<svg style="width:38px;height:38px;" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z" fill="url(#paint0_linear_606_96)"/>
|
|
4
4
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z" fill="url(#paint1_linear_606_96)"/>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aa as d,j as e,a3 as T,a4 as h,E as C}from"./vendor-mui-core-DxqV1NVn.js";import{u as $,$ as B,W as v,p as _}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{o as A,q as F,ao as I,d as M,e as N,ag as W,ap as z,P as O}from"./index-BsUr7wGb.js";import{r as a}from"./vendor-react-DoD83n6N.js";import{y as V}from"./vendor-utils-DR57WNxP.js";import{L as X}from"./launch-result-message-ByEG8r_7.js";import{g as q}from"./get-safe-url-
|
|
1
|
+
import{aa as d,j as e,a3 as T,a4 as h,E as C}from"./vendor-mui-core-DxqV1NVn.js";import{u as $,$ as B,W as v,p as _}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{o as A,q as F,ao as I,d as M,e as N,ag as W,ap as z,P as O}from"./index-BsUr7wGb.js";import{r as a}from"./vendor-react-DoD83n6N.js";import{y as V}from"./vendor-utils-DR57WNxP.js";import{L as X}from"./launch-result-message-ByEG8r_7.js";import{g as q}from"./get-safe-url-QFq5JNoE.js";import{S as E}from"./button-CNnuiac8.js";import{S as H}from"./layout-BqhTD729.js";import"./vendor-hooks-sw5wvnca.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-DvaaLvvM.js";import"./content-layout-7vu3yv_f.js";const K=d(X)`
|
|
2
2
|
&& .result-footer {
|
|
3
3
|
height: 120px;
|
|
4
4
|
> div {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var jw=Object.defineProperty;var Lw=(e,t,n)=>t in e?jw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Go=(e,t,n)=>Lw(e,typeof t!="symbol"?t+"":t,n);import{cR as Nw,cu as Te,ct as Ze,cr as Fw,a2 as Se,j as w,a4 as Re,a5 as Wn,E as ie,cS as uv,cT as dv,cU as zw,bu as fv,aa as Nt,cV as tl,bW as Kt,H as nl,cW as mi,b5 as Zn,c7 as dt,b1 as It,cX as Ww,cY as Vw,c as Pe,_ as L,S as yr,cZ as Ke,c_ as Uw,c$ as Cs,b as Vn,d0 as Qa,d1 as qw,c8 as Hw,d2 as Gw,bX as Kw,cp as Yw,d3 as Xw,c9 as Qw,g as ze,a as Le,k as Fe,d4 as pv,u as Gt,d5 as Zw,d as nn,d6 as rl,d7 as Vp,o as on,d8 as mv,i as Fr,d9 as Jw,da as hi,db as eS,dc as Up,f as Dd,dd as hv,de as tS,df as nS,p as ol,J as rS,dg as oS,a_ as qp,ad as Hp,M as Jt,I as vn,t as aS,ak as Kn,T as gr,a3 as zr,e as iS,bi as sS,ai as al,dh as lS,bA as cS,bp as Au,bB as Gp,bh as gv,x as uS,D as Kp,ac as Yp,r as Xp,bM as Qp,bf as Ni,y as dS,bq as fS}from"./vendor-mui-core-DxqV1NVn.js";import{a2 as pS,aG as mS,y as bv}from"./vendor-utils-DR57WNxP.js";import{r as S,R as hS,d as gi,a as $e,g as Rd,b as tt,e as vv,c as gS,k as yv}from"./vendor-react-DoD83n6N.js";import{bQ as Ce,r as Ur,u as Yt,W as ot,bW as bS,bX as vS,ba as Zp,bb as yS,bc as CS,bd as xS,g as wS,a$ as bi,b6 as Jp,bf as SS,bY as PS,bZ as TS,aZ as kr,aq as kS,ak as Ed,p as je,$ as DS,b1 as RS,a2 as ES,i as Qn,B as Fi,Y as MS}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{m as Cv,T as $S}from"./vendor-arcblock-DvaaLvvM.js";import{F as OS,d as Md}from"./form-text-input-BYF6lVnE.js";import{A as Xt,D as qr,Q as Za,h as Yn,f as ht,O as Co,aC as IS,a7 as Sr,a6 as $d,a5 as Bu,ap as xv,aD as wv,b as _a,m as gc,aE as _S}from"./index-BsUr7wGb.js";import{e as AS,W as xo,c as BS,f as Od,B as Sv,b as jS}from"./dashboard-C_Q4TjPa.js";import{S as LS}from"./switch-control-BBlLGjaH.js";import{P as ju,w as Mo}from"./permission-B5jnw9r2.js";import{d as em,c as NS,b as nt,_ as Je,o as FS,e as zS,i as WS,p as VS,g as US,r as Dr}from"./slicedToArray-BuQur6Mi.js";import{r as Ye,A as Id,B as Qt,C as xs,D as Lu,t as qe,E as Pv,F as Tv,j as Nu,m as qS,G as sr,H as HS,I as GS,J as Fu,K as kv,L as KS,M as YS,N as Dv,O as _d,P as tm,Q as XS,R as nm,S as QS,T as ZS,p as JS,e as rm,g as e1,b as bc,a as om,c as t1,q as zi,o as Zr,i as n1,d as r1,k as Wi,l as vc,h as Vi,s as yc,f as Cc,x as o1,z as a1,n as i1,u as s1,v as l1,w as c1,U as u1,y as d1,V as f1,W as p1}from"./index-BMSA5TdD.js";import{a as Qe,u as Me,r as Ja,d as Hr,b as m1,w as ws,g as Rv,e as Ev,c as h1,o as zu}from"./raf-schd.esm-GV-XhwE0.js";import{C as am}from"./click-to-copy-B0HMuCN_.js";import{d as im}from"./ChevronRight-CWeJn1iz.js";import{d as g1}from"./ChevronLeft-Dv7rlUf5.js";import{d as b1}from"./ArrowDropDown-odHjNJIs.js";import{f as pn}from"./format-error-LAoTjvJe.js";import{A as v1,a as y1,b as C1,d as Mv,B as x1,f as w1,c as S1}from"./add-component-core-CE0nArG4.js";import{C as $o}from"./confirm-DmMN-34s.js";import{v as P1,b as Ss}from"./util-C_BCTHfw.js";import{L as T1}from"./LockIcon-CQ1tExIY.js";import{d as $v}from"./Launch-BUTOr3cR.js";import{D as k1}from"./delete-confirm-BTaU_6Kx.js";import{d as D1}from"./InfoOutlined-CEUhR4DY.js";import{B as R1}from"./bundle-avatar-DHwmIozH.js";import{d as E1}from"./PlayArrow-D7cGSxeN.js";import{A as Ov}from"./actions-4oGfCMlR.js";import{I as xc}from"./index-BZvVDfZ4.js";import{W as M1}from"./did-address-BC-0j4Pt.js";import{u as $1}from"./vendor-hooks-sw5wvnca.js";import"./lottie-web-B6s7dDoL.js";import"./Done-C1TA1wbA.js";import"./logo-uploader-CUQ3aWZJ.js";import"./index-tUQxVYYQ.js";import"./EditIcon-Bgmg6UE0.js";import"./useLocalStorage-Dd4pybDP.js";import"./get-safe-url-
|
|
1
|
+
var jw=Object.defineProperty;var Lw=(e,t,n)=>t in e?jw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Go=(e,t,n)=>Lw(e,typeof t!="symbol"?t+"":t,n);import{cR as Nw,cu as Te,ct as Ze,cr as Fw,a2 as Se,j as w,a4 as Re,a5 as Wn,E as ie,cS as uv,cT as dv,cU as zw,bu as fv,aa as Nt,cV as tl,bW as Kt,H as nl,cW as mi,b5 as Zn,c7 as dt,b1 as It,cX as Ww,cY as Vw,c as Pe,_ as L,S as yr,cZ as Ke,c_ as Uw,c$ as Cs,b as Vn,d0 as Qa,d1 as qw,c8 as Hw,d2 as Gw,bX as Kw,cp as Yw,d3 as Xw,c9 as Qw,g as ze,a as Le,k as Fe,d4 as pv,u as Gt,d5 as Zw,d as nn,d6 as rl,d7 as Vp,o as on,d8 as mv,i as Fr,d9 as Jw,da as hi,db as eS,dc as Up,f as Dd,dd as hv,de as tS,df as nS,p as ol,J as rS,dg as oS,a_ as qp,ad as Hp,M as Jt,I as vn,t as aS,ak as Kn,T as gr,a3 as zr,e as iS,bi as sS,ai as al,dh as lS,bA as cS,bp as Au,bB as Gp,bh as gv,x as uS,D as Kp,ac as Yp,r as Xp,bM as Qp,bf as Ni,y as dS,bq as fS}from"./vendor-mui-core-DxqV1NVn.js";import{a2 as pS,aG as mS,y as bv}from"./vendor-utils-DR57WNxP.js";import{r as S,R as hS,d as gi,a as $e,g as Rd,b as tt,e as vv,c as gS,k as yv}from"./vendor-react-DoD83n6N.js";import{bQ as Ce,r as Ur,u as Yt,W as ot,bW as bS,bX as vS,ba as Zp,bb as yS,bc as CS,bd as xS,g as wS,a$ as bi,b6 as Jp,bf as SS,bY as PS,bZ as TS,aZ as kr,aq as kS,ak as Ed,p as je,$ as DS,b1 as RS,a2 as ES,i as Qn,B as Fi,Y as MS}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{m as Cv,T as $S}from"./vendor-arcblock-DvaaLvvM.js";import{F as OS,d as Md}from"./form-text-input-BYF6lVnE.js";import{A as Xt,D as qr,Q as Za,h as Yn,f as ht,O as Co,aC as IS,a7 as Sr,a6 as $d,a5 as Bu,ap as xv,aD as wv,b as _a,m as gc,aE as _S}from"./index-BsUr7wGb.js";import{e as AS,W as xo,c as BS,f as Od,B as Sv,b as jS}from"./dashboard-C_Q4TjPa.js";import{S as LS}from"./switch-control-BBlLGjaH.js";import{P as ju,w as Mo}from"./permission-B5jnw9r2.js";import{d as em,c as NS,b as nt,_ as Je,o as FS,e as zS,i as WS,p as VS,g as US,r as Dr}from"./slicedToArray-BuQur6Mi.js";import{r as Ye,A as Id,B as Qt,C as xs,D as Lu,t as qe,E as Pv,F as Tv,j as Nu,m as qS,G as sr,H as HS,I as GS,J as Fu,K as kv,L as KS,M as YS,N as Dv,O as _d,P as tm,Q as XS,R as nm,S as QS,T as ZS,p as JS,e as rm,g as e1,b as bc,a as om,c as t1,q as zi,o as Zr,i as n1,d as r1,k as Wi,l as vc,h as Vi,s as yc,f as Cc,x as o1,z as a1,n as i1,u as s1,v as l1,w as c1,U as u1,y as d1,V as f1,W as p1}from"./index-BMSA5TdD.js";import{a as Qe,u as Me,r as Ja,d as Hr,b as m1,w as ws,g as Rv,e as Ev,c as h1,o as zu}from"./raf-schd.esm-GV-XhwE0.js";import{C as am}from"./click-to-copy-B0HMuCN_.js";import{d as im}from"./ChevronRight-CWeJn1iz.js";import{d as g1}from"./ChevronLeft-Dv7rlUf5.js";import{d as b1}from"./ArrowDropDown-odHjNJIs.js";import{f as pn}from"./format-error-LAoTjvJe.js";import{A as v1,a as y1,b as C1,d as Mv,B as x1,f as w1,c as S1}from"./add-component-core-CE0nArG4.js";import{C as $o}from"./confirm-DmMN-34s.js";import{v as P1,b as Ss}from"./util-C_BCTHfw.js";import{L as T1}from"./LockIcon-CQ1tExIY.js";import{d as $v}from"./Launch-BUTOr3cR.js";import{D as k1}from"./delete-confirm-BTaU_6Kx.js";import{d as D1}from"./InfoOutlined-CEUhR4DY.js";import{B as R1}from"./bundle-avatar-DHwmIozH.js";import{d as E1}from"./PlayArrow-D7cGSxeN.js";import{A as Ov}from"./actions-4oGfCMlR.js";import{I as xc}from"./index-BZvVDfZ4.js";import{W as M1}from"./did-address-BC-0j4Pt.js";import{u as $1}from"./vendor-hooks-sw5wvnca.js";import"./lottie-web-B6s7dDoL.js";import"./Done-C1TA1wbA.js";import"./logo-uploader-CUQ3aWZJ.js";import"./index-tUQxVYYQ.js";import"./EditIcon-Bgmg6UE0.js";import"./useLocalStorage-Dd4pybDP.js";import"./get-safe-url-BKl2A9x2.js";import"./index-DyTFEgKr.js";import"./session-6ZeN-aF2.js";import"./useAsyncRetry-B7SbzXVI.js";import"./useAsync-DM8qaMe4.js";import"./useSetState-BL3ktMon.js";import"./item-BSGXym2I.js";import"./DeleteOutline-Cr-TyrUV.js";import"./launch-result-message-ByEG8r_7.js";import"./page-header-Dm1v9v5q.js";import"./config-space-DlwZewcm.js";import"./api-D9Yi7Zdr.js";import"./index-BVOYP6aR.js";import"./Google-DNUuYFIA.js";import"./index-m8CaSxXx.js";import"./index-CJCg9yIK.js";import"./use-mobile-CUT5hy9q.js";import"./content-layout-7vu3yv_f.js";import"./connect-to-CzffwD9G.js";import"./shorten-label-DkFTGSoy.js";import"./MoreHoriz-D1SOL47a.js";var O1=36e5;function I1(e,t){Ye(2,arguments);var n=Qt(t);return Id(e,n*O1)}var _1=864e5;function A1(e,t){Ye(2,arguments);var n=xs(e),r=xs(t),o=n.getTime()-Lu(n),a=r.getTime()-Lu(r);return Math.round((o-a)/_1)}var B1=6e4;function j1(e,t){Ye(2,arguments);var n=Qt(t);return Id(e,n*B1)}function L1(e,t){Ye(2,arguments);var n=Qt(t);return Id(e,n*1e3)}function za(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function N1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()-r.getFullYear()}function sm(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function Iv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=sm(n,r),a=Math.abs(A1(n,r));n.setDate(n.getDate()-o*a);var i=+(sm(n,r)===-o),s=o*(a-i);return s===0?0:s}function il(e,t){return Ye(2,arguments),qe(e).getTime()-qe(t).getTime()}var lm={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},F1="trunc";function vi(e){return e?lm[e]:lm[F1]}function z1(e,t,n){Ye(2,arguments);var r=il(e,t)/Pv;return vi(void 0)(r)}function W1(e,t,n){Ye(2,arguments);var r=il(e,t)/Tv;return vi(void 0)(r)}function Wu(e){Ye(1,arguments);var t=qe(e);return t.setHours(23,59,59,999),t}function V1(e){Ye(1,arguments);var t=qe(e);return Wu(t).getTime()===Nu(t).getTime()}function _v(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=za(n,r),a=Math.abs(qS(n,r)),i;if(a<1)i=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);var s=za(n,r)===-o;V1(qe(e))&&a===1&&za(e,r)===1&&(s=!1),i=o*(a-Number(s))}return i===0?0:i}function U1(e,t,n){Ye(2,arguments);var r=_v(e,t)/3;return vi(void 0)(r)}function q1(e,t,n){Ye(2,arguments);var r=il(e,t)/1e3;return vi(void 0)(r)}function H1(e,t,n){Ye(2,arguments);var r=Iv(e,t)/7;return vi(void 0)(r)}function G1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=za(n,r),a=Math.abs(N1(n,r));n.setFullYear(1584),r.setFullYear(1584);var i=za(n,r)===-o,s=o*(a-Number(i));return s===0?0:s}function K1(e,t){var n;Ye(1,arguments);var r=e||{},o=qe(r.start),a=qe(r.end),i=a.getTime();if(!(o.getTime()<=i))throw new RangeError("Invalid interval");var s=[],c=o;c.setHours(0,0,0,0);var l=Number((n=void 0)!==null&&n!==void 0?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;c.getTime()<=i;)s.push(qe(c)),c.setDate(c.getDate()+l),c.setHours(0,0,0,0);return s}function Y1(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function X1(e,t){var n,r;Ye(1,arguments);var o=qe(e);if(isNaN(o.getTime()))throw new RangeError("Invalid time value");var a=String((n=t==null?void 0:t.format)!==null&&n!==void 0?n:"extended"),i=String((r=t==null?void 0:t.representation)!==null&&r!==void 0?r:"complete");if(a!=="extended"&&a!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var s="",c="",l=a==="extended"?"-":"",d=a==="extended"?":":"";if(i!=="time"){var u=sr(o.getDate(),2),f=sr(o.getMonth()+1,2),m=sr(o.getFullYear(),4);s="".concat(m).concat(l).concat(f).concat(l).concat(u)}if(i!=="date"){var b=o.getTimezoneOffset();if(b!==0){var h=Math.abs(b),x=sr(Math.floor(h/60),2),v=sr(h%60,2),g=b<0?"+":"-";c="".concat(g).concat(x,":").concat(v)}else c="Z";var p=sr(o.getHours(),2),y=sr(o.getMinutes(),2),k=sr(o.getSeconds(),2),P=s===""?"":"T",T=[p,y,k].join(d);s="".concat(s).concat(P).concat(T).concat(c)}return s}function Q1(e){Ye(1,arguments);var t=qe(e),n=t.getDay();return n}function Z1(e){Ye(1,arguments);var t=qe(e),n=t.getHours();return n}function J1(e){Ye(1,arguments);var t=qe(e),n=t.getMinutes();return n}function eP(e){Ye(1,arguments);var t=qe(e),n=t.getSeconds();return n}function tP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getTime()===r.getTime()}function cm(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Nw(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){s=!0,a=l},f:function(){try{i||n.return==null||n.return()}finally{if(s)throw a}}}}function Av(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Av=function(){return!!e})()}function rt(e){var t=Av();return function(){var n,r=em(e);if(t){var o=em(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return NS(this,n)}}var nP=10,Bv=function(){function e(){Je(this,e),Ce(this,"priority",void 0),Ce(this,"subPriority",0)}return Ze(e,[{key:"validate",value:function(n,r){return!0}}]),e}(),rP=function(e){nt(n,e);var t=rt(n);function n(r,o,a,i,s){var c;return Je(this,n),c=t.call(this),c.value=r,c.validateValue=o,c.setValue=a,c.priority=i,s&&(c.subPriority=s),c}return Ze(n,[{key:"validate",value:function(o,a){return this.validateValue(o,this.value,a)}},{key:"set",value:function(o,a,i){return this.setValue(o,a,this.value,i)}}]),n}(Bv),oP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",nP),Ce(Te(r),"subPriority",-1),r}return Ze(n,[{key:"set",value:function(o,a){if(a.timestampIsSet)return o;var i=new Date(0);return i.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),i.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),i}}]),n}(Bv),at=function(){function e(){Je(this,e),Ce(this,"incompatibleTokens",void 0),Ce(this,"priority",void 0),Ce(this,"subPriority",void 0)}return Ze(e,[{key:"run",value:function(n,r,o,a){var i=this.parse(n,r,o,a);return i?{setter:new rP(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(n,r,o){return!0}}]),e}(),aP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",140),Ce(Te(r),"incompatibleTokens",["R","u","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"});case"GGGGG":return i.era(o,{width:"narrow"});case"GGGG":default:return i.era(o,{width:"wide"})||i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"})}}},{key:"set",value:function(o,a,i){return a.era=i,o.setUTCFullYear(i,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),Dt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Nn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Rt(e,t){return e&&{value:t(e.value),rest:e.rest}}function vt(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Fn(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*Pv+a*Tv+i*HS),rest:t.slice(n[0].length)}}function jv(e){return vt(Dt.anyDigitsSigned,e)}function kt(e,t){switch(e){case 1:return vt(Dt.singleDigit,t);case 2:return vt(Dt.twoDigits,t);case 3:return vt(Dt.threeDigits,t);case 4:return vt(Dt.fourDigits,t);default:return vt(new RegExp("^\\d{1,"+e+"}"),t)}}function Ps(e,t){switch(e){case 1:return vt(Dt.singleDigitSigned,t);case 2:return vt(Dt.twoDigitsSigned,t);case 3:return vt(Dt.threeDigitsSigned,t);case 4:return vt(Dt.fourDigitsSigned,t);default:return vt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Ad(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Lv(e,t){var n=t>0,r=n?t:1-t,o;if(r<=50)o=e||100;else{var a=r+50,i=Math.floor(a/100)*100,s=e>=a%100;o=e+i-(s?100:0)}return n?o:1-o}function Nv(e){return e%400===0||e%4===0&&e%100!==0}var iP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return{year:l,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Rt(kt(4,o),s);case"yo":return Rt(i.ordinalNumber(o,{unit:"year"}),s);default:return Rt(kt(a.length,o),s)}}},{key:"validate",value:function(o,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(o,a,i){var s=o.getUTCFullYear();if(i.isTwoDigitYear){var c=Lv(i.year,s);return o.setUTCFullYear(c,0,1),o.setUTCHours(0,0,0,0),o}var l=!("era"in a)||a.era===1?i.year:1-i.year;return o.setUTCFullYear(l,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),sP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return{year:l,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Rt(kt(4,o),s);case"Yo":return Rt(i.ordinalNumber(o,{unit:"year"}),s);default:return Rt(kt(a.length,o),s)}}},{key:"validate",value:function(o,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(o,a,i,s){var c=GS(o,s);if(i.isTwoDigitYear){var l=Lv(i.year,c);return o.setUTCFullYear(l,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Fu(o,s)}var d=!("era"in a)||a.era===1?i.year:1-i.year;return o.setUTCFullYear(d,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Fu(o,s)}}]),n}(at),lP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){return Ps(a==="R"?4:a.length,o)}},{key:"set",value:function(o,a,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),kv(s)}}]),n}(at),cP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){return Ps(a==="u"?4:a.length,o)}},{key:"set",value:function(o,a,i){return o.setUTCFullYear(i,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),uP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",120),Ce(Te(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"Q":case"QQ":return kt(a.length,o);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"})||i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(o,{width:"wide",context:"formatting"})||i.quarter(o,{width:"abbreviated",context:"formatting"})||i.quarter(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=1&&a<=4}},{key:"set",value:function(o,a,i){return o.setUTCMonth((i-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),dP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",120),Ce(Te(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"q":case"qq":return kt(a.length,o);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"})||i.quarter(o,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(o,{width:"wide",context:"standalone"})||i.quarter(o,{width:"abbreviated",context:"standalone"})||i.quarter(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=1&&a<=4}},{key:"set",value:function(o,a,i){return o.setUTCMonth((i-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),fP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Ce(Te(r),"priority",110),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l-1};switch(a){case"M":return Rt(vt(Dt.month,o),s);case"MM":return Rt(kt(2,o),s);case"Mo":return Rt(i.ordinalNumber(o,{unit:"month"}),s);case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"})||i.month(o,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(o,{width:"wide",context:"formatting"})||i.month(o,{width:"abbreviated",context:"formatting"})||i.month(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){return o.setUTCMonth(i,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),pP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",110),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l-1};switch(a){case"L":return Rt(vt(Dt.month,o),s);case"LL":return Rt(kt(2,o),s);case"Lo":return Rt(i.ordinalNumber(o,{unit:"month"}),s);case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"})||i.month(o,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(o,{width:"wide",context:"standalone"})||i.month(o,{width:"abbreviated",context:"standalone"})||i.month(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){return o.setUTCMonth(i,1),o.setUTCHours(0,0,0,0),o}}]),n}(at);function mP(e,t,n){Ye(2,arguments);var r=qe(e),o=Qt(t),a=KS(r,n)-o;return r.setUTCDate(r.getUTCDate()-a*7),r}var hP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",100),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"w":return vt(Dt.week,o);case"wo":return i.ordinalNumber(o,{unit:"week"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=53}},{key:"set",value:function(o,a,i,s){return Fu(mP(o,i,s),s)}}]),n}(at);function gP(e,t){Ye(2,arguments);var n=qe(e),r=Qt(t),o=YS(n)-r;return n.setUTCDate(n.getUTCDate()-o*7),n}var bP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",100),Ce(Te(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"I":return vt(Dt.week,o);case"Io":return i.ordinalNumber(o,{unit:"week"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=53}},{key:"set",value:function(o,a,i){return kv(gP(o,i))}}]),n}(at),vP=[31,28,31,30,31,30,31,31,30,31,30,31],yP=[31,29,31,30,31,30,31,31,30,31,30,31],CP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"subPriority",1),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"d":return vt(Dt.date,o);case"do":return i.ordinalNumber(o,{unit:"date"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){var i=o.getUTCFullYear(),s=Nv(i),c=o.getUTCMonth();return s?a>=1&&a<=yP[c]:a>=1&&a<=vP[c]}},{key:"set",value:function(o,a,i){return o.setUTCDate(i),o.setUTCHours(0,0,0,0),o}}]),n}(at),xP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"subpriority",1),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"D":case"DD":return vt(Dt.dayOfYear,o);case"Do":return i.ordinalNumber(o,{unit:"date"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){var i=o.getUTCFullYear(),s=Nv(i);return s?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(o,a,i){return o.setUTCMonth(0,i),o.setUTCHours(0,0,0,0),o}}]),n}(at);function Bd(e,t,n){var r,o,a,i,s,c,l,d;Ye(2,arguments);var u=Dv(),f=Qt((r=(o=(a=(i=n==null?void 0:n.weekStartsOn)!==null&&i!==void 0?i:n==null||(s=n.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&o!==void 0?o:(l=u.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=qe(e),b=Qt(t),h=m.getUTCDay(),x=b%7,v=(x+7)%7,g=(v<f?7:0)+b-h;return m.setUTCDate(m.getUTCDate()+g),m}var wP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Bd(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at),SP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"e":case"ee":return Rt(kt(a.length,o),c);case"eo":return Rt(i.ordinalNumber(o,{unit:"day"}),c);case"eee":return i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Bd(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at),PP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"c":case"cc":return Rt(kt(a.length,o),c);case"co":return Rt(i.ordinalNumber(o,{unit:"day"}),c);case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"})||i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(o,{width:"wide",context:"standalone"})||i.day(o,{width:"abbreviated",context:"standalone"})||i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Bd(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at);function TP(e,t){Ye(2,arguments);var n=Qt(t);n%7===0&&(n=n-7);var r=1,o=qe(e),a=o.getUTCDay(),i=n%7,s=(i+7)%7,c=(s<r?7:0)+n-a;return o.setUTCDate(o.getUTCDate()+c),o}var kP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l===0?7:l};switch(a){case"i":case"ii":return kt(a.length,o);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return Rt(i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s);case"iiiii":return Rt(i.day(o,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Rt(i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Rt(i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(o,a){return a>=1&&a<=7}},{key:"set",value:function(o,a,i){return o=TP(o,i),o.setUTCHours(0,0,0,0),o}}]),n}(at),DP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"a":case"aa":case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Ad(i),0,0,0),o}}]),n}(at),RP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"b":case"bb":case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Ad(i),0,0,0),o}}]),n}(at),EP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["a","b","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Ad(i),0,0,0),o}}]),n}(at),MP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["H","K","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"h":return vt(Dt.hour12h,o);case"ho":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=12}},{key:"set",value:function(o,a,i){var s=o.getUTCHours()>=12;return s&&i<12?o.setUTCHours(i+12,0,0,0):!s&&i===12?o.setUTCHours(0,0,0,0):o.setUTCHours(i,0,0,0),o}}]),n}(at),$P=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"H":return vt(Dt.hour23h,o);case"Ho":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=23}},{key:"set",value:function(o,a,i){return o.setUTCHours(i,0,0,0),o}}]),n}(at),OP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["h","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"K":return vt(Dt.hour11h,o);case"Ko":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){var s=o.getUTCHours()>=12;return s&&i<12?o.setUTCHours(i+12,0,0,0):o.setUTCHours(i,0,0,0),o}}]),n}(at),IP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"k":return vt(Dt.hour24h,o);case"ko":return i.ordinalNumber(o,{unit:"hour"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=24}},{key:"set",value:function(o,a,i){var s=i<=24?i%24:i;return o.setUTCHours(s,0,0,0),o}}]),n}(at),_P=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",60),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"m":return vt(Dt.minute,o);case"mo":return i.ordinalNumber(o,{unit:"minute"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=59}},{key:"set",value:function(o,a,i){return o.setUTCMinutes(i,0,0),o}}]),n}(at),AP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",50),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"s":return vt(Dt.second,o);case"so":return i.ordinalNumber(o,{unit:"second"});default:return kt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=59}},{key:"set",value:function(o,a,i){return o.setUTCSeconds(i,0),o}}]),n}(at),BP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",30),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){var i=function(c){return Math.floor(c*Math.pow(10,-a.length+3))};return Rt(kt(a.length,o),i)}},{key:"set",value:function(o,a,i){return o.setUTCMilliseconds(i),o}}]),n}(at),jP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",10),Ce(Te(r),"incompatibleTokens",["t","T","x"]),r}return Ze(n,[{key:"parse",value:function(o,a){switch(a){case"X":return Fn(Nn.basicOptionalMinutes,o);case"XX":return Fn(Nn.basic,o);case"XXXX":return Fn(Nn.basicOptionalSeconds,o);case"XXXXX":return Fn(Nn.extendedOptionalSeconds,o);case"XXX":default:return Fn(Nn.extended,o)}}},{key:"set",value:function(o,a,i){return a.timestampIsSet?o:new Date(o.getTime()-i)}}]),n}(at),LP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",10),Ce(Te(r),"incompatibleTokens",["t","T","X"]),r}return Ze(n,[{key:"parse",value:function(o,a){switch(a){case"x":return Fn(Nn.basicOptionalMinutes,o);case"xx":return Fn(Nn.basic,o);case"xxxx":return Fn(Nn.basicOptionalSeconds,o);case"xxxxx":return Fn(Nn.extendedOptionalSeconds,o);case"xxx":default:return Fn(Nn.extended,o)}}},{key:"set",value:function(o,a,i){return a.timestampIsSet?o:new Date(o.getTime()-i)}}]),n}(at),NP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",40),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return jv(o)}},{key:"set",value:function(o,a,i){return[new Date(i*1e3),{timestampIsSet:!0}]}}]),n}(at),FP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",20),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return jv(o)}},{key:"set",value:function(o,a,i){return[new Date(i),{timestampIsSet:!0}]}}]),n}(at),zP={G:new aP,y:new iP,Y:new sP,R:new lP,u:new cP,Q:new uP,q:new dP,M:new fP,L:new pP,w:new hP,I:new bP,d:new CP,D:new xP,E:new wP,e:new SP,c:new PP,i:new kP,a:new DP,b:new RP,B:new EP,h:new MP,H:new $P,K:new OP,k:new IP,m:new _P,s:new AP,S:new BP,X:new jP,x:new LP,t:new NP,T:new FP},WP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,VP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,UP=/^'([^]*?)'?$/,qP=/''/g,HP=/\S/,GP=/[a-zA-Z]/;function KP(e,t,n,r){var o,a,i,s,c,l,d,u,f,m,b,h,x,v,g,p,y,k;Ye(3,arguments);var P=String(e),T=String(t),D=Dv(),C=(o=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:D.locale)!==null&&o!==void 0?o:_d;if(!C.match)throw new RangeError("locale must contain match property");var R=Qt((i=(s=(c=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(d=r.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&c!==void 0?c:D.firstWeekContainsDate)!==null&&s!==void 0?s:(f=D.locale)===null||f===void 0||(m=f.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=Qt((b=(h=(x=(v=r==null?void 0:r.weekStartsOn)!==null&&v!==void 0?v:r==null||(g=r.locale)===null||g===void 0||(p=g.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&x!==void 0?x:D.weekStartsOn)!==null&&h!==void 0?h:(y=D.locale)===null||y===void 0||(k=y.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&b!==void 0?b:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(T==="")return P===""?qe(n):new Date(NaN);var $={firstWeekContainsDate:R,weekStartsOn:M,locale:C},O=[new oP],I=T.match(VP).map(function(H){var K=H[0];if(K in tm){var Q=tm[K];return Q(H,C.formatLong)}return H}).join("").match(WP),A=[],B=cm(I),N;try{var j=function(){var K=N.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&XS(K)&&nm(K,T,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&QS(K)&&nm(K,T,e);var Q=K[0],ae=zP[Q];if(ae){var Y=ae.incompatibleTokens;if(Array.isArray(Y)){var J=A.find(function(be){return Y.includes(be.token)||be.token===Q});if(J)throw new RangeError("The format string mustn't contain `".concat(J.fullToken,"` and `").concat(K,"` at the same time"))}else if(ae.incompatibleTokens==="*"&&A.length>0)throw new RangeError("The format string mustn't contain `".concat(K,"` and any other token at the same time"));A.push({token:Q,fullToken:K});var re=ae.run(P,K,C.match,$);if(!re)return{v:new Date(NaN)};O.push(re.setter),P=re.rest}else{if(Q.match(GP))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(K==="''"?K="'":Q==="'"&&(K=YP(K)),P.indexOf(K)===0)P=P.slice(K.length);else return{v:new Date(NaN)}}};for(B.s();!(N=B.n()).done;){var W=j();if(Fw(W)==="object")return W.v}}catch(H){B.e(H)}finally{B.f()}if(P.length>0&&HP.test(P))return new Date(NaN);var G=O.map(function(H){return H.priority}).sort(function(H,K){return K-H}).filter(function(H,K,Q){return Q.indexOf(H)===K}).map(function(H){return O.filter(function(K){return K.priority===H}).sort(function(K,Q){return Q.subPriority-K.subPriority})}).map(function(H){return H[0]}),E=qe(n);if(isNaN(E.getTime()))return new Date(NaN);var U=ZS(E,Lu(E)),V={},_=cm(G),z;try{for(_.s();!(z=_.n()).done;){var F=z.value;if(!F.validate(U,$))return new Date(NaN);var q=F.set(U,V,$);Array.isArray(q)?(U=q[0],Y1(V,q[1])):U=q}}catch(H){_.e(H)}finally{_.f()}return U}function YP(e){return e.match(UP)[1].replace(qP,"'")}function um(e){Ye(1,arguments);var t=qe(e);return t.setMinutes(0,0,0),t}function XP(e,t){Ye(2,arguments);var n=um(e),r=um(t);return n.getTime()===r.getTime()}function QP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()===r.getFullYear()}function ZP(e,t){Ye(2,arguments);var n=qe(e),r=Qt(t);return n.setDate(r),n}function JP(e,t){Ye(2,arguments);var n=qe(e),r=Qt(t);return n.setHours(r),n}function eT(e,t){Ye(2,arguments);var n=qe(e),r=Qt(t);return n.setMinutes(r),n}function tT(e,t){Ye(2,arguments);var n=qe(e),r=Qt(t);return n.setSeconds(r),n}var jd={},nT=Se;Object.defineProperty(jd,"__esModule",{value:!0});var Fv=jd.default=void 0,rT=nT(Ur()),oT=w;Fv=jd.default=(0,rT.default)((0,oT.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");function Ld({children:e,...t}){var l;const{t:n}=Yt(),{api:r}=Xt(),{blocklet:o}=qr(),a=(l=o==null?void 0:o.settings)==null?void 0:l.autoCheckUpdate,i=async d=>{await r.updateAutoCheckUpdate({input:{did:o.meta.did,autoCheckUpdate:d}})},s=async()=>{try{const d=!(a!=null&&a.enabled);await i({enabled:d}),ot.success(n(d?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(d){ot.error(d.message)}},c=!!(a!=null&&a.enabled);return w.jsxs(Re,{display:"flex",flexDirection:"row",alignItems:"center",children:[e,w.jsx(Wn,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:w.jsx("div",{children:w.jsx(LS,{checked:c,onChange:s,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}Ld.propTypes={children:ie.any};Ld.defaultProps={children:null};var Nd={},aT=Se;Object.defineProperty(Nd,"__esModule",{value:!0});var sl=Nd.default=void 0,iT=aT(Ur()),sT=w;sl=Nd.default=(0,iT.default)((0,sT.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit");var zv={},Ko={},wc={};function Wv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Wv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ye(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Wv(e))&&(r&&(r+=" "),r+=t);return r}function Ne(e,t,n=void 0){const r={};for(const o in e){const a=e[o];let i="",s=!0;for(let c=0;c<a.length;c+=1){const l=a[c];l&&(i+=(s===!0?"":" ")+t(l),s=!1,n&&n[l]&&(i+=" "+n[l]))}r[o]=i}return r}function Ts(e){return typeof e=="string"}function Vu(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function Vv(e){if(typeof e!="string")throw new Error(Vu(7));return e.charAt(0).toUpperCase()+e.slice(1)}function mr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Uv(e){if(!mr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Uv(e[n])}),t}function Nr(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return mr(e)&&mr(t)&&Object.keys(t).forEach(o=>{mr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&mr(e[o])?r[o]=Nr(e[o],t[o],n):n.clone?r[o]=mr(t[o])?Uv(t[o]):t[o]:r[o]=t[o]}),r}function Wa(e,t){return t?Nr(e,t,{clone:!1}):e}function lT(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var i,s;const a=/min-width:\s*([0-9.]+)/;return+(((i=r.match(a))==null?void 0:i[1])||0)-+(((s=o.match(a))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const a=t[o];return delete r[o],r[o]=a,r},{...t}):t}function cT(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function uT(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(a)}function dT(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function n(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const c=t(e.breakpoints.not(...s),i);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},o=a=>(n(r,a),r);return n(o),{...e,containerQueries:o}}const ll={xs:0,sm:600,md:900,lg:1200,xl:1536},dm={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ll[e]}px)`},fT={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ll[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Jn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||dm;return t.reduce((i,s,c)=>(i[a.up(a.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const a=r.breakpoints||dm;return Object.keys(t).reduce((i,s)=>{if(cT(a.keys,s)){const c=uT(r.containerQueries?r:fT,s);c&&(i[c]=n(t[s],s))}else if(Object.keys(a.values||ll).includes(s)){const c=a.up(s);i[c]=n(t[s],s)}else{const c=s;i[c]=t[c]}return i},{})}return n(t)}function pT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function mT(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function cl(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function ks(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=cl(e,n)||r,t&&(o=t(o,r,e)),o}function Mt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,a=i=>{if(i[t]==null)return null;const s=i[t],c=i.theme,l=cl(c,r)||{};return Jn(i,s,u=>{let f=ks(l,o,u);return u===f&&typeof u=="string"&&(f=ks(l,o,`${t}${u==="default"?"":Vv(u)}`,u)),n===!1?f:{[n]:f}})};return a.propTypes={},a.filterProps=[t],a}function hT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const gT={m:"margin",p:"padding"},bT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},fm={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},vT=hT(e=>{if(e.length>2)if(fm[e])e=fm[e];else return[e];const[t,n]=e.split(""),r=gT[t],o=bT[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),Fd=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],zd=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Fd,...zd];function yi(e,t,n,r){const o=cl(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:typeof o=="string"?`calc(${a} * ${o})`:o*a:Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a),s=o[i];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function Wd(e){return yi(e,"spacing",8)}function Ci(e,t){return typeof t=="string"||t==null?t:e(t)}function yT(e,t){return n=>e.reduce((r,o)=>(r[o]=Ci(t,n),r),{})}function CT(e,t,n,r){if(!t.includes(n))return null;const o=vT(n),a=yT(o,r),i=e[n];return Jn(e,i,a)}function qv(e,t){const n=Wd(e.theme);return Object.keys(e).map(r=>CT(e,t,r,n)).reduce(Wa,{})}function xt(e){return qv(e,Fd)}xt.propTypes={};xt.filterProps=Fd;function wt(e){return qv(e,zd)}wt.propTypes={};wt.filterProps=zd;function ul(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),n=r=>Object.keys(r).reduce((o,a)=>t[a]?Wa(o,t[a](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function mn(e){return typeof e!="number"?e:`${e}px solid`}function Tn(e,t){return Mt({prop:e,themeKey:"borders",transform:t})}const xT=Tn("border",mn),wT=Tn("borderTop",mn),ST=Tn("borderRight",mn),PT=Tn("borderBottom",mn),TT=Tn("borderLeft",mn),kT=Tn("borderColor"),DT=Tn("borderTopColor"),RT=Tn("borderRightColor"),ET=Tn("borderBottomColor"),MT=Tn("borderLeftColor"),$T=Tn("outline",mn),OT=Tn("outlineColor"),dl=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=yi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ci(t,r)});return Jn(e,e.borderRadius,n)}return null};dl.propTypes={};dl.filterProps=["borderRadius"];ul(xT,wT,ST,PT,TT,kT,DT,RT,ET,MT,dl,$T,OT);const fl=e=>{if(e.gap!==void 0&&e.gap!==null){const t=yi(e.theme,"spacing",8),n=r=>({gap:Ci(t,r)});return Jn(e,e.gap,n)}return null};fl.propTypes={};fl.filterProps=["gap"];const pl=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=yi(e.theme,"spacing",8),n=r=>({columnGap:Ci(t,r)});return Jn(e,e.columnGap,n)}return null};pl.propTypes={};pl.filterProps=["columnGap"];const ml=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=yi(e.theme,"spacing",8),n=r=>({rowGap:Ci(t,r)});return Jn(e,e.rowGap,n)}return null};ml.propTypes={};ml.filterProps=["rowGap"];const IT=Mt({prop:"gridColumn"}),_T=Mt({prop:"gridRow"}),AT=Mt({prop:"gridAutoFlow"}),BT=Mt({prop:"gridAutoColumns"}),jT=Mt({prop:"gridAutoRows"}),LT=Mt({prop:"gridTemplateColumns"}),NT=Mt({prop:"gridTemplateRows"}),FT=Mt({prop:"gridTemplateAreas"}),zT=Mt({prop:"gridArea"});ul(fl,pl,ml,IT,_T,AT,BT,jT,LT,NT,FT,zT);function ho(e,t){return t==="grey"?t:e}const WT=Mt({prop:"color",themeKey:"palette",transform:ho}),VT=Mt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ho}),UT=Mt({prop:"backgroundColor",themeKey:"palette",transform:ho});ul(WT,VT,UT);function en(e){return e<=1&&e!==0?`${e*100}%`:e}const qT=Mt({prop:"width",transform:en}),Vd=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,a,i,s,c;const r=((i=(a=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:a.values)==null?void 0:i[n])||ll[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:en(n)}};return Jn(e,e.maxWidth,t)}return null};Vd.filterProps=["maxWidth"];const HT=Mt({prop:"minWidth",transform:en}),GT=Mt({prop:"height",transform:en}),KT=Mt({prop:"maxHeight",transform:en}),YT=Mt({prop:"minHeight",transform:en});Mt({prop:"size",cssProperty:"width",transform:en});Mt({prop:"size",cssProperty:"height",transform:en});const XT=Mt({prop:"boxSizing"});ul(qT,Vd,HT,GT,KT,YT,XT);const xi={border:{themeKey:"borders",transform:mn},borderTop:{themeKey:"borders",transform:mn},borderRight:{themeKey:"borders",transform:mn},borderBottom:{themeKey:"borders",transform:mn},borderLeft:{themeKey:"borders",transform:mn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:mn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:dl},color:{themeKey:"palette",transform:ho},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ho},backgroundColor:{themeKey:"palette",transform:ho},p:{style:wt},pt:{style:wt},pr:{style:wt},pb:{style:wt},pl:{style:wt},px:{style:wt},py:{style:wt},padding:{style:wt},paddingTop:{style:wt},paddingRight:{style:wt},paddingBottom:{style:wt},paddingLeft:{style:wt},paddingX:{style:wt},paddingY:{style:wt},paddingInline:{style:wt},paddingInlineStart:{style:wt},paddingInlineEnd:{style:wt},paddingBlock:{style:wt},paddingBlockStart:{style:wt},paddingBlockEnd:{style:wt},m:{style:xt},mt:{style:xt},mr:{style:xt},mb:{style:xt},ml:{style:xt},mx:{style:xt},my:{style:xt},margin:{style:xt},marginTop:{style:xt},marginRight:{style:xt},marginBottom:{style:xt},marginLeft:{style:xt},marginX:{style:xt},marginY:{style:xt},marginInline:{style:xt},marginInlineStart:{style:xt},marginInlineEnd:{style:xt},marginBlock:{style:xt},marginBlockStart:{style:xt},marginBlockEnd:{style:xt},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:fl},rowGap:{style:ml},columnGap:{style:pl},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:en},maxWidth:{style:Vd},minWidth:{transform:en},height:{transform:en},maxHeight:{transform:en},minHeight:{transform:en},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function QT(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function ZT(e,t){return typeof e=="function"?e(t):e}function JT(){function e(n,r,o,a){const i={[n]:r,theme:o},s=a[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:l,transform:d,style:u}=s;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const f=cl(o,l)||{};return u?u(i):Jn(i,r,b=>{let h=ks(f,d,b);return b===h&&typeof b=="string"&&(h=ks(f,d,`${n}${b==="default"?"":Vv(b)}`,b)),c===!1?h:{[c]:h}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const a=o.unstable_sxConfig??xi;function i(s){let c=s;if(typeof s=="function")c=s(o);else if(typeof s!="object")return s;if(!c)return null;const l=pT(o.breakpoints),d=Object.keys(l);let u=l;return Object.keys(c).forEach(f=>{const m=ZT(c[f],o);if(m!=null)if(typeof m=="object")if(a[f])u=Wa(u,e(f,m,o,a));else{const b=Jn({theme:o},m,h=>({[f]:h}));QT(b,m)?u[f]=t({sx:m,theme:o}):u=Wa(u,b)}else u=Wa(u,e(f,m,o,a))}),lT(o,mT(d,u))}return Array.isArray(r)?r.map(i):i(r)}return t}const Gr=JT();Gr.filterProps=["sx"];const ek=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??xi;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function Hv(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=ek(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...i)=>{const s=t(...i);return mr(s)?{...r,...s}:r}:a={...r,...t},{...o,sx:a}}const tk=e=>{const t=dv(e);class n extends zw{constructor(o){super(o),this.prepend=t.sheet.prepend}}return t.sheet=new n({key:t.key,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy,prepend:t.sheet.prepend,insertionPoint:t.sheet.insertionPoint}),t};let Uu;typeof document=="object"&&(Uu=tk({key:"css",prepend:!0}));function nk(e){const{injectFirst:t,children:n}=e;return t&&Uu?w.jsx(uv,{value:Uu,children:n}):n}function rk(e){return e==null||Object.keys(e).length===0}function Gv(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(rk(o)?n:o):t;return w.jsx(fv,{styles:r})}/**
|
|
3
3
|
* @mui/styled-engine v6.1.0
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Ct7s2LPI.js","assets/vendor-ux-did-connect-Bciw9Ypu.js","assets/vendor-react-DoD83n6N.js","assets/vendor-utils-DR57WNxP.js","assets/vendor-mui-core-DxqV1NVn.js","assets/vendor-hooks-sw5wvnca.js","assets/lottie-web-B6s7dDoL.js","assets/vendor-ux-did-connect-DhgPdlEj.css","assets/vendor-arcblock-DvaaLvvM.js","assets/index-CJCg9yIK.js","assets/index-BsUr7wGb.js","assets/index-tUQxVYYQ.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{e as Me,r as z,d as kt,g as so,b as V,a as rn}from"./vendor-react-DoD83n6N.js";import{bP as _i,bQ as T,bR as wi,bS as er,bT as xi,bU as tr,bI as bi,bJ as Ri,i as fe,u as He,$ as kn,bF as Ti,aF as Ii,bV as Pi,bj as zi,s as co,b6 as Nn,y as uo,W as _t,ak as Di,B as Oi,p as wt,n as ki,bi as Ni}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{u as pe,a as Nt,z as Li,i as ho,e as Mi,A as Ei,f as Ai}from"./vendor-hooks-sw5wvnca.js";import{b1 as fo,cs as ji,ct as ce,cu as N,_ as ue,cv as Fi,E as _,cr as Gi,cw as Wi,cx as $i,cy as Hi,cz as Bi,cA as Ui,cB as Vi,cC as qi,cD as Ki,cE as Qi,j as S,a4 as ae,T as be,as as Xi,ar as nr,I as Ie,b2 as Yt,x as Jt,t as po,M as Ke,K as Zt,a5 as Yi,a3 as Ji,bl as go,bS as Zi,A as ea,aa as ta,bf as rr,ab as un,bk as or,ak as ir,br as hn,ba as ar,b$ as lr,v as fn,bo as na}from"./vendor-mui-core-DxqV1NVn.js";import{p as gt,g as ra,av as oa,A as it,az as ia,aA as aa,aB as la,C as It,aC as vo,y as ht,aD as sa,K as ve,$ as sr,aE as ca,z as da,H as wn,F as ua,o as ha,b as fa,n as ke}from"./vendor-utils-DR57WNxP.js";import{_ as le,a as nt,b as ye,c as Ce,d as _e,r as pa}from"./slicedToArray-BuQur6Mi.js";import{J as xn,_ as ga,K as va,D as ma,M as Sa}from"./vendor-arcblock-DvaaLvvM.js";import{D as ft,h as st,ay as ya,_ as Ca,U as _a,a5 as wa,A as xa,az as ba,aA as Ra,aB as Ta,f as Ia}from"./index-BsUr7wGb.js";import{u as Pa,C as Re}from"./index.esm-CWepf7I_.js";import{r as za}from"./omit-DZNQhOf-.js";import{r as Da,S as Oa}from"./Google-DNUuYFIA.js";import{p as ka}from"./index-CJCg9yIK.js";import{S as bn}from"./simple-select-CqakAZFe.js";import{u as mo}from"./dashboard-C_Q4TjPa.js";import{a as Na}from"./api-D9Yi7Zdr.js";import{b as La}from"./index-DyTFEgKr.js";import{f as cr}from"./format-error-LAoTjvJe.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-Dd4pybDP.js";import"./confirm-DmMN-34s.js";import"./PlayArrow-D7cGSxeN.js";import"./get-safe-url-QFq5JNoE.js";import"./session-6ZeN-aF2.js";import"./useAsyncRetry-B7SbzXVI.js";import"./useAsync-DM8qaMe4.js";import"./InfoOutlined-CEUhR4DY.js";import"./useSetState-BL3ktMon.js";var Ae={},So="Expected a function",dr=NaN,Ma="[object Symbol]",Ea=/^\s+|\s+$/g,Aa=/^[-+]0x[0-9a-f]+$/i,ja=/^0b[01]+$/i,Fa=/^0o[0-7]+$/i,Ga=parseInt,Wa=typeof Me=="object"&&Me&&Me.Object===Object&&Me,$a=typeof self=="object"&&self&&self.Object===Object&&self,Ha=Wa||$a||Function("return this")(),Ba=Object.prototype,Ua=Ba.toString,Va=Math.max,qa=Math.min,pn=function(){return Ha.Date.now()};function Ka(t,o,r){var e,n,a,i,l,s,d=0,c=!1,u=!1,h=!0;if(typeof t!="function")throw new TypeError(So);o=ur(o)||0,en(r)&&(c=!!r.leading,u="maxWait"in r,a=u?Va(ur(r.maxWait)||0,o):a,h="trailing"in r?!!r.trailing:h);function g(R){var P=e,p=n;return e=n=void 0,d=R,i=t.apply(p,P),i}function f(R){return d=R,l=setTimeout(w,o),c?g(R):i}function m(R){var P=R-s,p=R-d,b=o-P;return u?qa(b,a-p):b}function y(R){var P=R-s,p=R-d;return s===void 0||P>=o||P<0||u&&p>=a}function w(){var R=pn();if(y(R))return v(R);l=setTimeout(w,m(R))}function v(R){return l=void 0,h&&e?g(R):(e=n=void 0,i)}function D(){l!==void 0&&clearTimeout(l),d=0,e=s=n=l=void 0}function C(){return l===void 0?i:v(pn())}function I(){var R=pn(),P=y(R);if(e=arguments,n=this,s=R,P){if(l===void 0)return f(s);if(u)return l=setTimeout(w,o),g(s)}return l===void 0&&(l=setTimeout(w,o)),i}return I.cancel=D,I.flush=C,I}function Qa(t,o,r){var e=!0,n=!0;if(typeof t!="function")throw new TypeError(So);return en(r)&&(e="leading"in r?!!r.leading:e,n="trailing"in r?!!r.trailing:n),Ka(t,o,{leading:e,maxWait:o,trailing:n})}function en(t){var o=typeof t;return!!t&&(o=="object"||o=="function")}function Xa(t){return!!t&&typeof t=="object"}function Ya(t){return typeof t=="symbol"||Xa(t)&&Ua.call(t)==Ma}function ur(t){if(typeof t=="number")return t;if(Ya(t))return dr;if(en(t)){var o=typeof t.valueOf=="function"?t.valueOf():t;t=en(o)?o+"":o}if(typeof t!="string")return t===0?t:+t;t=t.replace(Ea,"");var r=ja.test(t);return r||Fa.test(t)?Ga(t.slice(2),r?2:8):Aa.test(t)?dr:+t}var Ja=Qa,on={exports:{}},xt={exports:{}};(function(){var t,o,r,e,n,a;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof gt<"u"&>!==null&>.hrtime?(xt.exports=function(){return(t()-n)/1e6},o=gt.hrtime,t=function(){var i;return i=o(),i[0]*1e9+i[1]},e=t(),a=gt.uptime()*1e9,n=e-a):Date.now?(xt.exports=function(){return Date.now()-r},r=Date.now()):(xt.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(Me);var Za=xt.exports,el=Za,Ee=typeof window>"u"?Me:window,$t=["moz","webkit"],at="AnimationFrame",ct=Ee["request"+at],Dt=Ee["cancel"+at]||Ee["cancelRequest"+at];for(var vt=0;!ct&&vt<$t.length;vt++)ct=Ee[$t[vt]+"Request"+at],Dt=Ee[$t[vt]+"Cancel"+at]||Ee[$t[vt]+"CancelRequest"+at];if(!ct||!Dt){var gn=0,hr=0,Be=[],tl=1e3/60;ct=function(t){if(Be.length===0){var o=el(),r=Math.max(0,tl-(o-gn));gn=r+o,setTimeout(function(){var e=Be.slice(0);Be.length=0;for(var n=0;n<e.length;n++)if(!e[n].cancelled)try{e[n].callback(gn)}catch(a){setTimeout(function(){throw a},0)}},Math.round(r))}return Be.push({handle:++hr,callback:t,cancelled:!1}),hr},Dt=function(t){for(var o=0;o<Be.length;o++)Be[o].handle===t&&(Be[o].cancelled=!0)}}on.exports=function(t){return ct.call(Ee,t)};on.exports.cancel=function(){Dt.apply(Ee,arguments)};on.exports.polyfill=function(t){t||(t=Ee),t.requestAnimationFrame=ct,t.cancelAnimationFrame=Dt};var nl=on.exports,Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.default=rl;function rl(t){return t.displayName||t.name||(typeof t=="string"&&t.length>0?t:"Unknown")}var Lt={};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.noop=ol;Lt.intBetween=il;Lt.getCoords=al;function ol(){}function il(t,o,r){return Math.floor(Math.min(o,Math.max(t,r)))}function al(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}Object.defineProperty(Ae,"__esModule",{value:!0});var ll=Ae.createHorizontalStrength=Co,sl=Ae.createVerticalStrength=_o,cl=Ae.createScrollingComponent=bo,dl=Ae.default=bl;Ae.defaultVerticalStrength=Ae.defaultHorizontalStrength=void 0;var Pt=vl(z),mt=Mt(fo),ul=kt,hl=Mt(Ja),fr=Mt(nl),fl=Mt(Ln),pl=_i,gl=Mt(ji),Ht=Lt;function Mt(t){return t&&t.__esModule?t:{default:t}}function vl(t){if(t&&t.__esModule)return t;var o={};if(t!=null){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var e=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};e.get||e.set?Object.defineProperty(o,r,e):o[r]=t[r]}}return o.default=t,o}function Kt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Kt=function(r){return typeof r}:Kt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Kt(t)}function tn(){return tn=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},tn.apply(this,arguments)}function ml(t,o){if(t==null)return{};var r=Sl(t,o),e,n;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)e=a[n],!(o.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Sl(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,a;for(a=0;a<e.length;a++)n=e[a],!(o.indexOf(n)>=0)&&(r[n]=t[n]);return r}function yl(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function Cl(t,o){for(var r=0;r<o.length;r++){var e=o[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function _l(t,o,r){return o&&Cl(t.prototype,o),t}function wl(t,o){return o&&(Kt(o)==="object"||typeof o=="function")?o:bt(t)}function Rn(t){return Rn=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Rn(t)}function xl(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&Tn(t,o)}function Tn(t,o){return Tn=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},Tn(t,o)}function bt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function St(t,o,r){return o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}var yo=150;function Co(t){return function(r,e){var n=r.x,a=r.w,i=r.y,l=r.h,s=Math.min(a/2,t),d=e.x>=n&&e.x<=n+a,c=d&&e.y>=i&&e.y<=i+l;if(c){if(e.x<n+s)return(e.x-n-s)/s;if(e.x>n+a-s)return-(n+a-e.x-s)/s}return 0}}function _o(t){return function(r,e){var n=r.y,a=r.h,i=r.x,l=r.w,s=Math.min(a/2,t),d=e.y>=n&&e.y<=n+a,c=d&&e.x>=i&&e.x<=i+l;if(c){if(e.y<n+s)return(e.y-n-s)/s;if(e.y>n+a-s)return-(n+a-e.y-s)/s}return 0}}var wo=Co(yo);Ae.defaultHorizontalStrength=wo;var xo=_o(yo);Ae.defaultVerticalStrength=xo;function bo(t){var o=function(r){xl(e,r);function e(n,a){var i;return yl(this,e),i=wl(this,Rn(e).call(this,n,a)),St(bt(bt(i)),"updateScrolling",(0,hl.default)(function(l){var s=i.container.getBoundingClientRect(),d=s.left,c=s.top,u=s.width,h=s.height,g={x:d,y:c,w:u,h},f=(0,Ht.getCoords)(l),m=i.props,y=m.horizontalStrength,w=m.verticalStrength;i.scaleX=y(g,f),i.scaleY=w(g,f),!i.frame&&(i.scaleX||i.scaleY)&&i.startScrolling()},100,{trailing:!1})),St(bt(bt(i)),"handleEvent",function(l){i.dragging&&!i.attached&&(i.attach(),i.updateScrolling(l))}),i.wrappedInstance=Pt.default.createRef(),i.scaleX=0,i.scaleY=0,i.frame=null,i.attached=!1,i.dragging=!1,i}return _l(e,[{key:"componentDidMount",value:function(){var a=this;this.container=(0,ul.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var i=this.props.dragDropManager;this.clearMonitorSubscription=i.getMonitor().subscribeToStateChange(function(){return a.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var a=this.props.dragDropManager,i=a.getMonitor().isDragging();!this.dragging&&i?this.dragging=!0:this.dragging&&!i&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var a=this,i=0,l=function s(){var d=a.scaleX,c=a.scaleY,u=a.container,h=a.props,g=h.strengthMultiplier,f=h.onScrollChange;if(g===0||d+c===0){a.stopScrolling();return}if(i+=1,i%2){var m=u.scrollLeft,y=u.scrollTop,w=u.scrollWidth,v=u.scrollHeight,D=u.clientWidth,C=u.clientHeight,I=d?u.scrollLeft=(0,Ht.intBetween)(0,w-D,m+d*g):m,R=c?u.scrollTop=(0,Ht.intBetween)(0,v-C,y+c*g):y;f(I,R)}a.frame=(0,fr.default)(s)};l()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(fr.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var a=this.props;a.strengthMultiplier,a.verticalStrength,a.horizontalStrength,a.onScrollChange;var i=ml(a,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return Pt.default.createElement(t,tn({ref:this.wrappedInstance},i))}}]),e}(Pt.Component);return St(o,"displayName","Scrolling(".concat((0,fl.default)(t),")")),St(o,"propTypes",{dragDropManager:mt.default.object.isRequired,onScrollChange:mt.default.func,verticalStrength:mt.default.func,horizontalStrength:mt.default.func,strengthMultiplier:mt.default.number}),St(o,"defaultProps",{onScrollChange:Ht.noop,verticalStrength:xo,horizontalStrength:wo,strengthMultiplier:30}),(0,gl.default)(o,t)}function bl(t){var o=bo(t);return function(r){return Pt.default.createElement(pl.DragDropContextConsumer,null,function(e){var n=e.dragDropManager;return n===void 0?null:Pt.default.createElement(o,tn({},r,{dragDropManager:n}))})}}function Ro(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function To(t){function o(r){var e=this.constructor.getDerivedStateFromProps(t,r);return e??null}this.setState(o.bind(this))}function Io(t,o){try{var r=this.props,e=this.state;this.props=t,this.state=o,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,e)}finally{this.props=r,this.state=e}}Ro.__suppressDeprecationWarning=!0;To.__suppressDeprecationWarning=!0;Io.__suppressDeprecationWarning=!0;function Et(t){var o=t.prototype;if(!o||!o.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof o.getSnapshotBeforeUpdate!="function")return t;var r=null,e=null,n=null;if(typeof o.componentWillMount=="function"?r="componentWillMount":typeof o.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof o.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof o.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof o.componentWillUpdate=="function"?n="componentWillUpdate":typeof o.UNSAFE_componentWillUpdate=="function"&&(n="UNSAFE_componentWillUpdate"),r!==null||e!==null||n!==null){var a=t.displayName||t.name,i=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
2
|
+
import{e as Me,r as z,d as kt,g as so,b as V,a as rn}from"./vendor-react-DoD83n6N.js";import{bP as _i,bQ as T,bR as wi,bS as er,bT as xi,bU as tr,bI as bi,bJ as Ri,i as fe,u as He,$ as kn,bF as Ti,aF as Ii,bV as Pi,bj as zi,s as co,b6 as Nn,y as uo,W as _t,ak as Di,B as Oi,p as wt,n as ki,bi as Ni}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{u as pe,a as Nt,z as Li,i as ho,e as Mi,A as Ei,f as Ai}from"./vendor-hooks-sw5wvnca.js";import{b1 as fo,cs as ji,ct as ce,cu as N,_ as ue,cv as Fi,E as _,cr as Gi,cw as Wi,cx as $i,cy as Hi,cz as Bi,cA as Ui,cB as Vi,cC as qi,cD as Ki,cE as Qi,j as S,a4 as ae,T as be,as as Xi,ar as nr,I as Ie,b2 as Yt,x as Jt,t as po,M as Ke,K as Zt,a5 as Yi,a3 as Ji,bl as go,bS as Zi,A as ea,aa as ta,bf as rr,ab as un,bk as or,ak as ir,br as hn,ba as ar,b$ as lr,v as fn,bo as na}from"./vendor-mui-core-DxqV1NVn.js";import{p as gt,g as ra,av as oa,A as it,az as ia,aA as aa,aB as la,C as It,aC as vo,y as ht,aD as sa,K as ve,$ as sr,aE as ca,z as da,H as wn,F as ua,o as ha,b as fa,n as ke}from"./vendor-utils-DR57WNxP.js";import{_ as le,a as nt,b as ye,c as Ce,d as _e,r as pa}from"./slicedToArray-BuQur6Mi.js";import{J as xn,_ as ga,K as va,D as ma,M as Sa}from"./vendor-arcblock-DvaaLvvM.js";import{D as ft,h as st,ay as ya,_ as Ca,U as _a,a5 as wa,A as xa,az as ba,aA as Ra,aB as Ta,f as Ia}from"./index-BsUr7wGb.js";import{u as Pa,C as Re}from"./index.esm-CWepf7I_.js";import{r as za}from"./omit-DZNQhOf-.js";import{r as Da,S as Oa}from"./Google-DNUuYFIA.js";import{p as ka}from"./index-CJCg9yIK.js";import{S as bn}from"./simple-select-CqakAZFe.js";import{u as mo}from"./dashboard-C_Q4TjPa.js";import{a as Na}from"./api-D9Yi7Zdr.js";import{b as La}from"./index-DyTFEgKr.js";import{f as cr}from"./format-error-LAoTjvJe.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-Dd4pybDP.js";import"./confirm-DmMN-34s.js";import"./PlayArrow-D7cGSxeN.js";import"./get-safe-url-BKl2A9x2.js";import"./session-6ZeN-aF2.js";import"./useAsyncRetry-B7SbzXVI.js";import"./useAsync-DM8qaMe4.js";import"./InfoOutlined-CEUhR4DY.js";import"./useSetState-BL3ktMon.js";var Ae={},So="Expected a function",dr=NaN,Ma="[object Symbol]",Ea=/^\s+|\s+$/g,Aa=/^[-+]0x[0-9a-f]+$/i,ja=/^0b[01]+$/i,Fa=/^0o[0-7]+$/i,Ga=parseInt,Wa=typeof Me=="object"&&Me&&Me.Object===Object&&Me,$a=typeof self=="object"&&self&&self.Object===Object&&self,Ha=Wa||$a||Function("return this")(),Ba=Object.prototype,Ua=Ba.toString,Va=Math.max,qa=Math.min,pn=function(){return Ha.Date.now()};function Ka(t,o,r){var e,n,a,i,l,s,d=0,c=!1,u=!1,h=!0;if(typeof t!="function")throw new TypeError(So);o=ur(o)||0,en(r)&&(c=!!r.leading,u="maxWait"in r,a=u?Va(ur(r.maxWait)||0,o):a,h="trailing"in r?!!r.trailing:h);function g(R){var P=e,p=n;return e=n=void 0,d=R,i=t.apply(p,P),i}function f(R){return d=R,l=setTimeout(w,o),c?g(R):i}function m(R){var P=R-s,p=R-d,b=o-P;return u?qa(b,a-p):b}function y(R){var P=R-s,p=R-d;return s===void 0||P>=o||P<0||u&&p>=a}function w(){var R=pn();if(y(R))return v(R);l=setTimeout(w,m(R))}function v(R){return l=void 0,h&&e?g(R):(e=n=void 0,i)}function D(){l!==void 0&&clearTimeout(l),d=0,e=s=n=l=void 0}function C(){return l===void 0?i:v(pn())}function I(){var R=pn(),P=y(R);if(e=arguments,n=this,s=R,P){if(l===void 0)return f(s);if(u)return l=setTimeout(w,o),g(s)}return l===void 0&&(l=setTimeout(w,o)),i}return I.cancel=D,I.flush=C,I}function Qa(t,o,r){var e=!0,n=!0;if(typeof t!="function")throw new TypeError(So);return en(r)&&(e="leading"in r?!!r.leading:e,n="trailing"in r?!!r.trailing:n),Ka(t,o,{leading:e,maxWait:o,trailing:n})}function en(t){var o=typeof t;return!!t&&(o=="object"||o=="function")}function Xa(t){return!!t&&typeof t=="object"}function Ya(t){return typeof t=="symbol"||Xa(t)&&Ua.call(t)==Ma}function ur(t){if(typeof t=="number")return t;if(Ya(t))return dr;if(en(t)){var o=typeof t.valueOf=="function"?t.valueOf():t;t=en(o)?o+"":o}if(typeof t!="string")return t===0?t:+t;t=t.replace(Ea,"");var r=ja.test(t);return r||Fa.test(t)?Ga(t.slice(2),r?2:8):Aa.test(t)?dr:+t}var Ja=Qa,on={exports:{}},xt={exports:{}};(function(){var t,o,r,e,n,a;typeof performance<"u"&&performance!==null&&performance.now?xt.exports=function(){return performance.now()}:typeof gt<"u"&>!==null&>.hrtime?(xt.exports=function(){return(t()-n)/1e6},o=gt.hrtime,t=function(){var i;return i=o(),i[0]*1e9+i[1]},e=t(),a=gt.uptime()*1e9,n=e-a):Date.now?(xt.exports=function(){return Date.now()-r},r=Date.now()):(xt.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(Me);var Za=xt.exports,el=Za,Ee=typeof window>"u"?Me:window,$t=["moz","webkit"],at="AnimationFrame",ct=Ee["request"+at],Dt=Ee["cancel"+at]||Ee["cancelRequest"+at];for(var vt=0;!ct&&vt<$t.length;vt++)ct=Ee[$t[vt]+"Request"+at],Dt=Ee[$t[vt]+"Cancel"+at]||Ee[$t[vt]+"CancelRequest"+at];if(!ct||!Dt){var gn=0,hr=0,Be=[],tl=1e3/60;ct=function(t){if(Be.length===0){var o=el(),r=Math.max(0,tl-(o-gn));gn=r+o,setTimeout(function(){var e=Be.slice(0);Be.length=0;for(var n=0;n<e.length;n++)if(!e[n].cancelled)try{e[n].callback(gn)}catch(a){setTimeout(function(){throw a},0)}},Math.round(r))}return Be.push({handle:++hr,callback:t,cancelled:!1}),hr},Dt=function(t){for(var o=0;o<Be.length;o++)Be[o].handle===t&&(Be[o].cancelled=!0)}}on.exports=function(t){return ct.call(Ee,t)};on.exports.cancel=function(){Dt.apply(Ee,arguments)};on.exports.polyfill=function(t){t||(t=Ee),t.requestAnimationFrame=ct,t.cancelAnimationFrame=Dt};var nl=on.exports,Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});Ln.default=rl;function rl(t){return t.displayName||t.name||(typeof t=="string"&&t.length>0?t:"Unknown")}var Lt={};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.noop=ol;Lt.intBetween=il;Lt.getCoords=al;function ol(){}function il(t,o,r){return Math.floor(Math.min(o,Math.max(t,r)))}function al(t){return t.type==="touchmove"?{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY}:{x:t.clientX,y:t.clientY}}Object.defineProperty(Ae,"__esModule",{value:!0});var ll=Ae.createHorizontalStrength=Co,sl=Ae.createVerticalStrength=_o,cl=Ae.createScrollingComponent=bo,dl=Ae.default=bl;Ae.defaultVerticalStrength=Ae.defaultHorizontalStrength=void 0;var Pt=vl(z),mt=Mt(fo),ul=kt,hl=Mt(Ja),fr=Mt(nl),fl=Mt(Ln),pl=_i,gl=Mt(ji),Ht=Lt;function Mt(t){return t&&t.__esModule?t:{default:t}}function vl(t){if(t&&t.__esModule)return t;var o={};if(t!=null){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var e=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,r):{};e.get||e.set?Object.defineProperty(o,r,e):o[r]=t[r]}}return o.default=t,o}function Kt(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Kt=function(r){return typeof r}:Kt=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Kt(t)}function tn(){return tn=Object.assign||function(t){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},tn.apply(this,arguments)}function ml(t,o){if(t==null)return{};var r=Sl(t,o),e,n;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(n=0;n<a.length;n++)e=a[n],!(o.indexOf(e)>=0)&&Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}function Sl(t,o){if(t==null)return{};var r={},e=Object.keys(t),n,a;for(a=0;a<e.length;a++)n=e[a],!(o.indexOf(n)>=0)&&(r[n]=t[n]);return r}function yl(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function Cl(t,o){for(var r=0;r<o.length;r++){var e=o[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}function _l(t,o,r){return o&&Cl(t.prototype,o),t}function wl(t,o){return o&&(Kt(o)==="object"||typeof o=="function")?o:bt(t)}function Rn(t){return Rn=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Rn(t)}function xl(t,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(o&&o.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),o&&Tn(t,o)}function Tn(t,o){return Tn=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},Tn(t,o)}function bt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function St(t,o,r){return o in t?Object.defineProperty(t,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[o]=r,t}var yo=150;function Co(t){return function(r,e){var n=r.x,a=r.w,i=r.y,l=r.h,s=Math.min(a/2,t),d=e.x>=n&&e.x<=n+a,c=d&&e.y>=i&&e.y<=i+l;if(c){if(e.x<n+s)return(e.x-n-s)/s;if(e.x>n+a-s)return-(n+a-e.x-s)/s}return 0}}function _o(t){return function(r,e){var n=r.y,a=r.h,i=r.x,l=r.w,s=Math.min(a/2,t),d=e.y>=n&&e.y<=n+a,c=d&&e.x>=i&&e.x<=i+l;if(c){if(e.y<n+s)return(e.y-n-s)/s;if(e.y>n+a-s)return-(n+a-e.y-s)/s}return 0}}var wo=Co(yo);Ae.defaultHorizontalStrength=wo;var xo=_o(yo);Ae.defaultVerticalStrength=xo;function bo(t){var o=function(r){xl(e,r);function e(n,a){var i;return yl(this,e),i=wl(this,Rn(e).call(this,n,a)),St(bt(bt(i)),"updateScrolling",(0,hl.default)(function(l){var s=i.container.getBoundingClientRect(),d=s.left,c=s.top,u=s.width,h=s.height,g={x:d,y:c,w:u,h},f=(0,Ht.getCoords)(l),m=i.props,y=m.horizontalStrength,w=m.verticalStrength;i.scaleX=y(g,f),i.scaleY=w(g,f),!i.frame&&(i.scaleX||i.scaleY)&&i.startScrolling()},100,{trailing:!1})),St(bt(bt(i)),"handleEvent",function(l){i.dragging&&!i.attached&&(i.attach(),i.updateScrolling(l))}),i.wrappedInstance=Pt.default.createRef(),i.scaleX=0,i.scaleY=0,i.frame=null,i.attached=!1,i.dragging=!1,i}return _l(e,[{key:"componentDidMount",value:function(){var a=this;this.container=(0,ul.findDOMNode)(this.wrappedInstance.current),this.container&&typeof this.container.addEventListener=="function"&&this.container.addEventListener("dragover",this.handleEvent),window.document.body.addEventListener("touchmove",this.handleEvent);var i=this.props.dragDropManager;this.clearMonitorSubscription=i.getMonitor().subscribeToStateChange(function(){return a.handleMonitorChange()})}},{key:"componentWillUnmount",value:function(){this.container&&typeof this.container.removeEventListener=="function"&&this.container.removeEventListener("dragover",this.handleEvent),window.document.body.removeEventListener("touchmove",this.handleEvent),this.clearMonitorSubscription(),this.stopScrolling()}},{key:"handleMonitorChange",value:function(){var a=this.props.dragDropManager,i=a.getMonitor().isDragging();!this.dragging&&i?this.dragging=!0:this.dragging&&!i&&(this.dragging=!1,this.stopScrolling())}},{key:"attach",value:function(){this.attached=!0,window.document.body.addEventListener("dragover",this.updateScrolling),window.document.body.addEventListener("touchmove",this.updateScrolling)}},{key:"detach",value:function(){this.attached=!1,window.document.body.removeEventListener("dragover",this.updateScrolling),window.document.body.removeEventListener("touchmove",this.updateScrolling)}},{key:"startScrolling",value:function(){var a=this,i=0,l=function s(){var d=a.scaleX,c=a.scaleY,u=a.container,h=a.props,g=h.strengthMultiplier,f=h.onScrollChange;if(g===0||d+c===0){a.stopScrolling();return}if(i+=1,i%2){var m=u.scrollLeft,y=u.scrollTop,w=u.scrollWidth,v=u.scrollHeight,D=u.clientWidth,C=u.clientHeight,I=d?u.scrollLeft=(0,Ht.intBetween)(0,w-D,m+d*g):m,R=c?u.scrollTop=(0,Ht.intBetween)(0,v-C,y+c*g):y;f(I,R)}a.frame=(0,fr.default)(s)};l()}},{key:"stopScrolling",value:function(){this.detach(),this.scaleX=0,this.scaleY=0,this.frame&&(fr.default.cancel(this.frame),this.frame=null)}},{key:"render",value:function(){var a=this.props;a.strengthMultiplier,a.verticalStrength,a.horizontalStrength,a.onScrollChange;var i=ml(a,["strengthMultiplier","verticalStrength","horizontalStrength","onScrollChange"]);return Pt.default.createElement(t,tn({ref:this.wrappedInstance},i))}}]),e}(Pt.Component);return St(o,"displayName","Scrolling(".concat((0,fl.default)(t),")")),St(o,"propTypes",{dragDropManager:mt.default.object.isRequired,onScrollChange:mt.default.func,verticalStrength:mt.default.func,horizontalStrength:mt.default.func,strengthMultiplier:mt.default.number}),St(o,"defaultProps",{onScrollChange:Ht.noop,verticalStrength:xo,horizontalStrength:wo,strengthMultiplier:30}),(0,gl.default)(o,t)}function bl(t){var o=bo(t);return function(r){return Pt.default.createElement(pl.DragDropContextConsumer,null,function(e){var n=e.dragDropManager;return n===void 0?null:Pt.default.createElement(o,tn({},r,{dragDropManager:n}))})}}function Ro(){var t=this.constructor.getDerivedStateFromProps(this.props,this.state);t!=null&&this.setState(t)}function To(t){function o(r){var e=this.constructor.getDerivedStateFromProps(t,r);return e??null}this.setState(o.bind(this))}function Io(t,o){try{var r=this.props,e=this.state;this.props=t,this.state=o,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(r,e)}finally{this.props=r,this.state=e}}Ro.__suppressDeprecationWarning=!0;To.__suppressDeprecationWarning=!0;Io.__suppressDeprecationWarning=!0;function Et(t){var o=t.prototype;if(!o||!o.isReactComponent)throw new Error("Can only polyfill class components");if(typeof t.getDerivedStateFromProps!="function"&&typeof o.getSnapshotBeforeUpdate!="function")return t;var r=null,e=null,n=null;if(typeof o.componentWillMount=="function"?r="componentWillMount":typeof o.UNSAFE_componentWillMount=="function"&&(r="UNSAFE_componentWillMount"),typeof o.componentWillReceiveProps=="function"?e="componentWillReceiveProps":typeof o.UNSAFE_componentWillReceiveProps=="function"&&(e="UNSAFE_componentWillReceiveProps"),typeof o.componentWillUpdate=="function"?n="componentWillUpdate":typeof o.UNSAFE_componentWillUpdate=="function"&&(n="UNSAFE_componentWillUpdate"),r!==null||e!==null||n!==null){var a=t.displayName||t.name,i=typeof t.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
3
3
|
|
|
4
4
|
`+a+" uses "+i+" but also contains the following legacy lifecycles:"+(r!==null?`
|
|
5
5
|
`+r:"")+(e!==null?`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g,a4 as k,t as oe,a3 as re,bv as se,T as q,x as ce}from"./vendor-mui-core-DxqV1NVn.js";import{k as ae,f as ie,r as A,L as le}from"./vendor-react-DoD83n6N.js";import{u as ue,aK as de,w as he,aT as fe,aU as ge,aj as me,aV as be,aW as pe,C as we,aS as ke,p as ye,aX as ve,W as P,$ as xe}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{f as B,u as F,l as _e,s as Me}from"./vendor-hooks-sw5wvnca.js";import{u as je}from"./use-passport-id-B-b-_oYF.js";import{H as W}from"./vendor-arcblock-DvaaLvvM.js";import{b as Ce,G as Ie,x as Te,y as De,H as Pe,a7 as Fe,a8 as Le}from"./vendor-utils-DR57WNxP.js";import{g as $}from"./get-safe-url-BKl2A9x2.js";import{u as Oe,p as H}from"./index-BsUr7wGb.js";import"./lottie-web-B6s7dDoL.js";const _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},G={};for(const e of Object.keys(_))G[_[e]]=e;const i={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},y=(6/29)**3;for(const e of Object.keys(i)){if(!("channels"in i[e]))throw new Error("missing channels property: "+e);if(!("labels"in i[e]))throw new Error("missing channel labels property: "+e);if(i[e].labels.length!==i[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:o,labels:r}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],"channels",{value:o}),Object.defineProperty(i[e],"labels",{value:r})}i.rgb.hsl=function(e){const o=e[0]/255,r=e[1]/255,n=e[2]/255,t=Math.min(o,r,n),s=Math.max(o,r,n),c=s-t;let a,l;switch(s){case t:{a=0;break}case o:{a=(r-n)/c;break}case r:{a=2+(n-o)/c;break}case n:{a=4+(o-r)/c;break}}a=Math.min(a*60,360),a<0&&(a+=360);const f=(t+s)/2;return s===t?l=0:f<=.5?l=c/(s+t):l=c/(2-s-t),[a,l*100,f*100]};i.rgb.hsv=function(e){let o,r,n,t,s;const c=e[0]/255,a=e[1]/255,l=e[2]/255,f=Math.max(c,a,l),p=f-Math.min(c,a,l),b=function(j){return(f-j)/6/p+1/2};if(p===0)t=0,s=0;else{switch(s=p/f,o=b(c),r=b(a),n=b(l),f){case c:{t=n-r;break}case a:{t=1/3+o-n;break}case l:{t=2/3+r-o;break}}t<0?t+=1:t>1&&(t-=1)}return[t*360,s*100,f*100]};i.rgb.hwb=function(e){const o=e[0],r=e[1];let n=e[2];const t=i.rgb.hsl(e)[0],s=1/255*Math.min(o,Math.min(r,n));return n=1-1/255*Math.max(o,Math.max(r,n)),[t,s*100,n*100]};i.rgb.cmyk=function(e){const o=e[0]/255,r=e[1]/255,n=e[2]/255,t=Math.min(1-o,1-r,1-n),s=(1-o-t)/(1-t)||0,c=(1-r-t)/(1-t)||0,a=(1-n-t)/(1-t)||0;return[s*100,c*100,a*100,t*100]};function Ee(e,o){return(e[0]-o[0])**2+(e[1]-o[1])**2+(e[2]-o[2])**2}i.rgb.keyword=function(e){const o=G[e];if(o)return o;let r=Number.POSITIVE_INFINITY,n;for(const t of Object.keys(_)){const s=_[t],c=Ee(e,s);c<r&&(r=c,n=t)}return n};i.keyword.rgb=function(e){return _[e]};i.rgb.xyz=function(e){let o=e[0]/255,r=e[1]/255,n=e[2]/255;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;const t=o*.4124564+r*.3575761+n*.1804375,s=o*.2126729+r*.7151522+n*.072175,c=o*.0193339+r*.119192+n*.9503041;return[t*100,s*100,c*100]};i.rgb.lab=function(e){const o=i.rgb.xyz(e);let r=o[0],n=o[1],t=o[2];r/=95.047,n/=100,t/=108.883,r=r>y?r**(1/3):7.787*r+16/116,n=n>y?n**(1/3):7.787*n+16/116,t=t>y?t**(1/3):7.787*t+16/116;const s=116*n-16,c=500*(r-n),a=200*(n-t);return[s,c,a]};i.hsl.rgb=function(e){const o=e[0]/360,r=e[1]/100,n=e[2]/100;let t,s;if(r===0)return s=n*255,[s,s,s];const c=n<.5?n*(1+r):n+r-n*r,a=2*n-c,l=[0,0,0];for(let f=0;f<3;f++)t=o+1/3*-(f-1),t<0&&t++,t>1&&t--,6*t<1?s=a+(c-a)*6*t:2*t<1?s=c:3*t<2?s=a+(c-a)*(2/3-t)*6:s=a,l[f]=s*255;return l};i.hsl.hsv=function(e){const o=e[0];let r=e[1]/100,n=e[2]/100,t=r;const s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,t*=s<=1?s:2-s;const c=(n+r)/2,a=n===0?2*t/(s+t):2*r/(n+r);return[o,a*100,c*100]};i.hsv.rgb=function(e){const o=e[0]/60,r=e[1]/100;let n=e[2]/100;const t=Math.floor(o)%6,s=o-Math.floor(o),c=255*n*(1-r),a=255*n*(1-r*s),l=255*n*(1-r*(1-s));switch(n*=255,t){case 0:return[n,l,c];case 1:return[a,n,c];case 2:return[c,n,l];case 3:return[c,a,n];case 4:return[l,c,n];case 5:return[n,c,a]}};i.hsv.hsl=function(e){const o=e[0],r=e[1]/100,n=e[2]/100,t=Math.max(n,.01);let s,c;c=(2-r)*n;const a=(2-r)*t;return s=r*t,s/=a<=1?a:2-a,s=s||0,c/=2,[o,s*100,c*100]};i.hwb.rgb=function(e){const o=e[0]/360;let r=e[1]/100,n=e[2]/100;const t=r+n;let s;t>1&&(r/=t,n/=t);const c=Math.floor(6*o),a=1-n;s=6*o-c,c&1&&(s=1-s);const l=r+s*(a-r);let f,p,b;switch(c){default:case 6:case 0:{f=a,p=l,b=r;break}case 1:{f=l,p=a,b=r;break}case 2:{f=r,p=a,b=l;break}case 3:{f=r,p=l,b=a;break}case 4:{f=l,p=r,b=a;break}case 5:{f=a,p=r,b=l;break}}return[f*255,p*255,b*255]};i.cmyk.rgb=function(e){const o=e[0]/100,r=e[1]/100,n=e[2]/100,t=e[3]/100,s=1-Math.min(1,o*(1-t)+t),c=1-Math.min(1,r*(1-t)+t),a=1-Math.min(1,n*(1-t)+t);return[s*255,c*255,a*255]};i.xyz.rgb=function(e){const o=e[0]/100,r=e[1]/100,n=e[2]/100;let t,s,c;return t=o*3.2404542+r*-1.5371385+n*-.4985314,s=o*-.969266+r*1.8760108+n*.041556,c=o*.0556434+r*-.2040259+n*1.0572252,t=t>.0031308?1.055*t**(1/2.4)-.055:t*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,t=Math.min(Math.max(0,t),1),s=Math.min(Math.max(0,s),1),c=Math.min(Math.max(0,c),1),[t*255,s*255,c*255]};i.xyz.lab=function(e){let o=e[0],r=e[1],n=e[2];o/=95.047,r/=100,n/=108.883,o=o>y?o**(1/3):7.787*o+16/116,r=r>y?r**(1/3):7.787*r+16/116,n=n>y?n**(1/3):7.787*n+16/116;const t=116*r-16,s=500*(o-r),c=200*(r-n);return[t,s,c]};i.lab.xyz=function(e){const o=e[0],r=e[1],n=e[2];let t,s,c;s=(o+16)/116,t=r/500+s,c=s-n/200;const a=s**3,l=t**3,f=c**3;return s=a>y?a:(s-16/116)/7.787,t=l>y?l:(t-16/116)/7.787,c=f>y?f:(c-16/116)/7.787,t*=95.047,s*=100,c*=108.883,[t,s,c]};i.lab.lch=function(e){const o=e[0],r=e[1],n=e[2];let t;t=Math.atan2(n,r)*360/2/Math.PI,t<0&&(t+=360);const c=Math.sqrt(r*r+n*n);return[o,c,t]};i.lch.lab=function(e){const o=e[0],r=e[1],t=e[2]/360*2*Math.PI,s=r*Math.cos(t),c=r*Math.sin(t);return[o,s,c]};i.rgb.ansi16=function(e,o=null){const[r,n,t]=e;let s=o===null?i.rgb.hsv(e)[2]:o;if(s=Math.round(s/50),s===0)return 30;let c=30+(Math.round(t/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(c+=60),c};i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])};i.rgb.ansi256=function(e){const o=e[0],r=e[1],n=e[2];return o>>4===r>>4&&r>>4===n>>4?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};i.ansi16.rgb=function(e){e=e[0];let o=e%10;if(o===0||o===7)return e>50&&(o+=3.5),o=o/10.5*255,[o,o,o];const r=(Math.trunc(e>50)+1)*.5,n=(o&1)*r*255,t=(o>>1&1)*r*255,s=(o>>2&1)*r*255;return[n,t,s]};i.ansi256.rgb=function(e){if(e=e[0],e>=232){const s=(e-232)*10+8;return[s,s,s]}e-=16;let o;const r=Math.floor(e/36)/5*255,n=Math.floor((o=e%36)/6)/5*255,t=o%6/5*255;return[r,n,t]};i.rgb.hex=function(e){const r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};i.hex.rgb=function(e){const o=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!o)return[0,0,0];let r=o[0];o[0].length===3&&(r=[...r].map(a=>a+a).join(""));const n=Number.parseInt(r,16),t=n>>16&255,s=n>>8&255,c=n&255;return[t,s,c]};i.rgb.hcg=function(e){const o=e[0]/255,r=e[1]/255,n=e[2]/255,t=Math.max(Math.max(o,r),n),s=Math.min(Math.min(o,r),n),c=t-s;let a;const l=c<1?s/(1-c):0;return c<=0?a=0:t===o?a=(r-n)/c%6:t===r?a=2+(n-o)/c:a=4+(o-r)/c,a/=6,a%=1,[a*360,c*100,l*100]};i.hsl.hcg=function(e){const o=e[1]/100,r=e[2]/100,n=r<.5?2*o*r:2*o*(1-r);let t=0;return n<1&&(t=(r-.5*n)/(1-n)),[e[0],n*100,t*100]};i.hsv.hcg=function(e){const o=e[1]/100,r=e[2]/100,n=o*r;let t=0;return n<1&&(t=(r-n)/(1-n)),[e[0],n*100,t*100]};i.hcg.rgb=function(e){const o=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];const t=[0,0,0],s=o%1*6,c=s%1,a=1-c;let l=0;switch(Math.floor(s)){case 0:{t[0]=1,t[1]=c,t[2]=0;break}case 1:{t[0]=a,t[1]=1,t[2]=0;break}case 2:{t[0]=0,t[1]=1,t[2]=c;break}case 3:{t[0]=0,t[1]=a,t[2]=1;break}case 4:{t[0]=c,t[1]=0,t[2]=1;break}default:t[0]=1,t[1]=0,t[2]=a}return l=(1-r)*n,[(r*t[0]+l)*255,(r*t[1]+l)*255,(r*t[2]+l)*255]};i.hcg.hsv=function(e){const o=e[1]/100,r=e[2]/100,n=o+r*(1-o);let t=0;return n>0&&(t=o/n),[e[0],t*100,n*100]};i.hcg.hsl=function(e){const o=e[1]/100,n=e[2]/100*(1-o)+.5*o;let t=0;return n>0&&n<.5?t=o/(2*n):n>=.5&&n<1&&(t=o/(2*(1-n))),[e[0],t*100,n*100]};i.hcg.hwb=function(e){const o=e[1]/100,r=e[2]/100,n=o+r*(1-o);return[e[0],(n-o)*100,(1-n)*100]};i.hwb.hcg=function(e){const o=e[1]/100,n=1-e[2]/100,t=n-o;let s=0;return t<1&&(s=(n-t)/(1-t)),[e[0],t*100,s*100]};i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};i.gray.hsl=function(e){return[0,0,e[0]]};i.gray.hsv=i.gray.hsl;i.gray.hwb=function(e){return[0,100,e[0]]};i.gray.cmyk=function(e){return[0,0,0,e[0]]};i.gray.lab=function(e){return[e[0],0,0]};i.gray.hex=function(e){const o=Math.round(e[0]/100*255)&255,n=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".slice(n.length)+n};i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};function Ue(){const e={},o=Object.keys(i);for(let{length:r}=o,n=0;n<r;n++)e[o[n]]={distance:-1,parent:null};return e}function Se(e){const o=Ue(),r=[e];for(o[e].distance=0;r.length>0;){const n=r.pop(),t=Object.keys(i[n]);for(let{length:s}=t,c=0;c<s;c++){const a=t[c],l=o[a];l.distance===-1&&(l.distance=o[n].distance+1,l.parent=n,r.unshift(a))}}return o}function Re(e,o){return function(r){return o(e(r))}}function Ne(e,o){const r=[o[e].parent,e];let n=i[o[e].parent][e],t=o[e].parent;for(;o[t].parent;)r.unshift(o[t].parent),n=Re(i[o[t].parent][t],n),t=o[t].parent;return n.conversion=r,n}function ze(e){const o=Se(e),r={},n=Object.keys(o);for(let{length:t}=n,s=0;s<t;s++){const c=n[s];o[c].parent!==null&&(r[c]=Ne(c,o))}return r}const x={},qe=Object.keys(i);function Ae(e){const o=function(...r){const n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(o.conversion=e.conversion),o}function Be(e){const o=function(...r){const n=r[0];if(n==null)return n;n.length>1&&(r=n);const t=e(r);if(typeof t=="object")for(let{length:s}=t,c=0;c<s;c++)t[c]=Math.round(t[c]);return t};return"conversion"in e&&(o.conversion=e.conversion),o}for(const e of qe){x[e]={},Object.defineProperty(x[e],"channels",{value:i[e].channels}),Object.defineProperty(x[e],"labels",{value:i[e].labels});const o=ze(e),r=Object.keys(o);for(const n of r){const t=o[n];x[e][n]=Be(t),x[e][n].raw=Ae(t)}}const K="authorization_response",We=ke(),$e="blocklet:onLogin",M=new BroadcastChannel($e);function tn(){const{getPassportId:e}=je(),{session:o,connectApi:r}=Oe(),{t:n,locale:t}=ue(),s=ae(),[c]=ie(),{encrypt:a}=de();he();let l={};try{l=JSON.parse(decodeURIComponent(fe(c.get("params"))))}catch(d){console.error("parse connect params failed",d)}Ce(c.get("popup"));const{action:f="login",passkeyBehavior:p="both",extraParams:b={},messages:j,...C}=l;A.useEffect(()=>{b.inviter&&window.localStorage.setItem("inviter",b.inviter)},[b.inviter]);const v=c.get("redirect"),L=c.get("opener"),I=c.get("_ek_");b.passportId=e(),f==="login"&&Ie(C.forceConnected)&&(C.forceConnected=!1);const T=d=>I?a(JSON.stringify(d),I):d,O=A.useMemo(()=>v||!window.opener?"redirect":"popup",[v]),E=async d=>{const u=await We.federated.getTrustedDomains();if(!L){u.forEach(h=>{window.opener.postMessage(d,Fe(h)),window.opener.postMessage(d,Le(h))});return}const m=new URL(L);if(!u.includes(m.hostname))throw P.error(n("login.invalidOpenerUrl")),new Error("Invalid login caller");window.opener.postMessage(d,m.origin)},U=({encrypted:d=!0,...u},m,h)=>{d&&(u.sessionToken&&(u.sessionToken=m(u.sessionToken)),u.refreshToken&&(u.refreshToken=m(u.refreshToken)),u.visitorId&&(u.visitorId=m(u.visitorId))),u.visitorId&&localStorage.setItem("__visitor_id",u.visitorId);const D={type:K,response:u,options:h};({redirect:()=>{setTimeout(()=>{if(v){const z=decodeURIComponent(v),w=H(z);I&&w.searchParams.set("encrypted",!0),u.sessionToken&&w.searchParams.set("sessionToken",T(u.sessionToken)),u.refreshToken&&w.searchParams.set("refreshToken",T(u.refreshToken)),u.visitorId&&w.searchParams.set("visitorId",T(u.visitorId)),h!=null&&h.connected_did&&w.searchParams.set("connected_did",h.connected_did),h!=null&&h.connected_pk&&w.searchParams.set("connected_pk",h.connected_pk),h!=null&&h.connected_app&&w.searchParams.set("connected_app",h.connected_app),h!=null&&h.connected_wallet_os&&w.searchParams.set("connected_wallet_os",h.connected_wallet_os),h!=null&&h.saveConnect&&w.searchParams.set("saveConnect",h.saveConnect),M.postMessage({...Pe(u,["sessionToken","refreshToken","visitorId"])}),xe(z)?window.location.replace($(w.href,{allowDomains:null})):s(`${w.pathname}${w.search}`,{replace:!0})}else window.location.replace(window.env.pathPrefix||"/")},50)},popup:async()=>{await E(D),setTimeout(()=>{window.open("about:blank","_self"),window.close()},2e3)}})[O]()},V=d=>{const u={type:K,error:d.message,errorDescription:d.message};({redirect:()=>{P.error(d.message)},popup:()=>{E(u)}})[O]()},Q=B(()=>{var u;if(f!=="login")return null;const d=((u=window.blocklet)==null?void 0:u.trustedFactories)||[];return(d==null?void 0:d.length)>0?g.jsxs(k,{children:[n("exchangePassport.tooltip1"),g.jsx(k,{component:le,reloadDocument:!0,to:Te(De(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/exchange-passport"),{redirect:v||"/"}),sx:{color:ge.primary.light,"&:hover":{textDecoration:"underline dashed"}},children:n("exchangePassport.tooltip2")},"exchange-passport"),g.jsx(k,{component:"ul",sx:{pl:1.5},children:d.map(m=>g.jsx(k,{component:"li",children:m},m))})]}):null},[f]),X=F(async()=>{if(!v)return!0;let d;try{d=new URL(v)}catch{return!1}let u;try{u=new URL(l==null?void 0:l.baseUrl)}catch{try{u=new URL(l==null?void 0:l.prefix)}catch(m){console.error("baseUrl and prefix are both invalid",m)}}if(u){let m=[];if(u.origin===window.location.origin)m=window.blocklet.domainAliases||[];else{const h=await ve(u.origin);m=(h==null?void 0:h.domainAliases)||[]}if(!m.includes(d.hostname))return P.error(n("login.invalidRedirectUrl")),!1}return!0}),S=F(()=>{const d=decodeURIComponent(v),u=H(d);window.location.replace($(u.href,{allowDomains:null}))}),J=!0,Y=!0,R=oe(d=>d.breakpoints.down("lg")),N=F(async()=>{await X()&&J&&(window.temporaryDIDConnectOnSuccess=(u,m)=>{U(u,m,{saveConnect:!0})},setTimeout(()=>{var u;r.open({locale:t,action:f,passkeyBehavior:p,extraParams:b,...C,className:"connect",popup:!0,messages:j||{title:n("login.connect.title"),scan:n("login.connect.scan"),confirm:n("login.connect.confirm"),success:n("login.connect.success")},extraContent:Q,useSocket:!0,allowWallet:["1","true",void 0,null].includes((u=globalThis.blocklet)==null?void 0:u.DID_CONNECT_ALLOW_WALLET),onSuccess:U,onError:V,hideCloseButton:Y})}))});_e(()=>{N(),M.addEventListener("message",S)}),Me(()=>{delete window.temporaryDIDConnectOnSuccess,M.removeEventListener("message",S),M.close()});function Z(d,u=1){const[m,h,D]=x.hex.rgb(d);return`rgba(${m}, ${h}, ${D}, ${u})`}const ee=B(()=>{const d=globalThis.blocklet.appPid,u=me.isEthereumDid(d),m=u?void 0:be(d);return u?pe(d):m.color},[globalThis.blocklet.appPid]);if(o.loading)return g.jsxs(g.Fragment,{children:[g.jsx(W,{children:g.jsx("title",{children:"DID Connect"})}),g.jsx(we,{children:g.jsx(re,{})})]});const ne=globalThis.blocklet.appName,te=globalThis.blocklet.appDescription;return g.jsxs(g.Fragment,{children:[g.jsx(W,{children:g.jsxs("title",{children:[globalThis.blocklet.appName," | DID Connect"]})}),R?g.jsx(se,{styles:{"& .did-connect__container-dialog > .MuiBackdrop-root":{backgroundColor:"white !important"}}}):g.jsx(k,{sx:{position:"fixed",top:0,bottom:0,left:0,right:0,display:"flex",justifyContent:"center",alignItems:"center",px:8,py:6,background:`radial-gradient(circle at bottom right, ${Z(ee,.3)} 10%, #ffffff 50%)`},children:g.jsxs(k,{sx:{maxWidth:1200,display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",margin:"auto"},children:[g.jsxs(k,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[g.jsx("img",{width:50,src:"/.well-known/service/blocklet/logo?imageFilter=convert&f=png&h=80",alt:"App Logo"}),g.jsx(q,{variant:"h2",sx:{fontWeight:"bold"},children:ne}),g.jsx(q,{variant:"h5",sx:{mb:2},children:g.jsx(k,{children:te})}),g.jsx(k,{sx:{mt:8},children:g.jsx(ce,{variant:"contained",disableElevation:!0,color:"primary",size:"large",onClick:N,children:"Connect"})})]}),R?null:g.jsx(k,{sx:{filter:"blur(180px)"},children:g.jsx("img",{width:210,src:"/.well-known/service/blocklet/logo?imageFilter=convert&f=png&h=80",alt:"App Logo"})})]})})]})}export{tn as default};
|
|
1
|
+
import{j as g,a4 as k,t as oe,a3 as re,bv as se,T as q,x as ce}from"./vendor-mui-core-DxqV1NVn.js";import{k as ae,f as ie,r as A,L as le}from"./vendor-react-DoD83n6N.js";import{u as ue,aK as de,w as he,aT as fe,aU as ge,aj as me,aV as be,aW as pe,C as we,aS as ke,p as ye,aX as ve,W as P,$ as xe}from"./vendor-ux-did-connect-Bciw9Ypu.js";import{f as B,u as F,l as _e,s as Me}from"./vendor-hooks-sw5wvnca.js";import{u as je}from"./use-passport-id-B-b-_oYF.js";import{H as W}from"./vendor-arcblock-DvaaLvvM.js";import{b as Ce,G as Ie,x as Te,y as De,H as Pe,a7 as Fe,a8 as Le}from"./vendor-utils-DR57WNxP.js";import{g as $}from"./get-safe-url-QFq5JNoE.js";import{u as Oe,p as H}from"./index-BsUr7wGb.js";import"./lottie-web-B6s7dDoL.js";const _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},G={};for(const e of Object.keys(_))G[_[e]]=e;const i={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},y=(6/29)**3;for(const e of Object.keys(i)){if(!("channels"in i[e]))throw new Error("missing channels property: "+e);if(!("labels"in i[e]))throw new Error("missing channel labels property: "+e);if(i[e].labels.length!==i[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:o,labels:r}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],"channels",{value:o}),Object.defineProperty(i[e],"labels",{value:r})}i.rgb.hsl=function(e){const o=e[0]/255,r=e[1]/255,n=e[2]/255,t=Math.min(o,r,n),s=Math.max(o,r,n),c=s-t;let a,l;switch(s){case t:{a=0;break}case o:{a=(r-n)/c;break}case r:{a=2+(n-o)/c;break}case n:{a=4+(o-r)/c;break}}a=Math.min(a*60,360),a<0&&(a+=360);const f=(t+s)/2;return s===t?l=0:f<=.5?l=c/(s+t):l=c/(2-s-t),[a,l*100,f*100]};i.rgb.hsv=function(e){let o,r,n,t,s;const c=e[0]/255,a=e[1]/255,l=e[2]/255,f=Math.max(c,a,l),p=f-Math.min(c,a,l),b=function(j){return(f-j)/6/p+1/2};if(p===0)t=0,s=0;else{switch(s=p/f,o=b(c),r=b(a),n=b(l),f){case c:{t=n-r;break}case a:{t=1/3+o-n;break}case l:{t=2/3+r-o;break}}t<0?t+=1:t>1&&(t-=1)}return[t*360,s*100,f*100]};i.rgb.hwb=function(e){const o=e[0],r=e[1];let n=e[2];const t=i.rgb.hsl(e)[0],s=1/255*Math.min(o,Math.min(r,n));return n=1-1/255*Math.max(o,Math.max(r,n)),[t,s*100,n*100]};i.rgb.cmyk=function(e){const o=e[0]/255,r=e[1]/255,n=e[2]/255,t=Math.min(1-o,1-r,1-n),s=(1-o-t)/(1-t)||0,c=(1-r-t)/(1-t)||0,a=(1-n-t)/(1-t)||0;return[s*100,c*100,a*100,t*100]};function Ee(e,o){return(e[0]-o[0])**2+(e[1]-o[1])**2+(e[2]-o[2])**2}i.rgb.keyword=function(e){const o=G[e];if(o)return o;let r=Number.POSITIVE_INFINITY,n;for(const t of Object.keys(_)){const s=_[t],c=Ee(e,s);c<r&&(r=c,n=t)}return n};i.keyword.rgb=function(e){return _[e]};i.rgb.xyz=function(e){let o=e[0]/255,r=e[1]/255,n=e[2]/255;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;const t=o*.4124564+r*.3575761+n*.1804375,s=o*.2126729+r*.7151522+n*.072175,c=o*.0193339+r*.119192+n*.9503041;return[t*100,s*100,c*100]};i.rgb.lab=function(e){const o=i.rgb.xyz(e);let r=o[0],n=o[1],t=o[2];r/=95.047,n/=100,t/=108.883,r=r>y?r**(1/3):7.787*r+16/116,n=n>y?n**(1/3):7.787*n+16/116,t=t>y?t**(1/3):7.787*t+16/116;const s=116*n-16,c=500*(r-n),a=200*(n-t);return[s,c,a]};i.hsl.rgb=function(e){const o=e[0]/360,r=e[1]/100,n=e[2]/100;let t,s;if(r===0)return s=n*255,[s,s,s];const c=n<.5?n*(1+r):n+r-n*r,a=2*n-c,l=[0,0,0];for(let f=0;f<3;f++)t=o+1/3*-(f-1),t<0&&t++,t>1&&t--,6*t<1?s=a+(c-a)*6*t:2*t<1?s=c:3*t<2?s=a+(c-a)*(2/3-t)*6:s=a,l[f]=s*255;return l};i.hsl.hsv=function(e){const o=e[0];let r=e[1]/100,n=e[2]/100,t=r;const s=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,t*=s<=1?s:2-s;const c=(n+r)/2,a=n===0?2*t/(s+t):2*r/(n+r);return[o,a*100,c*100]};i.hsv.rgb=function(e){const o=e[0]/60,r=e[1]/100;let n=e[2]/100;const t=Math.floor(o)%6,s=o-Math.floor(o),c=255*n*(1-r),a=255*n*(1-r*s),l=255*n*(1-r*(1-s));switch(n*=255,t){case 0:return[n,l,c];case 1:return[a,n,c];case 2:return[c,n,l];case 3:return[c,a,n];case 4:return[l,c,n];case 5:return[n,c,a]}};i.hsv.hsl=function(e){const o=e[0],r=e[1]/100,n=e[2]/100,t=Math.max(n,.01);let s,c;c=(2-r)*n;const a=(2-r)*t;return s=r*t,s/=a<=1?a:2-a,s=s||0,c/=2,[o,s*100,c*100]};i.hwb.rgb=function(e){const o=e[0]/360;let r=e[1]/100,n=e[2]/100;const t=r+n;let s;t>1&&(r/=t,n/=t);const c=Math.floor(6*o),a=1-n;s=6*o-c,c&1&&(s=1-s);const l=r+s*(a-r);let f,p,b;switch(c){default:case 6:case 0:{f=a,p=l,b=r;break}case 1:{f=l,p=a,b=r;break}case 2:{f=r,p=a,b=l;break}case 3:{f=r,p=l,b=a;break}case 4:{f=l,p=r,b=a;break}case 5:{f=a,p=r,b=l;break}}return[f*255,p*255,b*255]};i.cmyk.rgb=function(e){const o=e[0]/100,r=e[1]/100,n=e[2]/100,t=e[3]/100,s=1-Math.min(1,o*(1-t)+t),c=1-Math.min(1,r*(1-t)+t),a=1-Math.min(1,n*(1-t)+t);return[s*255,c*255,a*255]};i.xyz.rgb=function(e){const o=e[0]/100,r=e[1]/100,n=e[2]/100;let t,s,c;return t=o*3.2404542+r*-1.5371385+n*-.4985314,s=o*-.969266+r*1.8760108+n*.041556,c=o*.0556434+r*-.2040259+n*1.0572252,t=t>.0031308?1.055*t**(1/2.4)-.055:t*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,t=Math.min(Math.max(0,t),1),s=Math.min(Math.max(0,s),1),c=Math.min(Math.max(0,c),1),[t*255,s*255,c*255]};i.xyz.lab=function(e){let o=e[0],r=e[1],n=e[2];o/=95.047,r/=100,n/=108.883,o=o>y?o**(1/3):7.787*o+16/116,r=r>y?r**(1/3):7.787*r+16/116,n=n>y?n**(1/3):7.787*n+16/116;const t=116*r-16,s=500*(o-r),c=200*(r-n);return[t,s,c]};i.lab.xyz=function(e){const o=e[0],r=e[1],n=e[2];let t,s,c;s=(o+16)/116,t=r/500+s,c=s-n/200;const a=s**3,l=t**3,f=c**3;return s=a>y?a:(s-16/116)/7.787,t=l>y?l:(t-16/116)/7.787,c=f>y?f:(c-16/116)/7.787,t*=95.047,s*=100,c*=108.883,[t,s,c]};i.lab.lch=function(e){const o=e[0],r=e[1],n=e[2];let t;t=Math.atan2(n,r)*360/2/Math.PI,t<0&&(t+=360);const c=Math.sqrt(r*r+n*n);return[o,c,t]};i.lch.lab=function(e){const o=e[0],r=e[1],t=e[2]/360*2*Math.PI,s=r*Math.cos(t),c=r*Math.sin(t);return[o,s,c]};i.rgb.ansi16=function(e,o=null){const[r,n,t]=e;let s=o===null?i.rgb.hsv(e)[2]:o;if(s=Math.round(s/50),s===0)return 30;let c=30+(Math.round(t/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return s===2&&(c+=60),c};i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])};i.rgb.ansi256=function(e){const o=e[0],r=e[1],n=e[2];return o>>4===r>>4&&r>>4===n>>4?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};i.ansi16.rgb=function(e){e=e[0];let o=e%10;if(o===0||o===7)return e>50&&(o+=3.5),o=o/10.5*255,[o,o,o];const r=(Math.trunc(e>50)+1)*.5,n=(o&1)*r*255,t=(o>>1&1)*r*255,s=(o>>2&1)*r*255;return[n,t,s]};i.ansi256.rgb=function(e){if(e=e[0],e>=232){const s=(e-232)*10+8;return[s,s,s]}e-=16;let o;const r=Math.floor(e/36)/5*255,n=Math.floor((o=e%36)/6)/5*255,t=o%6/5*255;return[r,n,t]};i.rgb.hex=function(e){const r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};i.hex.rgb=function(e){const o=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!o)return[0,0,0];let r=o[0];o[0].length===3&&(r=[...r].map(a=>a+a).join(""));const n=Number.parseInt(r,16),t=n>>16&255,s=n>>8&255,c=n&255;return[t,s,c]};i.rgb.hcg=function(e){const o=e[0]/255,r=e[1]/255,n=e[2]/255,t=Math.max(Math.max(o,r),n),s=Math.min(Math.min(o,r),n),c=t-s;let a;const l=c<1?s/(1-c):0;return c<=0?a=0:t===o?a=(r-n)/c%6:t===r?a=2+(n-o)/c:a=4+(o-r)/c,a/=6,a%=1,[a*360,c*100,l*100]};i.hsl.hcg=function(e){const o=e[1]/100,r=e[2]/100,n=r<.5?2*o*r:2*o*(1-r);let t=0;return n<1&&(t=(r-.5*n)/(1-n)),[e[0],n*100,t*100]};i.hsv.hcg=function(e){const o=e[1]/100,r=e[2]/100,n=o*r;let t=0;return n<1&&(t=(r-n)/(1-n)),[e[0],n*100,t*100]};i.hcg.rgb=function(e){const o=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];const t=[0,0,0],s=o%1*6,c=s%1,a=1-c;let l=0;switch(Math.floor(s)){case 0:{t[0]=1,t[1]=c,t[2]=0;break}case 1:{t[0]=a,t[1]=1,t[2]=0;break}case 2:{t[0]=0,t[1]=1,t[2]=c;break}case 3:{t[0]=0,t[1]=a,t[2]=1;break}case 4:{t[0]=c,t[1]=0,t[2]=1;break}default:t[0]=1,t[1]=0,t[2]=a}return l=(1-r)*n,[(r*t[0]+l)*255,(r*t[1]+l)*255,(r*t[2]+l)*255]};i.hcg.hsv=function(e){const o=e[1]/100,r=e[2]/100,n=o+r*(1-o);let t=0;return n>0&&(t=o/n),[e[0],t*100,n*100]};i.hcg.hsl=function(e){const o=e[1]/100,n=e[2]/100*(1-o)+.5*o;let t=0;return n>0&&n<.5?t=o/(2*n):n>=.5&&n<1&&(t=o/(2*(1-n))),[e[0],t*100,n*100]};i.hcg.hwb=function(e){const o=e[1]/100,r=e[2]/100,n=o+r*(1-o);return[e[0],(n-o)*100,(1-n)*100]};i.hwb.hcg=function(e){const o=e[1]/100,n=1-e[2]/100,t=n-o;let s=0;return t<1&&(s=(n-t)/(1-t)),[e[0],t*100,s*100]};i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};i.gray.hsl=function(e){return[0,0,e[0]]};i.gray.hsv=i.gray.hsl;i.gray.hwb=function(e){return[0,100,e[0]]};i.gray.cmyk=function(e){return[0,0,0,e[0]]};i.gray.lab=function(e){return[e[0],0,0]};i.gray.hex=function(e){const o=Math.round(e[0]/100*255)&255,n=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".slice(n.length)+n};i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};function Ue(){const e={},o=Object.keys(i);for(let{length:r}=o,n=0;n<r;n++)e[o[n]]={distance:-1,parent:null};return e}function Se(e){const o=Ue(),r=[e];for(o[e].distance=0;r.length>0;){const n=r.pop(),t=Object.keys(i[n]);for(let{length:s}=t,c=0;c<s;c++){const a=t[c],l=o[a];l.distance===-1&&(l.distance=o[n].distance+1,l.parent=n,r.unshift(a))}}return o}function Re(e,o){return function(r){return o(e(r))}}function Ne(e,o){const r=[o[e].parent,e];let n=i[o[e].parent][e],t=o[e].parent;for(;o[t].parent;)r.unshift(o[t].parent),n=Re(i[o[t].parent][t],n),t=o[t].parent;return n.conversion=r,n}function ze(e){const o=Se(e),r={},n=Object.keys(o);for(let{length:t}=n,s=0;s<t;s++){const c=n[s];o[c].parent!==null&&(r[c]=Ne(c,o))}return r}const x={},qe=Object.keys(i);function Ae(e){const o=function(...r){const n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(o.conversion=e.conversion),o}function Be(e){const o=function(...r){const n=r[0];if(n==null)return n;n.length>1&&(r=n);const t=e(r);if(typeof t=="object")for(let{length:s}=t,c=0;c<s;c++)t[c]=Math.round(t[c]);return t};return"conversion"in e&&(o.conversion=e.conversion),o}for(const e of qe){x[e]={},Object.defineProperty(x[e],"channels",{value:i[e].channels}),Object.defineProperty(x[e],"labels",{value:i[e].labels});const o=ze(e),r=Object.keys(o);for(const n of r){const t=o[n];x[e][n]=Be(t),x[e][n].raw=Ae(t)}}const K="authorization_response",We=ke(),$e="blocklet:onLogin",M=new BroadcastChannel($e);function tn(){const{getPassportId:e}=je(),{session:o,connectApi:r}=Oe(),{t:n,locale:t}=ue(),s=ae(),[c]=ie(),{encrypt:a}=de();he();let l={};try{l=JSON.parse(decodeURIComponent(fe(c.get("params"))))}catch(d){console.error("parse connect params failed",d)}Ce(c.get("popup"));const{action:f="login",passkeyBehavior:p="both",extraParams:b={},messages:j,...C}=l;A.useEffect(()=>{b.inviter&&window.localStorage.setItem("inviter",b.inviter)},[b.inviter]);const v=c.get("redirect"),L=c.get("opener"),I=c.get("_ek_");b.passportId=e(),f==="login"&&Ie(C.forceConnected)&&(C.forceConnected=!1);const T=d=>I?a(JSON.stringify(d),I):d,O=A.useMemo(()=>v||!window.opener?"redirect":"popup",[v]),E=async d=>{const u=await We.federated.getTrustedDomains();if(!L){u.forEach(h=>{window.opener.postMessage(d,Fe(h)),window.opener.postMessage(d,Le(h))});return}const m=new URL(L);if(!u.includes(m.hostname))throw P.error(n("login.invalidOpenerUrl")),new Error("Invalid login caller");window.opener.postMessage(d,m.origin)},U=({encrypted:d=!0,...u},m,h)=>{d&&(u.sessionToken&&(u.sessionToken=m(u.sessionToken)),u.refreshToken&&(u.refreshToken=m(u.refreshToken)),u.visitorId&&(u.visitorId=m(u.visitorId))),u.visitorId&&localStorage.setItem("__visitor_id",u.visitorId);const D={type:K,response:u,options:h};({redirect:()=>{setTimeout(()=>{if(v){const z=decodeURIComponent(v),w=H(z);I&&w.searchParams.set("encrypted",!0),u.sessionToken&&w.searchParams.set("sessionToken",T(u.sessionToken)),u.refreshToken&&w.searchParams.set("refreshToken",T(u.refreshToken)),u.visitorId&&w.searchParams.set("visitorId",T(u.visitorId)),h!=null&&h.connected_did&&w.searchParams.set("connected_did",h.connected_did),h!=null&&h.connected_pk&&w.searchParams.set("connected_pk",h.connected_pk),h!=null&&h.connected_app&&w.searchParams.set("connected_app",h.connected_app),h!=null&&h.connected_wallet_os&&w.searchParams.set("connected_wallet_os",h.connected_wallet_os),h!=null&&h.saveConnect&&w.searchParams.set("saveConnect",h.saveConnect),M.postMessage({...Pe(u,["sessionToken","refreshToken","visitorId"])}),xe(z)?window.location.replace($(w.href,{allowDomains:null})):s(`${w.pathname}${w.search}`,{replace:!0})}else window.location.replace(window.env.pathPrefix||"/")},50)},popup:async()=>{await E(D),setTimeout(()=>{window.open("about:blank","_self"),window.close()},2e3)}})[O]()},V=d=>{const u={type:K,error:d.message,errorDescription:d.message};({redirect:()=>{P.error(d.message)},popup:()=>{E(u)}})[O]()},Q=B(()=>{var u;if(f!=="login")return null;const d=((u=window.blocklet)==null?void 0:u.trustedFactories)||[];return(d==null?void 0:d.length)>0?g.jsxs(k,{children:[n("exchangePassport.tooltip1"),g.jsx(k,{component:le,reloadDocument:!0,to:Te(De(ye.WELLKNOWN_SERVICE_PATH_PREFIX,"/exchange-passport"),{redirect:v||"/"}),sx:{color:ge.primary.light,"&:hover":{textDecoration:"underline dashed"}},children:n("exchangePassport.tooltip2")},"exchange-passport"),g.jsx(k,{component:"ul",sx:{pl:1.5},children:d.map(m=>g.jsx(k,{component:"li",children:m},m))})]}):null},[f]),X=F(async()=>{if(!v)return!0;let d;try{d=new URL(v)}catch{return!1}let u;try{u=new URL(l==null?void 0:l.baseUrl)}catch{try{u=new URL(l==null?void 0:l.prefix)}catch(m){console.error("baseUrl and prefix are both invalid",m)}}if(u){let m=[];if(u.origin===window.location.origin)m=window.blocklet.domainAliases||[];else{const h=await ve(u.origin);m=(h==null?void 0:h.domainAliases)||[]}if(!m.includes(d.hostname))return P.error(n("login.invalidRedirectUrl")),!1}return!0}),S=F(()=>{const d=decodeURIComponent(v),u=H(d);window.location.replace($(u.href,{allowDomains:null}))}),J=!0,Y=!0,R=oe(d=>d.breakpoints.down("lg")),N=F(async()=>{await X()&&J&&(window.temporaryDIDConnectOnSuccess=(u,m)=>{U(u,m,{saveConnect:!0})},setTimeout(()=>{var u;r.open({locale:t,action:f,passkeyBehavior:p,extraParams:b,...C,className:"connect",popup:!0,messages:j||{title:n("login.connect.title"),scan:n("login.connect.scan"),confirm:n("login.connect.confirm"),success:n("login.connect.success")},extraContent:Q,useSocket:!0,allowWallet:["1","true",void 0,null].includes((u=globalThis.blocklet)==null?void 0:u.DID_CONNECT_ALLOW_WALLET),onSuccess:U,onError:V,hideCloseButton:Y})}))});_e(()=>{N(),M.addEventListener("message",S)}),Me(()=>{delete window.temporaryDIDConnectOnSuccess,M.removeEventListener("message",S),M.close()});function Z(d,u=1){const[m,h,D]=x.hex.rgb(d);return`rgba(${m}, ${h}, ${D}, ${u})`}const ee=B(()=>{const d=globalThis.blocklet.appPid,u=me.isEthereumDid(d),m=u?void 0:be(d);return u?pe(d):m.color},[globalThis.blocklet.appPid]);if(o.loading)return g.jsxs(g.Fragment,{children:[g.jsx(W,{children:g.jsx("title",{children:"DID Connect"})}),g.jsx(we,{children:g.jsx(re,{})})]});const ne=globalThis.blocklet.appName,te=globalThis.blocklet.appDescription;return g.jsxs(g.Fragment,{children:[g.jsx(W,{children:g.jsxs("title",{children:[globalThis.blocklet.appName," | DID Connect"]})}),R?g.jsx(se,{styles:{"& .did-connect__container-dialog > .MuiBackdrop-root":{backgroundColor:"white !important"}}}):g.jsx(k,{sx:{position:"fixed",top:0,bottom:0,left:0,right:0,display:"flex",justifyContent:"center",alignItems:"center",px:8,py:6,background:`radial-gradient(circle at bottom right, ${Z(ee,.3)} 10%, #ffffff 50%)`},children:g.jsxs(k,{sx:{maxWidth:1200,display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",margin:"auto"},children:[g.jsxs(k,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[g.jsx("img",{width:50,src:"/.well-known/service/blocklet/logo?imageFilter=convert&f=png&h=80",alt:"App Logo"}),g.jsx(q,{variant:"h2",sx:{fontWeight:"bold"},children:ne}),g.jsx(q,{variant:"h5",sx:{mb:2},children:g.jsx(k,{children:te})}),g.jsx(k,{sx:{mt:8},children:g.jsx(ce,{variant:"contained",disableElevation:!0,color:"primary",size:"large",onClick:N,children:"Connect"})})]}),R?null:g.jsx(k,{sx:{filter:"blur(180px)"},children:g.jsx("img",{width:210,src:"/.well-known/service/blocklet/logo?imageFilter=convert&f=png&h=80",alt:"App Logo"})})]})})]})}export{tn as default};
|