lf-pagebuilder-vue 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { defineComponent as H, ref as $, computed as X, createElementBlock as i, openBlock as r, Fragment as A, createElementVNode as t, createCommentVNode as k, withModifiers as ee, withDirectives as R, vModelText as Q, normalizeClass as q, toDisplayString as v, renderList as N, vModelSelect as J, vModelCheckbox as ae, createBlock as re, createTextVNode as E, unref as G, onMounted as te, createVNode as L, watch as _, nextTick as me, withCtx as se, vShow as be, reactive as ge } from "vue";
2
- import { listComponents as fe } from "libreria-astro-lefebvre";
3
- import { QuillEditor as ve } from "@vueup/vue-quill";
4
- import ie from "vuedraggable";
5
- const pe = H({
1
+ import { defineComponent as H, ref as S, computed as Q, createElementBlock as i, openBlock as s, Fragment as B, createElementVNode as t, createCommentVNode as F, withModifiers as te, withDirectives as N, vModelText as K, normalizeClass as L, toDisplayString as v, renderList as V, vModelSelect as J, vModelCheckbox as se, createBlock as ie, createTextVNode as T, unref as G, onMounted as oe, createVNode as q, watch as ee, nextTick as be, withCtx as de, vShow as ge, reactive as fe } from "vue";
2
+ import { listComponents as ve } from "libreria-astro-lefebvre";
3
+ import { QuillEditor as pe } from "@vueup/vue-quill";
4
+ import ue from "vuedraggable";
5
+ const xe = H({
6
6
  props: {
7
7
  isComponentMode: Boolean,
8
8
  fullwidthMode: Boolean,
@@ -13,7 +13,8 @@ const pe = H({
13
13
  sectionSelected: String,
14
14
  availableSections: Array,
15
15
  parametersPageConfiguration: Object,
16
- renderApiDomain: String
16
+ renderApiDomain: String,
17
+ inputId: String
17
18
  },
18
19
  emits: [
19
20
  "update:sectionSelected",
@@ -26,296 +27,310 @@ const pe = H({
26
27
  "update:parametersPageConfiguration.seo.description"
27
28
  ],
28
29
  setup(e) {
29
- const o = e.renderApiDomain || "http://localhost:8003", b = $(""), p = $(!1), f = X({
30
+ const o = e.renderApiDomain || "http://localhost:8003", g = S(""), x = S(!1), f = Q({
30
31
  get() {
31
- var g, S;
32
- const n = (g = e.globalPageConfiguration) == null ? void 0 : g.find((D) => D.section === e.sectionSelected);
33
- return ((S = n == null ? void 0 : n.config) == null ? void 0 : S.width) || "";
32
+ var k, A;
33
+ const m = (k = e.globalPageConfiguration) == null ? void 0 : k.find((w) => w.section === e.sectionSelected);
34
+ return ((A = m == null ? void 0 : m.config) == null ? void 0 : A.width) || "";
34
35
  },
35
- set(n) {
36
- var S;
37
- const g = (S = e.globalPageConfiguration) == null ? void 0 : S.find((D) => D.section === e.sectionSelected);
38
- g && (g.config || (g.config = {}), g.config.width = n);
36
+ set(m) {
37
+ var A;
38
+ const k = (A = e.globalPageConfiguration) == null ? void 0 : A.find((w) => w.section === e.sectionSelected);
39
+ k && (k.config || (k.config = {}), k.config.width = m);
39
40
  }
40
- });
41
+ }), u = () => {
42
+ const m = {
43
+ pageConfig: e.globalPageConfiguration,
44
+ paramsConfig: e.parametersPageConfiguration
45
+ }, k = JSON.stringify(m), A = new CustomEvent("lf-pagebuilder:export", {
46
+ detail: { ...m, inputId: e.inputId }
47
+ });
48
+ document.dispatchEvent(A);
49
+ const w = window.open("", "Preview", "width='100vw',height='100vh'");
50
+ w && (w.document.body.innerText = k, w.document.close());
51
+ }, r = () => {
52
+ const m = {
53
+ pageConfig: e.globalPageConfiguration,
54
+ paramsConfig: e.parametersPageConfiguration
55
+ }, k = JSON.stringify(m);
56
+ b(k);
57
+ const A = new CustomEvent("lf-pagebuilder:save", {
58
+ detail: { ...m, inputId: e.inputId }
59
+ });
60
+ if (document.dispatchEvent(A), e.inputId) {
61
+ const w = document.getElementById(e.inputId);
62
+ w && (w.value = k);
63
+ }
64
+ }, b = (m) => {
65
+ const k = e.inputId ? `pageBuilderConfig_${e.inputId}` : "pageBuilderConfig";
66
+ localStorage.setItem(k, m);
67
+ };
41
68
  return {
42
69
  validateSeo: () => {
43
- const n = {
70
+ const m = {
44
71
  pageConfig: e.globalPageConfiguration,
45
72
  paramsConfig: e.parametersPageConfiguration
46
- }, g = JSON.stringify(n, null, 2);
73
+ }, k = JSON.stringify(m, null, 2);
47
74
  fetch(o + "/api/render-html/", {
48
75
  method: "POST",
49
76
  headers: {
50
77
  "Content-Type": "application/json"
51
78
  },
52
- body: g
53
- }).then((S) => S.text()).then((S) => {
54
- const D = window.open("", "Preview", "width='100vw',height='100vh'");
55
- if (!D) return;
56
- const a = new DOMParser().parseFromString(S, "text/html"), u = [];
57
- function h(I, z = 0) {
58
- if (!I || I.nodeType !== 1) return;
59
- const Z = I.tagName.toLowerCase();
60
- ["h1", "h2", "h3", "h4", "h5", "h6", "a", "p", "article", "section", "header", "footer"].includes(Z) && u.push({
79
+ body: k
80
+ }).then((A) => A.text()).then((A) => {
81
+ const w = window.open("", "Preview", "width='100vw',height='100vh'");
82
+ if (!w) return;
83
+ const c = new DOMParser().parseFromString(A, "text/html"), $ = [];
84
+ function j(R, Y = 0) {
85
+ if (!R || R.nodeType !== 1) return;
86
+ const Z = R.tagName.toLowerCase();
87
+ ["h1", "h2", "h3", "h4", "h5", "h6", "a", "p", "article", "section", "header", "footer"].includes(Z) && $.push({
61
88
  tag: Z,
62
- text: (I.textContent || "").trim().slice(0, 80),
63
- depth: z
64
- }), Array.from(I.children).forEach((K) => h(K, z + 1));
89
+ text: (R.textContent || "").trim().slice(0, 80),
90
+ depth: Y
91
+ }), Array.from(R.children).forEach((_) => j(_, Y + 1));
65
92
  }
66
- h(a.body);
67
- let j = '<h2>Estructura SEO</h2><ul style="font-family:monospace">';
68
- u.forEach((I) => {
69
- j += `<li style="margin-left:${I.depth * 20}px"><b>${I.tag}</b>: ${I.text}</li>`;
70
- }), j += "</ul>", D.document.body.innerHTML = j, D.document.close();
93
+ j(c.body);
94
+ let D = '<h2>Estructura SEO</h2><ul style="font-family:monospace">';
95
+ $.forEach((R) => {
96
+ D += `<li style="margin-left:${R.depth * 20}px"><b>${R.tag}</b>: ${R.text}</li>`;
97
+ }), D += "</ul>", w.document.body.innerHTML = D, w.document.close();
71
98
  });
72
99
  },
73
- importConfig: b,
74
- showAdvancedConfig: p,
100
+ importConfig: g,
101
+ showAdvancedConfig: x,
75
102
  previewFunction: () => {
76
- const n = {
103
+ const m = {
77
104
  pageConfig: e.globalPageConfiguration,
78
105
  paramsConfig: e.parametersPageConfiguration
79
- }, g = JSON.stringify(n, null, 2);
106
+ }, k = JSON.stringify(m, null, 2);
80
107
  fetch(o + "/api/render-html/", {
81
108
  method: "POST",
82
109
  headers: {
83
110
  "Content-Type": "application/json"
84
111
  },
85
- body: g
86
- }).then((S) => S.text()).then((S) => {
87
- const D = window.open("", "Preview", "width='100vw',height='100vh'");
88
- D && (D.document.body.innerHTML = S, D.document.querySelectorAll("script").forEach((a) => {
89
- var h;
90
- const u = D.document.createElement("script");
91
- a.src ? u.src = a.src : u.textContent = a.textContent, (h = a.parentNode) == null || h.replaceChild(u, a);
92
- }), D.document.close());
112
+ body: k
113
+ }).then((A) => A.text()).then((A) => {
114
+ const w = window.open("", "Preview", "width='100vw',height='100vh'");
115
+ w && (w.document.body.innerHTML = A, w.document.querySelectorAll("script").forEach((c) => {
116
+ var j;
117
+ const $ = w.document.createElement("script");
118
+ c.src ? $.src = c.src : $.textContent = c.textContent, (j = c.parentNode) == null || j.replaceChild($, c);
119
+ }), w.document.close());
93
120
  });
94
121
  },
95
122
  importFunction: () => {
96
- e.importConfigurationFunction && e.importConfigurationFunction(b.value), b.value = "";
97
- },
98
- exportFunction: () => {
99
- const n = {
100
- pageConfig: e.globalPageConfiguration,
101
- paramsConfig: e.parametersPageConfiguration
102
- }, g = JSON.stringify(n), S = window.open("", "Preview", "width='100vw',height='100vh'");
103
- S && (S.document.body.innerText = g, S.document.close());
104
- },
105
- setToLocalStorage: () => {
106
- const n = {
107
- pageConfig: e.globalPageConfiguration,
108
- paramsConfig: e.parametersPageConfiguration
109
- }, g = JSON.stringify(n);
110
- localStorage.setItem("pageBuilderConfig", g);
123
+ e.importConfigurationFunction && e.importConfigurationFunction(g.value), g.value = "";
111
124
  },
125
+ exportFunction: u,
126
+ saveButtonAction: r,
112
127
  loadFromLocalStorage: () => {
113
- const n = localStorage.getItem("pageBuilderConfig");
114
- if (n && e.importConfigurationFunction) {
115
- const g = JSON.parse(n);
116
- e.importConfigurationFunction(g);
128
+ const m = e.inputId ? `pageBuilderConfig_${e.inputId}` : "pageBuilderConfig", k = localStorage.getItem(m);
129
+ if (k && e.importConfigurationFunction) {
130
+ const A = JSON.parse(k);
131
+ e.importConfigurationFunction(A);
117
132
  }
118
133
  },
119
134
  toggleExpandScreen: () => {
120
- const n = document.querySelector(".lf-page-builder");
121
- n && n.classList.toggle("expanded-page-builder");
135
+ const m = document.querySelector(".lf-page-builder");
136
+ m && m.classList.toggle("expanded-page-builder");
122
137
  },
123
138
  sectionWidth: f
124
139
  };
125
140
  }
126
- }), xe = (e, o) => {
127
- const b = e.__vccOpts || e;
128
- for (const [p, f] of o)
129
- b[p] = f;
130
- return b;
131
- }, he = { class: "flex justify-end items-center w-full p-3 gap-3" }, we = { class: "flex justify-between gap-3 px-5 py-3 bg-white mx-3 rounded-xl border border-slate-200 mb-6 sticky top-2 z-9999 shadow-lg backdrop-blur-sm" }, ye = { class: "flex gap-2" }, Ce = { class: "flex gap-2" }, $e = ["value"], ke = ["value"], Se = { value: "full" }, Fe = { value: "1/2" }, Pe = { value: "1/3" }, je = { value: "2/3" }, Me = { value: "1/4" }, Ie = { value: "3/4" }, Ae = { value: "1/5" }, Te = { value: "2/5" }, Be = { value: "3/5" }, Ee = { value: "4/5" }, De = { key: 0 }, Oe = { key: 1 }, Re = { class: "flex items-center gap-2" }, Ne = {
141
+ }), he = (e, o) => {
142
+ const g = e.__vccOpts || e;
143
+ for (const [x, f] of o)
144
+ g[x] = f;
145
+ return g;
146
+ }, we = { class: "flex justify-end items-center w-full p-3 gap-3" }, ye = { class: "flex justify-between gap-3 px-5 py-3 bg-white mx-3 rounded-xl border border-slate-200 mb-6 sticky top-2 z-9999 shadow-lg backdrop-blur-sm" }, Ce = { class: "flex gap-2" }, $e = { class: "flex gap-2" }, ke = ["value"], Se = ["value"], Fe = { value: "full" }, Pe = { value: "1/2" }, je = { value: "1/3" }, Ie = { value: "2/3" }, Me = { value: "1/4" }, Ae = { value: "3/4" }, Be = { value: "1/5" }, Ee = { value: "2/5" }, Te = { value: "3/5" }, De = { value: "4/5" }, Oe = { key: 0 }, Ne = { key: 1 }, Re = { class: "flex items-center gap-2" }, Ve = {
132
147
  key: 0,
133
148
  class: "bg-white border border-slate-200 rounded-2xl p-5 mx-3 mb-6 shadow-lg"
134
- }, Ve = { class: "flex flex-row gap-4 w-full" }, Ue = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, ze = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Le = { class: "mb-3" }, qe = { class: "flex items-center gap-3 cursor-pointer group" }, Ge = { class: "mb-3" }, Je = { class: "mb-3" }, He = { class: "mb-3" }, We = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, Qe = { class: "flex justify-between items-center mb-4" }, Xe = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Ye = { class: "mb-3" }, Ze = { class: "mb-3" }, Ke = { class: "mb-3" };
135
- function _e(e, o, b, p, f, c) {
136
- return r(), i(A, null, [
137
- t("div", he, [
149
+ }, Ue = { class: "flex flex-row gap-4 w-full" }, ze = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, qe = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Le = { class: "mb-3" }, Ge = { class: "flex items-center gap-3 cursor-pointer group" }, Je = { class: "mb-3" }, He = { class: "mb-3" }, We = { class: "mb-3" }, Ke = { class: "border border-slate-200 rounded-xl p-5 w-full bg-gradient-to-br from-slate-50 to-white" }, Qe = { class: "flex justify-between items-center mb-4" }, Xe = { class: "flex flex-col gap-3 border-b border-slate-200 pb-4 w-full" }, Ye = { class: "mb-3" }, Ze = { class: "mb-3" }, _e = { class: "mb-3" };
150
+ function et(e, o, g, x, f, u) {
151
+ return s(), i(B, null, [
152
+ t("div", we, [
138
153
  o[28] || (o[28] = t("span", { class: "bg-rose-50 px-3 py-1 rounded-full border border-rose-200 text-rose-400 text-xs font-medium me-4" }, "Todo lo de esta barra desaparecerá →", -1)),
139
154
  t("form", {
140
- onSubmit: o[2] || (o[2] = ee(() => {
155
+ onSubmit: o[2] || (o[2] = te(() => {
141
156
  }, ["prevent"])),
142
157
  class: "flex gap-2"
143
158
  }, [
144
- R(t("input", {
145
- "onUpdate:modelValue": o[0] || (o[0] = (d) => e.importConfig = d),
159
+ N(t("input", {
160
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => e.importConfig = r),
146
161
  type: "text",
147
162
  class: "bg-white border border-slate-200 rounded-lg px-3 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400",
148
163
  name: "",
149
164
  id: "",
150
165
  placeholder: "Pegar configuración..."
151
166
  }, null, 512), [
152
- [Q, e.importConfig]
167
+ [K, e.importConfig]
153
168
  ]),
154
169
  t("button", {
155
- onClick: o[1] || (o[1] = (d) => e.importFunction()),
170
+ onClick: o[1] || (o[1] = (r) => e.importFunction()),
156
171
  class: "cursor-pointer bg-white hover:bg-slate-700 hover:text-white border border-slate-200 hover:border-slate-700 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
157
172
  }, "🏯 Importar")
158
173
  ], 32),
159
174
  t("button", {
160
- onClick: o[3] || (o[3] = (d) => e.exportFunction()),
175
+ onClick: o[3] || (o[3] = (r) => e.exportFunction()),
161
176
  class: "cursor-pointer bg-white hover:bg-slate-700 hover:text-white border border-slate-200 hover:border-slate-700 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
162
177
  }, "🚀 Exportar")
163
178
  ]),
164
- t("div", we, [
165
- t("div", ye, [
179
+ t("div", ye, [
180
+ t("div", Ce, [
166
181
  t("button", {
167
- class: q([[e.isComponentMode ? "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md" : "bg-white hover:bg-slate-100"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
168
- onClick: o[4] || (o[4] = (d) => {
169
- var m;
170
- return (m = e.toggleComponentModeFunction) == null ? void 0 : m.call(e);
182
+ class: L([[e.isComponentMode ? "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md" : "bg-white hover:bg-slate-100"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
183
+ onClick: o[4] || (o[4] = (r) => {
184
+ var b;
185
+ return (b = e.toggleComponentModeFunction) == null ? void 0 : b.call(e);
171
186
  })
172
187
  }, v(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3),
173
188
  t("button", {
174
- class: q([[e.fullwidthMode ? "bg-white hover:bg-slate-100" : "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
175
- onClick: o[5] || (o[5] = (d) => {
176
- var m;
177
- return (m = e.toggleFullwidthMode) == null ? void 0 : m.call(e);
189
+ class: L([[e.fullwidthMode ? "bg-white hover:bg-slate-100" : "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
190
+ onClick: o[5] || (o[5] = (r) => {
191
+ var b;
192
+ return (b = e.toggleFullwidthMode) == null ? void 0 : b.call(e);
178
193
  })
179
194
  }, v(e.fullwidthMode ? "⚒️ Comps. Plegados" : "👁️ Comps. Desplegados"), 3)
180
195
  ]),
181
- t("div", Ce, [
196
+ t("div", $e, [
182
197
  t("select", {
183
198
  value: e.sectionSelected,
184
- onChange: o[6] || (o[6] = (d) => e.$emit("update:sectionSelected", d.target.value)),
199
+ onChange: o[6] || (o[6] = (r) => e.$emit("update:sectionSelected", r.target.value)),
185
200
  class: "bg-white border border-slate-200 rounded-lg px-3 py-1.5 cursor-pointer text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-colors"
186
201
  }, [
187
- (r(!0), i(A, null, N(e.availableSections, (d, m) => (r(), i("option", {
188
- key: m,
189
- value: d
190
- }, v(d), 9, ke))), 128))
191
- ], 40, $e),
192
- R(t("select", {
202
+ (s(!0), i(B, null, V(e.availableSections, (r, b) => (s(), i("option", {
203
+ key: b,
204
+ value: r
205
+ }, v(r), 9, Se))), 128))
206
+ ], 40, ke),
207
+ N(t("select", {
193
208
  class: "bg-white border border-slate-200 rounded-lg px-3 py-1.5 cursor-pointer text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-colors",
194
- "onUpdate:modelValue": o[7] || (o[7] = (d) => e.sectionWidth = d)
209
+ "onUpdate:modelValue": o[7] || (o[7] = (r) => e.sectionWidth = r)
195
210
  }, [
196
211
  o[29] || (o[29] = t("option", {
197
212
  disabled: "",
198
213
  value: ""
199
214
  }, "Selecciona el ancho de la sección", -1)),
200
- t("option", Se, "Sección " + v(e.sectionSelected) + " ocupa todo el ancho de la página", 1),
201
- t("option", Fe, "Sección " + v(e.sectionSelected) + " ocupa 1/2 del ancho de la página", 1),
202
- t("option", Pe, "Sección " + v(e.sectionSelected) + " ocupa 1/3 del ancho de la página", 1),
203
- t("option", je, "Sección " + v(e.sectionSelected) + " ocupa 2/3 del ancho de la página", 1),
215
+ t("option", Fe, "Sección " + v(e.sectionSelected) + " ocupa todo el ancho de la página", 1),
216
+ t("option", Pe, "Sección " + v(e.sectionSelected) + " ocupa 1/2 del ancho de la página", 1),
217
+ t("option", je, "Sección " + v(e.sectionSelected) + " ocupa 1/3 del ancho de la página", 1),
218
+ t("option", Ie, "Sección " + v(e.sectionSelected) + " ocupa 2/3 del ancho de la página", 1),
204
219
  t("option", Me, "Sección " + v(e.sectionSelected) + " ocupa 1/4 del ancho de la página", 1),
205
- t("option", Ie, "Sección " + v(e.sectionSelected) + " ocupa 3/4 del ancho de la página", 1),
206
- t("option", Ae, "Sección " + v(e.sectionSelected) + " ocupa 1/5 del ancho de la página", 1),
207
- t("option", Te, "Sección " + v(e.sectionSelected) + " ocupa 2/5 del ancho de la página", 1),
208
- t("option", Be, "Sección " + v(e.sectionSelected) + " ocupa 3/5 del ancho de la página", 1),
209
- t("option", Ee, "Sección " + v(e.sectionSelected) + " ocupa 4/5 del ancho de la página", 1)
220
+ t("option", Ae, "Sección " + v(e.sectionSelected) + " ocupa 3/4 del ancho de la página", 1),
221
+ t("option", Be, "Sección " + v(e.sectionSelected) + " ocupa 1/5 del ancho de la página", 1),
222
+ t("option", Ee, "Sección " + v(e.sectionSelected) + " ocupa 2/5 del ancho de la página", 1),
223
+ t("option", Te, "Sección " + v(e.sectionSelected) + " ocupa 3/5 del ancho de la página", 1),
224
+ t("option", De, "Sección " + v(e.sectionSelected) + " ocupa 4/5 del ancho de la página", 1)
210
225
  ], 512), [
211
226
  [J, e.sectionWidth]
212
227
  ]),
213
228
  t("button", {
214
- class: q([
229
+ class: L([
215
230
  "cursor-pointer border rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200 flex items-center gap-2",
216
231
  e.showAdvancedConfig ? "bg-gradient-to-r from-amber-500 to-orange-500 border-amber-500 text-white shadow-md" : "bg-white border-slate-200 hover:bg-slate-100"
217
232
  ]),
218
- onClick: o[8] || (o[8] = (d) => e.showAdvancedConfig = !e.showAdvancedConfig)
233
+ onClick: o[8] || (o[8] = (r) => e.showAdvancedConfig = !e.showAdvancedConfig)
219
234
  }, [
220
235
  o[30] || (o[30] = t("span", null, "⚙️ Página", -1)),
221
- e.showAdvancedConfig ? (r(), i("span", De, "▲")) : (r(), i("span", Oe, "▼"))
236
+ e.showAdvancedConfig ? (s(), i("span", Oe, "▲")) : (s(), i("span", Ne, "▼"))
222
237
  ], 2)
223
238
  ]),
224
239
  t("div", Re, [
225
240
  t("button", {
226
- onClick: o[9] || (o[9] = (d) => e.previewFunction()),
241
+ onClick: o[9] || (o[9] = (r) => e.previewFunction()),
227
242
  class: "cursor-pointer bg-white hover:bg-violet-500 hover:text-white hover:border-violet-500 border border-slate-200 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
228
243
  }, "🔎 Preview"),
229
244
  t("button", {
230
- onClick: o[10] || (o[10] = (d) => e.setToLocalStorage()),
245
+ onClick: o[10] || (o[10] = (r) => e.saveButtonAction()),
231
246
  title: "No es un guardado real, simplemente almacena la configuración en el navegador para recuperarla luego",
232
247
  class: "cursor-pointer bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white border border-emerald-500 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
233
248
  }, "💾 Guardar"),
234
249
  t("button", {
235
- onClick: o[11] || (o[11] = (d) => e.loadFromLocalStorage()),
250
+ onClick: o[11] || (o[11] = (r) => e.loadFromLocalStorage()),
236
251
  class: "cursor-pointer bg-white hover:bg-blue-500 hover:text-white hover:border-blue-500 border border-slate-200 rounded-lg px-3 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
237
252
  }, "⤵️ Cargar"),
238
253
  t("button", {
239
- onClick: o[12] || (o[12] = (d) => e.toggleExpandScreen()),
254
+ onClick: o[12] || (o[12] = (r) => e.toggleExpandScreen()),
240
255
  title: "Expandir / Contraer Pagebuilder",
241
256
  class: "cursor-pointer bg-white hover:bg-slate-700 hover:text-white hover:border-slate-700 border border-slate-200 rounded-lg px-3 py-1.5 text-xl transition-all duration-200 shadow-sm hover:shadow-md ms-2"
242
257
  }, "◳")
243
258
  ])
244
259
  ]),
245
- e.showAdvancedConfig && e.parametersPageConfiguration ? (r(), i("div", Ne, [
246
- t("div", Ve, [
247
- t("div", Ue, [
260
+ e.showAdvancedConfig && e.parametersPageConfiguration ? (s(), i("div", Ve, [
261
+ t("div", Ue, [
262
+ t("div", ze, [
248
263
  o[35] || (o[35] = t("h2", { class: "text-lg font-bold mb-4 text-slate-700" }, "Configuración Avanzada", -1)),
249
264
  o[36] || (o[36] = t("h3", { class: "font-semibold mb-3 text-slate-600" }, "Configuración Global", -1)),
250
- t("div", ze, [
265
+ t("div", qe, [
251
266
  t("div", Le, [
252
- t("label", qe, [
253
- R(t("input", {
267
+ t("label", Ge, [
268
+ N(t("input", {
254
269
  type: "checkbox",
255
- "onUpdate:modelValue": o[13] || (o[13] = (d) => e.parametersPageConfiguration.global.sidebarEnabled = d),
256
- onChange: o[14] || (o[14] = (d) => e.$emit("update:parametersPageConfiguration.global.sidebarEnabled", d.target.value)),
270
+ "onUpdate:modelValue": o[13] || (o[13] = (r) => e.parametersPageConfiguration.global.sidebarEnabled = r),
271
+ onChange: o[14] || (o[14] = (r) => e.$emit("update:parametersPageConfiguration.global.sidebarEnabled", r.target.value)),
257
272
  class: "w-5 h-5 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500 cursor-pointer"
258
273
  }, null, 544), [
259
- [ae, e.parametersPageConfiguration.global.sidebarEnabled]
274
+ [se, e.parametersPageConfiguration.global.sidebarEnabled]
260
275
  ]),
261
276
  o[31] || (o[31] = t("span", { class: "text-slate-600 group-hover:text-slate-800 transition-colors" }, "Sidebar Habilitado", -1))
262
277
  ])
263
278
  ]),
264
- t("div", Ge, [
279
+ t("div", Je, [
265
280
  o[32] || (o[32] = t("label", {
266
281
  for: "headSlot",
267
282
  class: "block text-sm font-medium text-slate-600 mb-2"
268
283
  }, " Código al final de la sección <head> ", -1)),
269
- R(t("textarea", {
284
+ N(t("textarea", {
270
285
  id: "headSlot",
271
- "onUpdate:modelValue": o[15] || (o[15] = (d) => e.parametersPageConfiguration.global.headSlot = d),
272
- onInput: o[16] || (o[16] = (d) => e.$emit("update:parametersPageConfiguration.global.headSlot", d.target.value)),
286
+ "onUpdate:modelValue": o[15] || (o[15] = (r) => e.parametersPageConfiguration.global.headSlot = r),
287
+ onInput: o[16] || (o[16] = (r) => e.$emit("update:parametersPageConfiguration.global.headSlot", r.target.value)),
273
288
  class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm font-mono transition-colors",
274
289
  placeholder: "Contenido para el head",
275
290
  rows: "3"
276
291
  }, null, 544), [
277
- [Q, e.parametersPageConfiguration.global.headSlot]
292
+ [K, e.parametersPageConfiguration.global.headSlot]
278
293
  ])
279
294
  ]),
280
- t("div", Je, [
295
+ t("div", He, [
281
296
  o[33] || (o[33] = t("label", {
282
297
  for: "bodyBeginSlot",
283
298
  class: "block text-sm font-medium text-slate-600 mb-2"
284
299
  }, " Código al principio de la sección <body> ", -1)),
285
- R(t("textarea", {
300
+ N(t("textarea", {
286
301
  id: "bodyBeginSlot",
287
- "onUpdate:modelValue": o[17] || (o[17] = (d) => e.parametersPageConfiguration.global.bodyBeginSlot = d),
288
- onInput: o[18] || (o[18] = (d) => e.$emit("update:parametersPageConfiguration.global.bodyBeginSlot", d.target.value)),
302
+ "onUpdate:modelValue": o[17] || (o[17] = (r) => e.parametersPageConfiguration.global.bodyBeginSlot = r),
303
+ onInput: o[18] || (o[18] = (r) => e.$emit("update:parametersPageConfiguration.global.bodyBeginSlot", r.target.value)),
289
304
  class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm font-mono transition-colors",
290
305
  placeholder: "Contenido para el inicio del body",
291
306
  rows: "3"
292
307
  }, null, 544), [
293
- [Q, e.parametersPageConfiguration.global.bodyBeginSlot]
308
+ [K, e.parametersPageConfiguration.global.bodyBeginSlot]
294
309
  ])
295
310
  ]),
296
- t("div", He, [
311
+ t("div", We, [
297
312
  o[34] || (o[34] = t("label", {
298
313
  for: "footerSlot",
299
314
  class: "block text-sm font-medium text-slate-600 mb-2"
300
315
  }, " Código al final de la sección <body>, dentro de la etiqueta <footer> ", -1)),
301
- R(t("textarea", {
316
+ N(t("textarea", {
302
317
  id: "footerSlot",
303
- "onUpdate:modelValue": o[19] || (o[19] = (d) => e.parametersPageConfiguration.global.footerSlot = d),
304
- onInput: o[20] || (o[20] = (d) => e.$emit("update:parametersPageConfiguration.global.footerSlot", d.target.value)),
318
+ "onUpdate:modelValue": o[19] || (o[19] = (r) => e.parametersPageConfiguration.global.footerSlot = r),
319
+ onInput: o[20] || (o[20] = (r) => e.$emit("update:parametersPageConfiguration.global.footerSlot", r.target.value)),
305
320
  class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm font-mono transition-colors",
306
321
  placeholder: "Contenido para el footer",
307
322
  rows: "3"
308
323
  }, null, 544), [
309
- [Q, e.parametersPageConfiguration.global.footerSlot]
324
+ [K, e.parametersPageConfiguration.global.footerSlot]
310
325
  ])
311
326
  ])
312
327
  ])
313
328
  ]),
314
- t("div", We, [
329
+ t("div", Ke, [
315
330
  t("div", Qe, [
316
331
  o[37] || (o[37] = t("h2", { class: "text-lg font-bold text-slate-700" }, "Configuración SEO", -1)),
317
332
  t("button", {
318
- onClick: o[21] || (o[21] = (d) => e.validateSeo()),
333
+ onClick: o[21] || (o[21] = (r) => e.validateSeo()),
319
334
  class: "cursor-pointer bg-gradient-to-r from-violet-500 to-purple-500 hover:from-violet-600 hover:to-purple-600 text-white border border-violet-500 rounded-lg px-4 py-1.5 text-sm font-medium transition-all duration-200 shadow-sm hover:shadow-md"
320
335
  }, "🦄 Validar SEO")
321
336
  ]),
@@ -325,10 +340,10 @@ function _e(e, o, b, p, f, c) {
325
340
  for: "robotsIndex",
326
341
  class: "block text-sm font-medium text-slate-600 mb-2"
327
342
  }, " Indexación de robots ", -1)),
328
- R(t("select", {
343
+ N(t("select", {
329
344
  id: "robotsIndex",
330
- "onUpdate:modelValue": o[22] || (o[22] = (d) => e.parametersPageConfiguration.seo.robots = d),
331
- onChange: o[23] || (o[23] = (d) => e.$emit("update:parametersPageConfiguration.seo.robots", d.target.value)),
345
+ "onUpdate:modelValue": o[22] || (o[22] = (r) => e.parametersPageConfiguration.seo.robots = r),
346
+ onChange: o[23] || (o[23] = (r) => e.$emit("update:parametersPageConfiguration.seo.robots", r.target.value)),
332
347
  class: "w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm transition-colors cursor-pointer"
333
348
  }, [...o[38] || (o[38] = [
334
349
  t("option", { value: "index, follow" }, "Index Follow", -1),
@@ -342,46 +357,46 @@ function _e(e, o, b, p, f, c) {
342
357
  for: "pageTitle",
343
358
  class: "block text-sm font-medium text-slate-600 mb-2"
344
359
  }, " Título de la página ", -1)),
345
- R(t("input", {
360
+ N(t("input", {
346
361
  id: "pageTitle",
347
362
  type: "text",
348
- "onUpdate:modelValue": o[24] || (o[24] = (d) => e.parametersPageConfiguration.seo.title = d),
349
- onInput: o[25] || (o[25] = (d) => e.$emit("update:parametersPageConfiguration.seo.title", d.target.value)),
363
+ "onUpdate:modelValue": o[24] || (o[24] = (r) => e.parametersPageConfiguration.seo.title = r),
364
+ onInput: o[25] || (o[25] = (r) => e.$emit("update:parametersPageConfiguration.seo.title", r.target.value)),
350
365
  class: "w-full px-4 py-2.5 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm transition-colors",
351
366
  placeholder: "Ingresa el título de la página"
352
367
  }, null, 544), [
353
- [Q, e.parametersPageConfiguration.seo.title]
368
+ [K, e.parametersPageConfiguration.seo.title]
354
369
  ])
355
370
  ]),
356
- t("div", Ke, [
371
+ t("div", _e, [
357
372
  o[41] || (o[41] = t("label", {
358
373
  for: "pageDescription",
359
374
  class: "block text-sm font-medium text-slate-600 mb-2"
360
375
  }, " Descripción de la página ", -1)),
361
- R(t("textarea", {
376
+ N(t("textarea", {
362
377
  id: "pageDescription",
363
- "onUpdate:modelValue": o[26] || (o[26] = (d) => e.parametersPageConfiguration.seo.description = d),
364
- onInput: o[27] || (o[27] = (d) => e.$emit("update:parametersPageConfiguration.seo.description", d.target.value)),
378
+ "onUpdate:modelValue": o[26] || (o[26] = (r) => e.parametersPageConfiguration.seo.description = r),
379
+ onInput: o[27] || (o[27] = (r) => e.$emit("update:parametersPageConfiguration.seo.description", r.target.value)),
365
380
  class: "w-full px-4 py-3 border border-slate-200 rounded-lg focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white text-sm transition-colors",
366
381
  placeholder: "Ingresa la descripción de la página",
367
382
  rows: "3"
368
383
  }, null, 544), [
369
- [Q, e.parametersPageConfiguration.seo.description]
384
+ [K, e.parametersPageConfiguration.seo.description]
370
385
  ])
371
386
  ])
372
387
  ])
373
388
  ])
374
389
  ])
375
- ])) : k("", !0)
390
+ ])) : F("", !0)
376
391
  ], 64);
377
392
  }
378
- const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
393
+ const tt = /* @__PURE__ */ he(xe, [["render", et]]), ot = {
379
394
  key: 0,
380
395
  class: "absolute top-0 left-0 bg-white/90 w-full h-full z-100"
381
- }, ot = { class: "w-full flex justify-end p-4" }, lt = ["for"], nt = {
396
+ }, lt = { class: "w-full flex justify-end p-4" }, nt = ["for"], at = {
382
397
  key: 0,
383
398
  class: "text-red-500"
384
- }, at = ["id", "name", "placeholder", "required", "value", "onInput"], rt = ["id", "name", "data-mandatoryCrops", "placeholder", "required", "value", "onInput"], st = ["id", "name", "required", "value", "onInput"], it = ["value"], dt = ["id", "name", "required", "checked", "onChange"], le = /* @__PURE__ */ H({
399
+ }, rt = ["id", "name", "placeholder", "required", "value", "onInput"], st = ["id", "name", "data-mandatoryCrops", "placeholder", "required", "value", "onInput"], it = ["id", "name", "required", "value", "onInput"], dt = ["value"], ut = ["id", "name", "required", "checked", "onChange"], ae = /* @__PURE__ */ H({
385
400
  __name: "FieldsForm",
386
401
  props: {
387
402
  object: {
@@ -398,111 +413,111 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
398
413
  }
399
414
  },
400
415
  setup(e) {
401
- const o = e, b = (p, f) => {
402
- const c = (o.object.fields || []).find((d) => d.name === p);
403
- c && (c.example_value = f);
416
+ const o = e, g = (x, f) => {
417
+ const u = (o.object.fields || []).find((r) => r.name === x);
418
+ u && (u.example_value = f);
404
419
  };
405
- return (p, f) => (r(), i(A, null, [
406
- e.showForm ? (r(), i("div", tt)) : k("", !0),
420
+ return (x, f) => (s(), i(B, null, [
421
+ e.showForm ? (s(), i("div", ot)) : F("", !0),
407
422
  t("div", {
408
- class: q(e.showForm ? "relative top-0 w-full text-slate-600 border-1 my-2 px-4 pt-2 pb-3 w-full border-slate-200 bg-slate-50 inline-block rounded-lg flex flex-col z-101" : "hidden")
423
+ class: L(e.showForm ? "relative top-0 w-full text-slate-600 border-1 my-2 px-4 pt-2 pb-3 w-full border-slate-200 bg-slate-50 inline-block rounded-lg flex flex-col z-101" : "hidden")
409
424
  }, [
410
- t("div", ot, [
425
+ t("div", lt, [
411
426
  t("span", {
412
427
  onClick: f[0] || (f[0] = //@ts-ignore
413
- (...c) => e.toggleShowForm && e.toggleShowForm(...c)),
428
+ (...u) => e.toggleShowForm && e.toggleShowForm(...u)),
414
429
  class: "cursor-pointer hover:scale-125 transition-all duration-300"
415
430
  }, "❌")
416
431
  ]),
417
432
  t("form", null, [
418
- (r(!0), i(A, null, N(e.object.fields, (c, d) => (r(), i("div", {
419
- key: d,
433
+ (s(!0), i(B, null, V(e.object.fields, (u, r) => (s(), i("div", {
434
+ key: r,
420
435
  class: "mb-4"
421
436
  }, [
422
437
  t("label", {
423
- for: `${e.object.id}-${c.name}-${d}`,
438
+ for: `${e.object.id}-${u.name}-${r}`,
424
439
  class: "block text-sm font-medium mb-1"
425
440
  }, [
426
- E(v(c.label) + " ", 1),
427
- c.mandatory ? (r(), i("span", nt, "*")) : k("", !0)
428
- ], 8, lt),
429
- c.type === "text" ? (r(), i("input", {
441
+ T(v(u.label) + " ", 1),
442
+ u.mandatory ? (s(), i("span", at, "*")) : F("", !0)
443
+ ], 8, nt),
444
+ u.type === "text" ? (s(), i("input", {
430
445
  key: 0,
431
- id: `${e.object.id}-${c.name}-${d}`,
432
- name: `${e.object.id}-${c.name}-${d}`,
446
+ id: `${e.object.id}-${u.name}-${r}`,
447
+ name: `${e.object.id}-${u.name}-${r}`,
433
448
  type: "text",
434
449
  class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
435
- placeholder: c.label,
436
- required: c.mandatory,
437
- value: c.example_value,
438
- onInput: (m) => b(c.name, m.target.value)
439
- }, null, 40, at)) : k("", !0),
440
- c.type === "image" ? (r(), i("input", {
450
+ placeholder: u.label,
451
+ required: u.mandatory,
452
+ value: u.example_value,
453
+ onInput: (b) => g(u.name, b.target.value)
454
+ }, null, 40, rt)) : F("", !0),
455
+ u.type === "image" ? (s(), i("input", {
441
456
  key: 1,
442
- id: `${e.object.id}-${c.name}-${d}`,
443
- name: `${e.object.id}-${c.name}-${d}`,
444
- "data-mandatoryCrops": c.image_cuts ? JSON.stringify(c.image_cuts) : null,
457
+ id: `${e.object.id}-${u.name}-${r}`,
458
+ name: `${e.object.id}-${u.name}-${r}`,
459
+ "data-mandatoryCrops": u.image_cuts ? JSON.stringify(u.image_cuts) : null,
445
460
  type: "text",
446
461
  class: "js-limbo w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
447
- placeholder: c.label,
448
- required: c.mandatory,
449
- value: c.example_value,
450
- onInput: (m) => b(c.name, m.target.value)
451
- }, null, 40, rt)) : c.type === "textArea" ? (r(), re(G(ve), {
462
+ placeholder: u.label,
463
+ required: u.mandatory,
464
+ value: u.example_value,
465
+ onInput: (b) => g(u.name, b.target.value)
466
+ }, null, 40, st)) : u.type === "textArea" ? (s(), ie(G(pe), {
452
467
  key: 2,
453
468
  theme: "snow",
454
- id: `${e.object.id}-${c.name}-${d}`,
455
- name: `${e.object.id}-${c.name}-${d}`,
469
+ id: `${e.object.id}-${u.name}-${r}`,
470
+ name: `${e.object.id}-${u.name}-${r}`,
456
471
  rows: "3",
457
472
  class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400 z-9999",
458
- placeholder: c.label,
459
- required: c.mandatory,
460
- "onUpdate:content": (m) => {
461
- b(c.name, m);
473
+ placeholder: u.label,
474
+ required: u.mandatory,
475
+ "onUpdate:content": (b) => {
476
+ g(u.name, b);
462
477
  },
463
- content: c.example_value,
464
- modelValue: c.example_value,
465
- "onUpdate:modelValue": (m) => c.example_value = m,
478
+ content: u.example_value,
479
+ modelValue: u.example_value,
480
+ "onUpdate:modelValue": (b) => u.example_value = b,
466
481
  contentType: "html"
467
- }, null, 8, ["id", "name", "placeholder", "required", "onUpdate:content", "content", "modelValue", "onUpdate:modelValue"])) : c.type === "select" ? (r(), i("select", {
482
+ }, null, 8, ["id", "name", "placeholder", "required", "onUpdate:content", "content", "modelValue", "onUpdate:modelValue"])) : u.type === "select" ? (s(), i("select", {
468
483
  key: 3,
469
- id: `${e.object.id}-${c.name}-${d}`,
470
- name: `${e.object.id}-${c.name}-${d}`,
484
+ id: `${e.object.id}-${u.name}-${r}`,
485
+ name: `${e.object.id}-${u.name}-${r}`,
471
486
  class: "w-full px-3 py-2 border border-slate-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-400",
472
- required: c.mandatory,
473
- value: c.example_value,
474
- onInput: (m) => b(c.name, m.target.value)
487
+ required: u.mandatory,
488
+ value: u.example_value,
489
+ onInput: (b) => g(u.name, b.target.value)
475
490
  }, [
476
491
  f[1] || (f[1] = t("option", {
477
492
  disabled: "",
478
493
  value: ""
479
494
  }, "Seleccione una opción", -1)),
480
- (r(!0), i(A, null, N(c.options || [], (m, x) => (r(), i("option", {
481
- key: x,
482
- value: m
483
- }, v(m), 9, it))), 128))
484
- ], 40, st)) : c.type === "boolean" ? (r(), i("input", {
495
+ (s(!0), i(B, null, V(u.options || [], (b, C) => (s(), i("option", {
496
+ key: C,
497
+ value: b
498
+ }, v(b), 9, dt))), 128))
499
+ ], 40, it)) : u.type === "boolean" ? (s(), i("input", {
485
500
  key: 4,
486
- id: `${e.object.id}-${c.name}-${d}`,
487
- name: `${e.object.id}-${c.name}-${d}`,
501
+ id: `${e.object.id}-${u.name}-${r}`,
502
+ name: `${e.object.id}-${u.name}-${r}`,
488
503
  type: "checkbox",
489
504
  class: "h-4 w-4 text-blue-600 focus:ring-blue-500 border-slate-300 rounded inline-block",
490
- required: c.mandatory,
491
- checked: c.example_value,
492
- onChange: (m) => b(c.name, m.target.checked)
493
- }, null, 40, dt)) : k("", !0)
505
+ required: u.mandatory,
506
+ checked: u.example_value,
507
+ onChange: (b) => g(u.name, b.target.checked)
508
+ }, null, 40, ut)) : F("", !0)
494
509
  ]))), 128))
495
510
  ])
496
511
  ], 2)
497
512
  ], 64));
498
513
  }
499
- }), ut = { class: "space-y-4" }, ct = ["disabled"], mt = ["value"], bt = { class: "space-y-3" }, gt = {
514
+ }), ct = { class: "space-y-4" }, mt = ["disabled"], bt = ["value"], gt = { class: "space-y-3" }, ft = {
500
515
  key: 0,
501
516
  class: "overflow-y-auto space-y-3"
502
- }, ft = { class: "block text-sm font-semibold text-slate-600 mb-2" }, vt = ["onChange", "disabled"], pt = ["value"], xt = ["onChange", "disabled"], ht = ["onInput", "disabled", "placeholder"], wt = ["disabled"], yt = {
517
+ }, vt = { class: "block text-sm font-semibold text-slate-600 mb-2" }, pt = ["onChange", "disabled"], xt = ["value"], ht = ["onChange", "disabled"], wt = ["onInput", "disabled", "placeholder"], yt = ["disabled"], Ct = {
503
518
  key: 0,
504
519
  class: "animate-spin"
505
- }, Ct = { key: 1 }, $t = /* @__PURE__ */ H({
520
+ }, $t = { key: 1 }, kt = /* @__PURE__ */ H({
506
521
  __name: "SourceFilter",
507
522
  props: {
508
523
  onSubmit: {
@@ -519,13 +534,13 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
519
534
  }
520
535
  },
521
536
  setup(e) {
522
- const o = e, b = $(!1), p = $(null), f = $({}), c = X(() => {
523
- const s = o.isProduction;
537
+ const o = e, g = S(!1), x = S(null), f = S({}), u = Q(() => {
538
+ const a = o.isProduction;
524
539
  return [
525
540
  {
526
541
  id: "origen1",
527
542
  name: "El Derecho",
528
- apiUrl: s ? "https://elderecho.com/feed" : "https://led-dev-elderecho-dev.eu.els.local/feed",
543
+ apiUrl: a ? "https://elderecho.com/feed" : "https://led-dev-elderecho-dev.eu.els.local/feed",
529
544
  filters: [
530
545
  { id: "title", label: "Título del Post", type: "text" },
531
546
  { id: "category", label: "Slug de la Categoría", type: "text" },
@@ -539,7 +554,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
539
554
  {
540
555
  id: "origen2",
541
556
  name: "Formación",
542
- apiUrl: s ? "https://lefebvre.es/formacion/feed" : "http://led-dev-lefebvre-dev.eu.els.local/formacion/feed",
557
+ apiUrl: a ? "https://lefebvre.es/formacion/feed" : "http://led-dev-lefebvre-dev.eu.els.local/formacion/feed",
543
558
  filters: [
544
559
  { id: "id", label: "ID del curso", type: "text" },
545
560
  { id: "title", label: "Título del Post", type: "text" },
@@ -551,152 +566,152 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
551
566
  {
552
567
  id: "origen3",
553
568
  name: "Derecholocal",
554
- apiUrl: s ? "https://derecholocal.es/feed" : "https://led-dev-derecholocal-dev.eu.els.local/feed",
569
+ apiUrl: a ? "https://derecholocal.es/feed" : "https://led-dev-derecholocal-dev.eu.els.local/feed",
555
570
  filters: []
556
571
  },
557
572
  {
558
573
  id: "origen4",
559
574
  name: "EspacioAsesoría",
560
- apiUrl: s ? "https://espacioasesoria.com/feed" : "https://led-dev-espacioasesoria-dev.eu.els.local/feed",
575
+ apiUrl: a ? "https://espacioasesoria.com/feed" : "https://led-dev-espacioasesoria-dev.eu.els.local/feed",
561
576
  filters: []
562
577
  },
563
578
  {
564
579
  id: "origen5",
565
580
  name: "EspacioPymes",
566
- apiUrl: s ? "https://espaciopymes.com/feed" : "https://led-dev-espaciopymes-dev.eu.els.local/feed",
581
+ apiUrl: a ? "https://espaciopymes.com/feed" : "https://led-dev-espaciopymes-dev.eu.els.local/feed",
567
582
  filters: []
568
583
  }
569
584
  ];
570
- }), d = X(() => {
571
- if (!p.value)
585
+ }), r = Q(() => {
586
+ if (!x.value)
572
587
  return [];
573
- const s = c.value.find((l) => l.id === p.value);
574
- return s ? s.filters : [];
575
- }), m = (s, l) => {
576
- f.value[s] = l;
577
- }, x = () => {
588
+ const a = u.value.find((l) => l.id === x.value);
589
+ return a ? a.filters : [];
590
+ }), b = (a, l) => {
591
+ f.value[a] = l;
592
+ }, C = () => {
578
593
  f.value = {};
579
- }, F = async () => {
580
- b.value = !0;
581
- const s = c.value.find((n) => n.id === p.value);
582
- if (!s) {
583
- console.error("Origen no encontrado"), b.value = !1;
594
+ }, I = async () => {
595
+ g.value = !0;
596
+ const a = u.value.find((n) => n.id === x.value);
597
+ if (!a) {
598
+ console.error("Origen no encontrado"), g.value = !1;
584
599
  return;
585
600
  }
586
- const l = new URL(s.apiUrl);
601
+ const l = new URL(a.apiUrl);
587
602
  Object.keys(f.value).forEach((n) => {
588
603
  f.value[n] && l.searchParams.append(n, f.value[n]);
589
604
  });
590
605
  try {
591
- const g = await (await fetch(l.toString(), {
606
+ const m = await (await fetch(l.toString(), {
592
607
  method: "GET",
593
608
  headers: {
594
609
  Accept: "text/xml, application/xml"
595
610
  }
596
- })).text(), D = new DOMParser().parseFromString(g, "text/xml"), T = Array.from(D.querySelectorAll("item")).map((a) => {
597
- const u = {};
598
- return Array.from(a.children).forEach((h) => {
599
- h.children.length > 0 ? Array.from(h.children).forEach((j) => {
600
- const I = `${h.nodeName}_${j.nodeName}`;
601
- u[I] = j.textContent || "";
602
- }) : u[h.nodeName] = h.textContent || "";
603
- }), u;
611
+ })).text(), A = new DOMParser().parseFromString(m, "text/xml"), w = Array.from(A.querySelectorAll("item")).map((d) => {
612
+ const c = {};
613
+ return Array.from(d.children).forEach(($) => {
614
+ $.children.length > 0 ? Array.from($.children).forEach((j) => {
615
+ const D = `${$.nodeName}_${j.nodeName}`;
616
+ c[D] = j.textContent || "";
617
+ }) : c[$.nodeName] = $.textContent || "";
618
+ }), c;
604
619
  });
605
- o.onSubmit(T);
620
+ o.onSubmit(w);
606
621
  } catch (n) {
607
622
  console.error("Error al aplicar filtros:", n), o.onSubmit([]);
608
623
  } finally {
609
624
  const n = {
610
- name: s.name,
625
+ name: a.name,
611
626
  url: l.toString()
612
627
  };
613
- o.updateFeedCriteria(n), b.value = !1;
628
+ o.updateFeedCriteria(n), g.value = !1;
614
629
  }
615
630
  };
616
- return (s, l) => (r(), i("div", ut, [
631
+ return (a, l) => (s(), i("div", ct, [
617
632
  t("div", null, [
618
633
  l[1] || (l[1] = t("label", { class: "block text-sm font-semibold text-slate-600 mb-2" }, "Seleccionar origen:", -1)),
619
- R(t("select", {
620
- "onUpdate:modelValue": l[0] || (l[0] = (n) => p.value = n),
634
+ N(t("select", {
635
+ "onUpdate:modelValue": l[0] || (l[0] = (n) => x.value = n),
621
636
  class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed cursor-pointer",
622
- onChange: x,
623
- disabled: b.value
637
+ onChange: C,
638
+ disabled: g.value
624
639
  }, [
625
- (r(!0), i(A, null, N(c.value, (n) => (r(), i("option", {
640
+ (s(!0), i(B, null, V(u.value, (n) => (s(), i("option", {
626
641
  key: n.id,
627
642
  value: n.id
628
- }, v(n.name), 9, mt))), 128))
629
- ], 40, ct), [
630
- [J, p.value]
643
+ }, v(n.name), 9, bt))), 128))
644
+ ], 40, mt), [
645
+ [J, x.value]
631
646
  ])
632
647
  ]),
633
- t("div", bt, [
634
- d.value.length > 0 ? (r(), i("div", gt, [
635
- (r(!0), i(A, null, N(d.value, (n) => (r(), i("div", {
648
+ t("div", gt, [
649
+ r.value.length > 0 ? (s(), i("div", ft, [
650
+ (s(!0), i(B, null, V(r.value, (n) => (s(), i("div", {
636
651
  key: n.id,
637
652
  class: "bg-gradient-to-br from-slate-50 to-white p-4 rounded-xl border border-slate-200"
638
653
  }, [
639
- t("label", ft, v(n.label) + ":", 1),
640
- n.type === "select" ? (r(), i("select", {
654
+ t("label", vt, v(n.label) + ":", 1),
655
+ n.type === "select" ? (s(), i("select", {
641
656
  key: 0,
642
657
  class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed cursor-pointer",
643
- onChange: (g) => m(n.id, g.target.value),
644
- disabled: b.value
658
+ onChange: (m) => b(n.id, m.target.value),
659
+ disabled: g.value
645
660
  }, [
646
661
  l[2] || (l[2] = t("option", { value: "" }, "Seleccionar...", -1)),
647
- (r(!0), i(A, null, N(n.options, (g) => (r(), i("option", {
648
- key: g,
649
- value: g
650
- }, v(g), 9, pt))), 128))
651
- ], 40, vt)) : n.type === "date" ? (r(), i("input", {
662
+ (s(!0), i(B, null, V(n.options, (m) => (s(), i("option", {
663
+ key: m,
664
+ value: m
665
+ }, v(m), 9, xt))), 128))
666
+ ], 40, pt)) : n.type === "date" ? (s(), i("input", {
652
667
  key: 1,
653
668
  type: "date",
654
669
  class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed",
655
- onChange: (g) => m(n.id, g.target.value),
656
- disabled: b.value
657
- }, null, 40, xt)) : n.type === "text" ? (r(), i("input", {
670
+ onChange: (m) => b(n.id, m.target.value),
671
+ disabled: g.value
672
+ }, null, 40, ht)) : n.type === "text" ? (s(), i("input", {
658
673
  key: 2,
659
674
  type: "text",
660
675
  class: "w-full px-3 py-2.5 bg-white border border-slate-200 rounded-lg shadow-sm focus:border-emerald-400 focus:ring-2 focus:ring-emerald-500/20 transition-all duration-200 disabled:bg-slate-100 disabled:cursor-not-allowed",
661
- onInput: (g) => m(n.id, g.target.value),
662
- disabled: b.value,
676
+ onInput: (m) => b(n.id, m.target.value),
677
+ disabled: g.value,
663
678
  placeholder: n.label
664
- }, null, 40, ht)) : k("", !0)
679
+ }, null, 40, wt)) : F("", !0)
665
680
  ]))), 128))
666
- ])) : k("", !0),
681
+ ])) : F("", !0),
667
682
  t("button", {
668
- onClick: F,
683
+ onClick: I,
669
684
  class: "cursor-pointer w-full bg-gradient-to-r from-emerald-500 to-teal-500 text-white font-semibold px-4 py-3 rounded-xl shadow-md hover:from-emerald-600 hover:to-teal-600 hover:shadow-lg transform hover:-translate-y-0.5 transition-all duration-200 disabled:from-slate-300 disabled:to-slate-400 disabled:cursor-not-allowed disabled:transform-none disabled:shadow-none flex items-center justify-center gap-2",
670
- disabled: b.value
685
+ disabled: g.value
671
686
  }, [
672
- b.value ? (r(), i("span", yt, "⏳")) : (r(), i("span", Ct, "🔍")),
673
- E(" " + v(b.value ? "Conectando con el feed..." : "Aplicar Filtros"), 1)
674
- ], 8, wt)
687
+ g.value ? (s(), i("span", Ct, "⏳")) : (s(), i("span", $t, "🔍")),
688
+ T(" " + v(g.value ? "Conectando con el feed..." : "Aplicar Filtros"), 1)
689
+ ], 8, yt)
675
690
  ])
676
691
  ]));
677
692
  }
678
- }), kt = { class: "fixed top-0 left-0 w-full h-full bg-gradient-to-br from-slate-50 via-white to-slate-100 flex flex-col z-9999 p-6" }, St = { class: "w-full flex justify-between items-center mb-4" }, Ft = { class: "w-full flex-1 bg-white/60 rounded-2xl flex gap-5 p-5 overflow-hidden backdrop-blur-sm border border-slate-200 shadow-inner" }, Pt = { class: "flex-1 flex flex-col gap-5" }, jt = { class: "flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Mt = {
693
+ }), St = { class: "fixed top-0 left-0 w-full h-full bg-gradient-to-br from-slate-50 via-white to-slate-100 flex flex-col z-9999 p-6" }, Ft = { class: "w-full flex justify-between items-center mb-4" }, Pt = { class: "w-full flex-1 bg-white/60 rounded-2xl flex gap-5 p-5 overflow-hidden backdrop-blur-sm border border-slate-200 shadow-inner" }, jt = { class: "flex-1 flex flex-col gap-5" }, It = { class: "flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Mt = {
679
694
  key: 0,
680
695
  class: "mb-4 p-4 bg-gradient-to-br from-emerald-50 to-teal-50 rounded-xl border border-emerald-200 w-full flex-shrink-0 text-sm font-medium text-emerald-700"
681
- }, It = { class: "list-none mt-3 space-y-2 text-slate-600" }, At = { class: "flex items-start gap-2" }, Tt = { class: "font-semibold text-slate-700" }, Bt = { class: "flex items-start gap-2" }, Et = { class: "font-semibold text-slate-700" }, Dt = { class: "font-semibold text-slate-700" }, Ot = { class: "flex items-start gap-2" }, Rt = { class: "flex flex-wrap gap-2 mt-1" }, Nt = { class: "font-semibold text-slate-700" }, Vt = { class: "text-emerald-600" }, Ut = { class: "flex flex-col gap-4 w-full" }, zt = { class: "flex items-center gap-3 cursor-pointer group" }, Lt = {
696
+ }, At = { class: "list-none mt-3 space-y-2 text-slate-600" }, Bt = { class: "flex items-start gap-2" }, Et = { class: "font-semibold text-slate-700" }, Tt = { class: "flex items-start gap-2" }, Dt = { class: "font-semibold text-slate-700" }, Ot = { class: "font-semibold text-slate-700" }, Nt = { class: "flex items-start gap-2" }, Rt = { class: "flex flex-wrap gap-2 mt-1" }, Vt = { class: "font-semibold text-slate-700" }, Ut = { class: "text-emerald-600" }, zt = { class: "flex flex-col gap-4 w-full" }, qt = { class: "flex items-center gap-3 cursor-pointer group" }, Lt = {
682
697
  key: 0,
683
698
  class: "flex flex-col gap-4 ml-8 p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl border border-slate-200"
684
- }, qt = { class: "flex flex-col gap-2" }, Gt = { class: "flex flex-col gap-2" }, Jt = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Ht = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Wt = {
699
+ }, Gt = { class: "flex flex-col gap-2" }, Jt = { class: "flex flex-col gap-2" }, Ht = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Wt = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, Kt = {
685
700
  key: 0,
686
701
  class: "flex-1 flex flex-col items-center justify-center text-slate-400"
687
702
  }, Qt = {
688
703
  key: 1,
689
704
  class: "space-y-3"
690
- }, Xt = ["onClick"], Yt = { class: "font-bold text-slate-800 mb-2" }, Zt = { class: "text-sm text-slate-600 line-clamp-2" }, Kt = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, _t = {
705
+ }, Xt = ["onClick"], Yt = { class: "font-bold text-slate-800 mb-2" }, Zt = { class: "text-sm text-slate-600 line-clamp-2" }, _t = { class: "flex-1 flex flex-col bg-white rounded-2xl shadow-lg border border-slate-200 p-5 overflow-y-auto" }, eo = {
691
706
  key: 0,
692
707
  class: "flex-1 flex flex-col items-center justify-center text-slate-400"
693
- }, eo = {
708
+ }, to = {
694
709
  key: 1,
695
710
  class: "space-y-3"
696
- }, to = { class: "block text-sm font-bold text-slate-700 mb-2 flex items-center gap-2" }, oo = ["onUpdate:modelValue"], lo = ["value"], no = {
711
+ }, oo = { class: "block text-sm font-bold text-slate-700 mb-2 flex items-center gap-2" }, lo = ["onUpdate:modelValue"], no = ["value"], ao = {
697
712
  key: 0,
698
713
  class: "mt-3 p-3 bg-gradient-to-br from-emerald-50 to-teal-50 rounded-lg border border-emerald-200"
699
- }, ao = { class: "mt-1 text-sm font-medium text-slate-700 break-words" }, ro = /* @__PURE__ */ H({
714
+ }, ro = { class: "mt-1 text-sm font-medium text-slate-700 break-words" }, so = /* @__PURE__ */ H({
700
715
  __name: "FeedComponent",
701
716
  props: {
702
717
  object: {
@@ -717,274 +732,274 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
717
732
  }
718
733
  },
719
734
  setup(e) {
720
- const o = e, b = $(null), p = $(null), f = $(!1), c = $(1), d = $("horizontal"), m = $({}), x = $(null), F = (T) => {
721
- b.value = T;
722
- }, s = (T) => {
723
- p.value = T;
735
+ const o = e, g = S(null), x = S(null), f = S(!1), u = S(1), r = S("horizontal"), b = S({}), C = S(null), I = (w) => {
736
+ g.value = w;
737
+ }, a = (w) => {
738
+ x.value = w;
724
739
  }, l = () => {
725
- const T = o.object.fields.filter((a) => a.mappedTo).map((a) => {
726
- var u;
740
+ const w = o.object.fields.filter((d) => d.mappedTo).map((d) => {
741
+ var c;
727
742
  return {
728
- fieldName: a.name,
729
- mappedTo: a.mappedTo,
730
- value: ((u = p.value) == null ? void 0 : u[a.mappedTo]) ?? null
743
+ fieldName: d.name,
744
+ mappedTo: d.mappedTo,
745
+ value: ((c = x.value) == null ? void 0 : c[d.mappedTo]) ?? null
731
746
  };
732
747
  });
733
- x.value = {
734
- ...m.value,
748
+ C.value = {
749
+ ...b.value,
735
750
  dynamicUpdate: f.value,
736
- elementCount: c.value,
737
- orientation: d.value,
738
- mapping: T.map(({ fieldName: a, mappedTo: u }) => ({ fieldName: a, mappedTo: u }))
739
- }, o.updateObjectByFeedContent && o.updateObjectByFeedContent(T, x.value), o.toggleFeedSection();
740
- }, n = (T) => {
741
- m.value = T;
742
- }, g = () => {
743
- var T;
744
- (T = o.object) != null && T.repeat_data && (x.value = o.object.repeat_data, f.value = o.object.repeat_data.dynamicUpdate || !1, c.value = o.object.repeat_data.elementCount || 1, d.value = o.object.repeat_data.orientation || "horizontal", m.value = {
751
+ elementCount: u.value,
752
+ orientation: r.value,
753
+ mapping: w.map(({ fieldName: d, mappedTo: c }) => ({ fieldName: d, mappedTo: c }))
754
+ }, o.updateObjectByFeedContent && o.updateObjectByFeedContent(w, C.value), o.toggleFeedSection();
755
+ }, n = (w) => {
756
+ b.value = w;
757
+ }, m = () => {
758
+ var w;
759
+ (w = o.object) != null && w.repeat_data && (C.value = o.object.repeat_data, f.value = o.object.repeat_data.dynamicUpdate || !1, u.value = o.object.repeat_data.elementCount || 1, r.value = o.object.repeat_data.orientation || "horizontal", b.value = {
745
760
  name: o.object.repeat_data.name,
746
761
  url: o.object.repeat_data.url
747
762
  });
748
- }, S = () => {
749
- x.value = null, f.value = !1, c.value = 1, d.value = "horizontal", m.value = {}, o.updateObjectByFeedContent && o.updateObjectByFeedContent([], null);
750
- }, D = () => {
751
- var T;
752
- x.value && (x.value = {
753
- ...x.value,
763
+ }, k = () => {
764
+ C.value = null, f.value = !1, u.value = 1, r.value = "horizontal", b.value = {}, o.updateObjectByFeedContent && o.updateObjectByFeedContent([], null);
765
+ }, A = () => {
766
+ var w;
767
+ C.value && (C.value = {
768
+ ...C.value,
754
769
  dynamicUpdate: f.value,
755
- elementCount: c.value,
756
- orientation: d.value
757
- }, o.updateObjectByFeedContent && o.updateObjectByFeedContent(((T = x.value.mapping) == null ? void 0 : T.map((a) => ({
758
- fieldName: a.fieldName,
759
- mappedTo: a.mappedTo,
770
+ elementCount: u.value,
771
+ orientation: r.value
772
+ }, o.updateObjectByFeedContent && o.updateObjectByFeedContent(((w = C.value.mapping) == null ? void 0 : w.map((d) => ({
773
+ fieldName: d.fieldName,
774
+ mappedTo: d.mappedTo,
760
775
  value: null
761
- }))) || [], x.value));
776
+ }))) || [], C.value));
762
777
  };
763
- return te(() => {
764
- g();
765
- }), (T, a) => (r(), i("div", kt, [
766
- t("div", St, [
767
- a[5] || (a[5] = t("h2", { class: "text-2xl font-bold bg-gradient-to-r from-slate-700 to-slate-500 bg-clip-text text-transparent flex items-center gap-3" }, [
778
+ return oe(() => {
779
+ m();
780
+ }), (w, d) => (s(), i("div", St, [
781
+ t("div", Ft, [
782
+ d[5] || (d[5] = t("h2", { class: "text-2xl font-bold bg-gradient-to-r from-slate-700 to-slate-500 bg-clip-text text-transparent flex items-center gap-3" }, [
768
783
  t("span", { class: "text-3xl" }, "🍺"),
769
- E(" Configuración de Feed ")
784
+ T(" Configuración de Feed ")
770
785
  ], -1)),
771
786
  t("button", {
772
- onClick: a[0] || (a[0] = //@ts-ignore
773
- (...u) => e.toggleFeedSection && e.toggleFeedSection(...u)),
787
+ onClick: d[0] || (d[0] = //@ts-ignore
788
+ (...c) => e.toggleFeedSection && e.toggleFeedSection(...c)),
774
789
  class: "cursor-pointer group w-10 h-10 flex items-center justify-center bg-white hover:bg-red-50 border border-red-200 hover:border-red-400 text-red-400 hover:text-red-600 rounded-full font-semibold shadow-sm hover:shadow-lg transition-all duration-200"
775
- }, [...a[4] || (a[4] = [
790
+ }, [...d[4] || (d[4] = [
776
791
  t("span", { class: "text-lg" }, "✕", -1)
777
792
  ])])
778
793
  ]),
779
- t("div", Ft, [
780
- t("div", Pt, [
781
- t("div", jt, [
782
- x.value && x.value.dynamicUpdate ? (r(), i("div", Mt, [
794
+ t("div", Pt, [
795
+ t("div", jt, [
796
+ t("div", It, [
797
+ C.value && C.value.dynamicUpdate ? (s(), i("div", Mt, [
783
798
  t("div", { class: "flex justify-between items-start" }, [
784
- a[8] || (a[8] = t("p", { class: "flex items-center gap-2" }, [
799
+ d[8] || (d[8] = t("p", { class: "flex items-center gap-2" }, [
785
800
  t("span", { class: "text-emerald-500" }, "✓"),
786
- E(" Hay un criterio de feed establecido: ")
801
+ T(" Hay un criterio de feed establecido: ")
787
802
  ], -1)),
788
803
  t("div", { class: "flex items-center gap-2" }, [
789
804
  t("button", {
790
- onClick: D,
805
+ onClick: A,
791
806
  class: "cursor-pointer px-3 py-1.5 bg-white hover:bg-emerald-50 text-emerald-500 hover:text-emerald-600 border border-emerald-200 hover:border-emerald-300 rounded-lg text-xs font-semibold transition-all duration-200 flex items-center gap-1 shadow-sm"
792
- }, [...a[6] || (a[6] = [
807
+ }, [...d[6] || (d[6] = [
793
808
  t("span", null, "💾", -1),
794
- E(" Guardar ", -1)
809
+ T(" Guardar ", -1)
795
810
  ])]),
796
811
  t("button", {
797
- onClick: S,
812
+ onClick: k,
798
813
  class: "cursor-pointer px-3 py-1.5 bg-white hover:bg-red-50 text-red-500 hover:text-red-600 border border-red-200 hover:border-red-300 rounded-lg text-xs font-semibold transition-all duration-200 flex items-center gap-1 shadow-sm"
799
- }, [...a[7] || (a[7] = [
814
+ }, [...d[7] || (d[7] = [
800
815
  t("span", null, "✕", -1),
801
- E(" Borrar ", -1)
816
+ T(" Borrar ", -1)
802
817
  ])])
803
818
  ])
804
819
  ]),
805
- t("ul", It, [
806
- t("li", At, [
807
- a[9] || (a[9] = t("span", { class: "text-emerald-400" }, "→", -1)),
808
- a[10] || (a[10] = E(" Conectar con ", -1)),
809
- t("span", Tt, v(x.value.name), 1)
810
- ]),
820
+ t("ul", At, [
811
821
  t("li", Bt, [
812
- a[11] || (a[11] = t("span", { class: "text-emerald-400" }, "→", -1)),
813
- a[12] || (a[12] = E(" Recuperar ", -1)),
814
- t("span", Et, v(x.value.elementCount), 1),
815
- a[13] || (a[13] = E(" items (", -1)),
816
- t("span", Dt, v(x.value.orientation), 1),
817
- a[14] || (a[14] = E(")", -1))
822
+ d[9] || (d[9] = t("span", { class: "text-emerald-400" }, "→", -1)),
823
+ d[10] || (d[10] = T(" Conectar con ", -1)),
824
+ t("span", Et, v(C.value.name), 1)
825
+ ]),
826
+ t("li", Tt, [
827
+ d[11] || (d[11] = t("span", { class: "text-emerald-400" }, "→", -1)),
828
+ d[12] || (d[12] = T(" Recuperar ", -1)),
829
+ t("span", Dt, v(C.value.elementCount), 1),
830
+ d[13] || (d[13] = T(" items (", -1)),
831
+ t("span", Ot, v(C.value.orientation), 1),
832
+ d[14] || (d[14] = T(")", -1))
818
833
  ]),
819
- t("li", Ot, [
820
- a[17] || (a[17] = t("span", { class: "text-emerald-400" }, "→", -1)),
834
+ t("li", Nt, [
835
+ d[17] || (d[17] = t("span", { class: "text-emerald-400" }, "→", -1)),
821
836
  t("div", null, [
822
- a[16] || (a[16] = E(" Mapeo: ", -1)),
837
+ d[16] || (d[16] = T(" Mapeo: ", -1)),
823
838
  t("div", Rt, [
824
- (r(!0), i(A, null, N(x.value.mapping, (u, h) => (r(), i("span", {
825
- key: h,
839
+ (s(!0), i(B, null, V(C.value.mapping, (c, $) => (s(), i("span", {
840
+ key: $,
826
841
  class: "inline-flex items-center gap-1 px-2 py-0.5 bg-white rounded-full text-xs border border-slate-200"
827
842
  }, [
828
- t("span", Nt, v(u.fieldName), 1),
829
- a[15] || (a[15] = t("span", { class: "text-slate-400" }, "←", -1)),
830
- t("span", Vt, v(u.mappedTo), 1)
843
+ t("span", Vt, v(c.fieldName), 1),
844
+ d[15] || (d[15] = t("span", { class: "text-slate-400" }, "←", -1)),
845
+ t("span", Ut, v(c.mappedTo), 1)
831
846
  ]))), 128))
832
847
  ])
833
848
  ])
834
849
  ])
835
850
  ])
836
- ])) : k("", !0),
837
- t("div", Ut, [
838
- t("label", zt, [
839
- R(t("input", {
851
+ ])) : F("", !0),
852
+ t("div", zt, [
853
+ t("label", qt, [
854
+ N(t("input", {
840
855
  type: "checkbox",
841
- "onUpdate:modelValue": a[1] || (a[1] = (u) => f.value = u),
856
+ "onUpdate:modelValue": d[1] || (d[1] = (c) => f.value = c),
842
857
  class: "w-5 h-5 text-emerald-500 border-2 border-slate-300 rounded focus:ring-emerald-500 cursor-pointer"
843
858
  }, null, 512), [
844
- [ae, f.value]
859
+ [se, f.value]
845
860
  ]),
846
- a[18] || (a[18] = t("span", { class: "font-medium text-slate-700 group-hover:text-slate-900 transition-colors" }, "Actualizar dinámicamente según criterios del feed", -1))
861
+ d[18] || (d[18] = t("span", { class: "font-medium text-slate-700 group-hover:text-slate-900 transition-colors" }, "Actualizar dinámicamente según criterios del feed", -1))
847
862
  ]),
848
- f.value ? (r(), i("div", Lt, [
849
- t("div", qt, [
850
- a[19] || (a[19] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Cantidad de elementos:", -1)),
851
- R(t("input", {
863
+ f.value ? (s(), i("div", Lt, [
864
+ t("div", Gt, [
865
+ d[19] || (d[19] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Cantidad de elementos:", -1)),
866
+ N(t("input", {
852
867
  type: "number",
853
- "onUpdate:modelValue": a[2] || (a[2] = (u) => c.value = u),
868
+ "onUpdate:modelValue": d[2] || (d[2] = (c) => u.value = c),
854
869
  min: "1",
855
870
  class: "w-32 px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-colors"
856
871
  }, null, 512), [
857
872
  [
858
- Q,
859
- c.value,
873
+ K,
874
+ u.value,
860
875
  void 0,
861
876
  { number: !0 }
862
877
  ]
863
878
  ])
864
879
  ]),
865
- t("div", Gt, [
866
- a[21] || (a[21] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Orientación:", -1)),
867
- R(t("select", {
868
- "onUpdate:modelValue": a[3] || (a[3] = (u) => d.value = u),
880
+ t("div", Jt, [
881
+ d[21] || (d[21] = t("label", { class: "text-sm font-semibold text-slate-600" }, "Orientación:", -1)),
882
+ N(t("select", {
883
+ "onUpdate:modelValue": d[3] || (d[3] = (c) => r.value = c),
869
884
  class: "w-48 px-3 py-2 border border-slate-200 rounded-lg focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white transition-colors cursor-pointer"
870
- }, [...a[20] || (a[20] = [
885
+ }, [...d[20] || (d[20] = [
871
886
  t("option", {
872
887
  value: "horizontal",
873
888
  selected: ""
874
889
  }, "Horizontal", -1),
875
890
  t("option", { value: "vertical" }, "Vertical", -1)
876
891
  ])], 512), [
877
- [J, d.value]
892
+ [J, r.value]
878
893
  ])
879
894
  ])
880
- ])) : k("", !0)
895
+ ])) : F("", !0)
881
896
  ])
882
897
  ]),
883
- t("div", Jt, [
884
- a[22] || (a[22] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
898
+ t("div", Ht, [
899
+ d[22] || (d[22] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
885
900
  t("span", { class: "text-xl" }, "🔍"),
886
- E(" Orígenes y Filtros ")
901
+ T(" Orígenes y Filtros ")
887
902
  ], -1)),
888
- L($t, {
889
- onSubmit: F,
903
+ q(kt, {
904
+ onSubmit: I,
890
905
  updateFeedCriteria: n,
891
906
  isProduction: e.isProduction
892
907
  }, null, 8, ["isProduction"])
893
908
  ])
894
909
  ]),
895
- t("div", Ht, [
896
- a[24] || (a[24] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
910
+ t("div", Wt, [
911
+ d[24] || (d[24] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
897
912
  t("span", { class: "text-xl" }, "📰"),
898
- E(" Noticias ")
913
+ T(" Noticias ")
899
914
  ], -1)),
900
- !b.value || b.value.length === 0 ? (r(), i("div", Wt, [...a[23] || (a[23] = [
915
+ !g.value || g.value.length === 0 ? (s(), i("div", Kt, [...d[23] || (d[23] = [
901
916
  t("span", { class: "text-5xl mb-3 opacity-50" }, "📭", -1),
902
917
  t("p", { class: "text-sm font-medium" }, "No hay noticias disponibles", -1),
903
918
  t("p", { class: "text-xs mt-1 text-slate-300" }, "Selecciona un origen para cargar noticias", -1)
904
- ])])) : (r(), i("ul", Qt, [
905
- (r(!0), i(A, null, N(b.value, (u, h) => (r(), i("li", {
906
- key: h,
919
+ ])])) : (s(), i("ul", Qt, [
920
+ (s(!0), i(B, null, V(g.value, (c, $) => (s(), i("li", {
921
+ key: $,
907
922
  class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl shadow-sm hover:shadow-md cursor-pointer hover:scale-[1.01] transition-all duration-200 border border-slate-200 hover:border-emerald-300",
908
- onClick: (j) => s(u)
923
+ onClick: (j) => a(c)
909
924
  }, [
910
- t("h4", Yt, v(u.title || u.titulo || "Sin título"), 1),
911
- t("p", Zt, v(u.description || u.descripcion || u.content || "Sin descripción"), 1)
925
+ t("h4", Yt, v(c.title || c.titulo || "Sin título"), 1),
926
+ t("p", Zt, v(c.description || c.descripcion || c.content || "Sin descripción"), 1)
912
927
  ], 8, Xt))), 128))
913
928
  ]))
914
929
  ]),
915
- t("div", Kt, [
916
- a[30] || (a[30] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
930
+ t("div", _t, [
931
+ d[30] || (d[30] = t("h3", { class: "text-lg font-bold mb-5 text-slate-700 pb-2 flex items-center gap-2 border-b border-slate-100" }, [
917
932
  t("span", { class: "text-xl" }, "🔗"),
918
- E(" Relacionar Noticia ")
933
+ T(" Relacionar Noticia ")
919
934
  ], -1)),
920
- p.value ? (r(), i("div", eo, [
921
- (r(!0), i(A, null, N(e.object.fields, (u, h) => (r(), i("div", {
922
- key: h,
935
+ x.value ? (s(), i("div", to, [
936
+ (s(!0), i(B, null, V(e.object.fields, (c, $) => (s(), i("div", {
937
+ key: $,
923
938
  class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-xl border border-slate-200"
924
939
  }, [
925
- t("label", to, [
926
- a[26] || (a[26] = t("span", { class: "text-base" }, "⚙️", -1)),
927
- E(" " + v(u.name), 1)
940
+ t("label", oo, [
941
+ d[26] || (d[26] = t("span", { class: "text-base" }, "⚙️", -1)),
942
+ T(" " + v(c.name), 1)
928
943
  ]),
929
- R(t("select", {
930
- "onUpdate:modelValue": (j) => u.mappedTo = j,
944
+ N(t("select", {
945
+ "onUpdate:modelValue": (j) => c.mappedTo = j,
931
946
  class: "w-full px-3 py-2.5 border border-slate-200 rounded-lg focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 transition-all bg-white cursor-pointer"
932
947
  }, [
933
- a[27] || (a[27] = t("option", { value: "" }, "-- Seleccionar campo --", -1)),
934
- (r(!0), i(A, null, N(p.value, (j, I) => (r(), i("option", {
935
- key: I,
936
- value: I
937
- }, v(I), 9, lo))), 128))
938
- ], 8, oo), [
939
- [J, u.mappedTo]
948
+ d[27] || (d[27] = t("option", { value: "" }, "-- Seleccionar campo --", -1)),
949
+ (s(!0), i(B, null, V(x.value, (j, D) => (s(), i("option", {
950
+ key: D,
951
+ value: D
952
+ }, v(D), 9, no))), 128))
953
+ ], 8, lo), [
954
+ [J, c.mappedTo]
940
955
  ]),
941
- u.mappedTo ? (r(), i("div", no, [
942
- a[28] || (a[28] = t("span", { class: "text-xs font-semibold text-emerald-600 uppercase tracking-wide" }, "Vista previa:", -1)),
943
- t("p", ao, v(p.value[u.mappedTo]), 1)
944
- ])) : k("", !0)
956
+ c.mappedTo ? (s(), i("div", ao, [
957
+ d[28] || (d[28] = t("span", { class: "text-xs font-semibold text-emerald-600 uppercase tracking-wide" }, "Vista previa:", -1)),
958
+ t("p", ro, v(x.value[c.mappedTo]), 1)
959
+ ])) : F("", !0)
945
960
  ]))), 128)),
946
961
  t("button", {
947
962
  onClick: l,
948
963
  class: "cursor-pointer w-full mt-4 px-5 py-3 bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white font-semibold rounded-xl shadow-md hover:shadow-lg transition-all duration-200 transform hover:scale-[1.01] flex items-center justify-center gap-2"
949
- }, [...a[29] || (a[29] = [
964
+ }, [...d[29] || (d[29] = [
950
965
  t("span", { class: "text-lg" }, "✓", -1),
951
966
  t("span", null, "Alimentar el componente", -1)
952
967
  ])])
953
- ])) : (r(), i("div", _t, [...a[25] || (a[25] = [
968
+ ])) : (s(), i("div", eo, [...d[25] || (d[25] = [
954
969
  t("span", { class: "text-5xl mb-3 opacity-50" }, "👆", -1),
955
970
  t("p", { class: "text-sm font-medium text-center" }, [
956
- E("Selecciona una noticia"),
971
+ T("Selecciona una noticia"),
957
972
  t("br"),
958
- E("para relacionar")
973
+ T("para relacionar")
959
974
  ], -1)
960
975
  ])]))
961
976
  ])
962
977
  ])
963
978
  ]));
964
979
  }
965
- }), so = { class: "absolute -top-2.5 left-3 text-[11px] font-medium tracking-wide bg-gradient-to-r from-slate-700 to-slate-600 text-white px-3 py-0.5 rounded-full shadow-sm" }, io = { class: "w-full text-right flex justify-between items-center mt-1" }, uo = { class: "flex gap-3 items-center" }, co = { class: "bg-rose-50 border border-rose-200 text-rose-500 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider rounded-md" }, mo = {
980
+ }), io = { class: "absolute -top-2.5 left-3 text-[11px] font-medium tracking-wide bg-gradient-to-r from-slate-700 to-slate-600 text-white px-3 py-0.5 rounded-full shadow-sm" }, uo = { class: "w-full text-right flex justify-between items-center mt-1" }, co = { class: "flex gap-3 items-center" }, mo = { class: "bg-rose-50 border border-rose-200 text-rose-500 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider rounded-md" }, bo = {
966
981
  key: 0,
967
982
  class: "flex-1 flex justify-center"
968
- }, bo = { class: "flex justify-end items-center gap-3" }, go = { class: "bg-violet-50 border border-violet-200 text-violet-600 rounded-md px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider" }, fo = {
983
+ }, go = { class: "flex justify-end items-center gap-3" }, fo = { class: "bg-violet-50 border border-violet-200 text-violet-600 rounded-md px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wider" }, vo = {
969
984
  key: 0,
970
985
  class: "flex gap-1 bg-slate-50 rounded-lg p-1"
971
- }, vo = {
986
+ }, po = {
972
987
  key: 0,
973
988
  class: "text-[10px] bg-amber-100 text-amber-700 px-1.5 rounded-full font-medium"
974
- }, po = { class: "mt-2 flex items-center" }, xo = { class: "font-medium text-slate-700" }, ho = { key: 0 }, wo = { key: 1 }, yo = {
989
+ }, xo = { class: "mt-2 flex items-center" }, ho = { class: "font-medium text-slate-700" }, wo = { key: 0 }, yo = { key: 1 }, Co = {
975
990
  key: 0,
976
991
  class: "mt-3 p-3 bg-gradient-to-r from-sky-50 to-blue-50 rounded-lg text-sm text-slate-600 border border-sky-100"
977
- }, Co = { class: "mt-3 flex gap-1.5 flex-wrap" }, $o = { class: "absolute top-0 left-0 w-full h-full opacity-0 group-hover:opacity-100 bg-gradient-to-br from-white/90 via-slate-50/95 to-slate-100/90 backdrop-blur-[2px] z-99 transition-all duration-300 rounded-xl" }, ko = { class: "flex justify-center h-full items-center p-4 gap-3" }, So = {
992
+ }, $o = { class: "mt-3 flex gap-1.5 flex-wrap" }, ko = { class: "absolute top-0 left-0 w-full h-full opacity-0 group-hover:opacity-100 bg-gradient-to-br from-white/90 via-slate-50/95 to-slate-100/90 backdrop-blur-[2px] z-99 transition-all duration-300 rounded-xl" }, So = { class: "flex justify-center h-full items-center p-4 gap-3" }, Fo = {
978
993
  key: 0,
979
994
  title: "Mover componente",
980
995
  class: "handle cursor-grab flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-slate-700 hover:border-slate-700 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
981
- }, Fo = {
996
+ }, Po = {
982
997
  key: 1,
983
998
  class: "flex-1 flex justify-center items-center"
984
- }, Po = { class: "flex flex-col items-center" }, jo = {
999
+ }, jo = { class: "flex flex-col items-center" }, Io = {
985
1000
  key: 0,
986
1001
  class: "text-[10px] mt-0.5 opacity-70"
987
- }, Mo = ["id"], de = /* @__PURE__ */ H({
1002
+ }, Mo = ["id"], ce = /* @__PURE__ */ H({
988
1003
  __name: "InitialComponent",
989
1004
  props: {
990
1005
  object: {
@@ -1008,91 +1023,91 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1008
1023
  }
1009
1024
  },
1010
1025
  setup(e) {
1011
- const o = e, b = Math.random().toString(36).substring(2, 15), p = $(!1), f = $(!1), c = $(null), d = $(null), m = $(!1), x = $(!1);
1012
- _(() => o.isComponentMode, (a) => {
1013
- a || F();
1014
- }), _(() => o.object, () => {
1015
- F();
1016
- }, { deep: !0 }), _(m, async (a) => {
1017
- a && (await me(), T());
1026
+ const o = e, g = Math.random().toString(36).substring(2, 15), x = S(!1), f = S(!1), u = S(null), r = S(null), b = S(!1), C = S(!1);
1027
+ ee(() => o.isComponentMode, (d) => {
1028
+ d || I();
1029
+ }), ee(() => o.object, () => {
1030
+ I();
1031
+ }, { deep: !0 }), ee(b, async (d) => {
1032
+ d && (await be(), w());
1018
1033
  });
1019
- const F = () => {
1020
- c.value && clearTimeout(c.value), c.value = setTimeout(() => {
1021
- T();
1034
+ const I = () => {
1035
+ u.value && clearTimeout(u.value), u.value = setTimeout(() => {
1036
+ w();
1022
1037
  }, 500);
1023
- }, s = () => {
1038
+ }, a = () => {
1024
1039
  if (o.isComponentMode) return;
1025
- const a = new IntersectionObserver((u) => {
1026
- u.forEach((h) => {
1027
- h.isIntersecting && !m.value && (m.value = !0, a.disconnect());
1040
+ const d = new IntersectionObserver((c) => {
1041
+ c.forEach(($) => {
1042
+ $.isIntersecting && !b.value && (b.value = !0, d.disconnect());
1028
1043
  });
1029
1044
  }, { threshold: 0.1 });
1030
- d.value && a.observe(d.value);
1031
- }, l = (a, u) => {
1032
- const h = (o.object.fields || []).find((j) => j.name === a);
1033
- h && (h.example_value = u);
1034
- }, n = (a, u) => {
1035
- a.forEach((h) => {
1036
- h.value !== void 0 && l(h.fieldName, h.value);
1037
- }), o.object.repeat_data = u;
1038
- }, g = () => {
1045
+ r.value && d.observe(r.value);
1046
+ }, l = (d, c) => {
1047
+ const $ = (o.object.fields || []).find((j) => j.name === d);
1048
+ $ && ($.example_value = c);
1049
+ }, n = (d, c) => {
1050
+ d.forEach(($) => {
1051
+ $.value !== void 0 && l($.fieldName, $.value);
1052
+ }), o.object.repeat_data = c;
1053
+ }, m = () => {
1039
1054
  f.value = !f.value;
1040
- }, S = () => {
1041
- x.value = !x.value;
1042
- }, D = () => {
1043
- T(!0).then((a) => {
1044
- const u = window.open("", "Preview", "width=1200,height=800");
1045
- if (!u) {
1055
+ }, k = () => {
1056
+ C.value = !C.value;
1057
+ }, A = () => {
1058
+ w(!0).then((d) => {
1059
+ const c = window.open("", "Preview", "width=1200,height=800");
1060
+ if (!c) {
1046
1061
  alert("El navegador bloqueó la ventana emergente. Por favor, permite los popups para este sitio.");
1047
1062
  return;
1048
1063
  }
1049
- u.document.body.innerHTML = a, u.document.querySelectorAll("script").forEach((j) => {
1050
- var z;
1051
- const I = u.document.createElement("script");
1052
- j.src ? I.src = j.src : I.textContent = j.textContent, (z = j.parentNode) == null || z.replaceChild(I, j);
1053
- }), u.document.close();
1064
+ c.document.body.innerHTML = d, c.document.querySelectorAll("script").forEach((j) => {
1065
+ var R;
1066
+ const D = c.document.createElement("script");
1067
+ j.src ? D.src = j.src : D.textContent = j.textContent, (R = j.parentNode) == null || R.replaceChild(D, j);
1068
+ }), c.document.close();
1054
1069
  });
1055
- }, T = (a = !1) => {
1070
+ }, w = (d = !1) => {
1056
1071
  var j;
1057
1072
  if (!((j = o.object) != null && j.category) || o.object.category === "Repetidor") {
1058
- const I = '<div style="color:white; padding: 1em 2em;background-color:#001978;border-radius:1em;border:4px solid #711978;">Componente que contiene elementos repetidos: TODO: GENERAR PREVIEW DE REPETIDORES</div>';
1059
- if (a)
1060
- return Promise.resolve(I);
1061
- const z = document.getElementById(b);
1062
- return z && (z.innerHTML = I), Promise.resolve("");
1073
+ const D = '<div style="color:white; padding: 1em 2em;background-color:#001978;border-radius:1em;border:4px solid #711978;">Componente que contiene elementos repetidos: TODO: GENERAR PREVIEW DE REPETIDORES</div>';
1074
+ if (d)
1075
+ return Promise.resolve(D);
1076
+ const R = document.getElementById(g);
1077
+ return R && (R.innerHTML = D), Promise.resolve("");
1063
1078
  }
1064
- const u = o.renderApiDomain ? o.renderApiDomain + "/api/preview-comp/" : "http://localhost:8003/api/preview-comp/", h = JSON.stringify({ obj: o.object }, null, 2);
1065
- return fetch(u, {
1079
+ const c = o.renderApiDomain ? o.renderApiDomain + "/api/preview-comp/" : "http://localhost:8003/api/preview-comp/", $ = JSON.stringify({ obj: o.object }, null, 2);
1080
+ return fetch(c, {
1066
1081
  method: "POST",
1067
1082
  headers: { "Content-Type": "application/json" },
1068
- body: h
1069
- }).then((I) => I.text()).then((I) => {
1070
- if (a)
1071
- return I;
1072
- const z = document.getElementById(b);
1073
- return z && (z.innerHTML = I), "";
1083
+ body: $
1084
+ }).then((D) => D.text()).then((D) => {
1085
+ if (d)
1086
+ return D;
1087
+ const R = document.getElementById(g);
1088
+ return R && (R.innerHTML = D), "";
1074
1089
  });
1075
1090
  };
1076
- return te(() => {
1077
- s();
1078
- }), (a, u) => (r(), i("div", null, [
1079
- x.value ? (r(), re(ro, {
1091
+ return oe(() => {
1092
+ a();
1093
+ }), (d, c) => (s(), i("div", null, [
1094
+ C.value ? (s(), ie(so, {
1080
1095
  key: 0,
1081
1096
  updateObjectByFeedContent: n,
1082
- toggleFeedSection: S,
1097
+ toggleFeedSection: k,
1083
1098
  object: e.object,
1084
1099
  isProduction: e.isProduction
1085
- }, null, 8, ["object", "isProduction"])) : k("", !0),
1100
+ }, null, 8, ["object", "isProduction"])) : F("", !0),
1086
1101
  t("div", {
1087
1102
  ref_key: "rootElement",
1088
- ref: d,
1089
- class: q(["min-h-[100px] relative group hover:shadow-lg hover:shadow-slate-200/50 duration-300 ease-out js-draggable-element text-slate-600 border border-slate-200 hover:border-slate-300 px-5 pt-3 pb-4 w-full bg-white inline-block rounded-xl flex flex-col mb-3 z-0 shadow-sm", { "overflow-hidden": !e.isComponentMode }])
1103
+ ref: r,
1104
+ class: L(["min-h-[100px] relative group hover:shadow-lg hover:shadow-slate-200/50 duration-300 ease-out js-draggable-element text-slate-600 border border-slate-200 hover:border-slate-300 px-5 pt-3 pb-4 w-full bg-white inline-block rounded-xl flex flex-col mb-3 z-0 shadow-sm", { "overflow-hidden": !e.isComponentMode }])
1090
1105
  }, [
1091
- e.isComponentMode ? (r(), i(A, { key: 0 }, [
1092
- t("span", so, v(e.object.component_name), 1),
1093
- t("div", io, [
1094
- t("div", uo, [
1095
- u[8] || (u[8] = t("div", { class: "handle cursor-grab text-slate-400 hover:text-slate-600 text-lg transition-colors" }, [
1106
+ e.isComponentMode ? (s(), i(B, { key: 0 }, [
1107
+ t("span", io, v(e.object.component_name), 1),
1108
+ t("div", uo, [
1109
+ t("div", co, [
1110
+ c[8] || (c[8] = t("div", { class: "handle cursor-grab text-slate-400 hover:text-slate-600 text-lg transition-colors" }, [
1096
1111
  t("svg", {
1097
1112
  class: "w-5 h-5",
1098
1113
  fill: "currentColor",
@@ -1101,72 +1116,72 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1101
1116
  t("path", { d: "M7 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 2zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 7 14zm6-8a2 2 0 1 0-.001-4.001A2 2 0 0 0 13 6zm0 2a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 8zm0 6a2 2 0 1 0 .001 4.001A2 2 0 0 0 13 14z" })
1102
1117
  ])
1103
1118
  ], -1)),
1104
- t("span", co, v(e.object.category), 1)
1119
+ t("span", mo, v(e.object.category), 1)
1105
1120
  ]),
1106
- e.fullwidthMode ? (r(), i("div", mo, [
1121
+ e.fullwidthMode ? (s(), i("div", bo, [
1107
1122
  t("div", {
1108
1123
  class: "bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white rounded-lg px-4 py-1.5 text-xs font-medium cursor-pointer shadow-sm hover:shadow transition-all duration-200",
1109
- onClick: u[0] || (u[0] = (h) => {
1124
+ onClick: c[0] || (c[0] = ($) => {
1110
1125
  var j;
1111
1126
  return (j = e.addComponentToColumn) == null ? void 0 : j.call(e, e.object);
1112
1127
  })
1113
1128
  }, "Seleccionar")
1114
- ])) : k("", !0),
1115
- t("div", bo, [
1116
- t("span", go, v(e.object.framework), 1),
1117
- e.insideComponentBox ? k("", !0) : (r(), i("div", fo, [
1129
+ ])) : F("", !0),
1130
+ t("div", go, [
1131
+ t("span", fo, v(e.object.framework), 1),
1132
+ e.insideComponentBox ? F("", !0) : (s(), i("div", vo, [
1118
1133
  t("div", {
1119
1134
  title: "Previsualizar Dummy",
1120
- onClick: u[1] || (u[1] = (h) => D()),
1135
+ onClick: c[1] || (c[1] = ($) => A()),
1121
1136
  class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
1122
1137
  }, "🔍"),
1123
1138
  t("div", {
1124
1139
  title: "Editar configuración",
1125
- onClick: u[2] || (u[2] = (h) => f.value = !f.value),
1140
+ onClick: c[2] || (c[2] = ($) => f.value = !f.value),
1126
1141
  class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
1127
1142
  }, "⚙️"),
1128
1143
  t("div", {
1129
1144
  title: "Beber de contenido",
1130
- onClick: S,
1145
+ onClick: k,
1131
1146
  class: "p-1.5 rounded-md hover:bg-white hover:shadow-sm cursor-pointer transition-all duration-200 text-base flex items-center gap-1"
1132
1147
  }, [
1133
- u[9] || (u[9] = E("⚡ ", -1)),
1134
- e.object.repeat_data ? (r(), i("span", vo, v(e.object.repeat_data.elementCount), 1)) : k("", !0)
1148
+ c[9] || (c[9] = T("⚡ ", -1)),
1149
+ e.object.repeat_data ? (s(), i("span", po, v(e.object.repeat_data.elementCount), 1)) : F("", !0)
1135
1150
  ]),
1136
- e.removeComponent ? (r(), i("div", {
1151
+ e.removeComponent ? (s(), i("div", {
1137
1152
  key: 0,
1138
1153
  title: "Eliminar componente",
1139
- onClick: u[3] || (u[3] = (h) => e.removeComponent(e.object, e.section || "")),
1154
+ onClick: c[3] || (c[3] = ($) => e.removeComponent(e.object, e.section || "")),
1140
1155
  class: "p-1.5 rounded-md hover:bg-red-50 hover:shadow-sm cursor-pointer transition-all duration-200 text-base"
1141
- }, "🗑️")) : k("", !0)
1156
+ }, "🗑️")) : F("", !0)
1142
1157
  ]))
1143
1158
  ])
1144
1159
  ]),
1145
- L(le, {
1146
- toggleShowForm: g,
1160
+ q(ae, {
1161
+ toggleShowForm: m,
1147
1162
  object: e.object,
1148
1163
  showForm: f.value
1149
1164
  }, null, 8, ["object", "showForm"]),
1150
- t("div", po, [
1151
- t("span", xo, v(e.object.name), 1),
1165
+ t("div", xo, [
1166
+ t("span", ho, v(e.object.name), 1),
1152
1167
  t("button", {
1153
- onClick: u[4] || (u[4] = (h) => p.value = !p.value),
1168
+ onClick: c[4] || (c[4] = ($) => x.value = !x.value),
1154
1169
  class: "ms-2 cursor-pointer text-xs text-slate-400 hover:text-slate-600 transition-colors w-5 h-5 rounded-full hover:bg-slate-100 flex items-center justify-center"
1155
1170
  }, [
1156
- p.value ? (r(), i("span", wo, "▲")) : (r(), i("span", ho, "▼"))
1171
+ x.value ? (s(), i("span", yo, "▲")) : (s(), i("span", wo, "▼"))
1157
1172
  ])
1158
1173
  ]),
1159
- p.value ? (r(), i("div", yo, v(e.object.description), 1)) : k("", !0),
1160
- t("div", Co, [
1161
- (r(!0), i(A, null, N(e.object.tags, (h, j) => (r(), i("span", {
1174
+ x.value ? (s(), i("div", Co, v(e.object.description), 1)) : F("", !0),
1175
+ t("div", $o, [
1176
+ (s(!0), i(B, null, V(e.object.tags, ($, j) => (s(), i("span", {
1162
1177
  key: j,
1163
1178
  class: "bg-slate-50 text-slate-500 px-2.5 py-1 rounded-full text-[11px] font-medium border border-slate-100 hover:border-slate-200 hover:bg-slate-100 transition-colors cursor-default"
1164
- }, v(h), 1))), 128))
1179
+ }, v($), 1))), 128))
1165
1180
  ])
1166
- ], 64)) : m.value ? (r(), i(A, { key: 1 }, [
1167
- t("div", $o, [
1168
- t("div", ko, [
1169
- e.insideComponentBox && !e.fullwidthMode || !e.insideComponentBox ? (r(), i("div", So, [...u[10] || (u[10] = [
1181
+ ], 64)) : b.value ? (s(), i(B, { key: 1 }, [
1182
+ t("div", ko, [
1183
+ t("div", So, [
1184
+ e.insideComponentBox && !e.fullwidthMode || !e.insideComponentBox ? (s(), i("div", Fo, [...c[10] || (c[10] = [
1170
1185
  t("div", { class: "flex flex-col items-center" }, [
1171
1186
  t("svg", {
1172
1187
  class: "w-6 h-6 mb-1 text-slate-400 group-hover/btn:text-white",
@@ -1177,28 +1192,28 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1177
1192
  ]),
1178
1193
  t("span", { class: "text-xs font-medium" }, "Mover")
1179
1194
  ], -1)
1180
- ])])) : k("", !0),
1181
- e.insideComponentBox && e.fullwidthMode ? (r(), i("div", Fo, [
1195
+ ])])) : F("", !0),
1196
+ e.insideComponentBox && e.fullwidthMode ? (s(), i("div", Po, [
1182
1197
  t("div", {
1183
1198
  title: "Agregar componente a la columna",
1184
- onClick: u[5] || (u[5] = (h) => {
1199
+ onClick: c[5] || (c[5] = ($) => {
1185
1200
  var j;
1186
1201
  return (j = e.addComponentToColumn) == null ? void 0 : j.call(e, e.object);
1187
1202
  }),
1188
1203
  class: "cursor-pointer flex items-center bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white px-6 py-3 rounded-xl shadow-md hover:shadow-lg transition-all duration-200"
1189
- }, [...u[11] || (u[11] = [
1204
+ }, [...c[11] || (c[11] = [
1190
1205
  t("div", { class: "flex flex-col items-center" }, [
1191
1206
  t("span", { class: "text-2xl mb-1" }, "🚀"),
1192
1207
  t("span", { class: "text-sm font-medium" }, "Seleccionar")
1193
1208
  ], -1)
1194
1209
  ])])
1195
- ])) : k("", !0),
1196
- e.insideComponentBox ? k("", !0) : (r(), i(A, { key: 2 }, [
1210
+ ])) : F("", !0),
1211
+ e.insideComponentBox ? F("", !0) : (s(), i(B, { key: 2 }, [
1197
1212
  t("div", {
1198
1213
  title: "Configurar componente",
1199
- onClick: u[6] || (u[6] = (h) => f.value = !f.value),
1214
+ onClick: c[6] || (c[6] = ($) => f.value = !f.value),
1200
1215
  class: "cursor-pointer flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-slate-700 hover:border-slate-700 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
1201
- }, [...u[12] || (u[12] = [
1216
+ }, [...c[12] || (c[12] = [
1202
1217
  t("div", { class: "flex flex-col items-center" }, [
1203
1218
  t("span", { class: "text-xl mb-1" }, "⚙️"),
1204
1219
  t("span", { class: "text-xs font-medium" }, "Configurar")
@@ -1206,55 +1221,55 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1206
1221
  ])]),
1207
1222
  t("div", {
1208
1223
  title: "Configurar componente",
1209
- onClick: S,
1224
+ onClick: k,
1210
1225
  class: "cursor-pointer flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-amber-500 hover:border-amber-500 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
1211
1226
  }, [
1212
- t("div", Po, [
1213
- u[13] || (u[13] = t("span", { class: "text-xl mb-1" }, "⚡", -1)),
1214
- u[14] || (u[14] = t("span", { class: "text-xs font-medium" }, "Beber de contenido", -1)),
1215
- e.object.repeat_data && e.object.repeat_data.dynamicUpdate ? (r(), i("span", jo, "Carga " + v(e.object.repeat_data.elementCount) + " elementos", 1)) : k("", !0)
1227
+ t("div", jo, [
1228
+ c[13] || (c[13] = t("span", { class: "text-xl mb-1" }, "⚡", -1)),
1229
+ c[14] || (c[14] = t("span", { class: "text-xs font-medium" }, "Beber de contenido", -1)),
1230
+ e.object.repeat_data && e.object.repeat_data.dynamicUpdate ? (s(), i("span", Io, "Carga " + v(e.object.repeat_data.elementCount) + " elementos", 1)) : F("", !0)
1216
1231
  ])
1217
1232
  ]),
1218
- e.removeComponent ? (r(), i("div", {
1233
+ e.removeComponent ? (s(), i("div", {
1219
1234
  key: 0,
1220
1235
  title: "Eliminar componente",
1221
- onClick: u[7] || (u[7] = (h) => e.removeComponent(e.object, e.section || "")),
1236
+ onClick: c[7] || (c[7] = ($) => e.removeComponent(e.object, e.section || "")),
1222
1237
  class: "cursor-pointer flex items-center bg-white border border-slate-200 px-4 py-2 rounded-xl hover:bg-red-500 hover:border-red-500 hover:text-white shadow-sm hover:shadow-md transition-all duration-200 group/btn"
1223
- }, [...u[15] || (u[15] = [
1238
+ }, [...c[15] || (c[15] = [
1224
1239
  t("div", { class: "flex flex-col items-center" }, [
1225
1240
  t("span", { class: "text-xl mb-1" }, "🗑️"),
1226
1241
  t("span", { class: "text-xs font-medium" }, "Eliminar")
1227
1242
  ], -1)
1228
- ])])) : k("", !0)
1243
+ ])])) : F("", !0)
1229
1244
  ], 64))
1230
1245
  ])
1231
1246
  ]),
1232
- L(le, {
1233
- toggleShowForm: g,
1247
+ q(ae, {
1248
+ toggleShowForm: m,
1234
1249
  object: e.object,
1235
1250
  showForm: f.value
1236
1251
  }, null, 8, ["object", "showForm"]),
1237
1252
  t("div", {
1238
- id: G(b),
1253
+ id: G(g),
1239
1254
  class: "w-full h-full flex items-center justify-center"
1240
1255
  }, null, 8, Mo)
1241
- ], 64)) : k("", !0)
1256
+ ], 64)) : F("", !0)
1242
1257
  ], 2)
1243
1258
  ]));
1244
1259
  }
1245
- }), Io = { class: "absolute top-1 left-2 px-2 flex gap-3 items-center" }, Ao = {
1260
+ }), Ao = { class: "absolute top-1 left-2 px-2 flex gap-3 items-center" }, Bo = {
1246
1261
  key: 0,
1247
1262
  class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
1248
- }, To = { class: "text-slate-600" }, Bo = {
1263
+ }, Eo = { class: "text-slate-600" }, To = {
1249
1264
  key: 1,
1250
1265
  class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
1251
- }, Eo = { class: "text-slate-600" }, Do = {
1266
+ }, Do = { class: "text-slate-600" }, Oo = {
1252
1267
  key: 2,
1253
1268
  class: "text-[10px] font-medium text-slate-400 bg-white/80 backdrop-blur-sm px-2 py-0.5 rounded-full shadow-sm"
1254
- }, Oo = { class: "text-slate-600" }, Ro = {
1269
+ }, No = { class: "text-slate-600" }, Ro = {
1255
1270
  key: 0,
1256
1271
  class: "my-4 w-full rounded-xl bg-white border border-slate-200 p-4 z-10 hidden group-hover:block shadow-lg"
1257
- }, No = { class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-lg w-full" }, Vo = { class: "flex flex-col" }, Uo = ["for"], zo = ["id"], Lo = ["value"], qo = { class: "flex flex-col" }, Go = ["for"], Jo = ["id"], Ho = ["value"], Wo = { class: "flex flex-col" }, Qo = ["for"], Xo = ["id"], Yo = ["value"], Zo = { class: "absolute bottom-0 flex flex-col gap-1 w-full opacity-0 transition-all duration-300 group-hover:opacity-100" }, Ko = { class: "flex justify-between gap-2 bg-white/90 backdrop-blur-sm rounded-t-xl px-3 py-1.5 shadow-sm border border-b-0 border-slate-200" }, _o = { class: "flex gap-1" }, el = /* @__PURE__ */ H({
1272
+ }, Vo = { class: "p-4 bg-gradient-to-br from-slate-50 to-white rounded-lg w-full" }, Uo = { class: "flex flex-col" }, zo = ["for"], qo = ["id"], Lo = ["value"], Go = { class: "flex flex-col" }, Jo = ["for"], Ho = ["id"], Wo = ["value"], Ko = { class: "flex flex-col" }, Qo = ["for"], Xo = ["id"], Yo = ["value"], Zo = { class: "absolute bottom-0 flex flex-col gap-1 w-full opacity-0 transition-all duration-300 group-hover:opacity-100" }, _o = { class: "flex justify-between gap-2 bg-white/90 backdrop-blur-sm rounded-t-xl px-3 py-1.5 shadow-sm border border-b-0 border-slate-200" }, el = { class: "flex gap-1" }, tl = /* @__PURE__ */ H({
1258
1273
  __name: "ColConfig",
1259
1274
  props: {
1260
1275
  globalPageConfiguration: Array,
@@ -1275,7 +1290,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1275
1290
  section: String
1276
1291
  },
1277
1292
  setup(e) {
1278
- const o = e, b = {
1293
+ const o = e, g = {
1279
1294
  width: [
1280
1295
  { label: "Ancho completo", value: "full" },
1281
1296
  { label: "1/2", value: "1/2" },
@@ -1299,189 +1314,189 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1299
1314
  { label: "Columna (componentes unos encima de otros)", value: "flex-col" },
1300
1315
  { label: "Fila (componentes unos al lado de otros)", value: "flex-row" }
1301
1316
  ]
1302
- }, p = $(""), f = $(""), c = $(""), d = $(!1), m = X(() => {
1303
- var l, n, g, S;
1304
- const F = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
1305
- (D) => D.section === o.section
1306
- ), s = (S = (g = (n = F == null ? void 0 : F.rows) == null ? void 0 : n[o.rowIndex]) == null ? void 0 : g.columns) == null ? void 0 : S[o.columnIndex];
1307
- return (s == null ? void 0 : s.config) || {};
1308
- }), x = (F, s) => {
1309
- var S;
1310
- const l = p.value || b.width[0].value, n = f.value || b.gap[0].value, g = c.value || "";
1311
- (S = o.updateColConfig) == null || S.call(o, F, s, o.section || "", l, n, g), d.value = !1;
1317
+ }, x = S(""), f = S(""), u = S(""), r = S(!1), b = Q(() => {
1318
+ var l, n, m, k;
1319
+ const I = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
1320
+ (A) => A.section === o.section
1321
+ ), a = (k = (m = (n = I == null ? void 0 : I.rows) == null ? void 0 : n[o.rowIndex]) == null ? void 0 : m.columns) == null ? void 0 : k[o.columnIndex];
1322
+ return (a == null ? void 0 : a.config) || {};
1323
+ }), C = (I, a) => {
1324
+ var k;
1325
+ const l = x.value || g.width[0].value, n = f.value || g.gap[0].value, m = u.value || "";
1326
+ (k = o.updateColConfig) == null || k.call(o, I, a, o.section || "", l, n, m), r.value = !1;
1312
1327
  };
1313
- return (F, s) => (r(), i(A, null, [
1314
- t("div", Io, [
1315
- m.value.width !== void 0 ? (r(), i("span", Ao, [
1316
- s[12] || (s[12] = E(" Ancho: ", -1)),
1317
- t("span", To, v(m.value.width), 1)
1318
- ])) : k("", !0),
1319
- m.value.gap !== void 0 ? (r(), i("span", Bo, [
1320
- s[13] || (s[13] = E(" Gap: ", -1)),
1321
- t("span", Eo, v(m.value.gap), 1)
1322
- ])) : k("", !0),
1323
- m.value.flexDirection !== void 0 ? (r(), i("span", Do, [
1324
- s[14] || (s[14] = E(" Flex: ", -1)),
1325
- t("span", Oo, v(m.value.flexDirection), 1)
1326
- ])) : k("", !0)
1328
+ return (I, a) => (s(), i(B, null, [
1329
+ t("div", Ao, [
1330
+ b.value.width !== void 0 ? (s(), i("span", Bo, [
1331
+ a[12] || (a[12] = T(" Ancho: ", -1)),
1332
+ t("span", Eo, v(b.value.width), 1)
1333
+ ])) : F("", !0),
1334
+ b.value.gap !== void 0 ? (s(), i("span", To, [
1335
+ a[13] || (a[13] = T(" Gap: ", -1)),
1336
+ t("span", Do, v(b.value.gap), 1)
1337
+ ])) : F("", !0),
1338
+ b.value.flexDirection !== void 0 ? (s(), i("span", Oo, [
1339
+ a[14] || (a[14] = T(" Flex: ", -1)),
1340
+ t("span", No, v(b.value.flexDirection), 1)
1341
+ ])) : F("", !0)
1327
1342
  ]),
1328
- d.value ? (r(), i("div", Ro, [
1329
- t("div", No, [
1343
+ r.value ? (s(), i("div", Ro, [
1344
+ t("div", Vo, [
1330
1345
  t("form", {
1331
- onSubmit: s[4] || (s[4] = ee(() => {
1346
+ onSubmit: a[4] || (a[4] = te(() => {
1332
1347
  }, ["prevent"])),
1333
1348
  class: "flex gap-5 w-full justify-center items-end flex-wrap"
1334
1349
  }, [
1335
- t("div", Vo, [
1350
+ t("div", Uo, [
1336
1351
  t("label", {
1337
1352
  for: `colwidth-${e.rowIndex}-${e.columnIndex}`,
1338
1353
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1339
- }, "Ancho:", 8, Uo),
1340
- R(t("select", {
1341
- "onUpdate:modelValue": s[0] || (s[0] = (l) => p.value = l),
1354
+ }, "Ancho:", 8, zo),
1355
+ N(t("select", {
1356
+ "onUpdate:modelValue": a[0] || (a[0] = (l) => x.value = l),
1342
1357
  id: `colwidth-${e.rowIndex}-${e.columnIndex}`,
1343
1358
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white hover:border-slate-300 transition-colors"
1344
1359
  }, [
1345
- s[15] || (s[15] = t("option", { value: "" }, "Selecciona...", -1)),
1346
- (r(!0), i(A, null, N(b.width, (l) => (r(), i("option", {
1360
+ a[15] || (a[15] = t("option", { value: "" }, "Selecciona...", -1)),
1361
+ (s(!0), i(B, null, V(g.width, (l) => (s(), i("option", {
1347
1362
  key: l.value,
1348
1363
  value: l.value
1349
1364
  }, v(l.label), 9, Lo))), 128))
1350
- ], 8, zo), [
1351
- [J, p.value]
1365
+ ], 8, qo), [
1366
+ [J, x.value]
1352
1367
  ])
1353
1368
  ]),
1354
- t("div", qo, [
1369
+ t("div", Go, [
1355
1370
  t("label", {
1356
1371
  for: `colgap-${e.rowIndex}-${e.columnIndex}`,
1357
1372
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1358
- }, "Gap:", 8, Go),
1359
- R(t("select", {
1360
- "onUpdate:modelValue": s[1] || (s[1] = (l) => f.value = l),
1373
+ }, "Gap:", 8, Jo),
1374
+ N(t("select", {
1375
+ "onUpdate:modelValue": a[1] || (a[1] = (l) => f.value = l),
1361
1376
  id: `colgap-${e.rowIndex}-${e.columnIndex}`,
1362
1377
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white hover:border-slate-300 transition-colors"
1363
1378
  }, [
1364
- s[16] || (s[16] = t("option", { value: "" }, "Selecciona...", -1)),
1365
- (r(!0), i(A, null, N(b.gap, (l) => (r(), i("option", {
1379
+ a[16] || (a[16] = t("option", { value: "" }, "Selecciona...", -1)),
1380
+ (s(!0), i(B, null, V(g.gap, (l) => (s(), i("option", {
1366
1381
  key: l.value,
1367
1382
  value: l.value
1368
- }, v(l.label), 9, Ho))), 128))
1369
- ], 8, Jo), [
1383
+ }, v(l.label), 9, Wo))), 128))
1384
+ ], 8, Ho), [
1370
1385
  [J, f.value]
1371
1386
  ])
1372
1387
  ]),
1373
- t("div", Wo, [
1388
+ t("div", Ko, [
1374
1389
  t("label", {
1375
1390
  for: `flexdir-${e.rowIndex}-${e.columnIndex}`,
1376
1391
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1377
1392
  }, "Dirección:", 8, Qo),
1378
- R(t("select", {
1379
- "onUpdate:modelValue": s[2] || (s[2] = (l) => c.value = l),
1393
+ N(t("select", {
1394
+ "onUpdate:modelValue": a[2] || (a[2] = (l) => u.value = l),
1380
1395
  id: `flexdir-${e.rowIndex}-${e.columnIndex}`,
1381
1396
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-white hover:border-slate-300 transition-colors"
1382
1397
  }, [
1383
- s[17] || (s[17] = t("option", { value: "" }, "Selecciona...", -1)),
1384
- (r(!0), i(A, null, N(b.flexDirection, (l) => (r(), i("option", {
1398
+ a[17] || (a[17] = t("option", { value: "" }, "Selecciona...", -1)),
1399
+ (s(!0), i(B, null, V(g.flexDirection, (l) => (s(), i("option", {
1385
1400
  key: l.value,
1386
1401
  value: l.value
1387
1402
  }, v(l.label), 9, Yo))), 128))
1388
1403
  ], 8, Xo), [
1389
- [J, c.value]
1404
+ [J, u.value]
1390
1405
  ])
1391
1406
  ]),
1392
1407
  t("button", {
1393
1408
  type: "submit",
1394
1409
  class: "bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white px-5 py-2 rounded-lg font-medium shadow-sm hover:shadow-md transition-all duration-200 cursor-pointer",
1395
- onClick: s[3] || (s[3] = (l) => {
1396
- x(e.rowIndex, e.columnIndex), d.value = !1;
1410
+ onClick: a[3] || (a[3] = (l) => {
1411
+ C(e.rowIndex, e.columnIndex), r.value = !1;
1397
1412
  })
1398
1413
  }, " Guardar ")
1399
1414
  ], 32)
1400
1415
  ])
1401
- ])) : k("", !0),
1416
+ ])) : F("", !0),
1402
1417
  t("div", Zo, [
1403
1418
  t("div", {
1404
- class: q(["flex flex-row", { "justify-between": e.section && e.section !== "Sidebar", "justify-center": e.section === "Sidebar" }])
1419
+ class: L(["flex flex-row", { "justify-between": e.section && e.section !== "Sidebar", "justify-center": e.section === "Sidebar" }])
1405
1420
  }, [
1406
- e.section && e.section !== "Sidebar" ? (r(), i("button", {
1421
+ e.section && e.section !== "Sidebar" ? (s(), i("button", {
1407
1422
  key: 0,
1408
1423
  title: "Añadir columna a la izquierda",
1409
- onClick: s[5] || (s[5] = (l) => {
1424
+ onClick: a[5] || (a[5] = (l) => {
1410
1425
  var n;
1411
1426
  return (n = e.addCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "left");
1412
1427
  }),
1413
1428
  class: "ms-2 bg-white px-3 py-1 cursor-pointer rounded-t-lg border border-b-0 border-slate-200 hover:bg-emerald-500 hover:border-emerald-500 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md font-medium"
1414
- }, "+")) : k("", !0),
1415
- t("div", Ko, [
1429
+ }, "+")) : F("", !0),
1430
+ t("div", _o, [
1416
1431
  t("button", {
1417
1432
  title: "Configurar columna",
1418
- onClick: s[6] || (s[6] = (l) => d.value = !d.value),
1419
- class: q(["px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200", d.value ? "bg-amber-100 text-amber-700 shadow-sm" : "bg-slate-100 text-slate-600 hover:bg-amber-500 hover:text-white"])
1433
+ onClick: a[6] || (a[6] = (l) => r.value = !r.value),
1434
+ class: L(["px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200", r.value ? "bg-amber-100 text-amber-700 shadow-sm" : "bg-slate-100 text-slate-600 hover:bg-amber-500 hover:text-white"])
1420
1435
  }, "⚙️", 2),
1421
- t("div", _o, [
1422
- e.section && e.section !== "Sidebar" ? (r(), i("span", {
1436
+ t("div", el, [
1437
+ e.section && e.section !== "Sidebar" ? (s(), i("span", {
1423
1438
  key: 0,
1424
1439
  title: "Mover columna a la izquierda",
1425
- onClick: s[7] || (s[7] = (l) => {
1440
+ onClick: a[7] || (a[7] = (l) => {
1426
1441
  var n;
1427
1442
  return (n = e.moveCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "left");
1428
1443
  }),
1429
1444
  class: "bg-slate-100 px-2.5 py-1 cursor-pointer rounded-lg transition-all duration-200 text-slate-400 hover:bg-blue-500 hover:text-white"
1430
- }, "◁")) : k("", !0),
1431
- e.fullwidthMode ? (r(), i("span", {
1445
+ }, "◁")) : F("", !0),
1446
+ e.fullwidthMode ? (s(), i("span", {
1432
1447
  key: 1,
1433
1448
  title: "Añadir componente",
1434
- onClick: s[8] || (s[8] = (l) => {
1449
+ onClick: a[8] || (a[8] = (l) => {
1435
1450
  var n;
1436
1451
  return (n = e.addComponentFunction) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section || "");
1437
1452
  }),
1438
1453
  class: "bg-slate-100 px-2.5 py-1 cursor-pointer rounded-lg transition-all duration-200 text-slate-400 hover:bg-violet-500 hover:text-white"
1439
- }, " 📦 ")) : k("", !0),
1440
- e.section && e.section !== "Sidebar" ? (r(), i("span", {
1454
+ }, " 📦 ")) : F("", !0),
1455
+ e.section && e.section !== "Sidebar" ? (s(), i("span", {
1441
1456
  key: 2,
1442
1457
  title: "Mover columna a la derecha",
1443
- onClick: s[9] || (s[9] = (l) => {
1458
+ onClick: a[9] || (a[9] = (l) => {
1444
1459
  var n;
1445
1460
  return (n = e.moveCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "right");
1446
1461
  }),
1447
1462
  class: "bg-slate-100 px-2.5 py-1 cursor-pointer rounded-lg transition-all duration-200 text-slate-400 hover:bg-blue-500 hover:text-white"
1448
- }, "▷ ")) : k("", !0)
1463
+ }, "▷ ")) : F("", !0)
1449
1464
  ]),
1450
1465
  t("button", {
1451
1466
  title: "Eliminar columna",
1452
- onClick: s[10] || (s[10] = (l) => {
1467
+ onClick: a[10] || (a[10] = (l) => {
1453
1468
  var n;
1454
1469
  return (n = e.removeCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section || "");
1455
1470
  }),
1456
1471
  class: "bg-slate-100 px-2.5 py-1 rounded-lg cursor-pointer transition-all duration-200 text-slate-600 hover:bg-red-500 hover:text-white"
1457
1472
  }, "🗑️")
1458
1473
  ]),
1459
- e.section && e.section !== "Sidebar" ? (r(), i("button", {
1474
+ e.section && e.section !== "Sidebar" ? (s(), i("button", {
1460
1475
  key: 1,
1461
1476
  title: "Añadir columna a la derecha",
1462
- onClick: s[11] || (s[11] = (l) => {
1477
+ onClick: a[11] || (a[11] = (l) => {
1463
1478
  var n;
1464
1479
  return (n = e.addCol) == null ? void 0 : n.call(e, e.rowIndex, e.columnIndex, e.section, "right");
1465
1480
  }),
1466
1481
  class: "me-2 bg-white px-3 py-1 cursor-pointer rounded-t-lg border border-b-0 border-slate-200 hover:bg-emerald-500 hover:border-emerald-500 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md font-medium"
1467
- }, "+")) : k("", !0)
1482
+ }, "+")) : F("", !0)
1468
1483
  ], 2)
1469
1484
  ])
1470
1485
  ], 64));
1471
1486
  }
1472
- }), tl = { class: "absolute -top-1 px-2 gap-4 w-full justify-between hidden css-pb-row-config" }, ol = { class: "flex gap-1.5" }, ll = { class: "flex gap-4 items-center" }, nl = { class: "inline-block" }, al = {
1487
+ }), ol = { class: "absolute -top-1 px-2 gap-4 w-full justify-between hidden css-pb-row-config" }, ll = { class: "flex gap-1.5" }, nl = { class: "flex gap-4 items-center" }, al = { class: "inline-block" }, rl = {
1473
1488
  key: 0,
1474
1489
  class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
1475
- }, rl = { class: "text-slate-600" }, sl = {
1490
+ }, sl = { class: "text-slate-600" }, il = {
1476
1491
  key: 1,
1477
1492
  class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
1478
- }, il = { class: "text-slate-600" }, dl = {
1493
+ }, dl = { class: "text-slate-600" }, ul = {
1479
1494
  key: 2,
1480
1495
  class: "text-xs font-medium text-slate-400 bg-slate-50 px-2 py-1 rounded-full"
1481
- }, ul = { class: "text-slate-600" }, cl = { class: "flex gap-1.5" }, ml = {
1496
+ }, cl = { class: "text-slate-600" }, ml = { class: "flex gap-1.5" }, bl = {
1482
1497
  key: 0,
1483
1498
  class: "z-1"
1484
- }, bl = { class: "p-5 bg-white rounded-xl shadow-lg border border-slate-100 w-full mt-8" }, gl = { class: "flex flex-col" }, fl = ["for"], vl = ["id"], pl = ["value"], xl = { class: "flex flex-col" }, hl = ["for"], wl = ["id"], yl = ["value"], Cl = { class: "flex flex-col" }, $l = ["for"], kl = ["id"], Sl = ["value"], Fl = /* @__PURE__ */ H({
1499
+ }, gl = { class: "p-5 bg-white rounded-xl shadow-lg border border-slate-100 w-full mt-8" }, fl = { class: "flex flex-col" }, vl = ["for"], pl = ["id"], xl = ["value"], hl = { class: "flex flex-col" }, wl = ["for"], yl = ["id"], Cl = ["value"], $l = { class: "flex flex-col" }, kl = ["for"], Sl = ["id"], Fl = ["value"], Pl = /* @__PURE__ */ H({
1485
1500
  __name: "RowConfig",
1486
1501
  props: {
1487
1502
  rowIndex: {
@@ -1496,7 +1511,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1496
1511
  moveRow: Function
1497
1512
  },
1498
1513
  setup(e) {
1499
- const o = e, b = {
1514
+ const o = e, g = {
1500
1515
  padding: [
1501
1516
  { label: "Ninguno", value: "0" },
1502
1517
  { label: "Leve", value: "4" },
@@ -1522,158 +1537,158 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1522
1537
  { label: "3/5", value: "3/5" },
1523
1538
  { label: "4/5", value: "4/5" }
1524
1539
  ]
1525
- }, p = $(""), f = $(""), c = $(""), d = $(!1), m = $(!1), x = X(() => {
1540
+ }, x = S(""), f = S(""), u = S(""), r = S(!1), b = S(!1), C = Q(() => {
1526
1541
  var l, n;
1527
- const s = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
1528
- (g) => g.section === o.section
1542
+ const a = (l = o.globalPageConfiguration) == null ? void 0 : l.find(
1543
+ (m) => m.section === o.section
1529
1544
  );
1530
- return (n = s == null ? void 0 : s.rows) != null && n[o.rowIndex] ? s.rows[o.rowIndex].config || {} : {};
1531
- }), F = (s) => {
1532
- var S;
1533
- const l = p.value || b.padding[0].value, n = f.value || b.gap[0].value, g = c.value || b.width[0].value;
1534
- (S = o.updateRowConfig) == null || S.call(o, s, o.section || "", l, n, g), d.value = !1;
1545
+ return (n = a == null ? void 0 : a.rows) != null && n[o.rowIndex] ? a.rows[o.rowIndex].config || {} : {};
1546
+ }), I = (a) => {
1547
+ var k;
1548
+ const l = x.value || g.padding[0].value, n = f.value || g.gap[0].value, m = u.value || g.width[0].value;
1549
+ (k = o.updateRowConfig) == null || k.call(o, a, o.section || "", l, n, m), r.value = !1;
1535
1550
  };
1536
- return (s, l) => (r(), i(A, null, [
1537
- t("div", tl, [
1551
+ return (a, l) => (s(), i(B, null, [
1552
+ t("div", ol, [
1538
1553
  t("div", null, [
1539
- t("div", ol, [
1554
+ t("div", ll, [
1540
1555
  t("button", {
1541
1556
  title: "Agregar fila",
1542
1557
  onClick: l[0] || (l[0] = (n) => {
1543
- var g;
1544
- (g = e.addRow) == null || g.call(e, e.rowIndex, e.section || ""), m.value = !1;
1558
+ var m;
1559
+ (m = e.addRow) == null || m.call(e, e.rowIndex, e.section || ""), b.value = !1;
1545
1560
  }),
1546
1561
  class: "cursor-pointer rounded-b-lg border border-t-0 border-slate-200 bg-white hover:bg-emerald-500 hover:border-emerald-500 px-3 py-1 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md font-medium"
1547
1562
  }, "+"),
1548
1563
  t("button", {
1549
1564
  title: "Mover fila hacia arriba",
1550
1565
  onClick: l[1] || (l[1] = (n) => {
1551
- var g;
1552
- (g = e.moveRow) == null || g.call(e, e.rowIndex, e.section || "", "up"), m.value = !1;
1566
+ var m;
1567
+ (m = e.moveRow) == null || m.call(e, e.rowIndex, e.section || "", "up"), b.value = !1;
1553
1568
  }),
1554
1569
  class: "cursor-pointer rounded-b-lg border border-t-0 border-slate-200 bg-white hover:bg-blue-500 hover:border-blue-500 px-3 py-1 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md"
1555
1570
  }, "△"),
1556
1571
  t("button", {
1557
1572
  title: "Mover fila hacia abajo",
1558
1573
  onClick: l[2] || (l[2] = (n) => {
1559
- var g;
1560
- (g = e.moveRow) == null || g.call(e, e.rowIndex, e.section || "", "down"), m.value = !1;
1574
+ var m;
1575
+ (m = e.moveRow) == null || m.call(e, e.rowIndex, e.section || "", "down"), b.value = !1;
1561
1576
  }),
1562
1577
  class: "cursor-pointer rounded-b-lg border border-t-0 border-slate-200 bg-white hover:bg-blue-500 hover:border-blue-500 px-3 py-1 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md"
1563
1578
  }, "▽")
1564
1579
  ])
1565
1580
  ]),
1566
- t("div", ll, [
1567
- t("div", nl, [
1581
+ t("div", nl, [
1582
+ t("div", al, [
1568
1583
  t("button", {
1569
1584
  title: "Configurar la fila",
1570
- onClick: l[3] || (l[3] = (n) => d.value = !d.value),
1571
- class: q(["cursor-pointer rounded-b-lg border border-t-0 px-3 py-1 transition-all duration-200 shadow-sm hover:shadow-md", d.value ? "bg-amber-100 border-amber-300 text-amber-700" : "bg-white border-slate-200 text-slate-600 hover:bg-amber-500 hover:border-amber-500 hover:text-white"])
1585
+ onClick: l[3] || (l[3] = (n) => r.value = !r.value),
1586
+ class: L(["cursor-pointer rounded-b-lg border border-t-0 px-3 py-1 transition-all duration-200 shadow-sm hover:shadow-md", r.value ? "bg-amber-100 border-amber-300 text-amber-700" : "bg-white border-slate-200 text-slate-600 hover:bg-amber-500 hover:border-amber-500 hover:text-white"])
1572
1587
  }, "⚙️", 2)
1573
1588
  ]),
1574
- x.value.padding !== void 0 ? (r(), i("span", al, [
1575
- l[10] || (l[10] = E(" Padding: ", -1)),
1576
- t("span", rl, v(x.value.padding), 1)
1577
- ])) : k("", !0),
1578
- x.value.gap !== void 0 ? (r(), i("span", sl, [
1579
- l[11] || (l[11] = E(" Gap: ", -1)),
1580
- t("span", il, v(x.value.gap), 1)
1581
- ])) : k("", !0),
1582
- x.value.width !== void 0 ? (r(), i("span", dl, [
1583
- l[12] || (l[12] = E(" Ancho: ", -1)),
1584
- t("span", ul, v(x.value.width), 1)
1585
- ])) : k("", !0)
1589
+ C.value.padding !== void 0 ? (s(), i("span", rl, [
1590
+ l[10] || (l[10] = T(" Padding: ", -1)),
1591
+ t("span", sl, v(C.value.padding), 1)
1592
+ ])) : F("", !0),
1593
+ C.value.gap !== void 0 ? (s(), i("span", il, [
1594
+ l[11] || (l[11] = T(" Gap: ", -1)),
1595
+ t("span", dl, v(C.value.gap), 1)
1596
+ ])) : F("", !0),
1597
+ C.value.width !== void 0 ? (s(), i("span", ul, [
1598
+ l[12] || (l[12] = T(" Ancho: ", -1)),
1599
+ t("span", cl, v(C.value.width), 1)
1600
+ ])) : F("", !0)
1586
1601
  ]),
1587
1602
  t("div", null, [
1588
- t("div", cl, [
1603
+ t("div", ml, [
1589
1604
  t("button", {
1590
1605
  title: "Eliminar fila",
1591
1606
  onClick: l[4] || (l[4] = (n) => {
1592
- var g;
1593
- (g = e.removeRow) == null || g.call(e, e.rowIndex, e.section || ""), m.value = !1;
1607
+ var m;
1608
+ (m = e.removeRow) == null || m.call(e, e.rowIndex, e.section || ""), b.value = !1;
1594
1609
  }),
1595
1610
  class: "cursor-pointer rounded-b-lg border border-t-0 border-slate-200 bg-white hover:bg-red-500 hover:border-red-500 px-3 py-1 hover:text-white text-slate-600 transition-all duration-200 shadow-sm hover:shadow-md"
1596
1611
  }, "🗑️")
1597
1612
  ])
1598
1613
  ])
1599
1614
  ]),
1600
- d.value ? (r(), i("div", ml, [
1601
- t("div", bl, [
1615
+ r.value ? (s(), i("div", bl, [
1616
+ t("div", gl, [
1602
1617
  t("form", {
1603
- onSubmit: l[9] || (l[9] = ee(() => {
1618
+ onSubmit: l[9] || (l[9] = te(() => {
1604
1619
  }, ["prevent"])),
1605
1620
  class: "flex gap-6 w-full justify-center items-end flex-wrap"
1606
1621
  }, [
1607
- t("div", gl, [
1622
+ t("div", fl, [
1608
1623
  t("label", {
1609
1624
  for: `padding-${e.rowIndex}`,
1610
1625
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1611
- }, "Padding:", 8, fl),
1612
- R(t("select", {
1613
- "onUpdate:modelValue": l[5] || (l[5] = (n) => p.value = n),
1626
+ }, "Padding:", 8, vl),
1627
+ N(t("select", {
1628
+ "onUpdate:modelValue": l[5] || (l[5] = (n) => x.value = n),
1614
1629
  id: `padding-${e.rowIndex}`,
1615
1630
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-slate-50 hover:bg-white transition-colors"
1616
1631
  }, [
1617
1632
  l[13] || (l[13] = t("option", { value: "" }, "Selecciona...", -1)),
1618
- (r(!0), i(A, null, N(b.padding, (n) => (r(), i("option", {
1633
+ (s(!0), i(B, null, V(g.padding, (n) => (s(), i("option", {
1619
1634
  key: n.value,
1620
1635
  value: n.value
1621
- }, v(n.label), 9, pl))), 128))
1622
- ], 8, vl), [
1623
- [J, p.value]
1636
+ }, v(n.label), 9, xl))), 128))
1637
+ ], 8, pl), [
1638
+ [J, x.value]
1624
1639
  ])
1625
1640
  ]),
1626
- t("div", xl, [
1641
+ t("div", hl, [
1627
1642
  t("label", {
1628
1643
  for: `gap-${e.rowIndex}`,
1629
1644
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1630
- }, "Gap:", 8, hl),
1631
- R(t("select", {
1645
+ }, "Gap:", 8, wl),
1646
+ N(t("select", {
1632
1647
  "onUpdate:modelValue": l[6] || (l[6] = (n) => f.value = n),
1633
1648
  id: `gap-${e.rowIndex}`,
1634
1649
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-slate-50 hover:bg-white transition-colors"
1635
1650
  }, [
1636
1651
  l[14] || (l[14] = t("option", { value: "" }, "Selecciona...", -1)),
1637
- (r(!0), i(A, null, N(b.gap, (n) => (r(), i("option", {
1652
+ (s(!0), i(B, null, V(g.gap, (n) => (s(), i("option", {
1638
1653
  key: n.value,
1639
1654
  value: n.value
1640
- }, v(n.label), 9, yl))), 128))
1641
- ], 8, wl), [
1655
+ }, v(n.label), 9, Cl))), 128))
1656
+ ], 8, yl), [
1642
1657
  [J, f.value]
1643
1658
  ])
1644
1659
  ]),
1645
- t("div", Cl, [
1660
+ t("div", $l, [
1646
1661
  t("label", {
1647
1662
  for: `width-${e.rowIndex}`,
1648
1663
  class: "block text-sm font-medium text-slate-600 mb-1.5"
1649
- }, "Ancho:", 8, $l),
1650
- R(t("select", {
1651
- "onUpdate:modelValue": l[7] || (l[7] = (n) => c.value = n),
1664
+ }, "Ancho:", 8, kl),
1665
+ N(t("select", {
1666
+ "onUpdate:modelValue": l[7] || (l[7] = (n) => u.value = n),
1652
1667
  id: `width-${e.rowIndex}`,
1653
1668
  class: "block w-full border border-slate-200 rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 bg-slate-50 hover:bg-white transition-colors"
1654
1669
  }, [
1655
1670
  l[15] || (l[15] = t("option", { value: "" }, "Selecciona...", -1)),
1656
- (r(!0), i(A, null, N(b.width, (n) => (r(), i("option", {
1671
+ (s(!0), i(B, null, V(g.width, (n) => (s(), i("option", {
1657
1672
  key: n.value,
1658
1673
  value: n.value
1659
- }, v(n.label), 9, Sl))), 128))
1660
- ], 8, kl), [
1661
- [J, c.value]
1674
+ }, v(n.label), 9, Fl))), 128))
1675
+ ], 8, Sl), [
1676
+ [J, u.value]
1662
1677
  ])
1663
1678
  ]),
1664
1679
  t("button", {
1665
1680
  type: "submit",
1666
1681
  class: "bg-gradient-to-r from-emerald-500 to-teal-500 hover:from-emerald-600 hover:to-teal-600 text-white px-5 py-2 rounded-lg font-medium shadow-sm hover:shadow-md transition-all duration-200 cursor-pointer",
1667
1682
  onClick: l[8] || (l[8] = (n) => {
1668
- F(e.rowIndex), m.value = !1;
1683
+ I(e.rowIndex), b.value = !1;
1669
1684
  })
1670
1685
  }, " Guardar ")
1671
1686
  ], 32)
1672
1687
  ])
1673
- ])) : k("", !0)
1688
+ ])) : F("", !0)
1674
1689
  ], 64));
1675
1690
  }
1676
- }), Pl = ["id"], jl = { class: "flex flex-row w-full gap-3 mt-6" }, Ml = ["id"], Il = /* @__PURE__ */ H({
1691
+ }), jl = ["id"], Il = { class: "flex flex-row w-full gap-3 mt-6" }, Ml = ["id"], Al = /* @__PURE__ */ H({
1677
1692
  __name: "BodySection",
1678
1693
  props: {
1679
1694
  isComponentMode: Boolean,
@@ -1697,49 +1712,49 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1697
1712
  }
1698
1713
  },
1699
1714
  setup(e) {
1700
- const o = e, b = $(!1), p = X(() => {
1701
- var c;
1702
- const f = (c = o.globalPageConfiguration) == null ? void 0 : c.find(
1703
- (d) => d.section === o.sectionSelected
1715
+ const o = e, g = S(!1), x = Q(() => {
1716
+ var u;
1717
+ const f = (u = o.globalPageConfiguration) == null ? void 0 : u.find(
1718
+ (r) => r.section === o.sectionSelected
1704
1719
  );
1705
1720
  return (f == null ? void 0 : f.rows) || [];
1706
1721
  });
1707
- return (f, c) => (r(!0), i(A, null, N(p.value, (d, m) => (r(), i("div", {
1708
- key: "row-" + m,
1709
- id: "row-" + e.sectionSelected + "-" + m,
1722
+ return (f, u) => (s(!0), i(B, null, V(x.value, (r, b) => (s(), i("div", {
1723
+ key: "row-" + b,
1724
+ id: "row-" + e.sectionSelected + "-" + b,
1710
1725
  class: "flex flex-col gap-3 w-full p-5 bg-white border border-slate-200 rounded-2xl js-row relative items-center hover:border-slate-300 hover:shadow-lg transition-all duration-300 css-pb-row group/row"
1711
1726
  }, [
1712
- L(Fl, {
1727
+ q(Pl, {
1713
1728
  moveRow: e.moveRow,
1714
1729
  addRow: e.addRow,
1715
1730
  removeRow: e.removeRow,
1716
1731
  globalPageConfiguration: e.globalPageConfiguration,
1717
1732
  updateRowConfig: e.updateRowConfig,
1718
- rowIndex: m,
1733
+ rowIndex: b,
1719
1734
  section: e.sectionSelected
1720
1735
  }, null, 8, ["moveRow", "addRow", "removeRow", "globalPageConfiguration", "updateRowConfig", "rowIndex", "section"]),
1721
- t("div", jl, [
1722
- (r(!0), i(A, null, N(d.columns, (x, F) => (r(), i("div", {
1723
- class: q([
1736
+ t("div", Il, [
1737
+ (s(!0), i(B, null, V(r.columns, (C, I) => (s(), i("div", {
1738
+ class: L([
1724
1739
  "hover:shadow-md overflow-hidden dragging-zone border relative border-slate-200 shadow-sm w-full p-5 pt-10 min-h-[200px] rounded-xl flex flex-col gap-3 items-center before:content-['Columna'] before:absolute before:text-slate-300 before:text-7xl before:font-bold before:bottom-4 before:left-2 before:-rotate-12 before:opacity-30 before:duration-300 before:transition-opacity group hover:before:opacity-50 transition-all duration-300",
1725
- b.value ? "bg-gradient-to-b from-emerald-50 to-emerald-100 border-emerald-300 shadow-emerald-100" : "bg-gradient-to-b from-slate-50 to-slate-100"
1740
+ g.value ? "bg-gradient-to-b from-emerald-50 to-emerald-100 border-emerald-300 shadow-emerald-100" : "bg-gradient-to-b from-slate-50 to-slate-100"
1726
1741
  ]),
1727
- key: "column-" + F,
1728
- id: "col-" + e.sectionSelected + "-" + m + "-" + F
1742
+ key: "column-" + I,
1743
+ id: "col-" + e.sectionSelected + "-" + b + "-" + I
1729
1744
  }, [
1730
- L(G(ie), {
1745
+ q(G(ue), {
1731
1746
  class: "h-full w-full mb-4",
1732
- list: x.components,
1747
+ list: C.components,
1733
1748
  group: { name: "draggingGroup", pull: !0, put: !0 },
1734
1749
  "item-key": "name",
1735
1750
  handle: ".handle",
1736
- onStart: c[0] || (c[0] = (s) => b.value = !0),
1737
- onEnd: c[1] || (c[1] = (s) => b.value = !1)
1751
+ onStart: u[0] || (u[0] = (a) => g.value = !0),
1752
+ onEnd: u[1] || (u[1] = (a) => g.value = !1)
1738
1753
  }, {
1739
- item: se(({ element: s }) => [
1740
- L(de, {
1754
+ item: de(({ element: a }) => [
1755
+ q(ce, {
1741
1756
  renderApiDomain: e.renderApiDomain,
1742
- object: s,
1757
+ object: a,
1743
1758
  "is-component-mode": e.isComponentMode,
1744
1759
  removeComponent: e.removeComponent,
1745
1760
  section: e.sectionSelected,
@@ -1748,7 +1763,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1748
1763
  ]),
1749
1764
  _: 1
1750
1765
  }, 8, ["list"]),
1751
- L(el, {
1766
+ q(tl, {
1752
1767
  section: e.sectionSelected,
1753
1768
  globalPageConfiguration: e.globalPageConfiguration,
1754
1769
  updateColConfig: e.updateColConfig,
@@ -1757,17 +1772,17 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1757
1772
  addCol: e.addCol,
1758
1773
  removeCol: e.removeCol,
1759
1774
  moveCol: e.moveCol,
1760
- rowIndex: m,
1761
- columnIndex: F
1775
+ rowIndex: b,
1776
+ columnIndex: I
1762
1777
  }, null, 8, ["section", "globalPageConfiguration", "updateColConfig", "addComponentFunction", "fullwidthMode", "addCol", "removeCol", "moveCol", "rowIndex", "columnIndex"])
1763
1778
  ], 10, Ml))), 128))
1764
1779
  ])
1765
- ], 8, Pl))), 128));
1780
+ ], 8, jl))), 128));
1766
1781
  }
1767
- }), Al = { class: "flex justify-between items-center mb-4" }, Tl = { class: "text-xs" }, Bl = { class: "flex flex-wrap gap-2 mb-4 bg-white border border-slate-200 p-4 rounded-xl shadow-sm" }, El = ["value", "checked"], Dl = { class: "my-3" }, Ol = { class: "relative" }, Rl = { class: "component-library dragging-zone w-full p-5 min-h-[200px] border border-slate-200 bg-white rounded-xl flex flex-col gap-4 items-center shadow-sm" }, Nl = {
1782
+ }), Bl = { class: "flex justify-between items-center mb-4" }, El = { class: "text-xs" }, Tl = { class: "flex flex-wrap gap-2 mb-4 bg-white border border-slate-200 p-4 rounded-xl shadow-sm" }, Dl = ["value", "checked"], Ol = { class: "my-3" }, Nl = { class: "relative" }, Rl = { class: "component-library dragging-zone w-full p-5 min-h-[200px] border border-slate-200 bg-white rounded-xl flex flex-col gap-4 items-center shadow-sm" }, Vl = {
1768
1783
  key: 0,
1769
1784
  class: "text-center py-8 text-slate-400"
1770
- }, ne = /* @__PURE__ */ H({
1785
+ }, re = /* @__PURE__ */ H({
1771
1786
  __name: "ComponentsBox",
1772
1787
  props: {
1773
1788
  isComponentMode: Boolean,
@@ -1794,25 +1809,25 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1794
1809
  "Formulario",
1795
1810
  "Título",
1796
1811
  "SEO"
1797
- ], b = $(!0), p = $([]), f = $(""), c = $(fe()), d = X(() => {
1798
- const F = f.value.toLowerCase(), s = Object.values(c.value), l = (n) => (n.name.toLowerCase() + n.description.toLowerCase() + n.tags.join(" ").toLowerCase()).includes(F);
1799
- return p.value.length > 0 ? s.filter(
1800
- (n) => p.value.includes(n.category) && l(n)
1801
- ) : s.filter(l);
1802
- }), m = (F) => {
1803
- f.value = F.target.value;
1804
- }, x = (F) => {
1805
- const s = F.target, l = s.value;
1806
- s.checked ? p.value.includes(l) || p.value.push(l) : p.value = p.value.filter((n) => n !== l);
1812
+ ], g = S(!0), x = S([]), f = S(""), u = S(ve()), r = Q(() => {
1813
+ const I = f.value.toLowerCase(), a = Object.values(u.value), l = (n) => (n.name.toLowerCase() + n.description.toLowerCase() + n.tags.join(" ").toLowerCase()).includes(I);
1814
+ return x.value.length > 0 ? a.filter(
1815
+ (n) => x.value.includes(n.category) && l(n)
1816
+ ) : a.filter(l);
1817
+ }), b = (I) => {
1818
+ f.value = I.target.value;
1819
+ }, C = (I) => {
1820
+ const a = I.target, l = a.value;
1821
+ a.checked ? x.value.includes(l) || x.value.push(l) : x.value = x.value.filter((n) => n !== l);
1807
1822
  };
1808
- return (F, s) => (r(), i(A, null, [
1809
- s[6] || (s[6] = t("h1", { class: "text-center text-2xl font-semibold mb-4 text-slate-700 tracking-tight" }, "Componentes", -1)),
1810
- t("div", Al, [
1823
+ return (I, a) => (s(), i(B, null, [
1824
+ a[6] || (a[6] = t("h1", { class: "text-center text-2xl font-semibold mb-4 text-slate-700 tracking-tight" }, "Componentes", -1)),
1825
+ t("div", Bl, [
1811
1826
  t("button", {
1812
- onClick: s[0] || (s[0] = (l) => b.value = !b.value),
1827
+ onClick: a[0] || (a[0] = (l) => g.value = !g.value),
1813
1828
  class: "mb-3 px-4 py-2 bg-white rounded-lg border border-slate-200 hover:border-slate-300 hover:shadow-sm transition-all duration-200 cursor-pointer text-slate-600 font-medium flex items-center gap-2"
1814
1829
  }, [
1815
- s[2] || (s[2] = t("svg", {
1830
+ a[2] || (a[2] = t("svg", {
1816
1831
  class: "w-4 h-4",
1817
1832
  fill: "none",
1818
1833
  stroke: "currentColor",
@@ -1825,37 +1840,37 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1825
1840
  d: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
1826
1841
  })
1827
1842
  ], -1)),
1828
- s[3] || (s[3] = t("span", null, "Filtros", -1)),
1829
- t("span", Tl, v(b.value ? "▲" : "▼"), 1)
1843
+ a[3] || (a[3] = t("span", null, "Filtros", -1)),
1844
+ t("span", El, v(g.value ? "▲" : "▼"), 1)
1830
1845
  ]),
1831
1846
  t("button", {
1832
- class: q([[e.isComponentMode ? "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md" : "bg-white hover:bg-slate-100"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
1833
- onClick: s[1] || (s[1] = (l) => {
1847
+ class: L([[e.isComponentMode ? "bg-gradient-to-r from-slate-600 to-slate-700 border-slate-700 text-white shadow-md" : "bg-white hover:bg-slate-100"], "cursor-pointer border border-slate-200 rounded-lg py-1.5 px-3 text-sm font-medium transition-all duration-200"]),
1848
+ onClick: a[1] || (a[1] = (l) => {
1834
1849
  var n;
1835
1850
  return (n = e.toggleComponentModeFunction) == null ? void 0 : n.call(e);
1836
1851
  })
1837
1852
  }, v(e.isComponentMode ? "⚒️ Modo Configuración" : "👁️ Modo Visual"), 3)
1838
1853
  ]),
1839
- R(t("div", Bl, [
1840
- (r(), i(A, null, N(o, (l) => t("label", {
1854
+ N(t("div", Tl, [
1855
+ (s(), i(B, null, V(o, (l) => t("label", {
1841
1856
  key: l,
1842
- class: q(["flex items-center gap-2 text-xs bg-slate-50 hover:bg-slate-100 px-3 py-2 rounded-lg cursor-pointer transition-colors duration-200 border border-transparent hover:border-slate-200", { "bg-emerald-50 border-emerald-200 text-emerald-700": p.value.includes(l) }])
1857
+ class: L(["flex items-center gap-2 text-xs bg-slate-50 hover:bg-slate-100 px-3 py-2 rounded-lg cursor-pointer transition-colors duration-200 border border-transparent hover:border-slate-200", { "bg-emerald-50 border-emerald-200 text-emerald-700": x.value.includes(l) }])
1843
1858
  }, [
1844
1859
  t("input", {
1845
1860
  type: "checkbox",
1846
1861
  value: l,
1847
- checked: p.value.includes(l),
1848
- onInput: x,
1862
+ checked: x.value.includes(l),
1863
+ onInput: C,
1849
1864
  class: "w-4 h-4 rounded border-slate-300 text-emerald-500 focus:ring-emerald-500"
1850
- }, null, 40, El),
1851
- E(" " + v(l), 1)
1865
+ }, null, 40, Dl),
1866
+ T(" " + v(l), 1)
1852
1867
  ], 2)), 64))
1853
1868
  ], 512), [
1854
- [be, b.value]
1869
+ [ge, g.value]
1855
1870
  ]),
1856
- t("div", Dl, [
1857
- t("div", Ol, [
1858
- s[4] || (s[4] = t("svg", {
1871
+ t("div", Ol, [
1872
+ t("div", Nl, [
1873
+ a[4] || (a[4] = t("svg", {
1859
1874
  class: "absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400",
1860
1875
  fill: "none",
1861
1876
  stroke: "currentColor",
@@ -1869,7 +1884,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1869
1884
  })
1870
1885
  ], -1)),
1871
1886
  t("input", {
1872
- onInput: m,
1887
+ onInput: b,
1873
1888
  type: "text",
1874
1889
  placeholder: "Buscar componente...",
1875
1890
  class: "duration-300 border border-slate-200 bg-white rounded-xl py-3 px-4 pl-11 w-full focus:outline-none focus:ring-2 focus:ring-emerald-500/20 focus:border-emerald-400 hover:border-slate-300 shadow-sm"
@@ -1877,15 +1892,15 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1877
1892
  ])
1878
1893
  ]),
1879
1894
  t("div", Rl, [
1880
- L(G(ie), {
1895
+ q(G(ue), {
1881
1896
  class: "w-full flex flex-col gap-4",
1882
- list: d.value,
1897
+ list: r.value,
1883
1898
  group: { name: "draggingGroup", pull: "clone", put: !1 },
1884
1899
  itemKey: "name",
1885
1900
  clone: (l) => JSON.parse(JSON.stringify(l))
1886
1901
  }, {
1887
- item: se(({ element: l }) => [
1888
- L(de, {
1902
+ item: de(({ element: l }) => [
1903
+ q(ce, {
1889
1904
  renderApiDomain: e.renderApiDomain,
1890
1905
  object: l,
1891
1906
  "is-component-mode": e.isComponentMode,
@@ -1898,7 +1913,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1898
1913
  ]),
1899
1914
  _: 1
1900
1915
  }, 8, ["list", "clone"]),
1901
- d.value.length === 0 ? (r(), i("div", Nl, [...s[5] || (s[5] = [
1916
+ r.value.length === 0 ? (s(), i("div", Vl, [...a[5] || (a[5] = [
1902
1917
  t("svg", {
1903
1918
  class: "w-12 h-12 mx-auto mb-3 opacity-50",
1904
1919
  fill: "none",
@@ -1914,21 +1929,21 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1914
1929
  ], -1),
1915
1930
  t("p", { class: "text-sm font-medium" }, "No se encontraron componentes", -1),
1916
1931
  t("p", { class: "text-xs mt-1" }, "Intenta con otros filtros o términos de búsqueda", -1)
1917
- ])])) : k("", !0)
1932
+ ])])) : F("", !0)
1918
1933
  ])
1919
1934
  ], 64));
1920
1935
  }
1921
- }), Vl = { class: "flex flex-col w-full transition-all duration-300 lf-page-builder bg-gradient-to-br from-slate-50 to-slate-100 min-h-screen" }, Ul = { class: "relative flex flex-row flex-wrap" }, zl = { class: "w-full flex justify-end py-4 pe-4" }, Ll = { class: "w-3/4" }, ql = {
1936
+ }), Ul = { class: "flex flex-col w-full transition-all duration-300 lf-page-builder bg-gradient-to-br from-slate-50 to-slate-100 min-h-screen" }, zl = { class: "relative flex flex-row flex-wrap" }, ql = { class: "w-full flex justify-end py-4 pe-4" }, Ll = { class: "w-3/4" }, Gl = {
1922
1937
  key: 1,
1923
1938
  class: "w-1/4 px-3 overflow-y-auto h-screen sticky top-0"
1924
1939
  }, Ql = /* @__PURE__ */ H({
1925
1940
  __name: "Pagebuilder",
1926
1941
  props: {
1927
- renderApiDomain: {},
1928
- isProduction: { type: Boolean }
1942
+ isProduction: { type: Boolean },
1943
+ inputId: {}
1929
1944
  },
1930
1945
  setup(e) {
1931
- const o = e, b = o.renderApiDomain, p = o.isProduction ?? !1, f = $(!0), c = $(void 0), d = $([]), m = $({ rowIndex: null, columnIndex: null, section: null }), x = $(!1), F = $(!1), s = $({
1946
+ const o = e, g = o.isProduction ?? !1, x = o.inputId ?? null, f = g ? "https://render-api.lefebvre.es" : "https://led-dev-astro-render-api-dev.eu.els.local", u = S(!0), r = S(void 0), b = S([]), C = S({ rowIndex: null, columnIndex: null, section: null }), I = S(!1), a = S(!1), l = S({
1932
1947
  global: {
1933
1948
  sidebarEnabled: !1,
1934
1949
  headSlot: "",
@@ -1940,7 +1955,7 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1940
1955
  description: "",
1941
1956
  robots: "index, follow"
1942
1957
  }
1943
- }), l = ge([
1958
+ }), n = fe([
1944
1959
  {
1945
1960
  section: "Header",
1946
1961
  config: { width: "full" },
@@ -1962,174 +1977,187 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
1962
1977
  rows: [{ config: {}, columns: [{ config: {}, components: [] }] }]
1963
1978
  }
1964
1979
  ]);
1965
- te(() => {
1966
- n();
1980
+ oe(() => {
1981
+ m();
1967
1982
  });
1968
- const n = () => {
1969
- d.value = ["Header", "Footer", "Body", "Sidebar"], c.value = "Body";
1970
- }, g = () => {
1971
- F.value = !F.value;
1972
- }, S = () => {
1973
- f.value = !f.value;
1974
- }, D = (w, y, C, P, M) => {
1983
+ const m = () => {
1984
+ if (b.value = ["Header", "Footer", "Body", "Sidebar"], r.value = "Body", x) {
1985
+ const y = document.getElementById(x);
1986
+ if (y) {
1987
+ const h = y.value;
1988
+ if (h)
1989
+ try {
1990
+ const p = typeof h == "string" ? JSON.parse(h) : h;
1991
+ (p && typeof p == "object" && !Array.isArray(p) ? Object.keys(p).length > 0 : Array.isArray(p) ? p.length > 0 : !1) && ne(h);
1992
+ } catch (p) {
1993
+ console.error("Error parsing input value:", p);
1994
+ }
1995
+ }
1996
+ }
1997
+ }, k = () => {
1998
+ a.value = !a.value;
1999
+ }, A = () => {
2000
+ u.value = !u.value;
2001
+ }, w = (y, h, p, P, M) => {
1975
2002
  var O;
1976
- const B = l.find((V) => V.section === y);
1977
- (O = B == null ? void 0 : B.rows) != null && O[w] && (B.rows[w].config = {
1978
- padding: C,
2003
+ const E = n.find((U) => U.section === h);
2004
+ (O = E == null ? void 0 : E.rows) != null && O[y] && (E.rows[y].config = {
2005
+ padding: p,
1979
2006
  gap: P,
1980
2007
  width: M
1981
2008
  });
1982
- }, T = (w, y, C, P, M, B) => {
1983
- var V, U, W;
1984
- const O = l.find((Y) => Y.section === C);
1985
- (W = (U = (V = O == null ? void 0 : O.rows) == null ? void 0 : V[w]) == null ? void 0 : U.columns) != null && W[y] && (O.rows[w].columns[y].config = {
2009
+ }, d = (y, h, p, P, M, E) => {
2010
+ var U, z, W;
2011
+ const O = n.find((X) => X.section === p);
2012
+ (W = (z = (U = O == null ? void 0 : O.rows) == null ? void 0 : U[y]) == null ? void 0 : z.columns) != null && W[h] && (O.rows[y].columns[h].config = {
1986
2013
  width: P,
1987
2014
  gap: M,
1988
- flexDirection: B
2015
+ flexDirection: E
1989
2016
  });
1990
- }, a = async (w, y) => {
1991
- const C = l.find((P) => P.section === y);
1992
- if (C) {
2017
+ }, c = async (y, h) => {
2018
+ const p = n.find((P) => P.section === h);
2019
+ if (p) {
1993
2020
  const P = {
1994
2021
  config: {},
1995
2022
  columns: [{ config: {}, components: [] }]
1996
2023
  };
1997
- w !== null && w >= 0 && w < C.rows.length ? C.rows.splice(w + 1, 0, P) : C.rows.push(P);
2024
+ y !== null && y >= 0 && y < p.rows.length ? p.rows.splice(y + 1, 0, P) : p.rows.push(P);
1998
2025
  }
1999
2026
  await new Promise((P) => {
2000
2027
  setTimeout(() => {
2001
- const M = document.getElementById(`row-${y}-${(w ?? 0) + 1}`);
2028
+ const M = document.getElementById(`row-${h}-${(y ?? 0) + 1}`);
2002
2029
  M ? (M.scrollIntoView({ behavior: "smooth", block: "center" }), M.classList.add("selected-delay"), setTimeout(() => {
2003
2030
  M.classList.remove("selected-delay"), P();
2004
2031
  }, 3e3)) : P();
2005
2032
  }, 0);
2006
2033
  });
2007
- }, u = (w, y) => {
2008
- const C = l.find((P) => P.section === y);
2009
- !(C != null && C.rows) || C.rows.length <= 1 || C.rows.splice(w, 1);
2010
- }, h = (w, y, C = "down") => {
2011
- var V;
2012
- const P = l.find((U) => U.section === y);
2013
- if (!((V = P == null ? void 0 : P.rows) != null && V[w]) || C === "up" && w === 0 || C === "down" && w === P.rows.length - 1)
2034
+ }, $ = (y, h) => {
2035
+ const p = n.find((P) => P.section === h);
2036
+ !(p != null && p.rows) || p.rows.length <= 1 || p.rows.splice(y, 1);
2037
+ }, j = (y, h, p = "down") => {
2038
+ var U;
2039
+ const P = n.find((z) => z.section === h);
2040
+ if (!((U = P == null ? void 0 : P.rows) != null && U[y]) || p === "up" && y === 0 || p === "down" && y === P.rows.length - 1)
2014
2041
  return;
2015
- const M = P.rows, B = M.splice(w, 1)[0], O = C === "down" ? w + 1 : w - 1;
2016
- M.splice(O, 0, B);
2017
- }, j = async (w, y, C, P = "right") => {
2042
+ const M = P.rows, E = M.splice(y, 1)[0], O = p === "down" ? y + 1 : y - 1;
2043
+ M.splice(O, 0, E);
2044
+ }, D = async (y, h, p, P = "right") => {
2018
2045
  var O;
2019
- const M = P === "left" ? y : y + 1, B = l.find((V) => V.section === C);
2020
- (O = B == null ? void 0 : B.rows) != null && O[w] && B.rows[w].columns.splice(M, 0, {
2046
+ const M = P === "left" ? h : h + 1, E = n.find((U) => U.section === p);
2047
+ (O = E == null ? void 0 : E.rows) != null && O[y] && E.rows[y].columns.splice(M, 0, {
2021
2048
  config: {},
2022
2049
  components: []
2023
- }), await new Promise((V) => {
2050
+ }), await new Promise((U) => {
2024
2051
  setTimeout(() => {
2025
- const U = document.getElementById(`col-${C}-${w}-${M}`);
2026
- U ? (U.scrollIntoView({ behavior: "smooth", block: "center" }), U.classList.add("selected-delay"), setTimeout(() => {
2027
- U.classList.remove("selected-delay"), V();
2028
- }, 3e3)) : V();
2052
+ const z = document.getElementById(`col-${p}-${y}-${M}`);
2053
+ z ? (z.scrollIntoView({ behavior: "smooth", block: "center" }), z.classList.add("selected-delay"), setTimeout(() => {
2054
+ z.classList.remove("selected-delay"), U();
2055
+ }, 3e3)) : U();
2029
2056
  }, 0);
2030
2057
  });
2031
- }, I = (w, y, C) => {
2032
- var B, O;
2033
- const P = l.find((V) => V.section === C), M = (O = (B = P == null ? void 0 : P.rows) == null ? void 0 : B[w]) == null ? void 0 : O.columns;
2034
- !M || M.length <= 1 || M.splice(y, 1);
2035
- }, z = (w, y, C, P = "right") => {
2036
- var U;
2037
- const M = l.find((W) => W.section === C);
2038
- if (!((U = M == null ? void 0 : M.rows) != null && U[w]) || P === "left" && y === 0 || P === "right" && y === M.rows[w].columns.length - 1)
2058
+ }, R = (y, h, p) => {
2059
+ var E, O;
2060
+ const P = n.find((U) => U.section === p), M = (O = (E = P == null ? void 0 : P.rows) == null ? void 0 : E[y]) == null ? void 0 : O.columns;
2061
+ !M || M.length <= 1 || M.splice(h, 1);
2062
+ }, Y = (y, h, p, P = "right") => {
2063
+ var z;
2064
+ const M = n.find((W) => W.section === p);
2065
+ if (!((z = M == null ? void 0 : M.rows) != null && z[y]) || P === "left" && h === 0 || P === "right" && h === M.rows[y].columns.length - 1)
2039
2066
  return;
2040
- const B = M.rows[w].columns, O = B.splice(y, 1)[0], V = P === "right" ? y + 1 : y - 1;
2041
- B.splice(V, 0, O);
2042
- }, Z = (w, y) => {
2067
+ const E = M.rows[y].columns, O = E.splice(h, 1)[0], U = P === "right" ? h + 1 : h - 1;
2068
+ E.splice(U, 0, O);
2069
+ }, Z = (y, h) => {
2043
2070
  var P;
2044
- const C = l.find((M) => M.section === y);
2045
- (P = C == null ? void 0 : C.rows) == null || P.forEach((M) => {
2046
- M.columns.forEach((B) => {
2047
- const O = B.components.indexOf(w);
2048
- O !== -1 && B.components.splice(O, 1);
2071
+ const p = n.find((M) => M.section === h);
2072
+ (P = p == null ? void 0 : p.rows) == null || P.forEach((M) => {
2073
+ M.columns.forEach((E) => {
2074
+ const O = E.components.indexOf(y);
2075
+ O !== -1 && E.components.splice(O, 1);
2049
2076
  });
2050
2077
  });
2051
- }, K = (w, y, C) => {
2052
- x.value = !0, m.value = { rowIndex: w, columnIndex: y, section: C };
2053
- }, oe = (w) => {
2054
- var M, B, O, V;
2055
- const { rowIndex: y, columnIndex: C, section: P } = m.value;
2056
- if (y !== null && C !== null) {
2057
- const U = JSON.parse(JSON.stringify(w)), W = l.find((ce) => ce.section === P), Y = (V = (O = (B = (M = W == null ? void 0 : W.rows) == null ? void 0 : M[y]) == null ? void 0 : B.columns) == null ? void 0 : O[C]) == null ? void 0 : V.components;
2058
- Y == null || Y.push(U);
2078
+ }, _ = (y, h, p) => {
2079
+ I.value = !0, C.value = { rowIndex: y, columnIndex: h, section: p };
2080
+ }, le = (y) => {
2081
+ var M, E, O, U;
2082
+ const { rowIndex: h, columnIndex: p, section: P } = C.value;
2083
+ if (h !== null && p !== null) {
2084
+ const z = JSON.parse(JSON.stringify(y)), W = n.find((me) => me.section === P), X = (U = (O = (E = (M = W == null ? void 0 : W.rows) == null ? void 0 : M[h]) == null ? void 0 : E.columns) == null ? void 0 : O[p]) == null ? void 0 : U.components;
2085
+ X == null || X.push(z);
2059
2086
  }
2060
- x.value = !1;
2061
- }, ue = (w) => {
2062
- const y = typeof w == "string" ? JSON.parse(w) : w;
2063
- l.length = 0, l.push(...y.pageConfig || []), y.paramsConfig && (s.value = { ...s.value, ...y.paramsConfig });
2087
+ I.value = !1;
2088
+ }, ne = (y) => {
2089
+ const h = typeof y == "string" ? JSON.parse(y) : y;
2090
+ n.length = 0, n.push(...h.pageConfig || []), h.paramsConfig && (l.value = { ...l.value, ...h.paramsConfig });
2064
2091
  };
2065
- return (w, y) => (r(), i("div", Vl, [
2066
- L(et, {
2067
- sectionSelected: c.value,
2068
- "onUpdate:sectionSelected": y[0] || (y[0] = (C) => c.value = C),
2069
- parametersPageConfiguration: s.value,
2070
- "onUpdate:parametersPageConfiguration": y[1] || (y[1] = (C) => s.value = C),
2071
- globalPageConfiguration: l,
2072
- availableSections: d.value,
2073
- importConfigurationFunction: ue,
2074
- isComponentMode: F.value,
2075
- toggleComponentModeFunction: g,
2076
- fullwidthMode: f.value,
2077
- toggleFullwidthMode: S,
2078
- renderApiDomain: G(b)
2079
- }, null, 8, ["sectionSelected", "parametersPageConfiguration", "globalPageConfiguration", "availableSections", "isComponentMode", "fullwidthMode", "renderApiDomain"]),
2080
- t("div", Ul, [
2081
- f.value ? (r(), i("div", {
2092
+ return (y, h) => (s(), i("div", Ul, [
2093
+ q(tt, {
2094
+ sectionSelected: r.value,
2095
+ "onUpdate:sectionSelected": h[0] || (h[0] = (p) => r.value = p),
2096
+ parametersPageConfiguration: l.value,
2097
+ "onUpdate:parametersPageConfiguration": h[1] || (h[1] = (p) => l.value = p),
2098
+ globalPageConfiguration: n,
2099
+ availableSections: b.value,
2100
+ importConfigurationFunction: ne,
2101
+ isComponentMode: a.value,
2102
+ toggleComponentModeFunction: k,
2103
+ fullwidthMode: u.value,
2104
+ toggleFullwidthMode: A,
2105
+ renderApiDomain: G(f),
2106
+ inputId: G(x)
2107
+ }, null, 8, ["sectionSelected", "parametersPageConfiguration", "globalPageConfiguration", "availableSections", "isComponentMode", "fullwidthMode", "renderApiDomain", "inputId"]),
2108
+ t("div", zl, [
2109
+ u.value ? (s(), i("div", {
2082
2110
  key: 0,
2083
- class: q(["w-full overflow-y-auto fixed top-0 left-0 h-full bg-gradient-to-br from-slate-100 via-white to-slate-50 z-9999 px-4 flex justify-start flex flex-col items-center backdrop-blur-sm", x.value ? "" : "hidden"])
2111
+ class: L(["w-full overflow-y-auto fixed top-0 left-0 h-full bg-gradient-to-br from-slate-100 via-white to-slate-50 z-9999 px-4 flex justify-start flex flex-col items-center backdrop-blur-sm", I.value ? "" : "hidden"])
2084
2112
  }, [
2085
- t("div", zl, [
2113
+ t("div", ql, [
2086
2114
  t("div", {
2087
2115
  class: "cursor-pointer w-10 h-10 flex items-center justify-center rounded-full bg-white shadow-md hover:shadow-lg hover:bg-red-50 text-slate-400 hover:text-red-500 transition-all duration-200 text-xl font-light",
2088
- onClick: y[2] || (y[2] = (C) => x.value = !1)
2116
+ onClick: h[2] || (h[2] = (p) => I.value = !1)
2089
2117
  }, "✕")
2090
2118
  ]),
2091
2119
  t("div", Ll, [
2092
- L(ne, {
2093
- renderApiDomain: G(b),
2094
- isComponentMode: F.value,
2095
- fullwidthMode: f.value,
2096
- columnToInsert: m.value,
2097
- addComponentToColumn: oe,
2098
- toggleComponentModeFunction: g,
2099
- isProduction: G(p)
2120
+ q(re, {
2121
+ renderApiDomain: G(f),
2122
+ isComponentMode: a.value,
2123
+ fullwidthMode: u.value,
2124
+ columnToInsert: C.value,
2125
+ addComponentToColumn: le,
2126
+ toggleComponentModeFunction: k,
2127
+ isProduction: G(g)
2100
2128
  }, null, 8, ["renderApiDomain", "isComponentMode", "fullwidthMode", "columnToInsert", "isProduction"])
2101
2129
  ])
2102
- ], 2)) : (r(), i("div", ql, [
2103
- L(ne, {
2104
- renderApiDomain: G(b),
2105
- isComponentMode: F.value,
2106
- fullwidthMode: f.value,
2107
- columnToInsert: m.value,
2108
- addComponentToColumn: oe,
2109
- toggleComponentModeFunction: g,
2110
- isProduction: G(p)
2130
+ ], 2)) : (s(), i("div", Gl, [
2131
+ q(re, {
2132
+ renderApiDomain: G(f),
2133
+ isComponentMode: a.value,
2134
+ fullwidthMode: u.value,
2135
+ columnToInsert: C.value,
2136
+ addComponentToColumn: le,
2137
+ toggleComponentModeFunction: k,
2138
+ isProduction: G(g)
2111
2139
  }, null, 8, ["renderApiDomain", "isComponentMode", "fullwidthMode", "columnToInsert", "isProduction"])
2112
2140
  ])),
2113
2141
  t("div", {
2114
- class: q([f.value ? "w-full px-4" : "w-3/4 ps-3", "flex flex-col gap-5"])
2142
+ class: L([u.value ? "w-full px-4" : "w-3/4 ps-3", "flex flex-col gap-5"])
2115
2143
  }, [
2116
- L(Il, {
2117
- globalPageConfiguration: l,
2118
- isComponentMode: F.value,
2144
+ q(Al, {
2145
+ globalPageConfiguration: n,
2146
+ isComponentMode: a.value,
2119
2147
  removeComponent: Z,
2120
- addComponentFunction: K,
2121
- fullwidthMode: f.value,
2122
- addCol: j,
2123
- addRow: a,
2124
- removeRow: u,
2125
- removeCol: I,
2126
- moveCol: z,
2127
- updateRowConfig: D,
2128
- updateColConfig: T,
2129
- moveRow: h,
2130
- sectionSelected: c.value,
2131
- renderApiDomain: G(b),
2132
- isProduction: G(p)
2148
+ addComponentFunction: _,
2149
+ fullwidthMode: u.value,
2150
+ addCol: D,
2151
+ addRow: c,
2152
+ removeRow: $,
2153
+ removeCol: R,
2154
+ moveCol: Y,
2155
+ updateRowConfig: w,
2156
+ updateColConfig: d,
2157
+ moveRow: j,
2158
+ sectionSelected: r.value,
2159
+ renderApiDomain: G(f),
2160
+ isProduction: G(g)
2133
2161
  }, null, 8, ["globalPageConfiguration", "isComponentMode", "fullwidthMode", "sectionSelected", "renderApiDomain", "isProduction"])
2134
2162
  ], 2)
2135
2163
  ])
@@ -2137,15 +2165,15 @@ const et = /* @__PURE__ */ xe(pe, [["render", _e]]), tt = {
2137
2165
  }
2138
2166
  });
2139
2167
  export {
2140
- Il as BodySection,
2141
- el as ColConfig,
2142
- ne as ComponentsBox,
2143
- ro as FeedComponent,
2144
- le as FieldsForm,
2145
- et as GlobalConfig,
2146
- de as InitialComponent,
2168
+ Al as BodySection,
2169
+ tl as ColConfig,
2170
+ re as ComponentsBox,
2171
+ so as FeedComponent,
2172
+ ae as FieldsForm,
2173
+ tt as GlobalConfig,
2174
+ ce as InitialComponent,
2147
2175
  Ql as Pagebuilder,
2148
- Fl as RowConfig,
2149
- $t as SourceFilter,
2176
+ Pl as RowConfig,
2177
+ kt as SourceFilter,
2150
2178
  Ql as default
2151
2179
  };