@abtnode/webapp 1.16.21-beta-445a8baa → 1.16.21-beta-2e75c75c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/build/asset-manifest.json +40 -39
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/js/1366.f2fe8ce7.chunk.js +2 -0
- package/build/static/js/{1667.488a600b.chunk.js → 1667.4403e42c.chunk.js} +1 -1
- package/build/static/js/1846.5498f998.chunk.js +1 -0
- package/build/static/js/{2334.311ae46d.chunk.js → 2334.2b408137.chunk.js} +1 -1
- package/build/static/js/2743.99b9b3be.chunk.js +1 -0
- package/build/static/js/{2960.a9d50cef.chunk.js → 2960.e4c10af0.chunk.js} +1 -1
- package/build/static/js/3058.cea35b61.chunk.js +1 -0
- package/build/static/js/{3389.282a0683.chunk.js → 3389.1c4a79ac.chunk.js} +1 -1
- package/build/static/js/3883.062d06a9.chunk.js +1 -0
- package/build/static/js/406.37ef18fa.chunk.js +1 -0
- package/build/static/js/4382.f8edadf8.chunk.js +2 -0
- package/build/static/js/{4382.3efe04e3.chunk.js.LICENSE.txt → 4382.f8edadf8.chunk.js.LICENSE.txt} +0 -7
- package/build/static/js/4509.04d35bd4.chunk.js +2 -0
- package/build/static/js/{4549.2e181d10.chunk.js → 4549.295531bf.chunk.js} +1 -1
- package/build/static/js/{4775.19ec4c25.chunk.js → 4775.124a71e4.chunk.js} +1 -1
- package/build/static/js/{4906.aced1b76.chunk.js → 4906.eb0403a8.chunk.js} +1 -1
- package/build/static/js/5015.c33215f2.chunk.js +1 -0
- package/build/static/js/{5526.1c49cfe0.chunk.js → 5526.7f392e7e.chunk.js} +2 -2
- package/build/static/js/{5526.1c49cfe0.chunk.js.LICENSE.txt → 5526.7f392e7e.chunk.js.LICENSE.txt} +1 -1
- package/build/static/js/{5672.19e3e3e6.chunk.js → 5672.71c6240f.chunk.js} +1 -1
- package/build/static/js/5760.02d5f257.chunk.js +1 -0
- package/build/static/js/{1494.35b60e8f.chunk.js → 5887.530ce24e.chunk.js} +2 -2
- package/build/static/js/5914.593c14f7.chunk.js +2 -0
- package/build/static/js/6016.036a6045.chunk.js +1 -0
- package/build/static/js/{6230.3ad32909.chunk.js → 6230.467a9016.chunk.js} +1 -1
- package/build/static/js/6511.44e20630.chunk.js +1 -0
- package/build/static/js/{6780.0338caf8.chunk.js → 6780.aa9fb3ec.chunk.js} +1 -1
- package/build/static/js/{6950.9b84af05.chunk.js → 6950.29776777.chunk.js} +1 -1
- package/build/static/js/7150.691b3551.chunk.js +1 -0
- package/build/static/js/7534.74be3785.chunk.js +1 -0
- package/build/static/js/{7657.ec1da0b4.chunk.js → 7657.60faa231.chunk.js} +2 -2
- package/build/static/js/7687.c54b6889.chunk.js +1 -0
- package/build/static/js/7875.c99786d4.chunk.js +2 -0
- package/build/static/js/{7913.2359b90e.chunk.js → 7913.6ff42e1a.chunk.js} +1 -1
- package/build/static/js/8537.687f4a57.chunk.js +1 -0
- package/build/static/js/9249.e1b97ff3.chunk.js +1 -0
- package/build/static/js/9327.cefafd96.chunk.js +1 -0
- package/build/static/js/9552.29d817f2.chunk.js +1 -0
- package/build/static/js/main.b030daf3.js +2 -0
- package/build/static/js/{main.24534c8b.js.LICENSE.txt → main.b030daf3.js.LICENSE.txt} +1 -1
- package/build/static/media/login-bg.9936fc84e60f5cea6739.png +0 -0
- package/package.json +1 -1
- package/build/static/js/1366.da3d7a8e.chunk.js +0 -2
- package/build/static/js/2435.88762f30.chunk.js +0 -1
- package/build/static/js/3883.5c4045b6.chunk.js +0 -1
- package/build/static/js/3896.de9209b2.chunk.js +0 -1
- package/build/static/js/4240.ecc8270b.chunk.js +0 -1
- package/build/static/js/4382.3efe04e3.chunk.js +0 -2
- package/build/static/js/4509.231da63f.chunk.js +0 -2
- package/build/static/js/4930.9bd4e54c.chunk.js +0 -2
- package/build/static/js/5396.56766685.chunk.js +0 -1
- package/build/static/js/5555.3e38d927.chunk.js +0 -1
- package/build/static/js/5760.82f7dc8f.chunk.js +0 -1
- package/build/static/js/6511.fbff9582.chunk.js +0 -1
- package/build/static/js/7150.ff7c498c.chunk.js +0 -1
- package/build/static/js/7534.c27466a0.chunk.js +0 -1
- package/build/static/js/7687.1a079d52.chunk.js +0 -1
- package/build/static/js/7706.74e51876.chunk.js +0 -2
- package/build/static/js/8537.b03e14a8.chunk.js +0 -1
- package/build/static/js/8585.b9c88d3c.chunk.js +0 -1
- package/build/static/js/9249.c5031d0b.chunk.js +0 -1
- package/build/static/js/9327.4b32dd25.chunk.js +0 -1
- package/build/static/js/9552.3effa95b.chunk.js +0 -1
- package/build/static/js/main.24534c8b.js +0 -2
- /package/build/static/js/{1366.da3d7a8e.chunk.js.LICENSE.txt → 1366.f2fe8ce7.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{1494.35b60e8f.chunk.js.LICENSE.txt → 4509.04d35bd4.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{4509.231da63f.chunk.js.LICENSE.txt → 5887.530ce24e.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7706.74e51876.chunk.js.LICENSE.txt → 5914.593c14f7.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{7657.ec1da0b4.chunk.js.LICENSE.txt → 7657.60faa231.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{4930.9bd4e54c.chunk.js.LICENSE.txt → 7875.c99786d4.chunk.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6950],{16950:(e,n,i)=>{i.r(n),i.d(n,{default:()=>fe});var t=i(71171),r=i(5057),o=i(33518),s=i(85493),a=i(10458),c=i.n(a),l=i(6352),p=i.n(l),d=i(43681),u=i.n(d),v=i(26796),f=i(55898),m=i.n(f),x=i(79366),g=i(44846),h=i(35474),_=i(68420),w=i(13128),j=i(57471),y=i(96266);const b=(0,j.Z)((0,y.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");var k;function Z(e){let{invitation:n,createPassportSvg:i,passportColor:t}=e;const[o,s]=(0,r.useState)(!1),{t:a}=(0,r.useContext)(_.RD),c=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),l=(0,r.useMemo)((()=>i({title:c,issuer:n.info.name,issuerDid:n.info.appDid,ownerName:"Your Name",ownerDid:n.info.appDid,preferredColor:n.info.passportColor||t})),[n,c]),p=(0,r.useCallback)((()=>{s(!0)}),[]),d=(0,r.useCallback)((()=>{s(!1)}),[]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(S,{children:(0,y.jsx)("div",{className:"invite-passport__card",onClick:p,children:(0,y.jsx)("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:l}})})}),(0,y.jsx)(w.ZP,{open:o,title:a("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:d,children:n.role.permissions&&n.role.permissions.length>0?(0,y.jsx)("ul",{style:{listStyle:"circle",padding:"0 20px"},children:n.role.permissions.map((e=>(0,y.jsx)("li",{style:{listStyle:"circle"},children:e.description},e.name)))}):(0,y.jsxs)("div",{style:{color:"#999",textAlign:"center"},children:[(0,y.jsx)(b,{style:{width:"30px",height:"30px"}}),(0,y.jsx)("div",{children:a("invite.emptyPermission")})]})})]})}Z.propTypes={invitation:m().object.isRequired,createPassportSvg:m().func.isRequired,passportColor:m().string},Z.defaultProps={passportColor:"auto"};const S=o.Z.div(k||(k=(0,t.Z)(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n cursor: pointer;\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),C=Z;var P,z=i(92459),N=i(74958),R=i(14491),T=i(70284),L=i(73545);function F(e){let{invitation:n,onLogin:i,onReceive:t,inService:o}=e;const{t:s,locale:a}=(0,_.PE)(),{connectApi:c}=(0,L.T)(),{getPassportId:l}=(0,T.Z)();let d;var u,v;"undefined"!==typeof window&&(d=null===(u=window)||void 0===u||null===(v=u.blocklet)||void 0===v?void 0:v.componentId);const f={passportId:l(),inviteId:n.inviteId,baseUrl:window.location.origin,componentId:d},m=(0,r.useCallback)((()=>{c.close()}),[c]),x=(0,r.useCallback)((function(){c.close(),i(...arguments)}),[i,c]),g=(0,r.useCallback)((()=>{"function"!==typeof t?o?c.openPopup({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:{provider:"wallet",...f},baseUrl:window.location.origin,prefix:p()(window.location.origin,N.Bu,N.nC),messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:x,onClose:m},{locale:a}):c.open({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:f,messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:x,onClose:m}):t()}),[c.openPopup]);return(0,y.jsxs)(I,{children:[(0,y.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:g,children:s("invite.receive")}),(0,y.jsxs)("div",{className:"invite-receive__until",children:[s("invite.validUntil"),(0,R.o0)(n.expireDate,a)]})]})}F.propTypes={invitation:m().object.isRequired,onLogin:m().func,onReceive:m().func,inService:m().bool},F.defaultProps={onLogin:()=>{},onReceive:null,inService:!1};const I=o.Z.div(P||(P=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),E=F;var D;function U(e){let{onLogin:n}=e;const{t:i}=(0,_.PE)();return(0,y.jsx)(M,{children:(0,y.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:()=>n(),children:i("common.connect")})})}U.propTypes={onLogin:m().func},U.defaultProps={onLogin:()=>{}};const M=o.Z.div(D||(D=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),q=U;var H,O=i(72333);function W(e){let{invitation:n}=e;const{t:i}=(0,_.PE)(),t=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),o=(0,r.useMemo)((()=>i("invite.message",{name:"{{name}}",role:t,dapp:"{{dapp}}"})),[i,t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:n.inviter.fullName},"name"):n.inviter.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(A,{children:[(0,y.jsx)(O.Z,{did:n.inviter.did,src:encodeURI(n.inviter.avatar),size:80,shape:"circle",variant:"circle"}),(0,y.jsx)("div",{className:"invite-user__message",children:a})]})}W.propTypes={invitation:m().object.isRequired};const A=o.Z.div(H||(H=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),B=W;var V,Y=i(39948),J=i(76005);function K(e){let{invitation:n,type:i}=e;const{t:t}=(0,_.PE)(),o=(0,r.useMemo)((()=>t("invite.success",{dapp:"{{dapp}}"})),[t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a="receiver"===i?n.receiver:n.inviter,c=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:a.fullName},"name"):a.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(G,{children:[(0,y.jsx)(Y.Z,{pt:1,color:"success.main",children:(0,y.jsx)(J.Z,{style:{fontSize:80}})}),(0,y.jsx)("div",{className:"invite-user__message",children:c})]})}K.propTypes={invitation:m().object.isRequired,type:m().oneOf("inviter","receiver")},K.defaultProps={type:"inviter"};const G=o.Z.div(V||(V=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),Q=K;var X;function $(e){let{invitation:n,...i}=e;return(0,y.jsxs)(ee,{...i,children:[(0,y.jsx)(O.Z,{did:n.info.did,src:n.info.logo,style:{flexShrink:0}}),(0,y.jsxs)("div",{className:"invite-app__content",children:[(0,y.jsx)("div",{className:"invite-app__title",children:n.info.name}),(0,y.jsx)("div",{className:"invite-app__description",children:n.info.description})]})]})}$.propTypes={invitation:m().object.isRequired};const ee=o.Z.div(X||(X=(0,t.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n .invite-app__content {\n flex: 1;\n margin: 0 12px;\n font-weight: 700;\n overflow: hidden;\n }\n .invite-app__title {\n line-height: 1;\n margin-bottom: 2px;\n overflow: hidden;\n }\n .invite-app__description {\n font-size: 12px;\n white-space: nowrap;\n text-overflow: ellipsis;\n height: 1.3em;\n color: #999;\n overflow: hidden;\n }\n"]))),ne=$;var ie,te=i(5766);function re(e){let{getDataFn:n,passportColor:i,createPassportSvg:t,onLoginSuccess:r,checkFn:o,onReceive:s,inService:a}=e;const c=(0,x.Z)(n);if(c.loading)return(0,y.jsx)(g.Z,{});var l,p;if(c.error)return(0,y.jsx)(h.Z,{status:"404",title:null===(l=c.error)||void 0===l||null===(p=l.response)||void 0===p?void 0:p.data,description:""});const d="success"===c.data.status,u=d?Q:B,v=d?q:E;return(0,y.jsxs)(oe,{className:"page-invite__wrapper",children:[(0,y.jsx)(ne,{invitation:c.data}),(0,y.jsxs)("div",{className:"page-invite__card",children:[(0,y.jsx)(u,{invitation:c.data}),(0,y.jsx)(C,{invitation:c.data,createPassportSvg:t,passportColor:i}),(0,y.jsx)(v,{invitation:c.data,onLogin:r,checkFn:o,onReceive:s,inService:a})]})]})}re.propTypes={getDataFn:m().func.isRequired,checkFn:m().func.isRequired,createPassportSvg:m().func.isRequired,onLoginSuccess:m().func,onReceive:m().func,passportColor:m().string,inService:m().bool},re.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1};const oe=o.Z.div(ie||(ie=(0,t.Z)(["\n max-width: 460px;\n max-height: 650px;\n min-height: 450px;\n width: 90%;\n height: 80%;\n display: flex;\n flex-direction: column;\n .page-invite__card {\n background-color: #fff;\n border-radius: 4px;\n flex: 1;\n padding: 20px 30px;\n margin-top: 10px;\n }\n .page-invite__app {\n margin-top: 20px;\n }\n"]))),se=(0,te.Z)(re);var ae,ce=i(49983),le=i(25339),pe=i(75793),de=i(74094);function ue(e){const{api:n,session:i}=(0,le.Tt)(),{info:t}=(0,pe.h6)(),o=(0,s.useLocation)(),a=(0,s.useNavigate)(),{t:l,locale:d}=(0,_.PE)(),{encryptKey:f,decrypt:m}=(0,ce.R)(),[x,h]=(0,r.useState)(!1),w=(0,r.useMemo)((()=>new URLSearchParams(o.search).get("inviteId")),[o]),j=(0,v.default)((async()=>{if(!w)return null;let e;const{data:i}=await n.get("/api/invitation",{params:{inviteId:w}}),r=!!u()(t,"ownerNft.did")&&"owner"===i.role.name;if(r){const i=new URL(window.location.href);i.pathname=p()((0,de.Y5)(),"/api/did/invite/token"),i.searchParams.set("_ek_",f),i.searchParams.set("inviteId",w);const{data:t}=await n.get(i.href);e=t}return{invitation:i,nextWorkflow:e,needReceiveNFT:r}})),b=(0,r.useCallback)((()=>{h(!0)}),[]),k=(0,r.useCallback)((()=>{if(j.error)throw j.error;return j.value.invitation}),[j]),Z=(0,r.useCallback)((async e=>{e&&(0,de.ZB)(m(e.sessionToken));const n=new URLSearchParams(o.search);n.delete("inviteId");const t=n.toString();await i.refresh(),a("/".concat(t?"?".concat(t):t),{replace:!0})}),[o,a,i]);if(j.loading)return(0,y.jsx)(g.Z,{});return(0,y.jsxs)(ve,{className:"page-invite",children:[u()(j,"value.needReceiveNFT")&&(0,y.jsx)(ce.Z,{action:"login",popup:!0,className:"connect",open:x,locale:d,baseUrl:t.launcher.url,checkFn:c().create({baseURL:t.launcher.url}).get,onSuccess:()=>{const e=new URL(window.location.href);e.pathname=p()((0,de.Y5)(),"/api/did/invite/status"),e.searchParams.set("_t_",j.value.nextWorkflow.token),e.searchParams.set("locale",d);const t=setInterval((async()=>{const{data:r}=await n.get(e.href);"succeed"===r.status&&(clearInterval(t),i.updateConnectedInfo(r),Z(r))}),2e3)},onClose:()=>{h(!1)},checkTimeout:3e5,webWalletUrl:(0,de.yP)(t),extraParams:{nw:u()(j,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:t.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),(0,y.jsx)(se,{...e,getDataFn:k,createPassportSvg:e=>(0,de.Ju)(e,t),checkFn:n.get,onLoginSuccess:Z,passportColor:"default",onReceive:u()(j,"value.needReceiveNFT")?b:null})]})}const ve=o.Z.div(ae||(ae=(0,t.Z)(["\n width: 100vw;\n height: 100%;\n min-height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f6f8fa;\n overflow: auto;\n padding: 20px;\n"])));function fe(){return(0,pe.h6)().loading?(0,y.jsx)(g.Z,{}):(0,y.jsx)(ue,{})}},5766:(e,n,i)=>{i.d(n,{Z:()=>p});var t=i(68420),r=i(77668),o=i.n(r),s=i(2586),a=i(56944);const c={zh:o()(a.Z),en:o()(s.Z)};var l=i(96266);function p(e){return function(n){return(0,l.jsx)(t.Iw,{translations:c,children:(0,l.jsx)(e,{...n})})}}},92459:(e,n,i)=>{i.d(n,{Z:()=>c});var t=i(55898),r=i.n(t),o=i(28726),s=i(81089),a=i(96266);function c(e){let{children:n,...i}=e;return(0,a.jsxs)(o.Z,{color:"did",variant:"contained",...i,children:[(0,a.jsx)("span",{style:{fontWeight:400},children:n||"Continue With"}),(0,a.jsx)(s.Z,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}c.propTypes={children:r().any},c.defaultProps={children:""}},35474:(e,n,i)=>{i.d(n,{Z:()=>N});var t={};i.r(t),i.d(t,{ComingSoon:()=>k,Error:()=>y,Forbidden:()=>w,Info:()=>Z,InternalServerError:()=>j,Maintenance:()=>b,PageNotFound:()=>_});var r,o=i(55898),s=i.n(o),a=i(71171),c=i(39948),l=i(47685),p=i(96266);function d(e){let{icon:n,title:i,description:t,extra:r,...o}=e;return(0,p.jsxs)(u,{...o,children:[n,"string"===typeof i?(0,p.jsx)(c.Z,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:i}):i,"string"===typeof t?(0,p.jsx)(c.Z,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:t}):t,(0,p.jsx)(c.Z,{mt:3,children:r})]})}d.propTypes={icon:s().element,title:s().oneOfType([s().string,s().element]),description:s().oneOfType([s().string,s().element]),actions:s().any,extra:s().element},d.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};const u=(0,l.zo)("div")(r||(r=(0,a.Z)(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n padding: 16px;\n\n background-color: #f7f8fb;\n"]))),v=d;var f=i(36134),m=i(11532);const x={en:{404:{title:"404 - Page Not Found",description:"Sorry about that, the page you are looking for does not exist or has been moved."},403:{title:"403 \u2013 Forbidden",description:"Sorry, you are not authorized to access this page."},500:{title:"500 - Internal Server Error",description:"An internal server error has occurred. Please try again later."},error:{title:"Application Error",description:"Something went wrong. Please try again later."},maintenance:{title:"Offline for maintenance",description:"This app is undergoing maintenance right now. Please check back later."},comingSoon:{title:"Coming Soon",description:"Our website is under construction. We'll be here soon with our new website."}},zh:{404:{title:"404 - \u9875\u9762\u672a\u627e\u5230",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6b63\u5728\u5bfb\u627e\u7684\u9875\u9762\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u79fb\u52a8\u3002"},403:{title:"403 \u2013 \u7981\u6b62\u8bbf\u95ee",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6ca1\u6709\u6743\u9650\u8bbf\u95ee\u6b64\u9875\u9762\u3002"},500:{title:"500 - \u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef",description:"\u53d1\u751f\u4e86\u4e00\u4e2a\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\u3002\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},error:{title:"Application Error",description:"\u51fa\u9519\u4e86, \u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},maintenance:{title:"\u7ef4\u62a4\u4e2d",description:"\u5e94\u7528\u7a0b\u5e8f\u6b63\u5728\u8fdb\u884c\u7ef4\u62a4\u3002\u8bf7\u7a0d\u540e\u518d\u67e5\u770b\u3002"},comingSoon:{title:"\u5373\u5c06\u4e0a\u7ebf",description:"\u6211\u4eec\u7684\u7f51\u7ad9\u6b63\u5728\u5efa\u8bbe\u4e2d\u3002\u6211\u4eec\u5f88\u5feb\u5c31\u4f1a\u5728\u8fd9\u91cc\u63a8\u51fa\u6211\u4eec\u7684\u65b0\u7f51\u7ad9\u3002"}}};var g=i(68420);const h=e=>{e=["zh","en"].includes(e)?e:"";const{locale:n}=(0,g.PE)()||{locale:"en"},i=e||n;return x[i]?i:"en"};function _(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][404].title,description:x[n][404].description,...i})}function w(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][403].title,description:x[n][403].description,...i})}function j(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][500].title,description:x[n][500].description,...i})}function y(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n].error.title,description:x[n].error.description,...i})}function b(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),title:x[n].maintenance.title,description:x[n].maintenance.description,...i})}function k(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),title:x[n].comingSoon.title,description:x[n].comingSoon.description,...i})}function Z(e){return(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),...e})}function S(e){const n=(0,l.Fg)();return(0,p.jsx)(m.Z,{style:{color:n.palette.error.main,fontSize:72},...e})}function C(e){const n=(0,l.Fg)();return(0,p.jsx)(f.Z,{style:{color:n.palette.info.main,fontSize:72},...e})}_.status="404",w.status="403",j.status="500",y.status="error",b.status="maintenance",k.status="comingSoon",Z.status="info";const P=Object.keys(t).reduce(((e,n)=>({...e,[t[n].status||n]:t[n]})),{});function z(e){let{status:n,...i}=e;if(n){if(P[n]){const e=P[n];return(0,p.jsx)(e,{...i})}throw new Error("Please provide a valid status for Result.status. Valid values are: ".concat(Object.keys(P).join(", ")))}return(0,p.jsx)(v,{...i})}z.propTypes={status:s().oneOfType([s().string,s().number]),...v.propTypes},z.defaultProps={status:""};const N=z},11532:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm4.3 14.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0a.9959.9959 0 0 1 0-1.41L10.59 12 7.7 9.11a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41z"}),"CancelRounded");n.Z=s},76005:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=s},36134:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");n.Z=s}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[6950],{16950:(e,n,i)=>{i.r(n),i.d(n,{default:()=>fe});var t=i(71171),r=i(5057),o=i(33518),s=i(85493),a=i(10458),c=i.n(a),l=i(6352),p=i.n(l),d=i(43681),u=i.n(d),v=i(26796),f=i(55898),m=i.n(f),x=i(79366),g=i(44846),h=i(35474),_=i(68420),w=i(13128),j=i(57471),y=i(96266);const b=(0,j.Z)((0,y.jsx)("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"}),"Inbox");var k;function Z(e){let{invitation:n,createPassportSvg:i,passportColor:t}=e;const[o,s]=(0,r.useState)(!1),{t:a}=(0,r.useContext)(_.RD),c=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),l=(0,r.useMemo)((()=>i({title:c,issuer:n.info.name,issuerDid:n.info.appDid,ownerName:"Your Name",ownerDid:n.info.appDid,preferredColor:n.info.passportColor||t})),[n,c]),p=(0,r.useCallback)((()=>{s(!0)}),[]),d=(0,r.useCallback)((()=>{s(!1)}),[]);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(S,{children:(0,y.jsx)("div",{className:"invite-passport__card",onClick:p,children:(0,y.jsx)("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:l}})})}),(0,y.jsx)(w.ZP,{open:o,title:a("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:d,children:n.role.permissions&&n.role.permissions.length>0?(0,y.jsx)("ul",{style:{listStyle:"circle",padding:"0 20px"},children:n.role.permissions.map((e=>(0,y.jsx)("li",{style:{listStyle:"circle"},children:e.description},e.name)))}):(0,y.jsxs)("div",{style:{color:"#999",textAlign:"center"},children:[(0,y.jsx)(b,{style:{width:"30px",height:"30px"}}),(0,y.jsx)("div",{children:a("invite.emptyPermission")})]})})]})}Z.propTypes={invitation:m().object.isRequired,createPassportSvg:m().func.isRequired,passportColor:m().string},Z.defaultProps={passportColor:"auto"};const S=o.Z.div(k||(k=(0,t.Z)(["\n display: flex;\n max-width: 350px;\n margin: 30px auto;\n .invite-passport__card {\n margin: 0 auto;\n width: 228px;\n height: 258px;\n flex-shrink: 0;\n .invite-passport__cover {\n cursor: pointer;\n width: 100%;\n height: 100%;\n }\n }\n .invite-passport__content {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n .invite-passport__title {\n font-weight: 700;\n font-size: 16px;\n }\n .invite-passport__description {\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n height: 3em;\n color: #999;\n font-size: 14px;\n }\n .invite-passport__view-permission {\n cursor: pointer;\n font-size: 14px;\n font-weight: 600;\n line-height: 18px;\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),C=Z;var P,z=i(92459),N=i(74958),R=i(14491),T=i(70284),L=i(73545);function F(e){let{invitation:n,onLogin:i,onReceive:t,inService:o}=e;const{t:s,locale:a}=(0,_.PE)(),{connectApi:c}=(0,L.T)(),{getPassportId:l}=(0,T.Z)();let d;var u,v;"undefined"!==typeof window&&(d=null===(u=window)||void 0===u||null===(v=u.blocklet)||void 0===v?void 0:v.componentId);const f={passportId:l(),inviteId:n.inviteId,baseUrl:window.location.origin,componentId:d},m=(0,r.useCallback)((()=>{c.close()}),[c]),x=(0,r.useCallback)((function(){c.close(),i(...arguments)}),[i,c]),g=(0,r.useCallback)((()=>{"function"!==typeof t?o?c.openPopup({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:{provider:"wallet",...f},baseUrl:window.location.origin,prefix:p()(window.location.origin,N.Bu,N.nC),messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:x,onClose:m},{locale:a}):c.open({action:"invite",className:"connect",forceConnected:!1,autoConnect:!1,locale:a,extraParams:f,messages:{title:s("receive.dialog.title"),scan:s("receive.dialog.scan"),confirm:s("receive.dialog.confirm"),success:s("receive.dialog.success")},onSuccess:x,onClose:m}):t()}),[c.openPopup]);return(0,y.jsxs)(I,{children:[(0,y.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:g,children:s("invite.receive")}),(0,y.jsxs)("div",{className:"invite-receive__until",children:[s("invite.validUntil"),(0,R.o0)(n.expireDate,a)]})]})}F.propTypes={invitation:m().object.isRequired,onLogin:m().func,onReceive:m().func,inService:m().bool},F.defaultProps={onLogin:()=>{},onReceive:null,inService:!1};const I=o.Z.div(P||(P=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),E=F;var D;function U(e){let{onLogin:n}=e;const{t:i}=(0,_.PE)();return(0,y.jsx)(M,{children:(0,y.jsx)(z.Z,{size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:()=>n(),children:i("common.connect")})})}U.propTypes={onLogin:m().func},U.defaultProps={onLogin:()=>{}};const M=o.Z.div(D||(D=(0,t.Z)(["\n text-align: center;\n .invite-receive__logo-wrapper {\n display: inline-flex;\n align-items: center;\n color: #9397a1;\n font-size: 14px;\n }\n .invite-receive__logo {\n height: 16px;\n margin-left: 8px;\n }\n .invite-receive__button {\n width: 100%;\n margin: 16px 0;\n white-space: nowrap;\n }\n .invite-receive__until {\n text-align: center;\n font-size: 14px;\n }\n .invite-receive__description {\n color: #999;\n text-align: left;\n list-style: decimal;\n padding: 0;\n padding-left: 1.2em;\n margin: 40px 0;\n }\n .invite-receive__description-item {\n list-style: decimal;\n }\n .invite-receive__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),q=U;var H,O=i(72333);function W(e){let{invitation:n}=e;const{t:i}=(0,_.PE)(),t=(0,r.useMemo)((()=>(n.role.title||n.role.name).toUpperCase()),[n.role.title,n.role.name]),o=(0,r.useMemo)((()=>i("invite.message",{name:"{{name}}",role:t,dapp:"{{dapp}}"})),[i,t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:n.inviter.fullName},"name"):n.inviter.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(A,{children:[(0,y.jsx)(O.Z,{did:n.inviter.did,src:encodeURI(n.inviter.avatar),size:80,shape:"circle",variant:"circle"}),(0,y.jsx)("div",{className:"invite-user__message",children:a})]})}W.propTypes={invitation:m().object.isRequired};const A=o.Z.div(H||(H=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),B=W;var V,Y=i(39948),J=i(76005);function K(e){let{invitation:n,type:i}=e;const{t:t}=(0,_.PE)(),o=(0,r.useMemo)((()=>t("invite.success",{dapp:"{{dapp}}"})),[t]),s=(0,R.E8)(n.info.chainHost,n.inviter.did,"account"),a="receiver"===i?n.receiver:n.inviter,c=(0,R.Zp)(o,{name:()=>s?(0,y.jsx)("a",{target:"_blank",href:s,className:"invite-user__link",rel:"noreferrer",children:a.fullName},"name"):a.fullName,dapp:()=>(0,y.jsx)("a",{target:"_blank",href:n.info.url,className:"invite-user__link",rel:"noreferrer",children:n.info.name},"dapp")});return(0,y.jsxs)(G,{children:[(0,y.jsx)(Y.Z,{pt:1,color:"success.main",children:(0,y.jsx)(J.Z,{style:{fontSize:80}})}),(0,y.jsx)("div",{className:"invite-user__message",children:c})]})}K.propTypes={invitation:m().object.isRequired,type:m().oneOf("inviter","receiver")},K.defaultProps={type:"inviter"};const G=o.Z.div(V||(V=(0,t.Z)(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n .invite-user__name {\n font-weight: 700;\n font-size: 16px;\n margin: 8px 0 2px 0;\n }\n .invite-user__address {\n font-size: 12px;\n }\n .invite-user__message {\n margin-top: 20px;\n font-weight: 700;\n /* width: 90%; */\n text-align: center;\n font-size: 18px;\n }\n .invite-user__link {\n color: ",";\n }\n"])),(e=>{let{theme:n}=e;return n.palette.primary.main})),Q=K;var X;function $(e){let{invitation:n,...i}=e;return(0,y.jsxs)(ee,{...i,children:[(0,y.jsx)(O.Z,{did:n.info.did,src:n.info.logo,style:{flexShrink:0}}),(0,y.jsxs)("div",{className:"invite-app__content",children:[(0,y.jsx)("div",{className:"invite-app__title",children:n.info.name}),(0,y.jsx)("div",{className:"invite-app__description",children:n.info.description})]})]})}$.propTypes={invitation:m().object.isRequired};const ee=o.Z.div(X||(X=(0,t.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n overflow: hidden;\n .invite-app__content {\n flex: 1;\n margin: 0 12px;\n font-weight: 700;\n overflow: hidden;\n }\n .invite-app__title {\n line-height: 1;\n margin-bottom: 2px;\n overflow: hidden;\n }\n .invite-app__description {\n font-size: 12px;\n white-space: nowrap;\n text-overflow: ellipsis;\n height: 1.3em;\n color: #999;\n overflow: hidden;\n }\n"]))),ne=$;var ie,te=i(5766);function re(e){let{getDataFn:n,passportColor:i,createPassportSvg:t,onLoginSuccess:r,checkFn:o,onReceive:s,inService:a}=e;const c=(0,x.Z)(n);if(c.loading)return(0,y.jsx)(g.Z,{});var l,p;if(c.error)return(0,y.jsx)(h.Z,{status:"404",title:null===(l=c.error)||void 0===l||null===(p=l.response)||void 0===p?void 0:p.data,description:""});const d="success"===c.data.status,u=d?Q:B,v=d?q:E;return(0,y.jsxs)(oe,{className:"page-invite__wrapper",children:[(0,y.jsx)(ne,{invitation:c.data}),(0,y.jsxs)("div",{className:"page-invite__card",children:[(0,y.jsx)(u,{invitation:c.data}),(0,y.jsx)(C,{invitation:c.data,createPassportSvg:t,passportColor:i}),(0,y.jsx)(v,{invitation:c.data,onLogin:r,checkFn:o,onReceive:s,inService:a})]})]})}re.propTypes={getDataFn:m().func.isRequired,checkFn:m().func.isRequired,createPassportSvg:m().func.isRequired,onLoginSuccess:m().func,onReceive:m().func,passportColor:m().string,inService:m().bool},re.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1};const oe=o.Z.div(ie||(ie=(0,t.Z)(["\n max-width: 460px;\n max-height: 650px;\n min-height: 450px;\n width: 90%;\n height: 80%;\n display: flex;\n flex-direction: column;\n .page-invite__card {\n background-color: #fff;\n border-radius: 4px;\n flex: 1;\n padding: 20px 30px;\n margin-top: 10px;\n }\n .page-invite__app {\n margin-top: 20px;\n }\n"]))),se=(0,te.Z)(re);var ae,ce=i(43316),le=i(25339),pe=i(75793),de=i(74094);function ue(e){const{api:n,session:i}=(0,le.Tt)(),{info:t}=(0,pe.h6)(),o=(0,s.useLocation)(),a=(0,s.useNavigate)(),{t:l,locale:d}=(0,_.PE)(),{encryptKey:f,decrypt:m}=(0,ce.R)(),[x,h]=(0,r.useState)(!1),w=(0,r.useMemo)((()=>new URLSearchParams(o.search).get("inviteId")),[o]),j=(0,v.default)((async()=>{if(!w)return null;let e;const{data:i}=await n.get("/api/invitation",{params:{inviteId:w}}),r=!!u()(t,"ownerNft.did")&&"owner"===i.role.name;if(r){const i=new URL(window.location.href);i.pathname=p()((0,de.Y5)(),"/api/did/invite/token"),i.searchParams.set("_ek_",f),i.searchParams.set("inviteId",w);const{data:t}=await n.get(i.href);e=t}return{invitation:i,nextWorkflow:e,needReceiveNFT:r}})),b=(0,r.useCallback)((()=>{h(!0)}),[]),k=(0,r.useCallback)((()=>{if(j.error)throw j.error;return j.value.invitation}),[j]),Z=(0,r.useCallback)((async e=>{e&&(0,de.ZB)(m(e.sessionToken));const n=new URLSearchParams(o.search);n.delete("inviteId");const t=n.toString();await i.refresh(),a("/".concat(t?"?".concat(t):t),{replace:!0})}),[o,a,i]);if(j.loading)return(0,y.jsx)(g.Z,{});return(0,y.jsxs)(ve,{className:"page-invite",children:[u()(j,"value.needReceiveNFT")&&(0,y.jsx)(ce.Z,{action:"login",popup:!0,className:"connect",open:x,locale:d,baseUrl:t.launcher.url,checkFn:c().create({baseURL:t.launcher.url}).get,onSuccess:()=>{const e=new URL(window.location.href);e.pathname=p()((0,de.Y5)(),"/api/did/invite/status"),e.searchParams.set("_t_",j.value.nextWorkflow.token),e.searchParams.set("locale",d);const t=setInterval((async()=>{const{data:r}=await n.get(e.href);"succeed"===r.status&&(clearInterval(t),i.updateConnectedInfo(r),Z(r))}),2e3)},onClose:()=>{h(!1)},checkTimeout:3e5,webWalletUrl:(0,de.yP)(t),extraParams:{nw:u()(j,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:t.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),(0,y.jsx)(se,{...e,getDataFn:k,createPassportSvg:e=>(0,de.Ju)(e,t),checkFn:n.get,onLoginSuccess:Z,passportColor:"default",onReceive:u()(j,"value.needReceiveNFT")?b:null})]})}const ve=o.Z.div(ae||(ae=(0,t.Z)(["\n width: 100vw;\n height: 100%;\n min-height: 100vh;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #f6f8fa;\n overflow: auto;\n padding: 20px;\n"])));function fe(){return(0,pe.h6)().loading?(0,y.jsx)(g.Z,{}):(0,y.jsx)(ue,{})}},5766:(e,n,i)=>{i.d(n,{Z:()=>p});var t=i(68420),r=i(77668),o=i.n(r),s=i(2586),a=i(56944);const c={zh:o()(a.Z),en:o()(s.Z)};var l=i(96266);function p(e){return function(n){return(0,l.jsx)(t.Iw,{translations:c,children:(0,l.jsx)(e,{...n})})}}},92459:(e,n,i)=>{i.d(n,{Z:()=>c});var t=i(55898),r=i.n(t),o=i(28726),s=i(81089),a=i(96266);function c(e){let{children:n,...i}=e;return(0,a.jsxs)(o.Z,{color:"did",variant:"contained",...i,children:[(0,a.jsx)("span",{style:{fontWeight:400},children:n||"Continue With"}),(0,a.jsx)(s.Z,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}c.propTypes={children:r().any},c.defaultProps={children:""}},35474:(e,n,i)=>{i.d(n,{Z:()=>N});var t={};i.r(t),i.d(t,{ComingSoon:()=>k,Error:()=>y,Forbidden:()=>w,Info:()=>Z,InternalServerError:()=>j,Maintenance:()=>b,PageNotFound:()=>_});var r,o=i(55898),s=i.n(o),a=i(71171),c=i(39948),l=i(47685),p=i(96266);function d(e){let{icon:n,title:i,description:t,extra:r,...o}=e;return(0,p.jsxs)(u,{...o,children:[n,"string"===typeof i?(0,p.jsx)(c.Z,{mt:3,fontSize:22,fontWeight:400,color:"#47494E",textAlign:"center",children:i}):i,"string"===typeof t?(0,p.jsx)(c.Z,{mt:1,fontSize:14,color:"#7F828B",textAlign:"center",children:t}):t,(0,p.jsx)(c.Z,{mt:3,children:r})]})}d.propTypes={icon:s().element,title:s().oneOfType([s().string,s().element]),description:s().oneOfType([s().string,s().element]),actions:s().any,extra:s().element},d.defaultProps={icon:void 0,title:"",description:"",actions:null,extra:void 0};const u=(0,l.zo)("div")(r||(r=(0,a.Z)(["\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n padding: 16px;\n\n background-color: #f7f8fb;\n"]))),v=d;var f=i(36134),m=i(11532);const x={en:{404:{title:"404 - Page Not Found",description:"Sorry about that, the page you are looking for does not exist or has been moved."},403:{title:"403 \u2013 Forbidden",description:"Sorry, you are not authorized to access this page."},500:{title:"500 - Internal Server Error",description:"An internal server error has occurred. Please try again later."},error:{title:"Application Error",description:"Something went wrong. Please try again later."},maintenance:{title:"Offline for maintenance",description:"This app is undergoing maintenance right now. Please check back later."},comingSoon:{title:"Coming Soon",description:"Our website is under construction. We'll be here soon with our new website."}},zh:{404:{title:"404 - \u9875\u9762\u672a\u627e\u5230",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6b63\u5728\u5bfb\u627e\u7684\u9875\u9762\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u79fb\u52a8\u3002"},403:{title:"403 \u2013 \u7981\u6b62\u8bbf\u95ee",description:"\u5f88\u62b1\u6b49\uff0c\u60a8\u6ca1\u6709\u6743\u9650\u8bbf\u95ee\u6b64\u9875\u9762\u3002"},500:{title:"500 - \u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef",description:"\u53d1\u751f\u4e86\u4e00\u4e2a\u5185\u90e8\u670d\u52a1\u5668\u9519\u8bef\u3002\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},error:{title:"Application Error",description:"\u51fa\u9519\u4e86, \u8bf7\u7a0d\u540e\u518d\u8bd5\u3002"},maintenance:{title:"\u7ef4\u62a4\u4e2d",description:"\u5e94\u7528\u7a0b\u5e8f\u6b63\u5728\u8fdb\u884c\u7ef4\u62a4\u3002\u8bf7\u7a0d\u540e\u518d\u67e5\u770b\u3002"},comingSoon:{title:"\u5373\u5c06\u4e0a\u7ebf",description:"\u6211\u4eec\u7684\u7f51\u7ad9\u6b63\u5728\u5efa\u8bbe\u4e2d\u3002\u6211\u4eec\u5f88\u5feb\u5c31\u4f1a\u5728\u8fd9\u91cc\u63a8\u51fa\u6211\u4eec\u7684\u65b0\u7f51\u7ad9\u3002"}}};var g=i(68420);const h=e=>{e=["zh","en"].includes(e)?e:"";const{locale:n}=(0,g.PE)()||{locale:"en"},i=e||n;return x[i]?i:"en"};function _(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][404].title,description:x[n][404].description,...i})}function w(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][403].title,description:x[n][403].description,...i})}function j(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n][500].title,description:x[n][500].description,...i})}function y(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(S,{}),title:x[n].error.title,description:x[n].error.description,...i})}function b(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),title:x[n].maintenance.title,description:x[n].maintenance.description,...i})}function k(e){let{locale:n,...i}=e;return n=h(n),(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),title:x[n].comingSoon.title,description:x[n].comingSoon.description,...i})}function Z(e){return(0,p.jsx)(v,{icon:(0,p.jsx)(C,{}),...e})}function S(e){const n=(0,l.Fg)();return(0,p.jsx)(m.Z,{style:{color:n.palette.error.main,fontSize:72},...e})}function C(e){const n=(0,l.Fg)();return(0,p.jsx)(f.Z,{style:{color:n.palette.info.main,fontSize:72},...e})}_.status="404",w.status="403",j.status="500",y.status="error",b.status="maintenance",k.status="comingSoon",Z.status="info";const P=Object.keys(t).reduce(((e,n)=>({...e,[t[n].status||n]:t[n]})),{});function z(e){let{status:n,...i}=e;if(n){if(P[n]){const e=P[n];return(0,p.jsx)(e,{...i})}throw new Error("Please provide a valid status for Result.status. Valid values are: ".concat(Object.keys(P).join(", ")))}return(0,p.jsx)(v,{...i})}z.propTypes={status:s().oneOfType([s().string,s().number]),...v.propTypes},z.defaultProps={status:""};const N=z},11532:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm4.3 14.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0a.9959.9959 0 0 1 0-1.41L10.59 12 7.7 9.11a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41z"}),"CancelRounded");n.Z=s},76005:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");n.Z=s},36134:(e,n,i)=>{var t=i(71600);n.Z=void 0;var r=t(i(56930)),o=i(96266),s=(0,r.default)((0,o.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info");n.Z=s}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[7150],{77150:(e,t,a)=>{a.d(t,{ZP:()=>ee});var r=a(31461),n=a(7896),o=a(5057),l=a(9978),i=a(91213),s=a(78305),c=a(17517),u=a(48548),d=a(62663),m=a(46890),v=a(60730),p=a(56073),b=a(2534);const h={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var f=a(41658);function g(e,t){return e-t}function x(e,t,a){return null==e?t:Math.min(Math.max(t,e),a)}function k(e,t){var a;const{index:r}=null!=(a=e.reduce(((e,a,r)=>{const n=Math.abs(t-a);return null===e||n<e.distance||n===e.distance?{distance:n,index:r}:e}),null))?a:{};return r}function y(e,t){if(void 0!==t.current&&e.changedTouches){const a=e;for(let e=0;e<a.changedTouches.length;e+=1){const r=a.changedTouches[e];if(r.identifier===t.current)return{x:r.clientX,y:r.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function S(e,t,a){return 100*(e-t)/(a-t)}function w(e,t,a){const r=Math.round((e-a)/t)*t+a;return Number(r.toFixed(function(e){if(Math.abs(e)<1){const t=e.toExponential().split("e-"),a=t[0].split(".")[1];return(a?a.length:0)+parseInt(t[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}(t)))}function Z(e){let{values:t,newValue:a,index:r}=e;const n=t.slice();return n[r]=a,n.sort(g)}function L(e){let{sliderRef:t,activeIndex:a,setActive:r}=e;var n,o;const l=(0,u.Z)(t.current);var i;null!=(n=t.current)&&n.contains(l.activeElement)&&Number(null==l||null==(o=l.activeElement)?void 0:o.getAttribute("data-index"))===a||(null==(i=t.current)||i.querySelector('[type="range"][data-index="'.concat(a,'"]')).focus());r&&r(a)}function C(e,t){return"number"===typeof e&&"number"===typeof t?e===t:"object"===typeof e&&"object"===typeof t&&function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(e,t)=>e===t;return e.length===t.length&&e.every(((e,r)=>a(e,t[r])))}(e,t)}const P={horizontal:{offset:e=>({left:"".concat(e,"%")}),leap:e=>({width:"".concat(e,"%")})},"horizontal-reverse":{offset:e=>({right:"".concat(e,"%")}),leap:e=>({width:"".concat(e,"%")})},vertical:{offset:e=>({bottom:"".concat(e,"%")}),leap:e=>({height:"".concat(e,"%")})}},R=e=>e;let z;function A(){return void 0===z&&(z="undefined"===typeof CSS||"function"!==typeof CSS.supports||CSS.supports("touch-action","none")),z}function T(e){const{"aria-labelledby":t,defaultValue:a,disabled:r=!1,disableSwap:l=!1,isRtl:i=!1,marks:s=!1,max:c=100,min:z=0,name:T,onChange:I,onChangeCommitted:N,orientation:M="horizontal",rootRef:E,scale:j=R,step:F=1,tabIndex:V,value:O}=e,D=o.useRef(),[X,Y]=o.useState(-1),[_,B]=o.useState(-1),[W,q]=o.useState(!1),H=o.useRef(0),[$,G]=(0,d.Z)({controlled:O,default:null!=a?a:z,name:"Slider"}),J=I&&((e,t,a)=>{const r=e.nativeEvent||e,n=new r.constructor(r.type,r);Object.defineProperty(n,"target",{writable:!0,value:{value:t,name:T}}),I(n,t,a)}),K=Array.isArray($);let Q=K?$.slice().sort(g):[$];Q=Q.map((e=>x(e,z,c)));const U=!0===s&&null!==F?[...Array(Math.floor((c-z)/F)+1)].map(((e,t)=>({value:z+F*t}))):s||[],ee=U.map((e=>e.value)),{isFocusVisibleRef:te,onBlur:ae,onFocus:re,ref:ne}=(0,m.Z)(),[oe,le]=o.useState(-1),ie=o.useRef(),se=(0,v.Z)(ne,ie),ce=(0,v.Z)(E,se),ue=e=>t=>{var a;const r=Number(t.currentTarget.getAttribute("data-index"));re(t),!0===te.current&&le(r),B(r),null==e||null==(a=e.onFocus)||a.call(e,t)},de=e=>t=>{var a;ae(t),!1===te.current&&le(-1),B(-1),null==e||null==(a=e.onBlur)||a.call(e,t)};(0,p.Z)((()=>{var e;r&&ie.current.contains(document.activeElement)&&(null==(e=document.activeElement)||e.blur())}),[r]),r&&-1!==X&&Y(-1),r&&-1!==oe&&le(-1);const me=o.useRef();let ve=M;i&&"horizontal"===M&&(ve+="-reverse");const pe=e=>{let{finger:t,move:a=!1}=e;const{current:r}=ie,{width:n,height:o,bottom:i,left:s}=r.getBoundingClientRect();let u,d;if(u=0===ve.indexOf("vertical")?(i-t.y)/o:(t.x-s)/n,-1!==ve.indexOf("-reverse")&&(u=1-u),d=function(e,t,a){return(a-t)*e+t}(u,z,c),F)d=w(d,F,z);else{const e=k(ee,d);d=ee[e]}d=x(d,z,c);let m=0;if(K){m=a?me.current:k(Q,d),l&&(d=x(d,Q[m-1]||-1/0,Q[m+1]||1/0));const e=d;d=Z({values:Q,newValue:d,index:m}),l&&a||(m=d.indexOf(e),me.current=m)}return{newValue:d,activeIndex:m}},be=(0,b.Z)((e=>{const t=y(e,D);if(!t)return;if(H.current+=1,"mousemove"===e.type&&0===e.buttons)return void he(e);const{newValue:a,activeIndex:r}=pe({finger:t,move:!0});L({sliderRef:ie,activeIndex:r,setActive:Y}),G(a),!W&&H.current>2&&q(!0),J&&!C(a,$)&&J(e,a,r)})),he=(0,b.Z)((e=>{const t=y(e,D);if(q(!1),!t)return;const{newValue:a}=pe({finger:t,move:!0});Y(-1),"touchend"===e.type&&B(-1),N&&N(e,a),D.current=void 0,ge()})),fe=(0,b.Z)((e=>{if(r)return;A()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(D.current=t.identifier);const a=y(e,D);if(!1!==a){const{newValue:t,activeIndex:r}=pe({finger:a});L({sliderRef:ie,activeIndex:r,setActive:Y}),G(t),J&&!C(t,$)&&J(e,t,r)}H.current=0;const n=(0,u.Z)(ie.current);n.addEventListener("touchmove",be,{passive:!0}),n.addEventListener("touchend",he,{passive:!0})})),ge=o.useCallback((()=>{const e=(0,u.Z)(ie.current);e.removeEventListener("mousemove",be),e.removeEventListener("mouseup",he),e.removeEventListener("touchmove",be),e.removeEventListener("touchend",he)}),[he,be]);o.useEffect((()=>{const{current:e}=ie;return e.addEventListener("touchstart",fe,{passive:A()}),()=>{e.removeEventListener("touchstart",fe),ge()}}),[ge,fe]),o.useEffect((()=>{r&&ge()}),[r,ge]);const xe=S(K?Q[0]:z,z,c),ke=S(Q[Q.length-1],z,c)-xe,ye=e=>t=>{var a;null==(a=e.onMouseLeave)||a.call(e,t),B(-1)};return{active:X,axis:ve,axisProps:P,dragging:W,focusedThumbIndex:oe,getHiddenInputProps:function(){let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var o;const s=(0,f._)(a),u={onChange:(d=s||{},e=>{var t;null==(t=d.onChange)||t.call(d,e);const a=Number(e.currentTarget.getAttribute("data-index")),r=Q[a],n=ee.indexOf(r);let o=e.target.valueAsNumber;if(U&&null==F){const e=ee[ee.length-1];o=o>e?e:o<ee[0]?ee[0]:o<r?ee[n-1]:ee[n+1]}if(o=x(o,z,c),K){l&&(o=x(o,Q[a-1]||-1/0,Q[a+1]||1/0));const e=o;o=Z({values:Q,newValue:o,index:a});let t=a;l||(t=o.indexOf(e)),L({sliderRef:ie,activeIndex:t})}G(o),le(a),J&&!C(o,$)&&J(e,o,a),N&&N(e,o)}),onFocus:ue(s||{}),onBlur:de(s||{})};var d;const m=(0,n.Z)({},s,u);return(0,n.Z)({tabIndex:V,"aria-labelledby":t,"aria-orientation":M,"aria-valuemax":j(c),"aria-valuemin":j(z),name:T,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(o=e.step)?o:void 0,disabled:r},a,m,{style:(0,n.Z)({},h,{direction:i?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,f._)(e),a={onMouseDown:(o=t||{},e=>{var t;if(null==(t=o.onMouseDown)||t.call(o,e),r)return;if(e.defaultPrevented)return;if(0!==e.button)return;e.preventDefault();const a=y(e,D);if(!1!==a){const{newValue:t,activeIndex:r}=pe({finger:a});L({sliderRef:ie,activeIndex:r,setActive:Y}),G(t),J&&!C(t,$)&&J(e,t,r)}H.current=0;const n=(0,u.Z)(ie.current);n.addEventListener("mousemove",be,{passive:!0}),n.addEventListener("mouseup",he)})};var o;const l=(0,n.Z)({},t,a);return(0,n.Z)({},e,{ref:ce},l)},getThumbProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,f._)(e),a={onMouseOver:(r=t||{},e=>{var t;null==(t=r.onMouseOver)||t.call(r,e);const a=Number(e.currentTarget.getAttribute("data-index"));B(a)}),onMouseLeave:ye(t||{})};var r;return(0,n.Z)({},e,t,a)},marks:U,open:_,range:K,rootRef:ce,trackLeap:ke,trackOffset:xe,values:Q,getThumbStyle:e=>({pointerEvents:-1!==X&&X!==e?"none":void 0})}}var I=a(66685),N=a(42908),M=a(62773),E=a(96366);const j=e=>!e||!(0,c.X)(e);var F=a(6285),V=a(31821),O=a(18561);function D(e){return(0,O.Z)("MuiSlider",e)}const X=(0,V.Z)("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);var Y=a(96266);const _=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"];function B(e){return e}const W=(0,M.ZP)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,t["color".concat((0,F.Z)(a.color))],"medium"!==a.size&&t["size".concat((0,F.Z)(a.size))],a.marked&&t.marked,"vertical"===a.orientation&&t.vertical,"inverted"===a.track&&t.trackInverted,!1===a.track&&t.trackFalse]}})((e=>{let{theme:t,ownerState:a}=e;return(0,n.Z)({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",color:(t.vars||t).palette[a.color].main,WebkitTapHighlightColor:"transparent"},"horizontal"===a.orientation&&(0,n.Z)({height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}},"small"===a.size&&{height:2},a.marked&&{marginBottom:20}),"vertical"===a.orientation&&(0,n.Z)({height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}},"small"===a.size&&{width:2},a.marked&&{marginRight:44}),{"@media print":{colorAdjust:"exact"},["&.".concat(X.disabled)]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},["&.".concat(X.dragging)]:{["& .".concat(X.thumb,", & .").concat(X.track)]:{transition:"none"}}})})),q=(0,M.ZP)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})((e=>{let{ownerState:t}=e;return(0,n.Z)({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38},"horizontal"===t.orientation&&{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"},"vertical"===t.orientation&&{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"},"inverted"===t.track&&{opacity:1})})),H=(0,M.ZP)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})((e=>{let{theme:t,ownerState:a}=e;const r="light"===t.palette.mode?(0,I.$n)(t.palette[a.color].main,.62):(0,I._j)(t.palette[a.color].main,.5);return(0,n.Z)({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest})},"small"===a.size&&{border:"none"},"horizontal"===a.orientation&&{height:"inherit",top:"50%",transform:"translateY(-50%)"},"vertical"===a.orientation&&{width:"inherit",left:"50%",transform:"translateX(-50%)"},!1===a.track&&{display:"none"},"inverted"===a.track&&{backgroundColor:t.vars?t.vars.palette.Slider["".concat(a.color,"Track")]:r,borderColor:t.vars?t.vars.palette.Slider["".concat(a.color,"Track")]:r})})),$=(0,M.ZP)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.thumb,t["thumbColor".concat((0,F.Z)(a.color))],"medium"!==a.size&&t["thumbSize".concat((0,F.Z)(a.size))]]}})((e=>{let{theme:t,ownerState:a}=e;return(0,n.Z)({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest})},"small"===a.size&&{width:12,height:12},"horizontal"===a.orientation&&{top:"50%",transform:"translate(-50%, -50%)"},"vertical"===a.orientation&&{left:"50%",transform:"translate(-50%, 50%)"},{"&::before":(0,n.Z)({position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"small"===a.size&&{boxShadow:"none"}),"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},["&:hover, &.".concat(X.focusVisible)]:{boxShadow:"0px 0px 0px 8px ".concat(t.vars?"rgba(".concat(t.vars.palette[a.color].mainChannel," / 0.16)"):(0,I.Fq)(t.palette[a.color].main,.16)),"@media (hover: none)":{boxShadow:"none"}},["&.".concat(X.active)]:{boxShadow:"0px 0px 0px 14px ".concat(t.vars?"rgba(".concat(t.vars.palette[a.color].mainChannel," / 0.16)"):(0,I.Fq)(t.palette[a.color].main,.16))},["&.".concat(X.disabled)]:{"&:hover":{boxShadow:"none"}}})})),G=(0,M.ZP)((function(e){const{children:t,className:a,value:r}=e,n=(e=>{const{open:t}=e;return{offset:(0,l.Z)(t&&X.valueLabelOpen),circle:X.valueLabelCircle,label:X.valueLabelLabel}})(e);return t?o.cloneElement(t,{className:(0,l.Z)(t.props.className)},(0,Y.jsxs)(o.Fragment,{children:[t.props.children,(0,Y.jsx)("span",{className:(0,l.Z)(n.offset,a),"aria-hidden":!0,children:(0,Y.jsx)("span",{className:n.circle,children:(0,Y.jsx)("span",{className:n.label,children:r})})})]})):null}),{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})((e=>{let{theme:t,ownerState:a}=e;return(0,n.Z)({["&.".concat(X.valueLabelOpen)]:{transform:"".concat("vertical"===a.orientation?"translateY(-50%)":"translateY(-100%)"," scale(1)")},zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),transform:"".concat("vertical"===a.orientation?"translateY(-50%)":"translateY(-100%)"," scale(0)"),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem"},"horizontal"===a.orientation&&{top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"}},"vertical"===a.orientation&&{right:"small"===a.size?"20px":"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"}},"small"===a.size&&{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"})})),J=(0,M.ZP)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,M.Dz)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:a}=e;return[t.mark,a&&t.markActive]}})((e=>{let{theme:t,ownerState:a,markActive:r}=e;return(0,n.Z)({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor"},"horizontal"===a.orientation&&{top:"50%",transform:"translate(-1px, -50%)"},"vertical"===a.orientation&&{left:"50%",transform:"translate(-50%, 1px)"},r&&{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8})})),K=(0,M.ZP)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,M.Dz)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})((e=>{let{theme:t,ownerState:a,markLabelActive:r}=e;return(0,n.Z)({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap"},"horizontal"===a.orientation&&{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}},"vertical"===a.orientation&&{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}},r&&{color:(t.vars||t).palette.text.primary})})),Q=e=>{let{children:t}=e;return t},U=o.forwardRef((function(e,t){var a,u,d,m,v,p,b,h,f,g,x,k,y,w,Z,L,C,P,R,z,A,I,M,V;const O=(0,N.Z)({props:e,name:"MuiSlider"}),X="rtl"===(0,E.Z)().direction,{"aria-label":U,"aria-valuetext":ee,"aria-labelledby":te,component:ae="span",components:re={},componentsProps:ne={},color:oe="primary",classes:le,className:ie,disableSwap:se=!1,disabled:ce=!1,getAriaLabel:ue,getAriaValueText:de,marks:me=!1,max:ve=100,min:pe=0,orientation:be="horizontal",size:he="medium",step:fe=1,scale:ge=B,slotProps:xe,slots:ke,track:ye="normal",valueLabelDisplay:Se="off",valueLabelFormat:we=B}=O,Ze=(0,r.Z)(O,_),Le=(0,n.Z)({},O,{isRtl:X,max:ve,min:pe,classes:le,disabled:ce,disableSwap:se,orientation:be,marks:me,color:oe,size:he,step:fe,scale:ge,track:ye,valueLabelDisplay:Se,valueLabelFormat:we}),{axisProps:Ce,getRootProps:Pe,getHiddenInputProps:Re,getThumbProps:ze,open:Ae,active:Te,axis:Ie,focusedThumbIndex:Ne,range:Me,dragging:Ee,marks:je,values:Fe,trackOffset:Ve,trackLeap:Oe,getThumbStyle:De}=T((0,n.Z)({},Le,{rootRef:t}));Le.marked=je.length>0&&je.some((e=>e.label)),Le.dragging=Ee,Le.focusedThumbIndex=Ne;const Xe=(e=>{const{disabled:t,dragging:a,marked:r,orientation:n,track:o,classes:l,color:s,size:c}=e,u={root:["root",t&&"disabled",a&&"dragging",r&&"marked","vertical"===n&&"vertical","inverted"===o&&"trackInverted",!1===o&&"trackFalse",s&&"color".concat((0,F.Z)(s)),c&&"size".concat((0,F.Z)(c))],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",c&&"thumbSize".concat((0,F.Z)(c)),s&&"thumbColor".concat((0,F.Z)(s))],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,i.Z)(u,D,l)})(Le),Ye=null!=(a=null!=(u=null==ke?void 0:ke.root)?u:re.Root)?a:W,_e=null!=(d=null!=(m=null==ke?void 0:ke.rail)?m:re.Rail)?d:q,Be=null!=(v=null!=(p=null==ke?void 0:ke.track)?p:re.Track)?v:H,We=null!=(b=null!=(h=null==ke?void 0:ke.thumb)?h:re.Thumb)?b:$,qe=null!=(f=null!=(g=null==ke?void 0:ke.valueLabel)?g:re.ValueLabel)?f:G,He=null!=(x=null!=(k=null==ke?void 0:ke.mark)?k:re.Mark)?x:J,$e=null!=(y=null!=(w=null==ke?void 0:ke.markLabel)?w:re.MarkLabel)?y:K,Ge=null!=(Z=null!=(L=null==ke?void 0:ke.input)?L:re.Input)?Z:"input",Je=null!=(C=null==xe?void 0:xe.root)?C:ne.root,Ke=null!=(P=null==xe?void 0:xe.rail)?P:ne.rail,Qe=null!=(R=null==xe?void 0:xe.track)?R:ne.track,Ue=null!=(z=null==xe?void 0:xe.thumb)?z:ne.thumb,et=null!=(A=null==xe?void 0:xe.valueLabel)?A:ne.valueLabel,tt=null!=(I=null==xe?void 0:xe.mark)?I:ne.mark,at=null!=(M=null==xe?void 0:xe.markLabel)?M:ne.markLabel,rt=null!=(V=null==xe?void 0:xe.input)?V:ne.input,nt=(0,s.y)({elementType:Ye,getSlotProps:Pe,externalSlotProps:Je,externalForwardedProps:Ze,additionalProps:(0,n.Z)({},j(Ye)&&{as:ae}),ownerState:(0,n.Z)({},Le,null==Je?void 0:Je.ownerState),className:[Xe.root,ie]}),ot=(0,s.y)({elementType:_e,externalSlotProps:Ke,ownerState:Le,className:Xe.rail}),lt=(0,s.y)({elementType:Be,externalSlotProps:Qe,additionalProps:{style:(0,n.Z)({},Ce[Ie].offset(Ve),Ce[Ie].leap(Oe))},ownerState:(0,n.Z)({},Le,null==Qe?void 0:Qe.ownerState),className:Xe.track}),it=(0,s.y)({elementType:We,getSlotProps:ze,externalSlotProps:Ue,ownerState:(0,n.Z)({},Le,null==Ue?void 0:Ue.ownerState),className:Xe.thumb}),st=(0,s.y)({elementType:qe,externalSlotProps:et,ownerState:(0,n.Z)({},Le,null==et?void 0:et.ownerState),className:Xe.valueLabel}),ct=(0,s.y)({elementType:He,externalSlotProps:tt,ownerState:Le,className:Xe.mark}),ut=(0,s.y)({elementType:$e,externalSlotProps:at,ownerState:Le,className:Xe.markLabel}),dt=(0,s.y)({elementType:Ge,getSlotProps:Re,externalSlotProps:rt,ownerState:Le});return(0,Y.jsxs)(Ye,(0,n.Z)({},nt,{children:[(0,Y.jsx)(_e,(0,n.Z)({},ot)),(0,Y.jsx)(Be,(0,n.Z)({},lt)),je.filter((e=>e.value>=pe&&e.value<=ve)).map(((e,t)=>{const a=S(e.value,pe,ve),r=Ce[Ie].offset(a);let i;return i=!1===ye?-1!==Fe.indexOf(e.value):"normal"===ye&&(Me?e.value>=Fe[0]&&e.value<=Fe[Fe.length-1]:e.value<=Fe[0])||"inverted"===ye&&(Me?e.value<=Fe[0]||e.value>=Fe[Fe.length-1]:e.value>=Fe[0]),(0,Y.jsxs)(o.Fragment,{children:[(0,Y.jsx)(He,(0,n.Z)({"data-index":t},ct,!(0,c.X)(He)&&{markActive:i},{style:(0,n.Z)({},r,ct.style),className:(0,l.Z)(ct.className,i&&Xe.markActive)})),null!=e.label?(0,Y.jsx)($e,(0,n.Z)({"aria-hidden":!0,"data-index":t},ut,!(0,c.X)($e)&&{markLabelActive:i},{style:(0,n.Z)({},r,ut.style),className:(0,l.Z)(Xe.markLabel,ut.className,i&&Xe.markLabelActive),children:e.label})):null]},t)})),Fe.map(((e,t)=>{const a=S(e,pe,ve),r=Ce[Ie].offset(a),o="off"===Se?Q:qe;return(0,Y.jsx)(o,(0,n.Z)({},!(0,c.X)(o)&&{valueLabelFormat:we,valueLabelDisplay:Se,value:"function"===typeof we?we(ge(e),t):we,index:t,open:Ae===t||Te===t||"on"===Se,disabled:ce},st,{children:(0,Y.jsx)(We,(0,n.Z)({"data-index":t},it,{className:(0,l.Z)(Xe.thumb,it.className,Te===t&&Xe.active,Ne===t&&Xe.focusVisible),style:(0,n.Z)({},r,De(t),it.style),children:(0,Y.jsx)(Ge,(0,n.Z)({"data-index":t,"aria-label":ue?ue(t):U,"aria-valuenow":ge(e),"aria-labelledby":te,"aria-valuetext":de?de(ge(e),t):ee,value:Fe[t]},dt))}))}),t)}))]}))})),ee=U}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[7534],{844:(e,t,n)=>{n.d(t,{Z:()=>p});var o,r=n(71171),s=n(55898),a=n.n(s),i=n(33518),l=n(38763),c=n(75392),u=n(11750),d=n(39948),m=n(96266);function p(e){let{style:t,title:n,value:o,graph:r,description:s}=e;return(0,m.jsx)(h,{children:(0,m.jsxs)(c.Z,{style:{...t},children:[(0,m.jsx)(u.Z,{sx:{fontSize:14},color:"text.secondary",children:n}),(0,m.jsx)(u.Z,{variant:"h5",component:"div",mt:1,children:o}),r,!!s&&(0,m.jsx)(d.Z,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:s})]})})}p.propTypes={style:a().object,title:a().node,value:a().node,graph:a().node,description:a().any},p.defaultProps={style:{},title:null,value:null,graph:null,description:null};const h=(0,i.Z)(l.Z)(o||(o=(0,r.Z)(["\n .card-content {\n height: 150px;\n }\n\n .card-sparkline {\n flex: 2;\n display: flex;\n position: relative;\n *[hidden] {\n display: none;\n }\n }\n .sparkline {\n stroke: ",";\n fill: ","1A;\n }\n .tooltip {\n position: absolute;\n background: rgba(0, 0, 0, 0.7);\n color: #fff;\n padding: 2px 5px;\n font-size: 12px;\n white-space: nowrap;\n z-index: 9999;\n }\n .sparkline--cursor {\n stroke: orange;\n }\n\n .sparkline--spot {\n fill: red;\n stroke: red;\n }\n"])),(e=>e.theme.palette.primary.main),(e=>e.theme.palette.primary.main))},52959:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(5057),r=n(55898),s=n.n(r),a=n(12673),i=n(28563),l=n(26089),c=n(844),u=n(96266);function d(e){let{id:t,title:n,current:r,description:s,data:d,dateFn:m,valueFn:p}=e;const h=(0,o.useRef)(null),f=(0,o.useRef)(null),y=(0,a.Z)({style:{top:0,left:0},hidden:!0,textContent:""}),[v,x]=(0,o.useState)(null),b=(0,i.Z)(v),g={onmousemove(e,t){const{date:n,value:o}=t;y.textContent="".concat(m(n),": ").concat(p(o)),y.style.top=-30,y.style.left=80,y.hidden=!1},onmouseout(){y.hidden=!0}};return(0,o.useEffect)((()=>{setTimeout((()=>{x(document.querySelector(".".concat(t))),setTimeout((()=>{h.current&&(0,l.Z)(h.current,d||[],g)}),400)}))}),[d]),(0,u.jsx)(c.Z,{title:n,value:r,graph:(0,u.jsxs)("div",{className:"card-sparkline ".concat(t),style:{marginTop:16},children:[(0,u.jsx)("svg",{ref:h,className:"sparkline",width:(null===b||void 0===b?void 0:b.width)||100,height:30,strokeWidth:"2"}),(0,u.jsx)("span",{className:"tooltip",ref:f,hidden:y.hidden,style:{...y.style},children:y.textContent})]}),description:s})}d.propTypes={id:s().string.isRequired,title:s().string.isRequired,current:s().any.isRequired,description:s().any,data:s().array,dateFn:s().func,valueFn:s().func},d.defaultProps={description:null,data:[],dateFn:e=>e,valueFn:e=>e}},56169:(e,t,n)=>{n.d(t,{Z:()=>d});var o=n(5057),r=n(55898),s=n.n(r),a=n(68420),i=n(52959),l=n(14491),c=n(96266);const u=e=>"".concat(e,"%");function d(e){let{cpus:t,currentLoad:n,history:r}=e;const{t:s,locale:d}=(0,o.useContext)(a.RD);return(0,c.jsx)(i.Z,{id:"cpu-sparkline",title:s("common.cpu"),current:"".concat(Math.floor(n||0),"%"),data:r,description:"".concat(s("system.cores"),": ").concat((null===t||void 0===t?void 0:t.length)||0),dateFn:e=>(0,l.mr)(e,"HH:mm:ss",d),valueFn:u})}d.propTypes={cpus:s().array,currentLoad:s().number,history:s().array},d.defaultProps={cpus:[],currentLoad:0,history:[]}},1979:(e,t,n)=>{n.d(t,{Z:()=>m});var o=n(55898),r=n.n(o),s=n(90049),a=n.n(s),i=n(39948),l=n(68420),c=n(52959),u=n(14491),d=n(96266);function m(e){let{instanceCount:t,title:n,total:o,used:r,history:s}=e;const{t:m,locale:p}=(0,l.PE)(),h=!!o,f=o-r,y=h?"(".concat(Math.floor(r/o*100),"%)"):"",v=[];return t&&v.push({title:m("system.instances"),metric:t}),v.push({title:m("system.used"),metric:a()(r)}),h&&v.push({title:m("system.free"),metric:a()(f)},{title:m("system.total"),metric:a()(o)}),(0,d.jsx)(c.Z,{id:"mem-sparkline",title:n||m("common.memory"),current:"".concat(a()(Math.floor(r||0))," ").concat(y),data:s,description:v.map(((e,t)=>(0,d.jsxs)(i.Z,{sx:{marginLeft:0===t?0:2},children:[e.title,": ",e.metric]},e.title))),dateFn:e=>(0,u.mr)(e,"HH:mm:ss",p),valueFn:a()})}m.propTypes={title:r().string,instanceCount:r().number,total:r().number,used:r().number,history:r().array},m.defaultProps={title:"",instanceCount:null,total:null,used:null,history:[]}},87534:(e,t,n)=>{n.r(t),n.d(t,{default:()=>F});var o,r=n(71171),s=n(5057),a=n(33518),i=n(90049),l=n.n(i),c=n(45603),u=n.n(c),d=n(39948),m=n(75760),p=n(11750),h=n(38242),f=n(68420),y=n(29054),v=n(14491),x=n(55898),b=n.n(x),g=n(55402),Z=n(56169),k=n(1979),j=n(96266);function C(e){let{blocklet:t,cpuHistory:n,memoryHistory:o,...r}=e;const s=t.appRuntimeInfo||{};return(0,j.jsx)(w,{component:"div",...r,children:(0,j.jsxs)(g.ZP,{className:"page-metrics",container:!0,spacing:5,children:[(0,j.jsx)(g.ZP,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!n.length&&(0,j.jsx)(Z.Z,{currentLoad:s.cpuUsage||0,history:n,style:{height:150}})},"cpu"),(0,j.jsx)(g.ZP,{item:!0,lg:4,md:6,sm:6,xs:12,children:!!o.length&&(0,j.jsx)(k.Z,{used:s.memoryUsage||0,history:o,style:{height:150}})},"memory")]})})}C.propTypes={blocklet:b().object.isRequired,cpuHistory:b().arrayOf(b().shape({date:b().number,value:b().number})),memoryHistory:b().arrayOf(b().shape({date:b().number,value:b().number}))},C.defaultProps={cpuHistory:[],memoryHistory:[]};const w=(0,a.Z)(p.Z)(o||(o=(0,r.Z)([""])));var I,R=n(80378);function F(){const{t:e,locale:t}=(0,f.PE)(),{blocklet:n,runtimeHistory:o,actions:{refreshBlocklet:r}}=(0,y.y0)(),a=(0,s.useMemo)((()=>{const e=[];return(0,h.forEachBlockletSync)(n,((t,o)=>{let{ancestors:r,id:s,level:a}=o;t.runtimeInfo&&e.push({type:"blocklet",groupId:n.meta.did,groupName:(0,h.getDisplayName)(n),id:s,name:(0,h.getDisplayName)(t,!0),blocklet:n,component:t,level:a-1>=0?a-1:0,runtimeInfo:t.runtimeInfo,ancestors:r})})),e}),[n]);(0,s.useEffect)((()=>{const e=setInterval((()=>{r()}),1e4);return()=>{clearInterval(e)}}),[]);const i=[{label:e("common.name"),name:"name",options:{customBodyRenderLite(e){const{name:t,component:n,level:o,ancestors:r}=a[e];return(0,j.jsxs)(d.Z,{display:"flex",alignItems:"center",pl:2*o,children:[(0,j.jsx)(R.Z,{size:14,blocklet:n,ancestors:r}),(0,j.jsx)(d.Z,{ml:1,children:t})]})}}},{label:e("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(e){const{runtimeInfo:n}=a[e];return o=n.uptime,u()(Number(o||0),{locale:(0,v.FF)(t)});var o}}},{label:e("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(e){const{runtimeInfo:t}=a[e];return l()((null===t||void 0===t?void 0:t.memoryUsage)||0)}}},{label:e("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(e){const{runtimeInfo:t}=a[e];return"".concat((t.cpuUsage||0).toFixed(1),"%")}}},{label:e("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:e("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return(0,j.jsxs)(P,{component:"div",children:[(0,j.jsx)(p.Z,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:e("analytics.trend")}),"running"===n.status?[(0,j.jsx)(d.Z,{children:(0,j.jsx)(C,{blocklet:n,cpuHistory:o.cpu,memoryHistory:o.memory})}),(0,j.jsx)(d.Z,{mt:3,children:(0,j.jsx)(m.Z,{title:e("analytics.detail"),className:"monitor-table",locale:t,data:a,columns:i,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]:(0,j.jsx)(p.Z,{children:e("blocklet.runtimeInfo.noRunning")})]})}F.propTypes={};const P=(0,a.Z)(p.Z)(I||(I=(0,r.Z)([""])))},80378:(e,t,n)=>{n.d(t,{Z:()=>p});var o=n(55898),r=n.n(o),s=n(62681),a=n(72333),i=n(6352),l=n.n(i),c=n(35432),u=n(58238),d=n(14491);var m=n(96266);function p(e){let{blocklet:t,style:n,size:o,ancestors:r,...i}=e;const p=(0,u.h6)(),{logoUrl:h,inService:f}=function(e){var t;let{blocklet:n,ancestors:o=[]}=e;const r=(0,u.h6)(),{inService:s}=r,a="?v=".concat(null===n||void 0===n||null===(t=n.meta)||void 0===t?void 0:t.version).concat((0,d.XN)(null===n||void 0===n?void 0:n.status)?"~":"");let i=s?l()(d.zn,c.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle",a):l()(r.imgPrefix,"blocklet.png");if("registry"===n.source&&n.deployedFrom&&n.meta.logo)i=l()(n.deployedFrom,(0,d.lk)(n.meta.bundleDid,n.meta.logo),a);else{const e=window.env.apiPrefix||"/",t=o.concat(n),r=s?t.slice(1):t;i=l()(e,"/blocklet/logo-bundle".concat(r.map((e=>"/".concat(e.meta.did))).join("")),a)}return{logoUrl:i,inService:s}}({blocklet:t,ancestors:r}),{variant:y}=i,v=f?()=>{}:e=>{e.target.src="".concat(p.imgPrefix,"/blocklet.png")};let x=(0,m.jsx)("img",{src:h,onError:v,alt:t.meta.name,style:{width:o}});return t.meta.logo||(x=(0,m.jsx)(a.Z,{did:t.meta.did||"",responsive:!0})),(0,m.jsx)(s.Z,{variant:y||"square",style:Object.assign({backgroundColor:"transparent",width:o,height:o,borderRadius:10},n),...i,children:x})}p.propTypes={blocklet:r().object.isRequired,style:r().object,size:r().oneOfType([r().number,r().string]),ancestors:r().array},p.defaultProps={style:{},size:40,ancestors:[]}},26089:(e,t,n)=>{function o(e,t,n,o){return parseFloat((t-o*t/e+n).toFixed(2))}function r(e){return e.value}function s(e,t){const n=document.createElementNS("http://www.w3.org/2000/svg",e);for(const o in t)n.setAttribute(o,t[o]);return n}function a(e,t,n){if(function(e){[...e.querySelectorAll("*")].forEach((t=>e.removeChild(t)))}(e),t.length<=1)return;n=n||{},"number"===typeof t[0]&&(t=t.map((e=>({value:e}))));const{onmousemove:a}=n,{onmouseout:i}=n,l="interactive"in n?n.interactive:!!a,c=n.spotRadius||2,u=2*c,d=n.cursorWidth||2,m=parseFloat(e.attributes["stroke-width"].value),p=n.fetch||r,h=t.map((e=>p(e))),f=parseFloat(e.attributes.width.value)-2*u,y=parseFloat(e.attributes.height.value),v=y-2*m-u,x=0===Math.max(...h)?1:Math.max(...h),b=-1e3,g=h.length-1,Z=f/g,k=[],j=o(x,v,m+c,h[0]);let C="M".concat(u," ").concat(j);h.forEach(((e,n)=>{const r=n*Z+u,s=o(x,v,m+c,e);k.push(Object.assign({},t[n],{index:n,x:r,y:s})),C+=" L ".concat(r," ").concat(s)}));const w=s("path",{class:"sparkline--line",d:C,fill:"none"}),I=s("path",{class:"sparkline--fill",d:"".concat(C," V ").concat(y," L ").concat(u," ").concat(y," Z"),stroke:"none"});if(e.appendChild(I),e.appendChild(w),!l)return;const R=s("line",{class:"sparkline--cursor",x1:b,x2:b,y1:0,y2:y,"stroke-width":d}),F=s("circle",{class:"sparkline--spot",cx:b,cy:b,r:c});e.appendChild(R),e.appendChild(F);const P=s("rect",{width:e.attributes.width.value,height:e.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});e.appendChild(P),P.addEventListener("mouseout",(e=>{R.setAttribute("x1",b),R.setAttribute("x2",b),F.setAttribute("cx",b),i&&i(e)})),P.addEventListener("mousemove",(e=>{const t=e.offsetX;let n=k.find((e=>e.x>=t));n||(n=k[g]);const o=k[k.indexOf(n)-1];let r,s;o?(s=o.x+(n.x-o.x)/2,r=t>=s?n:o):r=n;const{x:i}=r,{y:l}=r;F.setAttribute("cx",i),F.setAttribute("cy",l),R.setAttribute("x1",i),R.setAttribute("x2",i),a&&a(e,r)}))}n.d(t,{Z:()=>a})},38763:(e,t,n)=>{n.d(t,{Z:()=>v});var o=n(7896),r=n(31461),s=n(5057),a=n(9978),i=n(91213),l=n(62773),c=n(42908),u=n(25228),d=n(31821),m=n(18561);function p(e){return(0,m.Z)("MuiCard",e)}(0,d.Z)("MuiCard",["root"]);var h=n(96266);const f=["className","raised"],y=(0,l.ZP)(u.Z,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({overflow:"hidden"}))),v=s.forwardRef((function(e,t){const n=(0,c.Z)({props:e,name:"MuiCard"}),{className:s,raised:l=!1}=n,u=(0,r.Z)(n,f),d=(0,o.Z)({},n,{raised:l}),m=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},p,t)})(d);return(0,h.jsx)(y,(0,o.Z)({className:(0,a.Z)(m.root,s),elevation:l?8:void 0,ref:t,ownerState:d},u))}))},75392:(e,t,n)=>{n.d(t,{Z:()=>y});var o=n(7896),r=n(31461),s=n(5057),a=n(9978),i=n(91213),l=n(62773),c=n(42908),u=n(31821),d=n(18561);function m(e){return(0,d.Z)("MuiCardContent",e)}(0,u.Z)("MuiCardContent",["root"]);var p=n(96266);const h=["className","component"],f=(0,l.ZP)("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})((()=>({padding:16,"&:last-child":{paddingBottom:24}}))),y=s.forwardRef((function(e,t){const n=(0,c.Z)({props:e,name:"MuiCardContent"}),{className:s,component:l="div"}=n,u=(0,r.Z)(n,h),d=(0,o.Z)({},n,{component:l}),y=(e=>{const{classes:t}=e;return(0,i.Z)({root:["root"]},m,t)})(d);return(0,p.jsx)(f,(0,o.Z)({as:l,className:(0,a.Z)(y.root,s),ownerState:d,ref:t},u))}))}}]);
|