1import{p as d}from"../base-Ci7vLHE_.js";import"../preload-helper-BVLnHgTN.js";var p=Object.defineProperty,m=t=>{throw TypeError(t)},v=(t,e,s)=>e in t?p(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e,s)=>v(t,e+"",s),w=(t,e,s)=>e.has(t)||m("Cannot "+s),y=(t,e,s)=>e.has(t)?m("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),l=(t,e,s)=>(w(t,e,"access private method"),s);let c;if(Intl.Segmenter){let t=function(n){const a=[...s.segment(n)].map(r=>r.segment);return a.length>0?a[0]:null};const e=new Intl.Segmenter([],{granularity:"word"}),s=new Intl.Segmenter([],{granularity:"grapheme"});c=function(n){let a=[...e.segment(n)].filter(r=>r.isWordLike).map(r=>t(r.segment));return a.length>2&&(a=a.filter(r=>r.toLocaleUpperCase()===r).slice(0,2)),a}}else c=function(t){return t.split(/\s+/).map(e=>e.substring(0,1).toUpperCase()).slice(0,2)};var o,i;const u=class h extends d{constructor(){super(),y(this,o),this.shadowRoot.querySelector("figure")||this.shadowRoot.appendChild(this.ownerDocument.createElement("figure"))}connectedCallback(){const e=this.getAttribute("name")||"",s=this.getAttribute("src")||"",n=c(e),a=this.shadowRoot.querySelector("figure");if(s){let r=this.shadowRoot.querySelector("img");if(r&&r.src===s)return;r&&r.remove(),r=document.createElement("img"),r.src=s,r.alt=e,r.addEventListener("error",()=>l(this,o,i).call(this,n,a)),a.appendChild(r),a.querySelectorAll("svg").forEach(g=>g.remove())}else{let r=this.shadowRoot.querySelector("img");r?r.addEventListener("error",()=>l(this,o,i).call(this,n,a)):l(this,o,i).call(this,n,a)}}static register(){customElements.get("g2ui-avatar")||customElements.define("g2ui-avatar",h)}};o=new WeakSet,i=function(t,e){e.innerHTML=` 2 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"> 3 <text x="50" y="50" 4 dy="0.35em" 5 font-size="40" 6 text-anchor="middle"> 7 ${t.join("")} 8 </text> 9 </svg> 10 `,e.querySelectorAll("img").forEach(s=>s.remove())},f(u,"adopt",[new URL("/apps/framework/build/css/g2ui-avatar-_5sJVGVr.css",import.meta.url)]);let E=u;export{E as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.