@opengis/form 0.0.8 → 0.0.10

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,5 +1,5 @@
1
- import { defineComponent, createElementBlock, openBlock, createCommentVNode, renderSlot, createElementVNode, toDisplayString, normalizeProps, guardReactiveProps, createTextVNode, computed, mergeModels, useModel, withDirectives, normalizeClass, unref, vModelText, vModelCheckbox, createVNode, ref, createBlock, resolveDynamicComponent, normalizeStyle, withCtx, reactive, watch, onMounted, onBeforeUnmount, Teleport, Transition, vShow, nextTick, withModifiers, vModelRadio, Fragment, renderList, mergeProps, createStaticVNode, inject, onUnmounted, useAttrs, provide } from "vue";
2
- const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
1
+ import { defineComponent, createElementBlock, openBlock, createCommentVNode, renderSlot, createElementVNode, toDisplayString, normalizeProps, guardReactiveProps, createTextVNode, computed, mergeModels, useModel, withDirectives, normalizeClass, unref, vModelText, vModelCheckbox, createVNode, ref, createBlock, resolveDynamicComponent, normalizeStyle, withCtx, withModifiers, createStaticVNode, vModelRadio, Fragment, renderList, mergeProps, reactive, watch, onMounted, createApp, h, Transition, vShow, inject, nextTick, onUnmounted, Teleport, useAttrs, provide } from "vue";
2
+ const _hoisted_1$A = { class: "w-full relative" }, _hoisted_2$d = {
3
3
  key: 0,
4
4
  class: "text-[14px] font-medium text-gray-900 mb-2"
5
5
  }, _hoisted_3$6 = {
@@ -8,7 +8,7 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
8
8
  }, _hoisted_4$5 = {
9
9
  key: 1,
10
10
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
11
- }, _sfc_main$E = /* @__PURE__ */ defineComponent({
11
+ }, _sfc_main$F = /* @__PURE__ */ defineComponent({
12
12
  __name: "vs-layout-default",
13
13
  props: {
14
14
  ua: {
@@ -29,8 +29,8 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
29
29
  }
30
30
  },
31
31
  setup(e) {
32
- return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$z, [
33
- e.ua || e.label ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
32
+ return (t, o) => (openBlock(), createElementBlock("div", _hoisted_1$A, [
33
+ e.ua || e.label ? (openBlock(), createElementBlock("div", _hoisted_2$d, [
34
34
  createElementVNode("span", null, toDisplayString(e.ua || e.label), 1),
35
35
  e.item?.rules?.includes("required") ? (openBlock(), createElementBlock("span", _hoisted_3$6, "*")) : createCommentVNode("", !0)
36
36
  ])) : createCommentVNode("", !0),
@@ -38,16 +38,16 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
38
38
  e.error ? (openBlock(), createElementBlock("span", _hoisted_4$5, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
39
39
  ]));
40
40
  }
41
- }), _hoisted_1$y = { class: "w-full relative flex flex-row items-center gap-2" }, _hoisted_2$b = {
41
+ }), _hoisted_1$z = { class: "w-full relative flex flex-row items-center gap-2" }, _hoisted_2$c = {
42
42
  key: 0,
43
- class: "text-sm text-gray-900 font-medium flex shrink-0 w-3/12"
43
+ class: "text-sm text-gray-900 font-medium flex shrink-0 w-3/12 max-w-[250px]"
44
44
  }, _hoisted_3$5 = {
45
45
  key: 0,
46
46
  class: "text-red-500 text-[14px]"
47
47
  }, _hoisted_4$4 = {
48
48
  key: 1,
49
49
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
50
- }, _sfc_main$D = /* @__PURE__ */ defineComponent({
50
+ }, _sfc_main$E = /* @__PURE__ */ defineComponent({
51
51
  __name: "vs-layout-horizontal",
52
52
  props: {
53
53
  ua: {
@@ -68,8 +68,8 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
68
68
  }
69
69
  },
70
70
  setup(e) {
71
- return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$y, [
72
- e.item?.type !== "html" ? (openBlock(), createElementBlock("span", _hoisted_2$b, [
71
+ return (t, o) => (openBlock(), createElementBlock("div", _hoisted_1$z, [
72
+ e.item?.type !== "html" ? (openBlock(), createElementBlock("span", _hoisted_2$c, [
73
73
  createTextVNode(toDisplayString(e.ua || e.label) + " ", 1),
74
74
  e.item?.rules?.includes("required") && (e.ua || e.label) ? (openBlock(), createElementBlock("span", _hoisted_3$5, "*")) : createCommentVNode("", !0)
75
75
  ])) : createCommentVNode("", !0),
@@ -77,10 +77,10 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
77
77
  e.error ? (openBlock(), createElementBlock("span", _hoisted_4$4, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
78
78
  ]));
79
79
  }
80
- }), _hoisted_1$x = { class: "w-full relative" }, _hoisted_2$a = {
80
+ }), _hoisted_1$y = { class: "w-full relative" }, _hoisted_2$b = {
81
81
  key: 0,
82
82
  class: "text-red-500 text-[10px] absolute bottom-[-14px]"
83
- }, _sfc_main$C = /* @__PURE__ */ defineComponent({
83
+ }, _sfc_main$D = /* @__PURE__ */ defineComponent({
84
84
  __name: "vs-layout-inline",
85
85
  props: {
86
86
  ua: {
@@ -101,25 +101,25 @@ const _hoisted_1$z = { class: "w-full relative" }, _hoisted_2$c = {
101
101
  }
102
102
  },
103
103
  setup(e) {
104
- return (t, n) => (openBlock(), createElementBlock("div", _hoisted_1$x, [
104
+ return (t, o) => (openBlock(), createElementBlock("div", _hoisted_1$y, [
105
105
  renderSlot(t.$slots, "default", normalizeProps(guardReactiveProps(t.$attrs))),
106
- e.error ? (openBlock(), createElementBlock("span", _hoisted_2$a, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
106
+ e.error ? (openBlock(), createElementBlock("span", _hoisted_2$b, toDisplayString(e.error), 1)) : createCommentVNode("", !0)
107
107
  ]));
108
108
  }
109
109
  }), layouts$1 = {
110
- default: _sfc_main$E,
111
- horizontal: _sfc_main$D,
112
- inline: _sfc_main$C
110
+ default: _sfc_main$F,
111
+ horizontal: _sfc_main$E,
112
+ inline: _sfc_main$D
113
113
  };
114
114
  function useStyle(e) {
115
115
  return {
116
116
  inputClass: computed(() => {
117
- 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 `;
118
- return e?.size === "sm" ? n + "h-[32px]" : n + "h-[38px]";
117
+ const o = `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 `;
118
+ return e?.size === "sm" ? o + "h-[32px]" : o + "h-[38px]";
119
119
  })
120
120
  };
121
121
  }
122
- const _hoisted_1$w = ["placeholder", "disabled"], _sfc_main$B = /* @__PURE__ */ defineComponent({
122
+ const _hoisted_1$x = ["placeholder", "disabled"], _sfc_main$C = /* @__PURE__ */ defineComponent({
123
123
  __name: "vs-input-text",
124
124
  props: /* @__PURE__ */ mergeModels({
125
125
  style: {
@@ -148,21 +148,21 @@ const _hoisted_1$w = ["placeholder", "disabled"], _sfc_main$B = /* @__PURE__ */
148
148
  }),
149
149
  emits: ["update:modelValue"],
150
150
  setup(e) {
151
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue");
152
- return (s, r) => withDirectives((openBlock(), createElementBlock("input", {
151
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue");
152
+ return (r, s) => withDirectives((openBlock(), createElementBlock("input", {
153
153
  type: "text",
154
- "onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
154
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
155
155
  placeholder: e.placeholder,
156
156
  disabled: e.disabled,
157
- class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(n), { "!border-red-600": e.error }]]),
157
+ class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(o), { "!border-red-600": e.error }]]),
158
158
  style: {
159
159
  border: "1px solid #CFD9E0"
160
160
  }
161
- }, null, 10, _hoisted_1$w)), [
162
- [vModelText, o.value]
161
+ }, null, 10, _hoisted_1$x)), [
162
+ [vModelText, n.value]
163
163
  ]);
164
164
  }
165
- }), _hoisted_1$v = ["placeholder"], _sfc_main$A = /* @__PURE__ */ defineComponent({
165
+ }), _hoisted_1$w = ["placeholder"], _sfc_main$B = /* @__PURE__ */ defineComponent({
166
166
  __name: "vs-input-number",
167
167
  props: /* @__PURE__ */ mergeModels({
168
168
  style: {
@@ -179,25 +179,25 @@ const _hoisted_1$w = ["placeholder", "disabled"], _sfc_main$B = /* @__PURE__ */
179
179
  }),
180
180
  emits: ["update:modelValue"],
181
181
  setup(e) {
182
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue");
183
- return (s, r) => withDirectives((openBlock(), createElementBlock("input", {
182
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue");
183
+ return (r, s) => withDirectives((openBlock(), createElementBlock("input", {
184
184
  type: "number",
185
- "onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
185
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
186
186
  placeholder: e.placeholder,
187
- class: normalizeClass(["py-1.5 px-3 block w-full", [unref(n)]]),
187
+ class: normalizeClass(["py-1.5 px-3 block w-full", [unref(o)]]),
188
188
  style: {
189
189
  border: "1px solid #CFD9E0"
190
190
  }
191
- }, null, 10, _hoisted_1$v)), [
192
- [vModelText, o.value]
191
+ }, null, 10, _hoisted_1$w)), [
192
+ [vModelText, n.value]
193
193
  ]);
194
194
  }
195
195
  }), _export_sfc = (e, t) => {
196
- const n = e.__vccOpts || e;
197
- for (const [o, s] of t)
198
- n[o] = s;
199
- return n;
200
- }, _sfc_main$z = {}, _hoisted_1$u = {
196
+ const o = e.__vccOpts || e;
197
+ for (const [n, r] of t)
198
+ o[n] = r;
199
+ return o;
200
+ }, _sfc_main$A = {}, _hoisted_1$v = {
201
201
  xmlns: "http://www.w3.org/2000/svg",
202
202
  viewBox: "0 0 24 24",
203
203
  fill: "none",
@@ -208,7 +208,7 @@ const _hoisted_1$w = ["placeholder", "disabled"], _sfc_main$B = /* @__PURE__ */
208
208
  class: "icon icon-tabler icons-tabler-outline icon-tabler-check"
209
209
  };
210
210
  function _sfc_render$d(e, t) {
211
- return openBlock(), createElementBlock("svg", _hoisted_1$u, t[0] || (t[0] = [
211
+ return openBlock(), createElementBlock("svg", _hoisted_1$v, t[0] || (t[0] = [
212
212
  createElementVNode("path", {
213
213
  stroke: "none",
214
214
  d: "M0 0h24v24H0z",
@@ -217,7 +217,7 @@ function _sfc_render$d(e, t) {
217
217
  createElementVNode("path", { d: "M5 12l5 5l10 -10" }, null, -1)
218
218
  ]));
219
219
  }
220
- const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$d]]), _hoisted_1$t = { class: "flex items-center gap-[4px]" }, _hoisted_2$9 = ["value", "id", "disabled"], _hoisted_3$4 = ["for"], _hoisted_4$3 = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, _sfc_main$y = /* @__PURE__ */ defineComponent({
220
+ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$d]]), _hoisted_1$u = { class: "flex items-center gap-[4px]" }, _hoisted_2$a = ["value", "id", "disabled"], _hoisted_3$4 = ["for"], _hoisted_4$3 = { class: "text-[14px] text-gray-700 flex items-center gap-x-1 ml-1 dark:text-neutral-400" }, _sfc_main$z = /* @__PURE__ */ defineComponent({
221
221
  __name: "vs-checkbox-default",
222
222
  props: {
223
223
  value: { type: [String, Number], default: "" },
@@ -230,27 +230,27 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
230
230
  },
231
231
  emits: ["update:modelValue"],
232
232
  setup(e, { emit: t }) {
233
- const n = t, o = e, s = computed({
234
- get: () => o.modelValue,
235
- set: (r) => n("update:modelValue", r)
233
+ const o = t, n = e, r = computed({
234
+ get: () => n.modelValue,
235
+ set: (s) => o("update:modelValue", s)
236
236
  });
237
- return (r, l) => (openBlock(), createElementBlock("div", _hoisted_1$t, [
237
+ return (s, l) => (openBlock(), createElementBlock("div", _hoisted_1$u, [
238
238
  withDirectives(createElementVNode("input", {
239
239
  type: "checkbox",
240
240
  value: e.value,
241
- "onUpdate:modelValue": l[0] || (l[0] = (i) => s.value = i),
241
+ "onUpdate:modelValue": l[0] || (l[0] = (i) => r.value = i),
242
242
  class: normalizeClass(["shrink-0 border border-solid hidden border-gray-700 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 }]),
243
243
  id: e.id,
244
244
  disabled: e.disabled
245
- }, null, 10, _hoisted_2$9), [
246
- [vModelCheckbox, s.value]
245
+ }, null, 10, _hoisted_2$a), [
246
+ [vModelCheckbox, r.value]
247
247
  ]),
248
248
  createElementVNode("label", {
249
249
  for: e.id,
250
250
  class: normalizeClass(["flex flex-1 checkbox-label items-center gap-x-2 cursor-pointer text-sm text-gray-800 dark:text-neutral-300", { "!cursor-not-allowed": e.disabled }])
251
251
  }, [
252
252
  createElementVNode("div", {
253
- class: normalizeClass(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [s.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", e.error ? "border-red-600" : ""]])
253
+ class: normalizeClass(["h-[16px] text-white w-[16px] flex items-center justify-center shrink-0 border rounded", [r.value ? "bg-blue-600 border-blue-600" : "bg-white border-gray-600", e.error ? "border-red-600" : ""]])
254
254
  }, [
255
255
  createVNode(IconCheck, {
256
256
  height: "12",
@@ -258,17 +258,17 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
258
258
  })
259
259
  ], 2),
260
260
  createElementVNode("span", _hoisted_4$3, [
261
- renderSlot(r.$slots, "default", {}, () => [
261
+ renderSlot(s.$slots, "default", {}, () => [
262
262
  createTextVNode(toDisplayString(e.label), 1)
263
263
  ])
264
264
  ])
265
265
  ], 10, _hoisted_3$4)
266
266
  ]));
267
267
  }
268
- }), _hoisted_1$s = ["name", "value", "disabled"], _hoisted_2$8 = { class: "flex items-center gap-[6px] text-[14px]" }, _hoisted_3$3 = {
268
+ }), _hoisted_1$t = ["name", "value", "disabled"], _hoisted_2$9 = { class: "flex items-center gap-[6px] text-[14px]" }, _hoisted_3$3 = {
269
269
  key: 0,
270
270
  class: "text-[16px]"
271
- }, _hoisted_4$2 = ["src"], _sfc_main$x = /* @__PURE__ */ defineComponent({
271
+ }, _hoisted_4$2 = ["src"], _sfc_main$y = /* @__PURE__ */ defineComponent({
272
272
  __name: "vs-checkbox-buttons",
273
273
  props: {
274
274
  value: { type: [String, Number, Boolean], default: "" },
@@ -285,26 +285,26 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
285
285
  },
286
286
  emits: ["update:modelValue"],
287
287
  setup(e, { emit: t }) {
288
- const n = e, o = t, s = computed({
289
- get: () => n.modelValue,
288
+ const o = e, n = t, r = computed({
289
+ get: () => o.modelValue,
290
290
  set: (i) => {
291
- o("update:modelValue", i);
291
+ n("update:modelValue", i);
292
292
  }
293
- }), r = computed(() => Array.isArray(s.value) ? s.value.includes(n.value) : s.value === !0 || s.value === n.value), l = computed(() => n.style?.size === "xs" ? "p-1.5 text-xs" : n.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
293
+ }), s = computed(() => Array.isArray(r.value) ? r.value.includes(o.value) : r.value === !0 || r.value === o.value), l = computed(() => o.style?.size === "xs" ? "p-1.5 text-xs" : o.style?.size === "lg" ? "p-3.5 text-[20px]" : "p-2.5 text-xs");
294
294
  return (i, u) => (openBlock(), createElementBlock("label", {
295
- class: 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, r.value ? "ring-blue-500" : "border border-gray-200 ring-transparent"]])
295
+ class: 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"]])
296
296
  }, [
297
297
  withDirectives(createElementVNode("input", {
298
298
  type: "checkbox",
299
299
  class: "hidden",
300
300
  name: e.id,
301
301
  value: e.value,
302
- "onUpdate:modelValue": u[0] || (u[0] = (c) => s.value = c),
302
+ "onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
303
303
  disabled: e.disabled
304
- }, null, 8, _hoisted_1$s), [
305
- [vModelCheckbox, s.value]
304
+ }, null, 8, _hoisted_1$t), [
305
+ [vModelCheckbox, r.value]
306
306
  ]),
307
- createElementVNode("span", _hoisted_2$8, [
307
+ createElementVNode("span", _hoisted_2$9, [
308
308
  e.icon || e.imgUrl ? (openBlock(), createElementBlock("span", _hoisted_3$3, [
309
309
  e.icon ? (openBlock(), createElementBlock("i", {
310
310
  key: 0,
@@ -325,9 +325,9 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
325
325
  ], 2));
326
326
  }
327
327
  }), VsCheckboxViews = {
328
- "vs-checkbox-default": _sfc_main$y,
329
- "vs-checkbox-buttons": _sfc_main$x
330
- }, _hoisted_1$r = { class: "flex items-center" }, _sfc_main$w = /* @__PURE__ */ defineComponent({
328
+ "vs-checkbox-default": _sfc_main$z,
329
+ "vs-checkbox-buttons": _sfc_main$y
330
+ }, _hoisted_1$s = { class: "flex items-center" }, _sfc_main$x = /* @__PURE__ */ defineComponent({
331
331
  __name: "vs-input-checkbox-item",
332
332
  props: {
333
333
  value: { type: [String, Number], default: "" },
@@ -347,25 +347,25 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
347
347
  },
348
348
  emits: ["update:modelValue"],
349
349
  setup(e, { emit: t }) {
350
- const n = e, o = t, s = `radio-${Math.floor(Math.random() * 1e4)}`, r = computed({
351
- get: () => Array.isArray(n.modelValue) ? Array.isArray(n.modelValue) && n.modelValue.includes(n.value) : n.modelValue,
350
+ const o = e, n = t, r = `radio-${Math.floor(Math.random() * 1e4)}`, s = computed({
351
+ get: () => Array.isArray(o.modelValue) ? Array.isArray(o.modelValue) && o.modelValue.includes(o.value) : o.modelValue,
352
352
  set: (i) => {
353
- if (Array.isArray(n.modelValue)) {
354
- let u = [...n.modelValue];
355
- i ? u.includes(n.value) || u.push(n.value) : u = u.filter((c) => c !== n.value), o("update:modelValue", u);
353
+ if (Array.isArray(o.modelValue)) {
354
+ let u = [...o.modelValue];
355
+ i ? u.includes(o.value) || u.push(o.value) : u = u.filter((c) => c !== o.value), n("update:modelValue", u);
356
356
  } else
357
- o("update:modelValue", i);
357
+ n("update:modelValue", i);
358
358
  }
359
- }), l = ref(`vs-checkbox-${n.view || "default"}`);
360
- return (i, u) => (openBlock(), createElementBlock("div", _hoisted_1$r, [
359
+ }), l = ref(`vs-checkbox-${o.view || "default"}`);
360
+ return (i, u) => (openBlock(), createElementBlock("div", _hoisted_1$s, [
361
361
  (openBlock(), createBlock(resolveDynamicComponent(unref(VsCheckboxViews)?.[l.value]), {
362
362
  value: e.value,
363
363
  label: e.label,
364
364
  info: e.option?.info,
365
365
  disabled: e.disabled,
366
- modelValue: r.value,
367
- "onUpdate:modelValue": u[0] || (u[0] = (c) => r.value = c),
368
- id: s,
366
+ modelValue: s.value,
367
+ "onUpdate:modelValue": u[0] || (u[0] = (c) => s.value = c),
368
+ id: r,
369
369
  icon: e.icon,
370
370
  imgUrl: e.imgUrl,
371
371
  style: normalizeStyle(e.style),
@@ -378,199 +378,7 @@ const IconCheck = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_rend
378
378
  }, 8, ["value", "label", "info", "disabled", "modelValue", "icon", "imgUrl", "style", "error"]))
379
379
  ]));
380
380
  }
381
- });
382
- defineComponent({
383
- props: {
384
- modelValue: { type: Boolean, default: () => !1 },
385
- title: { type: String, default: () => "" },
386
- disabled: { type: Boolean, default: () => !1 }
387
- },
388
- data() {
389
- return {};
390
- },
391
- mounted() {
392
- this.modelValue || this.$emit("update:modelValue", !1);
393
- },
394
- computed: {
395
- modelState: {
396
- get() {
397
- return this.modelValue;
398
- },
399
- set(e) {
400
- this.$emit("update:modelValue", e);
401
- }
402
- },
403
- labelCursorClasses() {
404
- return [
405
- { "cursor-not-allowed": this.disabled },
406
- { "cursor-pointer": !this.disabled }
407
- ];
408
- }
409
- },
410
- methods: {
411
- handleEnterDown(e) {
412
- const { keyCode: t } = e;
413
- t === 13 && (this.modelState = !this.modelState);
414
- },
415
- addKeyHandler() {
416
- window.addEventListener("keydown", this.handleEnterDown);
417
- },
418
- removeKeyHandler() {
419
- window.removeEventListener("keydown", this.handleEnterDown);
420
- }
421
- }
422
- });
423
- const I = async (e, t, n, o = 10) => {
424
- if (!t || !n) return;
425
- await nextTick();
426
- const s = await n?.getBoundingClientRect(), r = await t?.getBoundingClientRect();
427
- if (!r || !s) return;
428
- const l = await parseInt(t?.getBoundingClientRect()?.height), i = await parseInt(t?.getBoundingClientRect()?.width), u = await parseInt(n?.getBoundingClientRect()?.height), c = await parseInt(n?.getBoundingClientRect()?.width), a = await window.innerHeight, f = await window.innerWidth;
429
- let d = 0, p = 0;
430
- const m = r.bottom + o + u;
431
- switch (e) {
432
- case "top":
433
- r.top - s.height - o < 0 ? d = r.top - s.height + o + u + l : d = r.top - s.height - o, f > c + r.right + 30 ? p = r.left - s.width / 2 + r.width / 2 : p = f - 30 - c;
434
- break;
435
- case "bottom":
436
- a > m ? d = r.bottom + o : d = r.bottom - o - u - l, p = r.left - s.width / 2 + r.width / 2;
437
- break;
438
- case "left":
439
- d = r.top - s.height / 2 + r.height / 2, r.left - s.width - o > 0 ? p = r.left - s.width - o : p = 10;
440
- break;
441
- case "right":
442
- d = r.top - s.height / 2 + r.height / 2, f - i > c ? p = r.right + o : p = f - 30 - c;
443
- break;
444
- case "top-right":
445
- r.top - s.height - o < 0 ? d = r.top - s.height + o + u + l : d = r.top - s.height - o, f - i > c ? p = r.right + o : p = f - 30 - c;
446
- break;
447
- case "top-left":
448
- r.top - s.height - o < 0 ? d = r.top - s.height + o + u + l : d = r.top - s.height - o, r.left - s.width - o > 0 ? p = r.left - s.width - o : p = 10;
449
- break;
450
- case "top-start":
451
- r.top - s.height - o < 0 ? d = r.top - s.height + o + u + l : d = r.top - s.height - o, r.left > 0 ? p = r.left : p = 10;
452
- break;
453
- case "bottom-right":
454
- a > m ? d = r.bottom + o : d = r.bottom - o - u - l, f - i > c ? p = r.left : p = f - 30 - c;
455
- break;
456
- case "bottom-left":
457
- a > m ? d = r.bottom + o : d = r.bottom - o - u - l, r.left > 0 ? p = r.right - c : p = 10;
458
- break;
459
- case "bottom-start":
460
- a > m ? d = r.bottom + o : d = r.bottom - o - u - l, r.left > 0 ? p = r.left : p = 10;
461
- break;
462
- }
463
- d + u > a ? d = a - u - o : d < 0 && (d = o), p + c > f ? p = f - c - o : p < 0 && (p = o), n instanceof HTMLElement && (n.style.top = `${d}px`, n.style.left = `${p}px`, n.style.position = "fixed");
464
- }, Ae = { class: "text-center" }, Ke = { class: "py-2 px-4 w-full text-sm text-stone-800 bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-lg focus:outline-none focus:bg-stone-100 dark:bg-neutral-900 dark:text-neutral-200 dark:focus:bg-neutral-800 after:h-4 after:absolute after:-bottom-4 after:start-0 after:w-full before:h-4 before:absolute before:-top-4 before:start-0 before:w-full" }, qe = {
465
- __name: "vs-popover",
466
- props: {
467
- isOpen: { type: Boolean, default: () => !1 },
468
- placement: { type: String, default: "top" },
469
- gap: { type: Number, default: 8 },
470
- width: { type: [String, Number], default: "" },
471
- disabled: { type: Boolean, default: !1 },
472
- trigger: { type: String, default: "click" },
473
- teleport: { type: String, default: "body" }
474
- },
475
- emits: ["isvisible"],
476
- setup(e, { expose: t, emit: n }) {
477
- const o = e, s = n, r = ref(!1), l = ref([]), i = ref(null), u = ref(null), c = ref(null), a = (g) => {
478
- if (!g) {
479
- r.value = !1;
480
- return;
481
- }
482
- u.value?.contains(g.target) || c.value?.contains(g.target) || (r.value = !1);
483
- }, f = (g) => {
484
- r.value && c.value && !c.value.contains(g.target) && (r.value = !1);
485
- }, d = () => {
486
- r.value = !1;
487
- }, p = () => {
488
- r.value && (r.value = !1);
489
- }, m = () => {
490
- let g = i.value;
491
- for (; g && g !== document.body; )
492
- (g.scrollHeight > g.clientHeight || g.scrollWidth > g.clientWidth) && (g.addEventListener("scroll", d), l.value.push(g)), g = g.parentElement;
493
- document.body && (document.body.addEventListener("scroll", d), l.value.push(document.body));
494
- }, y = () => {
495
- l.value.forEach((g) => {
496
- g.removeEventListener("scroll", d);
497
- }), l.value = [];
498
- };
499
- watch(r, (g) => {
500
- g ? (m(), window.addEventListener("resize", () => I(o.placement, u.value, c.value)), I(o.placement, u.value, c.value)) : window.removeEventListener("resize", () => I(o.placement, u.value, c.value)), s("isvisible", g);
501
- }), onMounted(() => {
502
- window.addEventListener("click", a), window.addEventListener("popstate", p), window.addEventListener("scroll", f, !0), m();
503
- }), onBeforeUnmount(() => {
504
- window.removeEventListener("click", a), window.removeEventListener("popstate", p), y();
505
- });
506
- const h = () => {
507
- r.value = !0, I(o.placement, u.value, c.value);
508
- }, w = () => {
509
- r.value = !1;
510
- }, x = async () => {
511
- await I(o.placement, u.value, c.value), r.value = !r.value;
512
- };
513
- return t({
514
- togglePopover: x
515
- }), (g, k) => (openBlock(), createElementBlock("div", {
516
- ref_key: "popover",
517
- ref: i,
518
- class: "vs-popover inline-block"
519
- }, [
520
- createElementVNode("div", Ae, [
521
- e.trigger === "click" ? (openBlock(), createElementBlock("div", {
522
- key: 0,
523
- ref_key: "popoverRef",
524
- ref: u,
525
- onClick: x,
526
- class: normalizeClass({ "pointer-events-none": e.disabled })
527
- }, [
528
- renderSlot(g.$slots, "reference", {}, () => [
529
- k[0] || (k[0] = createElementVNode("button", null, "Click me!", -1))
530
- ])
531
- ], 2)) : createCommentVNode("", !0),
532
- e.trigger === "hover" ? (openBlock(), createElementBlock("div", {
533
- key: 1,
534
- ref_key: "popoverRef",
535
- ref: u,
536
- onMouseover: h,
537
- onMouseleave: w,
538
- class: normalizeClass({ "pointer-events-none": e.disabled })
539
- }, [
540
- renderSlot(g.$slots, "reference", {}, () => [
541
- k[1] || (k[1] = createElementVNode("button", null, "Click me!", -1))
542
- ])
543
- ], 34)) : createCommentVNode("", !0),
544
- (openBlock(), createBlock(Teleport, { to: e.teleport }, [
545
- createVNode(Transition, { name: "fade" }, {
546
- default: withCtx(() => [
547
- withDirectives(createElementVNode("div", {
548
- class: normalizeClass(["vsTailwind vs-popover__content", e.placement]),
549
- ref_key: "contentPop",
550
- ref: c,
551
- style: normalizeStyle({
552
- width: e.width ? e.width + "px" : "fit-content",
553
- zIndex: 10002
554
- })
555
- }, [
556
- createElementVNode("div", Ke, [
557
- renderSlot(g.$slots, "default", {}, () => [
558
- k[2] || (k[2] = createElementVNode("span", null, "Popover content", -1))
559
- ])
560
- ])
561
- ], 6), [
562
- [vShow, r.value]
563
- ])
564
- ]),
565
- _: 3
566
- })
567
- ], 8, ["to"]))
568
- ])
569
- ], 512));
570
- }
571
- };
572
- reactive({ visible: !0 });
573
- const _sfc_main$v = {}, _hoisted_1$q = {
381
+ }), _sfc_main$w = {}, _hoisted_1$r = {
574
382
  xmlns: "http://www.w3.org/2000/svg",
575
383
  viewBox: "0 0 24 24",
576
384
  fill: "none",
@@ -581,7 +389,7 @@ const _sfc_main$v = {}, _hoisted_1$q = {
581
389
  class: "icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"
582
390
  };
583
391
  function _sfc_render$c(e, t) {
584
- return openBlock(), createElementBlock("svg", _hoisted_1$q, t[0] || (t[0] = [
392
+ return openBlock(), createElementBlock("svg", _hoisted_1$r, t[0] || (t[0] = [
585
393
  createElementVNode("path", {
586
394
  stroke: "none",
587
395
  d: "M0 0h24v24H0z",
@@ -590,7 +398,7 @@ function _sfc_render$c(e, t) {
590
398
  createElementVNode("path", { d: "M6 9l6 6l6 -6" }, null, -1)
591
399
  ]));
592
400
  }
593
- const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$c]]), _sfc_main$u = {}, _hoisted_1$p = {
401
+ const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$c]]), _sfc_main$v = {}, _hoisted_1$q = {
594
402
  xmlns: "http://www.w3.org/2000/svg",
595
403
  viewBox: "0 0 24 24",
596
404
  fill: "none",
@@ -600,12 +408,12 @@ const IconChevronDown = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sf
600
408
  "stroke-linejoin": "round"
601
409
  };
602
410
  function _sfc_render$b(e, t) {
603
- return openBlock(), createElementBlock("svg", _hoisted_1$p, t[0] || (t[0] = [
411
+ return openBlock(), createElementBlock("svg", _hoisted_1$q, t[0] || (t[0] = [
604
412
  createElementVNode("path", { d: "m7 15 5 5 5-5" }, null, -1),
605
413
  createElementVNode("path", { d: "m7 9 5-5 5 5" }, null, -1)
606
414
  ]));
607
415
  }
608
- const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$b]]), _sfc_main$t = {}, _hoisted_1$o = {
416
+ const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$b]]), _sfc_main$u = {}, _hoisted_1$p = {
609
417
  xmlns: "http://www.w3.org/2000/svg",
610
418
  viewBox: "0 0 24 24",
611
419
  fill: "none",
@@ -616,7 +424,7 @@ const IconChevronTopBottom = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render"
616
424
  class: "icon icon-tabler icons-tabler-outline icon-tabler-x"
617
425
  };
618
426
  function _sfc_render$a(e, t) {
619
- return openBlock(), createElementBlock("svg", _hoisted_1$o, t[0] || (t[0] = [
427
+ return openBlock(), createElementBlock("svg", _hoisted_1$p, t[0] || (t[0] = [
620
428
  createElementVNode("path", {
621
429
  stroke: "none",
622
430
  d: "M0 0h24v24H0z",
@@ -626,7 +434,7 @@ function _sfc_render$a(e, t) {
626
434
  createElementVNode("path", { d: "M6 6l12 12" }, null, -1)
627
435
  ]));
628
436
  }
629
- const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$a]]), _sfc_main$s = {}, _hoisted_1$n = {
437
+ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$a]]), _sfc_main$t = {}, _hoisted_1$o = {
630
438
  xmlns: "http://www.w3.org/2000/svg",
631
439
  width: "24",
632
440
  height: "24",
@@ -638,7 +446,7 @@ const IconClose = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_rend
638
446
  "stroke-linejoin": "round"
639
447
  };
640
448
  function _sfc_render$9(e, t) {
641
- return openBlock(), createElementBlock("svg", _hoisted_1$n, t[0] || (t[0] = [
449
+ return openBlock(), createElementBlock("svg", _hoisted_1$o, t[0] || (t[0] = [
642
450
  createElementVNode("path", {
643
451
  stroke: "none",
644
452
  d: "M0 0h24v24H0z",
@@ -649,13 +457,13 @@ function _sfc_render$9(e, t) {
649
457
  createElementVNode("path", { d: "M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z" }, null, -1)
650
458
  ]));
651
459
  }
652
- const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$9]]), _hoisted_1$m = {
460
+ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$9]]), _hoisted_1$n = {
653
461
  key: 0,
654
462
  class: "flex items-start gap-x-1"
655
- }, _hoisted_2$7 = {
463
+ }, _hoisted_2$8 = {
656
464
  key: 0,
657
465
  class: "text-red-500 text-[14px]"
658
- }, _hoisted_3$2 = { class: "p-1" }, _hoisted_4$1 = { class: "text-gray-500" }, _hoisted_5$1 = ["disabled"], _sfc_main$r = /* @__PURE__ */ defineComponent({
466
+ }, _hoisted_3$2 = ["title"], _hoisted_4$1 = ["disabled"], _sfc_main$s = /* @__PURE__ */ defineComponent({
659
467
  __name: "vs-input-switcher",
660
468
  props: /* @__PURE__ */ mergeModels({
661
469
  view: {
@@ -701,63 +509,59 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
701
509
  emits: ["update:modelValue"],
702
510
  setup(e) {
703
511
  const t = useModel(e, "modelValue");
704
- return (n, o) => e.view === "checkbox" ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
705
- createVNode(_sfc_main$w, {
512
+ return (o, n) => e.view === "checkbox" ? (openBlock(), createElementBlock("div", _hoisted_1$n, [
513
+ createVNode(_sfc_main$x, {
706
514
  modelValue: t.value,
707
- "onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
515
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
708
516
  label: e.text,
709
517
  error: e.error
710
518
  }, null, 8, ["modelValue", "label", "error"]),
711
- e.rules?.includes("required") ? (openBlock(), createElementBlock("span", _hoisted_2$7, "*")) : createCommentVNode("", !0),
712
- createVNode(unref(qe), { width: 200 }, {
713
- reference: withCtx(() => [
714
- createElementVNode("button", {
715
- class: "cursor-pointer",
716
- onClick: o[1] || (o[1] = withModifiers(() => {
717
- }, ["prevent"]))
718
- }, [
719
- createVNode(unref(IconInfo), { class: "text-gray-500 w-[14px] h-[14px]" })
720
- ])
721
- ]),
722
- default: withCtx(() => [
723
- createElementVNode("div", _hoisted_3$2, [
724
- createElementVNode("p", _hoisted_4$1, toDisplayString(e.i), 1)
725
- ])
726
- ]),
727
- _: 1
728
- })
519
+ e.rules?.includes("required") ? (openBlock(), createElementBlock("span", _hoisted_2$8, "*")) : createCommentVNode("", !0),
520
+ e.i ? (openBlock(), createElementBlock("button", {
521
+ key: 1,
522
+ class: "cursor-pointer",
523
+ title: e.i,
524
+ onClick: n[1] || (n[1] = withModifiers(() => {
525
+ }, ["prevent"]))
526
+ }, [
527
+ createVNode(unref(IconInfo), { class: "text-gray-500 w-[14px] h-[14px]" })
528
+ ], 8, _hoisted_3$2)) : createCommentVNode("", !0)
729
529
  ])) : (openBlock(), createElementBlock("button", {
730
530
  key: 1,
731
531
  type: "button",
732
- class: 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]]),
532
+ class: 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", [t.value ? `bg-${e.style?.primaryColor || "blue"}-500` : "bg-stone-200", e.customClass]]),
733
533
  disabled: e.disabled,
734
- onClick: o[2] || (o[2] = (s) => t.value = !t.value)
534
+ onClick: n[2] || (n[2] = (r) => t.value = !t.value)
735
535
  }, [
736
536
  createElementVNode("span", {
737
537
  "data-state": "checked",
738
538
  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"]])
739
539
  }, null, 2)
740
- ], 10, _hoisted_5$1));
540
+ ], 10, _hoisted_4$1));
741
541
  }
742
- }), _hoisted_1$l = ["innerHTML"], _sfc_main$q = /* @__PURE__ */ defineComponent({
542
+ }), _hoisted_1$m = ["innerHTML"], _sfc_main$r = /* @__PURE__ */ defineComponent({
743
543
  __name: "vs-input-static",
744
544
  props: {
745
545
  html: {
746
546
  type: String,
747
547
  default: ""
748
548
  },
549
+ text: {
550
+ type: String,
551
+ default: ""
552
+ },
749
553
  customClass: {
750
554
  type: String,
751
555
  default: ""
752
556
  }
753
557
  },
754
558
  setup(e) {
755
- return (t, n) => (openBlock(), createElementBlock("div", {
559
+ return (t, o) => (openBlock(), createElementBlock("div", {
756
560
  class: normalizeClass(e.customClass),
757
- innerHTML: e.html
758
- }, null, 10, _hoisted_1$l));
561
+ innerHTML: (e.html === "", e.text)
562
+ }, null, 10, _hoisted_1$m));
759
563
  }
760
- }), _hoisted_1$k = ["placeholder", "disabled"], _sfc_main$p = /* @__PURE__ */ defineComponent({
564
+ }), _hoisted_1$l = ["placeholder", "disabled"], _sfc_main$q = /* @__PURE__ */ defineComponent({
761
565
  __name: "vs-input-mask",
762
566
  props: /* @__PURE__ */ mergeModels({
763
567
  style: {
@@ -775,28 +579,86 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
775
579
  disabled: {
776
580
  type: Boolean,
777
581
  default: !1
778
- }
582
+ },
583
+ mask: {
584
+ type: String,
585
+ default: ""
586
+ },
587
+ placeholderChar: { type: String, default: "_" }
779
588
  }, {
780
589
  modelValue: { default: "" },
781
590
  modelModifiers: {}
782
591
  }),
783
592
  emits: ["update:modelValue"],
784
593
  setup(e) {
785
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue");
786
- return (s, r) => withDirectives((openBlock(), createElementBlock("input", {
594
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue"), r = ref(""), s = {
595
+ 9: /\d/,
596
+ A: /[a-zA-Z]/,
597
+ "*": /[a-zA-Z0-9]/
598
+ }, l = computed(() => t.mask.split("")), i = computed(() => l.value.filter((d) => s[d]).length), u = computed({
599
+ get() {
600
+ let d = "", f = 0;
601
+ const m = i.value, p = r.value.slice(0, m);
602
+ for (const g of l.value)
603
+ s[g] ? f < p.length ? (d += p[f], f++) : d += t.placeholderChar : d += g;
604
+ return d;
605
+ },
606
+ set(d) {
607
+ const f = [], m = l.value, p = i.value;
608
+ let g = 0;
609
+ for (let y = 0; y < m.length; y++) {
610
+ const x = m[y];
611
+ if (s[x]) {
612
+ for (; g < d.length; ) {
613
+ const w = d[g];
614
+ if (g++, s[x].test(w)) {
615
+ f.push(w);
616
+ break;
617
+ }
618
+ }
619
+ if (f.length >= p) break;
620
+ }
621
+ }
622
+ r.value = f.join(""), n.value = d;
623
+ }
624
+ });
625
+ function c(d) {
626
+ const f = d.target, m = [], p = l.value, g = i.value;
627
+ let y = 0;
628
+ for (let x = 0; x < p.length; x++) {
629
+ const w = p[x];
630
+ if (s[w]) {
631
+ for (; y < f.value.length; ) {
632
+ const E = f.value[y];
633
+ if (y++, s[w].test(E)) {
634
+ m.push(E);
635
+ break;
636
+ }
637
+ }
638
+ if (m.length >= g) break;
639
+ }
640
+ }
641
+ r.value = m.join(""), console.log(r.value), n.value = u.value;
642
+ }
643
+ function a(d) {
644
+ d.key === "Backspace" && (d.preventDefault(), r.value = r.value.slice(0, -1), n.value = u.value);
645
+ }
646
+ return (d, f) => withDirectives((openBlock(), createElementBlock("input", {
787
647
  type: "text",
788
- "onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
648
+ "onUpdate:modelValue": f[0] || (f[0] = (m) => u.value = m),
789
649
  placeholder: e.placeholder,
790
650
  disabled: e.disabled,
791
- class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(n)]]),
651
+ class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(o)]]),
792
652
  style: {
793
653
  border: "1px solid #CFD9E0"
794
- }
795
- }, null, 10, _hoisted_1$k)), [
796
- [vModelText, o.value]
654
+ },
655
+ onInput: c,
656
+ onKeydown: a
657
+ }, null, 42, _hoisted_1$l)), [
658
+ [vModelText, u.value]
797
659
  ]);
798
660
  }
799
- }), _hoisted_1$j = ["innerHTML"], _sfc_main$o = /* @__PURE__ */ defineComponent({
661
+ }), _hoisted_1$k = ["innerHTML"], _sfc_main$p = /* @__PURE__ */ defineComponent({
800
662
  __name: "vs-input-html",
801
663
  props: {
802
664
  text: {
@@ -806,10 +668,56 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
806
668
  },
807
669
  setup(e) {
808
670
  const t = e;
809
- return (n, o) => (openBlock(), createElementBlock("div", null, [
671
+ return (o, n) => (openBlock(), createElementBlock("div", null, [
810
672
  createElementVNode("div", {
811
673
  innerHTML: t?.text
812
- }, null, 8, _hoisted_1$j)
674
+ }, null, 8, _hoisted_1$k)
675
+ ]));
676
+ }
677
+ }), _hoisted_1$j = { class: "relative w-full bg-white rounded-lg" }, _hoisted_2$7 = ["placeholder", "disabled"], _sfc_main$o = /* @__PURE__ */ defineComponent({
678
+ __name: "vs-input-email",
679
+ props: /* @__PURE__ */ mergeModels({
680
+ style: {
681
+ type: Object,
682
+ default: () => ({})
683
+ },
684
+ customClass: {
685
+ type: String,
686
+ default: ""
687
+ },
688
+ placeholder: {
689
+ type: String,
690
+ default: ""
691
+ },
692
+ disabled: {
693
+ type: Boolean,
694
+ default: !1
695
+ },
696
+ error: {
697
+ type: String,
698
+ default: null
699
+ }
700
+ }, {
701
+ modelValue: { default: "" },
702
+ modelModifiers: {}
703
+ }),
704
+ emits: ["update:modelValue"],
705
+ setup(e) {
706
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue");
707
+ return (r, s) => (openBlock(), createElementBlock("div", _hoisted_1$j, [
708
+ s[1] || (s[1] = createStaticVNode('<div class="absolute bottom-2/4 translate-y-2/4 left-[10px] cursor-pointer"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="stroke-gray-500 transition-all"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z"></path><path d="M3 7l9 6l9 -6"></path></svg></div>', 1)),
709
+ withDirectives(createElementVNode("input", {
710
+ type: "email",
711
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
712
+ placeholder: e.placeholder,
713
+ disabled: e.disabled,
714
+ class: normalizeClass(["!pl-8 py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(o), { "!border-red-600": e.error }]]),
715
+ style: {
716
+ border: "1px solid #CFD9E0"
717
+ }
718
+ }, null, 10, _hoisted_2$7), [
719
+ [vModelText, n.value]
720
+ ])
813
721
  ]));
814
722
  }
815
723
  }), _hoisted_1$i = ["value", "disabled"], _hoisted_2$6 = { class: "text-[13px] text-gray-700" }, _sfc_main$n = /* @__PURE__ */ defineComponent({
@@ -842,11 +750,11 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
842
750
  emits: ["update:modelValue"],
843
751
  setup(e) {
844
752
  const t = useModel(e, "modelValue");
845
- return (n, o) => (openBlock(), createElementBlock("label", {
753
+ return (o, n) => (openBlock(), createElementBlock("label", {
846
754
  class: normalizeClass(["flex items-center gap-0", [e.customClass]])
847
755
  }, [
848
756
  withDirectives(createElementVNode("input", {
849
- "onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
757
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
850
758
  type: "radio",
851
759
  value: e.value,
852
760
  disabled: e.disabled,
@@ -898,14 +806,14 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
898
806
  emits: ["update:modelValue"],
899
807
  setup(e) {
900
808
  const t = useModel(e, "modelValue");
901
- return (n, o) => (openBlock(), createElementBlock("label", {
809
+ return (o, n) => (openBlock(), createElementBlock("label", {
902
810
  class: normalizeClass(["flex items-center border rounded-lg px-2 py-1", [
903
811
  t.value == e.value ? `ring-2 ring-ring ring-${e.style?.primaryColor || "blue"}-500` : "",
904
812
  e.customClass
905
813
  ]])
906
814
  }, [
907
815
  withDirectives(createElementVNode("input", {
908
- "onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
816
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
909
817
  type: "radio",
910
818
  value: e.value,
911
819
  disabled: e.disabled,
@@ -940,18 +848,18 @@ const IconInfo = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_rende
940
848
  }),
941
849
  emits: ["update:modelValue"],
942
850
  setup(e) {
943
- const t = e, n = useModel(e, "modelValue"), o = computed(() => layouts[`vs-input-radio-${t.view}`]);
944
- return (s, r) => (openBlock(), createElementBlock("div", {
851
+ const t = e, o = useModel(e, "modelValue"), n = computed(() => layouts[`vs-input-radio-${t.view}`]);
852
+ return (r, s) => (openBlock(), createElementBlock("div", {
945
853
  class: normalizeClass([e.position === "horizontal" ? "flex items-center flex-wrap gap-2" : ""])
946
854
  }, [
947
- (openBlock(!0), createElementBlock(Fragment, null, renderList(e.options, (l) => (openBlock(), createBlock(resolveDynamicComponent(o.value), mergeProps({
855
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(e.options, (l) => (openBlock(), createBlock(resolveDynamicComponent(n.value), mergeProps({
948
856
  key: l?.id,
949
857
  text: l.text,
950
858
  value: l.id.toString(),
951
- checked: n.value === l.id,
952
- modelValue: n.value,
953
- "onUpdate:modelValue": r[0] || (r[0] = (i) => n.value = i)
954
- }, { ref_for: !0 }, s.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
859
+ checked: o.value === l.id,
860
+ modelValue: o.value,
861
+ "onUpdate:modelValue": s[0] || (s[0] = (i) => o.value = i)
862
+ }, { ref_for: !0 }, r.$attrs), null, 16, ["text", "value", "checked", "modelValue"]))), 128))
955
863
  ], 2));
956
864
  }
957
865
  });
@@ -961,8 +869,8 @@ function bind(e, t) {
961
869
  };
962
870
  }
963
871
  const { toString } = Object.prototype, { getPrototypeOf } = Object, { iterator, toStringTag } = Symbol, kindOf = /* @__PURE__ */ ((e) => (t) => {
964
- const n = toString.call(t);
965
- return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
872
+ const o = toString.call(t);
873
+ return e[o] || (e[o] = o.slice(8, -1).toLowerCase());
966
874
  })(/* @__PURE__ */ Object.create(null)), kindOfTest = (e) => (e = e.toLowerCase(), (t) => kindOf(t) === e), typeOfTest = (e) => (t) => typeof t === e, { isArray } = Array, isUndefined = typeOfTest("undefined");
967
875
  function isBuffer(e) {
968
876
  return e !== null && !isUndefined(e) && e.constructor !== null && !isUndefined(e.constructor) && isFunction(e.constructor.isBuffer) && e.constructor.isBuffer(e);
@@ -990,147 +898,147 @@ const isString = typeOfTest("string"), isFunction = typeOfTest("function"), isNu
990
898
  return e && (typeof FormData == "function" && e instanceof FormData || isFunction(e.append) && ((t = kindOf(e)) === "formdata" || // detect form-data instance
991
899
  t === "object" && isFunction(e.toString) && e.toString() === "[object FormData]"));
992
900
  }, 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, "");
993
- function forEach(e, t, { allOwnKeys: n = !1 } = {}) {
901
+ function forEach(e, t, { allOwnKeys: o = !1 } = {}) {
994
902
  if (e === null || typeof e > "u")
995
903
  return;
996
- let o, s;
904
+ let n, r;
997
905
  if (typeof e != "object" && (e = [e]), isArray(e))
998
- for (o = 0, s = e.length; o < s; o++)
999
- t.call(null, e[o], o, e);
906
+ for (n = 0, r = e.length; n < r; n++)
907
+ t.call(null, e[n], n, e);
1000
908
  else {
1001
909
  if (isBuffer(e))
1002
910
  return;
1003
- const r = n ? Object.getOwnPropertyNames(e) : Object.keys(e), l = r.length;
911
+ const s = o ? Object.getOwnPropertyNames(e) : Object.keys(e), l = s.length;
1004
912
  let i;
1005
- for (o = 0; o < l; o++)
1006
- i = r[o], t.call(null, e[i], i, e);
913
+ for (n = 0; n < l; n++)
914
+ i = s[n], t.call(null, e[i], i, e);
1007
915
  }
1008
916
  }
1009
917
  function findKey(e, t) {
1010
918
  if (isBuffer(e))
1011
919
  return null;
1012
920
  t = t.toLowerCase();
1013
- const n = Object.keys(e);
1014
- let o = n.length, s;
1015
- for (; o-- > 0; )
1016
- if (s = n[o], t === s.toLowerCase())
1017
- return s;
921
+ const o = Object.keys(e);
922
+ let n = o.length, r;
923
+ for (; n-- > 0; )
924
+ if (r = o[n], t === r.toLowerCase())
925
+ return r;
1018
926
  return null;
1019
927
  }
1020
928
  const _global = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, isContextDefined = (e) => !isUndefined(e) && e !== _global;
1021
929
  function merge() {
1022
- const { caseless: e } = isContextDefined(this) && this || {}, t = {}, n = (o, s) => {
1023
- const r = e && findKey(t, s) || s;
1024
- isPlainObject(t[r]) && isPlainObject(o) ? t[r] = merge(t[r], o) : isPlainObject(o) ? t[r] = merge({}, o) : isArray(o) ? t[r] = o.slice() : t[r] = o;
930
+ const { caseless: e } = isContextDefined(this) && this || {}, t = {}, o = (n, r) => {
931
+ const s = e && findKey(t, r) || r;
932
+ isPlainObject(t[s]) && isPlainObject(n) ? t[s] = merge(t[s], n) : isPlainObject(n) ? t[s] = merge({}, n) : isArray(n) ? t[s] = n.slice() : t[s] = n;
1025
933
  };
1026
- for (let o = 0, s = arguments.length; o < s; o++)
1027
- arguments[o] && forEach(arguments[o], n);
934
+ for (let n = 0, r = arguments.length; n < r; n++)
935
+ arguments[n] && forEach(arguments[n], o);
1028
936
  return t;
1029
937
  }
1030
- const extend = (e, t, n, { allOwnKeys: o } = {}) => (forEach(t, (s, r) => {
1031
- n && isFunction(s) ? e[r] = bind(s, n) : e[r] = s;
1032
- }, { allOwnKeys: o }), e), stripBOM = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), inherits = (e, t, n, o) => {
1033
- e.prototype = Object.create(t.prototype, o), e.prototype.constructor = e, Object.defineProperty(e, "super", {
938
+ const extend = (e, t, o, { allOwnKeys: n } = {}) => (forEach(t, (r, s) => {
939
+ o && isFunction(r) ? e[s] = bind(r, o) : e[s] = r;
940
+ }, { allOwnKeys: n }), e), stripBOM = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), inherits = (e, t, o, n) => {
941
+ e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
1034
942
  value: t.prototype
1035
- }), n && Object.assign(e.prototype, n);
1036
- }, toFlatObject = (e, t, n, o) => {
1037
- let s, r, l;
943
+ }), o && Object.assign(e.prototype, o);
944
+ }, toFlatObject = (e, t, o, n) => {
945
+ let r, s, l;
1038
946
  const i = {};
1039
947
  if (t = t || {}, e == null) return t;
1040
948
  do {
1041
- for (s = Object.getOwnPropertyNames(e), r = s.length; r-- > 0; )
1042
- l = s[r], (!o || o(l, e, t)) && !i[l] && (t[l] = e[l], i[l] = !0);
1043
- e = n !== !1 && getPrototypeOf(e);
1044
- } while (e && (!n || n(e, t)) && e !== Object.prototype);
949
+ for (r = Object.getOwnPropertyNames(e), s = r.length; s-- > 0; )
950
+ l = r[s], (!n || n(l, e, t)) && !i[l] && (t[l] = e[l], i[l] = !0);
951
+ e = o !== !1 && getPrototypeOf(e);
952
+ } while (e && (!o || o(e, t)) && e !== Object.prototype);
1045
953
  return t;
1046
- }, endsWith = (e, t, n) => {
1047
- e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
1048
- const o = e.indexOf(t, n);
1049
- return o !== -1 && o === n;
954
+ }, endsWith = (e, t, o) => {
955
+ e = String(e), (o === void 0 || o > e.length) && (o = e.length), o -= t.length;
956
+ const n = e.indexOf(t, o);
957
+ return n !== -1 && n === o;
1050
958
  }, toArray = (e) => {
1051
959
  if (!e) return null;
1052
960
  if (isArray(e)) return e;
1053
961
  let t = e.length;
1054
962
  if (!isNumber(t)) return null;
1055
- const n = new Array(t);
963
+ const o = new Array(t);
1056
964
  for (; t-- > 0; )
1057
- n[t] = e[t];
1058
- return n;
965
+ o[t] = e[t];
966
+ return o;
1059
967
  }, isTypedArray = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && getPrototypeOf(Uint8Array)), forEachEntry = (e, t) => {
1060
- const o = (e && e[iterator]).call(e);
1061
- let s;
1062
- for (; (s = o.next()) && !s.done; ) {
1063
- const r = s.value;
1064
- t.call(e, r[0], r[1]);
968
+ const n = (e && e[iterator]).call(e);
969
+ let r;
970
+ for (; (r = n.next()) && !r.done; ) {
971
+ const s = r.value;
972
+ t.call(e, s[0], s[1]);
1065
973
  }
1066
974
  }, matchAll = (e, t) => {
1067
- let n;
1068
- const o = [];
1069
- for (; (n = e.exec(t)) !== null; )
1070
- o.push(n);
1071
- return o;
975
+ let o;
976
+ const n = [];
977
+ for (; (o = e.exec(t)) !== null; )
978
+ n.push(o);
979
+ return n;
1072
980
  }, isHTMLForm = kindOfTest("HTMLFormElement"), toCamelCase = (e) => e.toLowerCase().replace(
1073
981
  /[-_\s]([a-z\d])(\w*)/g,
1074
- function(n, o, s) {
1075
- return o.toUpperCase() + s;
982
+ function(o, n, r) {
983
+ return n.toUpperCase() + r;
1076
984
  }
1077
- ), hasOwnProperty = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), isRegExp = kindOfTest("RegExp"), reduceDescriptors = (e, t) => {
1078
- const n = Object.getOwnPropertyDescriptors(e), o = {};
1079
- forEach(n, (s, r) => {
985
+ ), hasOwnProperty = (({ hasOwnProperty: e }) => (t, o) => e.call(t, o))(Object.prototype), isRegExp = kindOfTest("RegExp"), reduceDescriptors = (e, t) => {
986
+ const o = Object.getOwnPropertyDescriptors(e), n = {};
987
+ forEach(o, (r, s) => {
1080
988
  let l;
1081
- (l = t(s, r, e)) !== !1 && (o[r] = l || s);
1082
- }), Object.defineProperties(e, o);
989
+ (l = t(r, s, e)) !== !1 && (n[s] = l || r);
990
+ }), Object.defineProperties(e, n);
1083
991
  }, freezeMethods = (e) => {
1084
- reduceDescriptors(e, (t, n) => {
1085
- if (isFunction(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
992
+ reduceDescriptors(e, (t, o) => {
993
+ if (isFunction(e) && ["arguments", "caller", "callee"].indexOf(o) !== -1)
1086
994
  return !1;
1087
- const o = e[n];
1088
- if (isFunction(o)) {
995
+ const n = e[o];
996
+ if (isFunction(n)) {
1089
997
  if (t.enumerable = !1, "writable" in t) {
1090
998
  t.writable = !1;
1091
999
  return;
1092
1000
  }
1093
1001
  t.set || (t.set = () => {
1094
- throw Error("Can not rewrite read-only method '" + n + "'");
1002
+ throw Error("Can not rewrite read-only method '" + o + "'");
1095
1003
  });
1096
1004
  }
1097
1005
  });
1098
1006
  }, toObjectSet = (e, t) => {
1099
- const n = {}, o = (s) => {
1100
- s.forEach((r) => {
1101
- n[r] = !0;
1007
+ const o = {}, n = (r) => {
1008
+ r.forEach((s) => {
1009
+ o[s] = !0;
1102
1010
  });
1103
1011
  };
1104
- return isArray(e) ? o(e) : o(String(e).split(t)), n;
1012
+ return isArray(e) ? n(e) : n(String(e).split(t)), o;
1105
1013
  }, noop = () => {
1106
1014
  }, toFiniteNumber = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
1107
1015
  function isSpecCompliantForm(e) {
1108
1016
  return !!(e && isFunction(e.append) && e[toStringTag] === "FormData" && e[iterator]);
1109
1017
  }
1110
1018
  const toJSONObject = (e) => {
1111
- const t = new Array(10), n = (o, s) => {
1112
- if (isObject(o)) {
1113
- if (t.indexOf(o) >= 0)
1019
+ const t = new Array(10), o = (n, r) => {
1020
+ if (isObject(n)) {
1021
+ if (t.indexOf(n) >= 0)
1114
1022
  return;
1115
- if (isBuffer(o))
1116
- return o;
1117
- if (!("toJSON" in o)) {
1118
- t[s] = o;
1119
- const r = isArray(o) ? [] : {};
1120
- return forEach(o, (l, i) => {
1121
- const u = n(l, s + 1);
1122
- !isUndefined(u) && (r[i] = u);
1123
- }), t[s] = void 0, r;
1023
+ if (isBuffer(n))
1024
+ return n;
1025
+ if (!("toJSON" in n)) {
1026
+ t[r] = n;
1027
+ const s = isArray(n) ? [] : {};
1028
+ return forEach(n, (l, i) => {
1029
+ const u = o(l, r + 1);
1030
+ !isUndefined(u) && (s[i] = u);
1031
+ }), t[r] = void 0, s;
1124
1032
  }
1125
1033
  }
1126
- return o;
1034
+ return n;
1127
1035
  };
1128
- return n(e, 0);
1129
- }, isAsyncFn = kindOfTest("AsyncFunction"), isThenable = (e) => e && (isObject(e) || isFunction(e)) && isFunction(e.then) && isFunction(e.catch), _setImmediate = ((e, t) => e ? setImmediate : t ? ((n, o) => (_global.addEventListener("message", ({ source: s, data: r }) => {
1130
- s === _global && r === n && o.length && o.shift()();
1131
- }, !1), (s) => {
1132
- o.push(s), _global.postMessage(n, "*");
1133
- }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
1036
+ return o(e, 0);
1037
+ }, isAsyncFn = kindOfTest("AsyncFunction"), isThenable = (e) => e && (isObject(e) || isFunction(e)) && isFunction(e.then) && isFunction(e.catch), _setImmediate = ((e, t) => e ? setImmediate : t ? ((o, n) => (_global.addEventListener("message", ({ source: r, data: s }) => {
1038
+ r === _global && s === o && n.length && n.shift()();
1039
+ }, !1), (r) => {
1040
+ n.push(r), _global.postMessage(o, "*");
1041
+ }))(`axios@${Math.random()}`, []) : (o) => setTimeout(o))(
1134
1042
  typeof setImmediate == "function",
1135
1043
  isFunction(_global.postMessage)
1136
1044
  ), asap = typeof queueMicrotask < "u" ? queueMicrotask.bind(_global) : typeof process < "u" && process.nextTick || _setImmediate, isIterable = (e) => e != null && isFunction(e[iterator]), utils$1 = {
@@ -1193,8 +1101,8 @@ const toJSONObject = (e) => {
1193
1101
  asap,
1194
1102
  isIterable
1195
1103
  };
1196
- function AxiosError$1(e, t, n, o, s) {
1197
- 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), o && (this.request = o), s && (this.response = s, this.status = s.status ? s.status : null);
1104
+ function AxiosError$1(e, t, o, n, r) {
1105
+ 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), o && (this.config = o), n && (this.request = n), r && (this.response = r, this.status = r.status ? r.status : null);
1198
1106
  }
1199
1107
  utils$1.inherits(AxiosError$1, Error, {
1200
1108
  toJSON: function() {
@@ -1237,11 +1145,11 @@ const prototype$1 = AxiosError$1.prototype, descriptors = {};
1237
1145
  });
1238
1146
  Object.defineProperties(AxiosError$1, descriptors);
1239
1147
  Object.defineProperty(prototype$1, "isAxiosError", { value: !0 });
1240
- AxiosError$1.from = (e, t, n, o, s, r) => {
1148
+ AxiosError$1.from = (e, t, o, n, r, s) => {
1241
1149
  const l = Object.create(prototype$1);
1242
1150
  return utils$1.toFlatObject(e, l, function(u) {
1243
1151
  return u !== Error.prototype;
1244
- }, (i) => i !== "isAxiosError"), AxiosError$1.call(l, e.message, t, n, o, s), l.cause = e, l.name = e.name, r && Object.assign(l, r), l;
1152
+ }, (i) => i !== "isAxiosError"), AxiosError$1.call(l, e.message, t, o, n, r), l.cause = e, l.name = e.name, s && Object.assign(l, s), l;
1245
1153
  };
1246
1154
  const httpAdapter = null;
1247
1155
  function isVisitable(e) {
@@ -1250,10 +1158,10 @@ function isVisitable(e) {
1250
1158
  function removeBrackets(e) {
1251
1159
  return utils$1.endsWith(e, "[]") ? e.slice(0, -2) : e;
1252
1160
  }
1253
- function renderKey(e, t, n) {
1254
- return e ? e.concat(t).map(function(s, r) {
1255
- return s = removeBrackets(s), !n && r ? "[" + s + "]" : s;
1256
- }).join(n ? "." : "") : t;
1161
+ function renderKey(e, t, o) {
1162
+ return e ? e.concat(t).map(function(r, s) {
1163
+ return r = removeBrackets(r), !o && s ? "[" + r + "]" : r;
1164
+ }).join(o ? "." : "") : t;
1257
1165
  }
1258
1166
  function isFlatArray(e) {
1259
1167
  return utils$1.isArray(e) && !e.some(isVisitable);
@@ -1261,68 +1169,68 @@ function isFlatArray(e) {
1261
1169
  const predicates = utils$1.toFlatObject(utils$1, {}, null, function(t) {
1262
1170
  return /^is[A-Z]/.test(t);
1263
1171
  });
1264
- function toFormData$1(e, t, n) {
1172
+ function toFormData$1(e, t, o) {
1265
1173
  if (!utils$1.isObject(e))
1266
1174
  throw new TypeError("target must be an object");
1267
- t = t || new FormData(), n = utils$1.toFlatObject(n, {
1175
+ t = t || new FormData(), o = utils$1.toFlatObject(o, {
1268
1176
  metaTokens: !0,
1269
1177
  dots: !1,
1270
1178
  indexes: !1
1271
- }, !1, function(y, h) {
1272
- return !utils$1.isUndefined(h[y]);
1179
+ }, !1, function(g, y) {
1180
+ return !utils$1.isUndefined(y[g]);
1273
1181
  });
1274
- const o = n.metaTokens, s = n.visitor || a, r = n.dots, l = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && utils$1.isSpecCompliantForm(t);
1275
- if (!utils$1.isFunction(s))
1182
+ const n = o.metaTokens, r = o.visitor || a, s = o.dots, l = o.indexes, u = (o.Blob || typeof Blob < "u" && Blob) && utils$1.isSpecCompliantForm(t);
1183
+ if (!utils$1.isFunction(r))
1276
1184
  throw new TypeError("visitor must be a function");
1277
- function c(m) {
1278
- if (m === null) return "";
1279
- if (utils$1.isDate(m))
1280
- return m.toISOString();
1281
- if (utils$1.isBoolean(m))
1282
- return m.toString();
1283
- if (!u && utils$1.isBlob(m))
1185
+ function c(p) {
1186
+ if (p === null) return "";
1187
+ if (utils$1.isDate(p))
1188
+ return p.toISOString();
1189
+ if (utils$1.isBoolean(p))
1190
+ return p.toString();
1191
+ if (!u && utils$1.isBlob(p))
1284
1192
  throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
1285
- return utils$1.isArrayBuffer(m) || utils$1.isTypedArray(m) ? u && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
1286
- }
1287
- function a(m, y, h) {
1288
- let w = m;
1289
- if (m && !h && typeof m == "object") {
1290
- if (utils$1.endsWith(y, "{}"))
1291
- y = o ? y : y.slice(0, -2), m = JSON.stringify(m);
1292
- else if (utils$1.isArray(m) && isFlatArray(m) || (utils$1.isFileList(m) || utils$1.endsWith(y, "[]")) && (w = utils$1.toArray(m)))
1293
- return y = removeBrackets(y), w.forEach(function(g, k) {
1294
- !(utils$1.isUndefined(g) || g === null) && t.append(
1193
+ return utils$1.isArrayBuffer(p) || utils$1.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
1194
+ }
1195
+ function a(p, g, y) {
1196
+ let x = p;
1197
+ if (p && !y && typeof p == "object") {
1198
+ if (utils$1.endsWith(g, "{}"))
1199
+ g = n ? g : g.slice(0, -2), p = JSON.stringify(p);
1200
+ else if (utils$1.isArray(p) && isFlatArray(p) || (utils$1.isFileList(p) || utils$1.endsWith(g, "[]")) && (x = utils$1.toArray(p)))
1201
+ return g = removeBrackets(g), x.forEach(function(E, C) {
1202
+ !(utils$1.isUndefined(E) || E === null) && t.append(
1295
1203
  // eslint-disable-next-line no-nested-ternary
1296
- l === !0 ? renderKey([y], k, r) : l === null ? y : y + "[]",
1297
- c(g)
1204
+ l === !0 ? renderKey([g], C, s) : l === null ? g : g + "[]",
1205
+ c(E)
1298
1206
  );
1299
1207
  }), !1;
1300
1208
  }
1301
- return isVisitable(m) ? !0 : (t.append(renderKey(h, y, r), c(m)), !1);
1209
+ return isVisitable(p) ? !0 : (t.append(renderKey(y, g, s), c(p)), !1);
1302
1210
  }
1303
- const f = [], d = Object.assign(predicates, {
1211
+ const d = [], f = Object.assign(predicates, {
1304
1212
  defaultVisitor: a,
1305
1213
  convertValue: c,
1306
1214
  isVisitable
1307
1215
  });
1308
- function p(m, y) {
1309
- if (!utils$1.isUndefined(m)) {
1310
- if (f.indexOf(m) !== -1)
1311
- throw Error("Circular reference detected in " + y.join("."));
1312
- f.push(m), utils$1.forEach(m, function(w, x) {
1313
- (!(utils$1.isUndefined(w) || w === null) && s.call(
1216
+ function m(p, g) {
1217
+ if (!utils$1.isUndefined(p)) {
1218
+ if (d.indexOf(p) !== -1)
1219
+ throw Error("Circular reference detected in " + g.join("."));
1220
+ d.push(p), utils$1.forEach(p, function(x, w) {
1221
+ (!(utils$1.isUndefined(x) || x === null) && r.call(
1314
1222
  t,
1315
- w,
1316
- utils$1.isString(x) ? x.trim() : x,
1317
- y,
1318
- d
1319
- )) === !0 && p(w, y ? y.concat(x) : [x]);
1320
- }), f.pop();
1223
+ x,
1224
+ utils$1.isString(w) ? w.trim() : w,
1225
+ g,
1226
+ f
1227
+ )) === !0 && m(x, g ? g.concat(w) : [w]);
1228
+ }), d.pop();
1321
1229
  }
1322
1230
  }
1323
1231
  if (!utils$1.isObject(e))
1324
1232
  throw new TypeError("data must be an object");
1325
- return p(e), t;
1233
+ return m(e), t;
1326
1234
  }
1327
1235
  function encode$1(e) {
1328
1236
  const t = {
@@ -1334,40 +1242,40 @@ function encode$1(e) {
1334
1242
  "%20": "+",
1335
1243
  "%00": "\0"
1336
1244
  };
1337
- return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(o) {
1338
- return t[o];
1245
+ return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
1246
+ return t[n];
1339
1247
  });
1340
1248
  }
1341
1249
  function AxiosURLSearchParams(e, t) {
1342
1250
  this._pairs = [], e && toFormData$1(e, this, t);
1343
1251
  }
1344
1252
  const prototype = AxiosURLSearchParams.prototype;
1345
- prototype.append = function(t, n) {
1346
- this._pairs.push([t, n]);
1253
+ prototype.append = function(t, o) {
1254
+ this._pairs.push([t, o]);
1347
1255
  };
1348
1256
  prototype.toString = function(t) {
1349
- const n = t ? function(o) {
1350
- return t.call(this, o, encode$1);
1257
+ const o = t ? function(n) {
1258
+ return t.call(this, n, encode$1);
1351
1259
  } : encode$1;
1352
- return this._pairs.map(function(s) {
1353
- return n(s[0]) + "=" + n(s[1]);
1260
+ return this._pairs.map(function(r) {
1261
+ return o(r[0]) + "=" + o(r[1]);
1354
1262
  }, "").join("&");
1355
1263
  };
1356
1264
  function encode(e) {
1357
1265
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
1358
1266
  }
1359
- function buildURL(e, t, n) {
1267
+ function buildURL(e, t, o) {
1360
1268
  if (!t)
1361
1269
  return e;
1362
- const o = n && n.encode || encode;
1363
- utils$1.isFunction(n) && (n = {
1364
- serialize: n
1270
+ const n = o && o.encode || encode;
1271
+ utils$1.isFunction(o) && (o = {
1272
+ serialize: o
1365
1273
  });
1366
- const s = n && n.serialize;
1367
- let r;
1368
- if (s ? r = s(t, n) : r = utils$1.isURLSearchParams(t) ? t.toString() : new AxiosURLSearchParams(t, n).toString(o), r) {
1274
+ const r = o && o.serialize;
1275
+ let s;
1276
+ if (r ? s = r(t, o) : s = utils$1.isURLSearchParams(t) ? t.toString() : new AxiosURLSearchParams(t, o).toString(n), s) {
1369
1277
  const l = e.indexOf("#");
1370
- l !== -1 && (e = e.slice(0, l)), e += (e.indexOf("?") === -1 ? "?" : "&") + r;
1278
+ l !== -1 && (e = e.slice(0, l)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
1371
1279
  }
1372
1280
  return e;
1373
1281
  }
@@ -1383,12 +1291,12 @@ class InterceptorManager {
1383
1291
  *
1384
1292
  * @return {Number} An ID used to remove interceptor later
1385
1293
  */
1386
- use(t, n, o) {
1294
+ use(t, o, n) {
1387
1295
  return this.handlers.push({
1388
1296
  fulfilled: t,
1389
- rejected: n,
1390
- synchronous: o ? o.synchronous : !1,
1391
- runWhen: o ? o.runWhen : null
1297
+ rejected: o,
1298
+ synchronous: n ? n.synchronous : !1,
1299
+ runWhen: n ? n.runWhen : null
1392
1300
  }), this.handlers.length - 1;
1393
1301
  }
1394
1302
  /**
@@ -1420,8 +1328,8 @@ class InterceptorManager {
1420
1328
  * @returns {void}
1421
1329
  */
1422
1330
  forEach(t) {
1423
- utils$1.forEach(this.handlers, function(o) {
1424
- o !== null && t(o);
1331
+ utils$1.forEach(this.handlers, function(n) {
1332
+ n !== null && t(n);
1425
1333
  });
1426
1334
  }
1427
1335
  }
@@ -1451,8 +1359,8 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", or
1451
1359
  };
1452
1360
  function toURLEncodedForm(e, t) {
1453
1361
  return toFormData$1(e, new platform.classes.URLSearchParams(), {
1454
- visitor: function(n, o, s, r) {
1455
- return platform.isNode && utils$1.isBuffer(n) ? (this.append(o, n.toString("base64")), !1) : r.defaultVisitor.apply(this, arguments);
1362
+ visitor: function(o, n, r, s) {
1363
+ return platform.isNode && utils$1.isBuffer(o) ? (this.append(n, o.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1456
1364
  },
1457
1365
  ...t
1458
1366
  });
@@ -1461,57 +1369,57 @@ function parsePropPath(e) {
1461
1369
  return utils$1.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1462
1370
  }
1463
1371
  function arrayToObject(e) {
1464
- const t = {}, n = Object.keys(e);
1465
- let o;
1466
- const s = n.length;
1467
- let r;
1468
- for (o = 0; o < s; o++)
1469
- r = n[o], t[r] = e[r];
1372
+ const t = {}, o = Object.keys(e);
1373
+ let n;
1374
+ const r = o.length;
1375
+ let s;
1376
+ for (n = 0; n < r; n++)
1377
+ s = o[n], t[s] = e[s];
1470
1378
  return t;
1471
1379
  }
1472
1380
  function formDataToJSON(e) {
1473
- function t(n, o, s, r) {
1474
- let l = n[r++];
1381
+ function t(o, n, r, s) {
1382
+ let l = o[s++];
1475
1383
  if (l === "__proto__") return !0;
1476
- const i = Number.isFinite(+l), u = r >= n.length;
1477
- return l = !l && utils$1.isArray(s) ? s.length : l, u ? (utils$1.hasOwnProp(s, l) ? s[l] = [s[l], o] : s[l] = o, !i) : ((!s[l] || !utils$1.isObject(s[l])) && (s[l] = []), t(n, o, s[l], r) && utils$1.isArray(s[l]) && (s[l] = arrayToObject(s[l])), !i);
1384
+ const i = Number.isFinite(+l), u = s >= o.length;
1385
+ return l = !l && utils$1.isArray(r) ? r.length : l, u ? (utils$1.hasOwnProp(r, l) ? r[l] = [r[l], n] : r[l] = n, !i) : ((!r[l] || !utils$1.isObject(r[l])) && (r[l] = []), t(o, n, r[l], s) && utils$1.isArray(r[l]) && (r[l] = arrayToObject(r[l])), !i);
1478
1386
  }
1479
1387
  if (utils$1.isFormData(e) && utils$1.isFunction(e.entries)) {
1480
- const n = {};
1481
- return utils$1.forEachEntry(e, (o, s) => {
1482
- t(parsePropPath(o), s, n, 0);
1483
- }), n;
1388
+ const o = {};
1389
+ return utils$1.forEachEntry(e, (n, r) => {
1390
+ t(parsePropPath(n), r, o, 0);
1391
+ }), o;
1484
1392
  }
1485
1393
  return null;
1486
1394
  }
1487
- function stringifySafely(e, t, n) {
1395
+ function stringifySafely(e, t, o) {
1488
1396
  if (utils$1.isString(e))
1489
1397
  try {
1490
1398
  return (t || JSON.parse)(e), utils$1.trim(e);
1491
- } catch (o) {
1492
- if (o.name !== "SyntaxError")
1493
- throw o;
1399
+ } catch (n) {
1400
+ if (n.name !== "SyntaxError")
1401
+ throw n;
1494
1402
  }
1495
- return (n || JSON.stringify)(e);
1403
+ return (o || JSON.stringify)(e);
1496
1404
  }
1497
1405
  const defaults = {
1498
1406
  transitional: transitionalDefaults,
1499
1407
  adapter: ["xhr", "http", "fetch"],
1500
- transformRequest: [function(t, n) {
1501
- const o = n.getContentType() || "", s = o.indexOf("application/json") > -1, r = utils$1.isObject(t);
1502
- if (r && utils$1.isHTMLForm(t) && (t = new FormData(t)), utils$1.isFormData(t))
1503
- return s ? JSON.stringify(formDataToJSON(t)) : t;
1408
+ transformRequest: [function(t, o) {
1409
+ const n = o.getContentType() || "", r = n.indexOf("application/json") > -1, s = utils$1.isObject(t);
1410
+ if (s && utils$1.isHTMLForm(t) && (t = new FormData(t)), utils$1.isFormData(t))
1411
+ return r ? JSON.stringify(formDataToJSON(t)) : t;
1504
1412
  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))
1505
1413
  return t;
1506
1414
  if (utils$1.isArrayBufferView(t))
1507
1415
  return t.buffer;
1508
1416
  if (utils$1.isURLSearchParams(t))
1509
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1417
+ return o.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1510
1418
  let i;
1511
- if (r) {
1512
- if (o.indexOf("application/x-www-form-urlencoded") > -1)
1419
+ if (s) {
1420
+ if (n.indexOf("application/x-www-form-urlencoded") > -1)
1513
1421
  return toURLEncodedForm(t, this.formSerializer).toString();
1514
- if ((i = utils$1.isFileList(t)) || o.indexOf("multipart/form-data") > -1) {
1422
+ if ((i = utils$1.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
1515
1423
  const u = this.env && this.env.FormData;
1516
1424
  return toFormData$1(
1517
1425
  i ? { "files[]": t } : t,
@@ -1520,14 +1428,14 @@ const defaults = {
1520
1428
  );
1521
1429
  }
1522
1430
  }
1523
- return r || s ? (n.setContentType("application/json", !1), stringifySafely(t)) : t;
1431
+ return s || r ? (o.setContentType("application/json", !1), stringifySafely(t)) : t;
1524
1432
  }],
1525
1433
  transformResponse: [function(t) {
1526
- const n = this.transitional || defaults.transitional, o = n && n.forcedJSONParsing, s = this.responseType === "json";
1434
+ const o = this.transitional || defaults.transitional, n = o && o.forcedJSONParsing, r = this.responseType === "json";
1527
1435
  if (utils$1.isResponse(t) || utils$1.isReadableStream(t))
1528
1436
  return t;
1529
- if (t && utils$1.isString(t) && (o && !this.responseType || s)) {
1530
- const l = !(n && n.silentJSONParsing) && s;
1437
+ if (t && utils$1.isString(t) && (n && !this.responseType || r)) {
1438
+ const l = !(o && o.silentJSONParsing) && r;
1531
1439
  try {
1532
1440
  return JSON.parse(t);
1533
1441
  } catch (i) {
@@ -1583,10 +1491,10 @@ const ignoreDuplicateOf = utils$1.toObjectSet([
1583
1491
  "user-agent"
1584
1492
  ]), parseHeaders = (e) => {
1585
1493
  const t = {};
1586
- let n, o, s;
1494
+ let o, n, r;
1587
1495
  return e && e.split(`
1588
1496
  `).forEach(function(l) {
1589
- s = l.indexOf(":"), n = l.substring(0, s).trim().toLowerCase(), o = l.substring(s + 1).trim(), !(!n || t[n] && ignoreDuplicateOf[n]) && (n === "set-cookie" ? t[n] ? t[n].push(o) : t[n] = [o] : t[n] = t[n] ? t[n] + ", " + o : o);
1497
+ r = l.indexOf(":"), o = l.substring(0, r).trim().toLowerCase(), n = l.substring(r + 1).trim(), !(!o || t[o] && ignoreDuplicateOf[o]) && (o === "set-cookie" ? t[o] ? t[o].push(n) : t[o] = [n] : t[o] = t[o] ? t[o] + ", " + n : n);
1590
1498
  }), t;
1591
1499
  }, $internals = Symbol("internals");
1592
1500
  function normalizeHeader(e) {
@@ -1596,32 +1504,32 @@ function normalizeValue(e) {
1596
1504
  return e === !1 || e == null ? e : utils$1.isArray(e) ? e.map(normalizeValue) : String(e);
1597
1505
  }
1598
1506
  function parseTokens(e) {
1599
- const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1600
- let o;
1601
- for (; o = n.exec(e); )
1602
- t[o[1]] = o[2];
1507
+ const t = /* @__PURE__ */ Object.create(null), o = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1508
+ let n;
1509
+ for (; n = o.exec(e); )
1510
+ t[n[1]] = n[2];
1603
1511
  return t;
1604
1512
  }
1605
1513
  const isValidHeaderName = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1606
- function matchHeaderValue(e, t, n, o, s) {
1607
- if (utils$1.isFunction(o))
1608
- return o.call(this, t, n);
1609
- if (s && (t = n), !!utils$1.isString(t)) {
1610
- if (utils$1.isString(o))
1611
- return t.indexOf(o) !== -1;
1612
- if (utils$1.isRegExp(o))
1613
- return o.test(t);
1514
+ function matchHeaderValue(e, t, o, n, r) {
1515
+ if (utils$1.isFunction(n))
1516
+ return n.call(this, t, o);
1517
+ if (r && (t = o), !!utils$1.isString(t)) {
1518
+ if (utils$1.isString(n))
1519
+ return t.indexOf(n) !== -1;
1520
+ if (utils$1.isRegExp(n))
1521
+ return n.test(t);
1614
1522
  }
1615
1523
  }
1616
1524
  function formatHeader(e) {
1617
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, o) => n.toUpperCase() + o);
1525
+ return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, o, n) => o.toUpperCase() + n);
1618
1526
  }
1619
1527
  function buildAccessors(e, t) {
1620
- const n = utils$1.toCamelCase(" " + t);
1621
- ["get", "set", "has"].forEach((o) => {
1622
- Object.defineProperty(e, o + n, {
1623
- value: function(s, r, l) {
1624
- return this[o].call(this, t, s, r, l);
1528
+ const o = utils$1.toCamelCase(" " + t);
1529
+ ["get", "set", "has"].forEach((n) => {
1530
+ Object.defineProperty(e, n + o, {
1531
+ value: function(r, s, l) {
1532
+ return this[n].call(this, t, r, s, l);
1625
1533
  },
1626
1534
  configurable: !0
1627
1535
  });
@@ -1631,20 +1539,20 @@ let AxiosHeaders$1 = class {
1631
1539
  constructor(t) {
1632
1540
  t && this.set(t);
1633
1541
  }
1634
- set(t, n, o) {
1635
- const s = this;
1636
- function r(i, u, c) {
1542
+ set(t, o, n) {
1543
+ const r = this;
1544
+ function s(i, u, c) {
1637
1545
  const a = normalizeHeader(u);
1638
1546
  if (!a)
1639
1547
  throw new Error("header name must be a non-empty string");
1640
- const f = utils$1.findKey(s, a);
1641
- (!f || s[f] === void 0 || c === !0 || c === void 0 && s[f] !== !1) && (s[f || u] = normalizeValue(i));
1548
+ const d = utils$1.findKey(r, a);
1549
+ (!d || r[d] === void 0 || c === !0 || c === void 0 && r[d] !== !1) && (r[d || u] = normalizeValue(i));
1642
1550
  }
1643
- const l = (i, u) => utils$1.forEach(i, (c, a) => r(c, a, u));
1551
+ const l = (i, u) => utils$1.forEach(i, (c, a) => s(c, a, u));
1644
1552
  if (utils$1.isPlainObject(t) || t instanceof this.constructor)
1645
- l(t, n);
1553
+ l(t, o);
1646
1554
  else if (utils$1.isString(t) && (t = t.trim()) && !isValidHeaderName(t))
1647
- l(parseHeaders(t), n);
1555
+ l(parseHeaders(t), o);
1648
1556
  else if (utils$1.isObject(t) && utils$1.isIterable(t)) {
1649
1557
  let i = {}, u, c;
1650
1558
  for (const a of t) {
@@ -1652,81 +1560,81 @@ let AxiosHeaders$1 = class {
1652
1560
  throw TypeError("Object iterator must return a key-value pair");
1653
1561
  i[c = a[0]] = (u = i[c]) ? utils$1.isArray(u) ? [...u, a[1]] : [u, a[1]] : a[1];
1654
1562
  }
1655
- l(i, n);
1563
+ l(i, o);
1656
1564
  } else
1657
- t != null && r(n, t, o);
1565
+ t != null && s(o, t, n);
1658
1566
  return this;
1659
1567
  }
1660
- get(t, n) {
1568
+ get(t, o) {
1661
1569
  if (t = normalizeHeader(t), t) {
1662
- const o = utils$1.findKey(this, t);
1663
- if (o) {
1664
- const s = this[o];
1665
- if (!n)
1666
- return s;
1667
- if (n === !0)
1668
- return parseTokens(s);
1669
- if (utils$1.isFunction(n))
1670
- return n.call(this, s, o);
1671
- if (utils$1.isRegExp(n))
1672
- return n.exec(s);
1570
+ const n = utils$1.findKey(this, t);
1571
+ if (n) {
1572
+ const r = this[n];
1573
+ if (!o)
1574
+ return r;
1575
+ if (o === !0)
1576
+ return parseTokens(r);
1577
+ if (utils$1.isFunction(o))
1578
+ return o.call(this, r, n);
1579
+ if (utils$1.isRegExp(o))
1580
+ return o.exec(r);
1673
1581
  throw new TypeError("parser must be boolean|regexp|function");
1674
1582
  }
1675
1583
  }
1676
1584
  }
1677
- has(t, n) {
1585
+ has(t, o) {
1678
1586
  if (t = normalizeHeader(t), t) {
1679
- const o = utils$1.findKey(this, t);
1680
- return !!(o && this[o] !== void 0 && (!n || matchHeaderValue(this, this[o], o, n)));
1587
+ const n = utils$1.findKey(this, t);
1588
+ return !!(n && this[n] !== void 0 && (!o || matchHeaderValue(this, this[n], n, o)));
1681
1589
  }
1682
1590
  return !1;
1683
1591
  }
1684
- delete(t, n) {
1685
- const o = this;
1686
- let s = !1;
1687
- function r(l) {
1592
+ delete(t, o) {
1593
+ const n = this;
1594
+ let r = !1;
1595
+ function s(l) {
1688
1596
  if (l = normalizeHeader(l), l) {
1689
- const i = utils$1.findKey(o, l);
1690
- i && (!n || matchHeaderValue(o, o[i], i, n)) && (delete o[i], s = !0);
1597
+ const i = utils$1.findKey(n, l);
1598
+ i && (!o || matchHeaderValue(n, n[i], i, o)) && (delete n[i], r = !0);
1691
1599
  }
1692
1600
  }
1693
- return utils$1.isArray(t) ? t.forEach(r) : r(t), s;
1601
+ return utils$1.isArray(t) ? t.forEach(s) : s(t), r;
1694
1602
  }
1695
1603
  clear(t) {
1696
- const n = Object.keys(this);
1697
- let o = n.length, s = !1;
1698
- for (; o--; ) {
1699
- const r = n[o];
1700
- (!t || matchHeaderValue(this, this[r], r, t, !0)) && (delete this[r], s = !0);
1604
+ const o = Object.keys(this);
1605
+ let n = o.length, r = !1;
1606
+ for (; n--; ) {
1607
+ const s = o[n];
1608
+ (!t || matchHeaderValue(this, this[s], s, t, !0)) && (delete this[s], r = !0);
1701
1609
  }
1702
- return s;
1610
+ return r;
1703
1611
  }
1704
1612
  normalize(t) {
1705
- const n = this, o = {};
1706
- return utils$1.forEach(this, (s, r) => {
1707
- const l = utils$1.findKey(o, r);
1613
+ const o = this, n = {};
1614
+ return utils$1.forEach(this, (r, s) => {
1615
+ const l = utils$1.findKey(n, s);
1708
1616
  if (l) {
1709
- n[l] = normalizeValue(s), delete n[r];
1617
+ o[l] = normalizeValue(r), delete o[s];
1710
1618
  return;
1711
1619
  }
1712
- const i = t ? formatHeader(r) : String(r).trim();
1713
- i !== r && delete n[r], n[i] = normalizeValue(s), o[i] = !0;
1620
+ const i = t ? formatHeader(s) : String(s).trim();
1621
+ i !== s && delete o[s], o[i] = normalizeValue(r), n[i] = !0;
1714
1622
  }), this;
1715
1623
  }
1716
1624
  concat(...t) {
1717
1625
  return this.constructor.concat(this, ...t);
1718
1626
  }
1719
1627
  toJSON(t) {
1720
- const n = /* @__PURE__ */ Object.create(null);
1721
- return utils$1.forEach(this, (o, s) => {
1722
- o != null && o !== !1 && (n[s] = t && utils$1.isArray(o) ? o.join(", ") : o);
1723
- }), n;
1628
+ const o = /* @__PURE__ */ Object.create(null);
1629
+ return utils$1.forEach(this, (n, r) => {
1630
+ n != null && n !== !1 && (o[r] = t && utils$1.isArray(n) ? n.join(", ") : n);
1631
+ }), o;
1724
1632
  }
1725
1633
  [Symbol.iterator]() {
1726
1634
  return Object.entries(this.toJSON())[Symbol.iterator]();
1727
1635
  }
1728
1636
  toString() {
1729
- return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
1637
+ return Object.entries(this.toJSON()).map(([t, o]) => t + ": " + o).join(`
1730
1638
  `);
1731
1639
  }
1732
1640
  getSetCookie() {
@@ -1738,56 +1646,56 @@ let AxiosHeaders$1 = class {
1738
1646
  static from(t) {
1739
1647
  return t instanceof this ? t : new this(t);
1740
1648
  }
1741
- static concat(t, ...n) {
1742
- const o = new this(t);
1743
- return n.forEach((s) => o.set(s)), o;
1649
+ static concat(t, ...o) {
1650
+ const n = new this(t);
1651
+ return o.forEach((r) => n.set(r)), n;
1744
1652
  }
1745
1653
  static accessor(t) {
1746
- const o = (this[$internals] = this[$internals] = {
1654
+ const n = (this[$internals] = this[$internals] = {
1747
1655
  accessors: {}
1748
- }).accessors, s = this.prototype;
1749
- function r(l) {
1656
+ }).accessors, r = this.prototype;
1657
+ function s(l) {
1750
1658
  const i = normalizeHeader(l);
1751
- o[i] || (buildAccessors(s, l), o[i] = !0);
1659
+ n[i] || (buildAccessors(r, l), n[i] = !0);
1752
1660
  }
1753
- return utils$1.isArray(t) ? t.forEach(r) : r(t), this;
1661
+ return utils$1.isArray(t) ? t.forEach(s) : s(t), this;
1754
1662
  }
1755
1663
  };
1756
1664
  AxiosHeaders$1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1757
1665
  utils$1.reduceDescriptors(AxiosHeaders$1.prototype, ({ value: e }, t) => {
1758
- let n = t[0].toUpperCase() + t.slice(1);
1666
+ let o = t[0].toUpperCase() + t.slice(1);
1759
1667
  return {
1760
1668
  get: () => e,
1761
- set(o) {
1762
- this[n] = o;
1669
+ set(n) {
1670
+ this[o] = n;
1763
1671
  }
1764
1672
  };
1765
1673
  });
1766
1674
  utils$1.freezeMethods(AxiosHeaders$1);
1767
1675
  function transformData(e, t) {
1768
- const n = this || defaults, o = t || n, s = AxiosHeaders$1.from(o.headers);
1769
- let r = o.data;
1676
+ const o = this || defaults, n = t || o, r = AxiosHeaders$1.from(n.headers);
1677
+ let s = n.data;
1770
1678
  return utils$1.forEach(e, function(i) {
1771
- r = i.call(n, r, s.normalize(), t ? t.status : void 0);
1772
- }), s.normalize(), r;
1679
+ s = i.call(o, s, r.normalize(), t ? t.status : void 0);
1680
+ }), r.normalize(), s;
1773
1681
  }
1774
1682
  function isCancel$1(e) {
1775
1683
  return !!(e && e.__CANCEL__);
1776
1684
  }
1777
- function CanceledError$1(e, t, n) {
1778
- AxiosError$1.call(this, e ?? "canceled", AxiosError$1.ERR_CANCELED, t, n), this.name = "CanceledError";
1685
+ function CanceledError$1(e, t, o) {
1686
+ AxiosError$1.call(this, e ?? "canceled", AxiosError$1.ERR_CANCELED, t, o), this.name = "CanceledError";
1779
1687
  }
1780
1688
  utils$1.inherits(CanceledError$1, AxiosError$1, {
1781
1689
  __CANCEL__: !0
1782
1690
  });
1783
- function settle(e, t, n) {
1784
- const o = n.config.validateStatus;
1785
- !n.status || !o || o(n.status) ? e(n) : t(new AxiosError$1(
1786
- "Request failed with status code " + n.status,
1787
- [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1788
- n.config,
1789
- n.request,
1790
- n
1691
+ function settle(e, t, o) {
1692
+ const n = o.config.validateStatus;
1693
+ !o.status || !n || n(o.status) ? e(o) : t(new AxiosError$1(
1694
+ "Request failed with status code " + o.status,
1695
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(o.status / 100) - 4],
1696
+ o.config,
1697
+ o.request,
1698
+ o
1791
1699
  ));
1792
1700
  }
1793
1701
  function parseProtocol(e) {
@@ -1796,67 +1704,67 @@ function parseProtocol(e) {
1796
1704
  }
1797
1705
  function speedometer(e, t) {
1798
1706
  e = e || 10;
1799
- const n = new Array(e), o = new Array(e);
1800
- let s = 0, r = 0, l;
1707
+ const o = new Array(e), n = new Array(e);
1708
+ let r = 0, s = 0, l;
1801
1709
  return t = t !== void 0 ? t : 1e3, function(u) {
1802
- const c = Date.now(), a = o[r];
1803
- l || (l = c), n[s] = u, o[s] = c;
1804
- let f = r, d = 0;
1805
- for (; f !== s; )
1806
- d += n[f++], f = f % e;
1807
- if (s = (s + 1) % e, s === r && (r = (r + 1) % e), c - l < t)
1710
+ const c = Date.now(), a = n[s];
1711
+ l || (l = c), o[r] = u, n[r] = c;
1712
+ let d = s, f = 0;
1713
+ for (; d !== r; )
1714
+ f += o[d++], d = d % e;
1715
+ if (r = (r + 1) % e, r === s && (s = (s + 1) % e), c - l < t)
1808
1716
  return;
1809
- const p = a && c - a;
1810
- return p ? Math.round(d * 1e3 / p) : void 0;
1717
+ const m = a && c - a;
1718
+ return m ? Math.round(f * 1e3 / m) : void 0;
1811
1719
  };
1812
1720
  }
1813
1721
  function throttle(e, t) {
1814
- let n = 0, o = 1e3 / t, s, r;
1722
+ let o = 0, n = 1e3 / t, r, s;
1815
1723
  const l = (c, a = Date.now()) => {
1816
- n = a, s = null, r && (clearTimeout(r), r = null), e(...c);
1724
+ o = a, r = null, s && (clearTimeout(s), s = null), e(...c);
1817
1725
  };
1818
1726
  return [(...c) => {
1819
- const a = Date.now(), f = a - n;
1820
- f >= o ? l(c, a) : (s = c, r || (r = setTimeout(() => {
1821
- r = null, l(s);
1822
- }, o - f)));
1823
- }, () => s && l(s)];
1824
- }
1825
- const progressEventReducer = (e, t, n = 3) => {
1826
- let o = 0;
1827
- const s = speedometer(50, 250);
1828
- return throttle((r) => {
1829
- const l = r.loaded, i = r.lengthComputable ? r.total : void 0, u = l - o, c = s(u), a = l <= i;
1830
- o = l;
1831
- const f = {
1727
+ const a = Date.now(), d = a - o;
1728
+ d >= n ? l(c, a) : (r = c, s || (s = setTimeout(() => {
1729
+ s = null, l(r);
1730
+ }, n - d)));
1731
+ }, () => r && l(r)];
1732
+ }
1733
+ const progressEventReducer = (e, t, o = 3) => {
1734
+ let n = 0;
1735
+ const r = speedometer(50, 250);
1736
+ return throttle((s) => {
1737
+ const l = s.loaded, i = s.lengthComputable ? s.total : void 0, u = l - n, c = r(u), a = l <= i;
1738
+ n = l;
1739
+ const d = {
1832
1740
  loaded: l,
1833
1741
  total: i,
1834
1742
  progress: i ? l / i : void 0,
1835
1743
  bytes: u,
1836
1744
  rate: c || void 0,
1837
1745
  estimated: c && i && a ? (i - l) / c : void 0,
1838
- event: r,
1746
+ event: s,
1839
1747
  lengthComputable: i != null,
1840
1748
  [t ? "download" : "upload"]: !0
1841
1749
  };
1842
- e(f);
1843
- }, n);
1750
+ e(d);
1751
+ }, o);
1844
1752
  }, progressEventDecorator = (e, t) => {
1845
- const n = e != null;
1846
- return [(o) => t[0]({
1847
- lengthComputable: n,
1753
+ const o = e != null;
1754
+ return [(n) => t[0]({
1755
+ lengthComputable: o,
1848
1756
  total: e,
1849
- loaded: o
1757
+ loaded: n
1850
1758
  }), t[1]];
1851
- }, asyncDecorator = (e) => (...t) => utils$1.asap(() => e(...t)), isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, platform.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1759
+ }, asyncDecorator = (e) => (...t) => utils$1.asap(() => e(...t)), isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (o) => (o = new URL(o, platform.origin), e.protocol === o.protocol && e.host === o.host && (t || e.port === o.port)))(
1852
1760
  new URL(platform.origin),
1853
1761
  platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
1854
1762
  ) : () => !0, cookies = platform.hasStandardBrowserEnv ? (
1855
1763
  // Standard browser envs support document.cookie
1856
1764
  {
1857
- write(e, t, n, o, s, r) {
1765
+ write(e, t, o, n, r, s) {
1858
1766
  const l = [e + "=" + encodeURIComponent(t)];
1859
- utils$1.isNumber(n) && l.push("expires=" + new Date(n).toGMTString()), utils$1.isString(o) && l.push("path=" + o), utils$1.isString(s) && l.push("domain=" + s), r === !0 && l.push("secure"), document.cookie = l.join("; ");
1767
+ utils$1.isNumber(o) && l.push("expires=" + new Date(o).toGMTString()), utils$1.isString(n) && l.push("path=" + n), utils$1.isString(r) && l.push("domain=" + r), s === !0 && l.push("secure"), document.cookie = l.join("; ");
1860
1768
  },
1861
1769
  read(e) {
1862
1770
  const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
@@ -1884,43 +1792,43 @@ function isAbsoluteURL(e) {
1884
1792
  function combineURLs(e, t) {
1885
1793
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
1886
1794
  }
1887
- function buildFullPath(e, t, n) {
1888
- let o = !isAbsoluteURL(t);
1889
- return e && (o || n == !1) ? combineURLs(e, t) : t;
1795
+ function buildFullPath(e, t, o) {
1796
+ let n = !isAbsoluteURL(t);
1797
+ return e && (n || o == !1) ? combineURLs(e, t) : t;
1890
1798
  }
1891
1799
  const headersToObject = (e) => e instanceof AxiosHeaders$1 ? { ...e } : e;
1892
1800
  function mergeConfig$1(e, t) {
1893
1801
  t = t || {};
1894
- const n = {};
1895
- function o(c, a, f, d) {
1896
- return utils$1.isPlainObject(c) && utils$1.isPlainObject(a) ? utils$1.merge.call({ caseless: d }, c, a) : utils$1.isPlainObject(a) ? utils$1.merge({}, a) : utils$1.isArray(a) ? a.slice() : a;
1802
+ const o = {};
1803
+ function n(c, a, d, f) {
1804
+ return utils$1.isPlainObject(c) && utils$1.isPlainObject(a) ? utils$1.merge.call({ caseless: f }, c, a) : utils$1.isPlainObject(a) ? utils$1.merge({}, a) : utils$1.isArray(a) ? a.slice() : a;
1897
1805
  }
1898
- function s(c, a, f, d) {
1806
+ function r(c, a, d, f) {
1899
1807
  if (utils$1.isUndefined(a)) {
1900
1808
  if (!utils$1.isUndefined(c))
1901
- return o(void 0, c, f, d);
1902
- } else return o(c, a, f, d);
1809
+ return n(void 0, c, d, f);
1810
+ } else return n(c, a, d, f);
1903
1811
  }
1904
- function r(c, a) {
1812
+ function s(c, a) {
1905
1813
  if (!utils$1.isUndefined(a))
1906
- return o(void 0, a);
1814
+ return n(void 0, a);
1907
1815
  }
1908
1816
  function l(c, a) {
1909
1817
  if (utils$1.isUndefined(a)) {
1910
1818
  if (!utils$1.isUndefined(c))
1911
- return o(void 0, c);
1912
- } else return o(void 0, a);
1819
+ return n(void 0, c);
1820
+ } else return n(void 0, a);
1913
1821
  }
1914
- function i(c, a, f) {
1915
- if (f in t)
1916
- return o(c, a);
1917
- if (f in e)
1918
- return o(void 0, c);
1822
+ function i(c, a, d) {
1823
+ if (d in t)
1824
+ return n(c, a);
1825
+ if (d in e)
1826
+ return n(void 0, c);
1919
1827
  }
1920
1828
  const u = {
1921
- url: r,
1922
- method: r,
1923
- data: r,
1829
+ url: s,
1830
+ method: s,
1831
+ data: s,
1924
1832
  baseURL: l,
1925
1833
  transformRequest: l,
1926
1834
  transformResponse: l,
@@ -1946,126 +1854,126 @@ function mergeConfig$1(e, t) {
1946
1854
  socketPath: l,
1947
1855
  responseEncoding: l,
1948
1856
  validateStatus: i,
1949
- headers: (c, a, f) => s(headersToObject(c), headersToObject(a), f, !0)
1857
+ headers: (c, a, d) => r(headersToObject(c), headersToObject(a), d, !0)
1950
1858
  };
1951
1859
  return utils$1.forEach(Object.keys({ ...e, ...t }), function(a) {
1952
- const f = u[a] || s, d = f(e[a], t[a], a);
1953
- utils$1.isUndefined(d) && f !== i || (n[a] = d);
1954
- }), n;
1860
+ const d = u[a] || r, f = d(e[a], t[a], a);
1861
+ utils$1.isUndefined(f) && d !== i || (o[a] = f);
1862
+ }), o;
1955
1863
  }
1956
1864
  const resolveConfig = (e) => {
1957
1865
  const t = mergeConfig$1({}, e);
1958
- let { data: n, withXSRFToken: o, xsrfHeaderName: s, xsrfCookieName: r, headers: l, auth: i } = t;
1866
+ let { data: o, withXSRFToken: n, xsrfHeaderName: r, xsrfCookieName: s, headers: l, auth: i } = t;
1959
1867
  t.headers = l = AxiosHeaders$1.from(l), t.url = buildURL(buildFullPath(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && l.set(
1960
1868
  "Authorization",
1961
1869
  "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
1962
1870
  );
1963
1871
  let u;
1964
- if (utils$1.isFormData(n)) {
1872
+ if (utils$1.isFormData(o)) {
1965
1873
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv)
1966
1874
  l.setContentType(void 0);
1967
1875
  else if ((u = l.getContentType()) !== !1) {
1968
- const [c, ...a] = u ? u.split(";").map((f) => f.trim()).filter(Boolean) : [];
1876
+ const [c, ...a] = u ? u.split(";").map((d) => d.trim()).filter(Boolean) : [];
1969
1877
  l.setContentType([c || "multipart/form-data", ...a].join("; "));
1970
1878
  }
1971
1879
  }
1972
- if (platform.hasStandardBrowserEnv && (o && utils$1.isFunction(o) && (o = o(t)), o || o !== !1 && isURLSameOrigin(t.url))) {
1973
- const c = s && r && cookies.read(r);
1974
- c && l.set(s, c);
1880
+ if (platform.hasStandardBrowserEnv && (n && utils$1.isFunction(n) && (n = n(t)), n || n !== !1 && isURLSameOrigin(t.url))) {
1881
+ const c = r && s && cookies.read(s);
1882
+ c && l.set(r, c);
1975
1883
  }
1976
1884
  return t;
1977
1885
  }, isXHRAdapterSupported = typeof XMLHttpRequest < "u", xhrAdapter = isXHRAdapterSupported && function(e) {
1978
- return new Promise(function(n, o) {
1979
- const s = resolveConfig(e);
1980
- let r = s.data;
1981
- const l = AxiosHeaders$1.from(s.headers).normalize();
1982
- let { responseType: i, onUploadProgress: u, onDownloadProgress: c } = s, a, f, d, p, m;
1983
- function y() {
1984
- p && p(), m && m(), s.cancelToken && s.cancelToken.unsubscribe(a), s.signal && s.signal.removeEventListener("abort", a);
1886
+ return new Promise(function(o, n) {
1887
+ const r = resolveConfig(e);
1888
+ let s = r.data;
1889
+ const l = AxiosHeaders$1.from(r.headers).normalize();
1890
+ let { responseType: i, onUploadProgress: u, onDownloadProgress: c } = r, a, d, f, m, p;
1891
+ function g() {
1892
+ m && m(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(a), r.signal && r.signal.removeEventListener("abort", a);
1985
1893
  }
1986
- let h = new XMLHttpRequest();
1987
- h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1988
- function w() {
1989
- if (!h)
1894
+ let y = new XMLHttpRequest();
1895
+ y.open(r.method.toUpperCase(), r.url, !0), y.timeout = r.timeout;
1896
+ function x() {
1897
+ if (!y)
1990
1898
  return;
1991
- const g = AxiosHeaders$1.from(
1992
- "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1899
+ const E = AxiosHeaders$1.from(
1900
+ "getAllResponseHeaders" in y && y.getAllResponseHeaders()
1993
1901
  ), _ = {
1994
- data: !i || i === "text" || i === "json" ? h.responseText : h.response,
1995
- status: h.status,
1996
- statusText: h.statusText,
1997
- headers: g,
1902
+ data: !i || i === "text" || i === "json" ? y.responseText : y.response,
1903
+ status: y.status,
1904
+ statusText: y.statusText,
1905
+ headers: E,
1998
1906
  config: e,
1999
- request: h
1907
+ request: y
2000
1908
  };
2001
- settle(function(S) {
2002
- n(S), y();
2003
- }, function(S) {
2004
- o(S), y();
2005
- }, _), h = null;
1909
+ settle(function(B) {
1910
+ o(B), g();
1911
+ }, function(B) {
1912
+ n(B), g();
1913
+ }, _), y = null;
2006
1914
  }
2007
- "onloadend" in h ? h.onloadend = w : h.onreadystatechange = function() {
2008
- !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(w);
2009
- }, h.onabort = function() {
2010
- h && (o(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, e, h)), h = null);
2011
- }, h.onerror = function() {
2012
- o(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, e, h)), h = null;
2013
- }, h.ontimeout = function() {
2014
- let k = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
2015
- const _ = s.transitional || transitionalDefaults;
2016
- s.timeoutErrorMessage && (k = s.timeoutErrorMessage), o(new AxiosError$1(
2017
- k,
1915
+ "onloadend" in y ? y.onloadend = x : y.onreadystatechange = function() {
1916
+ !y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(x);
1917
+ }, y.onabort = function() {
1918
+ y && (n(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, e, y)), y = null);
1919
+ }, y.onerror = function() {
1920
+ n(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, e, y)), y = null;
1921
+ }, y.ontimeout = function() {
1922
+ let C = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
1923
+ const _ = r.transitional || transitionalDefaults;
1924
+ r.timeoutErrorMessage && (C = r.timeoutErrorMessage), n(new AxiosError$1(
1925
+ C,
2018
1926
  _.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
2019
1927
  e,
2020
- h
2021
- )), h = null;
2022
- }, r === void 0 && l.setContentType(null), "setRequestHeader" in h && utils$1.forEach(l.toJSON(), function(k, _) {
2023
- h.setRequestHeader(_, k);
2024
- }), utils$1.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), i && i !== "json" && (h.responseType = s.responseType), c && ([d, m] = progressEventReducer(c, !0), h.addEventListener("progress", d)), u && h.upload && ([f, p] = progressEventReducer(u), h.upload.addEventListener("progress", f), h.upload.addEventListener("loadend", p)), (s.cancelToken || s.signal) && (a = (g) => {
2025
- h && (o(!g || g.type ? new CanceledError$1(null, e, h) : g), h.abort(), h = null);
2026
- }, s.cancelToken && s.cancelToken.subscribe(a), s.signal && (s.signal.aborted ? a() : s.signal.addEventListener("abort", a)));
2027
- const x = parseProtocol(s.url);
2028
- if (x && platform.protocols.indexOf(x) === -1) {
2029
- o(new AxiosError$1("Unsupported protocol " + x + ":", AxiosError$1.ERR_BAD_REQUEST, e));
1928
+ y
1929
+ )), y = null;
1930
+ }, s === void 0 && l.setContentType(null), "setRequestHeader" in y && utils$1.forEach(l.toJSON(), function(C, _) {
1931
+ y.setRequestHeader(_, C);
1932
+ }), utils$1.isUndefined(r.withCredentials) || (y.withCredentials = !!r.withCredentials), i && i !== "json" && (y.responseType = r.responseType), c && ([f, p] = progressEventReducer(c, !0), y.addEventListener("progress", f)), u && y.upload && ([d, m] = progressEventReducer(u), y.upload.addEventListener("progress", d), y.upload.addEventListener("loadend", m)), (r.cancelToken || r.signal) && (a = (E) => {
1933
+ y && (n(!E || E.type ? new CanceledError$1(null, e, y) : E), y.abort(), y = null);
1934
+ }, r.cancelToken && r.cancelToken.subscribe(a), r.signal && (r.signal.aborted ? a() : r.signal.addEventListener("abort", a)));
1935
+ const w = parseProtocol(r.url);
1936
+ if (w && platform.protocols.indexOf(w) === -1) {
1937
+ n(new AxiosError$1("Unsupported protocol " + w + ":", AxiosError$1.ERR_BAD_REQUEST, e));
2030
1938
  return;
2031
1939
  }
2032
- h.send(r || null);
1940
+ y.send(s || null);
2033
1941
  });
2034
1942
  }, composeSignals = (e, t) => {
2035
- const { length: n } = e = e ? e.filter(Boolean) : [];
2036
- if (t || n) {
2037
- let o = new AbortController(), s;
2038
- const r = function(c) {
2039
- if (!s) {
2040
- s = !0, i();
1943
+ const { length: o } = e = e ? e.filter(Boolean) : [];
1944
+ if (t || o) {
1945
+ let n = new AbortController(), r;
1946
+ const s = function(c) {
1947
+ if (!r) {
1948
+ r = !0, i();
2041
1949
  const a = c instanceof Error ? c : this.reason;
2042
- o.abort(a instanceof AxiosError$1 ? a : new CanceledError$1(a instanceof Error ? a.message : a));
1950
+ n.abort(a instanceof AxiosError$1 ? a : new CanceledError$1(a instanceof Error ? a.message : a));
2043
1951
  }
2044
1952
  };
2045
1953
  let l = t && setTimeout(() => {
2046
- l = null, r(new AxiosError$1(`timeout ${t} of ms exceeded`, AxiosError$1.ETIMEDOUT));
1954
+ l = null, s(new AxiosError$1(`timeout ${t} of ms exceeded`, AxiosError$1.ETIMEDOUT));
2047
1955
  }, t);
2048
1956
  const i = () => {
2049
1957
  e && (l && clearTimeout(l), l = null, e.forEach((c) => {
2050
- c.unsubscribe ? c.unsubscribe(r) : c.removeEventListener("abort", r);
1958
+ c.unsubscribe ? c.unsubscribe(s) : c.removeEventListener("abort", s);
2051
1959
  }), e = null);
2052
1960
  };
2053
- e.forEach((c) => c.addEventListener("abort", r));
2054
- const { signal: u } = o;
1961
+ e.forEach((c) => c.addEventListener("abort", s));
1962
+ const { signal: u } = n;
2055
1963
  return u.unsubscribe = () => utils$1.asap(i), u;
2056
1964
  }
2057
1965
  }, streamChunk = function* (e, t) {
2058
- let n = e.byteLength;
2059
- if (n < t) {
1966
+ let o = e.byteLength;
1967
+ if (o < t) {
2060
1968
  yield e;
2061
1969
  return;
2062
1970
  }
2063
- let o = 0, s;
2064
- for (; o < n; )
2065
- s = o + t, yield e.slice(o, s), o = s;
1971
+ let n = 0, r;
1972
+ for (; n < o; )
1973
+ r = n + t, yield e.slice(n, r), n = r;
2066
1974
  }, readBytes = async function* (e, t) {
2067
- for await (const n of readStream(e))
2068
- yield* streamChunk(n, t);
1975
+ for await (const o of readStream(e))
1976
+ yield* streamChunk(o, t);
2069
1977
  }, readStream = async function* (e) {
2070
1978
  if (e[Symbol.asyncIterator]) {
2071
1979
  yield* e;
@@ -2074,31 +1982,31 @@ const resolveConfig = (e) => {
2074
1982
  const t = e.getReader();
2075
1983
  try {
2076
1984
  for (; ; ) {
2077
- const { done: n, value: o } = await t.read();
2078
- if (n)
1985
+ const { done: o, value: n } = await t.read();
1986
+ if (o)
2079
1987
  break;
2080
- yield o;
1988
+ yield n;
2081
1989
  }
2082
1990
  } finally {
2083
1991
  await t.cancel();
2084
1992
  }
2085
- }, trackStream = (e, t, n, o) => {
2086
- const s = readBytes(e, t);
2087
- let r = 0, l, i = (u) => {
2088
- l || (l = !0, o && o(u));
1993
+ }, trackStream = (e, t, o, n) => {
1994
+ const r = readBytes(e, t);
1995
+ let s = 0, l, i = (u) => {
1996
+ l || (l = !0, n && n(u));
2089
1997
  };
2090
1998
  return new ReadableStream({
2091
1999
  async pull(u) {
2092
2000
  try {
2093
- const { done: c, value: a } = await s.next();
2001
+ const { done: c, value: a } = await r.next();
2094
2002
  if (c) {
2095
2003
  i(), u.close();
2096
2004
  return;
2097
2005
  }
2098
- let f = a.byteLength;
2099
- if (n) {
2100
- let d = r += f;
2101
- n(d);
2006
+ let d = a.byteLength;
2007
+ if (o) {
2008
+ let f = s += d;
2009
+ o(f);
2102
2010
  }
2103
2011
  u.enqueue(new Uint8Array(a));
2104
2012
  } catch (c) {
@@ -2106,7 +2014,7 @@ const resolveConfig = (e) => {
2106
2014
  }
2107
2015
  },
2108
2016
  cancel(u) {
2109
- return i(u), s.return();
2017
+ return i(u), r.return();
2110
2018
  }
2111
2019
  }, {
2112
2020
  highWaterMark: 2
@@ -2132,8 +2040,8 @@ const resolveConfig = (e) => {
2132
2040
  };
2133
2041
  isFetchSupported && ((e) => {
2134
2042
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
2135
- !resolvers[t] && (resolvers[t] = utils$1.isFunction(e[t]) ? (n) => n[t]() : (n, o) => {
2136
- throw new AxiosError$1(`Response type '${t}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, o);
2043
+ !resolvers[t] && (resolvers[t] = utils$1.isFunction(e[t]) ? (o) => o[t]() : (o, n) => {
2044
+ throw new AxiosError$1(`Response type '${t}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, n);
2137
2045
  });
2138
2046
  });
2139
2047
  })(new Response());
@@ -2152,92 +2060,92 @@ const getBodyLength = async (e) => {
2152
2060
  if (utils$1.isURLSearchParams(e) && (e = e + ""), utils$1.isString(e))
2153
2061
  return (await encodeText(e)).byteLength;
2154
2062
  }, resolveBodyLength = async (e, t) => {
2155
- const n = utils$1.toFiniteNumber(e.getContentLength());
2156
- return n ?? getBodyLength(t);
2063
+ const o = utils$1.toFiniteNumber(e.getContentLength());
2064
+ return o ?? getBodyLength(t);
2157
2065
  }, fetchAdapter = isFetchSupported && (async (e) => {
2158
2066
  let {
2159
2067
  url: t,
2160
- method: n,
2161
- data: o,
2162
- signal: s,
2163
- cancelToken: r,
2068
+ method: o,
2069
+ data: n,
2070
+ signal: r,
2071
+ cancelToken: s,
2164
2072
  timeout: l,
2165
2073
  onDownloadProgress: i,
2166
2074
  onUploadProgress: u,
2167
2075
  responseType: c,
2168
2076
  headers: a,
2169
- withCredentials: f = "same-origin",
2170
- fetchOptions: d
2077
+ withCredentials: d = "same-origin",
2078
+ fetchOptions: f
2171
2079
  } = resolveConfig(e);
2172
2080
  c = c ? (c + "").toLowerCase() : "text";
2173
- let p = composeSignals([s, r && r.toAbortSignal()], l), m;
2174
- const y = p && p.unsubscribe && (() => {
2175
- p.unsubscribe();
2081
+ let m = composeSignals([r, s && s.toAbortSignal()], l), p;
2082
+ const g = m && m.unsubscribe && (() => {
2083
+ m.unsubscribe();
2176
2084
  });
2177
- let h;
2085
+ let y;
2178
2086
  try {
2179
- if (u && supportsRequestStream && n !== "get" && n !== "head" && (h = await resolveBodyLength(a, o)) !== 0) {
2087
+ if (u && supportsRequestStream && o !== "get" && o !== "head" && (y = await resolveBodyLength(a, n)) !== 0) {
2180
2088
  let _ = new Request(t, {
2181
2089
  method: "POST",
2182
- body: o,
2090
+ body: n,
2183
2091
  duplex: "half"
2184
- }), E;
2185
- if (utils$1.isFormData(o) && (E = _.headers.get("content-type")) && a.setContentType(E), _.body) {
2186
- const [S, C] = progressEventDecorator(
2187
- h,
2092
+ }), S;
2093
+ if (utils$1.isFormData(n) && (S = _.headers.get("content-type")) && a.setContentType(S), _.body) {
2094
+ const [B, V] = progressEventDecorator(
2095
+ y,
2188
2096
  progressEventReducer(asyncDecorator(u))
2189
2097
  );
2190
- o = trackStream(_.body, DEFAULT_CHUNK_SIZE, S, C);
2098
+ n = trackStream(_.body, DEFAULT_CHUNK_SIZE, B, V);
2191
2099
  }
2192
2100
  }
2193
- utils$1.isString(f) || (f = f ? "include" : "omit");
2194
- const w = "credentials" in Request.prototype;
2195
- m = new Request(t, {
2196
- ...d,
2197
- signal: p,
2198
- method: n.toUpperCase(),
2101
+ utils$1.isString(d) || (d = d ? "include" : "omit");
2102
+ const x = "credentials" in Request.prototype;
2103
+ p = new Request(t, {
2104
+ ...f,
2105
+ signal: m,
2106
+ method: o.toUpperCase(),
2199
2107
  headers: a.normalize().toJSON(),
2200
- body: o,
2108
+ body: n,
2201
2109
  duplex: "half",
2202
- credentials: w ? f : void 0
2110
+ credentials: x ? d : void 0
2203
2111
  });
2204
- let x = await fetch(m, d);
2205
- const g = supportsResponseStream && (c === "stream" || c === "response");
2206
- if (supportsResponseStream && (i || g && y)) {
2112
+ let w = await fetch(p, f);
2113
+ const E = supportsResponseStream && (c === "stream" || c === "response");
2114
+ if (supportsResponseStream && (i || E && g)) {
2207
2115
  const _ = {};
2208
- ["status", "statusText", "headers"].forEach((b) => {
2209
- _[b] = x[b];
2116
+ ["status", "statusText", "headers"].forEach((A) => {
2117
+ _[A] = w[A];
2210
2118
  });
2211
- const E = utils$1.toFiniteNumber(x.headers.get("content-length")), [S, C] = i && progressEventDecorator(
2212
- E,
2119
+ const S = utils$1.toFiniteNumber(w.headers.get("content-length")), [B, V] = i && progressEventDecorator(
2120
+ S,
2213
2121
  progressEventReducer(asyncDecorator(i), !0)
2214
2122
  ) || [];
2215
- x = new Response(
2216
- trackStream(x.body, DEFAULT_CHUNK_SIZE, S, () => {
2217
- C && C(), y && y();
2123
+ w = new Response(
2124
+ trackStream(w.body, DEFAULT_CHUNK_SIZE, B, () => {
2125
+ V && V(), g && g();
2218
2126
  }),
2219
2127
  _
2220
2128
  );
2221
2129
  }
2222
2130
  c = c || "text";
2223
- let k = await resolvers[utils$1.findKey(resolvers, c) || "text"](x, e);
2224
- return !g && y && y(), await new Promise((_, E) => {
2225
- settle(_, E, {
2226
- data: k,
2227
- headers: AxiosHeaders$1.from(x.headers),
2228
- status: x.status,
2229
- statusText: x.statusText,
2131
+ let C = await resolvers[utils$1.findKey(resolvers, c) || "text"](w, e);
2132
+ return !E && g && g(), await new Promise((_, S) => {
2133
+ settle(_, S, {
2134
+ data: C,
2135
+ headers: AxiosHeaders$1.from(w.headers),
2136
+ status: w.status,
2137
+ statusText: w.statusText,
2230
2138
  config: e,
2231
- request: m
2139
+ request: p
2232
2140
  });
2233
2141
  });
2234
- } catch (w) {
2235
- throw y && y(), w && w.name === "TypeError" && /Load failed|fetch/i.test(w.message) ? Object.assign(
2236
- new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, e, m),
2142
+ } catch (x) {
2143
+ throw g && g(), x && x.name === "TypeError" && /Load failed|fetch/i.test(x.message) ? Object.assign(
2144
+ new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, e, p),
2237
2145
  {
2238
- cause: w.cause || w
2146
+ cause: x.cause || x
2239
2147
  }
2240
- ) : AxiosError$1.from(w, w && w.code, e, m);
2148
+ ) : AxiosError$1.from(x, x && x.code, e, p);
2241
2149
  }
2242
2150
  }), knownAdapters = {
2243
2151
  http: httpAdapter,
@@ -2257,30 +2165,30 @@ const renderReason = (e) => `- ${e}`, isResolvedHandle = (e) => utils$1.isFuncti
2257
2165
  getAdapter: (e) => {
2258
2166
  e = utils$1.isArray(e) ? e : [e];
2259
2167
  const { length: t } = e;
2260
- let n, o;
2261
- const s = {};
2262
- for (let r = 0; r < t; r++) {
2263
- n = e[r];
2168
+ let o, n;
2169
+ const r = {};
2170
+ for (let s = 0; s < t; s++) {
2171
+ o = e[s];
2264
2172
  let l;
2265
- if (o = n, !isResolvedHandle(n) && (o = knownAdapters[(l = String(n)).toLowerCase()], o === void 0))
2173
+ if (n = o, !isResolvedHandle(o) && (n = knownAdapters[(l = String(o)).toLowerCase()], n === void 0))
2266
2174
  throw new AxiosError$1(`Unknown adapter '${l}'`);
2267
- if (o)
2175
+ if (n)
2268
2176
  break;
2269
- s[l || "#" + r] = o;
2177
+ r[l || "#" + s] = n;
2270
2178
  }
2271
- if (!o) {
2272
- const r = Object.entries(s).map(
2179
+ if (!n) {
2180
+ const s = Object.entries(r).map(
2273
2181
  ([i, u]) => `adapter ${i} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
2274
2182
  );
2275
- let l = t ? r.length > 1 ? `since :
2276
- ` + r.map(renderReason).join(`
2277
- `) : " " + renderReason(r[0]) : "as no adapter specified";
2183
+ let l = t ? s.length > 1 ? `since :
2184
+ ` + s.map(renderReason).join(`
2185
+ `) : " " + renderReason(s[0]) : "as no adapter specified";
2278
2186
  throw new AxiosError$1(
2279
2187
  "There is no suitable adapter to dispatch the request " + l,
2280
2188
  "ERR_NOT_SUPPORT"
2281
2189
  );
2282
2190
  }
2283
- return o;
2191
+ return n;
2284
2192
  },
2285
2193
  adapters: knownAdapters
2286
2194
  };
@@ -2292,63 +2200,63 @@ function dispatchRequest(e) {
2292
2200
  return throwIfCancellationRequested(e), e.headers = AxiosHeaders$1.from(e.headers), e.data = transformData.call(
2293
2201
  e,
2294
2202
  e.transformRequest
2295
- ), ["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(o) {
2296
- return throwIfCancellationRequested(e), o.data = transformData.call(
2203
+ ), ["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(n) {
2204
+ return throwIfCancellationRequested(e), n.data = transformData.call(
2297
2205
  e,
2298
2206
  e.transformResponse,
2299
- o
2300
- ), o.headers = AxiosHeaders$1.from(o.headers), o;
2301
- }, function(o) {
2302
- return isCancel$1(o) || (throwIfCancellationRequested(e), o && o.response && (o.response.data = transformData.call(
2207
+ n
2208
+ ), n.headers = AxiosHeaders$1.from(n.headers), n;
2209
+ }, function(n) {
2210
+ return isCancel$1(n) || (throwIfCancellationRequested(e), n && n.response && (n.response.data = transformData.call(
2303
2211
  e,
2304
2212
  e.transformResponse,
2305
- o.response
2306
- ), o.response.headers = AxiosHeaders$1.from(o.response.headers))), Promise.reject(o);
2213
+ n.response
2214
+ ), n.response.headers = AxiosHeaders$1.from(n.response.headers))), Promise.reject(n);
2307
2215
  });
2308
2216
  }
2309
2217
  const VERSION$1 = "1.11.0", validators$1 = {};
2310
2218
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
2311
- validators$1[e] = function(o) {
2312
- return typeof o === e || "a" + (t < 1 ? "n " : " ") + e;
2219
+ validators$1[e] = function(n) {
2220
+ return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
2313
2221
  };
2314
2222
  });
2315
2223
  const deprecatedWarnings = {};
2316
- validators$1.transitional = function(t, n, o) {
2317
- function s(r, l) {
2318
- return "[Axios v" + VERSION$1 + "] Transitional option '" + r + "'" + l + (o ? ". " + o : "");
2224
+ validators$1.transitional = function(t, o, n) {
2225
+ function r(s, l) {
2226
+ return "[Axios v" + VERSION$1 + "] Transitional option '" + s + "'" + l + (n ? ". " + n : "");
2319
2227
  }
2320
- return (r, l, i) => {
2228
+ return (s, l, i) => {
2321
2229
  if (t === !1)
2322
2230
  throw new AxiosError$1(
2323
- s(l, " has been removed" + (n ? " in " + n : "")),
2231
+ r(l, " has been removed" + (o ? " in " + o : "")),
2324
2232
  AxiosError$1.ERR_DEPRECATED
2325
2233
  );
2326
- return n && !deprecatedWarnings[l] && (deprecatedWarnings[l] = !0, console.warn(
2327
- s(
2234
+ return o && !deprecatedWarnings[l] && (deprecatedWarnings[l] = !0, console.warn(
2235
+ r(
2328
2236
  l,
2329
- " has been deprecated since v" + n + " and will be removed in the near future"
2237
+ " has been deprecated since v" + o + " and will be removed in the near future"
2330
2238
  )
2331
- )), t ? t(r, l, i) : !0;
2239
+ )), t ? t(s, l, i) : !0;
2332
2240
  };
2333
2241
  };
2334
2242
  validators$1.spelling = function(t) {
2335
- return (n, o) => (console.warn(`${o} is likely a misspelling of ${t}`), !0);
2243
+ return (o, n) => (console.warn(`${n} is likely a misspelling of ${t}`), !0);
2336
2244
  };
2337
- function assertOptions(e, t, n) {
2245
+ function assertOptions(e, t, o) {
2338
2246
  if (typeof e != "object")
2339
2247
  throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
2340
- const o = Object.keys(e);
2341
- let s = o.length;
2342
- for (; s-- > 0; ) {
2343
- const r = o[s], l = t[r];
2248
+ const n = Object.keys(e);
2249
+ let r = n.length;
2250
+ for (; r-- > 0; ) {
2251
+ const s = n[r], l = t[s];
2344
2252
  if (l) {
2345
- const i = e[r], u = i === void 0 || l(i, r, e);
2253
+ const i = e[s], u = i === void 0 || l(i, s, e);
2346
2254
  if (u !== !0)
2347
- throw new AxiosError$1("option " + r + " must be " + u, AxiosError$1.ERR_BAD_OPTION_VALUE);
2255
+ throw new AxiosError$1("option " + s + " must be " + u, AxiosError$1.ERR_BAD_OPTION_VALUE);
2348
2256
  continue;
2349
2257
  }
2350
- if (n !== !0)
2351
- throw new AxiosError$1("Unknown option " + r, AxiosError$1.ERR_BAD_OPTION);
2258
+ if (o !== !0)
2259
+ throw new AxiosError$1("Unknown option " + s, AxiosError$1.ERR_BAD_OPTION);
2352
2260
  }
2353
2261
  }
2354
2262
  const validator = {
@@ -2370,140 +2278,140 @@ let Axios$1 = class {
2370
2278
  *
2371
2279
  * @returns {Promise} The Promise to be fulfilled
2372
2280
  */
2373
- async request(t, n) {
2281
+ async request(t, o) {
2374
2282
  try {
2375
- return await this._request(t, n);
2376
- } catch (o) {
2377
- if (o instanceof Error) {
2378
- let s = {};
2379
- Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
2380
- const r = s.stack ? s.stack.replace(/^.+\n/, "") : "";
2283
+ return await this._request(t, o);
2284
+ } catch (n) {
2285
+ if (n instanceof Error) {
2286
+ let r = {};
2287
+ Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
2288
+ const s = r.stack ? r.stack.replace(/^.+\n/, "") : "";
2381
2289
  try {
2382
- o.stack ? r && !String(o.stack).endsWith(r.replace(/^.+\n.+\n/, "")) && (o.stack += `
2383
- ` + r) : o.stack = r;
2290
+ n.stack ? s && !String(n.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (n.stack += `
2291
+ ` + s) : n.stack = s;
2384
2292
  } catch {
2385
2293
  }
2386
2294
  }
2387
- throw o;
2295
+ throw n;
2388
2296
  }
2389
2297
  }
2390
- _request(t, n) {
2391
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = mergeConfig$1(this.defaults, n);
2392
- const { transitional: o, paramsSerializer: s, headers: r } = n;
2393
- o !== void 0 && validator.assertOptions(o, {
2298
+ _request(t, o) {
2299
+ typeof t == "string" ? (o = o || {}, o.url = t) : o = t || {}, o = mergeConfig$1(this.defaults, o);
2300
+ const { transitional: n, paramsSerializer: r, headers: s } = o;
2301
+ n !== void 0 && validator.assertOptions(n, {
2394
2302
  silentJSONParsing: validators.transitional(validators.boolean),
2395
2303
  forcedJSONParsing: validators.transitional(validators.boolean),
2396
2304
  clarifyTimeoutError: validators.transitional(validators.boolean)
2397
- }, !1), s != null && (utils$1.isFunction(s) ? n.paramsSerializer = {
2398
- serialize: s
2399
- } : validator.assertOptions(s, {
2305
+ }, !1), r != null && (utils$1.isFunction(r) ? o.paramsSerializer = {
2306
+ serialize: r
2307
+ } : validator.assertOptions(r, {
2400
2308
  encode: validators.function,
2401
2309
  serialize: validators.function
2402
- }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), validator.assertOptions(n, {
2310
+ }, !0)), o.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? o.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : o.allowAbsoluteUrls = !0), validator.assertOptions(o, {
2403
2311
  baseUrl: validators.spelling("baseURL"),
2404
2312
  withXsrfToken: validators.spelling("withXSRFToken")
2405
- }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
2406
- let l = r && utils$1.merge(
2407
- r.common,
2408
- r[n.method]
2313
+ }, !0), o.method = (o.method || this.defaults.method || "get").toLowerCase();
2314
+ let l = s && utils$1.merge(
2315
+ s.common,
2316
+ s[o.method]
2409
2317
  );
2410
- r && utils$1.forEach(
2318
+ s && utils$1.forEach(
2411
2319
  ["delete", "get", "head", "post", "put", "patch", "common"],
2412
- (m) => {
2413
- delete r[m];
2320
+ (p) => {
2321
+ delete s[p];
2414
2322
  }
2415
- ), n.headers = AxiosHeaders$1.concat(l, r);
2323
+ ), o.headers = AxiosHeaders$1.concat(l, s);
2416
2324
  const i = [];
2417
2325
  let u = !0;
2418
- this.interceptors.request.forEach(function(y) {
2419
- typeof y.runWhen == "function" && y.runWhen(n) === !1 || (u = u && y.synchronous, i.unshift(y.fulfilled, y.rejected));
2326
+ this.interceptors.request.forEach(function(g) {
2327
+ typeof g.runWhen == "function" && g.runWhen(o) === !1 || (u = u && g.synchronous, i.unshift(g.fulfilled, g.rejected));
2420
2328
  });
2421
2329
  const c = [];
2422
- this.interceptors.response.forEach(function(y) {
2423
- c.push(y.fulfilled, y.rejected);
2330
+ this.interceptors.response.forEach(function(g) {
2331
+ c.push(g.fulfilled, g.rejected);
2424
2332
  });
2425
- let a, f = 0, d;
2333
+ let a, d = 0, f;
2426
2334
  if (!u) {
2427
- const m = [dispatchRequest.bind(this), void 0];
2428
- for (m.unshift(...i), m.push(...c), d = m.length, a = Promise.resolve(n); f < d; )
2429
- a = a.then(m[f++], m[f++]);
2335
+ const p = [dispatchRequest.bind(this), void 0];
2336
+ for (p.unshift(...i), p.push(...c), f = p.length, a = Promise.resolve(o); d < f; )
2337
+ a = a.then(p[d++], p[d++]);
2430
2338
  return a;
2431
2339
  }
2432
- d = i.length;
2433
- let p = n;
2434
- for (f = 0; f < d; ) {
2435
- const m = i[f++], y = i[f++];
2340
+ f = i.length;
2341
+ let m = o;
2342
+ for (d = 0; d < f; ) {
2343
+ const p = i[d++], g = i[d++];
2436
2344
  try {
2437
- p = m(p);
2438
- } catch (h) {
2439
- y.call(this, h);
2345
+ m = p(m);
2346
+ } catch (y) {
2347
+ g.call(this, y);
2440
2348
  break;
2441
2349
  }
2442
2350
  }
2443
2351
  try {
2444
- a = dispatchRequest.call(this, p);
2445
- } catch (m) {
2446
- return Promise.reject(m);
2352
+ a = dispatchRequest.call(this, m);
2353
+ } catch (p) {
2354
+ return Promise.reject(p);
2447
2355
  }
2448
- for (f = 0, d = c.length; f < d; )
2449
- a = a.then(c[f++], c[f++]);
2356
+ for (d = 0, f = c.length; d < f; )
2357
+ a = a.then(c[d++], c[d++]);
2450
2358
  return a;
2451
2359
  }
2452
2360
  getUri(t) {
2453
2361
  t = mergeConfig$1(this.defaults, t);
2454
- const n = buildFullPath(t.baseURL, t.url, t.allowAbsoluteUrls);
2455
- return buildURL(n, t.params, t.paramsSerializer);
2362
+ const o = buildFullPath(t.baseURL, t.url, t.allowAbsoluteUrls);
2363
+ return buildURL(o, t.params, t.paramsSerializer);
2456
2364
  }
2457
2365
  };
2458
2366
  utils$1.forEach(["delete", "get", "head", "options"], function(t) {
2459
- Axios$1.prototype[t] = function(n, o) {
2460
- return this.request(mergeConfig$1(o || {}, {
2367
+ Axios$1.prototype[t] = function(o, n) {
2368
+ return this.request(mergeConfig$1(n || {}, {
2461
2369
  method: t,
2462
- url: n,
2463
- data: (o || {}).data
2370
+ url: o,
2371
+ data: (n || {}).data
2464
2372
  }));
2465
2373
  };
2466
2374
  });
2467
2375
  utils$1.forEach(["post", "put", "patch"], function(t) {
2468
- function n(o) {
2469
- return function(r, l, i) {
2376
+ function o(n) {
2377
+ return function(s, l, i) {
2470
2378
  return this.request(mergeConfig$1(i || {}, {
2471
2379
  method: t,
2472
- headers: o ? {
2380
+ headers: n ? {
2473
2381
  "Content-Type": "multipart/form-data"
2474
2382
  } : {},
2475
- url: r,
2383
+ url: s,
2476
2384
  data: l
2477
2385
  }));
2478
2386
  };
2479
2387
  }
2480
- Axios$1.prototype[t] = n(), Axios$1.prototype[t + "Form"] = n(!0);
2388
+ Axios$1.prototype[t] = o(), Axios$1.prototype[t + "Form"] = o(!0);
2481
2389
  });
2482
- let CancelToken$1 = class A {
2390
+ let CancelToken$1 = class M {
2483
2391
  constructor(t) {
2484
2392
  if (typeof t != "function")
2485
2393
  throw new TypeError("executor must be a function.");
2486
- let n;
2487
- this.promise = new Promise(function(r) {
2488
- n = r;
2394
+ let o;
2395
+ this.promise = new Promise(function(s) {
2396
+ o = s;
2489
2397
  });
2490
- const o = this;
2491
- this.promise.then((s) => {
2492
- if (!o._listeners) return;
2493
- let r = o._listeners.length;
2494
- for (; r-- > 0; )
2495
- o._listeners[r](s);
2496
- o._listeners = null;
2497
- }), this.promise.then = (s) => {
2498
- let r;
2398
+ const n = this;
2399
+ this.promise.then((r) => {
2400
+ if (!n._listeners) return;
2401
+ let s = n._listeners.length;
2402
+ for (; s-- > 0; )
2403
+ n._listeners[s](r);
2404
+ n._listeners = null;
2405
+ }), this.promise.then = (r) => {
2406
+ let s;
2499
2407
  const l = new Promise((i) => {
2500
- o.subscribe(i), r = i;
2501
- }).then(s);
2408
+ n.subscribe(i), s = i;
2409
+ }).then(r);
2502
2410
  return l.cancel = function() {
2503
- o.unsubscribe(r);
2411
+ n.unsubscribe(s);
2504
2412
  }, l;
2505
- }, t(function(r, l, i) {
2506
- o.reason || (o.reason = new CanceledError$1(r, l, i), n(o.reason));
2413
+ }, t(function(s, l, i) {
2414
+ n.reason || (n.reason = new CanceledError$1(s, l, i), o(n.reason));
2507
2415
  });
2508
2416
  }
2509
2417
  /**
@@ -2529,14 +2437,14 @@ let CancelToken$1 = class A {
2529
2437
  unsubscribe(t) {
2530
2438
  if (!this._listeners)
2531
2439
  return;
2532
- const n = this._listeners.indexOf(t);
2533
- n !== -1 && this._listeners.splice(n, 1);
2440
+ const o = this._listeners.indexOf(t);
2441
+ o !== -1 && this._listeners.splice(o, 1);
2534
2442
  }
2535
2443
  toAbortSignal() {
2536
- const t = new AbortController(), n = (o) => {
2537
- t.abort(o);
2444
+ const t = new AbortController(), o = (n) => {
2445
+ t.abort(n);
2538
2446
  };
2539
- return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
2447
+ return this.subscribe(o), t.signal.unsubscribe = () => this.unsubscribe(o), t.signal;
2540
2448
  }
2541
2449
  /**
2542
2450
  * Returns an object that contains a new `CancelToken` and a function that, when called,
@@ -2545,16 +2453,16 @@ let CancelToken$1 = class A {
2545
2453
  static source() {
2546
2454
  let t;
2547
2455
  return {
2548
- token: new A(function(s) {
2549
- t = s;
2456
+ token: new M(function(r) {
2457
+ t = r;
2550
2458
  }),
2551
2459
  cancel: t
2552
2460
  };
2553
2461
  }
2554
2462
  };
2555
2463
  function spread$1(e) {
2556
- return function(n) {
2557
- return e.apply(null, n);
2464
+ return function(o) {
2465
+ return e.apply(null, o);
2558
2466
  };
2559
2467
  }
2560
2468
  function isAxiosError$1(e) {
@@ -2629,10 +2537,10 @@ Object.entries(HttpStatusCode$1).forEach(([e, t]) => {
2629
2537
  HttpStatusCode$1[t] = e;
2630
2538
  });
2631
2539
  function createInstance(e) {
2632
- const t = new Axios$1(e), n = bind(Axios$1.prototype.request, t);
2633
- return utils$1.extend(n, Axios$1.prototype, t, { allOwnKeys: !0 }), utils$1.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
2634
- return createInstance(mergeConfig$1(e, s));
2635
- }, n;
2540
+ const t = new Axios$1(e), o = bind(Axios$1.prototype.request, t);
2541
+ return utils$1.extend(o, Axios$1.prototype, t, { allOwnKeys: !0 }), utils$1.extend(o, t, null, { allOwnKeys: !0 }), o.create = function(r) {
2542
+ return createInstance(mergeConfig$1(e, r));
2543
+ }, o;
2636
2544
  }
2637
2545
  const axios = createInstance(defaults);
2638
2546
  axios.Axios = Axios$1;
@@ -2691,84 +2599,84 @@ const {
2691
2599
  },
2692
2600
  emits: ["update:modelValue"],
2693
2601
  setup(e, { emit: t }) {
2694
- const n = e, o = t, s = ref([]), r = reactive({}), l = (a) => a?.value || a?.id || a?.text || a, i = (a) => a.text || String(a), u = (a) => `lg:col-span-${a || 12}`, c = async () => {
2602
+ const o = e, n = t, r = ref([]), s = reactive({}), l = (a) => a?.value || a?.id || a?.text || a, i = (a) => a.text || String(a), u = (a) => `lg:col-span-${a || 12}`, c = async () => {
2695
2603
  try {
2696
- const { data: a } = await axios.get(`/api/suggest/${n.data}`);
2697
- s.value = a?.data || a;
2604
+ const { data: a } = await axios.get(`/api/suggest/${o.data}`);
2605
+ r.value = a?.data || a;
2698
2606
  } catch (a) {
2699
2607
  console.error(a);
2700
2608
  }
2701
2609
  };
2702
2610
  return watch(
2703
- () => n.modelValue,
2611
+ () => o.modelValue,
2704
2612
  (a) => {
2705
- if (typeof a == "boolean" && s.value.length === 1) {
2706
- const f = l(s.value[0]);
2707
- r[f] = a;
2613
+ if (typeof a == "boolean" && r.value.length === 1) {
2614
+ const d = l(r.value[0]);
2615
+ s[d] = a;
2708
2616
  } else if (Array.isArray(a)) {
2709
- const f = new Set(a);
2710
- s.value.forEach((d) => {
2711
- if (!d.disabled) {
2712
- const p = l(d);
2713
- r[p] = f.has(p);
2617
+ const d = new Set(a);
2618
+ r.value.forEach((f) => {
2619
+ if (!f.disabled) {
2620
+ const m = l(f);
2621
+ s[m] = d.has(m);
2714
2622
  }
2715
2623
  });
2716
2624
  }
2717
2625
  },
2718
2626
  { immediate: !0 }
2719
2627
  ), watch(
2720
- r,
2628
+ s,
2721
2629
  () => {
2722
- if (!s.value.length) {
2723
- o("update:modelValue", null);
2630
+ if (!r.value.length) {
2631
+ n("update:modelValue", null);
2724
2632
  return;
2725
2633
  }
2726
- const a = Object.entries(r).filter(([, f]) => f).map(([f]) => f);
2727
- o("update:modelValue", a.length === 0 ? null : a);
2634
+ const a = Object.entries(s).filter(([, d]) => d).map(([d]) => d);
2635
+ n("update:modelValue", a.length === 0 ? null : a);
2728
2636
  },
2729
2637
  { deep: !0 }
2730
2638
  ), onMounted(() => {
2731
- if (n.data)
2639
+ if (o.data)
2732
2640
  c().then(() => {
2733
- if (typeof n.modelValue == "boolean" && s.value.length === 1) {
2734
- const a = l(s.value[0]);
2735
- r[a] = n.modelValue;
2736
- } else if (Array.isArray(n.modelValue)) {
2737
- const a = new Set(n.modelValue);
2738
- s.value.forEach((f) => {
2739
- if (!f.disabled) {
2740
- const d = l(f);
2741
- r[d] = a.has(d);
2641
+ if (typeof o.modelValue == "boolean" && r.value.length === 1) {
2642
+ const a = l(r.value[0]);
2643
+ s[a] = o.modelValue;
2644
+ } else if (Array.isArray(o.modelValue)) {
2645
+ const a = new Set(o.modelValue);
2646
+ r.value.forEach((d) => {
2647
+ if (!d.disabled) {
2648
+ const f = l(d);
2649
+ s[f] = a.has(f);
2742
2650
  }
2743
2651
  });
2744
2652
  }
2745
2653
  });
2746
- else if (s.value = n.options, typeof n.modelValue == "boolean" && s.value.length === 1) {
2747
- const a = l(s.value[0]);
2748
- r[a] = n.modelValue;
2749
- } else if (Array.isArray(n.modelValue)) {
2750
- const a = new Set(n.modelValue);
2751
- s.value.forEach((f) => {
2752
- if (!f.disabled) {
2753
- const d = l(f);
2754
- r[d] = a.has(d);
2654
+ else if (r.value = o.options, typeof o.modelValue == "boolean" && r.value.length === 1) {
2655
+ const a = l(r.value[0]);
2656
+ s[a] = o.modelValue;
2657
+ } else if (Array.isArray(o.modelValue)) {
2658
+ const a = new Set(o.modelValue);
2659
+ r.value.forEach((d) => {
2660
+ if (!d.disabled) {
2661
+ const f = l(d);
2662
+ s[f] = a.has(f);
2755
2663
  }
2756
2664
  });
2757
2665
  }
2758
- }), (a, f) => (openBlock(), createElementBlock("div", {
2666
+ }), (a, d) => (openBlock(), createElementBlock("div", {
2759
2667
  class: normalizeClass(["p-0 w-full gap-[6px]", [e.position === "vertical" ? "flex-col" : "", e.colSpan ? "grid" : "flex justify-start"]])
2760
2668
  }, [
2761
- (openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (d) => (openBlock(), createBlock(_sfc_main$w, {
2762
- modelValue: r[l(d)],
2763
- "onUpdate:modelValue": (p) => r[l(d)] = p,
2764
- value: l(d),
2669
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(r.value, (f) => (openBlock(), createBlock(_sfc_main$x, {
2670
+ modelValue: s[l(f)],
2671
+ "onUpdate:modelValue": (m) => s[l(f)] = m,
2672
+ value: l(f),
2765
2673
  class: normalizeClass(u(e.colSpan)),
2766
- disabled: d.disabled,
2767
- label: i(d),
2768
- key: l(d),
2769
- icon: d?.icon,
2770
- imgUrl: d?.imgUrl,
2771
- option: d,
2674
+ disabled: f.disabled,
2675
+ label: i(f),
2676
+ key: l(f),
2677
+ icon: f?.icon,
2678
+ imgUrl: f?.imgUrl,
2679
+ option: f,
2772
2680
  slots: e.slots,
2773
2681
  view: e.view
2774
2682
  }, null, 8, ["modelValue", "onUpdate:modelValue", "value", "class", "disabled", "label", "icon", "imgUrl", "option", "slots", "view"]))), 128))
@@ -2799,31 +2707,237 @@ const {
2799
2707
  }),
2800
2708
  emits: ["update:modelValue"],
2801
2709
  setup(e) {
2802
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue");
2803
- return (s, r) => withDirectives((openBlock(), createElementBlock("input", {
2710
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue");
2711
+ return (r, s) => withDirectives((openBlock(), createElementBlock("input", {
2804
2712
  type: "date",
2805
- "onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
2713
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
2806
2714
  placeholder: e.placeholder,
2807
2715
  disabled: e.disabled,
2808
- class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(n)]]),
2716
+ class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f]", [unref(o)]]),
2809
2717
  style: {
2810
2718
  border: "1px solid #CFD9E0"
2811
2719
  }
2812
2720
  }, null, 10, _hoisted_1$g)), [
2813
- [vModelText, o.value]
2721
+ [vModelText, n.value]
2814
2722
  ]);
2815
2723
  }
2816
- }), fileUpload = async (e, t, n, o) => {
2724
+ }), $ = (e, t) => {
2725
+ const o = e.__vccOpts || e;
2726
+ for (const [n, r] of t)
2727
+ o[n] = r;
2728
+ return o;
2729
+ };
2730
+ defineComponent({
2731
+ props: {
2732
+ modelValue: { type: Boolean, default: () => !1 },
2733
+ title: { type: String, default: () => "" },
2734
+ disabled: { type: Boolean, default: () => !1 }
2735
+ },
2736
+ data() {
2737
+ return {};
2738
+ },
2739
+ mounted() {
2740
+ this.modelValue || this.$emit("update:modelValue", !1);
2741
+ },
2742
+ computed: {
2743
+ modelState: {
2744
+ get() {
2745
+ return this.modelValue;
2746
+ },
2747
+ set(e) {
2748
+ this.$emit("update:modelValue", e);
2749
+ }
2750
+ },
2751
+ labelCursorClasses() {
2752
+ return [
2753
+ { "cursor-not-allowed": this.disabled },
2754
+ { "cursor-pointer": !this.disabled }
2755
+ ];
2756
+ }
2757
+ },
2758
+ methods: {
2759
+ handleEnterDown(e) {
2760
+ const { keyCode: t } = e;
2761
+ t === 13 && (this.modelState = !this.modelState);
2762
+ },
2763
+ addKeyHandler() {
2764
+ window.addEventListener("keydown", this.handleEnterDown);
2765
+ },
2766
+ removeKeyHandler() {
2767
+ window.removeEventListener("keydown", this.handleEnterDown);
2768
+ }
2769
+ }
2770
+ });
2771
+ const Vt = {}, zt = {
2772
+ xmlns: "http://www.w3.org/2000/svg",
2773
+ fill: "none",
2774
+ viewBox: "0 0 24 24",
2775
+ "stroke-width": "1.5",
2776
+ stroke: "currentColor",
2777
+ class: "size-6 text-green-600"
2778
+ };
2779
+ function Et(e, t) {
2780
+ return openBlock(), createElementBlock("svg", zt, t[0] || (t[0] = [
2781
+ createElementVNode("path", {
2782
+ "stroke-linecap": "round",
2783
+ "stroke-linejoin": "round",
2784
+ d: "M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
2785
+ }, null, -1)
2786
+ ]));
2787
+ }
2788
+ const Lt = /* @__PURE__ */ $(Vt, [["render", Et]]), jt = {}, Mt = {
2789
+ xmlns: "http://www.w3.org/2000/svg",
2790
+ fill: "none",
2791
+ viewBox: "0 0 24 24",
2792
+ "stroke-width": "1.5",
2793
+ stroke: "orange",
2794
+ class: "size-6 text-orange-600"
2795
+ };
2796
+ function Pt(e, t) {
2797
+ return openBlock(), createElementBlock("svg", Mt, t[0] || (t[0] = [
2798
+ createElementVNode("path", {
2799
+ "stroke-linecap": "round",
2800
+ "stroke-linejoin": "round",
2801
+ d: "M12 9v3m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
2802
+ }, null, -1)
2803
+ ]));
2804
+ }
2805
+ const Tt = /* @__PURE__ */ $(jt, [["render", Pt]]), It = {}, Rt = {
2806
+ xmlns: "http://www.w3.org/2000/svg",
2807
+ fill: "none",
2808
+ viewBox: "0 0 24 24",
2809
+ "stroke-width": "1.5",
2810
+ stroke: "currentColor",
2811
+ class: "size-6 text-blue-600"
2812
+ };
2813
+ function Ot(e, t) {
2814
+ return openBlock(), createElementBlock("svg", Rt, t[0] || (t[0] = [
2815
+ createElementVNode("path", {
2816
+ "stroke-linecap": "round",
2817
+ "stroke-linejoin": "round",
2818
+ d: "m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"
2819
+ }, null, -1)
2820
+ ]));
2821
+ }
2822
+ const Dt = /* @__PURE__ */ $(It, [["render", Ot]]), Ht = {}, Nt = {
2823
+ xmlns: "http://www.w3.org/2000/svg",
2824
+ fill: "none",
2825
+ viewBox: "0 0 24 24",
2826
+ "stroke-width": "1.5",
2827
+ stroke: "red",
2828
+ class: "size-6 text-red-600"
2829
+ };
2830
+ function At(e, t) {
2831
+ return openBlock(), createElementBlock("svg", Nt, t[0] || (t[0] = [
2832
+ createElementVNode("path", {
2833
+ "stroke-linecap": "round",
2834
+ "stroke-linejoin": "round",
2835
+ d: "M6 18L18 6M6 6l12 12"
2836
+ }, null, -1)
2837
+ ]));
2838
+ }
2839
+ const Kt = /* @__PURE__ */ $(Ht, [["render", At]]), qt = { class: "rounded-md border border-gray-300 bg-white p-4 shadow-sm" }, Ut = { class: "flex items-start gap-4 opacity-100 scale-5 transition-all duration-300" }, Wt = { class: "flex-1" }, Gt = { class: "font-medium text-gray-900" }, Zt = { class: "mt-0.5 text-sm text-gray-700" }, le = /* @__PURE__ */ defineComponent({
2840
+ __name: "vs-notify",
2841
+ props: {
2842
+ type: {},
2843
+ title: {},
2844
+ message: {}
2845
+ },
2846
+ setup(e) {
2847
+ const t = {
2848
+ success: Lt,
2849
+ warning: Tt,
2850
+ error: Kt,
2851
+ info: Dt
2852
+ };
2853
+ return (o, n) => (openBlock(), createElementBlock("div", qt, [
2854
+ createElementVNode("div", Ut, [
2855
+ (openBlock(), createBlock(resolveDynamicComponent(t[o.type]))),
2856
+ createElementVNode("div", Wt, [
2857
+ createElementVNode("strong", Gt, toDisplayString(o.title), 1),
2858
+ createElementVNode("p", Zt, toDisplayString(o.message), 1)
2859
+ ]),
2860
+ n[0] || (n[0] = createElementVNode("button", {
2861
+ class: "m-3 rounded-full p-1.5 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700",
2862
+ type: "button",
2863
+ "aria-label": "Dismiss notify"
2864
+ }, [
2865
+ createElementVNode("span", { class: "sr-only" }, "Dismiss popup"),
2866
+ createElementVNode("svg", {
2867
+ xmlns: "http://www.w3.org/2000/svg",
2868
+ fill: "none",
2869
+ viewBox: "0 0 24 24",
2870
+ "stroke-width": "1.5",
2871
+ stroke: "currentColor",
2872
+ class: "size-5"
2873
+ }, [
2874
+ createElementVNode("path", {
2875
+ "stroke-linecap": "round",
2876
+ "stroke-linejoin": "round",
2877
+ d: "M6 18L18 6M6 6l12 12"
2878
+ })
2879
+ ])
2880
+ ], -1))
2881
+ ])
2882
+ ]));
2883
+ }
2884
+ });
2885
+ reactive({ visible: !0 });
2886
+ const H = {
2887
+ top: "top-4 left-1/2 transform -translate-x-1/2",
2888
+ "left-bottom": "bottom-4 left-4 transform",
2889
+ "right-bottom": "bottom-4 right-4 transform",
2890
+ bottom: "bottom-4 left-1/2 transform -translate-x-1/2"
2891
+ }, jo = (e) => {
2892
+ const {
2893
+ type: t = "info",
2894
+ title: o,
2895
+ message: n,
2896
+ position: r = "right-bottom"
2897
+ } = e || {};
2898
+ let s = document.querySelector("#notify-root");
2899
+ s || (s = document.createElement("div"), s.id = "notify-root", s.className = `fixed z-[100] flex flex-col gap-3 ${H[r]} p-6 max-w-md mx-auto font-sans antialiased`, document.body.appendChild(s)), s.className.includes(H[r]) || (Object.values(H).forEach((u) => {
2900
+ s.classList.remove(...u.split(" "));
2901
+ }), s.classList.add(...H[r].split(" ")));
2902
+ const l = document.createElement("div");
2903
+ s.appendChild(l);
2904
+ const i = createApp({
2905
+ render() {
2906
+ return h(le, {
2907
+ type: t,
2908
+ title: o,
2909
+ message: n,
2910
+ onClose: () => {
2911
+ i.unmount(), l.remove();
2912
+ }
2913
+ });
2914
+ }
2915
+ });
2916
+ i.mount(l), l.querySelector("button")?.addEventListener("click", () => {
2917
+ l.classList.add("opacity-0", "scale-95", "transition-all", "duration-300"), setTimeout(() => {
2918
+ i.unmount(), l.remove();
2919
+ }, 350);
2920
+ }), setTimeout(() => {
2921
+ l.classList.add("opacity-0", "scale-95", "transition-all", "duration-300"), setTimeout(() => {
2922
+ i.unmount(), l.remove();
2923
+ }, 350);
2924
+ }, 3500);
2925
+ }, fileUpload = async (e, t, o, n) => {
2817
2926
  try {
2818
- const s = new FormData();
2819
- s.append("unique", "true"), s.append("file", e);
2820
- const { data: r } = await axios.post(
2821
- `/file/upload/uploads?id=${t || ""}&form=${n || ""}&table=${o || ""}`,
2822
- s
2927
+ const r = new FormData();
2928
+ r.append("unique", "true"), r.append("file", e);
2929
+ const { data: s } = await axios.post(
2930
+ `/file/upload/uploads?id=${t || ""}&form=${o || ""}&table=${n || ""}`,
2931
+ r
2823
2932
  );
2824
- return r;
2825
- } catch (s) {
2826
- console.error(s);
2933
+ return s;
2934
+ } catch (r) {
2935
+ jo({
2936
+ type: "error",
2937
+ title: "Помилка!",
2938
+ message: "Сталась помилка під час завантаження файлу",
2939
+ position: "right-bottom"
2940
+ }), console.error("Сталась помилка завантаження файлу", r);
2827
2941
  }
2828
2942
  }, fileDelete = async (e) => {
2829
2943
  try {
@@ -2838,8 +2952,8 @@ const {
2838
2952
  headers: {
2839
2953
  "Content-Type": "application/json"
2840
2954
  }
2841
- }), n = t.headers["content-type"], o = new TextDecoder("utf-8").decode(t.data), s = new Blob([o], { type: n }), r = document.createElement("a");
2842
- r.setAttribute("download", e), r.href = window.URL.createObjectURL(s), r.click();
2955
+ }), o = t.headers["content-type"], n = new TextDecoder("utf-8").decode(t.data), r = new Blob([n], { type: o }), s = document.createElement("a");
2956
+ s.setAttribute("download", e), s.href = window.URL.createObjectURL(r), s.click();
2843
2957
  } catch (t) {
2844
2958
  console.error(t.message);
2845
2959
  }
@@ -2872,7 +2986,7 @@ const IconPlus = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_rende
2872
2986
  "stroke-linecap": "round",
2873
2987
  "stroke-linejoin": "round"
2874
2988
  };
2875
- function _sfc_render$7(e, t, n, o, s, r) {
2989
+ function _sfc_render$7(e, t, o, n, r, s) {
2876
2990
  return openBlock(), createElementBlock("svg", _hoisted_1$e, t[0] || (t[0] = [
2877
2991
  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)
2878
2992
  ]));
@@ -2889,7 +3003,7 @@ const iconPdf = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render
2889
3003
  "stroke-linecap": "round",
2890
3004
  "stroke-linejoin": "round"
2891
3005
  };
2892
- function _sfc_render$6(e, t, n, o, s, r) {
3006
+ function _sfc_render$6(e, t, o, n, r, s) {
2893
3007
  return openBlock(), createElementBlock("svg", _hoisted_1$d, t[0] || (t[0] = [
2894
3008
  createElementVNode("path", {
2895
3009
  stroke: "none",
@@ -2929,7 +3043,7 @@ const IconCsv = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render
2929
3043
  "stroke-linejoin": "round",
2930
3044
  class: "icon icon-tabler icons-tabler-outline icon-tabler-file-unknown"
2931
3045
  };
2932
- function _sfc_render$5(e, t, n, o, s, r) {
3046
+ function _sfc_render$5(e, t, o, n, r, s) {
2933
3047
  return openBlock(), createElementBlock("svg", _hoisted_1$c, t[0] || (t[0] = [
2934
3048
  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)
2935
3049
  ]));
@@ -2946,7 +3060,7 @@ const IconFile = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_rende
2946
3060
  "stroke-linecap": "round",
2947
3061
  "stroke-linejoin": "round"
2948
3062
  };
2949
- function _sfc_render$4(e, t, n, o, s, r) {
3063
+ function _sfc_render$4(e, t, o, n, r, s) {
2950
3064
  return openBlock(), createElementBlock("svg", _hoisted_1$b, t[0] || (t[0] = [
2951
3065
  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)
2952
3066
  ]));
@@ -2963,7 +3077,7 @@ const IconZip = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render
2963
3077
  "stroke-linecap": "round",
2964
3078
  "stroke-linejoin": "round"
2965
3079
  };
2966
- function _sfc_render$3(e, t, n, o, s, r) {
3080
+ function _sfc_render$3(e, t, o, n, r, s) {
2967
3081
  return openBlock(), createElementBlock("svg", _hoisted_1$a, t[0] || (t[0] = [
2968
3082
  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)
2969
3083
  ]));
@@ -2973,14 +3087,14 @@ const IconGeojson = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_re
2973
3087
  const t = e?.split(".");
2974
3088
  return t[t.length - 1];
2975
3089
  }, fileFormatPreview = (e) => {
2976
- const t = getFileType(e), n = {
3090
+ const t = getFileType(e), o = {
2977
3091
  imageFormat: ["tiff", "jpg", "jpeg", "png", "svg", "ico", "webp"],
2978
3092
  sheetsFormat: ["xls", "csv", "xlsx"],
2979
3093
  archivesFormat: ["zip", "rar"],
2980
3094
  textsFormat: ["json", "geojson", "txt", "yml", "yaml", "shp"],
2981
3095
  documentsFormat: ["pdf"]
2982
3096
  };
2983
- 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;
3097
+ return o.imageFormat.includes(t) ? "img" : o.sheetsFormat.includes(t) ? IconCsv : o.textsFormat.includes(t) ? IconGeojson : o.documentsFormat.includes(t) ? iconPdf : o.archivesFormat.includes(t) ? IconZip : IconFile;
2984
3098
  }, _sfc_main$c = {}, _hoisted_1$9 = {
2985
3099
  xmlns: "http://www.w3.org/2000/svg",
2986
3100
  width: "24",
@@ -3034,19 +3148,19 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3034
3148
  }),
3035
3149
  emits: ["update:value", "update:item"],
3036
3150
  setup(e) {
3037
- const t = useModel(e, "value"), n = useModel(e, "item"), o = e;
3038
- return (s, r) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
3039
- (openBlock(), createBlock(resolveDynamicComponent(unref(fileFormatPreview)(n.value)), {
3040
- src: n.value,
3151
+ const t = useModel(e, "value"), o = useModel(e, "item"), n = e;
3152
+ return (r, s) => (openBlock(), createElementBlock("div", _hoisted_1$7, [
3153
+ (openBlock(), createBlock(resolveDynamicComponent(unref(fileFormatPreview)(o.value)), {
3154
+ src: o.value,
3041
3155
  alt: "file",
3042
3156
  class: "w-full h-full object-cover cursor-pointer",
3043
- onClick: r[0] || (r[0] = (l) => unref(fileDownload)(n.value))
3157
+ onClick: s[0] || (s[0] = (l) => unref(fileDownload)(o.value))
3044
3158
  }, null, 8, ["src"])),
3045
3159
  createElementVNode("div", _hoisted_2$4, [
3046
3160
  createElementVNode("button", {
3047
3161
  type: "button",
3048
- onClick: r[1] || (r[1] = (l) => {
3049
- unref(fileDelete)(n.value), t.value = o.multiple ? t.value?.filter((i) => i !== n.value) : "";
3162
+ onClick: s[1] || (s[1] = (l) => {
3163
+ unref(fileDelete)(o.value), t.value = n.multiple ? t.value?.filter((i) => i !== o.value) : "";
3050
3164
  }),
3051
3165
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-red-500"
3052
3166
  }, [
@@ -3054,7 +3168,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3054
3168
  ]),
3055
3169
  createElementVNode("button", {
3056
3170
  type: "button",
3057
- onClick: r[2] || (r[2] = (l) => unref(fileDownload)(n.value)),
3171
+ onClick: s[2] || (s[2] = (l) => unref(fileDownload)(o.value)),
3058
3172
  class: "w-6 h-6 flex items-center justify-center text-gray-500 bg-gray-200 rounded-lg hover:text-blue-500"
3059
3173
  }, [
3060
3174
  createVNode(IconDownload, { class: "w-4 h-4" })
@@ -3077,7 +3191,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3077
3191
  }),
3078
3192
  emits: ["update:modelValue"],
3079
3193
  setup(e) {
3080
- const t = e, n = useModel(e, "modelValue"), o = ref(null), s = (l) => Array.isArray(n.value) && n.value[l] || "", r = async (l) => {
3194
+ const t = e, o = useModel(e, "modelValue"), n = ref(null), r = (l) => Array.isArray(o.value) && o.value[l] || "", s = async (l) => {
3081
3195
  if (t.format) {
3082
3196
  const c = l.target.files?.[0];
3083
3197
  if (!c || !c.name.endsWith(t.format))
@@ -3086,32 +3200,32 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3086
3200
  const i = l.target.files?.[0];
3087
3201
  if (!i) return;
3088
3202
  const u = await fileUpload(i, "1", "form", "table");
3089
- n.value = t.multiple ? [...n.value || [], u.result?.file_path] : u.result?.file_path;
3203
+ o.value = t.multiple ? [...o.value || [], u.result?.file_path] : u.result?.file_path;
3090
3204
  };
3091
3205
  return (l, i) => (openBlock(), createElementBlock("div", _hoisted_1$6, [
3092
3206
  createElementVNode("input", {
3093
3207
  class: "hidden",
3094
3208
  ref_key: "fileInput",
3095
- ref: o,
3209
+ ref: n,
3096
3210
  type: "file",
3097
- onChange: r
3211
+ onChange: s
3098
3212
  }, null, 544),
3099
- !l.multiple && n.value ? (openBlock(), createBlock(VsInputFileListItem, {
3213
+ !l.multiple && o.value ? (openBlock(), createBlock(VsInputFileListItem, {
3100
3214
  key: 0,
3101
- item: n.value,
3102
- "onUpdate:item": i[0] || (i[0] = (u) => n.value = u),
3103
- value: n.value,
3104
- "onUpdate:value": i[1] || (i[1] = (u) => n.value = u)
3215
+ item: o.value,
3216
+ "onUpdate:item": i[0] || (i[0] = (u) => o.value = u),
3217
+ value: o.value,
3218
+ "onUpdate:value": i[1] || (i[1] = (u) => o.value = u)
3105
3219
  }, null, 8, ["item", "value"])) : l.multiple ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
3106
- (openBlock(!0), createElementBlock(Fragment, null, renderList(n.value, (u, c) => (openBlock(), createBlock(VsInputFileListItem, {
3220
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (u, c) => (openBlock(), createBlock(VsInputFileListItem, {
3107
3221
  multiple: l.multiple,
3108
3222
  key: c,
3109
- value: n.value,
3110
- "onUpdate:value": i[2] || (i[2] = (a) => n.value = a),
3111
- item: s(c)
3223
+ value: o.value,
3224
+ "onUpdate:value": i[2] || (i[2] = (a) => o.value = a),
3225
+ item: r(c)
3112
3226
  }, null, 8, ["multiple", "value", "item"]))), 128)),
3113
3227
  createElementVNode("div", {
3114
- onClick: i[3] || (i[3] = (u) => !l.disabled && o.value?.click()),
3228
+ onClick: i[3] || (i[3] = (u) => !l.disabled && n.value?.click()),
3115
3229
  class: normalizeClass([
3116
3230
  "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",
3117
3231
  l.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer hover:border-blue-500 hover:bg-blue-50"
@@ -3122,7 +3236,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3122
3236
  ])) : createCommentVNode("", !0),
3123
3237
  l.multiple ? createCommentVNode("", !0) : (openBlock(), createElementBlock("div", {
3124
3238
  key: 2,
3125
- onClick: i[4] || (i[4] = (u) => o.value?.click()),
3239
+ onClick: i[4] || (i[4] = (u) => n.value?.click()),
3126
3240
  class: 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"])
3127
3241
  }, [
3128
3242
  createVNode(IconPlus, { class: "w-6 h-6" })
@@ -3146,27 +3260,27 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3146
3260
  }
3147
3261
  },
3148
3262
  setup(e) {
3149
- const t = e, n = ref(t.isOpen);
3263
+ const t = e, o = ref(t.isOpen);
3150
3264
  return watch(
3151
3265
  () => t.isOpen,
3152
- (o) => {
3153
- n.value = o;
3266
+ (n) => {
3267
+ o.value = n;
3154
3268
  }
3155
- ), (o, s) => (openBlock(), createElementBlock("div", null, [
3269
+ ), (n, r) => (openBlock(), createElementBlock("div", null, [
3156
3270
  createElementVNode("div", _hoisted_1$5, [
3157
3271
  createElementVNode("p", _hoisted_2$2, toDisplayString(e.title), 1),
3158
- createVNode(_sfc_main$r, {
3159
- modelValue: n.value,
3160
- "onUpdate:modelValue": s[0] || (s[0] = (r) => n.value = r),
3272
+ createVNode(_sfc_main$s, {
3273
+ modelValue: o.value,
3274
+ "onUpdate:modelValue": r[0] || (r[0] = (s) => o.value = s),
3161
3275
  style: normalizeStyle(e.style)
3162
3276
  }, null, 8, ["modelValue", "style"])
3163
3277
  ]),
3164
3278
  createVNode(Transition, { name: "slide-fade" }, {
3165
3279
  default: withCtx(() => [
3166
3280
  withDirectives(createElementVNode("div", _hoisted_3$1, [
3167
- renderSlot(o.$slots, "default", {}, void 0, !0)
3281
+ renderSlot(n.$slots, "default", {}, void 0, !0)
3168
3282
  ], 512), [
3169
- [vShow, n.value]
3283
+ [vShow, o.value]
3170
3284
  ])
3171
3285
  ]),
3172
3286
  _: 3
@@ -3190,29 +3304,29 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3190
3304
  }
3191
3305
  },
3192
3306
  setup(e) {
3193
- const t = e, n = ref(t.isOpen);
3307
+ const t = e, o = ref(t.isOpen);
3194
3308
  return watch(
3195
3309
  () => t.isOpen,
3196
- (o) => {
3197
- n.value = o;
3310
+ (n) => {
3311
+ o.value = n;
3198
3312
  }
3199
- ), (o, s) => (openBlock(), createElementBlock("div", null, [
3313
+ ), (n, r) => (openBlock(), createElementBlock("div", null, [
3200
3314
  createElementVNode("button", {
3201
3315
  type: "button",
3202
- onClick: s[0] || (s[0] = (r) => n.value = !n.value),
3316
+ onClick: r[0] || (r[0] = (s) => o.value = !o.value),
3203
3317
  class: "flex items-center gap-2"
3204
3318
  }, [
3205
3319
  createVNode(unref(IconChevronDown), {
3206
- class: normalizeClass(["h-4 w-4 duration-300", [n.value ? "-rotate-180" : ""]])
3320
+ class: normalizeClass(["h-4 w-4 duration-300", [o.value ? "-rotate-180" : ""]])
3207
3321
  }, null, 8, ["class"]),
3208
3322
  createElementVNode("span", _hoisted_1$4, toDisplayString(e.title), 1)
3209
3323
  ]),
3210
3324
  createVNode(Transition, { name: "slide-fade" }, {
3211
3325
  default: withCtx(() => [
3212
3326
  withDirectives(createElementVNode("div", _hoisted_2$1, [
3213
- renderSlot(o.$slots, "default", {}, void 0, !0)
3327
+ renderSlot(n.$slots, "default", {}, void 0, !0)
3214
3328
  ], 512), [
3215
- [vShow, n.value]
3329
+ [vShow, o.value]
3216
3330
  ])
3217
3331
  ]),
3218
3332
  _: 3
@@ -3232,7 +3346,7 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3232
3346
  }
3233
3347
  },
3234
3348
  setup(e) {
3235
- return (t, n) => (openBlock(), createElementBlock("div", null, [
3349
+ return (t, o) => (openBlock(), createElementBlock("div", null, [
3236
3350
  createElementVNode("div", _hoisted_1$3, [
3237
3351
  createElementVNode("p", null, toDisplayString(e.title), 1)
3238
3352
  ]),
@@ -3307,72 +3421,72 @@ const IconDownload = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_r
3307
3421
  }
3308
3422
  },
3309
3423
  setup(e) {
3310
- const t = e, n = inject("formValues", { default: {} }), o = inject("form"), s = computed(() => t.schema?.filter((l) => {
3424
+ const t = e, o = inject("formValues", { default: {} }), n = inject("form"), r = computed(() => t.schema?.filter((l) => {
3311
3425
  const i = l?.conditions;
3312
3426
  if (!i) return !0;
3313
- const u = Array.isArray(i) ? i[0] : i, c = n?.value?.[u];
3427
+ const u = Array.isArray(i) ? i[0] : i, c = o?.value?.[u];
3314
3428
  return isVisible(c, i);
3315
- })), r = computed(() => views[t.view]);
3316
- return (l, i) => e.schema?.length ? (openBlock(), createBlock(resolveDynamicComponent(r.value), {
3429
+ })), s = computed(() => views[t.view]);
3430
+ return (l, i) => e.schema?.length ? (openBlock(), createBlock(resolveDynamicComponent(s.value), {
3317
3431
  key: 0,
3318
3432
  title: e.title,
3319
3433
  style: normalizeStyle(e.style)
3320
3434
  }, {
3321
3435
  default: withCtx(() => [
3322
- (openBlock(!0), createElementBlock(Fragment, null, renderList(s.value, (u) => (openBlock(), createBlock(_sfc_main$1, mergeProps({
3436
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(r.value, (u) => (openBlock(), createBlock(_sfc_main$1, mergeProps({
3323
3437
  key: u.name
3324
3438
  }, { ref_for: !0 }, u, {
3325
3439
  item: u,
3326
- modelValue: unref(n)[u.name],
3327
- "onUpdate:modelValue": (c) => unref(n)[u.name] = c,
3440
+ modelValue: unref(o)[u.name],
3441
+ "onUpdate:modelValue": (c) => unref(o)[u.name] = c,
3328
3442
  style: e.style,
3329
- error: unref(o)?.errors?.[u.name]
3443
+ error: unref(n)?.errors?.[u.name]
3330
3444
  }), null, 16, ["item", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
3331
3445
  ]),
3332
3446
  _: 1
3333
3447
  }, 8, ["title", "style"])) : createCommentVNode("", !0);
3334
3448
  }
3335
- }), dynamicPosition = async (e, t, n, o = 10) => {
3336
- if (!t || !n) return;
3449
+ }), dynamicPosition = async (e, t, o, n = 10) => {
3450
+ if (!t || !o) return;
3337
3451
  await nextTick();
3338
- const s = await n?.getBoundingClientRect(), r = await t?.getBoundingClientRect();
3339
- if (!r || !s) return;
3340
- const l = await parseInt(t?.getBoundingClientRect()?.height.toString()), i = await parseInt(t?.getBoundingClientRect()?.width.toString()), u = await parseInt(n?.getBoundingClientRect()?.height.toString()), c = await parseInt(n?.getBoundingClientRect()?.width.toString()), a = await window.innerHeight, f = await window.innerWidth;
3341
- let d = 0, p = 0;
3342
- const m = r.bottom + o + u;
3452
+ const r = await o?.getBoundingClientRect(), s = await t?.getBoundingClientRect();
3453
+ if (!s || !r) return;
3454
+ const l = await parseInt(t?.getBoundingClientRect()?.height.toString()), i = await parseInt(t?.getBoundingClientRect()?.width.toString()), u = await parseInt(o?.getBoundingClientRect()?.height.toString()), c = await parseInt(o?.getBoundingClientRect()?.width.toString()), a = await window.innerHeight, d = await window.innerWidth;
3455
+ let f = 0, m = 0;
3456
+ const p = s.bottom + n + u;
3343
3457
  switch (e) {
3344
3458
  case "top":
3345
- r.top - s.height - o < 0 ? d = r.top - s.height + o + u + l : d = r.top - s.height - o, f > c + r.right + 30 ? p = r.left - s.width / 2 + r.width / 2 : p = f - 30 - c;
3459
+ s.top - r.height - n < 0 ? f = s.top - r.height + n + u + l : f = s.top - r.height - n, d > c + s.right + 30 ? m = s.left - r.width / 2 + s.width / 2 : m = d - 30 - c;
3346
3460
  break;
3347
3461
  case "bottom":
3348
- a > m ? d = r.bottom + o : d = r.bottom - o - u - l, p = r.left - s.width / 2 + r.width / 2;
3462
+ a > p ? f = s.bottom + n : f = s.bottom - n - u - l, m = s.left - r.width / 2 + s.width / 2;
3349
3463
  break;
3350
3464
  case "left":
3351
- d = r.top - s.height / 2 + r.height / 2, r.left - s.width - o > 0 ? p = r.left - s.width - o : p = 10;
3465
+ f = s.top - r.height / 2 + s.height / 2, s.left - r.width - n > 0 ? m = s.left - r.width - n : m = 10;
3352
3466
  break;
3353
3467
  case "right":
3354
- d = r.top - s.height / 2 + r.height / 2, f - i > c ? p = r.right + o : p = f - 30 - c;
3468
+ f = s.top - r.height / 2 + s.height / 2, d - i > c ? m = s.right + n : m = d - 30 - c;
3355
3469
  break;
3356
3470
  case "top-right":
3357
- r.top - s.height - o < 0 ? d = r.top - s.height + o + u + l : d = r.top - s.height - o, f - i > c ? p = r.right + o : p = f - 30 - c;
3471
+ s.top - r.height - n < 0 ? f = s.top - r.height + n + u + l : f = s.top - r.height - n, d - i > c ? m = s.right + n : m = d - 30 - c;
3358
3472
  break;
3359
3473
  case "top-left":
3360
- r.top - s.height - o < 0 ? d = r.top - s.height + o + u + l : d = r.top - s.height - o, r.left - s.width - o > 0 ? p = r.left - s.width - o : p = 10;
3474
+ s.top - r.height - n < 0 ? f = s.top - r.height + n + u + l : f = s.top - r.height - n, s.left - r.width - n > 0 ? m = s.left - r.width - n : m = 10;
3361
3475
  break;
3362
3476
  case "top-start":
3363
- r.top - s.height - o < 0 ? d = r.top - s.height + o + u + l : d = r.top - s.height - o, r.left > 0 ? p = r.left : p = 10;
3477
+ s.top - r.height - n < 0 ? f = s.top - r.height + n + u + l : f = s.top - r.height - n, s.left > 0 ? m = s.left : m = 10;
3364
3478
  break;
3365
3479
  case "bottom-right":
3366
- a > m ? d = r.bottom + o : d = r.bottom - o - u - l, f - i > c ? p = r.left : p = f - 30 - c;
3480
+ a > p ? f = s.bottom + n : f = s.bottom - n - u - l, d - i > c ? m = s.left : m = d - 30 - c;
3367
3481
  break;
3368
3482
  case "bottom-left":
3369
- a > m ? d = r.bottom + o : d = r.bottom - o - u - l, r.left > 0 ? p = r.right - c : p = 10;
3483
+ a > p ? f = s.bottom + n : f = s.bottom - n - u - l, s.left > 0 ? m = s.right - c : m = 10;
3370
3484
  break;
3371
3485
  case "bottom-start":
3372
- a > m ? d = r.bottom + o : d = r.bottom - o - u - l, r.left > 0 ? p = r.left : p = 10;
3486
+ a > p ? f = s.bottom + n : f = s.bottom - n - u - l, s.left > 0 ? m = s.left : m = 10;
3373
3487
  break;
3374
3488
  }
3375
- d + u > a ? d = a - u - o : d < 0 && (d = o), p + c > f ? p = f - c - o : p < 0 && (p = o), n instanceof HTMLElement && (n.style.top = `${d}px`, n.style.left = `${p}px`, n.style.position = "fixed");
3489
+ f + u > a ? f = a - u - n : f < 0 && (f = n), m + c > d ? m = d - c - n : m < 0 && (m = n), o instanceof HTMLElement && (o.style.top = `${f}px`, o.style.left = `${m}px`, o.style.position = "fixed");
3376
3490
  }, _sfc_main$4 = {}, _hoisted_1$2 = {
3377
3491
  xmlns: "http://www.w3.org/2000/svg",
3378
3492
  viewBox: "0 0 24 24",
@@ -3400,7 +3514,7 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3400
3514
  }, _hoisted_4 = { class: "absolute top-[50%] text-gray-500 translate-y-[-50%] right-[10px] pointer-events-none" }, _hoisted_5 = {
3401
3515
  key: 0,
3402
3516
  class: "sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400"
3403
- }, _hoisted_6 = { class: "h-[30px] shrink-0 flex items-center relative justify-center" }, _hoisted_7 = ["onClick"], _hoisted_8 = { class: "flex items-center gap-[8px] w-full" }, _hoisted_9 = { key: 2 }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
3517
+ }, _hoisted_6 = { class: "h-[30px] shrink-0 flex items-center relative justify-center" }, _hoisted_7 = ["onClick"], _hoisted_8 = { class: "flex items-center gap-[8px] w-full" }, _hoisted_9 = { key: 2 }, _hoisted_10 = { class: "relative" }, _hoisted_11 = { class: "w-full h-full fixed top-0 start-0 z-[80] bg-black bg-opacity-50" }, _hoisted_12 = { class: "m-[10px] fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 min-h-0 h-fit max-h-[80vh] overflow-hidden opacity-1 flex flex-col bg-white dark:bg-[#1A1A1A] border dark:border-[#454545] pointer-events-auto shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)] rounded-xl lg:w-7/12 w-11/12" }, _hoisted_13 = { class: "py-2.5 px-4 flex justify-between items-center border-0 border-b border-solid border-gray-200 dark:border-b-[#454545]" }, _hoisted_14 = { class: "p-4 mim-h-0 h-full overflow-auto" }, _hoisted_15 = { class: "vs-form__head mb-5 flex items-center justify-end sticky top-0 left-0 z-[60] bg-white" }, _sfc_main$3 = /* @__PURE__ */ defineComponent({
3404
3518
  __name: "vs-input-select",
3405
3519
  props: /* @__PURE__ */ mergeModels({
3406
3520
  placeholder: { default: "Оберіть значення" },
@@ -3414,6 +3528,9 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3414
3528
  style: { default: () => ({}) },
3415
3529
  disabled: { type: Boolean },
3416
3530
  mode: {},
3531
+ add: {},
3532
+ api: {},
3533
+ search: { type: Boolean },
3417
3534
  error: { default: null }
3418
3535
  }, {
3419
3536
  modelValue: {
@@ -3424,183 +3541,278 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3424
3541
  }),
3425
3542
  emits: ["update:modelValue"],
3426
3543
  setup(e) {
3427
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue"), s = ref({}), r = ref(null), l = ref(null), i = ref(!1), u = ref(null), c = ref([]), a = ref(-1), f = ref([]), d = ref(""), p = ref(null);
3428
- let m = null;
3429
- const y = computed(() => {
3430
- if (c.value?.length) {
3431
- const b = c.value?.filter((v) => v?.id !== u.value?.id);
3544
+ const t = e, o = computed(() => t.mode || (t.api || t.search ? "search" : null)), { inputClass: n } = useStyle(t.style), r = useModel(e, "modelValue"), s = ref({}), l = ref(null), i = ref(null), u = ref(!1), c = ref(null), a = ref([]), d = ref(-1), f = ref([]), m = ref(""), p = ref(null);
3545
+ let g = null;
3546
+ const y = ref(!1), x = ref(null), w = ref({}), E = ref({}), C = computed(() => {
3547
+ if (a.value?.length) {
3548
+ const v = a.value?.filter((b) => b?.id !== c.value?.id);
3432
3549
  return [
3433
- u.value
3434
- ].concat(b)?.filter((v) => v !== null);
3550
+ c.value
3551
+ ].concat(v)?.filter((b) => b !== null);
3435
3552
  }
3436
3553
  return [];
3437
- }), h = async () => {
3554
+ }), _ = async () => {
3438
3555
  try {
3439
- const { data: b } = await axios.get(
3440
- `${t.host}/${t.prefix}/suggest/${t.data}?json=1&key=${d.value}`
3556
+ const { data: v } = await axios.get(
3557
+ `${t.host}/${t.prefix}/suggest/${t.data}?json=1&key=${m.value}`
3441
3558
  );
3442
- return b.data;
3559
+ return v.data;
3443
3560
  } catch {
3444
3561
  return [];
3445
3562
  }
3446
- }, w = async (b) => {
3447
- document.body.click(), i.value = b !== void 0 ? b : !i.value, i.value && !c.value?.length && (!t.options?.length && t.data ? c.value = await h() : t.options?.length && (c.value = [...t.options])), i.value && r.value ? (s.value.width = `${r.value.getBoundingClientRect()?.width}px`, t.mode === "search" && p.value?.focus(), l.value && dynamicPosition("bottom-start", r.value, l.value)) : a.value = -1;
3448
- }, x = () => i.value ? w(!1) : null, g = (b) => {
3449
- u.value = b, o.value = b.id, w(!1);
3450
- }, k = (b, v) => {
3451
- if (!b || !v) return;
3452
- const $ = b.offsetTop, B = $ + b.offsetHeight, V = v.scrollTop, R = V + v.clientHeight;
3453
- $ < V ? Object.assign(v, { scrollTop: $ - 80 }) : B > R && Object.assign(v, { scrollTop: B - v.clientHeight + 4 });
3454
- }, _ = (b) => {
3455
- if (!i.value) return;
3456
- const { keyCode: v } = b;
3457
- if ([38, 40, 13].includes(v) && b.preventDefault(), v === 38) {
3458
- if (a.value === 0) return;
3459
- a.value -= 1, k(f.value[a.value], l.value);
3460
- } else if (v === 40) {
3461
- if (a.value + 1 >= y.value?.length) return;
3462
- a.value += 1, k(f.value[a.value], l.value);
3463
- } else if (v === 13) {
3464
- const $ = y.value[a.value];
3465
- $ && g($);
3563
+ }, S = async (v) => {
3564
+ document.body.click(), u.value = v !== void 0 ? v : !u.value, u.value && !a.value?.length && (!t.options?.length && t.data ? a.value = await _() : t.options?.length && (a.value = [...t.options])), u.value && l.value ? (s.value.width = `${l.value.getBoundingClientRect()?.width}px`, t.mode === "search" && p.value?.focus(), i.value && dynamicPosition("bottom-start", l.value, i.value)) : d.value = -1;
3565
+ }, B = () => u.value ? S(!1) : null, V = (v) => {
3566
+ c.value = v, r.value = v.id, S(!1);
3567
+ }, A = (v, b) => {
3568
+ if (!v || !b) return;
3569
+ const k = v.offsetTop, N = k + v.offsetHeight, O = b.scrollTop, U = O + b.clientHeight;
3570
+ k < O ? Object.assign(b, { scrollTop: k - 80 }) : N > U && Object.assign(b, { scrollTop: N - b.clientHeight + 4 });
3571
+ }, R = (v) => {
3572
+ if (!u.value) return;
3573
+ const { keyCode: b } = v;
3574
+ if ([38, 40, 13].includes(b) && v.preventDefault(), b === 38) {
3575
+ if (d.value === 0) return;
3576
+ d.value -= 1, A(f.value[d.value], i.value);
3577
+ } else if (b === 40) {
3578
+ if (d.value + 1 >= C.value?.length) return;
3579
+ d.value += 1, A(f.value[d.value], i.value);
3580
+ } else if (b === 13) {
3581
+ const k = C.value[d.value];
3582
+ k && V(k);
3466
3583
  }
3467
- }, E = async (b) => {
3468
- if (i.value) return;
3469
- const { keyCode: v } = b;
3470
- [38, 40].includes(v) && (await b.preventDefault(), a.value = 0, setTimeout(() => w()));
3471
- }, S = (b) => {
3472
- i.value && r.value && l.value && !l.value.contains(b.target) && (i.value = !1);
3473
- }, C = (b) => {
3474
- b?.key === "Escape" && i.value && w(!1);
3584
+ }, D = async (v) => {
3585
+ if (u.value) return;
3586
+ const { keyCode: b } = v;
3587
+ [38, 40].includes(b) && (await v.preventDefault(), d.value = 0, setTimeout(() => S()));
3588
+ }, T = (v) => {
3589
+ u.value && l.value && i.value && !i.value.contains(v.target) && (u.value = !1);
3590
+ }, F = (v) => {
3591
+ v?.key === "Escape" && u.value && S(!1);
3475
3592
  };
3476
- return onMounted(async () => {
3477
- addEventListener("click", x), addEventListener("keydown", _), addEventListener("scroll", S, !0), addEventListener("keydown", C), t.options && (c.value = t.options), o.value && !t.options?.length && t.data && (c.value = await h()), u.value = c.value?.find((b) => b?.id.toString() === o.value?.toString()) || null;
3593
+ onMounted(async () => {
3594
+ addEventListener("click", B), addEventListener("keydown", R), addEventListener("scroll", T, !0), addEventListener("keydown", F), t.options && (a.value = t.options), r.value && !t.options?.length && t.data && (a.value = await _()), c.value = a.value?.find((v) => v?.id.toString() === r.value?.toString()) || null;
3478
3595
  }), onUnmounted(() => {
3479
- removeEventListener("click", x), removeEventListener("keydown", _), removeEventListener("scroll", S, !0), removeEventListener("keydown", C);
3480
- }), watch(d, (b) => {
3481
- let v = !1;
3482
- (b === "" || b.trimStart().length !== 0) && (v = !0), v && (m && clearTimeout(m), m = setTimeout(async () => {
3483
- !t.options?.length && t.data ? c.value = await h() : c.value = t.options.filter(($) => $.text.toLowerCase().includes(b.toLowerCase()));
3596
+ removeEventListener("click", B), removeEventListener("keydown", R), removeEventListener("scroll", T, !0), removeEventListener("keydown", F);
3597
+ }), watch(m, (v) => {
3598
+ let b = !1;
3599
+ (v === "" || v.trimStart().length !== 0) && (b = !0), b && (g && clearTimeout(g), g = setTimeout(async () => {
3600
+ !t.options?.length && t.data ? a.value = await _() : a.value = t.options.filter((k) => k.text.toLowerCase().includes(v.toLowerCase()));
3484
3601
  }, 200));
3485
- }), (b, v) => (openBlock(), createElementBlock("div", {
3486
- class: "relative w-full",
3487
- ref_key: "select",
3488
- ref: r,
3489
- onClick: v[5] || (v[5] = withModifiers(() => {
3490
- }, ["stop"]))
3491
- }, [
3492
- createElementVNode("button", {
3493
- type: "button",
3494
- class: normalizeClass(["block w-full flex items-center gap-[8px] pl-[16px] py-[5px] bg-white w-[calc(100%)] overflow-ellipsis", [
3495
- i.value ? `ring-rind ring-2 ring-${b.style?.primaryColor || "blue"}-500` : "",
3496
- u.value?.text ? "pr-[50px]" : "pr-[25px]",
3497
- unref(n),
3498
- b.customClass,
3499
- { "!border-red-600": b.error }
3500
- ]]),
3501
- onKeydown: E,
3502
- onClick: v[0] || (v[0] = ($) => w(!i.value)),
3503
- disabled: b.disabled,
3504
- style: {
3505
- border: "1px solid #CFD9E0"
3506
- }
3602
+ });
3603
+ async function j() {
3604
+ y.value = !0;
3605
+ const v = await fetch(`/api/template/form/${t.add.form}`).then((b) => b.json());
3606
+ x.value = v.schema;
3607
+ }
3608
+ async function L() {
3609
+ E.value.validate() || (await fetch("/api/table/" + t.add.token, {
3610
+ method: "POST",
3611
+ headers: {
3612
+ "Content-Type": "application/json"
3613
+ },
3614
+ body: JSON.stringify(w.value)
3615
+ }).then((b) => b.json()), y.value = !1);
3616
+ }
3617
+ return (v, b) => (openBlock(), createElementBlock(Fragment, null, [
3618
+ createElementVNode("div", {
3619
+ class: "relative w-full",
3620
+ ref_key: "select",
3621
+ ref: l,
3622
+ onClick: b[5] || (b[5] = withModifiers(() => {
3623
+ }, ["stop"]))
3507
3624
  }, [
3508
- u.value?.color ? (openBlock(), createElementBlock("span", {
3625
+ createElementVNode("button", {
3626
+ type: "button",
3627
+ class: normalizeClass(["block w-full flex items-center gap-[8px] pl-[16px] py-[5px] bg-white w-[calc(100%)] overflow-ellipsis", [
3628
+ u.value ? `ring-rind ring-2 ring-${v.style?.primaryColor || "blue"}-500` : "",
3629
+ c.value?.text ? "pr-[50px]" : "pr-[25px]",
3630
+ unref(n),
3631
+ v.customClass,
3632
+ { "!border-red-600": v.error }
3633
+ ]]),
3634
+ onKeydown: D,
3635
+ onClick: b[0] || (b[0] = (k) => S(!u.value)),
3636
+ disabled: v.disabled,
3637
+ style: {
3638
+ border: "1px solid #CFD9E0"
3639
+ }
3640
+ }, [
3641
+ c.value?.color ? (openBlock(), createElementBlock("span", {
3642
+ key: 0,
3643
+ class: "w-[16px] h-[16px] rounded-md block",
3644
+ style: normalizeStyle({ backgroundColor: c.value?.color })
3645
+ }, null, 4)) : createCommentVNode("", !0),
3646
+ c.value?.text ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(c.value?.text), 1)) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(v.placeholder), 1))
3647
+ ], 42, _hoisted_1$1),
3648
+ createElementVNode("span", _hoisted_4, [
3649
+ createVNode(unref(IconChevronTopBottom), {
3650
+ height: "14",
3651
+ width: "14"
3652
+ })
3653
+ ]),
3654
+ c.value?.text ? (openBlock(), createElementBlock("button", {
3509
3655
  key: 0,
3510
- class: "w-[16px] h-[16px] rounded-md block",
3511
- style: normalizeStyle({ backgroundColor: u.value?.color })
3512
- }, null, 4)) : createCommentVNode("", !0),
3513
- u.value?.text ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(u.value?.text), 1)) : (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(b.placeholder), 1))
3514
- ], 42, _hoisted_1$1),
3515
- createElementVNode("span", _hoisted_4, [
3516
- createVNode(unref(IconChevronTopBottom), {
3517
- height: "14",
3518
- width: "14"
3519
- })
3520
- ]),
3521
- u.value?.text ? (openBlock(), createElementBlock("button", {
3522
- key: 0,
3523
- type: "button",
3524
- onClick: v[1] || (v[1] = ($) => {
3525
- o.value = null, u.value = null;
3526
- }),
3527
- class: "absolute top-[50%] text-gray-500 translate-y-[-50%] hover:text-red-600 right-[30px]"
3528
- }, [
3529
- createVNode(unref(IconClose), {
3530
- height: "14",
3531
- width: "14"
3532
- })
3533
- ])) : createCommentVNode("", !0),
3534
- (openBlock(), createBlock(Teleport, { to: "body" }, [
3535
- withDirectives(createElementVNode("ul", {
3536
- 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",
3537
- ref_key: "list",
3538
- ref: l,
3539
- style: normalizeStyle({
3540
- width: s.value.width,
3541
- maxHeight: b.maxHeight + "px",
3542
- backgroundColor: "white"
3656
+ type: "button",
3657
+ onClick: b[1] || (b[1] = (k) => {
3658
+ r.value = null, c.value = null;
3543
3659
  }),
3544
- onClick: v[4] || (v[4] = withModifiers(() => {
3545
- }, ["stop"]))
3660
+ class: "absolute top-[50%] text-gray-500 translate-y-[-50%] hover:text-red-600 right-[30px]"
3546
3661
  }, [
3547
- b.mode === "search" ? (openBlock(), createElementBlock("li", _hoisted_5, [
3548
- createElementVNode("div", _hoisted_6, [
3549
- withDirectives(createElementVNode("input", {
3550
- "onUpdate:modelValue": v[2] || (v[2] = ($) => d.value = $),
3551
- class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",
3552
- placeholder: "Пошук",
3553
- type: "text",
3554
- ref_key: "inputRef",
3555
- ref: p
3556
- }, null, 512), [
3557
- [vModelText, d.value]
3558
- ]),
3559
- createVNode(IconMagnifyingGlass, {
3560
- width: "15px",
3561
- height: "15px",
3562
- class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"
3563
- }),
3564
- d.value != "" ? (openBlock(), createBlock(unref(IconClose), {
3565
- key: 0,
3566
- width: "15px",
3567
- height: "15px",
3568
- onClick: v[3] || (v[3] = ($) => d.value = ""),
3569
- class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
3570
- })) : createCommentVNode("", !0)
3571
- ])
3572
- ])) : createCommentVNode("", !0),
3573
- y.value?.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3574
- v[6] || (v[6] = createElementVNode("li", { class: "sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400" }, " Натисніть Enter для вибору, ↑↓ для навігації, Esc для закриття ", -1)),
3575
- (openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, ($, B) => (openBlock(), createElementBlock("li", {
3576
- onClick: (V) => g($),
3577
- key: $?.id,
3578
- ref_for: !0,
3579
- ref: (V) => f.value[B] = V,
3580
- class: normalizeClass(["cursor-pointer relative py-2 px-4 w-full text-[14px] text-gray-700 hover:bg-gray-100 rounded-lg", [a.value == B ? "bg-gray-100" : ""]])
3581
- }, [
3582
- createElementVNode("span", _hoisted_8, [
3583
- $?.color ? (openBlock(), createElementBlock("span", {
3662
+ createVNode(unref(IconClose), {
3663
+ height: "14",
3664
+ width: "14"
3665
+ })
3666
+ ])) : createCommentVNode("", !0),
3667
+ (openBlock(), createBlock(Teleport, { to: "body" }, [
3668
+ withDirectives(createElementVNode("ul", {
3669
+ 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",
3670
+ ref_key: "list",
3671
+ ref: i,
3672
+ style: normalizeStyle({
3673
+ width: s.value.width,
3674
+ maxHeight: v.maxHeight + "px",
3675
+ backgroundColor: "white"
3676
+ }),
3677
+ onClick: b[4] || (b[4] = withModifiers(() => {
3678
+ }, ["stop"]))
3679
+ }, [
3680
+ o.value === "search" ? (openBlock(), createElementBlock("li", _hoisted_5, [
3681
+ createElementVNode("div", _hoisted_6, [
3682
+ withDirectives(createElementVNode("input", {
3683
+ "onUpdate:modelValue": b[2] || (b[2] = (k) => m.value = k),
3684
+ class: "w-full h-full text-[13px] px-4 border rounded-sm pl-9 focus:outline-none focus:ring-ring focus:ring-1 focus:ring-blue-500",
3685
+ placeholder: "Пошук",
3686
+ type: "text",
3687
+ ref_key: "inputRef",
3688
+ ref: p
3689
+ }, null, 512), [
3690
+ [vModelText, m.value]
3691
+ ]),
3692
+ createVNode(IconMagnifyingGlass, {
3693
+ width: "15px",
3694
+ height: "15px",
3695
+ class: "absolute text-gray-400 -translate-y-1/2 left-4 top-1/2"
3696
+ }),
3697
+ m.value != "" ? (openBlock(), createBlock(unref(IconClose), {
3698
+ key: 0,
3699
+ width: "15px",
3700
+ height: "15px",
3701
+ onClick: b[3] || (b[3] = (k) => m.value = ""),
3702
+ class: "absolute text-gray-400 -translate-y-1/2 cursor-pointer hover:text-red-500 right-4 top-1/2"
3703
+ })) : createCommentVNode("", !0)
3704
+ ])
3705
+ ])) : createCommentVNode("", !0),
3706
+ C.value?.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3707
+ b[10] || (b[10] = createElementVNode("li", { class: "sticky top-[-4px] text-[12px] bg-white p-1 z-[2] px-4 text-gray-400" }, " Натисніть Enter для вибору, ↑↓ для навігації, Esc для закриття ", -1)),
3708
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(C.value, (k, N) => (openBlock(), createElementBlock("li", {
3709
+ onClick: (O) => V(k),
3710
+ key: k?.id,
3711
+ ref_for: !0,
3712
+ ref: (O) => f.value[N] = O,
3713
+ class: normalizeClass(["cursor-pointer relative py-2 px-4 w-full text-[14px] text-gray-700 hover:bg-gray-100 rounded-lg", [d.value == N ? "bg-gray-100" : ""]])
3714
+ }, [
3715
+ createElementVNode("span", _hoisted_8, [
3716
+ k?.color ? (openBlock(), createElementBlock("span", {
3717
+ key: 0,
3718
+ class: "w-[16px] h-[16px] rounded-md block",
3719
+ style: normalizeStyle({ backgroundColor: k?.color })
3720
+ }, null, 4)) : createCommentVNode("", !0),
3721
+ createTextVNode(" " + toDisplayString(k?.text), 1)
3722
+ ]),
3723
+ r.value == k?.id ? (openBlock(), createBlock(unref(IconCheck), {
3584
3724
  key: 0,
3585
- class: "w-[16px] h-[16px] rounded-md block",
3586
- style: normalizeStyle({ backgroundColor: $?.color })
3587
- }, null, 4)) : createCommentVNode("", !0),
3588
- createTextVNode(" " + toDisplayString($?.text), 1)
3725
+ height: "14",
3726
+ width: "14",
3727
+ "stroke-width": "2",
3728
+ class: "absolute right-[16px] top-[50%] translate-y-[-50%] text-blue-600"
3729
+ })) : createCommentVNode("", !0)
3730
+ ], 10, _hoisted_7))), 128))
3731
+ ], 64)) : (openBlock(), createElementBlock("li", _hoisted_9, "Дані відсутні"))
3732
+ ], 4), [
3733
+ [vShow, u.value]
3734
+ ])
3735
+ ]))
3736
+ ], 512),
3737
+ t.add ? (openBlock(), createElementBlock("button", {
3738
+ key: 0,
3739
+ onClick: j,
3740
+ class: "ml-auto bg-white hover:bg-gray-100 text-sm text-gray-900 leadig-[18.5px] py-[10px] px-[12px] border border-solid border-stone-200 rounded-md h-[38px] max-h-[40px] gap-[8px] flex items-center"
3741
+ }, b[11] || (b[11] = [
3742
+ createElementVNode("svg", {
3743
+ class: "vpbnr cp61q",
3744
+ xmlns: "http://www.w3.org/2000/svg",
3745
+ width: "16",
3746
+ height: "16",
3747
+ fill: "currentColor",
3748
+ viewBox: "0 0 16 16"
3749
+ }, [
3750
+ createElementVNode("path", {
3751
+ "fill-rule": "evenodd",
3752
+ "clip-rule": "evenodd",
3753
+ d: "M8 1C8.55228 1 9 1.44772 9 2V7L14 7C14.5523 7 15 7.44771 15 8C15 8.55228 14.5523 9 14 9L9 9V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V9.00001L2 9.00001C1.44772 9.00001 1 8.5523 1 8.00001C0.999999 7.44773 1.44771 7.00001 2 7.00001L7 7.00001V2C7 1.44772 7.44772 1 8 1Z"
3754
+ })
3755
+ ], -1),
3756
+ createElementVNode("span", null, "Додати", -1)
3757
+ ]))) : createCommentVNode("", !0),
3758
+ (openBlock(), createBlock(Teleport, { to: "body" }, [
3759
+ withDirectives(createElementVNode("div", _hoisted_10, [
3760
+ createElementVNode("div", _hoisted_11, [
3761
+ createElementVNode("div", _hoisted_12, [
3762
+ createElementVNode("div", _hoisted_13, [
3763
+ b[13] || (b[13] = createElementVNode("h3", { class: "font-medium text-gray-800 dark:text-[#ffffff]" }, "Додати", -1)),
3764
+ createElementVNode("button", {
3765
+ onClick: b[6] || (b[6] = (k) => y.value = !1),
3766
+ type: "button",
3767
+ class: "size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600"
3768
+ }, b[12] || (b[12] = [
3769
+ createElementVNode("span", { class: "sr-only" }, "Close", -1),
3770
+ createElementVNode("svg", {
3771
+ class: "flex-shrink-0 w-4 h-4",
3772
+ xmlns: "http://www.w3.org/2000/svg",
3773
+ width: "24",
3774
+ height: "24",
3775
+ viewBox: "0 0 24 24",
3776
+ fill: "none",
3777
+ stroke: "currentColor",
3778
+ "stroke-width": "2",
3779
+ "stroke-linecap": "round",
3780
+ "stroke-linejoin": "round"
3781
+ }, [
3782
+ createElementVNode("path", { d: "M18 6 6 18" }),
3783
+ createElementVNode("path", { d: "m6 6 12 12" })
3784
+ ], -1)
3785
+ ]))
3589
3786
  ]),
3590
- o.value == $?.id ? (openBlock(), createBlock(unref(IconCheck), {
3591
- key: 0,
3592
- height: "14",
3593
- width: "14",
3594
- "stroke-width": "2",
3595
- class: "absolute right-[16px] top-[50%] translate-y-[-50%] text-blue-600"
3596
- })) : createCommentVNode("", !0)
3597
- ], 10, _hoisted_7))), 128))
3598
- ], 64)) : (openBlock(), createElementBlock("li", _hoisted_9, "Дані відсутні"))
3599
- ], 4), [
3600
- [vShow, i.value]
3787
+ createElementVNode("div", _hoisted_14, [
3788
+ x.value ? (openBlock(), createBlock(_sfc_main, {
3789
+ key: 0,
3790
+ schema: x.value,
3791
+ values: w.value,
3792
+ "onUpdate:values": b[7] || (b[7] = (k) => w.value = k),
3793
+ form: E.value,
3794
+ "onUpdate:form": b[8] || (b[8] = (k) => E.value = k)
3795
+ }, null, 8, ["schema", "values", "form"])) : createCommentVNode("", !0),
3796
+ createElementVNode("div", _hoisted_15, [
3797
+ createElementVNode("button", {
3798
+ type: "button",
3799
+ onClick: b[9] || (b[9] = (k) => y.value = !1),
3800
+ class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border !border-gray-200 hover:text-white bg-white text-red-500 hover:border-red-500 hover:bg-red-500 focus:ring-red-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1 mr-2"
3801
+ }, " Скасувати "),
3802
+ createElementVNode("button", {
3803
+ onClick: L,
3804
+ type: "button",
3805
+ class: "vs-button inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border-1 border-transparent text-white bg-blue-500 hover:bg-blue-600 focus:ring-blue-500 py-1.5 px-5 focus:ring-1 focus:ring-offset-1"
3806
+ }, " Зберегти ")
3807
+ ])
3808
+ ])
3809
+ ])
3810
+ ])
3811
+ ], 512), [
3812
+ [vShow, y.value]
3601
3813
  ])
3602
3814
  ]))
3603
- ], 512));
3815
+ ], 64));
3604
3816
  }
3605
3817
  }), _hoisted_1 = ["placeholder", "disabled"], _sfc_main$2 = /* @__PURE__ */ defineComponent({
3606
3818
  __name: "vs-input-textarea",
@@ -3627,36 +3839,37 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3627
3839
  }),
3628
3840
  emits: ["update:modelValue"],
3629
3841
  setup(e) {
3630
- const t = e, { inputClass: n } = useStyle(t.style), o = useModel(e, "modelValue");
3631
- return (s, r) => withDirectives((openBlock(), createElementBlock("textarea", {
3632
- "onUpdate:modelValue": r[0] || (r[0] = (l) => o.value = l),
3842
+ const t = e, { inputClass: o } = useStyle(t.style), n = useModel(e, "modelValue");
3843
+ return (r, s) => withDirectives((openBlock(), createElementBlock("textarea", {
3844
+ "onUpdate:modelValue": s[0] || (s[0] = (l) => n.value = l),
3633
3845
  placeholder: e.placeholder,
3634
3846
  disabled: e.disabled,
3635
3847
  row: "2",
3636
- class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [unref(n)]]),
3848
+ class: normalizeClass(["py-1.5 px-3 block w-full placeholder:text[#767f8f] h-auto", [unref(o)]]),
3637
3849
  style: {
3638
3850
  border: "1px solid #CFD9E0"
3639
3851
  }
3640
3852
  }, null, 10, _hoisted_1)), [
3641
- [vModelText, o.value]
3853
+ [vModelText, n.value]
3642
3854
  ]);
3643
3855
  }
3644
3856
  }), inputs = {
3645
- VsInputText: _sfc_main$B,
3857
+ VsInputText: _sfc_main$C,
3646
3858
  VsInputRadio: _sfc_main$l,
3647
- "vs-input-text": _sfc_main$B,
3859
+ "vs-input-text": _sfc_main$C,
3648
3860
  "vs-input-textarea": _sfc_main$2,
3649
- "vs-input-mask": _sfc_main$p,
3650
- "vs-input-number": _sfc_main$A,
3861
+ "vs-input-mask": _sfc_main$q,
3862
+ "vs-input-number": _sfc_main$B,
3651
3863
  "vs-input-radio": _sfc_main$l,
3652
3864
  "vs-input-select": _sfc_main$3,
3653
- "vs-input-switcher": _sfc_main$r,
3654
- "vs-input-static": _sfc_main$q,
3865
+ "vs-input-switcher": _sfc_main$s,
3866
+ "vs-input-static": _sfc_main$r,
3655
3867
  "vs-input-container": _sfc_main$5,
3656
3868
  "vs-input-date": _sfc_main$j,
3657
3869
  "vs-input-checkbox": VsInputCheckbox,
3658
3870
  "vs-input-file": _sfc_main$9,
3659
- "vs-input-html": _sfc_main$o
3871
+ "vs-input-html": _sfc_main$p,
3872
+ "vs-input-email": _sfc_main$o
3660
3873
  }, _sfc_main$1 = /* @__PURE__ */ defineComponent({
3661
3874
  __name: "vs-compact-form-layout",
3662
3875
  props: {
@@ -3678,13 +3891,13 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3678
3891
  }
3679
3892
  },
3680
3893
  setup(e) {
3681
- const t = e, n = computed(() => layouts$1[`${t.layout}`]), o = computed(() => inputs?.[`vs-input-${t.type}`]);
3682
- return (s, r) => (openBlock(), createBlock(resolveDynamicComponent(n.value), mergeProps(s.$attrs, {
3894
+ const t = e, o = computed(() => layouts$1[`${t.layout}`]), n = computed(() => inputs?.[`vs-input-${t.type}`]);
3895
+ return (r, s) => (openBlock(), createBlock(resolveDynamicComponent(o.value), mergeProps(r.$attrs, {
3683
3896
  style: e.style,
3684
3897
  item: e.item
3685
3898
  }), {
3686
3899
  default: withCtx(() => [
3687
- (openBlock(), createBlock(resolveDynamicComponent(o.value), mergeProps(s.$attrs, { style: e.style }), null, 16, ["style"]))
3900
+ (openBlock(), createBlock(resolveDynamicComponent(n.value), mergeProps(r.$attrs, { style: e.style }), null, 16, ["style"]))
3688
3901
  ]),
3689
3902
  _: 1
3690
3903
  }, 16, ["style", "item"]));
@@ -3711,9 +3924,10 @@ const IconMagnifyingGlass = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render",
3711
3924
  }, mathTable = {
3712
3925
  autocomplete: "select",
3713
3926
  combobox: "select",
3714
- email: "text",
3715
3927
  datepicker: "date",
3716
- markedtext: "text"
3928
+ markedtext: "mask",
3929
+ html: "static",
3930
+ filelist: "file"
3717
3931
  // mask: 'text',
3718
3932
  };
3719
3933
  function convertType(e) {
@@ -3723,43 +3937,43 @@ function convertType(e) {
3723
3937
  function convertSchema(e) {
3724
3938
  if (Array.isArray(e)) return e;
3725
3939
  const t = [];
3726
- return Object.entries(e).forEach((n) => {
3727
- const o = {
3728
- name: n[0],
3729
- ...n[1],
3730
- type: convertType(n[1].type),
3731
- label: n[1].label || n[1].ua,
3732
- rules: n[1].rules || n[1].validators
3940
+ return Object.entries(e).forEach((o) => {
3941
+ const n = {
3942
+ name: o[0],
3943
+ ...o[1],
3944
+ type: convertType(o[1].type),
3945
+ label: o[1].label || o[1].ua,
3946
+ rules: o[1].rules || o[1].validators
3733
3947
  };
3734
- n[1].data && (o.api = `/api/suggest/${n[1].data}`), t.push(o);
3948
+ o[1].type.includes("list") && (n.multiple = !0), o[1].data && (n.api = `/api/suggest/${o[1].data}`), t.push(n);
3735
3949
  }), t;
3736
3950
  }
3737
3951
  function useForm(e, t) {
3738
- const n = convertSchema(t), o = ref({});
3739
- function s(u) {
3952
+ const o = convertSchema(t), n = ref({});
3953
+ function r(u) {
3740
3954
  const c = u?.conditions;
3741
3955
  if (!c) return !0;
3742
- const a = Array.isArray(c) ? c[0] : c, f = e?.value?.[a];
3743
- return isVisible(f, c);
3956
+ const a = Array.isArray(c) ? c[0] : c, d = e?.value?.[a];
3957
+ return isVisible(d, c);
3744
3958
  }
3745
- const r = (u = n, c = !0) => (u.forEach((a) => {
3959
+ const s = (u = o, c = !0) => (u.forEach((a) => {
3746
3960
  if (a.rules) {
3747
- if (!s(a)) {
3748
- console.log(a.name, "skip hidden"), delete o.value[a.name];
3961
+ if (!r(a)) {
3962
+ console.log(a.name, "skip hidden"), delete n.value[a.name];
3749
3963
  return;
3750
3964
  }
3751
- a.rules.forEach((f) => {
3752
- const d = checkFormRules(e.value[a.name], f);
3753
- d ? o.value[a.name] = d : delete o.value[a.name];
3965
+ a.rules.forEach((d) => {
3966
+ const f = checkFormRules(e.value[a.name], d);
3967
+ f ? n.value[a.name] = f : delete n.value[a.name];
3754
3968
  });
3755
3969
  }
3756
- a.schema && r(a.schema, !1);
3757
- }), c && Object.values(o.value).some(Boolean) ? o.value : null), l = computed(() => n?.filter((u) => s(u)));
3970
+ a.schema && s(a.schema, !1);
3971
+ }), c && Object.values(n.value).some(Boolean) ? n.value : null), l = computed(() => o?.filter((u) => r(u)));
3758
3972
  return {
3759
- errors: o,
3760
- validate: r,
3973
+ errors: n,
3974
+ validate: s,
3761
3975
  reset: () => {
3762
- e.value = {}, o.value = {};
3976
+ e.value = {}, n.value = {};
3763
3977
  },
3764
3978
  visibleSchema: l
3765
3979
  };
@@ -3778,30 +3992,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
3778
3992
  }),
3779
3993
  emits: /* @__PURE__ */ mergeModels(["handle-submit"], ["update:form", "update:values"]),
3780
3994
  setup(e, { emit: t }) {
3781
- const n = t, o = e, s = useAttrs(), r = useModel(e, "form"), l = useModel(e, "values"), {
3995
+ const o = t, n = e, r = useAttrs(), s = useModel(e, "form"), l = useModel(e, "values"), {
3782
3996
  errors: i,
3783
3997
  validate: u,
3784
3998
  reset: c,
3785
3999
  visibleSchema: a
3786
- } = useForm(l, o.schema), f = () => {
3787
- u(), n("handle-submit", l.value);
4000
+ } = useForm(l, n.schema), d = () => {
4001
+ u(), o("handle-submit", l.value);
3788
4002
  };
3789
4003
  return onMounted(() => {
3790
- r.value.value = l.value, r.value.errors = i.value, r.value.reset = c, r.value.validate = u;
3791
- }), provide("form", r), provide("values", l), (d, p) => (openBlock(), createElementBlock("form", {
3792
- onSubmit: withModifiers(f, ["prevent"]),
3793
- class: normalizeClass(["grid grid-cols-12", d.layout === "default" ? "gap-6" : "gap-4"])
4004
+ s.value.value = l.value, s.value.errors = i.value, s.value.reset = c, s.value.validate = u;
4005
+ }), provide("form", s), provide("values", l), (f, m) => (openBlock(), createElementBlock("form", {
4006
+ onSubmit: withModifiers(d, ["prevent"]),
4007
+ class: normalizeClass(["grid grid-cols-12", f.layout === "default" ? "gap-6" : "gap-4"])
3794
4008
  }, [
3795
- (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (m) => (openBlock(), createBlock(_sfc_main$1, mergeProps({
3796
- key: m.name,
3797
- class: d.layout === "horizontal" ? "col-span-12" : `col-span-${m.col || 12} `
3798
- }, { ref_for: !0 }, { ...unref(s), ...d.style, ...m }, {
3799
- item: m,
3800
- layout: d.layout,
3801
- modelValue: l.value[m.name],
3802
- "onUpdate:modelValue": (y) => l.value[m.name] = y,
3803
- style: d.style,
3804
- error: unref(i)[m.name]
4009
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(unref(a), (p) => (openBlock(), createBlock(_sfc_main$1, mergeProps({
4010
+ key: p.name,
4011
+ class: f.layout === "horizontal" ? "col-span-12" : `col-span-${p.col || 12} `
4012
+ }, { ref_for: !0 }, { ...unref(r), ...f.style, ...p }, {
4013
+ item: p,
4014
+ layout: f.layout,
4015
+ modelValue: l.value[p.name],
4016
+ "onUpdate:modelValue": (g) => l.value[p.name] = g,
4017
+ style: f.style,
4018
+ error: unref(i)[p.name]
3805
4019
  }), null, 16, ["class", "item", "layout", "modelValue", "onUpdate:modelValue", "style", "error"]))), 128))
3806
4020
  ], 34));
3807
4021
  }
@@ -3811,6 +4025,6 @@ _sfc_main.install = function e(t) {
3811
4025
  };
3812
4026
  export {
3813
4027
  _sfc_main as VForm,
3814
- _sfc_main$B as VsInputText,
4028
+ _sfc_main$C as VsInputText,
3815
4029
  _sfc_main as default
3816
4030
  };