pdap-design-system 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as j, reactive as C, openBlock as v, createElementBlock as x, normalizeClass as W, renderSlot as J, createBlock as S, resolveDynamicComponent as ge, withCtx as R, inject as re, resolveComponent as tt, createVNode as H, createElementVNode as b, Fragment as X, renderList as he, unref as d, toDisplayString as k, createCommentVNode as V, createTextVNode as N, getCurrentInstance as rt, ref as P, onBeforeMount as De, watch as K, isRef as pe, onBeforeUnmount as $e, computed as _, isReactive as nt, isReadonly as at, provide as Pe, nextTick as ne, mergeProps as ee, watchEffect as Re, withModifiers as st, normalizeStyle as ve, onMounted as ot } from "vue";
1
+ import { defineComponent as j, reactive as E, openBlock as y, createElementBlock as x, normalizeClass as U, renderSlot as Y, createBlock as I, resolveDynamicComponent as ge, withCtx as R, inject as ne, resolveComponent as tt, createVNode as G, createElementVNode as b, Fragment as K, renderList as he, unref as d, toDisplayString as V, createCommentVNode as z, createTextVNode as B, getCurrentInstance as rt, ref as P, onBeforeMount as De, watch as Z, isRef as pe, onBeforeUnmount as $e, computed as _, isReactive as nt, isReadonly as at, provide as Pe, nextTick as ae, mergeProps as te, watchEffect as Re, withModifiers as st, normalizeStyle as ve, onMounted as ot } from "vue";
2
2
  import { RouterLink as Fe, useRouter as it } from "vue-router";
