import{D as t}from"./p-3c3b4f3f.js";import{M as r}from"./p-e8956308.js";import{U as s}from"./p-b64f8873.js";const e=t=>"active"===t.status,o=t=>{const r=t.consents||[];return(t.config.agreements||[]).filter((t=>!r.some((r=>r.agreement._id===t._id)))).length>0},n=t=>{if(!t.config.enforceRequiredInfo)return!1;const r=t.config.fields||[];for(let s=0;s<r.length;s++){const e=r[s];if(e.required&&!t[e.id])return!0}return!1};class i extends t{static decode(t){const e=Object.assign(Object.create(i.prototype),t);return e.config=r.decode(e.config),e.user=s.decode(e.user),e}requireDataCompletion(){if(!this.config.enforceRequiredInfo)return!1;const t=this.config.fields||[];for(let r=0;r<t.length;r++){const s=t[r];if(s.required&&!this[s.id])return!0}return!1}}export{i as M,n as a,o as d,e as i}