qmap-forms 1.0.8 → 1.0.9

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
@@ -3,16 +3,16 @@ import { DateTime as B } from "luxon";
3
3
  import { BehaviorSubject as V, Subject as H } from "rxjs";
4
4
  import "leaflet-editable";
5
5
  import te from "leaflet-path-drag";
6
- import { Circle as U, Control as W, DomEvent as G, DomUtil as ne, FeatureGroup as K, LatLngBounds as re, Map as ie, Rectangle as ae, TileLayer as q, featureGroup as oe, geoJSON as se } from "leaflet";
6
+ import { Circle as U, Control as W, DomEvent as G, DomUtil as K, FeatureGroup as q, LatLngBounds as ne, Map as re, Rectangle as ie, TileLayer as J, featureGroup as ae, geoJSON as oe } from "leaflet";
7
7
  //#region \0rolldown/runtime.js
8
- var J = Object.defineProperty, ce = (e, t) => {
8
+ var Y = Object.defineProperty, se = (e, t) => {
9
9
  let n = {};
10
- for (var r in e) J(n, r, {
10
+ for (var r in e) Y(n, r, {
11
11
  get: e[r],
12
12
  enumerable: !0
13
13
  });
14
- return t || J(n, Symbol.toStringTag, { value: "Module" }), n;
15
- }, le = /* @__PURE__ */ f({
14
+ return t || Y(n, Symbol.toStringTag, { value: "Module" }), n;
15
+ }, ce = /* @__PURE__ */ f({
16
16
  __name: "BtnTooltip",
17
17
  props: { label: {} },
18
18
  setup(n) {
@@ -72,47 +72,47 @@ var J = Object.defineProperty, ce = (e, t) => {
72
72
  tabindex: "-1"
73
73
  }, k(n.label), 5)) : a("", !0)]))], 64));
74
74
  }
