@vergelijkdirect/comparison-forms 2.0.0 → 2.0.2-VER-9177.0
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/README.md +46 -6
- package/dist/client/.vite/ssr-manifest.json +600 -0
- package/dist/client/assets/index-6Enzr9rU.css +4 -0
- package/dist/client/assets/index-6Enzr9rU.css.br +0 -0
- package/dist/client/assets/index-DUchBxEo.js +57 -0
- package/dist/client/assets/index-DUchBxEo.js.br +0 -0
- package/dist/client/index.html +15 -0
- package/dist/server/entry-server.js +9981 -0
- package/dist/server/entry-server.js.br +0 -0
- package/dist/vue/comparison-forms.d.ts +17 -3
- package/dist/vue/comparison-forms.js +397 -510
- package/dist/wc/comparison-forms.js +385 -577
- package/dist/wc-forms/bike.cjs +1 -1
- package/dist/wc-forms/{birthdate.schema-C-y732mA.cjs → birthdate.schema-rpmbSDZH.cjs} +1 -1
- package/dist/wc-forms/business-car.cjs +1 -1
- package/dist/wc-forms/business-liability.cjs +1 -1
- package/dist/wc-forms/car.cjs +1 -1
- package/dist/wc-forms/caravan.cjs +1 -1
- package/dist/wc-forms/company.schema-BLoMUJDa.cjs +1 -0
- package/dist/wc-forms/{familyComposition.schema-gvSnx-ea.cjs → familyComposition.schema-DW6scNvt.cjs} +1 -1
- package/dist/wc-forms/house.cjs +1 -1
- package/dist/wc-forms/{houseOwnedBuilding.model-G9AqKTZo.cjs → houseOwnedBuilding.model-BMgRS2fn.cjs} +1 -1
- package/dist/wc-forms/itc-nSCTLC1V.cjs +1 -0
- package/dist/wc-forms/legal.cjs +1 -1
- package/dist/wc-forms/liability.cjs +1 -1
- package/dist/wc-forms/loan.cjs +1 -1
- package/dist/wc-forms/{messages-CX8jVyEo.cjs → messages-stJTqN-x.cjs} +1 -1
- package/dist/wc-forms/moped.cjs +1 -1
- package/dist/wc-forms/motor.cjs +1 -1
- package/dist/wc-forms/package.cjs +1 -1
- package/dist/wc-forms/pet.cjs +1 -1
- package/dist/wc-forms/travel.cjs +1 -1
- package/dist/wc-forms/useAddress-DJ4aWwYs.cjs +1 -0
- package/dist/wc-forms/useLicensePlate-98nreTI8.cjs +1 -0
- package/dist/wc-noitc/comparison-forms.umd.cjs +2 -2
- package/package.json +4 -3
- package/dist/wc-forms/company.schema-Dhzxphqu.cjs +0 -1
- package/dist/wc-forms/services-BmRVYKgg.cjs +0 -1
- package/dist/wc-forms/useAddress-CNccyKT4.cjs +0 -1
- package/dist/wc-forms/useLicensePlate-Ct8T-GYB.cjs +0 -1
|
@@ -290,7 +290,7 @@ var je = Object.defineProperty, B = (e, t) => {
|
|
|
290
290
|
}, et = {
|
|
291
291
|
key: 1,
|
|
292
292
|
class: "vd-field__message vd-field__message--information"
|
|
293
|
-
},
|
|
293
|
+
}, tt = /* @__PURE__ */ l({
|
|
294
294
|
__name: "VdSelect",
|
|
295
295
|
props: /*@__PURE__*/ p({
|
|
296
296
|
id: { default: null },
|
|
@@ -371,29 +371,29 @@ var je = Object.defineProperty, B = (e, t) => {
|
|
|
371
371
|
});
|
|
372
372
|
//#endregion
|
|
373
373
|
//#region node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.mjs
|
|
374
|
-
function
|
|
374
|
+
function nt(e, t) {
|
|
375
375
|
return e === t || Number.isNaN(e) && Number.isNaN(t);
|
|
376
376
|
}
|
|
377
377
|
//#endregion
|
|
378
378
|
//#region node_modules/es-toolkit/dist/compat/util/toString.mjs
|
|
379
|
-
function
|
|
379
|
+
function rt(e) {
|
|
380
380
|
if (e == null) return "";
|
|
381
381
|
if (typeof e == "string") return e;
|
|
382
|
-
if (Array.isArray(e)) return e.map(
|
|
382
|
+
if (Array.isArray(e)) return e.map(rt).join(",");
|
|
383
383
|
let t = String(e);
|
|
384
384
|
return t === "0" && Object.is(Number(e), -0) ? "-0" : t;
|
|
385
385
|
}
|
|
386
386
|
//#endregion
|
|
387
387
|
//#region node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
|
|
388
|
-
function
|
|
388
|
+
function it(e) {
|
|
389
389
|
return typeof e == "string" || typeof e == "symbol" ? e : Object.is(e?.valueOf?.(), -0) ? "-0" : String(e);
|
|
390
390
|
}
|
|
391
391
|
//#endregion
|
|
392
392
|
//#region node_modules/es-toolkit/dist/compat/util/toPath.mjs
|
|
393
|
-
function
|
|
394
|
-
if (Array.isArray(e)) return e.map(
|
|
393
|
+
function at(e) {
|
|
394
|
+
if (Array.isArray(e)) return e.map(it);
|
|
395
395
|
if (typeof e == "symbol") return [e];
|
|
396
|
-
e =
|
|
396
|
+
e = rt(e);
|
|
397
397
|
let t = [], n = e.length;
|
|
398
398
|
if (n === 0) return t;
|
|
399
399
|
let r = 0, i = "", a = "", o = !1;
|
|
@@ -413,12 +413,12 @@ function it(e) {
|
|
|
413
413
|
}
|
|
414
414
|
//#endregion
|
|
415
415
|
//#region node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
|
|
416
|
-
function
|
|
416
|
+
function ot(e) {
|
|
417
417
|
return e === "__proto__";
|
|
418
418
|
}
|
|
419
419
|
//#endregion
|
|
420
420
|
//#region node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
|
|
421
|
-
function
|
|
421
|
+
function st(e) {
|
|
422
422
|
switch (typeof e) {
|
|
423
423
|
case "number":
|
|
424
424
|
case "symbol": return !1;
|
|
@@ -427,23 +427,23 @@ function ot(e) {
|
|
|
427
427
|
}
|
|
428
428
|
//#endregion
|
|
429
429
|
//#region node_modules/es-toolkit/dist/compat/object/get.mjs
|
|
430
|
-
function
|
|
430
|
+
function W(e, t, n) {
|
|
431
431
|
if (e == null) return n;
|
|
432
432
|
switch (typeof t) {
|
|
433
433
|
case "string": {
|
|
434
|
-
if (
|
|
434
|
+
if (ot(t)) return n;
|
|
435
435
|
let r = e[t];
|
|
436
|
-
return r === void 0 ?
|
|
436
|
+
return r === void 0 ? st(t) && !Object.hasOwn(e, t) ? W(e, at(t), n) : n : r;
|
|
437
437
|
}
|
|
438
438
|
case "number":
|
|
439
439
|
case "symbol": {
|
|
440
|
-
typeof t == "number" && (t =
|
|
440
|
+
typeof t == "number" && (t = it(t));
|
|
441
441
|
let r = e[t];
|
|
442
442
|
return r === void 0 ? n : r;
|
|
443
443
|
}
|
|
444
444
|
default: {
|
|
445
445
|
if (Array.isArray(t)) return ct(e, t, n);
|
|
446
|
-
if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t),
|
|
446
|
+
if (t = Object.is(t?.valueOf(), -0) ? "-0" : String(t), ot(t)) return n;
|
|
447
447
|
let r = e[t];
|
|
448
448
|
return r === void 0 ? n : r;
|
|
449
449
|
}
|
|
@@ -453,7 +453,7 @@ function ct(e, t, n) {
|
|
|
453
453
|
if (t.length === 0) return n;
|
|
454
454
|
let r = e;
|
|
455
455
|
for (let e = 0; e < t.length; e++) {
|
|
456
|
-
if (r == null ||
|
|
456
|
+
if (r == null || ot(t[e])) return n;
|
|
457
457
|
r = r[t[e]];
|
|
458
458
|
}
|
|
459
459
|
return r === void 0 ? n : r;
|
|
@@ -488,18 +488,18 @@ function ht(e, t) {
|
|
|
488
488
|
//#region node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
|
|
489
489
|
var gt = (e, t, n) => {
|
|
490
490
|
let r = e[t];
|
|
491
|
-
(!(Object.hasOwn(e, t) &&
|
|
491
|
+
(!(Object.hasOwn(e, t) && nt(r, n)) || n === void 0 && !(t in e)) && (e[t] = n);
|
|
492
492
|
};
|
|
493
493
|
//#endregion
|
|
494
494
|
//#region node_modules/es-toolkit/dist/compat/object/updateWith.mjs
|
|
495
495
|
function _t(e, t, n, r) {
|
|
496
496
|
if (e == null && !lt(e)) return e;
|
|
497
497
|
let i;
|
|
498
|
-
i = ht(t, e) ? [t] : Array.isArray(t) ? t :
|
|
499
|
-
let a = n(
|
|
498
|
+
i = ht(t, e) ? [t] : Array.isArray(t) ? t : at(t);
|
|
499
|
+
let a = n(W(e, i)), o = e;
|
|
500
500
|
for (let t = 0; t < i.length && o != null; t++) {
|
|
501
|
-
let n =
|
|
502
|
-
if (
|
|
501
|
+
let n = it(i[t]);
|
|
502
|
+
if (ot(n)) continue;
|
|
503
503
|
let s;
|
|
504
504
|
if (t === i.length - 1) s = a;
|
|
505
505
|
else {
|
|
@@ -588,7 +588,7 @@ var yt = {
|
|
|
588
588
|
"update:searchTerm"
|
|
589
589
|
]),
|
|
590
590
|
setup(o, { emit: l }) {
|
|
591
|
-
let u = o, d = de(me(u, "name", "disabled", "by", "ignoreFilter")), f = k(o, "modelValue"), p = k(o, "open"), h = k(o, "searchTerm"), _ = l, v = A(), b = u.id ?? O(), x = t(() => !!u.icon || !!v.icon), w = (e) => typeof e == "object" && !!e, D = (e) => w(e) ?
|
|
591
|
+
let u = o, d = de(me(u, "name", "disabled", "by", "ignoreFilter")), f = k(o, "modelValue"), p = k(o, "open"), h = k(o, "searchTerm"), _ = l, v = A(), b = u.id ?? O(), x = t(() => !!u.icon || !!v.icon), w = (e) => typeof e == "object" && !!e, D = (e) => w(e) ? W(e, u.labelKey) ?? e.title ?? "" : String(e), j = (e) => w(e) ? u.valueKey === null ? e : W(e, u.valueKey) : e, M = (e) => w(e) ? e.disabled : void 0, N = (e, t) => e === void 0 || t === void 0 ? !1 : !w(e) || !w(t) ? e === t : typeof u.by == "function" ? u.by(e, t) : typeof u.by == "string" ? W(e, u.by) === W(t, u.by) : pe(e, t), F = (e) => e == null || e === "", I = t(() => !F(f.value)), L = t(() => u.errorMessage ? "error" : I.value && u.verified && !u.loading ? "verified" : "default"), fe = (e) => {
|
|
592
592
|
if (F(e)) return "";
|
|
593
593
|
if (u.displayValue) return u.displayValue(e);
|
|
594
594
|
let t = u.options.find((t) => N(j(t), e));
|
|
@@ -1293,7 +1293,7 @@ var en = /*#__PURE__*/ Xt(Zt, [["render", $t]]), J = /* @__PURE__ */ l({
|
|
|
1293
1293
|
title: "Gezin met kinderen"
|
|
1294
1294
|
}
|
|
1295
1295
|
], r = A(), i = k(e, "modelValue");
|
|
1296
|
-
return (a, s) => (y(), n(
|
|
1296
|
+
return (a, s) => (y(), n(tt, m({
|
|
1297
1297
|
modelValue: i.value,
|
|
1298
1298
|
"onUpdate:modelValue": s[0] ||= (e) => i.value = e,
|
|
1299
1299
|
label: e.label,
|
|
@@ -1337,14 +1337,14 @@ var en = /*#__PURE__*/ Xt(Zt, [["render", $t]]), J = /* @__PURE__ */ l({
|
|
|
1337
1337
|
isValid: !N(e),
|
|
1338
1338
|
isValidating: u.value[e]?.isValidating ?? !1
|
|
1339
1339
|
})), g = (e, t) => {
|
|
1340
|
-
let n = t && "value" in t ? t.value :
|
|
1340
|
+
let n = t && "value" in t ? t.value : W(a, e), r = { isValidating: t?.isValidating ?? !1 }, i = t?.error ?? "";
|
|
1341
1341
|
y(e, fe(n)), _(e, r), i ? M({ [e]: i }) : P(e);
|
|
1342
1342
|
}, _ = (e, t) => {
|
|
1343
1343
|
u.value[e] = {
|
|
1344
1344
|
...u.value[e],
|
|
1345
1345
|
...t
|
|
1346
1346
|
};
|
|
1347
|
-
}, v = (e) =>
|
|
1347
|
+
}, v = (e) => W(o.value, e), y = (e, t) => {
|
|
1348
1348
|
vt(o.value, e, t);
|
|
1349
1349
|
}, S = (e, t) => {
|
|
1350
1350
|
t === "blur" && j(e);
|
|
@@ -1556,7 +1556,7 @@ var en = /*#__PURE__*/ Xt(Zt, [["render", $t]]), J = /* @__PURE__ */ l({
|
|
|
1556
1556
|
"error-message",
|
|
1557
1557
|
"verified",
|
|
1558
1558
|
"loading"
|
|
1559
|
-
]), c(
|
|
1559
|
+
]), c(tt, {
|
|
1560
1560
|
modelValue: E(C),
|
|
1561
1561
|
"onUpdate:modelValue": n[2] ||= (e) => d(C) ? C.value = e : null,
|
|
1562
1562
|
name: "houseNumberAddition",
|
|
@@ -1581,108 +1581,62 @@ var en = /*#__PURE__*/ Xt(Zt, [["render", $t]]), J = /* @__PURE__ */ l({
|
|
|
1581
1581
|
_: 1
|
|
1582
1582
|
}), I.value ? (y(), i("div", vn, [n[3] ||= a("i", { class: "fas fa-exclamation-circle vd-field__message-icon" }, null, -1), s(" " + T(I.value), 1)])) : o.value ? (y(), i("div", yn, [n[4] ||= a("i", { class: "fas fa-info-circle vd-field__message-icon" }, null, -1), s(" " + T(o.value.street) + ", " + T(o.value.city), 1)])) : r("", !0)]));
|
|
1583
1583
|
}
|
|
1584
|
-
}), xn = {
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
qaId: "65dca9821f2b9e9db1060307",
|
|
1591
|
-
currentItemId: "6622695672245691fb02ce02",
|
|
1592
|
-
nextItemId: "65e342a01f2b9e9db1060335"
|
|
1593
|
-
}
|
|
1594
|
-
}, Sn = class e {
|
|
1595
|
-
values;
|
|
1596
|
-
cached;
|
|
1597
|
-
static instance = new e();
|
|
1598
|
-
constructor(e = {}, t = {}) {
|
|
1599
|
-
this.values = e, this.cached = t;
|
|
1600
|
-
}
|
|
1601
|
-
constant(e, t) {
|
|
1602
|
-
this.values[e] = () => t;
|
|
1603
|
-
}
|
|
1604
|
-
get(e) {
|
|
1605
|
-
return e in this.cached ? this.cached[e] : e in this.values ? this.cached[e] = this.values[e](this) : (`${e}`, !1);
|
|
1606
|
-
}
|
|
1607
|
-
}, Cn = class {
|
|
1608
|
-
static configure(e) {
|
|
1609
|
-
let t = Sn.instance;
|
|
1610
|
-
e.api && e.api.url && t.constant("vd-api-url", e.api.url), e.mijn && e.mijn.url && t.constant("mijn-api-url", e.mijn.url), e.qa && e.qa.url && t.constant("qa-api-url", e.qa.url);
|
|
1611
|
-
}
|
|
1612
|
-
static getApiUrl() {
|
|
1613
|
-
return Sn.instance.get("vd-api-url") || xn.api.url;
|
|
1614
|
-
}
|
|
1615
|
-
static getMijnUrl() {
|
|
1616
|
-
return Sn.instance.get("mijn-api-url") || xn.mijn.url;
|
|
1617
|
-
}
|
|
1618
|
-
static getQAUrl() {
|
|
1619
|
-
return Sn.instance.get("qa-api-url") || xn.qa.url;
|
|
1620
|
-
}
|
|
1621
|
-
}, wn = () => Cn.getQAUrl(), Tn;
|
|
1622
|
-
function En() {
|
|
1623
|
-
return {
|
|
1624
|
-
dataService: new Te(),
|
|
1625
|
-
dataValidationService: new Ee(),
|
|
1626
|
-
homeService: new De(),
|
|
1627
|
-
comparisonService: new we()
|
|
1628
|
-
};
|
|
1629
|
-
}
|
|
1630
|
-
function Dn() {
|
|
1631
|
-
return Tn ||= En(), Tn;
|
|
1632
|
-
}
|
|
1633
|
-
//#endregion
|
|
1634
|
-
//#region src/components/fields/address/address.presenter.ts
|
|
1635
|
-
var On = (e) => ({
|
|
1584
|
+
}), xn, Sn = () => ({
|
|
1585
|
+
dataService: new Te(),
|
|
1586
|
+
dataValidationService: new Ee(),
|
|
1587
|
+
homeService: new De(),
|
|
1588
|
+
comparisonService: new we()
|
|
1589
|
+
}), Cn = () => (xn ||= Sn(), xn), wn = (e) => ({
|
|
1636
1590
|
zipCode: e.ZipCode,
|
|
1637
1591
|
houseNumber: String(e.HouseNumber),
|
|
1638
1592
|
houseNumberAddition: e.HouseNumberAddition,
|
|
1639
1593
|
city: e.Place,
|
|
1640
1594
|
street: e.Street
|
|
1641
|
-
}),
|
|
1595
|
+
}), Tn = /^\d{4}\s?[a-zA-Z]{2}$/, En = /^\d+$/, Dn = {
|
|
1642
1596
|
"needs-addition": "Een toevoeging is verplicht",
|
|
1643
1597
|
"not-found": "Postcode en huisnummer combinatie onbekend.",
|
|
1644
1598
|
error: "Adres ophalen is mislukt. Probeer het opnieuw."
|
|
1645
1599
|
};
|
|
1646
|
-
function
|
|
1600
|
+
function On(e) {
|
|
1647
1601
|
return e.replace(/\s/g, "").toUpperCase();
|
|
1648
1602
|
}
|
|
1649
|
-
var
|
|
1650
|
-
function
|
|
1651
|
-
return e ===
|
|
1603
|
+
var kn = "NO_ADDITION";
|
|
1604
|
+
function An(e) {
|
|
1605
|
+
return e === kn ? "" : e.replace("-", "");
|
|
1652
1606
|
}
|
|
1653
|
-
var
|
|
1654
|
-
if (
|
|
1607
|
+
var jn = (e) => e instanceof Error, Mn = (e) => {
|
|
1608
|
+
if (jn(e)) throw e;
|
|
1655
1609
|
return null;
|
|
1656
|
-
},
|
|
1610
|
+
}, Nn = (e, t, n) => Cn().dataValidationService.validateZipCode(e, t, n).then((e) => e).catch(Mn), Pn = (e, t) => Cn().homeService.getAddition({
|
|
1657
1611
|
zipcode: e,
|
|
1658
1612
|
houseNumber: t
|
|
1659
|
-
}).then((e) => e ?? []).catch(
|
|
1660
|
-
let [n, r] = await Promise.all([
|
|
1613
|
+
}).then((e) => e ?? []).catch(Mn), Fn = async (e, t) => {
|
|
1614
|
+
let [n, r] = await Promise.all([Nn(e, t), Pn(e, t)]);
|
|
1661
1615
|
return !n && !r?.length ? null : {
|
|
1662
1616
|
validWithoutAddition: !!n,
|
|
1663
1617
|
template: n,
|
|
1664
1618
|
additions: r ?? []
|
|
1665
1619
|
};
|
|
1666
|
-
},
|
|
1620
|
+
}, In = (e) => {
|
|
1667
1621
|
let t = e.additions.map((e) => ({
|
|
1668
1622
|
title: e,
|
|
1669
|
-
value:
|
|
1623
|
+
value: An(e)
|
|
1670
1624
|
}));
|
|
1671
1625
|
return e.validWithoutAddition && t.length ? [{
|
|
1672
1626
|
title: "Geen toevoeging",
|
|
1673
|
-
value:
|
|
1627
|
+
value: kn
|
|
1674
1628
|
}, ...t] : t;
|
|
1675
|
-
},
|
|
1629
|
+
}, Ln = (e) => ({
|
|
1676
1630
|
zipCode: e?.zipCode ?? "",
|
|
1677
1631
|
houseNumber: e?.houseNumber ?? "",
|
|
1678
|
-
houseNumberAddition: e ? e.houseNumberAddition ||
|
|
1679
|
-
}),
|
|
1680
|
-
let t = e?.path ?? "address", n =
|
|
1681
|
-
let t =
|
|
1632
|
+
houseNumberAddition: e ? e.houseNumberAddition || kn : ""
|
|
1633
|
+
}), Rn = (e) => {
|
|
1634
|
+
let t = e?.path ?? "address", n = Ln(e?.initial), r = x(null), i = x([]), a = 0, o = null, s = async (e) => {
|
|
1635
|
+
let t = On(e.zipCode), n = e.houseNumber.trim(), r = An(e.houseNumberAddition), i = `${t}:${n}`;
|
|
1682
1636
|
try {
|
|
1683
1637
|
let a = o?.key === i ? o : null;
|
|
1684
1638
|
if (!a) {
|
|
1685
|
-
let e = await
|
|
1639
|
+
let e = await Fn(t, n);
|
|
1686
1640
|
if (!e) return {
|
|
1687
1641
|
status: "not-found",
|
|
1688
1642
|
options: [],
|
|
@@ -1693,14 +1647,14 @@ var Fn = (e) => e instanceof Error, In = (e) => {
|
|
|
1693
1647
|
verdict: e
|
|
1694
1648
|
};
|
|
1695
1649
|
}
|
|
1696
|
-
let s =
|
|
1650
|
+
let s = In(a.verdict);
|
|
1697
1651
|
if (a.verdict.additions.length && !e.houseNumberAddition) return {
|
|
1698
1652
|
status: "needs-addition",
|
|
1699
1653
|
options: s,
|
|
1700
1654
|
address: null
|
|
1701
1655
|
};
|
|
1702
1656
|
if (!a.verdict.template) {
|
|
1703
|
-
let e = await
|
|
1657
|
+
let e = await Nn(t, n, r);
|
|
1704
1658
|
if (!e) return {
|
|
1705
1659
|
status: "not-found",
|
|
1706
1660
|
options: [],
|
|
@@ -1725,7 +1679,7 @@ var Fn = (e) => e instanceof Error, In = (e) => {
|
|
|
1725
1679
|
}
|
|
1726
1680
|
}, c = async (e) => {
|
|
1727
1681
|
let t = ++a, n = await s(e), o = t !== a;
|
|
1728
|
-
return o || (i.value = n.options, r.value = n.address ?
|
|
1682
|
+
return o || (i.value = n.options, r.value = n.address ? wn(n.address) : null), {
|
|
1729
1683
|
...n,
|
|
1730
1684
|
stale: o
|
|
1731
1685
|
};
|
|
@@ -1733,23 +1687,23 @@ var Fn = (e) => e instanceof Error, In = (e) => {
|
|
|
1733
1687
|
return {
|
|
1734
1688
|
path: t,
|
|
1735
1689
|
addressSchema: R({
|
|
1736
|
-
zipCode: z().required("Vul je postcode in").matches(
|
|
1737
|
-
houseNumber: z().required("Huisnummer is verplicht").matches(
|
|
1690
|
+
zipCode: z().required("Vul je postcode in").matches(Tn, "Postcode is incorrect"),
|
|
1691
|
+
houseNumber: z().required("Huisnummer is verplicht").matches(En, "Huisnummer is incorrect"),
|
|
1738
1692
|
houseNumberAddition: z().defined()
|
|
1739
1693
|
}).test("address-lookup", async (e, t) => {
|
|
1740
|
-
let n =
|
|
1741
|
-
if (!
|
|
1694
|
+
let n = On(e.zipCode ?? ""), r = String(e.houseNumber ?? "").trim();
|
|
1695
|
+
if (!Tn.test(n) || !En.test(r)) return !0;
|
|
1742
1696
|
let { status: i, stale: a } = await c(e);
|
|
1743
1697
|
return a || i === "resolved" ? !0 : i === "needs-addition" ? t.createError({
|
|
1744
1698
|
path: `${t.path}.houseNumberAddition`,
|
|
1745
|
-
message:
|
|
1746
|
-
}) : t.createError({ message:
|
|
1699
|
+
message: Dn[i]
|
|
1700
|
+
}) : t.createError({ message: Dn[i] });
|
|
1747
1701
|
}),
|
|
1748
1702
|
draft: n,
|
|
1749
1703
|
resolvedAddress: r,
|
|
1750
1704
|
additionOptions: i
|
|
1751
1705
|
};
|
|
1752
|
-
},
|
|
1706
|
+
}, zn = {
|
|
1753
1707
|
[V.Car]: {
|
|
1754
1708
|
apiTypes: ["Car", "Van"],
|
|
1755
1709
|
dutch: "auto",
|
|
@@ -1770,14 +1724,14 @@ var Fn = (e) => e instanceof Error, In = (e) => {
|
|
|
1770
1724
|
dutch: "caravan",
|
|
1771
1725
|
icon: "fa-caravan-alt"
|
|
1772
1726
|
}
|
|
1773
|
-
},
|
|
1727
|
+
}, Bn = Object.fromEntries(Object.values(zn).flatMap(({ apiTypes: e, icon: t }) => e.map((e) => [e.toLowerCase(), t]))), Vn = {
|
|
1774
1728
|
brommobiel: "fa-car-side",
|
|
1775
1729
|
"speed pedelec": "fa-bicycle"
|
|
1776
|
-
},
|
|
1730
|
+
}, Hn = (e) => !!e?.Brand && !!e.Model && !!e.ManufacturingYear, Un = (e) => {
|
|
1777
1731
|
if (!e) return "";
|
|
1778
1732
|
let t = String(e.Model ?? "").toLowerCase().trim(), n = String(e.VehicleType ?? "").toLowerCase();
|
|
1779
|
-
return
|
|
1780
|
-
},
|
|
1733
|
+
return Vn[t] ?? Bn[n] ?? "";
|
|
1734
|
+
}, Wn = (e) => e ? `${e.Brand} ${e.Model} (${e.ManufacturingYear})` : "", Gn = [
|
|
1781
1735
|
"@@-##-@@",
|
|
1782
1736
|
"##-##-@@",
|
|
1783
1737
|
"##-@@-@@",
|
|
@@ -1795,22 +1749,22 @@ var Fn = (e) => e instanceof Error, In = (e) => {
|
|
|
1795
1749
|
];
|
|
1796
1750
|
//#endregion
|
|
1797
1751
|
//#region src/components/fields/licensePlate/licensePlate.util.ts
|
|
1798
|
-
function
|
|
1752
|
+
function Kn(e) {
|
|
1799
1753
|
return e.replace(/[\s\\-]/g, "");
|
|
1800
1754
|
}
|
|
1801
|
-
var
|
|
1802
|
-
function
|
|
1803
|
-
let t =
|
|
1804
|
-
if (t.length < 6) return
|
|
1805
|
-
let n = [...t].map((e) => /[0-9]/.test(e) ? "#" : "@").join(""), r =
|
|
1806
|
-
return r === -1 ?
|
|
1755
|
+
var qn = "*".repeat(6), Jn = Gn.map((e) => e.replace(/-/g, ""));
|
|
1756
|
+
function Yn(e) {
|
|
1757
|
+
let t = Kn(e).slice(0, 6);
|
|
1758
|
+
if (t.length < 6) return qn;
|
|
1759
|
+
let n = [...t].map((e) => /[0-9]/.test(e) ? "#" : "@").join(""), r = Jn.indexOf(n);
|
|
1760
|
+
return r === -1 ? qn : Gn[r];
|
|
1807
1761
|
}
|
|
1808
1762
|
//#endregion
|
|
1809
1763
|
//#region src/components/fields/licensePlate/VdLicensePlate.vue?vue&type=script&setup=true&lang.ts
|
|
1810
|
-
var
|
|
1764
|
+
var Xn = {
|
|
1811
1765
|
key: 0,
|
|
1812
1766
|
class: "vd-input-license-plate__loading-information"
|
|
1813
|
-
},
|
|
1767
|
+
}, Zn = ["src"], Qn = /* @__PURE__ */ l({
|
|
1814
1768
|
inheritAttrs: !1,
|
|
1815
1769
|
__name: "VdLicensePlate",
|
|
1816
1770
|
props: /*@__PURE__*/ p({
|
|
@@ -1833,16 +1787,16 @@ var er = {
|
|
|
1833
1787
|
}),
|
|
1834
1788
|
emits: /*@__PURE__*/ p(["input"], ["update:modelValue", "update:vehicleData"]),
|
|
1835
1789
|
setup(c, { emit: l }) {
|
|
1836
|
-
let u = { mask:
|
|
1790
|
+
let u = { mask: Yn }, d = c, f = k(c, "modelValue"), p = k(c, "vehicleData"), h = l, g = D(), _ = A(), v = t({
|
|
1837
1791
|
get: () => f.value ?? "",
|
|
1838
1792
|
set: (e) => {
|
|
1839
1793
|
f.value = e, h("input", e);
|
|
1840
1794
|
}
|
|
1841
|
-
}), b = (e, t) =>
|
|
1795
|
+
}), b = (e, t) => Kn(e).toUpperCase() === Kn(t).toUpperCase();
|
|
1842
1796
|
N(f, (e) => {
|
|
1843
1797
|
p.value && !b(e, p.value.LicensePlate) && (p.value = null);
|
|
1844
1798
|
});
|
|
1845
|
-
let x = t(() =>
|
|
1799
|
+
let x = t(() => Hn(p.value) ? p.value : null), S = t(() => d.loading || !!x.value && !d.errorMessage), w = t(() => Un(x.value)), O = t(() => Wn(x.value));
|
|
1846
1800
|
return (t, l) => (y(), n(We, m(E(g), {
|
|
1847
1801
|
modelValue: v.value,
|
|
1848
1802
|
"onUpdate:modelValue": l[0] ||= (e) => v.value = e,
|
|
@@ -1868,12 +1822,12 @@ var er = {
|
|
|
1868
1822
|
} : void 0,
|
|
1869
1823
|
S.value ? {
|
|
1870
1824
|
name: "information",
|
|
1871
|
-
fn: P(() => [c.loading ? (y(), i("div",
|
|
1825
|
+
fn: P(() => [c.loading ? (y(), i("div", Xn, [...l[1] ||= [a("i", { class: "fas fa-circle-notch vd-input-license-plate__loading-icon" }, null, -1), s(" Voertuig gegevens ophalen... ", -1)]])) : x.value ? (y(), i(e, { key: 1 }, [w.value ? (y(), i("img", {
|
|
1872
1826
|
key: 0,
|
|
1873
1827
|
src: `https://d12bmfj3oyxu0t.cloudfront.net/vergelijkdirect/icons/${w.value}.svg`,
|
|
1874
1828
|
class: "vd-field__svg-message-icon",
|
|
1875
1829
|
alt: "vehicle-icon"
|
|
1876
|
-
}, null, 8,
|
|
1830
|
+
}, null, 8, Zn)) : r("", !0), s(" " + T(O.value), 1)], 64)) : r("", !0)]),
|
|
1877
1831
|
key: "2"
|
|
1878
1832
|
} : void 0
|
|
1879
1833
|
]), 1040, [
|
|
@@ -1885,56 +1839,56 @@ var er = {
|
|
|
1885
1839
|
"loading"
|
|
1886
1840
|
]));
|
|
1887
1841
|
}
|
|
1888
|
-
}),
|
|
1889
|
-
"wrong-type": (e) => `Het ingevoerde kenteken is geen ${
|
|
1842
|
+
}), $n = /* @__PURE__ */ new Map(), er = (e, t) => `${t}:${e}`, tr = {
|
|
1843
|
+
"wrong-type": (e) => `Het ingevoerde kenteken is geen ${zn[e].dutch}`,
|
|
1890
1844
|
unknown: () => "Voertuig onbekend - Voer ander kenteken in of neem contact op",
|
|
1891
1845
|
"not-found": () => "Kenteken onbekend",
|
|
1892
1846
|
error: () => "Kenteken is incorrect"
|
|
1893
|
-
},
|
|
1847
|
+
}, nr = async (e, t) => {
|
|
1894
1848
|
try {
|
|
1895
|
-
let n = await
|
|
1849
|
+
let n = await Cn().dataService.findVehicle(e, t);
|
|
1896
1850
|
if (Array.isArray(n) || !n || !Object.keys(n).length) return { status: "not-found" };
|
|
1897
1851
|
let r = n;
|
|
1898
|
-
return r.VehicleType ?
|
|
1852
|
+
return r.VehicleType ? zn[t].apiTypes.includes(r.VehicleType) ? {
|
|
1899
1853
|
status: "found",
|
|
1900
1854
|
data: r
|
|
1901
1855
|
} : { status: "wrong-type" } : { status: "unknown" };
|
|
1902
1856
|
} catch (e) {
|
|
1903
1857
|
return console.error("Error on ITC findVehicle", e), { status: "error" };
|
|
1904
1858
|
}
|
|
1905
|
-
},
|
|
1906
|
-
let n =
|
|
1907
|
-
return r || (r =
|
|
1908
|
-
e === "error" &&
|
|
1909
|
-
}, () =>
|
|
1910
|
-
},
|
|
1859
|
+
}, rr = (e, t) => {
|
|
1860
|
+
let n = er(e, t), r = $n.get(n);
|
|
1861
|
+
return r || (r = nr(e, t), $n.set(n, r), r.then(({ status: e }) => {
|
|
1862
|
+
e === "error" && $n.delete(n);
|
|
1863
|
+
}, () => $n.delete(n))), r;
|
|
1864
|
+
}, ir = (e, t = {}) => {
|
|
1911
1865
|
let n = x(t.initialData ?? null), r = 0;
|
|
1912
|
-
t.initialData?.LicensePlate &&
|
|
1866
|
+
t.initialData?.LicensePlate && $n.set(er(Kn(t.initialData.LicensePlate), e), Promise.resolve({
|
|
1913
1867
|
status: "found",
|
|
1914
1868
|
data: t.initialData
|
|
1915
1869
|
}));
|
|
1916
1870
|
let i = async (t) => {
|
|
1917
|
-
let i =
|
|
1871
|
+
let i = Kn(t), a = ++r, o = await rr(i, e);
|
|
1918
1872
|
return a === r && (n.value = o.status === "found" ? o.data : null), o;
|
|
1919
1873
|
};
|
|
1920
1874
|
return {
|
|
1921
1875
|
vehicleData: n,
|
|
1922
1876
|
licensePlateSchema: z().required("Dit veld is verplicht").test("license-plate-lookup", async (t, n) => {
|
|
1923
1877
|
if (!t) return !0;
|
|
1924
|
-
let r =
|
|
1878
|
+
let r = Kn(t);
|
|
1925
1879
|
if (r.length < 6) return n.createError({ message: "Kenteken is incorrect" });
|
|
1926
1880
|
let { status: a } = await i(r);
|
|
1927
|
-
return a === "found" || n.createError({ message:
|
|
1881
|
+
return a === "found" || n.createError({ message: tr[a](e) });
|
|
1928
1882
|
})
|
|
1929
1883
|
};
|
|
1930
|
-
},
|
|
1884
|
+
}, ar = (e) => /^\d{8}$/.test(e), or = (e) => ar(e) ? {
|
|
1931
1885
|
companyName: "",
|
|
1932
1886
|
kvkNumber: e
|
|
1933
1887
|
} : {
|
|
1934
1888
|
companyName: e,
|
|
1935
1889
|
kvkNumber: ""
|
|
1936
|
-
},
|
|
1937
|
-
let t =
|
|
1890
|
+
}, sr = "bezoekadres", cr = (e) => e._embedded?.hoofdvestiging?.adressen?.find((e) => e.type === sr), lr = (e) => {
|
|
1891
|
+
let t = cr(e), { huisnummer: n = 0, huisletter: r = "", huisnummerToevoeging: i = "", toevoegingAdres: a = "", plaats: o = "", postcode: s = "", straatnaam: c = "", volledigAdres: l = "" } = t ?? {};
|
|
1938
1892
|
return {
|
|
1939
1893
|
houseNumber: n,
|
|
1940
1894
|
houseNumberAddition: r || i || a,
|
|
@@ -1944,7 +1898,7 @@ var er = {
|
|
|
1944
1898
|
fullAddress: l,
|
|
1945
1899
|
hasVisitingAddress: !!t
|
|
1946
1900
|
};
|
|
1947
|
-
},
|
|
1901
|
+
}, ur = (e = []) => {
|
|
1948
1902
|
let [t, n, r] = e.reduce(([e, t, n], r) => {
|
|
1949
1903
|
let i = {
|
|
1950
1904
|
isMainActivity: r.indHoofdactiviteit,
|
|
@@ -1967,20 +1921,20 @@ var er = {
|
|
|
1967
1921
|
firstSBIs: t,
|
|
1968
1922
|
secondSBIs: n
|
|
1969
1923
|
};
|
|
1970
|
-
},
|
|
1924
|
+
}, dr = (e) => ({
|
|
1971
1925
|
kvkNumber: e.kvkNummer,
|
|
1972
1926
|
name: e.naam,
|
|
1973
1927
|
city: e.adres?.binnenlandsAdres?.plaats ?? "",
|
|
1974
1928
|
street: e.adres?.binnenlandsAdres?.straatnaam ?? ""
|
|
1975
|
-
}),
|
|
1929
|
+
}), fr = (e) => ({
|
|
1976
1930
|
name: e.naam,
|
|
1977
1931
|
kvkNumber: e.kvkNummer,
|
|
1978
1932
|
industry: e.sbiIndustryId,
|
|
1979
1933
|
numberOfEmployees: e.totaalWerkzamePersonen,
|
|
1980
1934
|
legalForm: e._embedded?.eigenaar?.rechtsvorm ?? "",
|
|
1981
|
-
...
|
|
1982
|
-
...
|
|
1983
|
-
}),
|
|
1935
|
+
...lr(e),
|
|
1936
|
+
...ur(e.sbiActiviteiten)
|
|
1937
|
+
}), pr = 30, mr = ["hoofdvestiging", "nevenvestiging"], hr = "IPD5200", gr = (e) => {
|
|
1984
1938
|
let t = e, n = t?.response?.data?.fout;
|
|
1985
1939
|
if (Array.isArray(n)) return n;
|
|
1986
1940
|
if (Array.isArray(t?.fout)) return t.fout;
|
|
@@ -1988,24 +1942,24 @@ var er = {
|
|
|
1988
1942
|
let e = JSON.parse(t.message);
|
|
1989
1943
|
if (Array.isArray(e?.fout)) return e.fout;
|
|
1990
1944
|
} catch {}
|
|
1991
|
-
},
|
|
1945
|
+
}, _r = (e) => gr(e)?.some((e) => e.code === hr) ?? !1, vr = () => ({
|
|
1992
1946
|
search: async (e) => {
|
|
1993
1947
|
try {
|
|
1994
|
-
return ((await
|
|
1948
|
+
return ((await Cn().dataService.searchBusinessInfoV2(or(e), 1, pr))?.resultaten ?? []).filter((e) => mr.includes(e.type)).map(dr);
|
|
1995
1949
|
} catch (e) {
|
|
1996
1950
|
let t = await e;
|
|
1997
|
-
if (
|
|
1951
|
+
if (_r(t)) return [];
|
|
1998
1952
|
throw t;
|
|
1999
1953
|
}
|
|
2000
1954
|
},
|
|
2001
1955
|
getDetails: async (e) => {
|
|
2002
|
-
let t = await
|
|
1956
|
+
let t = await Cn().dataService.getProfileInfo(e);
|
|
2003
1957
|
return {
|
|
2004
|
-
presenter:
|
|
1958
|
+
presenter: fr(t),
|
|
2005
1959
|
raw: t
|
|
2006
1960
|
};
|
|
2007
1961
|
}
|
|
2008
|
-
}),
|
|
1962
|
+
}), yr = { class: "vd-combobox__multiline" }, br = { class: "vd-combobox__title" }, xr = { class: "vd-combobox__subtext" }, Sr = { class: "vd-combobox__subtext" }, Cr = 400, wr = 3, Tr = "Helaas, we hebben geen resultaten gevonden. Probeer te zoeken op de exacte naam waarmee je bedrijf is geregistreerd bij de Kamer van Koophandel, of gebruik je volledige KvK-nummer.", Er = "Typ je bedrijfsnaam of KvK-nummer", Dr = "Aan het zoeken…", Or = "Er ging iets mis bij het ophalen van de gegevens. Probeer het later opnieuw.", kr = /* @__PURE__ */ l({
|
|
2009
1963
|
inheritAttrs: !1,
|
|
2010
1964
|
__name: "VdCompanySelect",
|
|
2011
1965
|
props: /*@__PURE__*/ p({
|
|
@@ -2024,7 +1978,7 @@ var er = {
|
|
|
2024
1978
|
"raw"
|
|
2025
1979
|
], ["update:modelValue"]),
|
|
2026
1980
|
setup(e, { emit: r }) {
|
|
2027
|
-
let i = r, s = D(), c = A(), l = k(e, "modelValue"), { search: u, getDetails: d } =
|
|
1981
|
+
let i = r, s = D(), c = A(), l = k(e, "modelValue"), { search: u, getDetails: d } = vr(), f = x(), p = x(), h = x(), g = x(""), _ = he(g, Cr, { maxWait: 2e3 }), v = x(!0), { state: b, isLoading: S, execute: w } = ge(async (e) => {
|
|
2028
1982
|
try {
|
|
2029
1983
|
return {
|
|
2030
1984
|
results: await u(e),
|
|
@@ -2047,20 +2001,20 @@ var er = {
|
|
|
2047
2001
|
let { presenter: t, raw: n } = await d(e);
|
|
2048
2002
|
return l.value = t, i("raw", n), i("error", null), t;
|
|
2049
2003
|
} catch (e) {
|
|
2050
|
-
throw l.value = null, i("raw", null), h.value = void 0, f.value = void 0, i("error",
|
|
2004
|
+
throw l.value = null, i("raw", null), h.value = void 0, f.value = void 0, i("error", Or), e;
|
|
2051
2005
|
}
|
|
2052
2006
|
}, null, {
|
|
2053
2007
|
immediate: !1,
|
|
2054
2008
|
resetOnExecute: !0
|
|
2055
|
-
}), M = t(() => g.value.length >=
|
|
2009
|
+
}), M = t(() => g.value.length >= wr), F = t(() => M.value ? S.value || g.value !== _.value ? "searching" : b.value.failed ? "error" : b.value.results.length ? "idle" : "no-results" : "idle"), I = t(() => F.value === "searching" ? [] : M.value ? b.value.results : v.value && h.value ? [h.value] : []), L = t(() => F.value === "searching" || O.value), ee = t(() => !!l.value && !L.value), te = t(() => {
|
|
2056
2010
|
let e = l.value;
|
|
2057
2011
|
return !e || L.value ? "" : e.fullAddress ? `Kvk: ${e.kvkNumber} ${e.fullAddress}` : `Kvk: ${e.kvkNumber}`;
|
|
2058
2012
|
}), ne = t(() => {
|
|
2059
2013
|
switch (F.value) {
|
|
2060
|
-
case "searching": return
|
|
2061
|
-
case "error": return
|
|
2062
|
-
case "no-results": return
|
|
2063
|
-
default: return
|
|
2014
|
+
case "searching": return Dr;
|
|
2015
|
+
case "error": return Or;
|
|
2016
|
+
case "no-results": return Tr;
|
|
2017
|
+
default: return Er;
|
|
2064
2018
|
}
|
|
2065
2019
|
}), re = (e) => {
|
|
2066
2020
|
h.value = e, v.value = !0, e.kvkNumber === l.value?.kvkNumber ? i("error", null) : j(0, e.kvkNumber);
|
|
@@ -2078,7 +2032,7 @@ var er = {
|
|
|
2078
2032
|
return N(p, (e) => {
|
|
2079
2033
|
e || (g.value = "", v.value = !0);
|
|
2080
2034
|
}), N(_, (e) => {
|
|
2081
|
-
e && e.length >=
|
|
2035
|
+
e && e.length >= wr && w(0, e);
|
|
2082
2036
|
}), N(l, (e) => {
|
|
2083
2037
|
f.value = e ? se(e) : void 0, v.value = !0, e || (h.value = void 0, i("raw", null));
|
|
2084
2038
|
}, { immediate: !0 }), (t, r) => (y(), n(Tt, m(E(s), {
|
|
@@ -2106,10 +2060,10 @@ var er = {
|
|
|
2106
2060
|
onBlur: ie,
|
|
2107
2061
|
onSearch: ae
|
|
2108
2062
|
}), o({
|
|
2109
|
-
item: P(({ option: e }) => [a("div",
|
|
2110
|
-
a("div",
|
|
2111
|
-
a("span",
|
|
2112
|
-
a("span",
|
|
2063
|
+
item: P(({ option: e }) => [a("div", yr, [
|
|
2064
|
+
a("div", br, T(e.name), 1),
|
|
2065
|
+
a("span", xr, "Kvk: " + T(e.kvkNumber), 1),
|
|
2066
|
+
a("span", Sr, T(e.city) + ", " + T(e.street), 1)
|
|
2113
2067
|
])]),
|
|
2114
2068
|
_: 2
|
|
2115
2069
|
}, [E(c).popover ? {
|
|
@@ -2135,30 +2089,30 @@ var er = {
|
|
|
2135
2089
|
"info-message"
|
|
2136
2090
|
]));
|
|
2137
2091
|
}
|
|
2138
|
-
}),
|
|
2092
|
+
}), Ar = (e = "Bedrijfsnaam of KVK-nummer is verplicht") => Se().nullable().required(e).test("has-kvk-number", e, (e) => !!e?.kvkNumber), jr = {
|
|
2139
2093
|
min: 18,
|
|
2140
2094
|
max: 99
|
|
2141
|
-
},
|
|
2095
|
+
}, Mr = "DD-MM-YYYY", Nr = [
|
|
2142
2096
|
H.SingleWithoutChildren,
|
|
2143
2097
|
H.FamilyWithoutChildren,
|
|
2144
2098
|
H.SingleWithChildren,
|
|
2145
2099
|
H.FamilyWithChildren
|
|
2146
|
-
],
|
|
2100
|
+
], Pr = [U.Yes, U.No];
|
|
2147
2101
|
//#endregion
|
|
2148
2102
|
//#region src/utils/date.util.ts
|
|
2149
2103
|
ke.extend(Ae);
|
|
2150
|
-
function
|
|
2104
|
+
function Fr() {
|
|
2151
2105
|
return ke().startOf("day");
|
|
2152
2106
|
}
|
|
2153
|
-
function
|
|
2154
|
-
return
|
|
2107
|
+
function Ir() {
|
|
2108
|
+
return Fr().year();
|
|
2155
2109
|
}
|
|
2156
|
-
function
|
|
2110
|
+
function Lr(e, t) {
|
|
2157
2111
|
let n = ke(e ?? "", t, !0);
|
|
2158
2112
|
return n.isValid() ? n.startOf("day") : null;
|
|
2159
2113
|
}
|
|
2160
|
-
function
|
|
2161
|
-
let n =
|
|
2114
|
+
function Rr(e, t) {
|
|
2115
|
+
let n = Fr();
|
|
2162
2116
|
return {
|
|
2163
2117
|
today: n,
|
|
2164
2118
|
earliest: n.subtract(t.value + 1, t.unit).add(1, "day"),
|
|
@@ -2167,28 +2121,28 @@ function Hr(e, t) {
|
|
|
2167
2121
|
}
|
|
2168
2122
|
//#endregion
|
|
2169
2123
|
//#region src/utils/familyComposition.util.ts
|
|
2170
|
-
var
|
|
2171
|
-
function
|
|
2172
|
-
return
|
|
2124
|
+
var zr = [H.FamilyWithChildren, H.FamilyWithoutChildren];
|
|
2125
|
+
function Br(e) {
|
|
2126
|
+
return zr.includes(e);
|
|
2173
2127
|
}
|
|
2174
2128
|
//#endregion
|
|
2175
2129
|
//#region src/utils/url.util.ts
|
|
2176
|
-
var
|
|
2130
|
+
var Vr = (e, t) => {
|
|
2177
2131
|
let [n, r = ""] = e.split("?"), i = new URLSearchParams(r);
|
|
2178
2132
|
return Object.entries(t).forEach(([e, t]) => i.set(e, t)), `${n}?${i.toString()}`;
|
|
2179
|
-
},
|
|
2133
|
+
}, Hr = (e, t) => {
|
|
2180
2134
|
let n = e.indexOf("#");
|
|
2181
|
-
return n === -1 ?
|
|
2135
|
+
return n === -1 ? Vr(e, t) : `${e.slice(0, n + 1)}${Vr(e.slice(n + 1), t)}`;
|
|
2182
2136
|
};
|
|
2183
2137
|
//#endregion
|
|
2184
2138
|
//#region src/schemas/birthdateRange.ts
|
|
2185
|
-
function
|
|
2139
|
+
function Ur(e, t, n = "ageRange") {
|
|
2186
2140
|
return {
|
|
2187
2141
|
name: n,
|
|
2188
2142
|
test(n, r) {
|
|
2189
|
-
let i =
|
|
2143
|
+
let i = Lr(n, Mr);
|
|
2190
2144
|
if (!i) return !0;
|
|
2191
|
-
let { today: a, earliest: o, latest: s } =
|
|
2145
|
+
let { today: a, earliest: o, latest: s } = Rr(e.min, e.max), c = {
|
|
2192
2146
|
earliest: o,
|
|
2193
2147
|
latest: s
|
|
2194
2148
|
};
|
|
@@ -2221,7 +2175,6 @@ var Q = {
|
|
|
2221
2175
|
buildYearRequired: "Kies het bouwjaar van je caravan"
|
|
2222
2176
|
},
|
|
2223
2177
|
house: { familyCompositionRequired: "Kies een gezinsamenstelling" },
|
|
2224
|
-
legal: { familySizeRequired: "Kies het aantal kinderen" },
|
|
2225
2178
|
loan: {
|
|
2226
2179
|
purposeRequired: "Leendoel is verplicht",
|
|
2227
2180
|
amountRequired: "Leenbedrag is verplicht",
|
|
@@ -2238,11 +2191,11 @@ var Q = {
|
|
|
2238
2191
|
};
|
|
2239
2192
|
//#endregion
|
|
2240
2193
|
//#region src/schemas/birthdate.schema.ts
|
|
2241
|
-
function
|
|
2242
|
-
return
|
|
2194
|
+
function Wr(e) {
|
|
2195
|
+
return Lr(e, Mr) !== null;
|
|
2243
2196
|
}
|
|
2244
|
-
function $(e =
|
|
2245
|
-
return z().required(Q.birthdate.required).test("date_format", Q.birthdate.dateFormat,
|
|
2197
|
+
function $(e = jr) {
|
|
2198
|
+
return z().required(Q.birthdate.required).test("date_format", Q.birthdate.dateFormat, Wr).test(Ur({
|
|
2246
2199
|
min: {
|
|
2247
2200
|
value: e.min,
|
|
2248
2201
|
unit: "year"
|
|
@@ -2258,46 +2211,46 @@ function $(e = Fr) {
|
|
|
2258
2211
|
}
|
|
2259
2212
|
//#endregion
|
|
2260
2213
|
//#region src/schemas/rules.ts
|
|
2261
|
-
function
|
|
2214
|
+
function Gr(e, t) {
|
|
2262
2215
|
return z().required(t).oneOf(e, t);
|
|
2263
2216
|
}
|
|
2264
|
-
function
|
|
2217
|
+
function Kr(e) {
|
|
2265
2218
|
return z().required(e);
|
|
2266
2219
|
}
|
|
2267
|
-
function
|
|
2220
|
+
function qr(e) {
|
|
2268
2221
|
return Ce().typeError(e).required(e);
|
|
2269
2222
|
}
|
|
2270
2223
|
//#endregion
|
|
2271
2224
|
//#region src/schemas/familyComposition.schema.ts
|
|
2272
|
-
function
|
|
2273
|
-
return
|
|
2225
|
+
function Jr(e = Q.familyComposition.required) {
|
|
2226
|
+
return Gr(Nr, e);
|
|
2274
2227
|
}
|
|
2275
|
-
var
|
|
2228
|
+
var Yr = Jr(), Xr = Gr(Pr, Q.ownedBuilding.required), Zr = [1, 7], Qr = [3, 4], $r = {
|
|
2276
2229
|
raceOrMtb: 15e3,
|
|
2277
2230
|
default: 9999
|
|
2278
|
-
},
|
|
2231
|
+
}, ei = {
|
|
2279
2232
|
mask: "N####",
|
|
2280
2233
|
tokens: { N: { pattern: /[1-9]/ } }
|
|
2281
|
-
},
|
|
2234
|
+
}, ti = (e, t) => e.test("max-value", Q.bike.priceMax(t), (e) => {
|
|
2282
2235
|
let n = Number(e);
|
|
2283
2236
|
return Number.isNaN(n) || n <= t;
|
|
2284
|
-
}),
|
|
2285
|
-
kind:
|
|
2286
|
-
condition:
|
|
2237
|
+
}), ni = R({
|
|
2238
|
+
kind: qr(Q.bike.kindRequired),
|
|
2239
|
+
condition: qr(Q.bike.conditionRequired),
|
|
2287
2240
|
price: z().required(Q.bike.priceRequired).test("min-value", Q.bike.priceMin, (e) => {
|
|
2288
2241
|
if (!e) return !0;
|
|
2289
2242
|
let t = Number(e);
|
|
2290
2243
|
return Number.isNaN(t) || t > 0;
|
|
2291
2244
|
}).when("kind", {
|
|
2292
|
-
is: (e) =>
|
|
2293
|
-
then: (e) =>
|
|
2294
|
-
otherwise: (e) =>
|
|
2245
|
+
is: (e) => Qr.includes(Number(e)),
|
|
2246
|
+
then: (e) => ti(e, $r.raceOrMtb),
|
|
2247
|
+
otherwise: (e) => ti(e, $r.default)
|
|
2295
2248
|
}),
|
|
2296
2249
|
brand: z().when("kind", {
|
|
2297
|
-
is: (e) =>
|
|
2250
|
+
is: (e) => Zr.includes(Number(e)),
|
|
2298
2251
|
then: (e) => e.required(Q.bike.brandRequired)
|
|
2299
2252
|
})
|
|
2300
|
-
}),
|
|
2253
|
+
}), ri = [
|
|
2301
2254
|
{
|
|
2302
2255
|
value: 4,
|
|
2303
2256
|
title: "ATB / Mountainbike",
|
|
@@ -2364,13 +2317,13 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
2364
2317
|
name: "Vouwfiets",
|
|
2365
2318
|
isEBike: !1
|
|
2366
2319
|
}
|
|
2367
|
-
],
|
|
2320
|
+
], ii = [{
|
|
2368
2321
|
value: 1,
|
|
2369
2322
|
label: "Nieuw"
|
|
2370
2323
|
}, {
|
|
2371
2324
|
value: 0,
|
|
2372
2325
|
label: "Tweedehands"
|
|
2373
|
-
}],
|
|
2326
|
+
}], ai = [
|
|
2374
2327
|
{
|
|
2375
2328
|
id: "Ander merk",
|
|
2376
2329
|
name: "Ander merk"
|
|
@@ -3791,7 +3744,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3791
3744
|
id: "Zündapp",
|
|
3792
3745
|
name: "Zündapp"
|
|
3793
3746
|
}
|
|
3794
|
-
],
|
|
3747
|
+
], oi = /* @__PURE__ */ l({
|
|
3795
3748
|
__name: "BikeForm",
|
|
3796
3749
|
props: /*@__PURE__*/ f({
|
|
3797
3750
|
initialData: {},
|
|
@@ -3810,14 +3763,14 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3810
3763
|
}),
|
|
3811
3764
|
emits: ["submitted"],
|
|
3812
3765
|
setup(e, { emit: i }) {
|
|
3813
|
-
let a = e, o = q(a), s = i, { isSubmitting: l, handleSubmit: u, defineField: f, resetField: p } = Z(
|
|
3766
|
+
let a = e, o = q(a), s = i, { isSubmitting: l, handleSubmit: u, defineField: f, resetField: p } = Z(ni, {
|
|
3814
3767
|
kind: a.initialData?.kind ?? null,
|
|
3815
3768
|
condition: a.initialData?.condition ?? 1,
|
|
3816
3769
|
price: a.initialData?.price ?? "",
|
|
3817
3770
|
brand: a.initialData?.brand ?? ""
|
|
3818
|
-
}), [h, g, _] = f("kind", { validateAt: "change" }), [v, b, x] = f("brand", { validateAt: "change" }), [S, C, w] = f("condition"), [T, D, O] = f("price"), k = t(() =>
|
|
3771
|
+
}), [h, g, _] = f("kind", { validateAt: "change" }), [v, b, x] = f("brand", { validateAt: "change" }), [S, C, w] = f("condition"), [T, D, O] = f("price"), k = t(() => Zr.includes(Number(h.value)));
|
|
3819
3772
|
N(h, (e) => {
|
|
3820
|
-
|
|
3773
|
+
Zr.includes(Number(e)) || p("brand", { value: "" });
|
|
3821
3774
|
}, { immediate: !0 });
|
|
3822
3775
|
function A() {
|
|
3823
3776
|
u((e) => {
|
|
@@ -3833,12 +3786,12 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3833
3786
|
span: k.value ? 2 : 4,
|
|
3834
3787
|
md: "6"
|
|
3835
3788
|
}, {
|
|
3836
|
-
default: P(() => [c(E(
|
|
3789
|
+
default: P(() => [c(E(tt), m({
|
|
3837
3790
|
modelValue: E(h),
|
|
3838
3791
|
"onUpdate:modelValue": i[0] ||= (e) => d(h) ? h.value = e : null,
|
|
3839
3792
|
modelModifiers: { number: !0 },
|
|
3840
3793
|
label: "Soort fiets",
|
|
3841
|
-
options: E(
|
|
3794
|
+
options: E(ri),
|
|
3842
3795
|
name: "kind",
|
|
3843
3796
|
required: !1,
|
|
3844
3797
|
"error-message": E(_)
|
|
@@ -3859,7 +3812,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3859
3812
|
"onUpdate:modelValue": i[1] ||= (e) => d(v) ? v.value = e : null,
|
|
3860
3813
|
label: "Merk fiets",
|
|
3861
3814
|
placeholder: "Typ of kies je merk",
|
|
3862
|
-
options: E(
|
|
3815
|
+
options: E(ai),
|
|
3863
3816
|
"label-key": "name",
|
|
3864
3817
|
"value-key": "id",
|
|
3865
3818
|
name: "brand",
|
|
@@ -3881,7 +3834,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3881
3834
|
"onUpdate:modelValue": i[2] ||= (e) => d(S) ? S.value = e : null,
|
|
3882
3835
|
legend: "Gekocht als",
|
|
3883
3836
|
name: "condition",
|
|
3884
|
-
options: E(
|
|
3837
|
+
options: E(ii),
|
|
3885
3838
|
variant: "boxed",
|
|
3886
3839
|
required: !1,
|
|
3887
3840
|
"error-message": E(w)
|
|
@@ -3903,7 +3856,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3903
3856
|
placeholder: "bv. 1 000",
|
|
3904
3857
|
icon: "far fa-euro-sign",
|
|
3905
3858
|
name: "price",
|
|
3906
|
-
mask: E(
|
|
3859
|
+
mask: E(ei),
|
|
3907
3860
|
inputmode: "numeric",
|
|
3908
3861
|
required: !1,
|
|
3909
3862
|
"error-message": E(O)
|
|
@@ -3921,7 +3874,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3921
3874
|
});
|
|
3922
3875
|
//#endregion
|
|
3923
3876
|
//#region src/comparisons/bike/bike.presenter.ts
|
|
3924
|
-
function
|
|
3877
|
+
function si(e) {
|
|
3925
3878
|
return {
|
|
3926
3879
|
comparison: V.Bike,
|
|
3927
3880
|
detail: { bike: {
|
|
@@ -3935,27 +3888,27 @@ function di(e) {
|
|
|
3935
3888
|
}
|
|
3936
3889
|
//#endregion
|
|
3937
3890
|
//#region src/comparisons/pet/constants.ts
|
|
3938
|
-
var
|
|
3891
|
+
var ci = {
|
|
3939
3892
|
min: 0,
|
|
3940
3893
|
max: 99
|
|
3941
|
-
},
|
|
3894
|
+
}, li = R({
|
|
3942
3895
|
kind: z().required(Q.pet.kindRequired),
|
|
3943
|
-
age: z().required(Q.birthdate.required).test("date_format", Q.birthdate.dateFormat,
|
|
3896
|
+
age: z().required(Q.birthdate.required).test("date_format", Q.birthdate.dateFormat, Wr).test(Ur({
|
|
3944
3897
|
min: {
|
|
3945
3898
|
value: 7,
|
|
3946
3899
|
unit: "week"
|
|
3947
3900
|
},
|
|
3948
3901
|
max: {
|
|
3949
|
-
value:
|
|
3902
|
+
value: ci.max,
|
|
3950
3903
|
unit: "year"
|
|
3951
3904
|
}
|
|
3952
3905
|
}, {
|
|
3953
|
-
future: () => Q.birthdate.tooYoung(
|
|
3954
|
-
tooYoung: ({ earliest: e, latest: t }) => Q.pet.outOfRange(e.format(
|
|
3955
|
-
tooOld: () => Q.birthdate.tooOld(
|
|
3906
|
+
future: () => Q.birthdate.tooYoung(ci.min),
|
|
3907
|
+
tooYoung: ({ earliest: e, latest: t }) => Q.pet.outOfRange(e.format(Mr), t.format(Mr)),
|
|
3908
|
+
tooOld: () => Q.birthdate.tooOld(ci.max)
|
|
3956
3909
|
}, "birthdate_range")),
|
|
3957
3910
|
zipCode: z().required(Q.pet.zipCodeRequired).matches(/^\d{4}\s?[a-zA-Z]{2}$/, Q.pet.zipCodeInvalid)
|
|
3958
|
-
}),
|
|
3911
|
+
}), ui = [
|
|
3959
3912
|
{
|
|
3960
3913
|
title: "Hond",
|
|
3961
3914
|
value: "dog"
|
|
@@ -3972,7 +3925,7 @@ var fi = {
|
|
|
3972
3925
|
title: "Vogel",
|
|
3973
3926
|
value: "bird"
|
|
3974
3927
|
}
|
|
3975
|
-
],
|
|
3928
|
+
], di = /* @__PURE__ */ l({
|
|
3976
3929
|
__name: "PetForm",
|
|
3977
3930
|
props: /*@__PURE__*/ f({
|
|
3978
3931
|
initialData: {},
|
|
@@ -3991,7 +3944,7 @@ var fi = {
|
|
|
3991
3944
|
}),
|
|
3992
3945
|
emits: ["submitted"],
|
|
3993
3946
|
setup(e, { emit: t }) {
|
|
3994
|
-
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(
|
|
3947
|
+
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(li, {
|
|
3995
3948
|
kind: r.initialData?.kind ?? "dog",
|
|
3996
3949
|
age: r.initialData?.age ?? "",
|
|
3997
3950
|
zipCode: r.initialData?.zipCode ?? ""
|
|
@@ -4010,12 +3963,12 @@ var fi = {
|
|
|
4010
3963
|
span: "4",
|
|
4011
3964
|
md: "6"
|
|
4012
3965
|
}, {
|
|
4013
|
-
default: P(() => [c(E(
|
|
3966
|
+
default: P(() => [c(E(tt), m({
|
|
4014
3967
|
modelValue: E(u),
|
|
4015
3968
|
"onUpdate:modelValue": r[0] ||= (e) => d(u) ? u.value = e : null,
|
|
4016
3969
|
label: "Wat voor huisdier wil je verzekeren?",
|
|
4017
3970
|
placeholder: "",
|
|
4018
|
-
options: E(
|
|
3971
|
+
options: E(ui),
|
|
4019
3972
|
name: "kind",
|
|
4020
3973
|
required: !1,
|
|
4021
3974
|
"error-message": E(p)
|
|
@@ -4084,7 +4037,7 @@ var fi = {
|
|
|
4084
4037
|
});
|
|
4085
4038
|
//#endregion
|
|
4086
4039
|
//#region src/comparisons/pet/pet.presenter.ts
|
|
4087
|
-
function
|
|
4040
|
+
function fi(e) {
|
|
4088
4041
|
return {
|
|
4089
4042
|
comparison: V.Pet,
|
|
4090
4043
|
detail: { pet: {
|
|
@@ -4096,11 +4049,11 @@ function gi(e) {
|
|
|
4096
4049
|
}
|
|
4097
4050
|
//#endregion
|
|
4098
4051
|
//#region src/comparisons/caravan/caravan.schema.ts
|
|
4099
|
-
var
|
|
4100
|
-
TypeOfCaravan:
|
|
4101
|
-
NewOrOccasion:
|
|
4102
|
-
BuildYear:
|
|
4103
|
-
}),
|
|
4052
|
+
var pi = R({
|
|
4053
|
+
TypeOfCaravan: Kr(Q.caravan.typeOfCaravanRequired),
|
|
4054
|
+
NewOrOccasion: Gr(Pr, Q.caravan.newOrOccasionRequired),
|
|
4055
|
+
BuildYear: Kr(Q.caravan.buildYearRequired)
|
|
4056
|
+
}), mi = [
|
|
4104
4057
|
{
|
|
4105
4058
|
value: "CS",
|
|
4106
4059
|
title: "Stacaravan"
|
|
@@ -4113,7 +4066,7 @@ var _i = R({
|
|
|
4113
4066
|
value: "CV",
|
|
4114
4067
|
title: "Vouwwagen"
|
|
4115
4068
|
}
|
|
4116
|
-
],
|
|
4069
|
+
], hi = [{
|
|
4117
4070
|
value: U.Yes,
|
|
4118
4071
|
label: "Nieuw"
|
|
4119
4072
|
}, {
|
|
@@ -4122,8 +4075,8 @@ var _i = R({
|
|
|
4122
4075
|
}];
|
|
4123
4076
|
//#endregion
|
|
4124
4077
|
//#region src/comparisons/caravan/models/buildYears.model.ts
|
|
4125
|
-
function
|
|
4126
|
-
let e =
|
|
4078
|
+
function gi() {
|
|
4079
|
+
let e = Ir();
|
|
4127
4080
|
return Array.from({ length: 126 }, (t, n) => ({
|
|
4128
4081
|
title: String(e - n),
|
|
4129
4082
|
value: String(e - n)
|
|
@@ -4131,7 +4084,7 @@ function bi() {
|
|
|
4131
4084
|
}
|
|
4132
4085
|
//#endregion
|
|
4133
4086
|
//#region src/comparisons/caravan/CaravanForm.vue
|
|
4134
|
-
var
|
|
4087
|
+
var _i = /* @__PURE__ */ l({
|
|
4135
4088
|
__name: "CaravanForm",
|
|
4136
4089
|
props: /*@__PURE__*/ f({
|
|
4137
4090
|
initialData: {},
|
|
@@ -4150,7 +4103,7 @@ var xi = /* @__PURE__ */ l({
|
|
|
4150
4103
|
}),
|
|
4151
4104
|
emits: ["submitted"],
|
|
4152
4105
|
setup(e, { emit: t }) {
|
|
4153
|
-
let r = e, i = q(r), a = t, o =
|
|
4106
|
+
let r = e, i = q(r), a = t, o = gi(), { isSubmitting: s, handleSubmit: l, defineField: u } = Z(pi, {
|
|
4154
4107
|
TypeOfCaravan: r.initialData?.TypeOfCaravan ?? null,
|
|
4155
4108
|
NewOrOccasion: r.initialData?.NewOrOccasion ?? U.Yes,
|
|
4156
4109
|
BuildYear: r.initialData?.BuildYear ?? null
|
|
@@ -4169,11 +4122,11 @@ var xi = /* @__PURE__ */ l({
|
|
|
4169
4122
|
span: "4",
|
|
4170
4123
|
md: "6"
|
|
4171
4124
|
}, {
|
|
4172
|
-
default: P(() => [c(E(
|
|
4125
|
+
default: P(() => [c(E(tt), m({
|
|
4173
4126
|
modelValue: E(f),
|
|
4174
4127
|
"onUpdate:modelValue": r[0] ||= (e) => d(f) ? f.value = e : null,
|
|
4175
4128
|
label: "Soort caravan",
|
|
4176
|
-
options: E(
|
|
4129
|
+
options: E(mi),
|
|
4177
4130
|
name: "typeOfCaravan",
|
|
4178
4131
|
required: !1,
|
|
4179
4132
|
"error-message": E(h)
|
|
@@ -4193,7 +4146,7 @@ var xi = /* @__PURE__ */ l({
|
|
|
4193
4146
|
"onUpdate:modelValue": r[1] ||= (e) => d(g) ? g.value = e : null,
|
|
4194
4147
|
legend: "Gekocht als",
|
|
4195
4148
|
name: "newOrOccasion",
|
|
4196
|
-
options: E(
|
|
4149
|
+
options: E(hi),
|
|
4197
4150
|
variant: "boxed",
|
|
4198
4151
|
required: !1,
|
|
4199
4152
|
"error-message": E(v)
|
|
@@ -4208,7 +4161,7 @@ var xi = /* @__PURE__ */ l({
|
|
|
4208
4161
|
span: "2",
|
|
4209
4162
|
md: "6"
|
|
4210
4163
|
}, {
|
|
4211
|
-
default: P(() => [c(E(
|
|
4164
|
+
default: P(() => [c(E(tt), m({
|
|
4212
4165
|
modelValue: E(b),
|
|
4213
4166
|
"onUpdate:modelValue": r[2] ||= (e) => d(b) ? b.value = e : null,
|
|
4214
4167
|
label: "Bouwjaar",
|
|
@@ -4230,7 +4183,7 @@ var xi = /* @__PURE__ */ l({
|
|
|
4230
4183
|
});
|
|
4231
4184
|
//#endregion
|
|
4232
4185
|
//#region src/comparisons/caravan/caravan.presenter.ts
|
|
4233
|
-
function
|
|
4186
|
+
function vi(e) {
|
|
4234
4187
|
return {
|
|
4235
4188
|
comparison: V.Caravan,
|
|
4236
4189
|
detail: { caravan: {
|
|
@@ -4243,18 +4196,18 @@ function Si(e) {
|
|
|
4243
4196
|
}
|
|
4244
4197
|
//#endregion
|
|
4245
4198
|
//#region src/comparisons/travel/paymentTerm.enum.ts
|
|
4246
|
-
var
|
|
4199
|
+
var yi = /* @__PURE__ */ function(e) {
|
|
4247
4200
|
return e.Continuous = "L", e.ShortTerm = "S", e;
|
|
4248
|
-
}({}),
|
|
4249
|
-
PaymentTerm:
|
|
4201
|
+
}({}), bi = R({
|
|
4202
|
+
PaymentTerm: Gr([yi.Continuous, yi.ShortTerm], Q.travel.paymentTermRequired),
|
|
4250
4203
|
birthdate: $()
|
|
4251
|
-
}),
|
|
4252
|
-
value:
|
|
4204
|
+
}), xi = [{
|
|
4205
|
+
value: yi.Continuous,
|
|
4253
4206
|
label: "Doorlopend"
|
|
4254
4207
|
}, {
|
|
4255
|
-
value:
|
|
4208
|
+
value: yi.ShortTerm,
|
|
4256
4209
|
label: "Kortlopend"
|
|
4257
|
-
}],
|
|
4210
|
+
}], Si = /* @__PURE__ */ l({
|
|
4258
4211
|
__name: "TravelForm",
|
|
4259
4212
|
props: /*@__PURE__*/ f({
|
|
4260
4213
|
initialData: {},
|
|
@@ -4273,8 +4226,8 @@ var Ci = /* @__PURE__ */ function(e) {
|
|
|
4273
4226
|
}),
|
|
4274
4227
|
emits: ["submitted"],
|
|
4275
4228
|
setup(e, { emit: t }) {
|
|
4276
|
-
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(
|
|
4277
|
-
PaymentTerm: r.initialData?.PaymentTerm ??
|
|
4229
|
+
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(bi, {
|
|
4230
|
+
PaymentTerm: r.initialData?.PaymentTerm ?? yi.Continuous,
|
|
4278
4231
|
birthdate: r.initialData?.birthdate ?? ""
|
|
4279
4232
|
}), [u, f, p] = l("PaymentTerm", { validateAt: "change" }), [h, g, _] = l("birthdate");
|
|
4280
4233
|
function v() {
|
|
@@ -4295,7 +4248,7 @@ var Ci = /* @__PURE__ */ function(e) {
|
|
|
4295
4248
|
"onUpdate:modelValue": r[0] ||= (e) => d(u) ? u.value = e : null,
|
|
4296
4249
|
legend: "Kies je dekking",
|
|
4297
4250
|
name: "PaymentTerm",
|
|
4298
|
-
options: E(
|
|
4251
|
+
options: E(xi),
|
|
4299
4252
|
variant: "boxed",
|
|
4300
4253
|
required: !1,
|
|
4301
4254
|
"error-message": E(p)
|
|
@@ -4333,7 +4286,7 @@ var Ci = /* @__PURE__ */ function(e) {
|
|
|
4333
4286
|
});
|
|
4334
4287
|
//#endregion
|
|
4335
4288
|
//#region src/comparisons/travel/travel.presenter.ts
|
|
4336
|
-
function
|
|
4289
|
+
function Ci(e) {
|
|
4337
4290
|
return {
|
|
4338
4291
|
comparison: V.Travel,
|
|
4339
4292
|
detail: { comparison: { PaymentTerm: e.PaymentTerm } },
|
|
@@ -4342,11 +4295,11 @@ function Di(e) {
|
|
|
4342
4295
|
}
|
|
4343
4296
|
//#endregion
|
|
4344
4297
|
//#region src/comparisons/liability/liability.schema.ts
|
|
4345
|
-
var
|
|
4298
|
+
var wi = (e) => R({
|
|
4346
4299
|
address: e,
|
|
4347
4300
|
birthdate: $(),
|
|
4348
|
-
familyComposition:
|
|
4349
|
-
}),
|
|
4301
|
+
familyComposition: Yr
|
|
4302
|
+
}), Ti = /* @__PURE__ */ l({
|
|
4350
4303
|
__name: "LiabilityForm",
|
|
4351
4304
|
props: /*@__PURE__*/ f({
|
|
4352
4305
|
initialData: {},
|
|
@@ -4365,7 +4318,7 @@ var Oi = (e) => R({
|
|
|
4365
4318
|
}),
|
|
4366
4319
|
emits: ["submitted"],
|
|
4367
4320
|
setup(e, { emit: t }) {
|
|
4368
|
-
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } =
|
|
4321
|
+
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } = Rn({ initial: r.initialData?.address }), { isSubmitting: f, handleSubmit: p, defineField: h } = Z(wi(o), {
|
|
4369
4322
|
birthdate: r.initialData?.birthdate ?? "",
|
|
4370
4323
|
familyComposition: r.initialData?.familyComposition ?? H.SingleWithoutChildren,
|
|
4371
4324
|
address: s
|
|
@@ -4424,7 +4377,7 @@ var Oi = (e) => R({
|
|
|
4424
4377
|
});
|
|
4425
4378
|
//#endregion
|
|
4426
4379
|
//#region src/comparisons/liability/liability.presenter.ts
|
|
4427
|
-
function
|
|
4380
|
+
function Ei(e) {
|
|
4428
4381
|
return {
|
|
4429
4382
|
comparison: V.Liability,
|
|
4430
4383
|
detail: { liability: {
|
|
@@ -4444,17 +4397,17 @@ function Ai(e) {
|
|
|
4444
4397
|
}
|
|
4445
4398
|
//#endregion
|
|
4446
4399
|
//#region src/models/houseOwnedBuilding.model.ts
|
|
4447
|
-
var
|
|
4400
|
+
var Di = [{
|
|
4448
4401
|
value: U.Yes,
|
|
4449
4402
|
label: "Gekocht"
|
|
4450
4403
|
}, {
|
|
4451
4404
|
value: U.No,
|
|
4452
4405
|
label: "Verhuurd"
|
|
4453
|
-
}],
|
|
4406
|
+
}], Oi = (e) => R({
|
|
4454
4407
|
address: e,
|
|
4455
|
-
ownedBuilding:
|
|
4456
|
-
familyComposition:
|
|
4457
|
-
}),
|
|
4408
|
+
ownedBuilding: Xr,
|
|
4409
|
+
familyComposition: Jr(Q.house.familyCompositionRequired)
|
|
4410
|
+
}), ki = /* @__PURE__ */ l({
|
|
4458
4411
|
__name: "HouseForm",
|
|
4459
4412
|
props: /*@__PURE__*/ f({
|
|
4460
4413
|
initialData: {},
|
|
@@ -4473,7 +4426,7 @@ var ji = [{
|
|
|
4473
4426
|
}),
|
|
4474
4427
|
emits: ["submitted"],
|
|
4475
4428
|
setup(e, { emit: t }) {
|
|
4476
|
-
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } =
|
|
4429
|
+
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } = Rn({ initial: r.initialData?.address }), { isSubmitting: f, handleSubmit: p, defineField: h } = Z(Oi(o), {
|
|
4477
4430
|
ownedBuilding: r.initialData?.ownedBuilding ?? U.Yes,
|
|
4478
4431
|
familyComposition: r.initialData?.familyComposition ?? H.SingleWithoutChildren,
|
|
4479
4432
|
address: s
|
|
@@ -4512,7 +4465,7 @@ var ji = [{
|
|
|
4512
4465
|
"onUpdate:modelValue": r[1] ||= (e) => d(g) ? g.value = e : null,
|
|
4513
4466
|
legend: "Jouw woning is...",
|
|
4514
4467
|
name: "ownedBuilding",
|
|
4515
|
-
options: E(
|
|
4468
|
+
options: E(Di),
|
|
4516
4469
|
variant: "boxed",
|
|
4517
4470
|
required: !1,
|
|
4518
4471
|
"error-message": E(v)
|
|
@@ -4541,7 +4494,7 @@ var ji = [{
|
|
|
4541
4494
|
});
|
|
4542
4495
|
//#endregion
|
|
4543
4496
|
//#region src/comparisons/house/house.presenter.ts
|
|
4544
|
-
function
|
|
4497
|
+
function Ai(e) {
|
|
4545
4498
|
return {
|
|
4546
4499
|
comparison: V.Housing,
|
|
4547
4500
|
detail: { house: { ownedBuilding: e.ownedBuilding } },
|
|
@@ -4556,23 +4509,11 @@ function Pi(e) {
|
|
|
4556
4509
|
};
|
|
4557
4510
|
}
|
|
4558
4511
|
//#endregion
|
|
4559
|
-
//#region src/comparisons/legal/
|
|
4560
|
-
var
|
|
4512
|
+
//#region src/comparisons/legal/legal.schema.ts
|
|
4513
|
+
var ji = (e) => R({
|
|
4561
4514
|
address: e,
|
|
4562
|
-
ownedBuilding:
|
|
4563
|
-
|
|
4564
|
-
familyComposition: $r,
|
|
4565
|
-
familySize: z().defined().when("familyComposition", {
|
|
4566
|
-
is: Fi,
|
|
4567
|
-
then: (e) => e.required(Q.legal.familySizeRequired)
|
|
4568
|
-
})
|
|
4569
|
-
}), Li = [{
|
|
4570
|
-
title: "Alleenstaande met 1 kind",
|
|
4571
|
-
value: "2"
|
|
4572
|
-
}, {
|
|
4573
|
-
title: "Alleenstaande met 2 of meer kinderen",
|
|
4574
|
-
value: "3"
|
|
4575
|
-
}], Ri = /* @__PURE__ */ l({
|
|
4515
|
+
ownedBuilding: Xr
|
|
4516
|
+
}), Mi = /* @__PURE__ */ l({
|
|
4576
4517
|
__name: "LegalForm",
|
|
4577
4518
|
props: /*@__PURE__*/ f({
|
|
4578
4519
|
initialData: {},
|
|
@@ -4590,119 +4531,63 @@ var Fi = H.SingleWithChildren, Ii = (e) => R({
|
|
|
4590
4531
|
title: "Rechtsbijstandverzekering vergelijken"
|
|
4591
4532
|
}),
|
|
4592
4533
|
emits: ["submitted"],
|
|
4593
|
-
setup(e, { emit:
|
|
4594
|
-
let
|
|
4595
|
-
ownedBuilding:
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
N(D, (e) => {
|
|
4602
|
-
e !== Fi && v("familySize", { value: "" });
|
|
4603
|
-
}, { immediate: !0 });
|
|
4604
|
-
function I() {
|
|
4605
|
-
g(({ ownedBuilding: e, birthdate: t, familyComposition: n, familySize: r }) => {
|
|
4606
|
-
s("submitted", {
|
|
4534
|
+
setup(e, { emit: t }) {
|
|
4535
|
+
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } = Rn({ initial: r.initialData?.address }), { isSubmitting: f, handleSubmit: p, defineField: h } = Z(ji(o), {
|
|
4536
|
+
ownedBuilding: r.initialData?.ownedBuilding ?? U.Yes,
|
|
4537
|
+
address: s
|
|
4538
|
+
}), [g, _, v] = h("ownedBuilding");
|
|
4539
|
+
function b() {
|
|
4540
|
+
p(({ ownedBuilding: e }) => {
|
|
4541
|
+
a("submitted", {
|
|
4607
4542
|
ownedBuilding: e,
|
|
4608
|
-
|
|
4609
|
-
familyComposition: n,
|
|
4610
|
-
familySize: r,
|
|
4611
|
-
address: f.value
|
|
4543
|
+
address: l.value
|
|
4612
4544
|
});
|
|
4613
4545
|
});
|
|
4614
4546
|
}
|
|
4615
|
-
return (t,
|
|
4616
|
-
"submit-disabled": e.submitDisabled || E(
|
|
4617
|
-
onSubmit:
|
|
4547
|
+
return (t, r) => (y(), n(E(Y), m(E(i), {
|
|
4548
|
+
"submit-disabled": e.submitDisabled || E(f),
|
|
4549
|
+
onSubmit: b
|
|
4618
4550
|
}), {
|
|
4619
|
-
default: P(() => [
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4645
|
-
|
|
4646
|
-
|
|
4647
|
-
|
|
4648
|
-
|
|
4649
|
-
_: 1
|
|
4650
|
-
}),
|
|
4651
|
-
c(E(J), {
|
|
4652
|
-
span: "2",
|
|
4653
|
-
md: "6"
|
|
4654
|
-
}, {
|
|
4655
|
-
default: P(() => [c(E(X), m({
|
|
4656
|
-
modelValue: E(C),
|
|
4657
|
-
"onUpdate:modelValue": i[2] ||= (e) => d(C) ? C.value = e : null,
|
|
4658
|
-
"error-message": E(T)
|
|
4659
|
-
}, E(w)), null, 16, ["modelValue", "error-message"])]),
|
|
4660
|
-
_: 1
|
|
4661
|
-
}),
|
|
4662
|
-
c(E(J), {
|
|
4663
|
-
span: "2",
|
|
4664
|
-
md: "6"
|
|
4665
|
-
}, {
|
|
4666
|
-
default: P(() => [c(E(cn), m({
|
|
4667
|
-
modelValue: E(D),
|
|
4668
|
-
"onUpdate:modelValue": i[3] ||= (e) => d(D) ? D.value = e : null,
|
|
4669
|
-
"error-message": E(k)
|
|
4670
|
-
}, E(O)), null, 16, ["modelValue", "error-message"])]),
|
|
4671
|
-
_: 1
|
|
4672
|
-
}),
|
|
4673
|
-
F.value ? (y(), n(E(J), {
|
|
4674
|
-
key: 0,
|
|
4675
|
-
span: "2",
|
|
4676
|
-
md: "6"
|
|
4677
|
-
}, {
|
|
4678
|
-
default: P(() => [c(E(W), m({
|
|
4679
|
-
modelValue: E(A),
|
|
4680
|
-
"onUpdate:modelValue": i[4] ||= (e) => d(A) ? A.value = e : null,
|
|
4681
|
-
label: "Aantal kinderen",
|
|
4682
|
-
placeholder: "Maak een keuze",
|
|
4683
|
-
options: E(Li),
|
|
4684
|
-
name: "familySize",
|
|
4685
|
-
required: !1,
|
|
4686
|
-
"error-message": E(M)
|
|
4687
|
-
}, E(j)), null, 16, [
|
|
4688
|
-
"modelValue",
|
|
4689
|
-
"options",
|
|
4690
|
-
"error-message"
|
|
4691
|
-
])]),
|
|
4692
|
-
_: 1
|
|
4693
|
-
})) : r("", !0)
|
|
4694
|
-
]),
|
|
4551
|
+
default: P(() => [c(E(J), {
|
|
4552
|
+
span: "5",
|
|
4553
|
+
md: "6"
|
|
4554
|
+
}, {
|
|
4555
|
+
default: P(() => [c(E(bn), {
|
|
4556
|
+
"resolved-address": E(l),
|
|
4557
|
+
"onUpdate:resolvedAddress": r[0] ||= (e) => d(l) ? l.value = e : null,
|
|
4558
|
+
"addition-options": E(u)
|
|
4559
|
+
}, null, 8, ["resolved-address", "addition-options"])]),
|
|
4560
|
+
_: 1
|
|
4561
|
+
}), c(E(J), {
|
|
4562
|
+
span: "5",
|
|
4563
|
+
md: "6"
|
|
4564
|
+
}, {
|
|
4565
|
+
default: P(() => [c(E(Lt), m({
|
|
4566
|
+
modelValue: E(g),
|
|
4567
|
+
"onUpdate:modelValue": r[1] ||= (e) => d(g) ? g.value = e : null,
|
|
4568
|
+
legend: "Jouw woning is...",
|
|
4569
|
+
name: "ownedBuilding",
|
|
4570
|
+
options: E(Di),
|
|
4571
|
+
variant: "boxed",
|
|
4572
|
+
required: !1,
|
|
4573
|
+
"error-message": E(v)
|
|
4574
|
+
}, E(_)), null, 16, [
|
|
4575
|
+
"modelValue",
|
|
4576
|
+
"options",
|
|
4577
|
+
"error-message"
|
|
4578
|
+
])]),
|
|
4579
|
+
_: 1
|
|
4580
|
+
})]),
|
|
4695
4581
|
_: 1
|
|
4696
4582
|
}, 16, ["submit-disabled"]));
|
|
4697
4583
|
}
|
|
4698
4584
|
});
|
|
4699
4585
|
//#endregion
|
|
4700
4586
|
//#region src/comparisons/legal/legal.presenter.ts
|
|
4701
|
-
function
|
|
4587
|
+
function Ni(e) {
|
|
4702
4588
|
return {
|
|
4703
4589
|
comparison: V.LegalAssistance,
|
|
4704
4590
|
detail: { comparison: {
|
|
4705
|
-
familySize: e.familyComposition === Fi ? e.familySize : "",
|
|
4706
4591
|
deductables: 300,
|
|
4707
4592
|
ownedBuilding: e.ownedBuilding
|
|
4708
4593
|
} },
|
|
@@ -4710,24 +4595,22 @@ function zi(e) {
|
|
|
4710
4595
|
zipCode: e.address.zipCode,
|
|
4711
4596
|
houseNumber: e.address.houseNumber,
|
|
4712
4597
|
houseNumberAddition: e.address.houseNumberAddition,
|
|
4713
|
-
birthdate: e.birthdate,
|
|
4714
4598
|
street: e.address.street,
|
|
4715
|
-
city: e.address.city
|
|
4716
|
-
familyComposition: e.familyComposition
|
|
4599
|
+
city: e.address.city
|
|
4717
4600
|
}
|
|
4718
4601
|
};
|
|
4719
4602
|
}
|
|
4720
4603
|
//#endregion
|
|
4721
4604
|
//#region src/comparisons/package/package.schema.ts
|
|
4722
|
-
var
|
|
4605
|
+
var Pi = (e) => R({
|
|
4723
4606
|
address: e,
|
|
4724
4607
|
birthdate: $(),
|
|
4725
|
-
familyComposition:
|
|
4608
|
+
familyComposition: Yr,
|
|
4726
4609
|
partnerBirthdate: z().defined().when("familyComposition", {
|
|
4727
|
-
is:
|
|
4610
|
+
is: Br,
|
|
4728
4611
|
then: () => $()
|
|
4729
4612
|
})
|
|
4730
|
-
}),
|
|
4613
|
+
}), Fi = /* @__PURE__ */ l({
|
|
4731
4614
|
__name: "PackageForm",
|
|
4732
4615
|
props: /*@__PURE__*/ f({
|
|
4733
4616
|
initialData: {},
|
|
@@ -4746,14 +4629,14 @@ var Bi = (e) => R({
|
|
|
4746
4629
|
}),
|
|
4747
4630
|
emits: ["submitted"],
|
|
4748
4631
|
setup(e, { emit: i }) {
|
|
4749
|
-
let a = e, o = q(a), s = i, { addressSchema: l, draft: u, resolvedAddress: f, additionOptions: p } =
|
|
4632
|
+
let a = e, o = q(a), s = i, { addressSchema: l, draft: u, resolvedAddress: f, additionOptions: p } = Rn({ initial: a.initialData?.address }), { isSubmitting: h, handleSubmit: g, defineField: _, resetField: v } = Z(Pi(l), {
|
|
4750
4633
|
birthdate: a.initialData?.birthdate ?? "",
|
|
4751
4634
|
familyComposition: a.initialData?.familyComposition ?? H.SingleWithoutChildren,
|
|
4752
4635
|
partnerBirthdate: a.initialData?.partnerBirthdate ?? "",
|
|
4753
4636
|
address: u
|
|
4754
|
-
}), [b, x, S] = _("birthdate"), [C, w, T] = _("familyComposition", { validateAt: "change" }), [D, O, k] = _("partnerBirthdate"), A = t(() =>
|
|
4637
|
+
}), [b, x, S] = _("birthdate"), [C, w, T] = _("familyComposition", { validateAt: "change" }), [D, O, k] = _("partnerBirthdate"), A = t(() => Br(C.value));
|
|
4755
4638
|
N(C, (e) => {
|
|
4756
|
-
|
|
4639
|
+
Br(e) || v("partnerBirthdate", { value: "" });
|
|
4757
4640
|
}, { immediate: !0 });
|
|
4758
4641
|
function j() {
|
|
4759
4642
|
g(({ birthdate: e, familyComposition: t, partnerBirthdate: n }) => {
|
|
@@ -4825,7 +4708,7 @@ var Bi = (e) => R({
|
|
|
4825
4708
|
});
|
|
4826
4709
|
//#endregion
|
|
4827
4710
|
//#region src/comparisons/package/package.presenter.ts
|
|
4828
|
-
function
|
|
4711
|
+
function Ii(e) {
|
|
4829
4712
|
return {
|
|
4830
4713
|
comparison: V.Package,
|
|
4831
4714
|
detail: { partner: { birthdate: e.partnerBirthdate } },
|
|
@@ -4842,18 +4725,18 @@ function Hi(e) {
|
|
|
4842
4725
|
}
|
|
4843
4726
|
//#endregion
|
|
4844
4727
|
//#region src/comparisons/loan/constants.ts
|
|
4845
|
-
var
|
|
4728
|
+
var Li = {
|
|
4846
4729
|
min: 21,
|
|
4847
4730
|
max: 74
|
|
4848
|
-
},
|
|
4731
|
+
}, Ri = {
|
|
4849
4732
|
min: 3500,
|
|
4850
4733
|
max: 75e3
|
|
4851
|
-
},
|
|
4734
|
+
}, zi = R({
|
|
4852
4735
|
LoanPurpose: z().required(Q.loan.purposeRequired),
|
|
4853
|
-
LoanAmount:
|
|
4854
|
-
birthdate: $(
|
|
4855
|
-
familyComposition:
|
|
4856
|
-
}),
|
|
4736
|
+
LoanAmount: qr(Q.loan.amountRequired).min(Ri.min, Q.loan.amountMin(Ri.min)).max(Ri.max, Q.loan.amountMax(Ri.max)),
|
|
4737
|
+
birthdate: $(Li),
|
|
4738
|
+
familyComposition: Yr
|
|
4739
|
+
}), Bi = [
|
|
4857
4740
|
{
|
|
4858
4741
|
title: "Aankoop auto",
|
|
4859
4742
|
value: "02"
|
|
@@ -4902,7 +4785,7 @@ var Ui = {
|
|
|
4902
4785
|
title: "Anders",
|
|
4903
4786
|
value: "99"
|
|
4904
4787
|
}
|
|
4905
|
-
],
|
|
4788
|
+
], Vi = /* @__PURE__ */ l({
|
|
4906
4789
|
__name: "LoanForm",
|
|
4907
4790
|
props: /*@__PURE__*/ f({
|
|
4908
4791
|
initialData: {},
|
|
@@ -4921,7 +4804,7 @@ var Ui = {
|
|
|
4921
4804
|
}),
|
|
4922
4805
|
emits: ["submitted"],
|
|
4923
4806
|
setup(e, { emit: t }) {
|
|
4924
|
-
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(
|
|
4807
|
+
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(zi, {
|
|
4925
4808
|
LoanPurpose: r.initialData?.LoanPurpose ?? "",
|
|
4926
4809
|
LoanAmount: r.initialData?.LoanAmount ?? null,
|
|
4927
4810
|
birthdate: r.initialData?.birthdate ?? "",
|
|
@@ -4941,12 +4824,12 @@ var Ui = {
|
|
|
4941
4824
|
span: "3",
|
|
4942
4825
|
md: "6"
|
|
4943
4826
|
}, {
|
|
4944
|
-
default: P(() => [c(E(
|
|
4827
|
+
default: P(() => [c(E(tt), m({
|
|
4945
4828
|
modelValue: E(u),
|
|
4946
4829
|
"onUpdate:modelValue": r[0] ||= (e) => d(u) ? u.value = e : null,
|
|
4947
4830
|
label: "Leendoel",
|
|
4948
4831
|
placeholder: "Maak een keuze",
|
|
4949
|
-
options: E(
|
|
4832
|
+
options: E(Bi),
|
|
4950
4833
|
name: "LoanPurpose",
|
|
4951
4834
|
required: !1,
|
|
4952
4835
|
"error-message": E(p)
|
|
@@ -5005,19 +4888,19 @@ var Ui = {
|
|
|
5005
4888
|
});
|
|
5006
4889
|
//#endregion
|
|
5007
4890
|
//#region src/comparisons/loan/loan.presenter.ts
|
|
5008
|
-
function
|
|
5009
|
-
let t =
|
|
4891
|
+
function Hi(e) {
|
|
4892
|
+
let t = Lr(e, Mr);
|
|
5010
4893
|
if (!t) return 120;
|
|
5011
4894
|
let n = t.add(76, "year").diff(ke(), "month", !0), r = Math.floor(n / 12) * 12;
|
|
5012
4895
|
return Math.min(r, 120);
|
|
5013
4896
|
}
|
|
5014
|
-
function
|
|
4897
|
+
function Ui(e) {
|
|
5015
4898
|
return {
|
|
5016
4899
|
comparison: V.Loan,
|
|
5017
4900
|
detail: { loan: {
|
|
5018
4901
|
LoanPurpose: e.LoanPurpose,
|
|
5019
4902
|
LoanAmount: e.LoanAmount,
|
|
5020
|
-
MaxDurationByLegalLimit:
|
|
4903
|
+
MaxDurationByLegalLimit: Hi(e.birthdate)
|
|
5021
4904
|
} },
|
|
5022
4905
|
user: {
|
|
5023
4906
|
birthdate: e.birthdate,
|
|
@@ -5027,14 +4910,14 @@ function Yi(e) {
|
|
|
5027
4910
|
}
|
|
5028
4911
|
//#endregion
|
|
5029
4912
|
//#region src/comparisons/moped/constants.ts
|
|
5030
|
-
var
|
|
4913
|
+
var Wi = {
|
|
5031
4914
|
min: 16,
|
|
5032
4915
|
max: 99
|
|
5033
|
-
},
|
|
4916
|
+
}, Gi = (e, t) => R({
|
|
5034
4917
|
licensePlate: e,
|
|
5035
4918
|
address: t,
|
|
5036
|
-
birthdate: $(
|
|
5037
|
-
}),
|
|
4919
|
+
birthdate: $(Wi)
|
|
4920
|
+
}), Ki = /* @__PURE__ */ l({
|
|
5038
4921
|
__name: "MopedForm",
|
|
5039
4922
|
props: /*@__PURE__*/ f({
|
|
5040
4923
|
initialData: {},
|
|
@@ -5053,7 +4936,7 @@ var Xi = {
|
|
|
5053
4936
|
}),
|
|
5054
4937
|
emits: ["submitted"],
|
|
5055
4938
|
setup(e, { emit: t }) {
|
|
5056
|
-
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } =
|
|
4939
|
+
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } = Rn({ initial: r.initialData?.address }), { vehicleData: f, licensePlateSchema: p } = ir(V.Moped, { initialData: r.initialData?.vehicle ?? void 0 }), { isSubmitting: h, handleSubmit: g, defineField: _ } = Z(Gi(p, o), {
|
|
5057
4940
|
licensePlate: r.initialData?.licensePlate ?? "",
|
|
5058
4941
|
birthdate: r.initialData?.birthdate ?? "",
|
|
5059
4942
|
address: s
|
|
@@ -5077,7 +4960,7 @@ var Xi = {
|
|
|
5077
4960
|
span: "3",
|
|
5078
4961
|
md: "6"
|
|
5079
4962
|
}, {
|
|
5080
|
-
default: P(() => [c(E(
|
|
4963
|
+
default: P(() => [c(E(Qn), m({
|
|
5081
4964
|
modelValue: E(v),
|
|
5082
4965
|
"onUpdate:modelValue": r[0] ||= (e) => d(v) ? v.value = e : null,
|
|
5083
4966
|
"vehicle-data": E(f),
|
|
@@ -5134,7 +5017,7 @@ var Xi = {
|
|
|
5134
5017
|
});
|
|
5135
5018
|
//#endregion
|
|
5136
5019
|
//#region src/comparisons/moped/moped.presenter.ts
|
|
5137
|
-
function
|
|
5020
|
+
function qi(e) {
|
|
5138
5021
|
return {
|
|
5139
5022
|
comparison: V.Moped,
|
|
5140
5023
|
detail: { moped: { ...e.vehicle } },
|
|
@@ -5151,11 +5034,11 @@ function $i(e) {
|
|
|
5151
5034
|
}
|
|
5152
5035
|
//#endregion
|
|
5153
5036
|
//#region src/comparisons/motor/motor.schema.ts
|
|
5154
|
-
var
|
|
5037
|
+
var Ji = (e, t) => R({
|
|
5155
5038
|
licensePlate: e,
|
|
5156
5039
|
address: t,
|
|
5157
5040
|
birthdate: $()
|
|
5158
|
-
}),
|
|
5041
|
+
}), Yi = /* @__PURE__ */ l({
|
|
5159
5042
|
__name: "MotorForm",
|
|
5160
5043
|
props: /*@__PURE__*/ f({
|
|
5161
5044
|
initialData: {},
|
|
@@ -5174,7 +5057,7 @@ var ea = (e, t) => R({
|
|
|
5174
5057
|
}),
|
|
5175
5058
|
emits: ["submitted"],
|
|
5176
5059
|
setup(e, { emit: t }) {
|
|
5177
|
-
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } =
|
|
5060
|
+
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } = Rn({ initial: r.initialData?.address }), { vehicleData: f, licensePlateSchema: p } = ir(V.Motor, { initialData: r.initialData?.vehicle ?? void 0 }), { isSubmitting: h, handleSubmit: g, defineField: _ } = Z(Ji(p, o), {
|
|
5178
5061
|
licensePlate: r.initialData?.licensePlate ?? "",
|
|
5179
5062
|
birthdate: r.initialData?.birthdate ?? "",
|
|
5180
5063
|
address: s
|
|
@@ -5198,7 +5081,7 @@ var ea = (e, t) => R({
|
|
|
5198
5081
|
span: "3",
|
|
5199
5082
|
md: "6"
|
|
5200
5083
|
}, {
|
|
5201
|
-
default: P(() => [c(E(
|
|
5084
|
+
default: P(() => [c(E(Qn), m({
|
|
5202
5085
|
modelValue: E(v),
|
|
5203
5086
|
"onUpdate:modelValue": r[0] ||= (e) => d(v) ? v.value = e : null,
|
|
5204
5087
|
"vehicle-data": E(f),
|
|
@@ -5255,7 +5138,7 @@ var ea = (e, t) => R({
|
|
|
5255
5138
|
});
|
|
5256
5139
|
//#endregion
|
|
5257
5140
|
//#region src/comparisons/motor/motor.presenter.ts
|
|
5258
|
-
function
|
|
5141
|
+
function Xi(e) {
|
|
5259
5142
|
return {
|
|
5260
5143
|
comparison: V.Motor,
|
|
5261
5144
|
detail: { motor: { ...e.vehicle } },
|
|
@@ -5272,11 +5155,11 @@ function na(e) {
|
|
|
5272
5155
|
}
|
|
5273
5156
|
//#endregion
|
|
5274
5157
|
//#region src/comparisons/car/car.schema.ts
|
|
5275
|
-
var
|
|
5158
|
+
var Zi = (e, t) => R({
|
|
5276
5159
|
licensePlate: e,
|
|
5277
5160
|
address: t,
|
|
5278
5161
|
birthdate: $()
|
|
5279
|
-
}),
|
|
5162
|
+
}), Qi = /* @__PURE__ */ l({
|
|
5280
5163
|
__name: "CarForm",
|
|
5281
5164
|
props: /*@__PURE__*/ f({
|
|
5282
5165
|
initialData: {},
|
|
@@ -5295,7 +5178,7 @@ var ra = (e, t) => R({
|
|
|
5295
5178
|
}),
|
|
5296
5179
|
emits: ["submitted"],
|
|
5297
5180
|
setup(e, { emit: t }) {
|
|
5298
|
-
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } =
|
|
5181
|
+
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } = Rn({ initial: r.initialData?.address }), { vehicleData: f, licensePlateSchema: p } = ir(V.Car, { initialData: r.initialData?.vehicle ?? void 0 }), { isSubmitting: h, handleSubmit: g, defineField: _ } = Z(Zi(p, o), {
|
|
5299
5182
|
licensePlate: r.initialData?.licensePlate ?? "",
|
|
5300
5183
|
birthdate: r.initialData?.birthdate ?? "",
|
|
5301
5184
|
address: s
|
|
@@ -5319,7 +5202,7 @@ var ra = (e, t) => R({
|
|
|
5319
5202
|
span: "3",
|
|
5320
5203
|
md: "6"
|
|
5321
5204
|
}, {
|
|
5322
|
-
default: P(() => [c(E(
|
|
5205
|
+
default: P(() => [c(E(Qn), m({
|
|
5323
5206
|
modelValue: E(v),
|
|
5324
5207
|
"onUpdate:modelValue": r[0] ||= (e) => d(v) ? v.value = e : null,
|
|
5325
5208
|
"vehicle-data": E(f),
|
|
@@ -5376,7 +5259,7 @@ var ra = (e, t) => R({
|
|
|
5376
5259
|
});
|
|
5377
5260
|
//#endregion
|
|
5378
5261
|
//#region src/comparisons/car/car.presenter.ts
|
|
5379
|
-
function
|
|
5262
|
+
function $i(e) {
|
|
5380
5263
|
return {
|
|
5381
5264
|
comparison: V.Car,
|
|
5382
5265
|
detail: { car: { ...e.vehicle } },
|
|
@@ -5393,10 +5276,10 @@ function aa(e) {
|
|
|
5393
5276
|
}
|
|
5394
5277
|
//#endregion
|
|
5395
5278
|
//#region src/comparisons/car-business/businessCar.schema.ts
|
|
5396
|
-
var
|
|
5279
|
+
var ea = (e) => R({
|
|
5397
5280
|
licensePlate: e,
|
|
5398
|
-
company:
|
|
5399
|
-
}),
|
|
5281
|
+
company: Ar()
|
|
5282
|
+
}), ta = /* @__PURE__ */ l({
|
|
5400
5283
|
__name: "BusinessCarForm",
|
|
5401
5284
|
props: /*@__PURE__*/ f({
|
|
5402
5285
|
initialData: {},
|
|
@@ -5415,7 +5298,7 @@ var oa = (e) => R({
|
|
|
5415
5298
|
}),
|
|
5416
5299
|
emits: ["submitted"],
|
|
5417
5300
|
setup(e, { emit: i }) {
|
|
5418
|
-
let a = e, o = q(a), s = i, { vehicleData: l, licensePlateSchema: u } =
|
|
5301
|
+
let a = e, o = q(a), s = i, { vehicleData: l, licensePlateSchema: u } = ir(V.Car, { initialData: a.initialData?.vehicle ?? void 0 }), { isSubmitting: f, handleSubmit: p, defineField: h, setErrors: g, removeError: _ } = Z(ea(u), {
|
|
5419
5302
|
licensePlate: a.initialData?.licensePlate ?? "",
|
|
5420
5303
|
company: a.initialData?.company ?? null
|
|
5421
5304
|
}), [v, b, x, S] = h("licensePlate"), [C, w, T] = h("company"), D = (e) => e ? g({ company: e }) : _("company"), O = t(() => !!C.value && !C.value.hasVisitingAddress);
|
|
@@ -5436,7 +5319,7 @@ var oa = (e) => R({
|
|
|
5436
5319
|
span: "5",
|
|
5437
5320
|
md: "6"
|
|
5438
5321
|
}, {
|
|
5439
|
-
default: P(() => [c(E(
|
|
5322
|
+
default: P(() => [c(E(Qn), m({
|
|
5440
5323
|
modelValue: E(v),
|
|
5441
5324
|
"onUpdate:modelValue": i[0] ||= (e) => d(v) ? v.value = e : null,
|
|
5442
5325
|
"vehicle-data": E(l),
|
|
@@ -5466,7 +5349,7 @@ var oa = (e) => R({
|
|
|
5466
5349
|
span: "5",
|
|
5467
5350
|
md: "6"
|
|
5468
5351
|
}, {
|
|
5469
|
-
default: P(() => [c(E(
|
|
5352
|
+
default: P(() => [c(E(kr), m({
|
|
5470
5353
|
modelValue: E(C),
|
|
5471
5354
|
"onUpdate:modelValue": i[2] ||= (e) => d(C) ? C.value = e : null,
|
|
5472
5355
|
name: "company",
|
|
@@ -5495,7 +5378,7 @@ var oa = (e) => R({
|
|
|
5495
5378
|
});
|
|
5496
5379
|
//#endregion
|
|
5497
5380
|
//#region src/comparisons/car-business/businessCar.presenter.ts
|
|
5498
|
-
function
|
|
5381
|
+
function na(e) {
|
|
5499
5382
|
return {
|
|
5500
5383
|
comparison: V.CarBusiness,
|
|
5501
5384
|
detail: {
|
|
@@ -5507,7 +5390,7 @@ function ca(e) {
|
|
|
5507
5390
|
}
|
|
5508
5391
|
//#endregion
|
|
5509
5392
|
//#region src/comparisons/businessLiability/businessLiability.schema.ts
|
|
5510
|
-
var
|
|
5393
|
+
var ra = R({ company: Ar() }), ia = /* @__PURE__ */ l({
|
|
5511
5394
|
__name: "BusinessLiabilityForm",
|
|
5512
5395
|
props: /*@__PURE__*/ f({
|
|
5513
5396
|
initialData: {},
|
|
@@ -5528,7 +5411,7 @@ var la = R({ company: Pr() }), ua = /* @__PURE__ */ l({
|
|
|
5528
5411
|
}),
|
|
5529
5412
|
emits: ["submitted"],
|
|
5530
5413
|
setup(e, { emit: i }) {
|
|
5531
|
-
let a = e, o = q(a), s = i, { isSubmitting: l, handleSubmit: u, defineField: f, setErrors: p, removeError: h } = Z(
|
|
5414
|
+
let a = e, o = q(a), s = i, { isSubmitting: l, handleSubmit: u, defineField: f, setErrors: p, removeError: h } = Z(ra, { company: a.initialData?.company ?? null }), [g, _, v] = f("company"), b = (e) => e ? p({ company: e }) : h("company"), x = t(() => !!g.value && !g.value.hasVisitingAddress);
|
|
5532
5415
|
function S() {
|
|
5533
5416
|
u(({ company: e }) => {
|
|
5534
5417
|
s("submitted", { company: e });
|
|
@@ -5543,7 +5426,7 @@ var la = R({ company: Pr() }), ua = /* @__PURE__ */ l({
|
|
|
5543
5426
|
span: "8",
|
|
5544
5427
|
md: "6"
|
|
5545
5428
|
}, {
|
|
5546
|
-
default: P(() => [c(E(
|
|
5429
|
+
default: P(() => [c(E(kr), m({
|
|
5547
5430
|
modelValue: E(g),
|
|
5548
5431
|
"onUpdate:modelValue": t[0] ||= (e) => d(g) ? g.value = e : null,
|
|
5549
5432
|
name: "company",
|
|
@@ -5572,7 +5455,7 @@ var la = R({ company: Pr() }), ua = /* @__PURE__ */ l({
|
|
|
5572
5455
|
});
|
|
5573
5456
|
//#endregion
|
|
5574
5457
|
//#region src/comparisons/businessLiability/businessLiability.presenter.ts
|
|
5575
|
-
function
|
|
5458
|
+
function aa(e) {
|
|
5576
5459
|
return {
|
|
5577
5460
|
comparison: V.BusinessLiability,
|
|
5578
5461
|
detail: { companyData: { ...e.company } },
|
|
@@ -5581,9 +5464,9 @@ function da(e) {
|
|
|
5581
5464
|
}
|
|
5582
5465
|
//#endregion
|
|
5583
5466
|
//#region src/flow/useComparisonSubmit.ts
|
|
5584
|
-
var
|
|
5467
|
+
var oa = { [V.Travel]: "/tarieven/" }, sa = (e, t, n) => `${e}#/${n}${oa[t] ?? ""}`, ca = (e) => {
|
|
5585
5468
|
window.location.href = e;
|
|
5586
|
-
},
|
|
5469
|
+
}, la = ({ user: e, detail: t }) => new Oe({
|
|
5587
5470
|
email: e.email || null,
|
|
5588
5471
|
name: e.firstName || null,
|
|
5589
5472
|
zip_code: e.zipCode || null,
|
|
@@ -5597,14 +5480,14 @@ var fa = { [V.Travel]: "/tarieven/" }, pa = (e, t, n) => `${e}#/${n}${fa[t] ?? "
|
|
|
5597
5480
|
...e.city && { city: e.city }
|
|
5598
5481
|
}
|
|
5599
5482
|
});
|
|
5600
|
-
function
|
|
5483
|
+
function ua(e) {
|
|
5601
5484
|
let t = x(!1), n = x(null);
|
|
5602
5485
|
return {
|
|
5603
5486
|
submit: async (r) => {
|
|
5604
5487
|
t.value = !0, n.value = null;
|
|
5605
5488
|
try {
|
|
5606
|
-
let t = await
|
|
5607
|
-
e.onRedirect ? e.onRedirect(n) :
|
|
5489
|
+
let t = await Cn().comparisonService.create(r.comparison, la(r)), n = sa(e.link, r.comparison, t.getId());
|
|
5490
|
+
e.onRedirect ? e.onRedirect(n) : ca(n);
|
|
5608
5491
|
} catch (t) {
|
|
5609
5492
|
n.value = t, e.onError?.(t, r);
|
|
5610
5493
|
} finally {
|
|
@@ -5617,66 +5500,66 @@ function ga(e) {
|
|
|
5617
5500
|
}
|
|
5618
5501
|
//#endregion
|
|
5619
5502
|
//#region src/comparisons/bike/index.ts
|
|
5620
|
-
var
|
|
5621
|
-
Form: () =>
|
|
5622
|
-
presenter: () =>
|
|
5503
|
+
var da = /* @__PURE__ */ B({
|
|
5504
|
+
Form: () => oi,
|
|
5505
|
+
presenter: () => si
|
|
5506
|
+
}), fa = /* @__PURE__ */ B({
|
|
5507
|
+
Form: () => di,
|
|
5508
|
+
presenter: () => fi
|
|
5509
|
+
}), pa = /* @__PURE__ */ B({
|
|
5510
|
+
Form: () => _i,
|
|
5511
|
+
presenter: () => vi
|
|
5512
|
+
}), ma = /* @__PURE__ */ B({
|
|
5513
|
+
Form: () => Si,
|
|
5514
|
+
presenter: () => Ci
|
|
5515
|
+
}), ha = /* @__PURE__ */ B({
|
|
5516
|
+
Form: () => Ti,
|
|
5517
|
+
presenter: () => Ei
|
|
5518
|
+
}), ga = /* @__PURE__ */ B({
|
|
5519
|
+
Form: () => ki,
|
|
5520
|
+
presenter: () => Ai
|
|
5521
|
+
}), _a = /* @__PURE__ */ B({
|
|
5522
|
+
Form: () => Mi,
|
|
5523
|
+
presenter: () => Ni
|
|
5623
5524
|
}), va = /* @__PURE__ */ B({
|
|
5624
|
-
Form: () =>
|
|
5625
|
-
presenter: () =>
|
|
5525
|
+
Form: () => Fi,
|
|
5526
|
+
presenter: () => Ii
|
|
5626
5527
|
}), ya = /* @__PURE__ */ B({
|
|
5627
|
-
Form: () =>
|
|
5628
|
-
presenter: () =>
|
|
5528
|
+
Form: () => Vi,
|
|
5529
|
+
presenter: () => Ui
|
|
5629
5530
|
}), ba = /* @__PURE__ */ B({
|
|
5630
|
-
Form: () =>
|
|
5631
|
-
presenter: () =>
|
|
5531
|
+
Form: () => Ki,
|
|
5532
|
+
presenter: () => qi
|
|
5632
5533
|
}), xa = /* @__PURE__ */ B({
|
|
5633
|
-
Form: () =>
|
|
5634
|
-
presenter: () =>
|
|
5534
|
+
Form: () => Yi,
|
|
5535
|
+
presenter: () => Xi
|
|
5635
5536
|
}), Sa = /* @__PURE__ */ B({
|
|
5636
|
-
Form: () => Ni,
|
|
5637
|
-
presenter: () => Pi
|
|
5638
|
-
}), Ca = /* @__PURE__ */ B({
|
|
5639
|
-
Form: () => Ri,
|
|
5640
|
-
presenter: () => zi
|
|
5641
|
-
}), wa = /* @__PURE__ */ B({
|
|
5642
|
-
Form: () => Vi,
|
|
5643
|
-
presenter: () => Hi
|
|
5644
|
-
}), Ta = /* @__PURE__ */ B({
|
|
5645
|
-
Form: () => qi,
|
|
5646
|
-
presenter: () => Yi
|
|
5647
|
-
}), Ea = /* @__PURE__ */ B({
|
|
5648
5537
|
Form: () => Qi,
|
|
5649
5538
|
presenter: () => $i
|
|
5650
|
-
}),
|
|
5539
|
+
}), Ca = /* @__PURE__ */ B({
|
|
5651
5540
|
Form: () => ta,
|
|
5652
5541
|
presenter: () => na
|
|
5653
|
-
}),
|
|
5542
|
+
}), wa = /* @__PURE__ */ B({
|
|
5654
5543
|
Form: () => ia,
|
|
5655
5544
|
presenter: () => aa
|
|
5656
|
-
}),
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
[V.
|
|
5665
|
-
[V.
|
|
5666
|
-
[V.
|
|
5667
|
-
[V.
|
|
5668
|
-
[V.
|
|
5669
|
-
|
|
5670
|
-
[V.
|
|
5671
|
-
|
|
5672
|
-
[V.
|
|
5673
|
-
|
|
5674
|
-
[V.Motor]: Da,
|
|
5675
|
-
[V.Car]: Oa,
|
|
5676
|
-
[V.CarBusiness]: ka,
|
|
5677
|
-
"business-car": ka,
|
|
5678
|
-
[V.BusinessLiability]: Aa
|
|
5679
|
-
}, Ma = /* @__PURE__ */ l({
|
|
5545
|
+
}), Ta = {
|
|
5546
|
+
[V.Bike]: da,
|
|
5547
|
+
[V.Pet]: fa,
|
|
5548
|
+
[V.Caravan]: pa,
|
|
5549
|
+
[V.Travel]: ma,
|
|
5550
|
+
[V.Liability]: ha,
|
|
5551
|
+
[V.Housing]: ga,
|
|
5552
|
+
house: ga,
|
|
5553
|
+
[V.LegalAssistance]: _a,
|
|
5554
|
+
[V.Package]: va,
|
|
5555
|
+
[V.Loan]: ya,
|
|
5556
|
+
[V.Moped]: ba,
|
|
5557
|
+
[V.Motor]: xa,
|
|
5558
|
+
[V.Car]: Sa,
|
|
5559
|
+
[V.CarBusiness]: Ca,
|
|
5560
|
+
"business-car": Ca,
|
|
5561
|
+
[V.BusinessLiability]: wa
|
|
5562
|
+
}, Ea = /* @__PURE__ */ l({
|
|
5680
5563
|
__name: "ComparisonFormFlow",
|
|
5681
5564
|
props: {
|
|
5682
5565
|
form: {},
|
|
@@ -5707,7 +5590,7 @@ var _a = /* @__PURE__ */ B({
|
|
|
5707
5590
|
},
|
|
5708
5591
|
emits: ["submitted", "error"],
|
|
5709
5592
|
setup(e, { emit: i }) {
|
|
5710
|
-
let a = e, o = i, s = q(a), c = t(() =>
|
|
5593
|
+
let a = e, o = i, s = q(a), c = t(() => Ta[a.form]), { submit: l, isSubmitting: u } = ua({
|
|
5711
5594
|
link: a.link,
|
|
5712
5595
|
onRedirect: (e) => {
|
|
5713
5596
|
o("submitted", e), a.redirect ? a.redirect(e) : window.location.href = e;
|
|
@@ -5723,16 +5606,18 @@ var _a = /* @__PURE__ */ B({
|
|
|
5723
5606
|
onSubmitted: d
|
|
5724
5607
|
}), null, 16, ["initial-data", "submit-disabled"])) : r("", !0);
|
|
5725
5608
|
}
|
|
5726
|
-
}),
|
|
5609
|
+
}), Da, Oa = (e) => {
|
|
5610
|
+
Da = e;
|
|
5611
|
+
}, ka = () => Da?.url, Aa = { class: "vd-form vd-form--vertical vd-form--card" }, ja = {
|
|
5727
5612
|
key: 0,
|
|
5728
5613
|
class: "vd-form__header"
|
|
5729
|
-
},
|
|
5614
|
+
}, Ma = {
|
|
5730
5615
|
key: 0,
|
|
5731
5616
|
class: "vd-form__title"
|
|
5732
|
-
},
|
|
5617
|
+
}, Na = {
|
|
5733
5618
|
key: 1,
|
|
5734
5619
|
class: "vd-form__description"
|
|
5735
|
-
},
|
|
5620
|
+
}, Pa = /* @__PURE__ */ l({
|
|
5736
5621
|
__name: "QuestionnaireForm",
|
|
5737
5622
|
props: {
|
|
5738
5623
|
link: {},
|
|
@@ -5747,11 +5632,11 @@ var _a = /* @__PURE__ */ B({
|
|
|
5747
5632
|
}
|
|
5748
5633
|
},
|
|
5749
5634
|
setup(e) {
|
|
5750
|
-
let n = e, a = t(() =>
|
|
5635
|
+
let n = e, a = t(() => Hr(n.link, {
|
|
5751
5636
|
qaId: n.qaId,
|
|
5752
5637
|
template: n.thankyouPageTemplate
|
|
5753
5638
|
}));
|
|
5754
|
-
return (t, n) => (y(), i("div",
|
|
5639
|
+
return (t, n) => (y(), i("div", Aa, [e.showTitle && e.title || e.description ? (y(), i("div", ja, [e.showTitle && e.title ? (y(), i("h2", Ma, T(e.title), 1)) : r("", !0), e.description ? (y(), i("p", Na, T(e.description), 1)) : r("", !0)])) : r("", !0), c(E(Ne), {
|
|
5755
5640
|
href: a.value,
|
|
5756
5641
|
label: e.buttonText,
|
|
5757
5642
|
"button-type": "green",
|
|
@@ -5760,16 +5645,16 @@ var _a = /* @__PURE__ */ B({
|
|
|
5760
5645
|
block: ""
|
|
5761
5646
|
}, null, 8, ["href", "label"])]));
|
|
5762
5647
|
}
|
|
5763
|
-
}),
|
|
5648
|
+
}), Fa = {
|
|
5764
5649
|
key: 0,
|
|
5765
5650
|
class: "vd-form__header"
|
|
5766
|
-
},
|
|
5651
|
+
}, Ia = {
|
|
5767
5652
|
key: 0,
|
|
5768
5653
|
class: "vd-form__title"
|
|
5769
|
-
},
|
|
5654
|
+
}, La = {
|
|
5770
5655
|
key: 1,
|
|
5771
5656
|
class: "vd-form__description"
|
|
5772
|
-
},
|
|
5657
|
+
}, Ra = { class: "vd-form__row" }, za = { class: "vd-form__col-10 vd-form__col-md-6" }, Ba = { class: "vd-form__col-2 vd-form__action" }, Va = /* @__PURE__ */ l({
|
|
5773
5658
|
__name: "RiskScannerForm",
|
|
5774
5659
|
props: {
|
|
5775
5660
|
qaUrl: { default: "" },
|
|
@@ -5787,9 +5672,11 @@ var _a = /* @__PURE__ */ B({
|
|
|
5787
5672
|
}
|
|
5788
5673
|
},
|
|
5789
5674
|
setup(e) {
|
|
5790
|
-
let o = e, s = x(null), { isSubmitting: l, handleSubmit: u, defineField: f, setErrors: p, removeError: h } = Z(R({ company:
|
|
5675
|
+
let o = e, s = x(null), { isSubmitting: l, handleSubmit: u, defineField: f, setErrors: p, removeError: h } = Z(R({ company: Ar() }), { company: null }), [g, _, v] = f("company"), b = (e) => e ? p({ company: e }) : h("company"), S = t(() => !!g.value && !g.value.hasVisitingAddress);
|
|
5791
5676
|
async function C(e) {
|
|
5792
|
-
let t = o.qaUrl ||
|
|
5677
|
+
let t = o.qaUrl || ka();
|
|
5678
|
+
if (!t) throw Error("QA api url is required — set the qa-url attribute, or call configureQa({ url }) once at bootstrap.");
|
|
5679
|
+
let n = t.endsWith("/") ? t : `${t}/`, r = await fetch(`${n}api/v1/active-questionnaire/${o.qaId}/start`, {
|
|
5793
5680
|
method: "POST",
|
|
5794
5681
|
headers: { "Content-Type": "application/json" },
|
|
5795
5682
|
body: JSON.stringify({
|
|
@@ -5803,7 +5690,7 @@ var _a = /* @__PURE__ */ B({
|
|
|
5803
5690
|
});
|
|
5804
5691
|
if (!r.ok) throw Error(`Failed to start the questionnaire (${r.status})`);
|
|
5805
5692
|
let { leadId: i } = await r.json();
|
|
5806
|
-
return
|
|
5693
|
+
return Hr(o.link, {
|
|
5807
5694
|
leadid: i,
|
|
5808
5695
|
qaId: o.qaId,
|
|
5809
5696
|
template: o.thankyouPageTemplate
|
|
@@ -5823,7 +5710,7 @@ var _a = /* @__PURE__ */ B({
|
|
|
5823
5710
|
return (t, o) => (y(), i("form", {
|
|
5824
5711
|
class: "vd-form vd-form--vertical vd-form--card",
|
|
5825
5712
|
onSubmit: I(w, ["prevent", "stop"])
|
|
5826
|
-
}, [e.showTitle && e.title || e.description ? (y(), i("div",
|
|
5713
|
+
}, [e.showTitle && e.title || e.description ? (y(), i("div", Fa, [e.showTitle && e.title ? (y(), i("h2", Ia, T(e.title), 1)) : r("", !0), e.description ? (y(), i("p", La, T(e.description), 1)) : r("", !0)])) : r("", !0), a("div", Ra, [a("div", za, [c(E(kr), m({
|
|
5827
5714
|
modelValue: E(g),
|
|
5828
5715
|
"onUpdate:modelValue": o[0] ||= (e) => d(g) ? g.value = e : null
|
|
5829
5716
|
}, E(_), {
|
|
@@ -5834,7 +5721,7 @@ var _a = /* @__PURE__ */ B({
|
|
|
5834
5721
|
key: 0,
|
|
5835
5722
|
style: { "margin-top": "12px" },
|
|
5836
5723
|
text: "Dit bedrijf heeft geen geregistreerd bezoekadres. Voeg dit toe bij de KvK om door te gaan met de aanvraag."
|
|
5837
|
-
})) : r("", !0)]), a("div",
|
|
5724
|
+
})) : r("", !0)]), a("div", Ba, [c(E(Ne), {
|
|
5838
5725
|
type: "submit",
|
|
5839
5726
|
label: e.buttonText,
|
|
5840
5727
|
"is-loading": E(l),
|
|
@@ -5851,4 +5738,4 @@ var _a = /* @__PURE__ */ B({
|
|
|
5851
5738
|
}
|
|
5852
5739
|
});
|
|
5853
5740
|
//#endregion
|
|
5854
|
-
export {
|
|
5741
|
+
export { oi as BikeForm, ta as BusinessCarForm, ia as BusinessLiabilityForm, Qi as CarForm, _i as CaravanForm, Ea as ComparisonFormFlow, V as ComparisonName, ki as HouseForm, Mi as LegalForm, Ti as LiabilityForm, Vi as LoanForm, Ki as MopedForm, Yi as MotorForm, Fi as PackageForm, di as PetForm, Pa as QuestionnaireForm, Va as RiskScannerForm, Si as TravelForm, si as bikePresenter, na as businessCarPresenter, aa as businessLiabilityPresenter, $i as carPresenter, vi as caravanPresenter, Oa as configureQa, Ai as housePresenter, Ni as legalPresenter, Ei as liabilityPresenter, Ui as loanPresenter, qi as mopedPresenter, Xi as motorPresenter, Ii as packagePresenter, fi as petPresenter, Ci as travelPresenter, ua as useComparisonSubmit };
|