@vergelijkdirect/comparison-forms 2.0.3-VER-9366.1 → 2.0.3-VER-9366.3
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.js +367 -365
- package/dist/wc/comparison-forms.js +676 -674
- package/dist/wc-forms/{VdInput-FV0L9B45.cjs → VdInput-FmcCel8k.cjs} +1 -1
- package/dist/wc-forms/{VdPopover-DztGFjWu.cjs → VdPopover-C8VbyCPM.cjs} +1 -1
- package/dist/wc-forms/{VdRadioGroup-CyxKi0s8.cjs → VdRadioGroup-BEcdb06g.cjs} +1 -1
- package/dist/wc-forms/{VdSearchableSelect-CFK59ffc.cjs → VdSearchableSelect-qIA9BFsQ.cjs} +1 -1
- package/dist/wc-forms/{VdSelect-Ct1Q_1S-.cjs → VdSelect-B4j-cyY6.cjs} +1 -1
- package/dist/wc-forms/bike.cjs +1 -1
- package/dist/wc-forms/{birthdate.schema-DdKmY-Zl.cjs → birthdate.schema-CuT2Aqpe.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-q4xkCOzK.cjs → company.schema-DpWPXhO4.cjs} +1 -1
- package/dist/wc-forms/{familyComposition.schema-EG-0badX.cjs → familyComposition.schema-u1IYRIgy.cjs} +1 -1
- package/dist/wc-forms/house.cjs +1 -1
- package/dist/wc-forms/{houseOwnedBuilding.model-DXAXbpgh.cjs → houseOwnedBuilding.model-35rOS2XM.cjs} +1 -1
- 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/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/{rules-B02tT9fM.cjs → rules-CezVc6vy.cjs} +1 -1
- package/dist/wc-forms/travel.cjs +1 -1
- package/dist/wc-forms/{useAddress-WM42C9IO.cjs → useAddress-DkDIySDc.cjs} +1 -1
- package/dist/wc-forms/{useLicensePlate-APOK4sXp.cjs → useLicensePlate-o3oR17m3.cjs} +1 -1
- package/dist/wc-forms/{useValidator-Ck2oPjtx.cjs → useValidator-DIKzHROh.cjs} +1 -1
- package/dist/wc-noitc/comparison-forms.umd.cjs +1 -1
- package/package.json +1 -1
|
@@ -21034,38 +21034,38 @@ var uE, dE, fE, pE, mE, hE, gE, _E, vE, yE, bE, xE, SE, CE, wE, TE, EE, DE, OE,
|
|
|
21034
21034
|
})))(), jO = "v2", MO = null, NO, PO = (e) => {
|
|
21035
21035
|
if (!e) throw Error("ITC api url is required — pass it to createItcClient(apiUrl) (custom elements: the api-url attribute).");
|
|
21036
21036
|
return e + (e.endsWith("/") ? "api" : "/api");
|
|
21037
|
-
}, FO, IO = async (e) => {
|
|
21038
|
-
typeof window > "u" || (FO = new AO.InsuranceTransmissionClient(new AO.LocalStorageAdapter("insurances")), await FO.configure({ api: {
|
|
21037
|
+
}, FO, IO = !1, LO = async (e) => {
|
|
21038
|
+
typeof window > "u" || (IO = !0, FO = new AO.InsuranceTransmissionClient(new AO.LocalStorageAdapter("insurances")), await FO.configure({ api: {
|
|
21039
21039
|
baseUrl: e,
|
|
21040
21040
|
version: jO
|
|
21041
21041
|
} }));
|
|
21042
|
-
},
|
|
21042
|
+
}, RO = () => ({
|
|
21043
21043
|
dataService: new AO.DataService(),
|
|
21044
21044
|
dataValidationService: new AO.DataValidationService(),
|
|
21045
21045
|
homeService: new AO.HomeService(),
|
|
21046
21046
|
comparisonService: new AO.ComparisonService()
|
|
21047
|
-
}),
|
|
21047
|
+
}), zO = (e) => {
|
|
21048
21048
|
let t = PO(e);
|
|
21049
|
-
return MO ||=
|
|
21050
|
-
},
|
|
21049
|
+
return MO ||= LO(t), MO;
|
|
21050
|
+
}, BO = () => (NO ||= RO(), NO), VO = async () => {
|
|
21051
21051
|
if (MO && await MO, !FO) throw Error("ITC client is not initialized.");
|
|
21052
21052
|
return FO;
|
|
21053
|
-
},
|
|
21053
|
+
}, HO = () => IO, UO = {
|
|
21054
21054
|
key: 0,
|
|
21055
21055
|
class: "vd-form__banner"
|
|
21056
|
-
},
|
|
21056
|
+
}, WO = ["innerHTML"], GO = {
|
|
21057
21057
|
key: 1,
|
|
21058
21058
|
class: "vd-form__header"
|
|
21059
|
-
},
|
|
21059
|
+
}, KO = {
|
|
21060
21060
|
key: 0,
|
|
21061
21061
|
class: "vd-form__title"
|
|
21062
|
-
},
|
|
21062
|
+
}, qO = {
|
|
21063
21063
|
key: 1,
|
|
21064
21064
|
class: "vd-form__description"
|
|
21065
|
-
},
|
|
21065
|
+
}, JO = {
|
|
21066
21066
|
key: 2,
|
|
21067
21067
|
class: "vd-afm"
|
|
21068
|
-
},
|
|
21068
|
+
}, YO = /* @__PURE__ */ L({
|
|
21069
21069
|
__name: "VdComparisonForm",
|
|
21070
21070
|
props: /*@__PURE__*/ Va({
|
|
21071
21071
|
actionSpan: {},
|
|
@@ -21096,14 +21096,16 @@ var uE, dE, fE, pE, mE, hE, gE, _E, vE, yE, bE, xE, SE, CE, wE, TE, EE, DE, OE,
|
|
|
21096
21096
|
i("submit", e);
|
|
21097
21097
|
};
|
|
21098
21098
|
return ra(async () => {
|
|
21099
|
-
|
|
21100
|
-
|
|
21099
|
+
if (HO()) {
|
|
21100
|
+
let e = (await VO()).getConfigurations().getAfmLicenseNumber();
|
|
21101
|
+
n.value = !!e;
|
|
21102
|
+
}
|
|
21101
21103
|
}), (t, r) => (z(), B("div", null, [H("form", {
|
|
21102
21104
|
class: j(o.value),
|
|
21103
21105
|
onSubmit: du(s, ["prevent", "stop"])
|
|
21104
21106
|
}, [
|
|
21105
|
-
P(a).banner || e.banner ? (z(), B("div",
|
|
21106
|
-
P(a).header || e.title || e.description ? (z(), B("div",
|
|
21107
|
+
P(a).banner || e.banner ? (z(), B("div", UO, [R(t.$slots, "banner", {}, () => [H("span", { innerHTML: e.banner }, null, 8, WO)])])) : W("", !0),
|
|
21108
|
+
P(a).header || e.title || e.description ? (z(), B("div", GO, [R(t.$slots, "header", {}, () => [e.title ? (z(), B("h2", KO, Le(e.title), 1)) : W("", !0), e.description ? (z(), B("p", qO, Le(e.description), 1)) : W("", !0)])])) : W("", !0),
|
|
21107
21109
|
U(Yv, null, {
|
|
21108
21110
|
default: F(() => [R(t.$slots, "default"), U(q, {
|
|
21109
21111
|
class: "vd-form__action",
|
|
@@ -21123,14 +21125,14 @@ var uE, dE, fE, pE, mE, hE, gE, _E, vE, yE, bE, xE, SE, CE, wE, TE, EE, DE, OE,
|
|
|
21123
21125
|
}, 8, ["span", "md"])]),
|
|
21124
21126
|
_: 3
|
|
21125
21127
|
}),
|
|
21126
|
-
n.value ? W("", !0) : (z(), B("div",
|
|
21128
|
+
n.value ? W("", !0) : (z(), B("div", JO, [...r[0] ||= [H("p", { class: "vd-afm__text" }, [
|
|
21127
21129
|
Ms(" Bovenstaande vergelijkingsmodule beheerd door "),
|
|
21128
21130
|
H("a", { href: "https://vergelijkdirect.com" }, " Vergelijkdirect.com BV. "),
|
|
21129
21131
|
Ms(" Execution Only, geen advies. AFM-vergunning 12044269 ")
|
|
21130
21132
|
], -1)]]))
|
|
21131
21133
|
], 34)]));
|
|
21132
21134
|
}
|
|
21133
|
-
}),
|
|
21135
|
+
}), XO = /* @__PURE__ */ L({
|
|
21134
21136
|
__name: "VdFormGroup",
|
|
21135
21137
|
props: {
|
|
21136
21138
|
span: { default: null },
|
|
@@ -21144,7 +21146,7 @@ var uE, dE, fE, pE, mE, hE, gE, _E, vE, yE, bE, xE, SE, CE, wE, TE, EE, DE, OE,
|
|
|
21144
21146
|
]);
|
|
21145
21147
|
return (e, t) => (z(), B("div", { class: j(n.value) }, [R(e.$slots, "default")], 2));
|
|
21146
21148
|
}
|
|
21147
|
-
}),
|
|
21149
|
+
}), ZO = /* @__PURE__ */ L({
|
|
21148
21150
|
inheritAttrs: !1,
|
|
21149
21151
|
__name: "VdBirthdateInput",
|
|
21150
21152
|
props: /*@__PURE__*/ Ha({
|
|
@@ -21185,7 +21187,7 @@ var uE, dE, fE, pE, mE, hE, gE, _E, vE, yE, bE, xE, SE, CE, wE, TE, EE, DE, OE,
|
|
|
21185
21187
|
"required"
|
|
21186
21188
|
]));
|
|
21187
21189
|
}
|
|
21188
|
-
}),
|
|
21190
|
+
}), QO = /* @__PURE__ */ L({
|
|
21189
21191
|
inheritAttrs: !1,
|
|
21190
21192
|
__name: "VdFamilyCompositionSelect",
|
|
21191
21193
|
props: /*@__PURE__*/ Ha({
|
|
@@ -21238,7 +21240,7 @@ var uE, dE, fE, pE, mE, hE, gE, _E, vE, yE, bE, xE, SE, CE, wE, TE, EE, DE, OE,
|
|
|
21238
21240
|
"required"
|
|
21239
21241
|
]));
|
|
21240
21242
|
}
|
|
21241
|
-
}),
|
|
21243
|
+
}), $O = /* @__PURE__ */ s(((e, t) => {
|
|
21242
21244
|
function n(e) {
|
|
21243
21245
|
this._maxSize = e, this.clear();
|
|
21244
21246
|
}
|
|
@@ -21306,7 +21308,7 @@ var uE, dE, fE, pE, mE, hE, gE, _E, vE, yE, bE, xE, SE, CE, wE, TE, EE, DE, OE,
|
|
|
21306
21308
|
function v(e) {
|
|
21307
21309
|
return !h(e) && (g(e) || _(e));
|
|
21308
21310
|
}
|
|
21309
|
-
})),
|
|
21311
|
+
})), ek = /* @__PURE__ */ s(((e, t) => {
|
|
21310
21312
|
var n = /[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g, r = (e) => e.match(n) || [], i = (e) => e[0].toUpperCase() + e.slice(1), a = (e, t) => r(e).join(t).toLowerCase(), o = (e) => r(e).reduce((e, t) => `${e}${e ? t[0].toUpperCase() + t.slice(1).toLowerCase() : t.toLowerCase()}`, "");
|
|
21311
21313
|
t.exports = {
|
|
21312
21314
|
words: r,
|
|
@@ -21318,7 +21320,7 @@ var uE, dE, fE, pE, mE, hE, gE, _E, vE, yE, bE, xE, SE, CE, wE, TE, EE, DE, OE,
|
|
|
21318
21320
|
sentenceCase: (e) => i(a(e, " ")),
|
|
21319
21321
|
titleCase: (e) => r(e).map(i).join(" ")
|
|
21320
21322
|
};
|
|
21321
|
-
})),
|
|
21323
|
+
})), tk = /* @__PURE__ */ s(((e, t) => {
|
|
21322
21324
|
t.exports = function(e) {
|
|
21323
21325
|
return n(r(e), e);
|
|
21324
21326
|
}, t.exports.array = n;
|
|
@@ -21372,36 +21374,36 @@ var uE, dE, fE, pE, mE, hE, gE, _E, vE, yE, bE, xE, SE, CE, wE, TE, EE, DE, OE,
|
|
|
21372
21374
|
for (var t = /* @__PURE__ */ new Map(), n = 0, r = e.length; n < r; n++) t.set(e[n], n);
|
|
21373
21375
|
return t;
|
|
21374
21376
|
}
|
|
21375
|
-
})),
|
|
21376
|
-
function
|
|
21377
|
+
})), nk = $O(), rk = ek(), ik = /* @__PURE__ */ u(tk()), ak = Object.prototype.toString, ok = Error.prototype.toString, sk = RegExp.prototype.toString, ck = typeof Symbol < "u" ? Symbol.prototype.toString : () => "", lk = /^Symbol\((.*)\)(.*)$/;
|
|
21378
|
+
function uk(e) {
|
|
21377
21379
|
return e == +e ? e === 0 && 1 / e < 0 ? "-0" : "" + e : "NaN";
|
|
21378
21380
|
}
|
|
21379
|
-
function
|
|
21381
|
+
function dk(e, t = !1) {
|
|
21380
21382
|
if (e == null || e === !0 || e === !1) return "" + e;
|
|
21381
21383
|
let n = typeof e;
|
|
21382
|
-
if (n === "number") return
|
|
21384
|
+
if (n === "number") return uk(e);
|
|
21383
21385
|
if (n === "string") return t ? `"${e}"` : e;
|
|
21384
21386
|
if (n === "function") return "[Function " + (e.name || "anonymous") + "]";
|
|
21385
|
-
if (n === "symbol") return
|
|
21386
|
-
let r =
|
|
21387
|
-
return r === "Date" ? isNaN(e.getTime()) ? "" + e : e.toISOString(e) : r === "Error" || e instanceof Error ? "[" +
|
|
21387
|
+
if (n === "symbol") return ck.call(e).replace(lk, "Symbol($1)");
|
|
21388
|
+
let r = ak.call(e).slice(8, -1);
|
|
21389
|
+
return r === "Date" ? isNaN(e.getTime()) ? "" + e : e.toISOString(e) : r === "Error" || e instanceof Error ? "[" + ok.call(e) + "]" : r === "RegExp" ? sk.call(e) : null;
|
|
21388
21390
|
}
|
|
21389
|
-
function
|
|
21390
|
-
let n =
|
|
21391
|
+
function fk(e, t) {
|
|
21392
|
+
let n = dk(e, t);
|
|
21391
21393
|
return n === null ? JSON.stringify(e, function(e, n) {
|
|
21392
|
-
let r =
|
|
21394
|
+
let r = dk(this[e], t);
|
|
21393
21395
|
return r === null ? n : r;
|
|
21394
21396
|
}, 2) : n;
|
|
21395
21397
|
}
|
|
21396
|
-
function
|
|
21398
|
+
function pk(e) {
|
|
21397
21399
|
return e == null ? [] : [].concat(e);
|
|
21398
21400
|
}
|
|
21399
|
-
var
|
|
21400
|
-
|
|
21401
|
-
var
|
|
21401
|
+
var mk, hk, gk, _k = /\$\{\s*(\w+)\s*\}/g;
|
|
21402
|
+
mk = Symbol.toStringTag;
|
|
21403
|
+
var vk = class {
|
|
21402
21404
|
constructor(e, t, n, r) {
|
|
21403
|
-
this.name = void 0, this.message = void 0, this.value = void 0, this.path = void 0, this.type = void 0, this.params = void 0, this.errors = void 0, this.inner = void 0, this[
|
|
21404
|
-
if (
|
|
21405
|
+
this.name = void 0, this.message = void 0, this.value = void 0, this.path = void 0, this.type = void 0, this.params = void 0, this.errors = void 0, this.inner = void 0, this[mk] = "Error", this.name = "ValidationError", this.value = t, this.path = n, this.type = r, this.errors = [], this.inner = [], pk(e).forEach((e) => {
|
|
21406
|
+
if (yk.isError(e)) {
|
|
21405
21407
|
this.errors.push(...e.errors);
|
|
21406
21408
|
let t = e.inner.length ? e.inner : [e];
|
|
21407
21409
|
this.inner.push(...t);
|
|
@@ -21409,27 +21411,27 @@ var gk = class {
|
|
|
21409
21411
|
}), this.message = this.errors.length > 1 ? `${this.errors.length} errors occurred` : this.errors[0];
|
|
21410
21412
|
}
|
|
21411
21413
|
};
|
|
21412
|
-
|
|
21413
|
-
var
|
|
21414
|
+
hk = Symbol.hasInstance, gk = Symbol.toStringTag;
|
|
21415
|
+
var yk = class e extends Error {
|
|
21414
21416
|
static formatError(e, t) {
|
|
21415
21417
|
let n = t.label || t.path || "this";
|
|
21416
21418
|
return t = Object.assign({}, t, {
|
|
21417
21419
|
path: n,
|
|
21418
21420
|
originalPath: t.path
|
|
21419
|
-
}), typeof e == "string" ? e.replace(
|
|
21421
|
+
}), typeof e == "string" ? e.replace(_k, (e, n) => fk(t[n])) : typeof e == "function" ? e(t) : e;
|
|
21420
21422
|
}
|
|
21421
21423
|
static isError(e) {
|
|
21422
21424
|
return e && e.name === "ValidationError";
|
|
21423
21425
|
}
|
|
21424
21426
|
constructor(t, n, r, i, a) {
|
|
21425
|
-
let o = new
|
|
21427
|
+
let o = new vk(t, n, r, i);
|
|
21426
21428
|
if (a) return o;
|
|
21427
|
-
super(), this.value = void 0, this.path = void 0, this.type = void 0, this.params = void 0, this.errors = [], this.inner = [], this[
|
|
21429
|
+
super(), this.value = void 0, this.path = void 0, this.type = void 0, this.params = void 0, this.errors = [], this.inner = [], this[gk] = "Error", this.name = o.name, this.message = o.message, this.type = o.type, this.value = o.value, this.path = o.path, this.errors = o.errors, this.inner = o.inner, Error.captureStackTrace && Error.captureStackTrace(this, e);
|
|
21428
21430
|
}
|
|
21429
|
-
static [
|
|
21430
|
-
return
|
|
21431
|
+
static [hk](e) {
|
|
21432
|
+
return vk[Symbol.hasInstance](e) || super[Symbol.hasInstance](e);
|
|
21431
21433
|
}
|
|
21432
|
-
},
|
|
21434
|
+
}, bk = {
|
|
21433
21435
|
default: "${path} is invalid",
|
|
21434
21436
|
required: "${path} is a required field",
|
|
21435
21437
|
defined: "${path} must be defined",
|
|
@@ -21437,10 +21439,10 @@ var _k = class e extends Error {
|
|
|
21437
21439
|
oneOf: "${path} must be one of the following values: ${values}",
|
|
21438
21440
|
notOneOf: "${path} must not be one of the following values: ${values}",
|
|
21439
21441
|
notType: ({ path: e, type: t, value: n, originalValue: r }) => {
|
|
21440
|
-
let i = r != null && r !== n ? ` (cast from the value \`${
|
|
21441
|
-
return t === "mixed" ? `${e} must match the configured type. The validated value was: \`${
|
|
21442
|
+
let i = r != null && r !== n ? ` (cast from the value \`${fk(r, !0)}\`).` : ".";
|
|
21443
|
+
return t === "mixed" ? `${e} must match the configured type. The validated value was: \`${fk(n, !0)}\`` + i : `${e} must be a \`${t}\` type, but the final value was: \`${fk(n, !0)}\`` + i;
|
|
21442
21444
|
}
|
|
21443
|
-
},
|
|
21445
|
+
}, xk = {
|
|
21444
21446
|
length: "${path} must be exactly ${length} characters",
|
|
21445
21447
|
min: "${path} must be at least ${min} characters",
|
|
21446
21448
|
max: "${path} must be at most ${max} characters",
|
|
@@ -21454,7 +21456,7 @@ var _k = class e extends Error {
|
|
|
21454
21456
|
trim: "${path} must be a trimmed string",
|
|
21455
21457
|
lowercase: "${path} must be a lowercase string",
|
|
21456
21458
|
uppercase: "${path} must be a upper case string"
|
|
21457
|
-
},
|
|
21459
|
+
}, Sk = {
|
|
21458
21460
|
min: "${path} must be greater than or equal to ${min}",
|
|
21459
21461
|
max: "${path} must be less than or equal to ${max}",
|
|
21460
21462
|
lessThan: "${path} must be less than ${less}",
|
|
@@ -21462,35 +21464,35 @@ var _k = class e extends Error {
|
|
|
21462
21464
|
positive: "${path} must be a positive number",
|
|
21463
21465
|
negative: "${path} must be a negative number",
|
|
21464
21466
|
integer: "${path} must be an integer"
|
|
21465
|
-
},
|
|
21467
|
+
}, Ck = {
|
|
21466
21468
|
min: "${path} field must be later than ${min}",
|
|
21467
21469
|
max: "${path} field must be at earlier than ${max}"
|
|
21468
|
-
},
|
|
21470
|
+
}, wk = { isValue: "${path} field must be ${value}" }, Tk = {
|
|
21469
21471
|
noUnknown: "${path} field has unspecified keys: ${unknown}",
|
|
21470
21472
|
exact: "${path} object contains unknown properties: ${properties}"
|
|
21471
|
-
},
|
|
21473
|
+
}, Ek = {
|
|
21472
21474
|
min: "${path} field must have at least ${min} items",
|
|
21473
21475
|
max: "${path} field must have less than or equal to ${max} items",
|
|
21474
21476
|
length: "${path} must have ${length} items"
|
|
21475
|
-
},
|
|
21477
|
+
}, Dk = { notType: (e) => {
|
|
21476
21478
|
let { path: t, value: n, spec: r } = e, i = r.types.length;
|
|
21477
21479
|
if (Array.isArray(n)) {
|
|
21478
|
-
if (n.length < i) return `${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${
|
|
21479
|
-
if (n.length > i) return `${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${
|
|
21480
|
+
if (n.length < i) return `${t} tuple value has too few items, expected a length of ${i} but got ${n.length} for value: \`${fk(n, !0)}\``;
|
|
21481
|
+
if (n.length > i) return `${t} tuple value has too many items, expected a length of ${i} but got ${n.length} for value: \`${fk(n, !0)}\``;
|
|
21480
21482
|
}
|
|
21481
|
-
return
|
|
21483
|
+
return yk.formatError(bk.notType, e);
|
|
21482
21484
|
} };
|
|
21483
21485
|
Object.assign(Object.create(null), {
|
|
21484
|
-
mixed:
|
|
21485
|
-
string:
|
|
21486
|
-
number:
|
|
21487
|
-
date:
|
|
21488
|
-
object:
|
|
21489
|
-
array:
|
|
21490
|
-
boolean:
|
|
21491
|
-
tuple:
|
|
21486
|
+
mixed: bk,
|
|
21487
|
+
string: xk,
|
|
21488
|
+
number: Sk,
|
|
21489
|
+
date: Ck,
|
|
21490
|
+
object: Tk,
|
|
21491
|
+
array: Ek,
|
|
21492
|
+
boolean: wk,
|
|
21493
|
+
tuple: Dk
|
|
21492
21494
|
});
|
|
21493
|
-
var
|
|
21495
|
+
var Ok = (e) => e && e.__isYupSchema__, kk = class e {
|
|
21494
21496
|
static fromOptions(t, n) {
|
|
21495
21497
|
if (!n.then && !n.otherwise) throw TypeError("either `then:` or `otherwise:` is required for `when()` conditions");
|
|
21496
21498
|
let { is: r, then: i, otherwise: a } = n, o = typeof r == "function" ? r : (...e) => e.every((e) => e === r);
|
|
@@ -21502,19 +21504,19 @@ var Ek = (e) => e && e.__isYupSchema__, Dk = class e {
|
|
|
21502
21504
|
resolve(e, t) {
|
|
21503
21505
|
let n = this.refs.map((e) => e.getValue(t?.value, t?.parent, t?.context)), r = this.fn(n, e, t);
|
|
21504
21506
|
if (r === void 0 || r === e) return e;
|
|
21505
|
-
if (!
|
|
21507
|
+
if (!Ok(r)) throw TypeError("conditions must return a schema object");
|
|
21506
21508
|
return r.resolve(t);
|
|
21507
21509
|
}
|
|
21508
|
-
},
|
|
21510
|
+
}, Ak = {
|
|
21509
21511
|
context: "$",
|
|
21510
21512
|
value: "."
|
|
21511
|
-
},
|
|
21513
|
+
}, jk = class {
|
|
21512
21514
|
constructor(e, t = {}) {
|
|
21513
21515
|
if (this.key = void 0, this.isContext = void 0, this.isValue = void 0, this.isSibling = void 0, this.path = void 0, this.getter = void 0, this.map = void 0, typeof e != "string") throw TypeError("ref must be a string, got: " + e);
|
|
21514
21516
|
if (this.key = e.trim(), e === "") throw TypeError("ref must be a non-empty string");
|
|
21515
|
-
this.isContext = this.key[0] ===
|
|
21516
|
-
let n = this.isContext ?
|
|
21517
|
-
this.path = this.key.slice(n.length), this.getter = this.path && (0,
|
|
21517
|
+
this.isContext = this.key[0] === Ak.context, this.isValue = this.key[0] === Ak.value, this.isSibling = !this.isContext && !this.isValue;
|
|
21518
|
+
let n = this.isContext ? Ak.context : this.isValue ? Ak.value : "";
|
|
21519
|
+
this.path = this.key.slice(n.length), this.getter = this.path && (0, nk.getter)(this.path, !0), this.map = t.map;
|
|
21518
21520
|
}
|
|
21519
21521
|
getValue(e, t, n) {
|
|
21520
21522
|
let r = this.isContext ? n : this.isValue ? e : t;
|
|
@@ -21539,9 +21541,9 @@ var Ek = (e) => e && e.__isYupSchema__, Dk = class e {
|
|
|
21539
21541
|
return e && e.__isYupRef;
|
|
21540
21542
|
}
|
|
21541
21543
|
};
|
|
21542
|
-
|
|
21543
|
-
var
|
|
21544
|
-
function
|
|
21544
|
+
jk.prototype.__isYupRef = !0;
|
|
21545
|
+
var Mk = (e) => e == null;
|
|
21546
|
+
function Nk(e) {
|
|
21545
21547
|
function t({ value: t, path: n = "", options: r, originalValue: i, schema: a }, o, s) {
|
|
21546
21548
|
let { name: c, test: l, params: u, message: d, skipAbsent: f } = e, { parent: p, context: m, abortEarly: h = a.spec.abortEarly, disableStackTrace: g = a.spec.disableStackTrace } = r, _ = {
|
|
21547
21549
|
value: t,
|
|
@@ -21549,14 +21551,14 @@ function jk(e) {
|
|
|
21549
21551
|
context: m
|
|
21550
21552
|
};
|
|
21551
21553
|
function v(e = {}) {
|
|
21552
|
-
let r =
|
|
21554
|
+
let r = Pk(Object.assign({
|
|
21553
21555
|
value: t,
|
|
21554
21556
|
originalValue: i,
|
|
21555
21557
|
label: a.spec.label,
|
|
21556
21558
|
path: e.path || n,
|
|
21557
21559
|
spec: a.spec,
|
|
21558
21560
|
disableStackTrace: e.disableStackTrace || g
|
|
21559
|
-
}, u, e.params), _), o = new
|
|
21561
|
+
}, u, e.params), _), o = new yk(yk.formatError(e.message || d, r), t, r.path, e.type || c, r.disableStackTrace);
|
|
21560
21562
|
return o.params = r, o;
|
|
21561
21563
|
}
|
|
21562
21564
|
let y = h ? o : s, b = {
|
|
@@ -21566,17 +21568,17 @@ function jk(e) {
|
|
|
21566
21568
|
from: r.from,
|
|
21567
21569
|
createError: v,
|
|
21568
21570
|
resolve(e) {
|
|
21569
|
-
return
|
|
21571
|
+
return Fk(e, _);
|
|
21570
21572
|
},
|
|
21571
21573
|
options: r,
|
|
21572
21574
|
originalValue: i,
|
|
21573
21575
|
schema: a
|
|
21574
21576
|
}, x = (e) => {
|
|
21575
|
-
|
|
21577
|
+
yk.isError(e) ? y(e) : e ? s(null) : y(v());
|
|
21576
21578
|
}, S = (e) => {
|
|
21577
|
-
|
|
21579
|
+
yk.isError(e) ? y(e) : o(e);
|
|
21578
21580
|
};
|
|
21579
|
-
if (f &&
|
|
21581
|
+
if (f && Mk(t)) return x(!0);
|
|
21580
21582
|
let C;
|
|
21581
21583
|
try {
|
|
21582
21584
|
if (C = l.call(b, t, b), typeof C?.then == "function") {
|
|
@@ -21591,17 +21593,17 @@ function jk(e) {
|
|
|
21591
21593
|
}
|
|
21592
21594
|
return t.OPTIONS = e, t;
|
|
21593
21595
|
}
|
|
21594
|
-
function
|
|
21596
|
+
function Pk(e, t) {
|
|
21595
21597
|
if (!e) return e;
|
|
21596
|
-
for (let n of Object.keys(e)) e[n] =
|
|
21598
|
+
for (let n of Object.keys(e)) e[n] = Fk(e[n], t);
|
|
21597
21599
|
return e;
|
|
21598
21600
|
}
|
|
21599
|
-
function
|
|
21600
|
-
return
|
|
21601
|
+
function Fk(e, t) {
|
|
21602
|
+
return jk.isRef(e) ? e.getValue(t.value, t.parent, t.context) : e;
|
|
21601
21603
|
}
|
|
21602
|
-
function
|
|
21604
|
+
function Ik(e, t, n, r = n) {
|
|
21603
21605
|
let i, a, o;
|
|
21604
|
-
return t ? ((0,
|
|
21606
|
+
return t ? ((0, nk.forEach)(t, (s, c, l) => {
|
|
21605
21607
|
let u = c ? s.slice(1, s.length - 1) : s;
|
|
21606
21608
|
e = e.resolve({
|
|
21607
21609
|
context: r,
|
|
@@ -21629,10 +21631,10 @@ function Pk(e, t, n, r = n) {
|
|
|
21629
21631
|
schema: e
|
|
21630
21632
|
};
|
|
21631
21633
|
}
|
|
21632
|
-
var
|
|
21634
|
+
var Lk = class e extends Set {
|
|
21633
21635
|
describe() {
|
|
21634
21636
|
let e = [];
|
|
21635
|
-
for (let t of this.values()) e.push(
|
|
21637
|
+
for (let t of this.values()) e.push(jk.isRef(t) ? t.describe() : t);
|
|
21636
21638
|
return e;
|
|
21637
21639
|
}
|
|
21638
21640
|
resolveAll(e) {
|
|
@@ -21648,28 +21650,28 @@ var Fk = class e extends Set {
|
|
|
21648
21650
|
return e.forEach((e) => n.add(e)), t.forEach((e) => n.delete(e)), n;
|
|
21649
21651
|
}
|
|
21650
21652
|
};
|
|
21651
|
-
function
|
|
21652
|
-
if (
|
|
21653
|
+
function Rk(e, t = /* @__PURE__ */ new Map()) {
|
|
21654
|
+
if (Ok(e) || !e || typeof e != "object") return e;
|
|
21653
21655
|
if (t.has(e)) return t.get(e);
|
|
21654
21656
|
let n;
|
|
21655
21657
|
if (e instanceof Date) n = new Date(e.getTime()), t.set(e, n);
|
|
21656
21658
|
else if (e instanceof RegExp) n = new RegExp(e), t.set(e, n);
|
|
21657
21659
|
else if (Array.isArray(e)) {
|
|
21658
21660
|
n = Array(e.length), t.set(e, n);
|
|
21659
|
-
for (let r = 0; r < e.length; r++) n[r] =
|
|
21661
|
+
for (let r = 0; r < e.length; r++) n[r] = Rk(e[r], t);
|
|
21660
21662
|
} else if (e instanceof Map) {
|
|
21661
21663
|
n = /* @__PURE__ */ new Map(), t.set(e, n);
|
|
21662
|
-
for (let [r, i] of e.entries()) n.set(r,
|
|
21664
|
+
for (let [r, i] of e.entries()) n.set(r, Rk(i, t));
|
|
21663
21665
|
} else if (e instanceof Set) {
|
|
21664
21666
|
n = /* @__PURE__ */ new Set(), t.set(e, n);
|
|
21665
|
-
for (let r of e) n.add(
|
|
21667
|
+
for (let r of e) n.add(Rk(r, t));
|
|
21666
21668
|
} else if (e instanceof Object) {
|
|
21667
21669
|
n = {}, t.set(e, n);
|
|
21668
|
-
for (let [r, i] of Object.entries(e)) n[r] =
|
|
21670
|
+
for (let [r, i] of Object.entries(e)) n[r] = Rk(i, t);
|
|
21669
21671
|
} else throw Error(`Unable to clone ${e}`);
|
|
21670
21672
|
return n;
|
|
21671
21673
|
}
|
|
21672
|
-
function
|
|
21674
|
+
function zk(e) {
|
|
21673
21675
|
if (!(e != null && e.length)) return;
|
|
21674
21676
|
let t = [], n = "", r = !1, i = !1;
|
|
21675
21677
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -21694,23 +21696,23 @@ function Lk(e) {
|
|
|
21694
21696
|
}
|
|
21695
21697
|
return n && t.push(...n.split(".").filter(Boolean)), t;
|
|
21696
21698
|
}
|
|
21697
|
-
function
|
|
21699
|
+
function Bk(e, t) {
|
|
21698
21700
|
let n = t ? `${t}.${e.path}` : e.path;
|
|
21699
21701
|
return e.errors.map((e) => ({
|
|
21700
21702
|
message: e,
|
|
21701
|
-
path:
|
|
21703
|
+
path: zk(n)
|
|
21702
21704
|
}));
|
|
21703
21705
|
}
|
|
21704
|
-
function
|
|
21706
|
+
function Vk(e, t) {
|
|
21705
21707
|
var n;
|
|
21706
|
-
if (!((n = e.inner) != null && n.length) && e.errors.length) return
|
|
21708
|
+
if (!((n = e.inner) != null && n.length) && e.errors.length) return Bk(e, t);
|
|
21707
21709
|
let r = t ? `${t}.${e.path}` : e.path;
|
|
21708
|
-
return e.inner.flatMap((e) =>
|
|
21710
|
+
return e.inner.flatMap((e) => Vk(e, r));
|
|
21709
21711
|
}
|
|
21710
|
-
var
|
|
21712
|
+
var Hk = class {
|
|
21711
21713
|
constructor(e) {
|
|
21712
|
-
this.type = void 0, this.deps = [], this.tests = void 0, this.transforms = void 0, this.conditions = [], this._mutate = void 0, this.internalTests = {}, this._whitelist = new
|
|
21713
|
-
this.typeError(
|
|
21714
|
+
this.type = void 0, this.deps = [], this.tests = void 0, this.transforms = void 0, this.conditions = [], this._mutate = void 0, this.internalTests = {}, this._whitelist = new Lk(), this._blacklist = new Lk(), this.exclusiveTests = Object.create(null), this._typeCheck = void 0, this.spec = void 0, this.tests = [], this.transforms = [], this.withMutation(() => {
|
|
21715
|
+
this.typeError(bk.notType);
|
|
21714
21716
|
}), this.type = e.type, this._typeCheck = e.check, this.spec = Object.assign({
|
|
21715
21717
|
strip: !1,
|
|
21716
21718
|
strict: !1,
|
|
@@ -21730,7 +21732,7 @@ var Bk = class {
|
|
|
21730
21732
|
clone(e) {
|
|
21731
21733
|
if (this._mutate) return e && Object.assign(this.spec, e), this;
|
|
21732
21734
|
let t = Object.create(Object.getPrototypeOf(this));
|
|
21733
|
-
return t.type = this.type, t._typeCheck = this._typeCheck, t._whitelist = this._whitelist.clone(), t._blacklist = this._blacklist.clone(), t.internalTests = Object.assign({}, this.internalTests), t.exclusiveTests = Object.assign({}, this.exclusiveTests), t.deps = [...this.deps], t.conditions = [...this.conditions], t.tests = [...this.tests], t.transforms = [...this.transforms], t.spec =
|
|
21735
|
+
return t.type = this.type, t._typeCheck = this._typeCheck, t._whitelist = this._whitelist.clone(), t._blacklist = this._blacklist.clone(), t.internalTests = Object.assign({}, this.internalTests), t.exclusiveTests = Object.assign({}, this.exclusiveTests), t.deps = [...this.deps], t.conditions = [...this.conditions], t.tests = [...this.tests], t.transforms = [...this.transforms], t.spec = Rk(Object.assign({}, this.spec, e)), t;
|
|
21734
21736
|
}
|
|
21735
21737
|
label(e) {
|
|
21736
21738
|
let t = this.clone();
|
|
@@ -21780,8 +21782,8 @@ var Bk = class {
|
|
|
21780
21782
|
cast(e, t = {}) {
|
|
21781
21783
|
let n = this.resolve(Object.assign({}, t, { value: e })), r = t.assert === "ignore-optionality", i = n._cast(e, t);
|
|
21782
21784
|
if (t.assert !== !1 && !n.isType(i)) {
|
|
21783
|
-
if (r &&
|
|
21784
|
-
let a =
|
|
21785
|
+
if (r && Mk(i)) return i;
|
|
21786
|
+
let a = fk(e), o = fk(i);
|
|
21785
21787
|
throw TypeError(`The value of ${t.path || "field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${a} \n` + (o === a ? "" : `result of cast: ${o}`));
|
|
21786
21788
|
}
|
|
21787
21789
|
return i;
|
|
@@ -21850,23 +21852,23 @@ var Bk = class {
|
|
|
21850
21852
|
validate(e, t) {
|
|
21851
21853
|
let n = this.resolve(Object.assign({}, t, { value: e })), r = t?.disableStackTrace ?? n.spec.disableStackTrace;
|
|
21852
21854
|
return new Promise((i, a) => n._validate(e, t, (e, t) => {
|
|
21853
|
-
|
|
21855
|
+
yk.isError(e) && (e.value = t), a(e);
|
|
21854
21856
|
}, (e, t) => {
|
|
21855
|
-
e.length ? a(new
|
|
21857
|
+
e.length ? a(new yk(e, t, void 0, void 0, r)) : i(t);
|
|
21856
21858
|
}));
|
|
21857
21859
|
}
|
|
21858
21860
|
validateSync(e, t) {
|
|
21859
21861
|
let n = this.resolve(Object.assign({}, t, { value: e })), r, i = t?.disableStackTrace ?? n.spec.disableStackTrace;
|
|
21860
21862
|
return n._validate(e, Object.assign({}, t, { sync: !0 }), (e, t) => {
|
|
21861
|
-
throw
|
|
21863
|
+
throw yk.isError(e) && (e.value = t), e;
|
|
21862
21864
|
}, (t, n) => {
|
|
21863
|
-
if (t.length) throw new
|
|
21865
|
+
if (t.length) throw new yk(t, e, void 0, void 0, i);
|
|
21864
21866
|
r = n;
|
|
21865
21867
|
}), r;
|
|
21866
21868
|
}
|
|
21867
21869
|
isValid(e, t) {
|
|
21868
21870
|
return this.validate(e, t).then(() => !0, (e) => {
|
|
21869
|
-
if (
|
|
21871
|
+
if (yk.isError(e)) return !1;
|
|
21870
21872
|
throw e;
|
|
21871
21873
|
});
|
|
21872
21874
|
}
|
|
@@ -21874,13 +21876,13 @@ var Bk = class {
|
|
|
21874
21876
|
try {
|
|
21875
21877
|
return this.validateSync(e, t), !0;
|
|
21876
21878
|
} catch (e) {
|
|
21877
|
-
if (
|
|
21879
|
+
if (yk.isError(e)) return !1;
|
|
21878
21880
|
throw e;
|
|
21879
21881
|
}
|
|
21880
21882
|
}
|
|
21881
21883
|
_getDefault(e) {
|
|
21882
21884
|
let t = this.spec.default;
|
|
21883
|
-
return t == null ? t : typeof t == "function" ? t.call(this, e) :
|
|
21885
|
+
return t == null ? t : typeof t == "function" ? t.call(this, e) : Rk(t);
|
|
21884
21886
|
}
|
|
21885
21887
|
getDefault(e) {
|
|
21886
21888
|
return this.resolve(e || {})._getDefault(e);
|
|
@@ -21893,7 +21895,7 @@ var Bk = class {
|
|
|
21893
21895
|
}
|
|
21894
21896
|
nullability(e, t) {
|
|
21895
21897
|
let n = this.clone({ nullable: e });
|
|
21896
|
-
return n.internalTests.nullable =
|
|
21898
|
+
return n.internalTests.nullable = Nk({
|
|
21897
21899
|
message: t,
|
|
21898
21900
|
name: "nullable",
|
|
21899
21901
|
test(e) {
|
|
@@ -21903,7 +21905,7 @@ var Bk = class {
|
|
|
21903
21905
|
}
|
|
21904
21906
|
optionality(e, t) {
|
|
21905
21907
|
let n = this.clone({ optional: e });
|
|
21906
|
-
return n.internalTests.optionality =
|
|
21908
|
+
return n.internalTests.optionality = Nk({
|
|
21907
21909
|
message: t,
|
|
21908
21910
|
name: "optionality",
|
|
21909
21911
|
test(e) {
|
|
@@ -21914,16 +21916,16 @@ var Bk = class {
|
|
|
21914
21916
|
optional() {
|
|
21915
21917
|
return this.optionality(!0);
|
|
21916
21918
|
}
|
|
21917
|
-
defined(e =
|
|
21919
|
+
defined(e = bk.defined) {
|
|
21918
21920
|
return this.optionality(!1, e);
|
|
21919
21921
|
}
|
|
21920
21922
|
nullable() {
|
|
21921
21923
|
return this.nullability(!0);
|
|
21922
21924
|
}
|
|
21923
|
-
nonNullable(e =
|
|
21925
|
+
nonNullable(e = bk.notNull) {
|
|
21924
21926
|
return this.nullability(!1, e);
|
|
21925
21927
|
}
|
|
21926
|
-
required(e =
|
|
21928
|
+
required(e = bk.required) {
|
|
21927
21929
|
return this.clone().withMutation((t) => t.nonNullable(e).defined(e));
|
|
21928
21930
|
}
|
|
21929
21931
|
notRequired() {
|
|
@@ -21942,21 +21944,21 @@ var Bk = class {
|
|
|
21942
21944
|
name: e[0],
|
|
21943
21945
|
message: e[1],
|
|
21944
21946
|
test: e[2]
|
|
21945
|
-
}, t.message === void 0 && (t.message =
|
|
21946
|
-
let n = this.clone(), r =
|
|
21947
|
+
}, t.message === void 0 && (t.message = bk.default), typeof t.test != "function") throw TypeError("`test` is a required parameters");
|
|
21948
|
+
let n = this.clone(), r = Nk(t), i = t.exclusive || t.name && n.exclusiveTests[t.name] === !0;
|
|
21947
21949
|
if (t.exclusive && !t.name) throw TypeError("Exclusive tests must provide a unique `name` identifying the test");
|
|
21948
21950
|
return t.name && (n.exclusiveTests[t.name] = !!t.exclusive), n.tests = n.tests.filter((e) => !(e.OPTIONS.name === t.name && (i || e.OPTIONS.test === r.OPTIONS.test))), n.tests.push(r), n;
|
|
21949
21951
|
}
|
|
21950
21952
|
when(e, t) {
|
|
21951
21953
|
!Array.isArray(e) && typeof e != "string" && (t = e, e = ".");
|
|
21952
|
-
let n = this.clone(), r =
|
|
21954
|
+
let n = this.clone(), r = pk(e).map((e) => new jk(e));
|
|
21953
21955
|
return r.forEach((e) => {
|
|
21954
21956
|
e.isSibling && n.deps.push(e.key);
|
|
21955
|
-
}), n.conditions.push(typeof t == "function" ? new
|
|
21957
|
+
}), n.conditions.push(typeof t == "function" ? new kk(r, t) : kk.fromOptions(r, t)), n;
|
|
21956
21958
|
}
|
|
21957
21959
|
typeError(e) {
|
|
21958
21960
|
let t = this.clone();
|
|
21959
|
-
return t.internalTests.typeError =
|
|
21961
|
+
return t.internalTests.typeError = Nk({
|
|
21960
21962
|
message: e,
|
|
21961
21963
|
name: "typeError",
|
|
21962
21964
|
skipAbsent: !0,
|
|
@@ -21965,11 +21967,11 @@ var Bk = class {
|
|
|
21965
21967
|
}
|
|
21966
21968
|
}), t;
|
|
21967
21969
|
}
|
|
21968
|
-
oneOf(e, t =
|
|
21970
|
+
oneOf(e, t = bk.oneOf) {
|
|
21969
21971
|
let n = this.clone();
|
|
21970
21972
|
return e.forEach((e) => {
|
|
21971
21973
|
n._whitelist.add(e), n._blacklist.delete(e);
|
|
21972
|
-
}), n.internalTests.whiteList =
|
|
21974
|
+
}), n.internalTests.whiteList = Nk({
|
|
21973
21975
|
message: t,
|
|
21974
21976
|
name: "oneOf",
|
|
21975
21977
|
skipAbsent: !0,
|
|
@@ -21982,11 +21984,11 @@ var Bk = class {
|
|
|
21982
21984
|
}
|
|
21983
21985
|
}), n;
|
|
21984
21986
|
}
|
|
21985
|
-
notOneOf(e, t =
|
|
21987
|
+
notOneOf(e, t = bk.notOneOf) {
|
|
21986
21988
|
let n = this.clone();
|
|
21987
21989
|
return e.forEach((e) => {
|
|
21988
21990
|
n._blacklist.add(e), n._whitelist.delete(e);
|
|
21989
|
-
}), n.internalTests.blacklist =
|
|
21991
|
+
}), n.internalTests.blacklist = Nk({
|
|
21990
21992
|
message: t,
|
|
21991
21993
|
name: "notOneOf",
|
|
21992
21994
|
test(e) {
|
|
@@ -22014,7 +22016,7 @@ var Bk = class {
|
|
|
22014
22016
|
oneOf: t._whitelist.describe(),
|
|
22015
22017
|
notOneOf: t._blacklist.describe(),
|
|
22016
22018
|
tests: t.tests.filter((e, t, n) => n.findIndex((t) => t.OPTIONS.name === e.OPTIONS.name) === t).map((t) => {
|
|
22017
|
-
let n = t.OPTIONS.params && e ?
|
|
22019
|
+
let n = t.OPTIONS.params && e ? Pk(Object.assign({}, t.OPTIONS.params), e) : t.OPTIONS.params;
|
|
22018
22020
|
return {
|
|
22019
22021
|
name: t.OPTIONS.name,
|
|
22020
22022
|
params: n
|
|
@@ -22031,43 +22033,43 @@ var Bk = class {
|
|
|
22031
22033
|
try {
|
|
22032
22034
|
return { value: await e.validate(t, { abortEarly: !1 }) };
|
|
22033
22035
|
} catch (e) {
|
|
22034
|
-
if (e instanceof
|
|
22036
|
+
if (e instanceof yk) return { issues: Vk(e) };
|
|
22035
22037
|
throw e;
|
|
22036
22038
|
}
|
|
22037
22039
|
}
|
|
22038
22040
|
};
|
|
22039
22041
|
}
|
|
22040
22042
|
};
|
|
22041
|
-
|
|
22042
|
-
for (let e of ["validate", "validateSync"])
|
|
22043
|
-
let { parent: i, parentPath: a, schema: o } =
|
|
22043
|
+
Hk.prototype.__isYupSchema__ = !0;
|
|
22044
|
+
for (let e of ["validate", "validateSync"]) Hk.prototype[`${e}At`] = function(t, n, r = {}) {
|
|
22045
|
+
let { parent: i, parentPath: a, schema: o } = Ik(this, t, n, r.context);
|
|
22044
22046
|
return o[e](i && i[a], Object.assign({}, r, {
|
|
22045
22047
|
parent: i,
|
|
22046
22048
|
path: t
|
|
22047
22049
|
}));
|
|
22048
22050
|
};
|
|
22049
|
-
for (let e of ["equals", "is"])
|
|
22050
|
-
for (let e of ["not", "nope"])
|
|
22051
|
-
var
|
|
22052
|
-
function
|
|
22053
|
-
return new
|
|
22051
|
+
for (let e of ["equals", "is"]) Hk.prototype[e] = Hk.prototype.oneOf;
|
|
22052
|
+
for (let e of ["not", "nope"]) Hk.prototype[e] = Hk.prototype.notOneOf;
|
|
22053
|
+
var Uk = () => !0;
|
|
22054
|
+
function Wk(e) {
|
|
22055
|
+
return new Gk(e);
|
|
22054
22056
|
}
|
|
22055
|
-
var
|
|
22057
|
+
var Gk = class extends Hk {
|
|
22056
22058
|
constructor(e) {
|
|
22057
22059
|
super(typeof e == "function" ? {
|
|
22058
22060
|
type: "mixed",
|
|
22059
22061
|
check: e
|
|
22060
22062
|
} : Object.assign({
|
|
22061
22063
|
type: "mixed",
|
|
22062
|
-
check:
|
|
22064
|
+
check: Uk
|
|
22063
22065
|
}, e));
|
|
22064
22066
|
}
|
|
22065
22067
|
};
|
|
22066
|
-
|
|
22067
|
-
function
|
|
22068
|
-
return new
|
|
22068
|
+
Wk.prototype = Gk.prototype;
|
|
22069
|
+
function Kk() {
|
|
22070
|
+
return new qk();
|
|
22069
22071
|
}
|
|
22070
|
-
var
|
|
22072
|
+
var qk = class extends Hk {
|
|
22071
22073
|
constructor() {
|
|
22072
22074
|
super({
|
|
22073
22075
|
type: "boolean",
|
|
@@ -22084,25 +22086,25 @@ var Gk = class extends Bk {
|
|
|
22084
22086
|
});
|
|
22085
22087
|
});
|
|
22086
22088
|
}
|
|
22087
|
-
isTrue(e =
|
|
22089
|
+
isTrue(e = wk.isValue) {
|
|
22088
22090
|
return this.test({
|
|
22089
22091
|
message: e,
|
|
22090
22092
|
name: "is-value",
|
|
22091
22093
|
exclusive: !0,
|
|
22092
22094
|
params: { value: "true" },
|
|
22093
22095
|
test(e) {
|
|
22094
|
-
return
|
|
22096
|
+
return Mk(e) || e === !0;
|
|
22095
22097
|
}
|
|
22096
22098
|
});
|
|
22097
22099
|
}
|
|
22098
|
-
isFalse(e =
|
|
22100
|
+
isFalse(e = wk.isValue) {
|
|
22099
22101
|
return this.test({
|
|
22100
22102
|
message: e,
|
|
22101
22103
|
name: "is-value",
|
|
22102
22104
|
exclusive: !0,
|
|
22103
22105
|
params: { value: "false" },
|
|
22104
22106
|
test(e) {
|
|
22105
|
-
return
|
|
22107
|
+
return Mk(e) || e === !1;
|
|
22106
22108
|
}
|
|
22107
22109
|
});
|
|
22108
22110
|
}
|
|
@@ -22131,40 +22133,40 @@ var Gk = class extends Bk {
|
|
|
22131
22133
|
return super.strip(e);
|
|
22132
22134
|
}
|
|
22133
22135
|
};
|
|
22134
|
-
|
|
22135
|
-
var
|
|
22136
|
-
function
|
|
22137
|
-
let t =
|
|
22136
|
+
Kk.prototype = qk.prototype;
|
|
22137
|
+
var Jk = /^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;
|
|
22138
|
+
function Yk(e) {
|
|
22139
|
+
let t = Xk(e);
|
|
22138
22140
|
if (!t) return Date.parse ? Date.parse(e) : NaN;
|
|
22139
22141
|
if (t.z === void 0 && t.plusMinus === void 0) return new Date(t.year, t.month, t.day, t.hour, t.minute, t.second, t.millisecond).valueOf();
|
|
22140
22142
|
let n = 0;
|
|
22141
22143
|
return t.z !== "Z" && t.plusMinus !== void 0 && (n = t.hourOffset * 60 + t.minuteOffset, t.plusMinus === "+" && (n = 0 - n)), Date.UTC(t.year, t.month, t.day, t.hour, t.minute + n, t.second, t.millisecond);
|
|
22142
22144
|
}
|
|
22143
|
-
function
|
|
22144
|
-
let t =
|
|
22145
|
+
function Xk(e) {
|
|
22146
|
+
let t = Jk.exec(e);
|
|
22145
22147
|
return t ? {
|
|
22146
|
-
year:
|
|
22147
|
-
month:
|
|
22148
|
-
day:
|
|
22149
|
-
hour:
|
|
22150
|
-
minute:
|
|
22151
|
-
second:
|
|
22152
|
-
millisecond: t[7] ?
|
|
22148
|
+
year: Zk(t[1]),
|
|
22149
|
+
month: Zk(t[2], 1) - 1,
|
|
22150
|
+
day: Zk(t[3], 1),
|
|
22151
|
+
hour: Zk(t[4]),
|
|
22152
|
+
minute: Zk(t[5]),
|
|
22153
|
+
second: Zk(t[6]),
|
|
22154
|
+
millisecond: t[7] ? Zk(t[7].substring(0, 3)) : 0,
|
|
22153
22155
|
precision: t[7]?.length ?? void 0,
|
|
22154
22156
|
z: t[8] || void 0,
|
|
22155
22157
|
plusMinus: t[9] || void 0,
|
|
22156
|
-
hourOffset:
|
|
22157
|
-
minuteOffset:
|
|
22158
|
+
hourOffset: Zk(t[10]),
|
|
22159
|
+
minuteOffset: Zk(t[11])
|
|
22158
22160
|
} : null;
|
|
22159
22161
|
}
|
|
22160
|
-
function
|
|
22162
|
+
function Zk(e, t = 0) {
|
|
22161
22163
|
return Number(e) || t;
|
|
22162
22164
|
}
|
|
22163
|
-
var
|
|
22164
|
-
function
|
|
22165
|
-
return new
|
|
22165
|
+
var Qk = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, $k = /^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i, eA = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i, tA = /* @__PURE__ */ RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"), nA = (e) => Mk(e) || e === e.trim(), rA = {}.toString();
|
|
22166
|
+
function iA() {
|
|
22167
|
+
return new aA();
|
|
22166
22168
|
}
|
|
22167
|
-
var
|
|
22169
|
+
var aA = class extends Hk {
|
|
22168
22170
|
constructor() {
|
|
22169
22171
|
super({
|
|
22170
22172
|
type: "string",
|
|
@@ -22175,13 +22177,13 @@ var rA = class extends Bk {
|
|
|
22175
22177
|
this.transform((e, t) => {
|
|
22176
22178
|
if (!this.spec.coerce || this.isType(e) || Array.isArray(e)) return e;
|
|
22177
22179
|
let n = e != null && e.toString ? e.toString() : e;
|
|
22178
|
-
return n ===
|
|
22180
|
+
return n === rA ? e : n;
|
|
22179
22181
|
});
|
|
22180
22182
|
});
|
|
22181
22183
|
}
|
|
22182
22184
|
required(e) {
|
|
22183
22185
|
return super.required(e).withMutation((t) => t.test({
|
|
22184
|
-
message: e ||
|
|
22186
|
+
message: e || bk.required,
|
|
22185
22187
|
name: "required",
|
|
22186
22188
|
skipAbsent: !0,
|
|
22187
22189
|
test: (e) => !!e.length
|
|
@@ -22190,7 +22192,7 @@ var rA = class extends Bk {
|
|
|
22190
22192
|
notRequired() {
|
|
22191
22193
|
return super.notRequired().withMutation((e) => (e.tests = e.tests.filter((e) => e.OPTIONS.name !== "required"), e));
|
|
22192
22194
|
}
|
|
22193
|
-
length(e, t =
|
|
22195
|
+
length(e, t = xk.length) {
|
|
22194
22196
|
return this.test({
|
|
22195
22197
|
message: t,
|
|
22196
22198
|
name: "length",
|
|
@@ -22202,7 +22204,7 @@ var rA = class extends Bk {
|
|
|
22202
22204
|
}
|
|
22203
22205
|
});
|
|
22204
22206
|
}
|
|
22205
|
-
min(e, t =
|
|
22207
|
+
min(e, t = xk.min) {
|
|
22206
22208
|
return this.test({
|
|
22207
22209
|
message: t,
|
|
22208
22210
|
name: "min",
|
|
@@ -22214,7 +22216,7 @@ var rA = class extends Bk {
|
|
|
22214
22216
|
}
|
|
22215
22217
|
});
|
|
22216
22218
|
}
|
|
22217
|
-
max(e, t =
|
|
22219
|
+
max(e, t = xk.max) {
|
|
22218
22220
|
return this.test({
|
|
22219
22221
|
name: "max",
|
|
22220
22222
|
exclusive: !0,
|
|
@@ -22230,28 +22232,28 @@ var rA = class extends Bk {
|
|
|
22230
22232
|
let n = !1, r, i;
|
|
22231
22233
|
return t && (typeof t == "object" ? {excludeEmptyString: n = !1, message: r, name: i} = t : r = t), this.test({
|
|
22232
22234
|
name: i || "matches",
|
|
22233
|
-
message: r ||
|
|
22235
|
+
message: r || xk.matches,
|
|
22234
22236
|
params: { regex: e },
|
|
22235
22237
|
skipAbsent: !0,
|
|
22236
22238
|
test: (t) => t === "" && n || t.search(e) !== -1
|
|
22237
22239
|
});
|
|
22238
22240
|
}
|
|
22239
|
-
email(e =
|
|
22240
|
-
return this.matches(
|
|
22241
|
+
email(e = xk.email) {
|
|
22242
|
+
return this.matches(Qk, {
|
|
22241
22243
|
name: "email",
|
|
22242
22244
|
message: e,
|
|
22243
22245
|
excludeEmptyString: !0
|
|
22244
22246
|
});
|
|
22245
22247
|
}
|
|
22246
|
-
url(e =
|
|
22247
|
-
return this.matches(
|
|
22248
|
+
url(e = xk.url) {
|
|
22249
|
+
return this.matches($k, {
|
|
22248
22250
|
name: "url",
|
|
22249
22251
|
message: e,
|
|
22250
22252
|
excludeEmptyString: !0
|
|
22251
22253
|
});
|
|
22252
22254
|
}
|
|
22253
|
-
uuid(e =
|
|
22254
|
-
return this.matches(
|
|
22255
|
+
uuid(e = xk.uuid) {
|
|
22256
|
+
return this.matches(eA, {
|
|
22255
22257
|
name: "uuid",
|
|
22256
22258
|
message: e,
|
|
22257
22259
|
excludeEmptyString: !1
|
|
@@ -22259,28 +22261,28 @@ var rA = class extends Bk {
|
|
|
22259
22261
|
}
|
|
22260
22262
|
datetime(e) {
|
|
22261
22263
|
let t = "", n, r;
|
|
22262
|
-
return e && (typeof e == "object" ? {message: t = "", allowOffset: n = !1, precision: r = void 0} = e : t = e), this.matches(
|
|
22264
|
+
return e && (typeof e == "object" ? {message: t = "", allowOffset: n = !1, precision: r = void 0} = e : t = e), this.matches(tA, {
|
|
22263
22265
|
name: "datetime",
|
|
22264
|
-
message: t ||
|
|
22266
|
+
message: t || xk.datetime,
|
|
22265
22267
|
excludeEmptyString: !0
|
|
22266
22268
|
}).test({
|
|
22267
22269
|
name: "datetime_offset",
|
|
22268
|
-
message: t ||
|
|
22270
|
+
message: t || xk.datetime_offset,
|
|
22269
22271
|
params: { allowOffset: n },
|
|
22270
22272
|
skipAbsent: !0,
|
|
22271
22273
|
test: (e) => {
|
|
22272
22274
|
if (!e || n) return !0;
|
|
22273
|
-
let t =
|
|
22275
|
+
let t = Xk(e);
|
|
22274
22276
|
return t ? !!t.z : !1;
|
|
22275
22277
|
}
|
|
22276
22278
|
}).test({
|
|
22277
22279
|
name: "datetime_precision",
|
|
22278
|
-
message: t ||
|
|
22280
|
+
message: t || xk.datetime_precision,
|
|
22279
22281
|
params: { precision: r },
|
|
22280
22282
|
skipAbsent: !0,
|
|
22281
22283
|
test: (e) => {
|
|
22282
22284
|
if (!e || r == null) return !0;
|
|
22283
|
-
let t =
|
|
22285
|
+
let t = Xk(e);
|
|
22284
22286
|
return t ? t.precision === r : !1;
|
|
22285
22287
|
}
|
|
22286
22288
|
});
|
|
@@ -22288,43 +22290,43 @@ var rA = class extends Bk {
|
|
|
22288
22290
|
ensure() {
|
|
22289
22291
|
return this.default("").transform((e) => e === null ? "" : e);
|
|
22290
22292
|
}
|
|
22291
|
-
trim(e =
|
|
22293
|
+
trim(e = xk.trim) {
|
|
22292
22294
|
return this.transform((e) => e == null ? e : e.trim()).test({
|
|
22293
22295
|
message: e,
|
|
22294
22296
|
name: "trim",
|
|
22295
|
-
test:
|
|
22297
|
+
test: nA
|
|
22296
22298
|
});
|
|
22297
22299
|
}
|
|
22298
|
-
lowercase(e =
|
|
22299
|
-
return this.transform((e) =>
|
|
22300
|
+
lowercase(e = xk.lowercase) {
|
|
22301
|
+
return this.transform((e) => Mk(e) ? e : e.toLowerCase()).test({
|
|
22300
22302
|
message: e,
|
|
22301
22303
|
name: "string_case",
|
|
22302
22304
|
exclusive: !0,
|
|
22303
22305
|
skipAbsent: !0,
|
|
22304
|
-
test: (e) =>
|
|
22306
|
+
test: (e) => Mk(e) || e === e.toLowerCase()
|
|
22305
22307
|
});
|
|
22306
22308
|
}
|
|
22307
|
-
uppercase(e =
|
|
22308
|
-
return this.transform((e) =>
|
|
22309
|
+
uppercase(e = xk.uppercase) {
|
|
22310
|
+
return this.transform((e) => Mk(e) ? e : e.toUpperCase()).test({
|
|
22309
22311
|
message: e,
|
|
22310
22312
|
name: "string_case",
|
|
22311
22313
|
exclusive: !0,
|
|
22312
22314
|
skipAbsent: !0,
|
|
22313
|
-
test: (e) =>
|
|
22315
|
+
test: (e) => Mk(e) || e === e.toUpperCase()
|
|
22314
22316
|
});
|
|
22315
22317
|
}
|
|
22316
22318
|
};
|
|
22317
|
-
|
|
22318
|
-
var
|
|
22319
|
-
function
|
|
22320
|
-
return new
|
|
22319
|
+
iA.prototype = aA.prototype;
|
|
22320
|
+
var oA = (e) => e != +e;
|
|
22321
|
+
function sA() {
|
|
22322
|
+
return new cA();
|
|
22321
22323
|
}
|
|
22322
|
-
var
|
|
22324
|
+
var cA = class extends Hk {
|
|
22323
22325
|
constructor() {
|
|
22324
22326
|
super({
|
|
22325
22327
|
type: "number",
|
|
22326
22328
|
check(e) {
|
|
22327
|
-
return e instanceof Number && (e = e.valueOf()), typeof e == "number" && !
|
|
22329
|
+
return e instanceof Number && (e = e.valueOf()), typeof e == "number" && !oA(e);
|
|
22328
22330
|
}
|
|
22329
22331
|
}), this.withMutation(() => {
|
|
22330
22332
|
this.transform((e, t) => {
|
|
@@ -22338,7 +22340,7 @@ var oA = class extends Bk {
|
|
|
22338
22340
|
});
|
|
22339
22341
|
});
|
|
22340
22342
|
}
|
|
22341
|
-
min(e, t =
|
|
22343
|
+
min(e, t = Sk.min) {
|
|
22342
22344
|
return this.test({
|
|
22343
22345
|
message: t,
|
|
22344
22346
|
name: "min",
|
|
@@ -22350,7 +22352,7 @@ var oA = class extends Bk {
|
|
|
22350
22352
|
}
|
|
22351
22353
|
});
|
|
22352
22354
|
}
|
|
22353
|
-
max(e, t =
|
|
22355
|
+
max(e, t = Sk.max) {
|
|
22354
22356
|
return this.test({
|
|
22355
22357
|
message: t,
|
|
22356
22358
|
name: "max",
|
|
@@ -22362,7 +22364,7 @@ var oA = class extends Bk {
|
|
|
22362
22364
|
}
|
|
22363
22365
|
});
|
|
22364
22366
|
}
|
|
22365
|
-
lessThan(e, t =
|
|
22367
|
+
lessThan(e, t = Sk.lessThan) {
|
|
22366
22368
|
return this.test({
|
|
22367
22369
|
message: t,
|
|
22368
22370
|
name: "max",
|
|
@@ -22374,7 +22376,7 @@ var oA = class extends Bk {
|
|
|
22374
22376
|
}
|
|
22375
22377
|
});
|
|
22376
22378
|
}
|
|
22377
|
-
moreThan(e, t =
|
|
22379
|
+
moreThan(e, t = Sk.moreThan) {
|
|
22378
22380
|
return this.test({
|
|
22379
22381
|
message: t,
|
|
22380
22382
|
name: "min",
|
|
@@ -22386,13 +22388,13 @@ var oA = class extends Bk {
|
|
|
22386
22388
|
}
|
|
22387
22389
|
});
|
|
22388
22390
|
}
|
|
22389
|
-
positive(e =
|
|
22391
|
+
positive(e = Sk.positive) {
|
|
22390
22392
|
return this.moreThan(0, e);
|
|
22391
22393
|
}
|
|
22392
|
-
negative(e =
|
|
22394
|
+
negative(e = Sk.negative) {
|
|
22393
22395
|
return this.lessThan(0, e);
|
|
22394
22396
|
}
|
|
22395
|
-
integer(e =
|
|
22397
|
+
integer(e = Sk.integer) {
|
|
22396
22398
|
return this.test({
|
|
22397
22399
|
name: "integer",
|
|
22398
22400
|
message: e,
|
|
@@ -22401,7 +22403,7 @@ var oA = class extends Bk {
|
|
|
22401
22403
|
});
|
|
22402
22404
|
}
|
|
22403
22405
|
truncate() {
|
|
22404
|
-
return this.transform((e) =>
|
|
22406
|
+
return this.transform((e) => Mk(e) ? e : e | 0);
|
|
22405
22407
|
}
|
|
22406
22408
|
round(e) {
|
|
22407
22409
|
let t = [
|
|
@@ -22412,28 +22414,28 @@ var oA = class extends Bk {
|
|
|
22412
22414
|
];
|
|
22413
22415
|
if (e = e?.toLowerCase() || "round", e === "trunc") return this.truncate();
|
|
22414
22416
|
if (t.indexOf(e.toLowerCase()) === -1) throw TypeError("Only valid options for round() are: " + t.join(", "));
|
|
22415
|
-
return this.transform((t) =>
|
|
22417
|
+
return this.transform((t) => Mk(t) ? t : Math[e](t));
|
|
22416
22418
|
}
|
|
22417
22419
|
};
|
|
22418
|
-
|
|
22419
|
-
var
|
|
22420
|
-
function
|
|
22421
|
-
return new
|
|
22420
|
+
sA.prototype = cA.prototype;
|
|
22421
|
+
var lA = /* @__PURE__ */ new Date(""), uA = (e) => Object.prototype.toString.call(e) === "[object Date]";
|
|
22422
|
+
function dA() {
|
|
22423
|
+
return new fA();
|
|
22422
22424
|
}
|
|
22423
|
-
var
|
|
22425
|
+
var fA = class e extends Hk {
|
|
22424
22426
|
constructor() {
|
|
22425
22427
|
super({
|
|
22426
22428
|
type: "date",
|
|
22427
22429
|
check(e) {
|
|
22428
|
-
return
|
|
22430
|
+
return uA(e) && !isNaN(e.getTime());
|
|
22429
22431
|
}
|
|
22430
22432
|
}), this.withMutation(() => {
|
|
22431
|
-
this.transform((t, n) => !this.spec.coerce || this.isType(t) || t === null ? t : (t =
|
|
22433
|
+
this.transform((t, n) => !this.spec.coerce || this.isType(t) || t === null ? t : (t = Yk(t), isNaN(t) ? e.INVALID_DATE : new Date(t)));
|
|
22432
22434
|
});
|
|
22433
22435
|
}
|
|
22434
22436
|
prepareParam(e, t) {
|
|
22435
22437
|
let n;
|
|
22436
|
-
if (
|
|
22438
|
+
if (jk.isRef(e)) n = e;
|
|
22437
22439
|
else {
|
|
22438
22440
|
let r = this.cast(e);
|
|
22439
22441
|
if (!this._typeCheck(r)) throw TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);
|
|
@@ -22441,7 +22443,7 @@ var uA = class e extends Bk {
|
|
|
22441
22443
|
}
|
|
22442
22444
|
return n;
|
|
22443
22445
|
}
|
|
22444
|
-
min(e, t =
|
|
22446
|
+
min(e, t = Ck.min) {
|
|
22445
22447
|
let n = this.prepareParam(e, "min");
|
|
22446
22448
|
return this.test({
|
|
22447
22449
|
message: t,
|
|
@@ -22454,7 +22456,7 @@ var uA = class e extends Bk {
|
|
|
22454
22456
|
}
|
|
22455
22457
|
});
|
|
22456
22458
|
}
|
|
22457
|
-
max(e, t =
|
|
22459
|
+
max(e, t = Ck.max) {
|
|
22458
22460
|
let n = this.prepareParam(e, "max");
|
|
22459
22461
|
return this.test({
|
|
22460
22462
|
message: t,
|
|
@@ -22468,30 +22470,30 @@ var uA = class e extends Bk {
|
|
|
22468
22470
|
});
|
|
22469
22471
|
}
|
|
22470
22472
|
};
|
|
22471
|
-
|
|
22472
|
-
function
|
|
22473
|
+
fA.INVALID_DATE = lA, dA.prototype = fA.prototype, dA.INVALID_DATE = lA;
|
|
22474
|
+
function pA(e, t = []) {
|
|
22473
22475
|
let n = [], r = /* @__PURE__ */ new Set(), i = new Set(t.map(([e, t]) => `${e}-${t}`));
|
|
22474
22476
|
function a(e, t) {
|
|
22475
|
-
let a = (0,
|
|
22477
|
+
let a = (0, nk.split)(e)[0];
|
|
22476
22478
|
r.add(a), i.has(`${t}-${a}`) || n.push([t, a]);
|
|
22477
22479
|
}
|
|
22478
22480
|
for (let t of Object.keys(e)) {
|
|
22479
22481
|
let n = e[t];
|
|
22480
|
-
r.add(t),
|
|
22482
|
+
r.add(t), jk.isRef(n) && n.isSibling ? a(n.path, t) : Ok(n) && "deps" in n && n.deps.forEach((e) => a(e, t));
|
|
22481
22483
|
}
|
|
22482
|
-
return
|
|
22484
|
+
return ik.default.array(Array.from(r), n).reverse();
|
|
22483
22485
|
}
|
|
22484
|
-
function
|
|
22486
|
+
function mA(e, t) {
|
|
22485
22487
|
let n = Infinity;
|
|
22486
22488
|
return e.some((e, r) => {
|
|
22487
22489
|
var i;
|
|
22488
22490
|
if ((i = t.path) != null && i.includes(e)) return n = r, !0;
|
|
22489
22491
|
}), n;
|
|
22490
22492
|
}
|
|
22491
|
-
function
|
|
22492
|
-
return (t, n) =>
|
|
22493
|
+
function hA(e) {
|
|
22494
|
+
return (t, n) => mA(e, t) - mA(e, n);
|
|
22493
22495
|
}
|
|
22494
|
-
var
|
|
22496
|
+
var gA = (e, t, n) => {
|
|
22495
22497
|
if (typeof e != "string") return e;
|
|
22496
22498
|
let r = e;
|
|
22497
22499
|
try {
|
|
@@ -22499,40 +22501,40 @@ var mA = (e, t, n) => {
|
|
|
22499
22501
|
} catch {}
|
|
22500
22502
|
return n.isType(r) ? r : e;
|
|
22501
22503
|
};
|
|
22502
|
-
function
|
|
22504
|
+
function _A(e) {
|
|
22503
22505
|
if ("fields" in e) {
|
|
22504
22506
|
let t = {};
|
|
22505
|
-
for (let [n, r] of Object.entries(e.fields)) t[n] =
|
|
22507
|
+
for (let [n, r] of Object.entries(e.fields)) t[n] = _A(r);
|
|
22506
22508
|
return e.setFields(t);
|
|
22507
22509
|
}
|
|
22508
22510
|
if (e.type === "array") {
|
|
22509
22511
|
let t = e.optional();
|
|
22510
|
-
return t.innerType &&=
|
|
22512
|
+
return t.innerType &&= _A(t.innerType), t;
|
|
22511
22513
|
}
|
|
22512
|
-
return e.type === "tuple" ? e.optional().clone({ types: e.spec.types.map(
|
|
22514
|
+
return e.type === "tuple" ? e.optional().clone({ types: e.spec.types.map(_A) }) : "optional" in e ? e.optional() : e;
|
|
22513
22515
|
}
|
|
22514
|
-
var
|
|
22515
|
-
let n = [...(0,
|
|
22516
|
+
var vA = (e, t) => {
|
|
22517
|
+
let n = [...(0, nk.normalizePath)(t)];
|
|
22516
22518
|
if (n.length === 1) return n[0] in e;
|
|
22517
|
-
let r = n.pop(), i = (0,
|
|
22519
|
+
let r = n.pop(), i = (0, nk.getter)((0, nk.join)(n), !0)(e);
|
|
22518
22520
|
return !!(i && r in i);
|
|
22519
|
-
},
|
|
22520
|
-
function
|
|
22521
|
+
}, yA = (e) => Object.prototype.toString.call(e) === "[object Object]";
|
|
22522
|
+
function bA(e, t) {
|
|
22521
22523
|
let n = Object.keys(e.fields);
|
|
22522
22524
|
return Object.keys(t).filter((e) => n.indexOf(e) === -1);
|
|
22523
22525
|
}
|
|
22524
|
-
var
|
|
22525
|
-
function
|
|
22526
|
-
return new
|
|
22526
|
+
var xA = hA([]);
|
|
22527
|
+
function SA(e) {
|
|
22528
|
+
return new CA(e);
|
|
22527
22529
|
}
|
|
22528
|
-
var
|
|
22530
|
+
var CA = class extends Hk {
|
|
22529
22531
|
constructor(e) {
|
|
22530
22532
|
super({
|
|
22531
22533
|
type: "object",
|
|
22532
22534
|
check(e) {
|
|
22533
|
-
return
|
|
22535
|
+
return yA(e) || typeof e == "function";
|
|
22534
22536
|
}
|
|
22535
|
-
}), this.fields = Object.create(null), this._sortErrors =
|
|
22537
|
+
}), this.fields = Object.create(null), this._sortErrors = xA, this._nodes = [], this._excludedEdges = [], this.withMutation(() => {
|
|
22536
22538
|
e && this.shape(e);
|
|
22537
22539
|
});
|
|
22538
22540
|
}
|
|
@@ -22553,7 +22555,7 @@ var xA = class extends Bk {
|
|
|
22553
22555
|
context: t.context,
|
|
22554
22556
|
parent: o
|
|
22555
22557
|
});
|
|
22556
|
-
let i = a instanceof
|
|
22558
|
+
let i = a instanceof Hk ? a.spec : void 0, l = i?.strict;
|
|
22557
22559
|
if (i != null && i.strip) {
|
|
22558
22560
|
c ||= e in n;
|
|
22559
22561
|
continue;
|
|
@@ -22570,7 +22572,7 @@ var xA = class extends Bk {
|
|
|
22570
22572
|
schema: this,
|
|
22571
22573
|
value: a
|
|
22572
22574
|
}, ...i], t.__validating = !0, t.originalValue = a, super._validate(e, t, n, (e, i) => {
|
|
22573
|
-
if (!o || !
|
|
22575
|
+
if (!o || !yA(i)) {
|
|
22574
22576
|
r(e, i);
|
|
22575
22577
|
return;
|
|
22576
22578
|
}
|
|
@@ -22578,7 +22580,7 @@ var xA = class extends Bk {
|
|
|
22578
22580
|
let s = [];
|
|
22579
22581
|
for (let e of this._nodes) {
|
|
22580
22582
|
let n = this.fields[e];
|
|
22581
|
-
!n ||
|
|
22583
|
+
!n || jk.isRef(n) || s.push(n.asNestedTest({
|
|
22582
22584
|
options: t,
|
|
22583
22585
|
key: e,
|
|
22584
22586
|
parent: i,
|
|
@@ -22623,7 +22625,7 @@ var xA = class extends Bk {
|
|
|
22623
22625
|
}
|
|
22624
22626
|
setFields(e, t) {
|
|
22625
22627
|
let n = this.clone();
|
|
22626
|
-
return n.fields = e, n._nodes =
|
|
22628
|
+
return n.fields = e, n._nodes = pA(e, t), n._sortErrors = hA(Object.keys(e)), t && (n._excludedEdges = t), n;
|
|
22627
22629
|
}
|
|
22628
22630
|
shape(e, t = []) {
|
|
22629
22631
|
return this.clone().withMutation((n) => {
|
|
@@ -22637,7 +22639,7 @@ var xA = class extends Bk {
|
|
|
22637
22639
|
return this.setFields(e);
|
|
22638
22640
|
}
|
|
22639
22641
|
deepPartial() {
|
|
22640
|
-
return
|
|
22642
|
+
return _A(this);
|
|
22641
22643
|
}
|
|
22642
22644
|
pick(e) {
|
|
22643
22645
|
let t = {};
|
|
@@ -22650,24 +22652,24 @@ var xA = class extends Bk {
|
|
|
22650
22652
|
return this.pick(t);
|
|
22651
22653
|
}
|
|
22652
22654
|
from(e, t, n) {
|
|
22653
|
-
let r = (0,
|
|
22655
|
+
let r = (0, nk.getter)(e, !0);
|
|
22654
22656
|
return this.transform((i) => {
|
|
22655
22657
|
if (!i) return i;
|
|
22656
22658
|
let a = i;
|
|
22657
|
-
return
|
|
22659
|
+
return vA(i, e) && (a = Object.assign({}, i), n || delete a[e], a[t] = r(i)), a;
|
|
22658
22660
|
});
|
|
22659
22661
|
}
|
|
22660
22662
|
json() {
|
|
22661
|
-
return this.transform(
|
|
22663
|
+
return this.transform(gA);
|
|
22662
22664
|
}
|
|
22663
22665
|
exact(e) {
|
|
22664
22666
|
return this.test({
|
|
22665
22667
|
name: "exact",
|
|
22666
22668
|
exclusive: !0,
|
|
22667
|
-
message: e ||
|
|
22669
|
+
message: e || Tk.exact,
|
|
22668
22670
|
test(e) {
|
|
22669
22671
|
if (e == null) return !0;
|
|
22670
|
-
let t =
|
|
22672
|
+
let t = bA(this.schema, e);
|
|
22671
22673
|
return t.length === 0 || this.createError({ params: { properties: t.join(", ") } });
|
|
22672
22674
|
}
|
|
22673
22675
|
});
|
|
@@ -22675,7 +22677,7 @@ var xA = class extends Bk {
|
|
|
22675
22677
|
stripUnknown() {
|
|
22676
22678
|
return this.clone({ noUnknown: !0 });
|
|
22677
22679
|
}
|
|
22678
|
-
noUnknown(e = !0, t =
|
|
22680
|
+
noUnknown(e = !0, t = Tk.noUnknown) {
|
|
22679
22681
|
typeof e != "boolean" && (t = e, e = !0);
|
|
22680
22682
|
let n = this.test({
|
|
22681
22683
|
name: "noUnknown",
|
|
@@ -22683,13 +22685,13 @@ var xA = class extends Bk {
|
|
|
22683
22685
|
message: t,
|
|
22684
22686
|
test(t) {
|
|
22685
22687
|
if (t == null) return !0;
|
|
22686
|
-
let n =
|
|
22688
|
+
let n = bA(this.schema, t);
|
|
22687
22689
|
return !e || n.length === 0 || this.createError({ params: { unknown: n.join(", ") } });
|
|
22688
22690
|
}
|
|
22689
22691
|
});
|
|
22690
22692
|
return n.spec.noUnknown = e, n;
|
|
22691
22693
|
}
|
|
22692
|
-
unknown(e = !0, t =
|
|
22694
|
+
unknown(e = !0, t = Tk.noUnknown) {
|
|
22693
22695
|
return this.noUnknown(!e, t);
|
|
22694
22696
|
}
|
|
22695
22697
|
transformKeys(e) {
|
|
@@ -22701,13 +22703,13 @@ var xA = class extends Bk {
|
|
|
22701
22703
|
});
|
|
22702
22704
|
}
|
|
22703
22705
|
camelCase() {
|
|
22704
|
-
return this.transformKeys(
|
|
22706
|
+
return this.transformKeys(rk.camelCase);
|
|
22705
22707
|
}
|
|
22706
22708
|
snakeCase() {
|
|
22707
|
-
return this.transformKeys(
|
|
22709
|
+
return this.transformKeys(rk.snakeCase);
|
|
22708
22710
|
}
|
|
22709
22711
|
constantCase() {
|
|
22710
|
-
return this.transformKeys((e) => (0,
|
|
22712
|
+
return this.transformKeys((e) => (0, rk.snakeCase)(e).toUpperCase());
|
|
22711
22713
|
}
|
|
22712
22714
|
describe(e) {
|
|
22713
22715
|
let t = (e ? this.resolve(e) : this).clone(), n = super.describe(e);
|
|
@@ -22723,11 +22725,11 @@ var xA = class extends Bk {
|
|
|
22723
22725
|
return n;
|
|
22724
22726
|
}
|
|
22725
22727
|
};
|
|
22726
|
-
|
|
22727
|
-
function
|
|
22728
|
-
return new
|
|
22728
|
+
SA.prototype = CA.prototype;
|
|
22729
|
+
function wA(e) {
|
|
22730
|
+
return new TA(e);
|
|
22729
22731
|
}
|
|
22730
|
-
var
|
|
22732
|
+
var TA = class extends Hk {
|
|
22731
22733
|
constructor(e) {
|
|
22732
22734
|
super({
|
|
22733
22735
|
type: "array",
|
|
@@ -22780,7 +22782,7 @@ var CA = class extends Bk {
|
|
|
22780
22782
|
return t.innerType = this.innerType, t;
|
|
22781
22783
|
}
|
|
22782
22784
|
json() {
|
|
22783
|
-
return this.transform(
|
|
22785
|
+
return this.transform(gA);
|
|
22784
22786
|
}
|
|
22785
22787
|
concat(e) {
|
|
22786
22788
|
let t = super.concat(e);
|
|
@@ -22788,10 +22790,10 @@ var CA = class extends Bk {
|
|
|
22788
22790
|
}
|
|
22789
22791
|
of(e) {
|
|
22790
22792
|
let t = this.clone();
|
|
22791
|
-
if (!
|
|
22793
|
+
if (!Ok(e)) throw TypeError("`array.of()` sub-schema must be a valid yup schema not: " + fk(e));
|
|
22792
22794
|
return t.innerType = e, t.spec = Object.assign({}, t.spec, { types: e }), t;
|
|
22793
22795
|
}
|
|
22794
|
-
length(e, t =
|
|
22796
|
+
length(e, t = Ek.length) {
|
|
22795
22797
|
return this.test({
|
|
22796
22798
|
message: t,
|
|
22797
22799
|
name: "length",
|
|
@@ -22804,7 +22806,7 @@ var CA = class extends Bk {
|
|
|
22804
22806
|
});
|
|
22805
22807
|
}
|
|
22806
22808
|
min(e, t) {
|
|
22807
|
-
return t ||=
|
|
22809
|
+
return t ||= Ek.min, this.test({
|
|
22808
22810
|
message: t,
|
|
22809
22811
|
name: "min",
|
|
22810
22812
|
exclusive: !0,
|
|
@@ -22816,7 +22818,7 @@ var CA = class extends Bk {
|
|
|
22816
22818
|
});
|
|
22817
22819
|
}
|
|
22818
22820
|
max(e, t) {
|
|
22819
|
-
return t ||=
|
|
22821
|
+
return t ||= Ek.max, this.test({
|
|
22820
22822
|
message: t,
|
|
22821
22823
|
name: "max",
|
|
22822
22824
|
exclusive: !0,
|
|
@@ -22847,11 +22849,11 @@ var CA = class extends Bk {
|
|
|
22847
22849
|
return n;
|
|
22848
22850
|
}
|
|
22849
22851
|
};
|
|
22850
|
-
|
|
22851
|
-
function
|
|
22852
|
-
return new
|
|
22852
|
+
wA.prototype = TA.prototype;
|
|
22853
|
+
function EA(e) {
|
|
22854
|
+
return new DA(e);
|
|
22853
22855
|
}
|
|
22854
|
-
var
|
|
22856
|
+
var DA = class extends Hk {
|
|
22855
22857
|
constructor(e) {
|
|
22856
22858
|
super({
|
|
22857
22859
|
type: "tuple",
|
|
@@ -22861,7 +22863,7 @@ var TA = class extends Bk {
|
|
|
22861
22863
|
return Array.isArray(e) && e.length === t.length;
|
|
22862
22864
|
}
|
|
22863
22865
|
}), this.withMutation(() => {
|
|
22864
|
-
this.typeError(
|
|
22866
|
+
this.typeError(Dk.notType);
|
|
22865
22867
|
});
|
|
22866
22868
|
}
|
|
22867
22869
|
_cast(e, t) {
|
|
@@ -22914,22 +22916,22 @@ var TA = class extends Bk {
|
|
|
22914
22916
|
}), n;
|
|
22915
22917
|
}
|
|
22916
22918
|
};
|
|
22917
|
-
|
|
22919
|
+
EA.prototype = DA.prototype;
|
|
22918
22920
|
//#endregion
|
|
22919
22921
|
//#region src/composables/useValidator.ts
|
|
22920
|
-
var
|
|
22921
|
-
let n =
|
|
22922
|
+
var OA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), kA = (e, t) => `${e}${t}`, AA = (e) => (e.inner || []).reduce((e, t) => {
|
|
22923
|
+
let n = OA(t.path);
|
|
22922
22924
|
return e[n] || (e[n] = t.message), e;
|
|
22923
|
-
}, {}),
|
|
22925
|
+
}, {}), jA = (e) => {
|
|
22924
22926
|
if (!e.inner) throw e;
|
|
22925
|
-
return
|
|
22926
|
-
},
|
|
22927
|
+
return AA(e);
|
|
22928
|
+
}, MA = { isValidating: !1 }, NA = {
|
|
22927
22929
|
validateAt: "blur",
|
|
22928
22930
|
strict: !0,
|
|
22929
22931
|
abortEarly: !1
|
|
22930
|
-
},
|
|
22932
|
+
}, PA = Symbol("useValidator"), FA = (e, t, n) => {
|
|
22931
22933
|
let r = {
|
|
22932
|
-
...
|
|
22934
|
+
...NA,
|
|
22933
22935
|
...n
|
|
22934
22936
|
}, i = z_(t), a = /* @__PURE__ */ N(z_(i)), o = /* @__PURE__ */ N({}), s = /* @__PURE__ */ N(!1), c = /* @__PURE__ */ N(!1), l = /* @__PURE__ */ N({}), u = (e) => K({
|
|
22935
22937
|
get: () => g(e),
|
|
@@ -22959,7 +22961,7 @@ var EA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), DA = (e, t) => `${e}${t}`, OA
|
|
|
22959
22961
|
t === "input" && cr(() => D(e));
|
|
22960
22962
|
}, x = (e, t) => {
|
|
22961
22963
|
let n = t?.validateAt ?? r.validateAt;
|
|
22962
|
-
return h(e,
|
|
22964
|
+
return h(e, MA), [
|
|
22963
22965
|
u(e),
|
|
22964
22966
|
d(e, n),
|
|
22965
22967
|
f(e),
|
|
@@ -22967,10 +22969,10 @@ var EA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), DA = (e, t) => `${e}${t}`, OA
|
|
|
22967
22969
|
];
|
|
22968
22970
|
}, S = (e) => {
|
|
22969
22971
|
let t = u(e), n = (t, n) => {
|
|
22970
|
-
let i = n?.validateAt ?? r.validateAt, a =
|
|
22972
|
+
let i = n?.validateAt ?? r.validateAt, a = kA(e, t);
|
|
22971
22973
|
return d(a, i).value;
|
|
22972
22974
|
}, i = (t) => {
|
|
22973
|
-
let n =
|
|
22975
|
+
let n = kA(e, t);
|
|
22974
22976
|
return O(n);
|
|
22975
22977
|
};
|
|
22976
22978
|
return {
|
|
@@ -22978,7 +22980,7 @@ var EA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), DA = (e, t) => `${e}${t}`, OA
|
|
|
22978
22980
|
getAttrs: n,
|
|
22979
22981
|
getError: i,
|
|
22980
22982
|
getMeta: (t) => {
|
|
22981
|
-
let n =
|
|
22983
|
+
let n = kA(e, t);
|
|
22982
22984
|
return p(n);
|
|
22983
22985
|
},
|
|
22984
22986
|
arrayError: i(e),
|
|
@@ -23026,7 +23028,7 @@ var EA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), DA = (e, t) => `${e}${t}`, OA
|
|
|
23026
23028
|
abortEarly: r.abortEarly
|
|
23027
23029
|
}), a.value;
|
|
23028
23030
|
} catch (e) {
|
|
23029
|
-
let t =
|
|
23031
|
+
let t = jA(e);
|
|
23030
23032
|
ee(t);
|
|
23031
23033
|
return;
|
|
23032
23034
|
} finally {
|
|
@@ -23040,7 +23042,7 @@ var EA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), DA = (e, t) => `${e}${t}`, OA
|
|
|
23040
23042
|
abortEarly: r.abortEarly
|
|
23041
23043
|
});
|
|
23042
23044
|
} catch (e) {
|
|
23043
|
-
let t =
|
|
23045
|
+
let t = jA(e);
|
|
23044
23046
|
ee(t);
|
|
23045
23047
|
} finally {
|
|
23046
23048
|
h(t, { isValidating: !1 });
|
|
@@ -23078,18 +23080,18 @@ var EA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), DA = (e, t) => `${e}${t}`, OA
|
|
|
23078
23080
|
validateForm: E,
|
|
23079
23081
|
validateField: D
|
|
23080
23082
|
};
|
|
23081
|
-
return Or(
|
|
23082
|
-
},
|
|
23083
|
-
let e = kr(
|
|
23083
|
+
return Or(PA, ie), ie;
|
|
23084
|
+
}, IA = () => {
|
|
23085
|
+
let e = kr(PA);
|
|
23084
23086
|
if (!e) throw Error("useValidatorContext must be used within a component that has called useValidator");
|
|
23085
23087
|
return e;
|
|
23086
|
-
},
|
|
23088
|
+
}, LA = { class: "vd-field" }, RA = {
|
|
23087
23089
|
key: 0,
|
|
23088
23090
|
class: "vd-field__message vd-field__message--error"
|
|
23089
|
-
},
|
|
23091
|
+
}, zA = {
|
|
23090
23092
|
key: 1,
|
|
23091
23093
|
class: "vd-field__message vd-field__message--information"
|
|
23092
|
-
},
|
|
23094
|
+
}, BA = /* @__PURE__ */ L({
|
|
23093
23095
|
__name: "VdAddress",
|
|
23094
23096
|
props: /*@__PURE__*/ Ha({
|
|
23095
23097
|
path: { default: "address" },
|
|
@@ -23100,7 +23102,7 @@ var EA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), DA = (e, t) => `${e}${t}`, OA
|
|
|
23100
23102
|
}),
|
|
23101
23103
|
emits: ["update:resolvedAddress"],
|
|
23102
23104
|
setup(e) {
|
|
23103
|
-
let t = e, n = uo(e, "resolvedAddress"), { path: r } = t, { defineField: i, validateField: a, getFieldMeta: o, getError: s, removeError: c } =
|
|
23105
|
+
let t = e, n = uo(e, "resolvedAddress"), { path: r } = t, { defineField: i, validateField: a, getFieldMeta: o, getError: s, removeError: c } = IA(), [l, , u] = i(`${r}.zipCode`), [d, , f] = i(`${r}.houseNumber`), [p, , m] = i(`${r}.houseNumberAddition`), h = async () => {
|
|
23104
23106
|
await a(r), p.value || c(`${r}.houseNumberAddition`);
|
|
23105
23107
|
}, g = (e) => {
|
|
23106
23108
|
l.value && d.value ? h() : a(e);
|
|
@@ -23111,7 +23113,7 @@ var EA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), DA = (e, t) => `${e}${t}`, OA
|
|
|
23111
23113
|
n.value = null;
|
|
23112
23114
|
}), ia(() => {
|
|
23113
23115
|
l.value && d.value && h();
|
|
23114
|
-
}), (t, r) => (z(), B("div",
|
|
23116
|
+
}), (t, r) => (z(), B("div", LA, [U(Yv, null, {
|
|
23115
23117
|
default: F(() => [U(q, {
|
|
23116
23118
|
span: "5",
|
|
23117
23119
|
md: "3"
|
|
@@ -23138,7 +23140,7 @@ var EA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), DA = (e, t) => `${e}${t}`, OA
|
|
|
23138
23140
|
"loading"
|
|
23139
23141
|
])]),
|
|
23140
23142
|
_: 1
|
|
23141
|
-
}), U(
|
|
23143
|
+
}), U(XO, {
|
|
23142
23144
|
span: "7",
|
|
23143
23145
|
md: "3"
|
|
23144
23146
|
}, {
|
|
@@ -23184,59 +23186,59 @@ var EA = (e) => e.replace(/\["(\d+)"\]/g, "[$1]"), DA = (e, t) => `${e}${t}`, OA
|
|
|
23184
23186
|
_: 1
|
|
23185
23187
|
})]),
|
|
23186
23188
|
_: 1
|
|
23187
|
-
}), x.value ? (z(), B("div",
|
|
23189
|
+
}), x.value ? (z(), B("div", RA, [r[3] ||= H("i", { class: "fas fa-exclamation-circle vd-field__message-icon" }, null, -1), Ms(" " + Le(x.value), 1)])) : n.value ? (z(), B("div", zA, [r[4] ||= H("i", { class: "fas fa-info-circle vd-field__message-icon" }, null, -1), Ms(" " + Le(n.value.street) + ", " + Le(n.value.city), 1)])) : W("", !0)]));
|
|
23188
23190
|
}
|
|
23189
|
-
}),
|
|
23191
|
+
}), VA = (e) => ({
|
|
23190
23192
|
zipCode: e.ZipCode,
|
|
23191
23193
|
houseNumber: String(e.HouseNumber),
|
|
23192
23194
|
houseNumberAddition: e.HouseNumberAddition,
|
|
23193
23195
|
city: e.Place,
|
|
23194
23196
|
street: e.Street
|
|
23195
|
-
}),
|
|
23197
|
+
}), HA = /^\d{4}\s?[a-zA-Z]{2}$/, UA = /^\d+$/, WA = {
|
|
23196
23198
|
"needs-addition": "Een toevoeging is verplicht",
|
|
23197
23199
|
"not-found": "Postcode en huisnummer combinatie onbekend.",
|
|
23198
23200
|
error: "Adres ophalen is mislukt. Probeer het opnieuw."
|
|
23199
23201
|
};
|
|
23200
|
-
function
|
|
23202
|
+
function GA(e) {
|
|
23201
23203
|
return e.replace(/\s/g, "").toUpperCase();
|
|
23202
23204
|
}
|
|
23203
|
-
var
|
|
23204
|
-
function
|
|
23205
|
-
return e ===
|
|
23205
|
+
var KA = "NO_ADDITION";
|
|
23206
|
+
function qA(e) {
|
|
23207
|
+
return e === KA ? "" : e.replace("-", "");
|
|
23206
23208
|
}
|
|
23207
|
-
var
|
|
23208
|
-
if (
|
|
23209
|
+
var JA = (e) => e instanceof Error, YA = (e) => {
|
|
23210
|
+
if (JA(e)) throw e;
|
|
23209
23211
|
return null;
|
|
23210
|
-
},
|
|
23212
|
+
}, XA = (e, t, n) => BO().dataValidationService.validateZipCode(e, t, n).then((e) => e).catch(YA), ZA = (e, t) => BO().homeService.getAddition({
|
|
23211
23213
|
zipcode: e,
|
|
23212
23214
|
houseNumber: t
|
|
23213
|
-
}).then((e) => e ?? []).catch(
|
|
23214
|
-
let [n, r] = await Promise.all([
|
|
23215
|
+
}).then((e) => e ?? []).catch(YA), QA = async (e, t) => {
|
|
23216
|
+
let [n, r] = await Promise.all([XA(e, t), ZA(e, t)]);
|
|
23215
23217
|
return !n && !r?.length ? null : {
|
|
23216
23218
|
validWithoutAddition: !!n,
|
|
23217
23219
|
template: n,
|
|
23218
23220
|
additions: r ?? []
|
|
23219
23221
|
};
|
|
23220
|
-
},
|
|
23222
|
+
}, $A = (e) => {
|
|
23221
23223
|
let t = e.additions.map((e) => ({
|
|
23222
23224
|
title: e,
|
|
23223
|
-
value:
|
|
23225
|
+
value: qA(e)
|
|
23224
23226
|
}));
|
|
23225
23227
|
return e.validWithoutAddition && t.length ? [{
|
|
23226
23228
|
title: "Geen toevoeging",
|
|
23227
|
-
value:
|
|
23229
|
+
value: KA
|
|
23228
23230
|
}, ...t] : t;
|
|
23229
|
-
},
|
|
23231
|
+
}, ej = (e) => ({
|
|
23230
23232
|
zipCode: e?.zipCode ?? "",
|
|
23231
23233
|
houseNumber: e?.houseNumber ?? "",
|
|
23232
|
-
houseNumberAddition: e ? e.houseNumberAddition ||
|
|
23233
|
-
}),
|
|
23234
|
-
let t = e?.path ?? "address", n =
|
|
23235
|
-
let t =
|
|
23234
|
+
houseNumberAddition: e ? e.houseNumberAddition || KA : ""
|
|
23235
|
+
}), tj = (e) => {
|
|
23236
|
+
let t = e?.path ?? "address", n = ej(e?.initial), r = /* @__PURE__ */ N(null), i = /* @__PURE__ */ N([]), a = 0, o = null, s = async (e) => {
|
|
23237
|
+
let t = GA(e.zipCode), n = e.houseNumber.trim(), r = qA(e.houseNumberAddition), i = `${t}:${n}`;
|
|
23236
23238
|
try {
|
|
23237
23239
|
let a = o?.key === i ? o : null;
|
|
23238
23240
|
if (!a) {
|
|
23239
|
-
let e = await
|
|
23241
|
+
let e = await QA(t, n);
|
|
23240
23242
|
if (!e) return {
|
|
23241
23243
|
status: "not-found",
|
|
23242
23244
|
options: [],
|
|
@@ -23247,14 +23249,14 @@ var KA = (e) => e instanceof Error, qA = (e) => {
|
|
|
23247
23249
|
verdict: e
|
|
23248
23250
|
};
|
|
23249
23251
|
}
|
|
23250
|
-
let s =
|
|
23252
|
+
let s = $A(a.verdict);
|
|
23251
23253
|
if (a.verdict.additions.length && !e.houseNumberAddition) return {
|
|
23252
23254
|
status: "needs-addition",
|
|
23253
23255
|
options: s,
|
|
23254
23256
|
address: null
|
|
23255
23257
|
};
|
|
23256
23258
|
if (!a.verdict.template) {
|
|
23257
|
-
let e = await
|
|
23259
|
+
let e = await XA(t, n, r);
|
|
23258
23260
|
if (!e) return {
|
|
23259
23261
|
status: "not-found",
|
|
23260
23262
|
options: [],
|
|
@@ -23279,31 +23281,31 @@ var KA = (e) => e instanceof Error, qA = (e) => {
|
|
|
23279
23281
|
}
|
|
23280
23282
|
}, c = async (e) => {
|
|
23281
23283
|
let t = ++a, n = await s(e), o = t !== a;
|
|
23282
|
-
return o || (i.value = n.options, r.value = n.address ?
|
|
23284
|
+
return o || (i.value = n.options, r.value = n.address ? VA(n.address) : null), {
|
|
23283
23285
|
...n,
|
|
23284
23286
|
stale: o
|
|
23285
23287
|
};
|
|
23286
23288
|
};
|
|
23287
23289
|
return {
|
|
23288
23290
|
path: t,
|
|
23289
|
-
addressSchema:
|
|
23290
|
-
zipCode:
|
|
23291
|
-
houseNumber:
|
|
23292
|
-
houseNumberAddition:
|
|
23291
|
+
addressSchema: SA({
|
|
23292
|
+
zipCode: iA().required("Vul je postcode in").matches(HA, "Postcode is incorrect"),
|
|
23293
|
+
houseNumber: iA().required("Huisnummer is verplicht").matches(UA, "Huisnummer is incorrect"),
|
|
23294
|
+
houseNumberAddition: iA().defined()
|
|
23293
23295
|
}).test("address-lookup", async (e, t) => {
|
|
23294
|
-
let n =
|
|
23295
|
-
if (!
|
|
23296
|
+
let n = GA(e.zipCode ?? ""), r = String(e.houseNumber ?? "").trim();
|
|
23297
|
+
if (!HA.test(n) || !UA.test(r)) return !0;
|
|
23296
23298
|
let { status: i, stale: a } = await c(e);
|
|
23297
23299
|
return a || i === "resolved" ? !0 : i === "needs-addition" ? t.createError({
|
|
23298
23300
|
path: `${t.path}.houseNumberAddition`,
|
|
23299
|
-
message:
|
|
23300
|
-
}) : t.createError({ message:
|
|
23301
|
+
message: WA[i]
|
|
23302
|
+
}) : t.createError({ message: WA[i] });
|
|
23301
23303
|
}),
|
|
23302
23304
|
draft: n,
|
|
23303
23305
|
resolvedAddress: r,
|
|
23304
23306
|
additionOptions: i
|
|
23305
23307
|
};
|
|
23306
|
-
},
|
|
23308
|
+
}, nj = {
|
|
23307
23309
|
[vd.Car]: {
|
|
23308
23310
|
apiTypes: ["Car", "Van"],
|
|
23309
23311
|
dutch: "auto",
|
|
@@ -23324,14 +23326,14 @@ var KA = (e) => e instanceof Error, qA = (e) => {
|
|
|
23324
23326
|
dutch: "caravan",
|
|
23325
23327
|
icon: "fa-caravan-alt"
|
|
23326
23328
|
}
|
|
23327
|
-
},
|
|
23329
|
+
}, rj = Object.fromEntries(Object.values(nj).flatMap(({ apiTypes: e, icon: t }) => e.map((e) => [e.toLowerCase(), t]))), ij = {
|
|
23328
23330
|
brommobiel: "fa-car-side",
|
|
23329
23331
|
"speed pedelec": "fa-bicycle"
|
|
23330
|
-
},
|
|
23332
|
+
}, aj = (e) => !!e?.Brand && !!e.Model && !!e.ManufacturingYear, oj = (e) => {
|
|
23331
23333
|
if (!e) return "";
|
|
23332
23334
|
let t = String(e.Model ?? "").toLowerCase().trim(), n = String(e.VehicleType ?? "").toLowerCase();
|
|
23333
|
-
return
|
|
23334
|
-
},
|
|
23335
|
+
return ij[t] ?? rj[n] ?? "";
|
|
23336
|
+
}, sj = (e) => e ? `${e.Brand} ${e.Model} (${e.ManufacturingYear})` : "", cj = [
|
|
23335
23337
|
"@@-##-@@",
|
|
23336
23338
|
"##-##-@@",
|
|
23337
23339
|
"##-@@-@@",
|
|
@@ -23349,22 +23351,22 @@ var KA = (e) => e instanceof Error, qA = (e) => {
|
|
|
23349
23351
|
];
|
|
23350
23352
|
//#endregion
|
|
23351
23353
|
//#region src/components/fields/licensePlate/licensePlate.util.ts
|
|
23352
|
-
function
|
|
23354
|
+
function lj(e) {
|
|
23353
23355
|
return e.replace(/[\s\\-]/g, "");
|
|
23354
23356
|
}
|
|
23355
|
-
var
|
|
23356
|
-
function
|
|
23357
|
-
let t =
|
|
23358
|
-
if (t.length < 6) return
|
|
23359
|
-
let n = [...t].map((e) => /[0-9]/.test(e) ? "#" : "@").join(""), r =
|
|
23360
|
-
return r === -1 ?
|
|
23357
|
+
var uj = "*".repeat(6), dj = cj.map((e) => e.replace(/-/g, ""));
|
|
23358
|
+
function fj(e) {
|
|
23359
|
+
let t = lj(e).slice(0, 6);
|
|
23360
|
+
if (t.length < 6) return uj;
|
|
23361
|
+
let n = [...t].map((e) => /[0-9]/.test(e) ? "#" : "@").join(""), r = dj.indexOf(n);
|
|
23362
|
+
return r === -1 ? uj : cj[r];
|
|
23361
23363
|
}
|
|
23362
23364
|
//#endregion
|
|
23363
23365
|
//#region src/components/fields/licensePlate/VdLicensePlate.vue?vue&type=script&setup=true&lang.ts
|
|
23364
|
-
var
|
|
23366
|
+
var pj = {
|
|
23365
23367
|
key: 0,
|
|
23366
23368
|
class: "vd-input-license-plate__loading-information"
|
|
23367
|
-
},
|
|
23369
|
+
}, mj = ["src"], hj = /* @__PURE__ */ L({
|
|
23368
23370
|
inheritAttrs: !1,
|
|
23369
23371
|
__name: "VdLicensePlate",
|
|
23370
23372
|
props: /*@__PURE__*/ Ha({
|
|
@@ -23387,16 +23389,16 @@ var dj = {
|
|
|
23387
23389
|
}),
|
|
23388
23390
|
emits: /*@__PURE__*/ Ha(["input"], ["update:modelValue", "update:vehicleData"]),
|
|
23389
23391
|
setup(e, { emit: t }) {
|
|
23390
|
-
let n = { mask:
|
|
23392
|
+
let n = { mask: fj }, r = e, i = uo(e, "modelValue"), a = uo(e, "vehicleData"), o = t, s = Ra(), c = La(), l = K({
|
|
23391
23393
|
get: () => i.value ?? "",
|
|
23392
23394
|
set: (e) => {
|
|
23393
23395
|
i.value = e, o("input", e);
|
|
23394
23396
|
}
|
|
23395
|
-
}), u = (e, t) =>
|
|
23397
|
+
}), u = (e, t) => lj(e).toUpperCase() === lj(t).toUpperCase();
|
|
23396
23398
|
I(i, (e) => {
|
|
23397
23399
|
a.value && !u(e, a.value.LicensePlate) && (a.value = null);
|
|
23398
23400
|
});
|
|
23399
|
-
let d = K(() =>
|
|
23401
|
+
let d = K(() => aj(a.value) ? a.value : null), f = K(() => r.loading || !!d.value && !r.errorMessage), p = K(() => oj(d.value)), m = K(() => sj(d.value));
|
|
23400
23402
|
return (t, r) => (z(), V(Gg, G(P(s), {
|
|
23401
23403
|
modelValue: l.value,
|
|
23402
23404
|
"onUpdate:modelValue": r[0] ||= (e) => l.value = e,
|
|
@@ -23422,12 +23424,12 @@ var dj = {
|
|
|
23422
23424
|
} : void 0,
|
|
23423
23425
|
f.value ? {
|
|
23424
23426
|
name: "information",
|
|
23425
|
-
fn: F(() => [e.loading ? (z(), B("div",
|
|
23427
|
+
fn: F(() => [e.loading ? (z(), B("div", pj, [...r[1] ||= [H("i", { class: "fas fa-circle-notch vd-input-license-plate__loading-icon" }, null, -1), Ms(" Voertuig gegevens ophalen... ", -1)]])) : d.value ? (z(), B(ms, { key: 1 }, [p.value ? (z(), B("img", {
|
|
23426
23428
|
key: 0,
|
|
23427
23429
|
src: `https://d12bmfj3oyxu0t.cloudfront.net/vergelijkdirect/icons/${p.value}.svg`,
|
|
23428
23430
|
class: "vd-field__svg-message-icon",
|
|
23429
23431
|
alt: "vehicle-icon"
|
|
23430
|
-
}, null, 8,
|
|
23432
|
+
}, null, 8, mj)) : W("", !0), Ms(" " + Le(m.value), 1)], 64)) : W("", !0)]),
|
|
23431
23433
|
key: "2"
|
|
23432
23434
|
} : void 0
|
|
23433
23435
|
]), 1040, [
|
|
@@ -23439,56 +23441,56 @@ var dj = {
|
|
|
23439
23441
|
"loading"
|
|
23440
23442
|
]));
|
|
23441
23443
|
}
|
|
23442
|
-
}),
|
|
23443
|
-
"wrong-type": (e) => `Het ingevoerde kenteken is geen ${
|
|
23444
|
+
}), gj = /* @__PURE__ */ new Map(), _j = (e, t) => `${t}:${e}`, vj = {
|
|
23445
|
+
"wrong-type": (e) => `Het ingevoerde kenteken is geen ${nj[e].dutch}`,
|
|
23444
23446
|
unknown: () => "Voertuig onbekend - Voer ander kenteken in of neem contact op",
|
|
23445
23447
|
"not-found": () => "Kenteken onbekend",
|
|
23446
23448
|
error: () => "Kenteken is incorrect"
|
|
23447
|
-
},
|
|
23449
|
+
}, yj = async (e, t) => {
|
|
23448
23450
|
try {
|
|
23449
|
-
let n = await
|
|
23451
|
+
let n = await BO().dataService.findVehicle(e, t);
|
|
23450
23452
|
if (Array.isArray(n) || !n || !Object.keys(n).length) return { status: "not-found" };
|
|
23451
23453
|
let r = n;
|
|
23452
|
-
return r.VehicleType ?
|
|
23454
|
+
return r.VehicleType ? nj[t].apiTypes.includes(r.VehicleType) ? {
|
|
23453
23455
|
status: "found",
|
|
23454
23456
|
data: r
|
|
23455
23457
|
} : { status: "wrong-type" } : { status: "unknown" };
|
|
23456
23458
|
} catch (e) {
|
|
23457
23459
|
return console.error("Error on ITC findVehicle", e), { status: "error" };
|
|
23458
23460
|
}
|
|
23459
|
-
},
|
|
23460
|
-
let n =
|
|
23461
|
-
return r || (r =
|
|
23462
|
-
e === "error" &&
|
|
23463
|
-
}, () =>
|
|
23464
|
-
},
|
|
23461
|
+
}, bj = (e, t) => {
|
|
23462
|
+
let n = _j(e, t), r = gj.get(n);
|
|
23463
|
+
return r || (r = yj(e, t), gj.set(n, r), r.then(({ status: e }) => {
|
|
23464
|
+
e === "error" && gj.delete(n);
|
|
23465
|
+
}, () => gj.delete(n))), r;
|
|
23466
|
+
}, xj = (e, t = {}) => {
|
|
23465
23467
|
let n = /* @__PURE__ */ N(t.initialData ?? null), r = 0;
|
|
23466
|
-
t.initialData?.LicensePlate &&
|
|
23468
|
+
t.initialData?.LicensePlate && gj.set(_j(lj(t.initialData.LicensePlate), e), Promise.resolve({
|
|
23467
23469
|
status: "found",
|
|
23468
23470
|
data: t.initialData
|
|
23469
23471
|
}));
|
|
23470
23472
|
let i = async (t) => {
|
|
23471
|
-
let i =
|
|
23473
|
+
let i = lj(t), a = ++r, o = await bj(i, e);
|
|
23472
23474
|
return a === r && (n.value = o.status === "found" ? o.data : null), o;
|
|
23473
23475
|
};
|
|
23474
23476
|
return {
|
|
23475
23477
|
vehicleData: n,
|
|
23476
|
-
licensePlateSchema:
|
|
23478
|
+
licensePlateSchema: iA().required("Dit veld is verplicht").test("license-plate-lookup", async (t, n) => {
|
|
23477
23479
|
if (!t) return !0;
|
|
23478
|
-
let r =
|
|
23480
|
+
let r = lj(t);
|
|
23479
23481
|
if (r.length < 6) return n.createError({ message: "Kenteken is incorrect" });
|
|
23480
23482
|
let { status: a } = await i(r);
|
|
23481
|
-
return a === "found" || n.createError({ message:
|
|
23483
|
+
return a === "found" || n.createError({ message: vj[a](e) });
|
|
23482
23484
|
})
|
|
23483
23485
|
};
|
|
23484
|
-
},
|
|
23486
|
+
}, Sj = (e) => /^\d{8}$/.test(e), Cj = (e) => Sj(e) ? {
|
|
23485
23487
|
companyName: "",
|
|
23486
23488
|
kvkNumber: e
|
|
23487
23489
|
} : {
|
|
23488
23490
|
companyName: e,
|
|
23489
23491
|
kvkNumber: ""
|
|
23490
|
-
},
|
|
23491
|
-
let t =
|
|
23492
|
+
}, wj = "bezoekadres", Tj = (e) => e._embedded?.hoofdvestiging?.adressen?.find((e) => e.type === wj), Ej = (e) => {
|
|
23493
|
+
let t = Tj(e), { huisnummer: n = 0, huisletter: r = "", huisnummerToevoeging: i = "", toevoegingAdres: a = "", plaats: o = "", postcode: s = "", straatnaam: c = "", volledigAdres: l = "" } = t ?? {};
|
|
23492
23494
|
return {
|
|
23493
23495
|
houseNumber: n,
|
|
23494
23496
|
houseNumberAddition: r || i || a,
|
|
@@ -23498,7 +23500,7 @@ var dj = {
|
|
|
23498
23500
|
fullAddress: l,
|
|
23499
23501
|
hasVisitingAddress: !!t
|
|
23500
23502
|
};
|
|
23501
|
-
},
|
|
23503
|
+
}, Dj = (e = []) => {
|
|
23502
23504
|
let [t, n, r] = e.reduce(([e, t, n], r) => {
|
|
23503
23505
|
let i = {
|
|
23504
23506
|
isMainActivity: r.indHoofdactiviteit,
|
|
@@ -23521,20 +23523,20 @@ var dj = {
|
|
|
23521
23523
|
firstSBIs: t,
|
|
23522
23524
|
secondSBIs: n
|
|
23523
23525
|
};
|
|
23524
|
-
},
|
|
23526
|
+
}, Oj = (e) => ({
|
|
23525
23527
|
kvkNumber: e.kvkNummer,
|
|
23526
23528
|
name: e.naam,
|
|
23527
23529
|
city: e.adres?.binnenlandsAdres?.plaats ?? "",
|
|
23528
23530
|
street: e.adres?.binnenlandsAdres?.straatnaam ?? ""
|
|
23529
|
-
}),
|
|
23531
|
+
}), kj = (e) => ({
|
|
23530
23532
|
name: e.naam,
|
|
23531
23533
|
kvkNumber: e.kvkNummer,
|
|
23532
23534
|
industry: e.sbiIndustryId,
|
|
23533
23535
|
numberOfEmployees: e.totaalWerkzamePersonen,
|
|
23534
23536
|
legalForm: e._embedded?.eigenaar?.rechtsvorm ?? "",
|
|
23535
|
-
...
|
|
23536
|
-
...
|
|
23537
|
-
}),
|
|
23537
|
+
...Ej(e),
|
|
23538
|
+
...Dj(e.sbiActiviteiten)
|
|
23539
|
+
}), Aj = 30, jj = ["hoofdvestiging", "nevenvestiging"], Mj = "IPD5200", Nj = (e) => {
|
|
23538
23540
|
let t = e, n = t?.response?.data?.fout;
|
|
23539
23541
|
if (Array.isArray(n)) return n;
|
|
23540
23542
|
if (Array.isArray(t?.fout)) return t.fout;
|
|
@@ -23542,24 +23544,24 @@ var dj = {
|
|
|
23542
23544
|
let e = JSON.parse(t.message);
|
|
23543
23545
|
if (Array.isArray(e?.fout)) return e.fout;
|
|
23544
23546
|
} catch {}
|
|
23545
|
-
},
|
|
23547
|
+
}, Pj = (e) => Nj(e)?.some((e) => e.code === Mj) ?? !1, Fj = () => ({
|
|
23546
23548
|
search: async (e) => {
|
|
23547
23549
|
try {
|
|
23548
|
-
return ((await
|
|
23550
|
+
return ((await BO().dataService.searchBusinessInfoV2(Cj(e), 1, Aj))?.resultaten ?? []).filter((e) => jj.includes(e.type)).map(Oj);
|
|
23549
23551
|
} catch (e) {
|
|
23550
23552
|
let t = await e;
|
|
23551
|
-
if (
|
|
23553
|
+
if (Pj(t)) return [];
|
|
23552
23554
|
throw t;
|
|
23553
23555
|
}
|
|
23554
23556
|
},
|
|
23555
23557
|
getDetails: async (e) => {
|
|
23556
|
-
let t = await
|
|
23558
|
+
let t = await BO().dataService.getProfileInfo(e);
|
|
23557
23559
|
return {
|
|
23558
|
-
presenter:
|
|
23560
|
+
presenter: kj(t),
|
|
23559
23561
|
raw: t
|
|
23560
23562
|
};
|
|
23561
23563
|
}
|
|
23562
|
-
}),
|
|
23564
|
+
}), Ij = { class: "vd-combobox__multiline" }, Lj = { class: "vd-combobox__title" }, Rj = { class: "vd-combobox__subtext" }, zj = { class: "vd-combobox__subtext" }, Bj = 400, Vj = 3, Hj = "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.", Uj = "Typ je bedrijfsnaam of KvK-nummer", Wj = "Aan het zoeken…", Gj = "Er ging iets mis bij het ophalen van de gegevens. Probeer het later opnieuw.", Kj = /* @__PURE__ */ L({
|
|
23563
23565
|
inheritAttrs: !1,
|
|
23564
23566
|
__name: "VdCompanySelect",
|
|
23565
23567
|
props: /*@__PURE__*/ Ha({
|
|
@@ -23578,7 +23580,7 @@ var dj = {
|
|
|
23578
23580
|
"raw"
|
|
23579
23581
|
], ["update:modelValue"]),
|
|
23580
23582
|
setup(e, { emit: t }) {
|
|
23581
|
-
let n = t, r = Ra(), i = La(), a = uo(e, "modelValue"), { search: o, getDetails: s } =
|
|
23583
|
+
let n = t, r = Ra(), i = La(), a = uo(e, "modelValue"), { search: o, getDetails: s } = Fj(), c = /* @__PURE__ */ N(), l = /* @__PURE__ */ N(), u = /* @__PURE__ */ N(), d = /* @__PURE__ */ N(""), f = $u(d, Bj, { maxWait: 2e3 }), p = /* @__PURE__ */ N(!0), { state: m, isLoading: h, execute: g } = ud(async (e) => {
|
|
23582
23584
|
try {
|
|
23583
23585
|
return {
|
|
23584
23586
|
results: await o(e),
|
|
@@ -23601,20 +23603,20 @@ var dj = {
|
|
|
23601
23603
|
let { presenter: t, raw: r } = await s(e);
|
|
23602
23604
|
return a.value = t, n("raw", r), n("error", null), t;
|
|
23603
23605
|
} catch (e) {
|
|
23604
|
-
throw a.value = null, n("raw", null), u.value = void 0, c.value = void 0, n("error",
|
|
23606
|
+
throw a.value = null, n("raw", null), u.value = void 0, c.value = void 0, n("error", Gj), e;
|
|
23605
23607
|
}
|
|
23606
23608
|
}, null, {
|
|
23607
23609
|
immediate: !1,
|
|
23608
23610
|
resetOnExecute: !0
|
|
23609
|
-
}), y = K(() => d.value.length >=
|
|
23611
|
+
}), y = K(() => d.value.length >= Vj), b = K(() => y.value ? h.value || d.value !== f.value ? "searching" : m.value.failed ? "error" : m.value.results.length ? "idle" : "no-results" : "idle"), x = K(() => b.value === "searching" ? [] : y.value ? m.value.results : p.value && u.value ? [u.value] : []), S = K(() => b.value === "searching" || _.value), C = K(() => !!a.value && !S.value), w = K(() => {
|
|
23610
23612
|
let e = a.value;
|
|
23611
23613
|
return !e || S.value ? "" : e.fullAddress ? `Kvk: ${e.kvkNumber} ${e.fullAddress}` : `Kvk: ${e.kvkNumber}`;
|
|
23612
23614
|
}), T = K(() => {
|
|
23613
23615
|
switch (b.value) {
|
|
23614
|
-
case "searching": return
|
|
23615
|
-
case "error": return
|
|
23616
|
-
case "no-results": return
|
|
23617
|
-
default: return
|
|
23616
|
+
case "searching": return Wj;
|
|
23617
|
+
case "error": return Gj;
|
|
23618
|
+
case "no-results": return Hj;
|
|
23619
|
+
default: return Uj;
|
|
23618
23620
|
}
|
|
23619
23621
|
}), E = (e) => {
|
|
23620
23622
|
u.value = e, p.value = !0, e.kvkNumber === a.value?.kvkNumber ? n("error", null) : v(0, e.kvkNumber);
|
|
@@ -23632,7 +23634,7 @@ var dj = {
|
|
|
23632
23634
|
return I(l, (e) => {
|
|
23633
23635
|
e || (d.value = "", p.value = !0);
|
|
23634
23636
|
}), I(f, (e) => {
|
|
23635
|
-
e && e.length >=
|
|
23637
|
+
e && e.length >= Vj && g(0, e);
|
|
23636
23638
|
}), I(a, (e) => {
|
|
23637
23639
|
c.value = e ? k(e) : void 0, p.value = !0, e || (u.value = void 0, n("raw", null));
|
|
23638
23640
|
}, { immediate: !0 }), (t, n) => (z(), V(hv, G(P(r), {
|
|
@@ -23660,10 +23662,10 @@ var dj = {
|
|
|
23660
23662
|
onBlur: D,
|
|
23661
23663
|
onSearch: ee
|
|
23662
23664
|
}), Sa({
|
|
23663
|
-
item: F(({ option: e }) => [H("div",
|
|
23664
|
-
H("div",
|
|
23665
|
-
H("span",
|
|
23666
|
-
H("span",
|
|
23665
|
+
item: F(({ option: e }) => [H("div", Ij, [
|
|
23666
|
+
H("div", Lj, Le(e.name), 1),
|
|
23667
|
+
H("span", Rj, "Kvk: " + Le(e.kvkNumber), 1),
|
|
23668
|
+
H("span", zj, Le(e.city) + ", " + Le(e.street), 1)
|
|
23667
23669
|
])]),
|
|
23668
23670
|
_: 2
|
|
23669
23671
|
}, [P(i).popover ? {
|
|
@@ -23689,15 +23691,15 @@ var dj = {
|
|
|
23689
23691
|
"info-message"
|
|
23690
23692
|
]));
|
|
23691
23693
|
}
|
|
23692
|
-
}),
|
|
23694
|
+
}), qj = (e = "Bedrijfsnaam of KVK-nummer is verplicht") => Wk().nullable().required(e).test("has-kvk-number", e, (e) => !!e?.kvkNumber), Jj = {
|
|
23693
23695
|
min: 18,
|
|
23694
23696
|
max: 99
|
|
23695
|
-
},
|
|
23697
|
+
}, Yj = "DD-MM-YYYY", Xj = [
|
|
23696
23698
|
yd.SingleWithoutChildren,
|
|
23697
23699
|
yd.FamilyWithoutChildren,
|
|
23698
23700
|
yd.SingleWithChildren,
|
|
23699
23701
|
yd.FamilyWithChildren
|
|
23700
|
-
],
|
|
23702
|
+
], Zj = [bd.Yes, bd.No], Qj = /* @__PURE__ */ s(((e, t) => {
|
|
23701
23703
|
(function(n, r) {
|
|
23702
23704
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs = r();
|
|
23703
23705
|
})(e, (function() {
|
|
@@ -23991,7 +23993,7 @@ var dj = {
|
|
|
23991
23993
|
return w(1e3 * e);
|
|
23992
23994
|
}, w.en = b[y], w.Ls = b, w.p = {}, w;
|
|
23993
23995
|
}));
|
|
23994
|
-
})),
|
|
23996
|
+
})), $j = /* @__PURE__ */ s(((e, t) => {
|
|
23995
23997
|
(function(n, r) {
|
|
23996
23998
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_customParseFormat = r();
|
|
23997
23999
|
})(e, (function() {
|
|
@@ -24147,20 +24149,20 @@ var dj = {
|
|
|
24147
24149
|
};
|
|
24148
24150
|
};
|
|
24149
24151
|
}));
|
|
24150
|
-
})),
|
|
24151
|
-
|
|
24152
|
-
function
|
|
24153
|
-
return (0,
|
|
24152
|
+
})), eM = /* @__PURE__ */ u(Qj(), 1), tM = /* @__PURE__ */ u($j(), 1);
|
|
24153
|
+
eM.default.extend(tM.default);
|
|
24154
|
+
function nM() {
|
|
24155
|
+
return (0, eM.default)().startOf("day");
|
|
24154
24156
|
}
|
|
24155
|
-
function
|
|
24156
|
-
return
|
|
24157
|
+
function rM() {
|
|
24158
|
+
return nM().year();
|
|
24157
24159
|
}
|
|
24158
|
-
function
|
|
24159
|
-
let n = (0,
|
|
24160
|
+
function iM(e, t) {
|
|
24161
|
+
let n = (0, eM.default)(e ?? "", t, !0);
|
|
24160
24162
|
return n.isValid() ? n.startOf("day") : null;
|
|
24161
24163
|
}
|
|
24162
|
-
function
|
|
24163
|
-
let n =
|
|
24164
|
+
function aM(e, t) {
|
|
24165
|
+
let n = nM();
|
|
24164
24166
|
return {
|
|
24165
24167
|
today: n,
|
|
24166
24168
|
earliest: n.subtract(t.value + 1, t.unit).add(1, "day"),
|
|
@@ -24169,13 +24171,13 @@ function rM(e, t) {
|
|
|
24169
24171
|
}
|
|
24170
24172
|
//#endregion
|
|
24171
24173
|
//#region src/utils/familyComposition.util.ts
|
|
24172
|
-
var
|
|
24173
|
-
function
|
|
24174
|
-
return
|
|
24174
|
+
var oM = [yd.FamilyWithChildren, yd.FamilyWithoutChildren];
|
|
24175
|
+
function sM(e) {
|
|
24176
|
+
return oM.includes(e);
|
|
24175
24177
|
}
|
|
24176
24178
|
//#endregion
|
|
24177
24179
|
//#region src/utils/normalizeInitialData.util.ts
|
|
24178
|
-
function
|
|
24180
|
+
function cM(e) {
|
|
24179
24181
|
if (e == null) return {};
|
|
24180
24182
|
if (typeof e == "string") {
|
|
24181
24183
|
let t = e.trim();
|
|
@@ -24192,13 +24194,13 @@ function oM(e) {
|
|
|
24192
24194
|
}
|
|
24193
24195
|
//#endregion
|
|
24194
24196
|
//#region src/schemas/birthdateRange.ts
|
|
24195
|
-
function
|
|
24197
|
+
function lM(e, t, n = "ageRange") {
|
|
24196
24198
|
return {
|
|
24197
24199
|
name: n,
|
|
24198
24200
|
test(n, r) {
|
|
24199
|
-
let i =
|
|
24201
|
+
let i = iM(n, Yj);
|
|
24200
24202
|
if (!i) return !0;
|
|
24201
|
-
let { today: a, earliest: o, latest: s } =
|
|
24203
|
+
let { today: a, earliest: o, latest: s } = aM(e.min, e.max), c = {
|
|
24202
24204
|
earliest: o,
|
|
24203
24205
|
latest: s
|
|
24204
24206
|
};
|
|
@@ -24208,7 +24210,7 @@ function sM(e, t, n = "ageRange") {
|
|
|
24208
24210
|
}
|
|
24209
24211
|
//#endregion
|
|
24210
24212
|
//#region src/schemas/messages.ts
|
|
24211
|
-
var
|
|
24213
|
+
var uM = {
|
|
24212
24214
|
birthdate: {
|
|
24213
24215
|
required: "Geboortedatum is verplicht",
|
|
24214
24216
|
dateFormat: "Geboortedatum is incorrect",
|
|
@@ -24247,11 +24249,11 @@ var cM = {
|
|
|
24247
24249
|
};
|
|
24248
24250
|
//#endregion
|
|
24249
24251
|
//#region src/schemas/birthdate.schema.ts
|
|
24250
|
-
function
|
|
24251
|
-
return
|
|
24252
|
+
function dM(e) {
|
|
24253
|
+
return iM(e, Yj) !== null;
|
|
24252
24254
|
}
|
|
24253
|
-
function
|
|
24254
|
-
return
|
|
24255
|
+
function fM(e = Jj) {
|
|
24256
|
+
return iA().required(uM.birthdate.required).test("date_format", uM.birthdate.dateFormat, dM).test(lM({
|
|
24255
24257
|
min: {
|
|
24256
24258
|
value: e.min,
|
|
24257
24259
|
unit: "year"
|
|
@@ -24261,52 +24263,52 @@ function uM(e = Kj) {
|
|
|
24261
24263
|
unit: "year"
|
|
24262
24264
|
}
|
|
24263
24265
|
}, {
|
|
24264
|
-
tooYoung: () =>
|
|
24265
|
-
tooOld: () =>
|
|
24266
|
+
tooYoung: () => uM.birthdate.tooYoung(e.min),
|
|
24267
|
+
tooOld: () => uM.birthdate.tooOld(e.max)
|
|
24266
24268
|
}));
|
|
24267
24269
|
}
|
|
24268
24270
|
//#endregion
|
|
24269
24271
|
//#region src/schemas/rules.ts
|
|
24270
|
-
function
|
|
24271
|
-
return
|
|
24272
|
+
function pM(e, t) {
|
|
24273
|
+
return iA().required(t).oneOf(e, t);
|
|
24272
24274
|
}
|
|
24273
|
-
function
|
|
24274
|
-
return
|
|
24275
|
+
function mM(e) {
|
|
24276
|
+
return iA().required(e);
|
|
24275
24277
|
}
|
|
24276
|
-
function
|
|
24277
|
-
return
|
|
24278
|
+
function hM(e) {
|
|
24279
|
+
return sA().typeError(e).required(e);
|
|
24278
24280
|
}
|
|
24279
24281
|
//#endregion
|
|
24280
24282
|
//#region src/schemas/familyComposition.schema.ts
|
|
24281
|
-
function
|
|
24282
|
-
return
|
|
24283
|
+
function gM(e = uM.familyComposition.required) {
|
|
24284
|
+
return pM(Xj, e);
|
|
24283
24285
|
}
|
|
24284
|
-
var
|
|
24286
|
+
var _M = gM(), vM = pM(Zj, uM.ownedBuilding.required), yM = [1, 7], bM = [3, 4], xM = {
|
|
24285
24287
|
raceOrMtb: 15e3,
|
|
24286
24288
|
default: 9999
|
|
24287
|
-
},
|
|
24289
|
+
}, SM = {
|
|
24288
24290
|
mask: "N####",
|
|
24289
24291
|
tokens: { N: { pattern: /[1-9]/ } }
|
|
24290
|
-
},
|
|
24292
|
+
}, CM = (e, t) => e.test("max-value", uM.bike.priceMax(t), (e) => {
|
|
24291
24293
|
let n = Number(e);
|
|
24292
24294
|
return Number.isNaN(n) || n <= t;
|
|
24293
|
-
}),
|
|
24294
|
-
kind:
|
|
24295
|
-
condition:
|
|
24296
|
-
price:
|
|
24295
|
+
}), wM = SA({
|
|
24296
|
+
kind: hM(uM.bike.kindRequired),
|
|
24297
|
+
condition: hM(uM.bike.conditionRequired),
|
|
24298
|
+
price: iA().required(uM.bike.priceRequired).test("min-value", uM.bike.priceMin, (e) => {
|
|
24297
24299
|
if (!e) return !0;
|
|
24298
24300
|
let t = Number(e);
|
|
24299
24301
|
return Number.isNaN(t) || t > 0;
|
|
24300
24302
|
}).when("kind", {
|
|
24301
|
-
is: (e) =>
|
|
24302
|
-
then: (e) =>
|
|
24303
|
-
otherwise: (e) =>
|
|
24303
|
+
is: (e) => bM.includes(Number(e)),
|
|
24304
|
+
then: (e) => CM(e, xM.raceOrMtb),
|
|
24305
|
+
otherwise: (e) => CM(e, xM.default)
|
|
24304
24306
|
}),
|
|
24305
|
-
brand:
|
|
24306
|
-
is: (e) =>
|
|
24307
|
-
then: (e) => e.required(
|
|
24307
|
+
brand: iA().when("kind", {
|
|
24308
|
+
is: (e) => yM.includes(Number(e)),
|
|
24309
|
+
then: (e) => e.required(uM.bike.brandRequired)
|
|
24308
24310
|
})
|
|
24309
|
-
}),
|
|
24311
|
+
}), TM = [
|
|
24310
24312
|
{
|
|
24311
24313
|
value: 4,
|
|
24312
24314
|
title: "ATB / Mountainbike",
|
|
@@ -24373,13 +24375,13 @@ var hM = mM(), gM = dM(Yj, cM.ownedBuilding.required), _M = [1, 7], vM = [3, 4],
|
|
|
24373
24375
|
name: "Vouwfiets",
|
|
24374
24376
|
isEBike: !1
|
|
24375
24377
|
}
|
|
24376
|
-
],
|
|
24378
|
+
], EM = [{
|
|
24377
24379
|
value: 1,
|
|
24378
24380
|
label: "Nieuw"
|
|
24379
24381
|
}, {
|
|
24380
24382
|
value: 0,
|
|
24381
24383
|
label: "Tweedehands"
|
|
24382
|
-
}],
|
|
24384
|
+
}], DM = [
|
|
24383
24385
|
{
|
|
24384
24386
|
id: "Ander merk",
|
|
24385
24387
|
name: "Ander merk"
|
|
@@ -25800,7 +25802,7 @@ var hM = mM(), gM = dM(Yj, cM.ownedBuilding.required), _M = [1, 7], vM = [3, 4],
|
|
|
25800
25802
|
id: "Zündapp",
|
|
25801
25803
|
name: "Zündapp"
|
|
25802
25804
|
}
|
|
25803
|
-
],
|
|
25805
|
+
], OM = /* @__PURE__ */ L({
|
|
25804
25806
|
__name: "BikeForm",
|
|
25805
25807
|
props: /*@__PURE__*/ Va({
|
|
25806
25808
|
initialData: {},
|
|
@@ -25819,21 +25821,21 @@ var hM = mM(), gM = dM(Yj, cM.ownedBuilding.required), _M = [1, 7], vM = [3, 4],
|
|
|
25819
25821
|
}),
|
|
25820
25822
|
emits: ["submitted"],
|
|
25821
25823
|
setup(e, { emit: t }) {
|
|
25822
|
-
let n = e, r = _d(n), i = t, { isSubmitting: a, handleSubmit: o, defineField: s, resetField: c } =
|
|
25824
|
+
let n = e, r = _d(n), i = t, { isSubmitting: a, handleSubmit: o, defineField: s, resetField: c } = FA(wM, {
|
|
25823
25825
|
kind: n.initialData?.kind ?? null,
|
|
25824
25826
|
condition: n.initialData?.condition ?? 1,
|
|
25825
25827
|
price: n.initialData?.price ?? "",
|
|
25826
25828
|
brand: n.initialData?.brand ?? ""
|
|
25827
|
-
}), [l, u, d] = s("kind", { validateAt: "change" }), [f, p, m] = s("brand", { validateAt: "change" }), [h, g, _] = s("condition"), [v, y, b] = s("price"), x = K(() =>
|
|
25829
|
+
}), [l, u, d] = s("kind", { validateAt: "change" }), [f, p, m] = s("brand", { validateAt: "change" }), [h, g, _] = s("condition"), [v, y, b] = s("price"), x = K(() => yM.includes(Number(l.value)));
|
|
25828
25830
|
I(l, (e) => {
|
|
25829
|
-
|
|
25831
|
+
yM.includes(Number(e)) || c("brand", { value: "" });
|
|
25830
25832
|
}, { immediate: !0 });
|
|
25831
25833
|
function S() {
|
|
25832
25834
|
o((e) => {
|
|
25833
25835
|
i("submitted", { ...e });
|
|
25834
25836
|
});
|
|
25835
25837
|
}
|
|
25836
|
-
return (t, n) => (z(), V(P(
|
|
25838
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
25837
25839
|
"submit-disabled": e.submitDisabled || P(a),
|
|
25838
25840
|
onSubmit: S
|
|
25839
25841
|
}), {
|
|
@@ -25847,7 +25849,7 @@ var hM = mM(), gM = dM(Yj, cM.ownedBuilding.required), _M = [1, 7], vM = [3, 4],
|
|
|
25847
25849
|
"onUpdate:modelValue": n[0] ||= (e) => /* @__PURE__ */ M(l) ? l.value = e : null,
|
|
25848
25850
|
modelModifiers: { number: !0 },
|
|
25849
25851
|
label: "Soort fiets",
|
|
25850
|
-
options: P(
|
|
25852
|
+
options: P(TM),
|
|
25851
25853
|
name: "kind",
|
|
25852
25854
|
required: !1,
|
|
25853
25855
|
"error-message": P(d)
|
|
@@ -25868,7 +25870,7 @@ var hM = mM(), gM = dM(Yj, cM.ownedBuilding.required), _M = [1, 7], vM = [3, 4],
|
|
|
25868
25870
|
"onUpdate:modelValue": n[1] ||= (e) => /* @__PURE__ */ M(f) ? f.value = e : null,
|
|
25869
25871
|
label: "Merk fiets",
|
|
25870
25872
|
placeholder: "Typ of kies je merk",
|
|
25871
|
-
options: P(
|
|
25873
|
+
options: P(DM),
|
|
25872
25874
|
"label-key": "name",
|
|
25873
25875
|
"value-key": "id",
|
|
25874
25876
|
name: "brand",
|
|
@@ -25890,7 +25892,7 @@ var hM = mM(), gM = dM(Yj, cM.ownedBuilding.required), _M = [1, 7], vM = [3, 4],
|
|
|
25890
25892
|
"onUpdate:modelValue": n[2] ||= (e) => /* @__PURE__ */ M(h) ? h.value = e : null,
|
|
25891
25893
|
legend: "Gekocht als",
|
|
25892
25894
|
name: "condition",
|
|
25893
|
-
options: P(
|
|
25895
|
+
options: P(EM),
|
|
25894
25896
|
variant: "boxed",
|
|
25895
25897
|
required: !1,
|
|
25896
25898
|
"error-message": P(_)
|
|
@@ -25912,7 +25914,7 @@ var hM = mM(), gM = dM(Yj, cM.ownedBuilding.required), _M = [1, 7], vM = [3, 4],
|
|
|
25912
25914
|
placeholder: "bv. 1 000",
|
|
25913
25915
|
icon: "far fa-euro-sign",
|
|
25914
25916
|
name: "price",
|
|
25915
|
-
mask: P(
|
|
25917
|
+
mask: P(SM),
|
|
25916
25918
|
inputmode: "numeric",
|
|
25917
25919
|
required: !1,
|
|
25918
25920
|
"error-message": P(b)
|
|
@@ -25930,7 +25932,7 @@ var hM = mM(), gM = dM(Yj, cM.ownedBuilding.required), _M = [1, 7], vM = [3, 4],
|
|
|
25930
25932
|
});
|
|
25931
25933
|
//#endregion
|
|
25932
25934
|
//#region src/comparisons/bike/bike.presenter.ts
|
|
25933
|
-
function
|
|
25935
|
+
function kM(e) {
|
|
25934
25936
|
return {
|
|
25935
25937
|
comparison: vd.Bike,
|
|
25936
25938
|
detail: { bike: {
|
|
@@ -25944,30 +25946,30 @@ function DM(e) {
|
|
|
25944
25946
|
}
|
|
25945
25947
|
//#endregion
|
|
25946
25948
|
//#region src/comparisons/bike/index.ts
|
|
25947
|
-
var
|
|
25948
|
-
Form: () =>
|
|
25949
|
-
presenter: () =>
|
|
25950
|
-
}),
|
|
25949
|
+
var AM = /* @__PURE__ */ c({
|
|
25950
|
+
Form: () => OM,
|
|
25951
|
+
presenter: () => kM
|
|
25952
|
+
}), jM = {
|
|
25951
25953
|
min: 0,
|
|
25952
25954
|
max: 99
|
|
25953
|
-
},
|
|
25954
|
-
kind:
|
|
25955
|
-
age:
|
|
25955
|
+
}, MM = SA({
|
|
25956
|
+
kind: iA().required(uM.pet.kindRequired),
|
|
25957
|
+
age: iA().required(uM.birthdate.required).test("date_format", uM.birthdate.dateFormat, dM).test(lM({
|
|
25956
25958
|
min: {
|
|
25957
25959
|
value: 7,
|
|
25958
25960
|
unit: "week"
|
|
25959
25961
|
},
|
|
25960
25962
|
max: {
|
|
25961
|
-
value:
|
|
25963
|
+
value: jM.max,
|
|
25962
25964
|
unit: "year"
|
|
25963
25965
|
}
|
|
25964
25966
|
}, {
|
|
25965
|
-
future: () =>
|
|
25966
|
-
tooYoung: ({ earliest: e, latest: t }) =>
|
|
25967
|
-
tooOld: () =>
|
|
25967
|
+
future: () => uM.birthdate.tooYoung(jM.min),
|
|
25968
|
+
tooYoung: ({ earliest: e, latest: t }) => uM.pet.outOfRange(e.format(Yj), t.format(Yj)),
|
|
25969
|
+
tooOld: () => uM.birthdate.tooOld(jM.max)
|
|
25968
25970
|
}, "birthdate_range")),
|
|
25969
|
-
zipCode:
|
|
25970
|
-
}),
|
|
25971
|
+
zipCode: iA().required(uM.pet.zipCodeRequired).matches(/^\d{4}\s?[a-zA-Z]{2}$/, uM.pet.zipCodeInvalid)
|
|
25972
|
+
}), NM = [
|
|
25971
25973
|
{
|
|
25972
25974
|
title: "Hond",
|
|
25973
25975
|
value: "dog"
|
|
@@ -25984,7 +25986,7 @@ var OM = /* @__PURE__ */ c({
|
|
|
25984
25986
|
title: "Vogel",
|
|
25985
25987
|
value: "bird"
|
|
25986
25988
|
}
|
|
25987
|
-
],
|
|
25989
|
+
], PM = /* @__PURE__ */ L({
|
|
25988
25990
|
__name: "PetForm",
|
|
25989
25991
|
props: /*@__PURE__*/ Va({
|
|
25990
25992
|
initialData: {},
|
|
@@ -26003,7 +26005,7 @@ var OM = /* @__PURE__ */ c({
|
|
|
26003
26005
|
}),
|
|
26004
26006
|
emits: ["submitted"],
|
|
26005
26007
|
setup(e, { emit: t }) {
|
|
26006
|
-
let n = e, r = _d(n), i = t, { isSubmitting: a, handleSubmit: o, defineField: s } =
|
|
26008
|
+
let n = e, r = _d(n), i = t, { isSubmitting: a, handleSubmit: o, defineField: s } = FA(MM, {
|
|
26007
26009
|
kind: n.initialData?.kind ?? "dog",
|
|
26008
26010
|
age: n.initialData?.age ?? "",
|
|
26009
26011
|
zipCode: n.initialData?.zipCode ?? ""
|
|
@@ -26013,7 +26015,7 @@ var OM = /* @__PURE__ */ c({
|
|
|
26013
26015
|
i("submitted", { ...e });
|
|
26014
26016
|
});
|
|
26015
26017
|
}
|
|
26016
|
-
return (t, n) => (z(), V(P(
|
|
26018
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
26017
26019
|
"submit-disabled": e.submitDisabled || P(a),
|
|
26018
26020
|
onSubmit: _
|
|
26019
26021
|
}), {
|
|
@@ -26027,7 +26029,7 @@ var OM = /* @__PURE__ */ c({
|
|
|
26027
26029
|
"onUpdate:modelValue": n[0] ||= (e) => /* @__PURE__ */ M(c) ? c.value = e : null,
|
|
26028
26030
|
label: "Wat voor huisdier wil je verzekeren?",
|
|
26029
26031
|
placeholder: "",
|
|
26030
|
-
options: P(
|
|
26032
|
+
options: P(NM),
|
|
26031
26033
|
name: "kind",
|
|
26032
26034
|
required: !1,
|
|
26033
26035
|
"error-message": P(u)
|
|
@@ -26042,7 +26044,7 @@ var OM = /* @__PURE__ */ c({
|
|
|
26042
26044
|
span: "4",
|
|
26043
26045
|
md: "6"
|
|
26044
26046
|
}, {
|
|
26045
|
-
default: F(() => [U(P(
|
|
26047
|
+
default: F(() => [U(P(ZO), G({
|
|
26046
26048
|
modelValue: P(d),
|
|
26047
26049
|
"onUpdate:modelValue": n[1] ||= (e) => /* @__PURE__ */ M(d) ? d.value = e : null,
|
|
26048
26050
|
label: "Geboortedatum huisdier",
|
|
@@ -26096,7 +26098,7 @@ var OM = /* @__PURE__ */ c({
|
|
|
26096
26098
|
});
|
|
26097
26099
|
//#endregion
|
|
26098
26100
|
//#region src/comparisons/pet/pet.presenter.ts
|
|
26099
|
-
function
|
|
26101
|
+
function FM(e) {
|
|
26100
26102
|
return {
|
|
26101
26103
|
comparison: vd.Pet,
|
|
26102
26104
|
detail: { pet: {
|
|
@@ -26108,14 +26110,14 @@ function NM(e) {
|
|
|
26108
26110
|
}
|
|
26109
26111
|
//#endregion
|
|
26110
26112
|
//#region src/comparisons/pet/index.ts
|
|
26111
|
-
var
|
|
26112
|
-
Form: () =>
|
|
26113
|
-
presenter: () =>
|
|
26114
|
-
}),
|
|
26115
|
-
TypeOfCaravan:
|
|
26116
|
-
NewOrOccasion:
|
|
26117
|
-
BuildYear:
|
|
26118
|
-
}),
|
|
26113
|
+
var IM = /* @__PURE__ */ c({
|
|
26114
|
+
Form: () => PM,
|
|
26115
|
+
presenter: () => FM
|
|
26116
|
+
}), LM = SA({
|
|
26117
|
+
TypeOfCaravan: mM(uM.caravan.typeOfCaravanRequired),
|
|
26118
|
+
NewOrOccasion: pM(Zj, uM.caravan.newOrOccasionRequired),
|
|
26119
|
+
BuildYear: mM(uM.caravan.buildYearRequired)
|
|
26120
|
+
}), RM = [
|
|
26119
26121
|
{
|
|
26120
26122
|
value: "CS",
|
|
26121
26123
|
title: "Stacaravan"
|
|
@@ -26128,7 +26130,7 @@ var PM = /* @__PURE__ */ c({
|
|
|
26128
26130
|
value: "CV",
|
|
26129
26131
|
title: "Vouwwagen"
|
|
26130
26132
|
}
|
|
26131
|
-
],
|
|
26133
|
+
], zM = [{
|
|
26132
26134
|
value: bd.Yes,
|
|
26133
26135
|
label: "Nieuw"
|
|
26134
26136
|
}, {
|
|
@@ -26137,8 +26139,8 @@ var PM = /* @__PURE__ */ c({
|
|
|
26137
26139
|
}];
|
|
26138
26140
|
//#endregion
|
|
26139
26141
|
//#region src/comparisons/caravan/models/buildYears.model.ts
|
|
26140
|
-
function
|
|
26141
|
-
let e =
|
|
26142
|
+
function BM() {
|
|
26143
|
+
let e = rM();
|
|
26142
26144
|
return Array.from({ length: 126 }, (t, n) => ({
|
|
26143
26145
|
title: String(e - n),
|
|
26144
26146
|
value: String(e - n)
|
|
@@ -26146,7 +26148,7 @@ function RM() {
|
|
|
26146
26148
|
}
|
|
26147
26149
|
//#endregion
|
|
26148
26150
|
//#region src/comparisons/caravan/CaravanForm.vue
|
|
26149
|
-
var
|
|
26151
|
+
var VM = /* @__PURE__ */ L({
|
|
26150
26152
|
__name: "CaravanForm",
|
|
26151
26153
|
props: /*@__PURE__*/ Va({
|
|
26152
26154
|
initialData: {},
|
|
@@ -26165,7 +26167,7 @@ var zM = /* @__PURE__ */ L({
|
|
|
26165
26167
|
}),
|
|
26166
26168
|
emits: ["submitted"],
|
|
26167
26169
|
setup(e, { emit: t }) {
|
|
26168
|
-
let n = e, r = _d(n), i = t, a =
|
|
26170
|
+
let n = e, r = _d(n), i = t, a = BM(), { isSubmitting: o, handleSubmit: s, defineField: c } = FA(LM, {
|
|
26169
26171
|
TypeOfCaravan: n.initialData?.TypeOfCaravan ?? null,
|
|
26170
26172
|
NewOrOccasion: n.initialData?.NewOrOccasion ?? bd.Yes,
|
|
26171
26173
|
BuildYear: n.initialData?.BuildYear ?? null
|
|
@@ -26175,7 +26177,7 @@ var zM = /* @__PURE__ */ L({
|
|
|
26175
26177
|
i("submitted", { ...e });
|
|
26176
26178
|
});
|
|
26177
26179
|
}
|
|
26178
|
-
return (t, n) => (z(), V(P(
|
|
26180
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
26179
26181
|
"submit-disabled": e.submitDisabled || P(o),
|
|
26180
26182
|
onSubmit: v
|
|
26181
26183
|
}), {
|
|
@@ -26188,7 +26190,7 @@ var zM = /* @__PURE__ */ L({
|
|
|
26188
26190
|
modelValue: P(l),
|
|
26189
26191
|
"onUpdate:modelValue": n[0] ||= (e) => /* @__PURE__ */ M(l) ? l.value = e : null,
|
|
26190
26192
|
label: "Soort caravan",
|
|
26191
|
-
options: P(
|
|
26193
|
+
options: P(RM),
|
|
26192
26194
|
name: "typeOfCaravan",
|
|
26193
26195
|
required: !1,
|
|
26194
26196
|
"error-message": P(d)
|
|
@@ -26208,7 +26210,7 @@ var zM = /* @__PURE__ */ L({
|
|
|
26208
26210
|
"onUpdate:modelValue": n[1] ||= (e) => /* @__PURE__ */ M(f) ? f.value = e : null,
|
|
26209
26211
|
legend: "Gekocht als",
|
|
26210
26212
|
name: "newOrOccasion",
|
|
26211
|
-
options: P(
|
|
26213
|
+
options: P(zM),
|
|
26212
26214
|
variant: "boxed",
|
|
26213
26215
|
required: !1,
|
|
26214
26216
|
"error-message": P(m)
|
|
@@ -26245,7 +26247,7 @@ var zM = /* @__PURE__ */ L({
|
|
|
26245
26247
|
});
|
|
26246
26248
|
//#endregion
|
|
26247
26249
|
//#region src/comparisons/caravan/caravan.presenter.ts
|
|
26248
|
-
function
|
|
26250
|
+
function HM(e) {
|
|
26249
26251
|
return {
|
|
26250
26252
|
comparison: vd.Caravan,
|
|
26251
26253
|
detail: { caravan: {
|
|
@@ -26258,21 +26260,21 @@ function BM(e) {
|
|
|
26258
26260
|
}
|
|
26259
26261
|
//#endregion
|
|
26260
26262
|
//#region src/comparisons/caravan/index.ts
|
|
26261
|
-
var
|
|
26262
|
-
Form: () =>
|
|
26263
|
-
presenter: () =>
|
|
26264
|
-
}),
|
|
26263
|
+
var UM = /* @__PURE__ */ c({
|
|
26264
|
+
Form: () => VM,
|
|
26265
|
+
presenter: () => HM
|
|
26266
|
+
}), WM = /* @__PURE__ */ function(e) {
|
|
26265
26267
|
return e.Continuous = "L", e.ShortTerm = "S", e;
|
|
26266
|
-
}({}),
|
|
26267
|
-
PaymentTerm:
|
|
26268
|
-
birthdate:
|
|
26269
|
-
}),
|
|
26270
|
-
value:
|
|
26268
|
+
}({}), GM = SA({
|
|
26269
|
+
PaymentTerm: pM([WM.Continuous, WM.ShortTerm], uM.travel.paymentTermRequired),
|
|
26270
|
+
birthdate: fM()
|
|
26271
|
+
}), KM = [{
|
|
26272
|
+
value: WM.Continuous,
|
|
26271
26273
|
label: "Doorlopend"
|
|
26272
26274
|
}, {
|
|
26273
|
-
value:
|
|
26275
|
+
value: WM.ShortTerm,
|
|
26274
26276
|
label: "Kortlopend"
|
|
26275
|
-
}],
|
|
26277
|
+
}], qM = /* @__PURE__ */ L({
|
|
26276
26278
|
__name: "TravelForm",
|
|
26277
26279
|
props: /*@__PURE__*/ Va({
|
|
26278
26280
|
initialData: {},
|
|
@@ -26291,8 +26293,8 @@ var VM = /* @__PURE__ */ c({
|
|
|
26291
26293
|
}),
|
|
26292
26294
|
emits: ["submitted"],
|
|
26293
26295
|
setup(e, { emit: t }) {
|
|
26294
|
-
let n = e, r = _d(n), i = t, { isSubmitting: a, handleSubmit: o, defineField: s } =
|
|
26295
|
-
PaymentTerm: n.initialData?.PaymentTerm ??
|
|
26296
|
+
let n = e, r = _d(n), i = t, { isSubmitting: a, handleSubmit: o, defineField: s } = FA(GM, {
|
|
26297
|
+
PaymentTerm: n.initialData?.PaymentTerm ?? WM.Continuous,
|
|
26296
26298
|
birthdate: n.initialData?.birthdate ?? ""
|
|
26297
26299
|
}), [c, l, u] = s("PaymentTerm", { validateAt: "change" }), [d, f, p] = s("birthdate");
|
|
26298
26300
|
function m() {
|
|
@@ -26300,7 +26302,7 @@ var VM = /* @__PURE__ */ c({
|
|
|
26300
26302
|
i("submitted", { ...e });
|
|
26301
26303
|
});
|
|
26302
26304
|
}
|
|
26303
|
-
return (t, n) => (z(), V(P(
|
|
26305
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
26304
26306
|
"submit-disabled": e.submitDisabled || P(a),
|
|
26305
26307
|
onSubmit: m
|
|
26306
26308
|
}), {
|
|
@@ -26313,7 +26315,7 @@ var VM = /* @__PURE__ */ c({
|
|
|
26313
26315
|
"onUpdate:modelValue": n[0] ||= (e) => /* @__PURE__ */ M(c) ? c.value = e : null,
|
|
26314
26316
|
legend: "Kies je dekking",
|
|
26315
26317
|
name: "PaymentTerm",
|
|
26316
|
-
options: P(
|
|
26318
|
+
options: P(KM),
|
|
26317
26319
|
variant: "boxed",
|
|
26318
26320
|
required: !1,
|
|
26319
26321
|
"error-message": P(u)
|
|
@@ -26338,7 +26340,7 @@ var VM = /* @__PURE__ */ c({
|
|
|
26338
26340
|
span: "5",
|
|
26339
26341
|
md: "6"
|
|
26340
26342
|
}, {
|
|
26341
|
-
default: F(() => [U(P(
|
|
26343
|
+
default: F(() => [U(P(ZO), G({
|
|
26342
26344
|
modelValue: P(d),
|
|
26343
26345
|
"onUpdate:modelValue": n[1] ||= (e) => /* @__PURE__ */ M(d) ? d.value = e : null,
|
|
26344
26346
|
"error-message": P(p)
|
|
@@ -26351,7 +26353,7 @@ var VM = /* @__PURE__ */ c({
|
|
|
26351
26353
|
});
|
|
26352
26354
|
//#endregion
|
|
26353
26355
|
//#region src/comparisons/travel/travel.presenter.ts
|
|
26354
|
-
function
|
|
26356
|
+
function JM(e) {
|
|
26355
26357
|
return {
|
|
26356
26358
|
comparison: vd.Travel,
|
|
26357
26359
|
detail: { comparison: { PaymentTerm: e.PaymentTerm } },
|
|
@@ -26360,14 +26362,14 @@ function KM(e) {
|
|
|
26360
26362
|
}
|
|
26361
26363
|
//#endregion
|
|
26362
26364
|
//#region src/comparisons/travel/index.ts
|
|
26363
|
-
var
|
|
26364
|
-
Form: () =>
|
|
26365
|
-
presenter: () =>
|
|
26366
|
-
}),
|
|
26365
|
+
var YM = /* @__PURE__ */ c({
|
|
26366
|
+
Form: () => qM,
|
|
26367
|
+
presenter: () => JM
|
|
26368
|
+
}), XM = (e) => SA({
|
|
26367
26369
|
address: e,
|
|
26368
|
-
birthdate:
|
|
26369
|
-
familyComposition:
|
|
26370
|
-
}),
|
|
26370
|
+
birthdate: fM(),
|
|
26371
|
+
familyComposition: _M
|
|
26372
|
+
}), ZM = /* @__PURE__ */ L({
|
|
26371
26373
|
__name: "LiabilityForm",
|
|
26372
26374
|
props: /*@__PURE__*/ Va({
|
|
26373
26375
|
initialData: {},
|
|
@@ -26386,7 +26388,7 @@ var qM = /* @__PURE__ */ c({
|
|
|
26386
26388
|
}),
|
|
26387
26389
|
emits: ["submitted"],
|
|
26388
26390
|
setup(e, { emit: t }) {
|
|
26389
|
-
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } =
|
|
26391
|
+
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } = tj({ initial: n.initialData?.address }), { isSubmitting: l, handleSubmit: u, defineField: d } = FA(XM(a), {
|
|
26390
26392
|
birthdate: n.initialData?.birthdate ?? "",
|
|
26391
26393
|
familyComposition: n.initialData?.familyComposition ?? yd.SingleWithoutChildren,
|
|
26392
26394
|
address: o
|
|
@@ -26400,7 +26402,7 @@ var qM = /* @__PURE__ */ c({
|
|
|
26400
26402
|
});
|
|
26401
26403
|
});
|
|
26402
26404
|
}
|
|
26403
|
-
return (t, n) => (z(), V(P(
|
|
26405
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
26404
26406
|
"submit-disabled": e.submitDisabled || P(l),
|
|
26405
26407
|
onSubmit: v
|
|
26406
26408
|
}), {
|
|
@@ -26409,7 +26411,7 @@ var qM = /* @__PURE__ */ c({
|
|
|
26409
26411
|
span: "5",
|
|
26410
26412
|
md: "6"
|
|
26411
26413
|
}, {
|
|
26412
|
-
default: F(() => [U(P(
|
|
26414
|
+
default: F(() => [U(P(BA), {
|
|
26413
26415
|
"resolved-address": P(s),
|
|
26414
26416
|
"onUpdate:resolvedAddress": n[0] ||= (e) => /* @__PURE__ */ M(s) ? s.value = e : null,
|
|
26415
26417
|
"addition-options": P(c)
|
|
@@ -26420,7 +26422,7 @@ var qM = /* @__PURE__ */ c({
|
|
|
26420
26422
|
span: "2",
|
|
26421
26423
|
md: "6"
|
|
26422
26424
|
}, {
|
|
26423
|
-
default: F(() => [U(P(
|
|
26425
|
+
default: F(() => [U(P(ZO), G({
|
|
26424
26426
|
modelValue: P(f),
|
|
26425
26427
|
"onUpdate:modelValue": n[1] ||= (e) => /* @__PURE__ */ M(f) ? f.value = e : null,
|
|
26426
26428
|
"error-message": P(m)
|
|
@@ -26431,7 +26433,7 @@ var qM = /* @__PURE__ */ c({
|
|
|
26431
26433
|
span: "3",
|
|
26432
26434
|
md: "6"
|
|
26433
26435
|
}, {
|
|
26434
|
-
default: F(() => [U(P(
|
|
26436
|
+
default: F(() => [U(P(QO), G({
|
|
26435
26437
|
modelValue: P(h),
|
|
26436
26438
|
"onUpdate:modelValue": n[2] ||= (e) => /* @__PURE__ */ M(h) ? h.value = e : null,
|
|
26437
26439
|
"error-message": P(_)
|
|
@@ -26445,7 +26447,7 @@ var qM = /* @__PURE__ */ c({
|
|
|
26445
26447
|
});
|
|
26446
26448
|
//#endregion
|
|
26447
26449
|
//#region src/comparisons/liability/liability.presenter.ts
|
|
26448
|
-
function
|
|
26450
|
+
function QM(e) {
|
|
26449
26451
|
return {
|
|
26450
26452
|
comparison: vd.Liability,
|
|
26451
26453
|
detail: { liability: {
|
|
@@ -26465,20 +26467,20 @@ function XM(e) {
|
|
|
26465
26467
|
}
|
|
26466
26468
|
//#endregion
|
|
26467
26469
|
//#region src/comparisons/liability/index.ts
|
|
26468
|
-
var
|
|
26469
|
-
Form: () =>
|
|
26470
|
-
presenter: () =>
|
|
26471
|
-
}),
|
|
26470
|
+
var $M = /* @__PURE__ */ c({
|
|
26471
|
+
Form: () => ZM,
|
|
26472
|
+
presenter: () => QM
|
|
26473
|
+
}), eN = [{
|
|
26472
26474
|
value: bd.Yes,
|
|
26473
26475
|
label: "Gekocht"
|
|
26474
26476
|
}, {
|
|
26475
26477
|
value: bd.No,
|
|
26476
26478
|
label: "Gehuurd"
|
|
26477
|
-
}],
|
|
26479
|
+
}], tN = (e) => SA({
|
|
26478
26480
|
address: e,
|
|
26479
|
-
ownedBuilding:
|
|
26480
|
-
familyComposition:
|
|
26481
|
-
}),
|
|
26481
|
+
ownedBuilding: vM,
|
|
26482
|
+
familyComposition: gM(uM.house.familyCompositionRequired)
|
|
26483
|
+
}), nN = /* @__PURE__ */ L({
|
|
26482
26484
|
__name: "HouseForm",
|
|
26483
26485
|
props: /*@__PURE__*/ Va({
|
|
26484
26486
|
initialData: {},
|
|
@@ -26497,7 +26499,7 @@ var ZM = /* @__PURE__ */ c({
|
|
|
26497
26499
|
}),
|
|
26498
26500
|
emits: ["submitted"],
|
|
26499
26501
|
setup(e, { emit: t }) {
|
|
26500
|
-
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } =
|
|
26502
|
+
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } = tj({ initial: n.initialData?.address }), { isSubmitting: l, handleSubmit: u, defineField: d } = FA(tN(a), {
|
|
26501
26503
|
ownedBuilding: n.initialData?.ownedBuilding ?? bd.Yes,
|
|
26502
26504
|
familyComposition: n.initialData?.familyComposition ?? yd.SingleWithoutChildren,
|
|
26503
26505
|
address: o
|
|
@@ -26511,7 +26513,7 @@ var ZM = /* @__PURE__ */ c({
|
|
|
26511
26513
|
});
|
|
26512
26514
|
});
|
|
26513
26515
|
}
|
|
26514
|
-
return (t, n) => (z(), V(P(
|
|
26516
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
26515
26517
|
"submit-disabled": e.submitDisabled || P(l),
|
|
26516
26518
|
onSubmit: v
|
|
26517
26519
|
}), {
|
|
@@ -26520,7 +26522,7 @@ var ZM = /* @__PURE__ */ c({
|
|
|
26520
26522
|
span: "4",
|
|
26521
26523
|
md: "6"
|
|
26522
26524
|
}, {
|
|
26523
|
-
default: F(() => [U(P(
|
|
26525
|
+
default: F(() => [U(P(BA), {
|
|
26524
26526
|
"resolved-address": P(s),
|
|
26525
26527
|
"onUpdate:resolvedAddress": n[0] ||= (e) => /* @__PURE__ */ M(s) ? s.value = e : null,
|
|
26526
26528
|
"addition-options": P(c)
|
|
@@ -26536,7 +26538,7 @@ var ZM = /* @__PURE__ */ c({
|
|
|
26536
26538
|
"onUpdate:modelValue": n[1] ||= (e) => /* @__PURE__ */ M(f) ? f.value = e : null,
|
|
26537
26539
|
legend: "Jouw woning is...",
|
|
26538
26540
|
name: "ownedBuilding",
|
|
26539
|
-
options: P(
|
|
26541
|
+
options: P(eN),
|
|
26540
26542
|
variant: "boxed",
|
|
26541
26543
|
required: !1,
|
|
26542
26544
|
"error-message": P(m)
|
|
@@ -26551,7 +26553,7 @@ var ZM = /* @__PURE__ */ c({
|
|
|
26551
26553
|
span: "3",
|
|
26552
26554
|
md: "3"
|
|
26553
26555
|
}, {
|
|
26554
|
-
default: F(() => [U(P(
|
|
26556
|
+
default: F(() => [U(P(QO), G({
|
|
26555
26557
|
modelValue: P(h),
|
|
26556
26558
|
"onUpdate:modelValue": n[2] ||= (e) => /* @__PURE__ */ M(h) ? h.value = e : null,
|
|
26557
26559
|
"error-message": P(_)
|
|
@@ -26565,7 +26567,7 @@ var ZM = /* @__PURE__ */ c({
|
|
|
26565
26567
|
});
|
|
26566
26568
|
//#endregion
|
|
26567
26569
|
//#region src/comparisons/house/house.presenter.ts
|
|
26568
|
-
function
|
|
26570
|
+
function rN(e) {
|
|
26569
26571
|
return {
|
|
26570
26572
|
comparison: vd.Housing,
|
|
26571
26573
|
detail: { house: { ownedBuilding: e.ownedBuilding } },
|
|
@@ -26581,13 +26583,13 @@ function tN(e) {
|
|
|
26581
26583
|
}
|
|
26582
26584
|
//#endregion
|
|
26583
26585
|
//#region src/comparisons/house/index.ts
|
|
26584
|
-
var
|
|
26585
|
-
Form: () =>
|
|
26586
|
-
presenter: () =>
|
|
26587
|
-
}),
|
|
26586
|
+
var iN = /* @__PURE__ */ c({
|
|
26587
|
+
Form: () => nN,
|
|
26588
|
+
presenter: () => rN
|
|
26589
|
+
}), aN = (e) => SA({
|
|
26588
26590
|
address: e,
|
|
26589
|
-
ownedBuilding:
|
|
26590
|
-
}),
|
|
26591
|
+
ownedBuilding: vM
|
|
26592
|
+
}), oN = /* @__PURE__ */ L({
|
|
26591
26593
|
__name: "LegalForm",
|
|
26592
26594
|
props: /*@__PURE__*/ Va({
|
|
26593
26595
|
initialData: {},
|
|
@@ -26606,7 +26608,7 @@ var nN = /* @__PURE__ */ c({
|
|
|
26606
26608
|
}),
|
|
26607
26609
|
emits: ["submitted"],
|
|
26608
26610
|
setup(e, { emit: t }) {
|
|
26609
|
-
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } =
|
|
26611
|
+
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } = tj({ initial: n.initialData?.address }), { isSubmitting: l, handleSubmit: u, defineField: d } = FA(aN(a), {
|
|
26610
26612
|
ownedBuilding: n.initialData?.ownedBuilding ?? bd.Yes,
|
|
26611
26613
|
address: o
|
|
26612
26614
|
}), [f, p, m] = d("ownedBuilding");
|
|
@@ -26618,7 +26620,7 @@ var nN = /* @__PURE__ */ c({
|
|
|
26618
26620
|
});
|
|
26619
26621
|
});
|
|
26620
26622
|
}
|
|
26621
|
-
return (t, n) => (z(), V(P(
|
|
26623
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
26622
26624
|
"submit-disabled": e.submitDisabled || P(l),
|
|
26623
26625
|
onSubmit: h
|
|
26624
26626
|
}), {
|
|
@@ -26626,7 +26628,7 @@ var nN = /* @__PURE__ */ c({
|
|
|
26626
26628
|
span: "5",
|
|
26627
26629
|
md: "6"
|
|
26628
26630
|
}, {
|
|
26629
|
-
default: F(() => [U(P(
|
|
26631
|
+
default: F(() => [U(P(BA), {
|
|
26630
26632
|
"resolved-address": P(s),
|
|
26631
26633
|
"onUpdate:resolvedAddress": n[0] ||= (e) => /* @__PURE__ */ M(s) ? s.value = e : null,
|
|
26632
26634
|
"addition-options": P(c)
|
|
@@ -26641,7 +26643,7 @@ var nN = /* @__PURE__ */ c({
|
|
|
26641
26643
|
"onUpdate:modelValue": n[1] ||= (e) => /* @__PURE__ */ M(f) ? f.value = e : null,
|
|
26642
26644
|
legend: "Jouw woning is...",
|
|
26643
26645
|
name: "ownedBuilding",
|
|
26644
|
-
options: P(
|
|
26646
|
+
options: P(eN),
|
|
26645
26647
|
variant: "boxed",
|
|
26646
26648
|
required: !1,
|
|
26647
26649
|
"error-message": P(m)
|
|
@@ -26658,7 +26660,7 @@ var nN = /* @__PURE__ */ c({
|
|
|
26658
26660
|
});
|
|
26659
26661
|
//#endregion
|
|
26660
26662
|
//#region src/comparisons/legal/legal.presenter.ts
|
|
26661
|
-
function
|
|
26663
|
+
function sN(e) {
|
|
26662
26664
|
return {
|
|
26663
26665
|
comparison: vd.LegalAssistance,
|
|
26664
26666
|
detail: { comparison: {
|
|
@@ -26676,18 +26678,18 @@ function aN(e) {
|
|
|
26676
26678
|
}
|
|
26677
26679
|
//#endregion
|
|
26678
26680
|
//#region src/comparisons/legal/index.ts
|
|
26679
|
-
var
|
|
26680
|
-
Form: () =>
|
|
26681
|
-
presenter: () =>
|
|
26682
|
-
}),
|
|
26681
|
+
var cN = /* @__PURE__ */ c({
|
|
26682
|
+
Form: () => oN,
|
|
26683
|
+
presenter: () => sN
|
|
26684
|
+
}), lN = (e) => SA({
|
|
26683
26685
|
address: e,
|
|
26684
|
-
birthdate:
|
|
26685
|
-
familyComposition:
|
|
26686
|
-
partnerBirthdate:
|
|
26687
|
-
is:
|
|
26688
|
-
then: () =>
|
|
26686
|
+
birthdate: fM(),
|
|
26687
|
+
familyComposition: _M,
|
|
26688
|
+
partnerBirthdate: iA().defined().when("familyComposition", {
|
|
26689
|
+
is: sM,
|
|
26690
|
+
then: () => fM()
|
|
26689
26691
|
})
|
|
26690
|
-
}),
|
|
26692
|
+
}), uN = /* @__PURE__ */ L({
|
|
26691
26693
|
__name: "PackageForm",
|
|
26692
26694
|
props: /*@__PURE__*/ Va({
|
|
26693
26695
|
initialData: {},
|
|
@@ -26706,14 +26708,14 @@ var oN = /* @__PURE__ */ c({
|
|
|
26706
26708
|
}),
|
|
26707
26709
|
emits: ["submitted"],
|
|
26708
26710
|
setup(e, { emit: t }) {
|
|
26709
|
-
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } =
|
|
26711
|
+
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } = tj({ initial: n.initialData?.address }), { isSubmitting: l, handleSubmit: u, defineField: d, resetField: f } = FA(lN(a), {
|
|
26710
26712
|
birthdate: n.initialData?.birthdate ?? "",
|
|
26711
26713
|
familyComposition: n.initialData?.familyComposition ?? yd.SingleWithoutChildren,
|
|
26712
26714
|
partnerBirthdate: n.initialData?.partnerBirthdate ?? "",
|
|
26713
26715
|
address: o
|
|
26714
|
-
}), [p, m, h] = d("birthdate"), [g, _, v] = d("familyComposition", { validateAt: "change" }), [y, b, x] = d("partnerBirthdate"), S = K(() =>
|
|
26716
|
+
}), [p, m, h] = d("birthdate"), [g, _, v] = d("familyComposition", { validateAt: "change" }), [y, b, x] = d("partnerBirthdate"), S = K(() => sM(g.value));
|
|
26715
26717
|
I(g, (e) => {
|
|
26716
|
-
|
|
26718
|
+
sM(e) || f("partnerBirthdate", { value: "" });
|
|
26717
26719
|
}, { immediate: !0 });
|
|
26718
26720
|
function C() {
|
|
26719
26721
|
u(({ birthdate: e, familyComposition: t, partnerBirthdate: n }) => {
|
|
@@ -26725,7 +26727,7 @@ var oN = /* @__PURE__ */ c({
|
|
|
26725
26727
|
});
|
|
26726
26728
|
});
|
|
26727
26729
|
}
|
|
26728
|
-
return (t, n) => (z(), V(P(
|
|
26730
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
26729
26731
|
"submit-disabled": e.submitDisabled || P(l),
|
|
26730
26732
|
onSubmit: C
|
|
26731
26733
|
}), {
|
|
@@ -26734,7 +26736,7 @@ var oN = /* @__PURE__ */ c({
|
|
|
26734
26736
|
span: "4",
|
|
26735
26737
|
md: "6"
|
|
26736
26738
|
}, {
|
|
26737
|
-
default: F(() => [U(P(
|
|
26739
|
+
default: F(() => [U(P(BA), {
|
|
26738
26740
|
"resolved-address": P(s),
|
|
26739
26741
|
"onUpdate:resolvedAddress": n[0] ||= (e) => /* @__PURE__ */ M(s) ? s.value = e : null,
|
|
26740
26742
|
"addition-options": P(c)
|
|
@@ -26745,7 +26747,7 @@ var oN = /* @__PURE__ */ c({
|
|
|
26745
26747
|
span: S.value ? 2 : 3,
|
|
26746
26748
|
md: "6"
|
|
26747
26749
|
}, {
|
|
26748
|
-
default: F(() => [U(P(
|
|
26750
|
+
default: F(() => [U(P(ZO), G({
|
|
26749
26751
|
modelValue: P(p),
|
|
26750
26752
|
"onUpdate:modelValue": n[1] ||= (e) => /* @__PURE__ */ M(p) ? p.value = e : null,
|
|
26751
26753
|
label: "Geboortedatum",
|
|
@@ -26757,7 +26759,7 @@ var oN = /* @__PURE__ */ c({
|
|
|
26757
26759
|
span: S.value ? 2 : 3,
|
|
26758
26760
|
md: "6"
|
|
26759
26761
|
}, {
|
|
26760
|
-
default: F(() => [U(P(
|
|
26762
|
+
default: F(() => [U(P(QO), G({
|
|
26761
26763
|
modelValue: P(g),
|
|
26762
26764
|
"onUpdate:modelValue": n[2] ||= (e) => /* @__PURE__ */ M(g) ? g.value = e : null,
|
|
26763
26765
|
"error-message": P(v)
|
|
@@ -26769,7 +26771,7 @@ var oN = /* @__PURE__ */ c({
|
|
|
26769
26771
|
span: "2",
|
|
26770
26772
|
md: "6"
|
|
26771
26773
|
}, {
|
|
26772
|
-
default: F(() => [U(P(
|
|
26774
|
+
default: F(() => [U(P(ZO), G({
|
|
26773
26775
|
modelValue: P(y),
|
|
26774
26776
|
"onUpdate:modelValue": n[3] ||= (e) => /* @__PURE__ */ M(y) ? y.value = e : null,
|
|
26775
26777
|
label: "Geboortedatum partner",
|
|
@@ -26785,7 +26787,7 @@ var oN = /* @__PURE__ */ c({
|
|
|
26785
26787
|
});
|
|
26786
26788
|
//#endregion
|
|
26787
26789
|
//#region src/comparisons/package/package.presenter.ts
|
|
26788
|
-
function
|
|
26790
|
+
function dN(e) {
|
|
26789
26791
|
return {
|
|
26790
26792
|
comparison: vd.Package,
|
|
26791
26793
|
detail: { partner: { birthdate: e.partnerBirthdate } },
|
|
@@ -26802,21 +26804,21 @@ function lN(e) {
|
|
|
26802
26804
|
}
|
|
26803
26805
|
//#endregion
|
|
26804
26806
|
//#region src/comparisons/package/index.ts
|
|
26805
|
-
var
|
|
26806
|
-
Form: () =>
|
|
26807
|
-
presenter: () =>
|
|
26808
|
-
}),
|
|
26807
|
+
var fN = /* @__PURE__ */ c({
|
|
26808
|
+
Form: () => uN,
|
|
26809
|
+
presenter: () => dN
|
|
26810
|
+
}), pN = {
|
|
26809
26811
|
min: 21,
|
|
26810
26812
|
max: 74
|
|
26811
|
-
},
|
|
26813
|
+
}, mN = {
|
|
26812
26814
|
min: 3500,
|
|
26813
26815
|
max: 75e3
|
|
26814
|
-
},
|
|
26815
|
-
LoanPurpose:
|
|
26816
|
-
LoanAmount:
|
|
26817
|
-
birthdate:
|
|
26818
|
-
familyComposition:
|
|
26819
|
-
}),
|
|
26816
|
+
}, hN = SA({
|
|
26817
|
+
LoanPurpose: iA().required(uM.loan.purposeRequired),
|
|
26818
|
+
LoanAmount: hM(uM.loan.amountRequired).min(mN.min, uM.loan.amountMin(mN.min)).max(mN.max, uM.loan.amountMax(mN.max)),
|
|
26819
|
+
birthdate: fM(pN),
|
|
26820
|
+
familyComposition: _M
|
|
26821
|
+
}), gN = [
|
|
26820
26822
|
{
|
|
26821
26823
|
title: "Aankoop auto",
|
|
26822
26824
|
value: "02"
|
|
@@ -26865,7 +26867,7 @@ var uN = /* @__PURE__ */ c({
|
|
|
26865
26867
|
title: "Anders",
|
|
26866
26868
|
value: "99"
|
|
26867
26869
|
}
|
|
26868
|
-
],
|
|
26870
|
+
], _N = /* @__PURE__ */ L({
|
|
26869
26871
|
__name: "LoanForm",
|
|
26870
26872
|
props: /*@__PURE__*/ Va({
|
|
26871
26873
|
initialData: {},
|
|
@@ -26884,7 +26886,7 @@ var uN = /* @__PURE__ */ c({
|
|
|
26884
26886
|
}),
|
|
26885
26887
|
emits: ["submitted"],
|
|
26886
26888
|
setup(e, { emit: t }) {
|
|
26887
|
-
let n = e, r = _d(n), i = t, { isSubmitting: a, handleSubmit: o, defineField: s } =
|
|
26889
|
+
let n = e, r = _d(n), i = t, { isSubmitting: a, handleSubmit: o, defineField: s } = FA(hN, {
|
|
26888
26890
|
LoanPurpose: n.initialData?.LoanPurpose ?? "",
|
|
26889
26891
|
LoanAmount: n.initialData?.LoanAmount ?? null,
|
|
26890
26892
|
birthdate: n.initialData?.birthdate ?? "",
|
|
@@ -26895,7 +26897,7 @@ var uN = /* @__PURE__ */ c({
|
|
|
26895
26897
|
i("submitted", { ...e });
|
|
26896
26898
|
});
|
|
26897
26899
|
}
|
|
26898
|
-
return (t, n) => (z(), V(P(
|
|
26900
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
26899
26901
|
"submit-disabled": e.submitDisabled || P(a),
|
|
26900
26902
|
onSubmit: b
|
|
26901
26903
|
}), {
|
|
@@ -26909,7 +26911,7 @@ var uN = /* @__PURE__ */ c({
|
|
|
26909
26911
|
"onUpdate:modelValue": n[0] ||= (e) => /* @__PURE__ */ M(c) ? c.value = e : null,
|
|
26910
26912
|
label: "Leendoel",
|
|
26911
26913
|
placeholder: "Maak een keuze",
|
|
26912
|
-
options: P(
|
|
26914
|
+
options: P(gN),
|
|
26913
26915
|
name: "LoanPurpose",
|
|
26914
26916
|
required: !1,
|
|
26915
26917
|
"error-message": P(u)
|
|
@@ -26943,7 +26945,7 @@ var uN = /* @__PURE__ */ c({
|
|
|
26943
26945
|
span: "2",
|
|
26944
26946
|
md: "6"
|
|
26945
26947
|
}, {
|
|
26946
|
-
default: F(() => [U(P(
|
|
26948
|
+
default: F(() => [U(P(ZO), G({
|
|
26947
26949
|
modelValue: P(m),
|
|
26948
26950
|
"onUpdate:modelValue": n[2] ||= (e) => /* @__PURE__ */ M(m) ? m.value = e : null,
|
|
26949
26951
|
"error-message": P(g)
|
|
@@ -26954,7 +26956,7 @@ var uN = /* @__PURE__ */ c({
|
|
|
26954
26956
|
span: "3",
|
|
26955
26957
|
md: "6"
|
|
26956
26958
|
}, {
|
|
26957
|
-
default: F(() => [U(P(
|
|
26959
|
+
default: F(() => [U(P(QO), G({
|
|
26958
26960
|
modelValue: P(_),
|
|
26959
26961
|
"onUpdate:modelValue": n[3] ||= (e) => /* @__PURE__ */ M(_) ? _.value = e : null,
|
|
26960
26962
|
"error-message": P(y)
|
|
@@ -26968,19 +26970,19 @@ var uN = /* @__PURE__ */ c({
|
|
|
26968
26970
|
});
|
|
26969
26971
|
//#endregion
|
|
26970
26972
|
//#region src/comparisons/loan/loan.presenter.ts
|
|
26971
|
-
function
|
|
26972
|
-
let t =
|
|
26973
|
+
function vN(e) {
|
|
26974
|
+
let t = iM(e, Yj);
|
|
26973
26975
|
if (!t) return 120;
|
|
26974
|
-
let n = t.add(76, "year").diff((0,
|
|
26976
|
+
let n = t.add(76, "year").diff((0, eM.default)(), "month", !0), r = Math.floor(n / 12) * 12;
|
|
26975
26977
|
return Math.min(r, 120);
|
|
26976
26978
|
}
|
|
26977
|
-
function
|
|
26979
|
+
function yN(e) {
|
|
26978
26980
|
return {
|
|
26979
26981
|
comparison: vd.Loan,
|
|
26980
26982
|
detail: { loan: {
|
|
26981
26983
|
LoanPurpose: e.LoanPurpose,
|
|
26982
26984
|
LoanAmount: e.LoanAmount,
|
|
26983
|
-
MaxDurationByLegalLimit:
|
|
26985
|
+
MaxDurationByLegalLimit: vN(e.birthdate)
|
|
26984
26986
|
} },
|
|
26985
26987
|
user: {
|
|
26986
26988
|
birthdate: e.birthdate,
|
|
@@ -26990,17 +26992,17 @@ function _N(e) {
|
|
|
26990
26992
|
}
|
|
26991
26993
|
//#endregion
|
|
26992
26994
|
//#region src/comparisons/loan/index.ts
|
|
26993
|
-
var
|
|
26994
|
-
Form: () =>
|
|
26995
|
-
presenter: () =>
|
|
26996
|
-
}),
|
|
26995
|
+
var bN = /* @__PURE__ */ c({
|
|
26996
|
+
Form: () => _N,
|
|
26997
|
+
presenter: () => yN
|
|
26998
|
+
}), xN = {
|
|
26997
26999
|
min: 16,
|
|
26998
27000
|
max: 99
|
|
26999
|
-
},
|
|
27001
|
+
}, SN = (e, t) => SA({
|
|
27000
27002
|
licensePlate: e,
|
|
27001
27003
|
address: t,
|
|
27002
|
-
birthdate:
|
|
27003
|
-
}),
|
|
27004
|
+
birthdate: fM(xN)
|
|
27005
|
+
}), CN = /* @__PURE__ */ L({
|
|
27004
27006
|
__name: "MopedForm",
|
|
27005
27007
|
props: /*@__PURE__*/ Va({
|
|
27006
27008
|
initialData: {},
|
|
@@ -27019,7 +27021,7 @@ var vN = /* @__PURE__ */ c({
|
|
|
27019
27021
|
}),
|
|
27020
27022
|
emits: ["submitted"],
|
|
27021
27023
|
setup(e, { emit: t }) {
|
|
27022
|
-
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } =
|
|
27024
|
+
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } = tj({ initial: n.initialData?.address }), { vehicleData: l, licensePlateSchema: u } = xj(vd.Moped, { initialData: n.initialData?.vehicle ?? void 0 }), { isSubmitting: d, handleSubmit: f, defineField: p } = FA(SN(u, a), {
|
|
27023
27025
|
licensePlate: n.initialData?.licensePlate ?? "",
|
|
27024
27026
|
birthdate: n.initialData?.birthdate ?? "",
|
|
27025
27027
|
address: o
|
|
@@ -27034,7 +27036,7 @@ var vN = /* @__PURE__ */ c({
|
|
|
27034
27036
|
});
|
|
27035
27037
|
});
|
|
27036
27038
|
}
|
|
27037
|
-
return (t, n) => (z(), V(P(
|
|
27039
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
27038
27040
|
"submit-disabled": e.submitDisabled || P(d),
|
|
27039
27041
|
onSubmit: x
|
|
27040
27042
|
}), {
|
|
@@ -27043,7 +27045,7 @@ var vN = /* @__PURE__ */ c({
|
|
|
27043
27045
|
span: "3",
|
|
27044
27046
|
md: "6"
|
|
27045
27047
|
}, {
|
|
27046
|
-
default: F(() => [U(P(
|
|
27048
|
+
default: F(() => [U(P(hj), G({
|
|
27047
27049
|
modelValue: P(m),
|
|
27048
27050
|
"onUpdate:modelValue": n[0] ||= (e) => /* @__PURE__ */ M(m) ? m.value = e : null,
|
|
27049
27051
|
"vehicle-data": P(l),
|
|
@@ -27074,7 +27076,7 @@ var vN = /* @__PURE__ */ c({
|
|
|
27074
27076
|
span: "4",
|
|
27075
27077
|
md: "6"
|
|
27076
27078
|
}, {
|
|
27077
|
-
default: F(() => [U(P(
|
|
27079
|
+
default: F(() => [U(P(BA), {
|
|
27078
27080
|
"resolved-address": P(s),
|
|
27079
27081
|
"onUpdate:resolvedAddress": n[2] ||= (e) => /* @__PURE__ */ M(s) ? s.value = e : null,
|
|
27080
27082
|
"addition-options": P(c)
|
|
@@ -27085,7 +27087,7 @@ var vN = /* @__PURE__ */ c({
|
|
|
27085
27087
|
span: "3",
|
|
27086
27088
|
md: "6"
|
|
27087
27089
|
}, {
|
|
27088
|
-
default: F(() => [U(P(
|
|
27090
|
+
default: F(() => [U(P(ZO), G({
|
|
27089
27091
|
modelValue: P(v),
|
|
27090
27092
|
"onUpdate:modelValue": n[3] ||= (e) => /* @__PURE__ */ M(v) ? v.value = e : null,
|
|
27091
27093
|
label: "Geboortedatum hoofdbestuurder",
|
|
@@ -27100,7 +27102,7 @@ var vN = /* @__PURE__ */ c({
|
|
|
27100
27102
|
});
|
|
27101
27103
|
//#endregion
|
|
27102
27104
|
//#region src/comparisons/moped/moped.presenter.ts
|
|
27103
|
-
function
|
|
27105
|
+
function wN(e) {
|
|
27104
27106
|
return {
|
|
27105
27107
|
comparison: vd.Moped,
|
|
27106
27108
|
detail: { moped: { ...e.vehicle } },
|
|
@@ -27117,14 +27119,14 @@ function SN(e) {
|
|
|
27117
27119
|
}
|
|
27118
27120
|
//#endregion
|
|
27119
27121
|
//#region src/comparisons/moped/index.ts
|
|
27120
|
-
var
|
|
27121
|
-
Form: () =>
|
|
27122
|
-
presenter: () =>
|
|
27123
|
-
}),
|
|
27122
|
+
var TN = /* @__PURE__ */ c({
|
|
27123
|
+
Form: () => CN,
|
|
27124
|
+
presenter: () => wN
|
|
27125
|
+
}), EN = (e, t) => SA({
|
|
27124
27126
|
licensePlate: e,
|
|
27125
27127
|
address: t,
|
|
27126
|
-
birthdate:
|
|
27127
|
-
}),
|
|
27128
|
+
birthdate: fM()
|
|
27129
|
+
}), DN = /* @__PURE__ */ L({
|
|
27128
27130
|
__name: "MotorForm",
|
|
27129
27131
|
props: /*@__PURE__*/ Va({
|
|
27130
27132
|
initialData: {},
|
|
@@ -27143,7 +27145,7 @@ var CN = /* @__PURE__ */ c({
|
|
|
27143
27145
|
}),
|
|
27144
27146
|
emits: ["submitted"],
|
|
27145
27147
|
setup(e, { emit: t }) {
|
|
27146
|
-
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } =
|
|
27148
|
+
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } = tj({ initial: n.initialData?.address }), { vehicleData: l, licensePlateSchema: u } = xj(vd.Motor, { initialData: n.initialData?.vehicle ?? void 0 }), { isSubmitting: d, handleSubmit: f, defineField: p } = FA(EN(u, a), {
|
|
27147
27149
|
licensePlate: n.initialData?.licensePlate ?? "",
|
|
27148
27150
|
birthdate: n.initialData?.birthdate ?? "",
|
|
27149
27151
|
address: o
|
|
@@ -27158,7 +27160,7 @@ var CN = /* @__PURE__ */ c({
|
|
|
27158
27160
|
});
|
|
27159
27161
|
});
|
|
27160
27162
|
}
|
|
27161
|
-
return (t, n) => (z(), V(P(
|
|
27163
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
27162
27164
|
"submit-disabled": e.submitDisabled || P(d),
|
|
27163
27165
|
onSubmit: x
|
|
27164
27166
|
}), {
|
|
@@ -27167,7 +27169,7 @@ var CN = /* @__PURE__ */ c({
|
|
|
27167
27169
|
span: "3",
|
|
27168
27170
|
md: "6"
|
|
27169
27171
|
}, {
|
|
27170
|
-
default: F(() => [U(P(
|
|
27172
|
+
default: F(() => [U(P(hj), G({
|
|
27171
27173
|
modelValue: P(m),
|
|
27172
27174
|
"onUpdate:modelValue": n[0] ||= (e) => /* @__PURE__ */ M(m) ? m.value = e : null,
|
|
27173
27175
|
"vehicle-data": P(l),
|
|
@@ -27198,7 +27200,7 @@ var CN = /* @__PURE__ */ c({
|
|
|
27198
27200
|
span: "4",
|
|
27199
27201
|
md: "6"
|
|
27200
27202
|
}, {
|
|
27201
|
-
default: F(() => [U(P(
|
|
27203
|
+
default: F(() => [U(P(BA), {
|
|
27202
27204
|
"resolved-address": P(s),
|
|
27203
27205
|
"onUpdate:resolvedAddress": n[2] ||= (e) => /* @__PURE__ */ M(s) ? s.value = e : null,
|
|
27204
27206
|
"addition-options": P(c)
|
|
@@ -27209,7 +27211,7 @@ var CN = /* @__PURE__ */ c({
|
|
|
27209
27211
|
span: "3",
|
|
27210
27212
|
md: "6"
|
|
27211
27213
|
}, {
|
|
27212
|
-
default: F(() => [U(P(
|
|
27214
|
+
default: F(() => [U(P(ZO), G({
|
|
27213
27215
|
modelValue: P(v),
|
|
27214
27216
|
"onUpdate:modelValue": n[3] ||= (e) => /* @__PURE__ */ M(v) ? v.value = e : null,
|
|
27215
27217
|
label: "Geboortedatum hoofdbestuurder",
|
|
@@ -27224,7 +27226,7 @@ var CN = /* @__PURE__ */ c({
|
|
|
27224
27226
|
});
|
|
27225
27227
|
//#endregion
|
|
27226
27228
|
//#region src/comparisons/motor/motor.presenter.ts
|
|
27227
|
-
function
|
|
27229
|
+
function ON(e) {
|
|
27228
27230
|
return {
|
|
27229
27231
|
comparison: vd.Motor,
|
|
27230
27232
|
detail: { motor: { ...e.vehicle } },
|
|
@@ -27241,14 +27243,14 @@ function EN(e) {
|
|
|
27241
27243
|
}
|
|
27242
27244
|
//#endregion
|
|
27243
27245
|
//#region src/comparisons/motor/index.ts
|
|
27244
|
-
var
|
|
27245
|
-
Form: () =>
|
|
27246
|
-
presenter: () =>
|
|
27247
|
-
}),
|
|
27246
|
+
var kN = /* @__PURE__ */ c({
|
|
27247
|
+
Form: () => DN,
|
|
27248
|
+
presenter: () => ON
|
|
27249
|
+
}), AN = (e, t) => SA({
|
|
27248
27250
|
licensePlate: e,
|
|
27249
27251
|
address: t,
|
|
27250
|
-
birthdate:
|
|
27251
|
-
}),
|
|
27252
|
+
birthdate: fM()
|
|
27253
|
+
}), jN = /* @__PURE__ */ L({
|
|
27252
27254
|
__name: "CarForm",
|
|
27253
27255
|
props: /*@__PURE__*/ Va({
|
|
27254
27256
|
initialData: {},
|
|
@@ -27267,7 +27269,7 @@ var DN = /* @__PURE__ */ c({
|
|
|
27267
27269
|
}),
|
|
27268
27270
|
emits: ["submitted"],
|
|
27269
27271
|
setup(e, { emit: t }) {
|
|
27270
|
-
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } =
|
|
27272
|
+
let n = e, r = _d(n), i = t, { addressSchema: a, draft: o, resolvedAddress: s, additionOptions: c } = tj({ initial: n.initialData?.address }), { vehicleData: l, licensePlateSchema: u } = xj(vd.Car, { initialData: n.initialData?.vehicle ?? void 0 }), { isSubmitting: d, handleSubmit: f, defineField: p } = FA(AN(u, a), {
|
|
27271
27273
|
licensePlate: n.initialData?.licensePlate ?? "",
|
|
27272
27274
|
birthdate: n.initialData?.birthdate ?? "",
|
|
27273
27275
|
address: o
|
|
@@ -27282,7 +27284,7 @@ var DN = /* @__PURE__ */ c({
|
|
|
27282
27284
|
});
|
|
27283
27285
|
});
|
|
27284
27286
|
}
|
|
27285
|
-
return (t, n) => (z(), V(P(
|
|
27287
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
27286
27288
|
"submit-disabled": e.submitDisabled || P(d),
|
|
27287
27289
|
onSubmit: x
|
|
27288
27290
|
}), {
|
|
@@ -27291,7 +27293,7 @@ var DN = /* @__PURE__ */ c({
|
|
|
27291
27293
|
span: "3",
|
|
27292
27294
|
md: "6"
|
|
27293
27295
|
}, {
|
|
27294
|
-
default: F(() => [U(P(
|
|
27296
|
+
default: F(() => [U(P(hj), G({
|
|
27295
27297
|
modelValue: P(m),
|
|
27296
27298
|
"onUpdate:modelValue": n[0] ||= (e) => /* @__PURE__ */ M(m) ? m.value = e : null,
|
|
27297
27299
|
"vehicle-data": P(l),
|
|
@@ -27322,7 +27324,7 @@ var DN = /* @__PURE__ */ c({
|
|
|
27322
27324
|
span: "4",
|
|
27323
27325
|
md: "6"
|
|
27324
27326
|
}, {
|
|
27325
|
-
default: F(() => [U(P(
|
|
27327
|
+
default: F(() => [U(P(BA), {
|
|
27326
27328
|
"resolved-address": P(s),
|
|
27327
27329
|
"onUpdate:resolvedAddress": n[2] ||= (e) => /* @__PURE__ */ M(s) ? s.value = e : null,
|
|
27328
27330
|
"addition-options": P(c)
|
|
@@ -27333,7 +27335,7 @@ var DN = /* @__PURE__ */ c({
|
|
|
27333
27335
|
span: "3",
|
|
27334
27336
|
md: "6"
|
|
27335
27337
|
}, {
|
|
27336
|
-
default: F(() => [U(P(
|
|
27338
|
+
default: F(() => [U(P(ZO), G({
|
|
27337
27339
|
modelValue: P(v),
|
|
27338
27340
|
"onUpdate:modelValue": n[3] ||= (e) => /* @__PURE__ */ M(v) ? v.value = e : null,
|
|
27339
27341
|
label: "Geboortedatum hoofdbestuurder",
|
|
@@ -27348,7 +27350,7 @@ var DN = /* @__PURE__ */ c({
|
|
|
27348
27350
|
});
|
|
27349
27351
|
//#endregion
|
|
27350
27352
|
//#region src/comparisons/car/car.presenter.ts
|
|
27351
|
-
function
|
|
27353
|
+
function MN(e) {
|
|
27352
27354
|
return {
|
|
27353
27355
|
comparison: vd.Car,
|
|
27354
27356
|
detail: { car: { ...e.vehicle } },
|
|
@@ -27365,13 +27367,13 @@ function AN(e) {
|
|
|
27365
27367
|
}
|
|
27366
27368
|
//#endregion
|
|
27367
27369
|
//#region src/comparisons/car/index.ts
|
|
27368
|
-
var
|
|
27369
|
-
Form: () =>
|
|
27370
|
-
presenter: () =>
|
|
27371
|
-
}),
|
|
27370
|
+
var NN = /* @__PURE__ */ c({
|
|
27371
|
+
Form: () => jN,
|
|
27372
|
+
presenter: () => MN
|
|
27373
|
+
}), PN = (e) => SA({
|
|
27372
27374
|
licensePlate: e,
|
|
27373
|
-
company:
|
|
27374
|
-
}),
|
|
27375
|
+
company: qj()
|
|
27376
|
+
}), FN = /* @__PURE__ */ L({
|
|
27375
27377
|
__name: "BusinessCarForm",
|
|
27376
27378
|
props: /*@__PURE__*/ Va({
|
|
27377
27379
|
initialData: {},
|
|
@@ -27390,7 +27392,7 @@ var jN = /* @__PURE__ */ c({
|
|
|
27390
27392
|
}),
|
|
27391
27393
|
emits: ["submitted"],
|
|
27392
27394
|
setup(e, { emit: t }) {
|
|
27393
|
-
let n = e, r = _d(n), i = t, { vehicleData: a, licensePlateSchema: o } =
|
|
27395
|
+
let n = e, r = _d(n), i = t, { vehicleData: a, licensePlateSchema: o } = xj(vd.Car, { initialData: n.initialData?.vehicle ?? void 0 }), { isSubmitting: s, handleSubmit: c, defineField: l, setErrors: u, removeError: d } = FA(PN(o), {
|
|
27394
27396
|
licensePlate: n.initialData?.licensePlate ?? "",
|
|
27395
27397
|
company: n.initialData?.company ?? null
|
|
27396
27398
|
}), [f, p, m, h] = l("licensePlate"), [g, _, v] = l("company"), y = (e) => e ? u({ company: e }) : d("company"), b = K(() => !!g.value && !g.value.hasVisitingAddress);
|
|
@@ -27403,7 +27405,7 @@ var jN = /* @__PURE__ */ c({
|
|
|
27403
27405
|
});
|
|
27404
27406
|
});
|
|
27405
27407
|
}
|
|
27406
|
-
return (t, n) => (z(), V(P(
|
|
27408
|
+
return (t, n) => (z(), V(P(YO), G(P(r), {
|
|
27407
27409
|
"submit-disabled": e.submitDisabled || P(s) || b.value,
|
|
27408
27410
|
onSubmit: x
|
|
27409
27411
|
}), {
|
|
@@ -27411,7 +27413,7 @@ var jN = /* @__PURE__ */ c({
|
|
|
27411
27413
|
span: "5",
|
|
27412
27414
|
md: "6"
|
|
27413
27415
|
}, {
|
|
27414
|
-
default: F(() => [U(P(
|
|
27416
|
+
default: F(() => [U(P(hj), G({
|
|
27415
27417
|
modelValue: P(f),
|
|
27416
27418
|
"onUpdate:modelValue": n[0] ||= (e) => /* @__PURE__ */ M(f) ? f.value = e : null,
|
|
27417
27419
|
"vehicle-data": P(a),
|
|
@@ -27441,7 +27443,7 @@ var jN = /* @__PURE__ */ c({
|
|
|
27441
27443
|
span: "5",
|
|
27442
27444
|
md: "6"
|
|
27443
27445
|
}, {
|
|
27444
|
-
default: F(() => [U(P(
|
|
27446
|
+
default: F(() => [U(P(Kj), G({
|
|
27445
27447
|
modelValue: P(g),
|
|
27446
27448
|
"onUpdate:modelValue": n[2] ||= (e) => /* @__PURE__ */ M(g) ? g.value = e : null,
|
|
27447
27449
|
name: "company",
|
|
@@ -27470,7 +27472,7 @@ var jN = /* @__PURE__ */ c({
|
|
|
27470
27472
|
});
|
|
27471
27473
|
//#endregion
|
|
27472
27474
|
//#region src/comparisons/car-business/businessCar.presenter.ts
|
|
27473
|
-
function
|
|
27475
|
+
function IN(e) {
|
|
27474
27476
|
return {
|
|
27475
27477
|
comparison: vd.CarBusiness,
|
|
27476
27478
|
detail: {
|
|
@@ -27482,10 +27484,10 @@ function PN(e) {
|
|
|
27482
27484
|
}
|
|
27483
27485
|
//#endregion
|
|
27484
27486
|
//#region src/comparisons/car-business/index.ts
|
|
27485
|
-
var
|
|
27486
|
-
Form: () =>
|
|
27487
|
-
presenter: () =>
|
|
27488
|
-
}),
|
|
27487
|
+
var LN = /* @__PURE__ */ c({
|
|
27488
|
+
Form: () => FN,
|
|
27489
|
+
presenter: () => IN
|
|
27490
|
+
}), RN = SA({ company: qj() }), zN = /* @__PURE__ */ L({
|
|
27489
27491
|
__name: "BusinessLiabilityForm",
|
|
27490
27492
|
props: /*@__PURE__*/ Va({
|
|
27491
27493
|
initialData: {},
|
|
@@ -27506,13 +27508,13 @@ var FN = /* @__PURE__ */ c({
|
|
|
27506
27508
|
}),
|
|
27507
27509
|
emits: ["submitted"],
|
|
27508
27510
|
setup(e, { emit: t }) {
|
|
27509
|
-
let n = e, r = _d(n), i = t, { isSubmitting: a, handleSubmit: o, defineField: s, setErrors: c, removeError: l } =
|
|
27511
|
+
let n = e, r = _d(n), i = t, { isSubmitting: a, handleSubmit: o, defineField: s, setErrors: c, removeError: l } = FA(RN, { company: n.initialData?.company ?? null }), [u, d, f] = s("company"), p = (e) => e ? c({ company: e }) : l("company"), m = K(() => !!u.value && !u.value.hasVisitingAddress);
|
|
27510
27512
|
function h() {
|
|
27511
27513
|
o(({ company: e }) => {
|
|
27512
27514
|
i("submitted", { company: e });
|
|
27513
27515
|
});
|
|
27514
27516
|
}
|
|
27515
|
-
return (e, t) => (z(), V(P(
|
|
27517
|
+
return (e, t) => (z(), V(P(YO), G(P(r), {
|
|
27516
27518
|
"action-span": 4,
|
|
27517
27519
|
"submit-disabled": P(a) || m.value,
|
|
27518
27520
|
onSubmit: h
|
|
@@ -27521,7 +27523,7 @@ var FN = /* @__PURE__ */ c({
|
|
|
27521
27523
|
span: "8",
|
|
27522
27524
|
md: "6"
|
|
27523
27525
|
}, {
|
|
27524
|
-
default: F(() => [U(P(
|
|
27526
|
+
default: F(() => [U(P(Kj), G({
|
|
27525
27527
|
modelValue: P(u),
|
|
27526
27528
|
"onUpdate:modelValue": t[0] ||= (e) => /* @__PURE__ */ M(u) ? u.value = e : null,
|
|
27527
27529
|
name: "company",
|
|
@@ -27550,7 +27552,7 @@ var FN = /* @__PURE__ */ c({
|
|
|
27550
27552
|
});
|
|
27551
27553
|
//#endregion
|
|
27552
27554
|
//#region src/comparisons/businessLiability/businessLiability.presenter.ts
|
|
27553
|
-
function
|
|
27555
|
+
function BN(e) {
|
|
27554
27556
|
return {
|
|
27555
27557
|
comparison: vd.BusinessLiability,
|
|
27556
27558
|
detail: { companyData: { ...e.company } },
|
|
@@ -27559,29 +27561,29 @@ function RN(e) {
|
|
|
27559
27561
|
}
|
|
27560
27562
|
//#endregion
|
|
27561
27563
|
//#region src/comparisons/businessLiability/index.ts
|
|
27562
|
-
var
|
|
27563
|
-
Form: () =>
|
|
27564
|
-
presenter: () =>
|
|
27565
|
-
}),
|
|
27566
|
-
[vd.Bike]:
|
|
27567
|
-
[vd.Pet]:
|
|
27568
|
-
[vd.Caravan]:
|
|
27569
|
-
[vd.Travel]:
|
|
27570
|
-
[vd.Liability]:
|
|
27571
|
-
[vd.Housing]:
|
|
27572
|
-
house:
|
|
27573
|
-
[vd.LegalAssistance]:
|
|
27574
|
-
[vd.Package]:
|
|
27575
|
-
[vd.Loan]:
|
|
27576
|
-
[vd.Moped]:
|
|
27577
|
-
[vd.Motor]:
|
|
27578
|
-
[vd.Car]:
|
|
27579
|
-
[vd.CarBusiness]:
|
|
27580
|
-
"business-car":
|
|
27581
|
-
[vd.BusinessLiability]:
|
|
27582
|
-
},
|
|
27564
|
+
var VN = /* @__PURE__ */ c({
|
|
27565
|
+
Form: () => zN,
|
|
27566
|
+
presenter: () => BN
|
|
27567
|
+
}), HN = {
|
|
27568
|
+
[vd.Bike]: AM,
|
|
27569
|
+
[vd.Pet]: IM,
|
|
27570
|
+
[vd.Caravan]: UM,
|
|
27571
|
+
[vd.Travel]: YM,
|
|
27572
|
+
[vd.Liability]: $M,
|
|
27573
|
+
[vd.Housing]: iN,
|
|
27574
|
+
house: iN,
|
|
27575
|
+
[vd.LegalAssistance]: cN,
|
|
27576
|
+
[vd.Package]: fN,
|
|
27577
|
+
[vd.Loan]: bN,
|
|
27578
|
+
[vd.Moped]: TN,
|
|
27579
|
+
[vd.Motor]: kN,
|
|
27580
|
+
[vd.Car]: NN,
|
|
27581
|
+
[vd.CarBusiness]: LN,
|
|
27582
|
+
"business-car": LN,
|
|
27583
|
+
[vd.BusinessLiability]: VN
|
|
27584
|
+
}, UN = { [vd.Travel]: "/tarieven/" }, WN = (e, t, n) => `${e}#/${n}${UN[t] ?? ""}`, GN = (e) => {
|
|
27583
27585
|
window.location.href = e;
|
|
27584
|
-
},
|
|
27586
|
+
}, KN = ({ user: e, detail: t }) => new AO.User({
|
|
27585
27587
|
email: e.email || null,
|
|
27586
27588
|
name: e.firstName || null,
|
|
27587
27589
|
zip_code: e.zipCode || null,
|
|
@@ -27595,14 +27597,14 @@ var zN = /* @__PURE__ */ c({
|
|
|
27595
27597
|
...e.city && { city: e.city }
|
|
27596
27598
|
}
|
|
27597
27599
|
});
|
|
27598
|
-
function
|
|
27600
|
+
function qN(e) {
|
|
27599
27601
|
let t = /* @__PURE__ */ N(!1), n = /* @__PURE__ */ N(null);
|
|
27600
27602
|
return {
|
|
27601
27603
|
submit: async (r) => {
|
|
27602
27604
|
t.value = !0, n.value = null;
|
|
27603
27605
|
try {
|
|
27604
|
-
let t = await
|
|
27605
|
-
e.onRedirect ? e.onRedirect(n) :
|
|
27606
|
+
let t = await BO().comparisonService.create(r.comparison, KN(r)), n = WN(e.link, r.comparison, t.getId());
|
|
27607
|
+
e.onRedirect ? e.onRedirect(n) : GN(n);
|
|
27606
27608
|
} catch (t) {
|
|
27607
27609
|
n.value = t, e.onError?.(t, r);
|
|
27608
27610
|
} finally {
|
|
@@ -27615,7 +27617,7 @@ function GN(e) {
|
|
|
27615
27617
|
}
|
|
27616
27618
|
//#endregion
|
|
27617
27619
|
//#region src/flow/ComparisonFormFlow.vue
|
|
27618
|
-
var
|
|
27620
|
+
var JN = /* @__PURE__ */ L({
|
|
27619
27621
|
__name: "ComparisonFormFlow",
|
|
27620
27622
|
props: {
|
|
27621
27623
|
form: {},
|
|
@@ -27646,7 +27648,7 @@ var KN = /* @__PURE__ */ L({
|
|
|
27646
27648
|
},
|
|
27647
27649
|
emits: ["submitted", "error"],
|
|
27648
27650
|
setup(e, { emit: t }) {
|
|
27649
|
-
let n = e, r = t, i = _d(n), a = K(() =>
|
|
27651
|
+
let n = e, r = t, i = _d(n), a = K(() => HN[n.form]), { submit: o, isSubmitting: s } = qN({
|
|
27650
27652
|
link: n.link,
|
|
27651
27653
|
onRedirect: (e) => {
|
|
27652
27654
|
r("submitted", e), n.redirect ? n.redirect(e) : window.location.href = e;
|
|
@@ -27662,7 +27664,7 @@ var KN = /* @__PURE__ */ L({
|
|
|
27662
27664
|
onSubmitted: c
|
|
27663
27665
|
}), null, 16, ["initial-data", "submit-disabled"])) : W("", !0);
|
|
27664
27666
|
}
|
|
27665
|
-
}),
|
|
27667
|
+
}), YN = /* @__PURE__ */ kl(/* @__PURE__ */ L({
|
|
27666
27668
|
__name: "ComparisonFormFlow.ce",
|
|
27667
27669
|
props: {
|
|
27668
27670
|
initialData: { type: [Object, String] },
|
|
@@ -27694,24 +27696,24 @@ var KN = /* @__PURE__ */ L({
|
|
|
27694
27696
|
},
|
|
27695
27697
|
emits: ["submitted", "error"],
|
|
27696
27698
|
setup(e, { emit: t }) {
|
|
27697
|
-
let n = e, r = Yu(n, "apiUrl", "initialData"), i = t, a = K(() =>
|
|
27699
|
+
let n = e, r = Yu(n, "apiUrl", "initialData"), i = t, a = K(() => cM(n.initialData)), o = K(() => a.value.data);
|
|
27698
27700
|
I(a, ({ error: e }) => {
|
|
27699
27701
|
e && i("error", e);
|
|
27700
27702
|
}, { immediate: !0 });
|
|
27701
27703
|
let s = /* @__PURE__ */ N(!1);
|
|
27702
27704
|
return ia(async () => {
|
|
27703
27705
|
try {
|
|
27704
|
-
await
|
|
27706
|
+
await zO(n.apiUrl ?? ""), s.value = !0;
|
|
27705
27707
|
} catch (e) {
|
|
27706
27708
|
i("error", e);
|
|
27707
27709
|
}
|
|
27708
|
-
}), (e, t) => s.value ? (z(), V(
|
|
27710
|
+
}), (e, t) => s.value ? (z(), V(JN, G({ key: 0 }, P(r), {
|
|
27709
27711
|
"initial-data": o.value,
|
|
27710
27712
|
onSubmitted: t[0] ||= (e) => i("submitted", e),
|
|
27711
27713
|
onError: t[1] ||= (e, t) => i("error", e, t)
|
|
27712
27714
|
}), null, 16, ["initial-data"])) : W("", !0);
|
|
27713
27715
|
}
|
|
27714
27716
|
}), { shadowRoot: !1 });
|
|
27715
|
-
customElements.define("vd-comparison-form",
|
|
27717
|
+
customElements.define("vd-comparison-form", YN);
|
|
27716
27718
|
//#endregion
|
|
27717
|
-
export {
|
|
27719
|
+
export { YN as VdComparisonFormElement };
|