builder-settings-types 0.0.224 → 0.0.227

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.
@@ -1,29 +1,131 @@
1
- const H = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2
- let O = (h = 21) => {
3
- let t = "", e = crypto.getRandomValues(new Uint8Array(h |= 0));
4
- for (; h--; )
5
- t += H[e[h] & 63];
1
+ const T = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
2
+ let N = (c = 21) => {
3
+ let t = "", e = crypto.getRandomValues(new Uint8Array(c |= 0));
4
+ for (; c--; )
5
+ t += T[e[c] & 63];
6
6
  return t;
7
7
  };
8
- function k(h) {
9
- if (h === null || typeof h != "object")
10
- return h;
11
- if (h instanceof Date)
12
- return new Date(h.getTime());
13
- if (Array.isArray(h)) {
14
- const i = [];
15
- for (let s = 0; s < h.length; s++)
16
- i[s] = k(h[s]);
17
- return i;
8
+ function A(c) {
9
+ let t = 0, e = c.parentElement;
10
+ for (; e; )
11
+ e.classList.contains("setting-group") && e !== c && t++, e = e.parentElement;
12
+ return t;
13
+ }
14
+ function b(c, t) {
15
+ const e = Math.min(Math.max(t, 0), 5);
16
+ c.setAttribute("data-nesting-level", e.toString()), e > 0 ? c.style.setProperty("--visual-indent", `${e * 2}px`) : (c.style.removeProperty("--visual-indent"), c.style.marginLeft = "");
17
+ }
18
+ function V(c, t = 0) {
19
+ c.querySelectorAll(":scope > .setting-group-content > .setting-group").forEach((i) => {
20
+ const s = i, n = t + 1;
21
+ b(s, n), V(s, n);
22
+ });
23
+ }
24
+ const B = {
25
+ maxLevel: 5,
26
+ spacingMultiplier: 1,
27
+ visualIndentMultiplier: 2,
28
+ enableAutoDetection: !0
29
+ };
30
+ class $ {
31
+ constructor(t = {}) {
32
+ this.observedElements = /* @__PURE__ */ new Set(), this.config = { ...B, ...t }, this.config.enableAutoDetection && this.setupAutoDetection();
33
+ }
34
+ /**
35
+ * Setup automatic detection using MutationObserver
36
+ */
37
+ setupAutoDetection() {
38
+ this.observer = new MutationObserver((t) => {
39
+ let e = !1;
40
+ t.forEach((i) => {
41
+ i.type === "childList" && i.addedNodes.forEach((s) => {
42
+ s instanceof HTMLElement && (s.classList.contains("setting-group") ? [s] : Array.from(s.querySelectorAll(".setting-group"))).length > 0 && (e = !0);
43
+ });
44
+ }), e && this.updateAllNesting();
45
+ }), this.observer.observe(document.body, {
46
+ childList: !0,
47
+ subtree: !0
48
+ });
49
+ }
50
+ /**
51
+ * Add element to be tracked for nesting updates
52
+ */
53
+ trackElement(t) {
54
+ this.observedElements.add(t), this.updateElementNesting(t);
55
+ }
56
+ /**
57
+ * Remove element from tracking
58
+ */
59
+ untrackElement(t) {
60
+ this.observedElements.delete(t);
61
+ }
62
+ /**
63
+ * Update nesting for a specific element
64
+ */
65
+ updateElementNesting(t) {
66
+ const e = A(t);
67
+ this.applyNestingWithConfig(t, e);
68
+ }
69
+ /**
70
+ * Update nesting for all tracked elements
71
+ */
72
+ updateAllNesting() {
73
+ this.observedElements.forEach((t) => {
74
+ t.isConnected ? this.updateElementNesting(t) : this.observedElements.delete(t);
75
+ });
76
+ }
77
+ /**
78
+ * Apply nesting with configuration
79
+ */
80
+ applyNestingWithConfig(t, e) {
81
+ const i = Math.min(Math.max(e, 0), this.config.maxLevel);
82
+ if (t.setAttribute("data-nesting-level", i.toString()), i > 0) {
83
+ const s = i * this.config.visualIndentMultiplier;
84
+ t.style.setProperty("--visual-indent", `${s}px`);
85
+ } else
86
+ t.style.removeProperty("--visual-indent"), t.style.marginLeft = "";
87
+ }
88
+ /**
89
+ * Force recalculate all nesting in a container
90
+ */
91
+ recalculateNesting(t = document.body) {
92
+ t.querySelectorAll(".setting-group").forEach((i) => {
93
+ const s = i;
94
+ this.updateElementNesting(s), this.trackElement(s);
95
+ });
18
96
  }
19
- const t = {};
20
- for (const i in h)
21
- Object.prototype.hasOwnProperty.call(h, i) && (t[i] = k(h[i]));
22
- const e = Object.getPrototypeOf(h);
23
- return e !== Object.prototype && Object.setPrototypeOf(t, e), t;
97
+ /**
98
+ * Get nesting statistics for debugging
99
+ */
100
+ getNestingStats() {
101
+ const t = {};
102
+ return this.observedElements.forEach((e) => {
103
+ const i = parseInt(e.getAttribute("data-nesting-level") || "0", 10);
104
+ t[i] = (t[i] || 0) + 1;
105
+ }), t;
106
+ }
107
+ /**
108
+ * Cleanup observer and tracked elements
109
+ */
110
+ destroy() {
111
+ this.observer && (this.observer.disconnect(), this.observer = void 0), this.observedElements.clear();
112
+ }
113
+ }
114
+ const S = new $();
115
+ function x(c) {
116
+ if (c === null || typeof c != "object") return c;
117
+ if (c instanceof Date) return new Date(c.getTime());
118
+ if (c instanceof Array) return c.map((t) => x(t));
119
+ if (typeof c == "object") {
120
+ const t = {};
121
+ for (const e in c)
122
+ Object.prototype.hasOwnProperty.call(c, e) && (t[e] = x(c[e]));
123
+ return t;
124
+ }
125
+ return c;
24
126
  }
25
- function T(h) {
26
- switch (h) {
127
+ function R(c) {
128
+ switch (c) {
27
129
  case "number":
28
130
  return 0;
29
131
  case "text":
@@ -42,10 +144,10 @@ function T(h) {
42
144
  }
43
145
  class g {
44
146
  constructor(t = {}) {
45
- this.props = t, this.id = t.id || O(), this.value = this.props.default, this.desktop = this.props.default, this.title = t.title || "", this.includeGetJson = t.includeGetJson !== void 0 ? t.includeGetJson : !0;
147
+ this.props = t, this.id = t.id || N(), this.value = this.props.default, this.desktop = this.props.default, this.title = t.title || "", this.includeGetJson = t.includeGetJson !== void 0 ? t.includeGetJson : !0;
46
148
  }
47
149
  static SetUploadUrl(t) {
48
- window.DefaultUploadUrl = t, g.DefaultUploadUrl = t;
150
+ globalThis.DefaultUploadUrl = t, g.DefaultUploadUrl = t;
49
151
  }
50
152
  destroy() {
51
153
  throw new Error("Method not implemented.");
@@ -60,8 +162,8 @@ class g {
60
162
  this.value = t, this.inputEl && (this.inputEl.value = String(t)), this.onChange && this.onChange(t), this.props.detectChange && this.props.detectChange(t);
61
163
  }
62
164
  clone() {
63
- const t = this.constructor, e = k(this.props), i = new t(e);
64
- return i.value = k(this.value), i;
165
+ const t = this.constructor, e = x(this.props), i = new t(e);
166
+ return i.value = x(this.value), i;
65
167
  }
66
168
  createInput(t) {
67
169
  t = { ...this.props.inputProps, ...t };
@@ -81,7 +183,7 @@ class g {
81
183
  const i = document.createElement("div");
82
184
  i.className = t.wrapperClassName || "";
83
185
  const s = document.createElement("input");
84
- this.inputEl = s, s.value = String(t.value || T(t.inputType)), s.type = t.inputType, s.placeholder = t.placeholder || "", s.className = t.inputClassName || "";
186
+ this.inputEl = s, s.value = String(t.value || R(t.inputType)), s.type = t.inputType, s.placeholder = t.placeholder || "", s.className = t.inputClassName || "";
85
187
  const n = (o) => {
86
188
  const l = o.target;
87
189
  let r = l.value;
@@ -122,129 +224,31 @@ class g {
122
224
  return i.className = "input-icon " + (e || ""), i.innerHTML = t, i;
123
225
  }
124
226
  }
125
- function B(h) {
126
- let t = 0, e = h.parentElement;
127
- for (; e; )
128
- e.classList.contains("setting-group") && e !== h && t++, e = e.parentElement;
129
- return t;
130
- }
131
- function L(h, t) {
132
- const e = Math.min(Math.max(t, 0), 5);
133
- h.setAttribute("data-nesting-level", e.toString()), e > 0 ? h.style.setProperty("--visual-indent", `${e * 2}px`) : (h.style.removeProperty("--visual-indent"), h.style.marginLeft = "");
227
+ function w(c) {
228
+ return c instanceof g;
134
229
  }
135
- function I(h, t = 0) {
136
- h.querySelectorAll(":scope > .setting-group-content > .setting-group").forEach((i) => {
137
- const s = i, n = t + 1;
138
- L(s, n), I(s, n);
139
- });
230
+ function p(c) {
231
+ return c instanceof v;
140
232
  }
141
- const A = {
142
- maxLevel: 5,
143
- spacingMultiplier: 1,
144
- visualIndentMultiplier: 2,
145
- enableAutoDetection: !0
146
- };
147
- class R {
148
- constructor(t = {}) {
149
- this.observedElements = /* @__PURE__ */ new Set(), this.config = { ...A, ...t }, this.config.enableAutoDetection && this.setupAutoDetection();
150
- }
151
- /**
152
- * Setup automatic detection using MutationObserver
153
- */
154
- setupAutoDetection() {
155
- this.observer = new MutationObserver((t) => {
156
- let e = !1;
157
- t.forEach((i) => {
158
- i.type === "childList" && i.addedNodes.forEach((s) => {
159
- s instanceof HTMLElement && (s.classList.contains("setting-group") ? [s] : Array.from(s.querySelectorAll(".setting-group"))).length > 0 && (e = !0);
160
- });
161
- }), e && this.updateAllNesting();
162
- }), this.observer.observe(document.body, {
163
- childList: !0,
164
- subtree: !0
165
- });
166
- }
167
- /**
168
- * Add element to be tracked for nesting updates
169
- */
170
- trackElement(t) {
171
- this.observedElements.add(t), this.updateElementNesting(t);
172
- }
173
- /**
174
- * Remove element from tracking
175
- */
176
- untrackElement(t) {
177
- this.observedElements.delete(t);
178
- }
179
- /**
180
- * Update nesting for a specific element
181
- */
182
- updateElementNesting(t) {
183
- const e = B(t);
184
- this.applyNestingWithConfig(t, e);
185
- }
186
- /**
187
- * Update nesting for all tracked elements
188
- */
189
- updateAllNesting() {
190
- this.observedElements.forEach((t) => {
191
- t.isConnected ? this.updateElementNesting(t) : this.observedElements.delete(t);
192
- });
193
- }
194
- /**
195
- * Apply nesting with configuration
196
- */
197
- applyNestingWithConfig(t, e) {
198
- const i = Math.min(Math.max(e, 0), this.config.maxLevel);
199
- if (t.setAttribute("data-nesting-level", i.toString()), i > 0) {
200
- const s = i * this.config.visualIndentMultiplier;
201
- t.style.setProperty("--visual-indent", `${s}px`);
202
- } else
203
- t.style.removeProperty("--visual-indent"), t.style.marginLeft = "";
204
- }
205
- /**
206
- * Force recalculate all nesting in a container
207
- */
208
- recalculateNesting(t = document.body) {
209
- t.querySelectorAll(".setting-group").forEach((i) => {
210
- const s = i;
211
- this.updateElementNesting(s), this.trackElement(s);
212
- });
213
- }
214
- /**
215
- * Get nesting statistics for debugging
216
- */
217
- getNestingStats() {
218
- const t = {};
219
- return this.observedElements.forEach((e) => {
220
- const i = parseInt(e.getAttribute("data-nesting-level") || "0", 10);
221
- t[i] = (t[i] || 0) + 1;
222
- }), t;
223
- }
224
- /**
225
- * Cleanup observer and tracked elements
226
- */
227
- destroy() {
228
- this.observer && (this.observer.disconnect(), this.observer = void 0), this.observedElements.clear();
229
- }
233
+ function ft(c) {
234
+ return w(c) || p(c);
230
235
  }
231
- const S = new R();
232
- function x(h, t) {
233
- for (const e in h)
234
- if (Object.prototype.hasOwnProperty.call(h, e)) {
235
- const i = h[e];
236
+ function k(c, t) {
237
+ for (const e in c)
238
+ if (Object.prototype.hasOwnProperty.call(c, e)) {
239
+ const i = c[e];
236
240
  t(e, i);
237
241
  }
238
242
  }
239
- const p = class p {
243
+ const L = class L {
240
244
  constructor(t) {
241
245
  this.elementRef = null, this.isHidden = !1, this.custom = !1, this.initialValues = {}, this.changeTimeout = null, this.isHandlingChange = !1, this.changeHandlers = /* @__PURE__ */ new Set(), this.blurTimeout = null, this.lastChangeTime = 0, this.handleBlur = () => {
242
- }, this.pendingBlurHandler = null, this.originalDefaultValues = {}, this.nestingLevel = 0, this.parentNestingLevel = 0, this.id = t.id || O(), this.title = t.title, this.settings = t.settings, this.description = t.description, this.icon = t.icon, this.isCollapsed = t.collapsed ?? !1, this.isMain = t.main ?? !1, this.custom = t.custom ?? !1, this.hideCondition = t.hideCondition, this.onBlur = t.onBlur, this.parentNestingLevel = t.parentNestingLevel ?? 0, this.nestingLevel = this.parentNestingLevel, this.includeGetJson = t.includeGetJson ?? !0, this.addItemCfg = t.addItem, this.deleteItemCfg = t.deleteItem, Object.assign(this, t.settings), this.initialValues = this.getValues(), this.originalDefaultValues = this.getDefaultValues(), this.propagateNestingLevel();
246
+ }, this.pendingBlurHandler = null, this.originalDefaultValues = {}, this.nestingLevel = 0, this.id = t.id || N(), this.title = t.title, this.settings = t.settings, this.isCollapsed = t.collapsed ?? !1, this.isMain = t.main ?? !1, this.custom = t.custom ?? !1, this.nestingLevel = 0, this.includeGetJson = t.includeGetJson ?? !0, this.addItemCfg = t.addItem, this.deleteItemCfg = t.deleteItem, Object.assign(this, t.settings), this.initialValues = this.getValues(), this.originalDefaultValues = this.getDefaultValues(), this.propagateNestingLevel();
243
247
  }
244
248
  propagateNestingLevel() {
245
249
  const t = this.nestingLevel + 1;
246
- x(this.settings, (e, i) => {
247
- i instanceof p && (i.parentNestingLevel = this.nestingLevel, i.nestingLevel = t, i.propagateNestingLevel());
250
+ k(this.settings, (e, i) => {
251
+ p(i) && (i.nestingLevel = t, i.propagateNestingLevel());
248
252
  });
249
253
  }
250
254
  getNestingLevel() {
@@ -254,17 +258,104 @@ const p = class p {
254
258
  this.nestingLevel = t, this.propagateNestingLevel(), this.elementRef && this.updateNestingStyles();
255
259
  }
256
260
  updateNestingStyles() {
257
- this.elementRef && (L(this.elementRef, this.nestingLevel), I(this.elementRef, this.nestingLevel));
261
+ this.elementRef && (b(this.elementRef, this.nestingLevel), V(this.elementRef, this.nestingLevel));
258
262
  }
259
- static hide() {
260
- this.hiddenElements.forEach((t) => {
261
- t && (t.style.display = "none");
263
+ forceChildUIRefresh() {
264
+ Object.entries(this.settings).forEach(([t, e]) => {
265
+ try {
266
+ if (p(e)) {
267
+ const i = e.getValues();
268
+ e.setValue(i);
269
+ } else if (typeof e.setValue == "function") {
270
+ const i = e.value;
271
+ i !== void 0 && e.setValue(
272
+ i
273
+ );
274
+ }
275
+ } catch (i) {
276
+ console.warn(`Error refreshing UI for setting ${t}:`, i);
277
+ }
262
278
  });
263
279
  }
264
- static show() {
265
- this.hiddenElements.forEach((t) => {
266
- t && (t.style.display = "");
280
+ removeSetting(t) {
281
+ var s;
282
+ const e = this.settings[t];
283
+ if (!e) return;
284
+ if (delete this.settings[t], this.elementRef) {
285
+ const n = this.elementRef.querySelector(
286
+ ".setting-group-content"
287
+ );
288
+ if (n) {
289
+ const a = Array.from(
290
+ n.querySelectorAll(".setting-group, .setting")
291
+ );
292
+ for (const o of a) {
293
+ const l = o.id;
294
+ if (l && l.includes(e.id)) {
295
+ o.remove();
296
+ break;
297
+ }
298
+ }
299
+ }
300
+ }
301
+ typeof e.cleanup == "function" && e.cleanup(), this.updateNestingStyles();
302
+ const i = this.getValues();
303
+ this.initialValues = i, (s = this.onChange) == null || s.call(this, i);
304
+ }
305
+ updateVisibility() {
306
+ this.elementRef;
307
+ }
308
+ clone() {
309
+ const t = {};
310
+ k(this.settings, (s, n) => {
311
+ const a = String(s);
312
+ typeof n.clone == "function" ? t[a] = n.clone() : (console.warn(
313
+ `Setting with key '${a}' does not have a clone method. Copying reference.`
314
+ ), t[a] = n);
267
315
  });
316
+ const e = {
317
+ title: this.title,
318
+ settings: t,
319
+ collapsed: this.isCollapsed,
320
+ main: this.isMain,
321
+ custom: this.custom,
322
+ includeGetJson: this.includeGetJson,
323
+ addItem: this.addItemCfg,
324
+ deleteItem: this.deleteItemCfg
325
+ }, i = z(e);
326
+ return i.initialValues = this.getValues(), i;
327
+ }
328
+ resetDefault() {
329
+ const t = this.originalDefaultValues;
330
+ this.setValue(t), this.onChange && this.onChange(this.getValues());
331
+ }
332
+ setMobileValues(t) {
333
+ !t || typeof t != "object" || (Object.entries(t).forEach(([e, i]) => {
334
+ const s = this.settings[e];
335
+ s && (p(s) || w(s)) && typeof s.setMobileValue == "function" && s.setMobileValue(i);
336
+ }), this.setValue(t), this.onChange && this.onChange(this.getValues()));
337
+ }
338
+ getMobileValues(t) {
339
+ if (t === void 0) {
340
+ const e = {};
341
+ for (const i in this.settings)
342
+ if (Object.prototype.hasOwnProperty.call(this.settings, i)) {
343
+ const s = this.settings[i];
344
+ if (p(s))
345
+ e[i] = s.getMobileValues();
346
+ else {
347
+ const n = s;
348
+ e[i] = n.mobileValue !== void 0 ? n.mobileValue : n.value;
349
+ }
350
+ }
351
+ return e;
352
+ } else {
353
+ const e = this.settings[t];
354
+ if (!e) return;
355
+ if (p(e)) return e.getMobileValues();
356
+ const i = e;
357
+ return i.mobileValue !== void 0 ? i.mobileValue : i.value;
358
+ }
268
359
  }
269
360
  setOnChange(t) {
270
361
  this.onChange = t;
@@ -277,14 +368,14 @@ const p = class p {
277
368
  Object.keys(s).length > 0 && (this.lastChangeTime = Date.now(), this.initialValues = i, t(i), this.updateVisibility()), this.isHandlingChange = !1;
278
369
  }, 50));
279
370
  };
280
- return this.changeHandlers.clear(), x(this.settings, (i, s) => {
371
+ return this.changeHandlers.clear(), k(this.settings, (i, s) => {
281
372
  var n;
282
- if (s instanceof p)
373
+ if (p(s))
283
374
  s.setOnChange(() => {
284
375
  const a = this.getValues();
285
376
  this.initialValues = a, t(a);
286
377
  }), this.changeHandlers.add(() => t(this.getValues()));
287
- else if (s instanceof g) {
378
+ else if (w(s)) {
288
379
  const a = () => e();
289
380
  this.changeHandlers.add(a), s.setOnChange(a);
290
381
  } else {
@@ -293,54 +384,12 @@ const p = class p {
293
384
  }
294
385
  }), this;
295
386
  }
296
- setOnBlur(t) {
297
- return this.onBlur = t, this.pendingBlurHandler = t, this.handleBlur = (e) => {
298
- (e == null ? void 0 : e.target) instanceof HTMLElement && e.target.closest(".setting-group") !== this.elementRef || (this.blurTimeout && clearTimeout(this.blurTimeout), this.blurTimeout = setTimeout(() => t(), 100));
299
- }, this.elementRef && this.setupBlurHandlers(), this;
300
- }
301
- setupBlurHandlers() {
302
- this.elementRef && (this.elementRef.removeEventListener(
303
- "focusout",
304
- this.handleBlur
305
- ), this.elementRef.addEventListener(
306
- "focusout",
307
- this.handleBlur,
308
- !0
309
- )), x(this.settings, (t, e) => {
310
- e instanceof p && e.setOnBlur(() => {
311
- this.onBlur && this.onBlur();
312
- });
313
- });
314
- }
315
387
  cleanup() {
316
388
  this.changeTimeout && (clearTimeout(this.changeTimeout), this.changeTimeout = null), this.blurTimeout && (clearTimeout(this.blurTimeout), this.blurTimeout = null), this.elementRef && this.elementRef.removeEventListener(
317
389
  "focusout",
318
390
  this.handleBlur
319
391
  ), this.changeHandlers.clear();
320
392
  }
321
- clone() {
322
- const t = {};
323
- x(this.settings, (s, n) => {
324
- typeof n.clone == "function" ? t[s] = n.clone() : (console.warn(
325
- `Setting with key '${s}' does not have a clone method. Copying reference.`
326
- ), t[s] = n);
327
- });
328
- const e = {
329
- title: this.title,
330
- settings: t,
331
- description: this.description,
332
- icon: this.icon,
333
- collapsed: this.isCollapsed,
334
- main: this.isMain,
335
- custom: this.custom,
336
- hideCondition: this.hideCondition,
337
- parentNestingLevel: this.parentNestingLevel,
338
- includeGetJson: this.includeGetJson,
339
- addItem: this.addItemCfg,
340
- deleteItem: this.deleteItemCfg
341
- }, i = $(e);
342
- return i.initialValues = this.getValues(), i;
343
- }
344
393
  setValue(t) {
345
394
  if (!t || typeof t != "object") return;
346
395
  Object.entries(t).forEach(([i, s]) => {
@@ -352,44 +401,21 @@ const p = class p {
352
401
  this.addSetting(i, l), n = l;
353
402
  }
354
403
  }
355
- n && (n instanceof p || n instanceof g) && typeof n.setValue == "function" && n.setValue(s);
404
+ n && (p(n) || w(n)) && typeof n.setValue == "function" && n.setValue(s);
356
405
  }), setTimeout(() => {
357
406
  this.forceChildUIRefresh();
358
407
  }, 0);
359
408
  const e = this.getValues();
360
409
  this.initialValues = e, this.onChange && this.onChange(e);
361
410
  }
362
- /** Force UI refresh for all child settings */
363
- forceChildUIRefresh() {
364
- Object.entries(this.settings).forEach(([t, e]) => {
365
- try {
366
- if (e instanceof p) {
367
- const i = e.getValues();
368
- e.setValue(i);
369
- } else if (typeof e.setValue == "function") {
370
- const i = e.value;
371
- i !== void 0 && e.setValue(i);
372
- }
373
- } catch (i) {
374
- console.warn(`Error refreshing UI for setting ${t}:`, i);
375
- }
376
- });
377
- }
378
- /** Attach change/blur bubbling for a newly added child */
379
411
  wireChild(t) {
380
- var i, s, n;
412
+ var i;
381
413
  const e = () => {
382
- var o;
383
- const a = this.getValues();
384
- this.initialValues = a, (o = this.onChange) == null || o.call(this, a), this.updateVisibility();
414
+ var n;
415
+ const s = this.getValues();
416
+ this.initialValues = s, (n = this.onChange) == null || n.call(this, s), this.updateVisibility();
385
417
  };
386
- t instanceof p ? (t.setOnChange(() => e()), (i = t.setOnBlur) == null || i.call(t, () => {
387
- var a;
388
- return (a = this.onBlur) == null ? void 0 : a.call(this);
389
- })) : t instanceof g ? (t.setOnChange(() => e()), (s = t.setOnBlur) == null || s.call(t, () => {
390
- var a;
391
- return (a = this.onBlur) == null ? void 0 : a.call(this);
392
- })) : (n = t.setOnChange) == null || n.call(t, () => e());
418
+ p(t) ? t.setOnChange(() => e()) : w(t) ? t.setOnChange(() => e()) : (i = t.setOnChange) == null || i.call(t, () => e());
393
419
  }
394
420
  addSetting(t, e) {
395
421
  var s, n;
@@ -398,46 +424,21 @@ const p = class p {
398
424
  ".setting-group-content"
399
425
  );
400
426
  if (a) {
401
- e instanceof p && e.setNestingLevel(this.nestingLevel + 1);
427
+ p(e) && typeof e.setNestingLevel == "function" && e.setNestingLevel(this.nestingLevel + 1);
402
428
  const o = e.draw(), l = this.deleteItemCfg ?? this.addItemCfg;
403
- if (l && l.showDeleteButton !== !1) {
404
- const c = l.keyPrefix ?? ((s = this.addItemCfg) == null ? void 0 : s.keyPrefix);
405
- c && t.startsWith(c) && this.addDeleteButtonToElement(o, t);
429
+ if (l) {
430
+ const d = l.keyPrefix ?? ((s = this.addItemCfg) == null ? void 0 : s.keyPrefix);
431
+ d && t.startsWith(d) && this.addDeleteButtonToElement(o, t);
406
432
  }
407
433
  const r = a.querySelector(".sg-add-button-bottom");
408
- r ? a.insertBefore(o, r) : a.appendChild(o), S.trackElement(o), L(o, this.nestingLevel + 1), I(o, this.nestingLevel + 1);
409
- const d = o.style.display;
410
- o.style.display = "none", o.offsetHeight, o.style.display = d, this.updateNestingStyles();
434
+ r ? a.insertBefore(o, r) : a.appendChild(o), S.trackElement(o), b(o, this.nestingLevel + 1), V(o, this.nestingLevel + 1);
435
+ const h = o.style.display;
436
+ o.style.display = "none", o.offsetHeight, o.style.display = h, this.updateNestingStyles();
411
437
  }
412
438
  }
413
439
  const i = this.getValues();
414
440
  this.initialValues = i, (n = this.onChange) == null || n.call(this, i);
415
441
  }
416
- removeSetting(t) {
417
- var s;
418
- const e = this.settings[t];
419
- if (!e) return;
420
- if (delete this.settings[t], this.elementRef) {
421
- const n = this.elementRef.querySelector(
422
- ".setting-group-content"
423
- );
424
- if (n) {
425
- const a = Array.from(
426
- n.querySelectorAll(".setting-group, .setting")
427
- );
428
- for (const o of a) {
429
- const l = o.id;
430
- if (l && l.includes(e.id)) {
431
- o.remove();
432
- break;
433
- }
434
- }
435
- }
436
- }
437
- typeof e.cleanup == "function" && e.cleanup(), this.updateNestingStyles();
438
- const i = this.getValues();
439
- this.initialValues = i, (s = this.onChange) == null || s.call(this, i);
440
- }
441
442
  addDeleteButtonToElement(t, e, i) {
442
443
  let s = null;
443
444
  try {
@@ -446,23 +447,21 @@ const p = class p {
446
447
  s = null;
447
448
  }
448
449
  if (!s) {
449
- const d = Array.from(
450
+ const r = Array.from(
450
451
  t.querySelectorAll(".setting-group-title")
451
452
  );
452
- for (const c of d)
453
- if (c.closest(".setting-group") === t) {
454
- s = c;
453
+ for (const h of r)
454
+ if (h.closest(".setting-group") === t) {
455
+ s = h;
455
456
  break;
456
457
  }
457
- s || (s = d[0] ?? null);
458
+ s || (s = r[0] ?? null);
458
459
  }
459
460
  if (!s) return;
460
461
  const n = s.querySelector(".actions-section");
461
462
  if (!n) return;
462
463
  const a = document.createElement("button");
463
- a.type = "button", a.className = "sg-delete-button";
464
- const o = i ? i.deleteItemCfg : this.deleteItemCfg ?? this.addItemCfg;
465
- a.title = (o == null ? void 0 : o.deleteButtonLabel) || "Delete", a.style.cssText = `
464
+ a.type = "button", a.className = "sg-delete-button", i ? i.deleteItemCfg : this.deleteItemCfg ?? this.addItemCfg, a.title = "Delete", a.style.cssText = `
466
465
  background: none;
467
466
  border: none;
468
467
  cursor: pointer;
@@ -475,23 +474,23 @@ const p = class p {
475
474
  border-radius: 4px;
476
475
  transition: background-color 0.2s;
477
476
  `;
478
- const l = (o == null ? void 0 : o.deleteButtonIconSvg) || `
477
+ const o = `
479
478
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
480
479
  <path d="M2 4h12M5.333 4V2.667a1.333 1.333 0 0 1 1.334-1.334h2.666a1.333 1.333 0 0 1 1.334 1.334V4m2 0v9.333a1.333 1.333 0 0 1-1.334 1.334H4.667a1.333 1.333 0 0 1-1.334-1.334V4h8.667Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
481
480
  <path d="M6.667 7.333v4M9.333 7.333v4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
482
481
  </svg>
483
482
  `;
484
- a.innerHTML = l, a.addEventListener("mouseenter", () => {
483
+ a.innerHTML = o, a.addEventListener("mouseenter", () => {
485
484
  a.style.backgroundColor = "#fef2f2";
486
485
  }), a.addEventListener("mouseleave", () => {
487
486
  a.style.backgroundColor = "transparent";
488
- }), a.addEventListener("click", (d) => {
489
- d.stopPropagation(), d.preventDefault(), this.showDeleteConfirmation().then((c) => {
490
- c && (i && i.deleteItemCfg ? this.removeSetting(e) : this.removeSetting(e));
487
+ }), a.addEventListener("click", (r) => {
488
+ r.stopPropagation(), r.preventDefault(), this.showDeleteConfirmation().then((h) => {
489
+ h && (i && i.deleteItemCfg ? this.removeSetting(e) : this.removeSetting(e));
491
490
  });
492
491
  });
493
- const r = n.querySelector(".setting-group-arrow");
494
- r ? n.insertBefore(a, r) : n.appendChild(a);
492
+ const l = n.querySelector(".setting-group-arrow");
493
+ l ? n.insertBefore(a, l) : n.appendChild(a);
495
494
  }
496
495
  showDeleteConfirmation() {
497
496
  return new Promise((t) => {
@@ -581,13 +580,13 @@ const p = class p {
581
580
  r(), t(!1);
582
581
  }), l.addEventListener("click", () => {
583
582
  r(), t(!0);
584
- }), e.addEventListener("click", (c) => {
585
- c.target === e && (r(), t(!1));
583
+ }), e.addEventListener("click", (d) => {
584
+ d.target === e && (r(), t(!1));
586
585
  });
587
- const d = (c) => {
588
- c.key === "Escape" && (r(), t(!1), document.removeEventListener("keydown", d));
586
+ const h = (d) => {
587
+ d.key === "Escape" && (r(), t(!1), document.removeEventListener("keydown", h));
589
588
  };
590
- document.addEventListener("keydown", d), a.appendChild(o), a.appendChild(l), i.appendChild(s), i.appendChild(n), i.appendChild(a), e.appendChild(i), document.body.appendChild(e), requestAnimationFrame(() => {
589
+ document.addEventListener("keydown", h), a.appendChild(o), a.appendChild(l), i.appendChild(s), i.appendChild(n), i.appendChild(a), e.appendChild(i), document.body.appendChild(e), requestAnimationFrame(() => {
591
590
  e.style.opacity = "1", i.style.transform = "scale(1)";
592
591
  }), setTimeout(() => l.focus(), 100);
593
592
  });
@@ -609,24 +608,18 @@ const p = class p {
609
608
  JSON.stringify(a) !== JSON.stringify(o) && (i[n] = { from: a, to: o });
610
609
  }), i;
611
610
  }
612
- hide() {
613
- this.elementRef && (this.elementRef.style.display = "none", this.isHidden = !0);
614
- }
615
- show() {
616
- this.elementRef && (this.elementRef.style.display = "", this.isHidden = !1);
617
- }
618
611
  getValues(t) {
619
612
  if (t === void 0) {
620
613
  const e = {};
621
614
  for (const i in this.settings)
622
615
  if (Object.prototype.hasOwnProperty.call(this.settings, i)) {
623
616
  const s = this.settings[i];
624
- s instanceof p ? e[i] = s.getValues() : e[i] = s.value;
617
+ p(s) ? e[i] = s.getValues() : e[i] = s.value;
625
618
  }
626
619
  return e;
627
620
  } else {
628
621
  const e = this.settings[t];
629
- return e ? e instanceof p ? e.getValues() : e.value : void 0;
622
+ return e ? p(e) ? e.getValues() : e.value : void 0;
630
623
  }
631
624
  }
632
625
  getValuesForJson(t) {
@@ -636,12 +629,23 @@ const p = class p {
636
629
  for (const i in this.settings)
637
630
  if (Object.prototype.hasOwnProperty.call(this.settings, i)) {
638
631
  const s = this.settings[i];
639
- s instanceof p ? e[i] = s.getValuesForJson() : s.includeGetJson === !1 ? e[i] = null : e[i] = s.value;
632
+ if (p(s))
633
+ e[i] = s.getValuesForJson();
634
+ else {
635
+ const n = s;
636
+ n.includeGetJson === !1 ? e[i] = null : e[i] = n.value;
637
+ }
640
638
  }
641
639
  return e;
642
640
  } else {
643
641
  const e = this.settings[t];
644
- return e ? e instanceof p ? e.includeGetJson === !1 ? null : e.getValuesForJson() : e.includeGetJson === !1 ? null : e.value : void 0;
642
+ if (!e) return;
643
+ if (p(e))
644
+ return e.includeGetJson === !1 ? null : e.getValuesForJson();
645
+ {
646
+ const i = e;
647
+ return i.includeGetJson === !1 ? null : i.value;
648
+ }
645
649
  }
646
650
  }
647
651
  getDefaultValues(t) {
@@ -650,82 +654,36 @@ const p = class p {
650
654
  for (const i in this.settings)
651
655
  if (Object.prototype.hasOwnProperty.call(this.settings, i)) {
652
656
  const s = this.settings[i];
653
- s instanceof p ? e[i] = s.getDefaultValues() : e[i] = s.default !== void 0 ? s.default : s.value;
654
- }
655
- return e;
656
- } else {
657
- const e = this.settings[t];
658
- return e ? e instanceof p ? e.getDefaultValues() : e.default !== void 0 ? e.default : e.value : void 0;
659
- }
660
- }
661
- getMobileValues(t) {
662
- if (t === void 0) {
663
- const e = {};
664
- for (const i in this.settings)
665
- if (Object.prototype.hasOwnProperty.call(this.settings, i)) {
666
- const s = this.settings[i];
667
- if (s instanceof p)
668
- e[i] = s.getMobileValues();
669
- else if (typeof s.getMobileValue == "function") {
670
- const n = s.getMobileValue();
671
- e[i] = n !== void 0 ? n : s.value;
672
- } else
673
- e[i] = s.value;
657
+ if (p(s))
658
+ e[i] = s.getDefaultValues();
659
+ else {
660
+ const n = s;
661
+ e[i] = n.default !== void 0 ? n.default : n.value;
662
+ }
674
663
  }
675
664
  return e;
676
665
  } else {
677
666
  const e = this.settings[t];
678
667
  if (!e) return;
679
- if (e instanceof p) return e.getMobileValues();
680
- if (typeof e.getMobileValue == "function") {
681
- const i = e.getMobileValue();
682
- return i !== void 0 ? i : e.value;
683
- }
684
- return e.value;
685
- }
686
- }
687
- setMobileValues(t) {
688
- if (!(!t || typeof t != "object") && (Object.entries(t).forEach(([e, i]) => {
689
- const s = this.settings[e];
690
- s && (s instanceof p ? typeof i == "object" && i !== null && s.setMobileValues(i) : typeof s.setMobileValue == "function" && s.setMobileValue(i));
691
- }), this.setValue(t), this.onChange)) {
692
- const e = this.getValues();
693
- this.onChange(e);
694
- }
695
- }
696
- resetDefault() {
697
- const t = this.originalDefaultValues;
698
- if (this.setValue(t), this.onChange) {
699
- const e = this.getValues();
700
- this.onChange(e);
668
+ if (p(e)) return e.getDefaultValues();
669
+ const i = e;
670
+ return i.default !== void 0 ? i.default : i.value;
701
671
  }
702
672
  }
703
673
  draw() {
704
- var d;
705
674
  const t = document.createElement("div");
706
- t.className = "setting-group", t.id = `setting-group-${this.id}`, p.hiddenElements.add(t), this.hideCondition && this.hideCondition() && (t.style.display = "none"), this.isMain && t.classList.add("main-group"), this.custom && t.classList.add("custom_class"), L(t, this.nestingLevel);
675
+ t.className = "setting-group", t.id = `setting-group-${this.id}`, L.hiddenElements.add(t), this.isMain && t.classList.add("main-group"), this.custom && t.classList.add("custom_class"), b(t, this.nestingLevel);
707
676
  const e = document.createElement("div");
708
677
  e.className = "setting-group-title", this.isCollapsed && e.classList.add("collapsed-view"), e.setAttribute("role", "button"), e.setAttribute(
709
678
  "aria-expanded",
710
679
  (!this.isCollapsed).toString()
711
680
  ), e.setAttribute("tabindex", "0");
712
681
  const i = document.createElement("div");
713
- if (i.className = "title-section", this.icon) {
714
- const c = document.createElement("span");
715
- c.className = "group-icon", c.innerHTML = this.icon, i.appendChild(c);
716
- }
682
+ i.className = "title-section";
717
683
  const s = document.createElement("h3");
718
684
  s.textContent = this.title, i.appendChild(s);
719
685
  const n = document.createElement("div");
720
- if (n.className = "actions-section", this.description && this.isCollapsed) {
721
- const c = document.createElement("span");
722
- c.className = "info-marker", c.innerHTML = `
723
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
724
- <path d="M8 5.33333V8M8 10.6667H8.00667M14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8Z"
725
- stroke="currentColor" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
726
- </svg>
727
- `, c.title = this.description, n.appendChild(c);
728
- }
686
+ n.className = "actions-section";
729
687
  const a = document.createElement("span");
730
688
  a.className = "setting-group-arrow", a.innerHTML = `
731
689
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -733,85 +691,49 @@ const p = class p {
733
691
  </svg>
734
692
  `, this.isCollapsed && a.classList.add("rotated"), n.appendChild(a);
735
693
  const o = document.createElement("div");
736
- if (o.className = "setting-group-content", this.isCollapsed && (o.classList.add("collapsed"), e.classList.add("collapsed-view"), a.classList.add("rotated"), t.classList.add("collapsed")), this.isMain && o.classList.add("main-content"), this.description && !this.isCollapsed) {
737
- const c = document.createElement("div");
738
- c.className = "setting-group-description", c.textContent = this.description, o.appendChild(c);
739
- }
694
+ o.className = "setting-group-content", this.isCollapsed && (o.classList.add("collapsed"), e.classList.add("collapsed-view"), a.classList.add("rotated"), t.classList.add("collapsed")), this.isMain && o.classList.add("main-content");
740
695
  const l = () => {
741
696
  this.isCollapsed = !this.isCollapsed, o.classList.toggle("collapsed"), e.classList.toggle("collapsed-view"), a.classList.toggle("rotated"), t.classList.toggle("collapsed", this.isCollapsed), e.setAttribute(
742
697
  "aria-expanded",
743
698
  (!this.isCollapsed).toString()
744
699
  );
745
- const c = o.querySelector(
746
- ".setting-group-description"
747
- ), u = n.querySelector(".info-marker");
748
- if (this.description)
749
- if (this.isCollapsed) {
750
- if (c && c.remove(), !u) {
751
- const m = document.createElement("span");
752
- m.className = "info-marker", m.innerHTML = `
753
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
754
- <path d="M8 5.33333V8M8 10.6667H8.00667M14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8Z"
755
- stroke="currentColor" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
756
- </svg>
757
- `, m.title = this.description, n.insertBefore(m, a);
758
- }
759
- } else {
760
- if (!c) {
761
- const m = document.createElement("div");
762
- m.className = "setting-group-description", m.textContent = this.description, o.insertBefore(
763
- m,
764
- o.firstChild
765
- );
766
- }
767
- u && u.remove();
768
- }
769
700
  };
770
- if (e.onclick = l, e.onkeydown = (c) => {
771
- (c.key === "Enter" || c.key === " ") && (c.preventDefault(), l());
701
+ if (e.onclick = l, e.onkeydown = (h) => {
702
+ (h.key === "Enter" || h.key === " ") && (h.preventDefault(), l());
772
703
  }, Object.keys(this.settings).length > 0) {
773
- for (const c in this.settings)
774
- if (Object.prototype.hasOwnProperty.call(this.settings, c)) {
775
- const u = this.settings[c];
776
- u instanceof p && u.setNestingLevel(this.nestingLevel + 1);
777
- const m = u.draw();
778
- if (u instanceof p && u.deleteItemCfg)
779
- this.addDeleteButtonToElement(
780
- m,
781
- c,
782
- u
783
- );
784
- else {
785
- const E = this.deleteItemCfg ?? this.addItemCfg;
786
- if (E && E.showDeleteButton !== !1) {
787
- const b = E.keyPrefix ?? ((d = this.addItemCfg) == null ? void 0 : d.keyPrefix);
788
- b && c.startsWith(b) && this.addDeleteButtonToElement(m, c);
789
- }
790
- }
791
- o.appendChild(m);
704
+ for (const h in this.settings)
705
+ if (Object.prototype.hasOwnProperty.call(this.settings, h)) {
706
+ const d = this.settings[h];
707
+ p(d) && typeof d.setNestingLevel == "function" && d.setNestingLevel(this.nestingLevel + 1);
708
+ const u = d.draw();
709
+ p(d) && d.deleteItemCfg && this.addDeleteButtonToElement(
710
+ u,
711
+ h,
712
+ d
713
+ ), o.appendChild(u);
792
714
  }
793
715
  } else {
794
- const c = document.createElement("div");
795
- c.className = "setting-group-empty", c.textContent = "No settings in this group", o.appendChild(c);
716
+ const h = document.createElement("div");
717
+ h.className = "setting-group-empty", h.textContent = "No settings in this group", o.appendChild(h);
796
718
  }
797
719
  if (this.addItemCfg) {
798
- const c = document.createElement("button");
799
- c.type = "button", c.className = "sg-add-button-bottom", c.style.marginTop = "8px";
800
- const u = this.addItemCfg.buttonIconSvg ?? `
720
+ const h = document.createElement("button");
721
+ h.type = "button", h.className = "sg-add-button-bottom", h.style.marginTop = "8px";
722
+ const d = `
801
723
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none"
802
724
  xmlns="http://www.w3.org/2000/svg">
803
725
  <path d="M8 3.333v9.334M3.333 8h9.334" stroke="currentColor"
804
726
  stroke-width="1.5" stroke-linecap="round"/>
805
727
  </svg>`;
806
- c.innerHTML = `${u}<span style="margin-left:4px;">${this.addItemCfg.buttonLabel ?? "Add"}</span>`, c.addEventListener("click", (m) => {
807
- m.stopPropagation(), m.preventDefault();
808
- const M = this.getNextIndexFromPrefix(this.addItemCfg.keyPrefix), E = this.addItemCfg.createItem(M), b = `${this.addItemCfg.keyPrefix}${M}`;
809
- this.addSetting(b, E), this.addItemCfg.expandNewItem !== !1 && E.expand && E.expand();
810
- }), o.appendChild(c);
728
+ h.innerHTML = `${d}<span style="margin-left:4px;">${this.addItemCfg.buttonLabel ?? "Add"}</span>`, h.addEventListener("click", (u) => {
729
+ u.stopPropagation(), u.preventDefault();
730
+ const y = this.getNextIndexFromPrefix(this.addItemCfg.keyPrefix), O = this.addItemCfg.createItem(y), H = `${this.addItemCfg.keyPrefix}${y}`;
731
+ this.addSetting(H, O);
732
+ }), o.appendChild(h);
811
733
  }
812
734
  return e.appendChild(i), e.appendChild(n), t.appendChild(e), t.appendChild(o), this.elementRef = t, S.trackElement(t), setTimeout(() => {
813
735
  this.updateNestingStyles();
814
- }, 0), this.pendingBlurHandler && (this.setupBlurHandlers(), this.pendingBlurHandler = null), t;
736
+ }, 0), this.pendingBlurHandler && (this.pendingBlurHandler = null), t;
815
737
  }
816
738
  collapse() {
817
739
  if (!this.elementRef || this.isCollapsed) return;
@@ -831,12 +753,6 @@ const p = class p {
831
753
  );
832
754
  t && e && i && (this.isCollapsed = !1, t.classList.remove("collapsed"), e.classList.remove("rotated"), i.setAttribute("aria-expanded", "true"));
833
755
  }
834
- updateVisibility() {
835
- this.elementRef && this.hideCondition && (this.elementRef.style.display = this.hideCondition() ? "none" : "");
836
- }
837
- toggle() {
838
- this.isHidden ? this.show() : this.hide();
839
- }
840
756
  getJson() {
841
757
  return JSON.stringify(this.getValuesForJson(), null, 2);
842
758
  }
@@ -857,9 +773,12 @@ const p = class p {
857
773
  }
858
774
  }
859
775
  };
860
- p.hiddenElements = /* @__PURE__ */ new Set();
861
- let v = p;
862
- class gt extends v {
776
+ L.hiddenElements = /* @__PURE__ */ new Set();
777
+ let v = L;
778
+ function vt(c) {
779
+ return new F(c);
780
+ }
781
+ class F extends v {
863
782
  constructor(t) {
864
783
  super(t);
865
784
  const e = Object.keys(this.settings)[0];
@@ -897,10 +816,12 @@ class gt extends v {
897
816
  if (a.className = "tab-content", this.contentContainers = {}, Object.keys(this.settings).forEach((o, l) => {
898
817
  const r = document.createElement("button");
899
818
  r.className = "tab-button", r.type = "button", r.setAttribute("data-tab-id", o), r.textContent = o, r.addEventListener("click", () => this.switchToTab(o)), n.appendChild(r);
900
- const d = document.createElement("div");
901
- d.className = "tab-panel", this.contentContainers[o] = d;
902
- const c = this.settings[o];
903
- c && (c instanceof v && c.setNestingLevel(this.getNestingLevel() + 1), d.appendChild(c.draw())), a.appendChild(d), l === 0 && !this.activeTabId && (this.activeTabId = o);
819
+ const h = document.createElement("div");
820
+ h.className = "tab-panel", this.contentContainers[o] = h;
821
+ const d = this.settings[o];
822
+ d && (p(d) && typeof d.setNestingLevel == "function" && d.setNestingLevel(this.getNestingLevel() + 1), h.appendChild(
823
+ d.draw()
824
+ )), a.appendChild(h), l === 0 && !this.activeTabId && (this.activeTabId = o);
904
825
  }), e.appendChild(i), e.appendChild(n), e.appendChild(a), !this.activeTabId) {
905
826
  const o = Object.keys(this.settings)[0];
906
827
  this.activeTabId = o || "";
@@ -908,13 +829,13 @@ class gt extends v {
908
829
  return this.updateTabUI(), t;
909
830
  }
910
831
  }
911
- function $(h) {
912
- return new v(h);
832
+ function z(c) {
833
+ return new v(c);
913
834
  }
914
- function mt(h) {
915
- return h;
835
+ function Ct(c) {
836
+ return c;
916
837
  }
917
- class F extends g {
838
+ class G extends g {
918
839
  constructor(t = {}) {
919
840
  super(t), this.inputType = "text", t.onChange && this.setOnChange(t.onChange);
920
841
  }
@@ -934,29 +855,29 @@ class F extends g {
934
855
  });
935
856
  }
936
857
  }
937
- const z = "<svg xmlns='http://www.w3.org/2000/svg' width='18' height='19' viewBox='0 0 18 19' fill='none'><path d='M8.99999 15.8542C9.79613 16.5667 10.8475 17 12 17C14.4853 17 16.5 14.9853 16.5 12.5C16.5 10.4248 15.0953 8.67769 13.1849 8.15763M4.81513 8.15762C2.9047 8.67768 1.5 10.4248 1.5 12.5C1.5 14.9853 3.51472 17 6 17C8.48528 17 10.5 14.9853 10.5 12.5C10.5 11.9146 10.3882 11.3554 10.1849 10.8424M13.5 6.5C13.5 8.98528 11.4853 11 9 11C6.51472 11 4.5 8.98528 4.5 6.5C4.5 4.01472 6.51472 2 9 2C11.4853 2 13.5 4.01472 13.5 6.5Z' stroke='#667085' stroke-linecap='round' stroke-linejoin='round'/></svg>";
938
- class f extends F {
858
+ const P = "<svg xmlns='http://www.w3.org/2000/svg' width='18' height='19' viewBox='0 0 18 19' fill='none'><path d='M8.99999 15.8542C9.79613 16.5667 10.8475 17 12 17C14.4853 17 16.5 14.9853 16.5 12.5C16.5 10.4248 15.0953 8.67769 13.1849 8.15763M4.81513 8.15762C2.9047 8.67768 1.5 10.4248 1.5 12.5C1.5 14.9853 3.51472 17 6 17C8.48528 17 10.5 14.9853 10.5 12.5C10.5 11.9146 10.3882 11.3554 10.1849 10.8424M13.5 6.5C13.5 8.98528 11.4853 11 9 11C6.51472 11 4.5 8.98528 4.5 6.5C4.5 4.01472 6.51472 2 9 2C11.4853 2 13.5 4.01472 13.5 6.5Z' stroke='#667085' stroke-linecap='round' stroke-linejoin='round'/></svg>";
859
+ class m extends G {
939
860
  constructor(t) {
940
861
  super({
941
862
  ...t,
942
- icon: t.icon || z,
863
+ icon: t.icon || P,
943
864
  title: t.title || "Color",
944
- default: t.default ? f.normalizeColorValue(t.default) : "#000000"
865
+ default: t.default ? m.normalizeColorValue(t.default) : "#000000"
945
866
  }), this.inputType = "color", this.element = null, this.colorInputEl = null, this.textInputEl = null, this.detectChange = t.detectChange;
946
867
  }
947
868
  static normalizeColorValue(t) {
948
- return t.startsWith("#") ? f.normalizeHexValue(t) : t.includes(",") ? f.rgbToHexStatic(t) : f.normalizeHexValue(t);
869
+ return t.startsWith("#") ? m.normalizeHexValue(t) : t.includes(",") ? m.rgbToHexStatic(t) : m.normalizeHexValue(t);
949
870
  }
950
871
  static normalizeHexValue(t) {
951
872
  return t = t.replace("#", ""), t.length === 3 && (t = t.split("").map((e) => e + e).join("")), t.length !== 6 ? (console.warn(`Invalid hex value "${t}", using default "#000000"`), "#000000") : /^[0-9A-Fa-f]{6}$/.test(t) ? `#${t.toLowerCase()}` : (console.warn(`Invalid hex value "${t}", using default "#000000"`), "#000000");
952
873
  }
953
874
  static rgbToHexStatic(t) {
954
- const e = t.split(",").map((d) => parseInt(d.trim()));
875
+ const e = t.split(",").map((h) => parseInt(h.trim()));
955
876
  if (e.length !== 3 || e.some(isNaN))
956
877
  return console.warn(`Invalid RGB value "${t}", using default "#000000"`), "#000000";
957
- const [i, s, n] = e, a = Math.max(0, Math.min(255, i)), o = Math.max(0, Math.min(255, s)), l = Math.max(0, Math.min(255, n)), r = (d) => {
958
- const c = d.toString(16);
959
- return c.length === 1 ? "0" + c : c;
878
+ const [i, s, n] = e, a = Math.max(0, Math.min(255, i)), o = Math.max(0, Math.min(255, s)), l = Math.max(0, Math.min(255, n)), r = (h) => {
879
+ const d = h.toString(16);
880
+ return d.length === 1 ? "0" + d : d;
960
881
  };
961
882
  return `#${r(a)}${r(o)}${r(l)}`;
962
883
  }
@@ -966,7 +887,7 @@ class f extends F {
966
887
  return;
967
888
  }
968
889
  if (typeof t == "string") {
969
- const e = f.normalizeColorValue(t);
890
+ const e = m.normalizeColorValue(t);
970
891
  this.value = e, this.colorInputEl && (this.colorInputEl.value = e), this.textInputEl && (this.textInputEl.value = e), this.onChange && this.onChange(e), this.props.detectChange && this.props.detectChange(e);
971
892
  } else
972
893
  this.value = "#000000", this.colorInputEl && (this.colorInputEl.value = "#000000"), this.textInputEl && (this.textInputEl.value = "#000000"), this.onChange && this.onChange("#000000"), this.props.detectChange && this.props.detectChange("#000000");
@@ -996,8 +917,8 @@ class f extends F {
996
917
  const r = l.value.trim();
997
918
  if (!r)
998
919
  return e.classList.remove("error"), !0;
999
- const c = /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(r);
1000
- return c ? e.classList.remove("error") : e.classList.add("error"), c;
920
+ const d = /^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/.test(r);
921
+ return d ? e.classList.remove("error") : e.classList.add("error"), d;
1001
922
  }, s = document.createElement("input");
1002
923
  s.type = "color", s.className = "color-picker", s.value = this.value || "#000000", s.setAttribute("aria-label", "Choose color"), s.setAttribute("title", "Click to open color picker"), this.colorInputEl = s;
1003
924
  const n = document.createElement("div");
@@ -1006,20 +927,20 @@ class f extends F {
1006
927
  n.style.backgroundColor = a;
1007
928
  const o = document.createElement("input");
1008
929
  return o.type = "text", o.className = "color-text-input", o.value = this.value || "", o.placeholder = "#000000", o.setAttribute("pattern", "#[0-9A-Fa-f]{6}"), o.setAttribute("title", "Enter a hex color value (e.g., #ff0000)"), o.setAttribute("aria-label", "Hex color value"), o.setAttribute("maxlength", "7"), this.textInputEl = o, this.textInputEl.addEventListener("input", (l) => {
1009
- var d, c;
930
+ var h, d;
1010
931
  let r = l.target.value.trim();
1011
932
  if (this.textInputEl && i(this.textInputEl)) {
1012
- const u = f.normalizeColorValue(r);
1013
- this.value = u, (d = this.onChange) == null || d.call(this, u), (c = this.detectChange) == null || c.call(this, u), this.colorInputEl && (this.colorInputEl.value = u), n.style.backgroundColor = u;
933
+ const u = m.normalizeColorValue(r);
934
+ this.value = u, (h = this.onChange) == null || h.call(this, u), (d = this.detectChange) == null || d.call(this, u), this.colorInputEl && (this.colorInputEl.value = u), n.style.backgroundColor = u;
1014
935
  }
1015
936
  }), this.colorInputEl.addEventListener("input", (l) => {
1016
- var c, u;
1017
- const r = l.target.value, d = f.normalizeColorValue(r);
1018
- this.value = d, (c = this.onChange) == null || c.call(this, d), (u = this.detectChange) == null || u.call(this, d), this.textInputEl && (this.textInputEl.value = d), n.style.backgroundColor = d, e.classList.remove("error");
937
+ var d, u;
938
+ const r = l.target.value, h = m.normalizeColorValue(r);
939
+ this.value = h, (d = this.onChange) == null || d.call(this, h), (u = this.detectChange) == null || u.call(this, h), this.textInputEl && (this.textInputEl.value = h), n.style.backgroundColor = h, e.classList.remove("error");
1019
940
  }), this.colorInputEl.addEventListener("change", (l) => {
1020
- var c, u;
1021
- const r = l.target.value, d = f.normalizeColorValue(r);
1022
- this.value = d, (c = this.onChange) == null || c.call(this, d), (u = this.detectChange) == null || u.call(this, d), this.textInputEl && (this.textInputEl.value = d), n.style.backgroundColor = d;
941
+ var d, u;
942
+ const r = l.target.value, h = m.normalizeColorValue(r);
943
+ this.value = h, (d = this.onChange) == null || d.call(this, h), (u = this.detectChange) == null || u.call(this, h), this.textInputEl && (this.textInputEl.value = h), n.style.backgroundColor = h;
1023
944
  }), e.appendChild(s), e.appendChild(n), e.appendChild(o), t.appendChild(e), this.element = t, t;
1024
945
  }
1025
946
  getElement() {
@@ -1027,7 +948,7 @@ class f extends F {
1027
948
  }
1028
949
  // Helper method to get normalized hex value
1029
950
  getNormalizedValue() {
1030
- return this.value ? f.normalizeColorValue(this.value) : "#000000";
951
+ return this.value ? m.normalizeColorValue(this.value) : "#000000";
1031
952
  }
1032
953
  // Helper method to check if current value is valid hex
1033
954
  isValidHex() {
@@ -1044,14 +965,14 @@ const j = `
1044
965
  <path d="M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z" stroke="#667085" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.5"/>
1045
966
  <path d="M9 1V17C4.58172 17 1 13.4183 1 9C1 4.58172 4.58172 1 9 1Z" fill="#667085" stroke="#667085" stroke-width="0.5" stroke-linecap="round" stroke-linejoin="round" opacity="0.5"/>
1046
967
  </svg>`;
1047
- class w extends g {
968
+ class C extends g {
1048
969
  constructor(t = {}) {
1049
970
  super({
1050
971
  ...t,
1051
972
  icon: t.icon || j,
1052
973
  title: t.title || "Color & Opacity",
1053
974
  default: t.default || "#000000FF"
1054
- }), this.inputType = "color", this.element = null, this.colorInputEl = null, this.textInputEl = null, this.opacityInputEl = null, this.colorPreviewEl = null, this.detectChange = t.detectChange, this.value && (this.value = w.normalizeHexWithOpacity(this.value));
975
+ }), this.inputType = "color", this.element = null, this.colorInputEl = null, this.textInputEl = null, this.opacityInputEl = null, this.colorPreviewEl = null, this.detectChange = t.detectChange, this.value && (this.value = C.normalizeHexWithOpacity(this.value));
1055
976
  }
1056
977
  static normalizeHexWithOpacity(t) {
1057
978
  return t = t.replace("#", ""), t.length === 3 && (t = t.split("").map((e) => e + e).join("")), t.length === 6 && (t = t + "FF"), t.length === 8 && /^[0-9A-Fa-f]{8}$/.test(t) ? `#${t.toUpperCase()}` : (console.warn(`Invalid hex value "${t}", using default "#000000FF"`), "#000000FF");
@@ -1069,7 +990,7 @@ class w extends g {
1069
990
  return `#${i}${n}`;
1070
991
  }
1071
992
  setValue(t) {
1072
- t === void 0 || t === "" ? this.value = "#000000FF" : this.value = w.normalizeHexWithOpacity(t), this.updateInputElements(), this.updateColorPreview(), this.onChange && this.onChange(this.value), this.detectChange && this.detectChange(this.value);
993
+ t === void 0 || t === "" ? this.value = "#000000FF" : this.value = C.normalizeHexWithOpacity(t), this.updateInputElements(), this.updateColorPreview(), this.onChange && this.onChange(this.value), this.detectChange && this.detectChange(this.value);
1073
994
  }
1074
995
  updateInputElements() {
1075
996
  this.value && (this.colorInputEl && (this.colorInputEl.value = this.getRgbColor()), this.textInputEl && (this.textInputEl.value = this.value), this.opacityInputEl && (this.opacityInputEl.value = this.getOpacityPercent().toString()));
@@ -1080,7 +1001,7 @@ class w extends g {
1080
1001
  this.colorPreviewEl.style.backgroundColor = `rgba(${s}, ${n}, ${a}, ${e})`;
1081
1002
  }
1082
1003
  handleColorChange(t) {
1083
- const e = this.getOpacityPercent(), i = w.combineColorOpacity(t, e);
1004
+ const e = this.getOpacityPercent(), i = C.combineColorOpacity(t, e);
1084
1005
  this.setValue(i);
1085
1006
  }
1086
1007
  handleTextInput(t) {
@@ -1088,7 +1009,7 @@ class w extends g {
1088
1009
  return e || i ? (this.setValue(t), !0) : !1;
1089
1010
  }
1090
1011
  handleOpacityChange(t) {
1091
- const e = this.getRgbColor(), i = Math.max(0, Math.min(100, t)), s = w.combineColorOpacity(e, i);
1012
+ const e = this.getRgbColor(), i = Math.max(0, Math.min(100, t)), s = C.combineColorOpacity(e, i);
1092
1013
  this.setValue(s);
1093
1014
  }
1094
1015
  draw() {
@@ -1151,7 +1072,7 @@ class w extends g {
1151
1072
  };
1152
1073
  }
1153
1074
  }
1154
- class ft extends g {
1075
+ class wt extends g {
1155
1076
  constructor(t = {}) {
1156
1077
  super(t), this.inputType = "text", t.onChange && this.setOnChange(t.onChange);
1157
1078
  }
@@ -1183,7 +1104,7 @@ class ft extends g {
1183
1104
  return e.addEventListener("input", i), e.addEventListener("change", i), e.addEventListener("blur", s), t.appendChild(e), t;
1184
1105
  }
1185
1106
  }
1186
- class C extends g {
1107
+ class f extends g {
1187
1108
  constructor(t) {
1188
1109
  super(t), this.inputType = "number", this.inputElement = null, this.mobileValue = t.mobile, this.validateProps(), this.value = this.validateValue(this.value);
1189
1110
  }
@@ -1242,12 +1163,12 @@ class C extends g {
1242
1163
  );
1243
1164
  }
1244
1165
  }
1245
- const P = `
1166
+ const W = `
1246
1167
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1247
1168
  <path d="M9 17C13.4183 17 17 13.4183 17 9C17 4.58172 13.4183 1 9 1C4.58172 1 1 4.58172 1 9C1 13.4183 4.58172 17 9 17Z" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1248
1169
  <path d="M9 1V17C4.58172 17 1 13.4183 1 9C1 4.58172 4.58172 1 9 1Z" fill="#667085" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1249
1170
  </svg>`;
1250
- class G extends C {
1171
+ class D extends f {
1251
1172
  constructor(t = {}) {
1252
1173
  const e = {
1253
1174
  title: "Opacity",
@@ -1256,7 +1177,7 @@ class G extends C {
1256
1177
  maxValue: 100,
1257
1178
  step: 1,
1258
1179
  default: t.default ?? 100,
1259
- icon: P,
1180
+ icon: W,
1260
1181
  ...t
1261
1182
  };
1262
1183
  super(e), this.inputType = "number", this.mobileValue = t.mobile;
@@ -1268,12 +1189,12 @@ class G extends C {
1268
1189
  this.mobileValue = t, t !== void 0 && this.setValue(t);
1269
1190
  }
1270
1191
  }
1271
- const D = `
1192
+ const _ = `
1272
1193
  <svg xmlns="http://www.w3.org/2000/svg" class="svg-select" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
1273
1194
  <polyline points="6 9 12 15 18 9"></polyline>
1274
1195
  </svg>
1275
1196
  `;
1276
- class N extends g {
1197
+ class I extends g {
1277
1198
  constructor(t = {}) {
1278
1199
  if (super(t), this.inputType = "select", this._options = [], this.isOpen = !1, this.selectedOptionIndex = null, this.optionsListEl = null, this.svgContainer = null, this.buttonEl = null, this.isLoading = !1, this.container = null, this.clickOutsideListener = null, this.resizeListener = null, t.options && (this._options = [...t.options]), t.getOptions && this._options.push(...t.getOptions()), t.getOptionsAsync && (this.isLoading = !0), this.value !== void 0) {
1279
1200
  const e = this._options.findIndex((i) => i.value === this.value);
@@ -1317,7 +1238,7 @@ class N extends g {
1317
1238
  o.onclick = (l) => this.selectOption(l, a, e), i.appendChild(o);
1318
1239
  }), document.body.appendChild(i);
1319
1240
  const s = document.createElement("div");
1320
- return s.classList.add("svg-container"), s.innerHTML = D, t.appendChild(s), this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
1241
+ return s.classList.add("svg-container"), s.innerHTML = _, t.appendChild(s), this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
1321
1242
  this._options.push(...n), this.isLoading = !1, this.updateOptionsList(), this.updateButtonText();
1322
1243
  }).catch((n) => {
1323
1244
  console.error("Failed to fetch async options:", n), this.isLoading = !1, this.updateButtonText("Failed to load options");
@@ -1347,8 +1268,8 @@ class N extends g {
1347
1268
  selectOption(t, e, i) {
1348
1269
  var n, a, o;
1349
1270
  const s = this._options[e];
1350
- s && (this.value = s.value, (n = this.onChange) == null || n.call(this, this.value), this.selectedOptionIndex = e, this.isOpen = !1, i.textContent = s.name, (a = this.optionsListEl) == null || a.classList.remove("open"), (o = this.svgContainer) == null || o.classList.remove("open"), this.cleanupDropdownPosition(), this.optionsListEl && this.optionsListEl.querySelectorAll(".select-option").forEach((r, d) => {
1351
- d === e ? r.classList.add("selected") : r.classList.remove("selected");
1271
+ s && (this.value = s.value, (n = this.onChange) == null || n.call(this, this.value), this.selectedOptionIndex = e, this.isOpen = !1, i.textContent = s.name, (a = this.optionsListEl) == null || a.classList.remove("open"), (o = this.svgContainer) == null || o.classList.remove("open"), this.cleanupDropdownPosition(), this.optionsListEl && this.optionsListEl.querySelectorAll(".select-option").forEach((r, h) => {
1272
+ h === e ? r.classList.add("selected") : r.classList.remove("selected");
1352
1273
  }));
1353
1274
  }
1354
1275
  /**
@@ -1386,7 +1307,7 @@ class N extends g {
1386
1307
  this.clickOutsideListener && (document.removeEventListener("click", this.clickOutsideListener), this.clickOutsideListener = null), this.resizeListener && (window.removeEventListener("resize", this.resizeListener), this.resizeListener = null), this.cleanupDropdownPosition(), this.optionsListEl && this.optionsListEl.parentNode && this.optionsListEl.parentNode.removeChild(this.optionsListEl), super.destroy();
1387
1308
  }
1388
1309
  }
1389
- class W extends g {
1310
+ class J extends g {
1390
1311
  constructor(t = {}) {
1391
1312
  super(t), this.inputType = "button", this.value || (this.value = "center");
1392
1313
  }
@@ -1439,7 +1360,7 @@ class W extends g {
1439
1360
  }), t.appendChild(i), t;
1440
1361
  }
1441
1362
  }
1442
- class vt extends g {
1363
+ class Et extends g {
1443
1364
  constructor(t) {
1444
1365
  super(t), this.inputType = "button", this.bgWithAlpha = "rgba(145, 158, 171, 0.08)";
1445
1366
  }
@@ -1453,8 +1374,8 @@ class vt extends g {
1453
1374
  /^rgba\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)$/i
1454
1375
  );
1455
1376
  if (n) {
1456
- let o = +n[1], l = +n[2], r = +n[3], d = +n[4];
1457
- d >= 1 ? (o = Math.round(o * 0.9), l = Math.round(l * 0.9), r = Math.round(r * 0.9)) : d = Math.min(1, d + 0.12), s = `rgba(${o},${l},${r},${d})`;
1377
+ let o = +n[1], l = +n[2], r = +n[3], h = +n[4];
1378
+ h >= 1 ? (o = Math.round(o * 0.9), l = Math.round(l * 0.9), r = Math.round(r * 0.9)) : h = Math.min(1, h + 0.12), s = `rgba(${o},${l},${r},${h})`;
1458
1379
  }
1459
1380
  t.addEventListener("mouseenter", () => {
1460
1381
  console.log("hoverBg", s), t.style.setProperty("background-color", s, "important");
@@ -1468,27 +1389,27 @@ class vt extends g {
1468
1389
  return a.className = "button-setting-wrapper " + (this.props.wrapperClassName || ""), a.appendChild(t), a;
1469
1390
  }
1470
1391
  }
1471
- class Ct extends g {
1392
+ class bt extends g {
1472
1393
  constructor(t = {}) {
1473
1394
  super(t), this.inputType = { width: "number", height: "number" }, this.aspectRatio = 1, this.isUpdating = !1;
1474
1395
  const e = t.width || 0, i = t.height || 0;
1475
1396
  this.value || (this.value = {
1476
1397
  width: e,
1477
1398
  height: i
1478
- }), this.minWidth = t.minWidth ?? 0, this.maxWidth = t.maxWidth, this.minHeight = t.minHeight ?? 0, this.maxHeight = t.maxHeight, this.locked = t.locked ?? !1, this.value.height > 0 && (this.aspectRatio = this.value.width / this.value.height), this.widthSetting = new C({
1399
+ }), this.minWidth = t.minWidth ?? 0, this.maxWidth = t.maxWidth, this.minHeight = t.minHeight ?? 0, this.maxHeight = t.maxHeight, this.locked = t.locked ?? !1, this.value.height > 0 && (this.aspectRatio = this.value.width / this.value.height), this.widthSetting = new f({
1479
1400
  title: "Width",
1480
1401
  default: this.value.width,
1481
1402
  suffix: "px",
1482
1403
  minValue: this.minWidth,
1483
1404
  maxValue: this.maxWidth,
1484
- icon: J
1485
- }), this.heightSetting = new C({
1405
+ icon: U
1406
+ }), this.heightSetting = new f({
1486
1407
  title: "Height",
1487
1408
  default: this.value.height,
1488
1409
  suffix: "px",
1489
1410
  minValue: this.minHeight,
1490
1411
  maxValue: this.maxHeight,
1491
- icon: U
1412
+ icon: q
1492
1413
  }), this.widthSetting.setOnChange(this.handleWidthChange.bind(this)), this.heightSetting.setOnChange(this.handleHeightChange.bind(this));
1493
1414
  }
1494
1415
  handleWidthChange(t) {
@@ -1582,24 +1503,24 @@ class Ct extends g {
1582
1503
  }
1583
1504
  }
1584
1505
  }
1585
- const J = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1506
+ const U = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1586
1507
  <path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
1587
- </svg>`, U = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1508
+ </svg>`, q = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1588
1509
  <path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
1589
- </svg>`, V = `
1510
+ </svg>`, M = `
1590
1511
  <svg xmlns="http://www.w3.org/2000/svg" width="15" height="16" viewBox="0 0 15 16" fill="none">
1591
1512
  <path d="M5 10.5L7.5 8M7.5 8L10 10.5M7.5 8V13.625M12.5 10.9643C13.2634 10.3338 13.75 9.37996 13.75 8.3125C13.75 6.41402 12.211 4.875 10.3125 4.875C10.1759 4.875 10.0482 4.80375 9.97882 4.68609C9.16379 3.30302 7.65902 2.375 5.9375 2.375C3.34867 2.375 1.25 4.47367 1.25 7.0625C1.25 8.35381 1.77215 9.52317 2.61684 10.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
1592
1513
  </svg>
1593
- `, q = `
1514
+ `, Z = `
1594
1515
  <svg width="91" height="71" viewBox="0 0 91 71" fill="none" xmlns="http://www.w3.org/2000/svg">
1595
1516
  <rect width="91" height="71" rx="4" fill="#F2F4F7"/>
1596
1517
  <path d="M37 31.5L39.5 29M39.5 29L42 31.5M39.5 29V34.625M44.5 31.9643C45.2634 31.3338 45.75 30.38 45.75 29.3125C45.75 27.414 44.211 25.875 42.3125 25.875C42.1759 25.875 42.0482 25.8037 41.9788 25.6861C41.1638 24.303 39.659 23.375 37.9375 23.375C35.3487 23.375 33.25 25.4737 33.25 28.0625C33.25 29.3538 33.7721 30.5232 34.6168 31.371" stroke="#475467" stroke-linecap="round" stroke-linejoin="round"/>
1597
1518
  </svg>
1598
- `, _ = `
1519
+ `, K = `
1599
1520
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 12 12" fill="none">
1600
1521
  <path d="M8 3V2.6C8 2.03995 8 1.75992 7.89101 1.54601C7.79513 1.35785 7.64215 1.20487 7.45399 1.10899C7.24008 1 6.96005 1 6.4 1H5.6C5.03995 1 4.75992 1 4.54601 1.10899C4.35785 1.20487 4.20487 1.35785 4.10899 1.54601C4 1.75992 4 2.03995 4 2.6V3M5 5.75V8.25M7 5.75V8.25M1.5 3H10.5M9.5 3V8.6C9.5 9.44008 9.5 9.86012 9.33651 10.181C9.1927 10.4632 8.96323 10.6927 8.68099 10.8365C8.36012 11 7.94008 11 7.1 11H4.9C4.05992 11 3.63988 11 3.31901 10.8365C3.03677 10.6927 2.8073 10.4632 2.66349 10.181C2.5 9.86012 2.5 9.44008 2.5 8.6V3" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
1601
1522
  </svg>
1602
- `, Z = `
1523
+ `, X = `
1603
1524
  <svg xmlns="http://www.w3.org/2000/svg" width="29" height="29" viewBox="0 0 29 29" fill="none">
1604
1525
  <!-- Top dot -->
1605
1526
  <circle cx="14.5" cy="3" r="1.5" fill="#02CC59" opacity="1"/>
@@ -1619,7 +1540,7 @@ const J = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBo
1619
1540
  <circle cx="6.7" cy="6.7" r="1.5" fill="#02CC59" opacity="0.3"/>
1620
1541
  </svg>
1621
1542
  `;
1622
- class K extends g {
1543
+ class Q extends g {
1623
1544
  constructor(t = {}) {
1624
1545
  super(t), this.inputType = "button", this.previewWrapper = null, this.previewEl = null, this.emptyStateEl = null, this.errorContainer = null, this.messageListener = null, this.loadingSpinner = null, this.props.delete === void 0 && (this.props.delete = !0), this.props.maxFileSizeMB === void 0 && (this.props.maxFileSizeMB = 5), !this.value && t.defaultUrl && t.defaultUrl !== "" && (this.value = t.defaultUrl), this.setupMessageListener();
1625
1546
  }
@@ -1669,7 +1590,7 @@ class K extends g {
1669
1590
  );
1670
1591
  if (t && t !== "") {
1671
1592
  this.showLoading(), s && s instanceof HTMLElement && (s.style.display = "none"), e && e.classList.remove("no-image"), i && (i.innerHTML = `
1672
- <span class="upload-icon">${V}</span>
1593
+ <span class="upload-icon">${M}</span>
1673
1594
  <span class="upload-label">Replace</span>
1674
1595
  `);
1675
1596
  const n = () => {
@@ -1680,7 +1601,7 @@ class K extends g {
1680
1601
  this.previewEl.addEventListener("load", n), this.previewEl.addEventListener("error", a), this.previewEl.src = t;
1681
1602
  } else
1682
1603
  this.hideLoading(), this.previewWrapper.classList.remove("has-image"), this.previewEl.src = "", this.previewEl.style.display = "none", this.previewWrapper.style.display = "none", s && s instanceof HTMLElement && (s.style.display = "block"), e && e.classList.add("no-image"), i && (i.innerHTML = `
1683
- <span class="upload-icon">${V}</span>
1604
+ <span class="upload-icon">${M}</span>
1684
1605
  <span class="upload-label">Upload</span>
1685
1606
  `);
1686
1607
  }
@@ -1713,9 +1634,9 @@ class K extends g {
1713
1634
  const s = this.value && this.value !== "";
1714
1635
  s || i.classList.add("no-image");
1715
1636
  const n = document.createElement("div");
1716
- if (n.className = "preview-placeholder", n.innerHTML = q, this.previewWrapper = document.createElement("div"), this.previewWrapper.className = "preview-wrapper", this.loadingSpinner = document.createElement("div"), this.loadingSpinner.className = "loading-spinner", this.loadingSpinner.innerHTML = Z, this.loadingSpinner.style.display = "none", this.previewWrapper.appendChild(this.loadingSpinner), this.previewEl = document.createElement("img"), this.previewEl.className = "upload-preview", this.props.delete) {
1637
+ if (n.className = "preview-placeholder", n.innerHTML = Z, this.previewWrapper = document.createElement("div"), this.previewWrapper.className = "preview-wrapper", this.loadingSpinner = document.createElement("div"), this.loadingSpinner.className = "loading-spinner", this.loadingSpinner.innerHTML = X, this.loadingSpinner.style.display = "none", this.previewWrapper.appendChild(this.loadingSpinner), this.previewEl = document.createElement("img"), this.previewEl.className = "upload-preview", this.props.delete) {
1717
1638
  const o = document.createElement("button");
1718
- o.className = "delete-button", o.type = "button", o.title = "Delete image", o.innerHTML = _, this.previewWrapper.appendChild(o), o.onclick = (l) => {
1639
+ o.className = "delete-button", o.type = "button", o.title = "Delete image", o.innerHTML = K, this.previewWrapper.appendChild(o), o.onclick = (l) => {
1719
1640
  var r;
1720
1641
  l.stopPropagation(), this.value = "", this.updatePreviewState(null), (r = this.onChange) == null || r.call(this, ""), this.hideError();
1721
1642
  };
@@ -1723,7 +1644,7 @@ class K extends g {
1723
1644
  this.previewWrapper.appendChild(this.previewEl);
1724
1645
  const a = document.createElement("button");
1725
1646
  return a.className = "upload-button", a.innerHTML = `
1726
- <span class="upload-icon">${V}</span>
1647
+ <span class="upload-icon">${M}</span>
1727
1648
  <span class="upload-label">Upload</span>
1728
1649
  `, i.appendChild(n), i.appendChild(this.previewWrapper), i.appendChild(a), t.appendChild(i), s ? this.updatePreviewState(this.value) : this.updatePreviewState(null), a.onclick = () => {
1729
1650
  window.postMessage(
@@ -1736,14 +1657,14 @@ class K extends g {
1736
1657
  }, t;
1737
1658
  }
1738
1659
  }
1739
- class wt extends C {
1660
+ class xt extends f {
1740
1661
  constructor(t = {}) {
1741
1662
  super({
1742
1663
  ...t,
1743
1664
  title: t.title || "Height",
1744
1665
  suffix: t.suffix || "px",
1745
1666
  minValue: t.minValue ?? 0,
1746
- icon: t.icon || X,
1667
+ icon: t.icon || Y,
1747
1668
  default: t.default ?? 100
1748
1669
  }), this.inputType = "number", this.mobileValue = t.mobile;
1749
1670
  }
@@ -1754,17 +1675,17 @@ class wt extends C {
1754
1675
  this.mobileValue = t, t !== void 0 && this.setValue(t);
1755
1676
  }
1756
1677
  }
1757
- const X = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1678
+ const Y = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1758
1679
  <path d="M9 14L9 5M9 14L6.75 12.5M9 14L11.25 12.5M9 5L6.75 6.5M9 5L11.25 6.5M15.75 2.75H2.25M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
1759
1680
  </svg>`;
1760
- class Et extends C {
1681
+ class Lt extends f {
1761
1682
  constructor(t = {}) {
1762
1683
  super({
1763
1684
  ...t,
1764
1685
  title: t.title || "Width",
1765
1686
  suffix: t.suffix || "px",
1766
1687
  minValue: t.minValue ?? 0,
1767
- icon: t.icon || Q,
1688
+ icon: t.icon || tt,
1768
1689
  default: t.default ?? 100
1769
1690
  }), this.inputType = "number", this.mobileValue = t.mobile;
1770
1691
  }
@@ -1775,14 +1696,14 @@ class Et extends C {
1775
1696
  this.mobileValue = t, t !== void 0 && this.setValue(t);
1776
1697
  }
1777
1698
  }
1778
- const Q = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1699
+ const tt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1779
1700
  <path d="M4.5 9.5H13.5M4.5 9.5L6 7.25M4.5 9.5L6 11.75M13.5 9.5L12 7.25M13.5 9.5L12 11.75M15.75 16.25V2.75M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
1780
- </svg>`, Y = `
1701
+ </svg>`, et = `
1781
1702
  <svg xmlns="http://www.w3.org/2000/svg" class="svg-select-api" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down">
1782
1703
  <polyline points="6 9 12 15 18 9"></polyline>
1783
1704
  </svg>
1784
1705
  `;
1785
- class bt extends g {
1706
+ class yt extends g {
1786
1707
  constructor(t = {}) {
1787
1708
  if (super(t), this.inputType = "select", this._options = [], this.isOpen = !1, this.selectedOptionIndex = null, this.optionsListEl = null, this.svgContainer = null, this.buttonEl = null, this.isLoading = !1, this.container = null, this.hasInitializedOptions = !1, this.selectedOptionIndex = null, t.default !== void 0 && (this.value = t.default), this.initializeOptions(t), !t.getOptionsAsync && this.value !== void 0) {
1788
1709
  const e = this._options.findIndex(
@@ -1837,7 +1758,7 @@ class bt extends g {
1837
1758
  o.onclick = (l) => this.selectApiOption(l, a, e), i.appendChild(o);
1838
1759
  }), t.appendChild(i);
1839
1760
  const s = document.createElement("div");
1840
- return s.classList.add("svg-container"), s.innerHTML = Y, t.appendChild(s), s.onclick = () => {
1761
+ return s.classList.add("svg-container"), s.innerHTML = et, t.appendChild(s), s.onclick = () => {
1841
1762
  var n, a;
1842
1763
  this.isLoading || (this.isOpen = !this.isOpen, (n = this.optionsListEl) == null || n.classList.toggle("open", this.isOpen), (a = this.svgContainer) == null || a.classList.toggle("open", this.isOpen));
1843
1764
  }, this.optionsListEl = i, this.svgContainer = s, this.props.getOptionsAsync && !this.hasInitializedOptions ? (this.isLoading = !0, this.updateButtonText(), this.props.getOptionsAsync().then((n) => {
@@ -1884,7 +1805,7 @@ class bt extends g {
1884
1805
  return JSON.stringify(t ? {} : { value: this.value }, null, 2);
1885
1806
  }
1886
1807
  selectApiOption(t, e, i) {
1887
- var l, r, d, c;
1808
+ var l, r, h, d;
1888
1809
  const s = t.target, n = s.querySelector(".select-api-radio") || ((l = s.closest(".select-api-option")) == null ? void 0 : l.querySelector(".select-api-radio"));
1889
1810
  n && (n.checked = !0), this.selectedOptionIndex = e;
1890
1811
  const a = this._options[e].value;
@@ -1896,7 +1817,7 @@ class bt extends g {
1896
1817
  const u = i.firstChild;
1897
1818
  u && u.tagName === "SPAN" && (u.textContent = this._options[e].name);
1898
1819
  }
1899
- this.isOpen = !1, (r = this.optionsListEl) == null || r.classList.remove("open"), (d = this.svgContainer) == null || d.classList.remove("open"), (c = this.onChange) == null || c.call(this, a), this.detectChangeCallback && this.detectChangeCallback(a);
1820
+ this.isOpen = !1, (r = this.optionsListEl) == null || r.classList.remove("open"), (h = this.svgContainer) == null || h.classList.remove("open"), (d = this.onChange) == null || d.call(this, a), this.detectChangeCallback && this.detectChangeCallback(a);
1900
1821
  }
1901
1822
  updateOptionsList() {
1902
1823
  !this.optionsListEl || !this.buttonEl || (this.optionsListEl.innerHTML = "", this._options.forEach((t, e) => {
@@ -1929,7 +1850,7 @@ class bt extends g {
1929
1850
  ), this.updateButtonText();
1930
1851
  }
1931
1852
  }
1932
- class xt extends g {
1853
+ class kt extends g {
1933
1854
  constructor(t) {
1934
1855
  var e, i;
1935
1856
  super(t), this.inputType = "text", this.value = t.default ?? ((i = (e = t.options) == null ? void 0 : e[0]) == null ? void 0 : i.value) ?? "", this.detectChangeCallback = t.detectChange;
@@ -1952,19 +1873,19 @@ class xt extends g {
1952
1873
  i.className = "toggle-switch";
1953
1874
  const s = document.createElement("input");
1954
1875
  s.type = "checkbox", s.checked = ((o = (a = this.props.options) == null ? void 0 : a.find((l) => l.value === this.value)) == null ? void 0 : o.status) ?? !1, s.addEventListener("change", () => {
1955
- var r, d;
1956
- const l = ((d = (r = this.props.options) == null ? void 0 : r.find((c) => c.status === s.checked)) == null ? void 0 : d.value) ?? "";
1876
+ var r, h;
1877
+ const l = ((h = (r = this.props.options) == null ? void 0 : r.find((d) => d.status === s.checked)) == null ? void 0 : h.value) ?? "";
1957
1878
  this.value = l, this.onChange && this.onChange(this.value), this.detectChangeCallback && this.detectChangeCallback(this.value);
1958
1879
  });
1959
1880
  const n = document.createElement("span");
1960
1881
  if (n.className = "toggle-slider", this.props.activeColor || this.props.inactiveColor) {
1961
- const l = document.createElement("style"), r = this.props.activeColor || "#4CAF50", d = this.props.inactiveColor || "#ccc";
1882
+ const l = document.createElement("style"), r = this.props.activeColor || "#4CAF50", h = this.props.inactiveColor || "#ccc";
1962
1883
  l.textContent = `
1963
1884
  .toggle-switch input:checked + .toggle-slider {
1964
1885
  background-color: ${r};
1965
1886
  }
1966
1887
  .toggle-switch .toggle-slider {
1967
- background-color: ${d};
1888
+ background-color: ${h};
1968
1889
  }
1969
1890
  `, document.head.appendChild(l);
1970
1891
  }
@@ -1974,13 +1895,13 @@ class xt extends g {
1974
1895
  this.detectChangeCallback = t;
1975
1896
  }
1976
1897
  }
1977
- const tt = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1898
+ const it = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
1978
1899
  <path d="M13.3334 5.99996H2.66675M13.3334 9.99996H2.66675M5.33341 12.6666V3.33329M10.6667 12.6666V3.33329" stroke="#667085" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
1979
1900
  </svg>`;
1980
- class yt extends g {
1901
+ class Mt extends g {
1981
1902
  // Store mobile value
1982
1903
  constructor(t = {}) {
1983
- t.rowGap = t.rowGap ?? !0, t.columnGap = t.columnGap ?? !0, t.title = t.title ?? "Gap", t.icon = t.icon ?? tt, t.suffix = t.suffix ?? "px", t.minValue = t.minValue ?? 0, super(t), this.inputType = "number", this.inputValues = {}, this.mobileValue = t.mobile, this.value = this.validateValue(t.default ?? 0), t.rowGap && (this.inputValues.row = this.value), t.columnGap && (this.inputValues.column = this.value);
1904
+ t.rowGap = t.rowGap ?? !0, t.columnGap = t.columnGap ?? !0, t.title = t.title ?? "Gap", t.icon = t.icon ?? it, t.suffix = t.suffix ?? "px", t.minValue = t.minValue ?? 0, super(t), this.inputType = "number", this.inputValues = {}, this.mobileValue = t.mobile, this.value = this.validateValue(t.default ?? 0), t.rowGap && (this.inputValues.row = this.value), t.columnGap && (this.inputValues.column = this.value);
1984
1905
  }
1985
1906
  draw() {
1986
1907
  const t = document.createElement("div");
@@ -2031,53 +1952,53 @@ class yt extends g {
2031
1952
  this.mobileValue = t, t !== void 0 && this.setValue(t);
2032
1953
  }
2033
1954
  }
2034
- const et = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1955
+ const st = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2035
1956
  <path d="M2.25 11.75H15.75M5.85 2.75H12.15C13.4101 2.75 14.0402 2.75 14.5215 2.99524C14.9448 3.21095 15.289 3.55516 15.5048 3.97852C15.75 4.45982 15.75 5.08988 15.75 6.35V12.65C15.75 13.9101 15.75 14.5402 15.5048 15.0215C15.289 15.4448 14.9448 15.789 14.5215 16.0048C14.0402 16.25 13.4101 16.25 12.15 16.25H5.85C4.58988 16.25 3.95982 16.25 3.47852 16.0048C3.05516 15.789 2.71095 15.4448 2.49524 15.0215C2.25 14.5402 2.25 13.9101 2.25 12.65V6.35C2.25 5.08988 2.25 4.45982 2.49524 3.97852C2.71095 3.55516 3.05516 3.21095 3.47852 2.99524C3.95982 2.75 4.58988 2.75 5.85 2.75Z" stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2036
1957
  </svg>`;
2037
- class Lt extends C {
1958
+ class Vt extends f {
2038
1959
  constructor(t = {}) {
2039
1960
  super({
2040
1961
  ...t,
2041
1962
  minValue: t.minValue ?? 0,
2042
1963
  maxValue: t.maxValue ?? 1e3,
2043
- icon: t.icon || et,
1964
+ icon: t.icon || st,
2044
1965
  title: t.title || "Margin Bottom",
2045
1966
  default: t.default ?? 20,
2046
1967
  wrapperClassName: "margin-bottom-wrapper " + (t.wrapperClassName || "")
2047
1968
  }), this.inputType = "number";
2048
1969
  }
2049
1970
  }
2050
- const it = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
1971
+ const nt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2051
1972
  <path d="M15.75 7.25H2.25m9.9 9h-6.3c-1.26 0-1.89 0-2.371-.245a2.25 2.25 0 0 1-.984-.983c-.245-.482-.245-1.112-.245-2.372v-6.3c0-1.26 0-1.89.245-2.371a2.25 2.25 0 0 1 .984-.984c.48-.245 1.11-.245 2.371-.245h6.3c1.26 0 1.89 0 2.371.245.424.216.768.56.984.984.245.48.245 1.11.245 2.371v6.3c0 1.26 0 1.89-.245 2.371-.216.424-.56.768-.984.984-.48.245-1.11.245-2.371.245"
2052
1973
  stroke="#667085" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2053
1974
  </svg>`;
2054
- class kt extends C {
1975
+ class It extends f {
2055
1976
  constructor(t = {}) {
2056
1977
  super({
2057
1978
  ...t,
2058
1979
  minValue: t.minValue ?? 0,
2059
1980
  maxValue: t.maxValue ?? 1e3,
2060
- icon: t.icon || it,
1981
+ icon: t.icon || nt,
2061
1982
  title: t.title || "Margin Top",
2062
1983
  default: t.default ?? 20,
2063
1984
  wrapperClassName: "margin-top-wrapper " + (t.wrapperClassName || "")
2064
1985
  }), this.inputType = "number";
2065
1986
  }
2066
1987
  }
2067
- const st = `
1988
+ const at = `
2068
1989
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2069
1990
  <polyline points="3,6 5,6 21,6"></polyline>
2070
1991
  <path d="m19,6v14a2,2 0 0,1-2,2H7a2,2 0 0,1-2-2V6m3,0V4a2,2 0 0,1,2-2h4a2,2 0 0,1,2,2v2"></path>
2071
1992
  <line x1="10" y1="11" x2="10" y2="17"></line>
2072
1993
  <line x1="14" y1="11" x2="14" y2="17"></line>
2073
1994
  </svg>
2074
- `, nt = `
1995
+ `, ot = `
2075
1996
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
2076
1997
  <line x1="12" y1="5" x2="12" y2="19"></line>
2077
1998
  <line x1="5" y1="12" x2="19" y2="12"></line>
2078
1999
  </svg>
2079
2000
  `;
2080
- class Mt extends g {
2001
+ class St extends g {
2081
2002
  constructor(t = {}) {
2082
2003
  super(t), this.inputType = {}, this.container = null, this.languagesContainer = null, this.addLanguageSelect = null, this.addButton = null, this.defaultLanguages = [
2083
2004
  { code: "en", name: "English" },
@@ -2125,7 +2046,7 @@ class Mt extends g {
2125
2046
  this.updateLanguageValue(t, r.value);
2126
2047
  });
2127
2048
  const o = document.createElement("button");
2128
- return o.type = "button", o.classList.add("delete-language-btn"), o.innerHTML = st, o.title = `Delete ${t.toUpperCase()}`, o.addEventListener("click", () => {
2049
+ return o.type = "button", o.classList.add("delete-language-btn"), o.innerHTML = at, o.title = `Delete ${t.toUpperCase()}`, o.addEventListener("click", () => {
2129
2050
  this.removeLanguage(t);
2130
2051
  }), n.appendChild(a), n.appendChild(o), i.appendChild(s), i.appendChild(n), i;
2131
2052
  }
@@ -2158,7 +2079,7 @@ class Mt extends g {
2158
2079
  const s = document.createElement("select");
2159
2080
  s.classList.add("add-language-select"), this.addLanguageSelect = s;
2160
2081
  const n = document.createElement("button");
2161
- return n.type = "button", n.classList.add("add-language-btn"), n.innerHTML = `${nt} Add`, this.addButton = n, n.addEventListener("click", () => {
2082
+ return n.type = "button", n.classList.add("add-language-btn"), n.innerHTML = `${ot} Add`, this.addButton = n, n.addEventListener("click", () => {
2162
2083
  const a = s.value;
2163
2084
  a && this.addLanguage(a);
2164
2085
  }), i.appendChild(s), i.appendChild(n), t.appendChild(e), t.appendChild(i), t;
@@ -2186,7 +2107,7 @@ class Mt extends g {
2186
2107
  }), this.updateAddLanguageSelect());
2187
2108
  }
2188
2109
  }
2189
- class Vt extends g {
2110
+ class Nt extends g {
2190
2111
  constructor(t = {}) {
2191
2112
  super(t), this.inputType = "select";
2192
2113
  const e = [
@@ -2197,7 +2118,7 @@ class Vt extends g {
2197
2118
  { name: "Bounce", value: "bounce 1.5s ease-in-out infinite" },
2198
2119
  { name: "Pulse", value: "pulse 1.5s ease-in-out infinite" }
2199
2120
  ];
2200
- this.selectSetting = new N({
2121
+ this.selectSetting = new I({
2201
2122
  title: this.title || "Animation",
2202
2123
  options: e,
2203
2124
  default: this.props.default || "none"
@@ -2213,34 +2134,33 @@ class Vt extends g {
2213
2134
  this.selectSetting.destroy(), super.destroy();
2214
2135
  }
2215
2136
  }
2216
- const ot = `
2137
+ const lt = `
2217
2138
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2218
2139
  <path d="M5.625 9.5H5.6325M12.375 9.5H12.3825M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 6.35L2.25 12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75L5.85 2.75C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
2219
2140
  </svg>
2220
- `, at = `
2141
+ `, rt = `
2221
2142
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2222
2143
  <path d="M6 2.75H5.85C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35V6.5M6 16.25H5.85C4.58988 16.25 3.95982 16.25 3.47852 16.0048C3.05516 15.789 2.71095 15.4448 2.49524 15.0215C2.25 14.5402 2.25 13.9101 2.25 12.65V12.5M15.75 6.5V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75H12M15.75 12.5V12.65C15.75 13.9101 15.75 14.5402 15.5048 15.0215C15.289 15.4448 14.9448 15.789 14.5215 16.0048C14.0402 16.25 13.4101 16.25 12.15 16.25H12" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
2223
2144
  </svg>
2224
2145
  `;
2225
- class It extends v {
2146
+ class Ot extends v {
2226
2147
  constructor(t) {
2227
2148
  super({
2228
2149
  title: "Border",
2229
2150
  collapsed: t == null ? void 0 : t.collapsed,
2230
- hideCondition: t == null ? void 0 : t.hideCondition,
2231
2151
  settings: {
2232
- size: new C({
2152
+ size: new f({
2233
2153
  title: "Size",
2234
- icon: at,
2154
+ icon: rt,
2235
2155
  default: (t == null ? void 0 : t.size) ?? 0,
2236
2156
  suffix: "px"
2237
2157
  }),
2238
- color: new w({
2158
+ color: new C({
2239
2159
  default: (t == null ? void 0 : t.color) ?? "0, 0, 30"
2240
2160
  }),
2241
- radius: new C({
2161
+ radius: new f({
2242
2162
  title: "Radius",
2243
- icon: ot,
2163
+ icon: lt,
2244
2164
  default: (t == null ? void 0 : t.radius) ?? 12,
2245
2165
  suffix: "px"
2246
2166
  })
@@ -2259,34 +2179,33 @@ class It extends v {
2259
2179
  `;
2260
2180
  }
2261
2181
  }
2262
- const lt = `
2182
+ const ct = `
2263
2183
  <svg xmlns="http://www.w3.org/2000/svg" width="14" height="13" viewBox="0 0 14 13" fill="none">
2264
2184
  <path d="M1 2.75C1 2.05109 1 1.70163 1.11418 1.42597C1.26642 1.05843 1.55843 0.766422 1.92597 0.614181C2.20163 0.5 2.55109 0.5 3.25 0.5H10.75C11.4489 0.5 11.7984 0.5 12.074 0.614181C12.4416 0.766422 12.7336 1.05843 12.8858 1.42597C13 1.70163 13 2.05109 13 2.75M4.75 12.5H9.25M7 0.5V12.5" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
2265
2185
  </svg>
2266
- `, rt = `
2186
+ `, ht = `
2267
2187
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2268
2188
  <path d="M3 5.75C3 5.05109 3 4.70163 3.11418 4.42597C3.26642 4.05843 3.55843 3.76642 3.92597 3.61418C4.20163 3.5 4.55109 3.5 5.25 3.5H12.75C13.4489 3.5 13.7984 3.5 14.074 3.61418C14.4416 3.76642 14.7336 4.05843 14.8858 4.42597C15 4.70163 15 5.05109 15 5.75M6 15.5H12M7.6875 3.5V15.5M10.3125 3.5V15.5" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
2269
2189
  </svg>
2270
- `, ct = `
2190
+ `, dt = `
2271
2191
  <svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2272
2192
  <path d="M6 5.75H12M9 5.75V13.25M5.85 16.25H12.15C13.4101 16.25 14.0402 16.25 14.5215 16.0048C14.9448 15.789 15.289 15.4448 15.5048 15.0215C15.75 14.5402 15.75 13.9101 15.75 12.65V6.35C15.75 5.08988 15.75 4.45982 15.5048 3.97852C15.289 3.55516 14.9448 3.21095 14.5215 2.99524C14.0402 2.75 13.4101 2.75 12.15 2.75H5.85C4.58988 2.75 3.95982 2.75 3.47852 2.99524C3.05516 3.21095 2.71095 3.55516 2.49524 3.97852C2.25 4.45982 2.25 5.08988 2.25 6.35V12.65C2.25 13.9101 2.25 14.5402 2.49524 15.0215C2.71095 15.4448 3.05516 15.789 3.47852 16.0048C3.95982 16.25 4.58988 16.25 5.85 16.25Z" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
2273
2193
  </svg>
2274
2194
  `;
2275
- class Nt extends v {
2195
+ class Ht extends v {
2276
2196
  constructor(t = {}) {
2277
2197
  const { showAlign: e = t.showAlign ?? !0, ...i } = t;
2278
2198
  super({
2279
2199
  title: i.title || "Typography",
2280
2200
  collapsed: i.collapsed,
2281
- hideCondition: i.hideCondition,
2282
2201
  settings: (() => {
2283
2202
  const s = {
2284
- color: new w({
2203
+ color: new C({
2285
2204
  default: i.colorDefault ?? "0, 0, 30"
2286
2205
  }),
2287
- fontFamily: new N({
2206
+ fontFamily: new I({
2288
2207
  title: "Font",
2289
- icon: lt,
2208
+ icon: ct,
2290
2209
  default: i.fontFamilyDefault ?? "Satoshi",
2291
2210
  options: i.fontFamilyOptions ?? [
2292
2211
  { name: "Alt", value: "Croco Sans Black Caps Alt" },
@@ -2297,9 +2216,9 @@ class Nt extends v {
2297
2216
  getOptions: i.fontFamilyGetOptions,
2298
2217
  getOptionsAsync: i.fontFamilyGetOptionsAsync
2299
2218
  }),
2300
- fontWeight: new N({
2219
+ fontWeight: new I({
2301
2220
  title: "Weight",
2302
- icon: rt,
2221
+ icon: ht,
2303
2222
  default: i.fontWeightDefault ?? "400",
2304
2223
  options: i.fontWeightOptions ?? [
2305
2224
  { name: "Regular", value: "400" },
@@ -2309,9 +2228,9 @@ class Nt extends v {
2309
2228
  getOptions: i.fontWeightGetOptions,
2310
2229
  getOptionsAsync: i.fontWeightGetOptionsAsync
2311
2230
  }),
2312
- fontSize: new C({
2231
+ fontSize: new f({
2313
2232
  title: "Size",
2314
- icon: ct,
2233
+ icon: dt,
2315
2234
  default: i.fontSizeDefault ?? 12,
2316
2235
  suffix: "px",
2317
2236
  mobile: i.fontSizeMobileDefault
@@ -2319,7 +2238,7 @@ class Nt extends v {
2319
2238
  };
2320
2239
  return e ? {
2321
2240
  ...s,
2322
- align: new W({
2241
+ align: new J({
2323
2242
  title: "Align",
2324
2243
  default: i.alignDefault ?? "center"
2325
2244
  })
@@ -2339,7 +2258,7 @@ class Nt extends v {
2339
2258
  `;
2340
2259
  }
2341
2260
  }
2342
- class y extends g {
2261
+ class E extends g {
2343
2262
  constructor(t) {
2344
2263
  super({
2345
2264
  ...t,
@@ -2350,8 +2269,8 @@ class y extends g {
2350
2269
  const t = this.value === "auto" ? "text" : "number", e = (o) => {
2351
2270
  this.value !== "auto" && (this.props.minValue !== void 0 && (o.min = String(this.props.minValue)), this.props.maxValue !== void 0 && (o.max = String(this.props.maxValue)), this.props.className && o.classList.add(this.props.className), o.addEventListener("input", () => {
2352
2271
  const l = this.props.minValue ?? Number.MIN_SAFE_INTEGER, r = this.props.maxValue ?? Number.MAX_SAFE_INTEGER;
2353
- let d = Number(o.value);
2354
- d < l && (d = l), d > r && (d = r), o.value = String(d);
2272
+ let h = Number(o.value);
2273
+ h < l && (h = l), h > r && (h = r), o.value = String(h);
2355
2274
  }));
2356
2275
  }, i = this.createInput({
2357
2276
  value: this.value,
@@ -2385,34 +2304,33 @@ class y extends g {
2385
2304
  }), i;
2386
2305
  }
2387
2306
  }
2388
- class St extends v {
2307
+ class Tt extends v {
2389
2308
  constructor(t) {
2390
2309
  super({
2391
2310
  title: "Margins",
2392
2311
  collapsed: t == null ? void 0 : t.collapsed,
2393
- hideCondition: t == null ? void 0 : t.hideCondition,
2394
2312
  settings: {
2395
- marginTop: new y({
2313
+ marginTop: new E({
2396
2314
  title: "Top",
2397
- icon: ht,
2315
+ icon: ut,
2398
2316
  suffix: "px",
2399
2317
  default: (t == null ? void 0 : t.marginTop) ?? "auto"
2400
2318
  }),
2401
- marginRight: new y({
2319
+ marginRight: new E({
2402
2320
  title: "Right",
2403
- icon: dt,
2321
+ icon: pt,
2404
2322
  suffix: "px",
2405
2323
  default: (t == null ? void 0 : t.marginRight) ?? 0
2406
2324
  }),
2407
- marginBottom: new y({
2325
+ marginBottom: new E({
2408
2326
  title: "Bottom",
2409
- icon: ut,
2327
+ icon: gt,
2410
2328
  suffix: "px",
2411
2329
  default: (t == null ? void 0 : t.marginBottom) ?? 0
2412
2330
  }),
2413
- marginLeft: new y({
2331
+ marginLeft: new E({
2414
2332
  title: "Left",
2415
- icon: pt,
2333
+ icon: mt,
2416
2334
  suffix: "px",
2417
2335
  default: (t == null ? void 0 : t.marginLeft) ?? 0
2418
2336
  })
@@ -2429,61 +2347,34 @@ class St extends v {
2429
2347
  `;
2430
2348
  }
2431
2349
  }
2432
- const ht = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2350
+ const ut = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2433
2351
  <path d="M2.25 16.25H2.2575M2.25 9.5H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M5.625 16.25H5.6325M5.625 9.5H5.6325M12.375 16.25H12.3825M12.375 9.5H12.3825M9 16.25H9.0075M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 16.25H15.7575M15.75 9.5H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M15.75 2.75H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
2434
- </svg>`, dt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2352
+ </svg>`, pt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2435
2353
  <path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 16.25H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M15.75 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
2436
- </svg>`, ut = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2354
+ </svg>`, gt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2437
2355
  <path d="M2.25 2.75H2.2575M2.25 9.5H2.2575M2.25 12.875H2.2575M2.25 6.125H2.2575M5.625 2.75H5.6325M5.625 9.5H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M15.75 16.25H2.25" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
2438
- </svg>`, pt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2356
+ </svg>`, mt = `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="19" viewBox="0 0 18 19" fill="none">
2439
2357
  <path d="M5.625 2.75H5.6325M5.625 9.5H5.6325M5.625 16.25H5.6325M12.375 2.75H12.3825M12.375 9.5H12.3825M12.375 16.25H12.3825M9 2.75H9.0075M9 9.5H9.0075M9 16.25H9.0075M9 12.875H9.0075M9 6.125H9.0075M15.75 2.75H15.7575M15.75 9.5H15.7575M15.75 16.25H15.7575M15.75 12.875H15.7575M15.75 6.125H15.7575M2.25 16.25V2.75" stroke="#667085" stroke-linecap="round" stroke-linejoin="round"/>
2440
2358
  </svg>`;
2441
- class Ot extends v {
2442
- /**
2443
- * Constructs a new BackgroundSettingSet.
2444
- *
2445
- * @param props An object that may include default values for each setting and additional
2446
- * properties for the UploadSetting via `uploadProps`.
2447
- *
2448
- * Example:
2449
- * {
2450
- * backgroundImage: 'https://example.com/myimage.png',
2451
- * opacity: 80,
2452
- * backgroundColor: "0, 0, 30",
2453
- * uploadProps: {
2454
- * uploadUrl: 'https://st-admapi.onaim.io/api/File/UploadImage',
2455
- * requestMethod: 'POST',
2456
- * requestHeaders: {
2457
- * accept: 'text/plain',
2458
- * Authorization: 'bearer <your-token-here>',
2459
- * },
2460
- * formFieldName: 'File',
2461
- * parseResponse: (data) => data.data.url,
2462
- * }
2463
- * }
2464
- */
2359
+ class At extends v {
2465
2360
  constructor(t) {
2466
2361
  super({
2467
2362
  title: "Background Image",
2468
2363
  collapsed: t == null ? void 0 : t.collapsed,
2469
- hideCondition: t == null ? void 0 : t.hideCondition,
2470
2364
  settings: {
2471
- backgroundImage: new K({
2365
+ backgroundImage: new Q({
2472
2366
  ...t == null ? void 0 : t.uploadProps,
2473
2367
  default: (t == null ? void 0 : t.backgroundImage) ?? ""
2474
2368
  }),
2475
- opacity: new G({
2369
+ opacity: new D({
2476
2370
  default: (t == null ? void 0 : t.opacity) ?? 100
2477
2371
  }),
2478
- backgroundColor: new w({
2372
+ backgroundColor: new C({
2479
2373
  default: (t == null ? void 0 : t.backgroundColor) ?? "0, 0, 30"
2480
2374
  })
2481
2375
  }
2482
2376
  });
2483
2377
  }
2484
- /**
2485
- * Override draw() to reorder the child settings and insert an "OR" label between the two sections.
2486
- */
2487
2378
  draw() {
2488
2379
  const t = super.draw(), e = t.querySelector(".setting-group-content");
2489
2380
  if (!e) return t;
@@ -2492,9 +2383,6 @@ class Ot extends v {
2492
2383
  const o = document.createElement("div");
2493
2384
  return o.className = "bgset-or-label", o.textContent = "OR", e.appendChild(o), e.appendChild(a), t;
2494
2385
  }
2495
- /**
2496
- * Helper method to generate CSS based on the current settings.
2497
- */
2498
2386
  getCssCode() {
2499
2387
  const t = this.settings.backgroundImage.value || "", e = this.settings.opacity.value ?? 100, i = this.settings.backgroundColor.value || "#000000";
2500
2388
  return t ? `
@@ -2507,44 +2395,46 @@ class Ot extends v {
2507
2395
  `;
2508
2396
  }
2509
2397
  }
2510
- function Ht(h) {
2511
- return h instanceof v;
2398
+ function Bt(c) {
2399
+ return p(c);
2512
2400
  }
2513
- function Tt(h) {
2514
- return h instanceof g;
2401
+ function $t(c) {
2402
+ return w(c);
2515
2403
  }
2516
2404
  export {
2517
- W as AlignSetting,
2518
- Vt as AnimationSetting,
2519
- Ot as BackgroundSettingSet,
2520
- It as BorderSettingSet,
2521
- vt as ButtonSetting,
2522
- f as ColorSetting,
2523
- w as ColorWithOpacitySetting,
2524
- Ct as DimensionSetting,
2525
- yt as GapSetting,
2526
- Nt as HeaderTypographySettingSet,
2527
- wt as HeightSetting,
2528
- ft as HtmlSetting,
2529
- Lt as MarginBottomSetting,
2530
- St as MarginSettingGroup,
2531
- kt as MarginTopSetting,
2532
- Mt as MultiLanguageSetting,
2533
- C as NumberSetting,
2534
- G as OpacitySetting,
2535
- bt as SelectApiSettings,
2536
- N as SelectSetting,
2405
+ J as AlignSetting,
2406
+ Nt as AnimationSetting,
2407
+ At as BackgroundSettingSet,
2408
+ Ot as BorderSettingSet,
2409
+ Et as ButtonSetting,
2410
+ m as ColorSetting,
2411
+ C as ColorWithOpacitySetting,
2412
+ bt as DimensionSetting,
2413
+ Mt as GapSetting,
2414
+ Ht as HeaderTypographySettingSet,
2415
+ xt as HeightSetting,
2416
+ wt as HtmlSetting,
2417
+ Vt as MarginBottomSetting,
2418
+ Tt as MarginSettingGroup,
2419
+ It as MarginTopSetting,
2420
+ St as MultiLanguageSetting,
2421
+ f as NumberSetting,
2422
+ D as OpacitySetting,
2423
+ yt as SelectApiSettings,
2424
+ I as SelectSetting,
2537
2425
  g as Setting,
2538
2426
  v as SettingGroup,
2539
- F as StringSetting,
2540
- gt as TabSettingGroup,
2541
- gt as TabsSettingGroup,
2542
- xt as Toggle,
2543
- K as UploadSetting,
2544
- Et as WidthSetting,
2545
- mt as asSettingGroupWithSettings,
2546
- $ as createSettingGroup,
2547
- Tt as isSetting,
2548
- Ht as isSettingGroup,
2549
- x as iterateSettings
2427
+ G as StringSetting,
2428
+ F as TabSettingGroup,
2429
+ F as TabsSettingGroup,
2430
+ kt as Toggle,
2431
+ Q as UploadSetting,
2432
+ Lt as WidthSetting,
2433
+ Ct as asSettingGroupWithSettings,
2434
+ z as createSettingGroup,
2435
+ vt as createTabSettingGroup,
2436
+ $t as isSetting,
2437
+ ft as isSettingChild,
2438
+ Bt as isSettingGroup,
2439
+ k as iterateSettings
2550
2440
  };