@grasco/profile-picture 0.2.3 → 0.2.5

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 qt=Object.defineProperty;var d=(i,e,t,r)=>{for(var n=void 0,o=i.length-1,s;o>=0;o--)(s=i[o])&&(n=(s(e,t,n))||n);return n&&qt(e,t,n),n};var _e="grasco-profile-picture-styles",j=false,Ke=false;function Je(){if(j||typeof document>"u")return;if(document.getElementById(_e)){j=true;return}if(document.querySelector('link[href*="profile-picture"][href$="styles.css"]')){j=true;return}Ke||(Ke=true,Kt());}function Kt(){(typeof requestIdleCallback<"u"?requestIdleCallback:e=>setTimeout(e,1))(()=>Jt());}function Jt(){if(j||typeof document>"u")return;if(document.getElementById(_e)){j=true;return}let i=Xt();if(!i)return;let e=document.createElement("link");e.id=_e,e.rel="stylesheet",e.href=i,document.head.appendChild(e),j=true;}function Xt(){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)}styles.css`}catch{}let i=document.currentScript;if(i?.src){let e=new URL(i.src);return `${e.href.substring(0,e.href.lastIndexOf("/")+1)}dist/styles.css`}return null}var Xe=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 R=function(i,e,t,r,n){if(typeof e=="function"?i!==e||true:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(i,t),t},E=function(i,e,t,r){if(typeof e=="function"?i!==e||!r:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(i):r?r.value:e.get(i)},W,ce,he,Z,Ae,Q,ue,B,ee,z,ge,Ze,Qe=i=>typeof i=="boolean"?i:i?.capture??false;var Te=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map;}addEventListener(e,t,r){if(t==null)return;let n=Qe(r)?this.__captureEventListeners:this.__eventListeners,o=n.get(e);if(o===void 0)o=new Map,n.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 n=Qe(r)?this.__captureEventListeners:this.__eventListeners,o=n.get(e);o!==void 0&&(o.delete(t),o.size||n.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 n=false,o=false,s=0,l=null,a=null,c=null,f=e.stopPropagation,h=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return l??a},...m},srcElement:{get(){return e.target},...m},currentTarget:{get(){return c},...m},eventPhase:{get(){return s},...m},composedPath:{value:()=>t,...m},stopPropagation:{value:()=>{n=true,f.call(e);},...m},stopImmediatePropagation:{value:()=>{o=true,h.call(e);},...m}});let v=(y,A,L)=>{typeof y=="function"?y(e):typeof y?.handleEvent=="function"&&y.handleEvent(e),A.once&&L.delete(y);},w=()=>(c=null,s=0,!e.defaultPrevented),S=t.slice().reverse();l=!this.__host||!e.composed?this:null;let k=y=>{for(a=this;a.__host&&y.includes(a.__host);)a=a.__host;};for(let y of S){!l&&(!a||a===y.__host)&&k(S.slice(S.indexOf(y))),c=y,s=y===e.target?2:1;let A=y.__captureEventListeners.get(e.type);if(A){for(let[L,X]of A)if(v(L,X,A),o)return w()}if(n)return w()}let C=e.bubbles?t:[this];a=null;for(let y of C){!l&&(!a||y===a.__host)&&k(C.slice(0,C.indexOf(y)+1)),c=y,s=y===e.target?2:3;let A=y.__eventListeners.get(e.type);if(A){for(let[L,X]of A)if(v(L,X,A),o)return w()}if(n)return w()}return w()}},ke=Te;var m={__proto__:null};m.enumerable=true;Object.freeze(m);var Re=(z=class{constructor(e,t={}){if(W.set(this,false),ce.set(this,false),he.set(this,false),Z.set(this,false),Ae.set(this,Date.now()),Q.set(this,false),ue.set(this,void 0),B.set(this,void 0),ee.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:n,composed:o}=t;R(this,W,!!n),R(this,ce,!!r),R(this,he,!!o),R(this,ue,`${e}`),R(this,B,null),R(this,ee,false);}initEvent(e,t,r){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation();}preventDefault(){R(this,Z,true);}get target(){return E(this,B,"f")}get currentTarget(){return E(this,B,"f")}get srcElement(){return E(this,B,"f")}get type(){return E(this,ue,"f")}get cancelable(){return E(this,W,"f")}get defaultPrevented(){return E(this,W,"f")&&E(this,Z,"f")}get timeStamp(){return E(this,Ae,"f")}composedPath(){return E(this,ee,"f")?[E(this,B,"f")]:[]}get returnValue(){return !E(this,W,"f")||!E(this,Z,"f")}get bubbles(){return E(this,ce,"f")}get composed(){return E(this,he,"f")}get eventPhase(){return E(this,ee,"f")?z.AT_TARGET:z.NONE}get cancelBubble(){return E(this,Q,"f")}set cancelBubble(e){e&&R(this,Q,true);}stopPropagation(){R(this,Q,true);}get isTrusted(){return false}},W=new WeakMap,ce=new WeakMap,he=new WeakMap,Z=new WeakMap,Ae=new WeakMap,Q=new WeakMap,ue=new WeakMap,B=new WeakMap,ee=new WeakMap,z.NONE=0,z.CAPTURING_PHASE=1,z.AT_TARGET=2,z.BUBBLING_PHASE=3,z);Object.defineProperties(Re.prototype,{initEvent:m,stopImmediatePropagation:m,preventDefault:m,target:m,currentTarget:m,srcElement:m,type:m,cancelable:m,defaultPrevented:m,timeStamp:m,composedPath:m,returnValue:m,bubbles:m,composed:m,eventPhase:m,cancelBubble:m,stopPropagation:m,isTrusted:m});var et=(Ze=class extends Re{constructor(e,t={}){super(e,t),ge.set(this,void 0),R(this,ge,t?.detail??null);}initCustomEvent(e,t,r,n){throw new Error("Method not implemented.")}get detail(){return E(this,ge,"f")}},ge=new WeakMap,Ze);Object.defineProperties(et.prototype,{detail:m});var Ie=Re,Me=et;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??=Ie;globalThis.CustomEvent??=Me;var tt=new WeakMap,te=i=>{let e=tt.get(i);return e===void 0&&tt.set(i,e=new Map),e},Zt=class extends ke{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null;}get attributes(){return Array.from(te(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){te(this).set(e,String(t));}removeAttribute(e){te(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 te(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 Xe(this);return this.__internals=e,e}getAttribute(e){return te(this).get(e)??null}};var Qt=class extends Zt{},Le=Qt;globalThis.litServerRoot??=Object.defineProperty(new Le,"localName",{get(){return "lit-server-root"}});function er(){let i,e;return {promise:new Promise((r,n)=>{i=r,e=n;}),resolve:i,reject:e}}var Pe=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=er(),this.__pendingWhenDefineds.set(e,r)),r.promise}},tr=Pe;var rt=new tr;var re=globalThis,me=re.ShadowRoot&&(re.ShadyCSS===void 0||re.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nt=Symbol(),it=new WeakMap,fe=class{constructor(e,t,r){if(this._$cssResult$=true,r!==nt)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(me&&e===void 0){let r=t!==void 0&&t.length===1;r&&(e=it.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&it.set(t,e));}return e}toString(){return this.cssText}},ot=i=>new fe(typeof i=="string"?i:i+"",void 0,nt);var st=(i,e)=>{if(me)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let r=document.createElement("style"),n=re.litNonce;n!==void 0&&r.setAttribute("nonce",n),r.textContent=t.cssText,i.appendChild(r);}},Ue=me||re.CSSStyleSheet===void 0?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return ot(t)})(i):i;var{is:rr,defineProperty:ir,getOwnPropertyDescriptor:nr,getOwnPropertyNames:or,getOwnPropertySymbols:sr,getPrototypeOf:ar}=Object,oe=globalThis;oe.customElements??=rt;var at=oe.trustedTypes,lr=at?at.emptyScript:"",pr=oe.reactiveElementPolyfillSupport,ie=(i,e)=>i,ne={toAttribute(i,e){switch(e){case Boolean:i=i?lr:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i);}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i);}catch{t=null;}}return t}},be=(i,e)=>!rr(i,e),lt={attribute:true,type:String,converter:ne,reflect:false,useDefault:false,hasChanged:be};Symbol.metadata??=Symbol("metadata"),oe.litPropertyMetadata??=new WeakMap;var U=class extends(globalThis.HTMLElement??Le){static addInitializer(e){this._$Ei(),(this.l??=[]).push(e);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=lt){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(),n=this.getPropertyDescriptor(e,r,t);n!==void 0&&ir(this.prototype,e,n);}}static getPropertyDescriptor(e,t,r){let{get:n,set:o}=nr(this.prototype,e)??{get(){return this[t]},set(s){this[t]=s;}};return {get:n,set(s){let l=n?.call(this);o?.call(this,s),this.requestUpdate(e,l,r);},configurable:true,enumerable:true}}static getPropertyOptions(e){return this.elementProperties.get(e)??lt}static _$Ei(){if(this.hasOwnProperty(ie("elementProperties")))return;let e=ar(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties);}static finalize(){if(this.hasOwnProperty(ie("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(ie("properties"))){let t=this.properties,r=[...or(t),...sr(t)];for(let n of r)this.createProperty(n,t[n]);}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[r,n]of t)this.elementProperties.set(r,n);}this._$Eh=new Map;for(let[t,r]of this.elementProperties){let n=this._$Eu(t,r);n!==void 0&&this._$Eh.set(n,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 n of r)t.unshift(Ue(n));}else e!==void 0&&t.push(Ue(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 st(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),n=this.constructor._$Eu(e,r);if(n!==void 0&&r.reflect===true){let o=(r.converter?.toAttribute!==void 0?r.converter:ne).toAttribute(t,r.type);this._$Em=e,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null;}}_$AK(e,t){let r=this.constructor,n=r._$Eh.get(e);if(n!==void 0&&this._$Em!==n){let o=r.getPropertyOptions(n),s=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:ne;this._$Em=n;let l=s.fromAttribute(t,o.type);this[n]=l??this._$Ej?.get(n)??l,this._$Em=null;}}requestUpdate(e,t,r,n=false,o){if(e!==void 0){let s=this.constructor;if(n===false&&(o=this[e]),r??=s.getPropertyOptions(e),!((r.hasChanged??be)(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:n,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)),n===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[n,o]of this._$Ep)this[n]=o;this._$Ep=void 0;}let r=this.constructor.elementProperties;if(r.size>0)for(let[n,o]of r){let{wrapped:s}=o,l=this[n];s!==true||this._$AL.has(n)||l===void 0||this.C(n,void 0,o,l);}}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[ie("elementProperties")]=new Map,U[ie("finalized")]=new Map,pr?.({ReactiveElement:U}),(oe.reactiveElementVersions??=[]).push("2.1.2");var xe=globalThis,pt=i=>i,ye=xe.trustedTypes,dt=ye?ye.createPolicy("lit-html",{createHTML:i=>i}):void 0,mt="$lit$",N=`lit$${Math.random().toFixed(9).slice(2)}$`,bt="?"+N,dr=`<${bt}>`,G=xe.document===void 0?{createTreeWalker:()=>({})}:document,ae=()=>G.createComment(""),le=i=>i===null||typeof i!="object"&&typeof i!="function",Fe=Array.isArray,cr=i=>Fe(i)||typeof i?.[Symbol.iterator]=="function",De=`[
3
- \f\r]`,se=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ct=/-->/g,ht=/>/g,H=RegExp(`>|${De}(?:([^\\s"'>=/]+)(${De}*=${De}*(?:[^
4
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ut=/'/g,gt=/"/g,yt=/^(?:script|style|textarea|title)$/i,Ge=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),b=Ge(1),D=Symbol.for("lit-noChange"),g=Symbol.for("lit-nothing"),ft=new WeakMap,F=G.createTreeWalker(G,129);function xt(i,e){if(!Fe(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return dt!==void 0?dt.createHTML(e):e}var hr=(i,e)=>{let t=i.length-1,r=[],n,o=e===2?"<svg>":e===3?"<math>":"",s=se;for(let l=0;l<t;l++){let a=i[l],c,f,h=-1,v=0;for(;v<a.length&&(s.lastIndex=v,f=s.exec(a),f!==null);)v=s.lastIndex,s===se?f[1]==="!--"?s=ct:f[1]!==void 0?s=ht:f[2]!==void 0?(yt.test(f[2])&&(n=RegExp("</"+f[2],"g")),s=H):f[3]!==void 0&&(s=H):s===H?f[0]===">"?(s=n??se,h=-1):f[1]===void 0?h=-2:(h=s.lastIndex-f[2].length,c=f[1],s=f[3]===void 0?H:f[3]==='"'?gt:ut):s===gt||s===ut?s=H:s===ct||s===ht?s=se:(s=H,n=void 0);let w=s===H&&i[l+1].startsWith("/>")?" ":"";o+=s===se?a+dr:h>=0?(r.push(c),a.slice(0,h)+mt+a.slice(h)+N+w):a+N+(h===-2?l:w);}return [xt(i,o+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]},pe=class i{constructor({strings:e,_$litType$:t},r){let n;this.parts=[];let o=0,s=0,l=e.length-1,a=this.parts,[c,f]=hr(e,t);if(this.el=i.createElement(c,r),F.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes);}for(;(n=F.nextNode())!==null&&a.length<l;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(mt)){let v=f[s++],w=n.getAttribute(h).split(N),S=/([.?@])?(.*)/.exec(v);a.push({type:1,index:o,name:S[2],strings:w,ctor:S[1]==="."?ze:S[1]==="?"?Ne:S[1]==="@"?Be:q}),n.removeAttribute(h);}else h.startsWith(N)&&(a.push({type:6,index:o}),n.removeAttribute(h));if(yt.test(n.tagName)){let h=n.textContent.split(N),v=h.length-1;if(v>0){n.textContent=ye?ye.emptyScript:"";for(let w=0;w<v;w++)n.append(h[w],ae()),F.nextNode(),a.push({type:2,index:++o});n.append(h[v],ae());}}}else if(n.nodeType===8)if(n.data===bt)a.push({type:2,index:o});else {let h=-1;for(;(h=n.data.indexOf(N,h+1))!==-1;)a.push({type:7,index:o}),h+=N.length-1;}o++;}}static createElement(e,t){let r=G.createElement("template");return r.innerHTML=e,r}};function V(i,e,t=i,r){if(e===D)return e;let n=r!==void 0?t._$Co?.[r]:t._$Cl,o=le(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(false),o===void 0?n=void 0:(n=new o(i),n._$AT(i,t,r)),r!==void 0?(t._$Co??=[])[r]=n:t._$Cl=n),n!==void 0&&(e=V(i,n._$AS(i,e.values),n,r)),e}var Oe=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,n=(e?.creationScope??G).importNode(t,true);F.currentNode=n;let o=F.nextNode(),s=0,l=0,a=r[0];for(;a!==void 0;){if(s===a.index){let c;a.type===2?c=new de(o,o.nextSibling,this,e):a.type===1?c=new a.ctor(o,a.name,a.strings,this,e):a.type===6&&(c=new He(o,this,e)),this._$AV.push(c),a=r[++l];}s!==a?.index&&(o=F.nextNode(),s++);}return F.currentNode=G,n}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++;}},de=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,n){this.type=2,this._$AH=g,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=n,this._$Cv=n?.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=V(this,e,t),le(e)?e===g||e==null||e===""?(this._$AH!==g&&this._$AR(),this._$AH=g):e!==this._$AH&&e!==D&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):cr(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!==g&&le(this._$AH)?this._$AA.nextSibling.data=e:this.T(G.createTextNode(e)),this._$AH=e;}$(e){let{values:t,_$litType$:r}=e,n=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=pe.createElement(xt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===n)this._$AH.p(t);else {let o=new Oe(n,this),s=o.u(this.options);o.p(t),this.T(s),this._$AH=o;}}_$AC(e){let t=ft.get(e.strings);return t===void 0&&ft.set(e.strings,t=new pe(e)),t}k(e){Fe(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,r,n=0;for(let o of e)n===t.length?t.push(r=new i(this.O(ae()),this.O(ae()),this,this.options)):r=t[n],r._$AI(o),n++;n<t.length&&(this._$AR(r&&r._$AB.nextSibling,n),t.length=n);}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(false,true,t);e!==this._$AB;){let r=pt(e).nextSibling;pt(e).remove(),e=r;}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e));}},q=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,n,o){this.type=1,this._$AH=g,this._$AN=void 0,this.element=e,this.name=t,this._$AM=n,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=g;}_$AI(e,t=this,r,n){let o=this.strings,s=false;if(o===void 0)e=V(this,e,t,0),s=!le(e)||e!==this._$AH&&e!==D,s&&(this._$AH=e);else {let l=e,a,c;for(e=o[0],a=0;a<o.length-1;a++)c=V(this,l[r+a],t,a),c===D&&(c=this._$AH[a]),s||=!le(c)||c!==this._$AH[a],c===g?e=g:e!==g&&(e+=(c??"")+o[a+1]),this._$AH[a]=c;}s&&!n&&this.j(e);}j(e){e===g?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"");}},ze=class extends q{constructor(){super(...arguments),this.type=3;}j(e){this.element[this.name]=e===g?void 0:e;}},Ne=class extends q{constructor(){super(...arguments),this.type=4;}j(e){this.element.toggleAttribute(this.name,!!e&&e!==g);}},Be=class extends q{constructor(e,t,r,n,o){super(e,t,r,n,o),this.type=5;}_$AI(e,t=this){if((e=V(this,e,t,0)??g)===D)return;let r=this._$AH,n=e===g&&r!==g||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==g&&(r===g||n);n&&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);}},He=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){V(this,e);}};var ur=xe.litHtmlPolyfillSupport;ur?.(pe,de),(xe.litHtmlVersions??=[]).push("3.3.2");var Y=(i,e,t)=>{let r=t?.renderBefore??e,n=r._$litPart$;if(n===void 0){let o=t?.renderBefore??null;r._$litPart$=n=new de(e.insertBefore(ae(),o),o,void 0,t??{});}return n._$AI(i),n};var je=globalThis,I=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=Y(t,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return D}};I._$litElement$=true,I.finalized=true,je.litElementHydrateSupport?.({LitElement:I});var gr=je.litElementPolyfillSupport;gr?.({LitElement:I});(je.litElementVersions??=[]).push("4.2.2");var fr={attribute:true,type:String,converter:ne,reflect:false,hasChanged:be},mr=(i=fr,e,t)=>{let{kind:r,metadata:n}=t,o=globalThis.litPropertyMetadata.get(n);if(o===void 0&&globalThis.litPropertyMetadata.set(n,o=new Map),r==="setter"&&((i=Object.create(i)).wrapped=true),o.set(t.name,i),r==="accessor"){let{name:s}=t;return {set(l){let a=e.get.call(this);e.set.call(this,l),this.requestUpdate(s,a,i,true,l);},init(l){return l!==void 0&&this.C(s,void 0,i,l),l}}}if(r==="setter"){let{name:s}=t;return function(l){let a=this[s];e.call(this,l),this.requestUpdate(s,a,i,true,l);}}throw Error("Unsupported decorator location: "+r)};function u(i){return (e,t)=>typeof t=="object"?mr(i,e,t):((r,n,o)=>{let s=n.hasOwnProperty(o);return n.constructor.createProperty(o,r),s?Object.getOwnPropertyDescriptor(n,o):void 0})(i,e,t)}function O(i){return u({...i,state:true,attribute:false})}var vt={ATTRIBUTE:1},wt=i=>(...e)=>({_$litDirective$:i,values:e}),we=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 St="important",br=" !"+St,x=wt(class extends we{constructor(i){if(super(i),i.type!==vt.ATTRIBUTE||i.name!=="style"||i.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(i){return Object.keys(i).reduce((e,t)=>{let r=i[t];return r==null?e:e+`${t=t.includes("-")?t:t.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`},"")}update(i,[e]){let{style:t}=i.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 n=e[r];if(n!=null){this.ft.add(r);let o=typeof n=="string"&&n.endsWith(br);r.includes("-")||o?t.setProperty(r,o?n.slice(0,-11):n,o?St:""):t[r]=n;}}return D}});var K={"2xs":20,xs:24,sm:32,md:40,lg:48,xl:64,"2xl":80,"3xl":120},Ct={online:"#30D158",away:"#FFD60A",busy:"#FF453A",offline:"#8E8E93",dnd:"#FF453A"},Et={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)"},T={size:"md",variant:"circle",loading:"lazy",placeholder:"shimmer",borderWidth:2,borderColor:"#ffffff",placeholderColor:"#f3f4f6",shadow:"sm",zoom:1.2};var J={circle:"9999px",rounded:"12px",squircle:"30%",square:"0px"},M={max:4,direction:"ltr",overlap:.3,size:"md",tooltipDelay:300,dropdownMaxHeight:280,animated:true};function P(...i){return i.filter(Boolean).join(" ")}function _t(i){return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(i)}function Ce(i){let t=i.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 We(i){return Math.round(i*.38)}function At(i,e){let t;if(e){let n=Math.round(i*.31);t=Math.min(24,Math.max(14,n));}else {let n=Math.round(i*.22);t=Math.min(14,Math.max(8,n));}let r=Math.max(9,Math.round(t*.55));return {size:t,fontSize:r}}function Tt(i,e){let t=Math.min(16,Math.max(8,Math.round(i*.2)));return Math.min(18,t+(e-1)*2)}function kt(i,e){return typeof i=="string"?i:e&&i>e?`${e}+`:i.toString()}function Rt(i){return i.length===0?"transparent":i.length===1?i[0]:`conic-gradient(${i.map((t,r)=>{let n=r/i.length*360,o=(r+1)/i.length*360;return `${t} ${n}deg ${o}deg`}).join(", ")})`}function Se(i){let e=0;for(let t=0;t<i.length;t++){let r=i.charCodeAt(t);e=(e<<5)-e+r,e&=e;}return Math.abs(e)}function It(i,e,t){let n=Math.max(0,Math.min(100,i))/100*360;return `conic-gradient(from 270deg, ${e} 0deg ${n}deg, ${t} ${n}deg 360deg)`}function Ee(i){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=Se(i)%e.length;return e[t]}var $t=[["#f4a261","#e76f51","#d4a5a5"],["#f2a9b0","#e07a5f","#d4c4a8"],["#c9b1d0","#e8a0bf","#f0d1ce"],["#89c2d9","#a3c4bc","#d5c6e0"],["#f7c59f","#f2a07b","#efcfe3"],["#b5a7d5","#d4a5c9","#f0c3d7"],["#7ec8c8","#6a9fb5","#c2b5d6"],["#f0b3ba","#d4a5c9","#c9d1d9"],["#e8b960","#d4956a","#c9a5b8"],["#a7c4a0","#c9d4a5","#e0c9b1"],["#c4819b","#d9a5b8","#b5aed4"],["#f0c27f","#e0a87c","#d4b5c9"]];function Mt(i){let e=Se(i),t=$t[e%$t.length],r=Se(i+"pos1"),n=Se(i+"pos2"),o=20+e%61,s=20+(e>>4)%61,l=20+r%61,a=20+(r>>4)%61,c=20+n%61,f=20+(n>>4)%61;return [`radial-gradient(circle at ${o}% ${s}%, ${t[0]} 0%, transparent 70%)`,`radial-gradient(circle at ${l}% ${a}%, ${t[1]} 0%, transparent 70%)`,`radial-gradient(circle at ${c}% ${f}%, ${t[2]} 0%, transparent 70%)`].join(", ")}function Pt(i){return typeof i=="number"?i:K[i]??K[M.size]}function Ve(i,e,t){let r=t?e-1:e;if(i<=r)return {visible:i,hidden:0,showCounter:false};let n=r-1,o=i-n;return {visible:n,hidden:o,showCounter:true}}function $e(i,e,t,r,n){let o=n??e*(1-t);return i*o}function Lt(i,e,t){return t==="ltr"?e-i:i+1}function Ut(i,e,t,r){if(i===0)return 0;if(i===1)return e;let n=r??e*(1-t);return e+n*(i-1)}function Dt(i){return i>99?"+99":`+${i}`}function Ot(i){return i<=80?"120":i<=120?"240":i<=240?"480":("960")}function zt(i,e,t,r,n){let o=i.endsWith("/")?i.slice(0,-1):i,s=`${e}_${t}_${r}.webp`;return `${o}/api/profile-picture/cdn/${s}?hostname=${n}`}function Nt(i){return {circle:"np:rounded-full",rounded:"np:rounded-xl",squircle:"np:rounded-[30%]",square:"np:rounded-none"}[i]}function Bt(i,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"}[i],style:{borderColor:e,borderStyle:"solid"}}}function Ht(i,e){return e?{className:"",style:{background:e}}:i?i.includes("gradient")?{className:"",style:{background:i}}:{className:"",style:{backgroundColor:i}}:{className:"",style:{backgroundColor:"transparent"}}}function Ft(i){return {boxShadow:Et[i]}}var yr={shimmer:`
1
+ var Yt=Object.defineProperty;var c=(n,t,e,r)=>{for(var i=void 0,o=n.length-1,s;o>=0;o--)(s=n[o])&&(i=(s(t,e,i))||i);return i&&Yt(t,e,i),i};var _e="grasco-profile-picture-styles",F=false,Je=false;function Xe(){if(F||typeof document>"u")return;if(document.getElementById(_e)){F=true;return}if(document.querySelector('link[href*="profile-picture"][href$="styles.css"]')){F=true;return}Je||(Je=true,Jt());}function Jt(){(typeof requestIdleCallback<"u"?requestIdleCallback:t=>setTimeout(t,1))(()=>Xt());}function Xt(){if(F||typeof document>"u")return;if(document.getElementById(_e)){F=true;return}let n=Zt();if(!n)return;let t=document.createElement("link");t.id=_e,t.rel="stylesheet",t.href=n,document.head.appendChild(t),F=true;}function Zt(){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)}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 Ze=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},C=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,ce,ue,Z,Ae,Q,he,B,ee,O,ge,Qe,et=n=>typeof n=="boolean"?n:n?.capture??false;var ke=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map;}addEventListener(t,e,r){if(e==null)return;let i=et(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=et(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,l=null,a=null,p=null,g=t.stopPropagation,u=t.stopImmediatePropagation;Object.defineProperties(t,{target:{get(){return l??a},...b},srcElement:{get(){return t.target},...b},currentTarget:{get(){return p},...b},eventPhase:{get(){return s},...b},composedPath:{value:()=>e,...b},stopPropagation:{value:()=>{i=true,g.call(t);},...b},stopImmediatePropagation:{value:()=>{o=true,u.call(t);},...b}});let w=(m,_,P)=>{typeof m=="function"?m(t):typeof m?.handleEvent=="function"&&m.handleEvent(t),_.once&&P.delete(m);},x=()=>(p=null,s=0,!t.defaultPrevented),S=e.slice().reverse();l=!this.__host||!t.composed?this:null;let k=m=>{for(a=this;a.__host&&m.includes(a.__host);)a=a.__host;};for(let m of S){!l&&(!a||a===m.__host)&&k(S.slice(S.indexOf(m))),p=m,s=m===t.target?2:1;let _=m.__captureEventListeners.get(t.type);if(_){for(let[P,X]of _)if(w(P,X,_),o)return x()}if(i)return x()}let N=t.bubbles?e:[this];a=null;for(let m of N){!l&&(!a||m===a.__host)&&k(N.slice(0,N.indexOf(m)+1)),p=m,s=m===t.target?2:3;let _=m.__eventListeners.get(t.type);if(_){for(let[P,X]of _)if(w(P,X,_),o)return x()}if(i)return x()}return x()}},Te=ke;var b={__proto__:null};b.enumerable=true;Object.freeze(b);var Re=(O=class{constructor(t,e={}){if(W.set(this,false),ce.set(this,false),ue.set(this,false),Z.set(this,false),Ae.set(this,Date.now()),Q.set(this,false),he.set(this,void 0),B.set(this,void 0),ee.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,ce,!!r),T(this,ue,!!o),T(this,he,`${t}`),T(this,B,null),T(this,ee,false);}initEvent(t,e,r){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation();}preventDefault(){T(this,Z,true);}get target(){return C(this,B,"f")}get currentTarget(){return C(this,B,"f")}get srcElement(){return C(this,B,"f")}get type(){return C(this,he,"f")}get cancelable(){return C(this,W,"f")}get defaultPrevented(){return C(this,W,"f")&&C(this,Z,"f")}get timeStamp(){return C(this,Ae,"f")}composedPath(){return C(this,ee,"f")?[C(this,B,"f")]:[]}get returnValue(){return !C(this,W,"f")||!C(this,Z,"f")}get bubbles(){return C(this,ce,"f")}get composed(){return C(this,ue,"f")}get eventPhase(){return C(this,ee,"f")?O.AT_TARGET:O.NONE}get cancelBubble(){return C(this,Q,"f")}set cancelBubble(t){t&&T(this,Q,true);}stopPropagation(){T(this,Q,true);}get isTrusted(){return false}},W=new WeakMap,ce=new WeakMap,ue=new WeakMap,Z=new WeakMap,Ae=new WeakMap,Q=new WeakMap,he=new WeakMap,B=new WeakMap,ee=new WeakMap,O.NONE=0,O.CAPTURING_PHASE=1,O.AT_TARGET=2,O.BUBBLING_PHASE=3,O);Object.defineProperties(Re.prototype,{initEvent:b,stopImmediatePropagation:b,preventDefault:b,target:b,currentTarget:b,srcElement:b,type:b,cancelable:b,defaultPrevented:b,timeStamp:b,composedPath:b,returnValue:b,bubbles:b,composed:b,eventPhase:b,cancelBubble:b,stopPropagation:b,isTrusted:b});var tt=(Qe=class extends Re{constructor(t,e={}){super(t,e),ge.set(this,void 0),T(this,ge,e?.detail??null);}initCustomEvent(t,e,r,i){throw new Error("Method not implemented.")}get detail(){return C(this,ge,"f")}},ge=new WeakMap,Qe);Object.defineProperties(tt.prototype,{detail:b});var Ie=Re,Me=tt;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??=Ie;globalThis.CustomEvent??=Me;var rt=new WeakMap,te=n=>{let t=rt.get(n);return t===void 0&&rt.set(n,t=new Map),t},Qt=class extends Te{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null;}get attributes(){return Array.from(te(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){te(this).set(t,String(e));}removeAttribute(t){te(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 te(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 Ze(this);return this.__internals=t,t}getAttribute(t){return te(this).get(t)??null}};var er=class extends Qt{},Ue=er;globalThis.litServerRoot??=Object.defineProperty(new Ue,"localName",{get(){return "lit-server-root"}});function tr(){let n,t;return {promise:new Promise((r,i)=>{n=r,t=i;}),resolve:n,reject:t}}var Pe=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=tr(),this.__pendingWhenDefineds.set(t,r)),r.promise}},rr=Pe;var nt=new rr;var re=globalThis,me=re.ShadowRoot&&(re.ShadyCSS===void 0||re.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ot=Symbol(),it=new WeakMap,fe=class{constructor(t,e,r){if(this._$cssResult$=true,r!==ot)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(me&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=it.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&it.set(e,t));}return t}toString(){return this.cssText}},st=n=>new fe(typeof n=="string"?n:n+"",void 0,ot);var at=(n,t)=>{if(me)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),i=re.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=e.cssText,n.appendChild(r);}},Le=me||re.CSSStyleSheet===void 0?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return st(e)})(n):n;var{is:nr,defineProperty:ir,getOwnPropertyDescriptor:or,getOwnPropertyNames:sr,getOwnPropertySymbols:ar,getPrototypeOf:lr}=Object,oe=globalThis;oe.customElements??=nt;var lt=oe.trustedTypes,pr=lt?lt.emptyScript:"",dr=oe.reactiveElementPolyfillSupport,ne=(n,t)=>n,ie={toAttribute(n,t){switch(t){case Boolean:n=n?pr: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}},be=(n,t)=>!nr(n,t),pt={attribute:true,type:String,converter:ie,reflect:false,useDefault:false,hasChanged:be};Symbol.metadata??=Symbol("metadata"),oe.litPropertyMetadata??=new WeakMap;var U=class extends(globalThis.HTMLElement??Ue){static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=pt){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&&ir(this.prototype,t,i);}}static getPropertyDescriptor(t,e,r){let{get:i,set:o}=or(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s;}};return {get:i,set(s){let l=i?.call(this);o?.call(this,s),this.requestUpdate(t,l,r);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??pt}static _$Ei(){if(this.hasOwnProperty(ne("elementProperties")))return;let t=lr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(ne("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(ne("properties"))){let e=this.properties,r=[...sr(e),...ar(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(Le(i));}else t!==void 0&&e.push(Le(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 at(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:ie).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:ie;this._$Em=i;let l=s.fromAttribute(e,o.type);this[i]=l??this._$Ej?.get(i)??l,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??be)(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,l=this[i];s!==true||this._$AL.has(i)||l===void 0||this.C(i,void 0,o,l);}}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){}};U.elementStyles=[],U.shadowRootOptions={mode:"open"},U[ne("elementProperties")]=new Map,U[ne("finalized")]=new Map,dr?.({ReactiveElement:U}),(oe.reactiveElementVersions??=[]).push("2.1.2");var ve=globalThis,dt=n=>n,ye=ve.trustedTypes,ct=ye?ye.createPolicy("lit-html",{createHTML:n=>n}):void 0,bt="$lit$",z=`lit$${Math.random().toFixed(9).slice(2)}$`,yt="?"+z,cr=`<${yt}>`,j=ve.document===void 0?{createTreeWalker:()=>({})}:document,ae=()=>j.createComment(""),le=n=>n===null||typeof n!="object"&&typeof n!="function",Ge=Array.isArray,ur=n=>Ge(n)||typeof n?.[Symbol.iterator]=="function",De=`[
3
+ \f\r]`,se=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ut=/-->/g,ht=/>/g,H=RegExp(`>|${De}(?:([^\\s"'>=/]+)(${De}*=${De}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),gt=/'/g,ft=/"/g,vt=/^(?:script|style|textarea|title)$/i,je=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),y=je(1),L=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),mt=new WeakMap,G=j.createTreeWalker(j,129);function xt(n,t){if(!Ge(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return ct!==void 0?ct.createHTML(t):t}var hr=(n,t)=>{let e=n.length-1,r=[],i,o=t===2?"<svg>":t===3?"<math>":"",s=se;for(let l=0;l<e;l++){let a=n[l],p,g,u=-1,w=0;for(;w<a.length&&(s.lastIndex=w,g=s.exec(a),g!==null);)w=s.lastIndex,s===se?g[1]==="!--"?s=ut:g[1]!==void 0?s=ht:g[2]!==void 0?(vt.test(g[2])&&(i=RegExp("</"+g[2],"g")),s=H):g[3]!==void 0&&(s=H):s===H?g[0]===">"?(s=i??se,u=-1):g[1]===void 0?u=-2:(u=s.lastIndex-g[2].length,p=g[1],s=g[3]===void 0?H:g[3]==='"'?ft:gt):s===ft||s===gt?s=H:s===ut||s===ht?s=se:(s=H,i=void 0);let x=s===H&&n[l+1].startsWith("/>")?" ":"";o+=s===se?a+cr:u>=0?(r.push(p),a.slice(0,u)+bt+a.slice(u)+z+x):a+z+(u===-2?l:x);}return [xt(n,o+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},pe=class n{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let o=0,s=0,l=t.length-1,a=this.parts,[p,g]=hr(t,e);if(this.el=n.createElement(p,r),G.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes);}for(;(i=G.nextNode())!==null&&a.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(let u of i.getAttributeNames())if(u.endsWith(bt)){let w=g[s++],x=i.getAttribute(u).split(z),S=/([.?@])?(.*)/.exec(w);a.push({type:1,index:o,name:S[2],strings:x,ctor:S[1]==="."?ze:S[1]==="?"?Ne:S[1]==="@"?Be:q}),i.removeAttribute(u);}else u.startsWith(z)&&(a.push({type:6,index:o}),i.removeAttribute(u));if(vt.test(i.tagName)){let u=i.textContent.split(z),w=u.length-1;if(w>0){i.textContent=ye?ye.emptyScript:"";for(let x=0;x<w;x++)i.append(u[x],ae()),G.nextNode(),a.push({type:2,index:++o});i.append(u[w],ae());}}}else if(i.nodeType===8)if(i.data===yt)a.push({type:2,index:o});else {let u=-1;for(;(u=i.data.indexOf(z,u+1))!==-1;)a.push({type:7,index:o}),u+=z.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===L)return t;let i=r!==void 0?e._$Co?.[r]:e._$Cl,o=le(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 Oe=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);G.currentNode=i;let o=G.nextNode(),s=0,l=0,a=r[0];for(;a!==void 0;){if(s===a.index){let p;a.type===2?p=new de(o,o.nextSibling,this,t):a.type===1?p=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(p=new He(o,this,t)),this._$AV.push(p),a=r[++l];}s!==a?.index&&(o=G.nextNode(),s++);}return G.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++;}},de=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,i){this.type=2,this._$AH=f,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),le(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==L&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ur(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!==f&&le(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=pe.createElement(xt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(e);else {let o=new Oe(i,this),s=o.u(this.options);o.p(e),this.T(s),this._$AH=o;}}_$AC(t){let e=mt.get(t.strings);return e===void 0&&mt.set(t.strings,e=new pe(t)),e}k(t){Ge(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(ae()),this.O(ae()),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=dt(t).nextSibling;dt(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=f,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=f;}_$AI(t,e=this,r,i){let o=this.strings,s=false;if(o===void 0)t=V(this,t,e,0),s=!le(t)||t!==this._$AH&&t!==L,s&&(this._$AH=t);else {let l=t,a,p;for(t=o[0],a=0;a<o.length-1;a++)p=V(this,l[r+a],e,a),p===L&&(p=this._$AH[a]),s||=!le(p)||p!==this._$AH[a],p===f?t=f:t!==f&&(t+=(p??"")+o[a+1]),this._$AH[a]=p;}s&&!i&&this.j(t);}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"");}},ze=class extends q{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===f?void 0:t;}},Ne=class extends q{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f);}},Be=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)??f)===L)return;let r=this._$AH,i=t===f&&r!==f||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==f&&(r===f||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);}},He=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 gr=ve.litHtmlPolyfillSupport;gr?.(pe,de),(ve.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 de(t.insertBefore(ae(),o),o,void 0,e??{});}return i._$AI(n),i};var Fe=globalThis,R=class extends U{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 L}};R._$litElement$=true,R.finalized=true,Fe.litElementHydrateSupport?.({LitElement:R});var fr=Fe.litElementPolyfillSupport;fr?.({LitElement:R});(Fe.litElementVersions??=[]).push("4.2.2");var mr={attribute:true,type:String,converter:ie,reflect:false,hasChanged:be},br=(n=mr,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(l){let a=t.get.call(this);t.set.call(this,l),this.requestUpdate(s,a,n,true,l);},init(l){return l!==void 0&&this.C(s,void 0,n,l),l}}}if(r==="setter"){let{name:s}=e;return function(l){let a=this[s];t.call(this,l),this.requestUpdate(s,a,n,true,l);}}throw Error("Unsupported decorator location: "+r)};function h(n){return (t,e)=>typeof e=="object"?br(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 D(n){return h({...n,state:true,attribute:false})}var wt={ATTRIBUTE:1},St=n=>(...t)=>({_$litDirective$:n,values:t}),we=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 Ct="important",yr=" !"+Ct,v=St(class extends we{constructor(n){if(super(n),n.type!==wt.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(yr);r.includes("-")||o?e.setProperty(r,o?i.slice(0,-11):i,o?Ct:""):e[r]=i;}}return L}});var K={"2xs":20,xs:24,sm:32,md:40,lg:48,xl:64,"2xl":80,"3xl":120},$t={online:"#30D158",away:"#FFD60A",busy:"#FF453A",offline:"#8E8E93",dnd:"#FF453A"},Et={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)"},A={size:"md",variant:"circle",loading:"lazy",placeholder:"shimmer",borderWidth:2,borderColor:"#ffffff",placeholderColor:"#f3f4f6",shadow:"sm",zoom:1.2};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 M(...n){return n.filter(Boolean).join(" ")}function At(n){return /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/.test(n)}function Ce(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 Ve(n){return Math.round(n*.38)}function kt(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 Tt(n,t){let e=Math.min(16,Math.max(8,Math.round(n*.2)));return Math.min(18,e+(t-1)*2)}function Rt(n,t){return typeof n=="string"?n:t&&n>t?`${t}+`:n.toString()}function It(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 Se(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 Mt(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 $e(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=Se(n)%t.length;return t[e]}var _t=[["#f4a261","#e76f51","#d4a5a5"],["#f2a9b0","#e07a5f","#d4c4a8"],["#c9b1d0","#e8a0bf","#f0d1ce"],["#89c2d9","#a3c4bc","#d5c6e0"],["#f7c59f","#f2a07b","#efcfe3"],["#b5a7d5","#d4a5c9","#f0c3d7"],["#7ec8c8","#6a9fb5","#c2b5d6"],["#f0b3ba","#d4a5c9","#c9d1d9"],["#e8b960","#d4956a","#c9a5b8"],["#a7c4a0","#c9d4a5","#e0c9b1"],["#c4819b","#d9a5b8","#b5aed4"],["#f0c27f","#e0a87c","#d4b5c9"]];function We(n,t,e){let r=l=>[Number.parseInt(l.slice(1,3),16),Number.parseInt(l.slice(3,5),16),Number.parseInt(l.slice(5,7),16)],i=r(n),o=r(t),s=l=>Math.round(i[l]+(o[l]-i[l])*e).toString(16).padStart(2,"0");return `#${s(0)}${s(1)}${s(2)}`}function Pt(n){let t=Se(n),e=_t[t%_t.length],r="#f5f0eb",i=We(e[0],r,.85),o=We(e[1],r,.85),s=We(e[2],r,.85),l=Se(n+"pos1"),a=Se(n+"pos2"),p=20+t%61,g=20+(t>>4)%61,u=20+l%61,w=20+(l>>4)%61,x=20+a%61,S=20+(a>>4)%61;return [`radial-gradient(circle at ${p}% ${g}%, ${e[0]} 0%, ${i} 70%)`,`radial-gradient(circle at ${u}% ${w}%, ${e[1]} 0%, ${o} 70%)`,`radial-gradient(circle at ${x}% ${S}%, ${e[2]} 0%, ${s} 70%)`].join(", ")}function Ut(n){return typeof n=="number"?n:K[n]??K[I.size]}function qe(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 Ee(n,t,e,r,i){let o=i??t*(1-e);return n*o}function Lt(n,t,e){return e==="ltr"?t-n:n+1}function Dt(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 Ot(n){return n>99?"+99":`+${n}`}function zt(n){return n<=80?"120":n<=120?"240":n<=240?"480":("960")}function Nt(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 Bt(n){return {circle:"np:rounded-full",rounded:"np:rounded-xl",squircle:"np:rounded-[30%]",square:"np:rounded-none"}[n]}function Ht(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 Gt(n,t){return t?{className:"",style:{background:t}}:n?n.includes("gradient")?{className:"",style:{background:n}}:{className:"",style:{backgroundColor:n}}:{className:"",style:{backgroundColor:"transparent"}}}function jt(n){return {boxShadow:Et[n]}}var vr={shimmer:`
5
5
  @keyframes pp-shimmer {
6
6
  0% { transform: translateX(-100%); }
7
7
  100% { transform: translateX(100%); }
@@ -39,8 +39,8 @@ 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
- }`},xr=Object.values(yr).join(`
43
- `),vr=`
42
+ }`},xr=Object.values(vr).join(`
43
+ `),wr=`
44
44
  /* Profile Picture Component Styles */