3
3
  const lt = /* @__PURE__ */ j({
4
4
  __name: "PdapButton",
@@ -7,15 +7,15 @@ const lt = /* @__PURE__ */ j({
7
7
  isLoading: { type: Boolean, default: !1 }
8
8
  },
9
9
  setup(e) {
10
- const t = e, r = C({
10
+ const t = e, r = E({
11
11
  "pdap-button": !0,
12
12
  [`pdap-button-${t.intent}`]: !!t.intent,
13
13
  "pdap-button-loading": t.isLoading
14
14
  });
15
- return (n, a) => (v(), x("button", {
16
- class: W(r)
15
+ return (n, a) => (y(), x("button", {
16
+ class: U(r)
17
17
  }, [
18
- J(n.$slots, "default")
18
+ Y(n.$slots, "default")
19
19
  ], 2));
20
20
  }
21
21
  });
@@ -26,29 +26,29 @@ const me = /* @__PURE__ */ j({
26
26
  component: { default: "div" }
27
27
  },
28
28
  setup(e) {
29
- const r = C({
29
+ const r = E({
30
30
  "pdap-flex-container": !0,
31
31
  [`pdap-flex-container-${e.alignment}`]: !0
32
32
  });
33
- return (n, a) => (v(), S(ge(n.component), {
34
- class: W(r)
33
+ return (n, a) => (y(), I(ge(n.component), {
34
+ class: U(r)
35
35
  }, {
36
36
  default: R(() => [
37
- J(n.$slots, "default")
37
+ Y(n.$slots, "default")
38
38
  ]),
39
39
  _: 3
40
40
  }, 8, ["class"]));
41
41
  }
42
42
  });
43
43
  const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" }, dt = ["href"], pt = { class: "pdap-footer-copyright" }, mt = /* @__PURE__ */ b("br", null, null, -1), ft = /* @__PURE__ */ b("p", { class: "pdap-footer-copyright" }, [
44
- /* @__PURE__ */ N(" PDAP is a non-profit. EIN: 85-4207132. "),
44
+ /* @__PURE__ */ B(" PDAP is a non-profit. EIN: 85-4207132. "),
45
45
  /* @__PURE__ */ b("a", {
46
46
  href: "https://docs.pdap.io/meta/policy/pdap-privacy-policy",
47
47
  alt: "Privacy Policy",
48
48
  target: "_blank"
49
49
  }, [
50
50
  /* @__PURE__ */ b("br"),
51
- /* @__PURE__ */ N(" Privacy Policy "),
51
+ /* @__PURE__ */ B(" Privacy Policy "),
52
52
  /* @__PURE__ */ b("i", { class: "fa fa-external-link" })
53
53
  ]),
54
54
  /* @__PURE__ */ b("br"),
@@ -58,14 +58,14 @@ const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" },
58
58
  target: "_blank"
59
59
  }, [
60
60
  /* @__PURE__ */ b("img", { src: "https://widgets.guidestar.org/gximage2?o=9973356&l=v4" })
61
- ], -1), $t = ["href"], vt = ["src"], yt = ["src"], cn = /* @__PURE__ */ j({
61
+ ], -1), $t = ["href"], vt = ["src"], yt = ["src"], dn = /* @__PURE__ */ j({
62
62
  __name: "PdapFooter",
63
63
  props: {
64
64
  logoImageSrc: { default: "node_modules/pdap-design-system/dist/images/acronym.svg" },
65
65
  logoImageAnchorPath: { default: "/" }
66
66
  },
67
67
  setup(e) {
68
- const t = e, r = re("footerLinks", [
68
+ const t = e, r = ne("footerLinks", [
69
69
  {
70
70
  href: "https://github.com/orgs/Police-Data-Accessibility-Project",
71
71
  text: "Github"
@@ -85,22 +85,22 @@ const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" },
85
85
  ]), n = t.logoImageAnchorPath.startsWith("/");
86
86
  return (a, s) => {
87
87
  const u = tt("router-link");
88
- return v(), x("footer", ut, [
89
- H(me, { alignment: "center" }, {
88
+ return y(), x("footer", ut, [
89
+ G(me, { alignment: "center" }, {
90
90
  default: R(() => [
91
91
  b("ul", ct, [
92
- (v(!0), x(X, null, he(d(r), (l) => (v(), x("li", {
92
+ (y(!0), x(K, null, he(d(r), (l) => (y(), x("li", {
93
93
  key: l.text,
94
94
  class: "pdap-footer-link-container"
95
95
  }, [
96
- l.href ? (v(), x("a", {
96
+ l.href ? (y(), x("a", {
97
97
  key: 0,
98
98
  class: "pdap-footer-social-link",
99
99
  href: l.href,
100
100
  target: "_blank",
101
101
  referrerpolicy: "no-referrer"
102
- }, k(l.text), 9, dt)) : V("", !0),
103
- l.path ? (v(), S(u, {
102
+ }, V(l.text), 9, dt)) : z("", !0),
103
+ l.path ? (y(), I(u, {
104
104
  key: 1,
105
105
  "active-class": "pdap-footer-social-link-current",
106
106
  "exact-active-class": "pdap-footer-social-link-current-exact",
@@ -108,20 +108,20 @@ const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" },
108
108
  to: l.path
109
109
  }, {
110
110
  default: R(() => [
111
- N(k(l.text), 1)
111
+ B(V(l.text), 1)
112
112
  ]),
113
113
  _: 2
114
- }, 1032, ["to"])) : V("", !0)
114
+ }, 1032, ["to"])) : z("", !0)
115
115
  ]))), 128))
116
116
  ]),
117
117
  b("p", pt, [
118
- N(" © " + k((/* @__PURE__ */ new Date()).getFullYear()) + " Police Data Accessibility Project", 1),
118
+ B(" © " + V((/* @__PURE__ */ new Date()).getFullYear()) + " Police Data Accessibility Project", 1),
119
119
  mt
120
120
  ]),
121
121
  ft,
122
122
  b("div", gt, [
123
123
  ht,
124
- d(n) ? (v(), S(u, {
124
+ d(n) ? (y(), I(u, {
125
125
  key: 1,
126
126
  to: a.logoImageAnchorPath,
127
127
  class: "pdap-footer-logo"
@@ -135,7 +135,7 @@ const ut = { class: "pdap-footer" }, ct = { class: "pdap-footer-social-links" },
135
135
  }, null, 8, yt)
136
136
  ]),
137
137
  _: 1
138
- }, 8, ["to"])) : (v(), x("a", {
138
+ }, 8, ["to"])) : (y(), x("a", {
139
139
  key: 0,
140
140
  href: a.logoImageAnchorPath,
141
141
  class: "pdap-footer-logo"
@@ -165,7 +165,7 @@ function Oe(e, t) {
165
165
  }
166
166
  return r;
167
167
  }
168
- function L(e) {
168
+ function k(e) {
169
169
  for (var t = 1; t < arguments.length; t++) {
170
170
  var r = arguments[t] != null ? arguments[t] : {};
171
171
  t % 2 ? Oe(Object(r), !0).forEach(function(n) {
@@ -184,11 +184,11 @@ function _t(e, t, r) {
184
184
  writable: !0
185
185
  }) : e[t] = r, e;
186
186
  }
187
- function Ee(e) {
187
+ function Ce(e) {
188
188
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
189
189
  return Object.keys(e).reduce((r, n) => (t.includes(n) || (r[n] = d(e[n])), r), {});
190
190
  }
191
- function ae(e) {
191
+ function se(e) {
192
192
  return typeof e == "function";
193
193
  }
194
194
  function bt(e) {
@@ -209,7 +209,7 @@ function de(e, t, r) {
209
209
  [r]: !1
210
210
  })[r]));
211
211
  }
212
- function Ce(e, t, r) {
212
+ function Ee(e, t, r) {
213
213
  return _(() => e.reduce((n, a) => {
214
214
  const s = qe(t, a, {
215
215
  [r]: !1
@@ -227,29 +227,29 @@ function wt(e, t, r, n, a, s, u) {
227
227
  let {
228
228
  $lazy: l,
229
229
  $rewardEarly: o
230
- } = a, c = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [], g = arguments.length > 8 ? arguments[8] : void 0, m = arguments.length > 9 ? arguments[9] : void 0, h = arguments.length > 10 ? arguments[10] : void 0;
231
- const $ = P(!!n.value), i = P(0);
230
+ } = a, c = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : [], m = arguments.length > 8 ? arguments[8] : void 0, $ = arguments.length > 9 ? arguments[9] : void 0, h = arguments.length > 10 ? arguments[10] : void 0;
231
+ const f = P(!!n.value), i = P(0);
232
232
  r.value = !1;
233
- const p = K([t, n].concat(c, h), () => {
234
- if (l && !n.value || o && !m.value && !r.value)
233
+ const p = Z([t, n].concat(c, h), () => {
234
+ if (l && !n.value || o && !$.value && !r.value)
235
235
  return;
236
- let f;
236
+ let g;
237
237
  try {
238
- f = Ne(e, t, g, u);
239
- } catch (y) {
240
- f = Promise.reject(y);
238
+ g = Ne(e, t, m, u);
239
+ } catch (v) {
240
+ g = Promise.reject(v);
241
241
  }
242
- i.value++, r.value = !!i.value, $.value = !1, Promise.resolve(f).then((y) => {
243
- i.value--, r.value = !!i.value, s.value = y, $.value = Be(y);
244
- }).catch((y) => {
245
- i.value--, r.value = !!i.value, s.value = y, $.value = !0;
242
+ i.value++, r.value = !!i.value, f.value = !1, Promise.resolve(g).then((v) => {
243
+ i.value--, r.value = !!i.value, s.value = v, f.value = Be(v);
244
+ }).catch((v) => {
245
+ i.value--, r.value = !!i.value, s.value = v, f.value = !0;
246
246
  });
247
247
  }, {
248
248
  immediate: !0,
249
249
  deep: typeof t == "object"
250
250
  });
251
251
  return {
252
- $invalid: $,
252
+ $invalid: f,
253
253
  $unwatch: p
254
254
  };
255
255
  }
@@ -258,49 +258,49 @@ function xt(e, t, r, n, a, s, u, l) {
258
258
  $lazy: o,
259
259
  $rewardEarly: c
260
260
  } = n;
261
- const g = () => ({}), m = _(() => {
261
+ const m = () => ({}), $ = _(() => {
262
262
  if (o && !r.value || c && !l.value)
263
263
  return !1;
264
264
  let h = !0;
265
265
  try {
266
- const $ = Ne(e, t, u, s);
267
- a.value = $, h = Be($);
268
- } catch ($) {
269
- a.value = $;
266
+ const f = Ne(e, t, u, s);
267
+ a.value = f, h = Be(f);
268
+ } catch (f) {
269
+ a.value = f;
270
270
  }
271
271
  return h;
272
272
  });
273
273
  return {
274
- $unwatch: g,
275
- $invalid: m
274
+ $unwatch: m,
275
+ $invalid: $
276
276
  };
277
277
  }
278
- function Pt(e, t, r, n, a, s, u, l, o, c, g) {
279
- const m = P(!1), h = e.$params || {}, $ = P(null);
278
+ function Pt(e, t, r, n, a, s, u, l, o, c, m) {
279
+ const $ = P(!1), h = e.$params || {}, f = P(null);
280
280
  let i, p;
281
281
  e.$async ? {
282
282
  $invalid: i,
283
283
  $unwatch: p
284
- } = wt(e.$validator, t, m, r, n, $, a, e.$watchTargets, o, c, g) : {
284
+ } = wt(e.$validator, t, $, r, n, f, a, e.$watchTargets, o, c, m) : {
285
285
  $invalid: i,
286
286
  $unwatch: p
287
- } = xt(e.$validator, t, r, n, $, a, o, c);
288
- const f = e.$message;
287
+ } = xt(e.$validator, t, r, n, f, a, o, c);
288
+ const g = e.$message;
289
289
  return {
290
- $message: ae(f) ? _(() => f(Ee({
291
- $pending: m,
290
+ $message: se(g) ? _(() => g(Ce({
291
+ $pending: $,
292
292
  $invalid: i,
293
- $params: Ee(h),
293
+ $params: Ce(h),
294
294
  $model: t,
295
- $response: $,
295
+ $response: f,
296
296
  $validator: s,
297
297
  $propertyPath: l,
298
298
  $property: u
299
- }))) : f || "",
299
+ }))) : g || "",
300
300
  $params: h,
301
- $pending: m,
301
+ $pending: $,
302
302
  $invalid: i,
303
- $response: $,
303
+ $response: f,
304
304
  $unwatch: p
305
305
  };
306
306
  }
@@ -311,10 +311,10 @@ function Rt() {
311
311
  return r.forEach((l) => {
312
312
  const o = t[l];
313
313
  switch (!0) {
314
- case ae(o.$validator):
314
+ case se(o.$validator):
315
315
  n[l] = o;
316
316
  break;
317
- case ae(o):
317
+ case se(o):
318
318
  n[l] = {
319
319
  $validator: o
320
320
  };
@@ -336,58 +336,58 @@ function Rt() {
336
336
  };
337
337
  }
338
338
  const Ot = "__root";
339
- function Et(e, t, r, n, a, s, u, l, o) {
340
- const c = Object.keys(e), g = n.get(a, e), m = P(!1), h = P(!1), $ = P(0);
341
- if (g) {
342
- if (!g.$partial)
343
- return g;
344
- g.$unwatch(), m.value = g.$dirty.value;
339
+ function Ct(e, t, r, n, a, s, u, l, o) {
340
+ const c = Object.keys(e), m = n.get(a, e), $ = P(!1), h = P(!1), f = P(0);
341
+ if (m) {
342
+ if (!m.$partial)
343
+ return m;
344
+ m.$unwatch(), $.value = m.$dirty.value;
345
345
  }
346
346
  const i = {
347
- $dirty: m,
347
+ $dirty: $,
348
348
  $path: a,
349
349
  $touch: () => {
350
- m.value || (m.value = !0);
350
+ $.value || ($.value = !0);
351
351
  },
352
352
  $reset: () => {
353
- m.value && (m.value = !1);
353
+ $.value && ($.value = !1);
354
354
  },
355
355
  $commit: () => {
356
356
  }
357
357
  };
358
358
  return c.length ? (c.forEach((p) => {
359
- i[p] = Pt(e[p], t, i.$dirty, s, u, p, r, a, o, h, $);
360
- }), i.$externalResults = _(() => l.value ? [].concat(l.value).map((p, f) => ({
359
+ i[p] = Pt(e[p], t, i.$dirty, s, u, p, r, a, o, h, f);
360
+ }), i.$externalResults = _(() => l.value ? [].concat(l.value).map((p, g) => ({
361
361
  $propertyPath: a,
362
362
  $property: r,
363
363
  $validator: "$externalResults",
364
- $uid: `${a}-externalResult-${f}`,
364
+ $uid: `${a}-externalResult-${g}`,
365
365
  $message: p,
366
366
  $params: {},
367
367
  $response: null,
368
368
  $pending: !1
369
369
  })) : []), i.$invalid = _(() => {
370
- const p = c.some((f) => d(i[f].$invalid));
370
+ const p = c.some((g) => d(i[g].$invalid));
371
371
  return h.value = p, !!i.$externalResults.value.length || p;
372
372
  }), i.$pending = _(() => c.some((p) => d(i[p].$pending))), i.$error = _(() => i.$dirty.value ? i.$pending.value || i.$invalid.value : !1), i.$silentErrors = _(() => c.filter((p) => d(i[p].$invalid)).map((p) => {
373
- const f = i[p];
374
- return C({
373
+ const g = i[p];
374
+ return E({
375
375
  $propertyPath: a,
376
376
  $property: r,
377
377
  $validator: p,
378
378
  $uid: `${a}-${p}`,
379
- $message: f.$message,
380
- $params: f.$params,
381
- $response: f.$response,
382
- $pending: f.$pending
379
+ $message: g.$message,
380
+ $params: g.$params,
381
+ $response: g.$response,
382
+ $pending: g.$pending
383
383
  });
384
384
  }).concat(i.$externalResults.value)), i.$errors = _(() => i.$dirty.value ? i.$silentErrors.value : []), i.$unwatch = () => c.forEach((p) => {
385
385
  i[p].$unwatch();
386
386
  }), i.$commit = () => {
387
- h.value = !0, $.value = Date.now();
388
- }, n.set(a, e, i), i) : (g && n.set(a, e, i), i);
387
+ h.value = !0, f.value = Date.now();
388
+ }, n.set(a, e, i), i) : (m && n.set(a, e, i), i);
389
389
  }
390
- function Ct(e, t, r, n, a, s, u) {
390
+ function Et(e, t, r, n, a, s, u) {
391
391
  const l = Object.keys(e);
392
392
  return l.length ? l.reduce((o, c) => (o[c] = fe({
393
393
  validations: e[c],
@@ -409,12 +409,12 @@ function jt(e, t, r) {
409
409
  e.$dirty.value = i;
410
410
  }
411
411
  }), s = _(() => {
412
- const i = d(e.$silentErrors) || [], p = n.value.filter((f) => (d(f).$silentErrors || []).length).reduce((f, y) => f.concat(...y.$silentErrors), []);
412
+ const i = d(e.$silentErrors) || [], p = n.value.filter((g) => (d(g).$silentErrors || []).length).reduce((g, v) => g.concat(...v.$silentErrors), []);
413
413
  return i.concat(p);
414
414
  }), u = _(() => {
415
- const i = d(e.$errors) || [], p = n.value.filter((f) => (d(f).$errors || []).length).reduce((f, y) => f.concat(...y.$errors), []);
415
+ const i = d(e.$errors) || [], p = n.value.filter((g) => (d(g).$errors || []).length).reduce((g, v) => g.concat(...v.$errors), []);
416
416
  return i.concat(p);
417
- }), l = _(() => n.value.some((i) => i.$invalid) || d(e.$invalid) || !1), o = _(() => n.value.some((i) => d(i.$pending)) || d(e.$pending) || !1), c = _(() => n.value.some((i) => i.$dirty) || n.value.some((i) => i.$anyDirty) || a.value), g = _(() => a.value ? o.value || l.value : !1), m = () => {
417
+ }), l = _(() => n.value.some((i) => i.$invalid) || d(e.$invalid) || !1), o = _(() => n.value.some((i) => d(i.$pending)) || d(e.$pending) || !1), c = _(() => n.value.some((i) => i.$dirty) || n.value.some((i) => i.$anyDirty) || a.value), m = _(() => a.value ? o.value || l.value : !1), $ = () => {
418
418
  e.$touch(), n.value.forEach((i) => {
419
419
  i.$touch();
420
420
  });
@@ -422,20 +422,20 @@ function jt(e, t, r) {
422
422
  e.$commit(), n.value.forEach((i) => {
423
423
  i.$commit();
424
424
  });
425
- }, $ = () => {
425
+ }, f = () => {
426
426
  e.$reset(), n.value.forEach((i) => {
427
427
  i.$reset();
428
428
  });
429
429
  };
430
- return n.value.length && n.value.every((i) => i.$dirty) && m(), {
430
+ return n.value.length && n.value.every((i) => i.$dirty) && $(), {
431
431
  $dirty: a,
432
432
  $errors: u,
433
433
  $invalid: l,
434
434
  $anyDirty: c,
435
- $error: g,
435
+ $error: m,
436
436
  $pending: o,
437
- $touch: m,
438
- $reset: $,
437
+ $touch: $,
438
+ $reset: f,
439
439
  $silentErrors: s,
440
440
  $commit: h
441
441
  };
@@ -452,31 +452,31 @@ function fe(e) {
452
452
  instance: o,
453
453
  externalResults: c
454
454
  } = e;
455
- const g = a ? `${a}.${n}` : n, {
456
- rules: m,
455
+ const m = a ? `${a}.${n}` : n, {
456
+ rules: $,
457
457
  nestedValidators: h,
458
- config: $,
458
+ config: f,
459
459
  validationGroups: i
460
- } = Rt(t), p = L(L({}, l), $), f = n ? _(() => {
460
+ } = Rt(t), p = k(k({}, l), f), g = n ? _(() => {
461
461
  const w = d(r);
462
462
  return w ? d(w[n]) : void 0;
463
- }) : r, y = L({}, d(c) || {}), A = _(() => {
463
+ }) : r, v = k({}, d(c) || {}), A = _(() => {
464
464
  const w = d(c);
465
465
  return n ? w ? d(w[n]) : void 0 : w;
466
- }), ie = Et(m, f, n, u, g, p, o, A, r), E = Ct(h, f, g, u, p, o, A), F = {};
466
+ }), F = Ct($, g, n, u, m, p, o, A, r), C = Et(h, g, m, u, p, o, A), q = {};
467
467
  i && Object.entries(i).forEach((w) => {
468
- let [q, T] = w;
469
- F[q] = {
470
- $invalid: de(T, E, "$invalid"),
471
- $error: de(T, E, "$error"),
472
- $pending: de(T, E, "$pending"),
473
- $errors: Ce(T, E, "$errors"),
474
- $silentErrors: Ce(T, E, "$silentErrors")
468
+ let [N, L] = w;
469
+ q[N] = {
470
+ $invalid: de(L, C, "$invalid"),
471
+ $error: de(L, C, "$error"),
472
+ $pending: de(L, C, "$pending"),
473
+ $errors: Ee(L, C, "$errors"),
474
+ $silentErrors: Ee(L, C, "$silentErrors")
475
475
  };
476
476
  });
477
477
  const {
478
- $dirty: I,
479
- $errors: Y,
478
+ $dirty: T,
479
+ $errors: ee,
480
480
  $invalid: le,
481
481
  $anyDirty: Ue,
482
482
  $error: Xe,
@@ -485,27 +485,27 @@ function fe(e) {
485
485
  $reset: Ke,
486
486
  $silentErrors: Ze,
487
487
  $commit: xe
488
- } = jt(ie, E, s), Qe = n ? _({
489
- get: () => d(f),
488
+ } = jt(F, C, s), Qe = n ? _({
489
+ get: () => d(g),
490
490
  set: (w) => {
491
- I.value = !0;
492
- const q = d(r), T = d(c);
493
- T && (T[n] = y[n]), pe(q[n]) ? q[n].value = w : q[n] = w;
491
+ T.value = !0;
492
+ const N = d(r), L = d(c);
493
+ L && (L[n] = v[n]), pe(N[n]) ? N[n].value = w : N[n] = w;
494
494
  }
495
495
  }) : null;
496
- n && p.$autoDirty && K(f, () => {
497
- I.value || ce();
496
+ n && p.$autoDirty && Z(g, () => {
497
+ T.value || ce();
498
498
  const w = d(c);
499
- w && (w[n] = y[n]);
499
+ w && (w[n] = v[n]);
500
500
  }, {
501
501
  flush: "sync"
502
502
  });
503
503
  async function Je() {
504
- return ce(), p.$rewardEarly && (xe(), await ne()), await ne(), new Promise((w) => {
504
+ return ce(), p.$rewardEarly && (xe(), await ae()), await ae(), new Promise((w) => {
505
505
  if (!ue.value)
506
506
  return w(!le.value);
507
- const q = K(ue, () => {
508
- w(!le.value), q();
507
+ const N = Z(ue, () => {
508
+ w(!le.value), N();
509
509
  });
510
510
  });
511
511
  }
@@ -513,29 +513,29 @@ function fe(e) {
513
513
  return (s.value || {})[w];
514
514
  }
515
515
  function et() {
516
- pe(c) ? c.value = y : Object.keys(y).length === 0 ? Object.keys(c).forEach((w) => {
516
+ pe(c) ? c.value = v : Object.keys(v).length === 0 ? Object.keys(c).forEach((w) => {
517
517
  delete c[w];
518
- }) : Object.assign(c, y);
518
+ }) : Object.assign(c, v);
519
519
  }
520
- return C(L(L(L({}, ie), {}, {
520
+ return E(k(k(k({}, F), {}, {
521
521
  $model: Qe,
522
- $dirty: I,
522
+ $dirty: T,
523
523
  $error: Xe,
524
- $errors: Y,
524
+ $errors: ee,
525
525
  $invalid: le,
526
526
  $anyDirty: Ue,
527
527
  $pending: ue,
528
528
  $touch: ce,
529
529
  $reset: Ke,
530
- $path: g || Ot,
530
+ $path: m || Ot,
531
531
  $silentErrors: Ze,
532
532
  $validate: Je,
533
533
  $commit: xe
534
534
  }, s && {
535
535
  $getResultsForChild: Ye,
536
536
  $clearExternalResults: et,
537
- $validationGroups: F
538
- }), E));
537
+ $validationGroups: q
538
+ }), C));
539
539
  }
540
540
  class At {
541
541
  constructor() {
@@ -566,7 +566,7 @@ class At {
566
566
  };
567
567
  }
568
568
  }
569
- const te = {
569
+ const re = {
570
570
  COLLECT_ALL: !0,
571
571
  COLLECT_NONE: !1
572
572
  }, je = Symbol("vuelidate#injectChildResults"), Ae = Symbol("vuelidate#removeChildResults");
@@ -575,23 +575,23 @@ function St(e) {
575
575
  $scope: t,
576
576
  instance: r
577
577
  } = e;
578
- const n = {}, a = P([]), s = _(() => a.value.reduce((g, m) => (g[m] = d(n[m]), g), {}));
579
- function u(g, m) {
578
+ const n = {}, a = P([]), s = _(() => a.value.reduce((m, $) => (m[$] = d(n[$]), m), {}));
579
+ function u(m, $) {
580
580
  let {
581
581
  $registerAs: h,
582
- $scope: $,
582
+ $scope: f,
583
583
  $stopPropagation: i
584
- } = m;
585
- i || t === te.COLLECT_NONE || $ === te.COLLECT_NONE || t !== te.COLLECT_ALL && t !== $ || (n[h] = g, a.value.push(h));
584
+ } = $;
585
+ i || t === re.COLLECT_NONE || f === re.COLLECT_NONE || t !== re.COLLECT_ALL && t !== f || (n[h] = m, a.value.push(h));
586
586
  }
587
587
  r.__vuelidateInjectInstances = [].concat(r.__vuelidateInjectInstances || [], u);
588
- function l(g) {
589
- a.value = a.value.filter((m) => m !== g), delete n[g];
588
+ function l(m) {
589
+ a.value = a.value.filter(($) => $ !== m), delete n[m];
590
590
  }
591
591
  r.__vuelidateRemoveInstances = [].concat(r.__vuelidateRemoveInstances || [], l);
592
- const o = re(je, []);
592
+ const o = ne(je, []);
593
593
  Pe(je, r.__vuelidateInjectInstances);
594
- const c = re(Ae, []);
594
+ const c = ne(Ae, []);
595
595
  return Pe(Ae, r.__vuelidateRemoveInstances), {
596
596
  childResults: s,
597
597
  sendValidationResultsToParent: o,
@@ -612,15 +612,15 @@ function It(e, t) {
612
612
  arguments.length === 1 && (n = e, e = void 0, t = void 0);
613
613
  let {
614
614
  $registerAs: a,
615
- $scope: s = te.COLLECT_ALL,
615
+ $scope: s = re.COLLECT_ALL,
616
616
  $stopPropagation: u,
617
617
  $externalResults: l,
618
618
  currentVueInstance: o
619
619
  } = n;
620
- const c = o || ((r = rt()) === null || r === void 0 ? void 0 : r.proxy), g = c ? c.$options : {};
620
+ const c = o || ((r = rt()) === null || r === void 0 ? void 0 : r.proxy), m = c ? c.$options : {};
621
621
  a || (Se += 1, a = `_vuelidate_${Se}`);
622
- const m = P({}), h = new At(), {
623
- childResults: $,
622
+ const $ = P({}), h = new At(), {
623
+ childResults: f,
624
624
  sendValidationResultsToParent: i,
625
625
  removeValidationResultsFromParent: p
626
626
  } = c ? St({
@@ -629,14 +629,14 @@ function It(e, t) {
629
629
  }) : {
630
630
  childResults: P({})
631
631
  };
632
- if (!e && g.validations) {
633
- const f = g.validations;
632
+ if (!e && m.validations) {
633
+ const g = m.validations;
634
634
  t = P({}), De(() => {
635
- t.value = c, K(() => ae(f) ? f.call(t.value, new He(t.value)) : f, (y) => {
636
- m.value = fe({
637
- validations: y,
635
+ t.value = c, Z(() => se(g) ? g.call(t.value, new He(t.value)) : g, (v) => {
636
+ $.value = fe({
637
+ validations: v,
638
638
  state: t,
639
- childResults: $,
639
+ childResults: f,
640
640
  resultsCache: h,
641
641
  globalConfig: n,
642
642
  instance: c,
@@ -645,14 +645,14 @@ function It(e, t) {
645
645
  }, {
646
646
  immediate: !0
647
647
  });
648
- }), n = g.validationsConfig || n;
648
+ }), n = m.validationsConfig || n;
649
649
  } else {
650
- const f = pe(e) || bt(e) ? e : C(e || {});
651
- K(f, (y) => {
652
- m.value = fe({
653
- validations: y,
650
+ const g = pe(e) || bt(e) ? e : E(e || {});
651
+ Z(g, (v) => {
652
+ $.value = fe({
653
+ validations: v,
654
654
  state: t,
655
- childResults: $,
655
+ childResults: f,
656
656
  resultsCache: h,
657
657
  globalConfig: n,
658
658
  instance: c ?? {},
@@ -662,13 +662,13 @@ function It(e, t) {
662
662
  immediate: !0
663
663
  });
664
664
  }
665
- return c && (i.forEach((f) => f(m, {
665
+ return c && (i.forEach((g) => g($, {
666
666
  $registerAs: a,
667
667
  $scope: s,
668
668
  $stopPropagation: u
669
- })), $e(() => p.forEach((f) => f(a)))), _(() => L(L({}, d(m.value)), $.value));
669
+ })), $e(() => p.forEach((g) => g(a)))), _(() => k(k({}, d($.value)), f.value));
670
670
  }
671
- var z = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.TEXT = "text", e.PASSWORD = "password", e))(z || {});
671
+ var S = /* @__PURE__ */ ((e) => (e.CHECKBOX = "checkbox", e.TEXT = "text", e.PASSWORD = "password", e))(S || {});
672
672
  const Tt = ["id", "name", "placeholder", "value"], Lt = ["id", "name", "placeholder", "value"], kt = ["id", "name", "checked", "value"], Vt = ["id"], zt = ["for"], Mt = /* @__PURE__ */ j({
673
673
  __name: "PdapInput",
674
674
  props: {
@@ -689,30 +689,30 @@ const Tt = ["id", "name", "placeholder", "value"], Lt = ["id", "name", "placehol
689
689
  n("input", o.target.value);
690
690
  }, u = P(r.defaultChecked), l = _(() => `pdap-${r.name}-input-error`);
691
691
  return (o, c) => {
692
- var g;
693
- return v(), S(d(Kr), {
694
- class: W({
692
+ var m;
693
+ return y(), I(d(Zr), {
694
+ class: U({
695
695
  "pdap-input": !0,
696
- "pdap-input-error": Number((g = o.error) == null ? void 0 : g.length) >= 1
696
+ "pdap-input-error": Number((m = o.error) == null ? void 0 : m.length) >= 1
697
697
  })
698
698
  }, {
699
699
  default: R(() => [
700
- o.type === d(z).TEXT ? (v(), x("input", ee({
700
+ o.type === d(S).TEXT ? (y(), x("input", te({
701
701
  key: 0,
702
702
  id: o.id,
703
703
  type: "text",
704
704
  name: o.name,
705
705
  placeholder: o.placeholder,
706
706
  value: o.value
707
- }, o.$attrs, { onInput: s }), null, 16, Tt)) : V("", !0),
708
- o.type === d(z).PASSWORD ? (v(), x("input", ee({
707
+ }, o.$attrs, { onInput: s }), null, 16, Tt)) : z("", !0),
708
+ o.type === d(S).PASSWORD ? (y(), x("input", te({
709
709
  key: 1,
710
710
  id: o.id,
711
711
  type: "password",
712
712
  name: o.name,
713
713
  placeholder: o.placeholder,
714
714
  value: o.value
715
- }, o.$attrs, { onInput: s }), null, 16, Lt)) : o.type === d(z).CHECKBOX ? (v(), x("input", ee({
715
+ }, o.$attrs, { onInput: s }), null, 16, Lt)) : o.type === d(S).CHECKBOX ? (y(), x("input", te({
716
716
  key: 2,
717
717
  id: o.id,
718
718
  class: "pdap-input-checkbox",
@@ -720,16 +720,16 @@ const Tt = ["id", "name", "placeholder", "value"], Lt = ["id", "name", "placehol
720
720
  checked: u.value,
721
721
  type: "checkbox",
722
722
  value: o.value
723
- }, o.$attrs, { onChange: a }), null, 16, kt)) : V("", !0),
724
- o.error ? (v(), x("div", {
723
+ }, o.$attrs, { onChange: a }), null, 16, kt)) : z("", !0),
724
+ o.error ? (y(), x("div", {
725
725
  key: 3,
726
726
  id: l.value,
727
727
  class: "pdap-input-error-message"
728
- }, k(o.error), 9, Vt)) : V("", !0),
728
+ }, V(o.error), 9, Vt)) : z("", !0),
729
729
  b("label", {
730
730
  class: "pdap-input-label",
731
731
  for: o.id
732
- }, k(o.label), 9, zt)
732
+ }, V(o.label), 9, zt)
733
733
  ]),
734
734
  _: 1
735
735
  }, 8, ["class"]);
@@ -746,7 +746,7 @@ function Ie(e, t) {
746
746
  }
747
747
  return r;
748
748
  }
749
- function G(e) {
749
+ function W(e) {
750
750
  for (var t = 1; t < arguments.length; t++) {
751
751
  var r = arguments[t] != null ? arguments[t] : {};
752
752
  t % 2 ? Ie(Object(r), !0).forEach(function(n) {
@@ -765,46 +765,46 @@ function Dt(e, t, r) {
765
765
  writable: !0
766
766
  }) : e[t] = r, e;
767
767
  }
768
- function Z(e) {
768
+ function Q(e) {
769
769
  return typeof e == "function";
770
770
  }
771
- function se(e) {
771
+ function oe(e) {
772
772
  return e !== null && typeof e == "object" && !Array.isArray(e);
773
773
  }
774
- function oe(e) {
775
- return Z(e.$validator) ? G({}, e) : {
774
+ function ie(e) {
775
+ return Q(e.$validator) ? W({}, e) : {
776
776
  $validator: e
777
777
  };
778
778
  }
779
779
  function Ft(e) {
780
- return se(e) && Z(e.then);
780
+ return oe(e) && Q(e.then);
781
781
  }
782
782
  function M(e) {
783
783
  return typeof e == "object" ? e.$valid : e;
784
784
  }
785
- function B(e) {
785
+ function H(e) {
786
786
  return e.$validator || e;
787
787
  }
788
788
  function ye(e, t) {
789
- if (!se(e))
789
+ if (!oe(e))
790
790
  throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);
791
- if (!se(t) && !Z(t))
791
+ if (!oe(t) && !Q(t))
792
792
  throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
793
- const r = oe(t);
794
- return r.$params = G(G({}, r.$params || {}), e), r;
793
+ const r = ie(t);
794
+ return r.$params = W(W({}, r.$params || {}), e), r;
795
795
  }
796
- function Q(e, t) {
797
- if (!Z(e) && typeof d(e) != "string")
796
+ function J(e, t) {
797
+ if (!Q(e) && typeof d(e) != "string")
798
798
  throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);
799
- if (!se(t) && !Z(t))
799
+ if (!oe(t) && !Q(t))
800
800
  throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
801
- const r = oe(t);
801
+ const r = ie(t);
802
802
  return r.$message = e, r;
803
803
  }
804
804
  function qt(e) {
805
805
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
806
- const r = oe(e);
807
- return G(G({}, r), {}, {
806
+ const r = ie(e);
807
+ return W(W({}, r), {}, {
808
808
  $async: !0,
809
809
  $watchTargets: t
810
810
  });
@@ -815,32 +815,32 @@ function Nt(e) {
815
815
  for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
816
816
  n[a - 1] = arguments[a];
817
817
  return d(t).reduce((s, u, l) => {
818
- const o = Object.entries(u).reduce((c, g) => {
819
- let [m, h] = g;
820
- const $ = e[m] || {}, i = Object.entries($).reduce((p, f) => {
821
- let [y, A] = f;
822
- const E = B(A).call(this, h, u, l, ...n), F = M(E);
823
- if (p.$data[y] = E, p.$data.$invalid = !F || !!p.$data.$invalid, p.$data.$error = p.$data.$invalid, !F) {
824
- let I = A.$message || "";
825
- const Y = A.$params || {};
826
- typeof I == "function" && (I = I({
818
+ const o = Object.entries(u).reduce((c, m) => {
819
+ let [$, h] = m;
820
+ const f = e[$] || {}, i = Object.entries(f).reduce((p, g) => {
821
+ let [v, A] = g;
822
+ const C = H(A).call(this, h, u, l, ...n), q = M(C);
823
+ if (p.$data[v] = C, p.$data.$invalid = !q || !!p.$data.$invalid, p.$data.$error = p.$data.$invalid, !q) {
824
+ let T = A.$message || "";
825
+ const ee = A.$params || {};
826
+ typeof T == "function" && (T = T({
827
827
  $pending: !1,
828
- $invalid: !F,
829
- $params: Y,
828
+ $invalid: !q,
829
+ $params: ee,
830
830
  $model: h,
831
- $response: E
831
+ $response: C
832
832
  })), p.$errors.push({
833
- $property: m,
834
- $message: I,
835
- $params: Y,
836
- $response: E,
833
+ $property: $,
834
+ $message: T,
835
+ $params: ee,
836
+ $response: C,
837
837
  $model: h,
838
838
  $pending: !1,
839
- $validator: y
839
+ $validator: v
840
840
  });
841
841
  }
842
842
  return {
843
- $valid: p.$valid && F,
843
+ $valid: p.$valid && q,
844
844
  $data: p.$data,
845
845
  $errors: p.$errors
846
846
  };
@@ -849,7 +849,7 @@ function Nt(e) {
849
849
  $data: {},
850
850
  $errors: []
851
851
  });
852
- return c.$data[m] = i.$data, c.$errors[m] = i.$errors, {
852
+ return c.$data[$] = i.$data, c.$errors[$] = i.$errors, {
853
853
  $valid: c.$valid && i.$valid,
854
854
  $data: c.$data,
855
855
  $errors: c.$errors
@@ -899,18 +899,18 @@ function D() {
899
899
  t[r] = arguments[r];
900
900
  return (n) => (n = d(n), !O(n) || t.every((a) => (a.lastIndex = 0, a.test(n))));
901
901
  }
902
- var U = /* @__PURE__ */ Object.freeze({
902
+ var X = /* @__PURE__ */ Object.freeze({
903
903
  __proto__: null,
904
904
  forEach: Nt,
905
905
  len: _e,
906
- normalizeValidatorObject: oe,
906
+ normalizeValidatorObject: ie,
907
907
  regex: D,
908
908
  req: O,
909
909
  unwrap: d,
910
- unwrapNormalizedValidator: B,
910
+ unwrapNormalizedValidator: H,
911
911
  unwrapValidatorResponse: M,
912
912
  withAsync: qt,
913
- withMessage: Q,
913
+ withMessage: J,
914
914
  withParams: ye
915
915
  }), Bt = D(/^[a-zA-Z]*$/), Ht = {
916
916
  $validator: Bt,
@@ -1111,7 +1111,7 @@ function yr(e) {
1111
1111
  return function() {
1112
1112
  for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
1113
1113
  r[n] = arguments[n];
1114
- return e.reduce((a, s) => M(a) ? a : B(s).apply(this, r), !1);
1114
+ return e.reduce((a, s) => M(a) ? a : H(s).apply(this, r), !1);
1115
1115
  };
1116
1116
  }
1117
1117
  function _r(e) {
@@ -1120,7 +1120,7 @@ function _r(e) {
1120
1120
  r[n] = arguments[n];
1121
1121
  return e.reduce(async (a, s) => {
1122
1122
  const u = await a;
1123
- return M(u) ? u : B(s).apply(this, r);
1123
+ return M(u) ? u : H(s).apply(this, r);
1124
1124
  }, Promise.resolve(!1));
1125
1125
  };
1126
1126
  }
@@ -1138,13 +1138,13 @@ function br() {
1138
1138
  function wr() {
1139
1139
  return ye({
1140
1140
  type: "or"
1141
- }, Q("The value does not match any of the provided validators", br(...arguments)));
1141
+ }, J("The value does not match any of the provided validators", br(...arguments)));
1142
1142
  }
1143
1143
  function xr(e) {
1144
1144
  return function() {
1145
1145
  for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
1146
1146
  r[n] = arguments[n];
1147
- return e.reduce((a, s) => M(a) ? B(s).apply(this, r) : a, !0);
1147
+ return e.reduce((a, s) => M(a) ? H(s).apply(this, r) : a, !0);
1148
1148
  };
1149
1149
  }
1150
1150
  function Pr(e) {
@@ -1153,7 +1153,7 @@ function Pr(e) {
1153
1153
  r[n] = arguments[n];
1154
1154
  return e.reduce(async (a, s) => {
1155
1155
  const u = await a;
1156
- return M(u) ? B(s).apply(this, r) : u;
1156
+ return M(u) ? H(s).apply(this, r) : u;
1157
1157
  }, Promise.resolve(!0));
1158
1158
  };
1159
1159
  }
@@ -1171,19 +1171,19 @@ function Rr() {
1171
1171
  function Or() {
1172
1172
  return ye({
1173
1173
  type: "and"
1174
- }, Q("The value does not match all of the provided validators", Rr(...arguments)));
1174
+ }, J("The value does not match all of the provided validators", Rr(...arguments)));
1175
1175
  }
1176
- function Er(e) {
1176
+ function Cr(e) {
1177
1177
  return function(t, r) {
1178
1178
  if (!O(t))
1179
1179
  return !0;
1180
- const n = B(e).call(this, t, r);
1180
+ const n = H(e).call(this, t, r);
1181
1181
  return Ft(n) ? n.then((a) => !M(a)) : !M(n);
1182
1182
  };
1183
1183
  }
1184
- function Cr(e) {
1184
+ function Er(e) {
1185
1185
  return {
1186
- $validator: Er(e),
1186
+ $validator: Cr(e),
1187
1187
  $message: "The value does not match the provided validator",
1188
1188
  $params: {
1189
1189
  type: "not"
@@ -1253,20 +1253,20 @@ function zr(e) {
1253
1253
  messagePath: l = r,
1254
1254
  messageParams: o = n
1255
1255
  } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1256
- function c(g) {
1257
- return t(l(g), o(G({
1258
- model: g.$model,
1259
- property: g.$property,
1260
- pending: g.$pending,
1261
- invalid: g.$invalid,
1262
- response: g.$response,
1263
- validator: g.$validator,
1264
- propertyPath: g.$propertyPath
1265
- }, g.$params)));
1256
+ function c(m) {
1257
+ return t(l(m), o(W({
1258
+ model: m.$model,
1259
+ property: m.$property,
1260
+ pending: m.$pending,
1261
+ invalid: m.$invalid,
1262
+ response: m.$response,
1263
+ validator: m.$validator,
1264
+ propertyPath: m.$propertyPath
1265
+ }, m.$params)));
1266
1266
  }
1267
1267
  return u && typeof s == "function" ? function() {
1268
- return Q(c, s(...arguments));
1269
- } : Q(c, s);
1268
+ return J(c, s(...arguments));
1269
+ } : J(c, s);
1270
1270
  };
1271
1271
  }
1272
1272
  const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -1278,7 +1278,7 @@ const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1278
1278
  createI18nMessage: zr,
1279
1279
  decimal: Vr,
1280
1280
  email: be,
1281
- helpers: U,
1281
+ helpers: X,
1282
1282
  integer: Lr,
1283
1283
  ipAddress: tr,
1284
1284
  macAddress: ar,
@@ -1286,7 +1286,7 @@ const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1286
1286
  maxValue: Ir,
1287
1287
  minLength: lr,
1288
1288
  minValue: Ar,
1289
- not: Cr,
1289
+ not: Er,
1290
1290
  numeric: Xt,
1291
1291
  or: wr,
1292
1292
  required: we,
@@ -1294,7 +1294,7 @@ const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1294
1294
  requiredUnless: mr,
1295
1295
  sameAs: gr,
1296
1296
  url: vr
1297
- }, Symbol.toStringTag, { value: "Module" })), We = U.regex(
1297
+ }, Symbol.toStringTag, { value: "Module" })), We = X.regex(
1298
1298
  /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$ %^&*-]).{8,}$/
1299
1299
  );
1300
1300
  function ke(e) {
@@ -1316,7 +1316,7 @@ function Mr(e, t) {
1316
1316
  }
1317
1317
  function Dr(e, t, r) {
1318
1318
  return {
1319
- [e]: U.withMessage(r, Ge[e](t))
1319
+ [e]: X.withMessage(r, Ge[e](t))
1320
1320
  };
1321
1321
  }
1322
1322
  function Fr() {
@@ -1324,7 +1324,7 @@ function Fr() {
1324
1324
  }
1325
1325
  function qr(e) {
1326
1326
  return {
1327
- required: U.withMessage(e, we)
1327
+ required: X.withMessage(e, we)
1328
1328
  };
1329
1329
  }
1330
1330
  function Nr() {
@@ -1332,7 +1332,7 @@ function Nr() {
1332
1332
  }
1333
1333
  function Br(e) {
1334
1334
  return {
1335
- email: U.withMessage(e, be)
1335
+ email: X.withMessage(e, be)
1336
1336
  };
1337
1337
  }
1338
1338
  function Hr() {
@@ -1340,7 +1340,7 @@ function Hr() {
1340
1340
  }
1341
1341
  function Gr(e) {
1342
1342
  return {
1343
- password: U.withMessage(e, We)
1343
+ password: X.withMessage(e, We)
1344
1344
  };
1345
1345
  }
1346
1346
  function Wr(e, t) {
@@ -1366,10 +1366,10 @@ function Wr(e, t) {
1366
1366
  return Fr();
1367
1367
  throw new Error("No valid rule detected");
1368
1368
  }
1369
- const Ur = {
1369
+ const Ur = ["id", "name"], Xr = {
1370
1370
  key: 0,
1371
1371
  class: "pdap-form-error-message"
1372
- }, Xr = /* @__PURE__ */ j({
1372
+ }, Kr = /* @__PURE__ */ j({
1373
1373
  __name: "PdapForm",
1374
1374
  props: {
1375
1375
  error: { default: null },
@@ -1377,40 +1377,43 @@ const Ur = {
1377
1377
  name: {},
1378
1378
  schema: {}
1379
1379
  },
1380
- emits: ["submit"],
1380
+ emits: ["submit", "change"],
1381
1381
  setup(e, { emit: t }) {
1382
- const r = e, n = t, a = P(
1383
- r.schema.map((m) => {
1384
- const h = { ...m };
1385
- return delete h.validators, h;
1382
+ const r = e, n = t, a = _(
1383
+ () => r.schema.map((h) => {
1384
+ const f = { ...h };
1385
+ return delete f.validators, f;
1386
1386
  })
1387
- ), s = P(
1388
- r.schema.reduce((m, h) => {
1389
- switch (h.type) {
1390
- case z.CHECKBOX:
1391
- return { ...m, [h.name]: String(h.defaultChecked) };
1392
- case z.TEXT:
1387
+ );
1388
+ let s = E(
1389
+ a.value.reduce((h, f) => {
1390
+ switch (f.type) {
1391
+ case S.CHECKBOX:
1392
+ return { ...h, [f.name]: String(f.defaultChecked) };
1393
+ case S.TEXT:
1394
+ case S.PASSWORD:
1393
1395
  default:
1394
- return { ...m, [h.name]: h.value };
1396
+ return { ...h, [f.name]: f.value };
1395
1397
  }
1396
1398
  }, {})
1397
- ), u = r.schema.reduce((m, h) => {
1398
- const $ = Object.entries(h.validators ?? {}).reduce(
1399
- (i, [p, f]) => ({
1400
- ...i,
1401
- ...Wr(p, f)
1399
+ );
1400
+ const u = r.schema.reduce((h, f) => {
1401
+ const i = Object.entries(f.validators ?? {}).reduce(
1402
+ (p, [g, v]) => ({
1403
+ ...p,
1404
+ ...Wr(g, v)
1402
1405
  }),
1403
1406
  {}
1404
1407
  );
1405
1408
  return {
1406
- ...m,
1407
- [h.name]: {
1408
- ...$
1409
+ ...h,
1410
+ [f.name]: {
1411
+ ...i
1409
1412
  }
1410
1413
  };
1411
1414
  }, {}), l = It(u, s, { $autoDirty: !1, $lazy: !0 }), o = P(r.error);
1412
- function c(m, h) {
1413
- s.value[m] = h;
1415
+ function c(h, f) {
1416
+ s[h] = f, m();
1414
1417
  }
1415
1418
  Re(() => {
1416
1419
  r.error ? o.value = r.error : o.value && l.value.$errors.length === 0 ? o.value = null : !o.value && l.value.$errors.length > 0 && (o.value = "Please update this form to correct the errors");
@@ -1419,6 +1422,8 @@ const Ur = {
1419
1422
  `, {
1420
1423
  errorMessage: o.value,
1421
1424
  props: r,
1425
+ schema: r.schema,
1426
+ data: a,
1422
1427
  values: s,
1423
1428
  vuelidate: {
1424
1429
  rules: u,
@@ -1426,32 +1431,38 @@ const Ur = {
1426
1431
  }
1427
1432
  });
1428
1433
  });
1429
- async function g(m) {
1434
+ function m() {
1435
+ n("change", { ...s });
1436
+ }
1437
+ async function $(h) {
1430
1438
  if (await l.value.$validate()) {
1431
- n("submit", { ...s.value }), l.value.$reset(), m.target.reset(), s.value = Object.entries(s.value).reduce((i, [p, f]) => ({ ...i, [p]: ["true", "false"].includes(f) ? f : "" }), {});
1439
+ n("submit", { ...s }), l.value.$reset(), h.target.reset(), s = Object.entries(s).reduce((p, [g, v]) => ({ ...p, [g]: ["true", "false"].includes(v) ? v : "" }), {});
1432
1440
  return;
1433
1441
  }
1434
1442
  }
1435
- return (m, h) => (v(), x("form", {
1443
+ return (h, f) => (y(), x("form", {
1444
+ id: h.id,
1445
+ name: h.name,
1436
1446
  class: "pdap-form",
1437
- onSubmit: h[0] || (h[0] = st(($) => g($), ["prevent"]))
1447
+ onChange: m,
1448
+ onSubmit: f[0] || (f[0] = st((i) => $(i), ["prevent"]))
1438
1449
  }, [
1439
- typeof o.value == "string" ? (v(), x("div", Ur, k(o.value), 1)) : V("", !0),
1440
- (v(!0), x(X, null, he(a.value, ($) => {
1441
- var i, p, f, y;
1442
- return v(), S(Mt, ee($, {
1443
- key: $.name,
1444
- error: (i = d(l)[$.name]) != null && i.$error ? (y = (f = (p = d(l)[$.name]) == null ? void 0 : p.$errors) == null ? void 0 : f[0]) == null ? void 0 : y.$message : "",
1445
- value: s.value[$.name],
1446
- onChange: (A) => c($.name, A),
1447
- onInput: (A) => c($.name, A)
1450
+ typeof o.value == "string" ? (y(), x("div", Xr, V(o.value), 1)) : z("", !0),
1451
+ (y(!0), x(K, null, he(a.value, (i) => {
1452
+ var p, g, v, A;
1453
+ return y(), I(Mt, te(i, {
1454
+ key: i.name,
1455
+ error: (p = d(l)[i.name]) != null && p.$error ? (A = (v = (g = d(l)[i.name]) == null ? void 0 : g.$errors) == null ? void 0 : v[0]) == null ? void 0 : A.$message : "",
1456
+ value: d(s)[i.name],
1457
+ onChange: (F) => c(i.name, F),
1458
+ onInput: (F) => c(i.name, F)
1448
1459
  }), null, 16, ["error", "value", "onChange", "onInput"]);
1449
1460
  }), 128)),
1450
- J(m.$slots, "default")
1451
- ], 32));
1461
+ Y(h.$slots, "default")
1462
+ ], 40, Ur));
1452
1463
  }
1453
1464
  });
1454
- const Kr = /* @__PURE__ */ j({
1465
+ const Zr = /* @__PURE__ */ j({
1455
1466
  __name: "GridContainer",
1456
1467
  props: {
1457
1468
  columns: { default: "auto" },
@@ -1461,27 +1472,27 @@ const Kr = /* @__PURE__ */ j({
1461
1472
  templateRows: {}
1462
1473
  },
1463
1474
  setup(e) {
1464
- const t = e, r = C({
1475
+ const t = e, r = E({
1465
1476
  "pdap-grid-container": !0,
1466
1477
  [`pdap-grid-container-column-${t.columns}`]: t.columns !== "auto"
1467
- }), n = t.templateRows || typeof t.rows == "number", a = t.templateRows ?? `repeat(${t.rows}, minmax(0, 1fr))`, s = C({
1478
+ }), n = t.templateRows || typeof t.rows == "number", a = t.templateRows ?? `repeat(${t.rows}, minmax(0, 1fr))`, s = E({
1468
1479
  ...n && {
1469
1480
  gridTemplateRows: a
1470
1481
  },
1471
1482
  ...t.templateColumns && { gridTemplateColumns: t.templateColumns }
1472
1483
  });
1473
- return (u, l) => (v(), S(ge(u.component), {
1474
- class: W(r),
1484
+ return (u, l) => (y(), I(ge(u.component), {
1485
+ class: U(r),
1475
1486
  style: ve(s)
1476
1487
  }, {
1477
1488
  default: R(() => [
1478
- J(u.$slots, "default")
1489
+ Y(u.$slots, "default")
1479
1490
  ]),
1480
1491
  _: 3
1481
1492
  }, 8, ["class", "style"]));
1482
1493
  }
1483
1494
  });
1484
- const dn = /* @__PURE__ */ j({
1495
+ const pn = /* @__PURE__ */ j({
1485
1496
  __name: "GridItem",
1486
1497
  props: {
1487
1498
  component: { default: "div" },
@@ -1489,49 +1500,49 @@ const dn = /* @__PURE__ */ j({
1489
1500
  spanRow: { default: 1 }
1490
1501
  },
1491
1502
  setup(e) {
1492
- const t = e, r = C({
1503
+ const t = e, r = E({
1493
1504
  "pdap-grid-item": !0,
1494
1505
  [`pdap-grid-item-span-column-${t.spanColumn}`]: t.spanColumn > 1
1495
- }), n = C({
1506
+ }), n = E({
1496
1507
  // Only add inline property if it is passed and exceeds the default
1497
1508
  ...t.spanRow > 1 && {
1498
1509
  gridRow: `span ${t.spanRow} / span ${t.spanRow}`
1499
1510
  }
1500
1511
  });
1501
- return (a, s) => (v(), S(ge(a.component), {
1502
- class: W(r),
1512
+ return (a, s) => (y(), I(ge(a.component), {
1513
+ class: U(r),
1503
1514
  style: ve(n)
1504
1515
  }, {
1505
1516
  default: R(() => [
1506
- J(a.$slots, "default")
1517
+ Y(a.$slots, "default")
1507
1518
  ]),
1508
1519
  _: 3
1509
1520
  }, 8, ["class", "style"]));
1510
1521
  }
1511
1522
  });
1512
- const Zr = /* @__PURE__ */ b("svg", {
1523
+ const Qr = /* @__PURE__ */ b("svg", {
1513
1524
  xmlns: "http://www.w3.org/2000/svg",
1514
1525
  viewBox: "0 0 448 512"
1515
1526
  }, [
1516
1527
  /* @__PURE__ */ b("path", { d: "M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z" })
1517
- ], -1), Qr = [
1518
- Zr
1519
- ], Jr = ["aria-expanded"], Yr = ["href"], en = /* @__PURE__ */ j({
1528
+ ], -1), Jr = [
1529
+ Qr
1530
+ ], Yr = ["aria-expanded"], en = ["href"], tn = /* @__PURE__ */ j({
1520
1531
  __name: "PdapNav",
1521
1532
  props: {
1522
1533
  topPosition: {}
1523
1534
  },
1524
1535
  setup(e) {
1525
- let t = re("navLinks");
1536
+ let t = ne("navLinks");
1526
1537
  typeof t > "u" && (t = [], console.error(
1527
1538
  `Hey, PDAP developer
1528
1539
  `,
1529
1540
  "Did you forget to inject some linkData for the Nav component?"
1530
1541
  ));
1531
- const r = C({
1542
+ const r = E({
1532
1543
  isExpanded: !1,
1533
1544
  isMobile: !0
1534
- }), n = C({
1545
+ }), n = E({
1535
1546
  "pdap-nav": !0
1536
1547
  });
1537
1548
  De(() => {
@@ -1540,39 +1551,39 @@ const Zr = /* @__PURE__ */ b("svg", {
1540
1551
  window.removeEventListener("resize", a);
1541
1552
  });
1542
1553
  async function a() {
1543
- window.innerWidth <= 1024 ? r.isMobile = !0 : r.isMobile = !1, await ne();
1554
+ window.innerWidth <= 1024 ? r.isMobile = !0 : r.isMobile = !1, await ae();
1544
1555
  }
1545
1556
  async function s() {
1546
1557
  var l, o;
1547
1558
  const u = document.querySelector("body");
1548
- !r.isExpanded && r.isMobile ? (r.isExpanded = !0, u != null && u.classList.contains("lock-scroll") || (l = document.querySelector("body")) == null || l.classList.add("lock-scroll")) : r.isExpanded && r.isMobile && (r.isExpanded = !1, (o = document.querySelector("body")) == null || o.classList.remove("lock-scroll")), await ne();
1559
+ !r.isExpanded && r.isMobile ? (r.isExpanded = !0, u != null && u.classList.contains("lock-scroll") || (l = document.querySelector("body")) == null || l.classList.add("lock-scroll")) : r.isExpanded && r.isMobile && (r.isExpanded = !1, (o = document.querySelector("body")) == null || o.classList.remove("lock-scroll")), await ae();
1549
1560
  }
1550
- return (u, l) => (v(), x(X, null, [
1561
+ return (u, l) => (y(), x(K, null, [
1551
1562
  b("div", {
1552
1563
  "aria-controls": "nav",
1553
1564
  class: "pdap-nav-open-button",
1554
1565
  role: "button",
1555
1566
  onClick: s
1556
- }, Qr),
1567
+ }, Jr),
1557
1568
  b("nav", {
1558
1569
  id: "nav",
1559
1570
  "aria-expanded": r.isMobile && r.isExpanded || !r.isMobile,
1560
- class: W(n),
1571
+ class: U(n),
1561
1572
  style: ve(r.isMobile ? { top: `${u.topPosition}px` } : {})
1562
1573
  }, [
1563
- (v(!0), x(X, null, he(d(t), (o) => (v(), x("li", {
1574
+ (y(!0), x(K, null, he(d(t), (o) => (y(), x("li", {
1564
1575
  key: o.text,
1565
1576
  class: "pdap-nav-link-container"
1566
1577
  }, [
1567
- o.href ? (v(), x("a", {
1578
+ o.href ? (y(), x("a", {
1568
1579
  key: 0,
1569
1580
  class: "pdap-nav-link",
1570
1581
  href: o.href,
1571
1582
  target: "_blank",
1572
1583
  referrerpolicy: "no-referrer",
1573
1584
  onClick: s
1574
- }, k(o.text), 9, Yr)) : V("", !0),
1575
- o.path ? (v(), S(d(Fe), {
1585
+ }, V(o.text), 9, en)) : z("", !0),
1586
+ o.path ? (y(), I(d(Fe), {
1576
1587
  key: 1,
1577
1588
  "active-class": "pdap-nav-link-current",
1578
1589
  "exact-active-class": "pdap-nav-link-current-exact",
@@ -1581,16 +1592,16 @@ const Zr = /* @__PURE__ */ b("svg", {
1581
1592
  onClick: s
1582
1593
  }, {
1583
1594
  default: R(() => [
1584
- N(k(o.text), 1)
1595
+ B(V(o.text), 1)
1585
1596
  ]),
1586
1597
  _: 2
1587
- }, 1032, ["to"])) : V("", !0)
1598
+ }, 1032, ["to"])) : z("", !0)
1588
1599
  ]))), 128))
1589
- ], 14, Jr)
1600
+ ], 14, Yr)
1590
1601
  ], 64));
1591
1602
  }
1592
1603
  });
1593
- const tn = ["href"], rn = ["src"], nn = ["src"], pn = /* @__PURE__ */ j({
1604
+ const rn = ["href"], nn = ["src"], an = ["src"], mn = /* @__PURE__ */ j({
1594
1605
  __name: "PdapHeader",
1595
1606
  props: {
1596
1607
  logoImageSrc: { default: "node_modules/pdap-design-system/dist/images/lockup.svg" },
@@ -1606,12 +1617,12 @@ const tn = ["href"], rn = ["src"], nn = ["src"], pn = /* @__PURE__ */ j({
1606
1617
  function s() {
1607
1618
  n.value && (r.value = n.value.offsetHeight);
1608
1619
  }
1609
- return (u, l) => (v(), x("header", {
1620
+ return (u, l) => (y(), x("header", {
1610
1621
  ref_key: "el",
1611
1622
  ref: n,
1612
1623
  class: "pdap-header"
1613
1624
  }, [
1614
- d(a) ? (v(), S(d(Fe), {
1625
+ d(a) ? (y(), I(d(Fe), {
1615
1626
  key: 1,
1616
1627
  to: u.logoImageAnchorPath,
1617
1628
  class: "logo"
@@ -1622,10 +1633,10 @@ const tn = ["href"], rn = ["src"], nn = ["src"], pn = /* @__PURE__ */ j({
1622
1633
  loading: "lazy",
1623
1634
  width: "250",
1624
1635
  alt: "Police Data Accessibility Project Logo"
1625
- }, null, 8, nn)
1636
+ }, null, 8, an)
1626
1637
  ]),
1627
1638
  _: 1
1628
- }, 8, ["to"])) : (v(), x("a", {
1639
+ }, 8, ["to"])) : (y(), x("a", {
1629
1640
  key: 0,
1630
1641
  href: u.logoImageAnchorPath,
1631
1642
  class: "logo"
@@ -1635,16 +1646,16 @@ const tn = ["href"], rn = ["src"], nn = ["src"], pn = /* @__PURE__ */ j({
1635
1646
  loading: "lazy",
1636
1647
  width: "250",
1637
1648
  alt: "Police Data Accessibility Project Logo"
1638
- }, null, 8, rn)
1639
- ], 8, tn)),
1640
- H(en, { "top-position": r.value }, null, 8, ["top-position"])
1649
+ }, null, 8, nn)
1650
+ ], 8, rn)),
1651
+ G(tn, { "top-position": r.value }, null, 8, ["top-position"])
1641
1652
  ], 512));
1642
1653
  }
1643
1654
  });
1644
- const an = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1), sn = /* @__PURE__ */ b("p", { class: "pb-4 md:pb-8" }, [
1645
- /* @__PURE__ */ N(" If you have a question to answer, we may already know about helpful data in your area. "),
1655
+ const sn = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1), on = /* @__PURE__ */ b("p", { class: "pb-4 md:pb-8" }, [
1656
+ /* @__PURE__ */ B(" If you have a question to answer, we may already know about helpful data in your area. "),
1646
1657
  /* @__PURE__ */ b("a", { href: "https://pdap.io/data" }, "Learn more about the data here.")
1647
- ], -1), mn = /* @__PURE__ */ j({
1658
+ ], -1), fn = /* @__PURE__ */ j({
1648
1659
  __name: "QuickSearchForm",
1649
1660
  props: {
1650
1661
  baseUrlForRedirect: { default: "https://data-sources.pdap.io" }
@@ -1655,7 +1666,7 @@ const an = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1)
1655
1666
  id: "search-term",
1656
1667
  name: "searchTerm",
1657
1668
  label: "What are you looking for?",
1658
- type: z.TEXT,
1669
+ type: S.TEXT,
1659
1670
  placeholder: "Enter a keyword, or 'all'",
1660
1671
  value: ""
1661
1672
  },
@@ -1663,49 +1674,53 @@ const an = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1)
1663
1674
  id: "location",
1664
1675
  name: "location",
1665
1676
  label: "From where?",
1666
- type: z.TEXT,
1677
+ type: S.TEXT,
1667
1678
  placeholder: "Enter a place, or 'all'",
1668
1679
  value: ""
1669
1680
  }
1670
1681
  ], a = P(void 0);
1671
- function s(u) {
1672
- if (Object.values(u).every((c) => !c)) {
1682
+ function s(l) {
1683
+ a.value && Object.values(l).some(Boolean) && (a.value = void 0);
1684
+ }
1685
+ function u(l) {
1686
+ if (Object.values(l).every((m) => !m)) {
1673
1687
  a.value = "Either a search term or a location is required.";
1674
1688
  return;
1675
1689
  }
1676
- let { location: l, searchTerm: o } = u;
1677
- l = l && l.length > 0 ? l : "all", o = o && o.length > 0 ? o : "all", t.getRoutes().some((c) => c.path.includes("/search/")) ? t.push(`/search/${o}/${l}`) : window.location.assign(
1678
- `${r.baseUrlForRedirect}/search/${o}/${l}`
1690
+ let { location: o, searchTerm: c } = l;
1691
+ o = o && o.length > 0 ? o : "all", c = c && c.length > 0 ? c : "all", t.getRoutes().some((m) => m.path.includes("/search/")) ? t.push(`/search/${c}/${o}`) : window.location.assign(
1692
+ `${r.baseUrlForRedirect}/search/${c}/${o}`
1679
1693
  );
1680
1694
  }
1681
- return (u, l) => (v(), x(X, null, [
1682
- H(me, { class: "p-0" }, {
1695
+ return (l, o) => (y(), x(K, null, [
1696
+ G(me, { class: "p-0" }, {
1683
1697
  default: R(() => [
1684
- an,
1685
- sn
1698
+ sn,
1699
+ on
1686
1700
  ]),
1687
1701
  _: 1
1688
1702
  }),
1689
- H(me, {
1703
+ G(me, {
1690
1704
  alignment: "center",
1691
1705
  class: "pdap-quick-search-form h-full max-h-[75-vh] justify-start p-0"
1692
1706
  }, {
1693
1707
  default: R(() => [
1694
- H(Xr, {
1708
+ G(Kr, {
1695
1709
  id: "quick-search-form",
1696
1710
  class: "flex flex-wrap gap-x-4",
1697
1711
  error: a.value,
1698
1712
  schema: n,
1699
1713
  name: "quickSearchForm",
1700
- onSubmit: s
1714
+ onChange: s,
1715
+ onSubmit: u
1701
1716
  }, {
1702
1717
  default: R(() => [
1703
- H(lt, {
1718
+ G(lt, {
1704
1719
  type: "submit",
1705
1720
  class: "flex-grow-0 flex-shrink-0 basis-full max-w-[unset] mt-4"
1706
1721
  }, {
1707
1722
  default: R(() => [
1708
- N("Search Data Sources")
1723
+ B("Search Data Sources")
1709
1724
  ]),
1710
1725
  _: 1
1711
1726
  })
@@ -1718,21 +1733,21 @@ const an = /* @__PURE__ */ b("h2", { class: "mt-0" }, "Search our database", -1)
1718
1733
  ], 64));
1719
1734
  }
1720
1735
  });
1721
- const on = ["alt", "src"], fn = /* @__PURE__ */ j({
1736
+ const ln = ["alt", "src"], gn = /* @__PURE__ */ j({
1722
1737
  __name: "TileIcon",
1723
1738
  props: {
1724
1739
  imgAltText: {},
1725
1740
  imgSrc: {}
1726
1741
  },
1727
1742
  setup(e) {
1728
- return (t, r) => (v(), x("img", {
1743
+ return (t, r) => (y(), x("img", {
1729
1744
  class: "pdap-tile-icon",
1730
1745
  alt: t.imgAltText,
1731
1746
  src: t.imgSrc
1732
- }, null, 8, on));
1747
+ }, null, 8, ln));
1733
1748
  }
1734
1749
  });
1735
- const gn = {
1750
+ const hn = {
1736
1751
  content: ["./src/**/*.vue", "./src/**/*.css"],
1737
1752
  theme: {
1738
1753
  // Nested within "extend" - extends tailwind theme defaults, only overrides properties named here
@@ -1813,15 +1828,15 @@ const gn = {
1813
1828
  export {
1814
1829
  lt as Button,
1815
1830
  me as FlexContainer,
1816
- cn as Footer,
1817
- Xr as Form,
1818
- Kr as GridContainer,
1819
- dn as GridItem,
1820
- pn as Header,
1831
+ dn as Footer,
1832
+ Kr as Form,
1833
+ Zr as GridContainer,
1834
+ pn as GridItem,
1835
+ mn as Header,
1821
1836
  Mt as Input,
1822
- en as Nav,
1823
- z as PdapInputTypes,
1824
- mn as QuickSearchForm,
1825
- fn as TileIcon,
1826
- gn as tailwindConfig
1837
+ tn as Nav,
1838
+ S as PdapInputTypes,
1839
+ fn as QuickSearchForm,
1840
+ gn as TileIcon,
1841
+ hn as tailwindConfig
1827
1842
  };