@localazy/cdn-client 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- (function(global2, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("isomorphic-fetch")) : typeof define === "function" && define.amd ? define(["exports", "isomorphic-fetch"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.LocalazyCDN = {}));
1
+ (function(global, factory) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("isomorphic-fetch")) : typeof define === "function" && define.amd ? define(["exports", "isomorphic-fetch"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.LocalazyCDN = {}));
3
3
  })(this, function(exports2) {
4
4
  "use strict";var __defProp = Object.defineProperty;
5
5
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => {
7
7
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
8
8
  return value;
9
9
  };
10
- /* @localazy/cdn-client@1.2.1
10
+ /* @localazy/cdn-client@1.3.0
11
11
  * (c) 2024 Localazy <team@localazy.com>
12
12
  * @license MIT */
13
13
 
@@ -28,468 +28,22 @@ var __publicField = (obj, key, value) => {
28
28
  return await this.context.client.get(this.context.metafile.params.jsonPath);
29
29
  }
30
30
  }
31
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
32
- function getDefaultExportFromCjs(x) {
33
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
34
- }
35
- var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
36
- var _freeGlobal = freeGlobal$1;
37
- var freeGlobal = _freeGlobal;
38
- var freeSelf = typeof self == "object" && self && self.Object === Object && self;
39
- var root$8 = freeGlobal || freeSelf || Function("return this")();
40
- var _root = root$8;
41
- var root$7 = _root;
42
- var Symbol$6 = root$7.Symbol;
43
- var _Symbol = Symbol$6;
44
- var Symbol$5 = _Symbol;
45
- var objectProto$f = Object.prototype;
46
- var hasOwnProperty$c = objectProto$f.hasOwnProperty;
47
- var nativeObjectToString$1 = objectProto$f.toString;
48
- var symToStringTag$1 = Symbol$5 ? Symbol$5.toStringTag : void 0;
49
- function getRawTag$1(value) {
50
- var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
51
- try {
52
- value[symToStringTag$1] = void 0;
53
- var unmasked = true;
54
- } catch (e) {
55
- }
56
- var result = nativeObjectToString$1.call(value);
57
- if (unmasked) {
58
- if (isOwn) {
59
- value[symToStringTag$1] = tag;
60
- } else {
61
- delete value[symToStringTag$1];
62
- }
63
- }
64
- return result;
65
- }
66
- var _getRawTag = getRawTag$1;
67
- var objectProto$e = Object.prototype;
68
- var nativeObjectToString = objectProto$e.toString;
69
- function objectToString$1(value) {
70
- return nativeObjectToString.call(value);
71
- }
72
- var _objectToString = objectToString$1;
73
- var Symbol$4 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
74
- var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
75
- var symToStringTag = Symbol$4 ? Symbol$4.toStringTag : void 0;
76
- function baseGetTag$7(value) {
77
- if (value == null) {
78
- return value === void 0 ? undefinedTag : nullTag;
79
- }
80
- return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
81
- }
82
- var _baseGetTag = baseGetTag$7;
83
- function isObject$7(value) {
84
- var type = typeof value;
85
- return value != null && (type == "object" || type == "function");
86
- }
87
- var isObject_1 = isObject$7;
88
- var baseGetTag$6 = _baseGetTag, isObject$6 = isObject_1;
89
- var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
90
- function isFunction$2(value) {
91
- if (!isObject$6(value)) {
92
- return false;
93
- }
94
- var tag = baseGetTag$6(value);
95
- return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
96
- }
97
- var isFunction_1 = isFunction$2;
98
- const isFunction$3 = /* @__PURE__ */ getDefaultExportFromCjs(isFunction_1);
99
- var root$6 = _root;
100
- var coreJsData$1 = root$6["__core-js_shared__"];
101
- var _coreJsData = coreJsData$1;
102
- var coreJsData = _coreJsData;
103
- var maskSrcKey = function() {
104
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
105
- return uid ? "Symbol(src)_1." + uid : "";
106
- }();
107
- function isMasked$1(func) {
108
- return !!maskSrcKey && maskSrcKey in func;
109
- }
110
- var _isMasked = isMasked$1;
111
- var funcProto$2 = Function.prototype;
112
- var funcToString$2 = funcProto$2.toString;
113
- function toSource$2(func) {
114
- if (func != null) {
115
- try {
116
- return funcToString$2.call(func);
117
- } catch (e) {
118
- }
119
- try {
120
- return func + "";
121
- } catch (e) {
122
- }
123
- }
124
- return "";
125
- }
126
- var _toSource = toSource$2;
127
- var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject$5 = isObject_1, toSource$1 = _toSource;
128
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
129
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
130
- var funcProto$1 = Function.prototype, objectProto$d = Object.prototype;
131
- var funcToString$1 = funcProto$1.toString;
132
- var hasOwnProperty$b = objectProto$d.hasOwnProperty;
133
- var reIsNative = RegExp(
134
- "^" + funcToString$1.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
135
- );
136
- function baseIsNative$1(value) {
137
- if (!isObject$5(value) || isMasked(value)) {
138
- return false;
139
- }
140
- var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
141
- return pattern.test(toSource$1(value));
142
- }
143
- var _baseIsNative = baseIsNative$1;
144
- function getValue$1(object, key) {
145
- return object == null ? void 0 : object[key];
146
- }
147
- var _getValue = getValue$1;
148
- var baseIsNative = _baseIsNative, getValue = _getValue;
149
- function getNative$7(object, key) {
150
- var value = getValue(object, key);
151
- return baseIsNative(value) ? value : void 0;
152
- }
153
- var _getNative = getNative$7;
154
- var getNative$6 = _getNative;
155
- var nativeCreate$4 = getNative$6(Object, "create");
156
- var _nativeCreate = nativeCreate$4;
157
- var nativeCreate$3 = _nativeCreate;
158
- function hashClear$1() {
159
- this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
160
- this.size = 0;
161
- }
162
- var _hashClear = hashClear$1;
163
- function hashDelete$1(key) {
164
- var result = this.has(key) && delete this.__data__[key];
165
- this.size -= result ? 1 : 0;
166
- return result;
167
- }
168
- var _hashDelete = hashDelete$1;
169
- var nativeCreate$2 = _nativeCreate;
170
- var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
171
- var objectProto$c = Object.prototype;
172
- var hasOwnProperty$a = objectProto$c.hasOwnProperty;
173
- function hashGet$1(key) {
174
- var data = this.__data__;
175
- if (nativeCreate$2) {
176
- var result = data[key];
177
- return result === HASH_UNDEFINED$2 ? void 0 : result;
178
- }
179
- return hasOwnProperty$a.call(data, key) ? data[key] : void 0;
180
- }
181
- var _hashGet = hashGet$1;
182
- var nativeCreate$1 = _nativeCreate;
183
- var objectProto$b = Object.prototype;
184
- var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
185
- function hashHas$1(key) {
186
- var data = this.__data__;
187
- return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$9.call(data, key);
188
- }
189
- var _hashHas = hashHas$1;
190
- var nativeCreate = _nativeCreate;
191
- var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
192
- function hashSet$1(key, value) {
193
- var data = this.__data__;
194
- this.size += this.has(key) ? 0 : 1;
195
- data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
196
- return this;
197
- }
198
- var _hashSet = hashSet$1;
199
- var hashClear = _hashClear, hashDelete = _hashDelete, hashGet = _hashGet, hashHas = _hashHas, hashSet = _hashSet;
200
- function Hash$1(entries) {
201
- var index = -1, length = entries == null ? 0 : entries.length;
202
- this.clear();
203
- while (++index < length) {
204
- var entry = entries[index];
205
- this.set(entry[0], entry[1]);
206
- }
207
- }
208
- Hash$1.prototype.clear = hashClear;
209
- Hash$1.prototype["delete"] = hashDelete;
210
- Hash$1.prototype.get = hashGet;
211
- Hash$1.prototype.has = hashHas;
212
- Hash$1.prototype.set = hashSet;
213
- var _Hash = Hash$1;
214
- function listCacheClear$1() {
215
- this.__data__ = [];
216
- this.size = 0;
217
- }
218
- var _listCacheClear = listCacheClear$1;
219
- function eq$3(value, other) {
220
- return value === other || value !== value && other !== other;
221
- }
222
- var eq_1 = eq$3;
223
- var eq$2 = eq_1;
224
- function assocIndexOf$4(array, key) {
225
- var length = array.length;
226
- while (length--) {
227
- if (eq$2(array[length][0], key)) {
228
- return length;
229
- }
230
- }
231
- return -1;
232
- }
233
- var _assocIndexOf = assocIndexOf$4;
234
- var assocIndexOf$3 = _assocIndexOf;
235
- var arrayProto = Array.prototype;
236
- var splice = arrayProto.splice;
237
- function listCacheDelete$1(key) {
238
- var data = this.__data__, index = assocIndexOf$3(data, key);
239
- if (index < 0) {
240
- return false;
241
- }
242
- var lastIndex = data.length - 1;
243
- if (index == lastIndex) {
244
- data.pop();
245
- } else {
246
- splice.call(data, index, 1);
247
- }
248
- --this.size;
249
- return true;
250
- }
251
- var _listCacheDelete = listCacheDelete$1;
252
- var assocIndexOf$2 = _assocIndexOf;
253
- function listCacheGet$1(key) {
254
- var data = this.__data__, index = assocIndexOf$2(data, key);
255
- return index < 0 ? void 0 : data[index][1];
256
- }
257
- var _listCacheGet = listCacheGet$1;
258
- var assocIndexOf$1 = _assocIndexOf;
259
- function listCacheHas$1(key) {
260
- return assocIndexOf$1(this.__data__, key) > -1;
261
- }
262
- var _listCacheHas = listCacheHas$1;
263
- var assocIndexOf = _assocIndexOf;
264
- function listCacheSet$1(key, value) {
265
- var data = this.__data__, index = assocIndexOf(data, key);
266
- if (index < 0) {
267
- ++this.size;
268
- data.push([key, value]);
269
- } else {
270
- data[index][1] = value;
271
- }
272
- return this;
273
- }
274
- var _listCacheSet = listCacheSet$1;
275
- var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet;
276
- function ListCache$4(entries) {
277
- var index = -1, length = entries == null ? 0 : entries.length;
278
- this.clear();
279
- while (++index < length) {
280
- var entry = entries[index];
281
- this.set(entry[0], entry[1]);
282
- }
283
- }
284
- ListCache$4.prototype.clear = listCacheClear;
285
- ListCache$4.prototype["delete"] = listCacheDelete;
286
- ListCache$4.prototype.get = listCacheGet;
287
- ListCache$4.prototype.has = listCacheHas;
288
- ListCache$4.prototype.set = listCacheSet;
289
- var _ListCache = ListCache$4;
290
- var getNative$5 = _getNative, root$5 = _root;
291
- var Map$4 = getNative$5(root$5, "Map");
292
- var _Map = Map$4;
293
- var Hash = _Hash, ListCache$3 = _ListCache, Map$3 = _Map;
294
- function mapCacheClear$1() {
295
- this.size = 0;
296
- this.__data__ = {
297
- "hash": new Hash(),
298
- "map": new (Map$3 || ListCache$3)(),
299
- "string": new Hash()
300
- };
301
- }
302
- var _mapCacheClear = mapCacheClear$1;
303
- function isKeyable$1(value) {
304
- var type = typeof value;
305
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
306
- }
307
- var _isKeyable = isKeyable$1;
308
- var isKeyable = _isKeyable;
309
- function getMapData$4(map, key) {
310
- var data = map.__data__;
311
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
312
- }
313
- var _getMapData = getMapData$4;
314
- var getMapData$3 = _getMapData;
315
- function mapCacheDelete$1(key) {
316
- var result = getMapData$3(this, key)["delete"](key);
317
- this.size -= result ? 1 : 0;
318
- return result;
319
- }
320
- var _mapCacheDelete = mapCacheDelete$1;
321
- var getMapData$2 = _getMapData;
322
- function mapCacheGet$1(key) {
323
- return getMapData$2(this, key).get(key);
324
- }
325
- var _mapCacheGet = mapCacheGet$1;
326
- var getMapData$1 = _getMapData;
327
- function mapCacheHas$1(key) {
328
- return getMapData$1(this, key).has(key);
329
- }
330
- var _mapCacheHas = mapCacheHas$1;
331
- var getMapData = _getMapData;
332
- function mapCacheSet$1(key, value) {
333
- var data = getMapData(this, key), size = data.size;
334
- data.set(key, value);
335
- this.size += data.size == size ? 0 : 1;
336
- return this;
337
- }
338
- var _mapCacheSet = mapCacheSet$1;
339
- var mapCacheClear = _mapCacheClear, mapCacheDelete = _mapCacheDelete, mapCacheGet = _mapCacheGet, mapCacheHas = _mapCacheHas, mapCacheSet = _mapCacheSet;
340
- function MapCache$3(entries) {
341
- var index = -1, length = entries == null ? 0 : entries.length;
342
- this.clear();
343
- while (++index < length) {
344
- var entry = entries[index];
345
- this.set(entry[0], entry[1]);
346
- }
347
- }
348
- MapCache$3.prototype.clear = mapCacheClear;
349
- MapCache$3.prototype["delete"] = mapCacheDelete;
350
- MapCache$3.prototype.get = mapCacheGet;
351
- MapCache$3.prototype.has = mapCacheHas;
352
- MapCache$3.prototype.set = mapCacheSet;
353
- var _MapCache = MapCache$3;
354
- var HASH_UNDEFINED = "__lodash_hash_undefined__";
355
- function setCacheAdd$1(value) {
356
- this.__data__.set(value, HASH_UNDEFINED);
357
- return this;
358
- }
359
- var _setCacheAdd = setCacheAdd$1;
360
- function setCacheHas$1(value) {
361
- return this.__data__.has(value);
362
- }
363
- var _setCacheHas = setCacheHas$1;
364
- var MapCache$2 = _MapCache, setCacheAdd = _setCacheAdd, setCacheHas = _setCacheHas;
365
- function SetCache$2(values) {
366
- var index = -1, length = values == null ? 0 : values.length;
367
- this.__data__ = new MapCache$2();
368
- while (++index < length) {
369
- this.add(values[index]);
370
- }
371
- }
372
- SetCache$2.prototype.add = SetCache$2.prototype.push = setCacheAdd;
373
- SetCache$2.prototype.has = setCacheHas;
374
- var _SetCache = SetCache$2;
375
- function baseFindIndex$2(array, predicate, fromIndex, fromRight) {
376
- var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
377
- while (fromRight ? index-- : ++index < length) {
378
- if (predicate(array[index], index, array)) {
379
- return index;
380
- }
381
- }
382
- return -1;
383
- }
384
- var _baseFindIndex = baseFindIndex$2;
385
- function baseIsNaN$1(value) {
386
- return value !== value;
387
- }
388
- var _baseIsNaN = baseIsNaN$1;
389
- function strictIndexOf$1(array, value, fromIndex) {
390
- var index = fromIndex - 1, length = array.length;
391
- while (++index < length) {
392
- if (array[index] === value) {
393
- return index;
394
- }
395
- }
396
- return -1;
397
- }
398
- var _strictIndexOf = strictIndexOf$1;
399
- var baseFindIndex$1 = _baseFindIndex, baseIsNaN = _baseIsNaN, strictIndexOf = _strictIndexOf;
400
- function baseIndexOf$1(array, value, fromIndex) {
401
- return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex$1(array, baseIsNaN, fromIndex);
402
- }
403
- var _baseIndexOf = baseIndexOf$1;
404
- var baseIndexOf = _baseIndexOf;
405
- function arrayIncludes$1(array, value) {
406
- var length = array == null ? 0 : array.length;
407
- return !!length && baseIndexOf(array, value, 0) > -1;
408
- }
409
- var _arrayIncludes = arrayIncludes$1;
410
- function arrayIncludesWith$1(array, value, comparator) {
411
- var index = -1, length = array == null ? 0 : array.length;
412
- while (++index < length) {
413
- if (comparator(value, array[index])) {
31
+ const isString = (value) => typeof value === "string";
32
+ const isUndefined = (value) => typeof value === "undefined";
33
+ const isArray = (value) => Array.isArray(value);
34
+ const isPlainObject = (value) => Object.prototype.toString.call(value) === "[object Object]";
35
+ const uniq = (array) => [...new Set(array)];
36
+ const uniqBy = (array, predicate) => {
37
+ const seen = {};
38
+ return array.filter((item) => {
39
+ const key = predicate(item);
40
+ if (!Object.hasOwn(seen, key)) {
41
+ seen[key] = true;
414
42
  return true;
415
43
  }
416
- }
417
- return false;
418
- }
419
- var _arrayIncludesWith = arrayIncludesWith$1;
420
- function cacheHas$2(cache, key) {
421
- return cache.has(key);
422
- }
423
- var _cacheHas = cacheHas$2;
424
- var getNative$4 = _getNative, root$4 = _root;
425
- var Set$2 = getNative$4(root$4, "Set");
426
- var _Set = Set$2;
427
- function noop$1() {
428
- }
429
- var noop_1 = noop$1;
430
- function setToArray$3(set) {
431
- var index = -1, result = Array(set.size);
432
- set.forEach(function(value) {
433
- result[++index] = value;
44
+ return false;
434
45
  });
435
- return result;
436
- }
437
- var _setToArray = setToArray$3;
438
- var Set$1 = _Set, noop = noop_1, setToArray$2 = _setToArray;
439
- var INFINITY$3 = 1 / 0;
440
- var createSet$1 = !(Set$1 && 1 / setToArray$2(new Set$1([, -0]))[1] == INFINITY$3) ? noop : function(values) {
441
- return new Set$1(values);
442
46
  };
443
- var _createSet = createSet$1;
444
- var SetCache$1 = _SetCache, arrayIncludes = _arrayIncludes, arrayIncludesWith = _arrayIncludesWith, cacheHas$1 = _cacheHas, createSet = _createSet, setToArray$1 = _setToArray;
445
- var LARGE_ARRAY_SIZE$1 = 200;
446
- function baseUniq$2(array, iteratee, comparator) {
447
- var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
448
- if (comparator) {
449
- isCommon = false;
450
- includes = arrayIncludesWith;
451
- } else if (length >= LARGE_ARRAY_SIZE$1) {
452
- var set = iteratee ? null : createSet(array);
453
- if (set) {
454
- return setToArray$1(set);
455
- }
456
- isCommon = false;
457
- includes = cacheHas$1;
458
- seen = new SetCache$1();
459
- } else {
460
- seen = iteratee ? [] : result;
461
- }
462
- outer:
463
- while (++index < length) {
464
- var value = array[index], computed = iteratee ? iteratee(value) : value;
465
- value = comparator || value !== 0 ? value : 0;
466
- if (isCommon && computed === computed) {
467
- var seenIndex = seen.length;
468
- while (seenIndex--) {
469
- if (seen[seenIndex] === computed) {
470
- continue outer;
471
- }
472
- }
473
- if (iteratee) {
474
- seen.push(computed);
475
- }
476
- result.push(value);
477
- } else if (!includes(seen, computed, comparator)) {
478
- if (seen !== result) {
479
- seen.push(computed);
480
- }
481
- result.push(value);
482
- }
483
- }
484
- return result;
485
- }
486
- var _baseUniq = baseUniq$2;
487
- var baseUniq$1 = _baseUniq;
488
- function uniq(array) {
489
- return array && array.length ? baseUniq$1(array) : [];
490
- }
491
- var uniq_1 = uniq;
492
- const uniq$1 = /* @__PURE__ */ getDefaultExportFromCjs(uniq_1);
493
47
  class MemoryCacheAdapter {
494
48
  constructor() {
495
49
  __publicField(this, "map");
@@ -538,7 +92,7 @@ var __publicField = (obj, key, value) => {
538
92
  }
539
93
  keyFromMetafile(options) {
540
94
  const { metafileFile, metafileLocale } = options;
541
- const productFlavors = [...uniq$1(metafileFile.productFlavors)].sort().join("-");
95
+ const productFlavors = [...uniq(metafileFile.productFlavors)].sort().join("-");
542
96
  const indices = [
543
97
  this.context.metafile.params.cdnId,
544
98
  metafileFile.id,
@@ -554,20 +108,6 @@ var __publicField = (obj, key, value) => {
554
108
  return indices.filter((key) => key !== "").join("-");
555
109
  }
556
110
  }
557
- var isArray$b = Array.isArray;
558
- var isArray_1 = isArray$b;
559
- const isArray$c = /* @__PURE__ */ getDefaultExportFromCjs(isArray_1);
560
- function isObjectLike$9(value) {
561
- return value != null && typeof value == "object";
562
- }
563
- var isObjectLike_1 = isObjectLike$9;
564
- var baseGetTag$5 = _baseGetTag, isArray$a = isArray_1, isObjectLike$8 = isObjectLike_1;
565
- var stringTag$4 = "[object String]";
566
- function isString(value) {
567
- return typeof value == "string" || !isArray$a(value) && isObjectLike$8(value) && baseGetTag$5(value) == stringTag$4;
568
- }
569
- var isString_1 = isString;
570
- const isString$1 = /* @__PURE__ */ getDefaultExportFromCjs(isString_1);
571
111
  class CdnBase {
572
112
  constructor(context) {
573
113
  __publicField(this, "context");
@@ -582,785 +122,6 @@ var __publicField = (obj, key, value) => {
582
122
  });
583
123
  }
584
124
  }
585
- var ListCache$2 = _ListCache;
586
- function stackClear$1() {
587
- this.__data__ = new ListCache$2();
588
- this.size = 0;
589
- }
590
- var _stackClear = stackClear$1;
591
- function stackDelete$1(key) {
592
- var data = this.__data__, result = data["delete"](key);
593
- this.size = data.size;
594
- return result;
595
- }
596
- var _stackDelete = stackDelete$1;
597
- function stackGet$1(key) {
598
- return this.__data__.get(key);
599
- }
600
- var _stackGet = stackGet$1;
601
- function stackHas$1(key) {
602
- return this.__data__.has(key);
603
- }
604
- var _stackHas = stackHas$1;
605
- var ListCache$1 = _ListCache, Map$2 = _Map, MapCache$1 = _MapCache;
606
- var LARGE_ARRAY_SIZE = 200;
607
- function stackSet$1(key, value) {
608
- var data = this.__data__;
609
- if (data instanceof ListCache$1) {
610
- var pairs = data.__data__;
611
- if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
612
- pairs.push([key, value]);
613
- this.size = ++data.size;
614
- return this;
615
- }
616
- data = this.__data__ = new MapCache$1(pairs);
617
- }
618
- data.set(key, value);
619
- this.size = data.size;
620
- return this;
621
- }
622
- var _stackSet = stackSet$1;
623
- var ListCache = _ListCache, stackClear = _stackClear, stackDelete = _stackDelete, stackGet = _stackGet, stackHas = _stackHas, stackSet = _stackSet;
624
- function Stack$3(entries) {
625
- var data = this.__data__ = new ListCache(entries);
626
- this.size = data.size;
627
- }
628
- Stack$3.prototype.clear = stackClear;
629
- Stack$3.prototype["delete"] = stackDelete;
630
- Stack$3.prototype.get = stackGet;
631
- Stack$3.prototype.has = stackHas;
632
- Stack$3.prototype.set = stackSet;
633
- var _Stack = Stack$3;
634
- function arraySome$1(array, predicate) {
635
- var index = -1, length = array == null ? 0 : array.length;
636
- while (++index < length) {
637
- if (predicate(array[index], index, array)) {
638
- return true;
639
- }
640
- }
641
- return false;
642
- }
643
- var _arraySome = arraySome$1;
644
- var SetCache = _SetCache, arraySome = _arraySome, cacheHas = _cacheHas;
645
- var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
646
- function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
647
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
648
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
649
- return false;
650
- }
651
- var arrStacked = stack.get(array);
652
- var othStacked = stack.get(other);
653
- if (arrStacked && othStacked) {
654
- return arrStacked == other && othStacked == array;
655
- }
656
- var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$3 ? new SetCache() : void 0;
657
- stack.set(array, other);
658
- stack.set(other, array);
659
- while (++index < arrLength) {
660
- var arrValue = array[index], othValue = other[index];
661
- if (customizer) {
662
- var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
663
- }
664
- if (compared !== void 0) {
665
- if (compared) {
666
- continue;
667
- }
668
- result = false;
669
- break;
670
- }
671
- if (seen) {
672
- if (!arraySome(other, function(othValue2, othIndex) {
673
- if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
674
- return seen.push(othIndex);
675
- }
676
- })) {
677
- result = false;
678
- break;
679
- }
680
- } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
681
- result = false;
682
- break;
683
- }
684
- }
685
- stack["delete"](array);
686
- stack["delete"](other);
687
- return result;
688
- }
689
- var _equalArrays = equalArrays$2;
690
- var root$3 = _root;
691
- var Uint8Array$2 = root$3.Uint8Array;
692
- var _Uint8Array = Uint8Array$2;
693
- function mapToArray$1(map) {
694
- var index = -1, result = Array(map.size);
695
- map.forEach(function(value, key) {
696
- result[++index] = [key, value];
697
- });
698
- return result;
699
- }
700
- var _mapToArray = mapToArray$1;
701
- var Symbol$3 = _Symbol, Uint8Array$1 = _Uint8Array, eq$1 = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
702
- var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
703
- var boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", symbolTag$3 = "[object Symbol]";
704
- var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]";
705
- var symbolProto$2 = Symbol$3 ? Symbol$3.prototype : void 0, symbolValueOf$1 = symbolProto$2 ? symbolProto$2.valueOf : void 0;
706
- function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) {
707
- switch (tag) {
708
- case dataViewTag$4:
709
- if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
710
- return false;
711
- }
712
- object = object.buffer;
713
- other = other.buffer;
714
- case arrayBufferTag$3:
715
- if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
716
- return false;
717
- }
718
- return true;
719
- case boolTag$3:
720
- case dateTag$3:
721
- case numberTag$3:
722
- return eq$1(+object, +other);
723
- case errorTag$2:
724
- return object.name == other.name && object.message == other.message;
725
- case regexpTag$3:
726
- case stringTag$3:
727
- return object == other + "";
728
- case mapTag$5:
729
- var convert = mapToArray;
730
- case setTag$5:
731
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$4;
732
- convert || (convert = setToArray);
733
- if (object.size != other.size && !isPartial) {
734
- return false;
735
- }
736
- var stacked = stack.get(object);
737
- if (stacked) {
738
- return stacked == other;
739
- }
740
- bitmask |= COMPARE_UNORDERED_FLAG$2;
741
- stack.set(object, other);
742
- var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
743
- stack["delete"](object);
744
- return result;
745
- case symbolTag$3:
746
- if (symbolValueOf$1) {
747
- return symbolValueOf$1.call(object) == symbolValueOf$1.call(other);
748
- }
749
- }
750
- return false;
751
- }
752
- var _equalByTag = equalByTag$1;
753
- function arrayPush$2(array, values) {
754
- var index = -1, length = values.length, offset = array.length;
755
- while (++index < length) {
756
- array[offset + index] = values[index];
757
- }
758
- return array;
759
- }
760
- var _arrayPush = arrayPush$2;
761
- var arrayPush$1 = _arrayPush, isArray$9 = isArray_1;
762
- function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
763
- var result = keysFunc(object);
764
- return isArray$9(object) ? result : arrayPush$1(result, symbolsFunc(object));
765
- }
766
- var _baseGetAllKeys = baseGetAllKeys$2;
767
- function arrayFilter$2(array, predicate) {
768
- var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
769
- while (++index < length) {
770
- var value = array[index];
771
- if (predicate(value, index, array)) {
772
- result[resIndex++] = value;
773
- }
774
- }
775
- return result;
776
- }
777
- var _arrayFilter = arrayFilter$2;
778
- function stubArray$2() {
779
- return [];
780
- }
781
- var stubArray_1 = stubArray$2;
782
- var arrayFilter$1 = _arrayFilter, stubArray$1 = stubArray_1;
783
- var objectProto$a = Object.prototype;
784
- var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
785
- var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
786
- var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
787
- if (object == null) {
788
- return [];
789
- }
790
- object = Object(object);
791
- return arrayFilter$1(nativeGetSymbols$1(object), function(symbol) {
792
- return propertyIsEnumerable$1.call(object, symbol);
793
- });
794
- };
795
- var _getSymbols = getSymbols$3;
796
- function baseTimes$1(n, iteratee) {
797
- var index = -1, result = Array(n);
798
- while (++index < n) {
799
- result[index] = iteratee(index);
800
- }
801
- return result;
802
- }
803
- var _baseTimes = baseTimes$1;
804
- var baseGetTag$4 = _baseGetTag, isObjectLike$7 = isObjectLike_1;
805
- var argsTag$3 = "[object Arguments]";
806
- function baseIsArguments$1(value) {
807
- return isObjectLike$7(value) && baseGetTag$4(value) == argsTag$3;
808
- }
809
- var _baseIsArguments = baseIsArguments$1;
810
- var baseIsArguments = _baseIsArguments, isObjectLike$6 = isObjectLike_1;
811
- var objectProto$9 = Object.prototype;
812
- var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
813
- var propertyIsEnumerable = objectProto$9.propertyIsEnumerable;
814
- var isArguments$2 = baseIsArguments(/* @__PURE__ */ function() {
815
- return arguments;
816
- }()) ? baseIsArguments : function(value) {
817
- return isObjectLike$6(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
818
- };
819
- var isArguments_1 = isArguments$2;
820
- var isBuffer$3 = { exports: {} };
821
- function stubFalse() {
822
- return false;
823
- }
824
- var stubFalse_1 = stubFalse;
825
- isBuffer$3.exports;
826
- (function(module2, exports3) {
827
- var root2 = _root, stubFalse2 = stubFalse_1;
828
- var freeExports = exports3 && !exports3.nodeType && exports3;
829
- var freeModule = freeExports && true && module2 && !module2.nodeType && module2;
830
- var moduleExports = freeModule && freeModule.exports === freeExports;
831
- var Buffer2 = moduleExports ? root2.Buffer : void 0;
832
- var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
833
- var isBuffer2 = nativeIsBuffer || stubFalse2;
834
- module2.exports = isBuffer2;
835
- })(isBuffer$3, isBuffer$3.exports);
836
- var isBufferExports = isBuffer$3.exports;
837
- var MAX_SAFE_INTEGER$1 = 9007199254740991;
838
- var reIsUint = /^(?:0|[1-9]\d*)$/;
839
- function isIndex$2(value, length) {
840
- var type = typeof value;
841
- length = length == null ? MAX_SAFE_INTEGER$1 : length;
842
- return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
843
- }
844
- var _isIndex = isIndex$2;
845
- var MAX_SAFE_INTEGER = 9007199254740991;
846
- function isLength$3(value) {
847
- return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
848
- }
849
- var isLength_1 = isLength$3;
850
- var baseGetTag$3 = _baseGetTag, isLength$2 = isLength_1, isObjectLike$5 = isObjectLike_1;
851
- var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", errorTag$1 = "[object Error]", funcTag$1 = "[object Function]", mapTag$4 = "[object Map]", numberTag$2 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$2 = "[object RegExp]", setTag$4 = "[object Set]", stringTag$2 = "[object String]", weakMapTag$2 = "[object WeakMap]";
852
- var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$3 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
853
- var typedArrayTags = {};
854
- typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
855
- typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] = typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$2] = typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] = typedArrayTags[weakMapTag$2] = false;
856
- function baseIsTypedArray$1(value) {
857
- return isObjectLike$5(value) && isLength$2(value.length) && !!typedArrayTags[baseGetTag$3(value)];
858
- }
859
- var _baseIsTypedArray = baseIsTypedArray$1;
860
- function baseUnary$3(func) {
861
- return function(value) {
862
- return func(value);
863
- };
864
- }
865
- var _baseUnary = baseUnary$3;
866
- var _nodeUtil = { exports: {} };
867
- _nodeUtil.exports;
868
- (function(module2, exports3) {
869
- var freeGlobal2 = _freeGlobal;
870
- var freeExports = exports3 && !exports3.nodeType && exports3;
871
- var freeModule = freeExports && true && module2 && !module2.nodeType && module2;
872
- var moduleExports = freeModule && freeModule.exports === freeExports;
873
- var freeProcess = moduleExports && freeGlobal2.process;
874
- var nodeUtil2 = function() {
875
- try {
876
- var types = freeModule && freeModule.require && freeModule.require("util").types;
877
- if (types) {
878
- return types;
879
- }
880
- return freeProcess && freeProcess.binding && freeProcess.binding("util");
881
- } catch (e) {
882
- }
883
- }();
884
- module2.exports = nodeUtil2;
885
- })(_nodeUtil, _nodeUtil.exports);
886
- var _nodeUtilExports = _nodeUtil.exports;
887
- var baseIsTypedArray = _baseIsTypedArray, baseUnary$2 = _baseUnary, nodeUtil$2 = _nodeUtilExports;
888
- var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
889
- var isTypedArray$2 = nodeIsTypedArray ? baseUnary$2(nodeIsTypedArray) : baseIsTypedArray;
890
- var isTypedArray_1 = isTypedArray$2;
891
- var baseTimes = _baseTimes, isArguments$1 = isArguments_1, isArray$8 = isArray_1, isBuffer$2 = isBufferExports, isIndex$1 = _isIndex, isTypedArray$1 = isTypedArray_1;
892
- var objectProto$8 = Object.prototype;
893
- var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
894
- function arrayLikeKeys$2(value, inherited) {
895
- var isArr = isArray$8(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$2(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
896
- for (var key in value) {
897
- if ((inherited || hasOwnProperty$7.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
898
- (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
899
- isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
900
- isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
901
- isIndex$1(key, length)))) {
902
- result.push(key);
903
- }
904
- }
905
- return result;
906
- }
907
- var _arrayLikeKeys = arrayLikeKeys$2;
908
- var objectProto$7 = Object.prototype;
909
- function isPrototype$3(value) {
910
- var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$7;
911
- return value === proto;
912
- }
913
- var _isPrototype = isPrototype$3;
914
- function overArg$2(func, transform) {
915
- return function(arg) {
916
- return func(transform(arg));
917
- };
918
- }
919
- var _overArg = overArg$2;
920
- var overArg$1 = _overArg;
921
- var nativeKeys$1 = overArg$1(Object.keys, Object);
922
- var _nativeKeys = nativeKeys$1;
923
- var isPrototype$2 = _isPrototype, nativeKeys = _nativeKeys;
924
- var objectProto$6 = Object.prototype;
925
- var hasOwnProperty$6 = objectProto$6.hasOwnProperty;
926
- function baseKeys$1(object) {
927
- if (!isPrototype$2(object)) {
928
- return nativeKeys(object);
929
- }
930
- var result = [];
931
- for (var key in Object(object)) {
932
- if (hasOwnProperty$6.call(object, key) && key != "constructor") {
933
- result.push(key);
934
- }
935
- }
936
- return result;
937
- }
938
- var _baseKeys = baseKeys$1;
939
- var isFunction = isFunction_1, isLength$1 = isLength_1;
940
- function isArrayLike$4(value) {
941
- return value != null && isLength$1(value.length) && !isFunction(value);
942
- }
943
- var isArrayLike_1 = isArrayLike$4;
944
- var arrayLikeKeys$1 = _arrayLikeKeys, baseKeys = _baseKeys, isArrayLike$3 = isArrayLike_1;
945
- function keys$6(object) {
946
- return isArrayLike$3(object) ? arrayLikeKeys$1(object) : baseKeys(object);
947
- }
948
- var keys_1 = keys$6;
949
- var baseGetAllKeys$1 = _baseGetAllKeys, getSymbols$2 = _getSymbols, keys$5 = keys_1;
950
- function getAllKeys$2(object) {
951
- return baseGetAllKeys$1(object, keys$5, getSymbols$2);
952
- }
953
- var _getAllKeys = getAllKeys$2;
954
- var getAllKeys$1 = _getAllKeys;
955
- var COMPARE_PARTIAL_FLAG$3 = 1;
956
- var objectProto$5 = Object.prototype;
957
- var hasOwnProperty$5 = objectProto$5.hasOwnProperty;
958
- function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
959
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys$1(object), objLength = objProps.length, othProps = getAllKeys$1(other), othLength = othProps.length;
960
- if (objLength != othLength && !isPartial) {
961
- return false;
962
- }
963
- var index = objLength;
964
- while (index--) {
965
- var key = objProps[index];
966
- if (!(isPartial ? key in other : hasOwnProperty$5.call(other, key))) {
967
- return false;
968
- }
969
- }
970
- var objStacked = stack.get(object);
971
- var othStacked = stack.get(other);
972
- if (objStacked && othStacked) {
973
- return objStacked == other && othStacked == object;
974
- }
975
- var result = true;
976
- stack.set(object, other);
977
- stack.set(other, object);
978
- var skipCtor = isPartial;
979
- while (++index < objLength) {
980
- key = objProps[index];
981
- var objValue = object[key], othValue = other[key];
982
- if (customizer) {
983
- var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
984
- }
985
- if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
986
- result = false;
987
- break;
988
- }
989
- skipCtor || (skipCtor = key == "constructor");
990
- }
991
- if (result && !skipCtor) {
992
- var objCtor = object.constructor, othCtor = other.constructor;
993
- if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
994
- result = false;
995
- }
996
- }
997
- stack["delete"](object);
998
- stack["delete"](other);
999
- return result;
1000
- }
1001
- var _equalObjects = equalObjects$1;
1002
- var getNative$3 = _getNative, root$2 = _root;
1003
- var DataView$1 = getNative$3(root$2, "DataView");
1004
- var _DataView = DataView$1;
1005
- var getNative$2 = _getNative, root$1 = _root;
1006
- var Promise$2 = getNative$2(root$1, "Promise");
1007
- var _Promise = Promise$2;
1008
- var getNative$1 = _getNative, root = _root;
1009
- var WeakMap$1 = getNative$1(root, "WeakMap");
1010
- var _WeakMap = WeakMap$1;
1011
- var DataView = _DataView, Map$1 = _Map, Promise$1 = _Promise, Set = _Set, WeakMap = _WeakMap, baseGetTag$2 = _baseGetTag, toSource = _toSource;
1012
- var mapTag$3 = "[object Map]", objectTag$3 = "[object Object]", promiseTag = "[object Promise]", setTag$3 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
1013
- var dataViewTag$2 = "[object DataView]";
1014
- var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map$1), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
1015
- var getTag$4 = baseGetTag$2;
1016
- if (DataView && getTag$4(new DataView(new ArrayBuffer(1))) != dataViewTag$2 || Map$1 && getTag$4(new Map$1()) != mapTag$3 || Promise$1 && getTag$4(Promise$1.resolve()) != promiseTag || Set && getTag$4(new Set()) != setTag$3 || WeakMap && getTag$4(new WeakMap()) != weakMapTag$1) {
1017
- getTag$4 = function(value) {
1018
- var result = baseGetTag$2(value), Ctor = result == objectTag$3 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
1019
- if (ctorString) {
1020
- switch (ctorString) {
1021
- case dataViewCtorString:
1022
- return dataViewTag$2;
1023
- case mapCtorString:
1024
- return mapTag$3;
1025
- case promiseCtorString:
1026
- return promiseTag;
1027
- case setCtorString:
1028
- return setTag$3;
1029
- case weakMapCtorString:
1030
- return weakMapTag$1;
1031
- }
1032
- }
1033
- return result;
1034
- };
1035
- }
1036
- var _getTag = getTag$4;
1037
- var Stack$2 = _Stack, equalArrays = _equalArrays, equalByTag = _equalByTag, equalObjects = _equalObjects, getTag$3 = _getTag, isArray$7 = isArray_1, isBuffer$1 = isBufferExports, isTypedArray = isTypedArray_1;
1038
- var COMPARE_PARTIAL_FLAG$2 = 1;
1039
- var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", objectTag$2 = "[object Object]";
1040
- var objectProto$4 = Object.prototype;
1041
- var hasOwnProperty$4 = objectProto$4.hasOwnProperty;
1042
- function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) {
1043
- var objIsArr = isArray$7(object), othIsArr = isArray$7(other), objTag = objIsArr ? arrayTag$1 : getTag$3(object), othTag = othIsArr ? arrayTag$1 : getTag$3(other);
1044
- objTag = objTag == argsTag$1 ? objectTag$2 : objTag;
1045
- othTag = othTag == argsTag$1 ? objectTag$2 : othTag;
1046
- var objIsObj = objTag == objectTag$2, othIsObj = othTag == objectTag$2, isSameTag = objTag == othTag;
1047
- if (isSameTag && isBuffer$1(object)) {
1048
- if (!isBuffer$1(other)) {
1049
- return false;
1050
- }
1051
- objIsArr = true;
1052
- objIsObj = false;
1053
- }
1054
- if (isSameTag && !objIsObj) {
1055
- stack || (stack = new Stack$2());
1056
- return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1057
- }
1058
- if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
1059
- var objIsWrapped = objIsObj && hasOwnProperty$4.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$4.call(other, "__wrapped__");
1060
- if (objIsWrapped || othIsWrapped) {
1061
- var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
1062
- stack || (stack = new Stack$2());
1063
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
1064
- }
1065
- }
1066
- if (!isSameTag) {
1067
- return false;
1068
- }
1069
- stack || (stack = new Stack$2());
1070
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
1071
- }
1072
- var _baseIsEqualDeep = baseIsEqualDeep$1;
1073
- var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike$4 = isObjectLike_1;
1074
- function baseIsEqual$2(value, other, bitmask, customizer, stack) {
1075
- if (value === other) {
1076
- return true;
1077
- }
1078
- if (value == null || other == null || !isObjectLike$4(value) && !isObjectLike$4(other)) {
1079
- return value !== value && other !== other;
1080
- }
1081
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$2, stack);
1082
- }
1083
- var _baseIsEqual = baseIsEqual$2;
1084
- var Stack$1 = _Stack, baseIsEqual$1 = _baseIsEqual;
1085
- var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
1086
- function baseIsMatch$1(object, source, matchData, customizer) {
1087
- var index = matchData.length, length = index, noCustomizer = !customizer;
1088
- if (object == null) {
1089
- return !length;
1090
- }
1091
- object = Object(object);
1092
- while (index--) {
1093
- var data = matchData[index];
1094
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
1095
- return false;
1096
- }
1097
- }
1098
- while (++index < length) {
1099
- data = matchData[index];
1100
- var key = data[0], objValue = object[key], srcValue = data[1];
1101
- if (noCustomizer && data[2]) {
1102
- if (objValue === void 0 && !(key in object)) {
1103
- return false;
1104
- }
1105
- } else {
1106
- var stack = new Stack$1();
1107
- if (customizer) {
1108
- var result = customizer(objValue, srcValue, key, object, source, stack);
1109
- }
1110
- if (!(result === void 0 ? baseIsEqual$1(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
1111
- return false;
1112
- }
1113
- }
1114
- }
1115
- return true;
1116
- }
1117
- var _baseIsMatch = baseIsMatch$1;
1118
- var isObject$4 = isObject_1;
1119
- function isStrictComparable$2(value) {
1120
- return value === value && !isObject$4(value);
1121
- }
1122
- var _isStrictComparable = isStrictComparable$2;
1123
- var isStrictComparable$1 = _isStrictComparable, keys$4 = keys_1;
1124
- function getMatchData$1(object) {
1125
- var result = keys$4(object), length = result.length;
1126
- while (length--) {
1127
- var key = result[length], value = object[key];
1128
- result[length] = [key, value, isStrictComparable$1(value)];
1129
- }
1130
- return result;
1131
- }
1132
- var _getMatchData = getMatchData$1;
1133
- function matchesStrictComparable$2(key, srcValue) {
1134
- return function(object) {
1135
- if (object == null) {
1136
- return false;
1137
- }
1138
- return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
1139
- };
1140
- }
1141
- var _matchesStrictComparable = matchesStrictComparable$2;
1142
- var baseIsMatch = _baseIsMatch, getMatchData = _getMatchData, matchesStrictComparable$1 = _matchesStrictComparable;
1143
- function baseMatches$2(source) {
1144
- var matchData = getMatchData(source);
1145
- if (matchData.length == 1 && matchData[0][2]) {
1146
- return matchesStrictComparable$1(matchData[0][0], matchData[0][1]);
1147
- }
1148
- return function(object) {
1149
- return object === source || baseIsMatch(object, source, matchData);
1150
- };
1151
- }
1152
- var _baseMatches = baseMatches$2;
1153
- var baseGetTag$1 = _baseGetTag, isObjectLike$3 = isObjectLike_1;
1154
- var symbolTag$2 = "[object Symbol]";
1155
- function isSymbol$4(value) {
1156
- return typeof value == "symbol" || isObjectLike$3(value) && baseGetTag$1(value) == symbolTag$2;
1157
- }
1158
- var isSymbol_1 = isSymbol$4;
1159
- var isArray$6 = isArray_1, isSymbol$3 = isSymbol_1;
1160
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
1161
- function isKey$3(value, object) {
1162
- if (isArray$6(value)) {
1163
- return false;
1164
- }
1165
- var type = typeof value;
1166
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol$3(value)) {
1167
- return true;
1168
- }
1169
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
1170
- }
1171
- var _isKey = isKey$3;
1172
- var MapCache = _MapCache;
1173
- var FUNC_ERROR_TEXT = "Expected a function";
1174
- function memoize$1(func, resolver) {
1175
- if (typeof func != "function" || resolver != null && typeof resolver != "function") {
1176
- throw new TypeError(FUNC_ERROR_TEXT);
1177
- }
1178
- var memoized = function() {
1179
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
1180
- if (cache.has(key)) {
1181
- return cache.get(key);
1182
- }
1183
- var result = func.apply(this, args);
1184
- memoized.cache = cache.set(key, result) || cache;
1185
- return result;
1186
- };
1187
- memoized.cache = new (memoize$1.Cache || MapCache)();
1188
- return memoized;
1189
- }
1190
- memoize$1.Cache = MapCache;
1191
- var memoize_1 = memoize$1;
1192
- var memoize = memoize_1;
1193
- var MAX_MEMOIZE_SIZE = 500;
1194
- function memoizeCapped$1(func) {
1195
- var result = memoize(func, function(key) {
1196
- if (cache.size === MAX_MEMOIZE_SIZE) {
1197
- cache.clear();
1198
- }
1199
- return key;
1200
- });
1201
- var cache = result.cache;
1202
- return result;
1203
- }
1204
- var _memoizeCapped = memoizeCapped$1;
1205
- var memoizeCapped = _memoizeCapped;
1206
- var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1207
- var reEscapeChar = /\\(\\)?/g;
1208
- var stringToPath$1 = memoizeCapped(function(string) {
1209
- var result = [];
1210
- if (string.charCodeAt(0) === 46) {
1211
- result.push("");
1212
- }
1213
- string.replace(rePropName, function(match, number, quote, subString) {
1214
- result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
1215
- });
1216
- return result;
1217
- });
1218
- var _stringToPath = stringToPath$1;
1219
- function arrayMap$1(array, iteratee) {
1220
- var index = -1, length = array == null ? 0 : array.length, result = Array(length);
1221
- while (++index < length) {
1222
- result[index] = iteratee(array[index], index, array);
1223
- }
1224
- return result;
1225
- }
1226
- var _arrayMap = arrayMap$1;
1227
- var Symbol$2 = _Symbol, arrayMap = _arrayMap, isArray$5 = isArray_1, isSymbol$2 = isSymbol_1;
1228
- var INFINITY$2 = 1 / 0;
1229
- var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
1230
- function baseToString$1(value) {
1231
- if (typeof value == "string") {
1232
- return value;
1233
- }
1234
- if (isArray$5(value)) {
1235
- return arrayMap(value, baseToString$1) + "";
1236
- }
1237
- if (isSymbol$2(value)) {
1238
- return symbolToString ? symbolToString.call(value) : "";
1239
- }
1240
- var result = value + "";
1241
- return result == "0" && 1 / value == -INFINITY$2 ? "-0" : result;
1242
- }
1243
- var _baseToString = baseToString$1;
1244
- var baseToString = _baseToString;
1245
- function toString$1(value) {
1246
- return value == null ? "" : baseToString(value);
1247
- }
1248
- var toString_1 = toString$1;
1249
- var isArray$4 = isArray_1, isKey$2 = _isKey, stringToPath = _stringToPath, toString = toString_1;
1250
- function castPath$2(value, object) {
1251
- if (isArray$4(value)) {
1252
- return value;
1253
- }
1254
- return isKey$2(value, object) ? [value] : stringToPath(toString(value));
1255
- }
1256
- var _castPath = castPath$2;
1257
- var isSymbol$1 = isSymbol_1;
1258
- var INFINITY$1 = 1 / 0;
1259
- function toKey$4(value) {
1260
- if (typeof value == "string" || isSymbol$1(value)) {
1261
- return value;
1262
- }
1263
- var result = value + "";
1264
- return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
1265
- }
1266
- var _toKey = toKey$4;
1267
- var castPath$1 = _castPath, toKey$3 = _toKey;
1268
- function baseGet$2(object, path) {
1269
- path = castPath$1(path, object);
1270
- var index = 0, length = path.length;
1271
- while (object != null && index < length) {
1272
- object = object[toKey$3(path[index++])];
1273
- }
1274
- return index && index == length ? object : void 0;
1275
- }
1276
- var _baseGet = baseGet$2;
1277
- var baseGet$1 = _baseGet;
1278
- function get$1(object, path, defaultValue) {
1279
- var result = object == null ? void 0 : baseGet$1(object, path);
1280
- return result === void 0 ? defaultValue : result;
1281
- }
1282
- var get_1 = get$1;
1283
- function baseHasIn$1(object, key) {
1284
- return object != null && key in Object(object);
1285
- }
1286
- var _baseHasIn = baseHasIn$1;
1287
- var castPath = _castPath, isArguments = isArguments_1, isArray$3 = isArray_1, isIndex = _isIndex, isLength = isLength_1, toKey$2 = _toKey;
1288
- function hasPath$1(object, path, hasFunc) {
1289
- path = castPath(path, object);
1290
- var index = -1, length = path.length, result = false;
1291
- while (++index < length) {
1292
- var key = toKey$2(path[index]);
1293
- if (!(result = object != null && hasFunc(object, key))) {
1294
- break;
1295
- }
1296
- object = object[key];
1297
- }
1298
- if (result || ++index != length) {
1299
- return result;
1300
- }
1301
- length = object == null ? 0 : object.length;
1302
- return !!length && isLength(length) && isIndex(key, length) && (isArray$3(object) || isArguments(object));
1303
- }
1304
- var _hasPath = hasPath$1;
1305
- var baseHasIn = _baseHasIn, hasPath = _hasPath;
1306
- function hasIn$1(object, path) {
1307
- return object != null && hasPath(object, path, baseHasIn);
1308
- }
1309
- var hasIn_1 = hasIn$1;
1310
- var baseIsEqual = _baseIsEqual, get = get_1, hasIn = hasIn_1, isKey$1 = _isKey, isStrictComparable = _isStrictComparable, matchesStrictComparable = _matchesStrictComparable, toKey$1 = _toKey;
1311
- var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
1312
- function baseMatchesProperty$1(path, srcValue) {
1313
- if (isKey$1(path) && isStrictComparable(srcValue)) {
1314
- return matchesStrictComparable(toKey$1(path), srcValue);
1315
- }
1316
- return function(object) {
1317
- var objValue = get(object, path);
1318
- return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
1319
- };
1320
- }
1321
- var _baseMatchesProperty = baseMatchesProperty$1;
1322
- function identity$1(value) {
1323
- return value;
1324
- }
1325
- var identity_1 = identity$1;
1326
- function baseProperty$1(key) {
1327
- return function(object) {
1328
- return object == null ? void 0 : object[key];
1329
- };
1330
- }
1331
- var _baseProperty = baseProperty$1;
1332
- var baseGet = _baseGet;
1333
- function basePropertyDeep$1(path) {
1334
- return function(object) {
1335
- return baseGet(object, path);
1336
- };
1337
- }
1338
- var _basePropertyDeep = basePropertyDeep$1;
1339
- var baseProperty = _baseProperty, basePropertyDeep = _basePropertyDeep, isKey = _isKey, toKey = _toKey;
1340
- function property$1(path) {
1341
- return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
1342
- }
1343
- var property_1 = property$1;
1344
- var baseMatches$1 = _baseMatches, baseMatchesProperty = _baseMatchesProperty, identity = identity_1, isArray$2 = isArray_1, property = property_1;
1345
- function baseIteratee$4(value) {
1346
- if (typeof value == "function") {
1347
- return value;
1348
- }
1349
- if (value == null) {
1350
- return identity;
1351
- }
1352
- if (typeof value == "object") {
1353
- return isArray$2(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches$1(value);
1354
- }
1355
- return property(value);
1356
- }
1357
- var _baseIteratee = baseIteratee$4;
1358
- var baseIteratee$3 = _baseIteratee, baseUniq = _baseUniq;
1359
- function uniqBy(array, iteratee) {
1360
- return array && array.length ? baseUniq(array, baseIteratee$3(iteratee)) : [];
1361
- }
1362
- var uniqBy_1 = uniqBy;
1363
- const uniqBy$1 = /* @__PURE__ */ getDefaultExportFromCjs(uniqBy_1);
1364
125
  class MetafileLocale {
1365
126
  constructor(options, baseLocale) {
1366
127
  __publicField(this, "language");
@@ -1516,7 +277,7 @@ var __publicField = (obj, key, value) => {
1516
277
  },
1517
278
  []
1518
279
  );
1519
- return uniqBy$1(locales, (cdnLocale) => cdnLocale.locale);
280
+ return uniqBy(locales, (cdnLocale) => cdnLocale.locale);
1520
281
  }
1521
282
  }
