qmap-forms 1.0.5 → 1.0.7

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/index.es.js CHANGED
@@ -1,27 +1,111 @@
1
- import { n as e, r as t, t as n } from "./FieldControl-D0e9k9sx.mjs";
2
- import { Fragment as r, Teleport as i, computed as a, createApp as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, defineAsyncComponent as m, defineComponent as h, h as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onBeforeMount as b, onBeforeUnmount as x, onMounted as S, onUnmounted as C, openBlock as w, ref as T, renderList as E, renderSlot as D, resolveComponent as O, resolveDynamicComponent as k, toDisplayString as A, unref as j, vModelCheckbox as M, vModelRadio as N, vModelSelect as P, vModelText as F, vShow as I, watch as L, withCtx as R, withDirectives as z, withKeys as B, withModifiers as V } from "vue";
3
- import { DateTime as H } from "luxon";
4
- import { BehaviorSubject as U, Subject as W } from "rxjs";
5
- //#region src/components/qArray.vue?vue&type=script&setup=true&lang.ts
6
- var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1
+ import { Fragment as e, Teleport as t, computed as n, createApp as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineAsyncComponent as d, defineComponent as f, h as p, inject as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeMount as v, onBeforeUnmount as y, onMounted as b, onUnmounted as x, openBlock as S, provide as C, ref as w, renderList as T, renderSlot as E, resolveComponent as D, resolveDynamicComponent as O, toDisplayString as k, unref as A, vModelCheckbox as j, vModelRadio as M, vModelSelect as N, vModelText as P, vShow as F, watch as I, withCtx as L, withDirectives as R, withKeys as z, withModifiers as B } from "vue";
2
+ import { DateTime as V } from "luxon";
3
+ import { BehaviorSubject as H, Subject as U } from "rxjs";
4
+ import "leaflet-editable";
5
+ import "leaflet-path-drag";
6
+ import "leaflet";
7
+ //#region \0rolldown/runtime.js
8
+ var ee = /* @__PURE__ */ f({
9
+ __name: "BtnTooltip",
10
+ props: { label: {} },
11
+ setup(n) {
12
+ let r = w(!1), c = w({
13
+ top: "50px",
14
+ left: "50px",
15
+ position: "absolute",
16
+ zIndex: "999"
17
+ });
18
+ w(null);
19
+ let l = w(null), u = w(null), d = `info-btn-tooltip-${Math.random().toString(36).slice(2)}`;
20
+ function f() {
21
+ r.value || (r.value = !0, h(() => {
22
+ g();
23
+ }), document.addEventListener("mousedown", m));
24
+ }
25
+ function p() {
26
+ r.value = !1, document.removeEventListener("mousedown", m);
27
+ }
28
+ function m(e) {
29
+ u.value && l.value && !u.value.contains(e.target) && !l.value.contains(e.target) && p();
30
+ }
31
+ function g() {
32
+ if (l.value && u.value) {
33
+ let e = l.value.getBoundingClientRect(), t = u.value.getBoundingClientRect(), n = e.bottom + window.scrollY + 8, r = Math.max(e.left + window.scrollX + e.width / 2 - t.width / 2, 0);
34
+ c.value = {
35
+ top: `${n}px`,
36
+ left: `${r}px`,
37
+ position: "absolute",
38
+ zIndex: "999"
39
+ };
40
+ }
41
+ }
42
+ return y(() => {
43
+ document.removeEventListener("mousedown", m);
44
+ }), (m, h) => (S(), o(e, null, [s("button", {
45
+ ref_key: "button",
46
+ ref: l,
47
+ onClick: f,
48
+ onBlur: p,
49
+ onMouseover: f,
50
+ class: "qmap-button",
51
+ onMouseleave: p,
52
+ onKeydown: z(p, ["esc"]),
53
+ style: {
54
+ border: "none",
55
+ background: "none"
56
+ },
57
+ "aria-describedby": d
58
+ }, [E(m.$slots, "default")], 544), (S(), i(t, { to: "body" }, [r.value ? (S(), o("div", {
59
+ key: 0,
60
+ id: d,
61
+ class: "tooltip",
62
+ style: _(c.value),
63
+ ref_key: "tooltip",
64
+ ref: u,
65
+ tabindex: "-1"
66
+ }, k(n.label), 5)) : a("", !0)]))], 64));
67
+ }
68
+ }), W = /* @__PURE__ */ f({
69
+ __name: "subtitle-button",
70
+ props: { qMap: {} },
71
+ setup(e) {
72
+ return (t, n) => e.qMap.subtitle ? (S(), i(ee, {
73
+ key: 0,
74
+ label: e.qMap.subtitle
75
+ }, {
76
+ default: L(() => [...n[0] ||= [s("i", { class: "fa fa-question-circle" }, null, -1)]]),
77
+ _: 1
78
+ }, 8, ["label"])) : a("", !0);
79
+ }
80
+ }), G = { class: "block" }, K = /* @__PURE__ */ f({
81
+ __name: "title-block",
82
+ props: { qMap: {} },
83
+ setup(e) {
84
+ return (t, n) => (S(), o("span", G, [
85
+ l(k(e.qMap.title || (e.qMap.id !== "#" && e.qMap.type !== "col" && e.qMap.type !== "group" ? e.qMap.id : "")) + " ", 1),
86
+ E(t.$slots, "default"),
87
+ u(W, { "q-map": e.qMap }, null, 8, ["q-map"])
88
+ ]));
89
+ }
90
+ }), q = { class: "my-2 flex flex-row items-center justify-between" }, te = {
7
91
  key: 0,
8
92
  class: "qmap_array--unset"
9
- }, K = {
93
+ }, J = {
10
94
  key: 1,
11
95
  class: "qmap_array--set"
12
- }, q = {
96
+ }, ne = {
13
97
  key: 0,
14
98
  class: "qmap-card min-w-0 p-6 text-center qmap-empty"
15
- }, J = {
99
+ }, re = {
16
100
  key: 1,
17
101
  class: ""
18
- }, te = {
102
+ }, ie = {
19
103
  key: 0,
20
104
  class: "qmap-card min-w-0 p-3"
21
- }, Y = { class: "flex flex-col" }, ne = { class: "flex items-center gap-3 py-2 qmap-list-row" }, re = { class: "flex-1 min-w-0" }, ie = ["onClick"], X = {
105
+ }, Y = { class: "flex flex-col" }, ae = { class: "flex items-center gap-3 py-2 qmap-list-row" }, oe = { class: "flex-1 min-w-0" }, se = ["onClick"], ce = {
22
106
  key: 1,
23
107
  class: "mt-2 flex flex-col gap-2"
24
- }, ae = { class: "qmap-card min-w-0 p-3 flex flex-row items-center gap-2" }, oe = { class: "flex-1 min-w-0 flex flex-col gap-2 qmap_sub_group mt-2" }, se = ["onClick"], ce = /* @__PURE__ */ h({
108
+ }, le = { class: "qmap-card min-w-0 p-3 flex flex-row items-center gap-2" }, ue = { class: "flex-1 min-w-0 flex flex-col gap-2 qmap_sub_group mt-2" }, de = ["onClick"], fe = /* @__PURE__ */ f({
25
109
  __name: "qArray",
26
110
  props: {
27
111
  qMap: {},
@@ -35,46 +119,46 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
35
119
  },
36
120
  emits: ["qmap_change", "qmap_subquestions"],
37
121
  setup(t, { emit: n }) {
38
- let i = t, a = n, o = T();
39
- b(() => {
40
- let e = i.model[i.qMap.id];
41
- e && i.qMap.item ? o.value = e.slice().map((e) => ({ "#": e })) : e ? o.value = e : !e && i.qMap.required && (o.value = []);
42
- }), L(o, (e) => {
43
- m(e);
122
+ let r = t, c = n, l = w();
123
+ v(() => {
124
+ let e = r.model[r.qMap.id];
125
+ e && r.qMap.item ? l.value = e.slice().map((e) => ({ "#": e })) : e ? l.value = e : !e && r.qMap.required && (l.value = []);
126
+ }), I(l, (e) => {
127
+ p(e);
44
128
  });
45
129
  function d() {
46
- var e = o.value.slice();
47
- i.qMap.item ? e.push({ "#": "" }) : e.push({}), o.value = e, m(o.value);
130
+ var e = l.value.slice();
131
+ r.qMap.item ? e.push({ "#": "" }) : e.push({}), l.value = e, p(l.value);
48
132
  }
49
133
  function f(e, t) {
50
- m(o.value);
134
+ p(l.value);
51
135
  }
52
- function m(e) {
53
- i.qMap.item ? i.model[i.qMap.id] = e.map((e) => e["#"]) : i.model[i.qMap.id] = e.slice(), a("qmap_change", {
54
- qMap: i.qMap,
55
- value: i.model[i.qMap.id]
136
+ function p(e) {
137
+ r.qMap.item ? r.model[r.qMap.id] = e.map((e) => e["#"]) : r.model[r.qMap.id] = e.slice(), c("qmap_change", {
138
+ qMap: r.qMap,
139
+ value: r.model[r.qMap.id]
56
140
  });
57
141
  }
58
- function h(e) {
59
- var t = o.value.slice();
60
- t.splice(e, 1), o.value = t;
142
+ function m(e) {
143
+ var t = l.value.slice();
144
+ t.splice(e, 1), l.value = t;
61
145
  }
62
- return (n, i) => (w(), l("div", null, [u("div", G, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), o.value ? (w(), l("div", K, [u("button", {
146
+ return (n, r) => (S(), o("div", null, [s("div", q, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), l.value ? (S(), o("div", J, [s("button", {
63
147
  type: "button",
64
148
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
65
149
  "aria-label": "Add item",
66
- onClick: i[1] ||= (e) => d()
67
- }, "+")])) : (w(), l("div", ee, [u("button", {
150
+ onClick: r[1] ||= (e) => d()
151
+ }, "+")])) : (S(), o("div", te, [s("button", {
68
152
  type: "button",
69
153
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
70
154
  "aria-label": "Add item",
71
- onClick: i[0] ||= (e) => {
72
- o.value = [], d();
155
+ onClick: r[0] ||= (e) => {
156
+ l.value = [], d();
73
157
  }
74
- }, "+")]))]), !o.value || !o.value.length ? (w(), l("div", q, [...i[2] ||= [u("i", null, "Not set", -1)]])) : (w(), l("div", J, [t.qMap.item ? (w(), l("div", te, [u("div", Y, [(w(!0), l(r, null, E(o.value, (e, n) => (w(), l("div", ne, [u("div", re, [p(Q, {
158
+ }, "+")]))]), !l.value || !l.value.length ? (S(), o("div", ne, [...r[2] ||= [s("i", null, "Not set", -1)]])) : (S(), o("div", re, [t.qMap.item ? (S(), o("div", ie, [s("div", Y, [(S(!0), o(e, null, T(l.value, (e, n) => (S(), o("div", ae, [s("div", oe, [u(Q, {
75
159
  qMap: t.qMap.item,
76
- modelValue: o.value[n],
77
- "onUpdate:modelValue": [(e) => o.value[n] = e, (e) => f(n, e)],
160
+ modelValue: l.value[n],
161
+ "onUpdate:modelValue": [(e) => l.value[n] = e, (e) => f(n, e)],
78
162
  extras: t.extras,
79
163
  provider: t.provider,
80
164
  readOnly: t.readOnly || t.qMap.readOnly
@@ -85,15 +169,15 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
85
169
  "extras",
86
170
  "provider",
87
171
  "readOnly"
88
- ])]), u("button", {
172
+ ])]), s("button", {
89
173
  type: "button",
90
174
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
91
175
  "aria-label": "Remove item",
92
- onClick: (e) => h(n)
93
- }, [...i[3] ||= [u("i", { class: "fa fa-trash" }, null, -1)]], 8, ie)]))), 256))])])) : t.qMap.items ? (w(), l("div", X, [(w(!0), l(r, null, E(o.value, (e, n) => (w(), l("div", ae, [u("div", oe, [(w(!0), l(r, null, E(t.qMap.items, (e) => (w(), s(Q, {
176
+ onClick: (e) => m(n)
177
+ }, [...r[3] ||= [s("i", { class: "fa fa-trash" }, null, -1)]], 8, se)]))), 256))])])) : t.qMap.items ? (S(), o("div", ce, [(S(!0), o(e, null, T(l.value, (n, a) => (S(), o("div", le, [s("div", ue, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), i(Q, {
94
178
  qMap: e,
95
- modelValue: o.value[n],
96
- "onUpdate:modelValue": [(e) => o.value[n] = e, (e) => f(n, e)],
179
+ modelValue: l.value[a],
180
+ "onUpdate:modelValue": [(e) => l.value[a] = e, (e) => f(a, e)],
97
181
  extras: t.extras,
98
182
  provider: t.provider,
99
183
  lite: t.lite,
@@ -106,18 +190,18 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
106
190
  "provider",
107
191
  "lite",
108
192
  "readOnly"
109
- ]))), 256))]), u("button", {
193
+ ]))), 256))]), s("button", {
110
194
  type: "button",
111
195
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
112
196
  "aria-label": "Remove item",
113
- onClick: (e) => h(n)
114
- }, [...i[4] ||= [u("i", { class: "fa fa-times" }, null, -1)]], 8, se)]))), 256))])) : c("", !0)]))]));
197
+ onClick: (e) => m(a)
198
+ }, [...r[4] ||= [s("i", { class: "fa fa-times" }, null, -1)]], 8, de)]))), 256))])) : a("", !0)]))]));
115
199
  }