45
45
  .pp-container {
46
46
  --pp-transition-duration: 200ms;
@@ -244,8 +244,8 @@ Make sure to test your application with a production build as repeat registratio
244
244
  transition: none !important;
245
245
  }
246
246
  }
247
- `,Gt=`${xr}
248
- ${vr}`,jt=`
247
+ `,Ft=`${xr}
248
+ ${wr}`,Wt=`
249
249
  @keyframes np-shimmer {
250
250
  0% { background-position: -200% 0; }
251
251
  100% { background-position: 200% 0; }
@@ -255,7 +255,7 @@ ${vr}`,jt=`
255
255
  background-size: 200% 100%;
256
256
  animation: np-shimmer 1.5s infinite;
257
257
  }
258
- `;function Wt(i,e=.3){if(_t(i)){let t=Number.parseInt(i.slice(1,3),16),r=Number.parseInt(i.slice(3,5),16),n=Number.parseInt(i.slice(5,7),16);return `0 0 20px 0 rgba(${t}, ${r}, ${n}, ${e})`}return `0 0 20px 0 ${i}`}var wr=`
258
+ `;function Vt(n,t=.3){if(At(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 Sr=`
259
259
  @keyframes ppg-tooltip-in {
260
260
  from {
261
261
  opacity: 0;
@@ -306,7 +306,7 @@ ${vr}`,jt=`
306
306
  opacity: 1;
307
307
  }
308
308
  }
