@abtnode/webapp 1.16.27-beta-d1555a79 → 1.16.27-beta-595ed831
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 +39 -40
- package/build/index.html +1 -1
- package/build/service-worker.js +1 -1
- package/build/static/css/8890.bfca650f.chunk.css +1 -0
- package/build/static/js/1366.cd4e7c5a.chunk.js +2 -0
- package/build/static/js/1486.bcbf63f3.chunk.js +1 -0
- package/build/static/js/{1667.0afb32ac.chunk.js → 1667.a0c1bd62.chunk.js} +1 -1
- package/build/static/js/1697.bb3daf90.chunk.js +2 -0
- package/build/static/js/1794.bb39fcdb.chunk.js +1 -0
- package/build/static/js/1869.4e5165a8.chunk.js +1 -0
- package/build/static/js/2355.fe9e5eaf.chunk.js +1 -0
- package/build/static/js/{2362.43aba25e.chunk.js → 2362.535a39b0.chunk.js} +1 -1
- package/build/static/js/2646.3c94c81b.chunk.js +1 -0
- package/build/static/js/3108.8df89363.chunk.js +1 -0
- package/build/static/js/3217.53b4e93a.chunk.js +1 -0
- package/build/static/js/3351.be676eac.chunk.js +1 -0
- package/build/static/js/{3504.59653aaf.chunk.js → 3504.6df392db.chunk.js} +1 -1
- package/build/static/js/3595.a73deb26.chunk.js +1 -0
- package/build/static/js/3646.9ca707d1.chunk.js +1 -0
- package/build/static/js/3815.1e4840e2.chunk.js +1 -0
- package/build/static/js/3998.533e1d9e.chunk.js +1 -0
- package/build/static/js/{4527.6d3ce631.chunk.js → 4527.8771abf6.chunk.js} +2 -2
- package/build/static/js/4542.6e54cc7d.chunk.js +1 -0
- package/build/static/js/{4804.20a6de7e.chunk.js → 4804.9dc4ff41.chunk.js} +2 -2
- package/build/static/js/4852.d006afae.chunk.js +1 -0
- package/build/static/js/{4906.91460902.chunk.js → 4906.fc570676.chunk.js} +1 -1
- package/build/static/js/5083.ecb059e3.chunk.js +2 -0
- package/build/static/js/5261.d805c13c.chunk.js +1 -0
- package/build/static/js/{5374.1135dab5.chunk.js → 5374.623a9a80.chunk.js} +1 -1
- package/build/static/js/5433.21c26373.chunk.js +1 -0
- package/build/static/js/6129.0d902ffa.chunk.js +1 -0
- package/build/static/js/{6867.929ff2ac.chunk.js → 6867.56a2df81.chunk.js} +1 -1
- package/build/static/js/{436.d3dfe09b.chunk.js → 7000.9ee7ffdd.chunk.js} +1 -1
- package/build/static/js/7702.7030cc56.chunk.js +1 -0
- package/build/static/js/{7718.b9fb672b.chunk.js → 7718.44fb1ee7.chunk.js} +1 -1
- package/build/static/js/8110.2ca1dc99.chunk.js +1 -0
- package/build/static/js/{8399.5f81511d.chunk.js → 8399.d74f7fac.chunk.js} +1 -1
- package/build/static/js/8890.339faf81.chunk.js +2 -0
- package/build/static/js/{7676.96ca7a9d.chunk.js.LICENSE.txt → 8890.339faf81.chunk.js.LICENSE.txt} +0 -7
- package/build/static/js/9779.de94e6a6.chunk.js +1 -0
- package/build/static/js/main.2503ad39.js +2 -0
- package/package.json +1 -1
- package/build/static/css/7676.7f909312.chunk.css +0 -1
- package/build/static/js/1366.cf2949cf.chunk.js +0 -2
- package/build/static/js/1794.88e130cc.chunk.js +0 -1
- package/build/static/js/1869.6c2448a7.chunk.js +0 -1
- package/build/static/js/2355.b4578354.chunk.js +0 -1
- package/build/static/js/2613.4592208a.chunk.js +0 -2
- package/build/static/js/2646.8f5483fb.chunk.js +0 -1
- package/build/static/js/3108.29977e3b.chunk.js +0 -1
- package/build/static/js/3135.d72dbe37.chunk.js +0 -1
- package/build/static/js/3198.88e502ec.chunk.js +0 -1
- package/build/static/js/3217.e1a959bf.chunk.js +0 -1
- package/build/static/js/3595.36d3f261.chunk.js +0 -1
- package/build/static/js/3646.3c8374e7.chunk.js +0 -1
- package/build/static/js/3815.e65ec43b.chunk.js +0 -1
- package/build/static/js/3998.61ea719b.chunk.js +0 -1
- package/build/static/js/442.d95b0c5a.chunk.js +0 -1
- package/build/static/js/4542.2d4966ad.chunk.js +0 -1
- package/build/static/js/4852.11a0c1a1.chunk.js +0 -1
- package/build/static/js/5261.067b7dc4.chunk.js +0 -1
- package/build/static/js/5433.46b3adc5.chunk.js +0 -1
- package/build/static/js/5570.c66dd1dc.chunk.js +0 -2
- package/build/static/js/6129.cf511102.chunk.js +0 -1
- package/build/static/js/7676.96ca7a9d.chunk.js +0 -2
- package/build/static/js/7702.ad9a8c43.chunk.js +0 -1
- package/build/static/js/8110.c292b9cf.chunk.js +0 -1
- package/build/static/js/9779.e657536a.chunk.js +0 -1
- package/build/static/js/main.67a70213.js +0 -2
- /package/build/static/css/{5570.bceba133.chunk.css → 5083.bceba133.chunk.css} +0 -0
- /package/build/static/js/{1366.cf2949cf.chunk.js.LICENSE.txt → 1366.cd4e7c5a.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{2613.4592208a.chunk.js.LICENSE.txt → 1697.bb3daf90.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{4527.6d3ce631.chunk.js.LICENSE.txt → 4527.8771abf6.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{4804.20a6de7e.chunk.js.LICENSE.txt → 4804.9dc4ff41.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{5570.c66dd1dc.chunk.js.LICENSE.txt → 5083.ecb059e3.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.67a70213.js.LICENSE.txt → main.2503ad39.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[1486],{45005:(e,t,n)=>{n.d(t,{$7:()=>x,AP:()=>j});var o=n(92877),r=n(55898),i=n.n(r),l=n(19577),s=n(2478),c=n(44067),a=n(46954),d=n(42507),p=n(40184),u=n(28726),m=n(76223),h=n(68420),f=n(96266);const x={meta:i().object.isRequired,onCancel:i().func.isRequired},g=(0,o.Z)((()=>({dialogAuth:{padding:"0 0 24px !important","& .auth-title":{textAlign:"center !important",marginBottom:"4px !important"},"& .auth-tip--scan":{textAlign:"center !important"}},iconRoot:{minWidth:48}})));function j(e){let{action:t,onSelect:n,onNext:o}=e;const r=g(),{t:i}=(0,h.PE)(),x=[{action:"purchase",title:i("store.purchase.purchase.title"),description:i("store.purchase.purchase.description")},{action:"verify",title:i("store.purchase.verify.title"),description:i("store.purchase.verify.description")}];return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(l.Z,{className:r.tabPanel,children:x.map((e=>(0,f.jsxs)(s.ZP,{button:!0,selected:t===e.action,onClick:()=>n(e.action),children:[(0,f.jsx)(a.Z,{className:r.iconRoot,children:"purchase"===e.action?(0,f.jsx)(d.Z,{style:{color:"purchase"===t?m.Z.primary.main:"#AAA",fontSize:32}}):(0,f.jsx)(p.Z,{style:{color:"verify"===t?m.Z.primary.main:"#AAA",fontSize:32}})}),(0,f.jsx)(c.Z,{primary:e.title,secondary:e.description})]},e.action)))}),o&&(0,f.jsx)(u.Z,{fullWidth:!0,disabled:!t,variant:"contained",color:"primary",style:{marginTop:16},onClick:o,children:i("common.next")})]})}j.propTypes={action:i().oneOf(["both","purchase","verify"]).isRequired,onSelect:i().func.isRequired,onNext:i().func.isRequired}},69561:(e,t,n)=>{n.d(t,{Z:()=>a});var o=n(5057),r=n(55898),i=n.n(r),l=n(12937),s=n(68420),c=n(96266);function a(e){let{children:t,...n}=e;const{t:r}=(0,o.useContext)(s.RD);return(0,c.jsx)(l.Z,{tip:r("common.copyTip"),copiedTip:r("common.copiedTip"),...n,children:t})}a.propTypes={children:i().any.isRequired}},5140:(e,t,n)=>{n.d(t,{Z:()=>u});var o=n(55898),r=n.n(o),i=n(11750),l=n(47020),s=n(93938),c=n(68420),a=n(69561),d=n(10032),p=n(96266);function u(e){let{title:t,description:n,confirmPlaceholder:o,cancel:r,confirm:u,params:m,onCancel:h,onConfirm:f,keyName:x}=e;const{t:g}=(0,c.PE)(),j={title:()=>(0,p.jsxs)("div",{children:[t," (".concat(x,")")]}),description:(e,t)=>(0,p.jsxs)("div",{children:[(0,p.jsx)(s.Z,{severity:"warning",style:{width:"100%"},children:g("common.notice")}),(0,p.jsx)("div",{style:{marginTop:24,marginBottom:24},dangerouslySetInnerHTML:{__html:n}}),(0,p.jsxs)("div",{style:{marginBottom:24},children:[g("common.click"),"\uff1a",(0,p.jsx)(a.Z,{"data-cy":"click-copy",children:x})]}),(0,p.jsx)(i.Z,{component:"div",children:(0,p.jsx)(l.Z,{label:o,autoComplete:"off","data-cy":"delete-confirm-input",variant:"outlined",fullWidth:!0,autoFocus:!0,value:e.inputVal,onChange:n=>{var o;o={...e,inputVal:n.target.value,__disableConfirm:x!==n.target.value},t({...o,__disableConfirm:o.__disableConfirm})}})})]}),confirm:u,cancel:r,onConfirm:f,onCancel:h,params:{inputVal:"",__disableConfirm:!0,...m}};return(0,p.jsx)(d.Z,{title:j.title,description:j.description,confirm:j.confirm,cancel:j.cancel,params:j.params,onConfirm:j.onConfirm,onCancel:j.onCancel})}u.propTypes={title:r().any.isRequired,keyName:r().any.isRequired,description:r().any.isRequired,confirmPlaceholder:r().any.isRequired,cancel:r().string,confirm:r().string,params:r().object,onCancel:r().func,onConfirm:r().func.isRequired},u.defaultProps={onCancel:()=>{},cancel:"",confirm:"Confirm",params:{}}},45485:(e,t,n)=>{n.d(t,{Z:()=>Z});var o=n(5057),r=n(55898),i=n.n(r),l=n(92877),s=n(44846),c=n(13128),a=n(55372),d=n(11750),p=n(47020),u=n(2478),m=n(44919),h=n(68420),f=n(28726),x=n(88574),g=n(22324),j=n(64387),y=n(96266);const b=(0,l.Z)((e=>({addMenuItemRoot:{marginTop:"8px",justifyContent:"center",color:e.palette.primary.main,lineHeight:"3.2"}})));function Z(e){let{disabled:t,storeList:n,teamDid:r,onAdd:i}=e;const{api:l}=(0,g.h6)(),[Z,v]=(0,o.useState)(!1),[C,R]=(0,o.useState)(!0),[k,w]=(0,o.useState)(!1),[S,D]=(0,o.useState)(""),[P,I]=(0,o.useState)(""),{t:T}=(0,h.PE)(),z=b(),N=async()=>{v(!0);try{const{isNew:e,decoded:t}=(0,j.bQ)(S,n);if(!e)throw new Error(T("store.blockletRegistry.haveSameRegistry"));await l.addBlockletStore({input:{teamDid:r,url:t}}),i(t),w(!1)}catch(e){const t="".concat(T("store.blockletRegistry.addFailed")," ").concat((0,j.Z)(e));I(t)}finally{v(!1)}};return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(u.ZP,{button:!0,disabled:t,className:z.addMenuItemRoot,onClick:()=>{w(!0)},children:[(0,y.jsx)(m.Z,{font:!0}),(0,y.jsx)(d.Z,{variant:"inherit",children:T("store.blockletRegistry.addRegistry")})]}),(0,y.jsxs)(c.ZP,{title:T("store.blockletRegistry.addRegistry"),fullWidth:!0,maxWidth:"md",open:k,onClose:()=>w(!1),PaperProps:{style:{minHeight:"auto"}},actions:(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(f.Z,{onClick:e=>{e.stopPropagation(),w(!1)},color:"inherit",children:T("common.cancel")}),(0,y.jsxs)(f.Z,{onClick:e=>{e.stopPropagation(),N()},color:"primary","data-cy":"install-blocklet-next-step",disabled:Z||!S||C,variant:"contained",autoFocus:!0,children:[Z&&(0,y.jsx)(s.Z,{size:16}),T("common.confirm")]})]}),children:[(0,y.jsx)("div",{style:{paddingTop:12,overflowY:"hidden"},children:(0,y.jsx)(a.Z,{component:"div",children:(0,y.jsx)(d.Z,{component:"div",children:(0,y.jsx)(p.Z,{label:T("store.blockletRegistry.registryUrl"),autoComplete:"off",variant:"outlined",name:"url",fullWidth:!0,value:S,onChange:e=>{I(null);let t=!1;e.target.value.trim()||(t=!0),e.target.value.trim()||I(T("store.blockletRegistry.registryUrlEmpty")),D(e.target.value),R(t)},disabled:Z,onKeyPress:e=>{"Enter"===e.key&&(e.preventDefault(),e.target.value.trim()?N():I(T("store.blockletRegistry.registryUrlEmpty")))}})})})}),!!P&&(0,y.jsx)(x.Z,{type:"error",style:{width:"100%"},children:P})]})]})}Z.propTypes={teamDid:i().string.isRequired,disabled:i().bool,storeList:i().array,onAdd:i().func},Z.defaultProps={disabled:!1,storeList:[],onAdd:()=>{}}},90886:(e,t,n)=>{n.d(t,{Z:()=>L});var o=n(92877),r=n(69211),i=n(75239),l=n(79350),s=n(44846),c=n(39948),a=n(11750),d=n(80633),p=n(56556),u=n(94552),m=n(88786),h=n(92405),f=n(47213),x=n(56184),g=n(55898),j=n.n(g),y=n(5057),b=n(6352),Z=n.n(b),v=n(68420),C=n(86229),R=n(96366),k=n(47595),w=n(22324),S=n(5140),D=n(64387),P=n(96266);function I(e){let{store:t,teamDid:n,onDelete:o,children:r,projectId:i=""}=e;const{api:l}=(0,w.h6)(),{t:s}=(0,v.PE)(),[c,a]=(0,y.useState)(!1),[d,u]=(0,y.useState)(null),m=(0,R.Z)(),h={keyName:t.url,title:s("store.blockletRegistry.deleteRegistry"),description:s("store.blockletRegistry.deleteDesc",{name:"<b>".concat(t.url,"</b>"),color:m.palette.error.main}),confirmPlaceholder:s("store.blockletRegistry.confirmDesc",{name:t.url}),confirm:s("common.delConfirm"),cancel:s("common.cancel"),onConfirm:async()=>{try{a(!0),await l.deleteBlockletStore({input:{teamDid:n,url:t.url,projectId:i}}),o&&"function"===typeof o&&o()}catch(e){C.Z.error("Remove Blocklet Store Error: ".concat((0,D.Z)(e)))}finally{a(!1),u(null)}},onCancel:()=>{a(!1),u(null)}},f=e=>{t.protected||(e.stopPropagation(),u(h))};return(0,P.jsxs)(P.Fragment,{children:[r?(0,P.jsx)("span",{onClick:f,children:r}):(0,P.jsx)(p.Z,{color:"primary",disabled:c,onClick:f,size:"small",children:(0,P.jsx)(k.default,{sx:{zoom:.95}})}),d&&(0,P.jsx)(S.Z,{keyName:d.keyName,title:d.title,description:d.description,confirmPlaceholder:d.confirmPlaceholder,confirm:d.confirm,cancel:d.cancel,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})]})}I.propTypes={children:j().node,teamDid:j().string.isRequired,store:j().object.isRequired,onDelete:j().func,projectId:j().string},I.defaultProps={children:null,projectId:"",onDelete:()=>{}};var T=n(61533),z=n(74490),N=n(83294),q=n(10032);function _(e){let{connected:t,onConnect:n,onDelete:o,store:r,teamDid:i,projectId:l}=e;const[s,a]=(0,y.useState)(null),d=Boolean(s),{t:m}=(0,v.PE)(),[f,x]=(0,y.useState)(!1),g=()=>{a(null)},j=[{label:m("common.visitStore"),action:e=>{e.stopPropagation(),window.open(Z()(r.url,"developer/blocklets")),window.open(r.url)},icon:u.Z},{label:m("common.reconnect"),action:()=>{g(),x(!0)},icon:h.Z,hidden:!t}];return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(p.Z,{ref:s,color:"primary",onClick:e=>{a(e.currentTarget)},size:"small",children:(0,P.jsx)(N.Z,{sx:{zoom:.95}})}),(0,P.jsxs)(T.Z,{anchorEl:s,open:d,onClose:g,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[j.map((e=>e.hidden?null:(0,P.jsxs)(z.Z,{dense:!0,onClick:e.action,disabled:e.disabled,children:[e.icon&&(0,P.jsx)(e.icon,{color:"action",sx:{marginRight:1}}),(0,P.jsx)(c.Z,{color:"action",children:e.label})]},e.label))),(0,P.jsx)(I,{store:r,onDelete:o,teamDid:i,projectId:l,children:(0,P.jsxs)(z.Z,{dense:!0,disabled:r.protected,children:[(0,P.jsx)(k.default,{sx:{color:r.protected?"action":"error.main",marginRight:1}}),(0,P.jsx)(c.Z,{color:r.protected?"action":"error.main",children:m("common.delete")})]})})]}),f&&(0,P.jsx)(q.Z,{displayError:!0,title:"".concat(m("common.reconnect")," ").concat(r.name),description:m("blocklet.publish.reconnectStoreTip"),confirm:m("common.confirm"),onConfirm:()=>{x(!1),n()},onCancel:()=>x(!1)})]})}_.propTypes={connected:j().bool,onConnect:j().func,onDelete:j().func,store:j().object.isRequired,teamDid:j().string.isRequired,projectId:j().string},_.defaultProps={projectId:"",connected:!1,onConnect:()=>{},onDelete:()=>{}};const E=_;var A=n(69972);const O=function(e){let{onOpen:t,onClose:n}=e;const o=(0,y.useRef)(null),r=(0,y.useRef)(null);return async e=>{o.current&&(clearInterval(r.current),o.current.close()),o.current=window.open("about:blank","_blank"),null===t||void 0===t||t(o.current),r.current=setInterval((()=>{o.current&&!o.current.closed||(o.current=null,clearInterval(r.current),null===n||void 0===n||n())}),500),await Promise.resolve(e(o.current,(e=>{o.current&&(o.current.location.href=e)})))}},F=(0,o.Z)((()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},box:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",overflow:"hidden",width:"100%"},menuName:{flexShrink:1,display:"flex",flexDirection:"column",overflow:"hidden",flex:1},actions:{flex:1,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center"},title:{fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},url:{fontSize:14,opacity:.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},buttonLine:{height:"100%",width:"1px",backgroundColor:"#e0e0e0"}}))),W=(0,r.Z)((e=>{let{className:t,...n}=e;return(0,P.jsx)(i.Z,{...n,classes:{popper:t}})}))((e=>{let{theme:t}=e;return{["& .".concat(l.Z.tooltip)]:{backgroundColor:"#fff",color:"rgba(0, 0, 0, 0.87)",maxWidth:220,borderRadius:8,padding:t.spacing(2),fontSize:t.typography.pxToRem(12),border:"1px solid rgba(0,0,0,0.08)",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.05)"}}}));function L(e){let{teamDid:t,projectId:n,releaseId:o,store:r,onDelete:i,kind:l,published:g,connectedStore:j,releaseType:b,onPublish:R,onOpenConnectStore:k}=e;const S=F(),{t:T}=(0,v.PE)(),{api:z}=(0,w.h6)(),[N,q]=(0,y.useState)(!1),_=O({onOpen:()=>q(!0),onClose:()=>q(!1)}),L="publish"===l,B=!!j,U=()=>{_((async(e,o)=>{try{const e=await z.connectToStore({input:{did:t,storeUrl:r.url,storeId:r.id,storeName:r.name,projectId:n}});if(null===e||void 0===e||!e.url)return void C.Z.error("failed to connect to store");o(e.url),await k({did:t,projectId:n,storeId:r.id}),q(!1)}catch(i){const t=(0,D.Z)(i);C.Z.error(t),e.document.write(t),q(!1)}}))};return(0,y.useEffect)((()=>{B&&q(!1)}),[B]),(0,P.jsxs)("div",{className:S.box,children:[!L&&N&&(0,P.jsx)(s.Z,{sx:{marginRight:2},size:16}),(0,P.jsxs)("div",{className:S.menuName,children:[(0,P.jsx)(c.Z,{sx:{display:"flex",flexDirection:"row"},children:(0,P.jsx)(a.Z,{component:"span",className:S.title,variant:"subtitle1",children:r.name})}),(0,P.jsx)(a.Z,{className:S.url,component:"span",variant:"inherit",children:"".concat(r.url)})]}),(0,P.jsxs)("div",{className:S.actions,children:[j&&(0,P.jsx)(W,{placement:"left",title:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(a.Z,{component:"span",className:S.title,variant:"subtitle1",children:j.developerName}),(0,P.jsx)(A.Z,{size:14,responsive:!0,did:j.developerDid})]}),children:(0,P.jsx)(f.Z,{sx:{color:"rgba(10,10,60,0.3)",fontSize:22,marginRight:1,cursor:"help"}})}),L&&(0,P.jsxs)(d.Z,{disabled:N,variant:"outlined",sx:{height:36},size:"small",children:[!B&&(0,P.jsxs)(p.Z,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:U,children:[N?(0,P.jsx)(s.Z,{sx:{marginRight:1},size:16}):(0,P.jsx)(h.Z,{sx:{marginRight:1}}),T("common.connect")]}),B&&g&&(0,P.jsxs)(p.Z,{disabled:!0,sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},children:[N?(0,P.jsx)(s.Z,{sx:{marginRight:1},size:16}):(0,P.jsx)(x.Z,{sx:{marginRight:1}}),T("common.uploaded")]}),B&&!g&&(0,P.jsxs)(p.Z,{sx:{paddingLeft:2,paddingRight:2,fontSize:15,width:130},onClick:()=>{q(!0),z.publishToStore({input:{did:t,storeId:r.id,storeName:r.name,projectId:n,releaseId:o,type:b}}).then((e=>{"uploaded"===e.url?C.Z.success(T("blocklet.publish.uploadToStoreSuccess")):"published"===e.url&&C.Z.success(T("blocklet.publish.publishToStoreSuccess")),null===R||void 0===R||R(null)})).catch((e=>{C.Z.error((0,D.Z)(e)),null===R||void 0===R||R(e)})).finally((()=>{q(!1)}))},children:[N?(0,P.jsx)(s.Z,{sx:{marginRight:1},size:16}):(0,P.jsx)(m.Z,{sx:{marginRight:1,fontSize:20}}),T("common.upload")]}),(0,P.jsx)(E,{projectId:n,connected:B,store:r,onDelete:i,teamDid:t,onConnect:U})]}),!L&&(0,P.jsxs)(d.Z,{disabled:N,variant:"outlined",sx:{height:36},size:"small",children:[(0,P.jsx)(p.Z,{onClick:e=>{e.stopPropagation(),L?window.open(Z()(r.url,"developer/blocklets")):window.open(r.url)},children:(0,P.jsx)(u.Z,{sx:{zoom:.9}})}),!r.protected&&(0,P.jsx)(I,{store:r,onDelete:i,teamDid:t})]})]})]})}L.propTypes={kind:j().string,teamDid:j().string.isRequired,published:j().bool,connectedStore:j().shape({storeId:j().string,storeUrl:j().string,developerDid:j().string,developerName:j().string}),projectId:j().string,releaseId:j().string,releaseType:j().string,store:j().shape({id:j().string.isRequired,name:j().string.isRequired,url:j().string.isRequired,protected:j().bool,connected:j().bool}).isRequired,onDelete:j().func,onPublish:j().func,onOpenConnectStore:j().func},L.defaultProps={kind:"store",published:!1,connectedStore:null,releaseId:"",projectId:"",releaseType:"",onPublish:()=>{},onDelete:()=>{},onOpenConnectStore:()=>{}}},86884:(e,t,n)=>{n.d(t,{K_:()=>o,WC:()=>r});const o="blocklet-add-component-registry",r="server-add-registry"}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[1667],{13455:(e,n,t)=>{t.d(n,{Z:()=>d});var l=t(55898),o=t.n(l),a=t(36687),s=t(72333);const i="data:image/png;base64,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";var r=t(74094),c=t(96266);function d(e){let{blocklet:n,blockletMetaUrl:t}=e;const{did:l,logo:o}=n.meta;let d;return d=o?(0,c.jsx)(a.Z,{src:(0,r.aZ)({did:l,logoPath:o,baseUrl:new URL(t).origin}),fallback:i,width:64,size:"contain",placeholder:"application logo"}):(0,c.jsx)(s.Z,{did:l,size:64}),d}d.propTypes={blocklet:o().object.isRequired,blockletMetaUrl:o().string.isRequired}},13932:(e,n,t)=>{t.d(n,{Z:()=>f});var l,o=t(71171),a=t(68420),s=t(77277),i=t(33518),r=t(39948),c=t(5057),d=t(11397),u=t.n(d),h=t(6202),p=t(96266);const m=u()("@abtnode/webapp:launch-blocklet:download-progress");const g=(e,n)=>{m("getDownloadBundleStep",e);return(e||[]).map((e=>{var t;const l=n("launchBlocklet.waiting.".concat("extracting"===e.status?"extractingComponent":"downloadingComponent"),{name:(null===(t=e.component)||void 0===t?void 0:t.title)||""}),o=e.total&&e.current?": ".concat(Math.floor(e.current/e.total*100)," %"):"";let a=e.name?": ".concat(e.name):"";return o||(a+="..."),"".concat(l).concat(o).concat(a)})).join("\n")};function f(e){let{appDid:n,visible:t}=e;const{t:l}=(0,a.PE)(),o=function(e){let{appDid:n}=e;const[t,l]=(0,c.useState)([]),o=(0,h.ZP)();return(0,c.useEffect)((()=>(o.on(s.BlockletEvents.downloadBundleProgress,(e=>{n&&n===(null===e||void 0===e?void 0:e.appDid)&&l((n=>{const t=[...n],l=t.findIndex((n=>{var t,l;return(null===(t=n.component)||void 0===t?void 0:t.did)===(null===(l=e.component)||void 0===l?void 0:l.did)}));return"completed"===e.status?-1!==l&&t.splice(l,1):-1!==l?t[l]=e:t.push(e),[...t]}))})),()=>{o.off(s.BlockletEvents.downloadBundleProgress)})),[n,o]),t}({appDid:n});return(0,p.jsx)(x,{style:{display:t?"block":"none"},children:g(o,l)})}f.defaultProps={appDid:"",visible:!0};const x=(0,i.Z)(r.Z)(l||(l=(0,o.Z)(["\n flex: 0 0 auto;\n white-space: pre;\n overflow-y: auto;\n overflow-x: auto;\n max-height: 10em;\n max-width: 500px;\n min-width: auto;\n @media (max-width: ","px) {\n max-width: 90%;\n max-height: 30vh;\n }\n"])),(e=>e.theme.breakpoints.values.md))},66436:(e,n,t)=>{t.d(n,{Z:()=>i});var l,o=t(71171),a=t(33518),s=t(96266);function i(e){let{children:n}=e;return(0,s.jsx)(r,{children:n})}const r=a.Z.div(l||(l=(0,o.Z)(["\n color: #1dc1c7;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n"])))},11476:(e,n,t)=>{t.d(n,{Z:()=>x});var l=t(5057),o=t(77277),a=t(31853),s=t(11397),i=t.n(s),r=t(6202),c=t(10155);const d=i()("@abtnode/webapp:launch-blocklet:runtime-state"),u=Object.keys(o.BlockletStatus),h=Object.values(o.BlockletStatus),p=Object.values(o.BlockletEvents).filter((e=>![o.BlockletEvents.purchaseChange,o.BlockletEvents.domainStatus].includes(e))),m=(e,n)=>{var t;return(null===e||void 0===e?void 0:e.appDid)===n||(null===e||void 0===e||null===(t=e.meta)||void 0===t?void 0:t.did)===n},g=8e3,f=2e3;function x(e){const n=(0,c.Z)(),t=(0,r.ZP)(),o=(0,l.useRef)(null),s=()=>{e&&!o.current&&(o.current=setInterval((()=>{e&&(d("polling blocklet state"),v())}),f))},[i,x]=(0,a.Z)({status:null,eventName:"",runtimeBlocklet:null,error:"",isGetBlocklet:!1,startPolling:s,stopPolling:()=>{o.current&&clearInterval(o.current)}}),v=()=>{n.getBlocklet({input:{did:e,attachRuntimeInfo:!0}}).then((e=>{x({status:e.blocklet?e.blocklet.status:"",eventName:"",runtimeBlocklet:e.blocklet,isGetBlocklet:!0})})).catch((e=>{console.error("get blocklet failed",e)}))};(0,l.useEffect)((()=>{let n=null;return e&&(d("schedule polling blocklet state"),n=setTimeout((()=>{s()}),g)),()=>{n&&clearInterval(n)}}),[e]),(0,l.useEffect)((()=>{e?null===i.status&&(d("polling blocklet state on start"),v()):x({status:"",eventName:"",runtimeBlocklet:null})}),[e,i.status]);const b=n=>t=>{if(m(t,e)){const e={status:null,eventName:n,runtimeBlocklet:t,isGetBlocklet:!1};if(t.error)d("blocklet error",{blockletEventName:n,error:t.error}),e.status="error",e.error=t.error;else{const l=u[h.indexOf(t.status)];d("blocklet event",{blockletEventName:n,status:l}),l&&(e.status=l)}x(e)}};for(const a of p)(0,l.useEffect)((()=>{const n=b(a);return e&&t.on(a,n),()=>{e&&t.off(a,n)}}),[e]);return i}},71667:(e,n,t)=>{t.r(n),t.d(n,{default:()=>Ue});var l,o,a=t(71171),s=t(85493),i=t(6352),r=t.n(i),c=t(21371),d=t(15715),u=t(33518),h=t(68420),p=t(63902),m=t(51703),g=t(66889),f=t(15959),x=t(10866),v=t(4456),b=t(28864),k=t(12332),y=t(44846),j=t(88574),w=t(35966),A=t(75793),C=t(38242),E=t(55309),Z=t(94494),B=t(77609),L=t(23484),D=t(96266);const P=u.Z.a(l||(l=(0,a.Z)(["\n display: block;\n height: 36px;\n color: ",";\n"])),(e=>e.theme.palette.primary.main)),N=(0,u.Z)(Z.Z)(o||(o=(0,a.Z)(["\n .app-info_desc {\n font-weight: 400;\n margin-top: 40px;\n font-size: 18px;\n line-height: 21px;\n color: #222222;\n }\n\n .body {\n text-align: center;\n }\n\n "," {\n .app-info_desc {\n font-size: 16px;\n }\n }\n\n .circle_icon {\n font-size: 58px;\n color: ",";\n }\n"])),(e=>e.theme.breakpoints.down("md")),(e=>"error"===e.variant?e.theme.palette.error.main:e.theme.palette.success.main)),M=function(){const{t:e}=(0,h.PE)(),{info:n}=(0,A.h6)(),t=(0,L.Z)(),l=decodeURIComponent(t.get("accessUrl")||""),{meta:o}=(0,B.H0)();return(0,D.jsx)(N,{children:(0,D.jsx)("div",{className:"body",children:(0,D.jsx)(E.Z,{variant:"success",title:(0,C.getDisplayName)({meta:o},!0),subTitle:e("launchBlocklet.installSuccess",{serverName:n.name}),footer:(0,D.jsx)(P,{href:l,rel:"noreferrer","data-cy":"open-blocklet",children:e("common.open")})})})})};var R=t(39463),I=t(47791),S=t(86229),T=t(64387),z=t(80676),O=t(69972),Q=t(88577),U=t(35266),J=t(77277),H=t(2660),F=t(77429),X=t(48086),K=t(38898),V=t(75506),G=t.n(V),W=t(50482),Y=t.n(W),_=t(5057),q=t(15849),$=t(67654),ee=t(31853),ne=t(11397),te=t.n(ne),le=t(52581),oe=t(11476),ae=t(25339),se=t(74094),ie=t(13455),re=t(28726);function ce(e){let{children:n,...t}=e;return(0,D.jsx)(re.Z,{variant:"contained",color:"primary",...t,children:n})}const de=(0,_.forwardRef)(((e,n)=>(0,D.jsx)(ce,{...e,forwardedRef:n})));var ue,he,pe,me,ge=t(13932),fe=t(93040),xe=t(66436);const ve=te()("@abtnode/webapp:launch-blocklet:step-install"),be=(e,n)=>!n.statusChanged&&("installed"===e||"running"===e)&&!n.launching,ke=(e,n,t)=>t("nft"===n?e?"launchBlocklet.dialog.nftFreeDescription":"launchBlocklet.dialog.nftPaidDescription":e?"launchBlocklet.dialog.freeDescription":"launchBlocklet.dialog.paidDescription"),ye="setup_token",je=e=>{sessionStorage.setItem(ye,e)},we=()=>{sessionStorage.removeItem(ye)},Ae=()=>sessionStorage.getItem(ye);function Ce(){const e=(0,L.Z)(),{t:n,locale:t}=(0,h.PE)(),{api:l,info:o}=(0,A.h6)(),{session:a,api:i}=(0,ae.Tt)(),c=(0,s.useNavigate)(),{loading:d,meta:u,isFree:p,appDid:m,sessionId:g,storeUrl:f,blockletMetaUrl:x,isExternal:v,setAppDid:b,launcherUrl:k,launcherSessionId:j,isInstalling:E,isInstalled:Z}=(0,B.H0)(),P=u?(0,C.getDisplayName)({meta:u},!0):null,N=e.get("launchType"),M=e.get("chainHost"),V=!!e.get("onlyRequired"),W=e.get("nftId"),ne=(0,_.useRef)(null),{decrypt:te,encryptKey:re}=(0,Q.R)(),[ce]=(0,$.Z)("skip-blocklet-setup",!1),[ue,he]=(0,ee.Z)({launching:!1,visiting:!1,statusChanged:!1,isConnectOpen:!1,nextAccessUrl:"",loaded:!1,installError:null,progressIndex:0,connectData:{action:"",baseUrl:"",checkFn:()=>{},extraParams:{}}}),pe=(0,fe.Iq)({user:a.user,launchType:N,nftId:W}),me=(0,R.getServerAuthMethod)(o,N,j,pe),ye=(0,oe.Z)(pe?m:""),{status:Ce,eventName:De}=ye,Pe=e.get("from");(0,_.useEffect)((()=>{d||(Z||E||Ne(),he({loaded:!0}))}),[d]);const Ne=async()=>{const e=a.user?"".concat(a.user.fullName,"'s ").concat(P):P;if(he({installError:null}),null!==a&&void 0!==a&&a.user&&!v&&"serverless"!==N)try{await(async()=>{const{isNew:e,decoded:n}=(0,se.bQ)(f,o.blockletRegistryList);e&&await l.addBlockletStore({input:{teamDid:o.did,url:n}})})()}catch(h){console.error("addNewRegistryToRegistryList error:",h)}if(p){var n,t,s;const l="launch-free-blocklet-by-".concat(me);he({isConnectOpen:!0,connectData:{action:l,baseUrl:"",checkFn:z.od.create({baseURL:null!==(n=null===(t=window)||void 0===t||null===(s=t.env)||void 0===s?void 0:s.apiPrefix)&&void 0!==n?n:"/"}).get,extraParams:{wt:(0,I.iK)(u),title:e,blockletMetaUrl:x,launchType:N,nftId:W,chainHost:decodeURIComponent(M),launcherUrl:k,launcherSessionId:j,onlyRequired:V}}})}else{var i,c,d;const n="launch-paid-blocklet-by-".concat(me),t=new URL(window.location.href);t.pathname=r()(null!==(i=null===(c=window)||void 0===c||null===(d=c.env)||void 0===d?void 0:d.apiPrefix)&&void 0!==i?i:"/","/api/did/".concat(n,"/token")),t.searchParams.set("wt",(0,I.iK)(u)),t.searchParams.set("_ek_",re),t.searchParams.set("title",e),t.searchParams.set("autoConnect",!1),t.searchParams.set("blockletMetaUrl",x),N&&t.searchParams.set("launchType",N),W&&t.searchParams.set("nftId",W),k&&t.searchParams.set("launcherUrl",k),j&&t.searchParams.set("launcherSessionId",j);const{data:l}=await z.hi.get(t.href);he({isConnectOpen:!0,connectData:{action:"verify-purchase-blocklet",baseUrl:new URL(x).origin,checkFn:z.od.create({baseURL:new URL(x).origin}).get,extraParams:{serverDid:o.did,blockletDid:null===u||void 0===u?void 0:u.did,nw:l.url}}})}},Me=async n=>{if(ve("visitBlocklet",{status:Ce,state:ue,appDid:m}),ue.visiting)return;he({visiting:!0});const t=(0,T.A6)({blocklet:n}),l=await(0,se.D)(t);if(G()(l)&&"serverless"!==N||ce)return he({visiting:!1}),void setTimeout((()=>{(n=>{const t="/".concat(o.routing.adminPath,"/blocklets/").concat(n.meta.did,"/configuration").replace(/\/+/g,"/");let l="/launch-blocklet/complete?status=installed&name=".concat(encodeURIComponent(P),"&accessUrl=").concat(encodeURIComponent(t),"&blocklet_meta_url=").concat(x);const a=e.get("fromLauncher");a&&(l+="&fromLauncher=".concat(a)),N&&(l+="&launchType=".concat(N)),M&&(l+="&chainHost=".concat(M)),c(l)})(n)}),1e3);if(G()(l))return void he({visiting:!1});if(!1===be(Ce,ue))try{await i.post("/api/launch/".concat(g))}catch(d){ve("end launch failed",{error:(0,se.Z)(d)})}const a=new URL(l);a.searchParams.set("serverUrl",(0,I.RU)(o)),"running"!==n.status&&a.searchParams.set("__start__","1");const s=e.get("fromLauncher");s&&a.searchParams.set("fromLauncher",s),N&&a.searchParams.set("launchType",N),W&&a.searchParams.set("nftId",W),M&&a.searchParams.set("chainHost",M);const r=Ae();r&&a.searchParams.set("setupToken",r),he({nextAccessUrl:a.href,visiting:!1}),setTimeout((()=>{we(),window.location.href=a.href}),1e3)},Re=[n("launchBlocklet.waiting.verifying"),n("launchBlocklet.waiting.downloading"),n("launchBlocklet.waiting.extracting"),n("upgrading"===Ce?"common.upgrading":"launchBlocklet.waiting.installing"),n("launchBlocklet.waiting.done")],Ie=()=>{ve("handleInstalledProgress",{status:Ce,state:ue}),Ce&&(he({progressIndex:4}),ne.current&&(clearTimeout(ne.current),ne.current=null),ne.current=setTimeout((()=>{l.getBlocklet({input:{did:m,attachRuntimeInfo:!0}}).then((e=>{e.blocklet&&Me(e.blocklet)}))}),500))};if((0,_.useEffect)((()=>{E&&he({launching:!0}),Z&&Ie()}),[Z,E]),(0,_.useEffect)((()=>{if("serverless"!==N||De!==J.BlockletEvents.nftConsumed)switch(Ce){case"waiting":he({progressIndex:1,statusChanged:!0});break;case"downloading":he({progressIndex:2,statusChanged:!0});break;case"installing":case"upgrading":he({progressIndex:3,statusChanged:!0});break;case"installed":if("serverless"===N&&!(0,fe.MZ)(ye))break;Ie();break;case"starting":case"running":case"stopped":Ie();break;case"corrupted":case"error":{const n={message:ye.error.message,name:ye.eventName};var e;if([J.BlockletEvents.downloadFailed,J.BlockletEvents.installFailed].includes(ye.eventName)?n.action="retry":"error"!==Ce&&"corrupted"!==Ce||(n.action="view"),!Y()(n,ue.installError))null!==ye&&void 0!==ye&&null!==(e=ye.error)&&void 0!==e&&e.message&&S.Z.error((0,se.Z)(ye.error))}}else Ie()}),[Ce,De,ye]),ve("render",{status:Ce,eventName:De,launchType:N,runtimeBlockletState:ye,state:ue}),d||a.user&&null===Ce||G()(u))return(0,D.jsx)(w.Z,{relative:"parent",children:(0,D.jsx)(y.Z,{})});if(ue.installError){const e={view:!v&&(0,D.jsx)(de,{className:"bottom-button",component:q.Link,to:"/blocklets/".concat(m,"/overview"),"data-cy":"view-blocklet",color:"primary",variant:"contained",children:n("launchBlocklet.viewApplication")}),retry:(0,D.jsxs)(Be,{children:[Pe&&(0,D.jsx)(de,{variant:"text",className:"bottom-button","data-cy":"go-back",disabled:ue.isConnectOpen,onClick:()=>{window.location.href=Pe},children:n("common.back")}),(0,D.jsxs)(de,{className:"bottom-button","data-cy":"retry-install",disabled:ue.isConnectOpen,onClick:Ne,children:[ue.isConnectOpen&&(0,D.jsx)(y.Z,{size:16}),n("common.retry")]})]})},t=ue.installError.name?ue.installError.name.replace("blocklet.",""):"installFailed";return(0,D.jsx)(Le,{variant:"error",title:P,subTitle:(0,D.jsxs)(Ze,{children:[(0,D.jsx)("div",{children:n("launchBlocklet.error.".concat(t))}),ue.installError.message&&(0,D.jsx)("div",{className:"error-desc",children:n("common.errorMessage")+ue.installError.message})]}),footer:e[ue.installError.action]})}if(be(Ce,ue))return ve("alreadyExists",{status:Ce,state:ue,runtimeBlockletState:ye}),(0,D.jsx)(Le,{variant:"info",title:n("common.reminder"),subTitle:n("launchBlocklet.alreadyExists",{name:(0,C.getDisplayName)({meta:u},!0)}),footer:(0,D.jsxs)("div",{children:[!ue.nextAccessUrl&&(0,D.jsx)(y.Z,{size:16}),ue.nextAccessUrl&&(0,D.jsx)(K.Z,{href:ue.nextAccessUrl,"data-cy":"open-blocklet",children:n("launchBlocklet.redirect")})]})});const Se=!ue.launching&&!Ce;return(0,D.jsxs)(Ee,{children:[(0,D.jsx)("div",{className:"header",children:(0,D.jsx)(H.Z,{title:n(Se?"common.install":"common.installing"),subTitle:Se?n("launchBlocklet.subTitle",{appName:P,serverName:o.name}):""})}),(0,D.jsxs)("div",{className:"body",children:[Se&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{className:"illustrations",children:[(0,D.jsx)("div",{className:"ills-block ills-block-left",children:(0,D.jsxs)("div",{className:"ills-block-inner",children:[(0,D.jsx)(ie.Z,{className:"i-icon",blocklet:{meta:u},blockletMetaUrl:x}),(0,D.jsx)("div",{className:"i-name",children:P})]})}),(0,D.jsx)(X.Z,{className:"arrow-icon"}),(0,D.jsx)("div",{className:"ills-block ills-block-right",children:(0,D.jsxs)("div",{className:"ills-block-inner",children:[(0,D.jsx)("img",{width:"64",height:"64",src:le.Z,alt:""}),(0,D.jsx)("div",{className:"i-name",children:o.name}),(0,D.jsx)(O.Z,{size:12,responsive:!1,compact:!0,did:o.did})]})})]}),ue.loaded&&!Z&&!ue.launching&&(0,D.jsxs)(de,{className:"bottom-button","data-cy":"start-launch",disabled:ue.isConnectOpen,onClick:Ne,children:[ue.isConnectOpen&&(0,D.jsx)(y.Z,{size:16}),n("launchBlocklet.confirmInstall")]})]}),ue.launching&&(0,D.jsxs)(xe.Z,{children:[(0,D.jsx)(U.Z,{increaseSpeed:.3,messageLoop:!1,message:(0,D.jsx)(F.Z,{steps:Re,stepIndex:ue.progressIndex,autoGrowth:4===ue.progressIndex?1e3:4e3})}),[1,2].includes(ue.progressIndex)&&(0,D.jsx)(ge.Z,{appDid:m})]})]}),ue.isConnectOpen&&(0,D.jsx)(ge.Z,{appDid:m,visible:!1}),(0,D.jsx)(Q.Z,{open:ue.isConnectOpen,popup:!0,saveConnect:!1,className:"connect",baseUrl:ue.connectData.baseUrl,action:ue.connectData.action,checkFn:ue.connectData.checkFn,extraParams:ue.connectData.extraParams,checkTimeout:6e5,webWalletUrl:(0,se.yP)(o),onSuccess:async e=>{S.Z.success(n("launchBlocklet.dialog.success"));const t=Array.isArray(e)?e[e.length-1]:e;if(t.sessionToken&&((0,se.ZB)(te(t.sessionToken)),await a.refresh()),t.setupToken&&je(t.setupToken),he({launching:!t.isInstalled,isConnectOpen:!1}),t.appDid){b(t.appDid,t.sessionId);const e=new URL(window.location.href);e.searchParams.set("appDid",t.appDid),e.searchParams.set("sessionId",t.sessionId),window.history.replaceState(null,"",e.toString())}},onClose:()=>he({isConnectOpen:!1}),locale:t,messages:{title:"".concat(n("launchBlocklet.dialog.title")),scan:ke(p,me,n),confirm:n("launchBlocklet.dialog.confirm"),success:n("launchBlocklet.dialog.success")}})]})}const Ee=(0,u.Z)(Z.Z)(ue||(ue=(0,a.Z)(["\n .body {\n align-items: center;\n animation: fadein ease 0.3s;\n }\n\n .illustrations {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: start;\n text-align: center;\n margin-top: 16px;\n margin-bottom: 40px;\n width: 100%;\n }\n\n .ills-block,\n .ills-block-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n flex: 1;\n }\n .ills-block {\n max-width: 220px;\n .i-icon {\n width: 64px;\n height: 64px;\n }\n\n .i-name {\n margin-top: 16px;\n font-weight: 400;\n font-size: 16px;\n color: #222222;\n }\n\n .i-sub-name {\n color: #999999;\n }\n }\n\n .arrow-icon {\n align-self: start;\n color: #c4c5ca;\n font-size: 30px;\n margin: 16px 0 0;\n "," {\n margin: 25px 24px 0;\n }\n }\n\n @keyframes fadein {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n"])),(e=>e.theme.breakpoints.down("md"))),Ze=u.Z.div(he||(he=(0,a.Z)(["\n line-height: 1.4em;\n .error-desc {\n margin-top: 8px;\n word-wrap: break-word;\n color: ",";\n }\n"])),(e=>e.theme.palette.grey[500])),Be=u.Z.div(pe||(pe=(0,a.Z)(["\n display: flex;\n justify-content: space-around;\n flex-wrap: wrap;\n button {\n margin: 0 10px 18px;\n }\n"]))),Le=(0,u.Z)(E.Z)(me||(me=(0,a.Z)(["\n .result-footer {\n height: auto;\n }\n"])));var De,Pe,Ne=t(90845),Me=t(35432),Re=t(32828);function Ie(e){var n;let{onClickNext:t,handleDescEle:l,showPageHeader:o}=e;const a=(0,s.useNavigate)(),[i,r]=(0,_.useState)(null),[c,d]=(0,_.useState)(!1),{t:u}=(0,h.PE)(),{info:p,api:m}=(0,A.h6)(),{loading:g,meta:f,isRunning:x,isInstalled:v,isInstalling:b,appDid:k,isExternal:j}=(0,B.H0)(),[Z,L]=(0,_.useState)(!0),P=(0,_.useMemo)((()=>{if(!j)return"/blocklets/".concat(k,"/overview");if(!i)return"";const e=new URL(i);return"".concat(e.origin).concat(Me.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin")}),[i,j,k]),N=()=>{const e=new URLSearchParams(window.location.search);Z||e.set("onlyRequired","1"),a("/launch-blocklet/install?".concat(e.toString()))},M=t||N;if((0,_.useEffect)((()=>{g||(b?N():(x||v&&j)&&(async()=>{try{d(!0);const{blocklet:e}=await m.getBlocklet({input:{did:f.did,attachRuntimeInfo:!0}}),n=(0,T.A6)({blocklet:e}),t=await(0,se.D)(n);if(!t&&G()(t))return void r(null);r(new URL(t).href)}catch(e){S.Z.error(e.message)}finally{d(!1)}})())}),[x,j,v,b]),v){const e=x?"alreadyRunning":"alreadyInstalled";return(0,D.jsx)(E.Z,{variant:"info",title:u("common.reminder"),subTitle:u("launchBlocklet.".concat(e),{name:(0,C.getDisplayName)({meta:f},!0)}),footer:(0,D.jsxs)(Te,{children:[(0,D.jsx)(de,{loading:!P,"data-cy":"view-blocklet",component:j?void 0:q.Link,to:P,href:P,variant:x?"outlined":"contained",color:"primary",children:u("launchBlocklet.viewApplication")}),x&&(0,D.jsx)(de,{loading:c,className:"last-button",disabled:!i,href:i,"data-cy":"open-blocklet",children:u("common.open")})]})})}return p?(0,Re.default)(f)||null!==f&&void 0!==f&&null!==(n=f.components)&&void 0!==n&&n.length?(0,D.jsxs)(Se,{children:[o&&(0,D.jsx)(H.Z,{title:u("launchBlocklet.introduction"),subTitle:u("launchBlocklet.welcome")}),(0,D.jsx)(Ne.Z,{installRelated:Z,onChangeInstallRelated:L,meta:f,onClickNext:M,handleDescEle:l})]}):(0,D.jsx)(Se,{className:"center",children:(0,D.jsx)(E.Z,{variant:"error",subTitle:u("launchBlocklet.error.resourceBlocklet")})}):(0,D.jsx)(w.Z,{relative:"parent",children:(0,D.jsx)(y.Z,{})})}Ie.defaultProps={onClickNext:null,handleDescEle:"",showPageHeader:!0};const Se=u.Z.div(De||(De=(0,a.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n &.center {\n justify-content: center;\n }\n"]))),Te=u.Z.div(Pe||(Pe=(0,a.Z)(["\n .MuiButton-root {\n "," {\n min-width: 200px;\n }\n }\n .last-button {\n margin-left: ",";\n }\n"])),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.spacing(2)));var ze,Oe,Qe;function Ue(){const e=(0,d.Z)((e=>e.breakpoints.down("md"))),{t:n,locale:t}=(0,h.PE)(),{info:l}=(0,A.h6)(),o=(0,se.yP)(l),{serverUrl:a,fromLauncher:i,meta:u,isFree:C,loading:E,error:Z,storeUrl:L}=(0,B.H0)(),P=r()((0,se.Y5)(),"/launch-blocklet"),N=[{key:"install",name:n("launchBlocklet.steps.installApp"),path:r()(P,"install")},{key:"setup",name:n("setup.steps.launchApp")}];let R=[{key:"agreement",name:n("launchBlocklet.introduction"),path:r()(P,"agreement")},...N];const I=()=>{a&&window.open(a)};let S=(0,D.jsx)(Fe,{className:"".concat(a?"logo-can-click":""),children:(0,D.jsx)(k.Z,{onClick:I,logo:e?(0,D.jsx)(x.Z,{width:"32",height:"32"}):(0,D.jsx)(v.Z,{width:"128",height:"48"})})});i&&(R=[{key:"purchase-space",name:n("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:n("launchBlocklet.steps.prepareSpace")},...N],S=(0,D.jsx)(Fe,{className:"".concat(a?"logo-can-click":""),children:(0,D.jsx)(k.Z,{logo:e?(0,D.jsx)(x.Z,{onClick:I,width:"32",height:"32"}):(0,D.jsx)(v.Z,{onClick:I,width:"128",height:"48"}),previousData:{logo:e?(0,D.jsx)(f.Z,{width:"32",height:"32"}):(0,D.jsx)(b.Z,{width:"145",height:"48"})}})}));const T={meta:u,isFree:C};return(0,D.jsx)(m.W,{steps:R,children:(0,D.jsx)(p.Z,{locale:t,loading:E,blockletMeta:{...u,isFree:C},useOfSkeleton:!1,navLogo:S,headerEndAddons:(0,D.jsx)(g.Z,{webWalletUrl:o,SessionContext:ae.B3}),pcWidth:"80%",style:{height:"100%"},logoUrl:u&&u.logo?(0,se.aZ)({did:u.did,baseUrl:L,logoPath:u.logo}):null,children:(0,D.jsxs)(He,{children:[(0,D.jsx)(c.Global,{styles:Je}),E&&(0,D.jsx)(w.Z,{relative:"parent",children:(0,D.jsx)(y.Z,{})}),!E&&Z&&(0,D.jsx)(w.Z,{relative:"parent",children:(0,D.jsx)(j.Z,{style:{wordBreak:"break-all"},variant:"icon",type:"error",children:Z})}),!E&&!Z&&(0,D.jsxs)(s.Routes,{children:[(0,D.jsx)(s.Route,{path:"agreement",element:(0,D.jsx)(Ie,{})}),(0,D.jsx)(s.Route,{path:"install",element:(0,D.jsx)(Ce,{})}),(0,D.jsx)(s.Route,{path:"complete",element:(0,D.jsx)(M,{blocklet:T})}),(0,D.jsx)(s.Route,{path:"*",element:(0,D.jsx)(s.Navigate,{to:"agreement".concat(window.location.search),replace:!0})})]})]})})})}const Je=(0,c.css)(ze||(ze=(0,a.Z)(["\n html,\n body,\n #root,\n #root > .wrapper {\n height: 100%;\n }\n"]))),He=u.Z.div(Oe||(Oe=(0,a.Z)(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n\n .bottom-button {\n min-width: 200px;\n }\n"]))),Fe=u.Z.div(Qe||(Qe=(0,a.Z)(["\n margin-top: -1px;\n &.logo-can-click {\n cursor: pointer;\n }\n"])))},90845:(e,n,t)=>{t.d(n,{Z:()=>B});var l=t(71171),o=t(55898),a=t.n(o),s=t(85493),i=t(33518),r=t(68420),c=t(40265),d=t(44566),u=t(55498),h=t(39948),p=t(26174),m=t(88092),g=t(67680),f=t(5057),x=t(35432),v=t(96266);function b(e){let{...n}=e;return(0,v.jsxs)("div",{...n,style:{width:"100%"},children:[(0,v.jsx)("h3",{children:"End User License Agreement for Application"}),(0,v.jsxs)("p",{children:["Blocklet Server License Agreement ",x.COPYRIGHT_OWNER," version 2020-08-28"]}),(0,v.jsx)("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),(0,v.jsx)("p",{children:"\u6682\u65e0"})]})}var k=t(13128),y=t(15715);function j(e){var n,t,l,o;return"".concat((null===(n=e.bundleSource)||void 0===n?void 0:n.store)||e.meta.homepage,"/assets/").concat(null===(t=e.meta)||void 0===t?void 0:t.did,"/").concat((null===(l=e.meta)||void 0===l?void 0:l.logo)||"logo.png","?v=").concat(null===(o=e.meta)||void 0===o?void 0:o.version)}function w(e){let{installRelated:n,meta:t,show:l,onClose:o,components:a,loading:s}=e;const{t:i}=(0,r.PE)(),c=(0,y.Z)((e=>e.breakpoints.down("md")));if(!l)return null;const d=!s&&0===a.length,p=!s&&0!==a.length;return(0,v.jsxs)(k.ZP,{title:i("blocklet.component.relatedComponents",{name:t.title}),maxWidth:!1,fullWidth:!1,onClose:(e,n)=>{"backdropClick"!==n&&o(!1)},PaperProps:{style:c?{width:"100%",height:window.innerHeight}:{maxWidth:500,minWidth:300,width:"80%"}},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:[s&&(0,v.jsx)(h.Z,{sx:{marginTop:4,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:(0,v.jsx)(h.Z,{sx:{fontSize:32},color:"primary.main",component:u.JO,icon:"line-md:loading-loop"})}),d&&(0,v.jsx)(h.Z,{sx:{textAlign:"center"},children:i("blocklet.component.noDependencies",{name:t.title})}),p&&(0,v.jsx)(h.Z,{sx:{marginBottom:2},children:a.map((e=>{if(!e.meta)return null;const{required:t}=e;let l;return l=n||t?1:.5,(0,v.jsxs)(h.Z,{sx:{opacity:l,padding:"10px 0px",paddingBottom:.5,marginTop:0,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[(0,v.jsx)("img",{style:{width:40,height:40,minWidth:40,minHeight:40},src:j(e),alt:e.meta.title}),(0,v.jsxs)(h.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",flex:1,marginLeft:2},children:[(0,v.jsxs)(h.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var n;window.open("".concat((null===(n=e.bundleSource)||void 0===n?void 0:n.store)||e.meta.homepage,"/blocklets/").concat(e.meta.did),"_blank")},children:[e.meta.title,(0,v.jsx)(h.Z,{sx:{display:t?"inline-block":"none",fontSize:"12px",fontWeight:"bold",marginLeft:1},children:i("blocklet.component.required")}),(0,v.jsxs)(h.Z,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[e.meta.version,(0,v.jsx)(h.Z,{className:"link-icon",icon:"fluent:open-20-filled",component:u.JO,sx:{color:"primary.main",fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.1s"}})]})]}),(0,v.jsx)(h.Z,{sx:{marginTop:0,opacity:.7},children:e.meta.description})]})]},e.meta.did)}))})]})}w.propTypes={meta:a().object,show:a().bool,onClose:a().func.isRequired,installRelated:a().func,components:a().array.isRequired,loading:a().bool.isRequired},w.defaultProps={meta:null,show:!1,installRelated:!1};var A=t(15849),C=t(22324);const E=function(e){const{api:n}=(0,C.h6)(),[t]=(0,A.useSearchParams)(),l=t.get("blocklet_meta_url")||function(e){return e&&(e.registryUrl||e.homepage)&&e.did?"".concat(e.registryUrl||e.homepage,"/api/blocklets/").concat(null===e||void 0===e?void 0:e.did,"/blocklet.json"):""}(e),[o,a]=(0,f.useState)([]),[s,i]=(0,f.useState)(!1);return(0,f.useEffect)((()=>{!l||null!==e&&void 0!==e&&e.inputUrl||(i(!0),n.getDynamicComponents({input:{url:l}}).then((e=>{a(e.components)})).finally((()=>{i(!1)})))}),[l]),{components:o,loading:s}};var Z;function B(e){let{installRelated:n,onChangeInstallRelated:t,meta:l,onClickNext:o,handleDescEle:a}=e;const i=(0,s.useNavigate)(),{t:x,locale:k}=(0,r.PE)(),[y,j]=(0,f.useState)(!1),{components:A,loading:C}=E(l),Z=o||(()=>{i("/launch-blocklet/install".concat(window.location.search))});return(0,v.jsxs)(L,{children:[(0,v.jsx)("div",{className:"app-content",children:(0,v.jsx)("div",{className:"agreement",children:(0,v.jsx)("div",{className:"agreement-content",children:(0,v.jsx)(d.Z,{blockletMeta:{data:l},locale:k,handleDescEle:a})})})}),(0,v.jsxs)(h.Z,{className:"agreement-bottom",sx:{"> .agreement-loading":{color:"primary.main"}},children:[C?(0,v.jsx)(u.JO,{className:"agreement-loading",icon:"line-md:loading-loop",style:{fontSize:42,transform:"scale(0.6)"}}):null,t&&null!==A&&void 0!==A&&A.length?(0,v.jsxs)(h.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[(0,v.jsx)(p.Z,{sx:{mr:.5},checked:n,onChange:e=>t(e.currentTarget.checked),control:(0,v.jsx)(m.Z,{}),label:(0,v.jsx)("span",{children:x("launchBlocklet.installRelatedComponents")})}),(0,v.jsx)(h.Z,{sx:{"> button svg":{color:"primary.main"}},children:(0,v.jsx)(g.Z,{size:"small",onClick:()=>{j(!0)},children:(0,v.jsx)(u.JO,{icon:"octicon:package-dependencies-16"})})})]}):null,(0,v.jsx)("div",{className:"button-container","data-cy":"agree-all",children:(0,v.jsx)(c.Z,{onContinue:Z,description:(0,v.jsx)(b,{}),texts:{listenName:x("launchBlocklet.license"),buttonNext:x("launchBlocklet.next")}})})]}),(0,v.jsx)(w,{installRelated:n,meta:l,show:y,onClose:()=>{j(!1)},components:A,loading:C})]})}B.propTypes={meta:a().object.isRequired,onClickNext:a().func,handleDescEle:a().node,installRelated:a().bool,onChangeInstallRelated:a().func},B.defaultProps={onClickNext:null,handleDescEle:"",installRelated:!0,onChangeInstallRelated:null};const L=i.Z.div(Z||(Z=(0,l.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n flex: 1;\n .app-content {\n padding: 2px 24px 24px;\n "," {\n padding-top: 10px;\n }\n width: 100%;\n flex: 1;\n letter-spacing: normal;\n }\n .agreement {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n border: 1px solid ",";\n border-radius: 12px;\n "," {\n margin-top: 24px;\n }\n "," {\n margin-top: 16px;\n }\n .agreement-content {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n font-size: 14px;\n overflow-y: auto;\n "," {\n padding: 0 24px;\n }\n "," {\n padding: 0 16px;\n }\n &:after {\n display: block;\n content: '';\n height: 24px;\n }\n }\n }\n .agreement-bottom {\n display: flex;\n width: 100%;\n padding: 24px;\n "," {\n flex-direction: row;\n align-items: center;\n margin-left: auto;\n }\n "," {\n flex-direction: column;\n align-items: center;\n padding-top: 0;\n padding-bottom: 16px;\n }\n }\n .button-container {\n "," {\n margin-left: auto;\n }\n "," {\n padding-top: 0;\n padding-bottom: 16px;\n }\n }\n"])),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.palette.grey[100]),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")))},94494:(e,n,t)=>{t.d(n,{Z:()=>c});var l,o=t(71171),a=t(33518),s=t(55898),i=t.n(s),r=t(96266);function c(e){let{children:n,...t}=e;return(0,r.jsx)(d,{...t,children:n})}c.propTypes={children:i().any.isRequired};const d=a.Z.div(l||(l=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .header {\n text-align: center;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 30px;\n width: 100%;\n min-height: 200px;\n flex: 1;\n\n "," {\n padding: 24px;\n }\n\n "," {\n padding: 0 16px 16px;\n }\n }\n\n .footer {\n display: flex;\n justify-content: center;\n\n "," {\n padding-bottom: 34px;\n }\n\n "," {\n margin-top: auto;\n padding-bottom: 10px;\n }\n }\n"])),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("sm")),(e=>e.theme.breakpoints.down("md")))},12332:(e,n,t)=>{t.d(n,{Z:()=>d});var l,o,a=t(71171),s=t(55898),i=t.n(s),r=t(33518),c=t(96266);function d(e){let{logo:n,name:t,subname:l,previousData:o,...a}=e,s=(0,c.jsx)(u,{logo:n}),i=t,r=l;return o.logo&&(s=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{logo:n,className:"left-fade-in-ele"}),(0,c.jsx)(u,{logo:o.logo,className:"postion-abs left-fade-out-ele"})]})),o.name&&o.name!==t&&(i=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"right-fade-in-ele",style:{display:"inline-block"},children:t}),(0,c.jsx)("span",{className:"postion-abs right-fade-out-ele",children:o.name})]})),o.subname&&o.subname!==l&&(r=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"right-fade-in-ele",style:{display:"inline-block"},children:l}),(0,c.jsx)("span",{className:"postion-abs right-fade-out-ele",children:o.subname})]})),(0,c.jsx)(p,{...a,children:(0,c.jsxs)("div",{className:"logo-inner",children:[(0,c.jsx)("div",{className:"logo-img-content",children:s}),(0,c.jsxs)("div",{className:"logo-info ".concat(t||l?"":"zero-left"),children:[(0,c.jsx)("div",{className:"logo-name",children:i}),(0,c.jsx)("div",{className:"logo-subname",children:r})]})]})})}function u(e){let{logo:n,...t}=e;return(0,c.jsx)(h,{...t,children:n})}d.propTypes={logo:i().element.isRequired,name:i().string,subname:i().string,previousData:i().object},d.defaultProps={name:"",subname:"",previousData:{logo:"",name:"",subname:""}};const h=r.Z.div(l||(l=(0,a.Z)(["\n display: block;\n > * {\n display: block;\n }\n"]))),p=r.Z.div(o||(o=(0,a.Z)(["\n position: relative;\n display: block;\n\n .logo-inner {\n display: flex;\n align-items: center;\n height: 100%;\n .logo-img-content {\n position: relative;\n display: block;\n }\n .logo-info {\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-left: 10px;\n letter-spacing: 0.1px;\n &.zero-left {\n margin-left: 0%;\n }\n .logo-name {\n position: relative;\n line-height: 16px;\n font-size: 16px;\n color: #121319;\n }\n .logo-subname {\n position: relative;\n line-height: 13px;\n font-size: 13px;\n color: #7d8085;\n }\n }\n }\n\n .postion-abs {\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n }\n\n .right-fade-out-ele {\n animation: right-fade-out ease 0.5s;\n animation-delay: 2s;\n animation-fill-mode: forwards;\n }\n\n .right-fade-in-ele {\n animation: right-fade-in ease 0.5s;\n animation-delay: 2s;\n animation-fill-mode: both;\n }\n\n @keyframes right-fade-out {\n 0% {\n opacity: 1;\n transform: translate(0, 0);\n }\n 100% {\n opacity: 0;\n transform: translate(8px, 0);\n }\n }\n\n @keyframes right-fade-in {\n 0% {\n opacity: 0;\n transform: translate(8px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate(0, 0);\n }\n }\n\n .left-fade-out-ele {\n animation: left-fade-out ease 0.5s;\n animation-delay: 2s;\n animation-fill-mode: forwards;\n }\n\n .left-fade-in-ele {\n animation: left-fade-in ease 0.5s;\n animation-delay: 2s;\n animation-fill-mode: both;\n }\n\n @keyframes left-fade-out {\n 0% {\n opacity: 1;\n transform: translate(0, 0);\n }\n 100% {\n opacity: 0;\n transform: translate(-8px, 0);\n }\n }\n\n @keyframes left-fade-in {\n 0% {\n opacity: 0;\n transform: translate(-8px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate(0, 0);\n }\n }\n"])))},80676:(e,n,t)=>{t.d(n,{hi:()=>a,od:()=>o.a});var l=t(10458),o=t.n(l);o().defaults.timeout=1e4;const a=o().create()},28864:(e,n,t)=>{n.Z=void 0;(l=t(5057))&&l.__esModule;var l,o=t(96266);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function i(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,n||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var r=function(e){return(0,o.jsxs)("svg",s(s({},e),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,o.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,o.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};r.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.displayName="launcher-logo";n.Z=r},15959:(e,n,t)=>{n.Z=void 0;(l=t(5057))&&l.__esModule;var l,o=t(96266);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function i(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,n||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var r=function(e){return(0,o.jsxs)("svg",s(s({},e),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,o.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};r.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.displayName="launcher-logo-notext";n.Z=r}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[1667],{13455:(e,n,t)=>{t.d(n,{Z:()=>d});var l=t(55898),o=t.n(l),a=t(36687),s=t(72333);const i="data:image/png;base64,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";var r=t(74094),c=t(96266);function d(e){let{blocklet:n,blockletMetaUrl:t}=e;const{did:l,logo:o}=n.meta;let d;return d=o?(0,c.jsx)(a.Z,{src:(0,r.aZ)({did:l,logoPath:o,baseUrl:new URL(t).origin}),fallback:i,width:64,size:"contain",placeholder:"application logo"}):(0,c.jsx)(s.Z,{did:l,size:64}),d}d.propTypes={blocklet:o().object.isRequired,blockletMetaUrl:o().string.isRequired}},13932:(e,n,t)=>{t.d(n,{Z:()=>f});var l,o=t(71171),a=t(68420),s=t(77277),i=t(33518),r=t(39948),c=t(5057),d=t(11397),u=t.n(d),h=t(6202),p=t(96266);const m=u()("@abtnode/webapp:launch-blocklet:download-progress");const g=(e,n)=>{m("getDownloadBundleStep",e);return(e||[]).map((e=>{var t;const l=n("launchBlocklet.waiting.".concat("extracting"===e.status?"extractingComponent":"downloadingComponent"),{name:(null===(t=e.component)||void 0===t?void 0:t.title)||""}),o=e.total&&e.current?": ".concat(Math.floor(e.current/e.total*100)," %"):"";let a=e.name?": ".concat(e.name):"";return o||(a+="..."),"".concat(l).concat(o).concat(a)})).join("\n")};function f(e){let{appDid:n,visible:t}=e;const{t:l}=(0,a.PE)(),o=function(e){let{appDid:n}=e;const[t,l]=(0,c.useState)([]),o=(0,h.ZP)();return(0,c.useEffect)((()=>(o.on(s.BlockletEvents.downloadBundleProgress,(e=>{n&&n===(null===e||void 0===e?void 0:e.appDid)&&l((n=>{const t=[...n],l=t.findIndex((n=>{var t,l;return(null===(t=n.component)||void 0===t?void 0:t.did)===(null===(l=e.component)||void 0===l?void 0:l.did)}));return"completed"===e.status?-1!==l&&t.splice(l,1):-1!==l?t[l]=e:t.push(e),[...t]}))})),()=>{o.off(s.BlockletEvents.downloadBundleProgress)})),[n,o]),t}({appDid:n});return(0,p.jsx)(x,{style:{display:t?"block":"none"},children:g(o,l)})}f.defaultProps={appDid:"",visible:!0};const x=(0,i.Z)(r.Z)(l||(l=(0,o.Z)(["\n flex: 0 0 auto;\n white-space: pre;\n overflow-y: auto;\n overflow-x: auto;\n max-height: 10em;\n max-width: 500px;\n min-width: auto;\n @media (max-width: ","px) {\n max-width: 90%;\n max-height: 30vh;\n }\n"])),(e=>e.theme.breakpoints.values.md))},66436:(e,n,t)=>{t.d(n,{Z:()=>i});var l,o=t(71171),a=t(33518),s=t(96266);function i(e){let{children:n}=e;return(0,s.jsx)(r,{children:n})}const r=a.Z.div(l||(l=(0,o.Z)(["\n color: #1dc1c7;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n"])))},11476:(e,n,t)=>{t.d(n,{Z:()=>x});var l=t(5057),o=t(77277),a=t(31853),s=t(11397),i=t.n(s),r=t(6202),c=t(10155);const d=i()("@abtnode/webapp:launch-blocklet:runtime-state"),u=Object.keys(o.BlockletStatus),h=Object.values(o.BlockletStatus),p=Object.values(o.BlockletEvents).filter((e=>![o.BlockletEvents.purchaseChange,o.BlockletEvents.domainStatus].includes(e))),m=(e,n)=>{var t;return(null===e||void 0===e?void 0:e.appDid)===n||(null===e||void 0===e||null===(t=e.meta)||void 0===t?void 0:t.did)===n},g=8e3,f=2e3;function x(e){const n=(0,c.Z)(),t=(0,r.ZP)(),o=(0,l.useRef)(null),s=()=>{e&&!o.current&&(o.current=setInterval((()=>{e&&(d("polling blocklet state"),v())}),f))},[i,x]=(0,a.Z)({status:null,eventName:"",runtimeBlocklet:null,error:"",isGetBlocklet:!1,startPolling:s,stopPolling:()=>{o.current&&clearInterval(o.current)}}),v=()=>{n.getBlocklet({input:{did:e,attachRuntimeInfo:!0}}).then((e=>{x({status:e.blocklet?e.blocklet.status:"",eventName:"",runtimeBlocklet:e.blocklet,isGetBlocklet:!0})})).catch((e=>{console.error("get blocklet failed",e)}))};(0,l.useEffect)((()=>{let n=null;return e&&(d("schedule polling blocklet state"),n=setTimeout((()=>{s()}),g)),()=>{n&&clearInterval(n)}}),[e]),(0,l.useEffect)((()=>{e?null===i.status&&(d("polling blocklet state on start"),v()):x({status:"",eventName:"",runtimeBlocklet:null})}),[e,i.status]);const b=n=>t=>{if(m(t,e)){const e={status:null,eventName:n,runtimeBlocklet:t,isGetBlocklet:!1};if(t.error)d("blocklet error",{blockletEventName:n,error:t.error}),e.status="error",e.error=t.error;else{const l=u[h.indexOf(t.status)];d("blocklet event",{blockletEventName:n,status:l}),l&&(e.status=l)}x(e)}};for(const a of p)(0,l.useEffect)((()=>{const n=b(a);return e&&t.on(a,n),()=>{e&&t.off(a,n)}}),[e]);return i}},71667:(e,n,t)=>{t.r(n),t.d(n,{default:()=>Ue});var l,o,a=t(71171),s=t(85493),i=t(6352),r=t.n(i),c=t(21371),d=t(15715),u=t(33518),h=t(68420),p=t(63902),m=t(51703),g=t(66889),f=t(15959),x=t(10866),v=t(4456),b=t(28864),k=t(12332),y=t(44846),j=t(88574),w=t(35966),A=t(75793),C=t(38242),E=t(55309),Z=t(94494),B=t(77609),L=t(23484),D=t(96266);const P=u.Z.a(l||(l=(0,a.Z)(["\n display: block;\n height: 36px;\n color: ",";\n"])),(e=>e.theme.palette.primary.main)),N=(0,u.Z)(Z.Z)(o||(o=(0,a.Z)(["\n .app-info_desc {\n font-weight: 400;\n margin-top: 40px;\n font-size: 18px;\n line-height: 21px;\n color: #222222;\n }\n\n .body {\n text-align: center;\n }\n\n "," {\n .app-info_desc {\n font-size: 16px;\n }\n }\n\n .circle_icon {\n font-size: 58px;\n color: ",";\n }\n"])),(e=>e.theme.breakpoints.down("md")),(e=>"error"===e.variant?e.theme.palette.error.main:e.theme.palette.success.main)),M=function(){const{t:e}=(0,h.PE)(),{info:n}=(0,A.h6)(),t=(0,L.Z)(),l=decodeURIComponent(t.get("accessUrl")||""),{meta:o}=(0,B.H0)();return(0,D.jsx)(N,{children:(0,D.jsx)("div",{className:"body",children:(0,D.jsx)(E.Z,{variant:"success",title:(0,C.getDisplayName)({meta:o},!0),subTitle:e("launchBlocklet.installSuccess",{serverName:n.name}),footer:(0,D.jsx)(P,{href:l,rel:"noreferrer","data-cy":"open-blocklet",children:e("common.open")})})})})};var R=t(39463),I=t(47791),S=t(86229),T=t(64387),z=t(80676),O=t(69972),Q=t(88577),U=t(35266),J=t(77277),H=t(2660),F=t(77429),X=t(48086),K=t(38898),V=t(75506),G=t.n(V),W=t(50482),Y=t.n(W),_=t(5057),q=t(15849),$=t(67654),ee=t(31853),ne=t(11397),te=t.n(ne),le=t(52581),oe=t(11476),ae=t(25339),se=t(74094),ie=t(13455),re=t(28726);function ce(e){let{children:n,...t}=e;return(0,D.jsx)(re.Z,{variant:"contained",color:"primary",...t,children:n})}const de=(0,_.forwardRef)(((e,n)=>(0,D.jsx)(ce,{...e,forwardedRef:n})));var ue,he,pe,me,ge=t(13932),fe=t(93040),xe=t(66436);const ve=te()("@abtnode/webapp:launch-blocklet:step-install"),be=(e,n)=>!n.statusChanged&&("installed"===e||"running"===e)&&!n.launching,ke=(e,n,t)=>t("nft"===n?e?"launchBlocklet.dialog.nftFreeDescription":"launchBlocklet.dialog.nftPaidDescription":e?"launchBlocklet.dialog.freeDescription":"launchBlocklet.dialog.paidDescription"),ye="setup_token",je=e=>{sessionStorage.setItem(ye,e)},we=()=>{sessionStorage.removeItem(ye)},Ae=()=>sessionStorage.getItem(ye);function Ce(){const e=(0,L.Z)(),{t:n,locale:t}=(0,h.PE)(),{api:l,info:o}=(0,A.h6)(),{session:a,api:i}=(0,ae.Tt)(),c=(0,s.useNavigate)(),{loading:d,meta:u,isFree:p,appDid:m,sessionId:g,storeUrl:f,blockletMetaUrl:x,isExternal:v,setAppDid:b,launcherUrl:k,launcherSessionId:j,isInstalling:E,isInstalled:Z}=(0,B.H0)(),P=u?(0,C.getDisplayName)({meta:u},!0):null,N=e.get("launchType"),M=e.get("chainHost"),V=!!e.get("onlyRequired"),W=e.get("nftId"),ne=(0,_.useRef)(null),{decrypt:te,encryptKey:re}=(0,Q.R)(),[ce]=(0,$.Z)("skip-blocklet-setup",!1),[ue,he]=(0,ee.Z)({launching:!1,visiting:!1,statusChanged:!1,isConnectOpen:!1,nextAccessUrl:"",loaded:!1,installError:null,progressIndex:0,connectData:{action:"",baseUrl:"",checkFn:()=>{},extraParams:{}}}),pe=(0,fe.Iq)({user:a.user,launchType:N,nftId:W}),me=(0,R.getServerAuthMethod)(o,N,j,pe),ye=(0,oe.Z)(pe?m:""),{status:Ce,eventName:De}=ye,Pe=e.get("from");(0,_.useEffect)((()=>{d||(Z||E||Ne(),he({loaded:!0}))}),[d]);const Ne=async()=>{const e=a.user?"".concat(a.user.fullName,"'s ").concat(P):P;if(he({installError:null}),null!==a&&void 0!==a&&a.user&&!v&&"serverless"!==N)try{await(async()=>{const{isNew:e,decoded:n}=(0,se.bQ)(f,o.blockletRegistryList);e&&await l.addBlockletStore({input:{teamDid:o.did,url:n}})})()}catch(h){console.error("addNewRegistryToRegistryList error:",h)}if(p){var n,t,s;const l="launch-free-blocklet-by-".concat(me);he({isConnectOpen:!0,connectData:{action:l,baseUrl:"",checkFn:z.od.create({baseURL:null!==(n=null===(t=window)||void 0===t||null===(s=t.env)||void 0===s?void 0:s.apiPrefix)&&void 0!==n?n:"/"}).get,extraParams:{wt:(0,I.iK)(u),title:e,blockletMetaUrl:x,launchType:N,nftId:W,chainHost:decodeURIComponent(M),launcherUrl:k,launcherSessionId:j,onlyRequired:V}}})}else{var i,c,d;const n="launch-paid-blocklet-by-".concat(me),t=new URL(window.location.href);t.pathname=r()(null!==(i=null===(c=window)||void 0===c||null===(d=c.env)||void 0===d?void 0:d.apiPrefix)&&void 0!==i?i:"/","/api/did/".concat(n,"/token")),t.searchParams.set("wt",(0,I.iK)(u)),t.searchParams.set("_ek_",re),t.searchParams.set("title",e),t.searchParams.set("autoConnect",!1),t.searchParams.set("blockletMetaUrl",x),N&&t.searchParams.set("launchType",N),W&&t.searchParams.set("nftId",W),k&&t.searchParams.set("launcherUrl",k),j&&t.searchParams.set("launcherSessionId",j);const{data:l}=await z.hi.get(t.href);he({isConnectOpen:!0,connectData:{action:"verify-purchase-blocklet",baseUrl:new URL(x).origin,checkFn:z.od.create({baseURL:new URL(x).origin}).get,extraParams:{serverDid:o.did,blockletDid:null===u||void 0===u?void 0:u.did,nw:l.url}}})}},Me=async n=>{if(ve("visitBlocklet",{status:Ce,state:ue,appDid:m}),ue.visiting)return;he({visiting:!0});const t=(0,T.A6)({blocklet:n}),l=await(0,se.D)(t);if(G()(l)&&"serverless"!==N||ce)return he({visiting:!1}),void setTimeout((()=>{(n=>{const t="/".concat(o.routing.adminPath,"/blocklets/").concat(n.meta.did,"/configuration").replace(/\/+/g,"/");let l="/launch-blocklet/complete?status=installed&name=".concat(encodeURIComponent(P),"&accessUrl=").concat(encodeURIComponent(t),"&blocklet_meta_url=").concat(x);const a=e.get("fromLauncher");a&&(l+="&fromLauncher=".concat(a)),N&&(l+="&launchType=".concat(N)),M&&(l+="&chainHost=".concat(M)),c(l)})(n)}),1e3);if(G()(l))return void he({visiting:!1});if(!1===be(Ce,ue))try{await i.post("/api/launch/".concat(g))}catch(d){ve("end launch failed",{error:(0,se.Z)(d)})}const a=new URL(l);a.searchParams.set("serverUrl",(0,I.RU)(o)),"running"!==n.status&&a.searchParams.set("__start__","1");const s=e.get("fromLauncher");s&&a.searchParams.set("fromLauncher",s),N&&a.searchParams.set("launchType",N),W&&a.searchParams.set("nftId",W),M&&a.searchParams.set("chainHost",M);const r=Ae();r&&a.searchParams.set("setupToken",r),he({nextAccessUrl:a.href,visiting:!1}),setTimeout((()=>{we(),window.location.href=a.href}),1e3)},Re=[n("launchBlocklet.waiting.verifying"),n("launchBlocklet.waiting.downloading"),n("launchBlocklet.waiting.extracting"),n("upgrading"===Ce?"common.upgrading":"launchBlocklet.waiting.installing"),n("launchBlocklet.waiting.done")],Ie=()=>{ve("handleInstalledProgress",{status:Ce,state:ue}),Ce&&(he({progressIndex:4}),ne.current&&(clearTimeout(ne.current),ne.current=null),ne.current=setTimeout((()=>{l.getBlocklet({input:{did:m,attachRuntimeInfo:!0}}).then((e=>{e.blocklet&&Me(e.blocklet)}))}),500))};if((0,_.useEffect)((()=>{E&&he({launching:!0}),Z&&Ie()}),[Z,E]),(0,_.useEffect)((()=>{if("serverless"!==N||De!==J.BlockletEvents.nftConsumed)switch(Ce){case"waiting":he({progressIndex:1,statusChanged:!0});break;case"downloading":he({progressIndex:2,statusChanged:!0});break;case"installing":case"upgrading":he({progressIndex:3,statusChanged:!0});break;case"installed":if("serverless"===N&&!(0,fe.MZ)(ye))break;Ie();break;case"starting":case"running":case"stopped":Ie();break;case"corrupted":case"error":{const n={message:ye.error.message,name:ye.eventName};var e;if([J.BlockletEvents.downloadFailed,J.BlockletEvents.installFailed].includes(ye.eventName)?n.action="retry":"error"!==Ce&&"corrupted"!==Ce||(n.action="view"),!Y()(n,ue.installError))null!==ye&&void 0!==ye&&null!==(e=ye.error)&&void 0!==e&&e.message&&S.Z.error((0,se.Z)(ye.error))}}else Ie()}),[Ce,De,ye]),ve("render",{status:Ce,eventName:De,launchType:N,runtimeBlockletState:ye,state:ue}),d||a.user&&null===Ce||G()(u))return(0,D.jsx)(w.Z,{relative:"parent",children:(0,D.jsx)(y.Z,{})});if(ue.installError){const e={view:!v&&(0,D.jsx)(de,{className:"bottom-button",component:q.Link,to:"/blocklets/".concat(m,"/overview"),"data-cy":"view-blocklet",color:"primary",variant:"contained",children:n("launchBlocklet.viewApplication")}),retry:(0,D.jsxs)(Be,{children:[Pe&&(0,D.jsx)(de,{variant:"text",className:"bottom-button","data-cy":"go-back",disabled:ue.isConnectOpen,onClick:()=>{window.location.href=Pe},children:n("common.back")}),(0,D.jsxs)(de,{className:"bottom-button","data-cy":"retry-install",disabled:ue.isConnectOpen,onClick:Ne,children:[ue.isConnectOpen&&(0,D.jsx)(y.Z,{size:16}),n("common.retry")]})]})},t=ue.installError.name?ue.installError.name.replace("blocklet.",""):"installFailed";return(0,D.jsx)(Le,{variant:"error",title:P,subTitle:(0,D.jsxs)(Ze,{children:[(0,D.jsx)("div",{children:n("launchBlocklet.error.".concat(t))}),ue.installError.message&&(0,D.jsx)("div",{className:"error-desc",children:n("common.errorMessage")+ue.installError.message})]}),footer:e[ue.installError.action]})}if(be(Ce,ue))return ve("alreadyExists",{status:Ce,state:ue,runtimeBlockletState:ye}),(0,D.jsx)(Le,{variant:"info",title:n("common.reminder"),subTitle:n("launchBlocklet.alreadyExists",{name:(0,C.getDisplayName)({meta:u},!0)}),footer:(0,D.jsxs)("div",{children:[!ue.nextAccessUrl&&(0,D.jsx)(y.Z,{size:16}),ue.nextAccessUrl&&(0,D.jsx)(K.Z,{href:ue.nextAccessUrl,"data-cy":"open-blocklet",children:n("launchBlocklet.redirect")})]})});const Se=!ue.launching&&!Ce;return(0,D.jsxs)(Ee,{children:[(0,D.jsx)("div",{className:"header",children:(0,D.jsx)(H.Z,{title:n(Se?"common.install":"common.installing"),subTitle:Se?n("launchBlocklet.subTitle",{appName:P,serverName:o.name}):""})}),(0,D.jsxs)("div",{className:"body",children:[Se&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{className:"illustrations",children:[(0,D.jsx)("div",{className:"ills-block ills-block-left",children:(0,D.jsxs)("div",{className:"ills-block-inner",children:[(0,D.jsx)(ie.Z,{className:"i-icon",blocklet:{meta:u},blockletMetaUrl:x}),(0,D.jsx)("div",{className:"i-name",children:P})]})}),(0,D.jsx)(X.Z,{className:"arrow-icon"}),(0,D.jsx)("div",{className:"ills-block ills-block-right",children:(0,D.jsxs)("div",{className:"ills-block-inner",children:[(0,D.jsx)("img",{width:"64",height:"64",src:le.Z,alt:""}),(0,D.jsx)("div",{className:"i-name",children:o.name}),(0,D.jsx)(O.Z,{size:12,responsive:!1,compact:!0,did:o.did})]})})]}),ue.loaded&&!Z&&!ue.launching&&(0,D.jsxs)(de,{className:"bottom-button","data-cy":"start-launch",disabled:ue.isConnectOpen,onClick:Ne,children:[ue.isConnectOpen&&(0,D.jsx)(y.Z,{size:16}),n("launchBlocklet.confirmInstall")]})]}),ue.launching&&(0,D.jsxs)(xe.Z,{children:[(0,D.jsx)(U.Z,{increaseSpeed:.3,messageLoop:!1,message:(0,D.jsx)(F.Z,{steps:Re,stepIndex:ue.progressIndex,autoGrowth:4===ue.progressIndex?1e3:4e3})}),[1,2].includes(ue.progressIndex)&&(0,D.jsx)(ge.Z,{appDid:m})]})]}),ue.isConnectOpen&&(0,D.jsx)(ge.Z,{appDid:m,visible:!1}),(0,D.jsx)(Q.Z,{open:ue.isConnectOpen,popup:!0,saveConnect:!1,className:"connect",baseUrl:ue.connectData.baseUrl,action:ue.connectData.action,checkFn:ue.connectData.checkFn,extraParams:ue.connectData.extraParams,checkTimeout:6e5,webWalletUrl:(0,se.yP)(o),onSuccess:async e=>{S.Z.success(n("launchBlocklet.dialog.success"));const t=Array.isArray(e)?e[e.length-1]:e;if(t.sessionToken&&((0,se.ZB)(te(t.sessionToken)),await a.refresh()),t.setupToken&&je(t.setupToken),he({launching:!t.isInstalled,isConnectOpen:!1}),t.appDid){b(t.appDid,t.sessionId);const e=new URL(window.location.href);e.searchParams.set("appDid",t.appDid),e.searchParams.set("sessionId",t.sessionId),window.history.replaceState(null,"",e.toString())}},onClose:()=>he({isConnectOpen:!1}),locale:t,messages:{title:"".concat(n("launchBlocklet.dialog.title")),scan:ke(p,me,n),confirm:n("launchBlocklet.dialog.confirm"),success:n("launchBlocklet.dialog.success")}})]})}const Ee=(0,u.Z)(Z.Z)(ue||(ue=(0,a.Z)(["\n .body {\n align-items: center;\n animation: fadein ease 0.3s;\n }\n\n .illustrations {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: start;\n text-align: center;\n margin-top: 16px;\n margin-bottom: 40px;\n width: 100%;\n }\n\n .ills-block,\n .ills-block-inner {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n flex-shrink: 0;\n flex: 1;\n }\n .ills-block {\n max-width: 220px;\n .i-icon {\n width: 64px;\n height: 64px;\n }\n\n .i-name {\n margin-top: 16px;\n font-weight: 400;\n font-size: 16px;\n color: #222222;\n }\n\n .i-sub-name {\n color: #999999;\n }\n }\n\n .arrow-icon {\n align-self: start;\n color: #c4c5ca;\n font-size: 30px;\n margin: 16px 0 0;\n "," {\n margin: 25px 24px 0;\n }\n }\n\n @keyframes fadein {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n"])),(e=>e.theme.breakpoints.down("md"))),Ze=u.Z.div(he||(he=(0,a.Z)(["\n line-height: 1.4em;\n .error-desc {\n margin-top: 8px;\n word-wrap: break-word;\n color: ",";\n }\n"])),(e=>e.theme.palette.grey[500])),Be=u.Z.div(pe||(pe=(0,a.Z)(["\n display: flex;\n justify-content: space-around;\n flex-wrap: wrap;\n button {\n margin: 0 10px 18px;\n }\n"]))),Le=(0,u.Z)(E.Z)(me||(me=(0,a.Z)(["\n .result-footer {\n height: auto;\n }\n"])));var De,Pe,Ne=t(90845),Me=t(35432),Re=t(32828);function Ie(e){var n;let{onClickNext:t,handleDescEle:l,showPageHeader:o}=e;const a=(0,s.useNavigate)(),[i,r]=(0,_.useState)(null),[c,d]=(0,_.useState)(!1),{t:u}=(0,h.PE)(),{info:p,api:m}=(0,A.h6)(),{loading:g,meta:f,isRunning:x,isInstalled:v,isInstalling:b,appDid:k,isExternal:j}=(0,B.H0)(),[Z,L]=(0,_.useState)(!0),P=(0,_.useMemo)((()=>{if(!j)return"/blocklets/".concat(k,"/overview");if(!i)return"";const e=new URL(i);return"".concat(e.origin).concat(Me.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin")}),[i,j,k]),N=()=>{const e=new URLSearchParams(window.location.search);Z||e.set("onlyRequired","1"),a("/launch-blocklet/install?".concat(e.toString()))},M=t||N;if((0,_.useEffect)((()=>{g||(b?N():(x||v&&j)&&(async()=>{try{d(!0);const{blocklet:e}=await m.getBlocklet({input:{did:f.did,attachRuntimeInfo:!0}}),n=(0,T.A6)({blocklet:e}),t=await(0,se.D)(n);if(!t&&G()(t))return void r(null);r(new URL(t).href)}catch(e){S.Z.error(e.message)}finally{d(!1)}})())}),[x,j,v,b]),v){const e=x?"alreadyRunning":"alreadyInstalled";return(0,D.jsx)(E.Z,{variant:"info",title:u("common.reminder"),subTitle:u("launchBlocklet.".concat(e),{name:(0,C.getDisplayName)({meta:f},!0)}),footer:(0,D.jsxs)(Te,{children:[(0,D.jsx)(de,{loading:!P,"data-cy":"view-blocklet",component:j?void 0:q.Link,to:P,href:P,variant:x?"outlined":"contained",color:"primary",children:u("launchBlocklet.viewApplication")}),x&&(0,D.jsx)(de,{loading:c,className:"last-button",disabled:!i,href:i,"data-cy":"open-blocklet",children:u("common.open")})]})})}return p?(0,Re.default)(f)||null!==f&&void 0!==f&&null!==(n=f.components)&&void 0!==n&&n.length?(0,D.jsxs)(Se,{children:[o&&(0,D.jsx)(H.Z,{title:u("launchBlocklet.introduction"),subTitle:u("launchBlocklet.welcome")}),(0,D.jsx)(Ne.Z,{installRelated:Z,onChangeInstallRelated:L,meta:f,onClickNext:M,handleDescEle:l})]}):(0,D.jsx)(Se,{className:"center",children:(0,D.jsx)(E.Z,{variant:"error",subTitle:u("launchBlocklet.error.resourceBlocklet")})}):(0,D.jsx)(w.Z,{relative:"parent",children:(0,D.jsx)(y.Z,{})})}Ie.defaultProps={onClickNext:null,handleDescEle:"",showPageHeader:!0};const Se=u.Z.div(De||(De=(0,a.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n &.center {\n justify-content: center;\n }\n"]))),Te=u.Z.div(Pe||(Pe=(0,a.Z)(["\n .MuiButton-root {\n "," {\n min-width: 200px;\n }\n }\n .last-button {\n margin-left: ",";\n }\n"])),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.spacing(2)));var ze,Oe,Qe;function Ue(){const e=(0,d.Z)((e=>e.breakpoints.down("md"))),{t:n,locale:t}=(0,h.PE)(),{info:l}=(0,A.h6)(),o=(0,se.yP)(l),{serverUrl:a,fromLauncher:i,meta:u,isFree:C,loading:E,error:Z,storeUrl:L}=(0,B.H0)(),P=r()((0,se.Y5)(),"/launch-blocklet"),N=[{key:"install",name:n("launchBlocklet.steps.installApp"),path:r()(P,"install")},{key:"setup",name:n("setup.steps.launchApp")}];let R=[{key:"agreement",name:n("launchBlocklet.introduction"),path:r()(P,"agreement")},...N];const I=()=>{a&&window.open(a)};let S=(0,D.jsx)(Fe,{className:"".concat(a?"logo-can-click":""),children:(0,D.jsx)(k.Z,{onClick:I,logo:e?(0,D.jsx)(x.Z,{width:"32",height:"32"}):(0,D.jsx)(v.Z,{width:"128",height:"48"})})});i&&(R=[{key:"purchase-space",name:n("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:n("launchBlocklet.steps.prepareSpace")},...N],S=(0,D.jsx)(Fe,{className:"".concat(a?"logo-can-click":""),children:(0,D.jsx)(k.Z,{logo:e?(0,D.jsx)(x.Z,{onClick:I,width:"32",height:"32"}):(0,D.jsx)(v.Z,{onClick:I,width:"128",height:"48"}),previousData:{logo:e?(0,D.jsx)(f.Z,{width:"32",height:"32"}):(0,D.jsx)(b.Z,{width:"145",height:"48"})}})}));const T={meta:u,isFree:C};return(0,D.jsx)(m.W,{steps:R,children:(0,D.jsx)(p.Z,{locale:t,loading:E,blockletMeta:{...u,isFree:C},useOfSkeleton:!1,navLogo:S,headerEndAddons:(0,D.jsx)(g.Z,{webWalletUrl:o,SessionContext:ae.B3}),pcWidth:"80%",style:{height:"100%"},logoUrl:u&&u.logo?(0,se.aZ)({did:u.did,baseUrl:L,logoPath:u.logo}):null,children:(0,D.jsxs)(He,{children:[(0,D.jsx)(c.Global,{styles:Je}),E&&(0,D.jsx)(w.Z,{relative:"parent",children:(0,D.jsx)(y.Z,{})}),!E&&Z&&(0,D.jsx)(w.Z,{relative:"parent",children:(0,D.jsx)(j.Z,{style:{wordBreak:"break-all"},variant:"icon",type:"error",children:Z})}),!E&&!Z&&(0,D.jsxs)(s.Routes,{children:[(0,D.jsx)(s.Route,{path:"agreement",element:(0,D.jsx)(Ie,{})}),(0,D.jsx)(s.Route,{path:"install",element:(0,D.jsx)(Ce,{})}),(0,D.jsx)(s.Route,{path:"complete",element:(0,D.jsx)(M,{blocklet:T})}),(0,D.jsx)(s.Route,{path:"*",element:(0,D.jsx)(s.Navigate,{to:"agreement".concat(window.location.search),replace:!0})})]})]})})})}const Je=(0,c.css)(ze||(ze=(0,a.Z)(["\n html,\n body,\n #root,\n #root > .wrapper {\n height: 100%;\n }\n"]))),He=u.Z.div(Oe||(Oe=(0,a.Z)(["\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: flex-start;\n\n .bottom-button {\n min-width: 200px;\n }\n"]))),Fe=u.Z.div(Qe||(Qe=(0,a.Z)(["\n margin-top: -1px;\n &.logo-can-click {\n cursor: pointer;\n }\n"])))},90845:(e,n,t)=>{t.d(n,{Z:()=>B});var l=t(71171),o=t(55898),a=t.n(o),s=t(85493),i=t(33518),r=t(68420),c=t(40265),d=t(54336),u=t(55498),h=t(39948),p=t(26174),m=t(88092),g=t(67680),f=t(5057),x=t(35432),v=t(96266);function b(e){let{...n}=e;return(0,v.jsxs)("div",{...n,style:{width:"100%"},children:[(0,v.jsx)("h3",{children:"End User License Agreement for Application"}),(0,v.jsxs)("p",{children:["Blocklet Server License Agreement ",x.COPYRIGHT_OWNER," version 2020-08-28"]}),(0,v.jsx)("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),(0,v.jsx)("p",{children:"\u6682\u65e0"})]})}var k=t(13128),y=t(15715);function j(e){var n,t,l,o;return"".concat((null===(n=e.bundleSource)||void 0===n?void 0:n.store)||e.meta.homepage,"/assets/").concat(null===(t=e.meta)||void 0===t?void 0:t.did,"/").concat((null===(l=e.meta)||void 0===l?void 0:l.logo)||"logo.png","?v=").concat(null===(o=e.meta)||void 0===o?void 0:o.version)}function w(e){let{installRelated:n,meta:t,show:l,onClose:o,components:a,loading:s}=e;const{t:i}=(0,r.PE)(),c=(0,y.Z)((e=>e.breakpoints.down("md")));if(!l)return null;const d=!s&&0===a.length,p=!s&&0!==a.length;return(0,v.jsxs)(k.ZP,{title:i("blocklet.component.relatedComponents",{name:t.title}),maxWidth:!1,fullWidth:!1,onClose:(e,n)=>{"backdropClick"!==n&&o(!1)},PaperProps:{style:c?{width:"100%",height:window.innerHeight}:{maxWidth:500,minWidth:300,width:"80%"}},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:[s&&(0,v.jsx)(h.Z,{sx:{marginTop:4,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:(0,v.jsx)(h.Z,{sx:{fontSize:32},color:"primary.main",component:u.JO,icon:"line-md:loading-loop"})}),d&&(0,v.jsx)(h.Z,{sx:{textAlign:"center"},children:i("blocklet.component.noDependencies",{name:t.title})}),p&&(0,v.jsx)(h.Z,{sx:{marginBottom:2},children:a.map((e=>{if(!e.meta)return null;const{required:t}=e;let l;return l=n||t?1:.5,(0,v.jsxs)(h.Z,{sx:{opacity:l,padding:"10px 0px",paddingBottom:.5,marginTop:0,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[(0,v.jsx)("img",{style:{width:40,height:40,minWidth:40,minHeight:40},src:j(e),alt:e.meta.title}),(0,v.jsxs)(h.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",flex:1,marginLeft:2},children:[(0,v.jsxs)(h.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var n;window.open("".concat((null===(n=e.bundleSource)||void 0===n?void 0:n.store)||e.meta.homepage,"/blocklets/").concat(e.meta.did),"_blank")},children:[e.meta.title,(0,v.jsx)(h.Z,{sx:{display:t?"inline-block":"none",fontSize:"12px",fontWeight:"bold",marginLeft:1},children:i("blocklet.component.required")}),(0,v.jsxs)(h.Z,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[e.meta.version,(0,v.jsx)(h.Z,{className:"link-icon",icon:"fluent:open-20-filled",component:u.JO,sx:{color:"primary.main",fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.1s"}})]})]}),(0,v.jsx)(h.Z,{sx:{marginTop:0,opacity:.7},children:e.meta.description})]})]},e.meta.did)}))})]})}w.propTypes={meta:a().object,show:a().bool,onClose:a().func.isRequired,installRelated:a().func,components:a().array.isRequired,loading:a().bool.isRequired},w.defaultProps={meta:null,show:!1,installRelated:!1};var A=t(15849),C=t(22324);const E=function(e){const{api:n}=(0,C.h6)(),[t]=(0,A.useSearchParams)(),l=t.get("blocklet_meta_url")||function(e){return e&&(e.registryUrl||e.homepage)&&e.did?"".concat(e.registryUrl||e.homepage,"/api/blocklets/").concat(null===e||void 0===e?void 0:e.did,"/blocklet.json"):""}(e),[o,a]=(0,f.useState)([]),[s,i]=(0,f.useState)(!1);return(0,f.useEffect)((()=>{!l||null!==e&&void 0!==e&&e.inputUrl||(i(!0),n.getDynamicComponents({input:{url:l}}).then((e=>{a(e.components)})).finally((()=>{i(!1)})))}),[l]),{components:o,loading:s}};var Z;function B(e){let{installRelated:n,onChangeInstallRelated:t,meta:l,onClickNext:o,handleDescEle:a}=e;const i=(0,s.useNavigate)(),{t:x,locale:k}=(0,r.PE)(),[y,j]=(0,f.useState)(!1),{components:A,loading:C}=E(l),Z=o||(()=>{i("/launch-blocklet/install".concat(window.location.search))});return(0,v.jsxs)(L,{children:[(0,v.jsx)("div",{className:"app-content",children:(0,v.jsx)("div",{className:"agreement",children:(0,v.jsx)("div",{className:"agreement-content",children:(0,v.jsx)(d.Z,{blockletMeta:{data:l},locale:k,handleDescEle:a})})})}),(0,v.jsxs)(h.Z,{className:"agreement-bottom",sx:{"> .agreement-loading":{color:"primary.main"}},children:[C?(0,v.jsx)(u.JO,{className:"agreement-loading",icon:"line-md:loading-loop",style:{fontSize:42,transform:"scale(0.6)"}}):null,t&&null!==A&&void 0!==A&&A.length?(0,v.jsxs)(h.Z,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[(0,v.jsx)(p.Z,{sx:{mr:.5},checked:n,onChange:e=>t(e.currentTarget.checked),control:(0,v.jsx)(m.Z,{}),label:(0,v.jsx)("span",{children:x("launchBlocklet.installRelatedComponents")})}),(0,v.jsx)(h.Z,{sx:{"> button svg":{color:"primary.main"}},children:(0,v.jsx)(g.Z,{size:"small",onClick:()=>{j(!0)},children:(0,v.jsx)(u.JO,{icon:"octicon:package-dependencies-16"})})})]}):null,(0,v.jsx)("div",{className:"button-container","data-cy":"agree-all",children:(0,v.jsx)(c.Z,{onContinue:Z,description:(0,v.jsx)(b,{}),texts:{listenName:x("launchBlocklet.license"),buttonNext:x("launchBlocklet.next")}})})]}),(0,v.jsx)(w,{installRelated:n,meta:l,show:y,onClose:()=>{j(!1)},components:A,loading:C})]})}B.propTypes={meta:a().object.isRequired,onClickNext:a().func,handleDescEle:a().node,installRelated:a().bool,onChangeInstallRelated:a().func},B.defaultProps={onClickNext:null,handleDescEle:"",installRelated:!0,onChangeInstallRelated:null};const L=i.Z.div(Z||(Z=(0,l.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n flex: 1;\n .app-content {\n padding: 2px 24px 24px;\n "," {\n padding-top: 10px;\n }\n width: 100%;\n flex: 1;\n letter-spacing: normal;\n }\n .agreement {\n position: relative;\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n border: 1px solid ",";\n border-radius: 12px;\n "," {\n margin-top: 24px;\n }\n "," {\n margin-top: 16px;\n }\n .agreement-content {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n font-size: 14px;\n overflow-y: auto;\n "," {\n padding: 0 24px;\n }\n "," {\n padding: 0 16px;\n }\n &:after {\n display: block;\n content: '';\n height: 24px;\n }\n }\n }\n .agreement-bottom {\n display: flex;\n width: 100%;\n padding: 24px;\n "," {\n flex-direction: row;\n align-items: center;\n margin-left: auto;\n }\n "," {\n flex-direction: column;\n align-items: center;\n padding-top: 0;\n padding-bottom: 16px;\n }\n }\n .button-container {\n "," {\n margin-left: auto;\n }\n "," {\n padding-top: 0;\n padding-bottom: 16px;\n }\n }\n"])),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.palette.grey[100]),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")))},94494:(e,n,t)=>{t.d(n,{Z:()=>c});var l,o=t(71171),a=t(33518),s=t(55898),i=t.n(s),r=t(96266);function c(e){let{children:n,...t}=e;return(0,r.jsx)(d,{...t,children:n})}c.propTypes={children:i().any.isRequired};const d=a.Z.div(l||(l=(0,o.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n height: 100%;\n\n .header {\n text-align: center;\n }\n\n .body {\n display: flex;\n flex-direction: column;\n align-items: center;\n margin-top: 30px;\n width: 100%;\n min-height: 200px;\n flex: 1;\n\n "," {\n padding: 24px;\n }\n\n "," {\n padding: 0 16px 16px;\n }\n }\n\n .footer {\n display: flex;\n justify-content: center;\n\n "," {\n padding-bottom: 34px;\n }\n\n "," {\n margin-top: auto;\n padding-bottom: 10px;\n }\n }\n"])),(e=>e.theme.breakpoints.up("md")),(e=>e.theme.breakpoints.down("md")),(e=>e.theme.breakpoints.up("sm")),(e=>e.theme.breakpoints.down("md")))},12332:(e,n,t)=>{t.d(n,{Z:()=>d});var l,o,a=t(71171),s=t(55898),i=t.n(s),r=t(33518),c=t(96266);function d(e){let{logo:n,name:t,subname:l,previousData:o,...a}=e,s=(0,c.jsx)(u,{logo:n}),i=t,r=l;return o.logo&&(s=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,{logo:n,className:"left-fade-in-ele"}),(0,c.jsx)(u,{logo:o.logo,className:"postion-abs left-fade-out-ele"})]})),o.name&&o.name!==t&&(i=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"right-fade-in-ele",style:{display:"inline-block"},children:t}),(0,c.jsx)("span",{className:"postion-abs right-fade-out-ele",children:o.name})]})),o.subname&&o.subname!==l&&(r=(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"right-fade-in-ele",style:{display:"inline-block"},children:l}),(0,c.jsx)("span",{className:"postion-abs right-fade-out-ele",children:o.subname})]})),(0,c.jsx)(p,{...a,children:(0,c.jsxs)("div",{className:"logo-inner",children:[(0,c.jsx)("div",{className:"logo-img-content",children:s}),(0,c.jsxs)("div",{className:"logo-info ".concat(t||l?"":"zero-left"),children:[(0,c.jsx)("div",{className:"logo-name",children:i}),(0,c.jsx)("div",{className:"logo-subname",children:r})]})]})})}function u(e){let{logo:n,...t}=e;return(0,c.jsx)(h,{...t,children:n})}d.propTypes={logo:i().element.isRequired,name:i().string,subname:i().string,previousData:i().object},d.defaultProps={name:"",subname:"",previousData:{logo:"",name:"",subname:""}};const h=r.Z.div(l||(l=(0,a.Z)(["\n display: block;\n > * {\n display: block;\n }\n"]))),p=r.Z.div(o||(o=(0,a.Z)(["\n position: relative;\n display: block;\n\n .logo-inner {\n display: flex;\n align-items: center;\n height: 100%;\n .logo-img-content {\n position: relative;\n display: block;\n }\n .logo-info {\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-left: 10px;\n letter-spacing: 0.1px;\n &.zero-left {\n margin-left: 0%;\n }\n .logo-name {\n position: relative;\n line-height: 16px;\n font-size: 16px;\n color: #121319;\n }\n .logo-subname {\n position: relative;\n line-height: 13px;\n font-size: 13px;\n color: #7d8085;\n }\n }\n }\n\n .postion-abs {\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n }\n\n .right-fade-out-ele {\n animation: right-fade-out ease 0.5s;\n animation-delay: 2s;\n animation-fill-mode: forwards;\n }\n\n .right-fade-in-ele {\n animation: right-fade-in ease 0.5s;\n animation-delay: 2s;\n animation-fill-mode: both;\n }\n\n @keyframes right-fade-out {\n 0% {\n opacity: 1;\n transform: translate(0, 0);\n }\n 100% {\n opacity: 0;\n transform: translate(8px, 0);\n }\n }\n\n @keyframes right-fade-in {\n 0% {\n opacity: 0;\n transform: translate(8px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate(0, 0);\n }\n }\n\n .left-fade-out-ele {\n animation: left-fade-out ease 0.5s;\n animation-delay: 2s;\n animation-fill-mode: forwards;\n }\n\n .left-fade-in-ele {\n animation: left-fade-in ease 0.5s;\n animation-delay: 2s;\n animation-fill-mode: both;\n }\n\n @keyframes left-fade-out {\n 0% {\n opacity: 1;\n transform: translate(0, 0);\n }\n 100% {\n opacity: 0;\n transform: translate(-8px, 0);\n }\n }\n\n @keyframes left-fade-in {\n 0% {\n opacity: 0;\n transform: translate(-8px, 0);\n }\n 100% {\n opacity: 1;\n transform: translate(0, 0);\n }\n }\n"])))},80676:(e,n,t)=>{t.d(n,{hi:()=>a,od:()=>o.a});var l=t(10458),o=t.n(l);o().defaults.timeout=1e4;const a=o().create()},28864:(e,n,t)=>{n.Z=void 0;(l=t(5057))&&l.__esModule;var l,o=t(96266);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function i(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,n||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var r=function(e){return(0,o.jsxs)("svg",s(s({},e),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M80.005 25.994V10h7.737a3.79 3.79 0 0 1 3.79 3.79v1.149a3.777 3.777 0 0 1-1.035 2.602 3.788 3.788 0 0 1 1.901 3.286v1.377a3.79 3.79 0 0 1-3.79 3.79h-8.603zm1.684-8.957h6.226a2.105 2.105 0 0 0 1.932-2.098v-1.15a2.105 2.105 0 0 0-2.105-2.105h-6.053v5.353zm0 7.273v-5.582l6.92-.007c1.163 0 2.105.943 2.105 2.106v1.377a2.105 2.105 0 0 1-2.105 2.106h-6.92zM97.255 10v15.994h-1.762V10h1.762zm8.733 4.319h-1.827a3.81 3.81 0 0 0-3.811 3.81v4.054a3.81 3.81 0 0 0 3.811 3.81h1.827a3.811 3.811 0 0 0 3.811-3.81V18.13a3.811 3.811 0 0 0-3.811-3.81zm-1.827 1.762a2.05 2.05 0 0 0-2.049 2.048v4.054a2.05 2.05 0 0 0 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049V18.13a2.048 2.048 0 0 0-2.048-2.048h-1.827zM125.204 26v-5.754h2.148L130.674 26h2.035l-3.821-6.618 2.993-5.184h-2.035l-2.474 4.286h-2.168V10h-1.762v16h1.762zm-5.556-7.56v-.31a2.048 2.048 0 0 0-2.048-2.05h-1.827a2.048 2.048 0 0 0-2.049 2.05v4.053c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.312h-1.762zm17.918 7.554V10h-1.762v15.994h1.762zm4.989-5.357v1.546c0 1.132.917 2.049 2.049 2.049h1.827a2.048 2.048 0 0 0 2.048-2.049v-.311h1.762v.311a3.81 3.81 0 0 1-3.81 3.81h-1.827a3.81 3.81 0 0 1-3.811-3.81V18.13a3.81 3.81 0 0 1 3.811-3.81h1.827a3.81 3.81 0 0 1 3.81 3.81v.746h.001v1.762h-7.687zm5.924-1.762h-5.924v-.746c0-1.131.917-2.048 2.049-2.048h1.827c1.131 0 2.048.917 2.048 2.048v.746zm5.489-1.912H152.4v-1.762h1.568v-2.848h1.684v2.848h4.077v1.762h-4.077v5.677a1.669 1.669 0 1 0 3.339 0v-.35h1.684v.35a3.353 3.353 0 1 1-6.707 0v-5.677z",fill:"#121319"}),(0,o.jsx)("path",{d:"M92.112 50.259v3.108H80.254V33.123h3.766v17.136h8.092zM101.843 47.235c-.999.047-1.839.135-2.52.266-.681.121-1.227.28-1.638.476-.41.196-.705.425-.882.686a1.49 1.49 0 0 0-.266.854c0 .606.177 1.04.532 1.302.364.261.835.392 1.414.392.71 0 1.32-.126 1.834-.378.523-.261 1.031-.654 1.526-1.176v-2.422zm-7.924-6.23c1.652-1.512 3.64-2.268 5.964-2.268.84 0 1.591.14 2.254.42.663.27 1.223.653 1.68 1.148a4.765 4.765 0 0 1 1.036 1.75c.243.681.364 1.428.364 2.24v9.072h-1.568c-.327 0-.579-.047-.756-.14-.177-.103-.317-.303-.42-.602l-.308-1.036c-.364.327-.719.616-1.064.868a6.54 6.54 0 0 1-1.078.616 5.498 5.498 0 0 1-1.204.378c-.42.093-.887.14-1.4.14-.607 0-1.167-.08-1.68-.238a3.775 3.775 0 0 1-1.33-.742 3.297 3.297 0 0 1-.868-1.218c-.206-.486-.308-1.05-.308-1.694a3.308 3.308 0 0 1 .77-2.114 5.12 5.12 0 0 1 1.078-.924c.438-.29.975-.541 1.61-.756a13.74 13.74 0 0 1 2.24-.518c.85-.14 1.82-.224 2.912-.252v-.84c0-.962-.205-1.67-.616-2.128-.411-.467-1.003-.7-1.778-.7-.56 0-1.027.065-1.4.196-.364.13-.686.28-.966.448-.28.159-.537.303-.77.434-.224.13-.476.196-.756.196-.243 0-.448-.06-.616-.182a1.67 1.67 0 0 1-.406-.448l-.616-1.106zM120.85 39.003v14.364h-2.114c-.458 0-.747-.21-.868-.63l-.238-1.148a7.862 7.862 0 0 1-1.946 1.456c-.71.364-1.545.546-2.506.546-.784 0-1.48-.13-2.086-.392a4.236 4.236 0 0 1-1.512-1.134 5.016 5.016 0 0 1-.938-1.722 7.52 7.52 0 0 1-.308-2.212v-9.128h3.458v9.128c0 .877.2 1.559.602 2.044.41.476 1.022.714 1.834.714.597 0 1.157-.13 1.68-.392a6.037 6.037 0 0 0 1.484-1.106V39.003h3.458zM127.512 40.767c.29-.29.593-.556.91-.798a5.623 5.623 0 0 1 2.184-1.036 5.542 5.542 0 0 1 1.344-.154c.784 0 1.48.135 2.086.406a3.957 3.957 0 0 1 1.512 1.12 4.69 4.69 0 0 1 .924 1.722c.215.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.2-1.554-.602-2.03-.401-.486-1.012-.728-1.834-.728-.597 0-1.157.135-1.68.406-.522.27-1.017.64-1.484 1.106v10.388h-3.458V39.003h2.114c.448 0 .742.21.882.63l.238 1.134zM150.373 42.04c-.103.132-.205.234-.308.309-.093.075-.233.112-.42.112a.982.982 0 0 1-.518-.154 9.315 9.315 0 0 0-.602-.364 3.902 3.902 0 0 0-.84-.364c-.317-.112-.714-.168-1.19-.168-.607 0-1.139.112-1.596.336-.457.215-.84.527-1.148.938-.299.41-.523.91-.672 1.498-.149.578-.224 1.236-.224 1.974 0 .765.079 1.447.238 2.044.168.597.406 1.101.714 1.512.308.401.681.71 1.12.924.439.205.933.308 1.484.308.551 0 .994-.066 1.33-.196.345-.14.635-.29.868-.448.233-.168.434-.318.602-.448a.925.925 0 0 1 .588-.21c.28 0 .49.107.63.322l.994 1.26a6.449 6.449 0 0 1-1.246 1.134 7.144 7.144 0 0 1-1.4.728 7.208 7.208 0 0 1-1.484.378 10.3 10.3 0 0 1-1.512.112 6.448 6.448 0 0 1-2.506-.49 6 6 0 0 1-2.058-1.456c-.588-.635-1.055-1.41-1.4-2.324-.336-.924-.504-1.974-.504-3.15 0-1.055.149-2.03.448-2.926.308-.906.756-1.685 1.344-2.338a6.09 6.09 0 0 1 2.184-1.554c.868-.373 1.867-.56 2.996-.56 1.073 0 2.011.172 2.814.518.812.345 1.54.84 2.184 1.484l-.91 1.26zM157.049 40.543a7.51 7.51 0 0 1 1.848-1.274c.672-.327 1.46-.49 2.366-.49.784 0 1.479.135 2.086.406.606.261 1.11.634 1.512 1.12.41.476.718 1.05.924 1.722.214.663.322 1.395.322 2.198v9.142h-3.458v-9.142c0-.878-.201-1.554-.602-2.03-.402-.486-1.013-.728-1.834-.728-.598 0-1.158.135-1.68.406-.523.27-1.018.64-1.484 1.106v10.388h-3.458V32.563h3.458v7.98zM178.649 44.533a3.95 3.95 0 0 0-.196-1.26 2.908 2.908 0 0 0-.559-1.05 2.562 2.562 0 0 0-.967-.7c-.382-.178-.83-.266-1.343-.266-.999 0-1.788.285-2.367.854-.569.57-.933 1.377-1.091 2.422h6.523zm-6.593 2.086c.056.737.186 1.377.392 1.918.205.532.475.975.811 1.33.336.345.733.607 1.191.784.466.168.98.252 1.54.252s1.04-.066 1.442-.196c.41-.13.765-.276 1.063-.434.308-.159.575-.304.799-.434.233-.13.457-.196.671-.196.29 0 .504.107.644.322l.995 1.26a5.93 5.93 0 0 1-1.289 1.134 7.641 7.641 0 0 1-1.498.728 8.291 8.291 0 0 1-1.581.378c-.532.074-1.05.112-1.554.112a7.766 7.766 0 0 1-2.786-.49 6.352 6.352 0 0 1-2.24-1.47c-.635-.653-1.134-1.456-1.498-2.408-.364-.962-.546-2.072-.546-3.332 0-.98.158-1.9.476-2.758.317-.868.77-1.62 1.358-2.254a6.462 6.462 0 0 1 2.17-1.526c.858-.373 1.824-.56 2.898-.56.905 0 1.74.144 2.506.434a5.41 5.41 0 0 1 1.973 1.274c.551.55.981 1.232 1.289 2.044.317.803.475 1.722.475 2.758 0 .523-.055.877-.167 1.064-.112.177-.327.266-.644.266h-8.89zM187.615 41.495c.448-.859.98-1.53 1.596-2.016.616-.495 1.344-.742 2.184-.742.662 0 1.194.145 1.596.434l-.224 2.59c-.047.168-.117.29-.21.364a.558.558 0 0 1-.35.098c-.14 0-.35-.023-.63-.07a4.704 4.704 0 0 0-.798-.07c-.383 0-.724.056-1.022.168-.299.112-.57.275-.812.49a3.359 3.359 0 0 0-.63.756c-.178.298-.346.64-.504 1.022v8.848h-3.458V39.003h2.03c.354 0 .602.065.742.196.14.121.233.345.28.672l.21 1.624z",fill:"#121319"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 10.642L30.72 0 12.288 10.642v14.152L0 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L61.44 53.172V31.89l-12.288-7.095V10.642zM59.52 32.997l-12.288-7.094V11.75L30.72 2.217 14.208 11.75v14.153L1.92 32.997v19.067l16.512 9.533L30.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_416)"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49.152 24.83L30.72 14.19 12.288 24.831v21.283L30.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L30.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L28.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L37.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_416)"}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("linearGradient",{id:"paint0_linear_615_416",x1:"30.72",y1:"95.721",x2:"94.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,o.jsxs)("linearGradient",{id:"paint1_linear_615_416",x1:"27.437",y1:"99.246",x2:"97.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};r.defaultProps={width:"193",height:"64",viewBox:"0 0 193 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.displayName="launcher-logo";n.Z=r},15959:(e,n,t)=>{n.Z=void 0;(l=t(5057))&&l.__esModule;var l,o=t(96266);function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);n&&(l=l.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,l)}return t}function s(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){i(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function i(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,n||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:String(n)}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var r=function(e){return(0,o.jsxs)("svg",s(s({},e),{},{children:[(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.642L31.72 0 13.288 10.642v14.152L1 31.89v21.283l18.432 10.642 12.258-7.077.03.017.03-.017 12.258 7.077L62.44 53.172V31.89l-12.288-7.095V10.642zM60.52 32.997l-12.288-7.094V11.75L31.72 2.217 15.208 11.75v14.153L2.92 32.997v19.067l16.512 9.533L31.69 54.52l.03.017.03-.017 12.258 7.077 16.512-9.533V32.997z",fill:"url(#paint0_linear_615_428)"}),(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 24.83L31.72 14.19 13.288 24.831v21.283L31.72 56.756l18.432-10.642V24.831zm-34.944 1.11l16.512-9.534 16.512 9.533v19.067L31.72 54.539l-16.512-9.533V25.939zm14.52-3.756l.484.284 12.202 7.142 1.073.61V40.4l-.408.287-.461.32-12.89 7.545-7.743-4.503.02-17.35 7.722-4.516zm-5.822 20.762l.017-15.145 5.804-3.393 11.728 6.866.112.063v8.066L29.725 46.33l-5.819-3.384zm4.04-12.717l1.442-.827L38.2 34.53v1.66l-8.845 5.146-1.443-.833.034-10.273zm7.862 5.133l-5.971 3.474.023-6.935 5.948 3.46z",fill:"url(#paint1_linear_615_428)"}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("linearGradient",{id:"paint0_linear_615_428",x1:"31.72",y1:"95.721",x2:"95.488",y2:"34.325",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]}),(0,o.jsxs)("linearGradient",{id:"paint1_linear_615_428",x1:"28.437",y1:"99.246",x2:"98.761",y2:"44.937",gradientUnits:"userSpaceOnUse",children:[(0,o.jsx)("stop",{stopColor:"#0FA4B7"}),(0,o.jsx)("stop",{offset:".495",stopColor:"#1DC1C7"}),(0,o.jsx)("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]}))};r.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r.displayName="launcher-logo-notext";n.Z=r}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 1697.bb3daf90.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_abtnode_webapp=self.webpackChunk_abtnode_webapp||[]).push([[1697],{87806:(e,t,i)=>{"use strict";t.Z=void 0;(o=i(5057))&&o.__esModule;var o,n=i(96266);function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,o)}return i}function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){s(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function s(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var o=i.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var l=function(e){return(0,n.jsx)("svg",a(a({},e),{},{children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10a6.75 6.75 0 1 1 13.5 0 6.75 6.75 0 0 1-13.5 0zM10 1.75a8.25 8.25 0 1 0 0 16.5 8.25 8.25 0 0 0 0-16.5zM8.03 6.97a.75.75 0 0 0-1.06 1.06l5 5a.75.75 0 1 0 1.06-1.06l-5-5z"})}))};l.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},l.displayName="revoke";t.Z=l},91697:(e,t,i)=>{"use strict";i.d(t,{qY:()=>I,YZ:()=>Ce});i(1192),i(2484),i(5873),i(79787);var o=i(96266),n=i(47220),r=i(76223),a=i(68420),s=i(11337),l=i(43907),c=i(55498),d=i(13727),u=i(72113),p=i(7469),m=i(25228),f=i(39948),b=i(67680),E=i(99360),w=i(55898),h=i.n(w),v=i(5057),g=i(56556);function _(e){let{optionalComponent:t,index:i,installStatus:n,hasPermission:a,t:s}=e;const l="stopped"===n||"running"===n;return(0,o.jsxs)(f.Z,{children:[0===i?null:(0,o.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,o.jsxs)(f.Z,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[(0,o.jsx)("img",{style:{width:60,height:60,minWidth:60,minHeight:60},src:t.logoUrl,alt:t.meta.title}),(0,o.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[(0,o.jsxs)(f.Z,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var e;return null===(e=t.meta)||void 0===e||e.did,void window.open(null===t||void 0===t?void 0:t.storeUrl,"_blank")},children:[t.meta.title,(0,o.jsxs)(f.Z,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[t.meta.version,(0,o.jsx)(c.JO,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:r.E.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),(0,o.jsx)(f.Z,{sx:{marginTop:0,opacity:.7},children:t.meta.description}),(0,o.jsx)(f.Z,{sx:{display:a?"flex":"none",flexDirection:"row",gap:1},children:n?(0,o.jsx)(f.Z,{sx:{marginTop:2,opacity:.7},children:l?(0,o.jsx)(g.Z,{variant:"contained",onClick:()=>{window.location.reload()},children:s("componentInstallerRefresh")},"refresh"):(0,o.jsx)(g.Z,{disabled:!0,sx:{color:"#333"},startIcon:(0,o.jsx)(c.JO,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:n},"status")}):(0,o.jsx)(g.Z,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var e;return null===(e=t.meta)||void 0===e||e.did,void window.open(null===t||void 0===t?void 0:t.installUrl,"_blank")},children:s("componentInstallerInstall")},"install")}),l?(0,o.jsx)(f.Z,{sx:{marginTop:2,opacity:.7},children:s("componentInstallerSuccessInstalled")}):null]})]})]})}_.propTypes={t:h().func.isRequired,optionalComponent:h().object.isRequired,index:h().number.isRequired,installStatus:h().string,hasPermission:h().bool.isRequired},_.defaultProps={installStatus:""};const T={zh:{componentInstallerTitle:"\u7f3a\u5c11\u7ec4\u4ef6",componentInstallerInstall:"\u5b89\u88c5",componentInstallerClose:"\u5173\u95ed",componentInstallerRefresh:"\u91cd\u8f7d\u9875\u9762",componentInstallerSuccessInstalled:"\u5b89\u88c5\u6210\u529f\uff0c\u8bf7\u91cd\u8f7d\u9875\u9762\u67e5\u770b\u53d8\u5316\u3002",componentInstallerSuggestions:"\u8bf7\u8054\u7cfb\u7cfb\u7edf\u7ba1\u7406\u5458\u5b89\u88c5\u8be5\u7ec4\u4ef6\u3002",componentInstallerNoDefinedInBlockletYML:"\u7ec4\u4ef6\u672a\u5728 blocklet.yml \u4e2d\u5b9a\u4e49"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}};var x=i(74958),S=i(2842);const O=e=>"string"===typeof e?new Set(e.split(";;")):new Set(e);const R=function(e){let{did:t,onInstalled:i,onError:o}=e;const n=Array.isArray(t)?t.join(";;"):t,[r,a]=(0,v.useState)({}),s=(0,v.useRef)({onInstalled:i,onError:o});s.current={onInstalled:i,onError:o};const{optionalComponents:l,componentMountPoints:c}=window.blocklet,d=(0,v.useMemo)((()=>{var e;if(!l||!l.length)return[];const t=O(n),i=l.filter((e=>t.has(e.meta.did)));return null===(e=i?s.current.onError:s.current.onInstalled)||void 0===e||e(i),i}),[n,l]),u=(0,v.useMemo)((()=>{if(d.length)return!0;const e=O(n);return(c||[]).find((t=>e.has(t.did)))}),[d,c,n]);return d.forEach((e=>{e.storeUrl=(0,S.xn)(e.meta.homepage,"blocklets",e.meta.did),e.installUrl=(0,S.xn)(window.blocklet.appUrl,x.Bu,"/admin/components?install-component=".concat(e.meta.did))})),(0,v.useEffect)((()=>{const e=e=>{var t,i;if(e.origin===window.blocklet.appUrl&&"component-installer"===(null===(t=e.data)||void 0===t?void 0:t.kind)&&null!==(i=e.data)&&void 0!==i&&null!==(i=i.blocklet)&&void 0!==i&&i.children){var o;let t=!1;const i=O(n);null===(o=e.data)||void 0===o||null===(o=o.blocklet)||void 0===o||o.children.forEach((e=>{var o;i.has(null===(o=e.meta)||void 0===o?void 0:o.did)&&(t=!0,a((t=>{var i;return{...t,[null===(i=e.meta)||void 0===i?void 0:i.did]:e.status||"waiting"}})))})),t||a({})}};return window.addEventListener("message",e),()=>{window.removeEventListener("message",e)}}),[n]),{optComponents:d,installed:!d.length&&u,installStatus:r,setInstallStatus:a,definedInBlockletYML:u}};function y(e){let{warnIcon:t,did:i,noPermissionMute:w,onInstalled:h,onError:g,children:x,closeByOutSize:S,onClose:O,fallback:y,disabled:I,roles:k=["owner","admin"]}=e;const{locale:N}=(0,a.PE)(),A=(0,E.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.I)(T,e,N,"en",t)})),{installed:L,optComponents:C,installStatus:P,definedInBlockletYML:D}=R({did:i,onInstalled:h,onError:g}),j=(0,v.useContext)(n.B3),M=()=>{null===O||void 0===O||O(!1)};return I?x:(0,o.jsx)(l.Z,{session:null===j||void 0===j?void 0:j.session,roles:k,children:e=>{let{hasPermission:n}=e;return L?x:w&&!n?y||null:"function"===typeof x?(0,o.jsxs)(o.Fragment,{children:[y,x({hasPermission:n,optComponents:C,installStatus:P})]}):(0,o.jsxs)(o.Fragment,{children:[y,(0,o.jsx)(u.d,{onClickAway:e=>{e.preventDefault(),e.stopPropagation(),S&&M()},children:(0,o.jsx)(p.Z,{in:!0,timeout:350,children:(0,o.jsx)(m.Z,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:r.E.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:"0px 8px 16px 0px ".concat(r.E.gray6,", 0px 0px 0px 1px ").concat(r.E.gray6)},children:D?(0,o.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,o.jsxs)(f.Z,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[t||(0,o.jsx)(c.JO,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),(0,o.jsx)(f.Z,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:A("componentInstallerTitle")}),(0,o.jsx)(f.Z,{sx:{flex:1}}),O?(0,o.jsx)(b.Z,{variant:"outlined",className:"button",onClick:M,children:(0,o.jsx)(d.default,{})}):null]}),(0,o.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,o.jsx)(f.Z,{sx:{maxHeight:"70vh",overflowY:"auto"},children:C.map(((e,t)=>{var i,r;return(0,o.jsx)(_,{t:A,hasPermission:n,index:t,optionalComponent:e,installStatus:P[null===(i=e.meta)||void 0===i?void 0:i.did]},(null===(r=e.meta)||void 0===r?void 0:r.did)||t)}))}),n?null:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,o.jsx)(f.Z,{sx:{padding:"20px 24px"},children:(0,o.jsx)(f.Z,{sx:{opacity:1},children:A("componentInstallerSuggestions")})})]})]}):(0,o.jsxs)(f.Z,{sx:{display:"flex",flexDirection:"column"},children:[(0,o.jsxs)(f.Z,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[t||(0,o.jsx)(c.JO,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),(0,o.jsx)(f.Z,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:A("componentInstallerTitle")}),(0,o.jsx)(f.Z,{sx:{flex:1}}),O?(0,o.jsx)(b.Z,{variant:"outlined",className:"button",onClick:M,children:(0,o.jsx)(d.default,{})}):null]}),(0,o.jsx)(f.Z,{sx:{width:"100%",height:"1px",backgroundColor:r.E.gray6}}),(0,o.jsxs)(f.Z,{sx:{padding:"20px 24px",marginTop:0},children:[A("componentInstallerNoDefinedInBlockletYML"),": ",i]})]})})})})]})}})}function I(e){return window.blocklet?(0,o.jsx)(y,{...e}):e.children}y.propTypes={disabled:h().bool,warnIcon:h().node,did:h().oneOfType([h().string,h().arrayOf(h().string)]).isRequired,noPermissionMute:h().bool,onInstalled:h().func,onError:h().func,children:h().any.isRequired,closeByOutSize:h().bool,onClose:h().func,fallback:h().node,roles:h().array},y.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]},I.propTypes={...y.propTypes,children:h().any.isRequired},I.defaultProps={...y.defaultProps};i(28018),i(94464),i(25710),i(28726);var k=i(13128);i(71569),i(25842);i(60251);var N=i(95712);i(47685),i(72966),i(92706);i(23939);var A=i(49384);i(21998);i(94457);var L=i(26538),C=i.n(L),P=i(87806);function D(e){let{passport:t,user:i,color:n,width:r,icon:s,children:l,createPassportSvg:c,...d}=e;const{t:u}=(0,a.PE)();return(0,o.jsxs)(f.Z,{...d,sx:{display:"flex",alignItems:"center",...null===d||void 0===d?void 0:d.sx},children:[(0,o.jsx)(f.Z,{className:"passport-item__display",dangerouslySetInnerHTML:{__html:c({title:t.title||t.name,issuer:t.issuer&&t.issuer.name,issuerDid:t.issuer&&t.issuer.id,ownerName:i.fullName,ownerDid:i.did,ownerAvatarUrl:i.avatar,revoked:t.revoked,preferredColor:n,width:r})}}),(0,o.jsxs)(f.Z,{className:"passport-item__body",sx:{p:0,ml:3,mt:0},children:[(0,o.jsxs)(f.Z,{className:"passport-item__title",sx:{display:"flex",alignItems:"center",fontWeight:400,fontSize:"16px",lineHeight:1.1875,color:"#222222"},children:[C()(t.title),(0,o.jsxs)(f.Z,{className:"passport-item__status-icon",sx:{svg:{fill:"#bfbfbf",height:"1.2em",marginLeft:"0.4em"}},children:[s,t.revoked&&(0,o.jsx)(P.Z,{})]})]}),t.expirationDate&&(0,o.jsx)(f.Z,{className:"passport-item__title",sx:{display:"flex",alignItems:"center",fontWeight:400,fontSize:"16px",lineHeight:1.1875,color:"#222222"},children:u("team.passport.validUntil",{date:t.expirationDate})}),l]})]})}D.propTypes={passport:h().any.isRequired,user:h().any.isRequired,color:h().string.isRequired,createPassportSvg:h().func.isRequired,icon:h().any,children:h().any,width:h().number},D.defaultProps={icon:null,children:null,width:150};i(30278),i(76818);const j=(0,v.createContext)({}),{Provider:M,Consumer:B}=j;i(82790),i(86229),i(82434),i(14506),i(16967);var U=i(36738);function F(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)e[o]=i[o]}return e}var K=function e(t,i){function o(e,o,n){if("undefined"!==typeof document){"number"===typeof(n=F({},i,n)).expires&&(n.expires=new Date(Date.now()+864e5*n.expires)),n.expires&&(n.expires=n.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var r="";for(var a in n)n[a]&&(r+="; "+a,!0!==n[a]&&(r+="="+n[a].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+r}}return Object.create({set:o,get:function(e){if("undefined"!==typeof document&&(!arguments.length||e)){for(var i=document.cookie?document.cookie.split("; "):[],o={},n=0;n<i.length;n++){var r=i[n].split("="),a=r.slice(1).join("=");try{var s=decodeURIComponent(r[0]);if(o[s]=t.read(a,s),e===s)break}catch(l){}}return e?o[e]:o}},remove:function(e,t){o(e,"",F({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,F({},this.attributes,t))},withConverter:function(t){return e(F({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),Z=i(10458),z=i.n(Z),H=Object.defineProperty,W=(e,t,i)=>(((e,t,i)=>{t in e?H(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!==typeof t?t+"":t,i),i);class q{constructor(e){let{api:t}=e;W(this,"api"),this.api=t}async getUserPublicInfo(e){let{did:t}=e;const{data:i}=await this.api.get("/api/user",{params:{did:t}});return i}async getUserPrivacyConfig(e){let{did:t}=e;const{data:i}=await this.api.get("/api/user/privacy/config",{params:{did:t}});return i}async saveUserPrivacyConfig(e){const{data:t}=await this.api.post("/api/user/privacy/config",e);return t}async getUserNotificationConfig(){const{data:e}=await this.api.get("/api/user/notification/config");return e}async saveUserNotificationConfig(e){const{data:t}=await this.api.post("/api/user/notification/config",e);return t}async testNotificationWebhook(e){const{data:t}=await this.api.put("/api/user/notification/webhook",e);return t}async getProfileUrl(e){let{did:t,locale:i}=e;const o="".concat(U.WELLKNOWN_SERVICE_PATH_PREFIX,"/user");return(0,S.jb)(o,{did:t,locale:i})}async logout(e){let{visitorId:t}=e;const{data:i}=await this.api.post("/api/user/logout",{visitorId:t});return i}}class V{getSessionToken(){return K.get(U.SESSION_TOKEN_STORAGE_KEY)}setSessionToken(e){K.set(U.SESSION_TOKEN_STORAGE_KEY,e)}removeSessionToken(){K.remove(U.SESSION_TOKEN_STORAGE_KEY)}getRefreshToken(){return localStorage.getItem(U.REFRESH_TOKEN_STORAGE_KEY)}setRefreshToken(e){localStorage.setItem(U.REFRESH_TOKEN_STORAGE_KEY,e)}removeRefreshToken(){localStorage.removeItem(U.REFRESH_TOKEN_STORAGE_KEY)}}var G=Object.defineProperty,Y=(e,t,i)=>(((e,t,i)=>{t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!==typeof t?t+"":t,i),i);class X{constructor(e){let{api:t}=e;Y(this,"api"),this.api=t}async getUserSessions(e){let{did:t}=e;const{data:i}=await this.api.get("/api/user-session",{params:{userDid:t}});return i}}const J="1.16.26",$=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((t=>{setTimeout((()=>{t()}),e)}))},Q=e=>"Bearer ".concat(encodeURIComponent(e)),ee=()=>localStorage.getItem("__visitor_id");async function te(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300;e.metaData.endTime=+new Date;const{startTime:i,endTime:o}=e.metaData,n=o-i;n<t&&await $(t-n),delete e.metaData}const ie=(e,t)=>{const i={...null===e||void 0===e?void 0:e.headers,"x-blocklet-js-sdk-version":J},o=ee();[void 0,null].includes(o)||(i["x-blocklet-visitor-id"]=o);const n=Z.create({...e,headers:i});return null!==t&&void 0!==t&&t.lazy&&(n.interceptors.request.use((e=>(e.metaData={startTime:+new Date},e)),(e=>Promise.reject(e))),n.interceptors.response.use((async e=>(await te(e.config,null===t||void 0===t?void 0:t.lazyTime),e)),(async e=>(await te(e.response.config,null===t||void 0===t?void 0:t.lazyTime),Promise.reject(e))))),n};function oe(e,t,i){let{getSessionToken:o,setSessionToken:n,removeSessionToken:r,getRefreshToken:a,setRefreshToken:s,removeRefreshToken:l,onRefreshTokenError:c,onRefreshTokenSuccess:d}=e,u=null;const p=ie({timeout:3e4,...t},i);return p.interceptors.request.use((async e=>{if(!K.get(U.SESSION_TOKEN_STORAGE_KEY)){const t=o();t&&(e.headers.authorization=Q(t))}return u&&await u,e}),(e=>Promise.reject(e))),p.interceptors.response.use((e=>e),(async e=>{var t;const i=e.config;if(i.headers={...null===i||void 0===i?void 0:i.headers},401===(null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.status)&&!i._retry){i._retry=!0;try{u||(u=async function(e){if(!e)throw new Error("Refresh token not found");const t=ie({baseURL:U.WELLKNOWN_SERVICE_PATH_PREFIX,timeout:1e4,headers:{authorization:Q(e)}}),{data:i}=await t.post("/api/did/refreshSession");return i}(a()));const e=await u;return n(e.nextToken),s(e.nextRefreshToken),"function"===typeof d&&d(e),p(i)}catch(o){return r(),l(),"function"===typeof c&&c(o),Promise.reject(e)}finally{u=null}}return Promise.reject(e)})),p}var ne=Object.defineProperty,re=(e,t,i)=>(((e,t,i)=>{t in e?ne(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i})(e,"symbol"!==typeof t?t+"":t,i),i);const ae=new class{constructor(){re(this,"api"),re(this,"user"),re(this,"userSession"),re(this,"token");const e=new V,t=oe({getSessionToken:e.getSessionToken,setSessionToken:e.setSessionToken,removeSessionToken:e.removeSessionToken,getRefreshToken:e.getRefreshToken,setRefreshToken:e.setRefreshToken,removeRefreshToken:e.removeRefreshToken,onRefreshTokenError:()=>{console.error("Failed to refresh token")},onRefreshTokenSuccess:()=>{}},{baseURL:U.WELLKNOWN_SERVICE_PATH_PREFIX});this.user=new q({api:t}),this.userSession=new X({api:t}),this.token=e,this.api=t}};var se=i(71171),le=(i(35966),i(33518));i(88577),i(75506);z().defaults.timeout=1e4;z().create();i.p;i(22256);i.p;var ce;(0,le.Z)(f.Z)(ce||(ce=(0,se.Z)(["\n .selected-container {\n position: absolute;\n right: 0px;\n bottom: 0px;\n display: flex;\n -webkit-box-pack: end;\n justify-content: flex-end;\n align-items: flex-end;\n width: 32px;\n height: 32px;\n border-radius: 0px 0px 8px;\n color: rgb(255, 255, 255);\n overflow: hidden;\n transition: all 0.4s ease 0s;\n\n &::after {\n position: absolute;\n z-index: 0;\n left: 60px;\n top: 60px;\n display: block;\n width: 0px;\n height: 0px;\n border-width: 16px;\n border-style: solid;\n border-color: transparent #1dc1c7 #1dc1c7 transparent;\n transition: all 0.1s ease 0s;\n content: '';\n }\n\n .selected-icon {\n visibility: hidden;\n width: 60%;\n height: 60%;\n position: relative;\n z-index: 2;\n margin: 0px 1px 1px 0px;\n font-size: 16px;\n transition: all 0.2s ease 0s;\n }\n }\n\n .selected-container.selected {\n &::after {\n left: 0px;\n top: 0px;\n }\n\n .selected-icon {\n visibility: visible;\n }\n }\n"])));var de;(0,le.Z)(f.Z)(de||(de=(0,se.Z)(["\n height: 100%;\n overflow-y: auto;\n"])));var ue=i(75760),pe=i(79366),me=i(93066),fe=i(62219),be=i.n(fe),Ee=i(35833),we=i.n(Ee),he=i(14520);class ve extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}const ge=e=>void 0===globalThis.DOMException?new ve(e):new DOMException(e),_e=e=>{const t=void 0===e.reason?ge("This operation was aborted."):e.reason;return t instanceof Error?t:ge(t)};const Te=Symbol("skip");async function xe(e,t){return async function(e,t){let{concurrency:i=Number.POSITIVE_INFINITY,stopOnError:o=!0,signal:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise(((r,a)=>{if(void 0===e[Symbol.iterator]&&void 0===e[Symbol.asyncIterator])throw new TypeError("Expected `input` to be either an `Iterable` or `AsyncIterable`, got (".concat(typeof e,")"));if("function"!==typeof t)throw new TypeError("Mapper function is required");if(!Number.isSafeInteger(i)&&i!==Number.POSITIVE_INFINITY||!(i>=1))throw new TypeError("Expected `concurrency` to be an integer from 1 and up or `Infinity`, got `".concat(i,"` (").concat(typeof i,")"));const s=[],l=[],c=new Map;let d=!1,u=!1,p=!1,m=0,f=0;const b=void 0===e[Symbol.iterator]?e[Symbol.asyncIterator]():e[Symbol.iterator](),E=e=>{d=!0,u=!0,a(e)};n&&(n.aborted&&E(_e(n)),n.addEventListener("abort",(()=>{E(_e(n))})));const w=async()=>{if(u)return;const e=await b.next(),i=f;if(f++,e.done){if(p=!0,0===m&&!u){if(!o&&l.length>0)return void E(new AggregateError(l));if(u=!0,0===c.size)return void r(s);const e=[];for(const[t,i]of s.entries())c.get(t)!==Te&&e.push(i);r(e)}}else m++,(async()=>{try{const o=await e.value;if(u)return;const n=await t(o,i);n===Te&&c.set(i,n),s[i]=n,m--,await w()}catch(n){if(o)E(n);else{l.push(n),m--;try{await w()}catch(n){E(n)}}}})()};(async()=>{for(let t=0;t<i;t++){try{await w()}catch(e){E(e);break}if(p||d)break}})()}))}(e,(e=>e()),t)}var Se=i(75239),Oe=i(11750),Re=i(19654);function ye(e){let{user:t,sessionUser:i}=e;const n=(0,me.Z)((()=>{var e;return null===(e=(null===t||void 0===t?void 0:t.passports)||[])||void 0===e?void 0:e.find((e=>e.name===i.role))}),[null===t||void 0===t?void 0:t.passports,null===i||void 0===i?void 0:i.role]);return(0,o.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,o.jsx)(N.Z,{size:40,variant:"circle",shape:"circle",src:i.avatar,did:i.did,sx:{flexShrink:0}}),(0,o.jsxs)(f.Z,{sx:{flex:1,overflow:"hidden"},children:[(0,o.jsxs)(f.Z,{sx:{display:"flex",alignItems:"center",gap:1},children:[(0,o.jsx)(Se.Z,{title:i.fullName,children:(0,o.jsx)(Oe.Z,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:i.fullName})}),(0,o.jsx)(Re.Z,{label:(null===n||void 0===n?void 0:n.title)||(null===n||void 0===n?void 0:n.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:r.E.textBase,borderColor:r.E.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),(0,o.jsx)(Se.Z,{title:i.email,children:(0,o.jsx)(Oe.Z,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:i.email})})]})]})}const Ie={zh:{confirm:"\u786e\u8ba4",cancel:"\u53d6\u6d88",visitorId:"\u8bbe\u5907\u6807\u8bc6",deviceType:"\u8bbe\u5907\u7c7b\u578b",platform:"\u64cd\u4f5c\u7cfb\u7edf",walletOS:"\u94b1\u5305\u7c7b\u578b",role:"\u89d2\u8272",fullname:"\u59d3\u540d",email:"\u90ae\u7bb1",avatar:"\u5934\u50cf",user:"\u7528\u6237",createdAt:"\u9996\u6b21\u6d3b\u52a8\u65f6\u95f4",updatedAt:"\u6700\u8fd1\u6d3b\u52a8\u65f6\u95f4",lastLoginIp:"\u6700\u8fd1\u6d3b\u52a8\u5730\u5740",actions:"\u64cd\u4f5c",logoutAll:"\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd",logoutAllTips:"\u4e0d\u4f1a\u6ce8\u9500\u5f53\u524d\u4f1a\u8bdd",logout:"\u6ce8\u9500",currentSession:"\u5f53\u524d\u4f1a\u8bdd",unknown:"\u672a\u77e5",expired:"\u5df2\u8fc7\u671f",remove:"\u5220\u9664",logoutThisSession:"\u6ce8\u9500\u6307\u5b9a\u4f1a\u8bdd",logoutThisSessionConfirm:"\u786e\u5b9a\u8981\u6ce8\u9500\u6b64\u4f1a\u8bdd\u5417?",logoutAllSession:"\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd",logoutAllSessionConfirm:"\u786e\u5b9a\u8981\u6ce8\u9500\u6240\u6709\u4f1a\u8bdd\u5417?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},ke="Reserved IP",Ne="ip-region-cache";async function Ae(e){let t="",i={};try{const e=localStorage.getItem(Ne);e&&(i=JSON.parse(e))}catch{i={}}if(i[e])t=i[e];else{try{t=await async function(e){const t="https://api.ip.sb/geoip/".concat(e),i=await fetch(t),o=await i.json();let n="";return o.error?o.reserved&&(n=ke):n=[o.country,o.region,o.city].filter(Boolean).join("/"),n}(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!t)try{t=await async function(e){const t="https://ipapi.co/".concat(e,"/json/"),i=await fetch(t),o=await i.json();let n="";return o.error?o.reserved&&(n=ke):n=[o.country_name,o.region,o.city].filter(Boolean).join("/"),n}(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(t){const o=Object.keys(i);o.length>100&&delete i[o[0]],i[e]&&delete i[e],i[e]=t,localStorage.setItem(Ne,JSON.stringify(i))}return t}const Le=e=>new(we())(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[we().BROWSER.NAME,we().BROWSER.VERSION]]}).getResult();function Ce(e){let{user:t,showAction:i=!0,showUser:n=!0}=e;const r=(0,he.OP)(),{locale:l}=(0,a.PE)(),{confirmApi:c,confirmHolder:d}=(0,k.N4)(),u=(0,E.Z)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,s.I)(Ie,e,l,"en",t)})),p=(0,E.Z)((async()=>{let e=null===t||void 0===t?void 0:t.userSessions;e||(e=await ae.userSession.getUserSessions({did:t.did}));try{var i;const t=null===(i=e)||void 0===i?void 0:i.map(((e,t)=>[t,e.lastLoginIp])).filter((e=>!!e[1])),o=null===t||void 0===t?void 0:t.map((e=>e[1])),n=await async function(e){return Promise.all(e.map((e=>Ae(e))))}(o);for(let i=0;i<n.length;i++){const o=n[i],r=t[i];e[r[0]].ipRegion=o}}catch(n){console.warn("Failed to convert ip to region"),console.error(n)}const o=(new Date).getTime();return be()(e,(e=>e.visitorId===r?-1:o-new Date(e.updatedAt).getTime()))})),m=(0,pe.Z)(p),b=(0,me.Z)((()=>m.data||[]),[m.data]),w=(0,me.Z)((()=>b.reduce(((e,t)=>(e[t.lastLoginIp]=t.ipRegion,e)),{})),[b]),h=(0,E.Z)((e=>{let{visitorId:t}=e;c.open({title:u("logoutThisSession"),content:u("logoutThisSessionConfirm"),confirmButtonText:u("confirm"),cancelButtonText:u("cancel"),onConfirm:async()=>{await ae.user.logout({visitorId:t}),m.refresh(),c.close()}})})),v=(0,me.Z)((()=>b.filter((e=>e.visitorId!==r))),[b]),_=(0,E.Z)((()=>{c.open({title:u("logoutAllSession"),content:u("logoutAllSessionConfirm"),confirmButtonText:u("confirm"),cancelButtonText:u("cancel"),onConfirm:async()=>{const e=v.map((e=>()=>ae.user.logout({visitorId:e.visitorId})));await xe(e,{concurrency:3,stopOnError:!1}),m.refresh(),c.close()}})})),T=[];i&&T.push((0,o.jsx)(Se.Z,{title:u("logoutAllTips"),children:(0,o.jsx)(g.Z,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:_,disabled:0===v.length,children:u("logoutAll")})},"logoutAll"));const x=(0,me.Z)((()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600})),[]),S=[{label:u("platform"),name:"platform",options:{customBodyRenderLite:e=>{var t,i;const n=b[e],r=Le(n.ua);return(0,o.jsx)(f.Z,{children:[null===(t=r.os)||void 0===t?void 0:t.name,null===(i=r.os)||void 0===i?void 0:i.version].filter(Boolean).join("/")||u("unknown")})}}},{label:u("deviceType"),name:"deviceType",options:{customBodyRenderLite:e=>{var t,i;const n=b[e],r=Le(n.ua);return(0,o.jsx)(f.Z,{children:[null===(t=r.browser)||void 0===t?void 0:t.name,null===(i=r.browser)||void 0===i?void 0:i.version].filter(Boolean).join("/")||u("unknown")})}}},{label:u("walletOS"),name:"walletOS",options:{customBodyRenderLite:e=>{var t;const i=b[e];return(0,o.jsx)(f.Z,{children:(null===(t=i.extra)||void 0===t?void 0:t.walletOS)||u("unknown")})}}},n&&{label:u("user"),name:"user",options:{customBodyRenderLite:e=>{const i=b[e];return(0,o.jsx)(f.Z,{sx:{minWidth:150,maxWidth:250},children:(0,o.jsx)(ye,{sessionUser:i.user,user:t})})}}},{label:u("createdAt"),name:"createdAt",options:{customBodyRenderLite:e=>{const t=b[e];return t.createdAt?(0,o.jsx)(A.Z,{value:t.createdAt,relativeRange:2592e5,locale:l}):u("unknown")}}},{label:u("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:e=>{const t=b[e];return"expired"===t.status?u("expired"):(0,o.jsx)(A.Z,{value:t.updatedAt,relativeRange:2592e5,locale:l})}}},{label:u("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:e=>{const t=b[e];return(0,o.jsx)(f.Z,{children:w[t.lastLoginIp]?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Oe.Z,{variant:"body2",children:w[t.lastLoginIp]}),(0,o.jsx)(Oe.Z,{variant:"body2",color:"grey",children:t.lastLoginIp||u("unknown")})]}):(0,o.jsx)(Oe.Z,{children:t.lastLoginIp||u("unknown")})})}}},i&&{label:u("actions"),name:"actions",options:{customBodyRenderLite:e=>{const t=b[e];return(0,o.jsx)(f.Z,{children:(0,o.jsx)(g.Z,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:r===t.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>h({visitorId:t.visitorId}),children:"expired"===t.status?u("remove"):r===t.visitorId?u("currentSession"):u("logout")})})}}}].filter(Boolean);return(0,o.jsxs)(f.Z,{sx:{".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"}},children:[d,(0,o.jsx)(ue.Z,{locale:l,data:b,columns:S,customButtons:T,options:x,loading:m.loading})]})}i(21764),i(25125),i(13573),i(8708),i(54198);var Pe=i(42061),De=i(78923);(0,v.forwardRef)((function(e,t){let{src:i,open:n=!1,componentDid:r,loading:a=!0,storeUrl:s,onClose:l=(()=>{}),onComplete:c=(()=>{}),onLoad:d=(()=>{})}=e;const u=(0,v.useRef)(null),p=(0,E.Z)((e=>{var t,i,o;n&&("resourceDialog.close"===(null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.event)&&l(),"resourceDialog.complete"===(null===e||void 0===e||null===(i=e.data)||void 0===i?void 0:i.event)&&c(),"resourceDialog.loaded"===(null===e||void 0===e||null===(o=e.data)||void 0===o?void 0:o.event)&&d())}));return(0,Pe.Z)((()=>{window.addEventListener("message",p)})),(0,De.Z)((()=>{window.removeEventListener("message",p)})),(0,v.useImperativeHandle)(t,(()=>({selectBlocklet:e=>{var t;null!==(t=u.current)&&void 0!==t&&t.contentWindow&&u.current.contentWindow.postMessage({event:"resourceDialog.select",data:e,componentDid:r,storeUrl:s},"*")}}))),n?(0,o.jsx)("iframe",{ref:u,src:i,title:"Resource Dialog",style:{position:"fixed",top:0,left:a?"-100vw":0,width:"100vw",height:"100vh",zIndex:9999,backgroundColor:"transparent",border:"none"}}):null}))},36738:e=>{const t=Object.freeze({AUTH:"auth",AUTH_SERVICE:"@abtnode/auth-service"}),i=Object.freeze({AUTH_SERVICE:"/.service/".concat(t.AUTH_SERVICE)}),o=Object.freeze({OWNER:"owner",ADMIN:"admin",MEMBER:"member",GUEST:"guest"}),n=Object.freeze({...o,CI:"ci",CERTIFICATE:"certificate",BLOCKLET_OWNER:"blocklet-owner",BLOCKLET_ADMIN:"blocklet-admin",BLOCKLET_MEMBER:"blocklet-member",BLOCKLET_SDK:"blocklet-sdk",EXTERNAL_BLOCKLET_CONTROLLER:"external-blocklet-controller",EXTERNAL_BLOCKLETS_MANAGER:"external-blocklets-manager"}),r=[n.BLOCKLET_OWNER,n.BLOCKLET_ADMIN,n.BLOCKLET_MEMBER,n.BLOCKLET_SDK],a={roles:Object.freeze([{name:n.OWNER,title:"Owner",description:"Has full administrative access to the Blocklet Server",passport:!0},{name:n.ADMIN,title:"Admin",description:"Has full permissions to manage blocklet and Blocklet Server such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates, manage blocklet team, manage node integrations and access keys, upgrade node to a new version",passport:!0},{name:n.MEMBER,title:"Member",description:"Has permissions to manage blocklets, such as install/remove/start/stop blocklet, manage blocklet URL mapping and certificates",passport:!0},{name:n.GUEST,title:"Guest",description:"Has all read permissions on Blocklet Server",passport:!0},{name:n.CI,title:"CI",description:"Deploy blocklet to Blocklet Server",passport:!0,noHuman:!0},{name:n.CERTIFICATE,title:"Certificate",description:"Manage https certificates for blocklets on the Blocklet Server",passport:!0,noHuman:!0},{name:n.BLOCKLET_OWNER,title:"Blocklet Owner"},{name:n.BLOCKLET_ADMIN,title:"Blocklet Admin"},{name:n.BLOCKLET_MEMBER,title:"Blocklet Member"},{name:n.BLOCKLET_SDK,title:"Blocklet SDK"},{name:n.EXTERNAL_BLOCKLET_CONTROLLER,title:"External Blocklet Controller"},{name:n.EXTERNAL_BLOCKLETS_MANAGER,title:"External Blocklets Manager",description:"Manage external blocklets in the Blocklet Server",passport:!0,noHuman:!0},{name:t.AUTH_SERVICE,title:"Auth Service"}]),permissions:Object.freeze([{name:"query_node",description:"View node data, include dashboard and node settings, log stream for both Blocklet Server and blocklets"},{name:"mutate_node",description:"Change node settings, upgrade node to a new version"},{name:"query_session",description:"Get data from a long running session"},{name:"mutate_session",description:"Start/update/end a long running session"},{name:"query_accessKey",description:"View access keys for Blocklet Server"},{name:"mutate_accessKey",description:"Manage access keys for Blocklet Server, such as create/update/delete"},{name:"query_team",description:"View team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"mutate_team",description:"Manage team data(members/roles/permissions) for Blocklet Server and blocklets"},{name:"query_blocklets",description:"View store and installed blocklets, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklets",description:"Perform state changing actions on blocklets, such as install/upgrade/config/start/stop/remove"},{name:"query_router",description:"View sites, URL mapping and certificates in service gateway"},{name:"mutate_router",description:"Manage sites, URL mapping and certificates in service gateway"},{name:"query_certificate",description:"View certificates in service gateway"},{name:"mutate_certificate",description:"Manage certificates in service gateway"},{name:"query_notification",description:"View notifications"},{name:"mutate_notification",description:"Manage notifications, such as mark notifications as read"},{name:"query_webhook",description:"View integrations"},{name:"mutate_webhook",description:"Manage integrations"},{name:"query_blocklet",description:"View a blocklet, including blocklet runtime configuration, domains and urls"},{name:"mutate_blocklet",description:"Perform state changing actions on a blocklet, such as upgrade/config/start/stop"}]),grants:Object.freeze({[n.GUEST]:["query_blocklets","query_router","query_webhook","query_notification","query_team","query_accessKey","query_node","query_session"],[n.MEMBER]:[n.GUEST,"mutate_blocklets","mutate_router","mutate_notification","mutate_session"],[n.ADMIN]:[n.MEMBER,"mutate_team","mutate_webhook","mutate_accessKey","mutate_node","mutate_certificate"],[n.OWNER]:[o.ADMIN],[n.CI]:["query_blocklets","mutate_blocklets"],[n.CERTIFICATE]:["query_certificate","mutate_certificate"],[n.BLOCKLET_SDK]:["query_team","mutate_team","query_blocklet"],[n.BLOCKLET_OWNER]:[n.BLOCKLET_ADMIN],[n.BLOCKLET_ADMIN]:[n.BLOCKLET_MEMBER,"mutate_team","mutate_blocklet","mutate_notification"],[n.BLOCKLET_MEMBER]:["query_team","query_blocklet","query_notification"],[n.EXTERNAL_BLOCKLET_CONTROLLER]:["query_blocklets","mutate_blocklets"],[n.EXTERNAL_BLOCKLETS_MANAGER]:["query_blocklets","mutate_blocklets"]})},s=864e5,l="https://store.blocklet.dev",c="https://dev.store.blocklet.dev",d=Object.freeze({DERIVED:"derived",WALLET:"wallet"}),u=Object.freeze({created:0,selected:10,connected:20,paid:30,nftMinted:35,allocated:40,consuming:46,installed:50,expired:60,terminated:70,timeout:80,transferred:90});e.exports=Object.freeze({NODE_MODES:Object.freeze({PRODUCTION:"production",DEBUG:"debug",MAINTENANCE:"maintenance",SERVERLESS:"serverless"}),DEFAULT_DESCRIPTION:"Web Interface to manage your Blocklet Server",NODE_MAINTAIN_PROGRESS:Object.freeze({SETUP:"setup",INSTALLING:"installing",VERIFYING:"verifying",RESTARTING:"restarting",CLEANUP:"cleanup",COMPLETE:"complete",ROLLBACK:"rollback"}),VC_TYPE_BLOCKLET_PURCHASE:"BlockletPurchaseCredential",VC_TYPE_NODE_PASSPORT:"ABTNodePassport",VC_TYPE_GENERAL_PASSPORT:"NFTPassport",NFT_TYPE_SERVER_OWNERSHIP:"BlockletServerOwnershipNFT",NFT_TYPE_SERVERLESS:"BlockletServerServerlessNFT",NODE_PACKAGE_NAME:"@abtnode/cli",NODE_COMMAND_NAME:"abtnode",NODE_DATA_DIR_NAME:"_abtnode",USER_AVATAR_DIR:"/.assets/avatar",USER_AVATAR_URL_PREFIX:"bn://avatar",USER_AVATAR_PATH_PREFIX:"/user/avatar",PROCESS_NAME_DAEMON:"abt-node-daemon",PROCESS_NAME_PROXY:"abt-node-db-hub",PROCESS_NAME_UPDATER:"abt-node-updater",PROCESS_NAME_SERVICE:"abt-node-service",PROCESS_NAME_ROUTER:"abt-node-router",PROCESS_NAME_LOG_ROTATE:"abt-node-log-rotate",PROCESS_NAME_EVENT_HUB:"abt-node-event-hub",NODE_REGISTER_URL:"https://install.arcblock.io/",WEB_WALLET_URL:"https://web.abtwallet.io",BLOCKLET_STORE_URL:l,BLOCKLET_STORE_URL_DEV:c,BLOCKLET_STORE_API_PREFIX:"/api",BLOCKLET_STORE_API_BLOCKLET_PREFIX:"/api/blocklets",BLOCKLET_STORE_META_PATH:"/api/store.json",BLOCKLET_STORE:{id:"zNKqX7D8ZAYa77HgzpoFfnV3BFbcmSRrE9aT",name:"Official Store",description:"ArcBlock official blocklet registry",url:l,logoUrl:"/logo.png",maintainer:"arcblock"},BLOCKLET_STORE_DEV:{id:"zNKmfUatDhzfMVACfr3u97eqndj8f1yXXw3m",name:"Dev Store",description:"ArcBlock dev registry that contains demo and example blocklets",url:c,maintainer:"arcblock",logoUrl:"/logo.png"},APP_STRUCT_VERSION:"2",DEFAULT_DID_REGISTRY:"https://registry.abtnet.io",DEFAULT_SLP_DOMAIN:"slp.abtnet.io",DEFAULT_DID_DOMAIN:"did.abtnet.io",DEFAULT_IP_DOMAIN:"*.ip.abtnet.io",DEFAULT_IP_DOMAIN_SUFFIX:"ip.abtnet.io",DEFAULT_WILDCARD_CERT_HOST:"https://releases.arcblock.io/",DEFAULT_NFT_DOMAIN_URL:"https://domain.didlabs.org/",DEFAULT_CERTIFICATE_EMAIL:"certs@arcblock.io",CONFIG_FILENAME:"config.yml",CONFIG_FILENAME_OLD:"abtnode.yml",CONFIG_FOLDER_NAME:".blocklet-server",CONFIG_FOLDER_NAME_OLD:".abtnode",EXPORTED_FOLDER_NAME:"exported_blocklet_server",StatusCode:Object.freeze({ok:0,blocklet_not_found:1,blocklet_not_purchased:2,forbidden:403,internal:500,timeout:504}),IP:new RegExp("-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\-(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}"),DOMAIN_FOR_IP_SITE:"",DOMAIN_FOR_IP_SITE_REGEXP:"~^\\d+.\\d+.\\d+.\\d+$",DOMAIN_FOR_DEFAULT_SITE:"*",DOMAIN_FOR_INTERNAL_SITE:"127.0.0.1",NAME_FOR_WELLKNOWN_SITE:"wellknown",WELLKNOWN_PATH_PREFIX:"/.well-known",WELLKNOWN_ACME_CHALLENGE_PREFIX:"/.well-known/acme-challenge",WELLKNOWN_DID_RESOLVER_PREFIX:"/.well-known/did.json",WELLKNOWN_PING_PREFIX:"/.well-known/ping",WELLKNOWN_ANALYTICS_PREFIX:"/.well-known/analytics",WELLKNOWN_SERVICE_PATH_PREFIX:"/.well-known/service",WELLKNOWN_BLOCKLET_ADMIN_PATH:"/.well-known/service/admin",WELLKNOWN_BLOCKLET_HEALTH_PATH:"/.well-known/service/health",WELLKNOWN_BLOCKLET_LOGO_PATH:"/.well-known/service/blocklet/logo",SLOT_FOR_IP_DNS_SITE:"888-888-888-888",DEFAULT_ADMIN_PATH:"/admin",WELLKNOWN_SERVER_ADMIN_PATH:"/.well-known/server/admin",DEFAULT_SERVICE_PATH:"/.abtnode/service",DEFAULT_HTTP_PORT:80,DEFAULT_HTTPS_PORT:443,MAX_UPLOAD_FILE_SIZE:500,DEFAULT_DAEMON_PORT:8089,MAX_NGINX_WORKER_CONNECTIONS:10240,BLOCKLET_PROXY_PATH_PREFIX:"/.blocklet/proxy",BLOCKLET_SITE_GROUP_SUFFIX:".blocklet-domain-group",DAY_IN_MS:s,DAEMON_MAX_MEM_LIMIT_IN_MB:800,PROXY_MAX_MEM_LIMIT_IN_MB:800,BLOCKLET_MAX_MEM_LIMIT_IN_MB:800,CERTIFICATE_EXPIRES_OFFSET:864e6,ROUTING_RESPONSE_TYPES:[{text:"Plain Text",value:"text/plain"},{text:"JSON",value:"application/json"},{text:"XML",value:"application/xml"},{text:"HTML Document",value:"text/html"},{text:"YAML",value:"application/x-yaml"},{text:"TOML",value:"application/toml"},{text:"CSS",value:"text/css"},{text:"JavaScript",value:"application/javascript"},{text:"CSV",value:"text/csv"},{text:"Markdown",value:"text/markdown"},{text:"SVG",value:"image/svg+xml"}],ROUTING_RULE_TYPES:Object.freeze({NONE:"none",DAEMON:"daemon",SERVICE:"service",BLOCKLET:"blocklet",REDIRECT:"redirect",GENERAL_REWRITE:"rewrite",GENERAL_PROXY:"general_proxy",DIRECT_RESPONSE:"direct_response",COMPONENT:"component"}),ROLES:o,SERVER_ROLES:n,BLOCKLET_ROLES:r,isBlockletRole:e=>e&&r.includes(e),AUTH_CERT_TYPE:{USER:"user",OWNERSHIP_NFT:"ownership_nft",BLOCKLET_USER:"blocklet_user",BLOCKLET_CONTROLLER:"blocklet_controller"},RBAC_CONFIG:a,genPermissionName:function(e){return"".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"access","_").concat(e.replace("_","-"))},PASSPORT_STATUS:{VALID:"valid",REVOKED:"revoked"},NODE_SERVICES:t,NODE_SERVICES_PREFIX:i,DISK_ALERT_THRESHOLD_PERCENT:80,EVENTS:{NOTIFICATION_CREATE:"notification.create",NOTIFICATION_BLOCKLET_CREATE:"notification.blockletCreate",ROUTING_UPDATED:"routing.updated",NODE_UPDATED:"node.updated",NODE_MAINTAIN_PROGRESS:"node.upgrade.progress",NODE_STARTED:"node.started",NODE_STOPPED:"node.stopped",NODE_ADDED_OWNER:"node.addedOwner",NODE_RUNTIME_INFO:"node.runtimeInfo",BLOCKLETS_RUNTIME_INFO:"node.blockletsRuntimeInfo",DOMAIN_STATUS:"domain.status",CERT_ADDED:"cert.added",CERT_ISSUED:"cert.issued",CERT_UPDATED:"cert.updated",CERT_REMOVED:"cert.removed",CERT_ERROR:"cert.error",RELOAD_GATEWAY:"gateway.reload"},WHO_CAN_ACCESS:{OWNER:"owner",INVITED:"invited",ALL:"all"},WHO_CAN_ACCESS_PREFIX_ROLES:"roles:",GATEWAY_REQ_LIMIT:Object.freeze({min:10,max:100}),STORE_DETAIL_PAGE_PATH_PREFIX:"/blocklets",MAX_USER_PAGE_SIZE:100,SERVER_STATUS:{RUNNING:1,STOPPED:2,START_FROM_CRASH:3},LOG_RETAIN_IN_DAYS:60,BLOCKLET_INSTALL_TYPE:{STORE:"store",URL:"url",DEV:"dev",CREATE:"create",RESTORE:"restore"},ROUTER_CACHE_GROUPS:{blockletProxy:{minSize:"1m",maxSize:"2g",period:"30d"}},MAIN_CHAIN_ENDPOINT:"https://main.abtnetwork.io/api/",USER_TYPE:d,SERVER_CACHE_TTL:3e5,BLOCKLET_CACHE_TTL:36e5,SESSION_CACHE_TTL:3600,SESSION_TTL:604800,BACKUPS:{STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:7200}},CHECK_UPDATE:{STATUS:{PROGRESS:null,SUCCEEDED:0,FAILED:1},TIMEOUT_HOURS:6,STRATEGY:{AUTO:0,MANUAL:1},JOB:{INTERVAL:7200}},MONITOR_HISTORY_LENGTH:8640,MONITOR_RECORD_INTERVAL_SEC:10,INSTALL_ACTIONS:{INSTALL:"install",INSTALL_COMPONENT:"installComponent",UPGRADE_COMPONENT:"upgradeComponent"},COPYRIGHT_OWNER:"ArcBlock",FEDERATED:{SYNC_LIMIT:3},SESSION_TOKEN_STORAGE_KEY:"login_token",REFRESH_TOKEN_STORAGE_KEY:"refresh_token",LAUNCH_SESSION_STATUS:u,UNOWNED_DID:"z".repeat(35),STUDIO_CONNECTED_STORE:"studio_connected_store"})},30278:(e,t,i)=>{var o=i(31104),n=i(43676);e.exports=function(e,t){return e&&e.length?n(e,o(t,2)):[]}},94166:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)},n=this&&this.__rest||function(e,t){var i={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(i[o]=e[o]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(i[o[n]]=e[o[n]])}return i};t.__esModule=!0;var r=i(5057),a=i(18294),s=i(49266);t.default=function(e){var t=e.delay,i=void 0===t?0:t,l=e.type,c=void 0===l?"text":l,d=e.color,u=void 0===d?"#CDCDCD":d,p=e.rows,m=void 0===p?3:p,f=e.ready,b=e.firstLaunchOnly,E=e.children,w=e.className,h=e.showLoadingAnimation,v=e.customPlaceholder,g=n(e,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),_=r.useState(f),T=_[0],x=_[1],S=r.useRef(null);return r.useEffect((function(){b||!T||f?f&&(S.current&&window.clearTimeout(S.current),T||x(!0)):i&&i>0?S.current=window.setTimeout((function(){x(!1)}),i):x(!1)}),[b,T,f,i]),r.useEffect((function(){return function(){S.current&&window.clearTimeout(S.current)}}),[]),T?E:function(){var e=h?s.joinClassNames("show-loading-animation",w):w;if(v&&r.isValidElement(v)){var t=s.joinClassNames(v.props.className,e);return r.cloneElement(v,{className:t})}if(v)return v;var i=a[c];return r.createElement(i,o({},g,{color:u,rows:m,className:e}))}()}},22256:(e,t,i)=>{"use strict";var o=i(94166);t.Z=o.default},98392:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};t.__esModule=!0;var n=i(5057),r=i(49354),a=i(12208),s=i(49266),l={display:"flex"};t.default=function(e){var t=e.className,i=e.style,c=e.color,d=e.rows;return n.createElement("div",{className:s.joinClassNames("media-block",t),style:o(o({},l),i)},n.createElement(a.default,{color:c,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),n.createElement(r.default,{color:c,rows:d}))}},16102:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};t.__esModule=!0;var n=i(5057),r=i(49266);t.default=function(e){var t=e.className,i=e.style,a={backgroundColor:e.color,width:"100%",height:"100%",marginRight:10};return n.createElement("div",{className:r.joinClassNames("rect-shape",t),style:o(o({},a),i)})}},12208:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};t.__esModule=!0;var n=i(5057),r=i(49266);t.default=function(e){var t=e.className,i=e.style,a={backgroundColor:e.color,borderRadius:"500rem",width:"100%",height:"100%"};return n.createElement("div",{className:r.joinClassNames("round-shape",t),style:o(o({},a),i)})}},49354:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};t.__esModule=!0;var n=i(5057),r=i(13672),a=i(49266),s={width:"100%"},l=[97,100,94,90,98,95,98,40];t.default=function(e){var t=e.rows,i=e.lineSpacing,c=e.color,d=e.style,u=e.className,p=e.widths,m=void 0===p?l:p,f=function(e){return{maxHeight:100/(2*t-1)+"%",width:m[(e+m.length)%m.length]+"%"}};return n.createElement("div",{className:a.joinClassNames("text-block",u),style:o(o({},s),d)},Array.apply(null,Array(t)).map((function(e,t){return n.createElement(r.default,{color:c,style:f(t),lineSpacing:0!==t?i:0,key:t})})))}},13672:function(e,t,i){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};t.__esModule=!0;var n=i(5057),r=i(49266);t.default=function(e){var t=e.className,i=e.maxHeight,a=e.color,s=e.lineSpacing,l=void 0===s?"0.7em":s,c=e.style,d={maxHeight:i,width:"100%",height:"1em",backgroundColor:a,marginTop:l};return n.createElement("div",{className:r.joinClassNames("text-row",t),style:o(o({},d),c)})}},18294:(e,t,i)=>{"use strict";t.__esModule=!0,t.media=t.text=t.rect=t.round=t.textRow=t.MediaBlock=t.TextBlock=t.RectShape=t.RoundShape=t.TextRow=void 0;var o=i(13672);t.TextRow=o.default;var n=i(12208);t.RoundShape=n.default;var r=i(16102);t.RectShape=r.default;var a=i(49354);t.TextBlock=a.default;var s=i(98392);t.MediaBlock=s.default,t.textRow=o.default,t.round=n.default,t.rect=r.default,t.text=a.default,t.media=s.default},49266:(e,t)=>{"use strict";t.__esModule=!0,t.joinClassNames=void 0,t.joinClassNames=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return e})).join(" ")}},35833:function(e,t,i){var o;!function(n,r){"use strict";var a="function",s="undefined",l="object",c="string",d="major",u="model",p="name",m="type",f="vendor",b="version",E="architecture",w="console",h="mobile",v="tablet",g="smarttv",_="wearable",T="embedded",x="Amazon",S="Apple",O="ASUS",R="BlackBerry",y="Browser",I="Chrome",k="Firefox",N="Google",A="Huawei",L="LG",C="Microsoft",P="Motorola",D="Opera",j="Samsung",M="Sharp",B="Sony",U="Xiaomi",F="Zebra",K="Facebook",Z="Chromium OS",z="Mac OS",H=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},W=function(e,t){return typeof e===c&&-1!==q(t).indexOf(q(e))},q=function(e){return e.toLowerCase()},V=function(e,t){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,500)},G=function(e,t){for(var i,o,n,s,c,d,u=0;u<t.length&&!c;){var p=t[u],m=t[u+1];for(i=o=0;i<p.length&&!c&&p[i];)if(c=p[i++].exec(e))for(n=0;n<m.length;n++)d=c[++o],typeof(s=m[n])===l&&s.length>0?2===s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,d):this[s[0]]=s[1]:3===s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=d?d.replace(s[1],s[2]):r:this[s[0]]=d?s[1].call(this,d,s[2]):r:4===s.length&&(this[s[0]]=d?s[3].call(this,d.replace(s[1],s[2])):r):this[s]=d||r;u+=2}},Y=function(e,t){for(var i in t)if(typeof t[i]===l&&t[i].length>0){for(var o=0;o<t[i].length;o++)if(W(t[i][o],e))return"?"===i?r:i}else if(W(t[i],e))return"?"===i?r:i;return e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,b],[/opios[\/ ]+([\w\.]+)/i],[b,[p,D+" Mini"]],[/\bopr\/([\w\.]+)/i],[b,[p,D]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[p,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,b],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[p,"UC"+y]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[p,"Smart Lenovo "+y]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+y],b],[/\bfocus\/([\w\.]+)/i],[b,[p,k+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[p,D+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[p,D+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[p,"MIUI "+y]],[/fxios\/([-\w\.]+)/i],[b,[p,k]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+y]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+y],b],[/samsungbrowser\/([\w\.]+)/i],[b,[p,j+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],b],[/metasr[\/ ]?([\d\.]+)/i],[b,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[p,b],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,K],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[p,I+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,I+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[p,"Android "+y]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[b,Y,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[p,k+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,b],[/(cobalt)\/([\w\.]+)/i],[p,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[E,"amd64"]],[/(ia32(?=;))/i],[[E,q]],[/((?:i[346]|x)86)[;\)]/i],[[E,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[E,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[E,"armhf"]],[/windows (ce|mobile); ppc;/i],[[E,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[E,/ower/,"",q]],[/(sun4\w)[;\)]/i],[[E,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[E,q]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[f,j],[m,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[u,[f,j],[m,h]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[f,S],[m,h]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[f,S],[m,v]],[/(macintosh);/i],[u,[f,S]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[f,M],[m,h]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[f,A],[m,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[f,A],[m,h]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[u,/_/g," "],[f,U],[m,h]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[f,U],[m,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[f,"OPPO"],[m,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[f,"Vivo"],[m,h]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[f,"Realme"],[m,h]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[f,P],[m,h]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[f,P],[m,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[f,L],[m,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[f,L],[m,h]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[f,"Lenovo"],[m,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[f,"Nokia"],[m,h]],[/(pixel c)\b/i],[u,[f,N],[m,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[f,N],[m,h]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[f,B],[m,h]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[f,B],[m,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[f,"OnePlus"],[m,h]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[f,x],[m,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[f,x],[m,h]],[/(playbook);[-\w\),; ]+(rim)/i],[u,f,[m,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[f,R],[m,h]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[f,O],[m,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[f,O],[m,h]],[/(nexus 9)/i],[u,[f,"HTC"],[m,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[u,/_/g," "],[m,h]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[f,"Acer"],[m,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[f,"Meizu"],[m,h]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[f,"Ulefone"],[m,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,u,[m,h]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,u,[m,v]],[/(surface duo)/i],[u,[f,C],[m,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[f,"Fairphone"],[m,h]],[/(u304aa)/i],[u,[f,"AT&T"],[m,h]],[/\bsie-(\w*)/i],[u,[f,"Siemens"],[m,h]],[/\b(rct\w+) b/i],[u,[f,"RCA"],[m,v]],[/\b(venue[\d ]{2,7}) b/i],[u,[f,"Dell"],[m,v]],[/\b(q(?:mv|ta)\w+) b/i],[u,[f,"Verizon"],[m,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[f,"Barnes & Noble"],[m,v]],[/\b(tm\d{3}\w+) b/i],[u,[f,"NuVision"],[m,v]],[/\b(k88) b/i],[u,[f,"ZTE"],[m,v]],[/\b(nx\d{3}j) b/i],[u,[f,"ZTE"],[m,h]],[/\b(gen\d{3}) b.+49h/i],[u,[f,"Swiss"],[m,h]],[/\b(zur\d{3}) b/i],[u,[f,"Swiss"],[m,v]],[/\b((zeki)?tb.*\b) b/i],[u,[f,"Zeki"],[m,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],u,[m,v]],[/\b(ns-?\w{0,9}) b/i],[u,[f,"Insignia"],[m,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[f,"NextBook"],[m,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],u,[m,h]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],u,[m,h]],[/\b(ph-1) /i],[u,[f,"Essential"],[m,h]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[f,"Envizen"],[m,v]],[/\b(trio[-\w\. ]+) b/i],[u,[f,"MachSpeed"],[m,v]],[/\btu_(1491) b/i],[u,[f,"Rotor"],[m,v]],[/(shield[\w ]+) b/i],[u,[f,"Nvidia"],[m,v]],[/(sprint) (\w+)/i],[f,u,[m,h]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[f,C],[m,h]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[f,F],[m,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[f,F],[m,h]],[/smart-tv.+(samsung)/i],[f,[m,g]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[f,j],[m,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,L],[m,g]],[/(apple) ?tv/i],[f,[u,S+" TV"],[m,g]],[/crkey/i],[[u,I+"cast"],[f,N],[m,g]],[/droid.+aft(\w+)( bui|\))/i],[u,[f,x],[m,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[f,M],[m,g]],[/(bravia[\w ]+)( bui|\))/i],[u,[f,B],[m,g]],[/(mitv-\w{5}) bui/i],[u,[f,U],[m,g]],[/Hbbtv.*(technisat) (.*);/i],[f,u,[m,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,V],[u,V],[m,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[m,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,u,[m,w]],[/droid.+; (shield) bui/i],[u,[f,"Nvidia"],[m,w]],[/(playstation [345portablevi]+)/i],[u,[f,B],[m,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[f,C],[m,w]],[/((pebble))app/i],[f,u,[m,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[f,S],[m,_]],[/droid.+; (glass) \d/i],[u,[f,N],[m,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[f,F],[m,_]],[/(quest( 2| pro)?)/i],[u,[f,K],[m,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[m,T]],[/(aeobc)\b/i],[u,[f,x],[m,T]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[m,h]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[m,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[m,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[m,h]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,b],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[b,Y,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,Y,X],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,z],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,b],[/\(bb(10);/i],[b,[p,R]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[p,k+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[p,I+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,Z],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,b],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,b]]},$=function(e,t){if(typeof e===l&&(t=e,e=r),!(this instanceof $))return new $(e,t).getResult();var i=typeof n!==s&&n.navigator?n.navigator:r,o=e||(i&&i.userAgent?i.userAgent:""),w=i&&i.userAgentData?i.userAgentData:r,g=t?function(e,t){var i={};for(var o in e)t[o]&&t[o].length%2===0?i[o]=t[o].concat(e[o]):i[o]=e[o];return i}(J,t):J,_=i&&i.userAgent==o;return this.getBrowser=function(){var e,t={};return t[p]=r,t[b]=r,G.call(t,o,g.browser),t[d]=typeof(e=t[b])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:r,_&&i&&i.brave&&typeof i.brave.isBrave==a&&(t[p]="Brave"),t},this.getCPU=function(){var e={};return e[E]=r,G.call(e,o,g.cpu),e},this.getDevice=function(){var e={};return e[f]=r,e[u]=r,e[m]=r,G.call(e,o,g.device),_&&!e[m]&&w&&w.mobile&&(e[m]=h),_&&"Macintosh"==e[u]&&i&&typeof i.standalone!==s&&i.maxTouchPoints&&i.maxTouchPoints>2&&(e[u]="iPad",e[m]=v),e},this.getEngine=function(){var e={};return e[p]=r,e[b]=r,G.call(e,o,g.engine),e},this.getOS=function(){var e={};return e[p]=r,e[b]=r,G.call(e,o,g.os),_&&!e[p]&&w&&"Unknown"!=w.platform&&(e[p]=w.platform.replace(/chrome os/i,Z).replace(/macos/i,z)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return o},this.setUA=function(e){return o=typeof e===c&&e.length>500?V(e,500):e,this},this.setUA(o),this};$.VERSION="1.0.37",$.BROWSER=H([p,b,d]),$.CPU=H([E]),$.DEVICE=H([u,f,m,w,h,g,v,_,T]),$.ENGINE=$.OS=H([p,b]),typeof t!==s?(e.exports&&(t=e.exports=$),t.UAParser=$):i.amdO?(o=function(){return $}.call(t,i,t,e))===r||(e.exports=o):typeof n!==s&&(n.UAParser=$);var Q=typeof n!==s&&(n.jQuery||n.Zepto);if(Q&&!Q.ua){var ee=new $;Q.ua=ee.getResult(),Q.ua.get=function(){return ee.getUA()},Q.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var i in t)Q.ua[i]=t[i]}}}("object"===typeof window?window:this)}}]);
|