75
- }), ue = /* @__PURE__ */ f({
75
+ }), le = /* @__PURE__ */ f({
76
76
  __name: "subtitle-button",
77
77
  props: { qMap: {} },
78
78
  setup(e) {
79
- return (t, n) => e.qMap.subtitle ? (S(), i(le, {
79
+ return (t, n) => e.qMap.subtitle ? (S(), i(ce, {
80
80
  key: 0,
81
81
  label: e.qMap.subtitle
82
82
  }, {
83
- default: I(() => [...n[0] ||= [s("i", { class: "fa fa-question-circle" }, null, -1)]]),
83
+ default: I(() => [...n[0] ||= [s("i", { class: "fa fa-question-circle text-qmap-primary" }, null, -1)]]),
84
84
  _: 1
85
85
  }, 8, ["label"])) : a("", !0);
86
86
  }
87
- }), de = { class: "block" }, Y = /* @__PURE__ */ f({
87
+ }), ue = { class: "block" }, X = /* @__PURE__ */ f({
88
88
  __name: "title-block",
89
89
  props: { qMap: {} },
90
90
  setup(e) {
91
- return (t, n) => (S(), o("span", de, [
91
+ return (t, n) => (S(), o("span", ue, [
92
92
  l(k(e.qMap.title || (e.qMap.id !== "#" && e.qMap.type !== "col" && e.qMap.type !== "group" ? e.qMap.id : "")) + " ", 1),
93
93
  E(t.$slots, "default"),
94
- u(ue, { "q-map": e.qMap }, null, 8, ["q-map"])
94
+ u(le, { "q-map": e.qMap }, null, 8, ["q-map"])
95
95
  ]));
96
96
  }
97
- }), fe = { class: "my-2 flex flex-row items-center justify-between" }, pe = {
97
+ }), de = { class: "my-2 flex flex-row items-center justify-between" }, fe = {
98
98
  key: 0,
99
99
  class: "qmap_array--unset"
100
- }, me = {
100
+ }, pe = {
101
101
  key: 1,
102
102
  class: "qmap_array--set"
103
- }, he = {
103
+ }, me = {
104
104
  key: 0,
105
105
  class: "qmap-card min-w-0 p-6 text-center qmap-empty"
106
- }, ge = {
106
+ }, he = {
107
107
  key: 1,
108
108
  class: ""
109
- }, _e = {
109
+ }, ge = {
110
110
  key: 0,
111
111
  class: "qmap-card min-w-0 p-3"
112
- }, ve = { class: "flex flex-col" }, ye = { class: "flex items-center gap-3 py-2 qmap-list-row" }, be = { class: "flex-1 min-w-0" }, xe = ["onClick"], Se = {
112
+ }, _e = { class: "flex flex-col" }, ve = { class: "flex items-center gap-3 py-2 qmap-list-row" }, ye = { class: "flex-1 min-w-0" }, be = ["onClick"], xe = {
113
113
  key: 1,
114
114
  class: "mt-2 flex flex-col gap-2"
115
- }, Ce = { class: "qmap-card min-w-0 p-3 flex flex-row items-center gap-2" }, we = { class: "flex-1 min-w-0 flex flex-col gap-2 qmap_sub_group mt-2" }, Te = ["onClick"], Ee = /* @__PURE__ */ f({
115
+ }, Se = { class: "qmap-card min-w-0 p-3 flex flex-row items-center gap-2" }, Ce = { class: "flex-1 min-w-0 flex flex-col gap-2 qmap_sub_group mt-2" }, we = ["onClick"], Te = /* @__PURE__ */ f({
116
116
  __name: "qArray",
117
117
  props: {
118
118
  qMap: {},
@@ -150,19 +150,19 @@ var J = Object.defineProperty, ce = (e, t) => {
150
150
  var t = l.value.slice();
151
151
  t.splice(e, 1), l.value = t;
152
152
  }
153
- return (n, r) => (S(), o("div", null, [s("div", fe, [u(Y, { "q-map": t.qMap }, null, 8, ["q-map"]), l.value ? (S(), o("div", me, [s("button", {
153
+ return (n, r) => (S(), o("div", null, [s("div", de, [u(X, { "q-map": t.qMap }, null, 8, ["q-map"]), l.value ? (S(), o("div", pe, [s("button", {
154
154
  type: "button",
155
155
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
156
156
  "aria-label": "Add item",
157
157
  onClick: r[1] ||= (e) => d()
158
- }, "+")])) : (S(), o("div", pe, [s("button", {
158
+ }, "+")])) : (S(), o("div", fe, [s("button", {
159
159
  type: "button",
160
160
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
161
161
  "aria-label": "Add item",
162
162
  onClick: r[0] ||= (e) => {
163
163
  l.value = [], d();
164
164
  }
165
- }, "+")]))]), !l.value || !l.value.length ? (S(), o("div", he, [...r[2] ||= [s("i", null, "Not set", -1)]])) : (S(), o("div", ge, [t.qMap.item ? (S(), o("div", _e, [s("div", ve, [(S(!0), o(e, null, T(l.value, (e, n) => (S(), o("div", ye, [s("div", be, [u(Q, {
165
+ }, "+")]))]), !l.value || !l.value.length ? (S(), o("div", me, [...r[2] ||= [s("i", null, "Not set", -1)]])) : (S(), o("div", he, [t.qMap.item ? (S(), o("div", ge, [s("div", _e, [(S(!0), o(e, null, T(l.value, (e, n) => (S(), o("div", ve, [s("div", ye, [u(Q, {
166
166
  qMap: t.qMap.item,
167
167
  modelValue: l.value[n],
168
168
  "onUpdate:modelValue": [(e) => l.value[n] = e, (e) => f(n, e)],
@@ -181,7 +181,7 @@ var J = Object.defineProperty, ce = (e, t) => {
181
181
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
182
182
  "aria-label": "Remove item",
183
183
  onClick: (e) => m(n)
184
- }, [...r[3] ||= [s("i", { class: "fa fa-trash" }, null, -1)]], 8, xe)]))), 256))])])) : t.qMap.items ? (S(), o("div", Se, [(S(!0), o(e, null, T(l.value, (n, a) => (S(), o("div", Ce, [s("div", we, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), i(Q, {
184
+ }, [...r[3] ||= [s("i", { class: "fa fa-trash" }, null, -1)]], 8, be)]))), 256))])])) : t.qMap.items ? (S(), o("div", xe, [(S(!0), o(e, null, T(l.value, (n, a) => (S(), o("div", Se, [s("div", Ce, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), i(Q, {
185
185
  qMap: e,
186
186
  modelValue: l.value[a],
187
187
  "onUpdate:modelValue": [(e) => l.value[a] = e, (e) => f(a, e)],
@@ -202,13 +202,13 @@ var J = Object.defineProperty, ce = (e, t) => {
202
202
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
203
203
  "aria-label": "Remove item",
204
204
  onClick: (e) => m(a)
205
- }, [...r[4] ||= [s("i", { class: "fa fa-times" }, null, -1)]], 8, Te)]))), 256))])) : a("", !0)]))]));
205
+ }, [...r[4] ||= [s("i", { class: "fa fa-times" }, null, -1)]], 8, we)]))), 256))])) : a("", !0)]))]));
206
206
  }
207
- }), De = { class: "flex items-center gap-1" }, Oe = [
207
+ }), Ee = { class: "flex items-center gap-1" }, De = [
208
208
  "aria-checked",
209
209
  "aria-label",
210
210
  "disabled"
211
- ], ke = /*@__PURE__*/ f({
211
+ ], Oe = /*@__PURE__*/ f({
212
212
  __name: "ToggleSwitch",
213
213
  props: {
214
214
  modelValue: { type: Boolean },
@@ -232,43 +232,46 @@ var J = Object.defineProperty, ce = (e, t) => {
232
232
  a.value === !1 && "slider-unchecked",
233
233
  a.value === void 0 && "slider-indeterminate"
234
234
  ].filter(Boolean).join(" "));
235
- return (t, n) => (S(), o("span", De, [s("button", {
235
+ return (t, n) => (S(), o("span", Ee, [s("button", {
236
236
  type: "button",
237
237
  class: g(["toggle-root", l.value]),
238
238
  onClick: c,
239
239
  "aria-checked": String(a.value),
240
240
  "aria-label": e.ariaLabel,
241
241
  disabled: e.disabled
242
- }, [s("span", { class: g(["toggle-slider", u.value]) }, null, 2)], 10, Oe), E(t.$slots, "default", {}, void 0, !0)]));
242
+ }, [s("span", { class: g(["toggle-slider", u.value]) }, null, 2)], 10, De), E(t.$slots, "default", {}, void 0, !0)]));
243
243
  }
244
- }), Ae = (e, t) => {
244
+ }), ke = (e, t) => {
245
245
  let n = e.__vccOpts || e;
246
246
  for (let [e, r] of t) n[e] = r;
247
247
  return n;
248
- }, je = /*#__PURE__*/ Ae(ke, [["__scopeId", "data-v-edf9fc7d"]]), Me = {
248
+ }, Ae = /*#__PURE__*/ ke(Oe, [["__scopeId", "data-v-7ac41677"]]), je = {
249
249
  key: 0,
250
250
  class: "inline-flex items-center gap-2"
251
- }, Ne = ["for"], Pe = {
251
+ }, Me = ["for"], Ne = {
252
252
  key: 0,
253
253
  class: "qmap-required"
254
- }, Fe = {
254
+ }, Pe = {
255
255
  key: 1,
256
- class: "qmap-required"
257
- }, Ie = {
256
+ class: "qmap-required && value == undefined"
257
+ }, Fe = {
258
258
  key: 2,
259
- class: "qmap-button-field sm:flex items-center"
260
- }, Le = { class: "sm:w-1/2 md:w-1/4 lg:w-1/5" }, Re = {
259
+ class: "qmap-button-field lg:flex items-center"
260
+ }, Ie = { class: "lg:w-1/2 xl:w-1/4" }, Le = {
261
261
  key: 0,
262
262
  class: "qmap-required"
263
+ }, Re = {
264
+ key: 0,
265
+ class: "fa fa-asterisk"
263
266
  }, ze = {
264
- class: "btn-group sm:w-1/2 md:w-2/4 lg:w-1/4 flex",
267
+ class: "btn-group lg:w-1/2 xl:w-1/4 flex",
265
268
  role: "group"
266
269
  }, Be = ["aria-pressed", "disabled"], Ve = ["aria-pressed", "disabled"], He = ["for"], Ue = ["id", "disabled"], We = {
267
270
  key: 0,
268
271
  class: "qmap-required"
269
272
  }, Ge = {
270
273
  key: 1,
271
- class: "qmap-required"
274
+ class: "qmap-required && value == undefined"
272
275
  }, Ke = /* @__PURE__ */ f({
273
276
  __name: "qBool",
274
277
  props: {
@@ -294,33 +297,33 @@ var J = Object.defineProperty, ce = (e, t) => {
294
297
  function d(e) {
295
298
  c.value = e, l(e);
296
299
  }
297
- return (t, n) => e.lite && e.readOnly ? (S(), o("span", Me, k(c.value ? "✓" : "□"), 1)) : e.qMap.style === "switch" ? (S(), o("label", {
300
+ return (t, n) => e.lite && e.readOnly ? (S(), o("span", je, k(c.value ? "✓" : "□"), 1)) : e.qMap.style === "switch" ? (S(), o("label", {
298
301
  key: 1,
299
302
  class: "inline-flex items-center gap-2 min-h-8 qmap-check-row",
300
303
  for: e.qMap.id
301
- }, [u(je, {
304
+ }, [u(Ae, {
302
305
  modelValue: c.value,
303
306
  "onUpdate:modelValue": [n[0] ||= (e) => c.value = e, d],
304
307
  disabled: e.readOnly
305
- }, null, 8, ["modelValue", "disabled"]), e.lite ? e.qMap.required ? (S(), o("span", Fe, [...n[6] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0) : (S(), i(Y, {
308
+ }, null, 8, ["modelValue", "disabled"]), e.lite ? e.qMap.required ? (S(), o("span", Pe, [...n[6] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0) : (S(), i(X, {
306
309
  key: 0,
307
310
  "q-map": e.qMap
308
311
  }, {
309
- default: I(() => [e.qMap.required ? (S(), o("span", Pe, [...n[5] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
312
+ default: I(() => [e.qMap.required ? (S(), o("span", Ne, [...n[5] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
310
313
  _: 1
311
- }, 8, ["q-map"]))], 8, Ne)) : e.qMap.style === "button" ? (S(), o("div", Ie, [s("div", Le, [u(Y, { "q-map": e.qMap }, {
312
- default: I(() => [e.qMap.required ? (S(), o("span", Re, [...n[7] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
314
+ }, 8, ["q-map"]))], 8, Me)) : e.qMap.style === "button" ? (S(), o("div", Fe, [s("div", Ie, [u(X, { "q-map": e.qMap }, {
315
+ default: I(() => [e.qMap.required ? (S(), o("span", Le, [c.value == null ? (S(), o("i", Re)) : a("", !0)])) : a("", !0)]),
313
316
  _: 1
314
317
  }, 8, ["q-map"])]), s("div", ze, [s("button", {
315
318
  type: "button",
316
319
  "aria-pressed": c.value === !0,
317
- class: g(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": c.value === !0 }]),
320
+ class: g(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "bg-green-300 dark:bg-green-700 ": c.value === !0 }]),
318
321
  disabled: e.readOnly,
319
322
  onClick: n[1] ||= (e) => d(!0)
320
323
  }, k(e.qMap.pos || "Yes"), 11, Be), s("button", {
321
324
  type: "button",
322
325
  "aria-pressed": c.value === !1,
323
- class: g(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "qmap-button-selected": c.value === !1 }]),
326
+ class: g(["gap-2 flex-1 min-h-9 px-3.5 py-2 qmap-button", { "bg-red-300 dark:bg-red-700": c.value === !1 }]),
324
327
  disabled: e.readOnly,
325
328
  onClick: n[2] ||= (e) => d(!1)
326
329
  }, k(e.qMap.neg || "No"), 11, Ve)])])) : (S(), o("label", {
@@ -334,11 +337,11 @@ var J = Object.defineProperty, ce = (e, t) => {
334
337
  class: "qmap-checkbox",
335
338
  disabled: e.readOnly,
336
339
  onChange: n[4] ||= (e) => l(c.value)
337
- }, null, 40, Ue), [[ee, c.value]]), e.lite ? e.qMap.required && !c.value ? (S(), o("span", Ge, [...n[9] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0) : (S(), i(Y, {
340
+ }, null, 40, Ue), [[ee, c.value]]), e.lite ? e.qMap.required && !c.value ? (S(), o("span", Ge, [...n[8] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0) : (S(), i(X, {
338
341
  key: 0,
339
342
  "q-map": e.qMap
340
343
  }, {
341
- default: I(() => [e.qMap.required && !c.value ? (S(), o("span", We, [...n[8] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
344
+ default: I(() => [e.qMap.required && !c.value ? (S(), o("span", We, [...n[7] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0)]),
342
345
  _: 1
343
346
  }, 8, ["q-map"]))], 8, He));
344
347
  }
@@ -348,7 +351,7 @@ var J = Object.defineProperty, ce = (e, t) => {
348
351
  }, Je = {
349
352
  key: 1,
350
353
  class: "inline-flex shrink-0 items-center gap-1 qmap-control-append"
351
- }, X = /* @__PURE__ */ f({
354
+ }, Z = /* @__PURE__ */ f({
352
355
  __name: "FieldControl",
353
356
  props: {
354
357
  invalid: { type: Boolean },
@@ -444,42 +447,42 @@ var J = Object.defineProperty, ce = (e, t) => {
444
447
  function G() {
445
448
  f("update:model-value", d.multi ? (A.value || []).map((e) => e.value) : A.value?.value);
446
449
  }
447
- function ne() {
450
+ function K() {
448
451
  d.readOnly || x.value || (x.value = !0, C.value = "", D.value = 0, h(() => m.value?.focus()));
449
452
  }
450
- function K() {
453
+ function q() {
451
454
  x.value = !1, C.value = "";
452
455
  }
453
- function re(e) {
456
+ function ne(e) {
454
457
  if (d.multi) {
455
458
  let t = A.value || [];
456
459
  A.value = W(e) ? t.filter((t) => !Object.is(t.value, e.value)) : [...t, e], G();
457
460
  return;
458
461
  }
459
- A.value = e, G(), K();
462
+ A.value = e, G(), q();
460
463
  }
461
- function ie() {
464
+ function re() {
462
465
  A.value = d.multi ? [] : {
463
466
  title: "Not set",
464
467
  value: null
465
- }, G(), d.multi || K();
468
+ }, G(), d.multi || q();
466
469
  }
467
- function ae(e, t) {
470
+ function ie(e, t) {
468
471
  t instanceof HTMLButtonElement && (v[e] = t);
469
472
  }
470
- function q(e) {
473
+ function J(e) {
471
474
  P.value.length && (D.value = (e + P.value.length) % P.value.length, h(() => v[D.value]?.focus()));
472
475
  }
473
- function oe(e) {
474
- e.key === "ArrowDown" ? (e.preventDefault(), q(D.value)) : e.key === "Escape" ? (e.preventDefault(), K()) : e.key === "Enter" && P.value[D.value] && (e.preventDefault(), re(P.value[D.value]));
476
+ function ae(e) {
477
+ e.key === "ArrowDown" ? (e.preventDefault(), J(D.value)) : e.key === "Escape" ? (e.preventDefault(), q()) : e.key === "Enter" && P.value[D.value] && (e.preventDefault(), ne(P.value[D.value]));
475
478
  }
476
- function se(e, t) {
477
- e.key === "ArrowDown" ? (e.preventDefault(), q(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), q(t - 1)) : e.key === "Escape" ? (e.preventDefault(), K()) : e.key === "Tab" && !e.shiftKey && t === P.value.length - 1 && K();
479
+ function oe(e, t) {
480
+ e.key === "ArrowDown" ? (e.preventDefault(), J(t + 1)) : e.key === "ArrowUp" ? (e.preventDefault(), J(t - 1)) : e.key === "Escape" ? (e.preventDefault(), q()) : e.key === "Tab" && !e.shiftKey && t === P.value.length - 1 && q();
478
481
  }
479
- function J(e) {
480
- p.value && !p.value.contains(e.target) && K();
482
+ function Y(e) {
483
+ p.value && !p.value.contains(e.target) && q();
481
484
  }
482
- return b(() => document.addEventListener("pointerdown", J)), y(() => document.removeEventListener("pointerdown", J)), (n, r) => t.lite && t.readOnly ? (S(), o("div", Ye, [A.value?.icon ? (S(), o("i", {
485
+ return b(() => document.addEventListener("pointerdown", Y)), y(() => document.removeEventListener("pointerdown", Y)), (n, r) => t.lite && t.readOnly ? (S(), o("div", Ye, [A.value?.icon ? (S(), o("i", {
483
486
  key: 0,
484
487
  class: g(A.value.icon),
485
488
  style: _({ color: A.value.colour }),
@@ -490,11 +493,11 @@ var J = Object.defineProperty, ce = (e, t) => {
490
493
  ref: p,
491
494
  class: "flex flex-col relative w-full gap-1 min-w-0 min-h-10"
492
495
  }, [
493
- t.lite ? a("", !0) : (S(), i(Y, {
496
+ t.lite ? a("", !0) : (S(), i(X, {
494
497
  key: 0,
495
498
  "q-map": t.qMap
496
499
  }, null, 8, ["q-map"])),
497
- s("label", Xe, [u(X, { disabled: t.readOnly }, c({
500
+ s("label", Xe, [u(Z, { disabled: t.readOnly }, c({
498
501
  append: I(() => [
499
502
  t.required && (!A.value || A.value?.value == null) ? (S(), o("span", Qe, [...r[2] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0),
500
503
  (t.multi ? A.value?.length : A.value?.value != null) && !t.readOnly ? (S(), o("button", {
@@ -502,7 +505,7 @@ var J = Object.defineProperty, ce = (e, t) => {
502
505
  type: "button",
503
506
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-select-clear",
504
507
  "aria-label": "Clear selection",
505
- onClick: z(ie, ["stop"])
508
+ onClick: z(re, ["stop"])
506
509
  }, [...r[3] ||= [s("i", { class: "fa fa-times" }, null, -1)]])) : a("", !0),
507
510
  s("i", {
508
511
  class: g(["fa fa-chevron-down qmap-select-chevron", { "qmap-select-chevron-open": x.value }]),
@@ -517,8 +520,8 @@ var J = Object.defineProperty, ce = (e, t) => {
517
520
  "aria-controls": ee,
518
521
  "aria-label": t.qMap.title || t.qMap.id,
519
522
  disabled: t.readOnly,
520
- onClick: r[0] ||= (e) => x.value ? K() : ne(),
521
- onKeydown: [R(z(ne, ["prevent"]), ["down"]), R(z(K, ["prevent"]), ["esc"])]
523
+ onClick: r[0] ||= (e) => x.value ? q() : K(),
524
+ onKeydown: [R(z(K, ["prevent"]), ["down"]), R(z(q, ["prevent"]), ["esc"])]
522
525
  }, [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", {
523
526
  key: String(e.value),
524
527
  class: "inline-flex max-w-full items-center qmap-select-chip"
@@ -545,7 +548,7 @@ var J = Object.defineProperty, ce = (e, t) => {
545
548
  placeholder: "Search…",
546
549
  autocomplete: "off",
547
550
  "aria-label": "Search options",
548
- onKeydown: oe
551
+ onKeydown: ae
549
552
  }, null, 544), [[N, C.value]])]), s("div", {
550
553
  id: ee,
551
554
  class: "max-h-64 overflow-auto p-1",
@@ -554,7 +557,7 @@ var J = Object.defineProperty, ce = (e, t) => {
554
557
  }, [(S(!0), o(e, null, T(P.value, (e, r) => (S(), o("button", {
555
558
  key: `${r}-${String(e.value)}`,
556
559
  ref_for: !0,
557
- ref: (e) => ae(r, e),
560
+ ref: (e) => ie(r, e),
558
561
  type: "button",
559
562
  role: "option",
560
563
  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", {
@@ -563,8 +566,8 @@ var J = Object.defineProperty, ce = (e, t) => {
563
566
  }]),
564
567
  "aria-selected": W(e),
565
568
  onMouseenter: (e) => D.value = r,
566
- onKeydown: (e) => se(e, r),
567
- onClick: (t) => re(e)
569
+ onKeydown: (e) => oe(e, r),
570
+ onClick: (t) => ne(e)
568
571
  }, [E(n.$slots, "option", {
569
572
  option: e,
570
573
  selected: W(e),
@@ -639,7 +642,7 @@ var J = Object.defineProperty, ce = (e, t) => {
639
642
  value: e
640
643
  }), f(e);
641
644
  }
642
- return (n, r) => t.qMap.style == "radio" ? (S(), o("div", lt, [u(Y, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", ut, [(S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("div", {
645
+ return (n, r) => t.qMap.style == "radio" ? (S(), o("div", lt, [u(X, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", ut, [(S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("div", {
643
646
  key: String(e.value),
644
647
  class: "inline-flex items-center gap-0 min-h-8 qmap-check-row"
645
648
  }, [L(s("input", {
@@ -653,7 +656,7 @@ var J = Object.defineProperty, ce = (e, t) => {
653
656
  key: 0,
654
657
  class: g(e.icon),
655
658
  "aria-hidden": "true"
656
- }, null, 2)) : a("", !0), l(k(e.title || e.value), 1)])]))), 128))])])) : t.qMap.style == "v-radio" ? (S(), o("div", pt, [u(Y, { "q-map": t.qMap }, null, 8, ["q-map"]), (S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("div", null, [s("label", mt, [L(s("input", {
659
+ }, null, 2)) : a("", !0), l(k(e.title || e.value), 1)])]))), 128))])])) : t.qMap.style == "v-radio" ? (S(), o("div", pt, [u(X, { "q-map": t.qMap }, null, 8, ["q-map"]), (S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("div", null, [s("label", mt, [L(s("input", {
657
660
  "onUpdate:modelValue": r[1] ||= (e) => d.value = e,
658
661
  type: "radio",
659
662
  name: t.qMap.id,
@@ -664,7 +667,7 @@ var J = Object.defineProperty, ce = (e, t) => {
664
667
  key: 0,
665
668
  class: g(e.icon),
666
669
  "aria-hidden": "true"
667
- }, null, 2)) : a("", !0), l(k(e.title || e.value), 1)])])]))), 256))])) : t.qMap.style == "buttons" ? (S(), o("div", _t, [s("div", vt, [u(Y, { "q-map": t.qMap }, null, 8, ["q-map"])]), s("div", yt, [(S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("button", {
670
+ }, null, 2)) : a("", !0), l(k(e.title || e.value), 1)])])]))), 256))])) : t.qMap.style == "buttons" ? (S(), o("div", _t, [s("div", vt, [u(X, { "q-map": t.qMap }, null, 8, ["q-map"])]), s("div", yt, [(S(!0), o(e, null, T(t.qMap.values, (e) => (S(), o("button", {
668
671
  key: String(e.value),
669
672
  type: "button",
670
673
  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 }]),
@@ -731,7 +734,7 @@ var J = Object.defineProperty, ce = (e, t) => {
731
734
  key: 1,
732
735
  class: "qmap-field flex flex-col gap-1.5 text-sm",
733
736
  for: e.qMap.id
734
- }, [u(Y, { "q-map": e.qMap }, null, 8, ["q-map"]), u(X, {
737
+ }, [u(X, { "q-map": e.qMap }, null, 8, ["q-map"]), u(Z, {
735
738
  disabled: e.readOnly,
736
739
  class: ""
737
740
  }, c({
@@ -887,7 +890,7 @@ var J = Object.defineProperty, ce = (e, t) => {
887
890
  key: 3,
888
891
  class: "date-required",
889
892
  "aria-hidden": "true"
890
- }, Bt = /*#__PURE__*/ Ae(/* @__PURE__ */ f({
893
+ }, Bt = /*#__PURE__*/ ke(/* @__PURE__ */ f({
891
894
  __name: "SimpleDate",
892
895
  props: {
893
896
  title: {},
@@ -928,7 +931,7 @@ var J = Object.defineProperty, ce = (e, t) => {
928
931
  function C() {
929
932
  _.value = "", v.value = !1, l("update:model-value", void 0);
930
933
  }
931
- return (t, n) => (S(), o("div", { class: g(["relative grid gap-1.5 text-sm date-field", r.class]) }, [u(X, {
934
+ return (t, n) => (S(), o("div", { class: g(["relative grid gap-1.5 text-sm date-field", r.class]) }, [u(Z, {
932
935
  class: "date-control",
933
936
  invalid: v.value,
934
937
  disabled: e.readOnly
@@ -995,7 +998,7 @@ var J = Object.defineProperty, ce = (e, t) => {
995
998
  value: e
996
999
  });
997
1000
  }
998
- return (n, r) => (S(), o(e, null, [t.lite ? a("", !0) : (S(), i(Y, {
1001
+ return (n, r) => (S(), o(e, null, [t.lite ? a("", !0) : (S(), i(X, {
999
1002
  key: 0,
1000
1003
  "q-map": t.qMap
1001
1004
  }, null, 8, ["q-map"])), u(Bt, {
@@ -1009,10 +1012,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1009
1012
  "read-only": t.readOnly,
1010
1013
  dateOnly: t.qMap.type == "date",
1011
1014
  required: t.qMap.required && !l.value
1012
- }, {
1013
- default: I(() => [u(ue, { "q-map": t.qMap }, null, 8, ["q-map"])]),
1014
- _: 1
1015
- }, 8, [
1015
+ }, null, 8, [
1016
1016
  "modelValue",
1017
1017
  "icon",
1018
1018
  "id",
@@ -1052,7 +1052,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1052
1052
  }),
1053
1053
  style: _(t.qMap.ui?.flex ? void 0 : { height: (t.qMap.ui?.height || 400) + "px" })
1054
1054
  }, [
1055
- u(Y, { "q-map": t.qMap }, null, 8, ["q-map"]),
1055
+ u(X, { "q-map": t.qMap }, null, 8, ["q-map"]),
1056
1056
  s("div", {
1057
1057
  class: g(["flex flex-wrap gap-1 p-1 group-tabs", { "flex-col group-tabs-vertical pr-2": p.value }]),
1058
1058
  role: "tablist",
@@ -1137,7 +1137,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1137
1137
  key: 0,
1138
1138
  class: "qmap-required",
1139
1139
  "aria-hidden": "true"
1140
- }, Z = /* @__PURE__ */ f({
1140
+ }, tn = /* @__PURE__ */ f({
1141
1141
  __name: "qString",
1142
1142
  props: {
1143
1143
  qMap: {},
@@ -1161,10 +1161,10 @@ var J = Object.defineProperty, ce = (e, t) => {
1161
1161
  value: e
1162
1162
  });
1163
1163
  }
1164
- return (t, n) => e.lite && e.readOnly ? (S(), o("div", Xt, k(d.value), 1)) : (S(), o("div", Zt, [!e.lite && e.qMap.id !== "#" ? (S(), i(Y, {
1164
+ return (t, n) => e.lite && e.readOnly ? (S(), o("div", Xt, k(d.value), 1)) : (S(), o("div", Zt, [!e.lite && e.qMap.id !== "#" ? (S(), i(X, {
1165
1165
  key: 0,
1166
1166
  "q-map": e.qMap
1167
- }, null, 8, ["q-map"])) : a("", !0), u(X, { multiline: e.qMap.style === "longtext" || e.lite && e.qMap.style === "textarea" }, c({
1167
+ }, null, 8, ["q-map"])) : a("", !0), u(Z, { multiline: e.qMap.style === "longtext" || e.lite && e.qMap.style === "textarea" }, c({
1168
1168
  append: I(() => [e.qMap.required && !d.value ? (S(), o("span", en, [...n[3] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0), !e.qMap.required && d.value && !e.readOnly ? (S(), o("button", {
1169
1169
  key: 1,
1170
1170
  type: "button",
@@ -1198,22 +1198,22 @@ var J = Object.defineProperty, ce = (e, t) => {
1198
1198
  key: "0"
1199
1199
  } : void 0]), 1032, ["multiline"])]));
1200
1200
  }
1201
- }), tn = { key: 0 }, nn = {
1201
+ }), nn = { key: 0 }, rn = {
1202
1202
  key: 0,
1203
1203
  class: "flex flex-row items-center"
1204
- }, rn = ["for"], an = ["id", "readonly"], on = {
1204
+ }, an = ["for"], on = ["id", "readonly"], sn = {
1205
1205
  key: 0,
1206
1206
  class: "qmap-required"
1207
- }, sn = {
1207
+ }, cn = {
1208
1208
  key: 1,
1209
1209
  class: "text-right text-negative"
1210
- }, cn = { key: 1 }, ln = { class: "qmap-card flex min-w-0 gap-3 p-3 bg-zinc-50 dark:bg-zinc-900" }, un = { class: "flex-1 min-w-0" }, dn = { key: 0 }, fn = {
1210
+ }, ln = { key: 1 }, un = { class: "qmap-card flex min-w-0 gap-3 p-3 bg-zinc-50 dark:bg-zinc-900" }, dn = { class: "flex-1 min-w-0" }, fn = { key: 0 }, pn = {
1211
1211
  key: 1,
1212
1212
  class: "flex flex-col gap-2"
1213
- }, pn = {
1213
+ }, mn = {
1214
1214
  key: 0,
1215
1215
  class: "flex flex-col justify-center"
1216
- }, mn = /* @__PURE__ */ f({
1216
+ }, hn = /* @__PURE__ */ f({
1217
1217
  __name: "qObject",
1218
1218
  props: {
1219
1219
  qMap: {},
@@ -1251,10 +1251,10 @@ var J = Object.defineProperty, ce = (e, t) => {
1251
1251
  value: void 0
1252
1252
  });
1253
1253
  }
1254
- return (n, r) => t.qMap.items ? (S(), o("div", cn, [!t.lite && t.qMap.id !== "#" ? (S(), i(Y, {
1254
+ return (n, r) => t.qMap.items ? (S(), o("div", ln, [!t.lite && t.qMap.id !== "#" ? (S(), i(X, {
1255
1255
  key: 0,
1256
1256
  "q-map": t.qMap
1257
- }, null, 8, ["q-map"])) : a("", !0), s("div", ln, [s("div", un, [f.value ? (S(), o("div", fn, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), i(Q, {
1257
+ }, null, 8, ["q-map"])) : a("", !0), s("div", un, [s("div", dn, [f.value ? (S(), o("div", pn, [(S(!0), o(e, null, T(t.qMap.items, (e) => (S(), i(Q, {
1258
1258
  qMap: e,
1259
1259
  modelValue: f.value,
1260
1260
  "onUpdate:modelValue": [r[4] ||= (e) => f.value = e, h],
@@ -1269,11 +1269,11 @@ var J = Object.defineProperty, ce = (e, t) => {
1269
1269
  "provider",
1270
1270
  "lite",
1271
1271
  "readOnly"
1272
- ]))), 256))])) : (S(), o("div", dn, [s("button", {
1272
+ ]))), 256))])) : (S(), o("div", fn, [s("button", {
1273
1273
  type: "button",
1274
1274
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1275
1275
  onClick: r[3] ||= (e) => f.value = {}
1276
- }, "Not set")]))]), !t.qMap.required && f.value != null ? (S(), o("div", pn, [s("button", {
1276
+ }, "Not set")]))]), !t.qMap.required && f.value != null ? (S(), o("div", mn, [s("button", {
1277
1277
  type: "button",
1278
1278
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
1279
1279
  "aria-label": "Remove object",
@@ -1283,19 +1283,19 @@ var J = Object.defineProperty, ce = (e, t) => {
1283
1283
  }, [...r[7] ||= [s("i", {
1284
1284
  class: "fa fa-trash",
1285
1285
  "aria-hidden": "true"
1286
- }, null, -1)]])])) : a("", !0)])])) : (S(), o("div", tn, [
1287
- t.lite && t.readOnly ? (S(), o("div", nn, k(d.value), 1)) : a("", !0),
1286
+ }, null, -1)]])])) : a("", !0)])])) : (S(), o("div", nn, [
1287
+ t.lite && t.readOnly ? (S(), o("div", rn, k(d.value), 1)) : a("", !0),
1288
1288
  s("label", {
1289
1289
  class: "qmap-field flex flex-col gap-1.5 min-w-0 text-sm",
1290
1290
  for: t.qMap.id
1291
- }, [!t.lite && t.qMap.id !== "#" ? (S(), i(Y, {
1291
+ }, [!t.lite && t.qMap.id !== "#" ? (S(), i(X, {
1292
1292
  key: 0,
1293
1293
  "q-map": t.qMap
1294
- }, null, 8, ["q-map"])) : a("", !0), u(X, {
1294
+ }, null, 8, ["q-map"])) : a("", !0), u(Z, {
1295
1295
  disabled: t.readOnly,
1296
1296
  multiline: ""
1297
1297
  }, c({
1298
- append: I(() => [t.qMap.required && (!t.lite || !d.value) ? (S(), o("span", on, [...r[6] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0), t.qMap.subtitle ? (S(), i(ue, {
1298
+ append: I(() => [t.qMap.required && (!t.lite || !d.value) ? (S(), o("span", sn, [...r[6] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]])) : a("", !0), t.qMap.subtitle ? (S(), i(le, {
1299
1299
  key: 1,
1300
1300
  "q-map": t.qMap
1301
1301
  }, null, 8, ["q-map"])) : a("", !0)]),
@@ -1307,7 +1307,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1307
1307
  rows: "5",
1308
1308
  onBlur: r[1] ||= (e) => m(d.value),
1309
1309
  onInput: r[2] ||= (e) => m(d.value)
1310
- }, null, 40, an), [[N, d.value]])]),
1310
+ }, null, 40, on), [[N, d.value]])]),
1311
1311
  _: 2
1312
1312
  }, [t.qMap.icon ? {
1313
1313
  name: "prepend",
@@ -1316,14 +1316,14 @@ var J = Object.defineProperty, ce = (e, t) => {
1316
1316
  "aria-hidden": "true"
1317
1317
  }, null, 2)]),
1318
1318
  key: "0"
1319
- } : void 0]), 1032, ["disabled"])], 8, rn),
1320
- p.value ? (S(), o("div", sn, k(p.value), 1)) : a("", !0)
1319
+ } : void 0]), 1032, ["disabled"])], 8, an),
1320
+ p.value ? (S(), o("div", cn, k(p.value), 1)) : a("", !0)
1321
1321
  ]));
1322
1322
  }
1323
- }), hn = { class: "text-lg" }, gn = {
1323
+ }), gn = { class: "text-lg" }, _n = {
1324
1324
  key: 0,
1325
1325
  class: "text-md"
1326
- }, _n = /* @__PURE__ */ f({
1326
+ }, vn = /* @__PURE__ */ f({
1327
1327
  __name: "qCaption",
1328
1328
  props: {
1329
1329
  qMap: {},
@@ -1337,9 +1337,9 @@ var J = Object.defineProperty, ce = (e, t) => {
1337
1337
  },
1338
1338
  emits: ["qmap_change", "qmap_subquestions"],
1339
1339
  setup(t, { emit: n }) {
1340
- return (n, r) => (S(), o(e, null, [s("div", hn, k(t.qMap.title), 1), t.qMap.subtitle ? (S(), o("div", gn, k(t.qMap.subtitle), 1)) : a("", !0)], 64));
1340
+ return (n, r) => (S(), o(e, null, [s("div", gn, k(t.qMap.title), 1), t.qMap.subtitle ? (S(), o("div", _n, k(t.qMap.subtitle), 1)) : a("", !0)], 64));
1341
1341
  }
1342
- }), vn = /* @__PURE__ */ f({
1342
+ }), yn = /* @__PURE__ */ f({
1343
1343
  __name: "qGeoMap",
1344
1344
  props: {
1345
1345
  qMap: {},
@@ -1353,7 +1353,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1353
1353
  },
1354
1354
  emits: ["qmap_change", "qmap_subquestions"],
1355
1355
  setup(e, { emit: t }) {
1356
- let r = d(() => Promise.resolve().then(() => Kn)), i = e, a = t, s = w(), c = n(() => i.qMap.style == "full-screen");
1356
+ let r = d(() => Promise.resolve().then(() => qn)), i = e, a = t, s = w(), c = n(() => i.qMap.style == "full-screen");
1357
1357
  F(() => i.model, (e) => s.value = i.model[i.qMap.id]), v(() => {
1358
1358
  s.value = i.model[i.qMap.id] ? JSON.parse(i.model[i.qMap.id]) : void 0, l(s.value);
1359
1359
  });
@@ -1392,10 +1392,10 @@ var J = Object.defineProperty, ce = (e, t) => {
1392
1392
  "toolbar"
1393
1393
  ])], 6));
1394
1394
  }
1395
- }), yn = { class: "mb-4" }, bn = { class: "my-2 flex flex-row items-center justify-between" }, xn = { class: "qmap-table" }, Sn = ["onUpdate:modelValue"], Cn = ["onUpdate:modelValue"], wn = ["onClick"], Tn = { key: 0 }, En = {
1395
+ }), bn = { class: "mb-4" }, xn = { class: "my-2 flex flex-row items-center justify-between" }, Sn = { class: "qmap-table" }, Cn = ["onUpdate:modelValue"], wn = ["onUpdate:modelValue"], Tn = ["onClick"], En = { key: 0 }, Dn = {
1396
1396
  colspan: "2",
1397
1397
  class: "text-center"
1398
- }, Dn = /* @__PURE__ */ f({
1398
+ }, On = /* @__PURE__ */ f({
1399
1399
  __name: "qSimpleMap",
1400
1400
  props: {
1401
1401
  qMap: {},
@@ -1435,41 +1435,41 @@ var J = Object.defineProperty, ce = (e, t) => {
1435
1435
  function p(e) {
1436
1436
  c.value = c.value.filter((t) => t != e), d();
1437
1437
  }
1438
- return (n, r) => (S(), o("div", yn, [s("div", bn, [u(Y, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", null, [s("button", {
1438
+ return (n, r) => (S(), o("div", bn, [s("div", xn, [u(X, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", null, [s("button", {
1439
1439
  type: "button",
1440
1440
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1441
1441
  "aria-label": "Add row",
1442
1442
  onClick: r[0] ||= (e) => f()
1443
- }, "+")])]), s("table", xn, [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, {
1443
+ }, "+")])]), 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(Z, null, {
1444
1444
  default: I(() => [L(s("input", {
1445
1445
  "onUpdate:modelValue": (e) => c.value[t].key = e,
1446
1446
  class: "qmap-input min-w-0 flex-1 px-0 py-2",
1447
1447
  onInput: d
1448
- }, null, 40, Sn), [[N, c.value[t].key]])]),
1448
+ }, null, 40, Cn), [[N, c.value[t].key]])]),
1449
1449
  _: 2
1450
- }, 1024)]), s("td", null, [u(X, null, {
1450
+ }, 1024)]), s("td", null, [u(Z, null, {
1451
1451
  append: I(() => [s("button", {
1452
1452
  type: "button",
1453
1453
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button qmap-danger",
1454
1454
  "aria-label": "Remove row",
1455
1455
  onClick: (t) => p(e)
1456
- }, [...r[2] ||= [s("i", { class: "fa fa-trash" }, null, -1)]], 8, wn)]),
1456
+ }, [...r[2] ||= [s("i", { class: "fa fa-trash" }, null, -1)]], 8, Tn)]),
1457
1457
  default: I(() => [L(s("input", {
1458
1458
  "onUpdate:modelValue": (e) => c.value[t].val = e,
1459
1459
  class: "qmap-input min-w-0 flex-1 px-0 py-2",
1460
1460
  onInput: d
1461
- }, null, 40, Cn), [[N, c.value[t].val]])]),
1461
+ }, null, 40, wn), [[N, c.value[t].val]])]),
1462
1462
  _: 2
1463
- }, 1024)])]))), 256)), c.value.length ? a("", !0) : (S(), o("tr", Tn, [s("td", En, [r[3] ||= s("div", null, "No values ", -1), s("button", {
1463
+ }, 1024)])]))), 256)), c.value.length ? a("", !0) : (S(), o("tr", En, [s("td", Dn, [r[3] ||= s("div", null, "No values ", -1), s("button", {
1464
1464
  type: "button",
1465
1465
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1466
1466
  onClick: r[1] ||= (e) => f()
1467
1467
  }, "Add Row")])]))])])]));
1468
1468
  }
1469
- }), On = { class: "flex flex-col flex-1 min-w-0" }, kn = { key: 16 }, An = { key: 17 }, jn = { key: 18 }, Mn = {
1469
+ }), kn = { class: "flex flex-col flex-1 min-w-0" }, An = { key: 16 }, jn = { key: 17 }, Mn = { key: 18 }, Nn = {
1470
1470
  key: 0,
1471
1471
  class: "qmap-separator my-4"
1472
- }, Nn = {
1472
+ }, Pn = {
1473
1473
  key: 1,
1474
1474
  class: "qmap_nested flex flex-col gap-2"
1475
1475
  }, Q = /* @__PURE__ */ f({
@@ -1498,7 +1498,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1498
1498
  return (n, r) => {
1499
1499
  let c = D("Question", !0);
1500
1500
  return S(), o(e, null, [
1501
- s("div", On, [p.value ? (S(), i(O(t.provider?.questionTypes[f.value]), {
1501
+ s("div", kn, [p.value ? (S(), i(O(t.provider?.questionTypes[f.value]), {
1502
1502
  key: 0,
1503
1503
  qMap: t.qMap,
1504
1504
  modelValue: t.modelValue,
@@ -1517,7 +1517,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1517
1517
  "validator",
1518
1518
  "lite",
1519
1519
  "readOnly"
1520
- ])) : f.value == "text" || f.value == "string" ? (S(), i(Z, {
1520
+ ])) : f.value == "text" || f.value == "string" ? (S(), i(tn, {
1521
1521
  key: 1,
1522
1522
  qMap: t.qMap,
1523
1523
  model: t.modelValue,
@@ -1533,7 +1533,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1533
1533
  "validator",
1534
1534
  "lite",
1535
1535
  "readOnly"
1536
- ])) : f.value == "object" ? (S(), i(mn, {
1536
+ ])) : f.value == "object" ? (S(), i(hn, {
1537
1537
  key: 2,
1538
1538
  qMap: t.qMap,
1539
1539
  model: t.modelValue,
@@ -1551,7 +1551,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1551
1551
  "lite",
1552
1552
  "readOnly",
1553
1553
  "provider"
1554
- ])) : f.value == "number" ? (S(), i(Z, {
1554
+ ])) : f.value == "number" ? (S(), i(tn, {
1555
1555
  key: 3,
1556
1556
  qMap: t.qMap,
1557
1557
  model: t.modelValue,
@@ -1618,7 +1618,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1618
1618
  "validator",
1619
1619
  "lite",
1620
1620
  "readOnly"
1621
- ])) : f.value == "time" ? (S(), i(Z, {
1621
+ ])) : f.value == "time" ? (S(), i(tn, {
1622
1622
  key: 7,
1623
1623
  qMap: t.qMap,
1624
1624
  model: t.modelValue,
@@ -1635,7 +1635,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1635
1635
  "validator",
1636
1636
  "lite",
1637
1637
  "readOnly"
1638
- ])) : f.value == "colour" || f.value == "color" ? (S(), i(Z, {
1638
+ ])) : f.value == "colour" || f.value == "color" ? (S(), i(tn, {
1639
1639
  key: 8,
1640
1640
  qMap: t.qMap,
1641
1641
  model: t.modelValue,
@@ -1669,7 +1669,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1669
1669
  "validator",
1670
1670
  "lite",
1671
1671
  "readOnly"
1672
- ])) : f.value == "caption" ? (S(), i(_n, {
1672
+ ])) : f.value == "caption" ? (S(), i(vn, {
1673
1673
  key: 10,
1674
1674
  qMap: t.qMap,
1675
1675
  model: t.modelValue,
@@ -1697,7 +1697,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1697
1697
  "lite",
1698
1698
  "readOnly",
1699
1699
  "provider"
1700
- ])) : f.value == "map" ? (S(), i(Dn, {
1700
+ ])) : f.value == "map" ? (S(), i(On, {
1701
1701
  key: 12,
1702
1702
  qMap: t.qMap,
1703
1703
  model: t.modelValue,
@@ -1716,7 +1716,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1716
1716
  "lite",
1717
1717
  "readOnly",
1718
1718
  "provider"
1719
- ])) : f.value == "geo_map" ? (S(), i(vn, {
1719
+ ])) : f.value == "geo_map" ? (S(), i(yn, {
1720
1720
  key: 13,
1721
1721
  qMap: t.qMap,
1722
1722
  model: t.modelValue,
@@ -1735,7 +1735,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1735
1735
  "lite",
1736
1736
  "readOnly",
1737
1737
  "provider"
1738
- ])) : f.value == "array" ? (S(), i(Ee, {
1738
+ ])) : f.value == "array" ? (S(), i(Te, {
1739
1739
  key: 14,
1740
1740
  qMap: t.qMap,
1741
1741
  model: t.modelValue,
@@ -1771,7 +1771,7 @@ var J = Object.defineProperty, ce = (e, t) => {
1771
1771
  "lite",
1772
1772
  "provider",
1773
1773
  "readOnly"
1774
- ])) : f.value == "col" ? (S(), o("div", kn, [u(Y, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", { class: g(["flex gap-2", {
1774
+ ])) : f.value == "col" ? (S(), o("div", An, [u(X, { "q-map": t.qMap }, null, 8, ["q-map"]), s("div", { class: g(["flex gap-2", {
1775
1775
  "flex-row": t.qMap.style != "column",
1776
1776
  "flex-col": t.qMap.style == "column"
1777
1777
  }]) }, [(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, {
@@ -1792,9 +1792,9 @@ var J = Object.defineProperty, ce = (e, t) => {
1792
1792
  "validator",
1793
1793
  "lite",
1794
1794
  "readOnly"
1795
- ])], 2))), 256))], 2)])) : f.value == "hidden" ? (S(), o("div", An)) : (S(), o("div", jn, "Unsupported " + k(t.qMap?.id) + " : " + k(f.value), 1))]),
1796
- y.value.length && t.qMap.ui?.separator ? (S(), o("hr", Mn)) : a("", !0),
1797
- y.value.length ? (S(), o("div", Nn, [(S(!0), o(e, null, T(y.value, (e) => (S(), i(c, {
1795
+ ])], 2))), 256))], 2)])) : f.value == "hidden" ? (S(), o("div", jn)) : (S(), o("div", Mn, "Unsupported " + k(t.qMap?.id) + " : " + k(f.value), 1))]),
1796
+ y.value.length && t.qMap.ui?.separator ? (S(), o("hr", Nn)) : a("", !0),
1797
+ y.value.length ? (S(), o("div", Pn, [(S(!0), o(e, null, T(y.value, (e) => (S(), i(c, {
1798
1798
  qMap: e,
1799
1799
  modelValue: t.modelValue,
1800
1800
  extras: t.extras,
@@ -1816,10 +1816,10 @@ var J = Object.defineProperty, ce = (e, t) => {
1816
1816
  ], 64);
1817
1817
  };
1818
1818
  }
1819
- }), Pn = ["col", "group"];
1820
- function Fn(e, t) {
1819
+ }), Fn = ["col", "group"];
1820
+ function In(e, t) {
1821
1821
  var n = [];
1822
- if (Pn.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) => Fn(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) {
1822
+ if (Fn.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) => In(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) {
1823
1823
  let r = e.values.find((n) => n.value == (!t || t[e.id]));
1824
1824
  r?.onSelect && (n = n.concat($(r.onSelect, t)));
1825
1825
  }
@@ -1829,14 +1829,14 @@ function $(e, t) {
1829
1829
  var n = [];
1830
1830
  return e.forEach((e) => {
1831
1831
  if (e.type != "caption") {
1832
- let r = Fn(e, t);
1832
+ let r = In(e, t);
1833
1833
  n = n.concat(r);
1834
1834
  }
1835
1835
  }), n;
1836
1836
  }
1837
1837
  //#endregion
1838
1838
  //#region src/services/question-validator.ts
1839
- var In = class {
1839
+ var Ln = class {
1840
1840
  invalidFields = new V([]);
1841
1841
  isValid = new V(!0);
1842
1842
  qMaps = [];
@@ -1873,10 +1873,10 @@ var In = class {
1873
1873
  get currentQMaps() {
1874
1874
  return this.qMaps;
1875
1875
  }
1876
- }, Ln = {
1876
+ }, Rn = {
1877
1877
  key: 0,
1878
1878
  class: "flex-1 min-w-0 overflow-auto"
1879
- }, Rn = { class: "flex flex-col gap-2 p-2" }, zn = { class: "flex justify-end gap-2" }, Bn = ["disabled"], Vn = /* @__PURE__ */ f({
1879
+ }, zn = { class: "flex flex-col gap-2 p-2" }, Bn = { class: "flex justify-end gap-2" }, Vn = ["disabled"], Hn = /* @__PURE__ */ f({
1880
1880
  __name: "Form",
1881
1881
  props: {
1882
1882
  questions: {},
@@ -1896,7 +1896,7 @@ var In = class {
1896
1896
  "update:model-value"
1897
1897
  ],
1898
1898
  setup(t, { emit: r }) {
1899
- let c = t, l = r, u = { ...c.modelValue }, d = c.validator || new In(c.questions, c.modelValue), f = w(!0), p = n(() => !(c.showSubmit || c.showCancel || c.showReset)), m = n({
1899
+ let c = t, l = r, u = { ...c.modelValue }, d = c.validator || new Ln(c.questions, c.modelValue), f = w(!0), p = n(() => !(c.showSubmit || c.showCancel || c.showReset)), m = n({
1900
1900
  get: () => c.modelValue,
1901
1901
  set: (e) => l("update:model-value", e)
1902
1902
  });
@@ -1926,7 +1926,7 @@ var In = class {
1926
1926
  "flex flex-col gap-2 p-2": !t.scrollPane
1927
1927
  })
1928
1928
  }, [
1929
- t.scrollPane ? (S(), o("div", Ln, [s("div", Rn, [(S(!0), o(e, null, T(t.questions, (e, n) => (S(), i(Q, {
1929
+ t.scrollPane ? (S(), o("div", Rn, [s("div", zn, [(S(!0), o(e, null, T(t.questions, (e, n) => (S(), i(Q, {
1930
1930
  key: n,
1931
1931
  qMap: e,
1932
1932
  validator: A(d),
@@ -1954,14 +1954,14 @@ var In = class {
1954
1954
  "modelValue"
1955
1955
  ]))), 128)),
1956
1956
  r[6] ||= s("hr", { class: "qmap-separator my-2" }, null, -1),
1957
- s("div", zn, [
1957
+ s("div", Bn, [
1958
1958
  t.showSubmit ? (S(), o("button", {
1959
1959
  key: 0,
1960
1960
  type: "button",
1961
1961
  class: "inline-flex items-center justify-center gap-2 min-h-9 px-3.5 py-2 qmap-button",
1962
1962
  onClick: r[3] ||= (e) => l("submit", m.value),
1963
1963
  disabled: !f.value
1964
- }, "Submit", 8, Bn)) : a("", !0),
1964
+ }, "Submit", 8, Vn)) : a("", !0),
1965
1965
  t.showReset ? (S(), o("button", {
1966
1966
  key: 1,
1967
1967
  type: "button",
@@ -1979,7 +1979,7 @@ var In = class {
1979
1979
  ])
1980
1980
  ], 2));
1981
1981
  }
1982
- }), Hn = { class: "flex flex-row items-center justify-between p-2" }, Un = { class: "absolute top-0 right-0 m-4 z-50 qmap-editor-title" }, Wn = ["title"], Gn = /*@__PURE__*/ f({
1982
+ }), Un = { class: "flex flex-row items-center justify-between p-2" }, Wn = { class: "absolute top-0 right-0 m-4 z-50 qmap-editor-title" }, Gn = ["title"], Kn = /*@__PURE__*/ f({
1983
1983
  __name: "SimpleGeomEditor",
1984
1984
  props: {
1985
1985
  modelValue: {},
@@ -2009,7 +2009,7 @@ var In = class {
2009
2009
  }), b(() => {
2010
2010
  if (v(), n.modelValue && !n.readOnly) C(n.modelValue), h.flyToBounds(_.getBounds(), { animate: !1 });
2011
2011
  else if (n.modelValue) {
2012
- let e = se(n.modelValue);
2012
+ let e = oe(n.modelValue);
2013
2013
  h.addLayer(e), h.flyToBounds(e.getBounds());
2014
2014
  }
2015
2015
  u.value = _.getLayers().length;
@@ -2018,13 +2018,13 @@ var In = class {
2018
2018
  });
2019
2019
  function v() {
2020
2020
  h && h.remove();
2021
- let e = new q("https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v12/tiles/{z}/{x}/{y}?access_token=" + n.keys.mapbox, {
2021
+ let e = new J("https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v12/tiles/{z}/{x}/{y}?access_token=" + n.keys.mapbox, {
2022
2022
  maxZoom: 18,
2023
2023
  noWrap: !0
2024
2024
  }).setZIndex(0);
2025
- if (n.readOnly) h = new ie(c.value).setView(n.centre ? [n.centre.lng, n.centre.lat] : [-25, 135], n.centre ? n.centre.zoom : 5);
2025
+ if (n.readOnly) h = new re(c.value).setView(n.centre ? [n.centre.lng, n.centre.lat] : [-25, 135], n.centre ? n.centre.zoom : 5);
2026
2026
  else {
2027
- h = new ie(c.value, { editable: !0 }).setView(n.centre ? [n.centre.lng, n.centre.lat] : [-25, 135], n.centre ? n.centre.zoom : 5), h.on("click", (e) => {
2027
+ h = new re(c.value, { editable: !0 }).setView(n.centre ? [n.centre.lng, n.centre.lat] : [-25, 135], n.centre ? n.centre.zoom : 5), h.on("click", (e) => {
2028
2028
  let t = e.originalEvent.target, n = t.closest(".leaflet-overlay-pane"), r = t.closest(".leaflet-control");
2029
2029
  !n && !r && !p.value && (d.value = void 0);
2030
2030
  });
@@ -2036,7 +2036,7 @@ var In = class {
2036
2036
  html: ""
2037
2037
  },
2038
2038
  onAdd: function(e) {
2039
- var t = ne.create("div", "leaflet-control leaflet-bar qmap-leaflet-button"), n = ne.create("a", "", t);
2039
+ var t = K.create("div", "leaflet-control leaflet-bar qmap-leaflet-button"), n = K.create("a", "", t);
2040
2040
  let r = this.options;
2041
2041
  return n.href = "#", n.title = "Create a new " + r.kind, n.innerHTML = this.options.html, G.on(n, "click", G.stop).on(n, "click", function() {
2042
2042
  r.callback.call(e.editTools);
@@ -2076,7 +2076,7 @@ var In = class {
2076
2076
  if (localStorage.lastMapPos) {
2077
2077
  let e = JSON.parse(localStorage.lastMapPos);
2078
2078
  if (e?.ne && e.sw) {
2079
- let t = new re(e.ne, e.sw);
2079
+ let t = new ne(e.ne, e.sw);
2080
2080
  h.flyToBounds(t, { animate: !1 });
2081
2081
  } else h.setView([-26, 132], 5);
2082
2082
  } else h.setView([-26, 132], 5);
@@ -2086,7 +2086,7 @@ var In = class {
2086
2086
  ne: t.getNorthEast(),
2087
2087
  sw: t.getSouthWest()
2088
2088
  });
2089
- }), _ = oe().addTo(h);
2089
+ }), _ = ae().addTo(h);
2090
2090
  }
2091
2091
  function y() {
2092
2092
  let e = _.getLayers().map((e) => {
@@ -2108,7 +2108,7 @@ var In = class {
2108
2108
  radius: e.getRadius()
2109
2109
  }, t(n);
2110
2110
  }
2111
- if (e instanceof ae) {
2111
+ if (e instanceof ie) {
2112
2112
  let n = e.toGeoJSON();
2113
2113
  return n.properties = { type: "rectangle" }, t(n);
2114
2114
  }
@@ -2121,9 +2121,9 @@ var In = class {
2121
2121
  }
2122
2122
  function C(e) {
2123
2123
  var t;
2124
- return se(e, { onEachFeature: (e, n) => {
2124
+ return oe(e, { onEachFeature: (e, n) => {
2125
2125
  let r;
2126
- if (r = e.properties?.type == "circle" && e.properties?.radius ? new U(new K([n]).getBounds().getCenter(), e.properties.radius) : e.properties?.type == "rectangle" ? new ae(new K([n]).getBounds()) : n, e.properties) {
2126
+ if (r = e.properties?.type == "circle" && e.properties?.radius ? new U(new q([n]).getBounds().getCenter(), e.properties.radius) : e.properties?.type == "rectangle" ? new ie(new q([n]).getBounds()) : n, e.properties) {
2127
2127
  let t = {};
2128
2128
  Object.keys(e.properties).filter((e) => [
2129
2129
  "color",
@@ -2157,12 +2157,12 @@ var In = class {
2157
2157
  class: "absolute bottom-0 left-0 m-4 flex flex-col gap-1 qmap-editor-card",
2158
2158
  style: { "z-index": "999" },
2159
2159
  onClick: r[1] ||= z(() => {}, ["stop"])
2160
- }, [s("div", Hn, [r[2] ||= l(" Selected Item ", -1), s("button", {
2160
+ }, [s("div", Un, [r[2] ||= l(" Selected Item ", -1), s("button", {
2161
2161
  type: "button",
2162
2162
  class: "inline-flex items-center justify-center min-w-8 min-h-8 p-1 qmap-icon-button",
2163
2163
  "aria-label": "Close",
2164
2164
  onClick: r[0] ||= (e) => d.value = void 0
2165
- }, "×")]), r[3] ||= s("hr", { class: "qmap-separator my-2" }, null, -1)])) : a("", !0), s("div", Un, [e.qMap ? (S(), i(Y, {
2165
+ }, "×")]), r[3] ||= s("hr", { class: "qmap-separator my-2" }, null, -1)])) : a("", !0), s("div", Wn, [e.qMap ? (S(), i(X, {
2166
2166
  key: 0,
2167
2167
  "q-map": e.qMap
2168
2168
  }, {
@@ -2170,23 +2170,23 @@ var In = class {
2170
2170
  key: 0,
2171
2171
  class: "qmap-required",
2172
2172
  title: u.value ? "Required to have value" : "A value is required"
2173
- }, [...r[4] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]], 8, Wn)) : a("", !0)]),
2173
+ }, [...r[4] ||= [s("i", { class: "fa fa-asterisk" }, null, -1)]], 8, Gn)) : a("", !0)]),
2174
2174
  _: 1
2175
2175
  }, 8, ["q-map"])) : a("", !0)])], 2));
2176
2176
  }
2177
- }), Kn = /* @__PURE__ */ ce({ default: () => qn }), qn = Gn, Jn = Symbol("QMAP");
2178
- function Yn(e) {
2179
- C(Jn, e);
2177
+ }), qn = /* @__PURE__ */ se({ default: () => Jn }), Jn = Kn, Yn = Symbol("QMAP");
2178
+ function Xn(e) {
2179
+ C(Yn, e);
2180
2180
  }
2181
- function Xn() {
2182
- let e = m(Jn, null);
2181
+ function Zn() {
2182
+ let e = m(Yn, null);
2183
2183
  if (!e) throw Error("useMyService must be called under a provider (comp1)");
2184
2184
  return e;
2185
2185
  }
2186
2186
  //#endregion
2187
2187
  //#region src/lib.ts
2188
- function Zn(e, t, n, i) {
2189
- let a = w(n), o = new V(a.value), s = new H(), c = p(Vn, {
2188
+ function Qn(e, t, n, i) {
2189
+ let a = w(n), o = new V(a.value), s = new H(), c = p(Hn, {
2190
2190
  questions: t,
2191
2191
  modelValue: a.value,
2192
2192
  "onUpdate:model-value": (e) => {
@@ -2207,11 +2207,11 @@ function Zn(e, t, n, i) {
2207
2207
  events: s
2208
2208
  };
2209
2209
  }
2210
- var Qn = {
2210
+ var $n = {
2211
2211
  Question: Q,
2212
- Form: Vn,
2213
- QuestionValidator: In,
2214
- mount: Zn
2212
+ Form: Hn,
2213
+ QuestionValidator: Ln,
2214
+ mount: Qn
2215
2215
  };
2216
2216
  //#endregion
2217
- export { It as CalendarPicker, Vn as Form, Jn as MyScopeKey, Q as Question, In as QuestionValidator, ot as SimpleChoice, Bt as SimpleDate, qn as SimpleGeomEditor, Y as TitleBlock, je as ToggleSwitch, Qn as default, Fn as flattenNode, $ as flattenQMAPs, Zn as mount, Yn as provideBadQMAPS, Xn as useBadQMAPS };
2217
+ export { It as CalendarPicker, Hn as Form, Yn as MyScopeKey, Q as Question, Ln as QuestionValidator, ot as SimpleChoice, Bt as SimpleDate, Jn as SimpleGeomEditor, X as TitleBlock, Ae as ToggleSwitch, $n as default, In as flattenNode, $ as flattenQMAPs, Qn as mount, Xn as provideBadQMAPS, Zn as useBadQMAPS };