class W extends HTMLElement{root;_rendered=!1;_abort=null;constructor(){super();xn(),this.root=this.attachShadow({mode:"open"})}connectedCallback(){if(typeof customElements>"u")return;if(!this._rendered)this._rendered=!0,this.onConnect()}disconnectedCallback(){this._abort?.abort(),this._abort=null}attributeChangedCallback(r,f,n){if(this._rendered)this.onAttributeChange(r)}onConnect(){this._refresh()}onAttributeChange(r){this._refresh()}async _refresh(){this._abort?.abort(),this._abort=new AbortController;let r=this._abort.signal;try{await this.refresh({signal:r})}catch(f){if(_n(f))return;let n=f instanceof Error?f.message:String(f);this.paintError(n,this.errorCss(),this.classifyError(f))}}errorCss(){return h}paint(r,f){this.root.innerHTML=`${r}`}paintLoading(r){this.root.innerHTML=`${this.loadingSkeleton()}`}loadingSkeleton(){return`
`}function Yn(r){return r.$type==="app.bsky.embed.images"}function Zn(r){return r.$type==="app.bsky.embed.external"}function dn(r){return r.$type==="app.bsky.embed.record"}function sn(r){return r.$type==="app.bsky.embed.recordWithMedia"}function Pn(r){return r.$type==="app.bsky.embed.video"}async function cn(r,f){let v=(await G(r,f?{signal:f}:{})).alsoKnownAs?.find(($)=>$.startsWith("at://"));return v?v.slice(5):r}function nf(r="atproto-post"){if(typeof customElements>"u")return;if(!customElements.get(r))customElements.define(r,ff)}var nr=` ${h} article { background: var(--atproto-bg); border: 1px solid var(--atproto-border); border-radius: var(--atproto-radius); box-shadow: var(--atproto-shadow); overflow: hidden; max-width: var(--atproto-max-width); transition: var(--atproto-transition); } .banner { width: 100%; height: 140px; background: linear-gradient(135deg, color-mix(in srgb, var(--atproto-accent) 25%, transparent), var(--atproto-border)); } .banner img { width: 100%; height: 100%; object-fit: cover; display: block; } .head { padding: var(--atproto-space-4); display: grid; grid-template-columns: auto 1fr; column-gap: var(--atproto-space-4); row-gap: var(--atproto-space-2); } .avatar { width: var(--atproto-avatar-size-lg); height: var(--atproto-avatar-size-lg); margin-top: -50px; border: 3px solid var(--atproto-bg); border-radius: 50%; background: var(--atproto-border); overflow: hidden; grid-row: 1 / span 2; } .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; } .names { display: flex; flex-direction: column; gap: 0.1rem; padding-top: var(--atproto-space-1); min-width: 0; } .names a { color: inherit; text-decoration: none; } .names a:hover .display-name, .names a:hover .handle { text-decoration: underline; } .display-name { font-size: var(--atproto-font-size-xl); font-weight: var(--atproto-font-weight-bold); line-height: var(--atproto-line-height-tight); letter-spacing: var(--atproto-letter-spacing-tight); word-break: break-word; } .handle { color: var(--atproto-muted); font-size: var(--atproto-font-size-sm); word-break: break-word; } .description { grid-column: 1 / -1; white-space: pre-wrap; color: var(--atproto-text); margin-top: var(--atproto-space-1); word-wrap: break-word; } .stats { display: flex; gap: var(--atproto-space-6); padding: var(--atproto-space-3) var(--atproto-space-4); border-top: 1px solid var(--atproto-border); color: var(--atproto-muted); font-size: var(--atproto-font-size-sm); flex-wrap: wrap; } .stats b { color: var(--atproto-text); font-weight: var(--atproto-font-weight-bold); margin-right: var(--atproto-space-1); } `;function k(r){return r.replace(/[<>&"]/g,(f)=>({"<":"<",">":">","&":"&",'"':"""})[f])}function qn(r,f,n){return`${r}/xrpc/com.atproto.sync.getBlob?did=${encodeURIComponent(f)}&cid=${encodeURIComponent(n.ref.$link)}`}async function en(r,f){if(r.startsWith("did:"))return r;if(r.startsWith("at://")){let n=r.slice(5).split("/")[0];if(!n)throw Error(`invalid at-uri: ${r}`);return n.startsWith("did:")?n:await Z(n,f?{signal:f}:{})}return await Z(r,f?{signal:f}:{})}async function rv(r,f){let v=(await G(r,f?{signal:f}:{})).alsoKnownAs?.find(($)=>$.startsWith("at://"));return v?v.slice(5):r}async function Nn(r,f,n,v){let $=0,y;for(let u=0;u<10;u++){let w=await H(r,f,{limit:100,...y?{cursor:y}:{},signal:v});if($+=w.records.length,$>=n)return{exact:!1,value:n};if(!w.cursor||w.records.length===0)return{exact:!0,value:$};y=w.cursor}return{exact:!1,value:n}}function Xn(r){if(r.exact)return r.value.toLocaleString();return`${r.value.toLocaleString()}+`}class vf extends W{static observedAttributes=["src","constellation"];errorCss(){return nr}loadingSkeleton(){return`
${Lr($)}