@grasco/profile-picture 0.1.4 → 0.1.6

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.
@@ -1,7 +1,7 @@
1
- var Ve=Object.defineProperty;var qe=Object.getOwnPropertyDescriptor;var d=(n,e,t,r)=>{for(var i=r>1?void 0:r?qe(e,t):e,o=n.length-1,s;o>=0;o--)(s=n[o])&&(i=(r?s(e,t,i):s(i))||i);return r&&i&&Ve(e,t,i),i};var qt="grasco-profile-picture-styles",ct=false;function Yt(){if(ct||typeof document>"u")return;if(document.getElementById(qt)){ct=true;return}if(document.querySelector('link[href*="profile-picture"][href$="styles.css"]')){ct=true;return}let e=Ye();if(!e)return;let t=document.createElement("link");t.id=qt,t.rel="stylesheet",t.href=e,document.head.appendChild(t),ct=true;}function Ye(){if(typeof window<"u"&&window.__GRASCO_PROFILE_PICTURE_CSS__)return window.__GRASCO_PROFILE_PICTURE_CSS__;try{let e=import.meta.url;if(e)return `${e.substring(0,e.lastIndexOf("/")+1)}dist/styles.css`}catch{}let n=document.currentScript;if(n?.src){let e=new URL(n.src);return `${e.href.substring(0,e.href.lastIndexOf("/")+1)}dist/styles.css`}return null}var Kt=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=true,this.__host=e;}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),true}reportValidity(){return true}setFormValue(){}setValidity(){}};var T=function(n,e,t,r,i){if(typeof e=="function"?n!==e||true:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(n,t),t},_=function(n,e,t,r){if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(n):r?r.value:e.get(n)},j,ht,ut,X,At,Z,gt,B,Q,N,mt,Jt,Xt=n=>typeof n=="boolean"?n:n?.capture??false;var Rt=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map;}addEventListener(e,t,r){if(t==null)return;let i=Xt(r)?this.__captureEventListeners:this.__eventListeners,o=i.get(e);if(o===void 0)o=new Map,i.set(e,o);else if(o.has(t))return;let s=typeof r=="object"&&r?r:{};s.signal?.addEventListener("abort",()=>this.removeEventListener(e,t,r)),o.set(t,s??{});}removeEventListener(e,t,r){if(t==null)return;let i=Xt(r)?this.__captureEventListeners:this.__eventListeners,o=i.get(e);o!==void 0&&(o.delete(t),o.size||i.delete(e));}dispatchEvent(e){let t=[this],r=this.__eventTargetParent;if(e.composed)for(;r;)t.push(r),r=r.__eventTargetParent;else for(;r&&r!==this.__host;)t.push(r),r=r.__eventTargetParent;let i=false,o=false,s=0,p=null,a=null,c=null,m=e.stopPropagation,g=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return p??a},...f},srcElement:{get(){return e.target},...f},currentTarget:{get(){return c},...f},eventPhase:{get(){return s},...f},composedPath:{value:()=>t,...f},stopPropagation:{value:()=>{i=true,m.call(e);},...f},stopImmediatePropagation:{value:()=>{o=true,g.call(e);},...f}});let w=(v,A,L)=>{typeof v=="function"?v(e):typeof v?.handleEvent=="function"&&v.handleEvent(e),A.once&&L.delete(v);},S=()=>(c=null,s=0,!e.defaultPrevented),b=t.slice().reverse();p=!this.__host||!e.composed?this:null;let $=v=>{for(a=this;a.__host&&v.includes(a.__host);)a=a.__host;};for(let v of b){!p&&(!a||a===v.__host)&&$(b.slice(b.indexOf(v))),c=v,s=v===e.target?2:1;let A=v.__captureEventListeners.get(e.type);if(A){for(let[L,J]of A)if(w(L,J,A),o)return S()}if(i)return S()}let G=e.bubbles?t:[this];a=null;for(let v of G){!p&&(!a||v===a.__host)&&$(G.slice(0,G.indexOf(v)+1)),c=v,s=v===e.target?2:3;let A=v.__eventListeners.get(e.type);if(A){for(let[L,J]of A)if(w(L,J,A),o)return S()}if(i)return S()}return S()}},Tt=Rt;var f={__proto__:null};f.enumerable=true;Object.freeze(f);var kt=(N=class{constructor(e,t={}){if(j.set(this,false),ht.set(this,false),ut.set(this,false),X.set(this,false),At.set(this,Date.now()),Z.set(this,false),gt.set(this,void 0),B.set(this,void 0),Q.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof t!="object"||!t)throw new Error('The "options" argument must be an object');let{bubbles:r,cancelable:i,composed:o}=t;T(this,j,!!i),T(this,ht,!!r),T(this,ut,!!o),T(this,gt,`${e}`),T(this,B,null),T(this,Q,false);}initEvent(e,t,r){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation();}preventDefault(){T(this,X,true);}get target(){return _(this,B,"f")}get currentTarget(){return _(this,B,"f")}get srcElement(){return _(this,B,"f")}get type(){return _(this,gt,"f")}get cancelable(){return _(this,j,"f")}get defaultPrevented(){return _(this,j,"f")&&_(this,X,"f")}get timeStamp(){return _(this,At,"f")}composedPath(){return _(this,Q,"f")?[_(this,B,"f")]:[]}get returnValue(){return !_(this,j,"f")||!_(this,X,"f")}get bubbles(){return _(this,ht,"f")}get composed(){return _(this,ut,"f")}get eventPhase(){return _(this,Q,"f")?N.AT_TARGET:N.NONE}get cancelBubble(){return _(this,Z,"f")}set cancelBubble(e){e&&T(this,Z,true);}stopPropagation(){T(this,Z,true);}get isTrusted(){return false}},j=new WeakMap,ht=new WeakMap,ut=new WeakMap,X=new WeakMap,At=new WeakMap,Z=new WeakMap,gt=new WeakMap,B=new WeakMap,Q=new WeakMap,N.NONE=0,N.CAPTURING_PHASE=1,N.AT_TARGET=2,N.BUBBLING_PHASE=3,N);Object.defineProperties(kt.prototype,{initEvent:f,stopImmediatePropagation:f,preventDefault:f,target:f,currentTarget:f,srcElement:f,type:f,cancelable:f,defaultPrevented:f,timeStamp:f,composedPath:f,returnValue:f,bubbles:f,composed:f,eventPhase:f,cancelBubble:f,stopPropagation:f,isTrusted:f});var Zt=(Jt=class extends kt{constructor(e,t={}){super(e,t),mt.set(this,void 0),T(this,mt,t?.detail??null);}initCustomEvent(e,t,r,i){throw new Error("Method not implemented.")}get detail(){return _(this,mt,"f")}},mt=new WeakMap,Jt);Object.defineProperties(Zt.prototype,{detail:f});var Mt=kt,It=Zt;var E;(E=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.__parentStyleSheet=null,this.cssText="";}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},E.STYLE_RULE=1,E.CHARSET_RULE=2,E.IMPORT_RULE=3,E.MEDIA_RULE=4,E.FONT_FACE_RULE=5,E.PAGE_RULE=6,E.NAMESPACE_RULE=10,E.KEYFRAMES_RULE=7,E.KEYFRAME_RULE=8,E.SUPPORTS_RULE=12,E.COUNTER_STYLE_RULE=11,E.FONT_FEATURE_VALUES_RULE=14,E);globalThis.Event??=Mt;globalThis.CustomEvent??=It;var Qt=new WeakMap,tt=n=>{let e=Qt.get(n);return e===void 0&&Qt.set(n,e=new Map),e},Ke=class extends Tt{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null;}get attributes(){return Array.from(tt(this)).map(([e,t])=>({name:e,value:t}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){tt(this).set(e,String(t));}removeAttribute(e){tt(this).delete(e);}toggleAttribute(e,t){if(this.hasAttribute(e)){if(t===void 0||!t)return this.removeAttribute(e),false}else return t===void 0||t?(this.setAttribute(e,""),true):false;return true}hasAttribute(e){return tt(this).has(e)}attachShadow(e){let t={host:this};return this.__shadowRootMode=e.mode,e&&e.mode==="open"&&(this.__shadowRoot=t),t}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let e=new Kt(this);return this.__internals=e,e}getAttribute(e){return tt(this).get(e)??null}};var Je=class extends Ke{},Ut=Je;globalThis.litServerRoot??=Object.defineProperty(new Ut,"localName",{get(){return "lit-server-root"}});function Xe(){let n,e;return {promise:new Promise((r,i)=>{n=r,e=i;}),resolve:n,reject:e}}var Lt=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map;}define(e,t){if(this.__definitions.has(e))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
2
- Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:t.observedAttributes??[]}),this.__reverseDefinitions.set(t,e),this.__pendingWhenDefineds.get(e)?.resolve(t),this.__pendingWhenDefineds.delete(e);}get(e){return this.__definitions.get(e)?.ctor}getName(e){return this.__reverseDefinitions.get(e)??null}upgrade(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(e){let t=this.__definitions.get(e);if(t)return t.ctor;let r=this.__pendingWhenDefineds.get(e);return r||(r=Xe(),this.__pendingWhenDefineds.set(e,r)),r.promise}},Ze=Lt;var te=new Ze;var et=globalThis,bt=et.ShadowRoot&&(et.ShadyCSS===void 0||et.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,re=Symbol(),ee=new WeakMap,ft=class{constructor(e,t,r){if(this._$cssResult$=true,r!==re)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t;}get styleSheet(){let e=this.o,t=this.t;if(bt&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=ee.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&ee.set(t,e));}return e}toString(){return this.cssText}},ne=n=>new ft(typeof n=="string"?n:n+"",void 0,re);var ie=(n,e)=>{if(bt)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),i=et.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=t.cssText,n.appendChild(r);}},Dt=bt||et.CSSStyleSheet===void 0?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return ne(t)})(n):n;var{is:Qe,defineProperty:tr,getOwnPropertyDescriptor:er,getOwnPropertyNames:rr,getOwnPropertySymbols:nr,getPrototypeOf:ir}=Object,it=globalThis;it.customElements??=te;var oe=it.trustedTypes,or=oe?oe.emptyScript:"",sr=it.reactiveElementPolyfillSupport,rt=(n,e)=>n,nt={toAttribute(n,e){switch(e){case Boolean:n=n?or:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n);}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n);}catch{t=null;}}return t}},xt=(n,e)=>!Qe(n,e),se={attribute:true,type:String,converter:nt,reflect:false,useDefault:false,hasChanged:xt};Symbol.metadata??=Symbol("metadata"),it.litPropertyMetadata??=new WeakMap;var U=class extends(globalThis.HTMLElement??Ut){static addInitializer(e){this._$Ei(),(this.l??=[]).push(e);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=se){if(t.state&&(t.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=true),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(e,r,t);i!==void 0&&tr(this.prototype,e,i);}}static getPropertyDescriptor(e,t,r){let{get:i,set:o}=er(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s;}};return {get:i,set(s){let p=i?.call(this);o?.call(this,s),this.requestUpdate(e,p,r);},configurable:true,enumerable:true}}static getPropertyOptions(e){return this.elementProperties.get(e)??se}static _$Ei(){if(this.hasOwnProperty(rt("elementProperties")))return;let e=ir(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties);}static finalize(){if(this.hasOwnProperty(rt("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(rt("properties"))){let t=this.properties,r=[...rr(t),...nr(t)];for(let i of r)this.createProperty(i,t[i]);}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,i]of t)this.elementProperties.set(r,i);}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let i=this._$Eu(t,r);i!==void 0&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let r=new Set(e.flat(1/0).reverse());for(let i of r)t.unshift(Dt(i));}else e!==void 0&&t.push(Dt(e));return t}static _$Eu(e,t){let r=t.attribute;return r===false?void 0:typeof r=="string"?r:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this));}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.();}removeController(e){this._$EO?.delete(e);}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e);}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ie(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(e=>e.hostConnected?.());}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.());}attributeChangedCallback(e,t,r){this._$AK(e,r);}_$ET(e,t){let r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===true){let o=(r.converter?.toAttribute!==void 0?r.converter:nt).toAttribute(t,r.type);this._$Em=e,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null;}}_$AK(e,t){let r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:nt;this._$Em=i;let p=s.fromAttribute(t,o.type);this[i]=p??this._$Ej?.get(i)??p,this._$Em=null;}}requestUpdate(e,t,r,i=false,o){if(e!==void 0){let s=this.constructor;if(i===false&&(o=this[e]),r??=s.getPropertyOptions(e),!((r.hasChanged??xt)(o,t)||r.useDefault&&r.reflect&&o===this._$Ej?.get(e)&&!this.hasAttribute(s._$Eu(e,r))))return;this.C(e,t,r);}this.isUpdatePending===false&&(this._$ES=this._$EP());}C(e,t,{useDefault:r,reflect:i,wrapped:o},s){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??t??this[e]),o!==true||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),i===true&&this._$Em!==e&&(this._$Eq??=new Set).add(e));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0;}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,o]of r){let{wrapped:s}=o,p=this[i];s!==true||this._$AL.has(i)||p===void 0||this.C(i,void 0,o,p);}}let e=false,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(t)):this._$EM();}catch(r){throw e=false,this._$EM(),r}e&&this._$AE(t);}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(e)),this.updated(e);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return true}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM();}updated(e){}firstUpdated(e){}};U.elementStyles=[],U.shadowRootOptions={mode:"open"},U[rt("elementProperties")]=new Map,U[rt("finalized")]=new Map,sr?.({ReactiveElement:U}),(it.reactiveElementVersions??=[]).push("2.1.2");var vt=globalThis,ae=n=>n,yt=vt.trustedTypes,pe=yt?yt.createPolicy("lit-html",{createHTML:n=>n}):void 0,ge="$lit$",z=`lit$${Math.random().toFixed(9).slice(2)}$`,me="?"+z,ar=`<${me}>`,F=vt.document===void 0?{createTreeWalker:()=>({})}:document,st=()=>F.createComment(""),at=n=>n===null||typeof n!="object"&&typeof n!="function",Ft=Array.isArray,pr=n=>Ft(n)||typeof n?.[Symbol.iterator]=="function",Ot=`[
3
- \f\r]`,ot=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,le=/-->/g,de=/>/g,P=RegExp(`>|${Ot}(?:([^\\s"'>=/]+)(${Ot}*=${Ot}*(?:[^
4
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ce=/'/g,he=/"/g,fe=/^(?:script|style|textarea|title)$/i,Gt=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),x=Gt(1),D=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),ue=new WeakMap,H=F.createTreeWalker(F,129);function be(n,e){if(!Ft(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return pe!==void 0?pe.createHTML(e):e}var lr=(n,e)=>{let t=n.length-1,r=[],i,o=e===2?"<svg>":e===3?"<math>":"",s=ot;for(let p=0;p<t;p++){let a=n[p],c,m,g=-1,w=0;for(;w<a.length&&(s.lastIndex=w,m=s.exec(a),m!==null);)w=s.lastIndex,s===ot?m[1]==="!--"?s=le:m[1]!==void 0?s=de:m[2]!==void 0?(fe.test(m[2])&&(i=RegExp("</"+m[2],"g")),s=P):m[3]!==void 0&&(s=P):s===P?m[0]===">"?(s=i??ot,g=-1):m[1]===void 0?g=-2:(g=s.lastIndex-m[2].length,c=m[1],s=m[3]===void 0?P:m[3]==='"'?he:ce):s===he||s===ce?s=P:s===le||s===de?s=ot:(s=P,i=void 0);let S=s===P&&n[p+1].startsWith("/>")?" ":"";o+=s===ot?a+ar:g>=0?(r.push(c),a.slice(0,g)+ge+a.slice(g)+z+S):a+z+(g===-2?p:S);}return [be(n,o+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},pt=class n{constructor({strings:e,_$litType$:t},r){let i;this.parts=[];let o=0,s=0,p=e.length-1,a=this.parts,[c,m]=lr(e,t);if(this.el=n.createElement(c,r),H.currentNode=this.el.content,t===2||t===3){let g=this.el.content.firstChild;g.replaceWith(...g.childNodes);}for(;(i=H.nextNode())!==null&&a.length<p;){if(i.nodeType===1){if(i.hasAttributes())for(let g of i.getAttributeNames())if(g.endsWith(ge)){let w=m[s++],S=i.getAttribute(g).split(z),b=/([.?@])?(.*)/.exec(w);a.push({type:1,index:o,name:b[2],strings:S,ctor:b[1]==="."?zt:b[1]==="?"?Bt:b[1]==="@"?Pt:V}),i.removeAttribute(g);}else g.startsWith(z)&&(a.push({type:6,index:o}),i.removeAttribute(g));if(fe.test(i.tagName)){let g=i.textContent.split(z),w=g.length-1;if(w>0){i.textContent=yt?yt.emptyScript:"";for(let S=0;S<w;S++)i.append(g[S],st()),H.nextNode(),a.push({type:2,index:++o});i.append(g[w],st());}}}else if(i.nodeType===8)if(i.data===me)a.push({type:2,index:o});else {let g=-1;for(;(g=i.data.indexOf(z,g+1))!==-1;)a.push({type:7,index:o}),g+=z.length-1;}o++;}}static createElement(e,t){let r=F.createElement("template");return r.innerHTML=e,r}};function W(n,e,t=n,r){if(e===D)return e;let i=r!==void 0?t._$Co?.[r]:t._$Cl,o=at(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(false),o===void 0?i=void 0:(i=new o(n),i._$AT(n,t,r)),r!==void 0?(t._$Co??=[])[r]=i:t._$Cl=i),i!==void 0&&(e=W(n,i._$AS(n,e.values),i,r)),e}var Nt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:r}=this._$AD,i=(e?.creationScope??F).importNode(t,true);H.currentNode=i;let o=H.nextNode(),s=0,p=0,a=r[0];for(;a!==void 0;){if(s===a.index){let c;a.type===2?c=new lt(o,o.nextSibling,this,e):a.type===1?c=new a.ctor(o,a.name,a.strings,this,e):a.type===6&&(c=new Ht(o,this,e)),this._$AV.push(c),a=r[++p];}s!==a?.index&&(o=H.nextNode(),s++);}return H.currentNode=F,i}p(e){let t=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++;}},lt=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,i){this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??true;}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=W(this,e,t),at(e)?e===h||e==null||e===""?(this._$AH!==h&&this._$AR(),this._$AH=h):e!==this._$AH&&e!==D&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):pr(e)?this.k(e):this._(e);}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e));}_(e){this._$AH!==h&&at(this._$AH)?this._$AA.nextSibling.data=e:this.T(F.createTextNode(e)),this._$AH=e;}$(e){let{values:t,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=pt.createElement(be(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(t);else {let o=new Nt(i,this),s=o.u(this.options);o.p(t),this.T(s),this._$AH=o;}}_$AC(e){let t=ue.get(e.strings);return t===void 0&&ue.set(e.strings,t=new pt(e)),t}k(e){Ft(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,i=0;for(let o of e)i===t.length?t.push(r=new n(this.O(st()),this.O(st()),this,this.options)):r=t[i],r._$AI(o),i++;i<t.length&&(this._$AR(r&&r._$AB.nextSibling,i),t.length=i);}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(false,true,t);e!==this._$AB;){let r=ae(e).nextSibling;ae(e).remove(),e=r;}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e));}},V=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,i,o){this.type=1,this._$AH=h,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=h;}_$AI(e,t=this,r,i){let o=this.strings,s=false;if(o===void 0)e=W(this,e,t,0),s=!at(e)||e!==this._$AH&&e!==D,s&&(this._$AH=e);else {let p=e,a,c;for(e=o[0],a=0;a<o.length-1;a++)c=W(this,p[r+a],t,a),c===D&&(c=this._$AH[a]),s||=!at(c)||c!==this._$AH[a],c===h?e=h:e!==h&&(e+=(c??"")+o[a+1]),this._$AH[a]=c;}s&&!i&&this.j(e);}j(e){e===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"");}},zt=class extends V{constructor(){super(...arguments),this.type=3;}j(e){this.element[this.name]=e===h?void 0:e;}},Bt=class extends V{constructor(){super(...arguments),this.type=4;}j(e){this.element.toggleAttribute(this.name,!!e&&e!==h);}},Pt=class extends V{constructor(e,t,r,i,o){super(e,t,r,i,o),this.type=5;}_$AI(e,t=this){if((e=W(this,e,t,0)??h)===D)return;let r=this._$AH,i=e===h&&r!==h||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==h&&(r===h||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,e),this._$AH=e;}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e);}},Ht=class{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r;}get _$AU(){return this._$AM._$AU}_$AI(e){W(this,e);}};var dr=vt.litHtmlPolyfillSupport;dr?.(pt,lt),(vt.litHtmlVersions??=[]).push("3.3.2");var q=(n,e,t)=>{let r=t?.renderBefore??e,i=r._$litPart$;if(i===void 0){let o=t?.renderBefore??null;r._$litPart$=i=new lt(e.insertBefore(st(),o),o,void 0,t??{});}return i._$AI(n),i};var jt=globalThis,k=class extends U{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=q(t,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return D}};k._$litElement$=true,k.finalized=true,jt.litElementHydrateSupport?.({LitElement:k});var cr=jt.litElementPolyfillSupport;cr?.({LitElement:k});(jt.litElementVersions??=[]).push("4.2.2");var wt=n=>(e,t)=>{t!==void 0?t.addInitializer(()=>{customElements.define(n,e);}):customElements.define(n,e);};var hr={attribute:true,type:String,converter:nt,reflect:false,hasChanged:xt},ur=(n=hr,e,t)=>{let{kind:r,metadata:i}=t,o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),o.set(t.name,n),r==="accessor"){let{name:s}=t;return {set(p){let a=e.get.call(this);e.set.call(this,p),this.requestUpdate(s,a,n,true,p);},init(p){return p!==void 0&&this.C(s,void 0,n,p),p}}}if(r==="setter"){let{name:s}=t;return function(p){let a=this[s];e.call(this,p),this.requestUpdate(s,a,n,true,p);}}throw Error("Unsupported decorator location: "+r)};function u(n){return (e,t)=>typeof t=="object"?ur(n,e,t):((r,i,o)=>{let s=i.hasOwnProperty(o);return i.constructor.createProperty(o,r),s?Object.getOwnPropertyDescriptor(i,o):void 0})(n,e,t)}function O(n){return u({...n,state:true,attribute:false})}var xe={ATTRIBUTE:1},ye=n=>(...e)=>({_$litDirective$:n,values:e}),Ct=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r;}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}};var ve="important",gr=" !"+ve,y=ye(class extends Ct{constructor(n){if(super(n),n.type!==xe.ATTRIBUTE||n.name!=="style"||n.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((e,t)=>{let r=n[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(n,[e]){let{style:t}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(let r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?t.removeProperty(r):t[r]=null);for(let r in e){let i=e[r];if(i!=null){this.ft.add(r);let o=typeof i=="string"&&i.endsWith(gr);r.includes("-")||o?t.setProperty(r,o?i.slice(0,-11):i,o?ve:""):t[r]=i;}}return D}});var Y={"2xs":20,xs:24,sm:32,md:40,lg:48,xl:64,"2xl":80,"3xl":120},we={online:"#30D158",away:"#FFD60A",busy:"#FF453A",offline:"#8E8E93",dnd:"#FF453A"},Se={none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",glow:"0 0 20px 0 rgba(99, 102, 241, 0.3)"},M={size:"md",variant:"circle",loading:"lazy",placeholder:"shimmer",borderWidth:2,borderColor:"#ffffff",placeholderColor:"#f3f4f6",shadow:"sm"};var K={circle:"9999px",rounded:"12px",squircle:"30%",square:"0px"},I={max:4,direction:"ltr",overlap:.3,size:"md",tooltipDelay:300,dropdownMaxHeight:280,animated:true};function R(...n){return n.filter(Boolean).join(" ")}function dt(n){return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(n)}function Ce(n){return {"top-left":"np:top-0 np:left-0","top-center":"np:top-0 np:left-1/2 np:-translate-x-1/2","top-right":"np:top-0 np:right-0","bottom-left":"np:bottom-0 np:left-0","bottom-center":"np:bottom-0 np:left-1/2 np:-translate-x-1/2","bottom-right":"np:bottom-0 np:right-0"}[n]}function _e(n){return {"top-left":"np:-rotate-45 np:-translate-x-1/4 np:-translate-y-1/2","top-center":"np:rotate-0 np:-translate-y-1/2","top-right":"np:rotate-45 np:translate-x-1/4 np:-translate-y-1/2","bottom-left":"np:rotate-45 np:-translate-x-1/4 np:translate-y-1/2","bottom-center":"np:rotate-0 np:translate-y-1/2","bottom-right":"np:-rotate-45 np:translate-x-1/4 np:translate-y-1/2"}[n]}function _t(n){let t=n.trim().replace(/[^\w\s]/g,"").split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,1).toUpperCase():(t[0][0]+(t.at(-1)?.[0]??"")).toUpperCase()}function Wt(n){return Math.round(n*.38)}function Ee(n,e){let t;if(e){let i=Math.round(n*.31);t=Math.min(24,Math.max(14,i));}else {let i=Math.round(n*.22);t=Math.min(14,Math.max(8,i));}let r=Math.max(9,Math.round(t*.55));return {size:t,fontSize:r}}function $e(n,e){let t=Math.min(16,Math.max(8,Math.round(n*.2)));return Math.min(18,t+(e-1)*2)}function Ae(n,e){return typeof n=="string"?n:e&&n>e?`${e}+`:n.toString()}function Re(n){return n.length===0?"transparent":n.length===1?n[0]:`conic-gradient(${n.map((t,r)=>{let i=r/n.length*360,o=(r+1)/n.length*360;return `${t} ${i}deg ${o}deg`}).join(", ")})`}function mr(n){let e=0;for(let t=0;t<n.length;t++){let r=n.charCodeAt(t);e=(e<<5)-e+r,e&=e;}return Math.abs(e)}function Te(n,e,t){let i=Math.max(0,Math.min(100,n))/100*360;return `conic-gradient(from 270deg, ${e} 0deg ${i}deg, ${t} ${i}deg 360deg)`}function Et(n){let e=["linear-gradient(135deg, #667eea 0%, #764ba2 100%)","linear-gradient(135deg, #f093fb 0%, #f5576c 100%)","linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)","linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)","linear-gradient(135deg, #fa709a 0%, #fee140 100%)","linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)","linear-gradient(135deg, #d299c2 0%, #fef9d7 100%)","linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)","linear-gradient(135deg, #cd9cf2 0%, #f6f3ff 100%)","linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)"],t=mr(n)%e.length;return e[t]}function ke(n){return typeof n=="number"?n:Y[n]??Y[I.size]}function Vt(n,e,t){let r=t?e-1:e;if(n<=r)return {visible:n,hidden:0,showCounter:false};let i=r-1,o=n-i;return {visible:i,hidden:o,showCounter:true}}function $t(n,e,t,r,i){let o=i??e*(1-t);return n*o}function Me(n,e,t){return t==="ltr"?e-n:n+1}function Ie(n,e,t,r){if(n===0)return 0;if(n===1)return e;let i=r??e*(1-t);return e+i*(n-1)}function Le(n){return n>99?"+99":`+${n}`}function Ue(n){return n<=80?"80":n<=120?"120":n<=240?"240":n<=480?"480":"960"}function De(n){if(!(n&&dt(n)))return "light";let e=n.replace("#","");e.length===3&&(e=e.split("").map(s=>s+s).join(""));let t=Number.parseInt(e.slice(0,2),16),r=Number.parseInt(e.slice(2,4),16),i=Number.parseInt(e.slice(4,6),16);return (.299*t+.587*r+.114*i)/255>.5?"light":"dark"}function Oe(n,e,t,r,i){let o=n.endsWith("/")?n.slice(0,-1):n,s=`${e}_${t}_${r}.webp`;return `${o}/api/profile-picture/cdn/${s}?hostname=${i}`}function Ne(n){return {circle:"np:rounded-full",rounded:"np:rounded-xl",squircle:"np:rounded-[30%]",square:"np:rounded-none"}[n]}function ze(n,e){return {className:{1:"np:border",2:"np:border-2",3:"np:border-[3px]",4:"np:border-4",5:"np:border-[5px]",6:"np:border-[6px]",8:"np:border-8"}[n],style:{borderColor:e,borderStyle:"solid"}}}function Be(n,e){return e?{className:"",style:{background:e}}:n?n.includes("gradient")?{className:"",style:{background:n}}:{className:"",style:{backgroundColor:n}}:{className:"",style:{backgroundColor:"#e7e7e7"}}}function Pe(n){return {boxShadow:Se[n]}}var fr={shimmer:`
1
+ var We=Object.defineProperty;var Ve=Object.getOwnPropertyDescriptor;var d=(n,t,e,r)=>{for(var i=r>1?void 0:r?Ve(t,e):t,o=n.length-1,s;o>=0;o--)(s=n[o])&&(i=(r?s(t,e,i):s(i))||i);return r&&i&&We(t,e,i),i};var $t="grasco-profile-picture-styles",G=false,Kt=false;function Jt(){if(G||typeof document>"u")return;if(document.getElementById($t)){G=true;return}if(document.querySelector('link[href*="profile-picture"][href$="styles.css"]')){G=true;return}Kt||(Kt=true,qe());}function qe(){(typeof requestIdleCallback<"u"?requestIdleCallback:t=>setTimeout(t,1))(()=>Ye());}function Ye(){if(G||typeof document>"u")return;if(document.getElementById($t)){G=true;return}let n=Ke();if(!n)return;let t=document.createElement("link");t.id=$t,t.rel="stylesheet",t.href=n,document.head.appendChild(t),G=true;}function Ke(){if(typeof window<"u"&&window.__GRASCO_PROFILE_PICTURE_CSS__)return window.__GRASCO_PROFILE_PICTURE_CSS__;try{let t=import.meta.url;if(t)return `${t.substring(0,t.lastIndexOf("/")+1)}dist/styles.css`}catch{}let n=document.currentScript;if(n?.src){let t=new URL(n.src);return `${t.href.substring(0,t.href.lastIndexOf("/")+1)}dist/styles.css`}return null}var Xt=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(t){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=true,this.__host=t;}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),true}reportValidity(){return true}setFormValue(){}setValidity(){}};var T=function(n,t,e,r,i){if(typeof t=="function"?n!==t||true:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(n,e),e},E=function(n,t,e,r){if(typeof t=="function"?n!==t||!r:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?r:e==="a"?r.call(n):r?r.value:t.get(n)},W,ct,ht,Z,At,Q,ut,P,tt,z,gt,Zt,Qt=n=>typeof n=="boolean"?n:n?.capture??false;var Tt=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map;}addEventListener(t,e,r){if(e==null)return;let i=Qt(r)?this.__captureEventListeners:this.__eventListeners,o=i.get(t);if(o===void 0)o=new Map,i.set(t,o);else if(o.has(e))return;let s=typeof r=="object"&&r?r:{};s.signal?.addEventListener("abort",()=>this.removeEventListener(t,e,r)),o.set(e,s??{});}removeEventListener(t,e,r){if(e==null)return;let i=Qt(r)?this.__captureEventListeners:this.__eventListeners,o=i.get(t);o!==void 0&&(o.delete(e),o.size||i.delete(t));}dispatchEvent(t){let e=[this],r=this.__eventTargetParent;if(t.composed)for(;r;)e.push(r),r=r.__eventTargetParent;else for(;r&&r!==this.__host;)e.push(r),r=r.__eventTargetParent;let i=false,o=false,s=0,p=null,a=null,h=null,m=t.stopPropagation,g=t.stopImmediatePropagation;Object.defineProperties(t,{target:{get(){return p??a},...f},srcElement:{get(){return t.target},...f},currentTarget:{get(){return h},...f},eventPhase:{get(){return s},...f},composedPath:{value:()=>e,...f},stopPropagation:{value:()=>{i=true,m.call(t);},...f},stopImmediatePropagation:{value:()=>{o=true,g.call(t);},...f}});let w=(y,A,M)=>{typeof y=="function"?y(t):typeof y?.handleEvent=="function"&&y.handleEvent(t),A.once&&M.delete(y);},S=()=>(h=null,s=0,!t.defaultPrevented),_=e.slice().reverse();p=!this.__host||!t.composed?this:null;let v=y=>{for(a=this;a.__host&&y.includes(a.__host);)a=a.__host;};for(let y of _){!p&&(!a||a===y.__host)&&v(_.slice(_.indexOf(y))),h=y,s=y===t.target?2:1;let A=y.__captureEventListeners.get(t.type);if(A){for(let[M,X]of A)if(w(M,X,A),o)return S()}if(i)return S()}let N=t.bubbles?e:[this];a=null;for(let y of N){!p&&(!a||y===a.__host)&&v(N.slice(0,N.indexOf(y)+1)),h=y,s=y===t.target?2:3;let A=y.__eventListeners.get(t.type);if(A){for(let[M,X]of A)if(w(M,X,A),o)return S()}if(i)return S()}return S()}},Rt=Tt;var f={__proto__:null};f.enumerable=true;Object.freeze(f);var kt=(z=class{constructor(t,e={}){if(W.set(this,false),ct.set(this,false),ht.set(this,false),Z.set(this,false),At.set(this,Date.now()),Q.set(this,false),ut.set(this,void 0),P.set(this,void 0),tt.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof e!="object"||!e)throw new Error('The "options" argument must be an object');let{bubbles:r,cancelable:i,composed:o}=e;T(this,W,!!i),T(this,ct,!!r),T(this,ht,!!o),T(this,ut,`${t}`),T(this,P,null),T(this,tt,false);}initEvent(t,e,r){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation();}preventDefault(){T(this,Z,true);}get target(){return E(this,P,"f")}get currentTarget(){return E(this,P,"f")}get srcElement(){return E(this,P,"f")}get type(){return E(this,ut,"f")}get cancelable(){return E(this,W,"f")}get defaultPrevented(){return E(this,W,"f")&&E(this,Z,"f")}get timeStamp(){return E(this,At,"f")}composedPath(){return E(this,tt,"f")?[E(this,P,"f")]:[]}get returnValue(){return !E(this,W,"f")||!E(this,Z,"f")}get bubbles(){return E(this,ct,"f")}get composed(){return E(this,ht,"f")}get eventPhase(){return E(this,tt,"f")?z.AT_TARGET:z.NONE}get cancelBubble(){return E(this,Q,"f")}set cancelBubble(t){t&&T(this,Q,true);}stopPropagation(){T(this,Q,true);}get isTrusted(){return false}},W=new WeakMap,ct=new WeakMap,ht=new WeakMap,Z=new WeakMap,At=new WeakMap,Q=new WeakMap,ut=new WeakMap,P=new WeakMap,tt=new WeakMap,z.NONE=0,z.CAPTURING_PHASE=1,z.AT_TARGET=2,z.BUBBLING_PHASE=3,z);Object.defineProperties(kt.prototype,{initEvent:f,stopImmediatePropagation:f,preventDefault:f,target:f,currentTarget:f,srcElement:f,type:f,cancelable:f,defaultPrevented:f,timeStamp:f,composedPath:f,returnValue:f,bubbles:f,composed:f,eventPhase:f,cancelBubble:f,stopPropagation:f,isTrusted:f});var te=(Zt=class extends kt{constructor(t,e={}){super(t,e),gt.set(this,void 0),T(this,gt,e?.detail??null);}initCustomEvent(t,e,r,i){throw new Error("Method not implemented.")}get detail(){return E(this,gt,"f")}},gt=new WeakMap,Zt);Object.defineProperties(te.prototype,{detail:f});var It=kt,Mt=te;var $;($=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.__parentStyleSheet=null,this.cssText="";}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},$.STYLE_RULE=1,$.CHARSET_RULE=2,$.IMPORT_RULE=3,$.MEDIA_RULE=4,$.FONT_FACE_RULE=5,$.PAGE_RULE=6,$.NAMESPACE_RULE=10,$.KEYFRAMES_RULE=7,$.KEYFRAME_RULE=8,$.SUPPORTS_RULE=12,$.COUNTER_STYLE_RULE=11,$.FONT_FEATURE_VALUES_RULE=14,$);globalThis.Event??=It;globalThis.CustomEvent??=Mt;var ee=new WeakMap,et=n=>{let t=ee.get(n);return t===void 0&&ee.set(n,t=new Map),t},Je=class extends Rt{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null;}get attributes(){return Array.from(et(this)).map(([t,e])=>({name:t,value:e}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(t,e){et(this).set(t,String(e));}removeAttribute(t){et(this).delete(t);}toggleAttribute(t,e){if(this.hasAttribute(t)){if(e===void 0||!e)return this.removeAttribute(t),false}else return e===void 0||e?(this.setAttribute(t,""),true):false;return true}hasAttribute(t){return et(this).has(t)}attachShadow(t){let e={host:this};return this.__shadowRootMode=t.mode,t&&t.mode==="open"&&(this.__shadowRoot=e),e}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let t=new Xt(this);return this.__internals=t,t}getAttribute(t){return et(this).get(t)??null}};var Xe=class extends Je{},Ut=Xe;globalThis.litServerRoot??=Object.defineProperty(new Ut,"localName",{get(){return "lit-server-root"}});function Ze(){let n,t;return {promise:new Promise((r,i)=>{n=r,t=i;}),resolve:n,reject:t}}var Lt=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map;}define(t,e){if(this.__definitions.has(t))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${t}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
2
+ Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(this.__reverseDefinitions.has(e))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(e)}`);e.__localName=t,this.__definitions.set(t,{ctor:e,observedAttributes:e.observedAttributes??[]}),this.__reverseDefinitions.set(e,t),this.__pendingWhenDefineds.get(t)?.resolve(e),this.__pendingWhenDefineds.delete(t);}get(t){return this.__definitions.get(t)?.ctor}getName(t){return this.__reverseDefinitions.get(t)??null}upgrade(t){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(t){let e=this.__definitions.get(t);if(e)return e.ctor;let r=this.__pendingWhenDefineds.get(t);return r||(r=Ze(),this.__pendingWhenDefineds.set(t,r)),r.promise}},Qe=Lt;var re=new Qe;var rt=globalThis,ft=rt.ShadowRoot&&(rt.ShadyCSS===void 0||rt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ie=Symbol(),ne=new WeakMap,mt=class{constructor(t,e,r){if(this._$cssResult$=true,r!==ie)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o,e=this.t;if(ft&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=ne.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&ne.set(e,t));}return t}toString(){return this.cssText}},oe=n=>new mt(typeof n=="string"?n:n+"",void 0,ie);var se=(n,t)=>{if(ft)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=rt.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,n.appendChild(r);}},Ot=ft||rt.CSSStyleSheet===void 0?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return oe(e)})(n):n;var{is:tr,defineProperty:er,getOwnPropertyDescriptor:rr,getOwnPropertyNames:nr,getOwnPropertySymbols:ir,getPrototypeOf:or}=Object,ot=globalThis;ot.customElements??=re;var ae=ot.trustedTypes,sr=ae?ae.emptyScript:"",ar=ot.reactiveElementPolyfillSupport,nt=(n,t)=>n,it={toAttribute(n,t){switch(t){case Boolean:n=n?sr:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n);}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n);}catch{e=null;}}return e}},bt=(n,t)=>!tr(n,t),pe={attribute:true,type:String,converter:it,reflect:false,useDefault:false,hasChanged:bt};Symbol.metadata??=Symbol("metadata"),ot.litPropertyMetadata??=new WeakMap;var L=class extends(globalThis.HTMLElement??Ut){static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=pe){if(e.state&&(e.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=true),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(t,r,e);i!==void 0&&er(this.prototype,t,i);}}static getPropertyDescriptor(t,e,r){let{get:i,set:o}=rr(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s;}};return {get:i,set(s){let p=i?.call(this);o?.call(this,s),this.requestUpdate(t,p,r);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??pe}static _$Ei(){if(this.hasOwnProperty(nt("elementProperties")))return;let t=or(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(nt("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(nt("properties"))){let e=this.properties,r=[...nr(e),...ir(e)];for(let i of r)this.createProperty(i,e[i]);}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,i]of e)this.elementProperties.set(r,i);}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let i=this._$Eu(e,r);i!==void 0&&this._$Eh.set(i,e);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let i of r)e.unshift(Ot(i));}else t!==void 0&&e.push(Ot(t));return e}static _$Eu(t,e){let r=e.attribute;return r===false?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this));}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t);}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return se(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,e,r){this._$AK(t,r);}_$ET(t,e){let r=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,r);if(i!==void 0&&r.reflect===true){let o=(r.converter?.toAttribute!==void 0?r.converter:it).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null;}}_$AK(t,e){let r=this.constructor,i=r._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let o=r.getPropertyOptions(i),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:it;this._$Em=i;let p=s.fromAttribute(e,o.type);this[i]=p??this._$Ej?.get(i)??p,this._$Em=null;}}requestUpdate(t,e,r,i=false,o){if(t!==void 0){let s=this.constructor;if(i===false&&(o=this[t]),r??=s.getPropertyOptions(t),!((r.hasChanged??bt)(o,e)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(s._$Eu(t,r))))return;this.C(t,e,r);}this.isUpdatePending===false&&(this._$ES=this._$EP());}C(t,e,{useDefault:r,reflect:i,wrapped:o},s){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,s??e??this[t]),o!==true||s!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),i===true&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(e){Promise.reject(e);}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0;}let r=this.constructor.elementProperties;if(r.size>0)for(let[i,o]of r){let{wrapped:s}=o,p=this[i];s!==true||this._$AL.has(i)||p===void 0||this.C(i,void 0,o,p);}}let t=false,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM();}catch(r){throw t=false,this._$EM(),r}t&&this._$AE(e);}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM();}updated(t){}firstUpdated(t){}};L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[nt("elementProperties")]=new Map,L[nt("finalized")]=new Map,ar?.({ReactiveElement:L}),(ot.reactiveElementVersions??=[]).push("2.1.2");var xt=globalThis,le=n=>n,yt=xt.trustedTypes,de=yt?yt.createPolicy("lit-html",{createHTML:n=>n}):void 0,fe="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,be="?"+B,pr=`<${be}>`,j=xt.document===void 0?{createTreeWalker:()=>({})}:document,at=()=>j.createComment(""),pt=n=>n===null||typeof n!="object"&&typeof n!="function",Ft=Array.isArray,lr=n=>Ft(n)||typeof n?.[Symbol.iterator]=="function",Dt=`[
3
+ \f\r]`,st=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ce=/-->/g,he=/>/g,H=RegExp(`>|${Dt}(?:([^\\s"'>=/]+)(${Dt}*=${Dt}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),ue=/'/g,ge=/"/g,ye=/^(?:script|style|textarea|title)$/i,jt=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),b=jt(1),U=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),me=new WeakMap,F=j.createTreeWalker(j,129);function xe(n,t){if(!Ft(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return de!==void 0?de.createHTML(t):t}var dr=(n,t)=>{let e=n.length-1,r=[],i,o=t===2?"<svg>":t===3?"<math>":"",s=st;for(let p=0;p<e;p++){let a=n[p],h,m,g=-1,w=0;for(;w<a.length&&(s.lastIndex=w,m=s.exec(a),m!==null);)w=s.lastIndex,s===st?m[1]==="!--"?s=ce:m[1]!==void 0?s=he:m[2]!==void 0?(ye.test(m[2])&&(i=RegExp("</"+m[2],"g")),s=H):m[3]!==void 0&&(s=H):s===H?m[0]===">"?(s=i??st,g=-1):m[1]===void 0?g=-2:(g=s.lastIndex-m[2].length,h=m[1],s=m[3]===void 0?H:m[3]==='"'?ge:ue):s===ge||s===ue?s=H:s===ce||s===he?s=st:(s=H,i=void 0);let S=s===H&&n[p+1].startsWith("/>")?" ":"";o+=s===st?a+pr:g>=0?(r.push(h),a.slice(0,g)+fe+a.slice(g)+B+S):a+B+(g===-2?p:S);}return [xe(n,o+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},lt=class n{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let o=0,s=0,p=t.length-1,a=this.parts,[h,m]=dr(t,e);if(this.el=n.createElement(h,r),F.currentNode=this.el.content,e===2||e===3){let g=this.el.content.firstChild;g.replaceWith(...g.childNodes);}for(;(i=F.nextNode())!==null&&a.length<p;){if(i.nodeType===1){if(i.hasAttributes())for(let g of i.getAttributeNames())if(g.endsWith(fe)){let w=m[s++],S=i.getAttribute(g).split(B),_=/([.?@])?(.*)/.exec(w);a.push({type:1,index:o,name:_[2],strings:S,ctor:_[1]==="."?zt:_[1]==="?"?Bt:_[1]==="@"?Pt:q}),i.removeAttribute(g);}else g.startsWith(B)&&(a.push({type:6,index:o}),i.removeAttribute(g));if(ye.test(i.tagName)){let g=i.textContent.split(B),w=g.length-1;if(w>0){i.textContent=yt?yt.emptyScript:"";for(let S=0;S<w;S++)i.append(g[S],at()),F.nextNode(),a.push({type:2,index:++o});i.append(g[w],at());}}}else if(i.nodeType===8)if(i.data===be)a.push({type:2,index:o});else {let g=-1;for(;(g=i.data.indexOf(B,g+1))!==-1;)a.push({type:7,index:o}),g+=B.length-1;}o++;}}static createElement(t,e){let r=j.createElement("template");return r.innerHTML=t,r}};function V(n,t,e=n,r){if(t===U)return t;let i=r!==void 0?e._$Co?.[r]:e._$Cl,o=pt(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(false),o===void 0?i=void 0:(i=new o(n),i._$AT(n,e,r)),r!==void 0?(e._$Co??=[])[r]=i:e._$Cl=i),i!==void 0&&(t=V(n,i._$AS(n,t.values),i,r)),t}var Nt=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,i=(t?.creationScope??j).importNode(e,true);F.currentNode=i;let o=F.nextNode(),s=0,p=0,a=r[0];for(;a!==void 0;){if(s===a.index){let h;a.type===2?h=new dt(o,o.nextSibling,this,t):a.type===1?h=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(h=new Ht(o,this,t)),this._$AV.push(h),a=r[++p];}s!==a?.index&&(o=F.nextNode(),s++);}return F.currentNode=j,i}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++;}},dt=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,i){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??true;}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=V(this,t,e),pt(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==U&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):lr(t)?this.k(t):this._(t);}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t));}_(t){this._$AH!==u&&pt(this._$AH)?this._$AA.nextSibling.data=t:this.T(j.createTextNode(t)),this._$AH=t;}$(t){let{values:e,_$litType$:r}=t,i=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=lt.createElement(xe(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(e);else {let o=new Nt(i,this),s=o.u(this.options);o.p(e),this.T(s),this._$AH=o;}}_$AC(t){let e=me.get(t.strings);return e===void 0&&me.set(t.strings,e=new lt(t)),e}k(t){Ft(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,i=0;for(let o of t)i===e.length?e.push(r=new n(this.O(at()),this.O(at()),this,this.options)):r=e[i],r._$AI(o),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i);}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(false,true,e);t!==this._$AB;){let r=le(t).nextSibling;le(t).remove(),t=r;}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t));}},q=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,i,o){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=u;}_$AI(t,e=this,r,i){let o=this.strings,s=false;if(o===void 0)t=V(this,t,e,0),s=!pt(t)||t!==this._$AH&&t!==U,s&&(this._$AH=t);else {let p=t,a,h;for(t=o[0],a=0;a<o.length-1;a++)h=V(this,p[r+a],e,a),h===U&&(h=this._$AH[a]),s||=!pt(h)||h!==this._$AH[a],h===u?t=u:t!==u&&(t+=(h??"")+o[a+1]),this._$AH[a]=h;}s&&!i&&this.j(t);}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}},zt=class extends q{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===u?void 0:t;}},Bt=class extends q{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u);}},Pt=class extends q{constructor(t,e,r,i,o){super(t,e,r,i,o),this.type=5;}_$AI(t,e=this){if((t=V(this,t,e,0)??u)===U)return;let r=this._$AH,i=t===u&&r!==u||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==u&&(r===u||i);i&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t);}},Ht=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r;}get _$AU(){return this._$AM._$AU}_$AI(t){V(this,t);}};var cr=xt.litHtmlPolyfillSupport;cr?.(lt,dt),(xt.litHtmlVersions??=[]).push("3.3.2");var Y=(n,t,e)=>{let r=e?.renderBefore??t,i=r._$litPart$;if(i===void 0){let o=e?.renderBefore??null;r._$litPart$=i=new dt(t.insertBefore(at(),o),o,void 0,e??{});}return i._$AI(n),i};var Gt=globalThis,R=class extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Y(e,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return U}};R._$litElement$=true,R.finalized=true,Gt.litElementHydrateSupport?.({LitElement:R});var hr=Gt.litElementPolyfillSupport;hr?.({LitElement:R});(Gt.litElementVersions??=[]).push("4.2.2");var vt=n=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(n,t);}):customElements.define(n,t);};var ur={attribute:true,type:String,converter:it,reflect:false,hasChanged:bt},gr=(n=ur,t,e)=>{let{kind:r,metadata:i}=e,o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),r==="setter"&&((n=Object.create(n)).wrapped=true),o.set(e.name,n),r==="accessor"){let{name:s}=e;return {set(p){let a=t.get.call(this);t.set.call(this,p),this.requestUpdate(s,a,n,true,p);},init(p){return p!==void 0&&this.C(s,void 0,n,p),p}}}if(r==="setter"){let{name:s}=e;return function(p){let a=this[s];t.call(this,p),this.requestUpdate(s,a,n,true,p);}}throw Error("Unsupported decorator location: "+r)};function c(n){return (t,e)=>typeof e=="object"?gr(n,t,e):((r,i,o)=>{let s=i.hasOwnProperty(o);return i.constructor.createProperty(o,r),s?Object.getOwnPropertyDescriptor(i,o):void 0})(n,t,e)}function O(n){return c({...n,state:true,attribute:false})}var ve={ATTRIBUTE:1},we=n=>(...t)=>({_$litDirective$:n,values:t}),St=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r;}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Se="important",mr=" !"+Se,x=we(class extends St{constructor(n){if(super(n),n.type!==ve.ATTRIBUTE||n.name!=="style"||n.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(n){return Object.keys(n).reduce((t,e)=>{let r=n[e];return r==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(n,[t]){let{style:e}=n.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let r of this.ft)t[r]==null&&(this.ft.delete(r),r.includes("-")?e.removeProperty(r):e[r]=null);for(let r in t){let i=t[r];if(i!=null){this.ft.add(r);let o=typeof i=="string"&&i.endsWith(mr);r.includes("-")||o?e.setProperty(r,o?i.slice(0,-11):i,o?Se:""):e[r]=i;}}return U}});var K={"2xs":20,xs:24,sm:32,md:40,lg:48,xl:64,"2xl":80,"3xl":120},Ce={online:"#30D158",away:"#FFD60A",busy:"#FF453A",offline:"#8E8E93",dnd:"#FF453A"},_e={none:"none",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)",glow:"0 0 20px 0 rgba(99, 102, 241, 0.3)"},k={size:"md",variant:"circle",loading:"lazy",placeholder:"shimmer",borderWidth:2,borderColor:"#ffffff",placeholderColor:"#f3f4f6",shadow:"sm"};var J={circle:"9999px",rounded:"12px",squircle:"30%",square:"0px"},I={max:4,direction:"ltr",overlap:.3,size:"md",tooltipDelay:300,dropdownMaxHeight:280,animated:true};function D(...n){return n.filter(Boolean).join(" ")}function Wt(n){return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(n)}function Ct(n){let e=n.trim().replace(/[^\w\s]/g,"").split(/\s+/).filter(Boolean);return e.length===0?"?":e.length===1?e[0].slice(0,1).toUpperCase():(e[0][0]+(e.at(-1)?.[0]??"")).toUpperCase()}function Vt(n){return Math.round(n*.38)}function Ee(n,t){let e;if(t){let i=Math.round(n*.31);e=Math.min(24,Math.max(14,i));}else {let i=Math.round(n*.22);e=Math.min(14,Math.max(8,i));}let r=Math.max(9,Math.round(e*.55));return {size:e,fontSize:r}}function $e(n,t){let e=Math.min(16,Math.max(8,Math.round(n*.2)));return Math.min(18,e+(t-1)*2)}function Ae(n,t){return typeof n=="string"?n:t&&n>t?`${t}+`:n.toString()}function Te(n){return n.length===0?"transparent":n.length===1?n[0]:`conic-gradient(${n.map((e,r)=>{let i=r/n.length*360,o=(r+1)/n.length*360;return `${e} ${i}deg ${o}deg`}).join(", ")})`}function fr(n){let t=0;for(let e=0;e<n.length;e++){let r=n.charCodeAt(e);t=(t<<5)-t+r,t&=t;}return Math.abs(t)}function Re(n,t,e){let i=Math.max(0,Math.min(100,n))/100*360;return `conic-gradient(from 270deg, ${t} 0deg ${i}deg, ${e} ${i}deg 360deg)`}function _t(n){let t=["linear-gradient(135deg, #667eea 0%, #764ba2 100%)","linear-gradient(135deg, #f093fb 0%, #f5576c 100%)","linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)","linear-gradient(135deg, #43e97b 0%, #38f9d7 100%)","linear-gradient(135deg, #fa709a 0%, #fee140 100%)","linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)","linear-gradient(135deg, #d299c2 0%, #fef9d7 100%)","linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)","linear-gradient(135deg, #cd9cf2 0%, #f6f3ff 100%)","linear-gradient(135deg, #fddb92 0%, #d1fdff 100%)"],e=fr(n)%t.length;return t[e]}function ke(n){return typeof n=="number"?n:K[n]??K[I.size]}function qt(n,t,e){let r=e?t-1:t;if(n<=r)return {visible:n,hidden:0,showCounter:false};let i=r-1,o=n-i;return {visible:i,hidden:o,showCounter:true}}function Et(n,t,e,r,i){let o=i??t*(1-e);return n*o}function Ie(n,t,e){return e==="ltr"?t-n:n+1}function Me(n,t,e,r){if(n===0)return 0;if(n===1)return t;let i=r??t*(1-e);return t+i*(n-1)}function Le(n){return n>99?"+99":`+${n}`}function Ue(n){return n<=80?"80":n<=120?"120":n<=240?"240":n<=480?"480":"960"}function Oe(n){if(!(n&&Wt(n)))return "light";let t=n.replace("#","");t.length===3&&(t=t.split("").map(s=>s+s).join(""));let e=Number.parseInt(t.slice(0,2),16),r=Number.parseInt(t.slice(2,4),16),i=Number.parseInt(t.slice(4,6),16);return (.299*e+.587*r+.114*i)/255>.5?"light":"dark"}function De(n,t,e,r,i){let o=n.endsWith("/")?n.slice(0,-1):n,s=`${t}_${e}_${r}.webp`;return `${o}/api/profile-picture/cdn/${s}?hostname=${i}`}function Ne(n){return {circle:"np:rounded-full",rounded:"np:rounded-xl",squircle:"np:rounded-[30%]",square:"np:rounded-none"}[n]}function ze(n,t){return {className:{1:"np:border",2:"np:border-2",3:"np:border-[3px]",4:"np:border-4",5:"np:border-[5px]",6:"np:border-[6px]",8:"np:border-8"}[n],style:{borderColor:t,borderStyle:"solid"}}}function Be(n,t){return t?{className:"",style:{background:t}}:n?n.includes("gradient")?{className:"",style:{background:n}}:{className:"",style:{backgroundColor:n}}:{className:"",style:{backgroundColor:"#e7e7e7"}}}function Pe(n){return {boxShadow:_e[n]}}var br={shimmer:`
5
5
  @keyframes pp-shimmer {
6
6
  0% { transform: translateX(-100%); }
7
7
  100% { transform: translateX(100%); }
@@ -39,7 +39,7 @@ Make sure to test your application with a production build as repeat registratio
39
39
  0% { transform: scale(0.8); opacity: 0; }
40
40
  50% { transform: scale(1.05); }
41
41
  100% { transform: scale(1); opacity: 1; }
42
- }`},br=Object.values(fr).join(`
42
+ }`},yr=Object.values(br).join(`
43
43
  `),xr=`
44
44
  /* Profile Picture Component Styles */
45
45
  .pp-container {
@@ -185,24 +185,6 @@ Make sure to test your application with a production build as repeat registratio
185
185
  box-shadow: 0 0 10px 2px var(--pp-badge-glow-color, currentColor);
186
186
  }
187
187
 
188
- /* Ribbon styles */
189
- .pp-ribbon-container {
190
- position: absolute;
191
- z-index: 10;
192
- overflow: hidden;
193
- }
194
-
195
- .pp-ribbon {
196
- position: absolute;
197
- width: 100%;
198
- text-align: center;
199
- font-weight: 600;
200
- font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
201
- text-transform: uppercase;
202
- letter-spacing: 0.05em;
203
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
204
- }
205
-
206
188
  /* Ring effect (Instagram-style) */
207
189
  .pp-ring {
208
190
  position: absolute;
@@ -261,7 +243,7 @@ Make sure to test your application with a production build as repeat registratio
261
243
  transition: none !important;
262
244
  }
263
245
  }
264
- `,He=`${br}
246
+ `,He=`${yr}
265
247
  ${xr}`,Fe=`
266
248
  @keyframes np-shimmer {
267
249
  0% { background-position: -200% 0; }
@@ -272,7 +254,7 @@ ${xr}`,Fe=`
272
254
  background-size: 200% 100%;
273
255
  animation: np-shimmer 1.5s infinite;
274
256
  }
275
- `;function Ge(n,e=.3){if(dt(n)){let t=Number.parseInt(n.slice(1,3),16),r=Number.parseInt(n.slice(3,5),16),i=Number.parseInt(n.slice(5,7),16);return `0 0 20px 0 rgba(${t}, ${r}, ${i}, ${e})`}return `0 0 20px 0 ${n}`}var yr=`
257
+ `;function je(n,t=.3){if(Wt(n)){let e=Number.parseInt(n.slice(1,3),16),r=Number.parseInt(n.slice(3,5),16),i=Number.parseInt(n.slice(5,7),16);return `0 0 20px 0 rgba(${e}, ${r}, ${i}, ${t})`}return `0 0 20px 0 ${n}`}var vr=`
276
258
  @keyframes ppg-tooltip-in {
277
259
  from {
278
260
  opacity: 0;
@@ -323,7 +305,7 @@ ${xr}`,Fe=`
323
305
  opacity: 1;
324
306
  }
325
307
  }
326
- `,vr=`
308
+ `,wr=`
327
309
  /* Profile Picture Group Container */
328
310
  .ppg-container {
329
311
  --ppg-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
@@ -768,34 +750,34 @@ ${xr}`,Fe=`
768
750
  box-shadow: 0 0 0 1.5px rgba(44, 44, 46, 0.95), 0 0 6px rgba(48, 209, 88, 0.5);
769
751
  }
770
752
  }
771
- `,je=`${yr}
772
- ${vr}`;var l=class extends k{constructor(){super(...arguments);this.src="";this.alt="";this.size=M.size;this.variant=M.variant;this.shadow=M.shadow;this.border=false;this.borderWidth=M.borderWidth;this.borderColor=M.borderColor;this.rotation=0;this.loading=M.loading;this.placeholder=M.placeholder;this.placeholderColor=M.placeholderColor;this.isLoaded=false;this.hasError=false;this.cdnLoadFailed=false;this.previousSrc="";this.RETRY_DELAY_MS=3e4;}static setCdnBaseUrl(t){l.cdnBaseUrl=t,l.instances.forEach(r=>{r.extCustomerId&&!r.cdnImageUrl&&(r.cdnLoadFailed=false,r.retryTimeoutId&&(clearTimeout(r.retryTimeoutId),r.retryTimeoutId=void 0),r.previousExtCustomerId||(r.previousExtCustomerId=r.extCustomerId),r.loadCdnImage());});}static getCdnBaseUrl(){return l.cdnBaseUrl}createRenderRoot(){return l.injectStylesOnce(),this}static injectStylesOnce(){if(l.stylesInjected||typeof document>"u")return;let t=document.createElement("style");t.textContent=He,document.head.appendChild(t),l.stylesInjected=true;}get pixelSize(){let t=this.size;return typeof t=="number"?t:Y[t]??Y[M.size]}connectedCallback(){super.connectedCallback(),l.instances.add(this);}disconnectedCallback(){super.disconnectedCallback(),l.instances.delete(this),this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0);}firstUpdated(){this.extCustomerId&&l.cdnBaseUrl&&(this.previousExtCustomerId=this.extCustomerId,this.loadCdnImage());}updated(t){super.updated(t),this.extCustomerId&&l.cdnBaseUrl&&!this.cdnImageUrl&&(this.cdnLoadFailed||!this.previousExtCustomerId)&&(this.previousExtCustomerId||(this.previousExtCustomerId=this.extCustomerId),this.cdnLoadFailed=false,this.loadCdnImage());}willUpdate(t){t.has("src")&&this.src!==this.previousSrc&&(this.isLoaded=false,this.hasError=false,this.previousSrc=this.src),(t.has("extCustomerId")||t.has("size")||t.has("bgColor"))&&this.extCustomerId!==this.previousExtCustomerId&&(this.previousExtCustomerId=this.extCustomerId,this.cdnImageUrl=void 0,this.cdnLoadFailed=false,this.isLoaded=false,this.hasError=false,this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0),this.loadCdnImage());}handleLoad(){this.isLoaded=true,this.dispatchEvent(new CustomEvent("load",{bubbles:true,composed:true}));}handleError(){if(this.cdnImageUrl&&!this.cdnLoadFailed){this.cdnLoadFailed=true,this.cdnImageUrl=void 0,this.dispatchEvent(new CustomEvent("cdn-error",{bubbles:true,composed:true,detail:{error:"Image load failed"}})),this.retryTimeoutId&&clearTimeout(this.retryTimeoutId),this.retryTimeoutId=setTimeout(()=>{this.retryTimeoutId=void 0,this.extCustomerId&&l.cdnBaseUrl&&(this.cdnLoadFailed=false,this.hasError=false,this.isLoaded=false,this.loadCdnImage());},this.RETRY_DELAY_MS);return}this.hasError=true,this.isLoaded=true,this.dispatchEvent(new CustomEvent("error",{bubbles:true,composed:true}));}loadCdnImage(){if(!(this.extCustomerId&&l.cdnBaseUrl)){this.cdnLoadFailed=true;return}let t=Ue(this.pixelSize),r=De(this.bgColor),i=typeof window<"u"?window.location.hostname:"localhost";this.cdnImageUrl=Oe(l.cdnBaseUrl,this.extCustomerId,t,r,i);}getContainerStyles(){let t=Be(this.bgColor,this.bgGradient),r=this.border?ze(this.borderWidth,this.borderColor):null,i=Pe(this.shadow),o={};if(this.glow){let p=this.glow.color??this.borderColor??"#6366f1";o={"--pp-glow-color":p,boxShadow:Ge(p,this.glow.intensity??.3)};}let s=this.interactive?.hoverable||this.interactive?.pressable;return {classes:R("pp-container",Ne(this.variant),t.className,r?.className,s&&"pp-interactive",this.glow?.animate&&"pp-glow"),styles:{width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,borderRadius:K[this.variant],...t.style,...r?.style,...i,...o,cursor:this.interactive?.cursor??(s?"pointer":"default"),transform:this.rotation?`rotate(${this.rotation}deg)`:void 0}}}renderPlaceholder(){if(this.isLoaded||this.placeholder==="none")return h;let t={shimmer:"pp-shimmer",pulse:"pp-pulse",skeleton:"pp-skeleton",blur:"",none:""}[this.placeholder];return x`
773
- ${this.placeholder==="shimmer"?x`<style>${Fe}</style>`:h}
753
+ `,Ge=`${vr}
754
+ ${wr}`;var l=class extends R{constructor(){super(...arguments);this.src="";this.alt="";this.size=k.size;this.variant=k.variant;this.shadow=k.shadow;this.border=false;this.borderWidth=k.borderWidth;this.borderColor=k.borderColor;this.rotation=0;this.loading=k.loading;this.placeholder=k.placeholder;this.placeholderColor=k.placeholderColor;this.isLoaded=false;this.hasError=false;this.cdnLoadFailed=false;this.previousSrc="";this.RETRY_DELAY_MS=3e4;}static setCdnBaseUrl(e){l.cdnBaseUrl=e,l.instances.forEach(r=>{r.extCustomerId&&!r.cdnImageUrl&&(r.cdnLoadFailed=false,r.retryTimeoutId&&(clearTimeout(r.retryTimeoutId),r.retryTimeoutId=void 0),r.previousExtCustomerId||(r.previousExtCustomerId=r.extCustomerId),r.loadCdnImage());});}static getCdnBaseUrl(){return l.cdnBaseUrl}createRenderRoot(){return l.injectStylesOnce(),this}static injectStylesOnce(){if(l.stylesInjected||typeof document>"u")return;(typeof requestIdleCallback<"u"?requestIdleCallback:r=>setTimeout(r,1))(()=>{if(l.stylesInjected)return;let r=document.createElement("style");r.textContent=He,document.head.appendChild(r),l.stylesInjected=true;});}get pixelSize(){let e=this.size;return typeof e=="number"?e:K[e]??K[k.size]}connectedCallback(){super.connectedCallback(),l.instances.add(this);}disconnectedCallback(){super.disconnectedCallback(),l.instances.delete(this),this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0);}firstUpdated(){this.extCustomerId&&l.cdnBaseUrl&&(this.previousExtCustomerId=this.extCustomerId,this.loadCdnImage());}updated(e){super.updated(e),this.extCustomerId&&l.cdnBaseUrl&&!this.cdnImageUrl&&(this.cdnLoadFailed||!this.previousExtCustomerId)&&(this.previousExtCustomerId||(this.previousExtCustomerId=this.extCustomerId),this.cdnLoadFailed=false,this.loadCdnImage());}willUpdate(e){e.has("src")&&this.src!==this.previousSrc&&(this.isLoaded=false,this.hasError=false,this.previousSrc=this.src),(e.has("extCustomerId")||e.has("size")||e.has("bgColor"))&&this.extCustomerId!==this.previousExtCustomerId&&(this.previousExtCustomerId=this.extCustomerId,this.cdnImageUrl=void 0,this.cdnLoadFailed=false,this.isLoaded=false,this.hasError=false,this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0),this.loadCdnImage());}handleLoad(){this.isLoaded=true,this.dispatchEvent(new CustomEvent("load",{bubbles:true,composed:true}));}handleError(){if(this.cdnImageUrl&&!this.cdnLoadFailed){this.cdnLoadFailed=true,this.cdnImageUrl=void 0,this.dispatchEvent(new CustomEvent("cdn-error",{bubbles:true,composed:true,detail:{error:"Image load failed"}})),this.retryTimeoutId&&clearTimeout(this.retryTimeoutId),this.retryTimeoutId=setTimeout(()=>{this.retryTimeoutId=void 0,this.extCustomerId&&l.cdnBaseUrl&&(this.cdnLoadFailed=false,this.hasError=false,this.isLoaded=false,this.loadCdnImage());},this.RETRY_DELAY_MS);return}this.hasError=true,this.isLoaded=true,this.dispatchEvent(new CustomEvent("error",{bubbles:true,composed:true}));}loadCdnImage(){if(!(this.extCustomerId&&l.cdnBaseUrl)){this.cdnLoadFailed=true;return}let e=Ue(this.pixelSize),r=Oe(this.bgColor),i=typeof window<"u"?window.location.hostname:"localhost";this.cdnImageUrl=De(l.cdnBaseUrl,this.extCustomerId,e,r,i);}getContainerStyles(){let e=Be(this.bgColor,this.bgGradient),r=this.border?ze(this.borderWidth,this.borderColor):null,i=Pe(this.shadow),o={};if(this.glow){let p=this.glow.color??this.borderColor??"#6366f1";o={"--pp-glow-color":p,boxShadow:je(p,this.glow.intensity??.3)};}let s=this.interactive?.hoverable||this.interactive?.pressable;return {classes:D("pp-container",Ne(this.variant),e.className,r?.className,s&&"pp-interactive",this.glow?.animate&&"pp-glow"),styles:{width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,borderRadius:J[this.variant],...e.style,...r?.style,...i,...o,cursor:this.interactive?.cursor??(s?"pointer":"default"),transform:this.rotation?`rotate(${this.rotation}deg)`:void 0}}}renderPlaceholder(){if(this.isLoaded||this.placeholder==="none")return u;let e={shimmer:"pp-shimmer",pulse:"pp-pulse",skeleton:"pp-skeleton",blur:"",none:""}[this.placeholder];return b`
755
+ ${this.placeholder==="shimmer"?b`<style>${Fe}</style>`:u}
774
756
  <div
775
- class=${R("np:absolute np:inset-0",t)}
776
- style=${y({backgroundColor:this.placeholderColor,borderRadius:"inherit"})}>
757
+ class=${D("np:absolute np:inset-0",e)}
758
+ style=${x({backgroundColor:this.placeholderColor,borderRadius:"inherit"})}>
777
759
  </div>
778
- `}renderFallback(){if(this.fallback)return x`
760
+ `}renderFallback(){if(this.fallback)return b`
779
761
  <span
780
762
  class="pp-fallback"
781
- style=${y({fontSize:`${Wt(this.pixelSize)}px`})}>
763
+ style=${x({fontSize:`${Vt(this.pixelSize)}px`})}>
782
764
  ${this.fallback}
783
765
  </span>
784
- `;if(this.alt){let r=Et(this.alt);return x`
766
+ `;if(this.alt){let r=_t(this.alt);return b`
785
767
  <div
786
768
  class="pp-fallback np:absolute np:inset-0"
787
- style=${y({background:this.bgColor??r,fontSize:`${Wt(this.pixelSize)}px`})}>
788
- ${_t(this.alt)}
769
+ style=${x({background:this.bgColor??r,fontSize:`${Vt(this.pixelSize)}px`})}>
770
+ ${Ct(this.alt)}
789
771
  </div>
790
- `}let t=this.pixelSize*.5;return x`
772
+ `}let e=this.pixelSize*.5;return b`
791
773
  <svg
792
774
  class="pp-fallback-icon"
793
- style="width: ${t}px; height: ${t}px;"
775
+ style="width: ${e}px; height: ${e}px;"
794
776
  fill="currentColor"
795
777
  viewBox="0 0 24 24">
796
778
  <path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
797
779
  </svg>
798
- `}renderImage(){let t=!!(this.extCustomerId&&l.cdnBaseUrl),r;return this.cdnImageUrl?r=this.cdnImageUrl:(!t||this.cdnLoadFailed)&&(r=this.src),this.hasError||!r?this.renderFallback():x`
780
+ `}renderImage(){let e=!!(this.extCustomerId&&l.cdnBaseUrl),r;return this.cdnImageUrl?r=this.cdnImageUrl:(!e||this.cdnLoadFailed)&&(r=this.src),this.hasError||!r?this.renderFallback():b`
799
781
  <img
800
782
  src=${r}
801
783
  alt=${this.alt}
@@ -803,44 +785,33 @@ ${vr}`;var l=class extends k{constructor(){super(...arguments);this.src="";this.
803
785
  decoding="async"
804
786
  @load=${this.handleLoad}
805
787
  @error=${this.handleError}
806
- class=${R("pp-image",this.isLoaded?"pp-image-loaded":"pp-image-loading")}
788
+ class=${D("pp-image",this.isLoaded?"pp-image-loaded":"pp-image-loading")}
807
789
  draggable="false" />
808
- `}renderRing(){if(!this.ring?.show)return h;let t=this.ring.width??3,r=this.ring.gap??3,i=t+r,o,s=this.ring.progress!==void 0;if(s){let p=this.ring.progress??0,a=this.ring.color??"#30D158",c=this.ring.emptyColor??"#8E8E93";o=Te(p,a,c);}else this.ring.gradient&&this.ring.gradient.length>0?o=Re(this.ring.gradient):o=this.ring.color??"linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888)";return x`
790
+ `}renderRing(){if(!this.ring?.show)return u;let e=this.ring.width??3,r=this.ring.gap??3,i=e+r,o,s=this.ring.progress!==void 0;if(s){let p=this.ring.progress??0,a=this.ring.color??"#30D158",h=this.ring.emptyColor??"#8E8E93";o=Re(p,a,h);}else this.ring.gradient&&this.ring.gradient.length>0?o=Te(this.ring.gradient):o=this.ring.color??"linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888)";return b`
809
791
  <div
810
- class=${R("pp-ring",this.ring.animate&&!s&&"pp-ring-animated",s&&"pp-ring-progress")}
811
- style=${y({inset:`-${i}px`,padding:`${t}px`,background:o,borderRadius:K[this.variant]})}>
792
+ class=${D("pp-ring",this.ring.animate&&!s&&"pp-ring-animated",s&&"pp-ring-progress")}
793
+ style=${x({inset:`-${i}px`,padding:`${e}px`,background:o,borderRadius:J[this.variant]})}>
812
794
  </div>
813
- `}renderPresence(){if(!this.presence)return h;let t=this.presence.thickness??2,r=$e(this.pixelSize,t),i=we[this.presence.status],o=Math.max(0,this.pixelSize*.02);return x`
795
+ `}getCornerOffset(){let e=this.border?this.borderWidth:0,r=this.pixelSize*.08,o={circle:1,square:.5,rounded:.8,squircle:1.2}[this.variant];return Math.round(r*o-e*.5)}renderPresence(){if(!this.presence)return u;let e=this.presence.thickness??2,r=$e(this.pixelSize,e),i=Ce[this.presence.status],o=this.getCornerOffset();return b`
814
796
  <div
815
- class=${R("pp-presence",this.presence.animate&&"pp-presence-animated")}
816
- style=${y({width:`${r}px`,height:`${r}px`,backgroundColor:i,bottom:`${o}px`,right:`${o}px`,color:i})}
797
+ class=${D("pp-presence",this.presence.animate&&"pp-presence-animated")}
798
+ style=${x({width:`${r}px`,height:`${r}px`,backgroundColor:i,bottom:`${o}px`,right:`${o}px`,color:i})}
817
799
  title=${this.presence.status}>
818
800
  </div>
819
- `}renderBadge(){if(!this.badge)return h;let t=this.badge.position??"bottom-right",r=this.badge.content!==void 0,i=this.badge.icon!==void 0,o=r||i,{size:s,fontSize:p}=Ee(this.pixelSize,o),a=this.badge.bgColor??"#22c55e",c=this.badge.color??"#ffffff",m=this.badge.borderRadius??"9999px",g=r&&this.badge.content!==void 0?Ae(this.badge.content,this.badge.max):null,w=i?this.badge.icon:null,S=p*.9,b=`${-Math.round(this.pixelSize*.06)}px`,$={"top-left":{top:b,left:b},"top-center":{top:b,left:"50%",transform:"translateX(-50%)"},"top-right":{top:b,right:b},"bottom-left":{bottom:b,left:b},"bottom-center":{bottom:b,left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:b,right:b}};return x`
820
- <div
821
- class=${R("pp-badge",this.badge.pulse&&"pp-badge-pulse",this.badge.glow&&"pp-badge-glow",i&&"pp-badge-with-icon")}
822
- style=${y({width:o?"auto":`${s}px`,minWidth:`${s}px`,height:`${s}px`,padding:o?"0 6px":"0",fontSize:`${p}px`,backgroundColor:a,color:c,borderRadius:m,"--pp-badge-glow-color":a,gap:i&&r?"4px":"0",...$[t]})}>
823
- ${w?x`<span class="pp-badge-icon" style=${y({fontSize:`${S}px`})}>${w}</span>`:h}
824
- ${g??h}
825
- </div>
826
- `}renderRibbon(){if(!this.ribbon)return h;let t=this.ribbon.position??"top-right",r=this.ribbon.bgColor??"#ef4444",i=this.ribbon.color??"#ffffff",o=dt(r)?{backgroundColor:r}:{background:r},s={color:i},p=Math.min(75,this.pixelSize*.9),a=Math.min(32,this.pixelSize*.4),c=Math.min(13,Math.max(8,this.pixelSize*.11));return x`
801
+ `}renderBadge(){if(!this.badge)return u;let e=this.badge.position??"bottom-right",r=this.badge.content!==void 0,i=this.badge.icon!==void 0,o=r||i,{size:s,fontSize:p}=Ee(this.pixelSize,o),a=this.badge.bgColor??"#22c55e",h=this.badge.color??"#ffffff",m=this.badge.borderRadius??"9999px",g=r&&this.badge.content!==void 0?Ae(this.badge.content,this.badge.max):null,w=i?this.badge.icon:null,S=p*.9,v=`${-this.getCornerOffset()}px`,N={"top-left":{top:v,left:v},"top-center":{top:v,left:"50%",transform:"translateX(-50%)"},"top-right":{top:v,right:v},"bottom-left":{bottom:v,left:v},"bottom-center":{bottom:v,left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:v,right:v}};return b`
827
802
  <div
828
- class=${R("pp-ribbon-container",Ce(t))}
829
- style=${y({width:`${p}px`,height:`${a}px`})}>
830
- <div
831
- class=${R("pp-ribbon np:origin-center np:transform",_e(t))}
832
- style=${y({fontSize:`${c}px`,padding:`${c*.3}px 0`,...o,...s})}>
833
- ${this.ribbon.icon?x`<span style="margin-right: 2px">${this.ribbon.icon}</span>`:h}
834
- ${this.ribbon.text}
835
- </div>
803
+ class=${D("pp-badge",this.badge.pulse&&"pp-badge-pulse",this.badge.glow&&"pp-badge-glow",i&&"pp-badge-with-icon")}
804
+ style=${x({width:o?"auto":`${s}px`,minWidth:`${s}px`,height:`${s}px`,padding:o?"0 6px":"0",fontSize:`${p}px`,backgroundColor:a,color:h,borderRadius:m,"--pp-badge-glow-color":a,gap:i&&r?"4px":"0",...N[e]})}>
805
+ ${w?b`<span class="pp-badge-icon" style=${x({fontSize:`${S}px`})}>${w}</span>`:u}
806
+ ${g??u}
836
807
  </div>
837
- `}render(){let t=this.getContainerStyles(),r=this.interactive?.focusable||this.interactive?.pressable?0:void 0;return x`
808
+ `}render(){let e=this.getContainerStyles(),r=this.interactive?.focusable||this.interactive?.pressable?0:void 0;return b`
838
809
  <div
839
- class=${t.classes}
840
- style=${y(t.styles)}
841
- tabindex=${r??h}
842
- role=${this.interactive?.pressable?"button":h}
843
- aria-label=${this.alt||h}
810
+ class=${e.classes}
811
+ style=${x(e.styles)}
812
+ tabindex=${r??u}
813
+ role=${this.interactive?.pressable?"button":u}
814
+ aria-label=${this.alt||u}
844
815
  data-profile-picture>
845
816
 
846
817
  <!-- Ring Effect (behind everything) -->
@@ -849,7 +820,7 @@ ${vr}`;var l=class extends k{constructor(){super(...arguments);this.src="";this.
849
820
  <!-- Inner container for image clipping -->
850
821
  <div
851
822
  class="pp-inner"
852
- style=${y({borderRadius:K[this.variant]})}>
823
+ style=${x({borderRadius:J[this.variant]})}>
853
824
  <!-- Placeholder -->
854
825
  ${this.renderPlaceholder()}
855
826
 
@@ -857,16 +828,13 @@ ${vr}`;var l=class extends k{constructor(){super(...arguments);this.src="";this.
857
828
  ${this.renderImage()}
858
829
  </div>
859
830
 
860
- <!-- Ribbon -->
861
- ${this.renderRibbon()}
862
-
863
831
  <!-- Badge -->
864
832
  ${this.renderBadge()}
865
833
 
866
834
  <!-- Presence Indicator -->
867
835
  ${this.renderPresence()}
868
836
  </div>
869
- `}};l.stylesInjected=false,l.cdnBaseUrl="",l.instances=new Set,d([u({type:String})],l.prototype,"src",2),d([u({type:String})],l.prototype,"alt",2),d([u({type:String,attribute:"ext-customer-id"})],l.prototype,"extCustomerId",2),d([u({type:String})],l.prototype,"size",2),d([u({type:String})],l.prototype,"variant",2),d([u({type:String})],l.prototype,"shadow",2),d([u({type:Boolean})],l.prototype,"border",2),d([u({type:Number,attribute:"border-width"})],l.prototype,"borderWidth",2),d([u({type:String,attribute:"border-color"})],l.prototype,"borderColor",2),d([u({type:Number})],l.prototype,"rotation",2),d([u({type:String,attribute:"bg-color"})],l.prototype,"bgColor",2),d([u({type:String,attribute:"bg-gradient"})],l.prototype,"bgGradient",2),d([u({type:Object,attribute:"ring",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"ring",2),d([u({type:Object,attribute:"presence",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"presence",2),d([u({type:Object,attribute:"glow",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"glow",2),d([u({type:Object,attribute:"ribbon",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"ribbon",2),d([u({type:Object,attribute:"badge",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"badge",2),d([u({type:String})],l.prototype,"loading",2),d([u({type:String})],l.prototype,"placeholder",2),d([u({type:String,attribute:"placeholder-color"})],l.prototype,"placeholderColor",2),d([u({type:String})],l.prototype,"fallback",2),d([u({type:Object,attribute:"interactive",converter:{fromAttribute:t=>{if(t)try{return JSON.parse(t)}catch{return}},toAttribute:t=>t?JSON.stringify(t):null}})],l.prototype,"interactive",2),d([O()],l.prototype,"isLoaded",2),d([O()],l.prototype,"hasError",2),d([O()],l.prototype,"cdnImageUrl",2),d([O()],l.prototype,"cdnLoadFailed",2),l=d([wt("profile-picture")],l);var We=false;function wr(){if(We||typeof document>"u")return;let n=document.createElement("style");n.textContent=je,document.head.appendChild(n),We=true;}var C=class extends k{constructor(){super(...arguments);this.max=I.max;this.direction=I.direction;this.overlap=I.overlap;this.size=I.size;this.showAddButton=false;this.addButtonLabel="Add user";this.animated=I.animated;this.rotationAmount=0;this.users=[];this.dropdownOpen=false;this.tooltipData=null;this.tooltipTimeout=null;this.slotObserver=null;this.portalContainer=null;this.counterRef=null;this.handleBackdropClick=()=>{this.dropdownOpen=false,this.destroyPortal();};}createRenderRoot(){return wr(),this}get pixelSize(){return ke(this.size)}get tooltipEnabled(){return this.tooltip?.enabled!==false}get tooltipPosition(){return this.tooltip?.position??"top"}get tooltipDelay(){return this.tooltip?.delay??I.tooltipDelay}get dropdownMaxHeight(){return this.dropdown?.maxHeight??I.dropdownMaxHeight}get showPresence(){return this.dropdown?.showPresence!==false}get dropdownPosition(){return this.dropdown?.position??"bottom"}connectedCallback(){super.connectedCallback(),this.updateUsers(),this.setupSlotObserver();}disconnectedCallback(){super.disconnectedCallback(),this.slotObserver?.disconnect(),this.clearTooltipTimeout(),this.destroyPortal();}setupSlotObserver(){this.slotObserver=new MutationObserver(()=>{this.updateUsers();}),this.slotObserver.observe(this,{childList:true,subtree:true,attributes:true,attributeFilter:["src","alt","data-user-id","data-status","variant","shadow","border","border-width","border-color","bg-color","bg-gradient"]});}updateUsers(){let t=Array.from(this.children).filter(r=>r.tagName.toLowerCase()==="profile-picture"&&r.getAttribute("slot")!=="internal");this.users=t.map((r,i)=>{let o=r.getAttribute("border-width"),s=o?Number.parseInt(o,10):void 0;return {id:r.getAttribute("data-user-id")??void 0,name:r.getAttribute("alt")??`User ${i+1}`,src:r.getAttribute("src")??void 0,status:r.getAttribute("data-status")??void 0,element:r,index:i,variant:r.getAttribute("variant")??void 0,shadow:r.getAttribute("shadow")??void 0,border:r.hasAttribute("border"),borderWidth:s,borderColor:r.getAttribute("border-color")??void 0,bgColor:r.getAttribute("bg-color")??void 0,bgGradient:r.getAttribute("bg-gradient")??void 0}});for(let r of this.users)r.element&&(r.element.style.display="none");}createPortal(){this.portalContainer||(this.portalContainer=document.createElement("div"),this.portalContainer.className="ppg-portal",this.portalContainer.style.cssText="position: fixed; z-index: 99999; pointer-events: none;",document.body.appendChild(this.portalContainer),document.body.style.overflow="hidden");}destroyPortal(){this.portalContainer&&(q(h,this.portalContainer),this.portalContainer.remove(),this.portalContainer=null,document.body.style.overflow="");}updatePortalContent(t){if(!(this.portalContainer&&this.counterRef))return;let r=this.counterRef.getBoundingClientRect(),i=10,o=280,s=Math.min(this.dropdownMaxHeight+60,t.length*56+60),p=window.innerWidth,a=window.innerHeight;if(p<480){let L=x`
837
+ `}};l.stylesInjected=false,l.cdnBaseUrl="",l.instances=new Set,d([c({type:String})],l.prototype,"src",2),d([c({type:String})],l.prototype,"alt",2),d([c({type:String,attribute:"ext-customer-id"})],l.prototype,"extCustomerId",2),d([c({type:String})],l.prototype,"size",2),d([c({type:String})],l.prototype,"variant",2),d([c({type:String})],l.prototype,"shadow",2),d([c({type:Boolean})],l.prototype,"border",2),d([c({type:Number,attribute:"border-width"})],l.prototype,"borderWidth",2),d([c({type:String,attribute:"border-color"})],l.prototype,"borderColor",2),d([c({type:Number})],l.prototype,"rotation",2),d([c({type:String,attribute:"bg-color"})],l.prototype,"bgColor",2),d([c({type:String,attribute:"bg-gradient"})],l.prototype,"bgGradient",2),d([c({type:Object,attribute:"ring",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"ring",2),d([c({type:Object,attribute:"presence",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"presence",2),d([c({type:Object,attribute:"glow",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"glow",2),d([c({type:Object,attribute:"badge",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"badge",2),d([c({type:String})],l.prototype,"loading",2),d([c({type:String})],l.prototype,"placeholder",2),d([c({type:String,attribute:"placeholder-color"})],l.prototype,"placeholderColor",2),d([c({type:String})],l.prototype,"fallback",2),d([c({type:Object,attribute:"interactive",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],l.prototype,"interactive",2),d([O()],l.prototype,"isLoaded",2),d([O()],l.prototype,"hasError",2),d([O()],l.prototype,"cdnImageUrl",2),d([O()],l.prototype,"cdnLoadFailed",2),l=d([vt("profile-picture")],l);var Yt=false;function Sr(){if(Yt||typeof document>"u")return;(typeof requestIdleCallback<"u"?requestIdleCallback:t=>setTimeout(t,1))(()=>{if(Yt)return;let t=document.createElement("style");t.textContent=Ge,document.head.appendChild(t),Yt=true;});}var C=class extends R{constructor(){super(...arguments);this.max=I.max;this.direction=I.direction;this.overlap=I.overlap;this.size=I.size;this.showAddButton=false;this.addButtonLabel="Add user";this.animated=I.animated;this.rotationAmount=0;this.users=[];this.dropdownOpen=false;this.tooltipData=null;this.tooltipTimeout=null;this.slotObserver=null;this.portalContainer=null;this.counterRef=null;this.handleBackdropClick=()=>{this.dropdownOpen=false,this.destroyPortal();};}createRenderRoot(){return Sr(),this}get pixelSize(){return ke(this.size)}get tooltipEnabled(){return this.tooltip?.enabled!==false}get tooltipPosition(){return this.tooltip?.position??"top"}get tooltipDelay(){return this.tooltip?.delay??I.tooltipDelay}get dropdownMaxHeight(){return this.dropdown?.maxHeight??I.dropdownMaxHeight}get showPresence(){return this.dropdown?.showPresence!==false}get dropdownPosition(){return this.dropdown?.position??"bottom"}connectedCallback(){super.connectedCallback(),this.updateUsers(),this.setupSlotObserver();}disconnectedCallback(){super.disconnectedCallback(),this.slotObserver?.disconnect(),this.clearTooltipTimeout(),this.destroyPortal();}setupSlotObserver(){this.slotObserver=new MutationObserver(()=>{this.updateUsers();}),this.slotObserver.observe(this,{childList:true,subtree:true,attributes:true,attributeFilter:["src","alt","ext-customer-id","data-user-id","data-status","variant","shadow","border","border-width","border-color","bg-color","bg-gradient"]});}updateUsers(){let e=Array.from(this.children).filter(r=>r.tagName.toLowerCase()==="profile-picture"&&r.getAttribute("slot")!=="internal");this.users=e.map((r,i)=>{let o=r.getAttribute("border-width"),s=o?Number.parseInt(o,10):void 0;return {id:r.getAttribute("data-user-id")??void 0,name:r.getAttribute("alt")??`User ${i+1}`,src:r.getAttribute("src")??void 0,extCustomerId:r.getAttribute("ext-customer-id")??void 0,status:r.getAttribute("data-status")??void 0,element:r,index:i,variant:r.getAttribute("variant")??void 0,shadow:r.getAttribute("shadow")??void 0,border:r.hasAttribute("border"),borderWidth:s,borderColor:r.getAttribute("border-color")??void 0,bgColor:r.getAttribute("bg-color")??void 0,bgGradient:r.getAttribute("bg-gradient")??void 0}});for(let r of this.users)r.element&&(r.element.style.display="none");}createPortal(){this.portalContainer||(this.portalContainer=document.createElement("div"),this.portalContainer.className="ppg-portal",this.portalContainer.style.cssText="position: fixed; z-index: 99999; pointer-events: none;",document.body.appendChild(this.portalContainer),document.body.style.overflow="hidden");}destroyPortal(){this.portalContainer&&(Y(u,this.portalContainer),this.portalContainer.remove(),this.portalContainer=null,document.body.style.overflow="");}updatePortalContent(e){if(!(this.portalContainer&&this.counterRef))return;let r=this.counterRef.getBoundingClientRect(),i=10,o=280,s=Math.min(this.dropdownMaxHeight+60,e.length*56+60),p=window.innerWidth,a=window.innerHeight;if(p<480){let M=b`
870
838
  <div
871
839
  class="ppg-backdrop ppg-backdrop-visible"
872
840
  style="pointer-events: auto; background: rgba(0,0,0,0.5);"
@@ -875,22 +843,22 @@ ${vr}`;var l=class extends k{constructor(){super(...arguments);this.src="";this.
875
843
  ></div>
876
844
  <div
877
845
  class="ppg-dropdown ppg-dropdown-modal"
878
- style=${y({position:"fixed",pointerEvents:"auto",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"calc(100vw - 32px)",maxWidth:"320px",maxHeight:"70vh"})}
846
+ style=${x({position:"fixed",pointerEvents:"auto",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"calc(100vw - 32px)",maxWidth:"320px",maxHeight:"70vh"})}
879
847
  data-position="modal"
880
848
  role="menu"
881
849
  aria-label="Hidden users"
882
850
  >
883
851
  <div class="ppg-dropdown-header">
884
- ${t.length} more
852
+ ${e.length} more
885
853
  </div>
886
854
  <div
887
855
  class="ppg-dropdown-list"
888
- style=${y({maxHeight:"calc(70vh - 60px)"})}
856
+ style=${x({maxHeight:"calc(70vh - 60px)"})}
889
857
  >
890
- ${t.map(J=>this.renderDropdownItem(J))}
858
+ ${e.map(X=>this.renderDropdownItem(X))}
891
859
  </div>
892
860
  </div>
893
- `;q(L,this.portalContainer);return}let m=a-r.bottom-i,g=r.top-i,w=p-r.left,S=r.right,b=this.dropdownPosition;b==="bottom"&&m<s&&g>m?b="top":b==="top"&&g<s&&m>g&&(b="bottom");let $;w>=o?$=r.left:S>=o?$=r.right-o:$=(p-o)/2,$=Math.max(8,Math.min($,p-o-8));let G=b==="bottom"?r.bottom+i:void 0,v=b==="top"?a-r.top+i:void 0,A=x`
861
+ `;Y(M,this.portalContainer);return}let m=a-r.bottom-i,g=r.top-i,w=p-r.left,S=r.right,_=this.dropdownPosition;_==="bottom"&&m<s&&g>m?_="top":_==="top"&&g<s&&m>g&&(_="bottom");let v;w>=o?v=r.left:S>=o?v=r.right-o:v=(p-o)/2,v=Math.max(8,Math.min(v,p-o-8));let N=_==="bottom"?r.bottom+i:void 0,y=_==="top"?a-r.top+i:void 0,A=b`
894
862
  <div
895
863
  class="ppg-backdrop"
896
864
  style="pointer-events: auto;"
@@ -899,66 +867,67 @@ ${vr}`;var l=class extends k{constructor(){super(...arguments);this.src="";this.
899
867
  ></div>
900
868
  <div
901
869
  class="ppg-dropdown ppg-dropdown-portal"
902
- style=${y({position:"fixed",pointerEvents:"auto",top:G!==void 0?`${G}px`:"auto",bottom:v!==void 0?`${v}px`:"auto",left:`${$}px`,width:`${o}px`})}
903
- data-position=${b}
870
+ style=${x({position:"fixed",pointerEvents:"auto",top:N!==void 0?`${N}px`:"auto",bottom:y!==void 0?`${y}px`:"auto",left:`${v}px`,width:`${o}px`})}
871
+ data-position=${_}
904
872
  role="menu"
905
873
  aria-label="Hidden users"
906
874
  >
907
875
  <div class="ppg-dropdown-header">
908
- ${t.length} more
876
+ ${e.length} more
909
877
  </div>
910
878
  <div
911
879
  class="ppg-dropdown-list"
912
- style=${y({maxHeight:`${this.dropdownMaxHeight}px`})}
880
+ style=${x({maxHeight:`${this.dropdownMaxHeight}px`})}
913
881
  >
914
- ${t.map(L=>this.renderDropdownItem(L))}
882
+ ${e.map(M=>this.renderDropdownItem(M))}
915
883
  </div>
916
884
  </div>
917
- `;q(A,this.portalContainer);}handleAvatarClick(t){this.dispatchEvent(new CustomEvent("avatar-click",{detail:{user:t},bubbles:true,composed:true}));}handleAvatarHover(t,r){if(!this.tooltipEnabled)return;this.clearTooltipTimeout();let i=r.currentTarget;this.tooltipTimeout=window.setTimeout(()=>{this.tooltipData={user:t,rect:i.getBoundingClientRect()};},this.tooltipDelay),this.dispatchEvent(new CustomEvent("avatar-hover",{detail:{user:t},bubbles:true,composed:true}));}handleAvatarLeave(){this.clearTooltipTimeout(),this.tooltipData=null;}clearTooltipTimeout(){this.tooltipTimeout&&(window.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=null);}handleCounterClick(t){this.dropdownOpen=!this.dropdownOpen,this.dropdownOpen?(this.createPortal(),this.updatePortalContent(t)):this.destroyPortal(),this.dispatchEvent(new CustomEvent("counter-click",{detail:{hiddenUsers:t,open:this.dropdownOpen},bubbles:true,composed:true}));}handleDropdownItemClick(t){this.dropdownOpen=false,this.destroyPortal(),this.dispatchEvent(new CustomEvent("dropdown-item-click",{detail:{user:t},bubbles:true,composed:true}));}handleAddClick(){this.dispatchEvent(new CustomEvent("add-click",{bubbles:true,composed:true}));}handleKeyDown(t,r){(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),r());}renderAvatar(t,r,i){let o=$t(r,this.pixelSize,this.overlap,this.direction,this.spacing),s=Me(r,i,this.direction),p=t.variant??"circle",a=t.shadow??"none",c=this.rotationAmount?r%2===0?-this.rotationAmount:this.rotationAmount:0;return x`
885
+ `;Y(A,this.portalContainer);}handleAvatarClick(e){this.dispatchEvent(new CustomEvent("avatar-click",{detail:{user:e},bubbles:true,composed:true}));}handleAvatarHover(e,r){if(!this.tooltipEnabled)return;this.clearTooltipTimeout();let i=r.currentTarget;this.tooltipTimeout=window.setTimeout(()=>{this.tooltipData={user:e,rect:i.getBoundingClientRect()};},this.tooltipDelay),this.dispatchEvent(new CustomEvent("avatar-hover",{detail:{user:e},bubbles:true,composed:true}));}handleAvatarLeave(){this.clearTooltipTimeout(),this.tooltipData=null;}clearTooltipTimeout(){this.tooltipTimeout&&(window.clearTimeout(this.tooltipTimeout),this.tooltipTimeout=null);}handleCounterClick(e){this.dropdownOpen=!this.dropdownOpen,this.dropdownOpen?(this.createPortal(),this.updatePortalContent(e)):this.destroyPortal(),this.dispatchEvent(new CustomEvent("counter-click",{detail:{hiddenUsers:e,open:this.dropdownOpen},bubbles:true,composed:true}));}handleDropdownItemClick(e){this.dropdownOpen=false,this.destroyPortal(),this.dispatchEvent(new CustomEvent("dropdown-item-click",{detail:{user:e},bubbles:true,composed:true}));}handleAddClick(){this.dispatchEvent(new CustomEvent("add-click",{bubbles:true,composed:true}));}handleKeyDown(e,r){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),r());}renderAvatar(e,r,i){let o=Et(r,this.pixelSize,this.overlap,this.direction,this.spacing),s=Ie(r,i,this.direction),p=e.variant??"circle",a=e.shadow??"none",h=this.rotationAmount?r%2===0?-this.rotationAmount:this.rotationAmount:0;return b`
918
886
  <div
919
887
  class="ppg-avatar-wrapper"
920
- style=${y({left:`${o}px`,zIndex:String(s),width:`${this.pixelSize}px`,height:`${this.pixelSize}px`})}
888
+ style=${x({left:`${o}px`,zIndex:String(s),width:`${this.pixelSize}px`,height:`${this.pixelSize}px`})}
921
889
  tabindex="0"
922
890
  role="button"
923
- aria-label=${t.name}
924
- @click=${()=>this.handleAvatarClick(t)}
925
- @mouseenter=${m=>this.handleAvatarHover(t,m)}
891
+ aria-label=${e.name}
892
+ @click=${()=>this.handleAvatarClick(e)}
893
+ @mouseenter=${m=>this.handleAvatarHover(e,m)}
926
894
  @mouseleave=${this.handleAvatarLeave}
927
- @keydown=${m=>this.handleKeyDown(m,()=>this.handleAvatarClick(t))}
895
+ @keydown=${m=>this.handleKeyDown(m,()=>this.handleAvatarClick(e))}
928
896
  >
929
- ${this.renderProfilePicture(t,p,a,c)}
897
+ ${this.renderProfilePicture(e,p,a,h)}
930
898
  </div>
931
- `}renderProfilePicture(t,r,i,o){return x`
899
+ `}renderProfilePicture(e,r,i,o){return b`
932
900
  <profile-picture
933
- .src=${t.src??""}
934
- .alt=${t.name}
901
+ .src=${e.src||void 0}
902
+ .alt=${e.name}
935
903
  .size=${this.pixelSize}
936
904
  .variant=${r}
937
905
  .shadow=${i}
938
906
  .rotation=${o}
939
- ?border=${t.border}
940
- .borderWidth=${t.border?t.borderWidth??2:2}
941
- .borderColor=${t.border?t.borderColor??"#ffffff":"#ffffff"}
942
- .bgColor=${t.bgGradient?void 0:t.bgColor??"#ffffff"}
943
- .bgGradient=${t.bgGradient??void 0}
944
- data-user-id=${t.id??""}
945
- data-status=${t.status??""}
907
+ .extCustomerId=${e.extCustomerId}
908
+ ?border=${e.border}
909
+ .borderWidth=${e.border?e.borderWidth??2:2}
910
+ .borderColor=${e.border?e.borderColor??"#ffffff":"#ffffff"}
911
+ .bgColor=${e.bgGradient?void 0:e.bgColor??"#ffffff"}
912
+ .bgGradient=${e.bgGradient??void 0}
913
+ data-user-id=${e.id??""}
914
+ data-status=${e.status??""}
946
915
  ></profile-picture>
947
- `}renderCounter(t,r,i){return x`
916
+ `}renderCounter(e,r,i){return b`
948
917
  <button
949
918
  class="ppg-counter"
950
- style=${y({left:`${r}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
951
- aria-label=${`${t} more users`}
919
+ style=${x({left:`${r}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
920
+ aria-label=${`${e} more users`}
952
921
  aria-expanded=${this.dropdownOpen}
953
922
  aria-haspopup="true"
954
923
  @click=${()=>this.handleCounterClick(i)}
955
924
  >
956
- ${Le(t)}
925
+ ${Le(e)}
957
926
  </button>
958
- `}renderAddButton(t){let r=Math.round(this.pixelSize*.4);return x`
927
+ `}renderAddButton(e){let r=Math.round(this.pixelSize*.4);return b`
959
928
  <button
960
929
  class="ppg-add-button"
961
- style=${y({left:`${t}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
930
+ style=${x({left:`${e}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
962
931
  aria-label=${this.addButtonLabel}
963
932
  @click=${this.handleAddClick}
964
933
  >
@@ -977,50 +946,54 @@ ${vr}`;var l=class extends k{constructor(){super(...arguments);this.src="";this.
977
946
  <line x1="5" y1="12" x2="19" y2="12"></line>
978
947
  </svg>
979
948
  </button>
980
- `}renderTooltip(){if(!this.tooltipData)return h;let{user:t,rect:r}=this.tooltipData,i=8,o=this.getBoundingClientRect(),s=r.left-o.left+r.width/2,p=r.top-o.top,a=r.bottom-o.top,c=this.tooltipPosition==="top";return x`
949
+ `}renderTooltip(){if(!this.tooltipData)return u;let{user:e,rect:r}=this.tooltipData,i=8,o=this.getBoundingClientRect(),s=r.left-o.left+r.width/2,p=r.top-o.top,a=r.bottom-o.top,h=this.tooltipPosition==="top";return b`
981
950
  <div
982
951
  class="ppg-tooltip"
983
- style=${y({top:c?"auto":`${a+i}px`,bottom:c?`${o.height-p+i}px`:"auto",left:`${s}px`})}
952
+ style=${x({top:h?"auto":`${a+i}px`,bottom:h?`${o.height-p+i}px`:"auto",left:`${s}px`})}
984
953
  data-position=${this.tooltipPosition}
985
954
  role="tooltip"
986
955
  >
987
- ${t.name}
956
+ ${e.name}
988
957
  </div>
989
- `}renderDropdownItem(t){let r=Et(t.name);return x`
958
+ `}renderDropdownItem(e){let r=_t(e.name),i=e.src||e.extCustomerId;return b`
990
959
  <div
991
960
  class="ppg-dropdown-item"
992
961
  role="menuitem"
993
962
  tabindex="0"
994
- @click=${()=>this.handleDropdownItemClick(t)}
995
- @keydown=${i=>this.handleKeyDown(i,()=>this.handleDropdownItemClick(t))}
963
+ @click=${()=>this.handleDropdownItemClick(e)}
964
+ @keydown=${o=>this.handleKeyDown(o,()=>this.handleDropdownItemClick(e))}
996
965
  >
997
- ${t.src?x`<img
966
+ ${i?b`<profile-picture
998
967
  class="ppg-dropdown-avatar"
999
- src=${t.src}
1000
- alt=${t.name}
1001
- />`:x`<div
968
+ .src=${e.src||void 0}
969
+ .alt=${e.name}
970
+ .extCustomerId=${e.extCustomerId}
971
+ .size=${40}
972
+ variant="circle"
973
+ shadow="none"
974
+ ></profile-picture>`:b`<div
1002
975
  class="ppg-dropdown-avatar-fallback"
1003
- style=${y({background:r})}
976
+ style=${x({background:r})}
1004
977
  >
1005
- ${_t(t.name)}
978
+ ${Ct(e.name)}
1006
979
  </div>`}
1007
980
  <div class="ppg-dropdown-info">
1008
- <div class="ppg-dropdown-name">${t.name}</div>
1009
- ${this.showPresence&&t.status?x`
981
+ <div class="ppg-dropdown-name">${e.name}</div>
982
+ ${this.showPresence&&e.status?b`
1010
983
  <div class="ppg-dropdown-status">
1011
984
  <span
1012
985
  class="ppg-dropdown-presence"
1013
- data-status=${t.status}
986
+ data-status=${e.status}
1014
987
  ></span>
1015
- ${this.formatStatus(t.status)}
988
+ ${this.formatStatus(e.status)}
1016
989
  </div>
1017
- `:h}
990
+ `:u}
1018
991
  </div>
1019
992
  </div>
1020
- `}formatStatus(t){return {online:"Online",away:"Away",busy:"Busy",offline:"Offline",dnd:"Do not disturb"}[t]??t}updated(t){super.updated(t);let r=this.querySelector(".ppg-counter");if(r&&(this.counterRef=r),this.dropdownOpen&&this.portalContainer){let{visible:i}=Vt(this.users.length,this.max,this.showAddButton),o=this.users.slice(i);this.updatePortalContent(o);}}render(){let{visible:t,hidden:r,showCounter:i}=Vt(this.users.length,this.max,this.showAddButton),o=this.direction==="ltr"?this.users.slice(0,t):this.users.slice(0,t).reverse(),s=this.users.slice(t),p=t;i&&p++,this.showAddButton&&p++;let a=Ie(p,this.pixelSize,this.overlap,this.spacing),c=i?$t(t,this.pixelSize,this.overlap,this.direction,this.spacing):0,m=$t(t+(i?1:0),this.pixelSize,this.overlap,this.direction,this.spacing);return x`
993
+ `}formatStatus(e){return {online:"Online",away:"Away",busy:"Busy",offline:"Offline",dnd:"Do not disturb"}[e]??e}updated(e){super.updated(e);let r=this.querySelector(".ppg-counter");if(r&&(this.counterRef=r),this.dropdownOpen&&this.portalContainer){let{visible:i}=qt(this.users.length,this.max,this.showAddButton),o=this.users.slice(i);this.updatePortalContent(o);}}render(){let{visible:e,hidden:r,showCounter:i}=qt(this.users.length,this.max,this.showAddButton),o=this.direction==="ltr"?this.users.slice(0,e):this.users.slice(0,e).reverse(),s=this.users.slice(e),p=e;i&&p++,this.showAddButton&&p++;let a=Me(p,this.pixelSize,this.overlap,this.spacing),h=i?Et(e,this.pixelSize,this.overlap,this.direction,this.spacing):0,m=Et(e+(i?1:0),this.pixelSize,this.overlap,this.direction,this.spacing);return b`
1021
994
  <div
1022
- class=${R("ppg-container",this.animated&&"ppg-animated")}
1023
- style=${y({width:`${a}px`,height:`${this.pixelSize}px`})}
995
+ class=${D("ppg-container",this.animated&&"ppg-animated")}
996
+ style=${x({width:`${a}px`,height:`${this.pixelSize}px`})}
1024
997
  role="group"
1025
998
  aria-label="User avatars"
1026
999
  >
@@ -1028,18 +1001,18 @@ ${vr}`;var l=class extends k{constructor(){super(...arguments);this.src="";this.
1028
1001
  <slot style="display: none;"></slot>
1029
1002
 
1030
1003
  <!-- Visible avatars -->
1031
- ${o.map((g,w)=>this.renderAvatar(g,w,t))}
1004
+ ${o.map((g,w)=>this.renderAvatar(g,w,e))}
1032
1005
 
1033
1006
  <!-- Counter -->
1034
- ${i?this.renderCounter(r,c,s):h}
1007
+ ${i?this.renderCounter(r,h,s):u}
1035
1008
 
1036
1009
  <!-- Add button -->
1037
- ${this.showAddButton?this.renderAddButton(m):h}
1010
+ ${this.showAddButton?this.renderAddButton(m):u}
1038
1011
 
1039
1012
  <!-- Tooltip -->
1040
1013
  ${this.renderTooltip()}
1041
1014
  </div>
1042
- `}};d([u({type:Number})],C.prototype,"max",2),d([u({type:String})],C.prototype,"direction",2),d([u({type:Number})],C.prototype,"overlap",2),d([u({type:String})],C.prototype,"size",2),d([u({type:Number})],C.prototype,"spacing",2),d([u({type:Object})],C.prototype,"tooltip",2),d([u({type:Object})],C.prototype,"dropdown",2),d([u({type:Boolean,attribute:"show-add-button"})],C.prototype,"showAddButton",2),d([u({type:String,attribute:"add-button-label"})],C.prototype,"addButtonLabel",2),d([u({type:Boolean})],C.prototype,"animated",2),d([u({type:Number,attribute:"rotation-amount"})],C.prototype,"rotationAmount",2),d([O()],C.prototype,"users",2),d([O()],C.prototype,"dropdownOpen",2),d([O()],C.prototype,"tooltipData",2),C=d([wt("profile-picture-group")],C);Yt();
1015
+ `}};d([c({type:Number})],C.prototype,"max",2),d([c({type:String})],C.prototype,"direction",2),d([c({type:Number})],C.prototype,"overlap",2),d([c({type:String})],C.prototype,"size",2),d([c({type:Number})],C.prototype,"spacing",2),d([c({type:Object})],C.prototype,"tooltip",2),d([c({type:Object})],C.prototype,"dropdown",2),d([c({type:Boolean,attribute:"show-add-button"})],C.prototype,"showAddButton",2),d([c({type:String,attribute:"add-button-label"})],C.prototype,"addButtonLabel",2),d([c({type:Boolean})],C.prototype,"animated",2),d([c({type:Number,attribute:"rotation-amount"})],C.prototype,"rotationAmount",2),d([O()],C.prototype,"users",2),d([O()],C.prototype,"dropdownOpen",2),d([O()],C.prototype,"tooltipData",2),C=d([vt("profile-picture-group")],C);Jt();
1043
1016
  /*! Bundled license information:
1044
1017
 
1045
1018
  @lit-labs/ssr-dom-shim/lib/element-internals.js: