z-schema 4.1.0 → 4.2.2
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/ZSchema-browser-min.js +1 -1
- package/dist/ZSchema-browser-min.js.map +1 -1
- package/dist/ZSchema-browser-test.js +4009 -4249
- package/dist/ZSchema-browser.js +304 -1026
- package/package.json +3 -4
- package/src/JsonValidation.js +4 -2
- package/src/Utils.js +4 -6
package/dist/ZSchema-browser.js
CHANGED
|
@@ -1,897 +1,4 @@
|
|
|
1
1
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ZSchema = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
|
2
|
-
require('../modules/es6.symbol');
|
|
3
|
-
require('../modules/es6.object.to-string');
|
|
4
|
-
module.exports = require('../modules/_core').Symbol;
|
|
5
|
-
|
|
6
|
-
},{"../modules/_core":7,"../modules/es6.object.to-string":52,"../modules/es6.symbol":53}],2:[function(require,module,exports){
|
|
7
|
-
module.exports = function (it) {
|
|
8
|
-
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
|
|
9
|
-
return it;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
},{}],3:[function(require,module,exports){
|
|
13
|
-
var isObject = require('./_is-object');
|
|
14
|
-
module.exports = function (it) {
|
|
15
|
-
if (!isObject(it)) throw TypeError(it + ' is not an object!');
|
|
16
|
-
return it;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
},{"./_is-object":24}],4:[function(require,module,exports){
|
|
20
|
-
// false -> Array#indexOf
|
|
21
|
-
// true -> Array#includes
|
|
22
|
-
var toIObject = require('./_to-iobject');
|
|
23
|
-
var toLength = require('./_to-length');
|
|
24
|
-
var toAbsoluteIndex = require('./_to-absolute-index');
|
|
25
|
-
module.exports = function (IS_INCLUDES) {
|
|
26
|
-
return function ($this, el, fromIndex) {
|
|
27
|
-
var O = toIObject($this);
|
|
28
|
-
var length = toLength(O.length);
|
|
29
|
-
var index = toAbsoluteIndex(fromIndex, length);
|
|
30
|
-
var value;
|
|
31
|
-
// Array#includes uses SameValueZero equality algorithm
|
|
32
|
-
// eslint-disable-next-line no-self-compare
|
|
33
|
-
if (IS_INCLUDES && el != el) while (length > index) {
|
|
34
|
-
value = O[index++];
|
|
35
|
-
// eslint-disable-next-line no-self-compare
|
|
36
|
-
if (value != value) return true;
|
|
37
|
-
// Array#indexOf ignores holes, Array#includes - not
|
|
38
|
-
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
|
39
|
-
if (O[index] === el) return IS_INCLUDES || index || 0;
|
|
40
|
-
} return !IS_INCLUDES && -1;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
},{"./_to-absolute-index":42,"./_to-iobject":44,"./_to-length":45}],5:[function(require,module,exports){
|
|
45
|
-
// getting tag from 19.1.3.6 Object.prototype.toString()
|
|
46
|
-
var cof = require('./_cof');
|
|
47
|
-
var TAG = require('./_wks')('toStringTag');
|
|
48
|
-
// ES3 wrong here
|
|
49
|
-
var ARG = cof(function () { return arguments; }()) == 'Arguments';
|
|
50
|
-
|
|
51
|
-
// fallback for IE11 Script Access Denied error
|
|
52
|
-
var tryGet = function (it, key) {
|
|
53
|
-
try {
|
|
54
|
-
return it[key];
|
|
55
|
-
} catch (e) { /* empty */ }
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
module.exports = function (it) {
|
|
59
|
-
var O, T, B;
|
|
60
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
61
|
-
// @@toStringTag case
|
|
62
|
-
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
|
|
63
|
-
// builtinTag case
|
|
64
|
-
: ARG ? cof(O)
|
|
65
|
-
// ES3 arguments fallback
|
|
66
|
-
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
},{"./_cof":6,"./_wks":51}],6:[function(require,module,exports){
|
|
70
|
-
var toString = {}.toString;
|
|
71
|
-
|
|
72
|
-
module.exports = function (it) {
|
|
73
|
-
return toString.call(it).slice(8, -1);
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
},{}],7:[function(require,module,exports){
|
|
77
|
-
var core = module.exports = { version: '2.6.9' };
|
|
78
|
-
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
|
79
|
-
|
|
80
|
-
},{}],8:[function(require,module,exports){
|
|
81
|
-
// optional / simple context binding
|
|
82
|
-
var aFunction = require('./_a-function');
|
|
83
|
-
module.exports = function (fn, that, length) {
|
|
84
|
-
aFunction(fn);
|
|
85
|
-
if (that === undefined) return fn;
|
|
86
|
-
switch (length) {
|
|
87
|
-
case 1: return function (a) {
|
|
88
|
-
return fn.call(that, a);
|
|
89
|
-
};
|
|
90
|
-
case 2: return function (a, b) {
|
|
91
|
-
return fn.call(that, a, b);
|
|
92
|
-
};
|
|
93
|
-
case 3: return function (a, b, c) {
|
|
94
|
-
return fn.call(that, a, b, c);
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
return function (/* ...args */) {
|
|
98
|
-
return fn.apply(that, arguments);
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
},{"./_a-function":2}],9:[function(require,module,exports){
|
|
103
|
-
// 7.2.1 RequireObjectCoercible(argument)
|
|
104
|
-
module.exports = function (it) {
|
|
105
|
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
106
|
-
return it;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
},{}],10:[function(require,module,exports){
|
|
110
|
-
// Thank's IE8 for his funny defineProperty
|
|
111
|
-
module.exports = !require('./_fails')(function () {
|
|
112
|
-
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
},{"./_fails":15}],11:[function(require,module,exports){
|
|
116
|
-
var isObject = require('./_is-object');
|
|
117
|
-
var document = require('./_global').document;
|
|
118
|
-
// typeof document.createElement is 'object' in old IE
|
|
119
|
-
var is = isObject(document) && isObject(document.createElement);
|
|
120
|
-
module.exports = function (it) {
|
|
121
|
-
return is ? document.createElement(it) : {};
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
},{"./_global":17,"./_is-object":24}],12:[function(require,module,exports){
|
|
125
|
-
// IE 8- don't enum bug keys
|
|
126
|
-
module.exports = (
|
|
127
|
-
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
|
128
|
-
).split(',');
|
|
129
|
-
|
|
130
|
-
},{}],13:[function(require,module,exports){
|
|
131
|
-
// all enumerable object keys, includes symbols
|
|
132
|
-
var getKeys = require('./_object-keys');
|
|
133
|
-
var gOPS = require('./_object-gops');
|
|
134
|
-
var pIE = require('./_object-pie');
|
|
135
|
-
module.exports = function (it) {
|
|
136
|
-
var result = getKeys(it);
|
|
137
|
-
var getSymbols = gOPS.f;
|
|
138
|
-
if (getSymbols) {
|
|
139
|
-
var symbols = getSymbols(it);
|
|
140
|
-
var isEnum = pIE.f;
|
|
141
|
-
var i = 0;
|
|
142
|
-
var key;
|
|
143
|
-
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
|
|
144
|
-
} return result;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
},{"./_object-gops":33,"./_object-keys":35,"./_object-pie":36}],14:[function(require,module,exports){
|
|
148
|
-
var global = require('./_global');
|
|
149
|
-
var core = require('./_core');
|
|
150
|
-
var hide = require('./_hide');
|
|
151
|
-
var redefine = require('./_redefine');
|
|
152
|
-
var ctx = require('./_ctx');
|
|
153
|
-
var PROTOTYPE = 'prototype';
|
|
154
|
-
|
|
155
|
-
var $export = function (type, name, source) {
|
|
156
|
-
var IS_FORCED = type & $export.F;
|
|
157
|
-
var IS_GLOBAL = type & $export.G;
|
|
158
|
-
var IS_STATIC = type & $export.S;
|
|
159
|
-
var IS_PROTO = type & $export.P;
|
|
160
|
-
var IS_BIND = type & $export.B;
|
|
161
|
-
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
|
|
162
|
-
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
|
163
|
-
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
|
|
164
|
-
var key, own, out, exp;
|
|
165
|
-
if (IS_GLOBAL) source = name;
|
|
166
|
-
for (key in source) {
|
|
167
|
-
// contains in native
|
|
168
|
-
own = !IS_FORCED && target && target[key] !== undefined;
|
|
169
|
-
// export native or passed
|
|
170
|
-
out = (own ? target : source)[key];
|
|
171
|
-
// bind timers to global for call from export context
|
|
172
|
-
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
|
173
|
-
// extend global
|
|
174
|
-
if (target) redefine(target, key, out, type & $export.U);
|
|
175
|
-
// export
|
|
176
|
-
if (exports[key] != out) hide(exports, key, exp);
|
|
177
|
-
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
global.core = core;
|
|
181
|
-
// type bitmap
|
|
182
|
-
$export.F = 1; // forced
|
|
183
|
-
$export.G = 2; // global
|
|
184
|
-
$export.S = 4; // static
|
|
185
|
-
$export.P = 8; // proto
|
|
186
|
-
$export.B = 16; // bind
|
|
187
|
-
$export.W = 32; // wrap
|
|
188
|
-
$export.U = 64; // safe
|
|
189
|
-
$export.R = 128; // real proto method for `library`
|
|
190
|
-
module.exports = $export;
|
|
191
|
-
|
|
192
|
-
},{"./_core":7,"./_ctx":8,"./_global":17,"./_hide":19,"./_redefine":38}],15:[function(require,module,exports){
|
|
193
|
-
module.exports = function (exec) {
|
|
194
|
-
try {
|
|
195
|
-
return !!exec();
|
|
196
|
-
} catch (e) {
|
|
197
|
-
return true;
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
},{}],16:[function(require,module,exports){
|
|
202
|
-
module.exports = require('./_shared')('native-function-to-string', Function.toString);
|
|
203
|
-
|
|
204
|
-
},{"./_shared":41}],17:[function(require,module,exports){
|
|
205
|
-
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
206
|
-
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
|
207
|
-
? window : typeof self != 'undefined' && self.Math == Math ? self
|
|
208
|
-
// eslint-disable-next-line no-new-func
|
|
209
|
-
: Function('return this')();
|
|
210
|
-
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
|
211
|
-
|
|
212
|
-
},{}],18:[function(require,module,exports){
|
|
213
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
214
|
-
module.exports = function (it, key) {
|
|
215
|
-
return hasOwnProperty.call(it, key);
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
},{}],19:[function(require,module,exports){
|
|
219
|
-
var dP = require('./_object-dp');
|
|
220
|
-
var createDesc = require('./_property-desc');
|
|
221
|
-
module.exports = require('./_descriptors') ? function (object, key, value) {
|
|
222
|
-
return dP.f(object, key, createDesc(1, value));
|
|
223
|
-
} : function (object, key, value) {
|
|
224
|
-
object[key] = value;
|
|
225
|
-
return object;
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
},{"./_descriptors":10,"./_object-dp":28,"./_property-desc":37}],20:[function(require,module,exports){
|
|
229
|
-
var document = require('./_global').document;
|
|
230
|
-
module.exports = document && document.documentElement;
|
|
231
|
-
|
|
232
|
-
},{"./_global":17}],21:[function(require,module,exports){
|
|
233
|
-
module.exports = !require('./_descriptors') && !require('./_fails')(function () {
|
|
234
|
-
return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
},{"./_descriptors":10,"./_dom-create":11,"./_fails":15}],22:[function(require,module,exports){
|
|
238
|
-
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
239
|
-
var cof = require('./_cof');
|
|
240
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
241
|
-
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
242
|
-
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
243
|
-
};
|
|
244
|
-
|
|
245
|
-
},{"./_cof":6}],23:[function(require,module,exports){
|
|
246
|
-
// 7.2.2 IsArray(argument)
|
|
247
|
-
var cof = require('./_cof');
|
|
248
|
-
module.exports = Array.isArray || function isArray(arg) {
|
|
249
|
-
return cof(arg) == 'Array';
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
},{"./_cof":6}],24:[function(require,module,exports){
|
|
253
|
-
module.exports = function (it) {
|
|
254
|
-
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
},{}],25:[function(require,module,exports){
|
|
258
|
-
module.exports = false;
|
|
259
|
-
|
|
260
|
-
},{}],26:[function(require,module,exports){
|
|
261
|
-
var META = require('./_uid')('meta');
|
|
262
|
-
var isObject = require('./_is-object');
|
|
263
|
-
var has = require('./_has');
|
|
264
|
-
var setDesc = require('./_object-dp').f;
|
|
265
|
-
var id = 0;
|
|
266
|
-
var isExtensible = Object.isExtensible || function () {
|
|
267
|
-
return true;
|
|
268
|
-
};
|
|
269
|
-
var FREEZE = !require('./_fails')(function () {
|
|
270
|
-
return isExtensible(Object.preventExtensions({}));
|
|
271
|
-
});
|
|
272
|
-
var setMeta = function (it) {
|
|
273
|
-
setDesc(it, META, { value: {
|
|
274
|
-
i: 'O' + ++id, // object ID
|
|
275
|
-
w: {} // weak collections IDs
|
|
276
|
-
} });
|
|
277
|
-
};
|
|
278
|
-
var fastKey = function (it, create) {
|
|
279
|
-
// return primitive with prefix
|
|
280
|
-
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
|
281
|
-
if (!has(it, META)) {
|
|
282
|
-
// can't set metadata to uncaught frozen object
|
|
283
|
-
if (!isExtensible(it)) return 'F';
|
|
284
|
-
// not necessary to add metadata
|
|
285
|
-
if (!create) return 'E';
|
|
286
|
-
// add missing metadata
|
|
287
|
-
setMeta(it);
|
|
288
|
-
// return object ID
|
|
289
|
-
} return it[META].i;
|
|
290
|
-
};
|
|
291
|
-
var getWeak = function (it, create) {
|
|
292
|
-
if (!has(it, META)) {
|
|
293
|
-
// can't set metadata to uncaught frozen object
|
|
294
|
-
if (!isExtensible(it)) return true;
|
|
295
|
-
// not necessary to add metadata
|
|
296
|
-
if (!create) return false;
|
|
297
|
-
// add missing metadata
|
|
298
|
-
setMeta(it);
|
|
299
|
-
// return hash weak collections IDs
|
|
300
|
-
} return it[META].w;
|
|
301
|
-
};
|
|
302
|
-
// add metadata on freeze-family methods calling
|
|
303
|
-
var onFreeze = function (it) {
|
|
304
|
-
if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
|
|
305
|
-
return it;
|
|
306
|
-
};
|
|
307
|
-
var meta = module.exports = {
|
|
308
|
-
KEY: META,
|
|
309
|
-
NEED: false,
|
|
310
|
-
fastKey: fastKey,
|
|
311
|
-
getWeak: getWeak,
|
|
312
|
-
onFreeze: onFreeze
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
},{"./_fails":15,"./_has":18,"./_is-object":24,"./_object-dp":28,"./_uid":48}],27:[function(require,module,exports){
|
|
316
|
-
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
317
|
-
var anObject = require('./_an-object');
|
|
318
|
-
var dPs = require('./_object-dps');
|
|
319
|
-
var enumBugKeys = require('./_enum-bug-keys');
|
|
320
|
-
var IE_PROTO = require('./_shared-key')('IE_PROTO');
|
|
321
|
-
var Empty = function () { /* empty */ };
|
|
322
|
-
var PROTOTYPE = 'prototype';
|
|
323
|
-
|
|
324
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
325
|
-
var createDict = function () {
|
|
326
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
327
|
-
var iframe = require('./_dom-create')('iframe');
|
|
328
|
-
var i = enumBugKeys.length;
|
|
329
|
-
var lt = '<';
|
|
330
|
-
var gt = '>';
|
|
331
|
-
var iframeDocument;
|
|
332
|
-
iframe.style.display = 'none';
|
|
333
|
-
require('./_html').appendChild(iframe);
|
|
334
|
-
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
335
|
-
// createDict = iframe.contentWindow.Object;
|
|
336
|
-
// html.removeChild(iframe);
|
|
337
|
-
iframeDocument = iframe.contentWindow.document;
|
|
338
|
-
iframeDocument.open();
|
|
339
|
-
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
340
|
-
iframeDocument.close();
|
|
341
|
-
createDict = iframeDocument.F;
|
|
342
|
-
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
343
|
-
return createDict();
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
module.exports = Object.create || function create(O, Properties) {
|
|
347
|
-
var result;
|
|
348
|
-
if (O !== null) {
|
|
349
|
-
Empty[PROTOTYPE] = anObject(O);
|
|
350
|
-
result = new Empty();
|
|
351
|
-
Empty[PROTOTYPE] = null;
|
|
352
|
-
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
353
|
-
result[IE_PROTO] = O;
|
|
354
|
-
} else result = createDict();
|
|
355
|
-
return Properties === undefined ? result : dPs(result, Properties);
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
},{"./_an-object":3,"./_dom-create":11,"./_enum-bug-keys":12,"./_html":20,"./_object-dps":29,"./_shared-key":40}],28:[function(require,module,exports){
|
|
359
|
-
var anObject = require('./_an-object');
|
|
360
|
-
var IE8_DOM_DEFINE = require('./_ie8-dom-define');
|
|
361
|
-
var toPrimitive = require('./_to-primitive');
|
|
362
|
-
var dP = Object.defineProperty;
|
|
363
|
-
|
|
364
|
-
exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
|
365
|
-
anObject(O);
|
|
366
|
-
P = toPrimitive(P, true);
|
|
367
|
-
anObject(Attributes);
|
|
368
|
-
if (IE8_DOM_DEFINE) try {
|
|
369
|
-
return dP(O, P, Attributes);
|
|
370
|
-
} catch (e) { /* empty */ }
|
|
371
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
|
372
|
-
if ('value' in Attributes) O[P] = Attributes.value;
|
|
373
|
-
return O;
|
|
374
|
-
};
|
|
375
|
-
|
|
376
|
-
},{"./_an-object":3,"./_descriptors":10,"./_ie8-dom-define":21,"./_to-primitive":47}],29:[function(require,module,exports){
|
|
377
|
-
var dP = require('./_object-dp');
|
|
378
|
-
var anObject = require('./_an-object');
|
|
379
|
-
var getKeys = require('./_object-keys');
|
|
380
|
-
|
|
381
|
-
module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
382
|
-
anObject(O);
|
|
383
|
-
var keys = getKeys(Properties);
|
|
384
|
-
var length = keys.length;
|
|
385
|
-
var i = 0;
|
|
386
|
-
var P;
|
|
387
|
-
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
|
388
|
-
return O;
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
},{"./_an-object":3,"./_descriptors":10,"./_object-dp":28,"./_object-keys":35}],30:[function(require,module,exports){
|
|
392
|
-
var pIE = require('./_object-pie');
|
|
393
|
-
var createDesc = require('./_property-desc');
|
|
394
|
-
var toIObject = require('./_to-iobject');
|
|
395
|
-
var toPrimitive = require('./_to-primitive');
|
|
396
|
-
var has = require('./_has');
|
|
397
|
-
var IE8_DOM_DEFINE = require('./_ie8-dom-define');
|
|
398
|
-
var gOPD = Object.getOwnPropertyDescriptor;
|
|
399
|
-
|
|
400
|
-
exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {
|
|
401
|
-
O = toIObject(O);
|
|
402
|
-
P = toPrimitive(P, true);
|
|
403
|
-
if (IE8_DOM_DEFINE) try {
|
|
404
|
-
return gOPD(O, P);
|
|
405
|
-
} catch (e) { /* empty */ }
|
|
406
|
-
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
},{"./_descriptors":10,"./_has":18,"./_ie8-dom-define":21,"./_object-pie":36,"./_property-desc":37,"./_to-iobject":44,"./_to-primitive":47}],31:[function(require,module,exports){
|
|
410
|
-
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
411
|
-
var toIObject = require('./_to-iobject');
|
|
412
|
-
var gOPN = require('./_object-gopn').f;
|
|
413
|
-
var toString = {}.toString;
|
|
414
|
-
|
|
415
|
-
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
416
|
-
? Object.getOwnPropertyNames(window) : [];
|
|
417
|
-
|
|
418
|
-
var getWindowNames = function (it) {
|
|
419
|
-
try {
|
|
420
|
-
return gOPN(it);
|
|
421
|
-
} catch (e) {
|
|
422
|
-
return windowNames.slice();
|
|
423
|
-
}
|
|
424
|
-
};
|
|
425
|
-
|
|
426
|
-
module.exports.f = function getOwnPropertyNames(it) {
|
|
427
|
-
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
},{"./_object-gopn":32,"./_to-iobject":44}],32:[function(require,module,exports){
|
|
431
|
-
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
|
|
432
|
-
var $keys = require('./_object-keys-internal');
|
|
433
|
-
var hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');
|
|
434
|
-
|
|
435
|
-
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
436
|
-
return $keys(O, hiddenKeys);
|
|
437
|
-
};
|
|
438
|
-
|
|
439
|
-
},{"./_enum-bug-keys":12,"./_object-keys-internal":34}],33:[function(require,module,exports){
|
|
440
|
-
exports.f = Object.getOwnPropertySymbols;
|
|
441
|
-
|
|
442
|
-
},{}],34:[function(require,module,exports){
|
|
443
|
-
var has = require('./_has');
|
|
444
|
-
var toIObject = require('./_to-iobject');
|
|
445
|
-
var arrayIndexOf = require('./_array-includes')(false);
|
|
446
|
-
var IE_PROTO = require('./_shared-key')('IE_PROTO');
|
|
447
|
-
|
|
448
|
-
module.exports = function (object, names) {
|
|
449
|
-
var O = toIObject(object);
|
|
450
|
-
var i = 0;
|
|
451
|
-
var result = [];
|
|
452
|
-
var key;
|
|
453
|
-
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
|
454
|
-
// Don't enum bug & hidden keys
|
|
455
|
-
while (names.length > i) if (has(O, key = names[i++])) {
|
|
456
|
-
~arrayIndexOf(result, key) || result.push(key);
|
|
457
|
-
}
|
|
458
|
-
return result;
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
},{"./_array-includes":4,"./_has":18,"./_shared-key":40,"./_to-iobject":44}],35:[function(require,module,exports){
|
|
462
|
-
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
463
|
-
var $keys = require('./_object-keys-internal');
|
|
464
|
-
var enumBugKeys = require('./_enum-bug-keys');
|
|
465
|
-
|
|
466
|
-
module.exports = Object.keys || function keys(O) {
|
|
467
|
-
return $keys(O, enumBugKeys);
|
|
468
|
-
};
|
|
469
|
-
|
|
470
|
-
},{"./_enum-bug-keys":12,"./_object-keys-internal":34}],36:[function(require,module,exports){
|
|
471
|
-
exports.f = {}.propertyIsEnumerable;
|
|
472
|
-
|
|
473
|
-
},{}],37:[function(require,module,exports){
|
|
474
|
-
module.exports = function (bitmap, value) {
|
|
475
|
-
return {
|
|
476
|
-
enumerable: !(bitmap & 1),
|
|
477
|
-
configurable: !(bitmap & 2),
|
|
478
|
-
writable: !(bitmap & 4),
|
|
479
|
-
value: value
|
|
480
|
-
};
|
|
481
|
-
};
|
|
482
|
-
|
|
483
|
-
},{}],38:[function(require,module,exports){
|
|
484
|
-
var global = require('./_global');
|
|
485
|
-
var hide = require('./_hide');
|
|
486
|
-
var has = require('./_has');
|
|
487
|
-
var SRC = require('./_uid')('src');
|
|
488
|
-
var $toString = require('./_function-to-string');
|
|
489
|
-
var TO_STRING = 'toString';
|
|
490
|
-
var TPL = ('' + $toString).split(TO_STRING);
|
|
491
|
-
|
|
492
|
-
require('./_core').inspectSource = function (it) {
|
|
493
|
-
return $toString.call(it);
|
|
494
|
-
};
|
|
495
|
-
|
|
496
|
-
(module.exports = function (O, key, val, safe) {
|
|
497
|
-
var isFunction = typeof val == 'function';
|
|
498
|
-
if (isFunction) has(val, 'name') || hide(val, 'name', key);
|
|
499
|
-
if (O[key] === val) return;
|
|
500
|
-
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
|
|
501
|
-
if (O === global) {
|
|
502
|
-
O[key] = val;
|
|
503
|
-
} else if (!safe) {
|
|
504
|
-
delete O[key];
|
|
505
|
-
hide(O, key, val);
|
|
506
|
-
} else if (O[key]) {
|
|
507
|
-
O[key] = val;
|
|
508
|
-
} else {
|
|
509
|
-
hide(O, key, val);
|
|
510
|
-
}
|
|
511
|
-
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
512
|
-
})(Function.prototype, TO_STRING, function toString() {
|
|
513
|
-
return typeof this == 'function' && this[SRC] || $toString.call(this);
|
|
514
|
-
});
|
|
515
|
-
|
|
516
|
-
},{"./_core":7,"./_function-to-string":16,"./_global":17,"./_has":18,"./_hide":19,"./_uid":48}],39:[function(require,module,exports){
|
|
517
|
-
var def = require('./_object-dp').f;
|
|
518
|
-
var has = require('./_has');
|
|
519
|
-
var TAG = require('./_wks')('toStringTag');
|
|
520
|
-
|
|
521
|
-
module.exports = function (it, tag, stat) {
|
|
522
|
-
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
},{"./_has":18,"./_object-dp":28,"./_wks":51}],40:[function(require,module,exports){
|
|
526
|
-
var shared = require('./_shared')('keys');
|
|
527
|
-
var uid = require('./_uid');
|
|
528
|
-
module.exports = function (key) {
|
|
529
|
-
return shared[key] || (shared[key] = uid(key));
|
|
530
|
-
};
|
|
531
|
-
|
|
532
|
-
},{"./_shared":41,"./_uid":48}],41:[function(require,module,exports){
|
|
533
|
-
var core = require('./_core');
|
|
534
|
-
var global = require('./_global');
|
|
535
|
-
var SHARED = '__core-js_shared__';
|
|
536
|
-
var store = global[SHARED] || (global[SHARED] = {});
|
|
537
|
-
|
|
538
|
-
(module.exports = function (key, value) {
|
|
539
|
-
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
540
|
-
})('versions', []).push({
|
|
541
|
-
version: core.version,
|
|
542
|
-
mode: require('./_library') ? 'pure' : 'global',
|
|
543
|
-
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
|
544
|
-
});
|
|
545
|
-
|
|
546
|
-
},{"./_core":7,"./_global":17,"./_library":25}],42:[function(require,module,exports){
|
|
547
|
-
var toInteger = require('./_to-integer');
|
|
548
|
-
var max = Math.max;
|
|
549
|
-
var min = Math.min;
|
|
550
|
-
module.exports = function (index, length) {
|
|
551
|
-
index = toInteger(index);
|
|
552
|
-
return index < 0 ? max(index + length, 0) : min(index, length);
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
},{"./_to-integer":43}],43:[function(require,module,exports){
|
|
556
|
-
// 7.1.4 ToInteger
|
|
557
|
-
var ceil = Math.ceil;
|
|
558
|
-
var floor = Math.floor;
|
|
559
|
-
module.exports = function (it) {
|
|
560
|
-
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
|
561
|
-
};
|
|
562
|
-
|
|
563
|
-
},{}],44:[function(require,module,exports){
|
|
564
|
-
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
565
|
-
var IObject = require('./_iobject');
|
|
566
|
-
var defined = require('./_defined');
|
|
567
|
-
module.exports = function (it) {
|
|
568
|
-
return IObject(defined(it));
|
|
569
|
-
};
|
|
570
|
-
|
|
571
|
-
},{"./_defined":9,"./_iobject":22}],45:[function(require,module,exports){
|
|
572
|
-
// 7.1.15 ToLength
|
|
573
|
-
var toInteger = require('./_to-integer');
|
|
574
|
-
var min = Math.min;
|
|
575
|
-
module.exports = function (it) {
|
|
576
|
-
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
|
577
|
-
};
|
|
578
|
-
|
|
579
|
-
},{"./_to-integer":43}],46:[function(require,module,exports){
|
|
580
|
-
// 7.1.13 ToObject(argument)
|
|
581
|
-
var defined = require('./_defined');
|
|
582
|
-
module.exports = function (it) {
|
|
583
|
-
return Object(defined(it));
|
|
584
|
-
};
|
|
585
|
-
|
|
586
|
-
},{"./_defined":9}],47:[function(require,module,exports){
|
|
587
|
-
// 7.1.1 ToPrimitive(input [, PreferredType])
|
|
588
|
-
var isObject = require('./_is-object');
|
|
589
|
-
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
590
|
-
// and the second argument - flag - preferred type is a string
|
|
591
|
-
module.exports = function (it, S) {
|
|
592
|
-
if (!isObject(it)) return it;
|
|
593
|
-
var fn, val;
|
|
594
|
-
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
595
|
-
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
596
|
-
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
597
|
-
throw TypeError("Can't convert object to primitive value");
|
|
598
|
-
};
|
|
599
|
-
|
|
600
|
-
},{"./_is-object":24}],48:[function(require,module,exports){
|
|
601
|
-
var id = 0;
|
|
602
|
-
var px = Math.random();
|
|
603
|
-
module.exports = function (key) {
|
|
604
|
-
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
|
605
|
-
};
|
|
606
|
-
|
|
607
|
-
},{}],49:[function(require,module,exports){
|
|
608
|
-
var global = require('./_global');
|
|
609
|
-
var core = require('./_core');
|
|
610
|
-
var LIBRARY = require('./_library');
|
|
611
|
-
var wksExt = require('./_wks-ext');
|
|
612
|
-
var defineProperty = require('./_object-dp').f;
|
|
613
|
-
module.exports = function (name) {
|
|
614
|
-
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
|
|
615
|
-
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
|
|
616
|
-
};
|
|
617
|
-
|
|
618
|
-
},{"./_core":7,"./_global":17,"./_library":25,"./_object-dp":28,"./_wks-ext":50}],50:[function(require,module,exports){
|
|
619
|
-
exports.f = require('./_wks');
|
|
620
|
-
|
|
621
|
-
},{"./_wks":51}],51:[function(require,module,exports){
|
|
622
|
-
var store = require('./_shared')('wks');
|
|
623
|
-
var uid = require('./_uid');
|
|
624
|
-
var Symbol = require('./_global').Symbol;
|
|
625
|
-
var USE_SYMBOL = typeof Symbol == 'function';
|
|
626
|
-
|
|
627
|
-
var $exports = module.exports = function (name) {
|
|
628
|
-
return store[name] || (store[name] =
|
|
629
|
-
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
|
630
|
-
};
|
|
631
|
-
|
|
632
|
-
$exports.store = store;
|
|
633
|
-
|
|
634
|
-
},{"./_global":17,"./_shared":41,"./_uid":48}],52:[function(require,module,exports){
|
|
635
|
-
'use strict';
|
|
636
|
-
// 19.1.3.6 Object.prototype.toString()
|
|
637
|
-
var classof = require('./_classof');
|
|
638
|
-
var test = {};
|
|
639
|
-
test[require('./_wks')('toStringTag')] = 'z';
|
|
640
|
-
if (test + '' != '[object z]') {
|
|
641
|
-
require('./_redefine')(Object.prototype, 'toString', function toString() {
|
|
642
|
-
return '[object ' + classof(this) + ']';
|
|
643
|
-
}, true);
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
},{"./_classof":5,"./_redefine":38,"./_wks":51}],53:[function(require,module,exports){
|
|
647
|
-
'use strict';
|
|
648
|
-
// ECMAScript 6 symbols shim
|
|
649
|
-
var global = require('./_global');
|
|
650
|
-
var has = require('./_has');
|
|
651
|
-
var DESCRIPTORS = require('./_descriptors');
|
|
652
|
-
var $export = require('./_export');
|
|
653
|
-
var redefine = require('./_redefine');
|
|
654
|
-
var META = require('./_meta').KEY;
|
|
655
|
-
var $fails = require('./_fails');
|
|
656
|
-
var shared = require('./_shared');
|
|
657
|
-
var setToStringTag = require('./_set-to-string-tag');
|
|
658
|
-
var uid = require('./_uid');
|
|
659
|
-
var wks = require('./_wks');
|
|
660
|
-
var wksExt = require('./_wks-ext');
|
|
661
|
-
var wksDefine = require('./_wks-define');
|
|
662
|
-
var enumKeys = require('./_enum-keys');
|
|
663
|
-
var isArray = require('./_is-array');
|
|
664
|
-
var anObject = require('./_an-object');
|
|
665
|
-
var isObject = require('./_is-object');
|
|
666
|
-
var toObject = require('./_to-object');
|
|
667
|
-
var toIObject = require('./_to-iobject');
|
|
668
|
-
var toPrimitive = require('./_to-primitive');
|
|
669
|
-
var createDesc = require('./_property-desc');
|
|
670
|
-
var _create = require('./_object-create');
|
|
671
|
-
var gOPNExt = require('./_object-gopn-ext');
|
|
672
|
-
var $GOPD = require('./_object-gopd');
|
|
673
|
-
var $GOPS = require('./_object-gops');
|
|
674
|
-
var $DP = require('./_object-dp');
|
|
675
|
-
var $keys = require('./_object-keys');
|
|
676
|
-
var gOPD = $GOPD.f;
|
|
677
|
-
var dP = $DP.f;
|
|
678
|
-
var gOPN = gOPNExt.f;
|
|
679
|
-
var $Symbol = global.Symbol;
|
|
680
|
-
var $JSON = global.JSON;
|
|
681
|
-
var _stringify = $JSON && $JSON.stringify;
|
|
682
|
-
var PROTOTYPE = 'prototype';
|
|
683
|
-
var HIDDEN = wks('_hidden');
|
|
684
|
-
var TO_PRIMITIVE = wks('toPrimitive');
|
|
685
|
-
var isEnum = {}.propertyIsEnumerable;
|
|
686
|
-
var SymbolRegistry = shared('symbol-registry');
|
|
687
|
-
var AllSymbols = shared('symbols');
|
|
688
|
-
var OPSymbols = shared('op-symbols');
|
|
689
|
-
var ObjectProto = Object[PROTOTYPE];
|
|
690
|
-
var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
|
|
691
|
-
var QObject = global.QObject;
|
|
692
|
-
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
|
693
|
-
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
|
694
|
-
|
|
695
|
-
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
|
696
|
-
var setSymbolDesc = DESCRIPTORS && $fails(function () {
|
|
697
|
-
return _create(dP({}, 'a', {
|
|
698
|
-
get: function () { return dP(this, 'a', { value: 7 }).a; }
|
|
699
|
-
})).a != 7;
|
|
700
|
-
}) ? function (it, key, D) {
|
|
701
|
-
var protoDesc = gOPD(ObjectProto, key);
|
|
702
|
-
if (protoDesc) delete ObjectProto[key];
|
|
703
|
-
dP(it, key, D);
|
|
704
|
-
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
|
|
705
|
-
} : dP;
|
|
706
|
-
|
|
707
|
-
var wrap = function (tag) {
|
|
708
|
-
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
|
|
709
|
-
sym._k = tag;
|
|
710
|
-
return sym;
|
|
711
|
-
};
|
|
712
|
-
|
|
713
|
-
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
|
|
714
|
-
return typeof it == 'symbol';
|
|
715
|
-
} : function (it) {
|
|
716
|
-
return it instanceof $Symbol;
|
|
717
|
-
};
|
|
718
|
-
|
|
719
|
-
var $defineProperty = function defineProperty(it, key, D) {
|
|
720
|
-
if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
|
|
721
|
-
anObject(it);
|
|
722
|
-
key = toPrimitive(key, true);
|
|
723
|
-
anObject(D);
|
|
724
|
-
if (has(AllSymbols, key)) {
|
|
725
|
-
if (!D.enumerable) {
|
|
726
|
-
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
|
|
727
|
-
it[HIDDEN][key] = true;
|
|
728
|
-
} else {
|
|
729
|
-
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
|
|
730
|
-
D = _create(D, { enumerable: createDesc(0, false) });
|
|
731
|
-
} return setSymbolDesc(it, key, D);
|
|
732
|
-
} return dP(it, key, D);
|
|
733
|
-
};
|
|
734
|
-
var $defineProperties = function defineProperties(it, P) {
|
|
735
|
-
anObject(it);
|
|
736
|
-
var keys = enumKeys(P = toIObject(P));
|
|
737
|
-
var i = 0;
|
|
738
|
-
var l = keys.length;
|
|
739
|
-
var key;
|
|
740
|
-
while (l > i) $defineProperty(it, key = keys[i++], P[key]);
|
|
741
|
-
return it;
|
|
742
|
-
};
|
|
743
|
-
var $create = function create(it, P) {
|
|
744
|
-
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
|
|
745
|
-
};
|
|
746
|
-
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
|
|
747
|
-
var E = isEnum.call(this, key = toPrimitive(key, true));
|
|
748
|
-
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
|
|
749
|
-
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
|
|
750
|
-
};
|
|
751
|
-
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
|
|
752
|
-
it = toIObject(it);
|
|
753
|
-
key = toPrimitive(key, true);
|
|
754
|
-
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
|
|
755
|
-
var D = gOPD(it, key);
|
|
756
|
-
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
|
|
757
|
-
return D;
|
|
758
|
-
};
|
|
759
|
-
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
|
|
760
|
-
var names = gOPN(toIObject(it));
|
|
761
|
-
var result = [];
|
|
762
|
-
var i = 0;
|
|
763
|
-
var key;
|
|
764
|
-
while (names.length > i) {
|
|
765
|
-
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
|
|
766
|
-
} return result;
|
|
767
|
-
};
|
|
768
|
-
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
|
|
769
|
-
var IS_OP = it === ObjectProto;
|
|
770
|
-
var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
|
|
771
|
-
var result = [];
|
|
772
|
-
var i = 0;
|
|
773
|
-
var key;
|
|
774
|
-
while (names.length > i) {
|
|
775
|
-
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
|
|
776
|
-
} return result;
|
|
777
|
-
};
|
|
778
|
-
|
|
779
|
-
// 19.4.1.1 Symbol([description])
|
|
780
|
-
if (!USE_NATIVE) {
|
|
781
|
-
$Symbol = function Symbol() {
|
|
782
|
-
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
|
|
783
|
-
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
|
|
784
|
-
var $set = function (value) {
|
|
785
|
-
if (this === ObjectProto) $set.call(OPSymbols, value);
|
|
786
|
-
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
|
787
|
-
setSymbolDesc(this, tag, createDesc(1, value));
|
|
788
|
-
};
|
|
789
|
-
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
|
|
790
|
-
return wrap(tag);
|
|
791
|
-
};
|
|
792
|
-
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
|
|
793
|
-
return this._k;
|
|
794
|
-
});
|
|
795
|
-
|
|
796
|
-
$GOPD.f = $getOwnPropertyDescriptor;
|
|
797
|
-
$DP.f = $defineProperty;
|
|
798
|
-
require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;
|
|
799
|
-
require('./_object-pie').f = $propertyIsEnumerable;
|
|
800
|
-
$GOPS.f = $getOwnPropertySymbols;
|
|
801
|
-
|
|
802
|
-
if (DESCRIPTORS && !require('./_library')) {
|
|
803
|
-
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
wksExt.f = function (name) {
|
|
807
|
-
return wrap(wks(name));
|
|
808
|
-
};
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
|
|
812
|
-
|
|
813
|
-
for (var es6Symbols = (
|
|
814
|
-
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
|
|
815
|
-
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
|
|
816
|
-
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
|
|
817
|
-
|
|
818
|
-
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
|
|
819
|
-
|
|
820
|
-
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
|
|
821
|
-
// 19.4.2.1 Symbol.for(key)
|
|
822
|
-
'for': function (key) {
|
|
823
|
-
return has(SymbolRegistry, key += '')
|
|
824
|
-
? SymbolRegistry[key]
|
|
825
|
-
: SymbolRegistry[key] = $Symbol(key);
|
|
826
|
-
},
|
|
827
|
-
// 19.4.2.5 Symbol.keyFor(sym)
|
|
828
|
-
keyFor: function keyFor(sym) {
|
|
829
|
-
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
|
|
830
|
-
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
|
|
831
|
-
},
|
|
832
|
-
useSetter: function () { setter = true; },
|
|
833
|
-
useSimple: function () { setter = false; }
|
|
834
|
-
});
|
|
835
|
-
|
|
836
|
-
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
|
|
837
|
-
// 19.1.2.2 Object.create(O [, Properties])
|
|
838
|
-
create: $create,
|
|
839
|
-
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
|
|
840
|
-
defineProperty: $defineProperty,
|
|
841
|
-
// 19.1.2.3 Object.defineProperties(O, Properties)
|
|
842
|
-
defineProperties: $defineProperties,
|
|
843
|
-
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
|
|
844
|
-
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
|
|
845
|
-
// 19.1.2.7 Object.getOwnPropertyNames(O)
|
|
846
|
-
getOwnPropertyNames: $getOwnPropertyNames,
|
|
847
|
-
// 19.1.2.8 Object.getOwnPropertySymbols(O)
|
|
848
|
-
getOwnPropertySymbols: $getOwnPropertySymbols
|
|
849
|
-
});
|
|
850
|
-
|
|
851
|
-
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
|
|
852
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
|
|
853
|
-
var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
|
|
854
|
-
|
|
855
|
-
$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
|
|
856
|
-
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
|
|
857
|
-
return $GOPS.f(toObject(it));
|
|
858
|
-
}
|
|
859
|
-
});
|
|
860
|
-
|
|
861
|
-
// 24.3.2 JSON.stringify(value [, replacer [, space]])
|
|
862
|
-
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
|
|
863
|
-
var S = $Symbol();
|
|
864
|
-
// MS Edge converts symbol values to JSON as {}
|
|
865
|
-
// WebKit converts symbol values to JSON as null
|
|
866
|
-
// V8 throws on boxed symbols
|
|
867
|
-
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
|
|
868
|
-
})), 'JSON', {
|
|
869
|
-
stringify: function stringify(it) {
|
|
870
|
-
var args = [it];
|
|
871
|
-
var i = 1;
|
|
872
|
-
var replacer, $replacer;
|
|
873
|
-
while (arguments.length > i) args.push(arguments[i++]);
|
|
874
|
-
$replacer = replacer = args[1];
|
|
875
|
-
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
|
876
|
-
if (!isArray(replacer)) replacer = function (key, value) {
|
|
877
|
-
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
|
|
878
|
-
if (!isSymbol(value)) return value;
|
|
879
|
-
};
|
|
880
|
-
args[1] = replacer;
|
|
881
|
-
return _stringify.apply($JSON, args);
|
|
882
|
-
}
|
|
883
|
-
});
|
|
884
|
-
|
|
885
|
-
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
|
|
886
|
-
$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
|
887
|
-
// 19.4.3.5 Symbol.prototype[@@toStringTag]
|
|
888
|
-
setToStringTag($Symbol, 'Symbol');
|
|
889
|
-
// 20.2.1.9 Math[@@toStringTag]
|
|
890
|
-
setToStringTag(Math, 'Math', true);
|
|
891
|
-
// 24.3.3 JSON[@@toStringTag]
|
|
892
|
-
setToStringTag(global.JSON, 'JSON', true);
|
|
893
|
-
|
|
894
|
-
},{"./_an-object":3,"./_descriptors":10,"./_enum-keys":13,"./_export":14,"./_fails":15,"./_global":17,"./_has":18,"./_hide":19,"./_is-array":23,"./_is-object":24,"./_library":25,"./_meta":26,"./_object-create":27,"./_object-dp":28,"./_object-gopd":30,"./_object-gopn":32,"./_object-gopn-ext":31,"./_object-gops":33,"./_object-keys":35,"./_object-pie":36,"./_property-desc":37,"./_redefine":38,"./_set-to-string-tag":39,"./_shared":41,"./_to-iobject":44,"./_to-object":46,"./_to-primitive":47,"./_uid":48,"./_wks":51,"./_wks-define":49,"./_wks-ext":50}],54:[function(require,module,exports){
|
|
895
2
|
(function (global){
|
|
896
3
|
/**
|
|
897
4
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -1826,7 +933,7 @@ function get(object, path, defaultValue) {
|
|
|
1826
933
|
module.exports = get;
|
|
1827
934
|
|
|
1828
935
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
1829
|
-
},{}],
|
|
936
|
+
},{}],2:[function(require,module,exports){
|
|
1830
937
|
(function (global){
|
|
1831
938
|
/**
|
|
1832
939
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
@@ -3678,7 +2785,7 @@ function stubFalse() {
|
|
|
3678
2785
|
module.exports = isEqual;
|
|
3679
2786
|
|
|
3680
2787
|
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
3681
|
-
},{}],
|
|
2788
|
+
},{}],3:[function(require,module,exports){
|
|
3682
2789
|
// shim for using process in browser
|
|
3683
2790
|
var process = module.exports = {};
|
|
3684
2791
|
|
|
@@ -3864,7 +2971,7 @@ process.chdir = function (dir) {
|
|
|
3864
2971
|
};
|
|
3865
2972
|
process.umask = function() { return 0; };
|
|
3866
2973
|
|
|
3867
|
-
},{}],
|
|
2974
|
+
},{}],4:[function(require,module,exports){
|
|
3868
2975
|
"use strict";
|
|
3869
2976
|
|
|
3870
2977
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3984,7 +3091,9 @@ var _isISO31661Alpha = _interopRequireDefault(require("./lib/isISO31661Alpha2"))
|
|
|
3984
3091
|
|
|
3985
3092
|
var _isISO31661Alpha2 = _interopRequireDefault(require("./lib/isISO31661Alpha3"));
|
|
3986
3093
|
|
|
3987
|
-
var _isBase = _interopRequireDefault(require("./lib/
|
|
3094
|
+
var _isBase = _interopRequireDefault(require("./lib/isBase32"));
|
|
3095
|
+
|
|
3096
|
+
var _isBase2 = _interopRequireDefault(require("./lib/isBase64"));
|
|
3988
3097
|
|
|
3989
3098
|
var _isDataURI = _interopRequireDefault(require("./lib/isDataURI"));
|
|
3990
3099
|
|
|
@@ -4016,13 +3125,11 @@ var _isWhitelisted = _interopRequireDefault(require("./lib/isWhitelisted"));
|
|
|
4016
3125
|
|
|
4017
3126
|
var _normalizeEmail = _interopRequireDefault(require("./lib/normalizeEmail"));
|
|
4018
3127
|
|
|
4019
|
-
var _toString = _interopRequireDefault(require("./lib/util/toString"));
|
|
4020
|
-
|
|
4021
3128
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
|
|
4022
3129
|
|
|
4023
3130
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4024
3131
|
|
|
4025
|
-
var version = '
|
|
3132
|
+
var version = '11.1.0';
|
|
4026
3133
|
var validator = {
|
|
4027
3134
|
version: version,
|
|
4028
3135
|
toDate: _toDate.default,
|
|
@@ -4087,7 +3194,8 @@ var validator = {
|
|
|
4087
3194
|
isRFC3339: _isRFC.default,
|
|
4088
3195
|
isISO31661Alpha2: _isISO31661Alpha.default,
|
|
4089
3196
|
isISO31661Alpha3: _isISO31661Alpha2.default,
|
|
4090
|
-
|
|
3197
|
+
isBase32: _isBase.default,
|
|
3198
|
+
isBase64: _isBase2.default,
|
|
4091
3199
|
isDataURI: _isDataURI.default,
|
|
4092
3200
|
isMagnetURI: _isMagnetURI.default,
|
|
4093
3201
|
isMimeType: _isMimeType.default,
|
|
@@ -4102,13 +3210,13 @@ var validator = {
|
|
|
4102
3210
|
blacklist: _blacklist.default,
|
|
4103
3211
|
isWhitelisted: _isWhitelisted.default,
|
|
4104
3212
|
normalizeEmail: _normalizeEmail.default,
|
|
4105
|
-
toString:
|
|
3213
|
+
toString: toString
|
|
4106
3214
|
};
|
|
4107
3215
|
var _default = validator;
|
|
4108
3216
|
exports.default = _default;
|
|
4109
3217
|
module.exports = exports.default;
|
|
4110
3218
|
module.exports.default = exports.default;
|
|
4111
|
-
},{"./lib/blacklist":
|
|
3219
|
+
},{"./lib/blacklist":6,"./lib/contains":7,"./lib/equals":8,"./lib/escape":9,"./lib/isAfter":10,"./lib/isAlpha":11,"./lib/isAlphanumeric":12,"./lib/isAscii":13,"./lib/isBase32":14,"./lib/isBase64":15,"./lib/isBefore":16,"./lib/isBoolean":17,"./lib/isByteLength":18,"./lib/isCreditCard":19,"./lib/isCurrency":20,"./lib/isDataURI":21,"./lib/isDecimal":22,"./lib/isDivisibleBy":23,"./lib/isEmail":24,"./lib/isEmpty":25,"./lib/isFQDN":26,"./lib/isFloat":27,"./lib/isFullWidth":28,"./lib/isHalfWidth":29,"./lib/isHash":30,"./lib/isHexColor":31,"./lib/isHexadecimal":32,"./lib/isIP":33,"./lib/isIPRange":34,"./lib/isISBN":35,"./lib/isISIN":36,"./lib/isISO31661Alpha2":37,"./lib/isISO31661Alpha3":38,"./lib/isISO8601":39,"./lib/isISRC":40,"./lib/isISSN":41,"./lib/isIdentityCard":42,"./lib/isIn":43,"./lib/isInt":44,"./lib/isJSON":45,"./lib/isJWT":46,"./lib/isLatLong":47,"./lib/isLength":48,"./lib/isLowercase":49,"./lib/isMACAddress":50,"./lib/isMD5":51,"./lib/isMagnetURI":52,"./lib/isMimeType":53,"./lib/isMobilePhone":54,"./lib/isMongoId":55,"./lib/isMultibyte":56,"./lib/isNumeric":57,"./lib/isPort":58,"./lib/isPostalCode":59,"./lib/isRFC3339":60,"./lib/isSurrogatePair":61,"./lib/isURL":62,"./lib/isUUID":63,"./lib/isUppercase":64,"./lib/isVariableWidth":65,"./lib/isWhitelisted":66,"./lib/ltrim":67,"./lib/matches":68,"./lib/normalizeEmail":69,"./lib/rtrim":70,"./lib/stripLow":71,"./lib/toBoolean":72,"./lib/toDate":73,"./lib/toFloat":74,"./lib/toInt":75,"./lib/trim":76,"./lib/unescape":77,"./lib/whitelist":82}],5:[function(require,module,exports){
|
|
4112
3220
|
"use strict";
|
|
4113
3221
|
|
|
4114
3222
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4198,9 +3306,9 @@ for (var _locale, _i = 0; _i < arabicLocales.length; _i++) {
|
|
|
4198
3306
|
} // Source: https://en.wikipedia.org/wiki/Decimal_mark
|
|
4199
3307
|
|
|
4200
3308
|
|
|
4201
|
-
var dotDecimal = [];
|
|
3309
|
+
var dotDecimal = ['ar-EG', 'ar-LB', 'ar-LY'];
|
|
4202
3310
|
exports.dotDecimal = dotDecimal;
|
|
4203
|
-
var commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'es-ES', 'fr-FR', 'it-IT', 'ku-IQ', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA'];
|
|
3311
|
+
var commaDecimal = ['bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-ZM', 'es-ES', 'fr-FR', 'it-IT', 'ku-IQ', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA'];
|
|
4204
3312
|
exports.commaDecimal = commaDecimal;
|
|
4205
3313
|
|
|
4206
3314
|
for (var _i2 = 0; _i2 < dotDecimal.length; _i2++) {
|
|
@@ -4218,7 +3326,7 @@ decimal['pt-BR'] = decimal['pt-PT']; // see #862
|
|
|
4218
3326
|
alpha['pl-Pl'] = alpha['pl-PL'];
|
|
4219
3327
|
alphanumeric['pl-Pl'] = alphanumeric['pl-PL'];
|
|
4220
3328
|
decimal['pl-Pl'] = decimal['pl-PL'];
|
|
4221
|
-
},{}],
|
|
3329
|
+
},{}],6:[function(require,module,exports){
|
|
4222
3330
|
"use strict";
|
|
4223
3331
|
|
|
4224
3332
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4237,7 +3345,7 @@ function blacklist(str, chars) {
|
|
|
4237
3345
|
|
|
4238
3346
|
module.exports = exports.default;
|
|
4239
3347
|
module.exports.default = exports.default;
|
|
4240
|
-
},{"./util/assertString":
|
|
3348
|
+
},{"./util/assertString":78}],7:[function(require,module,exports){
|
|
4241
3349
|
"use strict";
|
|
4242
3350
|
|
|
4243
3351
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4258,7 +3366,7 @@ function contains(str, elem) {
|
|
|
4258
3366
|
|
|
4259
3367
|
module.exports = exports.default;
|
|
4260
3368
|
module.exports.default = exports.default;
|
|
4261
|
-
},{"./util/assertString":
|
|
3369
|
+
},{"./util/assertString":78,"./util/toString":81}],8:[function(require,module,exports){
|
|
4262
3370
|
"use strict";
|
|
4263
3371
|
|
|
4264
3372
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4277,7 +3385,7 @@ function equals(str, comparison) {
|
|
|
4277
3385
|
|
|
4278
3386
|
module.exports = exports.default;
|
|
4279
3387
|
module.exports.default = exports.default;
|
|
4280
|
-
},{"./util/assertString":
|
|
3388
|
+
},{"./util/assertString":78}],9:[function(require,module,exports){
|
|
4281
3389
|
"use strict";
|
|
4282
3390
|
|
|
4283
3391
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4296,7 +3404,7 @@ function escape(str) {
|
|
|
4296
3404
|
|
|
4297
3405
|
module.exports = exports.default;
|
|
4298
3406
|
module.exports.default = exports.default;
|
|
4299
|
-
},{"./util/assertString":
|
|
3407
|
+
},{"./util/assertString":78}],10:[function(require,module,exports){
|
|
4300
3408
|
"use strict";
|
|
4301
3409
|
|
|
4302
3410
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4320,7 +3428,7 @@ function isAfter(str) {
|
|
|
4320
3428
|
|
|
4321
3429
|
module.exports = exports.default;
|
|
4322
3430
|
module.exports.default = exports.default;
|
|
4323
|
-
},{"./toDate":
|
|
3431
|
+
},{"./toDate":73,"./util/assertString":78}],11:[function(require,module,exports){
|
|
4324
3432
|
"use strict";
|
|
4325
3433
|
|
|
4326
3434
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4348,7 +3456,7 @@ function isAlpha(str) {
|
|
|
4348
3456
|
|
|
4349
3457
|
var locales = Object.keys(_alpha.alpha);
|
|
4350
3458
|
exports.locales = locales;
|
|
4351
|
-
},{"./alpha":
|
|
3459
|
+
},{"./alpha":5,"./util/assertString":78}],12:[function(require,module,exports){
|
|
4352
3460
|
"use strict";
|
|
4353
3461
|
|
|
4354
3462
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4376,7 +3484,7 @@ function isAlphanumeric(str) {
|
|
|
4376
3484
|
|
|
4377
3485
|
var locales = Object.keys(_alpha.alphanumeric);
|
|
4378
3486
|
exports.locales = locales;
|
|
4379
|
-
},{"./alpha":
|
|
3487
|
+
},{"./alpha":5,"./util/assertString":78}],13:[function(require,module,exports){
|
|
4380
3488
|
"use strict";
|
|
4381
3489
|
|
|
4382
3490
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4399,7 +3507,34 @@ function isAscii(str) {
|
|
|
4399
3507
|
|
|
4400
3508
|
module.exports = exports.default;
|
|
4401
3509
|
module.exports.default = exports.default;
|
|
4402
|
-
},{"./util/assertString":
|
|
3510
|
+
},{"./util/assertString":78}],14:[function(require,module,exports){
|
|
3511
|
+
"use strict";
|
|
3512
|
+
|
|
3513
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3514
|
+
value: true
|
|
3515
|
+
});
|
|
3516
|
+
exports.default = isBase32;
|
|
3517
|
+
|
|
3518
|
+
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
|
3519
|
+
|
|
3520
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3521
|
+
|
|
3522
|
+
var base32 = /^[A-Z2-7]+=*$/;
|
|
3523
|
+
|
|
3524
|
+
function isBase32(str) {
|
|
3525
|
+
(0, _assertString.default)(str);
|
|
3526
|
+
var len = str.length;
|
|
3527
|
+
|
|
3528
|
+
if (len > 0 && len % 8 === 0 && base32.test(str)) {
|
|
3529
|
+
return true;
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
return false;
|
|
3533
|
+
}
|
|
3534
|
+
|
|
3535
|
+
module.exports = exports.default;
|
|
3536
|
+
module.exports.default = exports.default;
|
|
3537
|
+
},{"./util/assertString":78}],15:[function(require,module,exports){
|
|
4403
3538
|
"use strict";
|
|
4404
3539
|
|
|
4405
3540
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4427,7 +3562,7 @@ function isBase64(str) {
|
|
|
4427
3562
|
|
|
4428
3563
|
module.exports = exports.default;
|
|
4429
3564
|
module.exports.default = exports.default;
|
|
4430
|
-
},{"./util/assertString":
|
|
3565
|
+
},{"./util/assertString":78}],16:[function(require,module,exports){
|
|
4431
3566
|
"use strict";
|
|
4432
3567
|
|
|
4433
3568
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4451,7 +3586,7 @@ function isBefore(str) {
|
|
|
4451
3586
|
|
|
4452
3587
|
module.exports = exports.default;
|
|
4453
3588
|
module.exports.default = exports.default;
|
|
4454
|
-
},{"./toDate":
|
|
3589
|
+
},{"./toDate":73,"./util/assertString":78}],17:[function(require,module,exports){
|
|
4455
3590
|
"use strict";
|
|
4456
3591
|
|
|
4457
3592
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4470,7 +3605,7 @@ function isBoolean(str) {
|
|
|
4470
3605
|
|
|
4471
3606
|
module.exports = exports.default;
|
|
4472
3607
|
module.exports.default = exports.default;
|
|
4473
|
-
},{"./util/assertString":
|
|
3608
|
+
},{"./util/assertString":78}],18:[function(require,module,exports){
|
|
4474
3609
|
"use strict";
|
|
4475
3610
|
|
|
4476
3611
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4505,7 +3640,7 @@ function isByteLength(str, options) {
|
|
|
4505
3640
|
|
|
4506
3641
|
module.exports = exports.default;
|
|
4507
3642
|
module.exports.default = exports.default;
|
|
4508
|
-
},{"./util/assertString":
|
|
3643
|
+
},{"./util/assertString":78}],19:[function(require,module,exports){
|
|
4509
3644
|
"use strict";
|
|
4510
3645
|
|
|
4511
3646
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4558,7 +3693,7 @@ function isCreditCard(str) {
|
|
|
4558
3693
|
|
|
4559
3694
|
module.exports = exports.default;
|
|
4560
3695
|
module.exports.default = exports.default;
|
|
4561
|
-
},{"./util/assertString":
|
|
3696
|
+
},{"./util/assertString":78}],20:[function(require,module,exports){
|
|
4562
3697
|
"use strict";
|
|
4563
3698
|
|
|
4564
3699
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4648,7 +3783,7 @@ function isCurrency(str, options) {
|
|
|
4648
3783
|
|
|
4649
3784
|
module.exports = exports.default;
|
|
4650
3785
|
module.exports.default = exports.default;
|
|
4651
|
-
},{"./util/assertString":
|
|
3786
|
+
},{"./util/assertString":78,"./util/merge":80}],21:[function(require,module,exports){
|
|
4652
3787
|
"use strict";
|
|
4653
3788
|
|
|
4654
3789
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4703,7 +3838,7 @@ function isDataURI(str) {
|
|
|
4703
3838
|
|
|
4704
3839
|
module.exports = exports.default;
|
|
4705
3840
|
module.exports.default = exports.default;
|
|
4706
|
-
},{"./util/assertString":
|
|
3841
|
+
},{"./util/assertString":78}],22:[function(require,module,exports){
|
|
4707
3842
|
"use strict";
|
|
4708
3843
|
|
|
4709
3844
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4746,7 +3881,7 @@ function isDecimal(str, options) {
|
|
|
4746
3881
|
|
|
4747
3882
|
module.exports = exports.default;
|
|
4748
3883
|
module.exports.default = exports.default;
|
|
4749
|
-
},{"./alpha":
|
|
3884
|
+
},{"./alpha":5,"./util/assertString":78,"./util/includes":79,"./util/merge":80}],23:[function(require,module,exports){
|
|
4750
3885
|
"use strict";
|
|
4751
3886
|
|
|
4752
3887
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4767,7 +3902,7 @@ function isDivisibleBy(str, num) {
|
|
|
4767
3902
|
|
|
4768
3903
|
module.exports = exports.default;
|
|
4769
3904
|
module.exports.default = exports.default;
|
|
4770
|
-
},{"./toFloat":
|
|
3905
|
+
},{"./toFloat":74,"./util/assertString":78}],24:[function(require,module,exports){
|
|
4771
3906
|
"use strict";
|
|
4772
3907
|
|
|
4773
3908
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4787,6 +3922,14 @@ var _isIP = _interopRequireDefault(require("./isIP"));
|
|
|
4787
3922
|
|
|
4788
3923
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4789
3924
|
|
|
3925
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
3926
|
+
|
|
3927
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
3928
|
+
|
|
3929
|
+
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
3930
|
+
|
|
3931
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3932
|
+
|
|
4790
3933
|
var default_email_options = {
|
|
4791
3934
|
allow_display_name: false,
|
|
4792
3935
|
require_display_name: false,
|
|
@@ -4797,30 +3940,86 @@ var default_email_options = {
|
|
|
4797
3940
|
|
|
4798
3941
|
/* eslint-disable no-control-regex */
|
|
4799
3942
|
|
|
4800
|
-
var
|
|
3943
|
+
var splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+)<(.+)>$/i;
|
|
4801
3944
|
var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i;
|
|
4802
3945
|
var gmailUserPart = /^[a-z\d]+$/;
|
|
4803
3946
|
var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i;
|
|
4804
3947
|
var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i;
|
|
4805
3948
|
var quotedEmailUserUtf8 = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;
|
|
3949
|
+
var defaultMaxEmailLength = 254;
|
|
4806
3950
|
/* eslint-enable max-len */
|
|
4807
3951
|
|
|
4808
3952
|
/* eslint-enable no-control-regex */
|
|
4809
3953
|
|
|
3954
|
+
/**
|
|
3955
|
+
* Validate display name according to the RFC2822: https://tools.ietf.org/html/rfc2822#appendix-A.1.2
|
|
3956
|
+
* @param {String} display_name
|
|
3957
|
+
*/
|
|
3958
|
+
|
|
3959
|
+
function validateDisplayName(display_name) {
|
|
3960
|
+
var trim_quotes = display_name.match(/^"(.+)"$/i);
|
|
3961
|
+
var display_name_without_quotes = trim_quotes ? trim_quotes[1] : display_name; // display name with only spaces is not valid
|
|
3962
|
+
|
|
3963
|
+
if (!display_name_without_quotes.trim()) {
|
|
3964
|
+
return false;
|
|
3965
|
+
} // check whether display name contains illegal character
|
|
3966
|
+
|
|
3967
|
+
|
|
3968
|
+
var contains_illegal = /[\.";<>]/.test(display_name_without_quotes);
|
|
3969
|
+
|
|
3970
|
+
if (contains_illegal) {
|
|
3971
|
+
// if contains illegal characters,
|
|
3972
|
+
// must to be enclosed in double-quotes, otherwise it's not a valid display name
|
|
3973
|
+
if (!trim_quotes) {
|
|
3974
|
+
return false;
|
|
3975
|
+
} // the quotes in display name must start with character symbol \
|
|
3976
|
+
|
|
3977
|
+
|
|
3978
|
+
var all_start_with_back_slash = display_name_without_quotes.split('"').length === display_name_without_quotes.split('\\"').length;
|
|
3979
|
+
|
|
3980
|
+
if (!all_start_with_back_slash) {
|
|
3981
|
+
return false;
|
|
3982
|
+
}
|
|
3983
|
+
}
|
|
3984
|
+
|
|
3985
|
+
return true;
|
|
3986
|
+
}
|
|
3987
|
+
|
|
4810
3988
|
function isEmail(str, options) {
|
|
4811
3989
|
(0, _assertString.default)(str);
|
|
4812
3990
|
options = (0, _merge.default)(options, default_email_options);
|
|
4813
3991
|
|
|
4814
3992
|
if (options.require_display_name || options.allow_display_name) {
|
|
4815
|
-
var display_email = str.match(
|
|
3993
|
+
var display_email = str.match(splitNameAddress);
|
|
4816
3994
|
|
|
4817
3995
|
if (display_email) {
|
|
4818
|
-
|
|
3996
|
+
var display_name;
|
|
3997
|
+
|
|
3998
|
+
var _display_email = _slicedToArray(display_email, 3);
|
|
3999
|
+
|
|
4000
|
+
display_name = _display_email[1];
|
|
4001
|
+
str = _display_email[2];
|
|
4002
|
+
|
|
4003
|
+
// sometimes need to trim the last space to get the display name
|
|
4004
|
+
// because there may be a space between display name and email address
|
|
4005
|
+
// eg. myname <address@gmail.com>
|
|
4006
|
+
// the display name is `myname` instead of `myname `, so need to trim the last space
|
|
4007
|
+
if (display_name.endsWith(' ')) {
|
|
4008
|
+
display_name = display_name.substr(0, display_name.length - 1);
|
|
4009
|
+
}
|
|
4010
|
+
|
|
4011
|
+
if (!validateDisplayName(display_name)) {
|
|
4012
|
+
return false;
|
|
4013
|
+
}
|
|
4819
4014
|
} else if (options.require_display_name) {
|
|
4820
4015
|
return false;
|
|
4821
4016
|
}
|
|
4822
4017
|
}
|
|
4823
4018
|
|
|
4019
|
+
if (!options.ignore_max_length && str.length > defaultMaxEmailLength) {
|
|
4020
|
+
return false;
|
|
4021
|
+
}
|
|
4022
|
+
|
|
4824
4023
|
var parts = str.split('@');
|
|
4825
4024
|
var domain = parts.pop();
|
|
4826
4025
|
var user = parts.join('@');
|
|
@@ -4890,8 +4089,8 @@ function isEmail(str, options) {
|
|
|
4890
4089
|
var pattern = options.allow_utf8_local_part ? emailUserUtf8Part : emailUserPart;
|
|
4891
4090
|
var user_parts = user.split('.');
|
|
4892
4091
|
|
|
4893
|
-
for (var
|
|
4894
|
-
if (!pattern.test(user_parts[
|
|
4092
|
+
for (var _i2 = 0; _i2 < user_parts.length; _i2++) {
|
|
4093
|
+
if (!pattern.test(user_parts[_i2])) {
|
|
4895
4094
|
return false;
|
|
4896
4095
|
}
|
|
4897
4096
|
}
|
|
@@ -4901,7 +4100,7 @@ function isEmail(str, options) {
|
|
|
4901
4100
|
|
|
4902
4101
|
module.exports = exports.default;
|
|
4903
4102
|
module.exports.default = exports.default;
|
|
4904
|
-
},{"./isByteLength":
|
|
4103
|
+
},{"./isByteLength":18,"./isFQDN":26,"./isIP":33,"./util/assertString":78,"./util/merge":80}],25:[function(require,module,exports){
|
|
4905
4104
|
"use strict";
|
|
4906
4105
|
|
|
4907
4106
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4927,7 +4126,7 @@ function isEmpty(str, options) {
|
|
|
4927
4126
|
|
|
4928
4127
|
module.exports = exports.default;
|
|
4929
4128
|
module.exports.default = exports.default;
|
|
4930
|
-
},{"./util/assertString":
|
|
4129
|
+
},{"./util/assertString":78,"./util/merge":80}],26:[function(require,module,exports){
|
|
4931
4130
|
"use strict";
|
|
4932
4131
|
|
|
4933
4132
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5003,7 +4202,7 @@ function isFQDN(str, options) {
|
|
|
5003
4202
|
|
|
5004
4203
|
module.exports = exports.default;
|
|
5005
4204
|
module.exports.default = exports.default;
|
|
5006
|
-
},{"./util/assertString":
|
|
4205
|
+
},{"./util/assertString":78,"./util/merge":80}],27:[function(require,module,exports){
|
|
5007
4206
|
"use strict";
|
|
5008
4207
|
|
|
5009
4208
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5033,7 +4232,7 @@ function isFloat(str, options) {
|
|
|
5033
4232
|
|
|
5034
4233
|
var locales = Object.keys(_alpha.decimal);
|
|
5035
4234
|
exports.locales = locales;
|
|
5036
|
-
},{"./alpha":
|
|
4235
|
+
},{"./alpha":5,"./util/assertString":78}],28:[function(require,module,exports){
|
|
5037
4236
|
"use strict";
|
|
5038
4237
|
|
|
5039
4238
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5053,7 +4252,7 @@ function isFullWidth(str) {
|
|
|
5053
4252
|
(0, _assertString.default)(str);
|
|
5054
4253
|
return fullWidth.test(str);
|
|
5055
4254
|
}
|
|
5056
|
-
},{"./util/assertString":
|
|
4255
|
+
},{"./util/assertString":78}],29:[function(require,module,exports){
|
|
5057
4256
|
"use strict";
|
|
5058
4257
|
|
|
5059
4258
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5073,7 +4272,7 @@ function isHalfWidth(str) {
|
|
|
5073
4272
|
(0, _assertString.default)(str);
|
|
5074
4273
|
return halfWidth.test(str);
|
|
5075
4274
|
}
|
|
5076
|
-
},{"./util/assertString":
|
|
4275
|
+
},{"./util/assertString":78}],30:[function(require,module,exports){
|
|
5077
4276
|
"use strict";
|
|
5078
4277
|
|
|
5079
4278
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5109,7 +4308,7 @@ function isHash(str, algorithm) {
|
|
|
5109
4308
|
|
|
5110
4309
|
module.exports = exports.default;
|
|
5111
4310
|
module.exports.default = exports.default;
|
|
5112
|
-
},{"./util/assertString":
|
|
4311
|
+
},{"./util/assertString":78}],31:[function(require,module,exports){
|
|
5113
4312
|
"use strict";
|
|
5114
4313
|
|
|
5115
4314
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5130,7 +4329,7 @@ function isHexColor(str) {
|
|
|
5130
4329
|
|
|
5131
4330
|
module.exports = exports.default;
|
|
5132
4331
|
module.exports.default = exports.default;
|
|
5133
|
-
},{"./util/assertString":
|
|
4332
|
+
},{"./util/assertString":78}],32:[function(require,module,exports){
|
|
5134
4333
|
"use strict";
|
|
5135
4334
|
|
|
5136
4335
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5151,7 +4350,7 @@ function isHexadecimal(str) {
|
|
|
5151
4350
|
|
|
5152
4351
|
module.exports = exports.default;
|
|
5153
4352
|
module.exports.default = exports.default;
|
|
5154
|
-
},{"./util/assertString":
|
|
4353
|
+
},{"./util/assertString":78}],33:[function(require,module,exports){
|
|
5155
4354
|
"use strict";
|
|
5156
4355
|
|
|
5157
4356
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5238,7 +4437,7 @@ function isIP(str) {
|
|
|
5238
4437
|
|
|
5239
4438
|
module.exports = exports.default;
|
|
5240
4439
|
module.exports.default = exports.default;
|
|
5241
|
-
},{"./util/assertString":
|
|
4440
|
+
},{"./util/assertString":78}],34:[function(require,module,exports){
|
|
5242
4441
|
"use strict";
|
|
5243
4442
|
|
|
5244
4443
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5276,7 +4475,7 @@ function isIPRange(str) {
|
|
|
5276
4475
|
|
|
5277
4476
|
module.exports = exports.default;
|
|
5278
4477
|
module.exports.default = exports.default;
|
|
5279
|
-
},{"./isIP":
|
|
4478
|
+
},{"./isIP":33,"./util/assertString":78}],35:[function(require,module,exports){
|
|
5280
4479
|
"use strict";
|
|
5281
4480
|
|
|
5282
4481
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5342,7 +4541,7 @@ function isISBN(str) {
|
|
|
5342
4541
|
|
|
5343
4542
|
module.exports = exports.default;
|
|
5344
4543
|
module.exports.default = exports.default;
|
|
5345
|
-
},{"./util/assertString":
|
|
4544
|
+
},{"./util/assertString":78}],36:[function(require,module,exports){
|
|
5346
4545
|
"use strict";
|
|
5347
4546
|
|
|
5348
4547
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5395,7 +4594,7 @@ function isISIN(str) {
|
|
|
5395
4594
|
|
|
5396
4595
|
module.exports = exports.default;
|
|
5397
4596
|
module.exports.default = exports.default;
|
|
5398
|
-
},{"./util/assertString":
|
|
4597
|
+
},{"./util/assertString":78}],37:[function(require,module,exports){
|
|
5399
4598
|
"use strict";
|
|
5400
4599
|
|
|
5401
4600
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5419,7 +4618,7 @@ function isISO31661Alpha2(str) {
|
|
|
5419
4618
|
|
|
5420
4619
|
module.exports = exports.default;
|
|
5421
4620
|
module.exports.default = exports.default;
|
|
5422
|
-
},{"./util/assertString":
|
|
4621
|
+
},{"./util/assertString":78,"./util/includes":79}],38:[function(require,module,exports){
|
|
5423
4622
|
"use strict";
|
|
5424
4623
|
|
|
5425
4624
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5443,7 +4642,7 @@ function isISO31661Alpha3(str) {
|
|
|
5443
4642
|
|
|
5444
4643
|
module.exports = exports.default;
|
|
5445
4644
|
module.exports.default = exports.default;
|
|
5446
|
-
},{"./util/assertString":
|
|
4645
|
+
},{"./util/assertString":78,"./util/includes":79}],39:[function(require,module,exports){
|
|
5447
4646
|
"use strict";
|
|
5448
4647
|
|
|
5449
4648
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5471,7 +4670,7 @@ var isValidDate = function isValidDate(str) {
|
|
|
5471
4670
|
var oYear = Number(ordinalMatch[1]);
|
|
5472
4671
|
var oDay = Number(ordinalMatch[2]); // if is leap year
|
|
5473
4672
|
|
|
5474
|
-
if (oYear % 4 === 0 && oYear % 100 !== 0) return oDay <= 366;
|
|
4673
|
+
if (oYear % 4 === 0 && oYear % 100 !== 0 || oYear % 400 === 0) return oDay <= 366;
|
|
5475
4674
|
return oDay <= 365;
|
|
5476
4675
|
}
|
|
5477
4676
|
|
|
@@ -5483,7 +4682,6 @@ var isValidDate = function isValidDate(str) {
|
|
|
5483
4682
|
var dayString = day ? "0".concat(day).slice(-2) : day; // create a date object and compare
|
|
5484
4683
|
|
|
5485
4684
|
var d = new Date("".concat(year, "-").concat(monthString || '01', "-").concat(dayString || '01'));
|
|
5486
|
-
if (isNaN(d.getUTCFullYear())) return false;
|
|
5487
4685
|
|
|
5488
4686
|
if (month && day) {
|
|
5489
4687
|
return d.getUTCFullYear() === year && d.getUTCMonth() + 1 === month && d.getUTCDate() === day;
|
|
@@ -5502,7 +4700,7 @@ function isISO8601(str, options) {
|
|
|
5502
4700
|
|
|
5503
4701
|
module.exports = exports.default;
|
|
5504
4702
|
module.exports.default = exports.default;
|
|
5505
|
-
},{"./util/assertString":
|
|
4703
|
+
},{"./util/assertString":78}],40:[function(require,module,exports){
|
|
5506
4704
|
"use strict";
|
|
5507
4705
|
|
|
5508
4706
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5524,7 +4722,7 @@ function isISRC(str) {
|
|
|
5524
4722
|
|
|
5525
4723
|
module.exports = exports.default;
|
|
5526
4724
|
module.exports.default = exports.default;
|
|
5527
|
-
},{"./util/assertString":
|
|
4725
|
+
},{"./util/assertString":78}],41:[function(require,module,exports){
|
|
5528
4726
|
"use strict";
|
|
5529
4727
|
|
|
5530
4728
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5562,7 +4760,7 @@ function isISSN(str) {
|
|
|
5562
4760
|
|
|
5563
4761
|
module.exports = exports.default;
|
|
5564
4762
|
module.exports.default = exports.default;
|
|
5565
|
-
},{"./util/assertString":
|
|
4763
|
+
},{"./util/assertString":78}],42:[function(require,module,exports){
|
|
5566
4764
|
"use strict";
|
|
5567
4765
|
|
|
5568
4766
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5596,17 +4794,83 @@ var validators = {
|
|
|
5596
4794
|
return charsValue[char];
|
|
5597
4795
|
});
|
|
5598
4796
|
return sanitized.endsWith(controlDigits[number % 23]);
|
|
4797
|
+
},
|
|
4798
|
+
'he-IL': function heIL(str) {
|
|
4799
|
+
var DNI = /^\d{9}$/; // sanitize user input
|
|
4800
|
+
|
|
4801
|
+
var sanitized = str.trim(); // validate the data structure
|
|
4802
|
+
|
|
4803
|
+
if (!DNI.test(sanitized)) {
|
|
4804
|
+
return false;
|
|
4805
|
+
}
|
|
4806
|
+
|
|
4807
|
+
var id = sanitized;
|
|
4808
|
+
var sum = 0,
|
|
4809
|
+
incNum;
|
|
4810
|
+
|
|
4811
|
+
for (var i = 0; i < id.length; i++) {
|
|
4812
|
+
incNum = Number(id[i]) * (i % 2 + 1); // Multiply number by 1 or 2
|
|
4813
|
+
|
|
4814
|
+
sum += incNum > 9 ? incNum - 9 : incNum; // Sum the digits up and add to total
|
|
4815
|
+
}
|
|
4816
|
+
|
|
4817
|
+
return sum % 10 === 0;
|
|
4818
|
+
},
|
|
4819
|
+
'zh-TW': function zhTW(str) {
|
|
4820
|
+
var ALPHABET_CODES = {
|
|
4821
|
+
A: 10,
|
|
4822
|
+
B: 11,
|
|
4823
|
+
C: 12,
|
|
4824
|
+
D: 13,
|
|
4825
|
+
E: 14,
|
|
4826
|
+
F: 15,
|
|
4827
|
+
G: 16,
|
|
4828
|
+
H: 17,
|
|
4829
|
+
I: 34,
|
|
4830
|
+
J: 18,
|
|
4831
|
+
K: 19,
|
|
4832
|
+
L: 20,
|
|
4833
|
+
M: 21,
|
|
4834
|
+
N: 22,
|
|
4835
|
+
O: 35,
|
|
4836
|
+
P: 23,
|
|
4837
|
+
Q: 24,
|
|
4838
|
+
R: 25,
|
|
4839
|
+
S: 26,
|
|
4840
|
+
T: 27,
|
|
4841
|
+
U: 28,
|
|
4842
|
+
V: 29,
|
|
4843
|
+
W: 32,
|
|
4844
|
+
X: 30,
|
|
4845
|
+
Y: 31,
|
|
4846
|
+
Z: 33
|
|
4847
|
+
};
|
|
4848
|
+
var sanitized = str.trim().toUpperCase();
|
|
4849
|
+
if (!/^[A-Z][0-9]{9}$/.test(sanitized)) return false;
|
|
4850
|
+
return Array.from(sanitized).reduce(function (sum, number, index) {
|
|
4851
|
+
if (index === 0) {
|
|
4852
|
+
var code = ALPHABET_CODES[number];
|
|
4853
|
+
return code % 10 * 9 + Math.floor(code / 10);
|
|
4854
|
+
}
|
|
4855
|
+
|
|
4856
|
+
if (index === 9) {
|
|
4857
|
+
return (10 - sum % 10 - Number(number)) % 10 === 0;
|
|
4858
|
+
}
|
|
4859
|
+
|
|
4860
|
+
return sum + Number(number) * (9 - index);
|
|
4861
|
+
}, 0);
|
|
5599
4862
|
}
|
|
5600
4863
|
};
|
|
5601
4864
|
|
|
5602
|
-
function isIdentityCard(str) {
|
|
5603
|
-
var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'any';
|
|
4865
|
+
function isIdentityCard(str, locale) {
|
|
5604
4866
|
(0, _assertString.default)(str);
|
|
5605
4867
|
|
|
5606
4868
|
if (locale in validators) {
|
|
5607
4869
|
return validators[locale](str);
|
|
5608
4870
|
} else if (locale === 'any') {
|
|
5609
4871
|
for (var key in validators) {
|
|
4872
|
+
// https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes
|
|
4873
|
+
// istanbul ignore else
|
|
5610
4874
|
if (validators.hasOwnProperty(key)) {
|
|
5611
4875
|
var validator = validators[key];
|
|
5612
4876
|
|
|
@@ -5624,7 +4888,7 @@ function isIdentityCard(str) {
|
|
|
5624
4888
|
|
|
5625
4889
|
module.exports = exports.default;
|
|
5626
4890
|
module.exports.default = exports.default;
|
|
5627
|
-
},{"./util/assertString":
|
|
4891
|
+
},{"./util/assertString":78}],43:[function(require,module,exports){
|
|
5628
4892
|
"use strict";
|
|
5629
4893
|
|
|
5630
4894
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5648,6 +4912,8 @@ function isIn(str, options) {
|
|
|
5648
4912
|
var array = [];
|
|
5649
4913
|
|
|
5650
4914
|
for (i in options) {
|
|
4915
|
+
// https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes
|
|
4916
|
+
// istanbul ignore else
|
|
5651
4917
|
if ({}.hasOwnProperty.call(options, i)) {
|
|
5652
4918
|
array[i] = (0, _toString.default)(options[i]);
|
|
5653
4919
|
}
|
|
@@ -5665,7 +4931,7 @@ function isIn(str, options) {
|
|
|
5665
4931
|
|
|
5666
4932
|
module.exports = exports.default;
|
|
5667
4933
|
module.exports.default = exports.default;
|
|
5668
|
-
},{"./util/assertString":
|
|
4934
|
+
},{"./util/assertString":78,"./util/toString":81}],44:[function(require,module,exports){
|
|
5669
4935
|
"use strict";
|
|
5670
4936
|
|
|
5671
4937
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5696,7 +4962,7 @@ function isInt(str, options) {
|
|
|
5696
4962
|
|
|
5697
4963
|
module.exports = exports.default;
|
|
5698
4964
|
module.exports.default = exports.default;
|
|
5699
|
-
},{"./util/assertString":
|
|
4965
|
+
},{"./util/assertString":78}],45:[function(require,module,exports){
|
|
5700
4966
|
"use strict";
|
|
5701
4967
|
|
|
5702
4968
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5725,7 +4991,7 @@ function isJSON(str) {
|
|
|
5725
4991
|
|
|
5726
4992
|
module.exports = exports.default;
|
|
5727
4993
|
module.exports.default = exports.default;
|
|
5728
|
-
},{"./util/assertString":
|
|
4994
|
+
},{"./util/assertString":78}],46:[function(require,module,exports){
|
|
5729
4995
|
"use strict";
|
|
5730
4996
|
|
|
5731
4997
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5746,7 +5012,7 @@ function isJWT(str) {
|
|
|
5746
5012
|
|
|
5747
5013
|
module.exports = exports.default;
|
|
5748
5014
|
module.exports.default = exports.default;
|
|
5749
|
-
},{"./util/assertString":
|
|
5015
|
+
},{"./util/assertString":78}],47:[function(require,module,exports){
|
|
5750
5016
|
"use strict";
|
|
5751
5017
|
|
|
5752
5018
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5770,7 +5036,7 @@ function _default(str) {
|
|
|
5770
5036
|
|
|
5771
5037
|
module.exports = exports.default;
|
|
5772
5038
|
module.exports.default = exports.default;
|
|
5773
|
-
},{"./util/assertString":
|
|
5039
|
+
},{"./util/assertString":78}],48:[function(require,module,exports){
|
|
5774
5040
|
"use strict";
|
|
5775
5041
|
|
|
5776
5042
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5806,7 +5072,7 @@ function isLength(str, options) {
|
|
|
5806
5072
|
|
|
5807
5073
|
module.exports = exports.default;
|
|
5808
5074
|
module.exports.default = exports.default;
|
|
5809
|
-
},{"./util/assertString":
|
|
5075
|
+
},{"./util/assertString":78}],49:[function(require,module,exports){
|
|
5810
5076
|
"use strict";
|
|
5811
5077
|
|
|
5812
5078
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5825,7 +5091,7 @@ function isLowercase(str) {
|
|
|
5825
5091
|
|
|
5826
5092
|
module.exports = exports.default;
|
|
5827
5093
|
module.exports.default = exports.default;
|
|
5828
|
-
},{"./util/assertString":
|
|
5094
|
+
},{"./util/assertString":78}],50:[function(require,module,exports){
|
|
5829
5095
|
"use strict";
|
|
5830
5096
|
|
|
5831
5097
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5852,7 +5118,7 @@ function isMACAddress(str, options) {
|
|
|
5852
5118
|
|
|
5853
5119
|
module.exports = exports.default;
|
|
5854
5120
|
module.exports.default = exports.default;
|
|
5855
|
-
},{"./util/assertString":
|
|
5121
|
+
},{"./util/assertString":78}],51:[function(require,module,exports){
|
|
5856
5122
|
"use strict";
|
|
5857
5123
|
|
|
5858
5124
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5873,7 +5139,7 @@ function isMD5(str) {
|
|
|
5873
5139
|
|
|
5874
5140
|
module.exports = exports.default;
|
|
5875
5141
|
module.exports.default = exports.default;
|
|
5876
|
-
},{"./util/assertString":
|
|
5142
|
+
},{"./util/assertString":78}],52:[function(require,module,exports){
|
|
5877
5143
|
"use strict";
|
|
5878
5144
|
|
|
5879
5145
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5894,7 +5160,7 @@ function isMagnetURI(url) {
|
|
|
5894
5160
|
|
|
5895
5161
|
module.exports = exports.default;
|
|
5896
5162
|
module.exports.default = exports.default;
|
|
5897
|
-
},{"./util/assertString":
|
|
5163
|
+
},{"./util/assertString":78}],53:[function(require,module,exports){
|
|
5898
5164
|
"use strict";
|
|
5899
5165
|
|
|
5900
5166
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5946,7 +5212,7 @@ function isMimeType(str) {
|
|
|
5946
5212
|
|
|
5947
5213
|
module.exports = exports.default;
|
|
5948
5214
|
module.exports.default = exports.default;
|
|
5949
|
-
},{"./util/assertString":
|
|
5215
|
+
},{"./util/assertString":78}],54:[function(require,module,exports){
|
|
5950
5216
|
"use strict";
|
|
5951
5217
|
|
|
5952
5218
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5962,8 +5228,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
5962
5228
|
/* eslint-disable max-len */
|
|
5963
5229
|
var phones = {
|
|
5964
5230
|
'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/,
|
|
5231
|
+
'ar-BH': /^(\+?973)?(3|6)\d{7}$/,
|
|
5965
5232
|
'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/,
|
|
5966
|
-
'ar-EG': /^((\+?20)|0)?1[
|
|
5233
|
+
'ar-EG': /^((\+?20)|0)?1[0125]\d{8}$/,
|
|
5967
5234
|
'ar-IQ': /^(\+?964|0)?7[0-9]\d{8}$/,
|
|
5968
5235
|
'ar-JO': /^(\+?962|0)?7[789]\d{7}$/,
|
|
5969
5236
|
'ar-KW': /^(\+?965)[569]\d{7}$/,
|
|
@@ -5972,7 +5239,7 @@ var phones = {
|
|
|
5972
5239
|
'ar-TN': /^(\+?216)?[2459]\d{7}$/,
|
|
5973
5240
|
'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/,
|
|
5974
5241
|
'bg-BG': /^(\+?359|0)?8[789]\d{7}$/,
|
|
5975
|
-
'bn-BD':
|
|
5242
|
+
'bn-BD': /^(\+?880|0)1[1356789][0-9]{8}$/,
|
|
5976
5243
|
'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
|
|
5977
5244
|
'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,
|
|
5978
5245
|
'de-DE': /^(\+49)?0?1(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7}$/,
|
|
@@ -5983,7 +5250,8 @@ var phones = {
|
|
|
5983
5250
|
'en-HK': /^(\+?852\-?)?[456789]\d{3}\-?\d{4}$/,
|
|
5984
5251
|
'en-IE': /^(\+?353|0)8[356789]\d{7}$/,
|
|
5985
5252
|
'en-IN': /^(\+?91|0)?[6789]\d{9}$/,
|
|
5986
|
-
'en-KE': /^(\+?254|0)
|
|
5253
|
+
'en-KE': /^(\+?254|0)(7|1)\d{8}$/,
|
|
5254
|
+
'en-MT': /^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,
|
|
5987
5255
|
'en-MU': /^(\+?230|0)?\d{8}$/,
|
|
5988
5256
|
'en-NG': /^(\+?234|0)?[789]\d{9}$/,
|
|
5989
5257
|
'en-NZ': /^(\+?64|0)[28]\d{7,9}$/,
|
|
@@ -5995,12 +5263,15 @@ var phones = {
|
|
|
5995
5263
|
'en-US': /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,
|
|
5996
5264
|
'en-ZA': /^(\+?27|0)\d{9}$/,
|
|
5997
5265
|
'en-ZM': /^(\+?26)?09[567]\d{7}$/,
|
|
5266
|
+
'es-CL': /^(\+?56|0)[2-9]\d{1}\d{7}$/,
|
|
5998
5267
|
'es-ES': /^(\+?34)?(6\d{1}|7[1234])\d{7}$/,
|
|
5999
5268
|
'es-MX': /^(\+?52)?(1|01)?\d{10,11}$/,
|
|
5269
|
+
'es-PY': /^(\+?595|0)9[9876]\d{7}$/,
|
|
6000
5270
|
'es-UY': /^(\+598|0)9[1-9][\d]{6}$/,
|
|
6001
5271
|
'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,
|
|
6002
5272
|
'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,
|
|
6003
5273
|
'fi-FI': /^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/,
|
|
5274
|
+
'fj-FJ': /^(\+?679)?\s?\d{3}\s?\d{4}$/,
|
|
6004
5275
|
'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
|
|
6005
5276
|
'fr-FR': /^(\+?33|0)[67]\d{8}$/,
|
|
6006
5277
|
'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,
|
|
@@ -6015,6 +5286,7 @@ var phones = {
|
|
|
6015
5286
|
'ms-MY': /^(\+?6?01){1}(([0145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,
|
|
6016
5287
|
'nb-NO': /^(\+?47)?[49]\d{7}$/,
|
|
6017
5288
|
'nl-BE': /^(\+?32|0)4?\d{8}$/,
|
|
5289
|
+
'nl-NL': /^(\+?31|0)6?\d{8}$/,
|
|
6018
5290
|
'nn-NO': /^(\+?47)?[49]\d{7}$/,
|
|
6019
5291
|
'pl-PL': /^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,
|
|
6020
5292
|
'pt-BR': /(?=^(\+?5{2}\-?|0)[1-9]{2}\-?\d{4}\-?\d{4}$)(^(\+?5{2}\-?|0)[1-9]{2}\-?[6-9]{1}\d{3}\-?\d{4}$)|(^(\+?5{2}\-?|0)[1-9]{2}\-?9[6-9]{1}\d{3}\-?\d{4}$)/,
|
|
@@ -6028,8 +5300,8 @@ var phones = {
|
|
|
6028
5300
|
'th-TH': /^(\+66|66|0)\d{9}$/,
|
|
6029
5301
|
'tr-TR': /^(\+?90|0)?5\d{9}$/,
|
|
6030
5302
|
'uk-UA': /^(\+?38|8)?0\d{9}$/,
|
|
6031
|
-
'vi-VN': /^(\+?84|0)((3([2-9]))|(5([
|
|
6032
|
-
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|
|
|
5303
|
+
'vi-VN': /^(\+?84|0)((3([2-9]))|(5([2689]))|(7([0|6-9]))|(8([1-6|89]))|(9([0-9])))([0-9]{7})$/,
|
|
5304
|
+
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|6[67]|7[0135678]|9[189])[0-9]{8}$/,
|
|
6033
5305
|
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/
|
|
6034
5306
|
};
|
|
6035
5307
|
/* eslint-enable max-len */
|
|
@@ -6048,6 +5320,8 @@ function isMobilePhone(str, locale, options) {
|
|
|
6048
5320
|
|
|
6049
5321
|
if (Array.isArray(locale)) {
|
|
6050
5322
|
return locale.some(function (key) {
|
|
5323
|
+
// https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes
|
|
5324
|
+
// istanbul ignore else
|
|
6051
5325
|
if (phones.hasOwnProperty(key)) {
|
|
6052
5326
|
var phone = phones[key];
|
|
6053
5327
|
|
|
@@ -6062,6 +5336,7 @@ function isMobilePhone(str, locale, options) {
|
|
|
6062
5336
|
return phones[locale].test(str); // alias falsey locale as 'any'
|
|
6063
5337
|
} else if (!locale || locale === 'any') {
|
|
6064
5338
|
for (var key in phones) {
|
|
5339
|
+
// istanbul ignore else
|
|
6065
5340
|
if (phones.hasOwnProperty(key)) {
|
|
6066
5341
|
var phone = phones[key];
|
|
6067
5342
|
|
|
@@ -6079,7 +5354,7 @@ function isMobilePhone(str, locale, options) {
|
|
|
6079
5354
|
|
|
6080
5355
|
var locales = Object.keys(phones);
|
|
6081
5356
|
exports.locales = locales;
|
|
6082
|
-
},{"./util/assertString":
|
|
5357
|
+
},{"./util/assertString":78}],55:[function(require,module,exports){
|
|
6083
5358
|
"use strict";
|
|
6084
5359
|
|
|
6085
5360
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6100,7 +5375,7 @@ function isMongoId(str) {
|
|
|
6100
5375
|
|
|
6101
5376
|
module.exports = exports.default;
|
|
6102
5377
|
module.exports.default = exports.default;
|
|
6103
|
-
},{"./isHexadecimal":
|
|
5378
|
+
},{"./isHexadecimal":32,"./util/assertString":78}],56:[function(require,module,exports){
|
|
6104
5379
|
"use strict";
|
|
6105
5380
|
|
|
6106
5381
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6123,7 +5398,7 @@ function isMultibyte(str) {
|
|
|
6123
5398
|
|
|
6124
5399
|
module.exports = exports.default;
|
|
6125
5400
|
module.exports.default = exports.default;
|
|
6126
|
-
},{"./util/assertString":
|
|
5401
|
+
},{"./util/assertString":78}],57:[function(require,module,exports){
|
|
6127
5402
|
"use strict";
|
|
6128
5403
|
|
|
6129
5404
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6150,7 +5425,7 @@ function isNumeric(str, options) {
|
|
|
6150
5425
|
|
|
6151
5426
|
module.exports = exports.default;
|
|
6152
5427
|
module.exports.default = exports.default;
|
|
6153
|
-
},{"./util/assertString":
|
|
5428
|
+
},{"./util/assertString":78}],58:[function(require,module,exports){
|
|
6154
5429
|
"use strict";
|
|
6155
5430
|
|
|
6156
5431
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6171,7 +5446,7 @@ function isPort(str) {
|
|
|
6171
5446
|
|
|
6172
5447
|
module.exports = exports.default;
|
|
6173
5448
|
module.exports.default = exports.default;
|
|
6174
|
-
},{"./isInt":
|
|
5449
|
+
},{"./isInt":44}],59:[function(require,module,exports){
|
|
6175
5450
|
"use strict";
|
|
6176
5451
|
|
|
6177
5452
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6195,6 +5470,7 @@ var patterns = {
|
|
|
6195
5470
|
AU: fourDigit,
|
|
6196
5471
|
BE: fourDigit,
|
|
6197
5472
|
BG: fourDigit,
|
|
5473
|
+
BR: /^\d{5}-\d{3}$/,
|
|
6198
5474
|
CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,
|
|
6199
5475
|
CH: fourDigit,
|
|
6200
5476
|
CZ: /^\d{3}\s?\d{2}$/,
|
|
@@ -6209,6 +5485,7 @@ var patterns = {
|
|
|
6209
5485
|
GR: /^\d{3}\s?\d{2}$/,
|
|
6210
5486
|
HR: /^([1-5]\d{4}$)/,
|
|
6211
5487
|
HU: fourDigit,
|
|
5488
|
+
ID: fiveDigit,
|
|
6212
5489
|
IL: fiveDigit,
|
|
6213
5490
|
IN: sixDigit,
|
|
6214
5491
|
IS: threeDigit,
|
|
@@ -6220,9 +5497,12 @@ var patterns = {
|
|
|
6220
5497
|
LU: fourDigit,
|
|
6221
5498
|
LV: /^LV\-\d{4}$/,
|
|
6222
5499
|
MX: fiveDigit,
|
|
5500
|
+
MT: /^[A-Za-z]{3}\s{0,1}\d{4}$/,
|
|
6223
5501
|
NL: /^\d{4}\s?[a-z]{2}$/i,
|
|
6224
5502
|
NO: fourDigit,
|
|
5503
|
+
NZ: fourDigit,
|
|
6225
5504
|
PL: /^\d{2}\-\d{3}$/,
|
|
5505
|
+
PR: /^00[679]\d{2}([ -]\d{4})?$/,
|
|
6226
5506
|
PT: /^\d{4}\-\d{3}?$/,
|
|
6227
5507
|
RO: sixDigit,
|
|
6228
5508
|
RU: sixDigit,
|
|
@@ -6247,6 +5527,8 @@ function _default(str, locale) {
|
|
|
6247
5527
|
return patterns[locale].test(str);
|
|
6248
5528
|
} else if (locale === 'any') {
|
|
6249
5529
|
for (var key in patterns) {
|
|
5530
|
+
// https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes
|
|
5531
|
+
// istanbul ignore else
|
|
6250
5532
|
if (patterns.hasOwnProperty(key)) {
|
|
6251
5533
|
var pattern = patterns[key];
|
|
6252
5534
|
|
|
@@ -6261,7 +5543,7 @@ function _default(str, locale) {
|
|
|
6261
5543
|
|
|
6262
5544
|
throw new Error("Invalid locale '".concat(locale, "'"));
|
|
6263
5545
|
}
|
|
6264
|
-
},{"./util/assertString":
|
|
5546
|
+
},{"./util/assertString":78}],60:[function(require,module,exports){
|
|
6265
5547
|
"use strict";
|
|
6266
5548
|
|
|
6267
5549
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6295,7 +5577,7 @@ function isRFC3339(str) {
|
|
|
6295
5577
|
|
|
6296
5578
|
module.exports = exports.default;
|
|
6297
5579
|
module.exports.default = exports.default;
|
|
6298
|
-
},{"./util/assertString":
|
|
5580
|
+
},{"./util/assertString":78}],61:[function(require,module,exports){
|
|
6299
5581
|
"use strict";
|
|
6300
5582
|
|
|
6301
5583
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6316,7 +5598,7 @@ function isSurrogatePair(str) {
|
|
|
6316
5598
|
|
|
6317
5599
|
module.exports = exports.default;
|
|
6318
5600
|
module.exports.default = exports.default;
|
|
6319
|
-
},{"./util/assertString":
|
|
5601
|
+
},{"./util/assertString":78}],62:[function(require,module,exports){
|
|
6320
5602
|
"use strict";
|
|
6321
5603
|
|
|
6322
5604
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6469,7 +5751,7 @@ function isURL(url, options) {
|
|
|
6469
5751
|
|
|
6470
5752
|
module.exports = exports.default;
|
|
6471
5753
|
module.exports.default = exports.default;
|
|
6472
|
-
},{"./isFQDN":
|
|
5754
|
+
},{"./isFQDN":26,"./isIP":33,"./util/assertString":78,"./util/merge":80}],63:[function(require,module,exports){
|
|
6473
5755
|
"use strict";
|
|
6474
5756
|
|
|
6475
5757
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6497,7 +5779,7 @@ function isUUID(str) {
|
|
|
6497
5779
|
|
|
6498
5780
|
module.exports = exports.default;
|
|
6499
5781
|
module.exports.default = exports.default;
|
|
6500
|
-
},{"./util/assertString":
|
|
5782
|
+
},{"./util/assertString":78}],64:[function(require,module,exports){
|
|
6501
5783
|
"use strict";
|
|
6502
5784
|
|
|
6503
5785
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6516,7 +5798,7 @@ function isUppercase(str) {
|
|
|
6516
5798
|
|
|
6517
5799
|
module.exports = exports.default;
|
|
6518
5800
|
module.exports.default = exports.default;
|
|
6519
|
-
},{"./util/assertString":
|
|
5801
|
+
},{"./util/assertString":78}],65:[function(require,module,exports){
|
|
6520
5802
|
"use strict";
|
|
6521
5803
|
|
|
6522
5804
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6539,7 +5821,7 @@ function isVariableWidth(str) {
|
|
|
6539
5821
|
|
|
6540
5822
|
module.exports = exports.default;
|
|
6541
5823
|
module.exports.default = exports.default;
|
|
6542
|
-
},{"./isFullWidth":
|
|
5824
|
+
},{"./isFullWidth":28,"./isHalfWidth":29,"./util/assertString":78}],66:[function(require,module,exports){
|
|
6543
5825
|
"use strict";
|
|
6544
5826
|
|
|
6545
5827
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6565,7 +5847,7 @@ function isWhitelisted(str, chars) {
|
|
|
6565
5847
|
|
|
6566
5848
|
module.exports = exports.default;
|
|
6567
5849
|
module.exports.default = exports.default;
|
|
6568
|
-
},{"./util/assertString":
|
|
5850
|
+
},{"./util/assertString":78}],67:[function(require,module,exports){
|
|
6569
5851
|
"use strict";
|
|
6570
5852
|
|
|
6571
5853
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6578,14 +5860,15 @@ var _assertString = _interopRequireDefault(require("./util/assertString"));
|
|
|
6578
5860
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6579
5861
|
|
|
6580
5862
|
function ltrim(str, chars) {
|
|
6581
|
-
(0, _assertString.default)(str);
|
|
6582
|
-
|
|
5863
|
+
(0, _assertString.default)(str); // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
|
|
5864
|
+
|
|
5865
|
+
var pattern = chars ? new RegExp("^[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "]+"), 'g') : /^\s+/g;
|
|
6583
5866
|
return str.replace(pattern, '');
|
|
6584
5867
|
}
|
|
6585
5868
|
|
|
6586
5869
|
module.exports = exports.default;
|
|
6587
5870
|
module.exports.default = exports.default;
|
|
6588
|
-
},{"./util/assertString":
|
|
5871
|
+
},{"./util/assertString":78}],68:[function(require,module,exports){
|
|
6589
5872
|
"use strict";
|
|
6590
5873
|
|
|
6591
5874
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6609,7 +5892,7 @@ function matches(str, pattern, modifiers) {
|
|
|
6609
5892
|
|
|
6610
5893
|
module.exports = exports.default;
|
|
6611
5894
|
module.exports.default = exports.default;
|
|
6612
|
-
},{"./util/assertString":
|
|
5895
|
+
},{"./util/assertString":78}],69:[function(require,module,exports){
|
|
6613
5896
|
"use strict";
|
|
6614
5897
|
|
|
6615
5898
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6761,7 +6044,7 @@ function normalizeEmail(email, options) {
|
|
|
6761
6044
|
|
|
6762
6045
|
module.exports = exports.default;
|
|
6763
6046
|
module.exports.default = exports.default;
|
|
6764
|
-
},{"./util/merge":
|
|
6047
|
+
},{"./util/merge":80}],70:[function(require,module,exports){
|
|
6765
6048
|
"use strict";
|
|
6766
6049
|
|
|
6767
6050
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6774,20 +6057,15 @@ var _assertString = _interopRequireDefault(require("./util/assertString"));
|
|
|
6774
6057
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6775
6058
|
|
|
6776
6059
|
function rtrim(str, chars) {
|
|
6777
|
-
(0, _assertString.default)(str);
|
|
6778
|
-
var pattern = chars ? new RegExp("[".concat(chars, "]")) : /\s/;
|
|
6779
|
-
var idx = str.length - 1;
|
|
6060
|
+
(0, _assertString.default)(str); // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
|
|
6780
6061
|
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
}
|
|
6784
|
-
|
|
6785
|
-
return idx < str.length ? str.substr(0, idx + 1) : str;
|
|
6062
|
+
var pattern = chars ? new RegExp("[".concat(chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), "]+$"), 'g') : /\s+$/g;
|
|
6063
|
+
return str.replace(pattern, '');
|
|
6786
6064
|
}
|
|
6787
6065
|
|
|
6788
6066
|
module.exports = exports.default;
|
|
6789
6067
|
module.exports.default = exports.default;
|
|
6790
|
-
},{"./util/assertString":
|
|
6068
|
+
},{"./util/assertString":78}],71:[function(require,module,exports){
|
|
6791
6069
|
"use strict";
|
|
6792
6070
|
|
|
6793
6071
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6809,7 +6087,7 @@ function stripLow(str, keep_new_lines) {
|
|
|
6809
6087
|
|
|
6810
6088
|
module.exports = exports.default;
|
|
6811
6089
|
module.exports.default = exports.default;
|
|
6812
|
-
},{"./blacklist":
|
|
6090
|
+
},{"./blacklist":6,"./util/assertString":78}],72:[function(require,module,exports){
|
|
6813
6091
|
"use strict";
|
|
6814
6092
|
|
|
6815
6093
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6833,7 +6111,7 @@ function toBoolean(str, strict) {
|
|
|
6833
6111
|
|
|
6834
6112
|
module.exports = exports.default;
|
|
6835
6113
|
module.exports.default = exports.default;
|
|
6836
|
-
},{"./util/assertString":
|
|
6114
|
+
},{"./util/assertString":78}],73:[function(require,module,exports){
|
|
6837
6115
|
"use strict";
|
|
6838
6116
|
|
|
6839
6117
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6853,7 +6131,7 @@ function toDate(date) {
|
|
|
6853
6131
|
|
|
6854
6132
|
module.exports = exports.default;
|
|
6855
6133
|
module.exports.default = exports.default;
|
|
6856
|
-
},{"./util/assertString":
|
|
6134
|
+
},{"./util/assertString":78}],74:[function(require,module,exports){
|
|
6857
6135
|
"use strict";
|
|
6858
6136
|
|
|
6859
6137
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6872,7 +6150,7 @@ function toFloat(str) {
|
|
|
6872
6150
|
|
|
6873
6151
|
module.exports = exports.default;
|
|
6874
6152
|
module.exports.default = exports.default;
|
|
6875
|
-
},{"./util/assertString":
|
|
6153
|
+
},{"./util/assertString":78}],75:[function(require,module,exports){
|
|
6876
6154
|
"use strict";
|
|
6877
6155
|
|
|
6878
6156
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6891,7 +6169,7 @@ function toInt(str, radix) {
|
|
|
6891
6169
|
|
|
6892
6170
|
module.exports = exports.default;
|
|
6893
6171
|
module.exports.default = exports.default;
|
|
6894
|
-
},{"./util/assertString":
|
|
6172
|
+
},{"./util/assertString":78}],76:[function(require,module,exports){
|
|
6895
6173
|
"use strict";
|
|
6896
6174
|
|
|
6897
6175
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6911,7 +6189,7 @@ function trim(str, chars) {
|
|
|
6911
6189
|
|
|
6912
6190
|
module.exports = exports.default;
|
|
6913
6191
|
module.exports.default = exports.default;
|
|
6914
|
-
},{"./ltrim":
|
|
6192
|
+
},{"./ltrim":67,"./rtrim":70}],77:[function(require,module,exports){
|
|
6915
6193
|
"use strict";
|
|
6916
6194
|
|
|
6917
6195
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6930,7 +6208,7 @@ function unescape(str) {
|
|
|
6930
6208
|
|
|
6931
6209
|
module.exports = exports.default;
|
|
6932
6210
|
module.exports.default = exports.default;
|
|
6933
|
-
},{"./util/assertString":
|
|
6211
|
+
},{"./util/assertString":78}],78:[function(require,module,exports){
|
|
6934
6212
|
"use strict";
|
|
6935
6213
|
|
|
6936
6214
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6964,7 +6242,7 @@ function assertString(input) {
|
|
|
6964
6242
|
|
|
6965
6243
|
module.exports = exports.default;
|
|
6966
6244
|
module.exports.default = exports.default;
|
|
6967
|
-
},{}],
|
|
6245
|
+
},{}],79:[function(require,module,exports){
|
|
6968
6246
|
"use strict";
|
|
6969
6247
|
|
|
6970
6248
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6982,7 +6260,7 @@ var _default = includes;
|
|
|
6982
6260
|
exports.default = _default;
|
|
6983
6261
|
module.exports = exports.default;
|
|
6984
6262
|
module.exports.default = exports.default;
|
|
6985
|
-
},{}],
|
|
6263
|
+
},{}],80:[function(require,module,exports){
|
|
6986
6264
|
"use strict";
|
|
6987
6265
|
|
|
6988
6266
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -7005,7 +6283,7 @@ function merge() {
|
|
|
7005
6283
|
|
|
7006
6284
|
module.exports = exports.default;
|
|
7007
6285
|
module.exports.default = exports.default;
|
|
7008
|
-
},{}],
|
|
6286
|
+
},{}],81:[function(require,module,exports){
|
|
7009
6287
|
"use strict";
|
|
7010
6288
|
|
|
7011
6289
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -7031,7 +6309,7 @@ function toString(input) {
|
|
|
7031
6309
|
|
|
7032
6310
|
module.exports = exports.default;
|
|
7033
6311
|
module.exports.default = exports.default;
|
|
7034
|
-
},{}],
|
|
6312
|
+
},{}],82:[function(require,module,exports){
|
|
7035
6313
|
"use strict";
|
|
7036
6314
|
|
|
7037
6315
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -7050,7 +6328,7 @@ function whitelist(str, chars) {
|
|
|
7050
6328
|
|
|
7051
6329
|
module.exports = exports.default;
|
|
7052
6330
|
module.exports.default = exports.default;
|
|
7053
|
-
},{"./util/assertString":
|
|
6331
|
+
},{"./util/assertString":78}],83:[function(require,module,exports){
|
|
7054
6332
|
"use strict";
|
|
7055
6333
|
|
|
7056
6334
|
module.exports = {
|
|
@@ -7112,7 +6390,7 @@ module.exports = {
|
|
|
7112
6390
|
|
|
7113
6391
|
};
|
|
7114
6392
|
|
|
7115
|
-
},{}],
|
|
6393
|
+
},{}],84:[function(require,module,exports){
|
|
7116
6394
|
/*jshint maxlen: false*/
|
|
7117
6395
|
|
|
7118
6396
|
var validator = require("validator");
|
|
@@ -7243,7 +6521,7 @@ var FormatValidators = {
|
|
|
7243
6521
|
|
|
7244
6522
|
module.exports = FormatValidators;
|
|
7245
6523
|
|
|
7246
|
-
},{"validator":
|
|
6524
|
+
},{"validator":4}],85:[function(require,module,exports){
|
|
7247
6525
|
"use strict";
|
|
7248
6526
|
|
|
7249
6527
|
var FormatValidators = require("./FormatValidators"),
|
|
@@ -7267,7 +6545,9 @@ var JsonValidators = {
|
|
|
7267
6545
|
return;
|
|
7268
6546
|
}
|
|
7269
6547
|
|
|
7270
|
-
|
|
6548
|
+
var stringMultipleOf = String(schema.multipleOf);
|
|
6549
|
+
var scale = Math.pow(10, stringMultipleOf.length - stringMultipleOf.indexOf(".") - 1);
|
|
6550
|
+
if (Utils.whatIs((json * scale) / (schema.multipleOf * scale)) !== "integer") {
|
|
7271
6551
|
report.addError("MULTIPLE_OF", [json, schema.multipleOf], null, schema);
|
|
7272
6552
|
}
|
|
7273
6553
|
},
|
|
@@ -7851,7 +7131,7 @@ exports.validate = function (report, schema, json) {
|
|
|
7851
7131
|
}
|
|
7852
7132
|
|
|
7853
7133
|
if (typeof this.options.customValidator === "function") {
|
|
7854
|
-
this.options.customValidator(report, schema, json);
|
|
7134
|
+
this.options.customValidator.call(this, report, schema, json);
|
|
7855
7135
|
}
|
|
7856
7136
|
|
|
7857
7137
|
// we don't need the root pointer anymore
|
|
@@ -7864,7 +7144,7 @@ exports.validate = function (report, schema, json) {
|
|
|
7864
7144
|
|
|
7865
7145
|
};
|
|
7866
7146
|
|
|
7867
|
-
},{"./FormatValidators":
|
|
7147
|
+
},{"./FormatValidators":84,"./Report":87,"./Utils":91}],86:[function(require,module,exports){
|
|
7868
7148
|
// Number.isFinite polyfill
|
|
7869
7149
|
// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite
|
|
7870
7150
|
if (typeof Number.isFinite !== "function") {
|
|
@@ -7882,7 +7162,7 @@ if (typeof Number.isFinite !== "function") {
|
|
|
7882
7162
|
};
|
|
7883
7163
|
}
|
|
7884
7164
|
|
|
7885
|
-
},{}],
|
|
7165
|
+
},{}],87:[function(require,module,exports){
|
|
7886
7166
|
(function (process){
|
|
7887
7167
|
"use strict";
|
|
7888
7168
|
|
|
@@ -8185,7 +7465,7 @@ Report.prototype.addCustomError = function (errorCode, errorMessage, params, sub
|
|
|
8185
7465
|
module.exports = Report;
|
|
8186
7466
|
|
|
8187
7467
|
}).call(this,require('_process'))
|
|
8188
|
-
},{"./Errors":
|
|
7468
|
+
},{"./Errors":83,"./Utils":91,"_process":3,"lodash.get":1}],88:[function(require,module,exports){
|
|
8189
7469
|
"use strict";
|
|
8190
7470
|
|
|
8191
7471
|
var isequal = require("lodash.isequal");
|
|
@@ -8375,7 +7655,7 @@ exports.getSchemaByUri = function (report, uri, root) {
|
|
|
8375
7655
|
|
|
8376
7656
|
exports.getRemotePath = getRemotePath;
|
|
8377
7657
|
|
|
8378
|
-
},{"./Report":
|
|
7658
|
+
},{"./Report":87,"./SchemaCompilation":89,"./SchemaValidation":90,"./Utils":91,"lodash.isequal":2}],89:[function(require,module,exports){
|
|
8379
7659
|
"use strict";
|
|
8380
7660
|
|
|
8381
7661
|
var Report = require("./Report");
|
|
@@ -8676,7 +7956,7 @@ exports.compileSchema = function (report, schema) {
|
|
|
8676
7956
|
|
|
8677
7957
|
};
|
|
8678
7958
|
|
|
8679
|
-
},{"./Report":
|
|
7959
|
+
},{"./Report":87,"./SchemaCache":88,"./Utils":91}],90:[function(require,module,exports){
|
|
8680
7960
|
"use strict";
|
|
8681
7961
|
|
|
8682
7962
|
var FormatValidators = require("./FormatValidators"),
|
|
@@ -9297,11 +8577,9 @@ exports.validateSchema = function (report, schema) {
|
|
|
9297
8577
|
return isValid;
|
|
9298
8578
|
};
|
|
9299
8579
|
|
|
9300
|
-
},{"./FormatValidators":
|
|
8580
|
+
},{"./FormatValidators":84,"./JsonValidation":85,"./Report":87,"./Utils":91}],91:[function(require,module,exports){
|
|
9301
8581
|
"use strict";
|
|
9302
8582
|
|
|
9303
|
-
require("core-js/es6/symbol");
|
|
9304
|
-
|
|
9305
8583
|
exports.jsonSymbol = Symbol.for("z-schema/json");
|
|
9306
8584
|
|
|
9307
8585
|
exports.schemaSymbol = Symbol.for("z-schema/schema");
|
|
@@ -9499,15 +8777,15 @@ exports.clone = function (src) {
|
|
|
9499
8777
|
};
|
|
9500
8778
|
|
|
9501
8779
|
exports.cloneDeep = function (src) {
|
|
9502
|
-
var visited =
|
|
8780
|
+
var vidx = 0, visited = new Map(), cloned = [];
|
|
9503
8781
|
function cloneDeep(src) {
|
|
9504
8782
|
if (typeof src !== "object" || src === null) { return src; }
|
|
9505
8783
|
var res, idx, cidx;
|
|
9506
8784
|
|
|
9507
|
-
cidx = visited.
|
|
9508
|
-
if (cidx !==
|
|
8785
|
+
cidx = visited.get(src);
|
|
8786
|
+
if (cidx !== undefined) { return cloned[cidx]; }
|
|
9509
8787
|
|
|
9510
|
-
visited.
|
|
8788
|
+
visited.set(src, vidx++);
|
|
9511
8789
|
if (Array.isArray(src)) {
|
|
9512
8790
|
res = [];
|
|
9513
8791
|
cloned.push(res);
|
|
@@ -9575,7 +8853,7 @@ exports.ucs2decode = function (string) {
|
|
|
9575
8853
|
};
|
|
9576
8854
|
/*jshint +W016*/
|
|
9577
8855
|
|
|
9578
|
-
},{
|
|
8856
|
+
},{}],92:[function(require,module,exports){
|
|
9579
8857
|
(function (process){
|
|
9580
8858
|
"use strict";
|
|
9581
8859
|
|
|
@@ -9988,7 +9266,7 @@ ZSchema.jsonSymbol = Utils.jsonSymbol;
|
|
|
9988
9266
|
module.exports = ZSchema;
|
|
9989
9267
|
|
|
9990
9268
|
}).call(this,require('_process'))
|
|
9991
|
-
},{"./FormatValidators":
|
|
9269
|
+
},{"./FormatValidators":84,"./JsonValidation":85,"./Polyfills":86,"./Report":87,"./SchemaCache":88,"./SchemaCompilation":89,"./SchemaValidation":90,"./Utils":91,"./schemas/hyper-schema.json":93,"./schemas/schema.json":94,"_process":3,"lodash.get":1}],93:[function(require,module,exports){
|
|
9992
9270
|
module.exports={
|
|
9993
9271
|
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
|
|
9994
9272
|
"id": "http://json-schema.org/draft-04/hyper-schema#",
|
|
@@ -10148,7 +9426,7 @@ module.exports={
|
|
|
10148
9426
|
}
|
|
10149
9427
|
|
|
10150
9428
|
|
|
10151
|
-
},{}],
|
|
9429
|
+
},{}],94:[function(require,module,exports){
|
|
10152
9430
|
module.exports={
|
|
10153
9431
|
"id": "http://json-schema.org/draft-04/schema#",
|
|
10154
9432
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
@@ -10301,5 +9579,5 @@ module.exports={
|
|
|
10301
9579
|
"default": {}
|
|
10302
9580
|
}
|
|
10303
9581
|
|
|
10304
|
-
},{}]},{},[
|
|
9582
|
+
},{}]},{},[83,84,85,86,87,88,89,90,91,92])(92)
|
|
10305
9583
|
});
|