@vergelijkdirect/comparison-forms 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue/comparison-forms.d.ts +16 -1
- package/dist/vue/comparison-forms.js +333 -375
- package/dist/wc/comparison-forms.js +3028 -3149
- 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/company.schema-BLoMUJDa.cjs +1 -0
- package/dist/wc-forms/house.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/moped.cjs +1 -1
- package/dist/wc-forms/motor.cjs +1 -1
- package/dist/wc-forms/package.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 +1 -1
- 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
|
@@ -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
|
};
|
|
@@ -2238,11 +2192,11 @@ var Q = {
|
|
|
2238
2192
|
};
|
|
2239
2193
|
//#endregion
|
|
2240
2194
|
//#region src/schemas/birthdate.schema.ts
|
|
2241
|
-
function
|
|
2242
|
-
return
|
|
2195
|
+
function Wr(e) {
|
|
2196
|
+
return Lr(e, Mr) !== null;
|
|
2243
2197
|
}
|
|
2244
|
-
function $(e =
|
|
2245
|
-
return z().required(Q.birthdate.required).test("date_format", Q.birthdate.dateFormat,
|
|
2198
|
+
function $(e = jr) {
|
|
2199
|
+
return z().required(Q.birthdate.required).test("date_format", Q.birthdate.dateFormat, Wr).test(Ur({
|
|
2246
2200
|
min: {
|
|
2247
2201
|
value: e.min,
|
|
2248
2202
|
unit: "year"
|
|
@@ -2258,46 +2212,46 @@ function $(e = Fr) {
|
|
|
2258
2212
|
}
|
|
2259
2213
|
//#endregion
|
|
2260
2214
|
//#region src/schemas/rules.ts
|
|
2261
|
-
function
|
|
2215
|
+
function Gr(e, t) {
|
|
2262
2216
|
return z().required(t).oneOf(e, t);
|
|
2263
2217
|
}
|
|
2264
|
-
function
|
|
2218
|
+
function Kr(e) {
|
|
2265
2219
|
return z().required(e);
|
|
2266
2220
|
}
|
|
2267
|
-
function
|
|
2221
|
+
function qr(e) {
|
|
2268
2222
|
return Ce().typeError(e).required(e);
|
|
2269
2223
|
}
|
|
2270
2224
|
//#endregion
|
|
2271
2225
|
//#region src/schemas/familyComposition.schema.ts
|
|
2272
|
-
function
|
|
2273
|
-
return
|
|
2226
|
+
function Jr(e = Q.familyComposition.required) {
|
|
2227
|
+
return Gr(Nr, e);
|
|
2274
2228
|
}
|
|
2275
|
-
var
|
|
2229
|
+
var Yr = Jr(), Xr = Gr(Pr, Q.ownedBuilding.required), Zr = [1, 7], Qr = [3, 4], $r = {
|
|
2276
2230
|
raceOrMtb: 15e3,
|
|
2277
2231
|
default: 9999
|
|
2278
|
-
},
|
|
2232
|
+
}, ei = {
|
|
2279
2233
|
mask: "N####",
|
|
2280
2234
|
tokens: { N: { pattern: /[1-9]/ } }
|
|
2281
|
-
},
|
|
2235
|
+
}, ti = (e, t) => e.test("max-value", Q.bike.priceMax(t), (e) => {
|
|
2282
2236
|
let n = Number(e);
|
|
2283
2237
|
return Number.isNaN(n) || n <= t;
|
|
2284
|
-
}),
|
|
2285
|
-
kind:
|
|
2286
|
-
condition:
|
|
2238
|
+
}), ni = R({
|
|
2239
|
+
kind: qr(Q.bike.kindRequired),
|
|
2240
|
+
condition: qr(Q.bike.conditionRequired),
|
|
2287
2241
|
price: z().required(Q.bike.priceRequired).test("min-value", Q.bike.priceMin, (e) => {
|
|
2288
2242
|
if (!e) return !0;
|
|
2289
2243
|
let t = Number(e);
|
|
2290
2244
|
return Number.isNaN(t) || t > 0;
|
|
2291
2245
|
}).when("kind", {
|
|
2292
|
-
is: (e) =>
|
|
2293
|
-
then: (e) =>
|
|
2294
|
-
otherwise: (e) =>
|
|
2246
|
+
is: (e) => Qr.includes(Number(e)),
|
|
2247
|
+
then: (e) => ti(e, $r.raceOrMtb),
|
|
2248
|
+
otherwise: (e) => ti(e, $r.default)
|
|
2295
2249
|
}),
|
|
2296
2250
|
brand: z().when("kind", {
|
|
2297
|
-
is: (e) =>
|
|
2251
|
+
is: (e) => Zr.includes(Number(e)),
|
|
2298
2252
|
then: (e) => e.required(Q.bike.brandRequired)
|
|
2299
2253
|
})
|
|
2300
|
-
}),
|
|
2254
|
+
}), ri = [
|
|
2301
2255
|
{
|
|
2302
2256
|
value: 4,
|
|
2303
2257
|
title: "ATB / Mountainbike",
|
|
@@ -2364,13 +2318,13 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
2364
2318
|
name: "Vouwfiets",
|
|
2365
2319
|
isEBike: !1
|
|
2366
2320
|
}
|
|
2367
|
-
],
|
|
2321
|
+
], ii = [{
|
|
2368
2322
|
value: 1,
|
|
2369
2323
|
label: "Nieuw"
|
|
2370
2324
|
}, {
|
|
2371
2325
|
value: 0,
|
|
2372
2326
|
label: "Tweedehands"
|
|
2373
|
-
}],
|
|
2327
|
+
}], ai = [
|
|
2374
2328
|
{
|
|
2375
2329
|
id: "Ander merk",
|
|
2376
2330
|
name: "Ander merk"
|
|
@@ -3791,7 +3745,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3791
3745
|
id: "Zündapp",
|
|
3792
3746
|
name: "Zündapp"
|
|
3793
3747
|
}
|
|
3794
|
-
],
|
|
3748
|
+
], oi = /* @__PURE__ */ l({
|
|
3795
3749
|
__name: "BikeForm",
|
|
3796
3750
|
props: /*@__PURE__*/ f({
|
|
3797
3751
|
initialData: {},
|
|
@@ -3810,14 +3764,14 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3810
3764
|
}),
|
|
3811
3765
|
emits: ["submitted"],
|
|
3812
3766
|
setup(e, { emit: i }) {
|
|
3813
|
-
let a = e, o = q(a), s = i, { isSubmitting: l, handleSubmit: u, defineField: f, resetField: p } = Z(
|
|
3767
|
+
let a = e, o = q(a), s = i, { isSubmitting: l, handleSubmit: u, defineField: f, resetField: p } = Z(ni, {
|
|
3814
3768
|
kind: a.initialData?.kind ?? null,
|
|
3815
3769
|
condition: a.initialData?.condition ?? 1,
|
|
3816
3770
|
price: a.initialData?.price ?? "",
|
|
3817
3771
|
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(() =>
|
|
3772
|
+
}), [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
3773
|
N(h, (e) => {
|
|
3820
|
-
|
|
3774
|
+
Zr.includes(Number(e)) || p("brand", { value: "" });
|
|
3821
3775
|
}, { immediate: !0 });
|
|
3822
3776
|
function A() {
|
|
3823
3777
|
u((e) => {
|
|
@@ -3838,7 +3792,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3838
3792
|
"onUpdate:modelValue": i[0] ||= (e) => d(h) ? h.value = e : null,
|
|
3839
3793
|
modelModifiers: { number: !0 },
|
|
3840
3794
|
label: "Soort fiets",
|
|
3841
|
-
options: E(
|
|
3795
|
+
options: E(ri),
|
|
3842
3796
|
name: "kind",
|
|
3843
3797
|
required: !1,
|
|
3844
3798
|
"error-message": E(_)
|
|
@@ -3859,7 +3813,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3859
3813
|
"onUpdate:modelValue": i[1] ||= (e) => d(v) ? v.value = e : null,
|
|
3860
3814
|
label: "Merk fiets",
|
|
3861
3815
|
placeholder: "Typ of kies je merk",
|
|
3862
|
-
options: E(
|
|
3816
|
+
options: E(ai),
|
|
3863
3817
|
"label-key": "name",
|
|
3864
3818
|
"value-key": "id",
|
|
3865
3819
|
name: "brand",
|
|
@@ -3881,7 +3835,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3881
3835
|
"onUpdate:modelValue": i[2] ||= (e) => d(S) ? S.value = e : null,
|
|
3882
3836
|
legend: "Gekocht als",
|
|
3883
3837
|
name: "condition",
|
|
3884
|
-
options: E(
|
|
3838
|
+
options: E(ii),
|
|
3885
3839
|
variant: "boxed",
|
|
3886
3840
|
required: !1,
|
|
3887
3841
|
"error-message": E(w)
|
|
@@ -3903,7 +3857,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3903
3857
|
placeholder: "bv. 1 000",
|
|
3904
3858
|
icon: "far fa-euro-sign",
|
|
3905
3859
|
name: "price",
|
|
3906
|
-
mask: E(
|
|
3860
|
+
mask: E(ei),
|
|
3907
3861
|
inputmode: "numeric",
|
|
3908
3862
|
required: !1,
|
|
3909
3863
|
"error-message": E(O)
|
|
@@ -3921,7 +3875,7 @@ var $r = Qr(), ei = Yr(Rr, Q.ownedBuilding.required), ti = [1, 7], ni = [3, 4],
|
|
|
3921
3875
|
});
|
|
3922
3876
|
//#endregion
|
|
3923
3877
|
//#region src/comparisons/bike/bike.presenter.ts
|
|
3924
|
-
function
|
|
3878
|
+
function si(e) {
|
|
3925
3879
|
return {
|
|
3926
3880
|
comparison: V.Bike,
|
|
3927
3881
|
detail: { bike: {
|
|
@@ -3935,27 +3889,27 @@ function di(e) {
|
|
|
3935
3889
|
}
|
|
3936
3890
|
//#endregion
|
|
3937
3891
|
//#region src/comparisons/pet/constants.ts
|
|
3938
|
-
var
|
|
3892
|
+
var ci = {
|
|
3939
3893
|
min: 0,
|
|
3940
3894
|
max: 99
|
|
3941
|
-
},
|
|
3895
|
+
}, li = R({
|
|
3942
3896
|
kind: z().required(Q.pet.kindRequired),
|
|
3943
|
-
age: z().required(Q.birthdate.required).test("date_format", Q.birthdate.dateFormat,
|
|
3897
|
+
age: z().required(Q.birthdate.required).test("date_format", Q.birthdate.dateFormat, Wr).test(Ur({
|
|
3944
3898
|
min: {
|
|
3945
3899
|
value: 7,
|
|
3946
3900
|
unit: "week"
|
|
3947
3901
|
},
|
|
3948
3902
|
max: {
|
|
3949
|
-
value:
|
|
3903
|
+
value: ci.max,
|
|
3950
3904
|
unit: "year"
|
|
3951
3905
|
}
|
|
3952
3906
|
}, {
|
|
3953
|
-
future: () => Q.birthdate.tooYoung(
|
|
3954
|
-
tooYoung: ({ earliest: e, latest: t }) => Q.pet.outOfRange(e.format(
|
|
3955
|
-
tooOld: () => Q.birthdate.tooOld(
|
|
3907
|
+
future: () => Q.birthdate.tooYoung(ci.min),
|
|
3908
|
+
tooYoung: ({ earliest: e, latest: t }) => Q.pet.outOfRange(e.format(Mr), t.format(Mr)),
|
|
3909
|
+
tooOld: () => Q.birthdate.tooOld(ci.max)
|
|
3956
3910
|
}, "birthdate_range")),
|
|
3957
3911
|
zipCode: z().required(Q.pet.zipCodeRequired).matches(/^\d{4}\s?[a-zA-Z]{2}$/, Q.pet.zipCodeInvalid)
|
|
3958
|
-
}),
|
|
3912
|
+
}), ui = [
|
|
3959
3913
|
{
|
|
3960
3914
|
title: "Hond",
|
|
3961
3915
|
value: "dog"
|
|
@@ -3972,7 +3926,7 @@ var fi = {
|
|
|
3972
3926
|
title: "Vogel",
|
|
3973
3927
|
value: "bird"
|
|
3974
3928
|
}
|
|
3975
|
-
],
|
|
3929
|
+
], di = /* @__PURE__ */ l({
|
|
3976
3930
|
__name: "PetForm",
|
|
3977
3931
|
props: /*@__PURE__*/ f({
|
|
3978
3932
|
initialData: {},
|
|
@@ -3991,7 +3945,7 @@ var fi = {
|
|
|
3991
3945
|
}),
|
|
3992
3946
|
emits: ["submitted"],
|
|
3993
3947
|
setup(e, { emit: t }) {
|
|
3994
|
-
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(
|
|
3948
|
+
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(li, {
|
|
3995
3949
|
kind: r.initialData?.kind ?? "dog",
|
|
3996
3950
|
age: r.initialData?.age ?? "",
|
|
3997
3951
|
zipCode: r.initialData?.zipCode ?? ""
|
|
@@ -4015,7 +3969,7 @@ var fi = {
|
|
|
4015
3969
|
"onUpdate:modelValue": r[0] ||= (e) => d(u) ? u.value = e : null,
|
|
4016
3970
|
label: "Wat voor huisdier wil je verzekeren?",
|
|
4017
3971
|
placeholder: "",
|
|
4018
|
-
options: E(
|
|
3972
|
+
options: E(ui),
|
|
4019
3973
|
name: "kind",
|
|
4020
3974
|
required: !1,
|
|
4021
3975
|
"error-message": E(p)
|
|
@@ -4084,7 +4038,7 @@ var fi = {
|
|
|
4084
4038
|
});
|
|
4085
4039
|
//#endregion
|
|
4086
4040
|
//#region src/comparisons/pet/pet.presenter.ts
|
|
4087
|
-
function
|
|
4041
|
+
function fi(e) {
|
|
4088
4042
|
return {
|
|
4089
4043
|
comparison: V.Pet,
|
|
4090
4044
|
detail: { pet: {
|
|
@@ -4096,11 +4050,11 @@ function gi(e) {
|
|
|
4096
4050
|
}
|
|
4097
4051
|
//#endregion
|
|
4098
4052
|
//#region src/comparisons/caravan/caravan.schema.ts
|
|
4099
|
-
var
|
|
4100
|
-
TypeOfCaravan:
|
|
4101
|
-
NewOrOccasion:
|
|
4102
|
-
BuildYear:
|
|
4103
|
-
}),
|
|
4053
|
+
var pi = R({
|
|
4054
|
+
TypeOfCaravan: Kr(Q.caravan.typeOfCaravanRequired),
|
|
4055
|
+
NewOrOccasion: Gr(Pr, Q.caravan.newOrOccasionRequired),
|
|
4056
|
+
BuildYear: Kr(Q.caravan.buildYearRequired)
|
|
4057
|
+
}), mi = [
|
|
4104
4058
|
{
|
|
4105
4059
|
value: "CS",
|
|
4106
4060
|
title: "Stacaravan"
|
|
@@ -4113,7 +4067,7 @@ var _i = R({
|
|
|
4113
4067
|
value: "CV",
|
|
4114
4068
|
title: "Vouwwagen"
|
|
4115
4069
|
}
|
|
4116
|
-
],
|
|
4070
|
+
], hi = [{
|
|
4117
4071
|
value: U.Yes,
|
|
4118
4072
|
label: "Nieuw"
|
|
4119
4073
|
}, {
|
|
@@ -4122,8 +4076,8 @@ var _i = R({
|
|
|
4122
4076
|
}];
|
|
4123
4077
|
//#endregion
|
|
4124
4078
|
//#region src/comparisons/caravan/models/buildYears.model.ts
|
|
4125
|
-
function
|
|
4126
|
-
let e =
|
|
4079
|
+
function gi() {
|
|
4080
|
+
let e = Ir();
|
|
4127
4081
|
return Array.from({ length: 126 }, (t, n) => ({
|
|
4128
4082
|
title: String(e - n),
|
|
4129
4083
|
value: String(e - n)
|
|
@@ -4131,7 +4085,7 @@ function bi() {
|
|
|
4131
4085
|
}
|
|
4132
4086
|
//#endregion
|
|
4133
4087
|
//#region src/comparisons/caravan/CaravanForm.vue
|
|
4134
|
-
var
|
|
4088
|
+
var _i = /* @__PURE__ */ l({
|
|
4135
4089
|
__name: "CaravanForm",
|
|
4136
4090
|
props: /*@__PURE__*/ f({
|
|
4137
4091
|
initialData: {},
|
|
@@ -4150,7 +4104,7 @@ var xi = /* @__PURE__ */ l({
|
|
|
4150
4104
|
}),
|
|
4151
4105
|
emits: ["submitted"],
|
|
4152
4106
|
setup(e, { emit: t }) {
|
|
4153
|
-
let r = e, i = q(r), a = t, o =
|
|
4107
|
+
let r = e, i = q(r), a = t, o = gi(), { isSubmitting: s, handleSubmit: l, defineField: u } = Z(pi, {
|
|
4154
4108
|
TypeOfCaravan: r.initialData?.TypeOfCaravan ?? null,
|
|
4155
4109
|
NewOrOccasion: r.initialData?.NewOrOccasion ?? U.Yes,
|
|
4156
4110
|
BuildYear: r.initialData?.BuildYear ?? null
|
|
@@ -4173,7 +4127,7 @@ var xi = /* @__PURE__ */ l({
|
|
|
4173
4127
|
modelValue: E(f),
|
|
4174
4128
|
"onUpdate:modelValue": r[0] ||= (e) => d(f) ? f.value = e : null,
|
|
4175
4129
|
label: "Soort caravan",
|
|
4176
|
-
options: E(
|
|
4130
|
+
options: E(mi),
|
|
4177
4131
|
name: "typeOfCaravan",
|
|
4178
4132
|
required: !1,
|
|
4179
4133
|
"error-message": E(h)
|
|
@@ -4193,7 +4147,7 @@ var xi = /* @__PURE__ */ l({
|
|
|
4193
4147
|
"onUpdate:modelValue": r[1] ||= (e) => d(g) ? g.value = e : null,
|
|
4194
4148
|
legend: "Gekocht als",
|
|
4195
4149
|
name: "newOrOccasion",
|
|
4196
|
-
options: E(
|
|
4150
|
+
options: E(hi),
|
|
4197
4151
|
variant: "boxed",
|
|
4198
4152
|
required: !1,
|
|
4199
4153
|
"error-message": E(v)
|
|
@@ -4230,7 +4184,7 @@ var xi = /* @__PURE__ */ l({
|
|
|
4230
4184
|
});
|
|
4231
4185
|
//#endregion
|
|
4232
4186
|
//#region src/comparisons/caravan/caravan.presenter.ts
|
|
4233
|
-
function
|
|
4187
|
+
function vi(e) {
|
|
4234
4188
|
return {
|
|
4235
4189
|
comparison: V.Caravan,
|
|
4236
4190
|
detail: { caravan: {
|
|
@@ -4243,18 +4197,18 @@ function Si(e) {
|
|
|
4243
4197
|
}
|
|
4244
4198
|
//#endregion
|
|
4245
4199
|
//#region src/comparisons/travel/paymentTerm.enum.ts
|
|
4246
|
-
var
|
|
4200
|
+
var yi = /* @__PURE__ */ function(e) {
|
|
4247
4201
|
return e.Continuous = "L", e.ShortTerm = "S", e;
|
|
4248
|
-
}({}),
|
|
4249
|
-
PaymentTerm:
|
|
4202
|
+
}({}), bi = R({
|
|
4203
|
+
PaymentTerm: Gr([yi.Continuous, yi.ShortTerm], Q.travel.paymentTermRequired),
|
|
4250
4204
|
birthdate: $()
|
|
4251
|
-
}),
|
|
4252
|
-
value:
|
|
4205
|
+
}), xi = [{
|
|
4206
|
+
value: yi.Continuous,
|
|
4253
4207
|
label: "Doorlopend"
|
|
4254
4208
|
}, {
|
|
4255
|
-
value:
|
|
4209
|
+
value: yi.ShortTerm,
|
|
4256
4210
|
label: "Kortlopend"
|
|
4257
|
-
}],
|
|
4211
|
+
}], Si = /* @__PURE__ */ l({
|
|
4258
4212
|
__name: "TravelForm",
|
|
4259
4213
|
props: /*@__PURE__*/ f({
|
|
4260
4214
|
initialData: {},
|
|
@@ -4273,8 +4227,8 @@ var Ci = /* @__PURE__ */ function(e) {
|
|
|
4273
4227
|
}),
|
|
4274
4228
|
emits: ["submitted"],
|
|
4275
4229
|
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 ??
|
|
4230
|
+
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(bi, {
|
|
4231
|
+
PaymentTerm: r.initialData?.PaymentTerm ?? yi.Continuous,
|
|
4278
4232
|
birthdate: r.initialData?.birthdate ?? ""
|
|
4279
4233
|
}), [u, f, p] = l("PaymentTerm", { validateAt: "change" }), [h, g, _] = l("birthdate");
|
|
4280
4234
|
function v() {
|
|
@@ -4295,7 +4249,7 @@ var Ci = /* @__PURE__ */ function(e) {
|
|
|
4295
4249
|
"onUpdate:modelValue": r[0] ||= (e) => d(u) ? u.value = e : null,
|
|
4296
4250
|
legend: "Kies je dekking",
|
|
4297
4251
|
name: "PaymentTerm",
|
|
4298
|
-
options: E(
|
|
4252
|
+
options: E(xi),
|
|
4299
4253
|
variant: "boxed",
|
|
4300
4254
|
required: !1,
|
|
4301
4255
|
"error-message": E(p)
|
|
@@ -4333,7 +4287,7 @@ var Ci = /* @__PURE__ */ function(e) {
|
|
|
4333
4287
|
});
|
|
4334
4288
|
//#endregion
|
|
4335
4289
|
//#region src/comparisons/travel/travel.presenter.ts
|
|
4336
|
-
function
|
|
4290
|
+
function Ci(e) {
|
|
4337
4291
|
return {
|
|
4338
4292
|
comparison: V.Travel,
|
|
4339
4293
|
detail: { comparison: { PaymentTerm: e.PaymentTerm } },
|
|
@@ -4342,11 +4296,11 @@ function Di(e) {
|
|
|
4342
4296
|
}
|
|
4343
4297
|
//#endregion
|
|
4344
4298
|
//#region src/comparisons/liability/liability.schema.ts
|
|
4345
|
-
var
|
|
4299
|
+
var wi = (e) => R({
|
|
4346
4300
|
address: e,
|
|
4347
4301
|
birthdate: $(),
|
|
4348
|
-
familyComposition:
|
|
4349
|
-
}),
|
|
4302
|
+
familyComposition: Yr
|
|
4303
|
+
}), Ti = /* @__PURE__ */ l({
|
|
4350
4304
|
__name: "LiabilityForm",
|
|
4351
4305
|
props: /*@__PURE__*/ f({
|
|
4352
4306
|
initialData: {},
|
|
@@ -4365,7 +4319,7 @@ var Oi = (e) => R({
|
|
|
4365
4319
|
}),
|
|
4366
4320
|
emits: ["submitted"],
|
|
4367
4321
|
setup(e, { emit: t }) {
|
|
4368
|
-
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } =
|
|
4322
|
+
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
4323
|
birthdate: r.initialData?.birthdate ?? "",
|
|
4370
4324
|
familyComposition: r.initialData?.familyComposition ?? H.SingleWithoutChildren,
|
|
4371
4325
|
address: s
|
|
@@ -4424,7 +4378,7 @@ var Oi = (e) => R({
|
|
|
4424
4378
|
});
|
|
4425
4379
|
//#endregion
|
|
4426
4380
|
//#region src/comparisons/liability/liability.presenter.ts
|
|
4427
|
-
function
|
|
4381
|
+
function Ei(e) {
|
|
4428
4382
|
return {
|
|
4429
4383
|
comparison: V.Liability,
|
|
4430
4384
|
detail: { liability: {
|
|
@@ -4444,17 +4398,17 @@ function Ai(e) {
|
|
|
4444
4398
|
}
|
|
4445
4399
|
//#endregion
|
|
4446
4400
|
//#region src/models/houseOwnedBuilding.model.ts
|
|
4447
|
-
var
|
|
4401
|
+
var Di = [{
|
|
4448
4402
|
value: U.Yes,
|
|
4449
4403
|
label: "Gekocht"
|
|
4450
4404
|
}, {
|
|
4451
4405
|
value: U.No,
|
|
4452
4406
|
label: "Verhuurd"
|
|
4453
|
-
}],
|
|
4407
|
+
}], Oi = (e) => R({
|
|
4454
4408
|
address: e,
|
|
4455
|
-
ownedBuilding:
|
|
4456
|
-
familyComposition:
|
|
4457
|
-
}),
|
|
4409
|
+
ownedBuilding: Xr,
|
|
4410
|
+
familyComposition: Jr(Q.house.familyCompositionRequired)
|
|
4411
|
+
}), ki = /* @__PURE__ */ l({
|
|
4458
4412
|
__name: "HouseForm",
|
|
4459
4413
|
props: /*@__PURE__*/ f({
|
|
4460
4414
|
initialData: {},
|
|
@@ -4473,7 +4427,7 @@ var ji = [{
|
|
|
4473
4427
|
}),
|
|
4474
4428
|
emits: ["submitted"],
|
|
4475
4429
|
setup(e, { emit: t }) {
|
|
4476
|
-
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } =
|
|
4430
|
+
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
4431
|
ownedBuilding: r.initialData?.ownedBuilding ?? U.Yes,
|
|
4478
4432
|
familyComposition: r.initialData?.familyComposition ?? H.SingleWithoutChildren,
|
|
4479
4433
|
address: s
|
|
@@ -4512,7 +4466,7 @@ var ji = [{
|
|
|
4512
4466
|
"onUpdate:modelValue": r[1] ||= (e) => d(g) ? g.value = e : null,
|
|
4513
4467
|
legend: "Jouw woning is...",
|
|
4514
4468
|
name: "ownedBuilding",
|
|
4515
|
-
options: E(
|
|
4469
|
+
options: E(Di),
|
|
4516
4470
|
variant: "boxed",
|
|
4517
4471
|
required: !1,
|
|
4518
4472
|
"error-message": E(v)
|
|
@@ -4541,7 +4495,7 @@ var ji = [{
|
|
|
4541
4495
|
});
|
|
4542
4496
|
//#endregion
|
|
4543
4497
|
//#region src/comparisons/house/house.presenter.ts
|
|
4544
|
-
function
|
|
4498
|
+
function Ai(e) {
|
|
4545
4499
|
return {
|
|
4546
4500
|
comparison: V.Housing,
|
|
4547
4501
|
detail: { house: { ownedBuilding: e.ownedBuilding } },
|
|
@@ -4557,22 +4511,22 @@ function Pi(e) {
|
|
|
4557
4511
|
}
|
|
4558
4512
|
//#endregion
|
|
4559
4513
|
//#region src/comparisons/legal/constants.ts
|
|
4560
|
-
var
|
|
4514
|
+
var ji = H.SingleWithChildren, Mi = (e) => R({
|
|
4561
4515
|
address: e,
|
|
4562
|
-
ownedBuilding:
|
|
4516
|
+
ownedBuilding: Xr,
|
|
4563
4517
|
birthdate: $(),
|
|
4564
|
-
familyComposition:
|
|
4518
|
+
familyComposition: Yr,
|
|
4565
4519
|
familySize: z().defined().when("familyComposition", {
|
|
4566
|
-
is:
|
|
4520
|
+
is: ji,
|
|
4567
4521
|
then: (e) => e.required(Q.legal.familySizeRequired)
|
|
4568
4522
|
})
|
|
4569
|
-
}),
|
|
4523
|
+
}), Ni = [{
|
|
4570
4524
|
title: "Alleenstaande met 1 kind",
|
|
4571
4525
|
value: "2"
|
|
4572
4526
|
}, {
|
|
4573
4527
|
title: "Alleenstaande met 2 of meer kinderen",
|
|
4574
4528
|
value: "3"
|
|
4575
|
-
}],
|
|
4529
|
+
}], Pi = /* @__PURE__ */ l({
|
|
4576
4530
|
__name: "LegalForm",
|
|
4577
4531
|
props: /*@__PURE__*/ f({
|
|
4578
4532
|
initialData: {},
|
|
@@ -4591,15 +4545,15 @@ var Fi = H.SingleWithChildren, Ii = (e) => R({
|
|
|
4591
4545
|
}),
|
|
4592
4546
|
emits: ["submitted"],
|
|
4593
4547
|
setup(e, { emit: i }) {
|
|
4594
|
-
let a = e, o = q(a), s = i, { addressSchema: l, draft: u, resolvedAddress: f, additionOptions: p } =
|
|
4548
|
+
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(Mi(l), {
|
|
4595
4549
|
ownedBuilding: a.initialData?.ownedBuilding ?? U.Yes,
|
|
4596
4550
|
birthdate: a.initialData?.birthdate ?? "",
|
|
4597
4551
|
familyComposition: a.initialData?.familyComposition ?? H.SingleWithoutChildren,
|
|
4598
4552
|
familySize: a.initialData?.familySize ?? "",
|
|
4599
4553
|
address: u
|
|
4600
|
-
}), [b, x, S] = _("ownedBuilding"), [C, w, T] = _("birthdate"), [D, O, k] = _("familyComposition", { validateAt: "change" }), [A, j, M] = _("familySize", { validateAt: "change" }), F = t(() => D.value ===
|
|
4554
|
+
}), [b, x, S] = _("ownedBuilding"), [C, w, T] = _("birthdate"), [D, O, k] = _("familyComposition", { validateAt: "change" }), [A, j, M] = _("familySize", { validateAt: "change" }), F = t(() => D.value === ji);
|
|
4601
4555
|
N(D, (e) => {
|
|
4602
|
-
e !==
|
|
4556
|
+
e !== ji && v("familySize", { value: "" });
|
|
4603
4557
|
}, { immediate: !0 });
|
|
4604
4558
|
function I() {
|
|
4605
4559
|
g(({ ownedBuilding: e, birthdate: t, familyComposition: n, familySize: r }) => {
|
|
@@ -4637,7 +4591,7 @@ var Fi = H.SingleWithChildren, Ii = (e) => R({
|
|
|
4637
4591
|
"onUpdate:modelValue": i[1] ||= (e) => d(b) ? b.value = e : null,
|
|
4638
4592
|
legend: "Jouw woning is...",
|
|
4639
4593
|
name: "ownedBuilding",
|
|
4640
|
-
options: E(
|
|
4594
|
+
options: E(Di),
|
|
4641
4595
|
variant: "boxed",
|
|
4642
4596
|
required: !1,
|
|
4643
4597
|
"error-message": E(S)
|
|
@@ -4680,7 +4634,7 @@ var Fi = H.SingleWithChildren, Ii = (e) => R({
|
|
|
4680
4634
|
"onUpdate:modelValue": i[4] ||= (e) => d(A) ? A.value = e : null,
|
|
4681
4635
|
label: "Aantal kinderen",
|
|
4682
4636
|
placeholder: "Maak een keuze",
|
|
4683
|
-
options: E(
|
|
4637
|
+
options: E(Ni),
|
|
4684
4638
|
name: "familySize",
|
|
4685
4639
|
required: !1,
|
|
4686
4640
|
"error-message": E(M)
|
|
@@ -4698,11 +4652,11 @@ var Fi = H.SingleWithChildren, Ii = (e) => R({
|
|
|
4698
4652
|
});
|
|
4699
4653
|
//#endregion
|
|
4700
4654
|
//#region src/comparisons/legal/legal.presenter.ts
|
|
4701
|
-
function
|
|
4655
|
+
function Fi(e) {
|
|
4702
4656
|
return {
|
|
4703
4657
|
comparison: V.LegalAssistance,
|
|
4704
4658
|
detail: { comparison: {
|
|
4705
|
-
familySize: e.familyComposition ===
|
|
4659
|
+
familySize: e.familyComposition === ji ? e.familySize : "",
|
|
4706
4660
|
deductables: 300,
|
|
4707
4661
|
ownedBuilding: e.ownedBuilding
|
|
4708
4662
|
} },
|
|
@@ -4719,15 +4673,15 @@ function zi(e) {
|
|
|
4719
4673
|
}
|
|
4720
4674
|
//#endregion
|
|
4721
4675
|
//#region src/comparisons/package/package.schema.ts
|
|
4722
|
-
var
|
|
4676
|
+
var Ii = (e) => R({
|
|
4723
4677
|
address: e,
|
|
4724
4678
|
birthdate: $(),
|
|
4725
|
-
familyComposition:
|
|
4679
|
+
familyComposition: Yr,
|
|
4726
4680
|
partnerBirthdate: z().defined().when("familyComposition", {
|
|
4727
|
-
is:
|
|
4681
|
+
is: Br,
|
|
4728
4682
|
then: () => $()
|
|
4729
4683
|
})
|
|
4730
|
-
}),
|
|
4684
|
+
}), Li = /* @__PURE__ */ l({
|
|
4731
4685
|
__name: "PackageForm",
|
|
4732
4686
|
props: /*@__PURE__*/ f({
|
|
4733
4687
|
initialData: {},
|
|
@@ -4746,14 +4700,14 @@ var Bi = (e) => R({
|
|
|
4746
4700
|
}),
|
|
4747
4701
|
emits: ["submitted"],
|
|
4748
4702
|
setup(e, { emit: i }) {
|
|
4749
|
-
let a = e, o = q(a), s = i, { addressSchema: l, draft: u, resolvedAddress: f, additionOptions: p } =
|
|
4703
|
+
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(Ii(l), {
|
|
4750
4704
|
birthdate: a.initialData?.birthdate ?? "",
|
|
4751
4705
|
familyComposition: a.initialData?.familyComposition ?? H.SingleWithoutChildren,
|
|
4752
4706
|
partnerBirthdate: a.initialData?.partnerBirthdate ?? "",
|
|
4753
4707
|
address: u
|
|
4754
|
-
}), [b, x, S] = _("birthdate"), [C, w, T] = _("familyComposition", { validateAt: "change" }), [D, O, k] = _("partnerBirthdate"), A = t(() =>
|
|
4708
|
+
}), [b, x, S] = _("birthdate"), [C, w, T] = _("familyComposition", { validateAt: "change" }), [D, O, k] = _("partnerBirthdate"), A = t(() => Br(C.value));
|
|
4755
4709
|
N(C, (e) => {
|
|
4756
|
-
|
|
4710
|
+
Br(e) || v("partnerBirthdate", { value: "" });
|
|
4757
4711
|
}, { immediate: !0 });
|
|
4758
4712
|
function j() {
|
|
4759
4713
|
g(({ birthdate: e, familyComposition: t, partnerBirthdate: n }) => {
|
|
@@ -4825,7 +4779,7 @@ var Bi = (e) => R({
|
|
|
4825
4779
|
});
|
|
4826
4780
|
//#endregion
|
|
4827
4781
|
//#region src/comparisons/package/package.presenter.ts
|
|
4828
|
-
function
|
|
4782
|
+
function Ri(e) {
|
|
4829
4783
|
return {
|
|
4830
4784
|
comparison: V.Package,
|
|
4831
4785
|
detail: { partner: { birthdate: e.partnerBirthdate } },
|
|
@@ -4842,18 +4796,18 @@ function Hi(e) {
|
|
|
4842
4796
|
}
|
|
4843
4797
|
//#endregion
|
|
4844
4798
|
//#region src/comparisons/loan/constants.ts
|
|
4845
|
-
var
|
|
4799
|
+
var zi = {
|
|
4846
4800
|
min: 21,
|
|
4847
4801
|
max: 74
|
|
4848
|
-
},
|
|
4802
|
+
}, Bi = {
|
|
4849
4803
|
min: 3500,
|
|
4850
4804
|
max: 75e3
|
|
4851
|
-
},
|
|
4805
|
+
}, Vi = R({
|
|
4852
4806
|
LoanPurpose: z().required(Q.loan.purposeRequired),
|
|
4853
|
-
LoanAmount:
|
|
4854
|
-
birthdate: $(
|
|
4855
|
-
familyComposition:
|
|
4856
|
-
}),
|
|
4807
|
+
LoanAmount: qr(Q.loan.amountRequired).min(Bi.min, Q.loan.amountMin(Bi.min)).max(Bi.max, Q.loan.amountMax(Bi.max)),
|
|
4808
|
+
birthdate: $(zi),
|
|
4809
|
+
familyComposition: Yr
|
|
4810
|
+
}), Hi = [
|
|
4857
4811
|
{
|
|
4858
4812
|
title: "Aankoop auto",
|
|
4859
4813
|
value: "02"
|
|
@@ -4902,7 +4856,7 @@ var Ui = {
|
|
|
4902
4856
|
title: "Anders",
|
|
4903
4857
|
value: "99"
|
|
4904
4858
|
}
|
|
4905
|
-
],
|
|
4859
|
+
], Ui = /* @__PURE__ */ l({
|
|
4906
4860
|
__name: "LoanForm",
|
|
4907
4861
|
props: /*@__PURE__*/ f({
|
|
4908
4862
|
initialData: {},
|
|
@@ -4921,7 +4875,7 @@ var Ui = {
|
|
|
4921
4875
|
}),
|
|
4922
4876
|
emits: ["submitted"],
|
|
4923
4877
|
setup(e, { emit: t }) {
|
|
4924
|
-
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(
|
|
4878
|
+
let r = e, i = q(r), a = t, { isSubmitting: o, handleSubmit: s, defineField: l } = Z(Vi, {
|
|
4925
4879
|
LoanPurpose: r.initialData?.LoanPurpose ?? "",
|
|
4926
4880
|
LoanAmount: r.initialData?.LoanAmount ?? null,
|
|
4927
4881
|
birthdate: r.initialData?.birthdate ?? "",
|
|
@@ -4946,7 +4900,7 @@ var Ui = {
|
|
|
4946
4900
|
"onUpdate:modelValue": r[0] ||= (e) => d(u) ? u.value = e : null,
|
|
4947
4901
|
label: "Leendoel",
|
|
4948
4902
|
placeholder: "Maak een keuze",
|
|
4949
|
-
options: E(
|
|
4903
|
+
options: E(Hi),
|
|
4950
4904
|
name: "LoanPurpose",
|
|
4951
4905
|
required: !1,
|
|
4952
4906
|
"error-message": E(p)
|
|
@@ -5005,19 +4959,19 @@ var Ui = {
|
|
|
5005
4959
|
});
|
|
5006
4960
|
//#endregion
|
|
5007
4961
|
//#region src/comparisons/loan/loan.presenter.ts
|
|
5008
|
-
function
|
|
5009
|
-
let t =
|
|
4962
|
+
function Wi(e) {
|
|
4963
|
+
let t = Lr(e, Mr);
|
|
5010
4964
|
if (!t) return 120;
|
|
5011
4965
|
let n = t.add(76, "year").diff(ke(), "month", !0), r = Math.floor(n / 12) * 12;
|
|
5012
4966
|
return Math.min(r, 120);
|
|
5013
4967
|
}
|
|
5014
|
-
function
|
|
4968
|
+
function Gi(e) {
|
|
5015
4969
|
return {
|
|
5016
4970
|
comparison: V.Loan,
|
|
5017
4971
|
detail: { loan: {
|
|
5018
4972
|
LoanPurpose: e.LoanPurpose,
|
|
5019
4973
|
LoanAmount: e.LoanAmount,
|
|
5020
|
-
MaxDurationByLegalLimit:
|
|
4974
|
+
MaxDurationByLegalLimit: Wi(e.birthdate)
|
|
5021
4975
|
} },
|
|
5022
4976
|
user: {
|
|
5023
4977
|
birthdate: e.birthdate,
|
|
@@ -5027,14 +4981,14 @@ function Yi(e) {
|
|
|
5027
4981
|
}
|
|
5028
4982
|
//#endregion
|
|
5029
4983
|
//#region src/comparisons/moped/constants.ts
|
|
5030
|
-
var
|
|
4984
|
+
var Ki = {
|
|
5031
4985
|
min: 16,
|
|
5032
4986
|
max: 99
|
|
5033
|
-
},
|
|
4987
|
+
}, qi = (e, t) => R({
|
|
5034
4988
|
licensePlate: e,
|
|
5035
4989
|
address: t,
|
|
5036
|
-
birthdate: $(
|
|
5037
|
-
}),
|
|
4990
|
+
birthdate: $(Ki)
|
|
4991
|
+
}), Ji = /* @__PURE__ */ l({
|
|
5038
4992
|
__name: "MopedForm",
|
|
5039
4993
|
props: /*@__PURE__*/ f({
|
|
5040
4994
|
initialData: {},
|
|
@@ -5053,7 +5007,7 @@ var Xi = {
|
|
|
5053
5007
|
}),
|
|
5054
5008
|
emits: ["submitted"],
|
|
5055
5009
|
setup(e, { emit: t }) {
|
|
5056
|
-
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } =
|
|
5010
|
+
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(qi(p, o), {
|
|
5057
5011
|
licensePlate: r.initialData?.licensePlate ?? "",
|
|
5058
5012
|
birthdate: r.initialData?.birthdate ?? "",
|
|
5059
5013
|
address: s
|
|
@@ -5077,7 +5031,7 @@ var Xi = {
|
|
|
5077
5031
|
span: "3",
|
|
5078
5032
|
md: "6"
|
|
5079
5033
|
}, {
|
|
5080
|
-
default: P(() => [c(E(
|
|
5034
|
+
default: P(() => [c(E(Qn), m({
|
|
5081
5035
|
modelValue: E(v),
|
|
5082
5036
|
"onUpdate:modelValue": r[0] ||= (e) => d(v) ? v.value = e : null,
|
|
5083
5037
|
"vehicle-data": E(f),
|
|
@@ -5134,7 +5088,7 @@ var Xi = {
|
|
|
5134
5088
|
});
|
|
5135
5089
|
//#endregion
|
|
5136
5090
|
//#region src/comparisons/moped/moped.presenter.ts
|
|
5137
|
-
function
|
|
5091
|
+
function Yi(e) {
|
|
5138
5092
|
return {
|
|
5139
5093
|
comparison: V.Moped,
|
|
5140
5094
|
detail: { moped: { ...e.vehicle } },
|
|
@@ -5151,11 +5105,11 @@ function $i(e) {
|
|
|
5151
5105
|
}
|
|
5152
5106
|
//#endregion
|
|
5153
5107
|
//#region src/comparisons/motor/motor.schema.ts
|
|
5154
|
-
var
|
|
5108
|
+
var Xi = (e, t) => R({
|
|
5155
5109
|
licensePlate: e,
|
|
5156
5110
|
address: t,
|
|
5157
5111
|
birthdate: $()
|
|
5158
|
-
}),
|
|
5112
|
+
}), Zi = /* @__PURE__ */ l({
|
|
5159
5113
|
__name: "MotorForm",
|
|
5160
5114
|
props: /*@__PURE__*/ f({
|
|
5161
5115
|
initialData: {},
|
|
@@ -5174,7 +5128,7 @@ var ea = (e, t) => R({
|
|
|
5174
5128
|
}),
|
|
5175
5129
|
emits: ["submitted"],
|
|
5176
5130
|
setup(e, { emit: t }) {
|
|
5177
|
-
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } =
|
|
5131
|
+
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(Xi(p, o), {
|
|
5178
5132
|
licensePlate: r.initialData?.licensePlate ?? "",
|
|
5179
5133
|
birthdate: r.initialData?.birthdate ?? "",
|
|
5180
5134
|
address: s
|
|
@@ -5198,7 +5152,7 @@ var ea = (e, t) => R({
|
|
|
5198
5152
|
span: "3",
|
|
5199
5153
|
md: "6"
|
|
5200
5154
|
}, {
|
|
5201
|
-
default: P(() => [c(E(
|
|
5155
|
+
default: P(() => [c(E(Qn), m({
|
|
5202
5156
|
modelValue: E(v),
|
|
5203
5157
|
"onUpdate:modelValue": r[0] ||= (e) => d(v) ? v.value = e : null,
|
|
5204
5158
|
"vehicle-data": E(f),
|
|
@@ -5255,7 +5209,7 @@ var ea = (e, t) => R({
|
|
|
5255
5209
|
});
|
|
5256
5210
|
//#endregion
|
|
5257
5211
|
//#region src/comparisons/motor/motor.presenter.ts
|
|
5258
|
-
function
|
|
5212
|
+
function Qi(e) {
|
|
5259
5213
|
return {
|
|
5260
5214
|
comparison: V.Motor,
|
|
5261
5215
|
detail: { motor: { ...e.vehicle } },
|
|
@@ -5272,11 +5226,11 @@ function na(e) {
|
|
|
5272
5226
|
}
|
|
5273
5227
|
//#endregion
|
|
5274
5228
|
//#region src/comparisons/car/car.schema.ts
|
|
5275
|
-
var
|
|
5229
|
+
var $i = (e, t) => R({
|
|
5276
5230
|
licensePlate: e,
|
|
5277
5231
|
address: t,
|
|
5278
5232
|
birthdate: $()
|
|
5279
|
-
}),
|
|
5233
|
+
}), ea = /* @__PURE__ */ l({
|
|
5280
5234
|
__name: "CarForm",
|
|
5281
5235
|
props: /*@__PURE__*/ f({
|
|
5282
5236
|
initialData: {},
|
|
@@ -5295,7 +5249,7 @@ var ra = (e, t) => R({
|
|
|
5295
5249
|
}),
|
|
5296
5250
|
emits: ["submitted"],
|
|
5297
5251
|
setup(e, { emit: t }) {
|
|
5298
|
-
let r = e, i = q(r), a = t, { addressSchema: o, draft: s, resolvedAddress: l, additionOptions: u } =
|
|
5252
|
+
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($i(p, o), {
|
|
5299
5253
|
licensePlate: r.initialData?.licensePlate ?? "",
|
|
5300
5254
|
birthdate: r.initialData?.birthdate ?? "",
|
|
5301
5255
|
address: s
|
|
@@ -5319,7 +5273,7 @@ var ra = (e, t) => R({
|
|
|
5319
5273
|
span: "3",
|
|
5320
5274
|
md: "6"
|
|
5321
5275
|
}, {
|
|
5322
|
-
default: P(() => [c(E(
|
|
5276
|
+
default: P(() => [c(E(Qn), m({
|
|
5323
5277
|
modelValue: E(v),
|
|
5324
5278
|
"onUpdate:modelValue": r[0] ||= (e) => d(v) ? v.value = e : null,
|
|
5325
5279
|
"vehicle-data": E(f),
|
|
@@ -5376,7 +5330,7 @@ var ra = (e, t) => R({
|
|
|
5376
5330
|
});
|
|
5377
5331
|
//#endregion
|
|
5378
5332
|
//#region src/comparisons/car/car.presenter.ts
|
|
5379
|
-
function
|
|
5333
|
+
function ta(e) {
|
|
5380
5334
|
return {
|
|
5381
5335
|
comparison: V.Car,
|
|
5382
5336
|
detail: { car: { ...e.vehicle } },
|
|
@@ -5393,10 +5347,10 @@ function aa(e) {
|
|
|
5393
5347
|
}
|
|
5394
5348
|
//#endregion
|
|
5395
5349
|
//#region src/comparisons/car-business/businessCar.schema.ts
|
|
5396
|
-
var
|
|
5350
|
+
var na = (e) => R({
|
|
5397
5351
|
licensePlate: e,
|
|
5398
|
-
company:
|
|
5399
|
-
}),
|
|
5352
|
+
company: Ar()
|
|
5353
|
+
}), ra = /* @__PURE__ */ l({
|
|
5400
5354
|
__name: "BusinessCarForm",
|
|
5401
5355
|
props: /*@__PURE__*/ f({
|
|
5402
5356
|
initialData: {},
|
|
@@ -5415,7 +5369,7 @@ var oa = (e) => R({
|
|
|
5415
5369
|
}),
|
|
5416
5370
|
emits: ["submitted"],
|
|
5417
5371
|
setup(e, { emit: i }) {
|
|
5418
|
-
let a = e, o = q(a), s = i, { vehicleData: l, licensePlateSchema: u } =
|
|
5372
|
+
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(na(u), {
|
|
5419
5373
|
licensePlate: a.initialData?.licensePlate ?? "",
|
|
5420
5374
|
company: a.initialData?.company ?? null
|
|
5421
5375
|
}), [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 +5390,7 @@ var oa = (e) => R({
|
|
|
5436
5390
|
span: "5",
|
|
5437
5391
|
md: "6"
|
|
5438
5392
|
}, {
|
|
5439
|
-
default: P(() => [c(E(
|
|
5393
|
+
default: P(() => [c(E(Qn), m({
|
|
5440
5394
|
modelValue: E(v),
|
|
5441
5395
|
"onUpdate:modelValue": i[0] ||= (e) => d(v) ? v.value = e : null,
|
|
5442
5396
|
"vehicle-data": E(l),
|
|
@@ -5466,7 +5420,7 @@ var oa = (e) => R({
|
|
|
5466
5420
|
span: "5",
|
|
5467
5421
|
md: "6"
|
|
5468
5422
|
}, {
|
|
5469
|
-
default: P(() => [c(E(
|
|
5423
|
+
default: P(() => [c(E(kr), m({
|
|
5470
5424
|
modelValue: E(C),
|
|
5471
5425
|
"onUpdate:modelValue": i[2] ||= (e) => d(C) ? C.value = e : null,
|
|
5472
5426
|
name: "company",
|
|
@@ -5495,7 +5449,7 @@ var oa = (e) => R({
|
|
|
5495
5449
|
});
|
|
5496
5450
|
//#endregion
|
|
5497
5451
|
//#region src/comparisons/car-business/businessCar.presenter.ts
|
|
5498
|
-
function
|
|
5452
|
+
function ia(e) {
|
|
5499
5453
|
return {
|
|
5500
5454
|
comparison: V.CarBusiness,
|
|
5501
5455
|
detail: {
|
|
@@ -5507,7 +5461,7 @@ function ca(e) {
|
|
|
5507
5461
|
}
|
|
5508
5462
|
//#endregion
|
|
5509
5463
|
//#region src/comparisons/businessLiability/businessLiability.schema.ts
|
|
5510
|
-
var
|
|
5464
|
+
var aa = R({ company: Ar() }), oa = /* @__PURE__ */ l({
|
|
5511
5465
|
__name: "BusinessLiabilityForm",
|
|
5512
5466
|
props: /*@__PURE__*/ f({
|
|
5513
5467
|
initialData: {},
|
|
@@ -5528,7 +5482,7 @@ var la = R({ company: Pr() }), ua = /* @__PURE__ */ l({
|
|
|
5528
5482
|
}),
|
|
5529
5483
|
emits: ["submitted"],
|
|
5530
5484
|
setup(e, { emit: i }) {
|
|
5531
|
-
let a = e, o = q(a), s = i, { isSubmitting: l, handleSubmit: u, defineField: f, setErrors: p, removeError: h } = Z(
|
|
5485
|
+
let a = e, o = q(a), s = i, { isSubmitting: l, handleSubmit: u, defineField: f, setErrors: p, removeError: h } = Z(aa, { 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
5486
|
function S() {
|
|
5533
5487
|
u(({ company: e }) => {
|
|
5534
5488
|
s("submitted", { company: e });
|
|
@@ -5543,7 +5497,7 @@ var la = R({ company: Pr() }), ua = /* @__PURE__ */ l({
|
|
|
5543
5497
|
span: "8",
|
|
5544
5498
|
md: "6"
|
|
5545
5499
|
}, {
|
|
5546
|
-
default: P(() => [c(E(
|
|
5500
|
+
default: P(() => [c(E(kr), m({
|
|
5547
5501
|
modelValue: E(g),
|
|
5548
5502
|
"onUpdate:modelValue": t[0] ||= (e) => d(g) ? g.value = e : null,
|
|
5549
5503
|
name: "company",
|
|
@@ -5572,7 +5526,7 @@ var la = R({ company: Pr() }), ua = /* @__PURE__ */ l({
|
|
|
5572
5526
|
});
|
|
5573
5527
|
//#endregion
|
|
5574
5528
|
//#region src/comparisons/businessLiability/businessLiability.presenter.ts
|
|
5575
|
-
function
|
|
5529
|
+
function sa(e) {
|
|
5576
5530
|
return {
|
|
5577
5531
|
comparison: V.BusinessLiability,
|
|
5578
5532
|
detail: { companyData: { ...e.company } },
|
|
@@ -5581,9 +5535,9 @@ function da(e) {
|
|
|
5581
5535
|
}
|
|
5582
5536
|
//#endregion
|
|
5583
5537
|
//#region src/flow/useComparisonSubmit.ts
|
|
5584
|
-
var
|
|
5538
|
+
var ca = { [V.Travel]: "/tarieven/" }, la = (e, t, n) => `${e}#/${n}${ca[t] ?? ""}`, ua = (e) => {
|
|
5585
5539
|
window.location.href = e;
|
|
5586
|
-
},
|
|
5540
|
+
}, da = ({ user: e, detail: t }) => new Oe({
|
|
5587
5541
|
email: e.email || null,
|
|
5588
5542
|
name: e.firstName || null,
|
|
5589
5543
|
zip_code: e.zipCode || null,
|
|
@@ -5597,14 +5551,14 @@ var fa = { [V.Travel]: "/tarieven/" }, pa = (e, t, n) => `${e}#/${n}${fa[t] ?? "
|
|
|
5597
5551
|
...e.city && { city: e.city }
|
|
5598
5552
|
}
|
|
5599
5553
|
});
|
|
5600
|
-
function
|
|
5554
|
+
function fa(e) {
|
|
5601
5555
|
let t = x(!1), n = x(null);
|
|
5602
5556
|
return {
|
|
5603
5557
|
submit: async (r) => {
|
|
5604
5558
|
t.value = !0, n.value = null;
|
|
5605
5559
|
try {
|
|
5606
|
-
let t = await
|
|
5607
|
-
e.onRedirect ? e.onRedirect(n) :
|
|
5560
|
+
let t = await Cn().comparisonService.create(r.comparison, da(r)), n = la(e.link, r.comparison, t.getId());
|
|
5561
|
+
e.onRedirect ? e.onRedirect(n) : ua(n);
|
|
5608
5562
|
} catch (t) {
|
|
5609
5563
|
n.value = t, e.onError?.(t, r);
|
|
5610
5564
|
} finally {
|
|
@@ -5617,66 +5571,66 @@ function ga(e) {
|
|
|
5617
5571
|
}
|
|
5618
5572
|
//#endregion
|
|
5619
5573
|
//#region src/comparisons/bike/index.ts
|
|
5620
|
-
var
|
|
5621
|
-
Form: () =>
|
|
5622
|
-
presenter: () =>
|
|
5574
|
+
var pa = /* @__PURE__ */ B({
|
|
5575
|
+
Form: () => oi,
|
|
5576
|
+
presenter: () => si
|
|
5577
|
+
}), ma = /* @__PURE__ */ B({
|
|
5578
|
+
Form: () => di,
|
|
5579
|
+
presenter: () => fi
|
|
5580
|
+
}), ha = /* @__PURE__ */ B({
|
|
5581
|
+
Form: () => _i,
|
|
5582
|
+
presenter: () => vi
|
|
5583
|
+
}), ga = /* @__PURE__ */ B({
|
|
5584
|
+
Form: () => Si,
|
|
5585
|
+
presenter: () => Ci
|
|
5586
|
+
}), _a = /* @__PURE__ */ B({
|
|
5587
|
+
Form: () => Ti,
|
|
5588
|
+
presenter: () => Ei
|
|
5623
5589
|
}), va = /* @__PURE__ */ B({
|
|
5624
|
-
Form: () =>
|
|
5625
|
-
presenter: () =>
|
|
5590
|
+
Form: () => ki,
|
|
5591
|
+
presenter: () => Ai
|
|
5626
5592
|
}), ya = /* @__PURE__ */ B({
|
|
5627
|
-
Form: () =>
|
|
5628
|
-
presenter: () =>
|
|
5593
|
+
Form: () => Pi,
|
|
5594
|
+
presenter: () => Fi
|
|
5629
5595
|
}), ba = /* @__PURE__ */ B({
|
|
5630
|
-
Form: () =>
|
|
5631
|
-
presenter: () =>
|
|
5596
|
+
Form: () => Li,
|
|
5597
|
+
presenter: () => Ri
|
|
5632
5598
|
}), xa = /* @__PURE__ */ B({
|
|
5633
|
-
Form: () =>
|
|
5634
|
-
presenter: () =>
|
|
5599
|
+
Form: () => Ui,
|
|
5600
|
+
presenter: () => Gi
|
|
5635
5601
|
}), Sa = /* @__PURE__ */ B({
|
|
5636
|
-
Form: () =>
|
|
5637
|
-
presenter: () =>
|
|
5602
|
+
Form: () => Ji,
|
|
5603
|
+
presenter: () => Yi
|
|
5638
5604
|
}), Ca = /* @__PURE__ */ B({
|
|
5639
|
-
Form: () =>
|
|
5640
|
-
presenter: () =>
|
|
5605
|
+
Form: () => Zi,
|
|
5606
|
+
presenter: () => Qi
|
|
5641
5607
|
}), wa = /* @__PURE__ */ B({
|
|
5642
|
-
Form: () =>
|
|
5643
|
-
presenter: () =>
|
|
5608
|
+
Form: () => ea,
|
|
5609
|
+
presenter: () => ta
|
|
5644
5610
|
}), Ta = /* @__PURE__ */ B({
|
|
5645
|
-
Form: () =>
|
|
5646
|
-
presenter: () =>
|
|
5611
|
+
Form: () => ra,
|
|
5612
|
+
presenter: () => ia
|
|
5647
5613
|
}), Ea = /* @__PURE__ */ B({
|
|
5648
|
-
Form: () =>
|
|
5649
|
-
presenter: () =>
|
|
5650
|
-
}), Da =
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
[V.
|
|
5664
|
-
[V.
|
|
5665
|
-
|
|
5666
|
-
[V.
|
|
5667
|
-
|
|
5668
|
-
[V.Housing]: Sa,
|
|
5669
|
-
house: Sa,
|
|
5670
|
-
[V.LegalAssistance]: Ca,
|
|
5671
|
-
[V.Package]: wa,
|
|
5672
|
-
[V.Loan]: Ta,
|
|
5673
|
-
[V.Moped]: Ea,
|
|
5674
|
-
[V.Motor]: Da,
|
|
5675
|
-
[V.Car]: Oa,
|
|
5676
|
-
[V.CarBusiness]: ka,
|
|
5677
|
-
"business-car": ka,
|
|
5678
|
-
[V.BusinessLiability]: Aa
|
|
5679
|
-
}, Ma = /* @__PURE__ */ l({
|
|
5614
|
+
Form: () => oa,
|
|
5615
|
+
presenter: () => sa
|
|
5616
|
+
}), Da = {
|
|
5617
|
+
[V.Bike]: pa,
|
|
5618
|
+
[V.Pet]: ma,
|
|
5619
|
+
[V.Caravan]: ha,
|
|
5620
|
+
[V.Travel]: ga,
|
|
5621
|
+
[V.Liability]: _a,
|
|
5622
|
+
[V.Housing]: va,
|
|
5623
|
+
house: va,
|
|
5624
|
+
[V.LegalAssistance]: ya,
|
|
5625
|
+
[V.Package]: ba,
|
|
5626
|
+
[V.Loan]: xa,
|
|
5627
|
+
[V.Moped]: Sa,
|
|
5628
|
+
[V.Motor]: Ca,
|
|
5629
|
+
[V.Car]: wa,
|
|
5630
|
+
[V.CarBusiness]: Ta,
|
|
5631
|
+
"business-car": Ta,
|
|
5632
|
+
[V.BusinessLiability]: Ea
|
|
5633
|
+
}, Oa = /* @__PURE__ */ l({
|
|
5680
5634
|
__name: "ComparisonFormFlow",
|
|
5681
5635
|
props: {
|
|
5682
5636
|
form: {},
|
|
@@ -5707,7 +5661,7 @@ var _a = /* @__PURE__ */ B({
|
|
|
5707
5661
|
},
|
|
5708
5662
|
emits: ["submitted", "error"],
|
|
5709
5663
|
setup(e, { emit: i }) {
|
|
5710
|
-
let a = e, o = i, s = q(a), c = t(() =>
|
|
5664
|
+
let a = e, o = i, s = q(a), c = t(() => Da[a.form]), { submit: l, isSubmitting: u } = fa({
|
|
5711
5665
|
link: a.link,
|
|
5712
5666
|
onRedirect: (e) => {
|
|
5713
5667
|
o("submitted", e), a.redirect ? a.redirect(e) : window.location.href = e;
|
|
@@ -5723,16 +5677,18 @@ var _a = /* @__PURE__ */ B({
|
|
|
5723
5677
|
onSubmitted: d
|
|
5724
5678
|
}), null, 16, ["initial-data", "submit-disabled"])) : r("", !0);
|
|
5725
5679
|
}
|
|
5726
|
-
}),
|
|
5680
|
+
}), ka, Aa = (e) => {
|
|
5681
|
+
ka = e;
|
|
5682
|
+
}, ja = () => ka?.url, Ma = { class: "vd-form vd-form--vertical vd-form--card" }, Na = {
|
|
5727
5683
|
key: 0,
|
|
5728
5684
|
class: "vd-form__header"
|
|
5729
|
-
},
|
|
5685
|
+
}, Pa = {
|
|
5730
5686
|
key: 0,
|
|
5731
5687
|
class: "vd-form__title"
|
|
5732
|
-
},
|
|
5688
|
+
}, Fa = {
|
|
5733
5689
|
key: 1,
|
|
5734
5690
|
class: "vd-form__description"
|
|
5735
|
-
},
|
|
5691
|
+
}, Ia = /* @__PURE__ */ l({
|
|
5736
5692
|
__name: "QuestionnaireForm",
|
|
5737
5693
|
props: {
|
|
5738
5694
|
link: {},
|
|
@@ -5747,11 +5703,11 @@ var _a = /* @__PURE__ */ B({
|
|
|
5747
5703
|
}
|
|
5748
5704
|
},
|
|
5749
5705
|
setup(e) {
|
|
5750
|
-
let n = e, a = t(() =>
|
|
5706
|
+
let n = e, a = t(() => Hr(n.link, {
|
|
5751
5707
|
qaId: n.qaId,
|
|
5752
5708
|
template: n.thankyouPageTemplate
|
|
5753
5709
|
}));
|
|
5754
|
-
return (t, n) => (y(), i("div",
|
|
5710
|
+
return (t, n) => (y(), i("div", Ma, [e.showTitle && e.title || e.description ? (y(), i("div", Na, [e.showTitle && e.title ? (y(), i("h2", Pa, T(e.title), 1)) : r("", !0), e.description ? (y(), i("p", Fa, T(e.description), 1)) : r("", !0)])) : r("", !0), c(E(Ne), {
|
|
5755
5711
|
href: a.value,
|
|
5756
5712
|
label: e.buttonText,
|
|
5757
5713
|
"button-type": "green",
|
|
@@ -5760,16 +5716,16 @@ var _a = /* @__PURE__ */ B({
|
|
|
5760
5716
|
block: ""
|
|
5761
5717
|
}, null, 8, ["href", "label"])]));
|
|
5762
5718
|
}
|
|
5763
|
-
}),
|
|
5719
|
+
}), La = {
|
|
5764
5720
|
key: 0,
|
|
5765
5721
|
class: "vd-form__header"
|
|
5766
|
-
},
|
|
5722
|
+
}, Ra = {
|
|
5767
5723
|
key: 0,
|
|
5768
5724
|
class: "vd-form__title"
|
|
5769
|
-
},
|
|
5725
|
+
}, za = {
|
|
5770
5726
|
key: 1,
|
|
5771
5727
|
class: "vd-form__description"
|
|
5772
|
-
},
|
|
5728
|
+
}, Ba = { class: "vd-form__row" }, Va = { class: "vd-form__col-10 vd-form__col-md-6" }, Ha = { class: "vd-form__col-2 vd-form__action" }, Ua = /* @__PURE__ */ l({
|
|
5773
5729
|
__name: "RiskScannerForm",
|
|
5774
5730
|
props: {
|
|
5775
5731
|
qaUrl: { default: "" },
|
|
@@ -5787,9 +5743,11 @@ var _a = /* @__PURE__ */ B({
|
|
|
5787
5743
|
}
|
|
5788
5744
|
},
|
|
5789
5745
|
setup(e) {
|
|
5790
|
-
let o = e, s = x(null), { isSubmitting: l, handleSubmit: u, defineField: f, setErrors: p, removeError: h } = Z(R({ company:
|
|
5746
|
+
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
5747
|
async function C(e) {
|
|
5792
|
-
let t = o.qaUrl ||
|
|
5748
|
+
let t = o.qaUrl || ja();
|
|
5749
|
+
if (!t) throw Error("QA api url is required — set the qa-url attribute, or call configureQa({ url }) once at bootstrap.");
|
|
5750
|
+
let n = t.endsWith("/") ? t : `${t}/`, r = await fetch(`${n}api/v1/active-questionnaire/${o.qaId}/start`, {
|
|
5793
5751
|
method: "POST",
|
|
5794
5752
|
headers: { "Content-Type": "application/json" },
|
|
5795
5753
|
body: JSON.stringify({
|
|
@@ -5803,7 +5761,7 @@ var _a = /* @__PURE__ */ B({
|
|
|
5803
5761
|
});
|
|
5804
5762
|
if (!r.ok) throw Error(`Failed to start the questionnaire (${r.status})`);
|
|
5805
5763
|
let { leadId: i } = await r.json();
|
|
5806
|
-
return
|
|
5764
|
+
return Hr(o.link, {
|
|
5807
5765
|
leadid: i,
|
|
5808
5766
|
qaId: o.qaId,
|
|
5809
5767
|
template: o.thankyouPageTemplate
|
|
@@ -5823,7 +5781,7 @@ var _a = /* @__PURE__ */ B({
|
|
|
5823
5781
|
return (t, o) => (y(), i("form", {
|
|
5824
5782
|
class: "vd-form vd-form--vertical vd-form--card",
|
|
5825
5783
|
onSubmit: I(w, ["prevent", "stop"])
|
|
5826
|
-
}, [e.showTitle && e.title || e.description ? (y(), i("div",
|
|
5784
|
+
}, [e.showTitle && e.title || e.description ? (y(), i("div", La, [e.showTitle && e.title ? (y(), i("h2", Ra, T(e.title), 1)) : r("", !0), e.description ? (y(), i("p", za, T(e.description), 1)) : r("", !0)])) : r("", !0), a("div", Ba, [a("div", Va, [c(E(kr), m({
|
|
5827
5785
|
modelValue: E(g),
|
|
5828
5786
|
"onUpdate:modelValue": o[0] ||= (e) => d(g) ? g.value = e : null
|
|
5829
5787
|
}, E(_), {
|
|
@@ -5834,7 +5792,7 @@ var _a = /* @__PURE__ */ B({
|
|
|
5834
5792
|
key: 0,
|
|
5835
5793
|
style: { "margin-top": "12px" },
|
|
5836
5794
|
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",
|
|
5795
|
+
})) : r("", !0)]), a("div", Ha, [c(E(Ne), {
|
|
5838
5796
|
type: "submit",
|
|
5839
5797
|
label: e.buttonText,
|
|
5840
5798
|
"is-loading": E(l),
|
|
@@ -5851,4 +5809,4 @@ var _a = /* @__PURE__ */ B({
|
|
|
5851
5809
|
}
|
|
5852
5810
|
});
|
|
5853
5811
|
//#endregion
|
|
5854
|
-
export {
|
|
5812
|
+
export { oi as BikeForm, ra as BusinessCarForm, oa as BusinessLiabilityForm, ea as CarForm, _i as CaravanForm, Oa as ComparisonFormFlow, V as ComparisonName, ki as HouseForm, Pi as LegalForm, Ti as LiabilityForm, Ui as LoanForm, Ji as MopedForm, Zi as MotorForm, Li as PackageForm, di as PetForm, Ia as QuestionnaireForm, Ua as RiskScannerForm, Si as TravelForm, si as bikePresenter, ia as businessCarPresenter, sa as businessLiabilityPresenter, ta as carPresenter, vi as caravanPresenter, Aa as configureQa, Ai as housePresenter, Fi as legalPresenter, Ei as liabilityPresenter, Gi as loanPresenter, Yi as mopedPresenter, Qi as motorPresenter, Ri as packagePresenter, fi as petPresenter, Ci as travelPresenter, fa as useComparisonSubmit };
|