(()=>{"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()}}class l extends i{static getTagName=t=>`protonpass-control-${t}`;connectedCallback(){super.connectedCallback(),this.setAttribute(n,"icon")}}class c extends i{static getTagName=t=>`protonpass-root-${t}`;disconnectedCallback(){super.disconnectedCallback(),requestIdleCallback(()=>{let t=new CustomEvent("PassRootRemoved",{bubbles:!0});this.dispatchEvent(t)})}connectedCallback(){super.connectedCallback(),this.setAttribute(n,"root")}}t=t=>{let e={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)},s=c.getTagName(t),n=l.getTagName(t);e.get(s)||e.define(s,c),e.get(n)||e.define(n,l),delete window.registerPassElements},e=window,s={defineAs:"registerPassElements"},globalThis.exportFunction?.(t,e,s)??(e[s.defineAs]=t)})();