309
- `,Sr=`
309
+ `,Cr=`
310
310
  /* Profile Picture Group Container */
311
311
  .ppg-container {
312
312
  --ppg-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
@@ -751,31 +751,31 @@ ${vr}`,jt=`
751
751
  box-shadow: 0 0 0 1.5px rgba(44, 44, 46, 0.95), 0 0 6px rgba(48, 209, 88, 0.5);
752
752
  }
753
753
  }
754
- `,Vt=`${wr}
755
- ${Sr}`;var p=class p extends I{constructor(){super(...arguments);this.src="";this.alt="";this.size=T.size;this.variant=T.variant;this.shadow=T.shadow;this.border=false;this.borderWidth=T.borderWidth;this.borderColor=T.borderColor;this.rotation=0;this.zoom=T.zoom;this.loading=T.loading;this.placeholder=T.placeholder;this.placeholderColor=T.placeholderColor;this.imageMode="original";this.isLoaded=false;this.hasError=false;this.cdnLoadFailed=false;this.previousSrc="";this.randomSeed=Math.random().toString(36).slice(2);this.RETRY_DELAY_MS=3e4;}static{this.stylesInjected=false;}static{this.cdnBaseUrl="";}static{this.instances=new Set;}static setCdnBaseUrl(t){p.cdnBaseUrl=t,p.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 p.cdnBaseUrl}createRenderRoot(){return p.injectStylesOnce(),this}static injectStylesOnce(){if(p.stylesInjected||typeof document>"u")return;(typeof requestIdleCallback<"u"?requestIdleCallback:r=>setTimeout(r,1))(()=>{if(p.stylesInjected)return;let r=document.createElement("style");r.textContent=Gt,document.head.appendChild(r),p.stylesInjected=true;});}get pixelSize(){let t=this.size;return typeof t=="number"?t:K[t]??K[T.size]}get gradientSeed(){return this.extCustomerId||this.alt||this.src||this.randomSeed}connectedCallback(){super.connectedCallback(),p.instances.add(this);}disconnectedCallback(){super.disconnectedCallback(),p.instances.delete(this),this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0);}firstUpdated(){this.extCustomerId&&p.cdnBaseUrl&&(this.previousExtCustomerId=this.extCustomerId,this.loadCdnImage());}updated(t){super.updated(t),this.extCustomerId&&p.cdnBaseUrl&&!this.cdnImageUrl&&!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);let r=t.has("extCustomerId")&&this.extCustomerId!==this.previousExtCustomerId,n=t.has("size")||t.has("imageMode");(r||n&&this.extCustomerId)&&(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}));}handleClick(t){this.interactive?.pressable&&this.dispatchEvent(new CustomEvent("profile-picture-click",{bubbles:true,composed:true,detail:{extCustomerId:this.extCustomerId,alt:this.alt,src:this.src}}));}handleKeyDown(t){this.interactive?.pressable&&(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.handleClick(t));}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&&p.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&&p.cdnBaseUrl)){this.cdnLoadFailed=true;return}let t=Ot(this.pixelSize),r=typeof window<"u"?window.location.hostname:"localhost";this.cdnImageUrl=zt(p.cdnBaseUrl,this.extCustomerId,t,this.imageMode,r);}getContainerStyles(){let t=Ht(this.bgColor,this.bgGradient),r=this.border?Bt(this.borderWidth,this.borderColor):null,n=Ft(this.shadow),o={};if(this.glow){let l=this.glow.color??this.borderColor??"#6366f1";o={"--pp-glow-color":l,boxShadow:Wt(l,this.glow.intensity??.3)};}let s=this.interactive?.hoverable||this.interactive?.pressable;return {classes:P("pp-container",Nt(this.variant),r?.className,s&&"pp-interactive",this.glow?.animate&&"pp-glow"),styles:{width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,borderRadius:J[this.variant],...r?.style,...n,...o,cursor:this.interactive?.cursor??(s?"pointer":"default"),transform:this.rotation?`rotate(${this.rotation}deg)`:void 0},innerStyles:t.style??{},innerClasses:t.className}}renderPlaceholder(){if(this.isLoaded||this.placeholder==="none")return g;let t={shimmer:"pp-shimmer",pulse:"pp-pulse",skeleton:"pp-skeleton",blur:"",none:""}[this.placeholder];return b`
756
- ${this.placeholder==="shimmer"?b`<style>${jt}</style>`:g}
754
+ `,qt=`${Sr}
755
+ ${Cr}`;var d=class d extends R{constructor(){super(...arguments);this.src="";this.alt="";this.size=A.size;this.variant=A.variant;this.shadow=A.shadow;this.border=false;this.borderWidth=A.borderWidth;this.borderColor=A.borderColor;this.rotation=0;this.zoom=A.zoom;this.loading=A.loading;this.placeholder=A.placeholder;this.placeholderColor=A.placeholderColor;this.imageMode="original";this.isLoaded=false;this.hasError=false;this.cdnLoadFailed=false;this.previousSrc="";this.randomSeed=Math.random().toString(36).slice(2);this.RETRY_DELAY_MS=3e4;}static{this.stylesInjected=false;}static{this.cdnBaseUrl="";}static{this.instances=new Set;}static setCdnBaseUrl(e){d.cdnBaseUrl=e,d.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 d.cdnBaseUrl}createRenderRoot(){return d.injectStylesOnce(),this}static injectStylesOnce(){if(d.stylesInjected||typeof document>"u")return;(typeof requestIdleCallback<"u"?requestIdleCallback:r=>setTimeout(r,1))(()=>{if(d.stylesInjected)return;let r=document.createElement("style");r.textContent=Ft,document.head.appendChild(r),d.stylesInjected=true;});}resolveObjectProp(e){if(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return}return e}}get pixelSize(){let e=this.size;return typeof e=="number"?e:K[e]??K[A.size]}get gradientSeed(){return this.extCustomerId||this.alt||this.src||this.randomSeed}connectedCallback(){super.connectedCallback(),d.instances.add(this);}disconnectedCallback(){super.disconnectedCallback(),d.instances.delete(this),this.retryTimeoutId&&(clearTimeout(this.retryTimeoutId),this.retryTimeoutId=void 0);}firstUpdated(){this.extCustomerId&&d.cdnBaseUrl&&(this.previousExtCustomerId=this.extCustomerId,this.loadCdnImage());}updated(e){super.updated(e),this.extCustomerId&&d.cdnBaseUrl&&!this.cdnImageUrl&&!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);let r=e.has("extCustomerId")&&this.extCustomerId!==this.previousExtCustomerId,i=e.has("size")||e.has("imageMode");(r||i&&this.extCustomerId)&&(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}));}handleClick(e){this.resolveObjectProp(this.interactive)?.pressable&&this.dispatchEvent(new CustomEvent("profile-picture-click",{bubbles:true,composed:true,detail:{extCustomerId:this.extCustomerId,alt:this.alt,src:this.src}}));}handleKeyDown(e){this.resolveObjectProp(this.interactive)?.pressable&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.handleClick(e));}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&&d.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&&d.cdnBaseUrl)){this.cdnLoadFailed=true;return}let e=zt(this.pixelSize),r=typeof window<"u"?window.location.hostname:"localhost";this.cdnImageUrl=Nt(d.cdnBaseUrl,this.extCustomerId,e,this.imageMode,r);}getContainerStyles(){let e=Gt(this.bgColor,this.bgGradient),r=this.border?Ht(this.borderWidth,this.borderColor):null,i=jt(this.shadow),o=this.resolveObjectProp(this.glow),s={};if(o){let p=o.color??this.borderColor??"#6366f1";s={"--pp-glow-color":p,boxShadow:Vt(p,o.intensity??.3)};}let l=this.resolveObjectProp(this.interactive),a=l?.hoverable||l?.pressable;return {classes:M("pp-container",Bt(this.variant),r?.className,a&&"pp-interactive",o?.animate&&"pp-glow"),styles:{width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,borderRadius:J[this.variant],...r?.style,...i,...s,cursor:l?.cursor??(a?"pointer":"default"),transform:this.rotation?`rotate(${this.rotation}deg)`:void 0},innerStyles:e.style??{},innerClasses:e.className}}renderPlaceholder(){if(this.isLoaded||this.placeholder==="none")return f;let e={shimmer:"pp-shimmer",pulse:"pp-pulse",skeleton:"pp-skeleton",blur:"",none:""}[this.placeholder];return y`
756
+ ${this.placeholder==="shimmer"?y`<style>${Wt}</style>`:f}
757
757
  <div
