1var VuelidateValidators = (function (e, r) { 2 "use strict"; 3 function t(e) { 4 return "function" == typeof e; 5 } 6 function a(e) { 7 return null !== e && "object" == typeof e && !Array.isArray(e); 8 } 9 function n(e) { 10 return t(e.$validator) ? Object.assign({}, e) : { $validator: e }; 11 } 12 function i(e) { 13 return "object" == typeof e ? e.$valid : e; 14 } 15 function s(e) { 16 return e.$validator || e; 17 } 18 function o(e, r) { 19 if (!a(e)) throw new Error('[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ' + typeof e); 20 if (!a(r) && !t(r)) throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter"); 21 const i = n(r); 22 return (i.$params = Object.assign({}, i.$params || {}, e)), i; 23 } 24 function u(e, i) { 25 if (!t(e) && "string" != typeof r.unref(e)) throw new Error('[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ' + typeof e); 26 if (!a(i) && !t(i)) throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter"); 27 const s = n(i); 28 return (s.$message = e), s; 29 } 30 const l = (e) => { 31 if (((e = r.unref(e)), Array.isArray(e))) return !!e.length; 32 if (null == e) return !1; 33 if (!1 === e) return !0; 34 if (e instanceof Date) return !isNaN(e.getTime()); 35 if ("object" == typeof e) { 36 for (let r in e) return !0; 37 return !1; 38 } 39 return !!String(e).length; 40 }, 41 d = (e) => ((e = r.unref(e)), Array.isArray(e) ? e.length : "object" == typeof e ? Object.keys(e).length : String(e).length); 42 function $() { 43 for (var e = arguments.length, t = new Array(e), a = 0; a < e; a++) t[a] = arguments[a]; 44 return (e) => ((e = r.unref(e)), !l(e) || t.every((r) => r.test(e))); 45 } 46 var c = Object.freeze({ 47 __proto__: null, 48 withParams: o, 49 withMessage: u, 50 withAsync: function (e) { 51 let r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : []; 52 const t = n(e); 53 return Object.assign({}, t, { $async: !0, $watchTargets: r }); 54 }, 55 forEach: function (e) { 56 return { 57 $validator(t) { 58 for (var a = arguments.length, n = new Array(a > 1 ? a - 1 : 0), o = 1; o < a; o++) n[o - 1] = arguments[o]; 59 return r.unref(t).reduce( 60 (r, t, a) => { 61 const o = Object.entries(t).reduce( 62 (r, o) => { 63 let [u, l] = o; 64 const d = e[u] || {}, 65 $ = Object.entries(d).reduce( 66 (e, r) => { 67 let [o, d] = r; 68 const $ = s(d).call(this, l, t, a, ...n), 69 c = i($); 70 if (((e.$data[o] = $), (e.$data.$invalid = !c || !!e.$data.$invalid), (e.$data.$error = e.$data.$invalid), !c)) { 71 let r = d.$message || ""; 72 const t = d.$params || {}; 73 "function" == typeof r && (r = r({ $pending: !1, $invalid: !c, $params: t, $model: l, $response: $ })), 74 e.$errors.push({ $property: u, $message: r, $params: t, $response: $, $model: l, $pending: !1, $validator: o }); 75 } 76 return { $valid: e.$valid && c, $data: e.$data, $errors: e.$errors }; 77 }, 78 { $valid: !0, $data: {}, $errors: [] } 79 ); 80 return (r.$data[u] = $.$data), (r.$errors[u] = $.$errors), { $valid: r.$valid && $.$valid, $data: r.$data, $errors: r.$errors }; 81 }, 82 { $valid: !0, $data: {}, $errors: {} } 83 ); 84 return { $valid: r.$valid && o.$valid, $data: r.$data.concat(o.$data), $errors: r.$errors.concat(o.$errors) }; 85 }, 86 { $valid: !0, $data: [], $errors: [] } 87 ); 88 }, 89 $message: (e) => { 90 let { $response: r } = e; 91 return r 92 ? r.$errors.map((e) => 93 Object.values(e) 94 .map((e) => e.map((e) => e.$message)) 95 .reduce((e, r) => e.concat(r), []) 96 ) 97 : []; 98 }, 99 }; 100 }, 101 req: l, 102 len: d, 103 regex: $, 104 unwrap: r.unref, 105 unwrapNormalizedValidator: s, 106 unwrapValidatorResponse: i, 107 normalizeValidatorObject: n, 108 }), 109 f = { $validator: $(/^[a-zA-Z]*$/), $message: "The value is not alphabetical", $params: { type: "alpha" } }, 110 m = { $validator: $(/^[a-zA-Z0-9]*$/), $message: "The value must be alpha-numeric", $params: { type: "alphaNum" } }, 111 p = { $validator: $(/^\d*(\.\d+)?$/), $message: "Value must be numeric", $params: { type: "numeric" } }; 112 function v(e, t) { 113 return (a) => !l(a) || ((!/\s/.test(a) || a instanceof Date) && +r.unref(e) <= +a && +r.unref(t) >= +a); 114 } 115 var h = { 116 $validator: $( 117 /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i 118 ), 119 $message: "Value is not a valid email address", 120 $params: { type: "email" }, 121 }; 122 const g = (e) => { 123 if (e.length > 3 || 0 === e.length) return !1; 124 if ("0" === e[0] && "0" !== e) return !1; 125 if (!e.match(/^\d+$/)) return !1; 126 const r = 0 | +e; 127 return r >= 0 && r <= 255; 128 }; 129 var y = { 130 $validator: function (e) { 131 if (!l(e)) return !0; 132 if ("string" != typeof e) return !1; 133 const r = e.split("."); 134 return 4 === r.length && r.every(g); 135 }, 136 $message: "The value is not a valid IP address", 137 $params: { type: "ipAddress" }, 138 }; 139 function x() { 140 let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ":"; 141 return (t) => { 142 if (((e = r.unref(e)), !l(t))) return !0; 143 if ("string" != typeof t) return !1; 144 const a = "string" == typeof e && "" !== e ? t.split(e) : 12 === t.length || 16 === t.length ? t.match(/.{2}/g) : null; 145 return null !== a && (6 === a.length || 8 === a.length) && a.every(w); 146 }; 147 } 148 const w = (e) => e.toLowerCase().match(/^[0-9a-f]{2}$/); 149 var b = { 150 $validator: function (e) { 151 return "string" == typeof e && (e = e.trim()), l(e); 152 }, 153 $message: "Value is required", 154 $params: { type: "required" }, 155 }; 156 const A = (e, r) => !e || l("string" == typeof r ? r.trim() : r); 157 const T = (e, r) => !!e || l("string" == typeof r ? r.trim() : r); 158 function z(e) { 159 return (t) => r.unref(t) === r.unref(e); 160 } 161 var j = { 162 $validator: $(
163 /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i 164 ), 165 $message: "The value is not a valid URL address", 166 $params: { type: "url" }, 167 }; 168 function V(e, r, t) { 169 return t ? (r ? r(e) : e) : ((e && e.then) || (e = Promise.resolve(e)), r ? e.then(r) : e); 170 } 171 function P(e) { 172 return function () { 173 for (var r = arguments.length, t = new Array(r), a = 0; a < r; a++) t[a] = arguments[a]; 174 return e.reduce((e, r) => (i(e) ? e : s(r).apply(this, t)), !1); 175 }; 176 } 177 function q(e) { 178 return function () { 179 const r = this; 180 for (var t = arguments.length, a = new Array(t), n = 0; n < t; n++) a[n] = arguments[n]; 181 return e.reduce(function (e, t) { 182 return V(e, function (e) { 183 return i(e) ? e : s(t).apply(r, a); 184 }); 185 }, Promise.resolve(!1)); 186 }; 187 } 188 function O() { 189 for (var e = arguments.length, r = new Array(e), t = 0; t < e; t++) r[t] = arguments[t]; 190 const a = r.some((e) => e.$async), 191 n = r.reduce((e, r) => (r.$watchTargets ? e.concat(r.$watchTargets) : e), []); 192 let i = () => !1; 193 return r.length && (i = a ? q(r) : P(r)), { $async: a, $validator: i, $watchTargets: n }; 194 } 195 function _(e, r, t) { 196 return t ? (r ? r(e) : e) : ((e && e.then) || (e = Promise.resolve(e)), r ? e.then(r) : e); 197 } 198 function L(e) { 199 return function () { 200 for (var r = arguments.length, t = new Array(r), a = 0; a < r; a++) t[a] = arguments[a]; 201 return e.reduce((e, r) => (i(e) ? s(r).apply(this, t) : e), !0); 202 }; 203 } 204 function N(e) { 205 return function () { 206 const r = this; 207 for (var t = arguments.length, a = new Array(t), n = 0; n < t; n++) a[n] = arguments[n]; 208 return e.reduce(function (e, t) { 209 return _(e, function (e) { 210 return i(e) ? s(t).apply(r, a) : e; 211 }); 212 }, Promise.resolve(!0)); 213 }; 214 } 215 function D() { 216 for (var e = arguments.length, r = new Array(e), t = 0; t < e; t++) r[t] = arguments[t]; 217 const a = r.some((e) => e.$async), 218 n = r.reduce((e, r) => (r.$watchTargets ? e.concat(r.$watchTargets) : e), []); 219 let i = () => !1; 220 return r.length && (i = a ? N(r) : L(r)), { $async: a, $validator: i, $watchTargets: n }; 221 } 222 function E(e) { 223 return function (r, n) { 224 if (!l(r)) return !0; 225 const o = s(e).call(this, r, n); 226 return a((u = o)) && t(u.then) ? o.then((e) => !i(e)) : !i(o); 227 var u; 228 }; 229 } 230 function M(e) { 231 return (t) => !l(t) || ((!/\s/.test(t) || t instanceof Date) && +t >= +r.unref(e)); 232 } 233 function S(e) { 234 return (t) => !l(t) || ((!/\s/.test(t) || t instanceof Date) && +t <= +r.unref(e)); 235 } 236 var I = { $validator: $(/(^[0-9]*$)|(^-[0-9]+$)/), $message: "Value is not an integer", $params: { type: "integer" } }, 237 U = { $validator: $(/^[-]?\d*(\.\d+)?$/), $message: "Value must be decimal", $params: { type: "decimal" } }; 238 return ( 239 (e.alpha = f), 240 (e.alphaNum = m), 241 (e.and = function () { 242 return o({ type: "and" }, u("The value does not match all of the provided validators", D(...arguments))); 243 }), 244 (e.between = function (e, r) { 245 return { 246 $validator: v(e, r), 247 $message: (e) => { 248 let { $params: r } = e; 249 return `The value must be between ${r.min} and ${r.max}`; 250 }, 251 $params: { min: e, max: r, type: "between" }, 252 }; 253 }), 254 (e.createI18nMessage = function (e) { 255 let { 256 t: r, 257 messagePath: t = (e) => { 258 let { $validator: r }
258 = e; 259 return "validations." + r; 260 }, 261 messageParams: a = (e) => e, 262 } = e; 263 return function (e) { 264 let { withArguments: n = !1, messagePath: i = t, messageParams: s = a } = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; 265 function o(e) { 266 return r(i(e), s(Object.assign({ model: e.$model, property: e.$property, pending: e.$pending, invalid: e.$invalid, response: e.$response, validator: e.$validator, propertyPath: e.$propertyPath }, e.$params))); 267 } 268 return n && "function" == typeof e 269 ? function () { 270 return u(o, e(...arguments)); 271 } 272 : u(o, e); 273 }; 274 }), 275 (e.decimal = U), 276 (e.email = h), 277 (e.helpers = c), 278 (e.integer = I), 279 (e.ipAddress = y), 280 (e.macAddress = function (e) { 281 return { $validator: x(e), $message: "The value is not a valid MAC Address", $params: { type: "macAddress" } }; 282 }), 283 (e.maxLength = function (e) { 284 return { 285 $validator: ((t = e), (e) => !l(e) || d(e) <= r.unref(t)), 286 $message: (e) => { 287 let { $params: r } = e; 288 return "The maximum length allowed is " + r.max; 289 }, 290 $params: { max: e, type: "maxLength" }, 291 }; 292 var t; 293 }), 294 (e.maxValue = (e) => ({ 295 $validator: S(e), 296 $message: (e) => { 297 let { $params: r } = e; 298 return "The maximum value allowed is " + r.max; 299 }, 300 $params: { max: e, type: "maxValue" }, 301 })), 302 (e.minLength = function (e) { 303 return { 304 $validator: ((t = e), (e) => !l(e) || d(e) >= r.unref(t)), 305 $message: (e) => { 306 let { $params: r } = e; 307 return `This field should be at least ${r.min} characters long`; 308 }, 309 $params: { min: e, type: "minLength" }, 310 }; 311 var t; 312 }), 313 (e.minValue = function (e) { 314 return { 315 $validator: M(e), 316 $message: (e) => { 317 let { $params: r } = e; 318 return "The minimum value allowed is " + r.min; 319 }, 320 $params: { min: e, type: "minValue" }, 321 }; 322 }), 323 (e.not = function (e) { 324 return { $validator: E(e), $message: "The value does not match the provided validator", $params: { type: "not" } }; 325 }), 326 (e.numeric = p), 327 (e.or = function () { 328 return o({ type: "or" }, u("The value does not match any of the provided validators", O(...arguments))); 329 }), 330 (e.required = b), 331 (e.requiredIf = function (e) { 332 return { 333 $validator: 334 ((t = e), 335 function (e, a) { 336 if ("function" != typeof t) return A(r.unref(t), e); 337 const n = t.call(this, e, a); 338 return A(n, e); 339 }), 340 $message: "The value is required", 341 $params: { type: "requiredIf", prop: e }, 342 }; 343 var t; 344 }), 345 (e.requiredUnless = function (e) { 346 return { 347 $validator: 348 ((t = e), 349 function (e, a) { 350 if ("function" != typeof t) return T(r.unref(t), e); 351 const n = t.call(this, e, a); 352 return T(n, e); 353 }), 354 $message: "The value is required", 355 $params: { type: "requiredUnless", prop: e }, 356 }; 357 var t; 358 }), 359 (e.sameAs = function (e) { 360 let r = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "other"; 361 return { $validator: z(e), $message: (e) => `The value must be equal to the ${r} value`, $params: { equalTo: e, otherName: r, type: "sameAs" } }; 362 }), 363 (e.url = j), 364 Object.defineProperty(e, "__esModule", { value: !0 }), 365 e 366 ); 367})({}, VueDemi); 368//# sourceMappingURL=index.iife.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.