1import b from"./BvhdhALP.js";import{u as k}from"./DvJT-m7N.js";import{u as S}from"./CCd7CVVz.js";import{u as v,i as u,ab as N,a as f,d as n,f as o,o as r,e as O,b as _,W as $}from"./Do1nZpFk.js";import"./Dbftdb9b.js";import"./D3-lK2r8.js";import"./BM5aYONo.js";import"./DZKjVPmg.js";import"./C13cT-tf.js";import"./B7RbCf1l.js";import"./DrhflEf7.js";import"./D9vp2FmM.js";import"./IRO0kIHJ.js";import"./D1Yhr504.js";import"./CdyZkjEd.js";const B={key:0,class:"el-form"},j={key:0},G={__name:"FormV2",props:{section:{type:Object,required:!0}},setup(d){const c=d,{section:e,visability:i}=k(c);S(c);const g=$(),{project:y}=v(),p=u(!0);let m=u(null);const h=t=>new Promise(a=>{t&&(typeof t=="string"&&(t=JSON.parse(t)),m.value={...e.options.content.form,...t,actions:JSON.parse(t.actions),api_list_or_tag:JSON.parse(t.api_list_or_tag),controls:t.fields.map(s=>{const l=JSON.parse(s.columns);return{...s,columns:Object.keys(l).length?l:{lg:s.columns,md:s.columns,sm:s.columns}}})}),a()});return N(`form-load-${e.options.content.form.id}`,()=>$fetch(`${g.public.apiBase}/api/site/${y.getProject.subdomain}/form/${e.options.content.form.id}`),{headers:{"Cache-Control":"max-age=1500, public"}}).then(({data:t})=>{h(t.value.data).finally(()=>p.value=!1)}),(t,a)=>{const s=b;return o(i)("form")?(r(),f("div",B,[o(p)?(r(),f("div",j,[o(i)("form")&&o(e).options.content.form&&o(e).options.content.form.controls.length?(r(),_(s,{key:0,section:o(e),form:o(e).options.content.form},null,8,["section","form"])):n("",!0)])):n("",!0),O("div",null,[o(i)("form")&&o(m)&&o(e).options.content.form.controls.length?(r(),_(s,{key:0,section:o(e),form:o(m)},null,8,["section","form"])):n("",!0)])])):n("",!0)}}};export{G as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.