@opengis/form 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { defineComponent, createElementBlock, openBlock, createElementVNode, renderSlot, createCommentVNode, toDisplayString, normalizeProps, guardReactiveProps, createTextVNode, computed, mergeModels, useModel, withDirectives, normalizeClass, unref, vModelText, vModelRadio, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, vModelCheckbox, createVNode, ref, normalizeStyle, withCtx, reactive, watch, onMounted, createStaticVNode, Transition, vShow, inject, nextTick, onUnmounted, withModifiers, Teleport, useAttrs, provide } from "vue";
2
- const _hoisted_1$v = { class: "w-full relative" }, _hoisted_2$b = { class: "text-[14px] font-medium text-gray-900 mb-2" }, _hoisted_3$5 = {
2
+ const _hoisted_1$w = { class: "w-full relative" }, _hoisted_2$b = { class: "text-[14px] font-medium text-gray-900 mb-2" }, _hoisted_3$5 = {
3
3
  key: 0,
4
4
  class: "text-red-500 text-[14px]"
5
5
  }, _hoisted_4$4 = {
6
6
  key: 0,
7
7
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
8
- }, _sfc_main$A = /* @__PURE__ */ defineComponent({
8
+ }, _sfc_main$B = /* @__PURE__ */ defineComponent({
9
9
  __name: "vs-layout-default",
10
10
  props: {
11
11
  ua: {
@@ -26,7 +26,7 @@ const _hoisted_1$v = { class: "w-full relative" }, _hoisted_2$b = { class: "text
26
26
  }
27
27
  },
28
28
  setup(e) {
29
- return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$v, [
29
+ return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$w, [
30
30
  createElementVNode("span", _hoisted_2$b, [
31
31
  createElementVNode("span", null, toDisplayString(e.ua || e.label), 1),
32
32
  e.item?.rules?.includes("required") ? (openBlock(), createElementBlock("span", _hoisted_3$5, "*")) : createCommentVNode("", !0)
@@ -35,13 +35,13 @@ const _hoisted_1$v = { class: "w-full relative" }, _hoisted_2$b = { class: "text
35
35
  e.error ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
36
36
  ]));
37
37
  }
38
- }), _hoisted_1$u = { class: "w-full relative flex flex-row items-center gap-2" }, _hoisted_2$a = { class: "text-sm text-gray-900 font-medium flex shrink-0 w-3/12" }, _hoisted_3$4 = {
38
+ }), _hoisted_1$v = { class: "w-full relative flex flex-row items-center gap-2" }, _hoisted_2$a = { class: "text-sm text-gray-900 font-medium flex shrink-0 w-3/12" }, _hoisted_3$4 = {
39
39
  key: 0,
40
40
  class: "text-red-500 text-[14px]"
41
41
  }, _hoisted_4$3 = {
42
42
  key: 0,
43
43
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
44
- }, _sfc_main$z = /* @__PURE__ */ defineComponent({
44
+ }, _sfc_main$A = /* @__PURE__ */ defineComponent({
45
45
  __name: "vs-layout-horizontal",
46
46
  props: {
47
47
  ua: {
@@ -62,7 +62,7 @@ const _hoisted_1$v = { class: "w-full relative" }, _hoisted_2$b = { class: "text
62
62
  }
63
63
  },
64
64
  setup(e) {
65
- return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$u, [
65
+ return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$v, [
66
66
  createElementVNode("span", _hoisted_2$a, [
67
67
  createTextVNode(toDisplayString(e.ua || e.label) + " ", 1),
68
68
  e.item?.rules?.includes("required") ? (openBlock(), createElementBlock("span", _hoisted_3$4, "*")) : createCommentVNode("", !0)
@@ -71,10 +71,10 @@ const _hoisted_1$v = { class: "w-full relative" }, _hoisted_2$b = { class: "text
71
71
  e.error ? (openBlock(), createElementBlock("span", _hoisted_4$3, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
72
72
  ]));
73
73
  }
74
- }), _hoisted_1$t = { class: "w-full relative" }, _hoisted_2$9 = {
74
+ }), _hoisted_1$u = { class: "w-full relative" }, _hoisted_2$9 = {
75
75
  key: 0,
76
76
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
77
- }, _sfc_main$y = /* @__PURE__ */ defineComponent({
77
+ }, _sfc_main$z = /* @__PURE__ */ defineComponent({
78
78
  __name: "vs-layout-inline",
79
79
  props: {
80
80
  ua: {
@@ -95,15 +95,15 @@ const _hoisted_1$v = { class: "w-full relative" }, _hoisted_2$b = { class: "text
95
95
  }
96
96
  },
97
97
  setup(e) {
98
- return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$t, [
98
+ return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$u, [
99
99
  renderSlot(t.$slots, "default", normalizeProps(guardReactiveProps(t.$attrs))),
100
100
  e.error ? (openBlock(), createElementBlock("span", _hoisted_2$9, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
101
101
  ]));
102
102
  }
103
103
  }), layouts$1 = {
104
- default: _sfc_main$A,
105
- horizontal: _sfc_main$z,
106
- inline: _sfc_main$y
104
+ default: _sfc_main$B,
105
+ horizontal: _sfc_main$A,
106
+ inline: _sfc_main$z
107
107
  };
108
108
  function useStyle(e) {
109
109
  return {
@@ -113,7 +113,7 @@ function useStyle(e) {
113
113
  })
114
114
  };
115
115
  }
116
- const _hoisted_1$s = ["placeholder", "disabled"], _sfc_main$x = /* @__PURE__ */ defineComponent({
116
+ const _hoisted_1$t = ["placeholder", "disabled"], _sfc_main$y = /* @__PURE__ */ defineComponent({
117
117
  __name: "vs-input-text",
118
118
  props: /* @__PURE__ */ mergeModels({
119
119
  style: {
@@ -148,11 +148,11 @@ const _hoisted_1$s = ["placeholder", "disabled"], _sfc_main$x = /* @__PURE__ */
148
148
  style: {
149
149
  border: "1px solid #CFD9E0"
150
150
  }
151
- }, null, 10, _hoisted_1$s)), [
151
+ }, null, 10, _hoisted_1$t)), [
152
152
  [vModelText, r.value]
153
153
  ]);
154
154
  }
155
- }), _hoisted_1$r = ["placeholder"], _sfc_main$w = /* @__PURE__ */ defineComponent({
155
+ }), _hoisted_1$s = ["placeholder"], _sfc_main$x = /* @__PURE__ */ defineComponent({
156
156
  __name: "vs-input-number",
157
157
  props: /* @__PURE__ */ mergeModels({
158
158
  style: {
@@ -178,11 +178,11 @@ const _hoisted_1$s = ["placeholder", "disabled"], _sfc_main$x = /* @__PURE__ */
178
178
  style: {
179
179
  border: "1px solid #CFD9E0"
180
180
  }
181
- }, null, 10, _hoisted_1$r)), [
181
+ }, null, 10, _hoisted_1$s)), [
182
182
  [vModelText, r.value]
183
183
  ]);
184
184
  }
185
- }), _hoisted_1$q = ["disabled"], _sfc_main$v = /* @__PURE__ */ defineComponent({
185
+ }), _hoisted_1$r = ["disabled"], _sfc_main$w = /* @__PURE__ */ defineComponent({
186
186
  __name: "vs-input-switcher",
187
187
  props: /* @__PURE__ */ mergeModels({
188
188
  style: {
@@ -214,9 +214,9 @@ const _hoisted_1$s = ["placeholder", "disabled"], _sfc_main$x = /* @__PURE__ */
214
214
  "data-state": "checked",
215
215
  class: normalizeClass(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform", [t.value ? "translate-x-4" : "translate-x-0"]])
216
216
  }, null, 2)
217
- ], 10, _hoisted_1$q));
217
+ ], 10, _hoisted_1$r));
218
218
  }
219
- }), _hoisted_1$p = ["innerHTML"], _sfc_main$u = /* @__PURE__ */ defineComponent({
219
+ }), _hoisted_1$q = ["innerHTML"], _sfc_main$v = /* @__PURE__ */ defineComponent({
220
220
  __name: "vs-input-static",
221
221
  props: {
222
222
  html: {
@@ -232,9 +232,9 @@ const _hoisted_1$s = ["placeholder", "disabled"], _sfc_main$x = /* @__PURE__ */
232
232
  return (t, n) => (openBlock(), createElementBlock("div", {
233
233
  class: normalizeClass(e.customClass),
234
234
  innerHTML: e.html
235
- }, null, 10, _hoisted_1$p));
235
+ }, null, 10, _hoisted_1$q));
236
236
  }
237
- }), _hoisted_1$o = ["placeholder", "disabled"], _sfc_main$t = /* @__PURE__ */ defineComponent({
237
+ }), _hoisted_1$p = ["placeholder", "disabled"], _sfc_main$u = /* @__PURE__ */ defineComponent({
238
238
  __name: "vs-input-mask",
239
239
  props: /* @__PURE__ */ mergeModels({
240
240
  style: {
@@ -269,11 +269,11 @@ const _hoisted_1$s = ["placeholder", "disabled"], _sfc_main$x = /* @__PURE__ */
269
269
  style: {
270
270
  border: "1px solid #CFD9E0"
271
271
  }
272
- }, null, 10, _hoisted_1$o)), [
272
+ }, null, 10, _hoisted_1$p)), [
273
273
  [vModelText, r.value]
274
274
  ]);
275
275
  }
276
- }), _hoisted_1$n = ["value", "disabled"], _hoisted_2$8 = { class: "text-[13px] text-gray-700" }, _sfc_main$s = /* @__PURE__ */ defineComponent({
276
+ }), _hoisted_1$o = ["value", "disabled"], _hoisted_2$8 = { class: "text-[13px] text-gray-700" }, _sfc_main$t = /* @__PURE__ */ defineComponent({
277
277
  __name: "vs-input-radio-default",
278
278
  props: /* @__PURE__ */ mergeModels({
279
279
  text: {
@@ -312,7 +312,7 @@ const _hoisted_1$s = ["placeholder", "disabled"], _sfc_main$x = /* @__PURE__ */
312
312
  value: e.value,
313
313
  disabled: e.disabled,
314
314
  class: "hidden"
315
- }, null, 8, _hoisted_1$n), [
315
+ }, null, 8, _hoisted_1$o), [
316
316
  [vModelRadio, t.value]
317
317
  ]),
318
318
  createElementVNode("span", {
@@ -329,7 +329,7 @@ const _hoisted_1$s = ["placeholder", "disabled"], _sfc_main$x = /* @__PURE__ */
329
329
  createElementVNode("span", _hoisted_2$8, toDisplayString(e.text), 1)
330
330
  ], 2));
331
331
  }
332
- }), _hoisted_1$m = ["value", "disabled"], _hoisted_2$7 = { class: "text-[13px] text-gray-700" }, _sfc_main$r = /* @__PURE__ */ defineComponent({
332
+ }), _hoisted_1$n = ["value", "disabled"], _hoisted_2$7 = { class: "text-[13px] text-gray-700" }, _sfc_main$s = /* @__PURE__ */ defineComponent({
333
333
  __name: "vs-input-radio-buttons",
334
334
  props: /* @__PURE__ */ mergeModels({
335
335
  text: {
@@ -371,16 +371,16 @@ const _hoisted_1$s = ["placeholder", "disabled"], _sfc_main$x = /* @__PURE__ */
371
371
  value: e.value,
372
372
  disabled: e.disabled,
373
373
  class: "hidden"
374
- }, null, 8, _hoisted_1$m), [
374
+ }, null, 8, _hoisted_1$n), [
375
375
  [vModelRadio, t.value]
376
376
  ]),
377
377
  createElementVNode("span", _hoisted_2$7, toDisplayString(e.text), 1)
378
378
  ], 2));
379
379
  }
380
380
  }), layouts = {
381
- "vs-input-radio-default": _sfc_main$s,
382
- "vs-input-radio-buttons": _sfc_main$r
383
- }, _sfc_main$q = /* @__PURE__ */ defineComponent({
381
+ "vs-input-radio-default": _sfc_main$t,
382
+ "vs-input-radio-buttons": _sfc_main$s
383
+ }, _sfc_main$r = /* @__PURE__ */ defineComponent({
384
384
  __name: "vs-input-radio",
385
385
  props: /* @__PURE__ */ mergeModels({
386
386
  options: {
@@ -2121,7 +2121,7 @@ const {
2121
2121
  for (const [r, o] of t)
2122
2122
  n[r] = o;
2123
2123
  return n;
2124
- }, _sfc_main$p = {}, _hoisted_1$l = {
2124
+ }, _sfc_main$q = {}, _hoisted_1$m = {
2125
2125
  xmlns: "http://www.w3.org/2000/svg",
2126
2126
  viewBox: "0 0 24 24",
2127
2127
  fill: "none",
@@ -2132,7 +2132,7 @@ const {
2132
2132
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
2133
2133
  };
2134
2134
  function _sfc_render$b(e, t) {
2135
- return openBlock(), createElementBlock("svg", _hoisted_1$l, t[0] || (t[0] = [
2135
+ return openBlock(), createElementBlock("svg", _hoisted_1$m, t[0] || (t[0] = [
2136
2136
  createElementVNode("path", {
2137
2137
  stroke: "none",
2138
2138
  d: "M0 0h24v24H0z",
@@ -2141,7 +2141,7 @@ function _sfc_render$b(e, t) {
2141
2141
  createElementVNode("path", { d: "M5 12l5 5l10 -10" }, null, -1)
2142
2142
  ]));
2143
2143
  }
2144
- const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$b]]), _hoisted_1$k = { class: "flex items-center gap-[4px]" }, _hoisted_2$6 = ["value", "id", "disabled"], _hoisted_3$3 = ["for"], _hoisted_4$2 = { class: "text-[13px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, _sfc_main$o = /* @__PURE__ */ defineComponent({
2144
+ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$b]]), _hoisted_1$l = { class: "flex items-center gap-[4px]" }, _hoisted_2$6 = ["value", "id", "disabled"], _hoisted_3$3 = ["for"], _hoisted_4$2 = { class: "text-[13px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, _sfc_main$p = /* @__PURE__ */ defineComponent({
2145
2145
  __name: "vs-checkbox-default",
2146
2146
  props: {
2147
2147
  value: { type: [String, Number], default: "" },
@@ -2157,7 +2157,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2157
2157
  get: () => r.modelValue,
2158
2158
  set: (s) => n("update:modelValue", s)
2159
2159
  });
2160
- return (s, l) => (openBlock(), createElementBlock("div", _hoisted_1$k, [
2160
+ return (s, l) => (openBlock(), createElementBlock("div", _hoisted_1$l, [
2161
2161
  withDirectives(createElementVNode("input", {
2162
2162
  type: "checkbox",
2163
2163
  value: e.value,
@@ -2188,10 +2188,10 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2188
2188
  ], 10, _hoisted_3$3)
2189
2189
  ]));
2190
2190
  }
2191
- }), _hoisted_1$j = ["name", "value", "disabled"], _hoisted_2$5 = { class: "flex items-center gap-[6px] text-[14px]" }, _hoisted_3$2 = {
2191
+ }), _hoisted_1$k = ["name", "value", "disabled"], _hoisted_2$5 = { class: "flex items-center gap-[6px] text-[14px]" }, _hoisted_3$2 = {
2192
2192
  key: 0,
2193
2193
  class: "text-[16px]"
2194
- }, _hoisted_4$1 = ["src"], _sfc_main$n = /* @__PURE__ */ defineComponent({
2194
+ }, _hoisted_4$1 = ["src"], _sfc_main$o = /* @__PURE__ */ defineComponent({
2195
2195
  __name: "vs-checkbox-buttons",
2196
2196
  props: {
2197
2197
  value: { type: [String, Number, Boolean], default: "" },
@@ -2224,7 +2224,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2224
2224
  value: e.value,
2225
2225
  "onUpdate:modelValue": u[0] || (u[0] = (c) => o.value = c),
2226
2226
  disabled: e.disabled
2227
- }, null, 8, _hoisted_1$j), [
2227
+ }, null, 8, _hoisted_1$k), [
2228
2228
  [vModelCheckbox, o.value]
2229
2229
  ]),
2230
2230
  createElementVNode("span", _hoisted_2$5, [
@@ -2248,9 +2248,9 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2248
2248
  ], 2));
2249
2249
  }
2250
2250
  }), VsCheckboxViews = {
2251
- "vs-checkbox-default": _sfc_main$o,
2252
- "vs-checkbox-buttons": _sfc_main$n
2253
- }, _hoisted_1$i = { class: "flex items-center" }, _sfc_main$m = /* @__PURE__ */ defineComponent({
2251
+ "vs-checkbox-default": _sfc_main$p,
2252
+ "vs-checkbox-buttons": _sfc_main$o
2253
+ }, _hoisted_1$j = { class: "flex items-center" }, _sfc_main$n = /* @__PURE__ */ defineComponent({
2254
2254
  __name: "vs-input-checkbox-item",
2255
2255
  props: {
2256
2256
  value: { type: [String, Number], default: "" },
@@ -2279,7 +2279,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2279
2279
  r("update:modelValue", i);
2280
2280
  }
2281
2281
  }), l = ref(`vs-checkbox-${n.view || "default"}`);
2282
- return (i, u) => (openBlock(), createElementBlock("div", _hoisted_1$i, [
2282
+ return (i, u) => (openBlock(), createElementBlock("div", _hoisted_1$j, [
2283
2283
  (openBlock(), createBlock(resolveDynamicComponent(unref(VsCheckboxViews)?.[l.value]), {
2284
2284
  value: e.value,
2285
2285
  label: e.label,
@@ -2299,7 +2299,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2299
2299
  }, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style"]))
2300
2300
  ]));
2301
2301
  }
2302
- }), _sfc_main$l = /* @__PURE__ */ defineComponent({
2302
+ }), _sfc_main$m = /* @__PURE__ */ defineComponent({
2303
2303
  __name: "vs-input-checkbox",
2304
2304
  props: {
2305
2305
  options: {
@@ -2386,7 +2386,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2386
2386
  }), (a, d) => (openBlock(), createElementBlock("div", {
2387
2387
  class: normalizeClass(["p-0 w-full gap-[6px]", [e.position === "vertical" ? "flex-col" : "", e.colSpan ? "grid" : "flex justify-start"]])
2388
2388
  }, [
2389
- (openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (f) => (openBlock(), createBlock(_sfc_main$m, {
2389
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (f) => (openBlock(), createBlock(_sfc_main$n, {
2390
2390
  modelValue: s[l(f)],
2391
2391
  "onUpdate:modelValue": (h) => s[l(f)] = h,
2392
2392
  value: l(f),
@@ -2402,7 +2402,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2402
2402
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "slots", "view"]))), 128))
2403
2403
  ], 2));
2404
2404
  }
2405
- }), VsInputCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["__scopeId", "data-v-9685f778"]]), _hoisted_1$h = ["placeholder", "disabled"], _sfc_main$k = /* @__PURE__ */ defineComponent({
2405
+ }), VsInputCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-9685f778"]]), _hoisted_1$i = ["placeholder", "disabled"], _sfc_main$l = /* @__PURE__ */ defineComponent({
2406
2406
  __name: "vs-input-date1",
2407
2407
  props: /* @__PURE__ */ mergeModels({
2408
2408
  style: {
@@ -2437,7 +2437,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2437
2437
  style: {
2438
2438
  border: "1px solid #CFD9E0"
2439
2439
  }
2440
- }, null, 10, _hoisted_1$h)), [
2440
+ }, null, 10, _hoisted_1$i)), [
2441
2441
  [vModelText, r.value]
2442
2442
  ]);
2443
2443
  }
@@ -2471,7 +2471,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2471
2471
  } catch (t) {
2472
2472
  console.error(t.message);
2473
2473
  }
2474
- }, _sfc_main$j = {}, _hoisted_1$g = {
2474
+ }, _sfc_main$k = {}, _hoisted_1$h = {
2475
2475
  xmlns: "http://www.w3.org/2000/svg",
2476
2476
  width: "24",
2477
2477
  height: "24",
@@ -2483,12 +2483,12 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_rend
2483
2483
  "stroke-linejoin": "round"
2484
2484
  };