116
- }), le = { class: "flex items-center gap-1" }, ue = [
200
+ }), pe = { class: "flex items-center gap-1" }, me = [
117
201
  "aria-checked",
118
202
  "aria-label",
119
203
  "disabled"
120
- ], de = /*@__PURE__*/ h({
204
+ ], he = /*@__PURE__*/ f({
121
205
  __name: "ToggleSwitch",
122
206
  props: {
123
207
  modelValue: { type: Boolean },
@@ -127,58 +211,58 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
127
211
  },
128
212
  emits: ["update:modelValue"],
129
213
  setup(e, { emit: t }) {
130
- let n = e, r = t, i = a(() => n.modelValue);
131
- function o() {
132
- n.allowUndefined ? i.value === void 0 ? r("update:modelValue", !1) : i.value === !1 ? r("update:modelValue", !0) : r("update:modelValue", void 0) : r("update:modelValue", i.value !== !0);
214
+ let r = e, i = t, a = n(() => r.modelValue);
215
+ function c() {
216
+ r.allowUndefined ? a.value === void 0 ? i("update:modelValue", !1) : a.value === !1 ? i("update:modelValue", !0) : i("update:modelValue", void 0) : i("update:modelValue", a.value !== !0);
133
217
  }
134
- let s = a(() => [
135
- i.value === !0 && "toggle-checked",
136
- i.value === !1 && "toggle-unchecked",
137
- i.value === void 0 && "toggle-indeterminate",
138
- n.disabled === !0 && "toggle-disabled"
139
- ].filter(Boolean).join(" ")), c = a(() => [
140
- i.value === !0 && "slider-checked",
141
- i.value === !1 && "slider-unchecked",
142
- i.value === void 0 && "slider-indeterminate"
218
+ let l = n(() => [
219
+ a.value === !0 && "toggle-checked",
220
+ a.value === !1 && "toggle-unchecked",
221
+ a.value === void 0 && "toggle-indeterminate",
222
+ r.disabled === !0 && "toggle-disabled"
223
+ ].filter(Boolean).join(" ")), u = n(() => [
224
+ a.value === !0 && "slider-checked",
225
+ a.value === !1 && "slider-unchecked",
226
+ a.value === void 0 && "slider-indeterminate"
143
227
  ].filter(Boolean).join(" "));
144
- return (t, n) => (w(), l("span", le, [u("button", {
228
+ return (t, n) => (S(), o("span", pe, [s("button", {
145
229
  type: "button",
146
- class: v(["toggle-root", s.value]),
147
- onClick: o,
148
- "aria-checked": String(i.value),
230
+ class: g(["toggle-root", l.value]),
231
+ onClick: c,
232
+ "aria-checked": String(a.value),
149
233
  "aria-label": e.ariaLabel,
150
234
  disabled: e.disabled
151
- }, [u("span", { class: v(["toggle-slider", c.value]) }, null, 2)], 10, ue), D(t.$slots, "default", {}, void 0, !0)]));
235
+ }, [s("span", { class: g(["toggle-slider", u.value]) }, null, 2)], 10, me), E(t.$slots, "default", {}, void 0, !0)]));
152
236
  }
153
- }), fe = (e, t) => {
237
+ }), ge = (e, t) => {
154
238
  let n = e.__vccOpts || e;
155
239
  for (let [e, r] of t) n[e] = r;
156
240
  return n;
157
- }, pe = /*#__PURE__*/ fe(de, [["__scopeId", "data-v-edf9fc7d"]]), me = {
241
+ }, _e = /*#__PURE__*/ ge(he, [["__scopeId", "data-v-edf9fc7d"]]), ve = {
158
242
  key: 0,
159
243
  class: "inline-flex items-center gap-2"
160
- }, he = ["for"], ge = {
244
+ }, ye = ["for"], be = {
161
245
  key: 0,
162
246
  class: "qmap-required"
163
- }, _e = {
247
+ }, xe = {
164
248
  key: 1,
165
249
  class: "qmap-required"
166
- }, ve = {
250
+ }, Se = {
167
251
  key: 2,
168
252
  class: "qmap-button-field sm:flex items-center"
169
- }, ye = { class: "sm:w-1/2 md:w-1/4 lg:w-1/5" }, be = {
253
+ }, Ce = { class: "sm:w-1/2 md:w-1/4 lg:w-1/5" }, we = {
170
254
  key: 0,
171
255
  class: "qmap-required"
172
- }, xe = {
256
+ }, Te = {
173
257
  class: "btn-group sm:w-1/2 md:w-2/4 lg:w-1/4 flex",
174
258
  role: "group"
175
- }, Se = ["aria-pressed", "disabled"], Ce = ["aria-pressed", "disabled"], we = ["for"], Te = ["id", "disabled"], Ee = {
259
+ }, Ee = ["aria-pressed", "disabled"], De = ["aria-pressed", "disabled"], Oe = ["for"], ke = ["id", "disabled"], Ae = {
176
260
  key: 0,
177
261
  class: "qmap-required"
178
- }, De = {
262
+ }, je = {
179
263
  key: 1,
180
264
  class: "qmap-required"
181
- }, Oe = /* @__PURE__ */ h({
265
+ }, Me = /* @__PURE__ */ f({
182
266
  __name: "qBool",
183
267
  props: {
184
268
  qMap: {},
@@ -191,94 +275,118 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
191
275
  style: {}
192
276
  },
193
277
  emits: ["qmap_change", "qmap_subquestions"],
194
- setup(t, { emit: n }) {
195
- let r = t, i = n, a = T(r.model[r.qMap.id]);
196
- L(a, (e) => i("qmap_subquestions", e === !0 ? r.qMap.onPos : e === !1 ? r.qMap.onNeg : void 0)), L(() => r.model, (e) => a.value = e[r.qMap.id]), b(() => i("qmap_subquestions", a.value === !0 ? r.qMap.onPos : a.value === !1 ? r.qMap.onNeg : void 0));
197
- function o(e) {
198
- r.model[r.qMap.id] = e, i("qmap_change", {
199
- qMap: r.qMap,
278
+ setup(e, { emit: t }) {
279
+ let n = e, r = t, c = w(n.model[n.qMap.id]);
280
+ I(c, (e) => r("qmap_subquestions", e === !0 ? n.qMap.onPos : e === !1 ? n.qMap.onNeg : void 0)), I(() => n.model, (e) => c.value = e[n.qMap.id]), v(() => r("qmap_subquestions", c.value === !0 ? n.qMap.onPos : c.value === !1 ? n.qMap.onNeg : void 0));
281
+ function l(e) {
282
+ n.model[n.qMap.id] = e, r("qmap_change", {
283
+ qMap: n.qMap,
200
284
  value: e
201
285
  });
202
286
  }
203
287
  function d(e) {
204
- a.value = e, o(e);
288
+ c.value = e, l(e);
205
289
  }
206
- return (n, r) => t.lite && t.readOnly ? (w(), l("span", me, A(a.value ? "✓" : "□"), 1)) : t.qMap.style === "switch" ? (w(), l("label", {
290
+ return (t, n) => e.lite && e.readOnly ? (S(), o("span", ve, k(c.value ? "✓" : "□"), 1)) : e.qMap.style === "switch" ? (S(), o("label", {
207
291
  key: 1,
208
292
  class: "inline-flex items-center gap-2 min-h-8 qmap-check-row",
209
- for: t.qMap.id
210
- }, [p(pe, {
211
- modelValue: a.value,
212
- "onUpdate:modelValue": [r[0] ||= (e) => a.value = e, d],
213
- disabled: t.readOnly
214
- }, null, 8, ["modelValue", "disabled"]), t.lite ? t.qMap.required ? (w(), l("span", _e, [...r[6] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0) : (w(), s(e, {
293
+ for: e.qMap.id
294
+ }, [u(_e, {
295
+ modelValue: c.value,
296
+ "onUpdate:modelValue": [n[0] ||= (e) => c.value = e, d],
297
+ disabled: e.readOnly
298
+ }, null, 8, ["modelValue", "disabled"]), e.lite ? e.qMap.required ? (S(), o("span", xe, [...n[6] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0) : (S(), i(K, {
215
299
  key: 0,
216
- "q-map": t.qMap
300
+ "q-map": e.qMap
217
301
  }, {
218
- default: R(() => [t.qMap.required ? (w(), l("span", ge, [...r[5] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0)]),
302
+ default: L(() => [e.qMap.required ? (S(), o("span", be, [...n[5] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
219
303
  _: 1
220
- }, 8, ["q-map"]))], 8, he)) : t.qMap.style === "button" ? (w(), l("div", ve, [u("div", ye, [p(e, { "q-map": t.qMap }, {
221
- default: R(() => [t.qMap.required ? (w(), l("span", be, [...r[7] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0)]),
304
+ }, 8, ["q-map"]))], 8, ye)) : e.qMap.style === "button" ? (S(), o("div", Se, [s("div", Ce, [u(K, { "q-map": e.qMap }, {
305
+ default: L(() => [e.qMap.required ? (S(), o("span", we, [...n[7] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
222
306
  _: 1
223
- }, 8, ["q-map"])]), u("div", xe, [u("button", {
307
+ }, 8, ["q-map"])]), s("div", Te, [s("button", {
224
308
  type: "button",
225
- "aria-pressed": a.value === !0,
226
- class: v(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": a.value === !0 }]),
227
- disabled: t.readOnly,
228
- onClick: r[1] ||= (e) => d(!0)
229
- }, A(t.qMap.pos || "Yes"), 11, Se), u("button", {
309
+ "aria-pressed": c.value === !0,
310
+ class: g(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": c.value === !0 }]),
311
+ disabled: e.readOnly,
312
+ onClick: n[1] ||= (e) => d(!0)
313
+ }, k(e.qMap.pos || "Yes"), 11, Ee), s("button", {
230
314
  type: "button",
231
- "aria-pressed": a.value === !1,
232
- class: v(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": a.value === !1 }]),
233
- disabled: t.readOnly,
234
- onClick: r[2] ||= (e) => d(!1)
235
- }, A(t.qMap.neg || "No"), 11, Ce)])])) : (w(), l("label", {
315
+ "aria-pressed": c.value === !1,
316
+ class: g(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": c.value === !1 }]),
317
+ disabled: e.readOnly,
318
+ onClick: n[2] ||= (e) => d(!1)
319
+ }, k(e.qMap.neg || "No"), 11, De)])])) : (S(), o("label", {
236
320
  key: 3,
237
321
  class: "inline-flex items-center gap-2 min-h-8 my-2 qmap-check-row",
238
- for: t.qMap.id
239
- }, [z(u("input", {
240
- id: t.qMap.id,
241
- "onUpdate:modelValue": r[3] ||= (e) => a.value = e,
322
+ for: e.qMap.id
323
+ }, [R(s("input", {
324
+ id: e.qMap.id,
325
+ "onUpdate:modelValue": n[3] ||= (e) => c.value = e,
242
326
  type: "checkbox",
243
327
  class: "qmap-checkbox",
244
- disabled: t.readOnly,
245
- onChange: r[4] ||= (e) => o(a.value)
246
- }, null, 40, Te), [[M, a.value]]), t.lite ? t.qMap.required && !a.value ? (w(), l("span", De, [...r[9] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0) : (w(), s(e, {
328
+ disabled: e.readOnly,
329
+ onChange: n[4] ||= (e) => l(c.value)
330
+ }, null, 40, ke), [[j, c.value]]), e.lite ? e.qMap.required && !c.value ? (S(), o("span", je, [...n[9] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0) : (S(), i(K, {
247
331
  key: 0,
248
- "q-map": t.qMap
332
+ "q-map": e.qMap
249
333
  }, {
250
- default: R(() => [t.qMap.required && !a.value ? (w(), l("span", Ee, [...r[8] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0)]),
334
+ default: L(() => [e.qMap.required && !c.value ? (S(), o("span", Ae, [...n[8] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
251
335
  _: 1
252
- }, 8, ["q-map"]))], 8, we));
336
+ }, 8, ["q-map"]))], 8, Oe));
337
+ }
338
+ }), Ne = {
339
+ key: 0,
340
+ class: "inline-flex shrink-0 items-center gap-1 qmap-control-prepend"
341
+ }, Pe = {
342
+ key: 1,
343
+ class: "inline-flex shrink-0 items-center gap-1 qmap-control-append"
344
+ }, X = /* @__PURE__ */ f({
345
+ __name: "FieldControl",
346
+ props: {
347
+ invalid: { type: Boolean },
348
+ disabled: { type: Boolean },
349
+ multiline: { type: Boolean }
350
+ },
351
+ setup(e) {
352
+ return (t, n) => (S(), o("div", { class: g(["flex items-center gap-2 min-w-0 min-h-10 px-3 qmap-control", {
353
+ "items-start": e.multiline,
354
+ "qmap-control-invalid": e.invalid,
355
+ "qmap-control-disabled": e.disabled
356
+ }]) }, [
357
+ t.$slots.prepend ? (S(), o("div", Ne, [E(t.$slots, "prepend")])) : a("", !0),
358
+ E(t.$slots, "default"),
359
+ t.$slots.append ? (S(), o("div", Pe, [E(t.$slots, "append")])) : a("", !0)
360
+ ], 2));
253
361
  }
254
- }), ke = {
362
+ }), Fe = {
255
363
  key: 0,
256
364
  class: "inline-flex items-center gap-2"
257
- }, Ae = { class: "qmap-field flex flex-col gap-1.5 min-w-0 text-sm" }, je = [
365
+ }, Ie = { class: "qmap-field flex flex-col gap-1.5 min-w-0 text-sm" }, Le = [
258
366
  "aria-expanded",
259
367
  "aria-label",
260
368
  "disabled",
261
369
  "onKeydown"
262
- ], Me = {
370
+ ], Re = {
263
371
  key: 0,
264
372
  class: "qmap-required",
265
373
  "aria-hidden": "true"
266
- }, Ne = {
374
+ }, ze = {
267
375
  key: 1,
268
376
  class: "absolute z-50 top-full left-0 mt-1 w-9/10 overflow-hidden qmap-select-dropdown"
269
- }, Pe = { class: "flex items-center gap-2 px-3 py-2 qmap-select-search-wrap" }, Fe = ["aria-multiselectable"], Ie = [
377
+ }, Be = { class: "flex items-center gap-2 px-3 py-2 qmap-select-search-wrap" }, Ve = ["aria-multiselectable"], He = [
270
378
  "aria-selected",
271
379
  "onMouseenter",
272
380
  "onKeydown",
273
381
  "onClick"
274
- ], Le = {
382
+ ], Ue = {
275
383
  key: 0,
276
384
  class: "inline-flex w-4 justify-center",
277
385
  "aria-hidden": "true"
278
- }, Re = { class: "flex-1 min-w-0" }, ze = {
386
+ }, We = { class: "flex-1 min-w-0" }, Ge = {
279
387
  key: 0,
280
388
  class: "m-0 p-3 text-center qmap-select-empty"
281
- }, Be = /* @__PURE__ */ h({
389
+ }, Ke = /* @__PURE__ */ f({
282
390
  __name: "SimpleChoice",
283
391
  props: {
284
392
  modelValue: {},
@@ -289,214 +397,214 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
289
397
  required: { type: Boolean }
290
398
  },
291
399
  emits: ["update:model-value"],
292
- setup(t, { emit: i }) {
293
- let o = t, m = i, h = T(), g = T(), b = [], C = T(!1), O = T(""), k = T(0), j = T([]), M = T(o.multi ? [] : void 0), N = `qmap-select-${Math.random().toString(36).slice(2)}`, P = {
400
+ setup(t, { emit: r }) {
401
+ let d = t, f = r, p = w(), m = w(), v = [], x = w(!1), C = w(""), D = w(0), O = w([]), A = w(d.multi ? [] : void 0), j = `qmap-select-${Math.random().toString(36).slice(2)}`, M = {
294
402
  title: "Not set",
295
403
  value: null,
296
404
  icon: "fa fa-ban",
297
405
  colour: "#71717a"
298
- }, I = a(() => {
299
- let e = O.value.trim().toLocaleLowerCase();
300
- return e ? j.value.filter((t) => G(t).toLocaleLowerCase().includes(e)) : j.value;
301
- }), H = a(() => o.multi ? I.value : [P, ...I.value]), U = a(() => o.multi ? o.qMap.icon : M.value?.icon), W = a(() => o.multi ? (M.value || []).map((e) => G(e)).join(", ") || "Select…" : M.value?.value == null ? "Not set" : G(M.value));
302
- L(() => o.qMap.values, ee, {
406
+ }, N = n(() => {
407
+ let e = C.value.trim().toLocaleLowerCase();
408
+ return e ? O.value.filter((t) => U(t).toLocaleLowerCase().includes(e)) : O.value;
409
+ }), F = n(() => d.multi ? N.value : [M, ...N.value]), V = n(() => d.multi ? d.qMap.icon : A.value?.icon), H = n(() => d.multi ? (A.value || []).map((e) => U(e)).join(", ") || "Select…" : A.value?.value == null ? "Not set" : U(A.value));
410
+ I(() => d.qMap.values, ee, {
303
411
  immediate: !0,
304
412
  deep: !0
305
- }), L(() => o.modelValue, (e) => {
306
- M.value = K(e);
307
- }, { immediate: !0 }), L(() => o.multi, () => {
308
- M.value = K(o.modelValue), J();
309
- }), L(I, (e) => {
310
- k.value = Math.min(k.value, Math.max(0, H.value.length - 1));
311
- }), L(O, () => {
312
- k.value = 0;
413
+ }), I(() => d.modelValue, (e) => {
414
+ A.value = W(e);
415
+ }, { immediate: !0 }), I(() => d.multi, () => {
416
+ A.value = W(d.modelValue), q();
417
+ }), I(N, (e) => {
418
+ D.value = Math.min(D.value, Math.max(0, F.value.length - 1));
419
+ }), I(C, () => {
420
+ D.value = 0;
313
421
  });
314
- function G(e) {
422
+ function U(e) {
315
423
  return String(e.title ?? e.value ?? "Not set");
316
424
  }
317
425
  function ee() {
318
- j.value = (o.qMap.values || []).map((e) => ({
426
+ O.value = (d.qMap.values || []).map((e) => ({
319
427
  ...e,
320
428
  title: e.title || String(e.value ?? "Not set")
321
- })), M.value = K(o.modelValue);
429
+ })), A.value = W(d.modelValue);
322
430
  }
323
- function K(e) {
324
- return o.multi ? Array.isArray(e) ? j.value.filter((t) => e.some((e) => Object.is(e, t.value))) : [] : j.value.find((t) => Object.is(t.value, e)) || P;
431
+ function W(e) {
432
+ return d.multi ? Array.isArray(e) ? O.value.filter((t) => e.some((e) => Object.is(e, t.value))) : [] : O.value.find((t) => Object.is(t.value, e)) || M;
325
433
  }
326
- function q(e) {
327
- return o.multi ? (M.value || []).some((t) => Object.is(t.value, e.value)) : e.value == null ? M.value?.value == null : Object.is(M.value?.value, e.value);
434
+ function G(e) {
435
+ return d.multi ? (A.value || []).some((t) => Object.is(t.value, e.value)) : e.value == null ? A.value?.value == null : Object.is(A.value?.value, e.value);
328
436
  }
329
- function J() {
330
- m("update:model-value", o.multi ? (M.value || []).map((e) => e.value) : M.value?.value);
437
+ function q() {
438
+ f("update:model-value", d.multi ? (A.value || []).map((e) => e.value) : A.value?.value);
331
439
  }
332
440
  function te() {
333
- o.readOnly || C.value || (C.value = !0, O.value = "", k.value = 0, _(() => g.value?.focus()));
441
+ d.readOnly || x.value || (x.value = !0, C.value = "", D.value = 0, h(() => m.value?.focus()));
334
442
  }
335
- function Y() {
336
- C.value = !1, O.value = "";
443
+ function J() {
444
+ x.value = !1, C.value = "";
337
445
  }
338
446
  function ne(e) {
339
- if (o.multi) {
340
- let t = M.value || [];
341
- M.value = q(e) ? t.filter((t) => !Object.is(t.value, e.value)) : [...t, e], J();
447
+ if (d.multi) {
448
+ let t = A.value || [];
449
+ A.value = G(e) ? t.filter((t) => !Object.is(t.value, e.value)) : [...t, e], q();
342
450
  return;
343
451
  }
344
- M.value = e, J(), Y();
452
+ A.value = e, q(), J();
345
453
  }
346
454
  function re() {
347
- M.value = o.multi ? [] : {
455
+ A.value = d.multi ? [] : {
348
456
  title: "Not set",
349
457
  value: null
350
- }, J(), o.multi || Y();
458
+ }, q(), d.multi || J();
351
459
  }
352
460
  function ie(e, t) {
353
- t instanceof HTMLButtonElement && (b[e] = t);
461
+ t instanceof HTMLButtonElement && (v[e] = t);
354
462
  }
355
- function X(e) {
356
- H.value.length && (k.value = (e + H.value.length) % H.value.length, _(() => b[k.value]?.focus()));
463
+ function Y(e) {
464
+ F.value.length && (D.value = (e + F.value.length) % F.value.length, h(() => v[D.value]?.focus()));
357
465
  }
358
466
  function ae(e) {
359
- e.key === "ArrowDown" ? (e.preventDefault(), X(k.value)) : e.key === "Escape" ? (e.preventDefault(), Y()) : e.key === "Enter" && H.value[k.value] && (e.preventDefault(), ne(H.value[k.value]));
467
+ e.key === "ArrowDown" ? (e.preventDefault(), Y(D.value)) : e.key === "Escape" ? (e.preventDefault(), J()) : e.key === "Enter" && F.value[D.value] && (e.preventDefault(), ne(F.value[D.value]));
360
468
  }
361
469
  function oe(e, t) {
362
- e.key === "ArrowDown" ? (e.preventDefault(), X(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), X(t - 1)) : e.key === "Escape" ? (e.preventDefault(), Y()) : e.key === "Tab" && !e.shiftKey && t === H.value.length - 1 && Y();
470
+ e.key === "ArrowDown" ? (e.preventDefault(), Y(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), Y(t - 1)) : e.key === "Escape" ? (e.preventDefault(), J()) : e.key === "Tab" && !e.shiftKey && t === F.value.length - 1 && J();
363
471
  }
364
472
  function se(e) {
365
- h.value && !h.value.contains(e.target) && Y();
473
+ p.value && !p.value.contains(e.target) && J();
366
474
  }
367
- return S(() => document.addEventListener("pointerdown", se)), x(() => document.removeEventListener("pointerdown", se)), (i, a) => t.lite && t.readOnly ? (w(), l("div", ke, [M.value?.icon ? (w(), l("i", {
475
+ return b(() => document.addEventListener("pointerdown", se)), y(() => document.removeEventListener("pointerdown", se)), (n, r) => t.lite && t.readOnly ? (S(), o("div", Fe, [A.value?.icon ? (S(), o("i", {
368
476
  key: 0,
369
- class: v(M.value.icon),
370
- style: y({ color: M.value.colour }),
477
+ class: g(A.value.icon),
478
+ style: _({ color: A.value.colour }),
371
479
  "aria-hidden": "true"
372
- }, null, 6)) : c("", !0), f(" " + A(W.value), 1)])) : (w(), l("div", {
480
+ }, null, 6)) : a("", !0), l(" " + k(H.value), 1)])) : (S(), o("div", {
373
481
  key: 1,
374
482
  ref_key: "root",
375
- ref: h,
483
+ ref: p,
376
484
  class: "flex flex-col relative w-full gap-1 min-w-0 min-h-10"
377
485
  }, [
378
- t.lite ? c("", !0) : (w(), s(e, {
486
+ t.lite ? a("", !0) : (S(), i(K, {
379
487
  key: 0,
380
488
  "q-map": t.qMap
381
489
  }, null, 8, ["q-map"])),
382
- u("label", Ae, [p(n, { disabled: t.readOnly }, d({
383
- append: R(() => [
384
- t.required && (!M.value || M.value?.value == null) ? (w(), l("span", Me, [...a[2] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0),
385
- (t.multi ? M.value?.length : M.value?.value != null) && !t.readOnly ? (w(), l("button", {
490
+ s("label", Ie, [u(X, { disabled: t.readOnly }, c({
491
+ append: L(() => [
492
+ t.required && (!A.value || A.value?.value == null) ? (S(), o("span", Re, [...r[2] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0),
493
+ (t.multi ? A.value?.length : A.value?.value != null) && !t.readOnly ? (S(), o("button", {
386
494
  key: 1,
387
495
  type: "button",
388
496
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-select-clear",
389
497
  "aria-label": "Clear selection",
390
- onClick: V(re, ["stop"])
391
- }, [...a[3] ||= [u("i", { class: "fa fa-times" }, null, -1)]])) : c("", !0),
392
- u("i", {
393
- class: v(["fa fa-chevron-down qmap-select-chevron", { "qmap-select-chevron-open": C.value }]),
498
+ onClick: B(re, ["stop"])
499
+ }, [...r[3] ||= [s("i", { class: "fa fa-times" }, null, -1)]])) : a("", !0),
500
+ s("i", {
501
+ class: g(["fa fa-chevron-down qmap-select-chevron", { "qmap-select-chevron-open": x.value }]),
394
502
  "aria-hidden": "true"
395
503
  }, null, 2)
396
504
  ]),
397
- default: R(() => [u("button", {
505
+ default: L(() => [s("button", {
398
506
  type: "button",
399
507
  class: "qmap-input qmap-select-trigger flex flex-1 min-w-0 min-h-0 items-center justify-start px-0 py-2 text-left",
400
508
  role: "combobox",
401
- "aria-expanded": C.value,
402
- "aria-controls": N,
509
+ "aria-expanded": x.value,
510
+ "aria-controls": j,
403
511
  "aria-label": t.qMap.title || t.qMap.id,
404
512
  disabled: t.readOnly,
405
- onClick: a[0] ||= (e) => C.value ? Y() : te(),
406
- onKeydown: [B(V(te, ["prevent"]), ["down"]), B(V(Y, ["prevent"]), ["esc"])]
407
- }, [u("span", { class: v(["flex flex-1 min-w-0 items-center flex-wrap gap-1 overflow-hidden", { "qmap-select-placeholder": !o.multi && M.value?.value == null }]) }, [t.multi && M.value?.length ? (w(!0), l(r, { key: 0 }, E(M.value, (e) => (w(), l("span", {
513
+ onClick: r[0] ||= (e) => x.value ? J() : te(),
514
+ onKeydown: [z(B(te, ["prevent"]), ["down"]), z(B(J, ["prevent"]), ["esc"])]
515
+ }, [s("span", { class: g(["flex flex-1 min-w-0 items-center flex-wrap gap-1 overflow-hidden", { "qmap-select-placeholder": !d.multi && A.value?.value == null }]) }, [t.multi && A.value?.length ? (S(!0), o(e, { key: 0 }, T(A.value, (e) => (S(), o("span", {
408
516
  key: String(e.value),
409
517
  class: "inline-flex max-w-full items-center qmap-select-chip"
410
- }, A(G(e)), 1))), 128)) : (w(), l(r, { key: 1 }, [f(A(W.value), 1)], 64))], 2)], 40, je)]),
518
+ }, k(U(e)), 1))), 128)) : (S(), o(e, { key: 1 }, [l(k(H.value), 1)], 64))], 2)], 40, Le)]),
411
519
  _: 2
412
- }, [U.value || t.qMap.icon ? {
520
+ }, [V.value || t.qMap.icon ? {
413
521
  name: "prepend",
414
- fn: R(() => [D(i.$slots, "default"), u("i", {
415
- class: v(U.value),
416
- style: y({ color: M.value?.colour }),
522
+ fn: L(() => [E(n.$slots, "default"), s("i", {
523
+ class: g(V.value),
524
+ style: _({ color: A.value?.colour }),
417
525
  "aria-hidden": "true"
418
526
  }, null, 6)]),
419
527
  key: "0"
420
528
  } : void 0]), 1032, ["disabled"])]),
421
- C.value ? (w(), l("div", Ne, [u("div", Pe, [a[4] ||= u("i", {
529
+ x.value ? (S(), o("div", ze, [s("div", Be, [r[4] ||= s("i", {
422
530
  class: "fa fa-search qmap-select-search-icon",
423
531
  "aria-hidden": "true"
424
- }, null, -1), z(u("input", {
532
+ }, null, -1), R(s("input", {
425
533
  ref_key: "searchInput",
426
- ref: g,
427
- "onUpdate:modelValue": a[1] ||= (e) => O.value = e,
534
+ ref: m,
535
+ "onUpdate:modelValue": r[1] ||= (e) => C.value = e,
428
536
  type: "search",
429
537
  class: "flex-1 min-w-0 qmap-select-search",
430
538
  placeholder: "Search…",
431
539
  autocomplete: "off",
432
540
  "aria-label": "Search options",
433
541
  onKeydown: ae
434
- }, null, 544), [[F, O.value]])]), u("div", {
435
- id: N,
542
+ }, null, 544), [[P, C.value]])]), s("div", {
543
+ id: j,
436
544
  class: "max-h-64 overflow-auto p-1",
437
545
  role: "listbox",
438
546
  "aria-multiselectable": t.multi || void 0
439
- }, [(w(!0), l(r, null, E(H.value, (e, n) => (w(), l("button", {
440
- key: `${n}-${String(e.value)}`,
547
+ }, [(S(!0), o(e, null, T(F.value, (e, r) => (S(), o("button", {
548
+ key: `${r}-${String(e.value)}`,
441
549
  ref_for: !0,
442
- ref: (e) => ie(n, e),
550
+ ref: (e) => ie(r, e),
443
551
  type: "button",
444
552
  role: "option",
445
- class: v(["flex w-full min-h-9 items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm qmap-select-option", {
446
- "qmap-select-option-active": k.value === n,
447
- "qmap-select-option-selected": q(e)
553
+ class: g(["flex w-full min-h-9 items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm qmap-select-option", {
554
+ "qmap-select-option-active": D.value === r,
555
+ "qmap-select-option-selected": G(e)
448
556
  }]),
449
- "aria-selected": q(e),
450
- onMouseenter: (e) => k.value = n,
451
- onKeydown: (e) => oe(e, n),
557
+ "aria-selected": G(e),
558
+ onMouseenter: (e) => D.value = r,
559
+ onKeydown: (e) => oe(e, r),
452
560
  onClick: (t) => ne(e)
453
- }, [D(i.$slots, "option", {
561
+ }, [E(n.$slots, "option", {
454
562
  option: e,
455
- selected: q(e),
456
- active: k.value === n
563
+ selected: G(e),
564
+ active: D.value === r
457
565
  }, () => [
458
- t.multi ? (w(), l("span", Le, A(q(e) ? "✓" : ""), 1)) : c("", !0),
459
- e.icon ? (w(), l("i", {
566
+ t.multi ? (S(), o("span", Ue, k(G(e) ? "✓" : ""), 1)) : a("", !0),
567
+ e.icon ? (S(), o("i", {
460
568
  key: 1,
461
- class: v([e.icon, "w-4 text-center"]),
462
- style: y({ color: e.colour }),
569
+ class: g([e.icon, "w-4 text-center"]),
570
+ style: _({ color: e.colour }),
463
571
  "aria-hidden": "true"
464
- }, null, 6)) : c("", !0),
465
- u("span", Re, A(G(e)), 1)
466
- ])], 42, Ie))), 128)), H.value.length ? c("", !0) : (w(), l("p", ze, "No options found."))], 8, Fe)])) : c("", !0)
572
+ }, null, 6)) : a("", !0),
573
+ s("span", We, k(U(e)), 1)
574
+ ])], 42, He))), 128)), F.value.length ? a("", !0) : (S(), o("p", Ge, "No options found."))], 8, Ve)])) : a("", !0)
467
575
  ], 512));
468
576
  }
469
- }), Ve = {
577
+ }), qe = {
470
578
  key: 0,
471
579
  class: "block"
472
- }, He = /* @__PURE__ */ h({
580
+ }, Je = /* @__PURE__ */ f({
473
581
  __name: "icon-block",
474
582
  props: { qMap: {} },
475
583
  setup(e) {
476
- let t = e, n = a(() => [t.qMap.icon || "", t.qMap.colour || ""].reduce((e, t) => e + " " + t));
477
- return (t, r) => e.qMap.icon ? (w(), l("span", Ve, [u("i", { class: v(n.value) }, null, 2)])) : c("", !0);
584
+ let t = e, r = n(() => [t.qMap.icon || "", t.qMap.colour || ""].reduce((e, t) => e + " " + t));
585
+ return (t, n) => e.qMap.icon ? (S(), o("span", qe, [s("i", { class: g(r.value) }, null, 2)])) : a("", !0);
478
586
  }
479
- }), Ue = { key: 0 }, We = { class: "inline-flex items-center gap-2" }, Ge = [
587
+ }), Ye = { key: 0 }, Xe = { class: "inline-flex items-center gap-2" }, Ze = [
480
588
  "name",
481
589
  "value",
482
590
  "disabled",
483
591
  "onChange"
484
- ], Ke = { class: "mt-1 inline-flex items-center gap-1" }, qe = { key: 1 }, Je = { class: "inline-flex items-center gap-2 min-h-8 qmap-check-row" }, Ye = [
592
+ ], Qe = { class: "mt-1 inline-flex items-center gap-1" }, $e = { key: 1 }, et = { class: "inline-flex items-center gap-2 min-h-8 qmap-check-row" }, tt = [
485
593
  "name",
486
594
  "value",
487
595
  "disabled",
488
596
  "onChange"
489
- ], Xe = { class: "mt-1" }, Ze = {
597
+ ], nt = { class: "mt-1" }, rt = {
490
598
  key: 2,
491
599
  class: "sm:flex items-center"
492
- }, Qe = { class: "sm:w-1/2 md:w-1/4" }, $e = {
600
+ }, it = { class: "sm:w-1/2 md:w-1/4" }, at = {
493
601
  class: "btn-group sm:w-1/2 md:w-3/4 flex",
494
602
  role: "group"
495
- }, et = [
603
+ }, ot = [
496
604
  "aria-pressed",
497
605
  "disabled",
498
606
  "onClick"
499
- ], tt = /* @__PURE__ */ h({
607
+ ], st = /* @__PURE__ */ f({
500
608
  __name: "qChoice",
501
609
  props: {
502
610
  qMap: {},
@@ -510,68 +618,68 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
510
618
  },
511
619
  emits: ["qmap_change", "qmap_subquestions"],
512
620
  setup(t, { emit: n }) {
513
- let i = t, a = n, o = T();
514
- L(() => i.model, (e) => o.value = i.model[i.qMap.id]), b(() => {
515
- o.value = i.model[i.qMap.id], d(o.value);
621
+ let r = t, c = n, d = w();
622
+ I(() => r.model, (e) => d.value = r.model[r.qMap.id]), v(() => {
623
+ d.value = r.model[r.qMap.id], f(d.value);
516
624
  });
517
- function d(e) {
518
- let t = i.qMap.values?.find((t) => t.value == e);
519
- a("qmap_subquestions", t?.onSelect);
625
+ function f(e) {
626
+ let t = r.qMap.values?.find((t) => t.value == e);
627
+ c("qmap_subquestions", t?.onSelect);
520
628
  }
521
- function m(e) {
522
- a("qmap_change", {
523
- qMap: i.qMap,
629
+ function p(e) {
630
+ c("qmap_change", {
631
+ qMap: r.qMap,
524
632
  value: e
525
- }), d(e);
633
+ }), f(e);
526
634
  }
527
- return (n, i) => t.qMap.style == "radio" ? (w(), l("div", Ue, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), u("div", We, [(w(!0), l(r, null, E(t.qMap.values, (e) => (w(), l("div", {
635
+ return (n, r) => t.qMap.style == "radio" ? (S(), o("div", Ye, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", Xe, [(S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("div", {
528
636
  key: String(e.value),
529
637
  class: "inline-flex items-center gap-0 min-h-8 qmap-check-row"
530
- }, [z(u("input", {
531
- "onUpdate:modelValue": i[0] ||= (e) => o.value = e,
638
+ }, [R(s("input", {
639
+ "onUpdate:modelValue": r[0] ||= (e) => d.value = e,
532
640
  type: "radio",
533
641
  name: t.qMap.id,
534
642
  value: e.value,
535
643
  disabled: t.readOnly,
536
- onChange: (t) => m(e.value)
537
- }, null, 40, Ge), [[N, o.value]]), u("div", Ke, [e.icon ? (w(), l("i", {
644
+ onChange: (t) => p(e.value)
645
+ }, null, 40, Ze), [[M, d.value]]), s("div", Qe, [e.icon ? (S(), o("i", {
538
646
  key: 0,
539
- class: v(e.icon),
647
+ class: g(e.icon),
540
648
  "aria-hidden": "true"
541
- }, null, 2)) : c("", !0), f(A(e.title || e.value), 1)])]))), 128))])])) : t.qMap.style == "v-radio" ? (w(), l("div", qe, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), (w(!0), l(r, null, E(t.qMap.values, (e) => (w(), l("div", null, [u("label", Je, [z(u("input", {
542
- "onUpdate:modelValue": i[1] ||= (e) => o.value = e,
649
+ }, null, 2)) : a("", !0), l(k(e.title || e.value), 1)])]))), 128))])])) : t.qMap.style == "v-radio" ? (S(), o("div", $e, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), (S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("div", null, [s("label", et, [R(s("input", {
650
+ "onUpdate:modelValue": r[1] ||= (e) => d.value = e,
543
651
  type: "radio",
544
652
  name: t.qMap.id,
545
653
  value: e.value,
546
654
  disabled: t.readOnly,
547
- onChange: (t) => m(e.value)
548
- }, null, 40, Ye), [[N, o.value]]), u("div", Xe, [e.icon ? (w(), l("i", {
655
+ onChange: (t) => p(e.value)
656
+ }, null, 40, tt), [[M, d.value]]), s("div", nt, [e.icon ? (S(), o("i", {
549
657
  key: 0,
550
- class: v(e.icon),
658
+ class: g(e.icon),
551
659
  "aria-hidden": "true"
552
- }, null, 2)) : c("", !0), f(A(e.title || e.value), 1)])])]))), 256))])) : t.qMap.style == "buttons" ? (w(), l("div", Ze, [u("div", Qe, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"])]), u("div", $e, [(w(!0), l(r, null, E(t.qMap.values, (e) => (w(), l("button", {
660
+ }, null, 2)) : a("", !0), l(k(e.title || e.value), 1)])])]))), 256))])) : t.qMap.style == "buttons" ? (S(), o("div", rt, [s("div", it, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"])]), s("div", at, [(S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("button", {
553
661
  key: String(e.value),
554
662
  type: "button",
555
- class: v(["flex-1 inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": o.value === e.value }]),
556
- "aria-pressed": o.value === e.value,
663
+ class: g(["flex-1 inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": d.value === e.value }]),
664
+ "aria-pressed": d.value === e.value,
557
665
  disabled: t.readOnly,
558
666
  onClick: (t) => {
559
- o.value = e.value, m(e.value);
667
+ d.value = e.value, p(e.value);
560
668
  }
561
- }, [e.icon ? (w(), l("i", {
669
+ }, [e.icon ? (S(), o("i", {
562
670
  key: 0,
563
- class: v(e.icon),
671
+ class: g(e.icon),
564
672
  "aria-hidden": "true"
565
- }, null, 2)) : c("", !0), f(A(e.title || e.value), 1)], 10, et))), 128))])])) : (w(), s(Be, {
673
+ }, null, 2)) : a("", !0), l(k(e.title || e.value), 1)], 10, ot))), 128))])])) : (S(), i(Ke, {
566
674
  key: 3,
567
- modelValue: o.value,
568
- "onUpdate:modelValue": [i[2] ||= (e) => o.value = e, m],
675
+ modelValue: d.value,
676
+ "onUpdate:modelValue": [r[2] ||= (e) => d.value = e, p],
569
677
  "q-map": t.qMap,
570
678
  readOnly: t.readOnly,
571
679
  lite: t.lite,
572
680
  required: t.qMap.required
573
681
  }, {
574
- default: R(() => [p(He, { qMap: t.qMap }, null, 8, ["qMap"])]),
682
+ default: L(() => [u(Je, { qMap: t.qMap }, null, 8, ["qMap"])]),
575
683
  _: 1
576
684
  }, 8, [
577
685
  "modelValue",
@@ -581,14 +689,14 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
581
689
  "required"
582
690
  ]));
583
691
  }
584
- }), nt = {
692
+ }), ct = {
585
693
  key: 0,
586
694
  class: "inline-flex items-center gap-2"
587
- }, rt = ["for"], it = ["value", "disabled"], at = [
695
+ }, lt = ["for"], ut = ["value", "disabled"], dt = [
588
696
  "id",
589
697
  "value",
590
698
  "readonly"
591
- ], ot = /* @__PURE__ */ h({
699
+ ], ft = /* @__PURE__ */ f({
592
700
  __name: "qColour",
593
701
  props: {
594
702
  qMap: {},
@@ -601,65 +709,65 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
601
709
  style: {}
602
710
  },
603
711
  emits: ["qmap_change", "qmap_subquestions"],
604
- setup(t, { emit: r }) {
605
- let i = t, o = r, s = a(() => i.model[i.qMap.id]);
606
- function c(e) {
607
- o("qmap_change", {
608
- qMap: i.qMap,
712
+ setup(e, { emit: t }) {
713
+ let r = e, i = t, a = n(() => r.model[r.qMap.id]);
714
+ function d(e) {
715
+ i("qmap_change", {
716
+ qMap: r.qMap,
609
717
  value: e
610
718
  });
611
719
  }
612
- return (r, i) => t.lite && t.readOnly ? (w(), l("div", nt, [u("span", {
720
+ return (t, n) => e.lite && e.readOnly ? (S(), o("div", ct, [s("span", {
613
721
  class: "inline-block w-4 h-4 rounded-full qmap-colour-swatch",
614
- style: y({ backgroundColor: s.value })
615
- }, null, 4), f(A(s.value), 1)])) : (w(), l("label", {
722
+ style: _({ backgroundColor: a.value })
723
+ }, null, 4), l(k(a.value), 1)])) : (S(), o("label", {
616
724
  key: 1,
617
725
  class: "qmap-field flex flex-col gap-1.5 text-sm",
618
- for: t.qMap.id
619
- }, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), p(n, {
620
- disabled: t.readOnly,
726
+ for: e.qMap.id
727
+ }, [u(K, { "q-map": e.qMap }, null, 8, ["q-map"]), u(X, {
728
+ disabled: e.readOnly,
621
729
  class: ""
622
- }, d({
623
- append: R(() => [u("input", {
624
- value: s.value || "#000000",
730
+ }, c({
731
+ append: L(() => [s("input", {
732
+ value: a.value || "#000000",
625
733
  type: "color",
626
734
  class: "shrink-0 w-7 h-7 p-0.5 qmap-color-picker border-none",
627
735
  "aria-label": "Choose color",
628
- disabled: t.readOnly,
629
- onInput: i[0] ||= (e) => c(e.target.value)
630
- }, null, 40, it)]),
631
- default: R(() => [u("input", {
632
- id: t.qMap.id,
633
- value: s.value,
736
+ disabled: e.readOnly,
737
+ onInput: n[0] ||= (e) => d(e.target.value)
738
+ }, null, 40, ut)]),
739
+ default: L(() => [s("input", {
740
+ id: e.qMap.id,
741
+ value: a.value,
634
742
  type: "text",
635
743
  class: "qmap-input flex-1 px-0 py-2",
636
- readonly: t.readOnly,
637
- onChange: i[1] ||= (e) => c(e.target.value)
638
- }, null, 40, at)]),
744
+ readonly: e.readOnly,
745
+ onChange: n[1] ||= (e) => d(e.target.value)
746
+ }, null, 40, dt)]),
639
747
  _: 2
640
- }, [t.qMap.icon ? {
748
+ }, [e.qMap.icon ? {
641
749
  name: "prepend",
642
- fn: R(() => [p(He, { qMap: t.qMap }, null, 8, ["qMap"])]),
750
+ fn: L(() => [u(Je, { qMap: e.qMap }, null, 8, ["qMap"])]),
643
751
  key: "0"
644
- } : void 0]), 1032, ["disabled"])], 8, rt));
752
+ } : void 0]), 1032, ["disabled"])], 8, lt));
645
753
  }
646
- }), st = {
754
+ }), pt = {
647
755
  key: 0,
648
756
  class: "calendar-modal"
649
- }, ct = { class: "calendar-dialog flex flex-col gap-2" }, lt = { class: "flex justify-between mb-2" }, ut = { class: "flex" }, dt = { class: "grid grid-cols-7" }, ft = ["onClick"], pt = {
757
+ }, mt = { class: "calendar-dialog flex flex-col gap-2" }, ht = { class: "flex justify-between mb-2" }, gt = { class: "flex" }, _t = { class: "grid grid-cols-7" }, vt = ["onClick"], yt = {
650
758
  key: 0,
651
759
  class: "calendar-time"
652
- }, mt = ["value"], ht = ["value"], gt = /* @__PURE__ */ h({
760
+ }, bt = ["value"], xt = ["value"], St = /* @__PURE__ */ f({
653
761
  __name: "CalendarPicker",
654
762
  props: {
655
763
  modelValue: {},
656
764
  withTime: { type: Boolean }
657
765
  },
658
766
  emits: ["update:modelValue"],
659
- setup(e, { emit: t }) {
660
- let n = Array.from({ length: 24 }, (e, t) => t), o = Array.from({ length: 60 }, (e, t) => t), d = e, f = t, p = T(!1);
767
+ setup(r, { emit: c }) {
768
+ let l = Array.from({ length: 24 }, (e, t) => t), u = Array.from({ length: 60 }, (e, t) => t), d = r, f = c, p = w(!1);
661
769
  var m = d.modelValue ? new Date(d.modelValue) : /* @__PURE__ */ new Date();
662
- let h = T(m.getFullYear()), g = T(m.getMonth()), _ = T(m.getDate()), y = T(m.getHours()), b = T(m.getMinutes()), x = [
770
+ let h = w(m.getFullYear()), _ = w(m.getMonth()), v = w(m.getDate()), y = w(m.getHours()), b = w(m.getMinutes()), x = [
663
771
  "Sun",
664
772
  "Mon",
665
773
  "Tue",
@@ -667,112 +775,112 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
667
775
  "Thu",
668
776
  "Fri",
669
777
  "Sat"
670
- ], S = a(() => h.value), C = a(() => g.value), O = a(() => new Date(S.value, C.value).toLocaleString("default", { month: "long" })), k = a(() => new Date(S.value, C.value + 1, 0).getDate()), M = a(() => Array(new Date(S.value, C.value, 1).getDay()).fill(0));
671
- function N(e) {
672
- return console.log(C.value + " " + m.getMonth()), e === _.value && C.value === m.getMonth() && S.value === m.getFullYear();
778
+ ], C = n(() => h.value), D = n(() => _.value), O = n(() => new Date(C.value, D.value).toLocaleString("default", { month: "long" })), j = n(() => new Date(C.value, D.value + 1, 0).getDate()), M = n(() => Array(new Date(C.value, D.value, 1).getDay()).fill(0));
779
+ function P(e) {
780
+ return console.log(D.value + " " + m.getMonth()), e === v.value && D.value === m.getMonth() && C.value === m.getFullYear();
673
781
  }
674
782
  function F(e) {
675
- _.value = e, m = new Date(h.value, g.value, _.value, d.withTime ? y.value : 0, d.withTime ? b.value : 0, 0, 0);
783
+ v.value = e, m = new Date(h.value, _.value, v.value, d.withTime ? y.value : 0, d.withTime ? b.value : 0, 0, 0);
676
784
  }
677
- function I() {
678
- g.value === 0 ? (g.value = 11, --h.value) : --g.value;
785
+ function L() {
786
+ _.value === 0 ? (_.value = 11, --h.value) : --_.value;
679
787
  }
680
- function R() {
681
- g.value === 11 ? (g.value = 0, h.value += 1) : g.value += 1;
788
+ function z() {
789
+ _.value === 11 ? (_.value = 0, h.value += 1) : _.value += 1;
682
790
  }
683
791
  function B() {
684
- let e = new Date(h.value, g.value, _.value, d.withTime ? y.value : 0, d.withTime ? b.value : 0, 0, 0);
792
+ let e = new Date(h.value, _.value, v.value, d.withTime ? y.value : 0, d.withTime ? b.value : 0, 0, 0);
685
793
  f("update:modelValue", e.getTime()), p.value = !1;
686
794
  }
687
795
  function V() {
688
796
  p.value = !1;
689
797
  }
690
- return L(() => d.modelValue, (e) => {
798
+ return I(() => d.modelValue, (e) => {
691
799
  if (e) {
692
800
  let t = new Date(e);
693
- h.value = t.getFullYear(), g.value = t.getMonth(), _.value = t.getDate(), y.value = t.getHours(), b.value = t.getMinutes();
801
+ h.value = t.getFullYear(), _.value = t.getMonth(), v.value = t.getDate(), y.value = t.getHours(), b.value = t.getMinutes();
694
802
  }
695
- }), a(() => {
803
+ }), n(() => {
696
804
  if (!d.modelValue) return "";
697
805
  let e = new Date(d.modelValue), t = e.toLocaleDateString();
698
806
  return d.withTime ? `${t} ${e.getHours().toString().padStart(2, "0") + ":" + e.getMinutes().toString().padStart(2, "0")}` : t;
699
- }), (t, a) => (w(), l(r, null, [u("button", {
700
- onClick: a[0] ||= (e) => p.value = !0,
807
+ }), (n, c) => (S(), o(e, null, [s("button", {
808
+ onClick: c[0] ||= (e) => p.value = !0,
701
809
  style: {
702
810
  border: "none",
703
811
  background: "none"
704
812
  },
705
813
  class: "qmap-button"
706
- }, [D(t.$slots, "default")]), (w(), s(i, { to: "body" }, [p.value ? (w(), l("div", st, [u("div", ct, [
707
- u("div", lt, [
708
- u("button", {
709
- onClick: I,
814
+ }, [E(n.$slots, "default")]), (S(), i(t, { to: "body" }, [p.value ? (S(), o("div", pt, [s("div", mt, [
815
+ s("div", ht, [
816
+ s("button", {
817
+ onClick: L,
710
818
  class: "border-none bg-inherit qmap-button"
711
- }, [...a[3] ||= [u("i", { class: "fa fa-arrow-left" }, null, -1)]]),
712
- u("span", null, A(O.value) + " " + A(S.value), 1),
713
- u("button", {
714
- onClick: R,
819
+ }, [...c[3] ||= [s("i", { class: "fa fa-arrow-left" }, null, -1)]]),
820
+ s("span", null, k(O.value) + " " + k(C.value), 1),
821
+ s("button", {
822
+ onClick: z,
715
823
  class: "border-none bg-inherit qmap-button"
716
- }, [...a[4] ||= [u("i", { class: "fa fa-arrow-right" }, null, -1)]])
824
+ }, [...c[4] ||= [s("i", { class: "fa fa-arrow-right" }, null, -1)]])
717
825
  ]),
718
- u("div", ut, [(w(), l(r, null, E(x, (e) => u("div", {
826
+ s("div", gt, [(S(), o(e, null, T(x, (e) => s("div", {
719
827
  key: e,
720
828
  class: "w-1/7 text-center"
721
- }, A(e), 1)), 64))]),
722
- u("div", dt, [(w(!0), l(r, null, E(M.value, (e) => (w(), l("span", {
829
+ }, k(e), 1)), 64))]),
830
+ s("div", _t, [(S(!0), o(e, null, T(M.value, (e) => (S(), o("span", {
723
831
  key: "blank-" + e,
724
832
  class: ""
725
- }, "\xA0"))), 128)), (w(!0), l(r, null, E(k.value, (e) => (w(), l("button", {
833
+ }, "\xA0"))), 128)), (S(!0), o(e, null, T(j.value, (e) => (S(), o("button", {
726
834
  key: "day-" + e,
727
- class: v(["p-2 border-none", {
728
- "bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900": N(e),
729
- "bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100": !N(e)
835
+ class: g(["p-2 border-none", {
836
+ "bg-zinc-900 text-zinc-100 dark:bg-zinc-100 dark:text-zinc-900": P(e),
837
+ "bg-zinc-100 text-zinc-900 dark:bg-zinc-900 dark:text-zinc-100": !P(e)
730
838
  }]),
731
839
  onClick: (t) => F(e)
732
- }, A(e), 11, ft))), 128))]),
733
- e.withTime ? (w(), l("div", pt, [
734
- z(u("select", {
735
- "onUpdate:modelValue": a[1] ||= (e) => y.value = e,
840
+ }, k(e), 11, vt))), 128))]),
841
+ r.withTime ? (S(), o("div", yt, [
842
+ R(s("select", {
843
+ "onUpdate:modelValue": c[1] ||= (e) => y.value = e,
736
844
  class: "qmap-input px-2 py-1"
737
- }, [(w(!0), l(r, null, E(j(n), (e) => (w(), l("option", {
845
+ }, [(S(!0), o(e, null, T(A(l), (e) => (S(), o("option", {
738
846
  key: e,
739
847
  value: e
740
- }, A(String(e).padStart(2, "0")), 9, mt))), 128))], 512), [[P, y.value]]),
741
- a[5] ||= u("span", null, ":", -1),
742
- z(u("select", {
743
- "onUpdate:modelValue": a[2] ||= (e) => b.value = e,
848
+ }, k(String(e).padStart(2, "0")), 9, bt))), 128))], 512), [[N, y.value]]),
849
+ c[5] ||= s("span", null, ":", -1),
850
+ R(s("select", {
851
+ "onUpdate:modelValue": c[2] ||= (e) => b.value = e,
744
852
  class: "qmap-input px-2 py-1"
745
- }, [(w(!0), l(r, null, E(j(o), (e) => (w(), l("option", {
853
+ }, [(S(!0), o(e, null, T(A(u), (e) => (S(), o("option", {
746
854
  key: e,
747
855
  value: e
748
- }, A(String(e).padStart(2, "0")), 9, ht))), 128))], 512), [[P, b.value]])
749
- ])) : c("", !0),
750
- u("div", { class: "flex justify-between" }, [u("button", {
856
+ }, k(String(e).padStart(2, "0")), 9, xt))), 128))], 512), [[N, b.value]])
857
+ ])) : a("", !0),
858
+ s("div", { class: "flex justify-between" }, [s("button", {
751
859
  onClick: B,
752
860
  class: "qmap-button p-2"
753
- }, "Ok"), u("button", {
861
+ }, "Ok"), s("button", {
754
862
  onClick: V,
755
863
  class: "qmap-button"
756
864
  }, "Cancel")])
757
- ]), u("div", {
865
+ ]), s("div", {
758
866
  class: "calendar-backdrop",
759
867
  onClick: V
760
- })])) : c("", !0)]))], 64));
868
+ })])) : a("", !0)]))], 64));
761
869
  }
762
- }), _t = [
870
+ }), Ct = [
763
871
  "placeholder",
764
872
  "readonly",
765
873
  "aria-invalid",
766
874
  "onKeydown"
767
- ], vt = {
875
+ ], wt = {
768
876
  key: 0,
769
877
  class: "date-error",
770
878
  role: "status"
771
- }, yt = {
879
+ }, Tt = {
772
880
  key: 3,
773
881
  class: "date-required",
774
882
  "aria-hidden": "true"
775
- }, bt = /*#__PURE__*/ fe(/* @__PURE__ */ h({
883
+ }, Et = /*#__PURE__*/ ge(/* @__PURE__ */ f({
776
884
  __name: "SimpleDate",
777
885
  props: {
778
886
  title: {},
@@ -792,74 +900,74 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
792
900
  },
793
901
  emits: ["update:model-value", "change"],
794
902
  setup(e, { emit: t }) {
795
- let r = e, i = t, o = `date-${Math.random().toString(36).slice(2)}`, f = r.dateFormat || "d-MMM-yy", m = r.timeFormat || "HH:mm", h = r.dateOnly ? f : `${m} ${f}`, g = a(() => r.dateOnly ? "Date" : "Time and date"), _ = T(""), y = T(!1), b = T();
796
- function x(e) {
903
+ let r = e, l = t, d = `date-${Math.random().toString(36).slice(2)}`, f = r.dateFormat || "d-MMM-yy", p = r.timeFormat || "HH:mm", m = r.dateOnly ? f : `${p} ${f}`, h = n(() => r.dateOnly ? "Date" : "Time and date"), _ = w(""), v = w(!1), y = w();
904
+ function b(e) {
797
905
  if (e == null) {
798
- _.value = "", y.value = !1;
906
+ _.value = "", v.value = !1;
799
907
  return;
800
908
  }
801
- let t = e instanceof Date ? H.fromJSDate(e) : H.fromMillis(e);
802
- _.value = t.setZone(r.timezone || "local").toFormat(h), y.value = !1, b.value = t.toMillis(), i("update:model-value", t.toMillis());
909
+ let t = e instanceof Date ? V.fromJSDate(e) : V.fromMillis(e);
910
+ _.value = t.setZone(r.timezone || "local").toFormat(m), v.value = !1, y.value = t.toMillis(), l("update:model-value", t.toMillis());
803
911
  }
804
- L(() => r.modelValue, x, { immediate: !0 });
805
- function S() {
912
+ I(() => r.modelValue, b, { immediate: !0 });
913
+ function x() {
806
914
  if (!_.value) {
807
- y.value = !1;
915
+ v.value = !1;
808
916
  return;
809
917
  }
810
- let e = H.fromFormat(_.value, h, { zone: r.timezone || "local" });
811
- y.value = !e.isValid, e.isValid && (x(e.toMillis()), i("update:model-value", e.toMillis()));
918
+ let e = V.fromFormat(_.value, m, { zone: r.timezone || "local" });
919
+ v.value = !e.isValid, e.isValid && (b(e.toMillis()), l("update:model-value", e.toMillis()));
812
920
  }
813
921
  function C() {
814
- _.value = "", y.value = !1, i("update:model-value", void 0);
922
+ _.value = "", v.value = !1, l("update:model-value", void 0);
815
923
  }
816
- return (t, i) => (w(), l("div", { class: v(["relative grid gap-1.5 text-sm date-field", r.class]) }, [p(n, {
924
+ return (t, n) => (S(), o("div", { class: g(["relative grid gap-1.5 text-sm date-field", r.class]) }, [u(X, {
817
925
  class: "date-control",
818
- invalid: y.value,
926
+ invalid: v.value,
819
927
  disabled: e.readOnly
820
- }, d({
821
- append: R(() => [
822
- y.value ? (w(), l("span", vt, "Invalid date")) : c("", !0),
823
- !e.readOnly && !e.lite ? (w(), s(gt, {
928
+ }, c({
929
+ append: L(() => [
930
+ v.value ? (S(), o("span", wt, "Invalid date")) : a("", !0),
931
+ !e.readOnly && !e.lite ? (S(), i(St, {
824
932
  key: 1,
825
933
  withTime: !e.dateOnly,
826
- modelValue: b.value,
827
- "onUpdate:modelValue": [i[1] ||= (e) => b.value = e, x]
934
+ modelValue: y.value,
935
+ "onUpdate:modelValue": [n[1] ||= (e) => y.value = e, b]
828
936
  }, {
829
- default: R(() => [...i[2] ||= [u("i", { class: "fa fa-calendar" }, null, -1)]]),
937
+ default: L(() => [...n[2] ||= [s("i", { class: "fa fa-calendar" }, null, -1)]]),
830
938
  _: 1
831
- }, 8, ["withTime", "modelValue"])) : c("", !0),
832
- e.clearable && _.value && !e.readOnly ? (w(), l("button", {
939
+ }, 8, ["withTime", "modelValue"])) : a("", !0),
940
+ e.clearable && _.value && !e.readOnly ? (S(), o("button", {
833
941
  key: 2,
834
942
  type: "button",
835
943
  class: "date-trigger",
836
944
  "aria-label": "Clear date",
837
945
  onClick: C
838
- }, [...i[3] ||= [u("i", { class: "fa fa-times" }, null, -1)]])) : c("", !0),
839
- e.required ? (w(), l("span", yt, [...i[4] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0)
946
+ }, [...n[3] ||= [s("i", { class: "fa fa-times" }, null, -1)]])) : a("", !0),
947
+ e.required ? (S(), o("span", Tt, [...n[4] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)
840
948
  ]),
841
- default: R(() => [z(u("input", {
842
- id: o,
843
- "onUpdate:modelValue": i[0] ||= (e) => _.value = e,
949
+ default: L(() => [R(s("input", {
950
+ id: d,
951
+ "onUpdate:modelValue": n[0] ||= (e) => _.value = e,
844
952
  type: "text",
845
- placeholder: g.value,
953
+ placeholder: h.value,
846
954
  readonly: e.readOnly,
847
- "aria-invalid": y.value,
955
+ "aria-invalid": v.value,
848
956
  class: "min-w-0 flex-1 border-0 bg-transparent outline-none qmap-input",
849
- onBlur: S,
850
- onKeydown: B(V(S, ["prevent"]), ["enter"])
851
- }, null, 40, _t), [[F, _.value]])]),
957
+ onBlur: x,
958
+ onKeydown: z(B(x, ["prevent"]), ["enter"])
959
+ }, null, 40, Ct), [[P, _.value]])]),
852
960
  _: 2
853
961
  }, [e.icon ? {
854
962
  name: "prepend",
855
- fn: R(() => [u("i", {
856
- class: v(e.icon),
963
+ fn: L(() => [s("i", {
964
+ class: g(e.icon),
857
965
  "aria-hidden": "true"
858
966
  }, null, 2)]),
859
967
  key: "0"
860
- } : void 0]), 1032, ["invalid", "disabled"]), D(t.$slots, "default", {}, void 0, !0)], 2));
968
+ } : void 0]), 1032, ["invalid", "disabled"]), E(t.$slots, "default", {}, void 0, !0)], 2));
861
969
  }
862
- }), [["__scopeId", "data-v-c327521a"]]), xt = /* @__PURE__ */ h({
970
+ }), [["__scopeId", "data-v-c327521a"]]), Dt = /* @__PURE__ */ f({
863
971
  __name: "qDate",
864
972
  props: {
865
973
  qMap: {},
@@ -872,30 +980,30 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
872
980
  style: {}
873
981
  },
874
982
  emits: ["qmap_change", "qmap_subquestions"],
875
- setup(n, { emit: i }) {
876
- let o = n, u = i, d = a(() => o.model[o.qMap.id]);
877
- function f(e) {
878
- u("qmap_change", {
879
- qMap: o.qMap,
983
+ setup(t, { emit: r }) {
984
+ let s = t, c = r, l = n(() => s.model[s.qMap.id]);
985
+ function d(e) {
986
+ c("qmap_change", {
987
+ qMap: s.qMap,
880
988
  value: e
881
989
  });
882
990
  }
883
- return (i, a) => (w(), l(r, null, [n.lite ? c("", !0) : (w(), s(e, {
991
+ return (n, r) => (S(), o(e, null, [t.lite ? a("", !0) : (S(), i(K, {
884
992
  key: 0,
885
- "q-map": n.qMap
886
- }, null, 8, ["q-map"])), p(bt, {
887
- modelValue: d.value,
888
- "onUpdate:modelValue": [a[0] ||= (e) => d.value = e, f],
889
- icon: n.qMap.icon,
890
- id: n.qMap.id,
891
- dateFormat: n.qMap.style,
892
- lite: n.lite,
993
+ "q-map": t.qMap
994
+ }, null, 8, ["q-map"])), u(Et, {
995
+ modelValue: l.value,
996
+ "onUpdate:modelValue": [r[0] ||= (e) => l.value = e, d],
997
+ icon: t.qMap.icon,
998
+ id: t.qMap.id,
999
+ dateFormat: t.qMap.style,
1000
+ lite: t.lite,
893
1001
  dense: "",
894
- "read-only": n.readOnly,
895
- dateOnly: n.qMap.type == "date",
896
- required: n.qMap.required && !d.value
1002
+ "read-only": t.readOnly,
1003
+ dateOnly: t.qMap.type == "date",
1004
+ required: t.qMap.required && !l.value
897
1005
  }, {
898
- default: R(() => [p(t, { "q-map": n.qMap }, null, 8, ["q-map"])]),
1006
+ default: L(() => [u(W, { "q-map": t.qMap }, null, 8, ["q-map"])]),
899
1007
  _: 1
900
1008
  }, 8, [
901
1009
  "modelValue",
@@ -908,13 +1016,13 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
908
1016
  "required"
909
1017
  ])], 64));
910
1018
  }
911
- }), St = ["aria-orientation"], Ct = ["aria-selected", "onClick"], wt = ["name"], Tt = {
1019
+ }), Ot = ["aria-orientation"], kt = ["aria-selected", "onClick"], At = ["name"], jt = {
912
1020
  key: 0,
913
1021
  class: "flex flex-1 flex-col min-w-0 relative"
914
- }, Et = {
1022
+ }, Mt = {
915
1023
  key: 1,
916
1024
  class: "flex flex-1 flex-col min-w-0 relative"
917
- }, Dt = { class: "group-scroll flex-1 min-h-0 overflow-auto" }, Ot = { class: "flex flex-col gap-2" }, kt = /* @__PURE__ */ h({
1025
+ }, Nt = { class: "group-scroll flex-1 min-h-0 overflow-auto" }, Pt = { class: "flex flex-col gap-2" }, Ft = /* @__PURE__ */ f({
918
1026
  __name: "qGroup",
919
1027
  props: {
920
1028
  qMap: {},
@@ -927,47 +1035,47 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
927
1035
  style: {}
928
1036
  },
929
1037
  emits: ["qmap_change", "qmap_subquestions"],
930
- setup(t, { emit: n }) {
931
- let i = t, o = T(i.qMap.groups ? i.qMap.groups[0]?.name : "?"), d = n, m = a(() => i.qMap.style == "vertical"), h = T(i.model);
932
- return (n, i) => (w(), l("div", {
933
- class: v({
934
- "flex flex-row": m.value,
935
- "flex flex-col": !m.value,
1038
+ setup(t, { emit: r }) {
1039
+ let c = t, d = w(c.qMap.groups ? c.qMap.groups[0]?.name : "?"), f = r, p = n(() => c.qMap.style == "vertical"), m = w(c.model);
1040
+ return (n, r) => (S(), o("div", {
1041
+ class: g({
1042
+ "flex flex-row": p.value,
1043
+ "flex flex-col": !p.value,
936
1044
  "flex-1 inset-0": t.qMap.ui?.flex
937
1045
  }),
938
- style: y(t.qMap.ui?.flex ? void 0 : { height: (t.qMap.ui?.height || 400) + "px" })
1046
+ style: _(t.qMap.ui?.flex ? void 0 : { height: (t.qMap.ui?.height || 400) + "px" })
939
1047
  }, [
940
- p(e, { "q-map": t.qMap }, null, 8, ["q-map"]),
941
- u("div", {
942
- class: v(["flex flex-wrap gap-1 p-1 group-tabs", { "flex-col group-tabs-vertical pr-2": m.value }]),
1048
+ u(K, { "q-map": t.qMap }, null, 8, ["q-map"]),
1049
+ s("div", {
1050
+ class: g(["flex flex-wrap gap-1 p-1 group-tabs", { "flex-col group-tabs-vertical pr-2": p.value }]),
943
1051
  role: "tablist",
944
- "aria-orientation": m.value ? "vertical" : "horizontal"
945
- }, [(w(!0), l(r, null, E(t.qMap.groups, (e) => (w(), l("button", {
1052
+ "aria-orientation": p.value ? "vertical" : "horizontal"
1053
+ }, [(S(!0), o(e, null, T(t.qMap.groups, (e) => (S(), o("button", {
946
1054
  key: e.name,
947
1055
  type: "button",
948
1056
  role: "tab",
949
- "aria-selected": o.value === e.name,
950
- class: v(["inline-flex items-center gap-2 rounded-md px-3 py-2", { "group-tab-active": o.value === e.name }]),
951
- onClick: (t) => o.value = e.name
952
- }, [e.icon ? (w(), l("i", {
1057
+ "aria-selected": d.value === e.name,
1058
+ class: g(["inline-flex items-center gap-2 rounded-md px-3 py-2", { "group-tab-active": d.value === e.name }]),
1059
+ onClick: (t) => d.value = e.name
1060
+ }, [e.icon ? (S(), o("i", {
953
1061
  key: 0,
954
- class: v(e.icon),
1062
+ class: g(e.icon),
955
1063
  "aria-hidden": "true"
956
- }, null, 2)) : c("", !0), f(A(e.name), 1)], 10, Ct))), 128))], 10, St),
957
- u("div", { class: v(["group-panels flex flex-1 flex-col min-w-0 min-h-0", {
958
- "ml-2": m.value,
959
- "mt-2": !m.value
960
- }]) }, [(w(!0), l(r, null, E(t.qMap.groups, (e) => z((w(), l("section", {
961
- name: e.name,
962
- key: e.name,
1064
+ }, null, 2)) : a("", !0), l(k(e.name), 1)], 10, kt))), 128))], 10, Ot),
1065
+ s("div", { class: g(["group-panels flex flex-1 flex-col min-w-0 min-h-0", {
1066
+ "ml-2": p.value,
1067
+ "mt-2": !p.value
1068
+ }]) }, [(S(!0), o(e, null, T(t.qMap.groups, (n) => R((S(), o("section", {
1069
+ name: n.name,
1070
+ key: n.name,
963
1071
  class: "flex flex-1 flex-col min-w-0 min-h-0",
964
1072
  role: "tabpanel"
965
- }, [e.items?.length == 1 && e.items[0]?.type == "geo_map" ? (w(), l("div", Tt, [(w(!0), l(r, null, E(e.items, (e) => (w(), s(Q, {
1073
+ }, [n.items?.length == 1 && n.items[0]?.type == "geo_map" ? (S(), o("div", jt, [(S(!0), o(e, null, T(n.items, (e) => (S(), i(Q, {
966
1074
  key: e.id,
967
1075
  qMap: e,
968
- modelValue: h.value,
969
- "onUpdate:modelValue": i[0] ||= (e) => h.value = e,
970
- onChange: i[1] ||= (e, t) => d("qmap_change", e),
1076
+ modelValue: m.value,
1077
+ "onUpdate:modelValue": r[0] ||= (e) => m.value = e,
1078
+ onChange: r[1] ||= (e, t) => f("qmap_change", e),
971
1079
  extras: t.extras,
972
1080
  lite: t.lite,
973
1081
  validator: t.validator,
@@ -981,12 +1089,12 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
981
1089
  "validator",
982
1090
  "provider",
983
1091
  "readOnly"
984
- ]))), 128))])) : (w(), l("div", Et, [u("div", Dt, [u("div", Ot, [(w(!0), l(r, null, E(e.items, (e) => (w(), s(Q, {
1092
+ ]))), 128))])) : (S(), o("div", Mt, [s("div", Nt, [s("div", Pt, [(S(!0), o(e, null, T(n.items, (e) => (S(), i(Q, {
985
1093
  key: e.id,
986
1094
  qMap: e,
987
- modelValue: h.value,
988
- "onUpdate:modelValue": i[2] ||= (e) => h.value = e,
989
- onChange: i[3] ||= (e, t) => d("qmap_change", e),
1095
+ modelValue: m.value,
1096
+ "onUpdate:modelValue": r[2] ||= (e) => m.value = e,
1097
+ onChange: r[3] ||= (e, t) => f("qmap_change", e),
990
1098
  extras: t.extras,
991
1099
  lite: t.lite,
992
1100
  validator: t.validator,
@@ -1000,29 +1108,29 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1000
1108
  "validator",
1001
1109
  "provider",
1002
1110
  "readOnly"
1003
- ]))), 128))])])]))], 8, wt)), [[I, o.value === e.name]])), 128))], 2)
1111
+ ]))), 128))])])]))], 8, At)), [[F, d.value === n.name]])), 128))], 2)
1004
1112
  ], 6));
1005
1113
  }
1006
- }), At = {
1114
+ }), It = {
1007
1115
  key: 0,
1008
1116
  class: "inline-flex items-center gap-2"
1009
- }, jt = {
1117
+ }, Lt = {
1010
1118
  key: 1,
1011
1119
  class: "flex flex-col gap-1"
1012
- }, Mt = [
1120
+ }, Rt = [
1013
1121
  "id",
1014
1122
  "value",
1015
1123
  "readonly"
1016
- ], Nt = [
1124
+ ], zt = [
1017
1125
  "id",
1018
1126
  "value",
1019
1127
  "readonly",
1020
1128
  "type"
1021
- ], Pt = {
1129
+ ], Bt = {
1022
1130
  key: 0,
1023
1131
  class: "qmap-required",
1024
1132
  "aria-hidden": "true"
1025
- }, Z = /* @__PURE__ */ h({
1133
+ }, Z = /* @__PURE__ */ f({
1026
1134
  __name: "qString",
1027
1135
  props: {
1028
1136
  qMap: {},
@@ -1035,70 +1143,70 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1035
1143
  style: {}
1036
1144
  },
1037
1145
  emits: ["qmap_change", "qmap_subquestions"],
1038
- setup(t, { emit: r }) {
1039
- let i = t, o = r, f = a(() => i.model[i.qMap.id]);
1040
- function m(e) {
1041
- h(e.target.value);
1146
+ setup(e, { emit: t }) {
1147
+ let r = e, l = t, d = n(() => r.model[r.qMap.id]);
1148
+ function f(e) {
1149
+ p(e.target.value);
1042
1150
  }
1043
- function h(e) {
1044
- i.qMap.type === "number" && typeof e == "string" && (e = parseFloat(e), e = Number.isNaN(e) ? void 0 : e), o("qmap_change", {
1045
- qMap: i.qMap,
1151
+ function p(e) {
1152
+ r.qMap.type === "number" && typeof e == "string" && (e = parseFloat(e), e = Number.isNaN(e) ? void 0 : e), l("qmap_change", {
1153
+ qMap: r.qMap,
1046
1154
  value: e
1047
1155
  });
1048
1156
  }
1049
- return (r, i) => t.lite && t.readOnly ? (w(), l("div", At, A(f.value), 1)) : (w(), l("div", jt, [!t.lite && t.qMap.id !== "#" ? (w(), s(e, {
1157
+ return (t, n) => e.lite && e.readOnly ? (S(), o("div", It, k(d.value), 1)) : (S(), o("div", Lt, [!e.lite && e.qMap.id !== "#" ? (S(), i(K, {
1050
1158
  key: 0,
1051
- "q-map": t.qMap
1052
- }, null, 8, ["q-map"])) : c("", !0), p(n, { multiline: t.qMap.style === "longtext" || t.lite && t.qMap.style === "textarea" }, d({
1053
- append: R(() => [t.qMap.required && !f.value ? (w(), l("span", Pt, [...i[3] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0), !t.qMap.required && f.value && !t.readOnly ? (w(), l("button", {
1159
+ "q-map": e.qMap
1160
+ }, null, 8, ["q-map"])) : a("", !0), u(X, { multiline: e.qMap.style === "longtext" || e.lite && e.qMap.style === "textarea" }, c({
1161
+ append: L(() => [e.qMap.required && !d.value ? (S(), o("span", Bt, [...n[3] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0), !e.qMap.required && d.value && !e.readOnly ? (S(), o("button", {
1054
1162
  key: 1,
1055
1163
  type: "button",
1056
1164
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button",
1057
1165
  "aria-label": "Clear",
1058
- onClick: i[2] ||= (e) => h(void 0)
1059
- }, [...i[4] ||= [u("i", { class: "fa fa-times" }, null, -1)]])) : c("", !0)]),
1060
- default: R(() => [t.qMap.type !== "number" && (t.qMap.style === "longtext" || t.lite && t.qMap.style === "textarea") ? (w(), l("textarea", {
1166
+ onClick: n[2] ||= (e) => p(void 0)
1167
+ }, [...n[4] ||= [s("i", { class: "fa fa-times" }, null, -1)]])) : a("", !0)]),
1168
+ default: L(() => [e.qMap.type !== "number" && (e.qMap.style === "longtext" || e.lite && e.qMap.style === "textarea") ? (S(), o("textarea", {
1061
1169
  key: 0,
1062
- id: t.qMap.id,
1063
- value: f.value,
1064
- readonly: t.readOnly,
1170
+ id: e.qMap.id,
1171
+ value: d.value,
1172
+ readonly: e.readOnly,
1065
1173
  rows: "4",
1066
1174
  class: "qmap-input min-w-0 flex-1 px-0 py-2 min-h-24 resize-y",
1067
- onInput: m,
1068
- onChange: i[0] ||= (e) => h(e.target.value)
1069
- }, null, 40, Mt)) : (w(), l("input", {
1175
+ onInput: f,
1176
+ onChange: n[0] ||= (e) => p(e.target.value)
1177
+ }, null, 40, Rt)) : (S(), o("input", {
1070
1178
  key: 1,
1071
- id: t.qMap.id,
1072
- value: f.value,
1073
- readonly: t.readOnly,
1074
- type: t.qMap.type === "number" ? t.qMap.style || "number" : t.qMap.style || "text",
1179
+ id: e.qMap.id,
1180
+ value: d.value,
1181
+ readonly: e.readOnly,
1182
+ type: e.qMap.type === "number" ? e.qMap.style || "number" : e.qMap.style || "text",
1075
1183
  class: "qmap-input min-w-0 flex-1 px-0 py-2",
1076
- onInput: m,
1077
- onChange: i[1] ||= (e) => h(e.target.value)
1078
- }, null, 40, Nt))]),
1184
+ onInput: f,
1185
+ onChange: n[1] ||= (e) => p(e.target.value)
1186
+ }, null, 40, zt))]),
1079
1187
  _: 2
1080
- }, [t.qMap.icon ? {
1188
+ }, [e.qMap.icon ? {
1081
1189
  name: "prepend",
1082
- fn: R(() => [p(He, { qMap: t.qMap }, null, 8, ["qMap"])]),
1190
+ fn: L(() => [u(Je, { qMap: e.qMap }, null, 8, ["qMap"])]),
1083
1191
  key: "0"
1084
1192
  } : void 0]), 1032, ["multiline"])]));
1085
1193
  }
1086
- }), Ft = { key: 0 }, It = {
1194
+ }), Vt = { key: 0 }, Ht = {
1087
1195
  key: 0,
1088
1196
  class: "flex flex-row items-center"
1089
- }, Lt = ["for"], Rt = ["id", "readonly"], zt = {
1197
+ }, Ut = ["for"], Wt = ["id", "readonly"], Gt = {
1090
1198
  key: 0,
1091
1199
  class: "qmap-required"
1092
- }, Bt = {
1200
+ }, Kt = {
1093
1201
  key: 1,
1094
1202
  class: "text-right text-negative"
1095
- }, Vt = { key: 1 }, Ht = { class: "qmap-card flex min-w-0 gap-3 p-3 bg-zinc-50 dark:bg-zinc-900" }, Ut = { class: "flex-1 min-w-0" }, Wt = { key: 0 }, Gt = {
1203
+ }, qt = { key: 1 }, Jt = { class: "qmap-card flex min-w-0 gap-3 p-3 bg-zinc-50 dark:bg-zinc-900" }, Yt = { class: "flex-1 min-w-0" }, Xt = { key: 0 }, Zt = {
1096
1204
  key: 1,
1097
1205
  class: "flex flex-col gap-2"
1098
- }, Kt = {
1206
+ }, Qt = {
1099
1207
  key: 0,
1100
1208
  class: "flex flex-col justify-center"
1101
- }, qt = /* @__PURE__ */ h({
1209
+ }, $t = /* @__PURE__ */ f({
1102
1210
  __name: "qObject",
1103
1211
  props: {
1104
1212
  qMap: {},
@@ -1111,42 +1219,42 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1111
1219
  style: {}
1112
1220
  },
1113
1221
  emits: ["qmap_change", "qmap_subquestions"],
1114
- setup(i, { emit: a }) {
1115
- let o = i, f = a, m = T(o.model[o.qMap.id] ? JSON.stringify(o.model[o.qMap.id], null, 2) : void 0), h = T(o.model[o.qMap.id] || void 0), g = T();
1116
- function _(e) {
1117
- if (!e) f("qmap_change", {
1118
- qMap: o.qMap,
1222
+ setup(t, { emit: n }) {
1223
+ let r = t, l = n, d = w(r.model[r.qMap.id] ? JSON.stringify(r.model[r.qMap.id], null, 2) : void 0), f = w(r.model[r.qMap.id] || void 0), p = w();
1224
+ function m(e) {
1225
+ if (!e) l("qmap_change", {
1226
+ qMap: r.qMap,
1119
1227
  value: void 0
1120
1228
  });
1121
1229
  else try {
1122
- f("qmap_change", {
1123
- qMap: o.qMap,
1230
+ l("qmap_change", {
1231
+ qMap: r.qMap,
1124
1232
  value: JSON.parse(e)
1125
- }), m.value = JSON.stringify(JSON.parse(e), null, 2), g.value = void 0;
1233
+ }), d.value = JSON.stringify(JSON.parse(e), null, 2), p.value = void 0;
1126
1234
  } catch (e) {
1127
- g.value = e.message;
1235
+ p.value = e.message;
1128
1236
  }
1129
1237
  }
1130
- function y(e) {
1131
- o.model[o.qMap.id] = e, e ? f("qmap_change", {
1132
- qMap: o.qMap,
1238
+ function h(e) {
1239
+ r.model[r.qMap.id] = e, e ? l("qmap_change", {
1240
+ qMap: r.qMap,
1133
1241
  value: e
1134
- }) : f("qmap_change", {
1135
- qMap: o.qMap,
1242
+ }) : l("qmap_change", {
1243
+ qMap: r.qMap,
1136
1244
  value: void 0
1137
1245
  });
1138
1246
  }
1139
- return (a, o) => i.qMap.items ? (w(), l("div", Vt, [!i.lite && i.qMap.id !== "#" ? (w(), s(e, {
1247
+ return (n, r) => t.qMap.items ? (S(), o("div", qt, [!t.lite && t.qMap.id !== "#" ? (S(), i(K, {
1140
1248
  key: 0,
1141
- "q-map": i.qMap
1142
- }, null, 8, ["q-map"])) : c("", !0), u("div", Ht, [u("div", Ut, [h.value ? (w(), l("div", Gt, [(w(!0), l(r, null, E(i.qMap.items, (e) => (w(), s(Q, {
1249
+ "q-map": t.qMap
1250
+ }, null, 8, ["q-map"])) : a("", !0), s("div", Jt, [s("div", Yt, [f.value ? (S(), o("div", Zt, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), i(Q, {
1143
1251
  qMap: e,
1144
- modelValue: h.value,
1145
- "onUpdate:modelValue": [o[4] ||= (e) => h.value = e, y],
1146
- extras: i.extras,
1147
- provider: i.provider,
1148
- lite: i.lite,
1149
- readOnly: i.readOnly || i.qMap.readOnly
1252
+ modelValue: f.value,
1253
+ "onUpdate:modelValue": [r[4] ||= (e) => f.value = e, h],
1254
+ extras: t.extras,
1255
+ provider: t.provider,
1256
+ lite: t.lite,
1257
+ readOnly: t.readOnly || t.qMap.readOnly
1150
1258
  }, null, 8, [
1151
1259
  "qMap",
1152
1260
  "modelValue",
@@ -1154,61 +1262,61 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1154
1262
  "provider",
1155
1263
  "lite",
1156
1264
  "readOnly"
1157
- ]))), 256))])) : (w(), l("div", Wt, [u("button", {
1265
+ ]))), 256))])) : (S(), o("div", Xt, [s("button", {
1158
1266
  type: "button",
1159
1267
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1160
- onClick: o[3] ||= (e) => h.value = {}
1161
- }, "Not set")]))]), !i.qMap.required && h.value != null ? (w(), l("div", Kt, [u("button", {
1268
+ onClick: r[3] ||= (e) => f.value = {}
1269
+ }, "Not set")]))]), !t.qMap.required && f.value != null ? (S(), o("div", Qt, [s("button", {
1162
1270
  type: "button",
1163
1271
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
1164
1272
  "aria-label": "Remove object",
1165
- onClick: o[5] ||= (e) => {
1166
- _(null), h.value = void 0;
1273
+ onClick: r[5] ||= (e) => {
1274
+ m(null), f.value = void 0;
1167
1275
  }
1168
- }, [...o[7] ||= [u("i", {
1276
+ }, [...r[7] ||= [s("i", {
1169
1277
  class: "fa fa-trash",
1170
1278
  "aria-hidden": "true"
1171
- }, null, -1)]])])) : c("", !0)])])) : (w(), l("div", Ft, [
1172
- i.lite && i.readOnly ? (w(), l("div", It, A(m.value), 1)) : c("", !0),
1173
- u("label", {
1279
+ }, null, -1)]])])) : a("", !0)])])) : (S(), o("div", Vt, [
1280
+ t.lite && t.readOnly ? (S(), o("div", Ht, k(d.value), 1)) : a("", !0),
1281
+ s("label", {
1174
1282
  class: "qmap-field flex flex-col gap-1.5 min-w-0 text-sm",
1175
- for: i.qMap.id
1176
- }, [!i.lite && i.qMap.id !== "#" ? (w(), s(e, {
1283
+ for: t.qMap.id
1284
+ }, [!t.lite && t.qMap.id !== "#" ? (S(), i(K, {
1177
1285
  key: 0,
1178
- "q-map": i.qMap
1179
- }, null, 8, ["q-map"])) : c("", !0), p(n, {
1180
- disabled: i.readOnly,
1286
+ "q-map": t.qMap
1287
+ }, null, 8, ["q-map"])) : a("", !0), u(X, {
1288
+ disabled: t.readOnly,
1181
1289
  multiline: ""
1182
- }, d({
1183
- append: R(() => [i.qMap.required && (!i.lite || !m.value) ? (w(), l("span", zt, [...o[6] ||= [u("i", { class: "fa fa-asterisk" }, null, -1)]])) : c("", !0), i.qMap.subtitle ? (w(), s(t, {
1290
+ }, c({
1291
+ append: L(() => [t.qMap.required && (!t.lite || !d.value) ? (S(), o("span", Gt, [...r[6] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0), t.qMap.subtitle ? (S(), i(W, {
1184
1292
  key: 1,
1185
- "q-map": i.qMap
1186
- }, null, 8, ["q-map"])) : c("", !0)]),
1187
- default: R(() => [z(u("textarea", {
1188
- id: i.qMap.id,
1189
- "onUpdate:modelValue": o[0] ||= (e) => m.value = e,
1293
+ "q-map": t.qMap
1294
+ }, null, 8, ["q-map"])) : a("", !0)]),
1295
+ default: L(() => [R(s("textarea", {
1296
+ id: t.qMap.id,
1297
+ "onUpdate:modelValue": r[0] ||= (e) => d.value = e,
1190
1298
  class: "qmap-input min-w-0 flex-1 px-0 py-2 min-h-24 resize-y",
1191
- readonly: i.readOnly,
1299
+ readonly: t.readOnly,
1192
1300
  rows: "5",
1193
- onBlur: o[1] ||= (e) => _(m.value),
1194
- onInput: o[2] ||= (e) => _(m.value)
1195
- }, null, 40, Rt), [[F, m.value]])]),
1301
+ onBlur: r[1] ||= (e) => m(d.value),
1302
+ onInput: r[2] ||= (e) => m(d.value)
1303
+ }, null, 40, Wt), [[P, d.value]])]),
1196
1304
  _: 2
1197
- }, [i.qMap.icon ? {
1305
+ }, [t.qMap.icon ? {
1198
1306
  name: "prepend",
1199
- fn: R(() => [u("i", {
1200
- class: v(i.qMap.icon),
1307
+ fn: L(() => [s("i", {
1308
+ class: g(t.qMap.icon),
1201
1309
  "aria-hidden": "true"
1202
1310
  }, null, 2)]),
1203
1311
  key: "0"
1204
- } : void 0]), 1032, ["disabled"])], 8, Lt),
1205
- g.value ? (w(), l("div", Bt, A(g.value), 1)) : c("", !0)
1312
+ } : void 0]), 1032, ["disabled"])], 8, Ut),
1313
+ p.value ? (S(), o("div", Kt, k(p.value), 1)) : a("", !0)
1206
1314
  ]));
1207
1315
  }
1208
- }), Jt = { class: "text-lg" }, Yt = {
1316
+ }), en = { class: "text-lg" }, tn = {
1209
1317
  key: 0,
1210
1318
  class: "text-md"
1211
- }, Xt = /* @__PURE__ */ h({
1319
+ }, nn = /* @__PURE__ */ f({
1212
1320
  __name: "qCaption",
1213
1321
  props: {
1214
1322
  qMap: {},
@@ -1221,10 +1329,10 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1221
1329
  style: {}
1222
1330
  },
1223
1331
  emits: ["qmap_change", "qmap_subquestions"],
1224
- setup(e, { emit: t }) {
1225
- return (t, n) => (w(), l(r, null, [u("div", Jt, A(e.qMap.title), 1), e.qMap.subtitle ? (w(), l("div", Yt, A(e.qMap.subtitle), 1)) : c("", !0)], 64));
1332
+ setup(t, { emit: n }) {
1333
+ return (n, r) => (S(), o(e, null, [s("div", en, k(t.qMap.title), 1), t.qMap.subtitle ? (S(), o("div", tn, k(t.qMap.subtitle), 1)) : a("", !0)], 64));
1226
1334
  }
1227
- }), Zt = /* @__PURE__ */ h({
1335
+ }), rn = /* @__PURE__ */ f({
1228
1336
  __name: "qGeoMap",
1229
1337
  props: {
1230
1338
  qMap: {},
@@ -1238,32 +1346,32 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1238
1346
  },
1239
1347
  emits: ["qmap_change", "qmap_subquestions"],
1240
1348
  setup(e, { emit: t }) {
1241
- let n = m(() => import("./SimpleGeomEditor-G898Fulb.mjs")), r = e, i = t, o = T(), s = a(() => r.qMap.style == "full-screen");
1242
- L(() => r.model, (e) => o.value = r.model[r.qMap.id]), b(() => {
1243
- o.value = r.model[r.qMap.id] ? JSON.parse(r.model[r.qMap.id]) : void 0, c(o.value);
1349
+ let r = d(() => Promise.resolve().then(() => jn)), i = e, a = t, s = w(), c = n(() => i.qMap.style == "full-screen");
1350
+ I(() => i.model, (e) => s.value = i.model[i.qMap.id]), v(() => {
1351
+ s.value = i.model[i.qMap.id] ? JSON.parse(i.model[i.qMap.id]) : void 0, l(s.value);
1244
1352
  });
1245
- function c(e) {
1246
- let t = r.qMap.values?.find((t) => t.value == e);
1247
- i("qmap_subquestions", t?.onSelect);
1353
+ function l(e) {
1354
+ let t = i.qMap.values?.find((t) => t.value == e);
1355
+ a("qmap_subquestions", t?.onSelect);
1248
1356
  }
1249
- function u(e) {
1250
- i("qmap_change", {
1251
- qMap: r.qMap,
1357
+ function f(e) {
1358
+ a("qmap_change", {
1359
+ qMap: i.qMap,
1252
1360
  value: JSON.stringify(e)
1253
- }), c(e);
1361
+ }), l(e);
1254
1362
  }
1255
- return (t, r) => (w(), l("div", {
1256
- class: v({
1257
- "relative flex-1 min-w-0": s.value,
1258
- "relative flex flex-col": !s.value
1363
+ return (t, n) => (S(), o("div", {
1364
+ class: g({
1365
+ "relative flex-1 min-w-0": c.value,
1366
+ "relative flex flex-col": !c.value
1259
1367
  }),
1260
- style: y({ height: s.value ? "100%" : "400px" })
1261
- }, [p(j(n), {
1262
- modelValue: o.value,
1263
- "onUpdate:modelValue": [r[0] ||= (e) => o.value = e, u],
1368
+ style: _({ height: c.value ? "100%" : "400px" })
1369
+ }, [u(A(r), {
1370
+ modelValue: s.value,
1371
+ "onUpdate:modelValue": [n[0] ||= (e) => s.value = e, f],
1264
1372
  readOnly: e.readOnly,
1265
1373
  lite: e.lite,
1266
- class: v(s.value ? "absolute inset-0" : "flex-1 min-w-0"),
1374
+ class: g(c.value ? "absolute inset-0" : "flex-1 min-w-0"),
1267
1375
  "q-map": e.qMap,
1268
1376
  keys: e.provider?.keyPairs || e.extras || {},
1269
1377
  toolbar: e.qMap.ui
@@ -1277,10 +1385,10 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1277
1385
  "toolbar"
1278
1386
  ])], 6));
1279
1387
  }
1280
- }), Qt = { class: "mb-4" }, $t = { class: "my-2 flex flex-row items-center justify-between" }, en = { class: "qmap-table" }, tn = ["onUpdate:modelValue"], nn = ["onUpdate:modelValue"], rn = ["onClick"], an = { key: 0 }, on = {
1388
+ }), an = { class: "mb-4" }, on = { class: "my-2 flex flex-row items-center justify-between" }, sn = { class: "qmap-table" }, cn = ["onUpdate:modelValue"], ln = ["onUpdate:modelValue"], un = ["onClick"], dn = { key: 0 }, fn = {
1281
1389
  colspan: "2",
1282
1390
  class: "text-center"
1283
- }, sn = /* @__PURE__ */ h({
1391
+ }, pn = /* @__PURE__ */ f({
1284
1392
  __name: "qSimpleMap",
1285
1393
  props: {
1286
1394
  qMap: {},
@@ -1293,71 +1401,71 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1293
1401
  style: {}
1294
1402
  },
1295
1403
  emits: ["qmap_change", "qmap_subquestions"],
1296
- setup(t, { emit: i }) {
1297
- let a = t, o = i, s = T([]);
1298
- L(() => a.model, (e) => d(a.model[a.qMap.id])), b(() => {
1299
- d(a.model[a.qMap.id] || void 0);
1404
+ setup(t, { emit: n }) {
1405
+ let r = t, i = n, c = w([]);
1406
+ I(() => r.model, (e) => l(r.model[r.qMap.id])), v(() => {
1407
+ l(r.model[r.qMap.id] || void 0);
1300
1408
  });
1301
- function d(e) {
1302
- e ? s.value = Object.keys(e).map((t) => ({
1409
+ function l(e) {
1410
+ e ? c.value = Object.keys(e).map((t) => ({
1303
1411
  key: t,
1304
1412
  val: e[t]
1305
- })) : s.value = [];
1413
+ })) : c.value = [];
1306
1414
  }
1307
- function f() {
1308
- let e = s.value.length ? s.value.reduce((e, t) => (e[t.key] = t.val, e), {}) : {};
1309
- o("qmap_change", {
1310
- qMap: a.qMap,
1415
+ function d() {
1416
+ let e = c.value.length ? c.value.reduce((e, t) => (e[t.key] = t.val, e), {}) : {};
1417
+ i("qmap_change", {
1418
+ qMap: r.qMap,
1311
1419
  value: e
1312
1420
  });
1313
1421
  }
1314
- function m() {
1315
- s.value = s.value.concat([{
1422
+ function f() {
1423
+ c.value = c.value.concat([{
1316
1424
  key: "",
1317
1425
  val: ""
1318
- }]), f();
1426
+ }]), d();
1319
1427
  }
1320
- function h(e) {
1321
- s.value = s.value.filter((t) => t != e), f();
1428
+ function p(e) {
1429
+ c.value = c.value.filter((t) => t != e), d();
1322
1430
  }
1323
- return (i, a) => (w(), l("div", Qt, [u("div", $t, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), u("div", null, [u("button", {
1431
+ return (n, r) => (S(), o("div", an, [s("div", on, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", null, [s("button", {
1324
1432
  type: "button",
1325
1433
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1326
1434
  "aria-label": "Add row",
1327
- onClick: a[0] ||= (e) => m()
1328
- }, "+")])]), u("table", en, [a[4] ||= u("thead", null, [u("tr", null, [u("th", null, "Name"), u("th", null, "Value")])], -1), u("tbody", null, [(w(!0), l(r, null, E(s.value, (e, t) => (w(), l("tr", null, [u("td", null, [p(n, null, {
1329
- default: R(() => [z(u("input", {
1330
- "onUpdate:modelValue": (e) => s.value[t].key = e,
1435
+ onClick: r[0] ||= (e) => f()
1436
+ }, "+")])]), s("table", sn, [r[4] ||= s("thead", null, [s("tr", null, [s("th", null, "Name"), s("th", null, "Value")])], -1), s("tbody", null, [(S(!0), o(e, null, T(c.value, (e, t) => (S(), o("tr", null, [s("td", null, [u(X, null, {
1437
+ default: L(() => [R(s("input", {
1438
+ "onUpdate:modelValue": (e) => c.value[t].key = e,
1331
1439
  class: "qmap-input min-w-0 flex-1 px-0 py-2",
1332
- onInput: f
1333
- }, null, 40, tn), [[F, s.value[t].key]])]),
1440
+ onInput: d
1441
+ }, null, 40, cn), [[P, c.value[t].key]])]),
1334
1442
  _: 2
1335
- }, 1024)]), u("td", null, [p(n, null, {
1336
- append: R(() => [u("button", {
1443
+ }, 1024)]), s("td", null, [u(X, null, {
1444
+ append: L(() => [s("button", {
1337
1445
  type: "button",
1338
1446
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
1339
1447
  "aria-label": "Remove row",
1340
- onClick: (t) => h(e)
1341
- }, [...a[2] ||= [u("i", { class: "fa fa-trash" }, null, -1)]], 8, rn)]),
1342
- default: R(() => [z(u("input", {
1343
- "onUpdate:modelValue": (e) => s.value[t].val = e,
1448
+ onClick: (t) => p(e)
1449
+ }, [...r[2] ||= [s("i", { class: "fa fa-trash" }, null, -1)]], 8, un)]),
1450
+ default: L(() => [R(s("input", {
1451
+ "onUpdate:modelValue": (e) => c.value[t].val = e,
1344
1452
  class: "qmap-input min-w-0 flex-1 px-0 py-2",
1345
- onInput: f
1346
- }, null, 40, nn), [[F, s.value[t].val]])]),
1453
+ onInput: d
1454
+ }, null, 40, ln), [[P, c.value[t].val]])]),
1347
1455
  _: 2
1348
- }, 1024)])]))), 256)), s.value.length ? c("", !0) : (w(), l("tr", an, [u("td", on, [a[3] ||= u("div", null, "No values ", -1), u("button", {
1456
+ }, 1024)])]))), 256)), c.value.length ? a("", !0) : (S(), o("tr", dn, [s("td", fn, [r[3] ||= s("div", null, "No values ", -1), s("button", {
1349
1457
  type: "button",
1350
1458
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1351
- onClick: a[1] ||= (e) => m()
1459
+ onClick: r[1] ||= (e) => f()
1352
1460
  }, "Add Row")])]))])])]));
1353
1461
  }
1354
- }), cn = { class: "flex flex-col flex-1 min-w-0" }, ln = { key: 16 }, un = { key: 17 }, dn = { key: 18 }, fn = {
1462
+ }), mn = { class: "flex flex-col flex-1 min-w-0" }, hn = { key: 16 }, gn = { key: 17 }, _n = { key: 18 }, vn = {
1355
1463
  key: 0,
1356
1464
  class: "qmap-separator my-4"
1357
- }, pn = {
1465
+ }, yn = {
1358
1466
  key: 1,
1359
1467
  class: "qmap_nested flex flex-col gap-2"
1360
- }, Q = /* @__PURE__ */ h({
1468
+ }, Q = /* @__PURE__ */ f({
1361
1469
  __name: "Question",
1362
1470
  props: {
1363
1471
  qMap: {},
@@ -1369,21 +1477,21 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1369
1477
  lite: { type: Boolean }
1370
1478
  },
1371
1479
  emits: ["update:model-value", "change"],
1372
- setup(t, { emit: n }) {
1373
- let i = t, o = n, d = a(() => i.modelValue[i.qMap.id] != null), f = a(() => (i.qMap.type || "string").toLowerCase()), m = a(() => i.provider?.questionTypes[f.value]), h = T(!1), g = a(() => h.value && i.qMap.onValue || []), _ = T([]), y = a(() => g.value.concat(_.value));
1374
- b(() => {
1375
- h.value = i.modelValue[i.qMap.id] != null && i.modelValue[i.qMap.id] != "", !d.value && i.qMap.default && !m.value && (i.modelValue[i.qMap.id] = i.qMap.default);
1480
+ setup(t, { emit: r }) {
1481
+ let c = t, l = r, d = n(() => c.modelValue[c.qMap.id] != null), f = n(() => (c.qMap.type || "string").toLowerCase()), p = n(() => c.provider?.questionTypes[f.value]), m = w(!1), h = n(() => m.value && c.qMap.onValue || []), _ = w([]), y = n(() => h.value.concat(_.value));
1482
+ v(() => {
1483
+ m.value = c.modelValue[c.qMap.id] != null && c.modelValue[c.qMap.id] != "", !d.value && c.qMap.default && !p.value && (c.modelValue[c.qMap.id] = c.qMap.default);
1376
1484
  });
1377
- function x(e) {
1378
- i.modelValue[i.qMap.id] = e.value, h.value = i.modelValue[i.qMap.id] != null && i.modelValue[i.qMap.id] != "", i.validator && i.validator.updateEvent(e), o("update:model-value", i.modelValue), o("change", e, i.modelValue);
1485
+ function b(e) {
1486
+ c.modelValue[c.qMap.id] = e.value, m.value = c.modelValue[c.qMap.id] != null && c.modelValue[c.qMap.id] != "", c.validator && c.validator.updateEvent(e), l("update:model-value", c.modelValue), l("change", e, c.modelValue);
1379
1487
  }
1380
- function S(e, t) {
1381
- x(e), h.value = e.value && e.qMap.onValue;
1488
+ function x(e, t) {
1489
+ b(e), m.value = e.value && e.qMap.onValue;
1382
1490
  }
1383
- return (n, i) => {
1384
- let a = O("Question", !0);
1385
- return w(), l(r, null, [
1386
- u("div", cn, [m.value ? (w(), s(k(t.provider?.questionTypes[f.value]), {
1491
+ return (n, r) => {
1492
+ let c = D("Question", !0);
1493
+ return S(), o(e, null, [
1494
+ s("div", mn, [p.value ? (S(), i(O(t.provider?.questionTypes[f.value]), {
1387
1495
  key: 0,
1388
1496
  qMap: t.qMap,
1389
1497
  modelValue: t.modelValue,
@@ -1392,8 +1500,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1392
1500
  validator: t.validator,
1393
1501
  lite: t.lite,
1394
1502
  readOnly: t.readOnly,
1395
- onChange: S,
1396
- "onUpdate:modelValue": i[0] ||= (e) => o("update:model-value", e)
1503
+ onChange: x,
1504
+ "onUpdate:modelValue": r[0] ||= (e) => l("update:model-value", e)
1397
1505
  }, null, 40, [
1398
1506
  "qMap",
1399
1507
  "modelValue",
@@ -1402,7 +1510,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1402
1510
  "validator",
1403
1511
  "lite",
1404
1512
  "readOnly"
1405
- ])) : f.value == "text" || f.value == "string" ? (w(), s(Z, {
1513
+ ])) : f.value == "text" || f.value == "string" ? (S(), i(Z, {
1406
1514
  key: 1,
1407
1515
  qMap: t.qMap,
1408
1516
  model: t.modelValue,
@@ -1410,7 +1518,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1410
1518
  validator: t.validator,
1411
1519
  lite: t.lite,
1412
1520
  readOnly: t.readOnly || t.qMap.readOnly,
1413
- onQmap_change: x
1521
+ onQmap_change: b
1414
1522
  }, null, 8, [
1415
1523
  "qMap",
1416
1524
  "model",
@@ -1418,7 +1526,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1418
1526
  "validator",
1419
1527
  "lite",
1420
1528
  "readOnly"
1421
- ])) : f.value == "object" ? (w(), s(qt, {
1529
+ ])) : f.value == "object" ? (S(), i($t, {
1422
1530
  key: 2,
1423
1531
  qMap: t.qMap,
1424
1532
  model: t.modelValue,
@@ -1427,7 +1535,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1427
1535
  lite: t.lite,
1428
1536
  readOnly: t.readOnly || t.qMap.readOnly,
1429
1537
  provider: t.provider,
1430
- onQmap_change: x
1538
+ onQmap_change: b
1431
1539
  }, null, 8, [
1432
1540
  "qMap",
1433
1541
  "model",
@@ -1436,7 +1544,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1436
1544
  "lite",
1437
1545
  "readOnly",
1438
1546
  "provider"
1439
- ])) : f.value == "number" ? (w(), s(Z, {
1547
+ ])) : f.value == "number" ? (S(), i(Z, {
1440
1548
  key: 3,
1441
1549
  qMap: t.qMap,
1442
1550
  model: t.modelValue,
@@ -1445,7 +1553,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1445
1553
  validator: t.validator,
1446
1554
  lite: t.lite,
1447
1555
  readOnly: t.readOnly || t.qMap.readOnly,
1448
- onQmap_change: x
1556
+ onQmap_change: b
1449
1557
  }, null, 8, [
1450
1558
  "qMap",
1451
1559
  "model",
@@ -1453,7 +1561,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1453
1561
  "validator",
1454
1562
  "lite",
1455
1563
  "readOnly"
1456
- ])) : f.value == "colour" ? (w(), s(ot, {
1564
+ ])) : f.value == "colour" ? (S(), i(ft, {
1457
1565
  key: 4,
1458
1566
  qMap: t.qMap,
1459
1567
  model: t.modelValue,
@@ -1461,7 +1569,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1461
1569
  validator: t.validator,
1462
1570
  lite: t.lite,
1463
1571
  readOnly: t.readOnly || t.qMap.readOnly,
1464
- onQmap_change: x
1572
+ onQmap_change: b
1465
1573
  }, null, 8, [
1466
1574
  "qMap",
1467
1575
  "model",
@@ -1469,7 +1577,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1469
1577
  "validator",
1470
1578
  "lite",
1471
1579
  "readOnly"
1472
- ])) : f.value == "date" ? (w(), s(xt, {
1580
+ ])) : f.value == "date" ? (S(), i(Dt, {
1473
1581
  key: 5,
1474
1582
  qMap: t.qMap,
1475
1583
  model: t.modelValue,
@@ -1478,7 +1586,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1478
1586
  validator: t.validator,
1479
1587
  lite: t.lite,
1480
1588
  readOnly: t.readOnly || t.qMap.readOnly,
1481
- onQmap_change: x
1589
+ onQmap_change: b
1482
1590
  }, null, 8, [
1483
1591
  "qMap",
1484
1592
  "model",
@@ -1486,7 +1594,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1486
1594
  "validator",
1487
1595
  "lite",
1488
1596
  "readOnly"
1489
- ])) : f.value == "datetime" ? (w(), s(xt, {
1597
+ ])) : f.value == "datetime" ? (S(), i(Dt, {
1490
1598
  key: 6,
1491
1599
  qMap: t.qMap,
1492
1600
  model: t.modelValue,
@@ -1495,7 +1603,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1495
1603
  validator: t.validator,
1496
1604
  lite: t.lite,
1497
1605
  readOnly: t.readOnly || t.qMap.readOnly,
1498
- onQmap_change: x
1606
+ onQmap_change: b
1499
1607
  }, null, 8, [
1500
1608
  "qMap",
1501
1609
  "model",
@@ -1503,7 +1611,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1503
1611
  "validator",
1504
1612
  "lite",
1505
1613
  "readOnly"
1506
- ])) : f.value == "time" ? (w(), s(Z, {
1614
+ ])) : f.value == "time" ? (S(), i(Z, {
1507
1615
  key: 7,
1508
1616
  qMap: t.qMap,
1509
1617
  model: t.modelValue,
@@ -1512,7 +1620,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1512
1620
  validator: t.validator,
1513
1621
  lite: t.lite,
1514
1622
  readOnly: t.readOnly || t.qMap.readOnly,
1515
- onQmap_change: x
1623
+ onQmap_change: b
1516
1624
  }, null, 8, [
1517
1625
  "qMap",
1518
1626
  "model",
@@ -1520,7 +1628,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1520
1628
  "validator",
1521
1629
  "lite",
1522
1630
  "readOnly"
1523
- ])) : f.value == "colour" || f.value == "color" ? (w(), s(Z, {
1631
+ ])) : f.value == "colour" || f.value == "color" ? (S(), i(Z, {
1524
1632
  key: 8,
1525
1633
  qMap: t.qMap,
1526
1634
  model: t.modelValue,
@@ -1529,7 +1637,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1529
1637
  readOnly: t.readOnly || t.qMap.readOnly,
1530
1638
  style: "color",
1531
1639
  extras: t.extras,
1532
- onQmap_change: x
1640
+ onQmap_change: b
1533
1641
  }, null, 8, [
1534
1642
  "qMap",
1535
1643
  "model",
@@ -1537,13 +1645,13 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1537
1645
  "lite",
1538
1646
  "readOnly",
1539
1647
  "extras"
1540
- ])) : f.value == "boolean" ? (w(), s(Oe, {
1648
+ ])) : f.value == "boolean" ? (S(), i(Me, {
1541
1649
  key: 9,
1542
1650
  qMap: t.qMap,
1543
1651
  model: t.modelValue,
1544
- onQmap_subquestions: i[1] ||= (e) => _.value = e || [],
1652
+ onQmap_subquestions: r[1] ||= (e) => _.value = e || [],
1545
1653
  extras: t.extras,
1546
- onQmap_change: x,
1654
+ onQmap_change: b,
1547
1655
  validator: t.validator,
1548
1656
  lite: t.lite,
1549
1657
  readOnly: t.readOnly || t.qMap.readOnly
@@ -1554,7 +1662,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1554
1662
  "validator",
1555
1663
  "lite",
1556
1664
  "readOnly"
1557
- ])) : f.value == "caption" ? (w(), s(Xt, {
1665
+ ])) : f.value == "caption" ? (S(), i(nn, {
1558
1666
  key: 10,
1559
1667
  qMap: t.qMap,
1560
1668
  model: t.modelValue,
@@ -1563,7 +1671,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1563
1671
  "qMap",
1564
1672
  "model",
1565
1673
  "lite"
1566
- ])) : f.value == "choice" ? (w(), s(tt, {
1674
+ ])) : f.value == "choice" ? (S(), i(st, {
1567
1675
  key: 11,
1568
1676
  qMap: t.qMap,
1569
1677
  model: t.modelValue,
@@ -1572,8 +1680,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1572
1680
  lite: t.lite,
1573
1681
  readOnly: t.readOnly || t.qMap.readOnly,
1574
1682
  provider: t.provider,
1575
- onQmap_change: x,
1576
- onQmap_subquestions: i[2] ||= (e) => _.value = e || []
1683
+ onQmap_change: b,
1684
+ onQmap_subquestions: r[2] ||= (e) => _.value = e || []
1577
1685
  }, null, 8, [
1578
1686
  "qMap",
1579
1687
  "model",
@@ -1582,7 +1690,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1582
1690
  "lite",
1583
1691
  "readOnly",
1584
1692
  "provider"
1585
- ])) : f.value == "map" ? (w(), s(sn, {
1693
+ ])) : f.value == "map" ? (S(), i(pn, {
1586
1694
  key: 12,
1587
1695
  qMap: t.qMap,
1588
1696
  model: t.modelValue,
@@ -1591,8 +1699,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1591
1699
  lite: t.lite,
1592
1700
  readOnly: t.readOnly,
1593
1701
  provider: t.provider,
1594
- onQmap_change: x,
1595
- onQmap_subquestions: i[3] ||= (e) => _.value = e || []
1702
+ onQmap_change: b,
1703
+ onQmap_subquestions: r[3] ||= (e) => _.value = e || []
1596
1704
  }, null, 8, [
1597
1705
  "qMap",
1598
1706
  "model",
@@ -1601,7 +1709,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1601
1709
  "lite",
1602
1710
  "readOnly",
1603
1711
  "provider"
1604
- ])) : f.value == "geo_map" ? (w(), s(Zt, {
1712
+ ])) : f.value == "geo_map" ? (S(), i(rn, {
1605
1713
  key: 13,
1606
1714
  qMap: t.qMap,
1607
1715
  model: t.modelValue,
@@ -1610,8 +1718,8 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1610
1718
  lite: t.lite,
1611
1719
  readOnly: t.readOnly,
1612
1720
  provider: t.provider,
1613
- onQmap_change: x,
1614
- onQmap_subquestions: i[4] ||= (e) => _.value = e || []
1721
+ onQmap_change: b,
1722
+ onQmap_subquestions: r[4] ||= (e) => _.value = e || []
1615
1723
  }, null, 8, [
1616
1724
  "qMap",
1617
1725
  "model",
@@ -1620,7 +1728,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1620
1728
  "lite",
1621
1729
  "readOnly",
1622
1730
  "provider"
1623
- ])) : f.value == "array" ? (w(), s(ce, {
1731
+ ])) : f.value == "array" ? (S(), i(fe, {
1624
1732
  key: 14,
1625
1733
  qMap: t.qMap,
1626
1734
  model: t.modelValue,
@@ -1629,7 +1737,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1629
1737
  lite: t.lite,
1630
1738
  provider: t.provider,
1631
1739
  readOnly: t.readOnly || t.qMap.readOnly,
1632
- onQmap_change: x
1740
+ onQmap_change: b
1633
1741
  }, null, 8, [
1634
1742
  "qMap",
1635
1743
  "model",
@@ -1638,7 +1746,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1638
1746
  "lite",
1639
1747
  "provider",
1640
1748
  "readOnly"
1641
- ])) : f.value == "group" ? (w(), s(kt, {
1749
+ ])) : f.value == "group" ? (S(), i(Ft, {
1642
1750
  key: 15,
1643
1751
  qMap: t.qMap,
1644
1752
  model: t.modelValue,
@@ -1647,7 +1755,7 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1647
1755
  lite: t.lite,
1648
1756
  provider: t.provider,
1649
1757
  readOnly: t.readOnly || t.qMap.readOnly,
1650
- onQmap_change: i[5] ||= (e) => o("change", e, e.value)
1758
+ onQmap_change: r[5] ||= (e) => l("change", e, e.value)
1651
1759
  }, null, 8, [
1652
1760
  "qMap",
1653
1761
  "model",
@@ -1656,15 +1764,15 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1656
1764
  "lite",
1657
1765
  "provider",
1658
1766
  "readOnly"
1659
- ])) : f.value == "col" ? (w(), l("div", ln, [p(e, { "q-map": t.qMap }, null, 8, ["q-map"]), u("div", { class: v(["flex gap-2", {
1767
+ ])) : f.value == "col" ? (S(), o("div", hn, [u(K, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", { class: g(["flex gap-2", {
1660
1768
  "flex-row": t.qMap.style != "column",
1661
1769
  "flex-col": t.qMap.style == "column"
1662
- }]) }, [(w(!0), l(r, null, E(t.qMap.items, (e) => (w(), l("div", { class: v(["flex flex-1 flex-col min-w-0", { "gap-2": t.qMap.style != "column" }]) }, [p(a, {
1770
+ }]) }, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), o("div", { class: g(["flex flex-1 flex-col min-w-0", { "gap-2": t.qMap.style != "column" }]) }, [u(c, {
1663
1771
  qMap: e,
1664
1772
  modelValue: t.modelValue,
1665
1773
  extras: t.extras,
1666
- onChange: i[6] ||= (e, t) => o("change", e, t),
1667
- "onUpdate:modelValue": i[7] ||= (e) => o("update:model-value", e),
1774
+ onChange: r[6] ||= (e, t) => l("change", e, t),
1775
+ "onUpdate:modelValue": r[7] ||= (e) => l("update:model-value", e),
1668
1776
  provider: t.provider,
1669
1777
  validator: t.validator,
1670
1778
  lite: t.lite,
@@ -1677,14 +1785,14 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1677
1785
  "validator",
1678
1786
  "lite",
1679
1787
  "readOnly"
1680
- ])], 2))), 256))], 2)])) : f.value == "hidden" ? (w(), l("div", un)) : (w(), l("div", dn, "Unsupported " + A(t.qMap?.id) + " : " + A(f.value), 1))]),
1681
- y.value.length && t.qMap.ui?.separator ? (w(), l("hr", fn)) : c("", !0),
1682
- y.value.length ? (w(), l("div", pn, [(w(!0), l(r, null, E(y.value, (e) => (w(), s(a, {
1788
+ ])], 2))), 256))], 2)])) : f.value == "hidden" ? (S(), o("div", gn)) : (S(), o("div", _n, "Unsupported " + k(t.qMap?.id) + " : " + k(f.value), 1))]),
1789
+ y.value.length && t.qMap.ui?.separator ? (S(), o("hr", vn)) : a("", !0),
1790
+ y.value.length ? (S(), o("div", yn, [(S(!0), o(e, null, T(y.value, (e) => (S(), i(c, {
1683
1791
  qMap: e,
1684
1792
  modelValue: t.modelValue,
1685
1793
  extras: t.extras,
1686
- onChange: i[8] ||= (e, t) => o("change", e, t),
1687
- "onUpdate:modelValue": i[9] ||= (e) => o("update:model-value", e),
1794
+ onChange: r[8] ||= (e, t) => l("change", e, t),
1795
+ "onUpdate:modelValue": r[9] ||= (e) => l("update:model-value", e),
1688
1796
  provider: t.provider,
1689
1797
  validator: t.validator,
1690
1798
  lite: t.lite,
@@ -1697,14 +1805,14 @@ var G = { class: "my-2 flex flex-row items-center justify-between" }, ee = {
1697
1805
  "validator",
1698
1806
  "lite",
1699
1807
  "readOnly"
1700
- ]))), 256))])) : c("", !0)
1808
+ ]))), 256))])) : a("", !0)
1701
1809
  ], 64);
1702
1810
  };
1703
1811
  }
1704
- }), mn = ["col", "group"];
1705
- function hn(e, t) {
1812
+ }), bn = ["col", "group"];
1813
+ function xn(e, t) {
1706
1814
  var n = [];
1707
- if (mn.indexOf(e.type) != -1 && (e.items || e.groups) ? e.items ? n = n.concat(e.items) : e.groups && (n = n.concat(e.groups.map((e) => e.items).reduce((e, t) => e.concat(t)).map((e) => hn(e, t)).reduce((e, t) => e.concat(t)))) : n.push(e), e.onValue && (!t || t[e.id] != null && t[e.id] != "") && (n = n.concat($(e.onValue, t))), e.type == "boolean" && (!t || t[e.id] == 1) && e.onPos && (n = n.concat($(e.onPos, t))), e.type == "boolean" && (!t || t[e.id] == 0) && e.onNeg && (n = n.concat($(e.onNeg, t))), e.values) {
1815
+ if (bn.indexOf(e.type) != -1 && (e.items || e.groups) ? e.items ? n = n.concat(e.items) : e.groups && (n = n.concat(e.groups.map((e) => e.items).reduce((e, t) => e.concat(t)).map((e) => xn(e, t)).reduce((e, t) => e.concat(t)))) : n.push(e), e.onValue && (!t || t[e.id] != null && t[e.id] != "") && (n = n.concat($(e.onValue, t))), e.type == "boolean" && (!t || t[e.id] == 1) && e.onPos && (n = n.concat($(e.onPos, t))), e.type == "boolean" && (!t || t[e.id] == 0) && e.onNeg && (n = n.concat($(e.onNeg, t))), e.values) {
1708
1816
  let r = e.values.find((n) => n.value == (!t || t[e.id]));
1709
1817
  r?.onSelect && (n = n.concat($(r.onSelect, t)));
1710
1818
  }
@@ -1714,21 +1822,21 @@ function $(e, t) {
1714
1822
  var n = [];
1715
1823
  return e.forEach((e) => {
1716
1824
  if (e.type != "caption") {
1717
- let r = hn(e, t);
1825
+ let r = xn(e, t);
1718
1826
  n = n.concat(r);
1719
1827
  }
1720
1828
  }), n;
1721
1829
  }
1722
1830
  //#endregion
1723
1831
  //#region src/services/question-validator.ts
1724
- var gn = class {
1725
- invalidFields = new U([]);
1726
- isValid = new U(!0);
1832
+ var Sn = class {
1833
+ invalidFields = new H([]);
1834
+ isValid = new H(!0);
1727
1835
  qMaps = [];
1728
1836
  requiredQMaps = [];
1729
1837
  children = [];
1730
1838
  baseQMaps;
1731
- changeEvents = new W();
1839
+ changeEvents = new U();
1732
1840
  model;
1733
1841
  activeQMAPS = /* @__PURE__ */ new Map();
1734
1842
  constructor(e, t) {
@@ -1758,10 +1866,10 @@ var gn = class {
1758
1866
  get currentQMaps() {
1759
1867
  return this.qMaps;
1760
1868
  }
1761
- }, _n = {
1869
+ }, Cn = {
1762
1870
  key: 0,
1763
1871
  class: "flex-1 min-w-0 overflow-auto"
1764
- }, vn = { class: "flex flex-col gap-2 p-2" }, yn = { class: "flex justify-end gap-2" }, bn = ["disabled"], xn = /* @__PURE__ */ h({
1872
+ }, wn = { class: "flex flex-col gap-2 p-2" }, Tn = { class: "flex justify-end gap-2" }, En = ["disabled"], Dn = /* @__PURE__ */ f({
1765
1873
  __name: "Form",
1766
1874
  props: {
1767
1875
  questions: {},
@@ -1780,99 +1888,110 @@ var gn = class {
1780
1888
  "qmap-change",
1781
1889
  "update:model-value"
1782
1890
  ],
1783
- setup(e, { emit: t }) {
1784
- let n = e, i = t, o = { ...n.modelValue }, d = n.validator || new gn(n.questions, n.modelValue), f = T(!0), p = a(() => !(n.showSubmit || n.showCancel || n.showReset)), m = a({
1785
- get: () => n.modelValue,
1786
- set: (e) => i("update:model-value", e)
1891
+ setup(t, { emit: r }) {
1892
+ let c = t, l = r, u = { ...c.modelValue }, d = c.validator || new Sn(c.questions, c.modelValue), f = w(!0), p = n(() => !(c.showSubmit || c.showCancel || c.showReset)), m = n({
1893
+ get: () => c.modelValue,
1894
+ set: (e) => l("update:model-value", e)
1787
1895
  });
1788
1896
  function h(e, t) {
1789
- i("qmap-change", e, t);
1897
+ l("qmap-change", e, t);
1790
1898
  }
1791
- let g;
1792
- return b(() => {
1793
- g = d.isValid.subscribe((e) => f.value = e);
1794
- }), C(() => g?.unsubscribe()), (t, n) => p.value ? (w(!0), l(r, { key: 0 }, E(e.questions, (t, r) => (w(), s(Q, {
1795
- key: r,
1796
- qMap: t,
1797
- validator: j(d),
1798
- extras: e.extras,
1899
+ let _;
1900
+ return v(() => {
1901
+ _ = d.isValid.subscribe((e) => f.value = e);
1902
+ }), x(() => _?.unsubscribe()), (n, r) => p.value ? (S(!0), o(e, { key: 0 }, T(t.questions, (e, n) => (S(), i(Q, {
1903
+ key: n,
1904
+ qMap: e,
1905
+ validator: A(d),
1906
+ extras: t.extras,
1799
1907
  onChange: h,
1800
1908
  modelValue: m.value,
1801
- "onUpdate:modelValue": n[0] ||= (e) => m.value = e
1909
+ "onUpdate:modelValue": r[0] ||= (e) => m.value = e
1802
1910
  }, null, 8, [
1803
1911
  "qMap",
1804
1912
  "validator",
1805
1913
  "extras",
1806
1914
  "modelValue"
1807
- ]))), 128)) : (w(), l("div", {
1915
+ ]))), 128)) : (S(), o("div", {
1808
1916
  key: 1,
1809
- class: v({
1810
- "flex flex-col flex-1 min-w-0": e.scrollPane,
1811
- "flex flex-col gap-2 p-2": !e.scrollPane
1917
+ class: g({
1918
+ "flex flex-col flex-1 min-w-0": t.scrollPane,
1919
+ "flex flex-col gap-2 p-2": !t.scrollPane
1812
1920
  })
1813
1921
  }, [
1814
- e.scrollPane ? (w(), l("div", _n, [u("div", vn, [(w(!0), l(r, null, E(e.questions, (t, r) => (w(), s(Q, {
1815
- key: r,
1816
- qMap: t,
1817
- validator: j(d),
1818
- extras: e.extras,
1922
+ t.scrollPane ? (S(), o("div", Cn, [s("div", wn, [(S(!0), o(e, null, T(t.questions, (e, n) => (S(), i(Q, {
1923
+ key: n,
1924
+ qMap: e,
1925
+ validator: A(d),
1926
+ extras: t.extras,
1819
1927
  onChange: h,
1820
1928
  modelValue: m.value,
1821
- "onUpdate:modelValue": n[1] ||= (e) => m.value = e
1929
+ "onUpdate:modelValue": r[1] ||= (e) => m.value = e
1822
1930
  }, null, 8, [
1823
1931
  "qMap",
1824
1932
  "validator",
1825
1933
  "extras",
1826
1934
  "modelValue"
1827
- ]))), 128))])])) : (w(!0), l(r, { key: 1 }, E(e.questions, (t, r) => (w(), s(Q, {
1828
- key: r,
1829
- qMap: t,
1830
- validator: j(d),
1831
- extras: e.extras,
1935
+ ]))), 128))])])) : (S(!0), o(e, { key: 1 }, T(t.questions, (e, n) => (S(), i(Q, {
1936
+ key: n,
1937
+ qMap: e,
1938
+ validator: A(d),
1939
+ extras: t.extras,
1832
1940
  onChange: h,
1833
1941
  modelValue: m.value,
1834
- "onUpdate:modelValue": n[2] ||= (e) => m.value = e
1942
+ "onUpdate:modelValue": r[2] ||= (e) => m.value = e
1835
1943
  }, null, 8, [
1836
1944
  "qMap",
1837
1945
  "validator",
1838
1946
  "extras",
1839
1947
  "modelValue"
1840
1948
  ]))), 128)),
1841
- n[6] ||= u("hr", { class: "qmap-separator my-2" }, null, -1),
1842
- u("div", yn, [
1843
- e.showSubmit ? (w(), l("button", {
1949
+ r[6] ||= s("hr", { class: "qmap-separator my-2" }, null, -1),
1950
+ s("div", Tn, [
1951
+ t.showSubmit ? (S(), o("button", {
1844
1952
  key: 0,
1845
1953
  type: "button",
1846
1954
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1847
- onClick: n[3] ||= (e) => i("submit", m.value),
1955
+ onClick: r[3] ||= (e) => l("submit", m.value),
1848
1956
  disabled: !f.value
1849
- }, "Submit", 8, bn)) : c("", !0),
1850
- e.showReset ? (w(), l("button", {
1957
+ }, "Submit", 8, En)) : a("", !0),
1958
+ t.showReset ? (S(), o("button", {
1851
1959
  key: 1,
1852
1960
  type: "button",
1853
1961
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button qmap-button-secondary",
1854
- onClick: n[4] ||= (e) => {
1855
- m.value = o, i("reset");
1962
+ onClick: r[4] ||= (e) => {
1963
+ m.value = u, l("reset");
1856
1964
  }
1857
- }, "Reset")) : c("", !0),
1858
- e.showCancel ? (w(), l("button", {
1965
+ }, "Reset")) : a("", !0),
1966
+ t.showCancel ? (S(), o("button", {
1859
1967
  key: 2,
1860
1968
  type: "button",
1861
1969
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button qmap-button-ghost",
1862
- onClick: n[5] ||= (e) => i("cancel")
1863
- }, "Cancel")) : c("", !0)
1970
+ onClick: r[5] ||= (e) => l("cancel")
1971
+ }, "Cancel")) : a("", !0)
1864
1972
  ])
1865
1973
  ], 2));
1866
1974
  }
1867
1975
  });
1868
1976
  //#endregion
1977
+ //#region __vite-optional-peer-dep:leaflet/dist/leaflet.css:qmap-forms
1978
+ throw Error("Could not resolve \"leaflet/dist/leaflet.css\" imported by \"qmap-forms\". Is it installed?");
1979
+ function On(e) {
1980
+ C(Nn, e);
1981
+ }
1982
+ function kn() {
1983
+ let e = m(Nn, null);
1984
+ if (!e) throw Error("useMyService must be called under a provider (comp1)");
1985
+ return e;
1986
+ }
1987
+ //#endregion
1869
1988
  //#region src/lib.ts
1870
- function Sn(e, t, n, r) {
1871
- let i = T(n), a = new U(i.value), s = new W(), c = g(xn, {
1989
+ function An(e, t, n, i) {
1990
+ let a = w(n), o = new H(a.value), s = new U(), c = p(Dn, {
1872
1991
  questions: t,
1873
- modelValue: i.value,
1992
+ modelValue: a.value,
1874
1993
  "onUpdate:model-value": (e) => {
1875
- i.value = e, a.next(e);
1994
+ a.value = e, o.next(e);
1876
1995
  },
1877
1996
  onQmapChange: (e, t) => {
1878
1997
  s.next({
@@ -1880,20 +1999,15 @@ function Sn(e, t, n, r) {
1880
1999
  v: t
1881
2000
  });
1882
2001
  },
1883
- ...r
2002
+ ...i
1884
2003
  });
1885
- return o(c).mount(e), {
2004
+ return r(c).mount(e), {
1886
2005
  form: c,
1887
- model: i,
1888
- state: a.asObservable(),
2006
+ model: a,
2007
+ state: o.asObservable(),
1889
2008
  events: s
1890
2009
  };
1891
2010
  }
1892
- var Cn = {
1893
- Question: Q,
1894
- Form: xn,
1895
- QuestionValidator: gn,
1896
- mount: Sn
1897
- };
1898
2011
  //#endregion
1899
- export { xn as Form, Q as Question, gn as QuestionValidator, Cn as default, hn as flattenNode, $ as flattenQMAPs, Sn as mount };
2012
+ export { St as CalendarPicker, Dn as Form, Nn as MyScopeKey, Q as Question, Sn as QuestionValidator, Ke as SimpleChoice, Et as SimpleDate, Mn as SimpleGeomEditor, K as TitleBlock, _e as ToggleSwitch, Pn as default, xn as flattenNode, $ as flattenQMAPs, An as mount, On as provideBadQMAPS, kn as useBadQMAPS };
2013
+ var jn, Mn, Nn, Pn;