758
- class=${P("np:absolute np:inset-0",t)}
759
- style=${x({backgroundColor:this.placeholderColor,borderRadius:"inherit"})}>
758
+ class=${M("np:absolute np:inset-0",e)}
759
+ style=${v({backgroundColor:this.placeholderColor,borderRadius:"inherit"})}>
760
760
  </div>
761
- `}renderFallback(){let t=!!(this.bgColor||this.bgGradient);if(this.fallbackMode==="gradient"){let n=Mt(this.gradientSeed);return b`
761
+ `}renderFallback(){let e=!!(this.bgColor||this.bgGradient);if(this.fallbackMode==="gradient"){let i=Pt(this.gradientSeed);return y`
762
762
  <div
763
763
  class="pp-fallback np:absolute np:inset-0"
764
- style=${x({background:t?"transparent":n})}>
764
+ style=${v({background:e?"transparent":i})}>
765
765
  </div>
766
- `}if(this.fallback)return b`
766
+ `}if(this.fallback)return y`
767
767
  <span
768
768
  class="pp-fallback"
769
- style=${x({fontSize:`${We(this.pixelSize)}px`})}>
769
+ style=${v({fontSize:`${Ve(this.pixelSize)}px`})}>
770
770
  ${this.fallback}
771
771
  </span>