2485
2485
  function _sfc_render$a(e, t) {
2486
- return openBlock(), createElementBlock("svg", _hoisted_1$g, t[0] || (t[0] = [
2486
+ return openBlock(), createElementBlock("svg", _hoisted_1$h, t[0] || (t[0] = [
2487
2487
  createElementVNode("path", { d: "M5 12h14" }, null, -1),
2488
2488
  createElementVNode("path", { d: "M12 5v14" }, null, -1)
2489
2489
  ]));
2490
2490
  }
2491
- const IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$a]]), _sfc_main$i = {}, _hoisted_1$f = {
2491
+ const IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$a]]), _sfc_main$j = {}, _hoisted_1$g = {
2492
2492
  xmlns: "http://www.w3.org/2000/svg",
2493
2493
  class: "icon icon-tabler icon-tabler-file-text",
2494
2494
  width: "44",
@@ -2501,11 +2501,11 @@ const IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_rende
2501
2501
  "stroke-linejoin": "round"
2502
2502
  };
2503
2503
  function _sfc_render$9(e, t, n, r, o, s) {
2504
- return openBlock(), createElementBlock("svg", _hoisted_1$f, t[0] || (t[0] = [
2504
+ return openBlock(), createElementBlock("svg", _hoisted_1$g, t[0] || (t[0] = [
2505
2505
  createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>', 6)
2506
2506
  ]));
2507
2507
  }
2508
- const iconPdf = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$9]]), _sfc_main$h = {}, _hoisted_1$e = {
2508
+ const iconPdf = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$9]]), _sfc_main$i = {}, _hoisted_1$f = {
2509
2509
  xmlns: "http://www.w3.org/2000/svg",
2510
2510
  class: "icon icon-tabler icon-tabler-table",
2511
2511
  width: "44",
@@ -2518,7 +2518,7 @@ const iconPdf = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render
2518
2518
  "stroke-linejoin": "round"
2519
2519
  };
2520
2520
  function _sfc_render$8(e, t, n, r, o, s) {
2521
- return openBlock(), createElementBlock("svg", _hoisted_1$e, t[0] || (t[0] = [
2521
+ return openBlock(), createElementBlock("svg", _hoisted_1$f, t[0] || (t[0] = [
2522
2522
  createElementVNode("path", {
2523
2523
  stroke: "none",
2524
2524
  d: "M0 0h24v24H0z",
@@ -2545,7 +2545,7 @@ function _sfc_render$8(e, t, n, r, o, s) {
2545
2545
  }, null, -1)
2546
2546
  ]));
2547
2547
  }
2548
- const IconCsv = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$8]]), _sfc_main$g = {}, _hoisted_1$d = {
2548
+ const IconCsv = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$8]]), _sfc_main$h = {}, _hoisted_1$e = {
2549
2549
  xmlns: "http://www.w3.org/2000/svg",
2550
2550
  width: "24",
2551
2551
  height: "24",
@@ -2558,11 +2558,11 @@ const IconCsv = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render
2558
2558
  class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
2559
2559
  };
2560
2560
  function _sfc_render$7(e, t, n, r, o, s) {
2561
- return openBlock(), createElementBlock("svg", _hoisted_1$d, t[0] || (t[0] = [
2561
+ return openBlock(), createElementBlock("svg", _hoisted_1$e, t[0] || (t[0] = [
2562
2562
  createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>', 5)
2563
2563
  ]));
2564
2564
  }
2565
- const IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$7]]), _sfc_main$f = {}, _hoisted_1$c = {
2565
+ const IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$7]]), _sfc_main$g = {}, _hoisted_1$d = {
2566
2566
  xmlns: "http://www.w3.org/2000/svg",
2567
2567
  class: "icon icon-tabler icon-tabler-file-zip",
2568
2568
  width: "44",
@@ -2575,11 +2575,11 @@ const IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_rende
2575
2575
  "stroke-linejoin": "round"
2576
2576
  };
2577
2577
  function _sfc_render$6(e, t, n, r, o, s) {
2578
- return openBlock(), createElementBlock("svg", _hoisted_1$c, t[0] || (t[0] = [
2578
+ return openBlock(), createElementBlock("svg", _hoisted_1$d, t[0] || (t[0] = [
2579
2579
  createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>', 9)
2580
2580
  ]));
2581
2581
  }
2582
- const IconZip = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$6]]), _sfc_main$e = {}, _hoisted_1$b = {
2582
+ const IconZip = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$6]]), _sfc_main$f = {}, _hoisted_1$c = {
2583
2583
  xmlns: "http://www.w3.org/2000/svg",
2584
2584
  class: "icon icon-tabler icon-tabler-file-code",
2585
2585
  width: "44",
@@ -2592,11 +2592,11 @@ const IconZip = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render
2592
2592
  "stroke-linejoin": "round"
2593
2593
  };
2594
2594
  function _sfc_render$5(e, t, n, r, o, s) {
2595
- return openBlock(), createElementBlock("svg", _hoisted_1$b, t[0] || (t[0] = [
2595
+ return openBlock(), createElementBlock("svg", _hoisted_1$c, t[0] || (t[0] = [
2596
2596
  createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>', 5)
2597
2597
  ]));
2598
2598
  }
2599
- const IconGeojson = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$5]]), getFileType = (e) => {
2599
+ const IconGeojson = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$5]]), getFileType = (e) => {
2600
2600
  if (!e) return "";
2601
2601
  const t = e?.split(".");
2602
2602
  return t[t.length - 1];
@@ -2609,7 +2609,7 @@ const IconGeojson = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_re
2609
2609
  documentsFormat: ["pdf"]
2610
2610
  };
2611
2611
  return n.imageFormat.includes(t) ? "img" : n.sheetsFormat.includes(t) ? IconCsv : n.textsFormat.includes(t) ? IconGeojson : n.documentsFormat.includes(t) ? iconPdf : n.archivesFormat.includes(t) ? IconZip : IconFile;
2612
- }, _sfc_main$d = {}, _hoisted_1$a = {
2612
+ }, _sfc_main$e = {}, _hoisted_1$b = {
2613
2613
  xmlns: "http://www.w3.org/2000/svg",
2614
2614
  width: "24",
2615
2615
  height: "24",
@@ -2622,11 +2622,11 @@ const IconGeojson = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_re
2622
2622
  class: "icon icon-tabler icons-tabler-outline icon-tabler-trash"
2623
2623
  };
2624
2624
  function _sfc_render$4(e, t) {
2625
- return openBlock(), createElementBlock("svg", _hoisted_1$a, t[0] || (t[0] = [
2625
+ return openBlock(), createElementBlock("svg", _hoisted_1$b, t[0] || (t[0] = [
2626
2626
  createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>', 6)
2627
2627
  ]));
2628
2628
  }
2629
- const IconDelete = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$4]]), _sfc_main$c = {}, _hoisted_1$9 = {
2629
+ const IconDelete = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$4]]), _sfc_main$d = {}, _hoisted_1$a = {
2630
2630
  xmlns: "http://www.w3.org/2000/svg",
2631
2631
  width: "24",
2632
2632
  height: "24",
@@ -2639,7 +2639,7 @@ const IconDelete = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_ren
2639
2639
  class: "icon icon-tabler icons-tabler-outline icon-tabler-download"
2640
2640
  };
2641
2641
  function _sfc_render$3(e, t) {
2642
- return openBlock(), createElementBlock("svg", _hoisted_1$9, t[0] || (t[0] = [
2642
+ return openBlock(), createElementBlock("svg", _hoisted_1$a, t[0] || (t[0] = [
2643
2643
  createElementVNode("path", {
2644
2644
  stroke: "none",
2645
2645
  d: "M0 0h24v24H0z",
@@ -2650,7 +2650,7 @@ function _sfc_render$3(e, t) {
2650
2650
  createElementVNode("path", { d: "M12 4l0 12" }, null, -1)
2651
2651
  ]));
2652
2652
  }
2653
- const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$3]]), _hoisted_1$8 = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, _hoisted_2$4 = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, _sfc_main$b = /* @__PURE__ */ defineComponent({
2653
+ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$3]]), _hoisted_1$9 = { class: "h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file" }, _hoisted_2$4 = { class: "absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center" }, _sfc_main$c = /* @__PURE__ */ defineComponent({
2654
2654
  __name: "vs-input-file-list-item",
2655
2655
  props: /* @__PURE__ */ mergeModels({
2656
2656
  multiple: { type: Boolean }
@@ -2663,7 +2663,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_r
2663
2663
  emits: ["update:value", "update:item"],
2664
2664
  setup(e) {
2665
2665
  const t = useModel(e, "value"), n = useModel(e, "item"), r = e;
2666
- return (o, s) => (openBlock(), createElementBlock("div", _hoisted_1$8, [
2666
+ return (o, s) => (openBlock(), createElementBlock("div", _hoisted_1$9, [
2667
2667
  (openBlock(), createBlock(resolveDynamicComponent(unref(fileFormatPreview)(n.value)), {
2668
2668
  src: n.value,
2669
2669
  alt: "file",
@@ -2690,10 +2690,10 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_r
2690
2690
  ])
2691
2691
  ]));
2692
2692
  }
2693
- }), VsInputFileListItem = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-bc0f6d32"]]), _hoisted_1$7 = { class: "flex items-center gap-x-2" }, _hoisted_2$3 = {
2693
+ }), VsInputFileListItem = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-bc0f6d32"]]), _hoisted_1$8 = { class: "flex items-center gap-x-2" }, _hoisted_2$3 = {
2694
2694
  key: 1,
2695
2695
  class: "flex items-center flex-wrap gap-2"
2696
- }, _sfc_main$a = /* @__PURE__ */ defineComponent({
2696
+ }, _sfc_main$b = /* @__PURE__ */ defineComponent({
2697
2697
  __name: "vs-input-file",
2698
2698
  props: /* @__PURE__ */ mergeModels({
2699
2699
  multiple: { type: Boolean },
@@ -2716,7 +2716,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_r
2716
2716
  const u = await fileUpload(i, "1", "form", "table");
2717
2717
  n.value = t.multiple ? [...n.value || [], u.result?.file_path] : u.result?.file_path;
2718
2718
  };
2719
- return (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
2719
+ return (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$8, [
2720
2720
  createElementVNode("input", {
2721
2721
  class: "hidden",
2722
2722
  ref_key: "fileInput",
@@ -2757,7 +2757,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_r
2757
2757
  ], 2))
2758
2758
  ]));
2759
2759
  }
2760
- }), _hoisted_1$6 = { class: "flex items-center justify-between" }, _hoisted_2$2 = { class: "text-[16px] text-gray-900 font-medium" }, _hoisted_3$1 = { class: "grid gap-3" }, _sfc_main$9 = /* @__PURE__ */ defineComponent({
2760
+ }), _hoisted_1$7 = { class: "flex items-center justify-between" }, _hoisted_2$2 = { class: "text-[16px] text-gray-900 font-medium" }, _hoisted_3$1 = { class: "grid gap-3" }, _sfc_main$a = /* @__PURE__ */ defineComponent({
2761
2761
  __name: "vs-container-switcher",
2762
2762
  props: {
2763
2763
  title: {
@@ -2781,9 +2781,9 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_r
2781
2781
  n.value = r;
2782
2782
  }
2783
2783
  ), (r, o) => (openBlock(), createElementBlock("div", null, [
2784
- createElementVNode("div", _hoisted_1$6, [
2784
+ createElementVNode("div", _hoisted_1$7, [
2785
2785
  createElementVNode("p", _hoisted_2$2, toDisplayString(e.title), 1),
2786
- createVNode(_sfc_main$v, {
2786
+ createVNode(_sfc_main$w, {
2787
2787
  modelValue: n.value,
2788
2788
  "onUpdate:modelValue": o[0] || (o[0] = (s) => n.value = s),
2789
2789
  style: normalizeStyle(e.style)
@@ -2801,7 +2801,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_r
2801
2801
  })
2802
2802
  ]));
2803
2803
  }
2804
- }), VsContainerSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-479564a3"]]), _sfc_main$8 = {}, _hoisted_1$5 = {
2804
+ }), VsContainerSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-479564a3"]]), _sfc_main$9 = {}, _hoisted_1$6 = {
2805
2805
  xmlns: "http://www.w3.org/2000/svg",
2806
2806
  viewBox: "0 0 24 24",
2807
2807
  fill: "none",
@@ -2812,7 +2812,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_r
2812
2812
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
2813
2813
  };
2814
2814
  function _sfc_render$2(e, t) {
2815
- return openBlock(), createElementBlock("svg", _hoisted_1$5, t[0] || (t[0] = [
2815
+ return openBlock(), createElementBlock("svg", _hoisted_1$6, t[0] || (t[0] = [
2816
2816
  createElementVNode("path", {
2817
2817
  stroke: "none",
2818
2818
  d: "M0 0h24v24H0z",
@@ -2821,7 +2821,7 @@ function _sfc_render$2(e, t) {
2821
2821
  createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)
2822
2822
  ]));
2823
2823
  }
2824
- const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$2]]), _sfc_main$7 = {}, _hoisted_1$4 = {
2824
+ const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$2]]), _sfc_main$8 = {}, _hoisted_1$5 = {
2825
2825
  xmlns: "http://www.w3.org/2000/svg",
2826
2826
  viewBox: "0 0 24 24",
2827
2827
  fill: "none",
@@ -2831,12 +2831,12 @@ const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sf
2831
2831
  "stroke-linejoin": "round"
2832
2832
  };
2833
2833
  function _sfc_render$1(e, t) {
2834
- return openBlock(), createElementBlock("svg", _hoisted_1$4, t[0] || (t[0] = [
2834
+ return openBlock(), createElementBlock("svg", _hoisted_1$5, t[0] || (t[0] = [
2835
2835
  createElementVNode("path", { d: "m7 15 5 5 5-5" }, null, -1),
2836
2836
  createElementVNode("path", { d: "m7 9 5-5 5 5" }, null, -1)
2837
2837
  ]));
2838
2838
  }
2839
- const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$1]]), _sfc_main$6 = {}, _hoisted_1$3 = {
2839
+ const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]]), _sfc_main$7 = {}, _hoisted_1$4 = {
2840
2840
  xmlns: "http://www.w3.org/2000/svg",
2841
2841
  viewBox: "0 0 24 24",
2842
2842
  fill: "none",
@@ -2847,7 +2847,7 @@ const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render"
2847
2847
  class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
2848
2848
  };
2849
2849
  function _sfc_render(e, t) {
2850
- return openBlock(), createElementBlock("svg", _hoisted_1$3, t[0] || (t[0] = [
2850
+ return openBlock(), createElementBlock("svg", _hoisted_1$4, t[0] || (t[0] = [
2851
2851
  createElementVNode("path", {
2852
2852
  stroke: "none",
2853
2853
  d: "M0 0h24v24H0z",
@@ -2857,7 +2857,7 @@ function _sfc_render(e, t) {
2857
2857
  createElementVNode("path", { d: "M6 6l12 12" }, null, -1)
2858
2858
  ]));
2859
2859
  }
2860
- const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]), _hoisted_1$2 = { class: "text-[16px] text-gray-900 font-medium" }, _hoisted_2$1 = { class: "grid gap-3" }, _sfc_main$5 = /* @__PURE__ */ defineComponent({
2860
+ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render]]), _hoisted_1$3 = { class: "text-[16px] text-gray-900 font-medium" }, _hoisted_2$1 = { class: "grid gap-3" }, _sfc_main$6 = /* @__PURE__ */ defineComponent({
2861
2861
  __name: "vs-container-accordion",
2862
2862
  props: {
2863
2863
  title: {
@@ -2889,7 +2889,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_rend
2889
2889
  createVNode(unref(IconChevronDown), {
2890
2890
  class: normalizeClass(["h-4 w-4 duration-300", [n.value ? "-rotate-180" : ""]])
2891
2891
  }, null, 8, ["class"]),
2892
- createElementVNode("span", _hoisted_1$2, toDisplayString(e.title), 1)
2892
+ createElementVNode("span", _hoisted_1$3, toDisplayString(e.title), 1)
2893
2893
  ]),
2894
2894
  createVNode(Transition, { name: "slide-fade" }, {
2895
2895
  default: withCtx(() => [
@@ -2903,7 +2903,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_rend
2903
2903
  })
2904
2904
  ]));
2905
2905
  }
2906
- }), VsContainerAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-a37284e6"]]), _hoisted_1$1 = { class: "flex items-center justify-between" }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
2906
+ }), VsContainerAccordion = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-a37284e6"]]), _hoisted_1$2 = { class: "flex items-center justify-between" }, _sfc_main$5 = /* @__PURE__ */ defineComponent({
2907
2907
  __name: "vs-container-default",
2908
2908
  props: {
2909
2909
  title: {
@@ -2917,7 +2917,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_rend
2917
2917
  },
2918
2918
  setup(e) {
2919
2919
  return (t, n) => (openBlock(), createElementBlock("div", null, [
2920
- createElementVNode("div", _hoisted_1$1, [
2920
+ createElementVNode("div", _hoisted_1$2, [
2921
2921
  createElementVNode("p", null, toDisplayString(e.title), 1)
2922
2922
  ]),
2923
2923
  renderSlot(t.$slots, "default")
@@ -2926,7 +2926,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_rend
2926
2926
  }), views = {
2927
2927
  switcher: VsContainerSwitcher,
2928
2928
  accordion: VsContainerAccordion,
2929
- default: _sfc_main$4
2929
+ default: _sfc_main$5
2930
2930
  }, FormConditionsTypes = {
2931
2931
  Equal: "==",
2932
2932
  Inequal: "!=",
@@ -2970,7 +2970,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_rend
2970
2970
  default:
2971
2971
  return !0;
2972
2972
  }
2973
- }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
2973
+ }, _sfc_main$4 = /* @__PURE__ */ defineComponent({
2974
2974
  __name: "vs-input-container",
2975
2975
  props: {
2976
2976
  style: {
@@ -3057,10 +3057,10 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_rend
3057
3057
  break;
3058
3058
  }
3059
3059
  f + u > a ? f = a - u - r : f < 0 && (f = r), h + c > d ? h = d - c - r : h < 0 && (h = r), n instanceof HTMLElement && (n.style.top = `${f}px`, n.style.left = `${h}px`, n.style.position = "fixed");
3060
- }, _hoisted_1 = ["disabled"], _hoisted_2 = { key: 1 }, _hoisted_3 = {
3060
+ }, _hoisted_1$1 = ["disabled"], _hoisted_2 = { key: 1 }, _hoisted_3 = {
3061
3061
  key: 2,
3062
3062
  class: "text-gray-400"
3063
- }, _hoisted_4 = { class: "absolute top-[50%] text-gray-500 translate-y-[-50%] right-[10px] pointer-events-none" }, _hoisted_5 = ["onClick"], _hoisted_6 = { class: "flex items-center gap-[8px] w-full" }, _hoisted_7 = { key: 1 }, _sfc_main$2 = /* @__PURE__ */ defineComponent({
3063
+ }, _hoisted_4 = { class: "absolute top-[50%] text-gray-500 translate-y-[-50%] right-[10px] pointer-events-none" }, _hoisted_5 = ["onClick"], _hoisted_6 = { class: "flex items-center gap-[8px] w-full" }, _hoisted_7 = { key: 1 }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
3064
3064
  __name: "vs-input-select",
3065
3065
  props: /* @__PURE__ */ mergeModels({
3066
3066
  placeholder: { default: "Оберіть значення" },
@@ -3156,7 +3156,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_rend
3156
3156
  style: normalizeStyle({ backgroundColor: u.value?.color })
3157
3157
  }, null, 4)) : createCommentVNode("", !0),
3158
3158
  u.value?.text ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(u.value?.text), 1)) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(b.placeholder), 1))
3159
- ], 42, _hoisted_1),
3159
+ ], 42, _hoisted_1$1),
3160
3160
  createElementVNode("span", _hoisted_4, [
3161
3161
  createVNode(unref(IconChevronTopBottom), {
3162
3162
  height: "14",
@@ -3221,20 +3221,60 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_rend
3221
3221
  ]))
3222
3222
  ], 512));
