function f(e,r){const n=e&&e.depends_on;if(!n||typeof n!="object"||Array.isArray(n)||Object.keys(n).length===0)return!0;for(const u of Object.keys(n)){const i=n[u],t=r[u];if(Array.isArray(i)){if(!i.some(s=>o(t,s)))return!1;continue}if(!o(t,i))return!1}return!0}function c(e,r){return!e||!e.required?!1:f(e,r)}function d(e,r){const n=[];for(const u of Object.keys(e)){const i=e[u];if(!c(i,r))continue;const t=r[u];(t==null||t===""||Array.isArray(t)&&t.length===0)&&n.push(u)}return n}function l(e){return Object.entries(e).sort(([,r],[,n])=>(r.order??100)-(n.order??100))}function o(e,r){if(e==null){if(typeof r=="number")return r===0;if(r===!1||r==="")return!0}if(r==null){if(typeof e=="number")return e===0;if(e===!1||e==="")return!0}return e==r}export{f as i,d as m,l as o};
