import{r as t,h as o,H as e}from"./p-fa6b7678.js";import{C as n,P as r}from"./p-497acb43.js";const i=":host{--identicon-background-red:linear-gradient(136deg, #ff4270 6.86%, #ff7c7c 93.78%);--identicon-background-orange:linear-gradient(136deg, #f45532 6.86%, #ff9b63 93.78%);--identicon-background-yellow:linear-gradient(136deg, #ffa756 6.86%, #fbff47 93.78%);--identicon-background-green:linear-gradient(136deg, #0cae60 6.86%, #7bffd0 93.78%);--identicon-background-blue:linear-gradient(136deg, #476fff 6.86%, #47c8ff 93.78%);--identicon-background-purple:linear-gradient(136deg, #9747ff 6.86%, #da47ff 93.78%);--identicon-background-empty:linear-gradient(136deg, #aaaaaa 6.86%, #999999 93.78%);--identicon-arc-width:30%;display:block;aspect-ratio:1;border-radius:25%;position:relative;border:1px solid var(--cpsl-color-background-8)}:host>svg{fill:rgba(255, 255, 255, 0.6);position:absolute;width:var(--identicon-arc-width)}:host>svg.rotate90{transform:rotate(0.25turn)}:host>svg.rotate180{transform:rotate(0.5turn)}:host>svg.rotate270{transform:rotate(0.75turn)}:host>svg:nth-child(1){right:50%;bottom:50%}:host>svg:nth-child(2){left:50%;bottom:50%}:host>svg:nth-child(3){right:50%;top:50%}:host>svg:nth-child(4){left:50%;top:50%}:host(.red){background:var(--identicon-background-red)}:host(.orange){background:var(--identicon-background-orange)}:host(.green){background:var(--identicon-background-green)}:host(.yellow){background:var(--identicon-background-yellow)}:host(.blue){background:var(--identicon-background-blue)}:host(.purple){background:var(--identicon-background-purple)}:host(.empty){background:var(--identicon-background-empty)}:host(.avatar){border-radius:1000px}";const d=i;const a=t=>o("svg",{class:{rotate90:t===1,rotate180:t===2,rotate270:t===3},viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg"},o("g",{"clip-path":"url(#clip0_674_66)"},o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z"})),o("defs",null,o("clipPath",{id:"clip0_674_66"},o("rect",{width:"12",height:"12"}))));const l=t=>o("svg",{class:{rotate90:t===1,rotate180:t===2,rotate270:t===3},viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg"},o("g",{"clip-path":"url(#clip0_674_255)"},o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24ZM12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z"}),o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 18C15.3137 18 18 15.3137 18 12C18 8.68629 15.3137 6 12 6C8.68629 6 6 8.68629 6 12C6 15.3137 8.68629 18 12 18ZM12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z"})),o("defs",null,o("clipPath",{id:"clip0_674_255"},o("rect",{width:"12",height:"12"}))));const c=[[[0,0,0,0],[0,1,3,2]],[[1,1,0,0],[0,1,3,2]],[[0,1,0,1],[0,1,3,2]],[[0,0,1,1],[0,1,3,2]],[[1,0,1,0],[0,1,3,2]],[[1,1,1,1],[0,1,3,2]],[[0,0,0,0],[2,3,1,0]],[[1,1,1,1],[2,3,1,0]],[[1,1,1,1],[0,1,2,3]]];const s=class{constructor(o){t(this,o);this.hash=undefined;this.size="40px";this.variant="default";this.arcWidth="30%"}render(){let t;const n=!this.hash;if(!n)t=u(this.hash);return o(e,{key:"a3c8935e47ee631e95f63d02f32e022832229cb1",class:{red:(t===null||t===void 0?void 0:t.color)==="red",orange:(t===null||t===void 0?void 0:t.color)==="orange",yellow:(t===null||t===void 0?void 0:t.color)==="yellow",green:(t===null||t===void 0?void 0:t.color)==="green",blue:(t===null||t===void 0?void 0:t.color)==="blue",purple:(t===null||t===void 0?void 0:t.color)==="purple",empty:!(t===null||t===void 0?void 0:t.color)&&!this.hash,avatar:this.variant==="avatar"},style:{width:this.size,height:this.size,["--identicon-arc-width"]:this.arcWidth}},(t===null||t===void 0?void 0:t.shapes)&&(t===null||t===void 0?void 0:t.rotations)&&t.shapes.map(((o,e)=>o?l(t.rotations[e]):a(t.rotations[e]))))}};const g=[n.length,c.length,16];function u(t){const o=new r(t);const[e,i,d]=g.map((t=>o.nextInt(0,t-1)));const a=Math.floor(d/4);const[l,s]=[d%2===1,d%4>=2];return{color:n[e],shapes:c[i][0].map(((t,o)=>o===a?l?t===1?false:true:t===1:t===1)),rotations:c[i][1].map(((t,o)=>o===a?s?(t+2)%4:t:t))}}s.style=d;export{s as cpsl_identicon};
//# sourceMappingURL=p-f9274763.entry.js.map