3223
3223
  }
3224
+ }), _hoisted_1 = ["placeholder", "disabled"], _sfc_main$2 = /* @__PURE__ */ defineComponent({
3225
+ __name: "vs-input-textarea",
3226
+ props: /* @__PURE__ */ mergeModels({
3227
+ style: {
3228
+ type: Object,
3229
+ default: () => ({})
3230
+ },
3231
+ customClass: {
3232
+ type: String,
3233
+ default: ""
3234
+ },
3235
+ placeholder: {
3236
+ type: String,
3237
+ default: ""
3238
+ },
3239
+ disabled: {
3240
+ type: Boolean,
3241
+ default: !1
3242
+ }
3243
+ }, {
3244
+ modelValue: { default: "" },
3245
+ modelModifiers: {}
3246
+ }),
3247
+ emits: ["update:modelValue"],
3248
+ setup(e) {
3249
+ const t = e, { inputClass: n } = useStyle(t.style), r = useModel(e, "modelValue");
3250
+ return (o, s) => withDirectives((openBlock(), createElementBlock("textarea", {
3251
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => r.value = l),
3252
+ placeholder: e.placeholder,
3253
+ disabled: e.disabled,
3254
+ row: "2",
3255
+ class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [unref(n)]]),
3256
+ style: {
3257
+ border: "1px solid #CFD9E0"
3258
+ }
3259
+ }, null, 10, _hoisted_1)), [
3260
+ [vModelText, r.value]
3261
+ ]);
3262
+ }
3224
3263
  }), inputs = {
3225
- VsInputText: _sfc_main$x,
3226
- VsInputRadio: _sfc_main$q,
3227
- "vs-input-text": _sfc_main$x,
3228
- "vs-input-mask": _sfc_main$t,
3229
- "vs-input-number": _sfc_main$w,
3230
- "vs-input-radio": _sfc_main$q,
3231
- "vs-input-select": _sfc_main$2,
3232
- "vs-input-switcher": _sfc_main$v,
3233
- "vs-input-static": _sfc_main$u,
3234
- "vs-input-container": _sfc_main$3,
3235
- "vs-input-date": _sfc_main$k,
3264
+ VsInputText: _sfc_main$y,
3265
+ VsInputRadio: _sfc_main$r,
3266
+ "vs-input-text": _sfc_main$y,
3267
+ "vs-input-textarea": _sfc_main$2,
3268
+ "vs-input-mask": _sfc_main$u,
3269
+ "vs-input-number": _sfc_main$x,
3270
+ "vs-input-radio": _sfc_main$r,
3271
+ "vs-input-select": _sfc_main$3,
3272
+ "vs-input-switcher": _sfc_main$w,
3273
+ "vs-input-static": _sfc_main$v,
3274
+ "vs-input-container": _sfc_main$4,
3275
+ "vs-input-date": _sfc_main$l,
3236
3276
  "vs-input-checkbox": VsInputCheckbox,
3237
- "vs-input-file": _sfc_main$a
3277
+ "vs-input-file": _sfc_main$b
3238
3278
  }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
3239
3279
  __name: "vs-compact-form-layout",
3240
3280
  props: {
@@ -3290,7 +3330,6 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_rend
3290
3330
  autocomplete: "select",
3291
3331
  combobox: "select",
3292
3332
  email: "text",
3293
- textarea: "text",
3294
3333
  datepicker: "date",
3295
3334
  markedtext: "text"
3296
3335
  // mask: 'text',
@@ -3303,7 +3342,13 @@ function convertSchema(e) {
3303
3342
  if (Array.isArray(e)) return e;
3304
3343
  const t = [];
3305
3344
  return Object.entries(e).forEach((n) => {
3306
- const r = { name: n[0], ...n[1], type: convertType(n[1].type), label: n[1].label || n[1].ua };
3345
+ const r = {
3346
+ name: n[0],
3347
+ ...n[1],
3348
+ type: convertType(n[1].type),
3349
+ label: n[1].label || n[1].ua,
3350
+ rules: n[1].rules || n[1].validators
3351
+ };
3307
3352
  n[1].data && (r.api = `/api/suggest/${n[1].data}`), t.push(r);
3308
3353
  }), t;
3309
3354
  }
@@ -3314,7 +3359,7 @@ function useForm(e, t) {
3314
3359
  r.value[c.name] = checkFormRules(e.value[c.name], a);
3315
3360
  }), c.schema && o(c.schema, !1);
3316
3361
  }), u && Object.values(r.value).some(Boolean))
