(()=>{"use strict";let t,e,s,n="data-protonpass-role",o=[n,"data-protonpass-theme","aria-hidden","popover"],a=HTMLElement===HTMLElement.prototype.constructor?HTMLElement:HTMLElement.prototype.constructor;class i extends a{mutationObs=null;attrsMutationCount=new Map;connectedCallback(){this.mutationObs=new MutationObserver(t=>{for(let{type:e,attributeName:s}of t)if("attributes"===e&&s&&!o.includes(s)){let t=this.attrsMutationCount.get(s)??0;this.attrsMutationCount.set(s,t+1),this.removeAttribute(s),t>25&&(o.push(s),this.attrsMutationCount.delete(s))}}),this.mutationObs.observe(this,{attributes:!0,childList:!1})}disconnectedCallback(){this.mutationObs?.disconnect()}}let l=t=>`protonpass-control-${t}`;class c extends i{static getTagName=l;connectedCallback(){super.connectedCallback(),this.setAttribute(n,"icon")}}let r=t=>`protonpass-root-${t}`;class u extends i{static getTagName=r;disconnectedCallback(){super.disconnectedCallback(),requestIdleCallback(()=>{let t=new CustomEvent("PassRootRemoved",{bubbles:!0});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.setAttribute(n,"root")}}t=(t,e)=>{let s={define:(customElements.define===CustomElementRegistry.prototype.define?customElements.define:CustomElementRegistry.prototype.define).bind(customElements),get:(customElements.get===CustomElementRegistry.prototype.get?customElements.get:CustomElementRegistry.prototype.get).bind(customElements)},n=u.getTagName(t),o=c.getTagName(t);e&&!s.get(n)&&s.define(n,u),s.get(o)||s.define(o,c),delete window.registerPassElements},e=window,s={defineAs:"registerPassElements"},globalThis.exportFunction?.(t,e,s)??(e[s.defineAs]=t)})();
