import{ap as u,aq as v,ar as _,B as d,as as A,ai as h,at as T,au as S,av as E,aw as g}from"./CiQWViEs.js";const p=Symbol("is custom element"),L=Symbol("is html"),M=_?"link":"LINK",N=_?"progress":"PROGRESS";function I(s){if(d){var r=!1,e=()=>{if(!r){if(r=!0,s.hasAttribute("value")){var a=s.value;i(s,"value",null),s.value=a}if(s.hasAttribute("checked")){var t=s.checked;i(s,"checked",null),s.checked=t}}};s[A]=e,h(e),T()}}function k(s,r){var e=c(s);e.value===(e.value=r??void 0)||s.value===r&&(r!==0||s.nodeName!==N)||(s.value=r??"")}function b(s,r){var e=c(s);e.checked!==(e.checked=r??void 0)&&(s.checked=r)}function H(s,r){r?s.hasAttribute("selected")||s.setAttribute("selected",""):s.removeAttribute("selected")}function i(s,r,e,a){var t=c(s);d&&(t[r]=s.getAttribute(r),r==="src"||r==="srcset"||r==="href"&&s.nodeName===M)||t[r]!==(t[r]=e)&&(r==="loading"&&(s[S]=e),e==null?s.removeAttribute(r):typeof e!="string"&&R(s).includes(r)?s[r]=e:s.setAttribute(r,e))}function c(s){var r;return s[r=u]??(s[r]={[p]:s.nodeName.includes("-"),[L]:s.namespaceURI===v})}var f=new Map;function R(s){var r=s.getAttribute("is")||s.nodeName,e=f.get(r);if(e)return e;f.set(r,e=[]);for(var a,t=s,n=Element.prototype;n!==t;){a=g(t);for(var o in a)a[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&e.push(o);t=E(t)}return e}export{i as a,b,H as c,I as r,k as s};