3317
- throw new Error("Помилка валідації");
3362
+ return r.value;
3318
3363
  }, s = computed(() => n?.filter((i) => {
3319
3364
  const u = i?.conditions;
3320
3365
  if (!u) return !0;
@@ -3377,6 +3422,6 @@ _sfc_main.install = function e(t) {
3377
3422
  };
3378
3423
  export {
3379
3424
  _sfc_main as VForm,
3380
- _sfc_main$x as VsInputText,
3425
+ _sfc_main$y as VsInputText,
3381
3426
  _sfc_main as default
3382
3427
  };
@@ -1,6 +1,6 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FormBuilder={},e.Vue))})(this,function(exports,vue){"use strict";const _hoisted_1$v={class:"w-full relative"},_hoisted_2$b={class:"text-[14px] font-medium text-gray-900 mb-2"},_hoisted_3$5={key:0,class:"text-red-500 text-[14px]"},_hoisted_4$4={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$A=vue.defineComponent({__name:"vs-layout-default",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$v,[vue.createElementVNode("span",_hoisted_2$b,[vue.createElementVNode("span",null,vue.toDisplayString(e.ua||e.label),1),e.item?.rules?.includes("required")?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$5,"*")):vue.createCommentVNode("",!0)]),vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$4,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),_hoisted_1$u={class:"w-full relative flex flex-row items-center gap-2"},_hoisted_2$a={class:"text-sm text-gray-900 font-medium flex shrink-0 w-3/12"},_hoisted_3$4={key:0,class:"text-red-500 text-[14px]"},_hoisted_4$3={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$z=vue.defineComponent({__name:"vs-layout-horizontal",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$u,[vue.createElementVNode("span",_hoisted_2$a,[vue.createTextVNode(vue.toDisplayString(e.ua||e.label)+" ",1),e.item?.rules?.includes("required")?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$4,"*")):vue.createCommentVNode("",!0)]),vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$3,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),_hoisted_1$t={class:"w-full relative"},_hoisted_2$9={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$y=vue.defineComponent({__name:"vs-layout-inline",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$t,[vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$9,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),layouts$1={default:_sfc_main$A,horizontal:_sfc_main$z,inline:_sfc_main$y};function useStyle(e){return{inputClass:vue.computed(()=>{const n=`disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${e?.primaryColor||"blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;return e?.size==="sm"?n+"h-[32px]":n+"h-[38px]"})}}const _hoisted_1$s=["placeholder","disabled"],_sfc_main$x=vue.defineComponent({__name:"vs-input-text",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,disabled:e.disabled,class:vue.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$s)),[[vue.vModelText,r.value]])}}),_hoisted_1$r=["placeholder"],_sfc_main$w=vue.defineComponent({__name:"vs-input-number",props:vue.mergeModels({style:{type:Object,default:()=>({})},placeholder:{type:String,default:""}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"number","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,class:vue.normalizeClass(["py-1.5 px-3 block w-full",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$r)),[[vue.vModelText,r.value]])}}),_hoisted_1$q=["disabled"],_sfc_main$v=vue.defineComponent({__name:"vs-input-switcher",props:vue.mergeModels({style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("button",{type:"button",class:vue.normalizeClass(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50",[`bg-${e.style?.primaryColor||"blue"}-500`,e.customClass]]),disabled:e.disabled,onClick:r[0]||(r[0]=o=>t.value=!t.value)},[vue.createElementVNode("span",{"data-state":"checked",class:vue.normalizeClass(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform",[t.value?"translate-x-4":"translate-x-0"]])},null,2)],10,_hoisted_1$q))}}),_hoisted_1$p=["innerHTML"],_sfc_main$u=vue.defineComponent({__name:"vs-input-static",props:{html:{type:String,default:""},customClass:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(e.customClass),innerHTML:e.html},null,10,_hoisted_1$p))}}),_hoisted_1$o=["placeholder","disabled"],_sfc_main$t=vue.defineComponent({__name:"vs-input-mask",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,disabled:e.disabled,class:vue.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$o)),[[vue.vModelText,r.value]])}}),_hoisted_1$n=["value","disabled"],_hoisted_2$8={class:"text-[13px] text-gray-700"},_sfc_main$s=vue.defineComponent({__name:"vs-input-radio-default",props:vue.mergeModels({text:{type:String,required:!0},value:{type:String,required:!0},style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["flex items-center gap-0",[e.customClass]])},[vue.withDirectives(vue.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),type:"radio",value:e.value,disabled:e.disabled,class:"hidden"},null,8,_hoisted_1$n),[[vue.vModelRadio,t.value]]),vue.createElementVNode("span",{class:vue.normalizeClass(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]",[`border-${e.style?.primaryColor||"blue"}-500`,e.disabled?"opacity-50 cursor-not-allowed":""]])},[t.value==e.value?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(["w-[12px] h-[12px] shrink-0 rounded-full",[`bg-${e.style?.primaryColor||"blue"}-500`]])},null,2)):vue.createCommentVNode("",!0)],2),vue.createElementVNode("span",_hoisted_2$8,vue.toDisplayString(e.text),1)],2))}}),_hoisted_1$m=["value","disabled"],_hoisted_2$7={class:"text-[13px] text-gray-700"},_sfc_main$r=vue.defineComponent({__name:"vs-input-radio-buttons",props:vue.mergeModels({text:{type:String,required:!0},value:{type:String,required:!0},style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["flex items-center border rounded-lg px-2 py-1",[t.value==e.value?`ring-2 ring-ring ring-${e.style?.primaryColor||"blue"}-500`:"",e.customClass]])},[vue.withDirectives(vue.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),type:"radio",value:e.value,disabled:e.disabled,class:"hidden"},null,8,_hoisted_1$m),[[vue.vModelRadio,t.value]]),vue.createElementVNode("span",_hoisted_2$7,vue.toDisplayString(e.text),1)],2))}}),layouts={"vs-input-radio-default":_sfc_main$s,"vs-input-radio-buttons":_sfc_main$r},_sfc_main$q=vue.defineComponent({__name:"vs-input-radio",props:vue.mergeModels({options:{type:Array,required:!0},position:{type:String,default:"vertical"},view:{type:String,default:"default"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=vue.useModel(e,"modelValue"),r=vue.computed(()=>layouts[`vs-input-radio-${t.view}`]);return(o,s)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([e.position==="horizontal"?"flex items-center flex-wrap gap-2":""])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.options,l=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(r.value),vue.mergeProps({key:l?.id,text:l.text,value:l.id.toString(),checked:n.value===l.id,modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i)},{ref_for:!0},o.$attrs),null,16,["text","value","checked","modelValue"]))),128))],2))}});function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(e=>t=>{const n=toString.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!=="object")return!1;const t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(toStringTag in e)&&!(iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),isArray(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),l=s.length;let i;for(r=0;r<l;r++)i=s[r],t.call(null,e[i],i,e)}}function findKey(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},n=(r,o)=>{const s=e&&findKey(t,o)||o;isPlainObject(t[s])&&isPlainObject(r)?t[s]=merge(t[s],r):isPlainObject(r)?t[s]=merge({},r):isArray(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&forEach(arguments[r],n);return t}const extend=(e,t,n,{allOwnKeys:r}={})=>(forEach(t,(o,s)=>{n&&isFunction(o)?e[s]=bind(o,n):e[s]=o},{allOwnKeys:r}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let o,s,l;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)l=o[s],(!r||r(l,e,t))&&!i[l]&&(t[l]=e[l],i[l]=!0);e=n!==!1&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const r=(e&&e[iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},matchAll=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,(o,s)=>{let l;(l=t(o,s,e))!==!1&&(r[s]=l||o)}),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(isFunction(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return isArray(e)?r(e):r(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[toStringTag]==="FormData"&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(r,o)=>{if(isObject(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=isArray(r)?[]:{};return forEach(r,(l,i)=>{const c=n(l,o+1);!isUndefined(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((n,r)=>(_global.addEventListener("message",({source:o,data:s})=>{o===_global&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),_global.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction(e[iterator]),utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError$1(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}utils$1.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}}),Object.defineProperties(AxiosError$1,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError$1.from=(e,t,n,r,o,s)=>{const l=Object.create(prototype$1);return utils$1.toFlatObject(e,l,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),AxiosError$1.call(l,e.message,t,n,r,o),l.cause=e,l.name=e.name,s&&Object.assign(l,s),l};const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(o,s){return o=removeBrackets(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(t){return/^is[A-Z]/.test(t)});function toFormData$1(e,t,n){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=utils$1.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,m){return!utils$1.isUndefined(m[v])});const r=n.metaTokens,o=n.visitor||a,s=n.dots,l=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(utils$1.isDate(p))return p.toISOString();if(utils$1.isBoolean(p))return p.toString();if(!c&&utils$1.isBlob(p))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(p)||utils$1.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function a(p,v,m){let g=p;if(p&&!m&&typeof p=="object"){if(utils$1.endsWith(v,"{}"))v=r?v:v.slice(0,-2),p=JSON.stringify(p);else if(utils$1.isArray(p)&&isFlatArray(p)||(utils$1.isFileList(p)||utils$1.endsWith(v,"[]"))&&(g=utils$1.toArray(p)))return v=removeBrackets(v),g.forEach(function($,_){!(utils$1.isUndefined($)||$===null)&&t.append(l===!0?renderKey([v],_,s):l===null?v:v+"[]",u($))}),!1}return isVisitable(p)?!0:(t.append(renderKey(m,v,s),u(p)),!1)}const d=[],f=Object.assign(predicates,{defaultVisitor:a,convertValue:u,isVisitable});function h(p,v){if(!utils$1.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),utils$1.forEach(p,function(g,x){(!(utils$1.isUndefined(g)||g===null)&&o.call(t,g,utils$1.isString(x)?x.trim():x,v,f))===!0&&h(g,v?v.concat(x):[x])}),d.pop()}}if(!utils$1.isObject(e))throw new TypeError("data must be an object");return h(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(t,n){this._pairs.push([t,n])},prototype.toString=function(t){const n=t?function(r){return t.call(this,r,encode$1)}:encode$1;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,n){if(!t)return e;const r=n&&n.encode||encode;utils$1.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(r),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils$1.forEach(this.handlers,function(r){r!==null&&t(r)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return platform.isNode&&utils$1.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function formDataToJSON(e){function t(n,r,o,s){let l=n[s++];if(l==="__proto__")return!0;const i=Number.isFinite(+l),c=s>=n.length;return l=!l&&utils$1.isArray(o)?o.length:l,c?(utils$1.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!i):((!o[l]||!utils$1.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],s)&&utils$1.isArray(o[l])&&(o[l]=arrayToObject(o[l])),!i)}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const n={};return utils$1.forEachEntry(e,(r,o)=>{t(parsePropPath(r),o,n,0)}),n}return null}function stringifySafely(e,t,n){if(utils$1.isString(e))try{return(t||JSON.parse)(e),utils$1.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=utils$1.isObject(t);if(s&&utils$1.isHTMLForm(t)&&(t=new FormData(t)),utils$1.isFormData(t))return o?JSON.stringify(formDataToJSON(t)):t;if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)||utils$1.isReadableStream(t))return t;if(utils$1.isArrayBufferView(t))return t.buffer;if(utils$1.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((i=utils$1.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return toFormData$1(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function(t){const n=this.transitional||defaults.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(l)throw i.name==="SyntaxError"?AxiosError$1.from(i,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],e=>{defaults.headers[e]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,r,o;return e&&e.split(`
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.FormBuilder={},e.Vue))})(this,function(exports,vue){"use strict";const _hoisted_1$w={class:"w-full relative"},_hoisted_2$b={class:"text-[14px] font-medium text-gray-900 mb-2"},_hoisted_3$5={key:0,class:"text-red-500 text-[14px]"},_hoisted_4$4={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$B=vue.defineComponent({__name:"vs-layout-default",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$w,[vue.createElementVNode("span",_hoisted_2$b,[vue.createElementVNode("span",null,vue.toDisplayString(e.ua||e.label),1),e.item?.rules?.includes("required")?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$5,"*")):vue.createCommentVNode("",!0)]),vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$4,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),_hoisted_1$v={class:"w-full relative flex flex-row items-center gap-2"},_hoisted_2$a={class:"text-sm text-gray-900 font-medium flex shrink-0 w-3/12"},_hoisted_3$4={key:0,class:"text-red-500 text-[14px]"},_hoisted_4$3={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$A=vue.defineComponent({__name:"vs-layout-horizontal",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$v,[vue.createElementVNode("span",_hoisted_2$a,[vue.createTextVNode(vue.toDisplayString(e.ua||e.label)+" ",1),e.item?.rules?.includes("required")?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$4,"*")):vue.createCommentVNode("",!0)]),vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_4$3,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),_hoisted_1$u={class:"w-full relative"},_hoisted_2$9={key:0,class:"text-red-500 text-[10px] absolute bottom-[-14px]"},_sfc_main$z=vue.defineComponent({__name:"vs-layout-inline",props:{ua:{type:String,default:""},item:{type:Object,default:()=>({})},error:{type:String,default:""},label:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$u,[vue.renderSlot(t.$slots,"default",vue.normalizeProps(vue.guardReactiveProps(t.$attrs))),e.error?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$9,vue.toDisplayString(e.error),1)):vue.createCommentVNode("",!0)]))}}),layouts$1={default:_sfc_main$B,horizontal:_sfc_main$A,inline:_sfc_main$z};function useStyle(e){return{inputClass:vue.computed(()=>{const n=`disabled:opacity-50 disabled:cursor-not-allowed outline-none focus:ring-2 focus:ring-ring focus:ring-${e?.primaryColor||"blue"}-500 border border-solid border-stone-200 rounded-md text-sm text-stone-800 placeholder:text-stone-400 `;return e?.size==="sm"?n+"h-[32px]":n+"h-[38px]"})}}const _hoisted_1$t=["placeholder","disabled"],_sfc_main$y=vue.defineComponent({__name:"vs-input-text",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,disabled:e.disabled,class:vue.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$t)),[[vue.vModelText,r.value]])}}),_hoisted_1$s=["placeholder"],_sfc_main$x=vue.defineComponent({__name:"vs-input-number",props:vue.mergeModels({style:{type:Object,default:()=>({})},placeholder:{type:String,default:""}},{modelValue:{default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"number","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,class:vue.normalizeClass(["py-1.5 px-3 block w-full",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$s)),[[vue.vModelText,r.value]])}}),_hoisted_1$r=["disabled"],_sfc_main$w=vue.defineComponent({__name:"vs-input-switcher",props:vue.mergeModels({style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("button",{type:"button",class:vue.normalizeClass(["inline-flex h-5 w-9 shrink-0 px-[2px] cursor-pointer items-center rounded-full shadow-sm disabled:cursor-not-allowed disabled:opacity-50",[`bg-${e.style?.primaryColor||"blue"}-500`,e.customClass]]),disabled:e.disabled,onClick:r[0]||(r[0]=o=>t.value=!t.value)},[vue.createElementVNode("span",{"data-state":"checked",class:vue.normalizeClass(["pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform",[t.value?"translate-x-4":"translate-x-0"]])},null,2)],10,_hoisted_1$r))}}),_hoisted_1$q=["innerHTML"],_sfc_main$v=vue.defineComponent({__name:"vs-input-static",props:{html:{type:String,default:""},customClass:{type:String,default:""}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(e.customClass),innerHTML:e.html},null,10,_hoisted_1$q))}}),_hoisted_1$p=["placeholder","disabled"],_sfc_main$u=vue.defineComponent({__name:"vs-input-mask",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"text","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,disabled:e.disabled,class:vue.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$p)),[[vue.vModelText,r.value]])}}),_hoisted_1$o=["value","disabled"],_hoisted_2$8={class:"text-[13px] text-gray-700"},_sfc_main$t=vue.defineComponent({__name:"vs-input-radio-default",props:vue.mergeModels({text:{type:String,required:!0},value:{type:String,required:!0},style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["flex items-center gap-0",[e.customClass]])},[vue.withDirectives(vue.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),type:"radio",value:e.value,disabled:e.disabled,class:"hidden"},null,8,_hoisted_1$o),[[vue.vModelRadio,t.value]]),vue.createElementVNode("span",{class:vue.normalizeClass(["w-[16px] shrink-0 h-[16px] border rounded-full flex items-center justify-center mr-[10px]",[`border-${e.style?.primaryColor||"blue"}-500`,e.disabled?"opacity-50 cursor-not-allowed":""]])},[t.value==e.value?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(["w-[12px] h-[12px] shrink-0 rounded-full",[`bg-${e.style?.primaryColor||"blue"}-500`]])},null,2)):vue.createCommentVNode("",!0)],2),vue.createElementVNode("span",_hoisted_2$8,vue.toDisplayString(e.text),1)],2))}}),_hoisted_1$n=["value","disabled"],_hoisted_2$7={class:"text-[13px] text-gray-700"},_sfc_main$s=vue.defineComponent({__name:"vs-input-radio-buttons",props:vue.mergeModels({text:{type:String,required:!0},value:{type:String,required:!0},style:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},customClass:{type:String,default:""}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=vue.useModel(e,"modelValue");return(n,r)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["flex items-center border rounded-lg px-2 py-1",[t.value==e.value?`ring-2 ring-ring ring-${e.style?.primaryColor||"blue"}-500`:"",e.customClass]])},[vue.withDirectives(vue.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=o=>t.value=o),type:"radio",value:e.value,disabled:e.disabled,class:"hidden"},null,8,_hoisted_1$n),[[vue.vModelRadio,t.value]]),vue.createElementVNode("span",_hoisted_2$7,vue.toDisplayString(e.text),1)],2))}}),layouts={"vs-input-radio-default":_sfc_main$t,"vs-input-radio-buttons":_sfc_main$s},_sfc_main$r=vue.defineComponent({__name:"vs-input-radio",props:vue.mergeModels({options:{type:Array,required:!0},position:{type:String,default:"vertical"},view:{type:String,default:"default"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=vue.useModel(e,"modelValue"),r=vue.computed(()=>layouts[`vs-input-radio-${t.view}`]);return(o,s)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([e.position==="horizontal"?"flex items-center flex-wrap gap-2":""])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.options,l=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(r.value),vue.mergeProps({key:l?.id,text:l.text,value:l.id.toString(),checked:n.value===l.id,modelValue:n.value,"onUpdate:modelValue":s[0]||(s[0]=i=>n.value=i)},{ref_for:!0},o.$attrs),null,16,["text","value","checked","modelValue"]))),128))],2))}});function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(e=>t=>{const n=toString.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!=="object")return!1;const t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(toStringTag in e)&&!(iterator in e)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction(e.pipe),isFormData=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||isFunction(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction(e.toString)&&e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),isArray(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),l=s.length;let i;for(r=0;r<l;r++)i=s[r],t.call(null,e[i],i,e)}}function findKey(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e}=isContextDefined(this)&&this||{},t={},n=(r,o)=>{const s=e&&findKey(t,o)||o;isPlainObject(t[s])&&isPlainObject(r)?t[s]=merge(t[s],r):isPlainObject(r)?t[s]=merge({},r):isArray(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&forEach(arguments[r],n);return t}const extend=(e,t,n,{allOwnKeys:r}={})=>(forEach(t,(o,s)=>{n&&isFunction(o)?e[s]=bind(o,n):e[s]=o},{allOwnKeys:r}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let o,s,l;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)l=o[s],(!r||r(l,e,t))&&!i[l]&&(t[l]=e[l],i[l]=!0);e=n!==!1&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const r=(e&&e[iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},matchAll=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,(o,s)=>{let l;(l=t(o,s,e))!==!1&&(r[s]=l||o)}),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(isFunction(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return isArray(e)?r(e):r(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction(e.append)&&e[toStringTag]==="FormData"&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(r,o)=>{if(isObject(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=isArray(r)?[]:{};return forEach(r,(l,i)=>{const c=n(l,o+1);!isUndefined(c)&&(s[i]=c)}),t[o]=void 0,s}}return r};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction(e))&&isFunction(e.then)&&isFunction(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((n,r)=>(_global.addEventListener("message",({source:o,data:s})=>{o===_global&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),_global.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",isFunction(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction(e[iterator]),utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError$1(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}utils$1.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{descriptors[e]={value:e}}),Object.defineProperties(AxiosError$1,descriptors),Object.defineProperty(prototype$1,"isAxiosError",{value:!0}),AxiosError$1.from=(e,t,n,r,o,s)=>{const l=Object.create(prototype$1);return utils$1.toFlatObject(e,l,function(c){return c!==Error.prototype},i=>i!=="isAxiosError"),AxiosError$1.call(l,e.message,t,n,r,o),l.cause=e,l.name=e.name,s&&Object.assign(l,s),l};const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(o,s){return o=removeBrackets(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(t){return/^is[A-Z]/.test(t)});function toFormData$1(e,t,n){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=utils$1.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,m){return!utils$1.isUndefined(m[v])});const r=n.metaTokens,o=n.visitor||a,s=n.dots,l=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(o))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(utils$1.isDate(p))return p.toISOString();if(utils$1.isBoolean(p))return p.toString();if(!c&&utils$1.isBlob(p))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(p)||utils$1.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function a(p,v,m){let g=p;if(p&&!m&&typeof p=="object"){if(utils$1.endsWith(v,"{}"))v=r?v:v.slice(0,-2),p=JSON.stringify(p);else if(utils$1.isArray(p)&&isFlatArray(p)||(utils$1.isFileList(p)||utils$1.endsWith(v,"[]"))&&(g=utils$1.toArray(p)))return v=removeBrackets(v),g.forEach(function($,_){!(utils$1.isUndefined($)||$===null)&&t.append(l===!0?renderKey([v],_,s):l===null?v:v+"[]",u($))}),!1}return isVisitable(p)?!0:(t.append(renderKey(m,v,s),u(p)),!1)}const d=[],f=Object.assign(predicates,{defaultVisitor:a,convertValue:u,isVisitable});function h(p,v){if(!utils$1.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),utils$1.forEach(p,function(g,x){(!(utils$1.isUndefined(g)||g===null)&&o.call(t,g,utils$1.isString(x)?x.trim():x,v,f))===!0&&h(g,v?v.concat(x):[x])}),d.pop()}}if(!utils$1.isObject(e))throw new TypeError("data must be an object");return h(e),t}function encode$1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(t,n){this._pairs.push([t,n])},prototype.toString=function(t){const n=t?function(r){return t.call(this,r,encode$1)}:encode$1;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,n){if(!t)return e;const r=n&&n.encode||encode;utils$1.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,n).toString(r),s){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils$1.forEach(this.handlers,function(r){r!==null&&t(r)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return platform.isNode&&utils$1.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function formDataToJSON(e){function t(n,r,o,s){let l=n[s++];if(l==="__proto__")return!0;const i=Number.isFinite(+l),c=s>=n.length;return l=!l&&utils$1.isArray(o)?o.length:l,c?(utils$1.hasOwnProp(o,l)?o[l]=[o[l],r]:o[l]=r,!i):((!o[l]||!utils$1.isObject(o[l]))&&(o[l]=[]),t(n,r,o[l],s)&&utils$1.isArray(o[l])&&(o[l]=arrayToObject(o[l])),!i)}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const n={};return utils$1.forEachEntry(e,(r,o)=>{t(parsePropPath(r),o,n,0)}),n}return null}function stringifySafely(e,t,n){if(utils$1.isString(e))try{return(t||JSON.parse)(e),utils$1.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=utils$1.isObject(t);if(s&&utils$1.isHTMLForm(t)&&(t=new FormData(t)),utils$1.isFormData(t))return o?JSON.stringify(formDataToJSON(t)):t;if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)||utils$1.isReadableStream(t))return t;if(utils$1.isArrayBufferView(t))return t.buffer;if(utils$1.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((i=utils$1.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return toFormData$1(i?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function(t){const n=this.transitional||defaults.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(r&&!this.responseType||o)){const l=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(l)throw i.name==="SyntaxError"?AxiosError$1.from(i,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],e=>{defaults.headers[e]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,r,o;return e&&e.split(`
2
2
  `).forEach(function(l){o=l.indexOf(":"),n=l.substring(0,o).trim().toLowerCase(),r=l.substring(o+1).trim(),!(!n||t[n]&&ignoreDuplicateOf[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,r,o){if(utils$1.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!utils$1.isString(t)){if(utils$1.isString(r))return t.indexOf(r)!==-1;if(utils$1.isRegExp(r))return r.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function buildAccessors(e,t){const n=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,l){return this[r].call(this,t,o,s,l)},configurable:!0})})}let AxiosHeaders$1=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,c,u){const a=normalizeHeader(c);if(!a)throw new Error("header name must be a non-empty string");const d=utils$1.findKey(o,a);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||c]=normalizeValue(i))}const l=(i,c)=>utils$1.forEach(i,(u,a)=>s(u,a,c));if(utils$1.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(utils$1.isString(t)&&(t=t.trim())&&!isValidHeaderName(t))l(parseHeaders(t),n);else if(utils$1.isObject(t)&&utils$1.isIterable(t)){let i={},c,u;for(const a of t){if(!utils$1.isArray(a))throw TypeError("Object iterator must return a key-value pair");i[u=a[0]]=(c=i[u])?utils$1.isArray(c)?[...c,a[1]]:[c,a[1]]:a[1]}l(i,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=normalizeHeader(t),t){const r=utils$1.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return parseTokens(o);if(utils$1.isFunction(n))return n.call(this,o,r);if(utils$1.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=normalizeHeader(t),t){const r=utils$1.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||matchHeaderValue(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(l){if(l=normalizeHeader(l),l){const i=utils$1.findKey(r,l);i&&(!n||matchHeaderValue(r,r[i],i,n))&&(delete r[i],o=!0)}}return utils$1.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||matchHeaderValue(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return utils$1.forEach(this,(o,s)=>{const l=utils$1.findKey(r,s);if(l){n[l]=normalizeValue(o),delete n[s];return}const i=t?formatHeader(s):String(s).trim();i!==s&&delete n[s],n[i]=normalizeValue(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return utils$1.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&utils$1.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
3
3
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[$internals]=this[$internals]={accessors:{}}).accessors,o=this.prototype;function s(l){const i=normalizeHeader(l);r[i]||(buildAccessors(o,l),r[i]=!0)}return utils$1.isArray(t)?t.forEach(s):s(t),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),utils$1.freezeMethods(AxiosHeaders$1);function transformData(e,t){const n=this||defaults,r=t||n,o=AxiosHeaders$1.from(r.headers);let s=r.data;return utils$1.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function isCancel$1(e){return!!(e&&e.__CANCEL__)}function CanceledError$1(e,t,n){AxiosError$1.call(this,e??"canceled",AxiosError$1.ERR_CANCELED,t,n),this.name="CanceledError"}utils$1.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new AxiosError$1("Request failed with status code "+n.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,l;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),a=r[s];l||(l=u),n[o]=c,r[o]=u;let d=s,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-l<t)return;const h=a&&u-a;return h?Math.round(f*1e3/h):void 0}}function throttle(e,t){let n=0,r=1e3/t,o,s;const l=(u,a=Date.now())=>{n=a,o=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const a=Date.now(),d=a-n;d>=r?l(u,a):(o=u,s||(s=setTimeout(()=>{s=null,l(o)},r-d)))},()=>o&&l(o)]}const progressEventReducer=(e,t,n=3)=>{let r=0;const o=speedometer(50,250);return throttle(s=>{const l=s.loaded,i=s.lengthComputable?s.total:void 0,c=l-r,u=o(c),a=l<=i;r=l;const d={loaded:l,total:i,progress:i?l/i:void 0,bytes:c,rate:u||void 0,estimated:u&&i&&a?(i-l)/u:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},n)},progressEventDecorator=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},asyncDecorator=e=>(...t)=>utils$1.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const l=[e+"="+encodeURIComponent(t)];utils$1.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),utils$1.isString(r)&&l.push("path="+r),utils$1.isString(o)&&l.push("domain="+o),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,n){let r=!isAbsoluteURL(t);return e&&(r||n==!1)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const n={};function r(u,a,d,f){return utils$1.isPlainObject(u)&&utils$1.isPlainObject(a)?utils$1.merge.call({caseless:f},u,a):utils$1.isPlainObject(a)?utils$1.merge({},a):utils$1.isArray(a)?a.slice():a}function o(u,a,d,f){if(utils$1.isUndefined(a)){if(!utils$1.isUndefined(u))return r(void 0,u,d,f)}else return r(u,a,d,f)}function s(u,a){if(!utils$1.isUndefined(a))return r(void 0,a)}function l(u,a){if(utils$1.isUndefined(a)){if(!utils$1.isUndefined(u))return r(void 0,u)}else return r(void 0,a)}function i(u,a,d){if(d in t)return r(u,a);if(d in e)return r(void 0,u)}const c={url:s,method:s,data:s,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:i,headers:(u,a,d)=>o(headersToObject(u),headersToObject(a),d,!0)};return utils$1.forEach(Object.keys(Object.assign({},e,t)),function(a){const d=c[a]||o,f=d(e[a],t[a],a);utils$1.isUndefined(f)&&d!==i||(n[a]=f)}),n}const resolveConfig=e=>{const t=mergeConfig$1({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:l,auth:i}=t;t.headers=l=AxiosHeaders$1.from(l),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&l.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let c;if(utils$1.isFormData(n)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((c=l.getContentType())!==!1){const[u,...a]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];l.setContentType([u||"multipart/form-data",...a].join("; "))}}if(platform.hasStandardBrowserEnv&&(r&&utils$1.isFunction(r)&&(r=r(t)),r||r!==!1&&isURLSameOrigin(t.url))){const u=o&&s&&cookies.read(s);u&&l.set(o,u)}return t},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(n,r){const o=resolveConfig(e);let s=o.data;const l=AxiosHeaders$1.from(o.headers).normalize();let{responseType:i,onUploadProgress:c,onDownloadProgress:u}=o,a,d,f,h,p;function v(){h&&h(),p&&p(),o.cancelToken&&o.cancelToken.unsubscribe(a),o.signal&&o.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;m.open(o.method.toUpperCase(),o.url,!0),m.timeout=o.timeout;function g(){if(!m)return;const $=AxiosHeaders$1.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),k={data:!i||i==="text"||i==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:$,config:e,request:m};settle(function(b){n(b),v()},function(b){r(b),v()},k),m=null}"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(r(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let _=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const k=o.transitional||transitionalDefaults;o.timeoutErrorMessage&&(_=o.timeoutErrorMessage),r(new AxiosError$1(_,k.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,m)),m=null},s===void 0&&l.setContentType(null),"setRequestHeader"in m&&utils$1.forEach(l.toJSON(),function(_,k){m.setRequestHeader(k,_)}),utils$1.isUndefined(o.withCredentials)||(m.withCredentials=!!o.withCredentials),i&&i!=="json"&&(m.responseType=o.responseType),u&&([f,p]=progressEventReducer(u,!0),m.addEventListener("progress",f)),c&&m.upload&&([d,h]=progressEventReducer(c),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(a=$=>{m&&(r(!$||$.type?new CanceledError$1(null,e,m):$),m.abort(),m=null)},o.cancelToken&&o.cancelToken.subscribe(a),o.signal&&(o.signal.aborted?a():o.signal.addEventListener("abort",a)));const x=parseProtocol(o.url);if(x&&platform.protocols.indexOf(x)===-1){r(new AxiosError$1("Unsupported protocol "+x+":",AxiosError$1.ERR_BAD_REQUEST,e));return}m.send(s||null)})},composeSignals=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(u){if(!o){o=!0,i();const a=u instanceof Error?u:this.reason;r.abort(a instanceof AxiosError$1?a:new CanceledError$1(a instanceof Error?a.message:a))}};let l=t&&setTimeout(()=>{l=null,s(new AxiosError$1(`timeout ${t} of ms exceeded`,AxiosError$1.ETIMEDOUT))},t);const i=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>utils$1.asap(i),c}},streamChunk=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},readBytes=async function*(e,t){for await(const n of readStream(e))yield*streamChunk(n,t)},readStream=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,n,r)=>{const o=readBytes(e,t);let s=0,l,i=c=>{l||(l=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:a}=await o.next();if(u){i(),c.close();return}let d=a.byteLength;if(n){let f=s+=d;n(f)}c.enqueue(new Uint8Array(a))}catch(u){throw i(u),u}},cancel(c){return i(c),o.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),test=(e,...t)=>{try{return!!e(...t)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let e=!1;const t=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$1.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(e=>e.body)};isFetchSupported&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!resolvers[t]&&(resolvers[t]=utils$1.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new AxiosError$1(`Response type '${t}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,r)})})})(new Response);const getBodyLength=async e=>{if(e==null)return 0;if(utils$1.isBlob(e))return e.size;if(utils$1.isSpecCompliantForm(e))return(await new Request(platform.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(e)||utils$1.isArrayBuffer(e))return e.byteLength;if(utils$1.isURLSearchParams(e)&&(e=e+""),utils$1.isString(e))return(await encodeText(e)).byteLength},resolveBodyLength=async(e,t)=>{const n=utils$1.toFiniteNumber(e.getContentLength());return n??getBodyLength(t)},fetchAdapter=isFetchSupported&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:s,timeout:l,onDownloadProgress:i,onUploadProgress:c,responseType:u,headers:a,withCredentials:d="same-origin",fetchOptions:f}=resolveConfig(e);u=u?(u+"").toLowerCase():"text";let h=composeSignals([o,s&&s.toAbortSignal()],l),p;const v=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(c&&supportsRequestStream&&n!=="get"&&n!=="head"&&(m=await resolveBodyLength(a,r))!==0){let k=new Request(t,{method:"POST",body:r,duplex:"half"}),y;if(utils$1.isFormData(r)&&(y=k.headers.get("content-type"))&&a.setContentType(y),k.body){const[b,w]=progressEventDecorator(m,progressEventReducer(asyncDecorator(c)));r=trackStream(k.body,DEFAULT_CHUNK_SIZE,b,w)}}utils$1.isString(d)||(d=d?"include":"omit");const g="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:r,duplex:"half",credentials:g?d:void 0});let x=await fetch(p,f);const $=supportsResponseStream&&(u==="stream"||u==="response");if(supportsResponseStream&&(i||$&&v)){const k={};["status","statusText","headers"].forEach(E=>{k[E]=x[E]});const y=utils$1.toFiniteNumber(x.headers.get("content-length")),[b,w]=i&&progressEventDecorator(y,progressEventReducer(asyncDecorator(i),!0))||[];x=new Response(trackStream(x.body,DEFAULT_CHUNK_SIZE,b,()=>{w&&w(),v&&v()}),k)}u=u||"text";let _=await resolvers[utils$1.findKey(resolvers,u)||"text"](x,e);return!$&&v&&v(),await new Promise((k,y)=>{settle(k,y,{data:_,headers:AxiosHeaders$1.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:p})})}catch(g){throw v&&v(),g&&g.name==="TypeError"&&/Load failed|fetch/i.test(g.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,e,p),{cause:g.cause||g}):AxiosError$1.from(g,g&&g.code,e,p)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$1.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||e===null||e===!1,adapters={getAdapter:e=>{e=utils$1.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let s=0;s<t;s++){n=e[s];let l;if(r=n,!isResolvedHandle(n)&&(r=knownAdapters[(l=String(n)).toLowerCase()],r===void 0))throw new AxiosError$1(`Unknown adapter '${l}'`);if(r)break;o[l||"#"+s]=r}if(!r){const s=Object.entries(o).map(([i,c])=>`adapter ${i} `+(c===!1?"is not supported by the environment":"is not available in the build"));let l=t?s.length>1?`since :
4
4
  `+s.map(renderReason).join(`
5
5
  `):" "+renderReason(s[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults.adapter)(e).then(function(r){return throwIfCancellationRequested(e),r.data=transformData.call(e,e.transformResponse,r),r.headers=AxiosHeaders$1.from(r.headers),r},function(r){return isCancel$1(r)||(throwIfCancellationRequested(e),r&&r.response&&(r.response.data=transformData.call(e,e.transformResponse,r.response),r.response.headers=AxiosHeaders$1.from(r.response.headers))),Promise.reject(r)})}const VERSION$1="1.10.0",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function(t,n,r){function o(s,l){return"[Axios v"+VERSION$1+"] Transitional option '"+s+"'"+l+(r?". "+r:"")}return(s,l,i)=>{if(t===!1)throw new AxiosError$1(o(l," has been removed"+(n?" in "+n:"")),AxiosError$1.ERR_DEPRECATED);return n&&!deprecatedWarnings[l]&&(deprecatedWarnings[l]=!0,console.warn(o(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,l,i):!0}},validators$1.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function assertOptions(e,t,n){if(typeof e!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],l=t[s];if(l){const i=e[s],c=i===void 0||l(i,s,e);if(c!==!0)throw new AxiosError$1("option "+s+" must be "+c,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new AxiosError$1("Unknown option "+s,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(t){this.defaults=t||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mergeConfig$1(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),o!=null&&(utils$1.isFunction(o)?n.paramsSerializer={serialize:o}:validator.assertOptions(o,{encode:validators.function,serialize:validators.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),validator.assertOptions(n,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=s&&utils$1.merge(s.common,s[n.method]);s&&utils$1.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=AxiosHeaders$1.concat(l,s);const i=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,i.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let a,d=0,f;if(!c){const p=[dispatchRequest.bind(this),void 0];for(p.unshift.apply(p,i),p.push.apply(p,u),f=p.length,a=Promise.resolve(n);d<f;)a=a.then(p[d++],p[d++]);return a}f=i.length;let h=n;for(d=0;d<f;){const p=i[d++],v=i[d++];try{h=p(h)}catch(m){v.call(this,m);break}}try{a=dispatchRequest.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)a=a.then(u[d++],u[d++]);return a}getUri(t){t=mergeConfig$1(this.defaults,t);const n=buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls);return buildURL(n,t.params,t.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function(t){Axios$1.prototype[t]=function(n,r){return this.request(mergeConfig$1(r||{},{method:t,url:n,data:(r||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(t){function n(r){return function(s,l,i){return this.request(mergeConfig$1(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}Axios$1.prototype[t]=n(),Axios$1.prototype[t+"Form"]=n(!0)});let CancelToken$1=class C{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const l=new Promise(i=>{r.subscribe(i),s=i}).then(o);return l.cancel=function(){r.unsubscribe(s)},l},t(function(s,l,i){r.reason||(r.reason=new CanceledError$1(s,l,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new C(function(o){t=o}),cancel:t}}};function spread$1(e){return function(n){return e.apply(null,n)}}function isAxiosError$1(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach(([e,t])=>{HttpStatusCode$1[t]=e});function createInstance(e){const t=new Axios$1(e),n=bind(Axios$1.prototype.request,t);return utils$1.extend(n,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return createInstance(mergeConfig$1(e,o))},n}const axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function(t){return Promise.all(t)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios,_export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_sfc_main$p={},_hoisted_1$l={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function _sfc_render$b(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$l,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const IconCheck=_export_sfc(_sfc_main$p,[["render",_sfc_render$b]]),_hoisted_1$k={class:"flex items-center gap-[4px]"},_hoisted_2$6=["value","id","disabled"],_hoisted_3$3=["for"],_hoisted_4$2={class:"text-[13px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400"},_sfc_main$o=vue.defineComponent({__name:"vs-checkbox-default",props:{value:{type:[String,Number],default:""},label:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},id:{type:[String,Number]},modelValue:Boolean,info:{type:String,default:()=>""}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,r=e,o=vue.computed({get:()=>r.modelValue,set:s=>n("update:modelValue",s)});return(s,l)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$k,[vue.withDirectives(vue.createElementVNode("input",{type:"checkbox",value:e.value,"onUpdate:modelValue":l[0]||(l[0]=i=>o.value=i),class:vue.normalizeClass(["shrink-0 border border-solid hidden border-gray-200 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",{"!cursor-not-allowed":e.disabled}]),id:e.id,disabled:e.disabled},null,10,_hoisted_2$6),[[vue.vModelCheckbox,o.value]]),vue.createElementVNode("label",{for:e.id,class:vue.normalizeClass(["flex flex-1 checkbox-label items-center gap-x-3 cursor-pointer text-sm text-gray-800 dark:text-neutral-300",{"!cursor-not-allowed":e.disabled}])},[vue.createElementVNode("div",{class:vue.normalizeClass(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded",[o.value?"bg-blue-600":"bg-white"]])},[vue.createVNode(IconCheck,{height:"12",width:"12"})],2),vue.createElementVNode("span",_hoisted_4$2,[vue.renderSlot(s.$slots,"default",{},()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)])])],10,_hoisted_3$3)]))}}),_hoisted_1$j=["name","value","disabled"],_hoisted_2$5={class:"flex items-center gap-[6px] text-[14px]"},_hoisted_3$2={key:0,class:"text-[16px]"},_hoisted_4$1=["src"],_sfc_main$n=vue.defineComponent({__name:"vs-checkbox-buttons",props:{value:{type:[String,Number,Boolean],default:""},label:{type:[String,Number],default:""},modelValue:{type:[Array,String,Boolean],default:""},disabled:{type:Boolean,default:!1},id:{type:[String,Number]},icon:{type:String},imgUrl:{type:String},style:{type:Object,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=vue.computed({get:()=>n.modelValue,set:i=>{r("update:modelValue",i)}}),s=vue.computed(()=>Array.isArray(o.value)?o.value.includes(n.value):o.value===!0||o.value===n.value),l=vue.computed(()=>n.style?.size==="xs"?"p-1.5 text-xs":n.style?.size==="lg"?"p-3.5 text-[20px]":"p-2.5 text-xs");return(i,c)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg",[l.value,s.value?"ring-blue-500":"border border-gray-200 ring-transparent"]])},[vue.withDirectives(vue.createElementVNode("input",{type:"checkbox",class:"hidden",name:e.id,value:e.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),disabled:e.disabled},null,8,_hoisted_1$j),[[vue.vModelCheckbox,o.value]]),vue.createElementVNode("span",_hoisted_2$5,[e.icon||e.imgUrl?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$2,[e.icon?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:vue.normalizeClass(e.icon)},null,2)):vue.createCommentVNode("",!0),e.imgUrl?(vue.openBlock(),vue.createElementBlock("img",{key:1,src:e.imgUrl,width:"16",height:"16",alt:"icon"},null,8,_hoisted_4$1)):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),vue.renderSlot(i.$slots,"default",{},()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)])])],2))}}),VsCheckboxViews={"vs-checkbox-default":_sfc_main$o,"vs-checkbox-buttons":_sfc_main$n},_hoisted_1$i={class:"flex items-center"},_sfc_main$m=vue.defineComponent({__name:"vs-input-checkbox-item",props:{value:{type:[String,Number],default:""},label:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},view:{type:String,default:()=>"default"},modelValue:{type:[Array,Boolean],default:!1},icon:{type:String},imgUrl:{type:String},slots:{type:Object,default:()=>null},option:{type:[Object,String]},style:{type:String,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=`radio-${Math.floor(Math.random()*1e4)}`,s=vue.computed({get:()=>Array.isArray(n.modelValue)?Array.isArray(n.modelValue)&&n.modelValue.includes(n.value):n.modelValue,set:i=>{if(Array.isArray(n.modelValue)){let c=[...n.modelValue];i?c.includes(n.value)||c.push(n.value):c=c.filter(u=>u!==n.value),r("update:modelValue",c)}else r("update:modelValue",i)}}),l=vue.ref(`vs-checkbox-${n.view||"default"}`);return(i,c)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$i,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(VsCheckboxViews)?.[l.value]),{value:e.value,label:e.label,info:e.option?.info,disabled:e.disabled,modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),id:o,icon:e.icon,imgUrl:e.imgUrl,style:vue.normalizeStyle(e.style)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)]),_:1},8,["value","label","info","disabled","modelValue","icon","imgUrl","style"]))]))}}),_sfc_main$l=vue.defineComponent({__name:"vs-input-checkbox",props:{options:{type:Array,default:()=>[]},modelValue:{type:[Boolean,Array],default:!1},position:{default:()=>"vertical"},slots:{type:Object,default:()=>null},view:{type:String,default:()=>null},colSpan:{type:Number,default:()=>0},data:{type:String,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=vue.ref([]),s=vue.reactive({}),l=a=>a?.value||a?.id||a?.text||a,i=a=>a.text||String(a),c=a=>`lg:col-span-${a||12}`,u=async()=>{try{const{data:a}=await axios.get(`/api/suggest/${n.data}`);o.value=a?.data||a}catch(a){console.error(a)}};return vue.watch(()=>n.modelValue,a=>{if(typeof a=="boolean"&&o.value.length===1){const d=l(o.value[0]);s[d]=a}else if(Array.isArray(a)){const d=new Set(a);o.value.forEach(f=>{if(!f.disabled){const h=l(f);s[h]=d.has(h)}})}},{immediate:!0}),vue.watch(s,()=>{if(!o.value.length){r("update:modelValue",null);return}const a=Object.entries(s).filter(([,d])=>d).map(([d])=>d);r("update:modelValue",a.length===0?null:a)},{deep:!0}),vue.onMounted(()=>{if(n.data)u().then(()=>{if(typeof n.modelValue=="boolean"&&o.value.length===1){const a=l(o.value[0]);s[a]=n.modelValue}else if(Array.isArray(n.modelValue)){const a=new Set(n.modelValue);o.value.forEach(d=>{if(!d.disabled){const f=l(d);s[f]=a.has(f)}})}});else if(o.value=n.options,typeof n.modelValue=="boolean"&&o.value.length===1){const a=l(o.value[0]);s[a]=n.modelValue}else if(Array.isArray(n.modelValue)){const a=new Set(n.modelValue);o.value.forEach(d=>{if(!d.disabled){const f=l(d);s[f]=a.has(f)}})}}),(a,d)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["p-0 w-full gap-[6px]",[e.position==="vertical"?"flex-col":"",e.colSpan?"grid":"flex justify-start"]])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.value,f=>(vue.openBlock(),vue.createBlock(_sfc_main$m,{modelValue:s[l(f)],"onUpdate:modelValue":h=>s[l(f)]=h,value:l(f),class:vue.normalizeClass(c(e.colSpan)),disabled:f.disabled,label:i(f),key:l(f),icon:f?.icon,imgUrl:f?.imgUrl,option:f,slots:e.slots,view:e.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","slots","view"]))),128))],2))}}),VsInputCheckbox=_export_sfc(_sfc_main$l,[["__scopeId","data-v-9685f778"]]),_hoisted_1$h=["placeholder","disabled"],_sfc_main$k=vue.defineComponent({__name:"vs-input-date1",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"date","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,disabled:e.disabled,class:vue.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$h)),[[vue.vModelText,r.value]])}}),fileUpload=async(e,t,n,r)=>{try{const o=new FormData;o.append("unique","true"),o.append("file",e);const{data:s}=await axios.post(`/file/upload/uploads?id=${t||""}&form=${n||""}&table=${r||""}`,o);return s}catch(o){console.error(o)}},fileDelete=async e=>{try{return await axios.get(`file/delete${e}`),!0}catch(t){return console.error(t),!1}},fileDownload=async e=>{try{const t=await axios.get(`file/download/files/uploads${e}`,{responseType:"arraybuffer",headers:{"Content-Type":"application/json"}}),n=t.headers["content-type"],r=new TextDecoder("utf-8").decode(t.data),o=new Blob([r],{type:n}),s=document.createElement("a");s.setAttribute("download",e),s.href=window.URL.createObjectURL(o),s.click()}catch(t){console.error(t.message)}},_sfc_main$j={},_hoisted_1$g={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$a(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$g,t[0]||(t[0]=[vue.createElementVNode("path",{d:"M5 12h14"},null,-1),vue.createElementVNode("path",{d:"M12 5v14"},null,-1)]))}const IconPlus=_export_sfc(_sfc_main$j,[["render",_sfc_render$a]]),_sfc_main$i={},_hoisted_1$f={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-text",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$9(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$f,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>',6)]))}const iconPdf=_export_sfc(_sfc_main$i,[["render",_sfc_render$9]]),_sfc_main$h={},_hoisted_1$e={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-table",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$8(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$e,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"},null,-1),vue.createElementVNode("line",{x1:"4",y1:"10",x2:"20",y2:"10"},null,-1),vue.createElementVNode("line",{x1:"10",y1:"4",x2:"10",y2:"20"},null,-1)]))}const IconCsv=_export_sfc(_sfc_main$h,[["render",_sfc_render$8]]),_sfc_main$g={},_hoisted_1$d={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"};function _sfc_render$7(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$d,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>',5)]))}const IconFile=_export_sfc(_sfc_main$g,[["render",_sfc_render$7]]),_sfc_main$f={},_hoisted_1$c={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-zip",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$6(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$c,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>',9)]))}const IconZip=_export_sfc(_sfc_main$f,[["render",_sfc_render$6]]),_sfc_main$e={},_hoisted_1$b={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-code",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$5(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$b,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>',5)]))}const IconGeojson=_export_sfc(_sfc_main$e,[["render",_sfc_render$5]]),getFileType=e=>{if(!e)return"";const t=e?.split(".");return t[t.length-1]},fileFormatPreview=e=>{const t=getFileType(e),n={imageFormat:["tiff","jpg","jpeg","png","svg","ico","webp"],sheetsFormat:["xls","csv","xlsx"],archivesFormat:["zip","rar"],textsFormat:["json","geojson","txt","yml","yaml","shp"],documentsFormat:["pdf"]};return n.imageFormat.includes(t)?"img":n.sheetsFormat.includes(t)?IconCsv:n.textsFormat.includes(t)?IconGeojson:n.documentsFormat.includes(t)?iconPdf:n.archivesFormat.includes(t)?IconZip:IconFile},_sfc_main$d={},_hoisted_1$a={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-trash"};function _sfc_render$4(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$a,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>',6)]))}const IconDelete=_export_sfc(_sfc_main$d,[["render",_sfc_render$4]]),_sfc_main$c={},_hoisted_1$9={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function _sfc_render$3(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$9,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),vue.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),vue.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const IconDownload=_export_sfc(_sfc_main$c,[["render",_sfc_render$3]]),_hoisted_1$8={class:"h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"},_hoisted_2$4={class:"absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center"},_sfc_main$b=vue.defineComponent({__name:"vs-input-file-list-item",props:vue.mergeModels({multiple:{type:Boolean}},{value:{},valueModifiers:{},item:{},itemModifiers:{}}),emits:["update:value","update:item"],setup(e){const t=vue.useModel(e,"value"),n=vue.useModel(e,"item"),r=e;return(o,s)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$8,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(fileFormatPreview)(n.value)),{src:n.value,alt:"file",class:"w-full h-full object-cover cursor-pointer",onClick:s[0]||(s[0]=l=>vue.unref(fileDownload)(n.value))},null,8,["src"])),vue.createElementVNode("div",_hoisted_2$4,[vue.createElementVNode("button",{type:"button",onClick:s[1]||(s[1]=l=>{vue.unref(fileDelete)(n.value),t.value=r.multiple?t.value?.filter(i=>i!==n.value):""}),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"},[vue.createVNode(IconDelete,{class:"w-4 h-4"})]),vue.createElementVNode("button",{type:"button",onClick:s[2]||(s[2]=l=>vue.unref(fileDownload)(n.value)),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"},[vue.createVNode(IconDownload,{class:"w-4 h-4"})])])]))}}),VsInputFileListItem=_export_sfc(_sfc_main$b,[["__scopeId","data-v-bc0f6d32"]]),_hoisted_1$7={class:"flex items-center gap-x-2"},_hoisted_2$3={key:1,class:"flex items-center flex-wrap gap-2"},_sfc_main$a=vue.defineComponent({__name:"vs-input-file",props:vue.mergeModels({multiple:{type:Boolean},format:{},disabled:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=vue.useModel(e,"modelValue"),r=vue.ref(null),o=l=>Array.isArray(n.value)&&n.value[l]||"",s=async l=>{if(t.format){const u=l.target.files?.[0];if(!u||!u.name.endsWith(t.format))return}const i=l.target.files?.[0];if(!i)return;const c=await fileUpload(i,"1","form","table");n.value=t.multiple?[...n.value||[],c.result?.file_path]:c.result?.file_path};return(l,i)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$7,[vue.createElementVNode("input",{class:"hidden",ref_key:"fileInput",ref:r,type:"file",onChange:s},null,544),!l.multiple&&n.value?(vue.openBlock(),vue.createBlock(VsInputFileListItem,{key:0,item:n.value,"onUpdate:item":i[0]||(i[0]=c=>n.value=c),value:n.value,"onUpdate:value":i[1]||(i[1]=c=>n.value=c)},null,8,["item","value"])):l.multiple?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$3,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.value,(c,u)=>(vue.openBlock(),vue.createBlock(VsInputFileListItem,{multiple:l.multiple,key:u,value:n.value,"onUpdate:value":i[2]||(i[2]=a=>n.value=a),item:o(u)},null,8,["multiple","value","item"]))),128)),vue.createElementVNode("div",{onClick:i[3]||(i[3]=c=>!l.disabled&&r.value?.click()),class:vue.normalizeClass(["h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",l.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500 hover:bg-blue-50"])},[vue.createVNode(IconPlus,{class:"w-6 h-6"})],2)])):vue.createCommentVNode("",!0),l.multiple?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:2,onClick:i[4]||(i[4]=c=>r.value?.click()),class:vue.normalizeClass([l.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500","h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])},[vue.createVNode(IconPlus,{class:"w-6 h-6"})],2))]))}}),_hoisted_1$6={class:"flex items-center justify-between"},_hoisted_2$2={class:"text-[16px] text-gray-900 font-medium"},_hoisted_3$1={class:"grid gap-3"},_sfc_main$9=vue.defineComponent({__name:"vs-container-switcher",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(e){const t=e,n=vue.ref(t.isOpen);return vue.watch(()=>t.isOpen,r=>{n.value=r}),(r,o)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$6,[vue.createElementVNode("p",_hoisted_2$2,vue.toDisplayString(e.title),1),vue.createVNode(_sfc_main$v,{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=s=>n.value=s),style:vue.normalizeStyle(e.style)},null,8,["modelValue","style"])]),vue.createVNode(vue.Transition,{name:"slide-fade"},{default:vue.withCtx(()=>[vue.withDirectives(vue.createElementVNode("div",_hoisted_3$1,[vue.renderSlot(r.$slots,"default",{},void 0,!0)],512),[[vue.vShow,n.value]])]),_:3})]))}}),VsContainerSwitcher=_export_sfc(_sfc_main$9,[["__scopeId","data-v-479564a3"]]),_sfc_main$8={},_hoisted_1$5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function _sfc_render$2(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$5,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const IconChevronDown=_export_sfc(_sfc_main$8,[["render",_sfc_render$2]]),_sfc_main$7={},_hoisted_1$4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$1(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$4,t[0]||(t[0]=[vue.createElementVNode("path",{d:"m7 15 5 5 5-5"},null,-1),vue.createElementVNode("path",{d:"m7 9 5-5 5 5"},null,-1)]))}const IconChevronTopBottom=_export_sfc(_sfc_main$7,[["render",_sfc_render$1]]),_sfc_main$6={},_hoisted_1$3={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x"};function _sfc_render(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$3,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),vue.createElementVNode("path",{d:"M6 6l12 12"},null,-1)]))}const IconClose=_export_sfc(_sfc_main$6,[["render",_sfc_render]]),_hoisted_1$2={class:"text-[16px] text-gray-900 font-medium"},_hoisted_2$1={class:"grid gap-3"},_sfc_main$5=vue.defineComponent({__name:"vs-container-accordion",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(e){const t=e,n=vue.ref(t.isOpen);return vue.watch(()=>t.isOpen,r=>{n.value=r}),(r,o)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("button",{type:"button",onClick:o[0]||(o[0]=s=>n.value=!n.value),class:"flex items-center gap-2"},[vue.createVNode(vue.unref(IconChevronDown),{class:vue.normalizeClass(["h-4 w-4 duration-300",[n.value?"-rotate-180":""]])},null,8,["class"]),vue.createElementVNode("span",_hoisted_1$2,vue.toDisplayString(e.title),1)]),vue.createVNode(vue.Transition,{name:"slide-fade"},{default:vue.withCtx(()=>[vue.withDirectives(vue.createElementVNode("div",_hoisted_2$1,[vue.renderSlot(r.$slots,"default",{},void 0,!0)],512),[[vue.vShow,n.value]])]),_:3})]))}}),VsContainerAccordion=_export_sfc(_sfc_main$5,[["__scopeId","data-v-a37284e6"]]),_hoisted_1$1={class:"flex items-center justify-between"},_sfc_main$4=vue.defineComponent({__name:"vs-container-default",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$1,[vue.createElementVNode("p",null,vue.toDisplayString(e.title),1)]),vue.renderSlot(t.$slots,"default")]))}}),views={switcher:VsContainerSwitcher,accordion:VsContainerAccordion,default:_sfc_main$4},FormConditionsTypes={Equal:"==",Inequal:"!=",Higer:">",HigerOrEqual:">=",Lower:"<",LowerOrEqual:"<=",Between:"between",StartWith:"^",EndWith:"$",Contain:"*",In:"in",NotIn:"not_in"},checkEqual=(e,t)=>e===t,checkInequal=(e,t)=>e!==t,checkHigher=(e,t)=>e>t,checkHigherOrEqual=(e,t)=>e>=t,checkLower=(e,t)=>e<t,checkLowerOrEqual=(e,t)=>e<=t,checkBetween=(e,t)=>Array.isArray(t)&&t.length===2?e>=t[0]&&e<=t[1]:!1,checkStartWith=(e,t)=>String(e).startsWith(String(t)),checkEndWith=(e,t)=>String(e).endsWith(String(t)),checkContain=(e,t)=>String(e).includes(String(t)),checkIn=(e,t)=>Array.isArray(t)?t.includes(e):!1,checkNotIn=(e,t)=>Array.isArray(t)?!t.includes(e):!0,isVisible=(e,t)=>{if(!t)return!0;switch(t?.[1]){case FormConditionsTypes.Equal:return checkEqual(e,t?.[2]);case FormConditionsTypes.Inequal:return checkInequal(e,t?.[2]);case FormConditionsTypes.Higer:return checkHigher(e,t?.[2]);case FormConditionsTypes.HigerOrEqual:return checkHigherOrEqual(e,t?.[2]);case FormConditionsTypes.Lower:return checkLower(e,t?.[2]);case FormConditionsTypes.LowerOrEqual:return checkLowerOrEqual(e,t?.[2]);case FormConditionsTypes.Between:return checkBetween(e,t?.[2]);case FormConditionsTypes.StartWith:return checkStartWith(e,t?.[2]);case FormConditionsTypes.EndWith:return checkEndWith(e,t?.[2]);case FormConditionsTypes.Contain:return checkContain(e,t?.[2]);case FormConditionsTypes.In:return checkIn(e,t?.[2]);case FormConditionsTypes.NotIn:return checkNotIn(e,t?.[2]);default:return!0}},_sfc_main$3=vue.defineComponent({__name:"vs-input-container",props:{style:{type:Object,default:()=>({})},title:{type:String,default:""},view:{type:String,default:"default"},schema:{type:Array,default:()=>[]}},setup(e){const t=e,n=vue.inject("formValues",{default:{}}),r=vue.inject("form"),o=vue.computed(()=>t.schema?.filter(l=>{const i=l?.conditions;if(!i)return!0;const c=Array.isArray(i)?i[0]:i,u=n?.value?.[c];return isVisible(u,i)})),s=vue.computed(()=>views[t.view]);return(l,i)=>e.schema?.length?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(s.value),{key:0,title:e.title,style:vue.normalizeStyle(e.style)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.value,c=>(vue.openBlock(),vue.createBlock(_sfc_main$1,vue.mergeProps({key:c.name},{ref_for:!0},c,{item:c,modelValue:vue.unref(n)[c.name],"onUpdate:modelValue":u=>vue.unref(n)[c.name]=u,style:e.style,error:vue.unref(r)?.errors?.[c.name]}),null,16,["item","modelValue","onUpdate:modelValue","style","error"]))),128))]),_:1},8,["title","style"])):vue.createCommentVNode("",!0)}}),dynamicPosition=async(e,t,n,r=10)=>{if(!t||!n)return;await vue.nextTick();const o=await n?.getBoundingClientRect(),s=await t?.getBoundingClientRect();if(!s||!o)return;const l=await parseInt(t?.getBoundingClientRect()?.height.toString()),i=await parseInt(t?.getBoundingClientRect()?.width.toString()),c=await parseInt(n?.getBoundingClientRect()?.height.toString()),u=await parseInt(n?.getBoundingClientRect()?.width.toString()),a=await window.innerHeight,d=await window.innerWidth;let f=0,h=0;const p=s.bottom+r+c;switch(e){case"top":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,d>u+s.right+30?h=s.left-o.width/2+s.width/2:h=d-30-u;break;case"bottom":a>p?f=s.bottom+r:f=s.bottom-r-c-l,h=s.left-o.width/2+s.width/2;break;case"left":f=s.top-o.height/2+s.height/2,s.left-o.width-r>0?h=s.left-o.width-r:h=10;break;case"right":f=s.top-o.height/2+s.height/2,d-i>u?h=s.right+r:h=d-30-u;break;case"top-right":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,d-i>u?h=s.right+r:h=d-30-u;break;case"top-left":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,s.left-o.width-r>0?h=s.left-o.width-r:h=10;break;case"top-start":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,s.left>0?h=s.left:h=10;break;case"bottom-right":a>p?f=s.bottom+r:f=s.bottom-r-c-l,d-i>u?h=s.left:h=d-30-u;break;case"bottom-left":a>p?f=s.bottom+r:f=s.bottom-r-c-l,s.left>0?h=s.right-u:h=10;break;case"bottom-start":a>p?f=s.bottom+r:f=s.bottom-r-c-l,s.left>0?h=s.left:h=10;break}f+c>a?f=a-c-r:f<0&&(f=r),h+u>d?h=d-u-r:h<0&&(h=r),n instanceof HTMLElement&&(n.style.top=`${f}px`,n.style.left=`${h}px`,n.style.position="fixed")},_hoisted_1=["disabled"],_hoisted_2={key:1},_hoisted_3={key:2,class:"text-gray-400"},_hoisted_4={class:"absolute top-[50%] text-gray-500 translate-y-[-50%] right-[10px] pointer-events-none"},_hoisted_5=["onClick"],_hoisted_6={class:"flex items-center gap-[8px] w-full"},_hoisted_7={key:1},_sfc_main$2=vue.defineComponent({__name:"vs-input-select",props:vue.mergeModels({placeholder:{default:"Оберіть значення"},prefix:{default:"api"},host:{default:""},data:{default:null},options:{default:()=>[]},maxHeight:{default:400},slots:{default:null},customClass:{default:""},style:{default:()=>({})},disabled:{type:Boolean}},{modelValue:{type:[Number,String],default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue"),o=vue.ref({}),s=vue.ref(null),l=vue.ref(null),i=vue.ref(!1),c=vue.ref(null),u=vue.ref([]),a=vue.ref(-1),d=vue.ref([]),f=vue.computed(()=>u.value?.length?[c.value,...u.value?.filter(y=>y?.id!==c.value?.id)].filter(y=>y!==null):[]),h=async()=>{try{const{data:y}=await axios.get(`${t.host}/${t.prefix}/suggest/${t.data}?json=1`);return y.data}catch{return[]}},p=async y=>{document.body.click(),i.value=y!==void 0?y:!i.value,i.value&&!u.value?.length&&(!t.options?.length&&t.data?u.value=await h():t.options?.length&&(u.value=[...t.options])),i.value&&s.value?(o.value.width=`${s.value.getBoundingClientRect()?.width}px`,l.value&&dynamicPosition("bottom-start",s.value,l.value)):a.value=-1},v=()=>i.value?p(!1):null,m=y=>{c.value=y,r.value=y.id,p(!1)},g=(y,b)=>{if(!y||!b)return;const w=y.offsetTop,E=w+y.offsetHeight,S=b.scrollTop,B=S+b.clientHeight;w<S?b.scrollTop=w-80:E>B&&(b.scrollTop=E-b.clientHeight+4)},x=y=>{if(!i.value)return;const{keyCode:b}=y;if([38,40,13].includes(b)&&y.preventDefault(),b==38){if(a.value==0)return;a.value-=1,g(d.value[a.value],l.value)}else if(b==40){if(a.value+1>=f.value?.length)return;a.value+=1,g(d.value[a.value],l.value)}else if(b==13){const w=f.value[a.value];w&&m(w)}},$=async y=>{if(i.value)return;const{keyCode:b}=y;[38,40].includes(b)&&(await y.preventDefault(),a.value=0,setTimeout(()=>p()))},_=y=>{i.value&&s.value&&l.value&&!l.value.contains(y.target)&&(i.value=!1)},k=y=>{y?.key==="Escape"&&i.value&&p(!1)};return vue.onMounted(async()=>{addEventListener("click",v),addEventListener("keydown",x),addEventListener("scroll",_,!0),addEventListener("keydown",k),r.value&&!t.options?.length&&t.data&&(u.value=await h(),c.value=u.value?.find(y=>y?.id===r.value)||null)}),vue.onUnmounted(()=>{removeEventListener("click",v),removeEventListener("keydown",x),removeEventListener("scroll",_,!0),removeEventListener("keydown",k)}),(y,b)=>(vue.openBlock(),vue.createElementBlock("div",{class:"relative w-full",ref_key:"select",ref:s,onClick:b[3]||(b[3]=vue.withModifiers(()=>{},["stop"]))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass(["block w-full flex items-center gap-[8px] pl-[16px] py-[5px] bg-white w-[calc(100%)] overflow-ellipsis",[i.value?`ring-rind ring-2 ring-${y.style?.primaryColor||"blue"}-500`:"",c.value?.text?"pr-[50px]":"pr-[25px]",vue.unref(n),y.customClass]]),onKeydown:$,onClick:b[0]||(b[0]=w=>p(!i.value)),disabled:y.disabled,style:{border:"1px solid #CFD9E0"}},[c.value?.color?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block",style:vue.normalizeStyle({backgroundColor:c.value?.color})},null,4)):vue.createCommentVNode("",!0),c.value?.text?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2,vue.toDisplayString(c.value?.text),1)):(vue.openBlock(),vue.createElementBlock("span",_hoisted_3,vue.toDisplayString(y.placeholder),1))],42,_hoisted_1),vue.createElementVNode("span",_hoisted_4,[vue.createVNode(vue.unref(IconChevronTopBottom),{height:"14",width:"14"})]),c.value?.text?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",onClick:b[1]||(b[1]=w=>{r.value=null,c.value=null}),class:"absolute top-[50%] text-gray-500 translate-y-[-50%] hover:text-red-600 right-[30px]"},[vue.createVNode(vue.unref(IconClose),{height:"14",width:"14"})])):vue.createCommentVNode("",!0),(vue.openBlock(),vue.createBlock(vue.Teleport,{to:"body"},[vue.withDirectives(vue.createElementVNode("ul",{class:"z-[90] border rounded-lg fixed flex flex-col gap-[2px] p-1 bg-white overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",ref_key:"list",ref:l,style:vue.normalizeStyle({width:o.value.width,maxHeight:y.maxHeight+"px",backgroundColor:"white"}),onClick:b[2]||(b[2]=vue.withModifiers(()=>{},["stop"]))},[f.value?.length?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[b[4]||(b[4]=vue.createElementVNode("li",{class:"sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400"}," Натисніть Enter для вибору, ↑↓ для навігації, Esc для закриття ",-1)),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(f.value,(w,E)=>(vue.openBlock(),vue.createElementBlock("li",{onClick:S=>m(w),key:w?.id,ref_for:!0,ref:S=>d.value[E]=S,class:vue.normalizeClass(["cursor-pointer relative py-2 px-4 w-full text-[14px] text-gray-700 hover:bg-gray-100 rounded-lg",[a.value==E?"bg-gray-100":""]])},[vue.createElementVNode("span",_hoisted_6,[w?.color?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block",style:vue.normalizeStyle({backgroundColor:w?.color})},null,4)):vue.createCommentVNode("",!0),vue.createTextVNode(" "+vue.toDisplayString(w?.text),1)]),r.value==w?.id?(vue.openBlock(),vue.createBlock(vue.unref(IconCheck),{key:0,height:"14",width:"14","stroke-width":"2",class:"absolute right-[16px] top-[50%] translate-y-[-50%] text-blue-600"})):vue.createCommentVNode("",!0)],10,_hoisted_5))),128))],64)):(vue.openBlock(),vue.createElementBlock("li",_hoisted_7,"Дані відсутні"))],4),[[vue.vShow,i.value]])]))],512))}}),inputs={VsInputText:_sfc_main$x,VsInputRadio:_sfc_main$q,"vs-input-text":_sfc_main$x,"vs-input-mask":_sfc_main$t,"vs-input-number":_sfc_main$w,"vs-input-radio":_sfc_main$q,"vs-input-select":_sfc_main$2,"vs-input-switcher":_sfc_main$v,"vs-input-static":_sfc_main$u,"vs-input-container":_sfc_main$3,"vs-input-date":_sfc_main$k,"vs-input-checkbox":VsInputCheckbox,"vs-input-file":_sfc_main$a},_sfc_main$1=vue.defineComponent({__name:"vs-compact-form-layout",props:{type:{type:String,default:""},style:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},layout:{type:String,default:"default"}},setup(e){const t=e,n=vue.computed(()=>layouts$1[`${t.layout}`]),r=vue.computed(()=>inputs?.[`vs-input-${t.type}`]);return(o,s)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(n.value),vue.mergeProps(o.$attrs,{style:e.style,item:e.item}),{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(r.value),vue.mergeProps(o.$attrs,{style:e.style}),null,16,["style"]))]),_:1},16,["style","item"]))}}),formErrorsUa={required:"Це поле є обов’язковим",email:"Неправильний email"},required=e=>e?!1:formErrorsUa.required,email=e=>!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)&&e?formErrorsUa.email:!1,regexp=(e,t)=>!t.pattern.test(e)&&e?t.message:!1,custom=(value,custom)=>{const func=eval(custom.function);return func(value)?!1:custom.message},checkFormRules=(e,t)=>{switch(typeof t=="string"?t:t.type){case"required":return required(e);case"email":return email(e);case"regexp":return regexp(e,t);case"custom":return custom(e,t);default:return!1}},mathTable={autocomplete:"select",combobox:"select",email:"text",textarea:"text",datepicker:"date",markedtext:"text"};function convertType(e){const t=e.toLowerCase();return mathTable[t]||t}function convertSchema(e){if(Array.isArray(e))return e;const t=[];return Object.entries(e).forEach(n=>{const r={name:n[0],...n[1],type:convertType(n[1].type),label:n[1].label||n[1].ua};n[1].data&&(r.api=`/api/suggest/${n[1].data}`),t.push(r)}),t}function useForm(e,t){const n=convertSchema(t),r=vue.ref({}),o=(i=n,c=!0)=>{if(i.forEach(u=>{u.rules&&u.rules.forEach(a=>{r.value[u.name]=checkFormRules(e.value[u.name],a)}),u.schema&&o(u.schema,!1)}),c&&Object.values(r.value).some(Boolean))throw new Error("Помилка валідації")},s=vue.computed(()=>n?.filter(i=>{const c=i?.conditions;if(!c)return!0;const u=Array.isArray(c)?c[0]:c,a=e?.value?.[u];return isVisible(a,c)}));return{errors:r,validate:o,reset:()=>{e.value={},r.value={}},visibleSchema:s}}const _sfc_main=vue.defineComponent({__name:"vs-compact-form",props:vue.mergeModels({schema:{default:()=>[]},style:{default:()=>({})},layout:{default:()=>"default"}},{form:{default:()=>({})},formModifiers:{},values:{default:()=>({})},valuesModifiers:{}}),emits:vue.mergeModels(["handle-submit"],["update:form","update:values"]),setup(e,{emit:t}){const n=t,r=e,o=vue.useAttrs(),s=vue.useModel(e,"form"),l=vue.useModel(e,"values"),{errors:i,validate:c,reset:u,visibleSchema:a}=useForm(l,r.schema),d=()=>{c(),n("handle-submit",l.value)};return vue.onMounted(()=>{s.value.value=l.value,s.value.errors=i.value,s.value.reset=u,s.value.validate=c}),vue.provide("form",s),vue.provide("values",l),(f,h)=>(vue.openBlock(),vue.createElementBlock("form",{onSubmit:vue.withModifiers(d,["prevent"]),class:vue.normalizeClass(["grid grid-cols-12",f.layout==="default"?"gap-6":"gap-4"])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(a),p=>(vue.openBlock(),vue.createBlock(_sfc_main$1,vue.mergeProps({key:p.name,class:`col-span-${p.col||12} `},{ref_for:!0},{...vue.unref(o),...f.style,...p},{item:p,layout:f.layout,modelValue:l.value[p.name],"onUpdate:modelValue":v=>l.value[p.name]=v,style:f.style,error:vue.unref(i)[p.name]}),null,16,["class","item","layout","modelValue","onUpdate:modelValue","style","error"]))),128))],34))}});_sfc_main.install=function e(t){t.component("VForm",_sfc_main)},exports.VForm=_sfc_main,exports.VsInputText=_sfc_main$x,exports.default=_sfc_main,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
6
+ `+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mergeConfig$1(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),o!=null&&(utils$1.isFunction(o)?n.paramsSerializer={serialize:o}:validator.assertOptions(o,{encode:validators.function,serialize:validators.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),validator.assertOptions(n,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=s&&utils$1.merge(s.common,s[n.method]);s&&utils$1.forEach(["delete","get","head","post","put","patch","common"],p=>{delete s[p]}),n.headers=AxiosHeaders$1.concat(l,s);const i=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,i.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let a,d=0,f;if(!c){const p=[dispatchRequest.bind(this),void 0];for(p.unshift.apply(p,i),p.push.apply(p,u),f=p.length,a=Promise.resolve(n);d<f;)a=a.then(p[d++],p[d++]);return a}f=i.length;let h=n;for(d=0;d<f;){const p=i[d++],v=i[d++];try{h=p(h)}catch(m){v.call(this,m);break}}try{a=dispatchRequest.call(this,h)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)a=a.then(u[d++],u[d++]);return a}getUri(t){t=mergeConfig$1(this.defaults,t);const n=buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls);return buildURL(n,t.params,t.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function(t){Axios$1.prototype[t]=function(n,r){return this.request(mergeConfig$1(r||{},{method:t,url:n,data:(r||{}).data}))}}),utils$1.forEach(["post","put","patch"],function(t){function n(r){return function(s,l,i){return this.request(mergeConfig$1(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:l}))}}Axios$1.prototype[t]=n(),Axios$1.prototype[t+"Form"]=n(!0)});let CancelToken$1=class C{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const l=new Promise(i=>{r.subscribe(i),s=i}).then(o);return l.cancel=function(){r.unsubscribe(s)},l},t(function(s,l,i){r.reason||(r.reason=new CanceledError$1(s,l,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new C(function(o){t=o}),cancel:t}}};function spread$1(e){return function(n){return e.apply(null,n)}}function isAxiosError$1(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach(([e,t])=>{HttpStatusCode$1[t]=e});function createInstance(e){const t=new Axios$1(e),n=bind(Axios$1.prototype.request,t);return utils$1.extend(n,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return createInstance(mergeConfig$1(e,o))},n}const axios=createInstance(defaults);axios.Axios=Axios$1,axios.CanceledError=CanceledError$1,axios.CancelToken=CancelToken$1,axios.isCancel=isCancel$1,axios.VERSION=VERSION$1,axios.toFormData=toFormData$1,axios.AxiosError=AxiosError$1,axios.Cancel=axios.CanceledError,axios.all=function(t){return Promise.all(t)},axios.spread=spread$1,axios.isAxiosError=isAxiosError$1,axios.mergeConfig=mergeConfig$1,axios.AxiosHeaders=AxiosHeaders$1,axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e),axios.getAdapter=adapters.getAdapter,axios.HttpStatusCode=HttpStatusCode$1,axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios,_export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},_sfc_main$q={},_hoisted_1$m={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"4","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function _sfc_render$b(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$m,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const IconCheck=_export_sfc(_sfc_main$q,[["render",_sfc_render$b]]),_hoisted_1$l={class:"flex items-center gap-[4px]"},_hoisted_2$6=["value","id","disabled"],_hoisted_3$3=["for"],_hoisted_4$2={class:"text-[13px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400"},_sfc_main$p=vue.defineComponent({__name:"vs-checkbox-default",props:{value:{type:[String,Number],default:""},label:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},id:{type:[String,Number]},modelValue:Boolean,info:{type:String,default:()=>""}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,r=e,o=vue.computed({get:()=>r.modelValue,set:s=>n("update:modelValue",s)});return(s,l)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$l,[vue.withDirectives(vue.createElementVNode("input",{type:"checkbox",value:e.value,"onUpdate:modelValue":l[0]||(l[0]=i=>o.value=i),class:vue.normalizeClass(["shrink-0 border border-solid hidden border-gray-200 w-3.5 h-3.5 rounded text-blue-600 focus:ring-offset-0 dark:bg-neutral-800 dark:border-neutral-700 cursor-pointer",{"!cursor-not-allowed":e.disabled}]),id:e.id,disabled:e.disabled},null,10,_hoisted_2$6),[[vue.vModelCheckbox,o.value]]),vue.createElementVNode("label",{for:e.id,class:vue.normalizeClass(["flex flex-1 checkbox-label items-center gap-x-3 cursor-pointer text-sm text-gray-800 dark:text-neutral-300",{"!cursor-not-allowed":e.disabled}])},[vue.createElementVNode("div",{class:vue.normalizeClass(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded",[o.value?"bg-blue-600":"bg-white"]])},[vue.createVNode(IconCheck,{height:"12",width:"12"})],2),vue.createElementVNode("span",_hoisted_4$2,[vue.renderSlot(s.$slots,"default",{},()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)])])],10,_hoisted_3$3)]))}}),_hoisted_1$k=["name","value","disabled"],_hoisted_2$5={class:"flex items-center gap-[6px] text-[14px]"},_hoisted_3$2={key:0,class:"text-[16px]"},_hoisted_4$1=["src"],_sfc_main$o=vue.defineComponent({__name:"vs-checkbox-buttons",props:{value:{type:[String,Number,Boolean],default:""},label:{type:[String,Number],default:""},modelValue:{type:[Array,String,Boolean],default:""},disabled:{type:Boolean,default:!1},id:{type:[String,Number]},icon:{type:String},imgUrl:{type:String},style:{type:Object,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=vue.computed({get:()=>n.modelValue,set:i=>{r("update:modelValue",i)}}),s=vue.computed(()=>Array.isArray(o.value)?o.value.includes(n.value):o.value===!0||o.value===n.value),l=vue.computed(()=>n.style?.size==="xs"?"p-1.5 text-xs":n.style?.size==="lg"?"p-3.5 text-[20px]":"p-2.5 text-xs");return(i,c)=>(vue.openBlock(),vue.createElementBlock("label",{class:vue.normalizeClass(["group relative flex justify-center items-center gap-x-3 text-center bg-white text-gray-800 ring-ring ring-2 cursor-pointer rounded-lg",[l.value,s.value?"ring-blue-500":"border border-gray-200 ring-transparent"]])},[vue.withDirectives(vue.createElementVNode("input",{type:"checkbox",class:"hidden",name:e.id,value:e.value,"onUpdate:modelValue":c[0]||(c[0]=u=>o.value=u),disabled:e.disabled},null,8,_hoisted_1$k),[[vue.vModelCheckbox,o.value]]),vue.createElementVNode("span",_hoisted_2$5,[e.icon||e.imgUrl?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$2,[e.icon?(vue.openBlock(),vue.createElementBlock("i",{key:0,class:vue.normalizeClass(e.icon)},null,2)):vue.createCommentVNode("",!0),e.imgUrl?(vue.openBlock(),vue.createElementBlock("img",{key:1,src:e.imgUrl,width:"16",height:"16",alt:"icon"},null,8,_hoisted_4$1)):vue.createCommentVNode("",!0)])):vue.createCommentVNode("",!0),vue.renderSlot(i.$slots,"default",{},()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)])])],2))}}),VsCheckboxViews={"vs-checkbox-default":_sfc_main$p,"vs-checkbox-buttons":_sfc_main$o},_hoisted_1$j={class:"flex items-center"},_sfc_main$n=vue.defineComponent({__name:"vs-input-checkbox-item",props:{value:{type:[String,Number],default:""},label:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},view:{type:String,default:()=>"default"},modelValue:{type:[Array,Boolean],default:!1},icon:{type:String},imgUrl:{type:String},slots:{type:Object,default:()=>null},option:{type:[Object,String]},style:{type:String,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=`radio-${Math.floor(Math.random()*1e4)}`,s=vue.computed({get:()=>Array.isArray(n.modelValue)?Array.isArray(n.modelValue)&&n.modelValue.includes(n.value):n.modelValue,set:i=>{if(Array.isArray(n.modelValue)){let c=[...n.modelValue];i?c.includes(n.value)||c.push(n.value):c=c.filter(u=>u!==n.value),r("update:modelValue",c)}else r("update:modelValue",i)}}),l=vue.ref(`vs-checkbox-${n.view||"default"}`);return(i,c)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$j,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(VsCheckboxViews)?.[l.value]),{value:e.value,label:e.label,info:e.option?.info,disabled:e.disabled,modelValue:s.value,"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u),id:o,icon:e.icon,imgUrl:e.imgUrl,style:vue.normalizeStyle(e.style)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(e.label),1)]),_:1},8,["value","label","info","disabled","modelValue","icon","imgUrl","style"]))]))}}),_sfc_main$m=vue.defineComponent({__name:"vs-input-checkbox",props:{options:{type:Array,default:()=>[]},modelValue:{type:[Boolean,Array],default:!1},position:{default:()=>"vertical"},slots:{type:Object,default:()=>null},view:{type:String,default:()=>null},colSpan:{type:Number,default:()=>0},data:{type:String,default:()=>null}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=t,o=vue.ref([]),s=vue.reactive({}),l=a=>a?.value||a?.id||a?.text||a,i=a=>a.text||String(a),c=a=>`lg:col-span-${a||12}`,u=async()=>{try{const{data:a}=await axios.get(`/api/suggest/${n.data}`);o.value=a?.data||a}catch(a){console.error(a)}};return vue.watch(()=>n.modelValue,a=>{if(typeof a=="boolean"&&o.value.length===1){const d=l(o.value[0]);s[d]=a}else if(Array.isArray(a)){const d=new Set(a);o.value.forEach(f=>{if(!f.disabled){const h=l(f);s[h]=d.has(h)}})}},{immediate:!0}),vue.watch(s,()=>{if(!o.value.length){r("update:modelValue",null);return}const a=Object.entries(s).filter(([,d])=>d).map(([d])=>d);r("update:modelValue",a.length===0?null:a)},{deep:!0}),vue.onMounted(()=>{if(n.data)u().then(()=>{if(typeof n.modelValue=="boolean"&&o.value.length===1){const a=l(o.value[0]);s[a]=n.modelValue}else if(Array.isArray(n.modelValue)){const a=new Set(n.modelValue);o.value.forEach(d=>{if(!d.disabled){const f=l(d);s[f]=a.has(f)}})}});else if(o.value=n.options,typeof n.modelValue=="boolean"&&o.value.length===1){const a=l(o.value[0]);s[a]=n.modelValue}else if(Array.isArray(n.modelValue)){const a=new Set(n.modelValue);o.value.forEach(d=>{if(!d.disabled){const f=l(d);s[f]=a.has(f)}})}}),(a,d)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["p-0 w-full gap-[6px]",[e.position==="vertical"?"flex-col":"",e.colSpan?"grid":"flex justify-start"]])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.value,f=>(vue.openBlock(),vue.createBlock(_sfc_main$n,{modelValue:s[l(f)],"onUpdate:modelValue":h=>s[l(f)]=h,value:l(f),class:vue.normalizeClass(c(e.colSpan)),disabled:f.disabled,label:i(f),key:l(f),icon:f?.icon,imgUrl:f?.imgUrl,option:f,slots:e.slots,view:e.view},null,8,["modelValue","onUpdate:modelValue","value","class","disabled","label","icon","imgUrl","option","slots","view"]))),128))],2))}}),VsInputCheckbox=_export_sfc(_sfc_main$m,[["__scopeId","data-v-9685f778"]]),_hoisted_1$i=["placeholder","disabled"],_sfc_main$l=vue.defineComponent({__name:"vs-input-date1",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("input",{type:"date","onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,disabled:e.disabled,class:vue.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1$i)),[[vue.vModelText,r.value]])}}),fileUpload=async(e,t,n,r)=>{try{const o=new FormData;o.append("unique","true"),o.append("file",e);const{data:s}=await axios.post(`/file/upload/uploads?id=${t||""}&form=${n||""}&table=${r||""}`,o);return s}catch(o){console.error(o)}},fileDelete=async e=>{try{return await axios.get(`file/delete${e}`),!0}catch(t){return console.error(t),!1}},fileDownload=async e=>{try{const t=await axios.get(`file/download/files/uploads${e}`,{responseType:"arraybuffer",headers:{"Content-Type":"application/json"}}),n=t.headers["content-type"],r=new TextDecoder("utf-8").decode(t.data),o=new Blob([r],{type:n}),s=document.createElement("a");s.setAttribute("download",e),s.href=window.URL.createObjectURL(o),s.click()}catch(t){console.error(t.message)}},_sfc_main$k={},_hoisted_1$h={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$a(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$h,t[0]||(t[0]=[vue.createElementVNode("path",{d:"M5 12h14"},null,-1),vue.createElementVNode("path",{d:"M12 5v14"},null,-1)]))}const IconPlus=_export_sfc(_sfc_main$k,[["render",_sfc_render$a]]),_sfc_main$j={},_hoisted_1$g={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-text",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$9(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$g,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><line x1="9" y1="9" x2="10" y2="9"></line><line x1="9" y1="13" x2="15" y2="13"></line><line x1="9" y1="17" x2="15" y2="17"></line>',6)]))}const iconPdf=_export_sfc(_sfc_main$j,[["render",_sfc_render$9]]),_sfc_main$i={},_hoisted_1$f={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-table",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$8(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$f,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"},null,-1),vue.createElementVNode("line",{x1:"4",y1:"10",x2:"20",y2:"10"},null,-1),vue.createElementVNode("line",{x1:"10",y1:"4",x2:"10",y2:"20"},null,-1)]))}const IconCsv=_export_sfc(_sfc_main$i,[["render",_sfc_render$8]]),_sfc_main$h={},_hoisted_1$e={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"};function _sfc_render$7(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$e,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M12 17v.01"></path><path d="M12 14a1.5 1.5 0 1 0 -1.14 -2.474"></path>',5)]))}const IconFile=_export_sfc(_sfc_main$h,[["render",_sfc_render$7]]),_sfc_main$g={},_hoisted_1$d={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-zip",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$6(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$d,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M6 20.735a2 2 0 0 1 -1 -1.735v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-1"></path><path d="M11 17a2 2 0 0 1 2 2v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-2a2 2 0 0 1 2 -2z"></path><line x1="11" y1="5" x2="10" y2="5"></line><line x1="13" y1="7" x2="12" y2="7"></line><line x1="11" y1="9" x2="10" y2="9"></line><line x1="13" y1="11" x2="12" y2="11"></line><line x1="11" y1="13" x2="10" y2="13"></line><line x1="13" y1="15" x2="12" y2="15"></line>',9)]))}const IconZip=_export_sfc(_sfc_main$g,[["render",_sfc_render$6]]),_sfc_main$f={},_hoisted_1$c={xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-file-code",width:"44",height:"44",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$5(e,t,n,r,o,s){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$c,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M10 13l-1 2l1 2"></path><path d="M14 13l1 2l-1 2"></path>',5)]))}const IconGeojson=_export_sfc(_sfc_main$f,[["render",_sfc_render$5]]),getFileType=e=>{if(!e)return"";const t=e?.split(".");return t[t.length-1]},fileFormatPreview=e=>{const t=getFileType(e),n={imageFormat:["tiff","jpg","jpeg","png","svg","ico","webp"],sheetsFormat:["xls","csv","xlsx"],archivesFormat:["zip","rar"],textsFormat:["json","geojson","txt","yml","yaml","shp"],documentsFormat:["pdf"]};return n.imageFormat.includes(t)?"img":n.sheetsFormat.includes(t)?IconCsv:n.textsFormat.includes(t)?IconGeojson:n.documentsFormat.includes(t)?iconPdf:n.archivesFormat.includes(t)?IconZip:IconFile},_sfc_main$e={},_hoisted_1$b={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-trash"};function _sfc_render$4(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$b,t[0]||(t[0]=[vue.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 7l16 0"></path><path d="M10 11l0 6"></path><path d="M14 11l0 6"></path><path d="M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12"></path><path d="M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3"></path>',6)]))}const IconDelete=_export_sfc(_sfc_main$e,[["render",_sfc_render$4]]),_sfc_main$d={},_hoisted_1$a={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-download"};function _sfc_render$3(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$a,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2"},null,-1),vue.createElementVNode("path",{d:"M7 11l5 5l5 -5"},null,-1),vue.createElementVNode("path",{d:"M12 4l0 12"},null,-1)]))}const IconDownload=_export_sfc(_sfc_main$d,[["render",_sfc_render$3]]),_hoisted_1$9={class:"h-[120px] w-[120px] border text-gray-300 border-dashed border-[#CFD9E0] rounded-lg overflow-hidden relative item-file"},_hoisted_2$4={class:"absolute hidden top-0 right-0 flex items-center gap-x-2 w-full h-full justify-center"},_sfc_main$c=vue.defineComponent({__name:"vs-input-file-list-item",props:vue.mergeModels({multiple:{type:Boolean}},{value:{},valueModifiers:{},item:{},itemModifiers:{}}),emits:["update:value","update:item"],setup(e){const t=vue.useModel(e,"value"),n=vue.useModel(e,"item"),r=e;return(o,s)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$9,[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(fileFormatPreview)(n.value)),{src:n.value,alt:"file",class:"w-full h-full object-cover cursor-pointer",onClick:s[0]||(s[0]=l=>vue.unref(fileDownload)(n.value))},null,8,["src"])),vue.createElementVNode("div",_hoisted_2$4,[vue.createElementVNode("button",{type:"button",onClick:s[1]||(s[1]=l=>{vue.unref(fileDelete)(n.value),t.value=r.multiple?t.value?.filter(i=>i!==n.value):""}),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"},[vue.createVNode(IconDelete,{class:"w-4 h-4"})]),vue.createElementVNode("button",{type:"button",onClick:s[2]||(s[2]=l=>vue.unref(fileDownload)(n.value)),class:"w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"},[vue.createVNode(IconDownload,{class:"w-4 h-4"})])])]))}}),VsInputFileListItem=_export_sfc(_sfc_main$c,[["__scopeId","data-v-bc0f6d32"]]),_hoisted_1$8={class:"flex items-center gap-x-2"},_hoisted_2$3={key:1,class:"flex items-center flex-wrap gap-2"},_sfc_main$b=vue.defineComponent({__name:"vs-input-file",props:vue.mergeModels({multiple:{type:Boolean},format:{},disabled:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=vue.useModel(e,"modelValue"),r=vue.ref(null),o=l=>Array.isArray(n.value)&&n.value[l]||"",s=async l=>{if(t.format){const u=l.target.files?.[0];if(!u||!u.name.endsWith(t.format))return}const i=l.target.files?.[0];if(!i)return;const c=await fileUpload(i,"1","form","table");n.value=t.multiple?[...n.value||[],c.result?.file_path]:c.result?.file_path};return(l,i)=>(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$8,[vue.createElementVNode("input",{class:"hidden",ref_key:"fileInput",ref:r,type:"file",onChange:s},null,544),!l.multiple&&n.value?(vue.openBlock(),vue.createBlock(VsInputFileListItem,{key:0,item:n.value,"onUpdate:item":i[0]||(i[0]=c=>n.value=c),value:n.value,"onUpdate:value":i[1]||(i[1]=c=>n.value=c)},null,8,["item","value"])):l.multiple?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$3,[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(n.value,(c,u)=>(vue.openBlock(),vue.createBlock(VsInputFileListItem,{multiple:l.multiple,key:u,value:n.value,"onUpdate:value":i[2]||(i[2]=a=>n.value=a),item:o(u)},null,8,["multiple","value","item"]))),128)),vue.createElementVNode("div",{onClick:i[3]||(i[3]=c=>!l.disabled&&r.value?.click()),class:vue.normalizeClass(["h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-[#CFD9E0] rounded-lg flex items-center justify-center transition-all duration-300",l.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500 hover:bg-blue-50"])},[vue.createVNode(IconPlus,{class:"w-6 h-6"})],2)])):vue.createCommentVNode("",!0),l.multiple?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("div",{key:2,onClick:i[4]||(i[4]=c=>r.value?.click()),class:vue.normalizeClass([l.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer hover:border-blue-500","h-[120px] w-[120px] border text-gray-300 hover:text-blue-500 border-dashed border-gray-300 rounded-lg flex items-center justify-center cursor-pointer hover:border-blue-500 transition-all duration-300 hover:bg-blue-50"])},[vue.createVNode(IconPlus,{class:"w-6 h-6"})],2))]))}}),_hoisted_1$7={class:"flex items-center justify-between"},_hoisted_2$2={class:"text-[16px] text-gray-900 font-medium"},_hoisted_3$1={class:"grid gap-3"},_sfc_main$a=vue.defineComponent({__name:"vs-container-switcher",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(e){const t=e,n=vue.ref(t.isOpen);return vue.watch(()=>t.isOpen,r=>{n.value=r}),(r,o)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$7,[vue.createElementVNode("p",_hoisted_2$2,vue.toDisplayString(e.title),1),vue.createVNode(_sfc_main$w,{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=s=>n.value=s),style:vue.normalizeStyle(e.style)},null,8,["modelValue","style"])]),vue.createVNode(vue.Transition,{name:"slide-fade"},{default:vue.withCtx(()=>[vue.withDirectives(vue.createElementVNode("div",_hoisted_3$1,[vue.renderSlot(r.$slots,"default",{},void 0,!0)],512),[[vue.vShow,n.value]])]),_:3})]))}}),VsContainerSwitcher=_export_sfc(_sfc_main$a,[["__scopeId","data-v-479564a3"]]),_sfc_main$9={},_hoisted_1$6={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function _sfc_render$2(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$6,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const IconChevronDown=_export_sfc(_sfc_main$9,[["render",_sfc_render$2]]),_sfc_main$8={},_hoisted_1$5={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function _sfc_render$1(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$5,t[0]||(t[0]=[vue.createElementVNode("path",{d:"m7 15 5 5 5-5"},null,-1),vue.createElementVNode("path",{d:"m7 9 5-5 5 5"},null,-1)]))}const IconChevronTopBottom=_export_sfc(_sfc_main$8,[["render",_sfc_render$1]]),_sfc_main$7={},_hoisted_1$4={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x"};function _sfc_render(e,t){return vue.openBlock(),vue.createElementBlock("svg",_hoisted_1$4,t[0]||(t[0]=[vue.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),vue.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),vue.createElementVNode("path",{d:"M6 6l12 12"},null,-1)]))}const IconClose=_export_sfc(_sfc_main$7,[["render",_sfc_render]]),_hoisted_1$3={class:"text-[16px] text-gray-900 font-medium"},_hoisted_2$1={class:"grid gap-3"},_sfc_main$6=vue.defineComponent({__name:"vs-container-accordion",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})},isOpen:{type:Boolean,default:!1}},setup(e){const t=e,n=vue.ref(t.isOpen);return vue.watch(()=>t.isOpen,r=>{n.value=r}),(r,o)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("button",{type:"button",onClick:o[0]||(o[0]=s=>n.value=!n.value),class:"flex items-center gap-2"},[vue.createVNode(vue.unref(IconChevronDown),{class:vue.normalizeClass(["h-4 w-4 duration-300",[n.value?"-rotate-180":""]])},null,8,["class"]),vue.createElementVNode("span",_hoisted_1$3,vue.toDisplayString(e.title),1)]),vue.createVNode(vue.Transition,{name:"slide-fade"},{default:vue.withCtx(()=>[vue.withDirectives(vue.createElementVNode("div",_hoisted_2$1,[vue.renderSlot(r.$slots,"default",{},void 0,!0)],512),[[vue.vShow,n.value]])]),_:3})]))}}),VsContainerAccordion=_export_sfc(_sfc_main$6,[["__scopeId","data-v-a37284e6"]]),_hoisted_1$2={class:"flex items-center justify-between"},_sfc_main$5=vue.defineComponent({__name:"vs-container-default",props:{title:{type:String,default:""},style:{type:Object,default:()=>({})}},setup(e){return(t,n)=>(vue.openBlock(),vue.createElementBlock("div",null,[vue.createElementVNode("div",_hoisted_1$2,[vue.createElementVNode("p",null,vue.toDisplayString(e.title),1)]),vue.renderSlot(t.$slots,"default")]))}}),views={switcher:VsContainerSwitcher,accordion:VsContainerAccordion,default:_sfc_main$5},FormConditionsTypes={Equal:"==",Inequal:"!=",Higer:">",HigerOrEqual:">=",Lower:"<",LowerOrEqual:"<=",Between:"between",StartWith:"^",EndWith:"$",Contain:"*",In:"in",NotIn:"not_in"},checkEqual=(e,t)=>e===t,checkInequal=(e,t)=>e!==t,checkHigher=(e,t)=>e>t,checkHigherOrEqual=(e,t)=>e>=t,checkLower=(e,t)=>e<t,checkLowerOrEqual=(e,t)=>e<=t,checkBetween=(e,t)=>Array.isArray(t)&&t.length===2?e>=t[0]&&e<=t[1]:!1,checkStartWith=(e,t)=>String(e).startsWith(String(t)),checkEndWith=(e,t)=>String(e).endsWith(String(t)),checkContain=(e,t)=>String(e).includes(String(t)),checkIn=(e,t)=>Array.isArray(t)?t.includes(e):!1,checkNotIn=(e,t)=>Array.isArray(t)?!t.includes(e):!0,isVisible=(e,t)=>{if(!t)return!0;switch(t?.[1]){case FormConditionsTypes.Equal:return checkEqual(e,t?.[2]);case FormConditionsTypes.Inequal:return checkInequal(e,t?.[2]);case FormConditionsTypes.Higer:return checkHigher(e,t?.[2]);case FormConditionsTypes.HigerOrEqual:return checkHigherOrEqual(e,t?.[2]);case FormConditionsTypes.Lower:return checkLower(e,t?.[2]);case FormConditionsTypes.LowerOrEqual:return checkLowerOrEqual(e,t?.[2]);case FormConditionsTypes.Between:return checkBetween(e,t?.[2]);case FormConditionsTypes.StartWith:return checkStartWith(e,t?.[2]);case FormConditionsTypes.EndWith:return checkEndWith(e,t?.[2]);case FormConditionsTypes.Contain:return checkContain(e,t?.[2]);case FormConditionsTypes.In:return checkIn(e,t?.[2]);case FormConditionsTypes.NotIn:return checkNotIn(e,t?.[2]);default:return!0}},_sfc_main$4=vue.defineComponent({__name:"vs-input-container",props:{style:{type:Object,default:()=>({})},title:{type:String,default:""},view:{type:String,default:"default"},schema:{type:Array,default:()=>[]}},setup(e){const t=e,n=vue.inject("formValues",{default:{}}),r=vue.inject("form"),o=vue.computed(()=>t.schema?.filter(l=>{const i=l?.conditions;if(!i)return!0;const c=Array.isArray(i)?i[0]:i,u=n?.value?.[c];return isVisible(u,i)})),s=vue.computed(()=>views[t.view]);return(l,i)=>e.schema?.length?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(s.value),{key:0,title:e.title,style:vue.normalizeStyle(e.style)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(o.value,c=>(vue.openBlock(),vue.createBlock(_sfc_main$1,vue.mergeProps({key:c.name},{ref_for:!0},c,{item:c,modelValue:vue.unref(n)[c.name],"onUpdate:modelValue":u=>vue.unref(n)[c.name]=u,style:e.style,error:vue.unref(r)?.errors?.[c.name]}),null,16,["item","modelValue","onUpdate:modelValue","style","error"]))),128))]),_:1},8,["title","style"])):vue.createCommentVNode("",!0)}}),dynamicPosition=async(e,t,n,r=10)=>{if(!t||!n)return;await vue.nextTick();const o=await n?.getBoundingClientRect(),s=await t?.getBoundingClientRect();if(!s||!o)return;const l=await parseInt(t?.getBoundingClientRect()?.height.toString()),i=await parseInt(t?.getBoundingClientRect()?.width.toString()),c=await parseInt(n?.getBoundingClientRect()?.height.toString()),u=await parseInt(n?.getBoundingClientRect()?.width.toString()),a=await window.innerHeight,d=await window.innerWidth;let f=0,h=0;const p=s.bottom+r+c;switch(e){case"top":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,d>u+s.right+30?h=s.left-o.width/2+s.width/2:h=d-30-u;break;case"bottom":a>p?f=s.bottom+r:f=s.bottom-r-c-l,h=s.left-o.width/2+s.width/2;break;case"left":f=s.top-o.height/2+s.height/2,s.left-o.width-r>0?h=s.left-o.width-r:h=10;break;case"right":f=s.top-o.height/2+s.height/2,d-i>u?h=s.right+r:h=d-30-u;break;case"top-right":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,d-i>u?h=s.right+r:h=d-30-u;break;case"top-left":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,s.left-o.width-r>0?h=s.left-o.width-r:h=10;break;case"top-start":s.top-o.height-r<0?f=s.top-o.height+r+c+l:f=s.top-o.height-r,s.left>0?h=s.left:h=10;break;case"bottom-right":a>p?f=s.bottom+r:f=s.bottom-r-c-l,d-i>u?h=s.left:h=d-30-u;break;case"bottom-left":a>p?f=s.bottom+r:f=s.bottom-r-c-l,s.left>0?h=s.right-u:h=10;break;case"bottom-start":a>p?f=s.bottom+r:f=s.bottom-r-c-l,s.left>0?h=s.left:h=10;break}f+c>a?f=a-c-r:f<0&&(f=r),h+u>d?h=d-u-r:h<0&&(h=r),n instanceof HTMLElement&&(n.style.top=`${f}px`,n.style.left=`${h}px`,n.style.position="fixed")},_hoisted_1$1=["disabled"],_hoisted_2={key:1},_hoisted_3={key:2,class:"text-gray-400"},_hoisted_4={class:"absolute top-[50%] text-gray-500 translate-y-[-50%] right-[10px] pointer-events-none"},_hoisted_5=["onClick"],_hoisted_6={class:"flex items-center gap-[8px] w-full"},_hoisted_7={key:1},_sfc_main$3=vue.defineComponent({__name:"vs-input-select",props:vue.mergeModels({placeholder:{default:"Оберіть значення"},prefix:{default:"api"},host:{default:""},data:{default:null},options:{default:()=>[]},maxHeight:{default:400},slots:{default:null},customClass:{default:""},style:{default:()=>({})},disabled:{type:Boolean}},{modelValue:{type:[Number,String],default:null},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue"),o=vue.ref({}),s=vue.ref(null),l=vue.ref(null),i=vue.ref(!1),c=vue.ref(null),u=vue.ref([]),a=vue.ref(-1),d=vue.ref([]),f=vue.computed(()=>u.value?.length?[c.value,...u.value?.filter(y=>y?.id!==c.value?.id)].filter(y=>y!==null):[]),h=async()=>{try{const{data:y}=await axios.get(`${t.host}/${t.prefix}/suggest/${t.data}?json=1`);return y.data}catch{return[]}},p=async y=>{document.body.click(),i.value=y!==void 0?y:!i.value,i.value&&!u.value?.length&&(!t.options?.length&&t.data?u.value=await h():t.options?.length&&(u.value=[...t.options])),i.value&&s.value?(o.value.width=`${s.value.getBoundingClientRect()?.width}px`,l.value&&dynamicPosition("bottom-start",s.value,l.value)):a.value=-1},v=()=>i.value?p(!1):null,m=y=>{c.value=y,r.value=y.id,p(!1)},g=(y,b)=>{if(!y||!b)return;const w=y.offsetTop,E=w+y.offsetHeight,S=b.scrollTop,B=S+b.clientHeight;w<S?b.scrollTop=w-80:E>B&&(b.scrollTop=E-b.clientHeight+4)},x=y=>{if(!i.value)return;const{keyCode:b}=y;if([38,40,13].includes(b)&&y.preventDefault(),b==38){if(a.value==0)return;a.value-=1,g(d.value[a.value],l.value)}else if(b==40){if(a.value+1>=f.value?.length)return;a.value+=1,g(d.value[a.value],l.value)}else if(b==13){const w=f.value[a.value];w&&m(w)}},$=async y=>{if(i.value)return;const{keyCode:b}=y;[38,40].includes(b)&&(await y.preventDefault(),a.value=0,setTimeout(()=>p()))},_=y=>{i.value&&s.value&&l.value&&!l.value.contains(y.target)&&(i.value=!1)},k=y=>{y?.key==="Escape"&&i.value&&p(!1)};return vue.onMounted(async()=>{addEventListener("click",v),addEventListener("keydown",x),addEventListener("scroll",_,!0),addEventListener("keydown",k),r.value&&!t.options?.length&&t.data&&(u.value=await h(),c.value=u.value?.find(y=>y?.id===r.value)||null)}),vue.onUnmounted(()=>{removeEventListener("click",v),removeEventListener("keydown",x),removeEventListener("scroll",_,!0),removeEventListener("keydown",k)}),(y,b)=>(vue.openBlock(),vue.createElementBlock("div",{class:"relative w-full",ref_key:"select",ref:s,onClick:b[3]||(b[3]=vue.withModifiers(()=>{},["stop"]))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass(["block w-full flex items-center gap-[8px] pl-[16px] py-[5px] bg-white w-[calc(100%)] overflow-ellipsis",[i.value?`ring-rind ring-2 ring-${y.style?.primaryColor||"blue"}-500`:"",c.value?.text?"pr-[50px]":"pr-[25px]",vue.unref(n),y.customClass]]),onKeydown:$,onClick:b[0]||(b[0]=w=>p(!i.value)),disabled:y.disabled,style:{border:"1px solid #CFD9E0"}},[c.value?.color?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block",style:vue.normalizeStyle({backgroundColor:c.value?.color})},null,4)):vue.createCommentVNode("",!0),c.value?.text?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2,vue.toDisplayString(c.value?.text),1)):(vue.openBlock(),vue.createElementBlock("span",_hoisted_3,vue.toDisplayString(y.placeholder),1))],42,_hoisted_1$1),vue.createElementVNode("span",_hoisted_4,[vue.createVNode(vue.unref(IconChevronTopBottom),{height:"14",width:"14"})]),c.value?.text?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",onClick:b[1]||(b[1]=w=>{r.value=null,c.value=null}),class:"absolute top-[50%] text-gray-500 translate-y-[-50%] hover:text-red-600 right-[30px]"},[vue.createVNode(vue.unref(IconClose),{height:"14",width:"14"})])):vue.createCommentVNode("",!0),(vue.openBlock(),vue.createBlock(vue.Teleport,{to:"body"},[vue.withDirectives(vue.createElementVNode("ul",{class:"z-[90] border rounded-lg fixed flex flex-col gap-[2px] p-1 bg-white overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",ref_key:"list",ref:l,style:vue.normalizeStyle({width:o.value.width,maxHeight:y.maxHeight+"px",backgroundColor:"white"}),onClick:b[2]||(b[2]=vue.withModifiers(()=>{},["stop"]))},[f.value?.length?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[b[4]||(b[4]=vue.createElementVNode("li",{class:"sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400"}," Натисніть Enter для вибору, ↑↓ для навігації, Esc для закриття ",-1)),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(f.value,(w,E)=>(vue.openBlock(),vue.createElementBlock("li",{onClick:S=>m(w),key:w?.id,ref_for:!0,ref:S=>d.value[E]=S,class:vue.normalizeClass(["cursor-pointer relative py-2 px-4 w-full text-[14px] text-gray-700 hover:bg-gray-100 rounded-lg",[a.value==E?"bg-gray-100":""]])},[vue.createElementVNode("span",_hoisted_6,[w?.color?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:"w-[16px] h-[16px] rounded-md block",style:vue.normalizeStyle({backgroundColor:w?.color})},null,4)):vue.createCommentVNode("",!0),vue.createTextVNode(" "+vue.toDisplayString(w?.text),1)]),r.value==w?.id?(vue.openBlock(),vue.createBlock(vue.unref(IconCheck),{key:0,height:"14",width:"14","stroke-width":"2",class:"absolute right-[16px] top-[50%] translate-y-[-50%] text-blue-600"})):vue.createCommentVNode("",!0)],10,_hoisted_5))),128))],64)):(vue.openBlock(),vue.createElementBlock("li",_hoisted_7,"Дані відсутні"))],4),[[vue.vShow,i.value]])]))],512))}}),_hoisted_1=["placeholder","disabled"],_sfc_main$2=vue.defineComponent({__name:"vs-input-textarea",props:vue.mergeModels({style:{type:Object,default:()=>({})},customClass:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,{inputClass:n}=useStyle(t.style),r=vue.useModel(e,"modelValue");return(o,s)=>vue.withDirectives((vue.openBlock(),vue.createElementBlock("textarea",{"onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l),placeholder:e.placeholder,disabled:e.disabled,row:"2",class:vue.normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto",[vue.unref(n)]]),style:{border:"1px solid #CFD9E0"}},null,10,_hoisted_1)),[[vue.vModelText,r.value]])}}),inputs={VsInputText:_sfc_main$y,VsInputRadio:_sfc_main$r,"vs-input-text":_sfc_main$y,"vs-input-textarea":_sfc_main$2,"vs-input-mask":_sfc_main$u,"vs-input-number":_sfc_main$x,"vs-input-radio":_sfc_main$r,"vs-input-select":_sfc_main$3,"vs-input-switcher":_sfc_main$w,"vs-input-static":_sfc_main$v,"vs-input-container":_sfc_main$4,"vs-input-date":_sfc_main$l,"vs-input-checkbox":VsInputCheckbox,"vs-input-file":_sfc_main$b},_sfc_main$1=vue.defineComponent({__name:"vs-compact-form-layout",props:{type:{type:String,default:""},style:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},layout:{type:String,default:"default"}},setup(e){const t=e,n=vue.computed(()=>layouts$1[`${t.layout}`]),r=vue.computed(()=>inputs?.[`vs-input-${t.type}`]);return(o,s)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(n.value),vue.mergeProps(o.$attrs,{style:e.style,item:e.item}),{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(r.value),vue.mergeProps(o.$attrs,{style:e.style}),null,16,["style"]))]),_:1},16,["style","item"]))}}),formErrorsUa={required:"Це поле є обов’язковим",email:"Неправильний email"},required=e=>e?!1:formErrorsUa.required,email=e=>!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)&&e?formErrorsUa.email:!1,regexp=(e,t)=>!t.pattern.test(e)&&e?t.message:!1,custom=(value,custom)=>{const func=eval(custom.function);return func(value)?!1:custom.message},checkFormRules=(e,t)=>{switch(typeof t=="string"?t:t.type){case"required":return required(e);case"email":return email(e);case"regexp":return regexp(e,t);case"custom":return custom(e,t);default:return!1}},mathTable={autocomplete:"select",combobox:"select",email:"text",datepicker:"date",markedtext:"text"};function convertType(e){const t=e.toLowerCase();return mathTable[t]||t}function convertSchema(e){if(Array.isArray(e))return e;const t=[];return Object.entries(e).forEach(n=>{const r={name:n[0],...n[1],type:convertType(n[1].type),label:n[1].label||n[1].ua,rules:n[1].rules||n[1].validators};n[1].data&&(r.api=`/api/suggest/${n[1].data}`),t.push(r)}),t}function useForm(e,t){const n=convertSchema(t),r=vue.ref({}),o=(i=n,c=!0)=>{if(i.forEach(u=>{u.rules&&u.rules.forEach(a=>{r.value[u.name]=checkFormRules(e.value[u.name],a)}),u.schema&&o(u.schema,!1)}),c&&Object.values(r.value).some(Boolean))return r.value},s=vue.computed(()=>n?.filter(i=>{const c=i?.conditions;if(!c)return!0;const u=Array.isArray(c)?c[0]:c,a=e?.value?.[u];return isVisible(a,c)}));return{errors:r,validate:o,reset:()=>{e.value={},r.value={}},visibleSchema:s}}const _sfc_main=vue.defineComponent({__name:"vs-compact-form",props:vue.mergeModels({schema:{default:()=>[]},style:{default:()=>({})},layout:{default:()=>"default"}},{form:{default:()=>({})},formModifiers:{},values:{default:()=>({})},valuesModifiers:{}}),emits:vue.mergeModels(["handle-submit"],["update:form","update:values"]),setup(e,{emit:t}){const n=t,r=e,o=vue.useAttrs(),s=vue.useModel(e,"form"),l=vue.useModel(e,"values"),{errors:i,validate:c,reset:u,visibleSchema:a}=useForm(l,r.schema),d=()=>{c(),n("handle-submit",l.value)};return vue.onMounted(()=>{s.value.value=l.value,s.value.errors=i.value,s.value.reset=u,s.value.validate=c}),vue.provide("form",s),vue.provide("values",l),(f,h)=>(vue.openBlock(),vue.createElementBlock("form",{onSubmit:vue.withModifiers(d,["prevent"]),class:vue.normalizeClass(["grid grid-cols-12",f.layout==="default"?"gap-6":"gap-4"])},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(a),p=>(vue.openBlock(),vue.createBlock(_sfc_main$1,vue.mergeProps({key:p.name,class:`col-span-${p.col||12} `},{ref_for:!0},{...vue.unref(o),...f.style,...p},{item:p,layout:f.layout,modelValue:l.value[p.name],"onUpdate:modelValue":v=>l.value[p.name]=v,style:f.style,error:vue.unref(i)[p.name]}),null,16,["class","item","layout","modelValue","onUpdate:modelValue","style","error"]))),128))],34))}});_sfc_main.install=function e(t){t.component("VForm",_sfc_main)},exports.VForm=_sfc_main,exports.VsInputText=_sfc_main$y,exports.default=_sfc_main,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opengis/form",
3
3
  "private": false,
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "description": "A flexible and extensible Vue form library",