import{formCollections as e}from"./chunk.GZKNJ77J.js";function serialize(e){const r=new FormData(e),o={};return r.forEach(((e,r)=>{if(Reflect.has(o,r)){const t=o[r];Array.isArray(t)?t.push(e):o[r]=[o[r],e]}else o[r]=e})),o}function getFormControls(r){const o=[...r.getRootNode().querySelectorAll("*")],t=[...r.elements],n=e.get(r);return[...t,...n?Array.from(n):[]].sort(((e,r)=>o.indexOf(e)<o.indexOf(r)?-1:o.indexOf(e)>o.indexOf(r)?1:0))}export{serialize,getFormControls};