import{j as e,T as v,bb as b,G as I,L as B,al as t}from"./vendor-mui-core-CDEc-eG6.js";import"./vendor-utils-_C9URqjS.js";import{bx as T,h as P,ah as E,U as j,ag as M}from"./vendor-ux-bFYdDLNG.js";import{a as A}from"./vendor-hooks-BrgYeCrj.js";import{M as C}from"./use-blocklet-logo-BSClbuwz.js";function S({linkProps:o=void 0,showExtra:s=!1,...n}){return e.jsxs(v,{...n,children:["Powered by"," ",e.jsx(b,{href:"https://www.arcblock.io",target:"_blank",...o,children:"ArcBlock"}),"'s"," ",e.jsx(b,{href:"https://www.blocklet.io",target:"_blank",...o,children:"Blocklet Technology"}),s?", the decentralized web engine.":null]})}function W({did:o,children:s,title:n=void 0,description:a=void 0,actions:m=void 0,logo:i=void 0,logoSize:d=50,poweredBy:x=void 0,termsOfUse:g=void 0,standalone:y=!1}){const r=globalThis?.blocklet||globalThis?.env||{},{palette:f}=I(),c=B(l=>l.breakpoints.down("lg")),w=C({meta:r}),k=A(()=>{const l=r.appPid,u=T(l),D=u?void 0:P(l);return u?E(l):D.color},[r?.appPid]);if(!o)return s;n===void 0&&(n=r.appName),a===void 0&&(a=r.appDescription),i===void 0&&(i=w||""),typeof i=="string"&&(i?i=e.jsx(t,{sx:{height:d,maxHeight:d,objectFit:"contain"},component:"img",src:i,alt:`${r.appName}'s logo`}):i=e.jsx(j,{size:d,did:o,src:i,variant:"rounded"})),x===void 0&&(x=e.jsx(S,{linkProps:{color:f.text.secondary,sx:{"&:hover":{textDecoration:"underline"}}},showExtra:!c,sx:{textAlign:"center",fontSize:"12px",color:"text.secondary"}}));let p=s;!s&&!c&&(p=e.jsx(t,{sx:{filter:"blur(180px)",display:"flex"},children:e.jsx(j,{size:210,did:o,variant:"rounded"})}));const z=!!s;let h=!y;return c&&(h=!z),e.jsxs(t,{sx:{width:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",px:{xs:2,sm:4,md:8},pt:{xs:2,sm:4,md:6},pb:{xs:5,md:8},background:`radial-gradient(circle at bottom right, ${M(k,.3)} 10%, ${f.background.default} 50%)`,position:"relative"},children:[e.jsxs(t,{sx:{maxWidth:1200,display:"flex",alignItems:"center",justifyContent:[h,p].filter(Boolean).length>1?"space-between":"center",width:"100%",margin:"auto"},children:[h?e.jsxs(t,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[e.jsx(t,{sx:{display:"flex",alignItems:"center"},children:i}),e.jsx(v,{variant:"h2",sx:{fontWeight:"bold",fontSize:{sm:"2.25rem",md:"2.75rem",xl:"3.5rem"}},children:n}),a?e.jsx(t,{sx:{mb:2,color:"text.secondary"},children:a}):null,m?e.jsx(t,{sx:{mt:8},children:m}):null,g?e.jsx(t,{sx:{mt:-1,color:"grey"},children:g}):null]}):null,p]}),e.jsx(t,{sx:{position:"absolute",zIndex:10,bottom:10,left:10,right:10,textAlign:"center"},children:x})]})}export{W as K};
