class t{static createOptionsFromValues(t,r,e,n){if(!t||Array.isArray(t)&&0===t.length)return[];const s=Array.isArray(t)?t:[t],u=n||(t=>t?.value??t);return s.map((t=>{const n=r.find((r=>{const e=u(r);return String(e)===String(t)})),s=n?e(n):t;return{value:t,selected:!0,getTextLabel:()=>{if("string"==typeof s&&/<[^>]+>/.test(s)){const t=document.createElement("div");return t.innerHTML=s,t.textContent||t.innerText||""}return s}}}))}static toggleMultiValue(t,r){return t.includes(r)?t.filter((t=>t!==r)):[...t,r]}static removeValue(t,r){return t.filter((t=>t!==r))}}export{t as C};