1522
283
  class MetafileParams {
@@ -1543,12 +304,12 @@ var __publicField = (obj, key, value) => {
1543
304
  } catch (e) {
1544
305
  throw new Error('Invalid param: "options.metafile" cannot be parsed as url.');
1545
306
  }
1546
- const matches2 = url.pathname.match(/^\/(.*?)\/(.*?)\.(v2.json|js|ts)$/);
1547
- if (matches2 === null || matches2.length !== 4) {
307
+ const matches = url.pathname.match(/^\/(.*?)\/(.*?)\.(v2.json|js|ts)$/);
308
+ if (matches === null || matches.length !== 4) {
1548
309
  throw new Error('Invalid param: "options.metafile" contains invalid metafile url.');
1549
310
  }
1550
- const cdnId = matches2[1];
1551
- const tagId = matches2[2];
311
+ const cdnId = matches[1];
312
+ const tagId = matches[2];
1552
313
  return {
1553
314
  url: metafileUrl,
1554
315
  baseUrl: url.origin,
@@ -1640,587 +401,9 @@ var __publicField = (obj, key, value) => {
1640
401
  this.responseFactory = new ResponseFactory(this);
1641
402
  }
1642
403
  }
1643
- function createBaseFor$1(fromRight) {
1644
- return function(object, iteratee, keysFunc) {
1645
- var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
1646
- while (length--) {
1647
- var key = props[fromRight ? length : ++index];
1648
- if (iteratee(iterable[key], key, iterable) === false) {
1649
- break;
1650
- }
1651
- }
1652
- return object;
1653
- };
1654
- }
1655
- var _createBaseFor = createBaseFor$1;
1656
- var createBaseFor = _createBaseFor;
1657
- var baseFor$1 = createBaseFor();
1658
- var _baseFor = baseFor$1;
1659
- var baseFor = _baseFor, keys$3 = keys_1;
1660
- function baseForOwn$1(object, iteratee) {
1661
- return object && baseFor(object, iteratee, keys$3);
1662
- }
1663
- var _baseForOwn = baseForOwn$1;
1664
- var isArrayLike$2 = isArrayLike_1;
1665
- function createBaseEach$1(eachFunc, fromRight) {
1666
- return function(collection, iteratee) {
1667
- if (collection == null) {
1668
- return collection;
1669
- }
1670
- if (!isArrayLike$2(collection)) {
1671
- return eachFunc(collection, iteratee);
1672
- }
1673
- var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
1674
- while (fromRight ? index-- : ++index < length) {
1675
- if (iteratee(iterable[index], index, iterable) === false) {
1676
- break;
1677
- }
1678
- }
1679
- return collection;
1680
- };
1681
- }
1682
- var _createBaseEach = createBaseEach$1;
1683
- var baseForOwn = _baseForOwn, createBaseEach = _createBaseEach;
1684
- var baseEach$1 = createBaseEach(baseForOwn);
1685
- var _baseEach = baseEach$1;
1686
- var baseEach = _baseEach;
1687
- function baseFilter$1(collection, predicate) {
1688
- var result = [];
1689
- baseEach(collection, function(value, index, collection2) {
1690
- if (predicate(value, index, collection2)) {
1691
- result.push(value);
1692
- }
1693
- });
1694
- return result;
1695
- }
1696
- var _baseFilter = baseFilter$1;
1697
- var arrayFilter = _arrayFilter, baseFilter = _baseFilter, baseIteratee$2 = _baseIteratee, isArray$1 = isArray_1;
1698
- function filter(collection, predicate) {
1699
- var func = isArray$1(collection) ? arrayFilter : baseFilter;
1700
- return func(collection, baseIteratee$2(predicate));
1701
- }
1702
- var filter_1 = filter;
1703
- const filter$1 = /* @__PURE__ */ getDefaultExportFromCjs(filter_1);
1704
- var baseIteratee$1 = _baseIteratee, isArrayLike$1 = isArrayLike_1, keys$2 = keys_1;
1705
- function createFind$1(findIndexFunc) {
1706
- return function(collection, predicate, fromIndex) {
1707
- var iterable = Object(collection);
1708
- if (!isArrayLike$1(collection)) {
1709
- var iteratee = baseIteratee$1(predicate);
1710
- collection = keys$2(collection);
1711
- predicate = function(key) {
1712
- return iteratee(iterable[key], key, iterable);
1713
- };
1714
- }
1715
- var index = findIndexFunc(collection, predicate, fromIndex);
1716
- return index > -1 ? iterable[iteratee ? collection[index] : index] : void 0;
1717
- };
1718
- }
1719
- var _createFind = createFind$1;
1720
- var reWhitespace = /\s/;
1721
- function trimmedEndIndex$1(string) {
1722
- var index = string.length;
1723
- while (index-- && reWhitespace.test(string.charAt(index))) {
1724
- }
1725
- return index;
1726
- }
1727
- var _trimmedEndIndex = trimmedEndIndex$1;
1728
- var trimmedEndIndex = _trimmedEndIndex;
1729
- var reTrimStart = /^\s+/;
1730
- function baseTrim$1(string) {
1731
- return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
1732
- }
1733
- var _baseTrim = baseTrim$1;
1734
- var baseTrim = _baseTrim, isObject$3 = isObject_1, isSymbol = isSymbol_1;
1735
- var NAN = 0 / 0;
1736
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
1737
- var reIsBinary = /^0b[01]+$/i;
1738
- var reIsOctal = /^0o[0-7]+$/i;
1739
- var freeParseInt = parseInt;
1740
- function toNumber$1(value) {
1741
- if (typeof value == "number") {
1742
- return value;
1743
- }
1744
- if (isSymbol(value)) {
1745
- return NAN;
1746
- }
1747
- if (isObject$3(value)) {
1748
- var other = typeof value.valueOf == "function" ? value.valueOf() : value;
1749
- value = isObject$3(other) ? other + "" : other;
1750
- }
1751
- if (typeof value != "string") {
1752
- return value === 0 ? value : +value;
1753
- }
1754
- value = baseTrim(value);
1755
- var isBinary = reIsBinary.test(value);
1756
- return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
1757
- }
1758
- var toNumber_1 = toNumber$1;
1759
- var toNumber = toNumber_1;
1760
- var INFINITY = 1 / 0, MAX_INTEGER = 17976931348623157e292;
1761
- function toFinite$1(value) {
1762
- if (!value) {
1763
- return value === 0 ? value : 0;
1764
- }
1765
- value = toNumber(value);
1766
- if (value === INFINITY || value === -INFINITY) {
1767
- var sign = value < 0 ? -1 : 1;
1768
- return sign * MAX_INTEGER;
1769
- }
1770
- return value === value ? value : 0;
1771
- }
1772
- var toFinite_1 = toFinite$1;
1773
- var toFinite = toFinite_1;
1774
- function toInteger$1(value) {
1775
- var result = toFinite(value), remainder = result % 1;
1776
- return result === result ? remainder ? result - remainder : result : 0;
1777
- }
1778
- var toInteger_1 = toInteger$1;
1779
- var baseFindIndex = _baseFindIndex, baseIteratee = _baseIteratee, toInteger = toInteger_1;
1780
- var nativeMax = Math.max;
1781
- function findIndex$1(array, predicate, fromIndex) {
1782
- var length = array == null ? 0 : array.length;
1783
- if (!length) {
1784
- return -1;
1785
- }
1786
- var index = fromIndex == null ? 0 : toInteger(fromIndex);
1787
- if (index < 0) {
1788
- index = nativeMax(length + index, 0);
1789
- }
1790
- return baseFindIndex(array, baseIteratee(predicate), index);
1791
- }
1792
- var findIndex_1 = findIndex$1;
1793
- var createFind = _createFind, findIndex = findIndex_1;
1794
- var find = createFind(findIndex);
1795
- var find_1 = find;
1796
- const find$1 = /* @__PURE__ */ getDefaultExportFromCjs(find_1);
1797
- var overArg = _overArg;
1798
- var getPrototype$3 = overArg(Object.getPrototypeOf, Object);
1799
- var _getPrototype = getPrototype$3;
1800
- var baseGetTag = _baseGetTag, getPrototype$2 = _getPrototype, isObjectLike$2 = isObjectLike_1;
1801
- var objectTag$1 = "[object Object]";
1802
- var funcProto = Function.prototype, objectProto$3 = Object.prototype;
1803
- var funcToString = funcProto.toString;
1804
- var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
1805
- var objectCtorString = funcToString.call(Object);
1806
- function isPlainObject(value) {
1807
- if (!isObjectLike$2(value) || baseGetTag(value) != objectTag$1) {
1808
- return false;
1809
- }
1810
- var proto = getPrototype$2(value);
1811
- if (proto === null) {
1812
- return true;
1813
- }
1814
- var Ctor = hasOwnProperty$3.call(proto, "constructor") && proto.constructor;
1815
- return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
1816
- }
1817
- var isPlainObject_1 = isPlainObject;
1818
- const isPlainObject$1 = /* @__PURE__ */ getDefaultExportFromCjs(isPlainObject_1);
1819
- function arrayEach$1(array, iteratee) {
1820
- var index = -1, length = array == null ? 0 : array.length;
1821
- while (++index < length) {
1822
- if (iteratee(array[index], index, array) === false) {
1823
- break;
1824
- }
1825
- }
1826
- return array;
1827
- }
1828
- var _arrayEach = arrayEach$1;
1829
- var getNative = _getNative;
1830
- var defineProperty$1 = function() {
1831
- try {
1832
- var func = getNative(Object, "defineProperty");
1833
- func({}, "", {});
1834
- return func;
1835
- } catch (e) {
1836
- }
1837
- }();
1838
- var _defineProperty = defineProperty$1;
1839
- var defineProperty = _defineProperty;
1840
- function baseAssignValue$2(object, key, value) {
1841
- if (key == "__proto__" && defineProperty) {
1842
- defineProperty(object, key, {
1843
- "configurable": true,
1844
- "enumerable": true,
1845
- "value": value,
1846
- "writable": true
1847
- });
1848
- } else {
1849
- object[key] = value;
1850
- }
1851
- }
1852
- var _baseAssignValue = baseAssignValue$2;
1853
- var baseAssignValue$1 = _baseAssignValue, eq = eq_1;
1854
- var objectProto$2 = Object.prototype;
1855
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
1856
- function assignValue$2(object, key, value) {
1857
- var objValue = object[key];
1858
- if (!(hasOwnProperty$2.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
1859
- baseAssignValue$1(object, key, value);
1860
- }
1861
- }
1862
- var _assignValue = assignValue$2;
1863
- var assignValue$1 = _assignValue, baseAssignValue = _baseAssignValue;
1864
- function copyObject$4(source, props, object, customizer) {
1865
- var isNew = !object;
1866
- object || (object = {});
1867
- var index = -1, length = props.length;
1868
- while (++index < length) {
1869
- var key = props[index];
1870
- var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
1871
- if (newValue === void 0) {
1872
- newValue = source[key];
1873
- }
1874
- if (isNew) {
1875
- baseAssignValue(object, key, newValue);
1876
- } else {
1877
- assignValue$1(object, key, newValue);
1878
- }
1879
- }
1880
- return object;
1881
- }
1882
- var _copyObject = copyObject$4;
1883
- var copyObject$3 = _copyObject, keys$1 = keys_1;
1884
- function baseAssign$1(object, source) {
1885
- return object && copyObject$3(source, keys$1(source), object);
1886
- }
1887
- var _baseAssign = baseAssign$1;
1888
- function nativeKeysIn$1(object) {
1889
- var result = [];
1890
- if (object != null) {
1891
- for (var key in Object(object)) {
1892
- result.push(key);
1893
- }
1894
- }
1895
- return result;
1896
- }
1897
- var _nativeKeysIn = nativeKeysIn$1;
1898
- var isObject$2 = isObject_1, isPrototype$1 = _isPrototype, nativeKeysIn = _nativeKeysIn;
1899
- var objectProto$1 = Object.prototype;
1900
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
1901
- function baseKeysIn$1(object) {
1902
- if (!isObject$2(object)) {
1903
- return nativeKeysIn(object);
1904
- }
1905
- var isProto = isPrototype$1(object), result = [];
1906
- for (var key in object) {
1907
- if (!(key == "constructor" && (isProto || !hasOwnProperty$1.call(object, key)))) {
1908
- result.push(key);
1909
- }
1910
- }
1911
- return result;
1912
- }
1913
- var _baseKeysIn = baseKeysIn$1;
1914
- var arrayLikeKeys = _arrayLikeKeys, baseKeysIn = _baseKeysIn, isArrayLike = isArrayLike_1;
1915
- function keysIn$3(object) {
1916
- return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
1917
- }
1918
- var keysIn_1 = keysIn$3;
1919
- var copyObject$2 = _copyObject, keysIn$2 = keysIn_1;
1920
- function baseAssignIn$1(object, source) {
1921
- return object && copyObject$2(source, keysIn$2(source), object);
1922
- }
1923
- var _baseAssignIn = baseAssignIn$1;
1924
- var _cloneBuffer = { exports: {} };
1925
- _cloneBuffer.exports;
1926
- (function(module2, exports3) {
1927
- var root2 = _root;
1928
- var freeExports = exports3 && !exports3.nodeType && exports3;
1929
- var freeModule = freeExports && true && module2 && !module2.nodeType && module2;
1930
- var moduleExports = freeModule && freeModule.exports === freeExports;
1931
- var Buffer2 = moduleExports ? root2.Buffer : void 0, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
1932
- function cloneBuffer2(buffer, isDeep) {
1933
- if (isDeep) {
1934
- return buffer.slice();
1935
- }
1936
- var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
1937
- buffer.copy(result);
1938
- return result;
1939
- }
1940
- module2.exports = cloneBuffer2;
1941
- })(_cloneBuffer, _cloneBuffer.exports);
1942
- var _cloneBufferExports = _cloneBuffer.exports;
1943
- function copyArray$1(source, array) {
1944
- var index = -1, length = source.length;
1945
- array || (array = Array(length));
1946
- while (++index < length) {
1947
- array[index] = source[index];
1948
- }
1949
- return array;
1950
- }
1951
- var _copyArray = copyArray$1;
1952
- var copyObject$1 = _copyObject, getSymbols$1 = _getSymbols;
1953
- function copySymbols$1(source, object) {
1954
- return copyObject$1(source, getSymbols$1(source), object);
1955
- }
1956
- var _copySymbols = copySymbols$1;
1957
- var arrayPush = _arrayPush, getPrototype$1 = _getPrototype, getSymbols = _getSymbols, stubArray = stubArray_1;
1958
- var nativeGetSymbols = Object.getOwnPropertySymbols;
1959
- var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
1960
- var result = [];
1961
- while (object) {
1962
- arrayPush(result, getSymbols(object));
1963
- object = getPrototype$1(object);
1964
- }
1965
- return result;
1966
- };
1967
- var _getSymbolsIn = getSymbolsIn$2;
1968
- var copyObject = _copyObject, getSymbolsIn$1 = _getSymbolsIn;
1969
- function copySymbolsIn$1(source, object) {
1970
- return copyObject(source, getSymbolsIn$1(source), object);
1971
- }
1972
- var _copySymbolsIn = copySymbolsIn$1;
1973
- var baseGetAllKeys = _baseGetAllKeys, getSymbolsIn = _getSymbolsIn, keysIn$1 = keysIn_1;
1974
- function getAllKeysIn$1(object) {
1975
- return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
1976
- }
1977
- var _getAllKeysIn = getAllKeysIn$1;
1978
- var objectProto = Object.prototype;
1979
- var hasOwnProperty = objectProto.hasOwnProperty;
1980
- function initCloneArray$1(array) {
1981
- var length = array.length, result = new array.constructor(length);
1982
- if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
1983
- result.index = array.index;
1984
- result.input = array.input;
1985
- }
1986
- return result;
1987
- }
1988
- var _initCloneArray = initCloneArray$1;
1989
- var Uint8Array2 = _Uint8Array;
1990
- function cloneArrayBuffer$3(arrayBuffer) {
1991
- var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1992
- new Uint8Array2(result).set(new Uint8Array2(arrayBuffer));
1993
- return result;
1994
- }
1995
- var _cloneArrayBuffer = cloneArrayBuffer$3;
1996
- var cloneArrayBuffer$2 = _cloneArrayBuffer;
1997
- function cloneDataView$1(dataView, isDeep) {
1998
- var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer;
1999
- return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
2000
- }
2001
- var _cloneDataView = cloneDataView$1;
2002
- var reFlags = /\w*$/;
2003
- function cloneRegExp$1(regexp) {
2004
- var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
2005
- result.lastIndex = regexp.lastIndex;
2006
- return result;
2007
- }
2008
- var _cloneRegExp = cloneRegExp$1;
2009
- var Symbol$1 = _Symbol;
2010
- var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
2011
- function cloneSymbol$1(symbol) {
2012
- return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
2013
- }
2014
- var _cloneSymbol = cloneSymbol$1;
2015
- var cloneArrayBuffer$1 = _cloneArrayBuffer;
2016
- function cloneTypedArray$1(typedArray, isDeep) {
2017
- var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer;
2018
- return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
2019
- }
2020
- var _cloneTypedArray = cloneTypedArray$1;
2021
- var cloneArrayBuffer = _cloneArrayBuffer, cloneDataView = _cloneDataView, cloneRegExp = _cloneRegExp, cloneSymbol = _cloneSymbol, cloneTypedArray = _cloneTypedArray;
2022
- var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]";
2023
- var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
2024
- function initCloneByTag$1(object, tag, isDeep) {
2025
- var Ctor = object.constructor;
2026
- switch (tag) {
2027
- case arrayBufferTag$1:
2028
- return cloneArrayBuffer(object);
2029
- case boolTag$1:
2030
- case dateTag$1:
2031
- return new Ctor(+object);
2032
- case dataViewTag$1:
2033
- return cloneDataView(object, isDeep);
2034
- case float32Tag$1:
2035
- case float64Tag$1:
2036
- case int8Tag$1:
2037
- case int16Tag$1:
2038
- case int32Tag$1:
2039
- case uint8Tag$1:
2040
- case uint8ClampedTag$1:
2041
- case uint16Tag$1:
2042
- case uint32Tag$1:
2043
- return cloneTypedArray(object, isDeep);
2044
- case mapTag$2:
2045
- return new Ctor();
2046
- case numberTag$1:
2047
- case stringTag$1:
2048
- return new Ctor(object);
2049
- case regexpTag$1:
2050
- return cloneRegExp(object);
2051
- case setTag$2:
2052
- return new Ctor();
2053
- case symbolTag$1:
2054
- return cloneSymbol(object);
2055
- }
2056
- }
2057
- var _initCloneByTag = initCloneByTag$1;
2058
- var isObject$1 = isObject_1;
2059
- var objectCreate = Object.create;
2060
- var baseCreate$1 = /* @__PURE__ */ function() {
2061
- function object() {
2062
- }
2063
- return function(proto) {
2064
- if (!isObject$1(proto)) {
2065
- return {};
2066
- }
2067
- if (objectCreate) {
2068
- return objectCreate(proto);
2069
- }
2070
- object.prototype = proto;
2071
- var result = new object();
2072
- object.prototype = void 0;
2073
- return result;
2074
- };
2075
- }();
2076
- var _baseCreate = baseCreate$1;
2077
- var baseCreate = _baseCreate, getPrototype = _getPrototype, isPrototype = _isPrototype;
2078
- function initCloneObject$1(object) {
2079
- return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
2080
- }
2081
- var _initCloneObject = initCloneObject$1;
2082
- var getTag$2 = _getTag, isObjectLike$1 = isObjectLike_1;
2083
- var mapTag$1 = "[object Map]";
2084
- function baseIsMap$1(value) {
2085
- return isObjectLike$1(value) && getTag$2(value) == mapTag$1;
2086
- }
2087
- var _baseIsMap = baseIsMap$1;
2088
- var baseIsMap = _baseIsMap, baseUnary$1 = _baseUnary, nodeUtil$1 = _nodeUtilExports;
2089
- var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
2090
- var isMap$1 = nodeIsMap ? baseUnary$1(nodeIsMap) : baseIsMap;
2091
- var isMap_1 = isMap$1;
2092
- var getTag$1 = _getTag, isObjectLike = isObjectLike_1;
2093
- var setTag$1 = "[object Set]";
2094
- function baseIsSet$1(value) {
2095
- return isObjectLike(value) && getTag$1(value) == setTag$1;
2096
- }
2097
- var _baseIsSet = baseIsSet$1;
2098
- var baseIsSet = _baseIsSet, baseUnary = _baseUnary, nodeUtil = _nodeUtilExports;
2099
- var nodeIsSet = nodeUtil && nodeUtil.isSet;
2100
- var isSet$1 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2101
- var isSet_1 = isSet$1;
2102
- var Stack = _Stack, arrayEach = _arrayEach, assignValue = _assignValue, baseAssign = _baseAssign, baseAssignIn = _baseAssignIn, cloneBuffer = _cloneBufferExports, copyArray = _copyArray, copySymbols = _copySymbols, copySymbolsIn = _copySymbolsIn, getAllKeys = _getAllKeys, getAllKeysIn = _getAllKeysIn, getTag = _getTag, initCloneArray = _initCloneArray, initCloneByTag = _initCloneByTag, initCloneObject = _initCloneObject, isArray = isArray_1, isBuffer = isBufferExports, isMap = isMap_1, isObject = isObject_1, isSet = isSet_1, keys = keys_1, keysIn = keysIn_1;
2103
- var CLONE_DEEP_FLAG$1 = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
2104
- var argsTag = "[object Arguments]", arrayTag = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", objectTag = "[object Object]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", weakMapTag = "[object WeakMap]";
2105
- var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
2106
- var cloneableTags = {};
2107
- cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2108
- cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
2109
- function baseClone$1(value, bitmask, customizer, key, object, stack) {
2110
- var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
2111
- if (customizer) {
2112
- result = object ? customizer(value, key, object, stack) : customizer(value);
2113
- }
2114
- if (result !== void 0) {
2115
- return result;
2116
- }
2117
- if (!isObject(value)) {
2118
- return value;
2119
- }
2120
- var isArr = isArray(value);
2121
- if (isArr) {
2122
- result = initCloneArray(value);
2123
- if (!isDeep) {
2124
- return copyArray(value, result);
2125
- }
2126
- } else {
2127
- var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
2128
- if (isBuffer(value)) {
2129
- return cloneBuffer(value, isDeep);
2130
- }
2131
- if (tag == objectTag || tag == argsTag || isFunc && !object) {
2132
- result = isFlat || isFunc ? {} : initCloneObject(value);
2133
- if (!isDeep) {
2134
- return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
2135
- }
2136
- } else {
2137
- if (!cloneableTags[tag]) {
2138
- return object ? value : {};
2139
- }
2140
- result = initCloneByTag(value, tag, isDeep);
2141
- }
2142
- }
2143
- stack || (stack = new Stack());
2144
- var stacked = stack.get(value);
2145
- if (stacked) {
2146
- return stacked;
2147
- }
2148
- stack.set(value, result);
2149
- if (isSet(value)) {
2150
- value.forEach(function(subValue) {
2151
- result.add(baseClone$1(subValue, bitmask, customizer, subValue, value, stack));
2152
- });
2153
- } else if (isMap(value)) {
2154
- value.forEach(function(subValue, key2) {
2155
- result.set(key2, baseClone$1(subValue, bitmask, customizer, key2, value, stack));
2156
- });
2157
- }
2158
- var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
2159
- var props = isArr ? void 0 : keysFunc(value);
2160
- arrayEach(props || value, function(subValue, key2) {
2161
- if (props) {
2162
- key2 = subValue;
2163
- subValue = value[key2];
2164
- }
2165
- assignValue(result, key2, baseClone$1(subValue, bitmask, customizer, key2, value, stack));
2166
- });
2167
- return result;
2168
- }
2169
- var _baseClone = baseClone$1;
2170
- var baseClone = _baseClone, baseMatches = _baseMatches;
2171
- var CLONE_DEEP_FLAG = 1;
2172
- function matches(source) {
2173
- return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
2174
- }
2175
- var matches_1 = matches;
2176
- const matches$1 = /* @__PURE__ */ getDefaultExportFromCjs(matches_1);
2177
- const _CdnMetafileFiles = class _CdnMetafileFiles extends CdnBase {
404
+ class CdnMetafile extends CdnBase {
2178
405
  constructor() {
2179
406
  super(...arguments);
2180
- __publicField(this, "list", () => _CdnMetafileFiles.transformFiles(this.context.metafile.data.files));
2181
- __publicField(this, "filter", (options) => {
2182
- if (!options) {
2183
- throw new Error('Invalid param: missing required "options" parameter.');
2184
- }
2185
- if (!isFunction$3(options) && !isPlainObject$1(options)) {
2186
- throw new Error('Invalid param: "options" must be function or object.');
2187
- }
2188
- const files = _CdnMetafileFiles.transformFiles(this.context.metafile.data.files);
2189
- if (isFunction$3(options)) {
2190
- return files.filter(options);
2191
- }
2192
- return filter$1(files, matches$1(options));
2193
- });
2194
- __publicField(this, "find", (options) => {
2195
- if (!options) {
2196
- throw new Error('Invalid param: missing required "options" parameter.');
2197
- }
2198
- if (!isFunction$3(options) && !isPlainObject$1(options)) {
2199
- throw new Error('Invalid param: "options" must be function or object.');
2200
- }
2201
- const files = _CdnMetafileFiles.transformFiles(this.context.metafile.data.files);
2202
- if (isFunction$3(options)) {
2203
- return files.find(options);
2204
- }
2205
- return find$1(files, matches$1(options));
2206
- });
2207
- __publicField(this, "first", () => {
2208
- if (this.context.metafile.data.files.length === 0) {
2209
- throw new Error("File is missing in downloaded metafile.");
2210
- }
2211
- const files = _CdnMetafileFiles.transformFiles(this.context.metafile.data.files);
2212
- return files[0];
2213
- });
2214
- }
2215
- };
2216
- __publicField(_CdnMetafileFiles, "transformFiles", (files) => files.map(
2217
- (file) => file.toCdnFile()
2218
- ));
2219
- let CdnMetafileFiles = _CdnMetafileFiles;
2220
- class CdnMetafile extends CdnBase {
2221
- constructor(context) {
2222
- super(context);
2223
- __publicField(this, "files");
2224
407
  __publicField(this, "locales", (options) => {
2225
408
  const { excludeBaseLocale } = options || {};
2226
409
  const { locales } = this.context.metafile.data;
@@ -2234,7 +417,6 @@ var __publicField = (obj, key, value) => {
2234
417
  this.context.metafile.params = new MetafileParams(options.metafile);
2235
418
  await this.refresh();
2236
419
  });
2237
- this.files = new CdnMetafileFiles(context);
2238
420
  }
2239
421
  get projectUrl() {
2240
422
  return this.context.metafile.data.projectUrl;
@@ -2245,12 +427,10 @@ var __publicField = (obj, key, value) => {
2245
427
  get url() {
2246
428
  return this.context.metafile.params.url;
2247
429
  }
430
+ get files() {
431
+ return this.context.metafile.data.files.map((file) => file.toCdnFile());
432
+ }
2248
433
  }
2249
- function isUndefined(value) {
2250
- return value === void 0;
2251
- }
2252
- var isUndefined_1 = isUndefined;
2253
- const isUndefined$1 = /* @__PURE__ */ getDefaultExportFromCjs(isUndefined_1);
2254
434
  class LocalesMap {
2255
435
  constructor(options) {
2256
436
  __publicField(this, "data");
@@ -2322,17 +502,17 @@ var __publicField = (obj, key, value) => {
2322
502
  this.request = new Request(this.context);
2323
503
  }
2324
504
  addFiles(files) {
2325
- if (!(isPlainObject$1(files) || isString$1(files) || isUndefined$1(files) || isArray$c(files))) {
505
+ if (!(isPlainObject(files) || isString(files) || isUndefined(files) || isArray(files))) {
2326
506
  throw new Error('Invalid param: "request.files" must be object, array, string or undefined.');
2327
507
  }
2328
- if (isArray$c(files)) {
508
+ if (isArray(files)) {
2329
509
  files.forEach((i) => {
2330
- if (!(isPlainObject$1(i) || isString$1(i))) {
510
+ if (!(isPlainObject(i) || isString(i))) {
2331
511
  throw new Error('Invalid param: array "request.files" must contain objects or strings.');
2332
512
  }
2333
513
  });
2334
514
  }
2335
- if (isString$1(files)) {
515
+ if (isString(files)) {
2336
516
  this.request.hasSingleFileResponse = true;
2337
517
  const file = this.context.metafile.data.files.find(
2338
518
  (i) => i.id === files
@@ -2341,16 +521,16 @@ var __publicField = (obj, key, value) => {
2341
521
  throw new Error(`File not found: "${files}".`);
2342
522
  }
2343
523
  this.request.files = [file];
2344
- } else if (isUndefined$1(files)) {
524
+ } else if (isUndefined(files)) {
2345
525
  this.request.files = [...this.context.metafile.data.files];
2346
- } else if (isArray$c(files)) {
526
+ } else if (isArray(files)) {
2347
527
  this.request.files = files.map((file) => {
2348
528
  let metafileFile;
2349
- if (isString$1(file)) {
529
+ if (isString(file)) {
2350
530
  const foundFile = this.context.metafile.data.files.find(
2351
531
  (i) => i.id === file
2352
532
  );
2353
- if (isUndefined$1(foundFile)) {
533
+ if (isUndefined(foundFile)) {
2354
534
  throw new Error(`File not found: "${file}".`);
2355
535
  }
2356
536
  metafileFile = foundFile;
@@ -2358,19 +538,19 @@ var __publicField = (obj, key, value) => {
2358
538
  const foundFile = this.context.metafile.data.files.find(
2359
539
  (i) => i.id === file.id
2360
540
  );
2361
- if (isUndefined$1(foundFile)) {
541
+ if (isUndefined(foundFile)) {
2362
542
  throw new Error(`File not found: "${file.id}".`);
2363
543
  }
2364
544
  metafileFile = foundFile;
2365
545
  }
2366
546
  return metafileFile;
2367
547
  });
2368
- } else if (isPlainObject$1(files)) {
548
+ } else if (isPlainObject(files)) {
2369
549
  this.request.hasSingleFileResponse = true;
2370
550
  const foundFile = this.context.metafile.data.files.find(
2371
551
  (i) => i.id === files.id
2372
552
  );
2373
- if (isUndefined$1(foundFile)) {
553
+ if (isUndefined(foundFile)) {
2374
554
  throw new Error(`File not found: "${files.id}".`);
2375
555
  }
2376
556
  this.request.files = [foundFile];
@@ -2378,17 +558,17 @@ var __publicField = (obj, key, value) => {
2378
558
  return this;
2379
559
  }
2380
560
  addLocales(locales, excludeBaseLocale) {
2381
- if (!(isString$1(locales) || isUndefined$1(locales) || isArray$c(locales))) {
561
+ if (!(isString(locales) || isUndefined(locales) || isArray(locales))) {
2382
562
  throw new Error('Invalid param: "request.locales" must be array, string or undefined.');
2383
563
  }
2384
- if (isArray$c(locales)) {
564
+ if (isArray(locales)) {
2385
565
  locales.forEach((i) => {
2386
- if (!isString$1(i)) {
566
+ if (!isString(i)) {
2387
567
  throw new Error('Invalid param: array "request.locales" must contain strings.');
2388
568
  }
2389
569
  });
2390
570
  }
2391
- if (isString$1(locales)) {
571
+ if (isString(locales)) {
2392
572
  this.request.hasSingleLocaleResponse = true;
2393
573
  this.request.files.reduce(
2394
574
  (acc, cur) => {
@@ -2399,7 +579,7 @@ var __publicField = (obj, key, value) => {
2399
579
  },
2400
580
  this.request.localesMap
2401
581
  );
2402
- } else if (isUndefined$1(locales)) {
582
+ } else if (isUndefined(locales)) {
2403
583
  this.request.files.reduce(
2404
584
  (acc, cur) => {
2405
585
  acc.data[cur.id] = excludeBaseLocale ? cur.locales.filter((metafileLocale) => !metafileLocale.isBaseLocale) : cur.locales;
@@ -2407,7 +587,7 @@ var __publicField = (obj, key, value) => {
2407
587
  },
2408
588
  this.request.localesMap
2409
589
  );
2410
- } else if (isArray$c(locales)) {
590
+ } else if (isArray(locales)) {
2411
591
  this.request.files.reduce(
2412
592
  (acc, cur) => {
2413
593
  acc.data[cur.id] = cur.locales.filter(
@@ -2478,7 +658,7 @@ var __publicField = (obj, key, value) => {
2478
658
  if (!options) {
2479
659
  throw new Error('Invalid param: missing required "options" parameter.');
2480
660
  }
2481
- if (!isString$1(options.metafile)) {
661
+ if (!isString(options.metafile)) {
2482
662
  throw new Error('Invalid param: "options.metafile" must be string.');
2483
663
  }
2484
664
  const cdn = new CdnClient(options);
@@ -2491,7 +671,6 @@ var __publicField = (obj, key, value) => {
2491
671
  exports2.CdnCache = CdnCache;
2492
672
  exports2.CdnClient = CdnClient;
2493
673
  exports2.CdnMetafile = CdnMetafile;
2494
- exports2.CdnMetafileFiles = CdnMetafileFiles;
2495
674
  exports2.Context = Context;
2496
675
  exports2.FetchHttpAdapter = FetchHttpAdapter;
2497
676
  exports2.LocalesCache = LocalesCache;
@@ -2505,6 +684,12 @@ var __publicField = (obj, key, value) => {
2505
684
  exports2.Request = Request;
2506
685
  exports2.RequestBuilder = RequestBuilder;
2507
686
  exports2.ResponseFactory = ResponseFactory;
687
+ exports2.isArray = isArray;
688
+ exports2.isPlainObject = isPlainObject;
689
+ exports2.isString = isString;
690
+ exports2.isUndefined = isUndefined;
691
+ exports2.uniq = uniq;
692
+ exports2.uniqBy = uniqBy;
2508
693
  Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
2509
694
  });
2510
695
  //# sourceMappingURL=localazy-cdn-client.umd.js.map