import{c as s,d as p}from"./chunk-V3J5YJ3L.js";import{e as c}from"./chunk-SZAW6ZBW.js";var l,u=c(()=>{l=function(t){return t[t.None=0]="None",t[t.External=1]="External",t[t.Privileged=2]="Privileged",t[t.Contractor=4]="Contractor",t}(l||{});(function(t){function e(){return"SystemUserTags"}t.getClass=e;function r(n){let o="";return typeof t.getClass=="function"&&(o=t.getClass()),o+"_"+t[n]}t.getEnumKey=r})(l||(l={}))});var a,m=c(()=>{p();a=class t{constructor(e=null,r=null,n){this.clone=()=>new t(null,null,this),this.name=e??s.manageDefaultValue(n,"name","")??"",this.theme=r??s.manageDefaultValue(n,"theme","")??""}}});var f,h=c(()=>{u();m();f=class t{static{this.THEME_MAP=new Map([["SystemUserTags_Contractor","contractor"],["SystemUserTags_External","external"],["SystemUserTags_Privileged","privileged"]])}constructor(){}static getTheme(e){let r=Number.isInteger(e)?l.getEnumKey(e):e;return this.THEME_MAP.get(r)}static setupTagObserver(e,r){let n=document.querySelector(e);if(!n)return null;let o=new MutationObserver(()=>{t.applyTagClasses(r)});return o.observe(n,{childList:!0,subtree:!0}),t.applyTagClasses(r),o}static applyTagClasses(e){Array.from(document.getElementsByClassName("p-multiselect-chip")).forEach((n,o)=>{if(o<e.length){let i=t.getTheme(l.getEnumKey(e[o]));i&&!n.classList.contains(i)&&n.classList.add(i)}})}static applyColorToLastTag(e){let r=Array.from(document.querySelectorAll("div.p-multiselect-token"));if(r.length===0)return;let n=r[r.length-1],o=t.getTheme(l.getEnumKey(e));o&&n.classList.add(o)}static toInt(e){return e.reduce((r,n)=>r|n,0)}static fromInt(e){let r=[],n=1;for(;e>0;)e&n&&(r.push(n),e^=n),n<<=1;return r}static toVMTags(e){let r=()=>t.fromInt(e.systemTags).map(n=>new a(String(n),t.getTheme(l.getEnumKey(n))));return e?r():null}}});export{l as a,u as b,f as c,h as d};