772
- `;if(this.alt){let n=Ee(this.alt);return b`
772
+ `;if(this.alt){let i=$e(this.alt);return y`
773
773
  <div
774
774
  class="pp-fallback np:absolute np:inset-0"
775
- style=${x({background:t?"transparent":n,fontSize:`${We(this.pixelSize)}px`})}>
775
+ style=${v({background:e?"transparent":i,fontSize:`${Ve(this.pixelSize)}px`})}>
776
776
  ${Ce(this.alt)}
777
777
  </div>
778
- `}let r=this.pixelSize*.5;return b`
778
+ `}let r=this.pixelSize*.5;return y`
779
779
  <svg
780
780
  class="pp-fallback-icon"
781
781
  style="width: ${r}px; height: ${r}px;"
@@ -783,7 +783,7 @@ ${Sr}`;var p=class p extends I{constructor(){super(...arguments);this.src="";thi
783
783
  viewBox="0 0 24 24">
784
784
  <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" />
785
785
  </svg>
786
- `}renderImage(){let t=!!(this.extCustomerId&&p.cdnBaseUrl),r;if(this.cdnImageUrl?r=this.cdnImageUrl:(!t||this.cdnLoadFailed)&&(r=this.src),this.hasError||!r)return this.renderFallback();let n=this.zoom&&this.zoom!==1?x({transform:`scale(${this.zoom})`}):g;return b`
786
+ `}renderImage(){let e=!!(this.extCustomerId&&d.cdnBaseUrl),r;if(this.cdnImageUrl?r=this.cdnImageUrl:(!e||this.cdnLoadFailed)&&(r=this.src),this.hasError||!r)return this.renderFallback();let i=this.zoom&&this.zoom!==1?v({transform:`scale(${this.zoom})`}):f;return y`
787
787
  <img
788
788
  src=${r}
789
789
  alt=${this.alt}
@@ -791,34 +791,34 @@ ${Sr}`;var p=class p extends I{constructor(){super(...arguments);this.src="";thi
791
791
  decoding="async"
792
792
  @load=${this.handleLoad}
793
793
  @error=${this.handleError}
794
- class=${P("pp-image",this.isLoaded?"pp-image-loaded":"pp-image-loading")}
795
- style=${n}
794
+ class=${M("pp-image",this.isLoaded?"pp-image-loaded":"pp-image-loading")}
795
+ style=${i}
796
796
  draggable="false" />
797
- `}renderRing(){if(!this.ring?.show)return g;let t=this.ring.width??3,r=this.ring.gap??3,n=t+r,o,s=this.ring.progress!==void 0;if(s){let l=this.ring.progress??0,a=this.ring.color??"#30D158",c=this.ring.emptyColor??"#8E8E93";o=It(l,a,c);}else this.ring.gradient&&this.ring.gradient.length>0?o=Rt(this.ring.gradient):o=this.ring.color??"linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888)";return b`
797
+ `}renderRing(){let e=this.resolveObjectProp(this.ring);if(!e?.show)return f;let r=e.width??3,i=e.gap??3,o=r+i,s,l=e.progress!==void 0;if(l){let a=e.progress??0,p=e.color??"#30D158",g=e.emptyColor??"#8E8E93";s=Mt(a,p,g);}else e.gradient&&e.gradient.length>0?s=It(e.gradient):s=e.color??"linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888)";return y`
798
798
  <div
799
- class=${P("pp-ring",this.ring.animate&&!s&&"pp-ring-animated",s&&"pp-ring-progress")}
800
- style=${x({inset:`-${n}px`,padding:`${t}px`,background:o,borderRadius:J[this.variant]})}>
799
+ class=${M("pp-ring",e.animate&&!l&&"pp-ring-animated",l&&"pp-ring-progress")}
800
+ style=${v({inset:`-${o}px`,padding:`${r}px`,background:s,borderRadius:J[this.variant]})}>
801
801
  </div>
802
- `}getCornerOffset(){let t=this.pixelSize/2,n={circle:1-Math.SQRT2/2,square:0,rounded:.04,squircle:.08}[this.variant];return t*n}renderPresence(){if(!this.presence)return g;let t=this.presence.thickness??2,r=Tt(this.pixelSize,t),n=Ct[this.presence.status],s=this.getCornerOffset()-r/2;return b`
802
+ `}getCornerOffset(){let e=this.pixelSize/2,i={circle:1-Math.SQRT2/2,square:0,rounded:.04,squircle:.08}[this.variant];return e*i}renderPresence(){let e=this.resolveObjectProp(this.presence);if(!e)return f;let r=e.thickness??2,i=Tt(this.pixelSize,r),o=$t[e.status],l=this.getCornerOffset()-i/2;return y`
803
803
  <div
804
- class=${P("pp-presence",this.presence.animate&&"pp-presence-animated")}
805
- style=${x({width:`${r}px`,height:`${r}px`,backgroundColor:n,bottom:`${s}px`,right:`${s}px`,color:n})}
806
- title=${this.presence.status}>
804
+ class=${M("pp-presence",e.animate&&"pp-presence-animated")}
805
+ style=${v({width:`${i}px`,height:`${i}px`,backgroundColor:o,bottom:`${l}px`,right:`${l}px`,color:o})}
806
+ title=${e.status}>
807
807
  </div>
808
- `}renderBadge(){if(!this.badge)return g;let t=this.badge.position??"bottom-right",r=this.badge.content!==void 0,n=this.badge.icon!==void 0,o=r||n,{size:s,fontSize:l}=At(this.pixelSize,o),a=this.badge.bgColor??"#22c55e",c=this.badge.color??"#ffffff",f=this.badge.borderRadius??"9999px",h=r&&this.badge.content!==void 0?kt(this.badge.content,this.badge.max):null,v=n?this.badge.icon:null,w=l*.9,C=`${this.getCornerOffset()-s/2}px`,y={"top-left":{top:C,left:C},"top-center":{top:C,left:"50%",transform:"translateX(-50%)"},"top-right":{top:C,right:C},"bottom-left":{bottom:C,left:C},"bottom-center":{bottom:C,left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:C,right:C}};return b`
808
+ `}renderBadge(){let e=this.resolveObjectProp(this.badge);if(!e)return f;let r=e.position??"bottom-right",i=e.content!==void 0,o=e.icon!==void 0,s=i||o,{size:l,fontSize:a}=kt(this.pixelSize,s),p=e.bgColor??"#22c55e",g=e.color??"#ffffff",u=e.borderRadius??"9999px",w=i&&e.content!==void 0?Rt(e.content,e.max):null,x=o?e.icon:null,S=a*.9,m=`${this.getCornerOffset()-l/2}px`,_={"top-left":{top:m,left:m},"top-center":{top:m,left:"50%",transform:"translateX(-50%)"},"top-right":{top:m,right:m},"bottom-left":{bottom:m,left:m},"bottom-center":{bottom:m,left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:m,right:m}};return y`
809
809
  <div
810
- class=${P("pp-badge",this.badge.pulse&&"pp-badge-pulse",this.badge.glow&&"pp-badge-glow",n&&"pp-badge-with-icon")}
811
- style=${x({width:o?"auto":`${s}px`,minWidth:`${s}px`,height:`${s}px`,padding:o?"0 6px":"0",fontSize:`${l}px`,backgroundColor:a,color:c,borderRadius:f,"--pp-badge-glow-color":a,gap:n&&r?"4px":"0",...y[t]})}>
812
- ${v?b`<span class="pp-badge-icon" style=${x({fontSize:`${w}px`})}>${v}</span>`:g}
813
- ${h??g}
810
+ class=${M("pp-badge",e.pulse&&"pp-badge-pulse",e.glow&&"pp-badge-glow",o&&"pp-badge-with-icon")}
811
+ style=${v({width:s?"auto":`${l}px`,minWidth:`${l}px`,height:`${l}px`,padding:s?"0 6px":"0",fontSize:`${a}px`,backgroundColor:p,color:g,borderRadius:u,"--pp-badge-glow-color":p,gap:o&&i?"4px":"0",..._[r]})}>
812
+ ${x?y`<span class="pp-badge-icon" style=${v({fontSize:`${S}px`})}>${x}</span>`:f}
813
+ ${w??f}
814
814
  </div>
815
- `}render(){let t=this.getContainerStyles(),r=this.interactive?.focusable||this.interactive?.pressable?0:void 0;return b`
815
+ `}render(){let e=this.getContainerStyles(),r=this.resolveObjectProp(this.interactive),i=r?.focusable||r?.pressable?0:void 0;return y`
816
816
  <div
817
- class=${t.classes}
818
- style=${x(t.styles)}
819
- tabindex=${r??g}
820
- role=${this.interactive?.pressable?"button":g}
821
- aria-label=${this.alt||g}
817
+ class=${e.classes}
818
+ style=${v(e.styles)}
819
+ tabindex=${i??f}
820
+ role=${r?.pressable?"button":f}
821
+ aria-label=${this.alt||f}
822
822
  @click=${this.handleClick}
823
823
  @keydown=${this.handleKeyDown}
824
824
  data-profile-picture>
@@ -828,8 +828,8 @@ ${Sr}`;var p=class p extends I{constructor(){super(...arguments);this.src="";thi
828
828
 
829
829
  <!-- Inner container for image clipping -->
830
830
  <div
831
- class=${P("pp-inner",t.innerClasses)}
832
- style=${x({borderRadius:J[this.variant],...t.innerStyles})}>
831
+ class=${M("pp-inner",e.innerClasses)}
832
+ style=${v({borderRadius:J[this.variant],...e.innerStyles})}>
833
833
  <!-- Placeholder -->
834
834
  ${this.renderPlaceholder()}
835
835
 
@@ -843,7 +843,7 @@ ${Sr}`;var p=class p extends I{constructor(){super(...arguments);this.src="";thi
843
843
  <!-- Presence Indicator -->
844
844
  ${this.renderPresence()}
845
845
  </div>
846
- `}};d([u({type:String})],p.prototype,"src"),d([u({type:String})],p.prototype,"alt"),d([u({type:String,attribute:"ext-customer-id"})],p.prototype,"extCustomerId"),d([u({type:String})],p.prototype,"size"),d([u({type:String})],p.prototype,"variant"),d([u({type:String})],p.prototype,"shadow"),d([u({type:Boolean})],p.prototype,"border"),d([u({type:Number,attribute:"border-width"})],p.prototype,"borderWidth"),d([u({type:String,attribute:"border-color"})],p.prototype,"borderColor"),d([u({type:Number})],p.prototype,"rotation"),d([u({type:Number})],p.prototype,"zoom"),d([u({type:String,attribute:"bg-color"})],p.prototype,"bgColor"),d([u({type:String,attribute:"bg-gradient"})],p.prototype,"bgGradient"),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}})],p.prototype,"ring"),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}})],p.prototype,"presence"),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}})],p.prototype,"glow"),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}})],p.prototype,"badge"),d([u({type:String})],p.prototype,"loading"),d([u({type:String})],p.prototype,"placeholder"),d([u({type:String,attribute:"placeholder-color"})],p.prototype,"placeholderColor"),d([u({type:String})],p.prototype,"fallback"),d([u({type:String,attribute:"fallback-mode"})],p.prototype,"fallbackMode"),d([u({type:String,attribute:"image-mode"})],p.prototype,"imageMode"),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}})],p.prototype,"interactive"),d([O()],p.prototype,"isLoaded"),d([O()],p.prototype,"hasError"),d([O()],p.prototype,"cdnImageUrl"),d([O()],p.prototype,"cdnLoadFailed");var qe=p;customElements.get("profile-picture")||customElements.define("profile-picture",qe);var Ye=false;function Cr(){if(Ye||typeof document>"u")return;(typeof requestIdleCallback<"u"?requestIdleCallback:e=>setTimeout(e,1))(()=>{if(Ye)return;let e=document.createElement("style");e.textContent=Vt,document.head.appendChild(e),Ye=true;});}var $=class extends I{constructor(){super(...arguments);this.max=M.max;this.direction=M.direction;this.overlap=M.overlap;this.size=M.size;this.showAddButton=false;this.addButtonLabel="Add user";this.animated=M.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 Cr(),this}get pixelSize(){return Pt(this.size)}get tooltipEnabled(){return this.tooltip?.enabled!==false}get tooltipPosition(){return this.tooltip?.position??"top"}get tooltipDelay(){return this.tooltip?.delay??M.tooltipDelay}get dropdownMaxHeight(){return this.dropdown?.maxHeight??M.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","image-mode"]});}updateUsers(){let t=Array.from(this.children).filter(r=>r.tagName.toLowerCase()==="profile-picture"&&r.getAttribute("slot")!=="internal");this.users=t.map((r,n)=>{let o=(a,c)=>{let f=c??a,h=r[a];return h!=null&&h!==""?String(h):r.getAttribute(f)??void 0},s=o("borderWidth","border-width"),l=s?Number.parseInt(String(s),10):void 0;return {id:o("dataUserId","data-user-id"),name:o("alt")??`User ${n+1}`,src:o("src"),extCustomerId:o("extCustomerId","ext-customer-id"),status:o("dataStatus","data-status"),element:r,index:n,variant:o("variant"),shadow:o("shadow"),border:!!(r.border??r.hasAttribute("border")),borderWidth:l,borderColor:o("borderColor","border-color"),bgColor:o("bgColor","bg-color"),bgGradient:o("bgGradient","bg-gradient"),imageMode:o("imageMode","image-mode")}});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(g,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(),n=10,o=280,s=Math.min(this.dropdownMaxHeight+60,t.length*56+60),l=window.innerWidth,a=window.innerHeight;if(l<480){let L=b`
846
+ `}};c([h({type:String})],d.prototype,"src"),c([h({type:String})],d.prototype,"alt"),c([h({type:String,attribute:"ext-customer-id"})],d.prototype,"extCustomerId"),c([h({type:String})],d.prototype,"size"),c([h({type:String})],d.prototype,"variant"),c([h({type:String})],d.prototype,"shadow"),c([h({type:Boolean})],d.prototype,"border"),c([h({type:Number,attribute:"border-width"})],d.prototype,"borderWidth"),c([h({type:String,attribute:"border-color"})],d.prototype,"borderColor"),c([h({type:Number})],d.prototype,"rotation"),c([h({type:Number})],d.prototype,"zoom"),c([h({type:String,attribute:"bg-color"})],d.prototype,"bgColor"),c([h({type:String,attribute:"bg-gradient"})],d.prototype,"bgGradient"),c([h({type:Object,attribute:"ring",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],d.prototype,"ring"),c([h({type:Object,attribute:"presence",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],d.prototype,"presence"),c([h({type:Object,attribute:"glow",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],d.prototype,"glow"),c([h({type:Object,attribute:"badge",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],d.prototype,"badge"),c([h({type:String})],d.prototype,"loading"),c([h({type:String})],d.prototype,"placeholder"),c([h({type:String,attribute:"placeholder-color"})],d.prototype,"placeholderColor"),c([h({type:String})],d.prototype,"fallback"),c([h({type:String,attribute:"fallback-mode"})],d.prototype,"fallbackMode"),c([h({type:String,attribute:"image-mode"})],d.prototype,"imageMode"),c([h({type:Object,attribute:"interactive",converter:{fromAttribute:e=>{if(e)try{return JSON.parse(e)}catch{return}},toAttribute:e=>e?JSON.stringify(e):null}})],d.prototype,"interactive"),c([D()],d.prototype,"isLoaded"),c([D()],d.prototype,"hasError"),c([D()],d.prototype,"cdnImageUrl"),c([D()],d.prototype,"cdnLoadFailed");var Ye=d;customElements.get("profile-picture")||customElements.define("profile-picture",Ye);var Ke=false;function $r(){if(Ke||typeof document>"u")return;(typeof requestIdleCallback<"u"?requestIdleCallback:t=>setTimeout(t,1))(()=>{if(Ke)return;let t=document.createElement("style");t.textContent=qt,document.head.appendChild(t),Ke=true;});}var $=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 $r(),this}get pixelSize(){return Ut(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","image-mode","zoom","loading","placeholder","placeholder-color","fallback","fallback-mode","glow","ring","badge","interactive"]});}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=(a,p)=>{let g=p??a,u=r[a];return u!=null&&u!==""?String(u):r.getAttribute(g)??void 0},s=o("borderWidth","border-width"),l=s?Number.parseInt(String(s),10):void 0;return {id:o("dataUserId","data-user-id"),name:o("alt")??`User ${i+1}`,src:o("src"),extCustomerId:o("extCustomerId","ext-customer-id"),status:o("dataStatus","data-status"),element:r,index:i,variant:o("variant"),shadow:o("shadow"),border:!!(r.border??r.hasAttribute("border")),borderWidth:l,borderColor:o("borderColor","border-color"),bgColor:o("bgColor","bg-color"),bgGradient:o("bgGradient","bg-gradient"),imageMode:o("imageMode","image-mode"),zoom:(()=>{let a=o("zoom");return a?Number(a):void 0})(),loading:o("loading"),placeholder:o("placeholder"),placeholderColor:o("placeholderColor","placeholder-color"),fallback:o("fallback"),fallbackMode:o("fallbackMode","fallback-mode"),glow:(()=>{let a=r.glow;if(a&&typeof a=="object")return a;let p=r.getAttribute("glow");if(p)try{return JSON.parse(p)}catch{}})(),ring:(()=>{let a=r.ring;if(a&&typeof a=="object")return a;let p=r.getAttribute("ring");if(p)try{return JSON.parse(p)}catch{}})(),badge:(()=>{let a=r.badge;if(a&&typeof a=="object")return a;let p=r.getAttribute("badge");if(p)try{return JSON.parse(p)}catch{}})(),interactive:(()=>{let a=r.interactive;if(a&&typeof a=="object")return a;let p=r.getAttribute("interactive");if(p)try{return JSON.parse(p)}catch{}})()}});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(f,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),l=window.innerWidth,a=window.innerHeight;if(l<480){let P=y`
847
847
  <div
848
848
  class="ppg-backdrop ppg-backdrop-visible"
849
849
  style="pointer-events: auto; background: rgba(0,0,0,0.5);"
@@ -852,22 +852,22 @@ ${Sr}`;var p=class p extends I{constructor(){super(...arguments);this.src="";thi
852
852
  ></div>
853
853
  <div
854
854
  class="ppg-dropdown ppg-dropdown-modal"
855
- style=${x({position:"fixed",pointerEvents:"auto",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"calc(100vw - 32px)",maxWidth:"320px",maxHeight:"70vh"})}
855
+ style=${v({position:"fixed",pointerEvents:"auto",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"calc(100vw - 32px)",maxWidth:"320px",maxHeight:"70vh"})}
856
856
  data-position="modal"
857
857
  role="menu"
858
858
  aria-label="Hidden users"
859
859
  >
860
860
  <div class="ppg-dropdown-header">
861
- ${t.length} more
861
+ ${e.length} more
862
862
  </div>
863
863
  <div
864
864
  class="ppg-dropdown-list"
865
- style=${x({maxHeight:"calc(70vh - 60px)"})}
865
+ style=${v({maxHeight:"calc(70vh - 60px)"})}
866
866
  >
867
- ${t.map(X=>this.renderDropdownItem(X))}
867
+ ${e.map(X=>this.renderDropdownItem(X))}
868
868
  </div>
869
869
  </div>
870
- `;Y(L,this.portalContainer);return}let f=a-r.bottom-n,h=r.top-n,v=l-r.left,w=r.right,S=this.dropdownPosition;S==="bottom"&&f<s&&h>f?S="top":S==="top"&&h<s&&f>h&&(S="bottom");let k;v>=o?k=r.left:w>=o?k=r.right-o:k=(l-o)/2,k=Math.max(8,Math.min(k,l-o-8));let C=S==="bottom"?r.bottom+n:void 0,y=S==="top"?a-r.top+n:void 0,A=b`
870
+ `;Y(P,this.portalContainer);return}let g=a-r.bottom-i,u=r.top-i,w=l-r.left,x=r.right,S=this.dropdownPosition;S==="bottom"&&g<s&&u>g?S="top":S==="top"&&u<s&&g>u&&(S="bottom");let k;w>=o?k=r.left:x>=o?k=r.right-o:k=(l-o)/2,k=Math.max(8,Math.min(k,l-o-8));let N=S==="bottom"?r.bottom+i:void 0,m=S==="top"?a-r.top+i:void 0,_=y`
871
871
  <div
872
872
  class="ppg-backdrop"
873
873
  style="pointer-events: auto;"
@@ -876,68 +876,78 @@ ${Sr}`;var p=class p extends I{constructor(){super(...arguments);this.src="";thi
876
876
  ></div>
877
877
  <div
878
878
  class="ppg-dropdown ppg-dropdown-portal"
879
- style=${x({position:"fixed",pointerEvents:"auto",top:C!==void 0?`${C}px`:"auto",bottom:y!==void 0?`${y}px`:"auto",left:`${k}px`,width:`${o}px`})}
879
+ style=${v({position:"fixed",pointerEvents:"auto",top:N!==void 0?`${N}px`:"auto",bottom:m!==void 0?`${m}px`:"auto",left:`${k}px`,width:`${o}px`})}
880
880
  data-position=${S}
881
881
  role="menu"
882
882
  aria-label="Hidden users"
883
883
  >
884
884
  <div class="ppg-dropdown-header">
885
- ${t.length} more
885
+ ${e.length} more
886
886
  </div>
887
887
  <div
888
888
  class="ppg-dropdown-list"
889
- style=${x({maxHeight:`${this.dropdownMaxHeight}px`})}
889
+ style=${v({maxHeight:`${this.dropdownMaxHeight}px`})}
890
890
  >
891
- ${t.map(L=>this.renderDropdownItem(L))}
891
+ ${e.map(P=>this.renderDropdownItem(P))}
892
892
  </div>
893
893
  </div>
894
- `;Y(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 n=r.currentTarget;this.tooltipTimeout=window.setTimeout(()=>{this.tooltipData={user:t,rect:n.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,n){let o=$e(r,this.pixelSize,this.overlap,this.direction,this.spacing),s=Lt(r,n,this.direction),l=t.variant??"circle",a=t.shadow??"none",c=this.rotationAmount?r%2===0?-this.rotationAmount:this.rotationAmount:0;return b`
894
+ `;Y(_,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=Ee(r,this.pixelSize,this.overlap,this.direction,this.spacing),s=Lt(r,i,this.direction),l=e.variant??"circle",a=e.shadow??"none",p=this.rotationAmount?r%2===0?-this.rotationAmount:this.rotationAmount:0;return y`
895
895
  <div
896
896
  class="ppg-avatar-wrapper"
897
- style=${x({left:`${o}px`,zIndex:String(s),width:`${this.pixelSize}px`,height:`${this.pixelSize}px`})}
897
+ style=${v({left:`${o}px`,zIndex:String(s),width:`${this.pixelSize}px`,height:`${this.pixelSize}px`})}
898
898
  tabindex="0"
899
899
  role="button"
900
- aria-label=${t.name}
901
- @click=${()=>this.handleAvatarClick(t)}
902
- @mouseenter=${f=>this.handleAvatarHover(t,f)}
900
+ aria-label=${e.name}
901
+ @click=${()=>this.handleAvatarClick(e)}
902
+ @mouseenter=${g=>this.handleAvatarHover(e,g)}
903
903
  @mouseleave=${this.handleAvatarLeave}
904
- @keydown=${f=>this.handleKeyDown(f,()=>this.handleAvatarClick(t))}
904
+ @keydown=${g=>this.handleKeyDown(g,()=>this.handleAvatarClick(e))}
905
905
  >
906
- ${this.renderProfilePicture(t,l,a,c)}
906
+ ${this.renderProfilePicture(e,l,a,p)}
907
907
  </div>
908
- `}renderProfilePicture(t,r,n,o){return b`
908
+ `}renderProfilePicture(e,r,i,o){return y`
909
909
  <profile-picture
910
- .src=${t.src||void 0}
911
- .alt=${t.name}
910
+ .src=${e.src||void 0}
911
+ .alt=${e.name}
912
912
  .size=${this.pixelSize}
913
913
  .variant=${r}
914
- .shadow=${n}
914
+ .shadow=${i}
915
915
  .rotation=${o}
916
- .extCustomerId=${t.extCustomerId}
917
- ?border=${t.border}
918
- .borderWidth=${t.border?t.borderWidth??2:2}
919
- .borderColor=${t.border?t.borderColor??"#ffffff":"#ffffff"}
920
- .bgColor=${t.bgGradient?void 0:t.bgColor||void 0}
921
- .bgGradient=${t.bgGradient??void 0}
922
- .imageMode=${t.imageMode??"original"}
923
- data-user-id=${t.id??""}
924
- data-status=${t.status??""}
916
+ .extCustomerId=${e.extCustomerId}
917
+ ?border=${e.border}
918
+ .borderWidth=${e.border?e.borderWidth??2:2}
919
+ .borderColor=${e.border?e.borderColor??"#ffffff":"#ffffff"}
920
+ .bgColor=${e.bgGradient?void 0:e.bgColor||void 0}
921
+ .bgGradient=${e.bgGradient??void 0}
922
+ .imageMode=${e.imageMode??"original"}
923
+ .zoom=${e.zoom??void 0}
924
+ .loading=${e.loading??void 0}
925
+ .placeholder=${e.placeholder??void 0}
926
+ .placeholderColor=${e.placeholderColor??void 0}
927
+ .fallback=${e.fallback??void 0}
928
+ .fallbackMode=${e.fallbackMode??void 0}
929
+ .glow=${e.glow??void 0}
930
+ .ring=${e.ring??void 0}
931
+ .badge=${e.badge??void 0}
932
+ .interactive=${e.interactive??void 0}
933
+ data-user-id=${e.id??""}
934
+ data-status=${e.status??""}
925
935
  ></profile-picture>
926
- `}renderCounter(t,r,n){return b`
936
+ `}renderCounter(e,r,i){return y`
927
937
  <button
928
938
  class="ppg-counter"
929
- style=${x({left:`${r}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
930
- aria-label=${`${t} more users`}
939
+ style=${v({left:`${r}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
940
+ aria-label=${`${e} more users`}
931
941
  aria-expanded=${this.dropdownOpen}
932
942
  aria-haspopup="true"
933
- @click=${()=>this.handleCounterClick(n)}
943
+ @click=${()=>this.handleCounterClick(i)}
934
944
  >
935
- ${Dt(t)}
945
+ ${Ot(e)}
936
946
  </button>
937
- `}renderAddButton(t){let r=Math.round(this.pixelSize*.4);return b`
947
+ `}renderAddButton(e){let r=Math.round(this.pixelSize*.4);return y`
938
948
  <button
939
949
  class="ppg-add-button"
940
- style=${x({left:`${t}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
950
+ style=${v({left:`${e}px`,width:`${this.pixelSize}px`,height:`${this.pixelSize}px`,zIndex:"1"})}
941
951
  aria-label=${this.addButtonLabel}
942
952
  @click=${this.handleAddClick}
943
953
  >
@@ -956,54 +966,54 @@ ${Sr}`;var p=class p extends I{constructor(){super(...arguments);this.src="";thi
956
966
  <line x1="5" y1="12" x2="19" y2="12"></line>
957
967
  </svg>
958
968
  </button>
959
- `}renderTooltip(){if(!this.tooltipData)return g;let{user:t,rect:r}=this.tooltipData,n=8,o=this.getBoundingClientRect(),s=r.left-o.left+r.width/2,l=r.top-o.top,a=r.bottom-o.top,c=this.tooltipPosition==="top";return b`
969
+ `}renderTooltip(){if(!this.tooltipData)return f;let{user:e,rect:r}=this.tooltipData,i=8,o=this.getBoundingClientRect(),s=r.left-o.left+r.width/2,l=r.top-o.top,a=r.bottom-o.top,p=this.tooltipPosition==="top";return y`
960
970
  <div
961
971
  class="ppg-tooltip"
962
- style=${x({top:c?"auto":`${a+n}px`,bottom:c?`${o.height-l+n}px`:"auto",left:`${s}px`})}
972
+ style=${v({top:p?"auto":`${a+i}px`,bottom:p?`${o.height-l+i}px`:"auto",left:`${s}px`})}
963
973
  data-position=${this.tooltipPosition}
964
974
  role="tooltip"
965
975
  >
966
- ${t.name}
976
+ ${e.name}
967
977
  </div>
968
- `}renderDropdownItem(t){let r=Ee(t.name),n=t.src||t.extCustomerId;return b`
978
+ `}renderDropdownItem(e){let r=$e(e.name),i=e.src||e.extCustomerId;return y`
969
979
  <div
970
980
  class="ppg-dropdown-item"
971
981
  role="menuitem"
972
982
  tabindex="0"
973
- @click=${()=>this.handleDropdownItemClick(t)}
974
- @keydown=${o=>this.handleKeyDown(o,()=>this.handleDropdownItemClick(t))}
983
+ @click=${()=>this.handleDropdownItemClick(e)}
984
+ @keydown=${o=>this.handleKeyDown(o,()=>this.handleDropdownItemClick(e))}
975
985
  >
976
- ${n?b`<profile-picture
986
+ ${i?y`<profile-picture
977
987
  class="ppg-dropdown-avatar"
978
- .src=${t.src||void 0}
979
- .alt=${t.name}
980
- .extCustomerId=${t.extCustomerId}
988
+ .src=${e.src||void 0}
989
+ .alt=${e.name}
990
+ .extCustomerId=${e.extCustomerId}
981
991
  .size=${40}
982
992
  variant="circle"
983
993
  shadow="none"
984
- ></profile-picture>`:b`<div
994
+ ></profile-picture>`:y`<div
985
995
  class="ppg-dropdown-avatar-fallback"
986
- style=${x({background:r})}
996
+ style=${v({background:r})}
987
997
  >
988
- ${Ce(t.name)}
998
+ ${Ce(e.name)}
989
999
  </div>`}
990
1000
  <div class="ppg-dropdown-info">
991
- <div class="ppg-dropdown-name">${t.name}</div>
992
- ${this.showPresence&&t.status?b`
1001
+ <div class="ppg-dropdown-name">${e.name}</div>
1002
+ ${this.showPresence&&e.status?y`
993
1003
  <div class="ppg-dropdown-status">
994
1004
  <span
995
1005
  class="ppg-dropdown-presence"
996
- data-status=${t.status}
1006
+ data-status=${e.status}
997
1007
  ></span>
998
- ${this.formatStatus(t.status)}
1008
+ ${this.formatStatus(e.status)}
999
1009
  </div>
1000
- `:g}
1010
+ `:f}
1001
1011
  </div>
1002
1012
  </div>
1003
- `}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:n}=Ve(this.users.length,this.max,this.showAddButton),o=this.users.slice(n);this.updatePortalContent(o);}}render(){let{visible:t,hidden:r,showCounter:n}=Ve(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),l=t;n&&l++,this.showAddButton&&l++;let a=Ut(l,this.pixelSize,this.overlap,this.spacing),c=n?$e(t,this.pixelSize,this.overlap,this.direction,this.spacing):0,f=$e(t+(n?1:0),this.pixelSize,this.overlap,this.direction,this.spacing);return b`
1013
+ `}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}=qe(this.users.length,this.max,this.showAddButton),o=this.users.slice(i);this.updatePortalContent(o);}}render(){let{visible:e,hidden:r,showCounter:i}=qe(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),l=e;i&&l++,this.showAddButton&&l++;let a=Dt(l,this.pixelSize,this.overlap,this.spacing),p=i?Ee(e,this.pixelSize,this.overlap,this.direction,this.spacing):0,g=Ee(e+(i?1:0),this.pixelSize,this.overlap,this.direction,this.spacing);return y`
1004
1014
  <div
1005
- class=${P("ppg-container",this.animated&&"ppg-animated")}
1006
- style=${x({width:`${a}px`,height:`${this.pixelSize}px`})}
1015
+ class=${M("ppg-container",this.animated&&"ppg-animated")}
1016
+ style=${v({width:`${a}px`,height:`${this.pixelSize}px`})}
1007
1017
  role="group"
1008
1018
  aria-label="User avatars"
1009
1019
  >
@@ -1011,18 +1021,18 @@ ${Sr}`;var p=class p extends I{constructor(){super(...arguments);this.src="";thi
1011
1021
  <slot style="display: none;"></slot>
1012
1022
 
1013
1023
  <!-- Visible avatars -->
1014
- ${o.map((h,v)=>this.renderAvatar(h,v,t))}
1024
+ ${o.map((u,w)=>this.renderAvatar(u,w,e))}
1015
1025
 
1016
1026
  <!-- Counter -->
1017
- ${n?this.renderCounter(r,c,s):g}
1027
+ ${i?this.renderCounter(r,p,s):f}
1018
1028
 
1019
1029
  <!-- Add button -->
1020
- ${this.showAddButton?this.renderAddButton(f):g}
1030
+ ${this.showAddButton?this.renderAddButton(g):f}
1021
1031
 
1022
1032
  <!-- Tooltip -->
1023
1033
  ${this.renderTooltip()}
1024
1034
  </div>
1025
- `}};d([u({type:Number})],$.prototype,"max"),d([u({type:String})],$.prototype,"direction"),d([u({type:Number})],$.prototype,"overlap"),d([u({type:String})],$.prototype,"size"),d([u({type:Number})],$.prototype,"spacing"),d([u({type:Object})],$.prototype,"tooltip"),d([u({type:Object})],$.prototype,"dropdown"),d([u({type:Boolean,attribute:"show-add-button"})],$.prototype,"showAddButton"),d([u({type:String,attribute:"add-button-label"})],$.prototype,"addButtonLabel"),d([u({type:Boolean})],$.prototype,"animated"),d([u({type:Number,attribute:"rotation-amount"})],$.prototype,"rotationAmount"),d([O()],$.prototype,"users"),d([O()],$.prototype,"dropdownOpen"),d([O()],$.prototype,"tooltipData");customElements.get("profile-picture-group")||customElements.define("profile-picture-group",$);Je();
1035
+ `}};c([h({type:Number})],$.prototype,"max"),c([h({type:String})],$.prototype,"direction"),c([h({type:Number})],$.prototype,"overlap"),c([h({type:String})],$.prototype,"size"),c([h({type:Number})],$.prototype,"spacing"),c([h({type:Object})],$.prototype,"tooltip"),c([h({type:Object})],$.prototype,"dropdown"),c([h({type:Boolean,attribute:"show-add-button"})],$.prototype,"showAddButton"),c([h({type:String,attribute:"add-button-label"})],$.prototype,"addButtonLabel"),c([h({type:Boolean})],$.prototype,"animated"),c([h({type:Number,attribute:"rotation-amount"})],$.prototype,"rotationAmount"),c([D()],$.prototype,"users"),c([D()],$.prototype,"dropdownOpen"),c([D()],$.prototype,"tooltipData");customElements.get("profile-picture-group")||customElements.define("profile-picture-group",$);Xe();
1026
1036
  /*! Bundled license information:
1027
1037
 
1028
1038
  @lit-labs/ssr-dom-shim/lib/element-internals.js: