class t{onTouched(t){return t.checkValidity()}async onValidChange(t,n,a){if(!n)return;const e=!Object.values(await this.checkCustomValidity(a,t.value)).length;return n.setCustomValidity(""),t.invalid=!(n.validity.valid&&e),!t.invalid}async checkCustomValidity(t,n){if(!t||!t.length||!n)return{};const a=await Promise.all(t.map(async t=>t(n)));return Object.assign({},...a)}}export{t as N};