@bcrumbs.net/bc-shared 0.0.7 → 0.0.8

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/index.esm.js CHANGED
@@ -30,6 +30,7 @@ const BCRoutes = {
30
30
  // It should be like that while it's used by BC-API
31
31
  Register: `${AccountPortalRoot}/register`,
32
32
  Password: `${AccountPortalRoot}/reset/:token`,
33
+ PartnerLogin: `${AccountPortalRoot}/partner-login`,
33
34
  Profile: `${AccountPortalRoot}/profile`,
34
35
  Logout: `${AccountPortalRoot}/logout`,
35
36
  NotFound: `${AccountPortalRoot}/404`,
@@ -68,8 +69,10 @@ const BCRoutes = {
68
69
  Inbox: `${InboxPortalRoot}`,
69
70
  EmbeddedInbox: `${InboxPortalRoot}/embedded`,
70
71
  Broadcast: `${BroadcastRoot}`,
72
+ BroadcastAnalysis: `${BroadcastRoot}/analysis/:id`,
71
73
  BroadcastEdit: `${BroadcastRoot}/edit/:id`,
72
74
  BroadcastCreate: `${BroadcastRoot}/create`,
75
+ BroadcastHistory: `${BroadcastRoot}/history`,
73
76
  ConvsSearch: `${SearchPortalRoot}`,
74
77
  Dashboard: `${Dashboard}`,
75
78
  Managemnet: `${ManagemnetRoot}`,
@@ -7223,11 +7226,103 @@ const auth = {
7223
7226
  }
7224
7227
  };
7225
7228
 
7226
- var objectDefineProperties = {};
7229
+ const BCRoutesGuard = props => {
7230
+ const {
7231
+ component: BaseComponent,
7232
+ location
7233
+ } = props,
7234
+ rest = __rest(props, ["component", "location"]);
7235
+ const currentToken = auth.getToken();
7236
+ function CheckNavigation() {
7237
+ // if Unauthenticated go to login page
7238
+ if (!currentToken) return jsx(Redirect, {
7239
+ to: {
7240
+ pathname: BCRoutes.Login,
7241
+ state: {
7242
+ from: location
7243
+ }
7244
+ }
7245
+ });
7246
+ return jsx(BaseComponent, Object.assign({}, props));
7247
+ }
7248
+ return jsx(Route, Object.assign({}, rest, {
7249
+ render: CheckNavigation
7250
+ }));
7251
+ };
7252
+
7253
+ const LogoutRoute = _a => {
7254
+ var props = __rest(_a, []);
7255
+ auth.clearAllAppStorage();
7256
+ return jsx(Route, Object.assign({}, props, {
7257
+ children: jsx(Redirect, {
7258
+ to: BCRoutes.Login
7259
+ })
7260
+ }));
7261
+ };
7262
+
7263
+ var isPrototypeOf$1 = objectIsPrototypeOf;
7264
+
7265
+ var $TypeError$7 = TypeError;
7266
+
7267
+ var anInstance$1 = function (it, Prototype) {
7268
+ if (isPrototypeOf$1(Prototype, it)) return it;
7269
+ throw new $TypeError$7('Incorrect invocation');
7270
+ };
7271
+
7272
+ var fails$5 = fails$i;
7273
+
7274
+ var correctPrototypeGetter = !fails$5(function () {
7275
+ function F() { /* empty */ }
7276
+ F.prototype.constructor = null;
7277
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
7278
+ return Object.getPrototypeOf(new F()) !== F.prototype;
7279
+ });
7280
+
7281
+ var hasOwn$2 = hasOwnProperty_1;
7282
+ var isCallable$3 = isCallable$i;
7283
+ var toObject$1 = toObject$4;
7284
+ var sharedKey$1 = sharedKey$3;
7285
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
7286
+
7287
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
7288
+ var $Object = Object;
7289
+ var ObjectPrototype = $Object.prototype;
7290
+
7291
+ // `Object.getPrototypeOf` method
7292
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
7293
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
7294
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
7295
+ var object = toObject$1(O);
7296
+ if (hasOwn$2(object, IE_PROTO$1)) return object[IE_PROTO$1];
7297
+ var constructor = object.constructor;
7298
+ if (isCallable$3(constructor) && object instanceof constructor) {
7299
+ return constructor.prototype;
7300
+ } return object instanceof $Object ? ObjectPrototype : null;
7301
+ };
7302
+
7303
+ var makeBuiltIn = makeBuiltInExports;
7304
+ var defineProperty$3 = objectDefineProperty;
7305
+
7306
+ var defineBuiltInAccessor$1 = function (target, name, descriptor) {
7307
+ if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
7308
+ if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
7309
+ return defineProperty$3.f(target, name, descriptor);
7310
+ };
7227
7311
 
7228
7312
  var DESCRIPTORS$4 = descriptors;
7229
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
7230
7313
  var definePropertyModule$1 = objectDefineProperty;
7314
+ var createPropertyDescriptor$1 = createPropertyDescriptor$5;
7315
+
7316
+ var createProperty$1 = function (object, key, value) {
7317
+ if (DESCRIPTORS$4) definePropertyModule$1.f(object, key, createPropertyDescriptor$1(0, value));
7318
+ else object[key] = value;
7319
+ };
7320
+
7321
+ var objectDefineProperties = {};
7322
+
7323
+ var DESCRIPTORS$3 = descriptors;
7324
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
7325
+ var definePropertyModule = objectDefineProperty;
7231
7326
  var anObject$7 = anObject$a;
7232
7327
  var toIndexedObject$1 = toIndexedObject$5;
7233
7328
  var objectKeys = objectKeys$2;
@@ -7235,14 +7330,14 @@ var objectKeys = objectKeys$2;
7235
7330
  // `Object.defineProperties` method
7236
7331
  // https://tc39.es/ecma262/#sec-object.defineproperties
7237
7332
  // eslint-disable-next-line es/no-object-defineproperties -- safe
7238
- objectDefineProperties.f = DESCRIPTORS$4 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
7333
+ objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
7239
7334
  anObject$7(O);
7240
7335
  var props = toIndexedObject$1(Properties);
7241
7336
  var keys = objectKeys(Properties);
7242
7337
  var length = keys.length;
7243
7338
  var index = 0;
7244
7339
  var key;
7245
- while (length > index) definePropertyModule$1.f(O, key = keys[index++], props[key]);
7340
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
7246
7341
  return O;
7247
7342
  };
7248
7343
 
@@ -7257,13 +7352,13 @@ var enumBugKeys = enumBugKeys$3;
7257
7352
  var hiddenKeys = hiddenKeys$4;
7258
7353
  var html = html$1;
7259
7354
  var documentCreateElement$1 = documentCreateElement$2;
7260
- var sharedKey$1 = sharedKey$3;
7355
+ var sharedKey = sharedKey$3;
7261
7356
 
7262
7357
  var GT = '>';
7263
7358
  var LT = '<';
7264
7359
  var PROTOTYPE = 'prototype';
7265
7360
  var SCRIPT = 'script';
7266
- var IE_PROTO$1 = sharedKey$1('IE_PROTO');
7361
+ var IE_PROTO = sharedKey('IE_PROTO');
7267
7362
 
7268
7363
  var EmptyConstructor = function () { /* empty */ };
7269
7364
 
@@ -7317,7 +7412,7 @@ var NullProtoObject = function () {
7317
7412
  return NullProtoObject();
7318
7413
  };
7319
7414
 
7320
- hiddenKeys[IE_PROTO$1] = true;
7415
+ hiddenKeys[IE_PROTO] = true;
7321
7416
 
7322
7417
  // `Object.create` method
7323
7418
  // https://tc39.es/ecma262/#sec-object.create
@@ -7329,73 +7424,19 @@ var objectCreate = Object.create || function create(O, Properties) {
7329
7424
  result = new EmptyConstructor();
7330
7425
  EmptyConstructor[PROTOTYPE] = null;
7331
7426
  // add "__proto__" for Object.getPrototypeOf polyfill
7332
- result[IE_PROTO$1] = O;
7427
+ result[IE_PROTO] = O;
7333
7428
  } else result = NullProtoObject();
7334
7429
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
7335
7430
  };
7336
7431
 
7337
- var wellKnownSymbol$9 = wellKnownSymbol$d;
7338
- var create$1 = objectCreate;
7339
- var defineProperty$3 = objectDefineProperty.f;
7340
-
7341
- var UNSCOPABLES = wellKnownSymbol$9('unscopables');
7342
- var ArrayPrototype$1 = Array.prototype;
7343
-
7344
- // Array.prototype[@@unscopables]
7345
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
7346
- if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
7347
- defineProperty$3(ArrayPrototype$1, UNSCOPABLES, {
7348
- configurable: true,
7349
- value: create$1(null)
7350
- });
7351
- }
7352
-
7353
- // add a key to Array.prototype[@@unscopables]
7354
- var addToUnscopables$2 = function (key) {
7355
- ArrayPrototype$1[UNSCOPABLES][key] = true;
7356
- };
7357
-
7358
- var iterators = {};
7359
-
7360
- var fails$5 = fails$i;
7361
-
7362
- var correctPrototypeGetter = !fails$5(function () {
7363
- function F() { /* empty */ }
7364
- F.prototype.constructor = null;
7365
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
7366
- return Object.getPrototypeOf(new F()) !== F.prototype;
7367
- });
7368
-
7369
- var hasOwn$2 = hasOwnProperty_1;
7370
- var isCallable$3 = isCallable$i;
7371
- var toObject$1 = toObject$4;
7372
- var sharedKey = sharedKey$3;
7373
- var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
7374
-
7375
- var IE_PROTO = sharedKey('IE_PROTO');
7376
- var $Object = Object;
7377
- var ObjectPrototype = $Object.prototype;
7378
-
7379
- // `Object.getPrototypeOf` method
7380
- // https://tc39.es/ecma262/#sec-object.getprototypeof
7381
- // eslint-disable-next-line es/no-object-getprototypeof -- safe
7382
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
7383
- var object = toObject$1(O);
7384
- if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
7385
- var constructor = object.constructor;
7386
- if (isCallable$3(constructor) && object instanceof constructor) {
7387
- return constructor.prototype;
7388
- } return object instanceof $Object ? ObjectPrototype : null;
7389
- };
7390
-
7391
7432
  var fails$4 = fails$i;
7392
7433
  var isCallable$2 = isCallable$i;
7393
7434
  var isObject$1 = isObject$b;
7394
7435
  var getPrototypeOf$2 = objectGetPrototypeOf;
7395
7436
  var defineBuiltIn$1 = defineBuiltIn$3;
7396
- var wellKnownSymbol$8 = wellKnownSymbol$d;
7437
+ var wellKnownSymbol$9 = wellKnownSymbol$d;
7397
7438
 
7398
- var ITERATOR$5 = wellKnownSymbol$8('iterator');
7439
+ var ITERATOR$5 = wellKnownSymbol$9('iterator');
7399
7440
  var BUGGY_SAFARI_ITERATORS$1 = false;
7400
7441
 
7401
7442
  // `%IteratorPrototype%` object
@@ -7434,96 +7475,368 @@ var iteratorsCore = {
7434
7475
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
7435
7476
  };
7436
7477
 
7437
- var defineProperty$2 = objectDefineProperty.f;
7478
+ var $$c = _export;
7479
+ var global$2 = global$f;
7480
+ var anInstance = anInstance$1;
7481
+ var anObject$5 = anObject$a;
7482
+ var isCallable$1 = isCallable$i;
7483
+ var getPrototypeOf$1 = objectGetPrototypeOf;
7484
+ var defineBuiltInAccessor = defineBuiltInAccessor$1;
7485
+ var createProperty = createProperty$1;
7486
+ var fails$3 = fails$i;
7438
7487
  var hasOwn$1 = hasOwnProperty_1;
7439
- var wellKnownSymbol$7 = wellKnownSymbol$d;
7488
+ var wellKnownSymbol$8 = wellKnownSymbol$d;
7489
+ var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
7490
+ var DESCRIPTORS$2 = descriptors;
7440
7491
 
7441
- var TO_STRING_TAG$1 = wellKnownSymbol$7('toStringTag');
7492
+ var CONSTRUCTOR = 'constructor';
7493
+ var ITERATOR$4 = 'Iterator';
7494
+ var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
7442
7495
 
7443
- var setToStringTag$3 = function (target, TAG, STATIC) {
7444
- if (target && !STATIC) target = target.prototype;
7445
- if (target && !hasOwn$1(target, TO_STRING_TAG$1)) {
7446
- defineProperty$2(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
7447
- }
7448
- };
7496
+ var $TypeError$6 = TypeError;
7497
+ var NativeIterator = global$2[ITERATOR$4];
7449
7498
 
7450
- var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
7451
- var create = objectCreate;
7452
- var createPropertyDescriptor$1 = createPropertyDescriptor$5;
7453
- var setToStringTag$2 = setToStringTag$3;
7454
- var Iterators$4 = iterators;
7499
+ // FF56- have non-standard global helper `Iterator`
7500
+ var FORCED$1 = !isCallable$1(NativeIterator)
7501
+ || NativeIterator.prototype !== IteratorPrototype$2
7502
+ // FF44- non-standard `Iterator` passes previous tests
7503
+ || !fails$3(function () { NativeIterator({}); });
7455
7504
 
7456
- var returnThis$1 = function () { return this; };
7505
+ var IteratorConstructor = function Iterator() {
7506
+ anInstance(this, IteratorPrototype$2);
7507
+ if (getPrototypeOf$1(this) === IteratorPrototype$2) throw new $TypeError$6('Abstract class Iterator not directly constructable');
7508
+ };
7457
7509
 
7458
- var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
7459
- var TO_STRING_TAG = NAME + ' Iterator';
7460
- IteratorConstructor.prototype = create(IteratorPrototype$2, { next: createPropertyDescriptor$1(+!ENUMERABLE_NEXT, next) });
7461
- setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
7462
- Iterators$4[TO_STRING_TAG] = returnThis$1;
7463
- return IteratorConstructor;
7510
+ var defineIteratorPrototypeAccessor = function (key, value) {
7511
+ if (DESCRIPTORS$2) {
7512
+ defineBuiltInAccessor(IteratorPrototype$2, key, {
7513
+ configurable: true,
7514
+ get: function () {
7515
+ return value;
7516
+ },
7517
+ set: function (replacement) {
7518
+ anObject$5(this);
7519
+ if (this === IteratorPrototype$2) throw new $TypeError$6("You can't redefine this property");
7520
+ if (hasOwn$1(this, key)) this[key] = replacement;
7521
+ else createProperty(this, key, replacement);
7522
+ }
7523
+ });
7524
+ } else IteratorPrototype$2[key] = value;
7464
7525
  };
7465
7526
 
7466
- var $$c = _export;
7467
- var call$5 = functionCall;
7468
- var FunctionName = functionName;
7469
- var isCallable$1 = isCallable$i;
7470
- var createIteratorConstructor = iteratorCreateConstructor;
7471
- var getPrototypeOf$1 = objectGetPrototypeOf;
7472
- var setPrototypeOf = objectSetPrototypeOf;
7473
- var setToStringTag$1 = setToStringTag$3;
7474
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$7;
7475
- var defineBuiltIn = defineBuiltIn$3;
7476
- var wellKnownSymbol$6 = wellKnownSymbol$d;
7477
- var Iterators$3 = iterators;
7478
- var IteratorsCore = iteratorsCore;
7527
+ if (!hasOwn$1(IteratorPrototype$2, TO_STRING_TAG$1)) defineIteratorPrototypeAccessor(TO_STRING_TAG$1, ITERATOR$4);
7479
7528
 
7480
- var PROPER_FUNCTION_NAME = FunctionName.PROPER;
7481
- var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
7482
- var IteratorPrototype$1 = IteratorsCore.IteratorPrototype;
7483
- var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
7484
- var ITERATOR$4 = wellKnownSymbol$6('iterator');
7485
- var KEYS = 'keys';
7486
- var VALUES = 'values';
7487
- var ENTRIES = 'entries';
7529
+ if (FORCED$1 || !hasOwn$1(IteratorPrototype$2, CONSTRUCTOR) || IteratorPrototype$2[CONSTRUCTOR] === Object) {
7530
+ defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
7531
+ }
7488
7532
 
7489
- var returnThis = function () { return this; };
7533
+ IteratorConstructor.prototype = IteratorPrototype$2;
7490
7534
 
7491
- var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
7492
- createIteratorConstructor(IteratorConstructor, NAME, next);
7535
+ // `Iterator` constructor
7536
+ // https://github.com/tc39/proposal-iterator-helpers
7537
+ $$c({ global: true, constructor: true, forced: FORCED$1 }, {
7538
+ Iterator: IteratorConstructor
7539
+ });
7493
7540
 
7494
- var getIterationMethod = function (KIND) {
7495
- if (KIND === DEFAULT && defaultIterator) return defaultIterator;
7496
- if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
7541
+ var classofRaw = classofRaw$2;
7542
+ var uncurryThis$4 = functionUncurryThis;
7497
7543
 
7498
- switch (KIND) {
7499
- case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
7500
- case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
7501
- case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
7502
- }
7544
+ var functionUncurryThisClause = function (fn) {
7545
+ // Nashorn bug:
7546
+ // https://github.com/zloirock/core-js/issues/1128
7547
+ // https://github.com/zloirock/core-js/issues/1130
7548
+ if (classofRaw(fn) === 'Function') return uncurryThis$4(fn);
7549
+ };
7503
7550
 
7504
- return function () { return new IteratorConstructor(this); };
7551
+ var uncurryThis$3 = functionUncurryThisClause;
7552
+ var aCallable$3 = aCallable$6;
7553
+ var NATIVE_BIND = functionBindNative;
7554
+
7555
+ var bind$1 = uncurryThis$3(uncurryThis$3.bind);
7556
+
7557
+ // optional / simple context binding
7558
+ var functionBindContext = function (fn, that) {
7559
+ aCallable$3(fn);
7560
+ return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
7561
+ return fn.apply(that, arguments);
7505
7562
  };
7563
+ };
7506
7564
 
7507
- var TO_STRING_TAG = NAME + ' Iterator';
7508
- var INCORRECT_VALUES_NAME = false;
7509
- var IterablePrototype = Iterable.prototype;
7510
- var nativeIterator = IterablePrototype[ITERATOR$4]
7511
- || IterablePrototype['@@iterator']
7512
- || DEFAULT && IterablePrototype[DEFAULT];
7513
- var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
7514
- var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
7515
- var CurrentIteratorPrototype, methods, KEY;
7565
+ var iterators = {};
7516
7566
 
7517
- // fix native
7518
- if (anyNativeIterator) {
7519
- CurrentIteratorPrototype = getPrototypeOf$1(anyNativeIterator.call(new Iterable()));
7520
- if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
7521
- if (getPrototypeOf$1(CurrentIteratorPrototype) !== IteratorPrototype$1) {
7522
- if (setPrototypeOf) {
7523
- setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$1);
7524
- } else if (!isCallable$1(CurrentIteratorPrototype[ITERATOR$4])) {
7525
- defineBuiltIn(CurrentIteratorPrototype, ITERATOR$4, returnThis);
7526
- }
7567
+ var wellKnownSymbol$7 = wellKnownSymbol$d;
7568
+ var Iterators$4 = iterators;
7569
+
7570
+ var ITERATOR$3 = wellKnownSymbol$7('iterator');
7571
+ var ArrayPrototype$1 = Array.prototype;
7572
+
7573
+ // check on default Array iterator
7574
+ var isArrayIteratorMethod$1 = function (it) {
7575
+ return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$3] === it);
7576
+ };
7577
+
7578
+ var classof$1 = classof$5;
7579
+ var getMethod$1 = getMethod$3;
7580
+ var isNullOrUndefined = isNullOrUndefined$3;
7581
+ var Iterators$3 = iterators;
7582
+ var wellKnownSymbol$6 = wellKnownSymbol$d;
7583
+
7584
+ var ITERATOR$2 = wellKnownSymbol$6('iterator');
7585
+
7586
+ var getIteratorMethod$2 = function (it) {
7587
+ if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$2)
7588
+ || getMethod$1(it, '@@iterator')
7589
+ || Iterators$3[classof$1(it)];
7590
+ };
7591
+
7592
+ var call$5 = functionCall;
7593
+ var aCallable$2 = aCallable$6;
7594
+ var anObject$4 = anObject$a;
7595
+ var tryToString$1 = tryToString$3;
7596
+ var getIteratorMethod$1 = getIteratorMethod$2;
7597
+
7598
+ var $TypeError$5 = TypeError;
7599
+
7600
+ var getIterator$1 = function (argument, usingIterator) {
7601
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
7602
+ if (aCallable$2(iteratorMethod)) return anObject$4(call$5(iteratorMethod, argument));
7603
+ throw new $TypeError$5(tryToString$1(argument) + ' is not iterable');
7604
+ };
7605
+
7606
+ var call$4 = functionCall;
7607
+ var anObject$3 = anObject$a;
7608
+ var getMethod = getMethod$3;
7609
+
7610
+ var iteratorClose$3 = function (iterator, kind, value) {
7611
+ var innerResult, innerError;
7612
+ anObject$3(iterator);
7613
+ try {
7614
+ innerResult = getMethod(iterator, 'return');
7615
+ if (!innerResult) {
7616
+ if (kind === 'throw') throw value;
7617
+ return value;
7618
+ }
7619
+ innerResult = call$4(innerResult, iterator);
7620
+ } catch (error) {
7621
+ innerError = true;
7622
+ innerResult = error;
7623
+ }
7624
+ if (kind === 'throw') throw value;
7625
+ if (innerError) throw innerResult;
7626
+ anObject$3(innerResult);
7627
+ return value;
7628
+ };
7629
+
7630
+ var bind = functionBindContext;
7631
+ var call$3 = functionCall;
7632
+ var anObject$2 = anObject$a;
7633
+ var tryToString = tryToString$3;
7634
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
7635
+ var lengthOfArrayLike$1 = lengthOfArrayLike$3;
7636
+ var isPrototypeOf = objectIsPrototypeOf;
7637
+ var getIterator = getIterator$1;
7638
+ var getIteratorMethod = getIteratorMethod$2;
7639
+ var iteratorClose$2 = iteratorClose$3;
7640
+
7641
+ var $TypeError$4 = TypeError;
7642
+
7643
+ var Result = function (stopped, result) {
7644
+ this.stopped = stopped;
7645
+ this.result = result;
7646
+ };
7647
+
7648
+ var ResultPrototype = Result.prototype;
7649
+
7650
+ var iterate$3 = function (iterable, unboundFunction, options) {
7651
+ var that = options && options.that;
7652
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
7653
+ var IS_RECORD = !!(options && options.IS_RECORD);
7654
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
7655
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
7656
+ var fn = bind(unboundFunction, that);
7657
+ var iterator, iterFn, index, length, result, next, step;
7658
+
7659
+ var stop = function (condition) {
7660
+ if (iterator) iteratorClose$2(iterator, 'normal', condition);
7661
+ return new Result(true, condition);
7662
+ };
7663
+
7664
+ var callFn = function (value) {
7665
+ if (AS_ENTRIES) {
7666
+ anObject$2(value);
7667
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
7668
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
7669
+ };
7670
+
7671
+ if (IS_RECORD) {
7672
+ iterator = iterable.iterator;
7673
+ } else if (IS_ITERATOR) {
7674
+ iterator = iterable;
7675
+ } else {
7676
+ iterFn = getIteratorMethod(iterable);
7677
+ if (!iterFn) throw new $TypeError$4(tryToString(iterable) + ' is not iterable');
7678
+ // optimisation for array iterators
7679
+ if (isArrayIteratorMethod(iterFn)) {
7680
+ for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
7681
+ result = callFn(iterable[index]);
7682
+ if (result && isPrototypeOf(ResultPrototype, result)) return result;
7683
+ } return new Result(false);
7684
+ }
7685
+ iterator = getIterator(iterable, iterFn);
7686
+ }
7687
+
7688
+ next = IS_RECORD ? iterable.next : iterator.next;
7689
+ while (!(step = call$3(next, iterator)).done) {
7690
+ try {
7691
+ result = callFn(step.value);
7692
+ } catch (error) {
7693
+ iteratorClose$2(iterator, 'throw', error);
7694
+ }
7695
+ if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
7696
+ } return new Result(false);
7697
+ };
7698
+
7699
+ // `GetIteratorDirect(obj)` abstract operation
7700
+ // https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
7701
+ var getIteratorDirect$2 = function (obj) {
7702
+ return {
7703
+ iterator: obj,
7704
+ next: obj.next,
7705
+ done: false
7706
+ };
7707
+ };
7708
+
7709
+ var $$b = _export;
7710
+ var iterate$2 = iterate$3;
7711
+ var aCallable$1 = aCallable$6;
7712
+ var anObject$1 = anObject$a;
7713
+ var getIteratorDirect$1 = getIteratorDirect$2;
7714
+
7715
+ // `Iterator.prototype.every` method
7716
+ // https://github.com/tc39/proposal-iterator-helpers
7717
+ $$b({ target: 'Iterator', proto: true, real: true }, {
7718
+ every: function every(predicate) {
7719
+ anObject$1(this);
7720
+ aCallable$1(predicate);
7721
+ var record = getIteratorDirect$1(this);
7722
+ var counter = 0;
7723
+ return !iterate$2(record, function (value, stop) {
7724
+ if (!predicate(value, counter++)) return stop();
7725
+ }, { IS_RECORD: true, INTERRUPTED: true }).stopped;
7726
+ }
7727
+ });
7728
+
7729
+ var wellKnownSymbol$5 = wellKnownSymbol$d;
7730
+ var create$1 = objectCreate;
7731
+ var defineProperty$2 = objectDefineProperty.f;
7732
+
7733
+ var UNSCOPABLES = wellKnownSymbol$5('unscopables');
7734
+ var ArrayPrototype = Array.prototype;
7735
+
7736
+ // Array.prototype[@@unscopables]
7737
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
7738
+ if (ArrayPrototype[UNSCOPABLES] === undefined) {
7739
+ defineProperty$2(ArrayPrototype, UNSCOPABLES, {
7740
+ configurable: true,
7741
+ value: create$1(null)
7742
+ });
7743
+ }
7744
+
7745
+ // add a key to Array.prototype[@@unscopables]
7746
+ var addToUnscopables$2 = function (key) {
7747
+ ArrayPrototype[UNSCOPABLES][key] = true;
7748
+ };
7749
+
7750
+ var defineProperty$1 = objectDefineProperty.f;
7751
+ var hasOwn = hasOwnProperty_1;
7752
+ var wellKnownSymbol$4 = wellKnownSymbol$d;
7753
+
7754
+ var TO_STRING_TAG = wellKnownSymbol$4('toStringTag');
7755
+
7756
+ var setToStringTag$3 = function (target, TAG, STATIC) {
7757
+ if (target && !STATIC) target = target.prototype;
7758
+ if (target && !hasOwn(target, TO_STRING_TAG)) {
7759
+ defineProperty$1(target, TO_STRING_TAG, { configurable: true, value: TAG });
7760
+ }
7761
+ };
7762
+
7763
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
7764
+ var create = objectCreate;
7765
+ var createPropertyDescriptor = createPropertyDescriptor$5;
7766
+ var setToStringTag$2 = setToStringTag$3;
7767
+ var Iterators$2 = iterators;
7768
+
7769
+ var returnThis$1 = function () { return this; };
7770
+
7771
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
7772
+ var TO_STRING_TAG = NAME + ' Iterator';
7773
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
7774
+ setToStringTag$2(IteratorConstructor, TO_STRING_TAG, false);
7775
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
7776
+ return IteratorConstructor;
7777
+ };
7778
+
7779
+ var $$a = _export;
7780
+ var call$2 = functionCall;
7781
+ var FunctionName = functionName;
7782
+ var isCallable = isCallable$i;
7783
+ var createIteratorConstructor = iteratorCreateConstructor;
7784
+ var getPrototypeOf = objectGetPrototypeOf;
7785
+ var setPrototypeOf = objectSetPrototypeOf;
7786
+ var setToStringTag$1 = setToStringTag$3;
7787
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$7;
7788
+ var defineBuiltIn = defineBuiltIn$3;
7789
+ var wellKnownSymbol$3 = wellKnownSymbol$d;
7790
+ var Iterators$1 = iterators;
7791
+ var IteratorsCore = iteratorsCore;
7792
+
7793
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
7794
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
7795
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
7796
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
7797
+ var ITERATOR$1 = wellKnownSymbol$3('iterator');
7798
+ var KEYS = 'keys';
7799
+ var VALUES = 'values';
7800
+ var ENTRIES = 'entries';
7801
+
7802
+ var returnThis = function () { return this; };
7803
+
7804
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
7805
+ createIteratorConstructor(IteratorConstructor, NAME, next);
7806
+
7807
+ var getIterationMethod = function (KIND) {
7808
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
7809
+ if (!BUGGY_SAFARI_ITERATORS && KIND && KIND in IterablePrototype) return IterablePrototype[KIND];
7810
+
7811
+ switch (KIND) {
7812
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
7813
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
7814
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
7815
+ }
7816
+
7817
+ return function () { return new IteratorConstructor(this); };
7818
+ };
7819
+
7820
+ var TO_STRING_TAG = NAME + ' Iterator';
7821
+ var INCORRECT_VALUES_NAME = false;
7822
+ var IterablePrototype = Iterable.prototype;
7823
+ var nativeIterator = IterablePrototype[ITERATOR$1]
7824
+ || IterablePrototype['@@iterator']
7825
+ || DEFAULT && IterablePrototype[DEFAULT];
7826
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
7827
+ var anyNativeIterator = NAME === 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
7828
+ var CurrentIteratorPrototype, methods, KEY;
7829
+
7830
+ // fix native
7831
+ if (anyNativeIterator) {
7832
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
7833
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
7834
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
7835
+ if (setPrototypeOf) {
7836
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
7837
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
7838
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
7839
+ }
7527
7840
  }
7528
7841
  // Set @@toStringTag to native iterators
7529
7842
  setToStringTag$1(CurrentIteratorPrototype, TO_STRING_TAG, true);
@@ -7536,7 +7849,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
7536
7849
  createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
7537
7850
  } else {
7538
7851
  INCORRECT_VALUES_NAME = true;
7539
- defaultIterator = function values() { return call$5(nativeIterator, this); };
7852
+ defaultIterator = function values() { return call$2(nativeIterator, this); };
7540
7853
  }
7541
7854
  }
7542
7855
 
@@ -7551,14 +7864,14 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
7551
7864
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
7552
7865
  defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
7553
7866
  }
7554
- } else $$c({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
7867
+ } else $$a({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
7555
7868
  }
7556
7869
 
7557
7870
  // define iterator
7558
- if (IterablePrototype[ITERATOR$4] !== defaultIterator) {
7559
- defineBuiltIn(IterablePrototype, ITERATOR$4, defaultIterator, { name: DEFAULT });
7871
+ if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
7872
+ defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
7560
7873
  }
7561
- Iterators$3[NAME] = defaultIterator;
7874
+ Iterators$1[NAME] = defaultIterator;
7562
7875
 
7563
7876
  return methods;
7564
7877
  };
@@ -7571,12 +7884,12 @@ var createIterResultObject$1 = function (value, done) {
7571
7884
 
7572
7885
  var toIndexedObject = toIndexedObject$5;
7573
7886
  var addToUnscopables$1 = addToUnscopables$2;
7574
- var Iterators$2 = iterators;
7887
+ var Iterators = iterators;
7575
7888
  var InternalStateModule = internalState;
7576
- var defineProperty$1 = objectDefineProperty.f;
7889
+ var defineProperty = objectDefineProperty.f;
7577
7890
  var defineIterator = iteratorDefine;
7578
7891
  var createIterResultObject = createIterResultObject$1;
7579
- var DESCRIPTORS$3 = descriptors;
7892
+ var DESCRIPTORS$1 = descriptors;
7580
7893
 
7581
7894
  var ARRAY_ITERATOR = 'Array Iterator';
7582
7895
  var setInternalState = InternalStateModule.set;
@@ -7618,7 +7931,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
7618
7931
  // argumentsList[@@iterator] is %ArrayProto_values%
7619
7932
  // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
7620
7933
  // https://tc39.es/ecma262/#sec-createmappedargumentsobject
7621
- var values = Iterators$2.Arguments = Iterators$2.Array;
7934
+ var values = Iterators.Arguments = Iterators.Array;
7622
7935
 
7623
7936
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
7624
7937
  addToUnscopables$1('keys');
@@ -7626,19 +7939,19 @@ addToUnscopables$1('values');
7626
7939
  addToUnscopables$1('entries');
7627
7940
 
7628
7941
  // V8 ~ Chrome 45- bug
7629
- if (DESCRIPTORS$3 && values.name !== 'values') try {
7630
- defineProperty$1(values, 'name', { value: 'values' });
7942
+ if (DESCRIPTORS$1 && values.name !== 'values') try {
7943
+ defineProperty(values, 'name', { value: 'values' });
7631
7944
  } catch (error) { /* empty */ }
7632
7945
 
7633
- var DESCRIPTORS$2 = descriptors;
7946
+ var DESCRIPTORS = descriptors;
7634
7947
  var isArray = isArray$2;
7635
7948
 
7636
- var $TypeError$7 = TypeError;
7949
+ var $TypeError$3 = TypeError;
7637
7950
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
7638
7951
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
7639
7952
 
7640
7953
  // Safari < 13 does not throw an error in this case
7641
- var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$2 && !function () {
7954
+ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
7642
7955
  // makes no sense without proper strict mode support
7643
7956
  if (this !== undefined) return true;
7644
7957
  try {
@@ -7651,28 +7964,28 @@ var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS$2 && !function () {
7651
7964
 
7652
7965
  var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
7653
7966
  if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
7654
- throw new $TypeError$7('Cannot set read only .length');
7967
+ throw new $TypeError$3('Cannot set read only .length');
7655
7968
  } return O.length = length;
7656
7969
  } : function (O, length) {
7657
7970
  return O.length = length;
7658
7971
  };
7659
7972
 
7660
- var $TypeError$6 = TypeError;
7973
+ var $TypeError$2 = TypeError;
7661
7974
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
7662
7975
 
7663
7976
  var doesNotExceedSafeInteger$1 = function (it) {
7664
- if (it > MAX_SAFE_INTEGER) throw $TypeError$6('Maximum allowed index exceeded');
7977
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$2('Maximum allowed index exceeded');
7665
7978
  return it;
7666
7979
  };
7667
7980
 
7668
- var $$b = _export;
7981
+ var $$9 = _export;
7669
7982
  var toObject = toObject$4;
7670
- var lengthOfArrayLike$1 = lengthOfArrayLike$3;
7983
+ var lengthOfArrayLike = lengthOfArrayLike$3;
7671
7984
  var setArrayLength = arraySetLength;
7672
7985
  var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
7673
- var fails$3 = fails$i;
7986
+ var fails$2 = fails$i;
7674
7987
 
7675
- var INCORRECT_TO_LENGTH = fails$3(function () {
7988
+ var INCORRECT_TO_LENGTH = fails$2(function () {
7676
7989
  return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
7677
7990
  });
7678
7991
 
@@ -7687,15 +8000,15 @@ var properErrorOnNonWritableLength = function () {
7687
8000
  }
7688
8001
  };
7689
8002
 
7690
- var FORCED$1 = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
8003
+ var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
7691
8004
 
7692
8005
  // `Array.prototype.push` method
7693
8006
  // https://tc39.es/ecma262/#sec-array.prototype.push
7694
- $$b({ target: 'Array', proto: true, arity: 1, forced: FORCED$1 }, {
8007
+ $$9({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
7695
8008
  // eslint-disable-next-line no-unused-vars -- required for `.length`
7696
8009
  push: function push(item) {
7697
8010
  var O = toObject(this);
7698
- var len = lengthOfArrayLike$1(O);
8011
+ var len = lengthOfArrayLike(O);
7699
8012
  var argCount = arguments.length;
7700
8013
  doesNotExceedSafeInteger(len + argCount);
7701
8014
  for (var i = 0; i < argCount; i++) {
@@ -7751,24 +8064,24 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
7751
8064
 
7752
8065
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
7753
8066
 
7754
- var global$2 = global$f;
8067
+ var global$1 = global$f;
7755
8068
  var DOMIterables = domIterables;
7756
8069
  var DOMTokenListPrototype = domTokenListPrototype;
7757
8070
  var ArrayIteratorMethods = es_array_iterator;
7758
8071
  var createNonEnumerableProperty = createNonEnumerableProperty$7;
7759
8072
  var setToStringTag = setToStringTag$3;
7760
- var wellKnownSymbol$5 = wellKnownSymbol$d;
8073
+ var wellKnownSymbol$2 = wellKnownSymbol$d;
7761
8074
 
7762
- var ITERATOR$3 = wellKnownSymbol$5('iterator');
8075
+ var ITERATOR = wellKnownSymbol$2('iterator');
7763
8076
  var ArrayValues = ArrayIteratorMethods.values;
7764
8077
 
7765
8078
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
7766
8079
  if (CollectionPrototype) {
7767
8080
  // some Chrome versions have non-configurable methods on DOMTokenList
7768
- if (CollectionPrototype[ITERATOR$3] !== ArrayValues) try {
7769
- createNonEnumerableProperty(CollectionPrototype, ITERATOR$3, ArrayValues);
8081
+ if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
8082
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
7770
8083
  } catch (error) {
7771
- CollectionPrototype[ITERATOR$3] = ArrayValues;
8084
+ CollectionPrototype[ITERATOR] = ArrayValues;
7772
8085
  }
7773
8086
  setToStringTag(CollectionPrototype, COLLECTION_NAME, true);
7774
8087
  if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
@@ -7782,486 +8095,174 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
7782
8095
  }
7783
8096
  };
7784
8097
 
7785
- for (var COLLECTION_NAME in DOMIterables) {
7786
- handlePrototype(global$2[COLLECTION_NAME] && global$2[COLLECTION_NAME].prototype, COLLECTION_NAME);
7787
- }
7788
-
7789
- handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
7790
-
7791
- function allSynchronously(resolvables) {
7792
- return __awaiter(this, void 0, void 0, function* () {
7793
- const results = [];
7794
- for (const resolvable of resolvables) {
7795
- results.push(yield resolvable());
7796
- }
7797
- return results;
7798
- });
7799
- }
7800
-
7801
- const propertyOf = name => name;
7802
-
7803
- class ArraysUtils {
7804
- static isArrayAndContainItems(dataList) {
7805
- return dataList && Array.isArray(dataList) && dataList.length > 0;
7806
- }
7807
- static pushToArray(array, object) {
7808
- if (ArraysUtils.isArrayAndContainItems(array)) array.push(object);else array = [object];
7809
- }
7810
- }
7811
-
7812
- var $$a = _export;
7813
- var $includes = arrayIncludes.includes;
7814
- var fails$2 = fails$i;
7815
- var addToUnscopables = addToUnscopables$2;
7816
-
7817
- // FF99+ bug
7818
- var BROKEN_ON_SPARSE = fails$2(function () {
7819
- // eslint-disable-next-line es/no-array-prototype-includes -- detection
7820
- return !Array(1).includes();
7821
- });
7822
-
7823
- // `Array.prototype.includes` method
7824
- // https://tc39.es/ecma262/#sec-array.prototype.includes
7825
- $$a({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
7826
- includes: function includes(el /* , fromIndex = 0 */) {
7827
- return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
7828
- }
7829
- });
7830
-
7831
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
7832
- addToUnscopables('includes');
7833
-
7834
- var isObject = isObject$b;
7835
- var classof$1 = classofRaw$2;
7836
- var wellKnownSymbol$4 = wellKnownSymbol$d;
7837
-
7838
- var MATCH$1 = wellKnownSymbol$4('match');
7839
-
7840
- // `IsRegExp` abstract operation
7841
- // https://tc39.es/ecma262/#sec-isregexp
7842
- var isRegexp = function (it) {
7843
- var isRegExp;
7844
- return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) === 'RegExp');
7845
- };
7846
-
7847
- var isRegExp = isRegexp;
7848
-
7849
- var $TypeError$5 = TypeError;
7850
-
7851
- var notARegexp = function (it) {
7852
- if (isRegExp(it)) {
7853
- throw new $TypeError$5("The method doesn't accept regular expressions");
7854
- } return it;
7855
- };
7856
-
7857
- var wellKnownSymbol$3 = wellKnownSymbol$d;
7858
-
7859
- var MATCH = wellKnownSymbol$3('match');
7860
-
7861
- var correctIsRegexpLogic = function (METHOD_NAME) {
7862
- var regexp = /./;
7863
- try {
7864
- '/./'[METHOD_NAME](regexp);
7865
- } catch (error1) {
7866
- try {
7867
- regexp[MATCH] = false;
7868
- return '/./'[METHOD_NAME](regexp);
7869
- } catch (error2) { /* empty */ }
7870
- } return false;
7871
- };
7872
-
7873
- var $$9 = _export;
7874
- var uncurryThis$4 = functionUncurryThis;
7875
- var notARegExp = notARegexp;
7876
- var requireObjectCoercible = requireObjectCoercible$5;
7877
- var toString = toString$5;
7878
- var correctIsRegExpLogic = correctIsRegexpLogic;
7879
-
7880
- var stringIndexOf = uncurryThis$4(''.indexOf);
7881
-
7882
- // `String.prototype.includes` method
7883
- // https://tc39.es/ecma262/#sec-string.prototype.includes
7884
- $$9({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
7885
- includes: function includes(searchString /* , position = 0 */) {
7886
- return !!~stringIndexOf(
7887
- toString(requireObjectCoercible(this)),
7888
- toString(notARegExp(searchString)),
7889
- arguments.length > 1 ? arguments[1] : undefined
7890
- );
7891
- }
7892
- });
7893
-
7894
- // import LanguageDetector from 'i18next-browser-languagedetector';
7895
- const LOCAL_STORAGE_I18N_STRING = 'I18N_SELECTION';
7896
- const systemDefaultLang = 'en';
7897
- const init = ({
7898
- version,
7899
- customPath
7900
- }) => {
7901
- const currentLng = localStorage.getItem(LOCAL_STORAGE_I18N_STRING) || systemDefaultLang;
7902
- i18n.use(Backend) // load translation using http
7903
- // .use(LanguageDetector) // detect user language
7904
- .use(initReactI18next) // passes i18n down to react-i18next
7905
- .init({
7906
- lng: currentLng,
7907
- fallbackLng: systemDefaultLang,
7908
- ns: ['common', 'inbox'],
7909
- // define your namespaces
7910
- defaultNS: 'common',
7911
- interpolation: {
7912
- escapeValue: false
7913
- },
7914
- load: 'languageOnly',
7915
- backend: {
7916
- loadPath: customPath ? customPath : `/assets/locales/{{lng}}/{{ns}}.json?v=${version !== null && version !== void 0 ? version : ''}`
7917
- }
7918
- });
7919
- };
7920
- const changeLang = lang => {
7921
- localStorage.setItem(LOCAL_STORAGE_I18N_STRING, lang);
7922
- i18n.changeLanguage(lang);
7923
- };
7924
- const getLang = () => {
7925
- var _a;
7926
- return (_a = localStorage.getItem(LOCAL_STORAGE_I18N_STRING)) !== null && _a !== void 0 ? _a : systemDefaultLang;
7927
- };
7928
- const LangService = {
7929
- init,
7930
- changeLang,
7931
- getLang
7932
- };
7933
- var Languages;
7934
- (function (Languages) {
7935
- Languages["EN"] = "en";
7936
- Languages["AR"] = "ar";
7937
- Languages["TR"] = "tr";
7938
- })(Languages || (Languages = {}));
7939
-
7940
- class StringsUtils {
7941
- static localCompareStrings(a, b) {
7942
- const language = LangService.getLang();
7943
- return a.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr').localeCompare(b.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr'), language !== null && language !== void 0 ? language : 'tr');
7944
- }
7945
- static localeIncludeString(a, b) {
7946
- const language = LangService.getLang();
7947
- return a.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr').includes(b.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr'));
7948
- }
7949
- static isStringHasCharacters(text) {
7950
- return text && text.length > 0;
7951
- }
7952
- }
7953
-
7954
- const BCRoutesGuard = props => {
7955
- var _a;
7956
- const {
7957
- component: BaseComponent,
7958
- location
7959
- } = props,
7960
- rest = __rest(props, ["component", "location"]);
7961
- const isUserAuthenticated = !!(auth.getToken() && StringsUtils.isStringHasCharacters((_a = auth.getUserInfo()) === null || _a === void 0 ? void 0 : _a.id));
7962
- const currentToken = auth.getToken();
7963
- function CheckNavigation() {
7964
- // if Unauthenticated go to login page
7965
- if (!currentToken || !isUserAuthenticated) return jsx(Redirect, {
7966
- to: {
7967
- pathname: BCRoutes.Login,
7968
- state: {
7969
- from: location
7970
- }
7971
- }
7972
- });
7973
- return jsx(BaseComponent, Object.assign({}, props));
7974
- }
7975
- return jsx(Route, Object.assign({}, rest, {
7976
- render: CheckNavigation
7977
- }));
7978
- };
7979
-
7980
- const LogoutRoute = _a => {
7981
- var props = __rest(_a, []);
7982
- auth.clearAllAppStorage();
7983
- return jsx(Route, Object.assign({}, props, {
7984
- children: jsx(Redirect, {
7985
- to: BCRoutes.Login
7986
- })
7987
- }));
7988
- };
7989
-
7990
- var isPrototypeOf$1 = objectIsPrototypeOf;
7991
-
7992
- var $TypeError$4 = TypeError;
7993
-
7994
- var anInstance$1 = function (it, Prototype) {
7995
- if (isPrototypeOf$1(Prototype, it)) return it;
7996
- throw new $TypeError$4('Incorrect invocation');
7997
- };
7998
-
7999
- var makeBuiltIn = makeBuiltInExports;
8000
- var defineProperty = objectDefineProperty;
8001
-
8002
- var defineBuiltInAccessor$1 = function (target, name, descriptor) {
8003
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
8004
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
8005
- return defineProperty.f(target, name, descriptor);
8006
- };
8007
-
8008
- var DESCRIPTORS$1 = descriptors;
8009
- var definePropertyModule = objectDefineProperty;
8010
- var createPropertyDescriptor = createPropertyDescriptor$5;
8011
-
8012
- var createProperty$1 = function (object, key, value) {
8013
- if (DESCRIPTORS$1) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
8014
- else object[key] = value;
8015
- };
8016
-
8017
- var $$8 = _export;
8018
- var global$1 = global$f;
8019
- var anInstance = anInstance$1;
8020
- var anObject$5 = anObject$a;
8021
- var isCallable = isCallable$i;
8022
- var getPrototypeOf = objectGetPrototypeOf;
8023
- var defineBuiltInAccessor = defineBuiltInAccessor$1;
8024
- var createProperty = createProperty$1;
8025
- var fails$1 = fails$i;
8026
- var hasOwn = hasOwnProperty_1;
8027
- var wellKnownSymbol$2 = wellKnownSymbol$d;
8028
- var IteratorPrototype = iteratorsCore.IteratorPrototype;
8029
- var DESCRIPTORS = descriptors;
8030
-
8031
- var CONSTRUCTOR = 'constructor';
8032
- var ITERATOR$2 = 'Iterator';
8033
- var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
8034
-
8035
- var $TypeError$3 = TypeError;
8036
- var NativeIterator = global$1[ITERATOR$2];
8037
-
8038
- // FF56- have non-standard global helper `Iterator`
8039
- var FORCED = !isCallable(NativeIterator)
8040
- || NativeIterator.prototype !== IteratorPrototype
8041
- // FF44- non-standard `Iterator` passes previous tests
8042
- || !fails$1(function () { NativeIterator({}); });
8043
-
8044
- var IteratorConstructor = function Iterator() {
8045
- anInstance(this, IteratorPrototype);
8046
- if (getPrototypeOf(this) === IteratorPrototype) throw new $TypeError$3('Abstract class Iterator not directly constructable');
8047
- };
8048
-
8049
- var defineIteratorPrototypeAccessor = function (key, value) {
8050
- if (DESCRIPTORS) {
8051
- defineBuiltInAccessor(IteratorPrototype, key, {
8052
- configurable: true,
8053
- get: function () {
8054
- return value;
8055
- },
8056
- set: function (replacement) {
8057
- anObject$5(this);
8058
- if (this === IteratorPrototype) throw new $TypeError$3("You can't redefine this property");
8059
- if (hasOwn(this, key)) this[key] = replacement;
8060
- else createProperty(this, key, replacement);
8061
- }
8062
- });
8063
- } else IteratorPrototype[key] = value;
8064
- };
8065
-
8066
- if (!hasOwn(IteratorPrototype, TO_STRING_TAG)) defineIteratorPrototypeAccessor(TO_STRING_TAG, ITERATOR$2);
8067
-
8068
- if (FORCED || !hasOwn(IteratorPrototype, CONSTRUCTOR) || IteratorPrototype[CONSTRUCTOR] === Object) {
8069
- defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
8070
- }
8071
-
8072
- IteratorConstructor.prototype = IteratorPrototype;
8073
-
8074
- // `Iterator` constructor
8075
- // https://github.com/tc39/proposal-iterator-helpers
8076
- $$8({ global: true, constructor: true, forced: FORCED }, {
8077
- Iterator: IteratorConstructor
8078
- });
8079
-
8080
- var classofRaw = classofRaw$2;
8081
- var uncurryThis$3 = functionUncurryThis;
8082
-
8083
- var functionUncurryThisClause = function (fn) {
8084
- // Nashorn bug:
8085
- // https://github.com/zloirock/core-js/issues/1128
8086
- // https://github.com/zloirock/core-js/issues/1130
8087
- if (classofRaw(fn) === 'Function') return uncurryThis$3(fn);
8088
- };
8089
-
8090
- var uncurryThis$2 = functionUncurryThisClause;
8091
- var aCallable$3 = aCallable$6;
8092
- var NATIVE_BIND = functionBindNative;
8093
-
8094
- var bind$1 = uncurryThis$2(uncurryThis$2.bind);
8095
-
8096
- // optional / simple context binding
8097
- var functionBindContext = function (fn, that) {
8098
- aCallable$3(fn);
8099
- return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
8100
- return fn.apply(that, arguments);
8101
- };
8102
- };
8103
-
8104
- var wellKnownSymbol$1 = wellKnownSymbol$d;
8105
- var Iterators$1 = iterators;
8098
+ for (var COLLECTION_NAME in DOMIterables) {
8099
+ handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
8100
+ }
8106
8101
 
8107
- var ITERATOR$1 = wellKnownSymbol$1('iterator');
8108
- var ArrayPrototype = Array.prototype;
8102
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
8109
8103
 
8110
- // check on default Array iterator
8111
- var isArrayIteratorMethod$1 = function (it) {
8112
- return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$1] === it);
8113
- };
8104
+ function allSynchronously(resolvables) {
8105
+ return __awaiter(this, void 0, void 0, function* () {
8106
+ const results = [];
8107
+ for (const resolvable of resolvables) {
8108
+ results.push(yield resolvable());
8109
+ }
8110
+ return results;
8111
+ });
8112
+ }
8114
8113
 
8115
- var classof = classof$5;
8116
- var getMethod$1 = getMethod$3;
8117
- var isNullOrUndefined = isNullOrUndefined$3;
8118
- var Iterators = iterators;
8119
- var wellKnownSymbol = wellKnownSymbol$d;
8114
+ const propertyOf = name => name;
8120
8115
 
8121
- var ITERATOR = wellKnownSymbol('iterator');
8116
+ class ArraysUtils {
8117
+ static isArrayAndContainItems(dataList) {
8118
+ return dataList && Array.isArray(dataList) && dataList.length > 0;
8119
+ }
8120
+ static pushToArray(array, object) {
8121
+ if (ArraysUtils.isArrayAndContainItems(array)) array.push(object);else array = [object];
8122
+ }
8123
+ }
8122
8124
 
8123
- var getIteratorMethod$2 = function (it) {
8124
- if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR)
8125
- || getMethod$1(it, '@@iterator')
8126
- || Iterators[classof(it)];
8127
- };
8125
+ var $$8 = _export;
8126
+ var $includes = arrayIncludes.includes;
8127
+ var fails$1 = fails$i;
8128
+ var addToUnscopables = addToUnscopables$2;
8128
8129
 
8129
- var call$4 = functionCall;
8130
- var aCallable$2 = aCallable$6;
8131
- var anObject$4 = anObject$a;
8132
- var tryToString$1 = tryToString$3;
8133
- var getIteratorMethod$1 = getIteratorMethod$2;
8130
+ // FF99+ bug
8131
+ var BROKEN_ON_SPARSE = fails$1(function () {
8132
+ // eslint-disable-next-line es/no-array-prototype-includes -- detection
8133
+ return !Array(1).includes();
8134
+ });
8134
8135
 
8135
- var $TypeError$2 = TypeError;
8136
+ // `Array.prototype.includes` method
8137
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
8138
+ $$8({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
8139
+ includes: function includes(el /* , fromIndex = 0 */) {
8140
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
8141
+ }
8142
+ });
8136
8143
 
8137
- var getIterator$1 = function (argument, usingIterator) {
8138
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
8139
- if (aCallable$2(iteratorMethod)) return anObject$4(call$4(iteratorMethod, argument));
8140
- throw new $TypeError$2(tryToString$1(argument) + ' is not iterable');
8141
- };
8144
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
8145
+ addToUnscopables('includes');
8142
8146
 
8143
- var call$3 = functionCall;
8144
- var anObject$3 = anObject$a;
8145
- var getMethod = getMethod$3;
8147
+ var isObject = isObject$b;
8148
+ var classof = classofRaw$2;
8149
+ var wellKnownSymbol$1 = wellKnownSymbol$d;
8146
8150
 
8147
- var iteratorClose$3 = function (iterator, kind, value) {
8148
- var innerResult, innerError;
8149
- anObject$3(iterator);
8150
- try {
8151
- innerResult = getMethod(iterator, 'return');
8152
- if (!innerResult) {
8153
- if (kind === 'throw') throw value;
8154
- return value;
8155
- }
8156
- innerResult = call$3(innerResult, iterator);
8157
- } catch (error) {
8158
- innerError = true;
8159
- innerResult = error;
8160
- }
8161
- if (kind === 'throw') throw value;
8162
- if (innerError) throw innerResult;
8163
- anObject$3(innerResult);
8164
- return value;
8151
+ var MATCH$1 = wellKnownSymbol$1('match');
8152
+
8153
+ // `IsRegExp` abstract operation
8154
+ // https://tc39.es/ecma262/#sec-isregexp
8155
+ var isRegexp = function (it) {
8156
+ var isRegExp;
8157
+ return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof(it) === 'RegExp');
8165
8158
  };
8166
8159
 
8167
- var bind = functionBindContext;
8168
- var call$2 = functionCall;
8169
- var anObject$2 = anObject$a;
8170
- var tryToString = tryToString$3;
8171
- var isArrayIteratorMethod = isArrayIteratorMethod$1;
8172
- var lengthOfArrayLike = lengthOfArrayLike$3;
8173
- var isPrototypeOf = objectIsPrototypeOf;
8174
- var getIterator = getIterator$1;
8175
- var getIteratorMethod = getIteratorMethod$2;
8176
- var iteratorClose$2 = iteratorClose$3;
8160
+ var isRegExp = isRegexp;
8177
8161
 
8178
8162
  var $TypeError$1 = TypeError;
8179
8163
 
8180
- var Result = function (stopped, result) {
8181
- this.stopped = stopped;
8182
- this.result = result;
8164
+ var notARegexp = function (it) {
8165
+ if (isRegExp(it)) {
8166
+ throw new $TypeError$1("The method doesn't accept regular expressions");
8167
+ } return it;
8183
8168
  };
8184
8169
 
8185
- var ResultPrototype = Result.prototype;
8170
+ var wellKnownSymbol = wellKnownSymbol$d;
8186
8171
 
8187
- var iterate$3 = function (iterable, unboundFunction, options) {
8188
- var that = options && options.that;
8189
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
8190
- var IS_RECORD = !!(options && options.IS_RECORD);
8191
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
8192
- var INTERRUPTED = !!(options && options.INTERRUPTED);
8193
- var fn = bind(unboundFunction, that);
8194
- var iterator, iterFn, index, length, result, next, step;
8172
+ var MATCH = wellKnownSymbol('match');
8195
8173
 
8196
- var stop = function (condition) {
8197
- if (iterator) iteratorClose$2(iterator, 'normal', condition);
8198
- return new Result(true, condition);
8199
- };
8174
+ var correctIsRegexpLogic = function (METHOD_NAME) {
8175
+ var regexp = /./;
8176
+ try {
8177
+ '/./'[METHOD_NAME](regexp);
8178
+ } catch (error1) {
8179
+ try {
8180
+ regexp[MATCH] = false;
8181
+ return '/./'[METHOD_NAME](regexp);
8182
+ } catch (error2) { /* empty */ }
8183
+ } return false;
8184
+ };
8200
8185
 
8201
- var callFn = function (value) {
8202
- if (AS_ENTRIES) {
8203
- anObject$2(value);
8204
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
8205
- } return INTERRUPTED ? fn(value, stop) : fn(value);
8206
- };
8186
+ var $$7 = _export;
8187
+ var uncurryThis$2 = functionUncurryThis;
8188
+ var notARegExp = notARegexp;
8189
+ var requireObjectCoercible = requireObjectCoercible$5;
8190
+ var toString = toString$5;
8191
+ var correctIsRegExpLogic = correctIsRegexpLogic;
8207
8192
 
8208
- if (IS_RECORD) {
8209
- iterator = iterable.iterator;
8210
- } else if (IS_ITERATOR) {
8211
- iterator = iterable;
8212
- } else {
8213
- iterFn = getIteratorMethod(iterable);
8214
- if (!iterFn) throw new $TypeError$1(tryToString(iterable) + ' is not iterable');
8215
- // optimisation for array iterators
8216
- if (isArrayIteratorMethod(iterFn)) {
8217
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
8218
- result = callFn(iterable[index]);
8219
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
8220
- } return new Result(false);
8221
- }
8222
- iterator = getIterator(iterable, iterFn);
8193
+ var stringIndexOf = uncurryThis$2(''.indexOf);
8194
+
8195
+ // `String.prototype.includes` method
8196
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
8197
+ $$7({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
8198
+ includes: function includes(searchString /* , position = 0 */) {
8199
+ return !!~stringIndexOf(
8200
+ toString(requireObjectCoercible(this)),
8201
+ toString(notARegExp(searchString)),
8202
+ arguments.length > 1 ? arguments[1] : undefined
8203
+ );
8223
8204
  }
8205
+ });
8224
8206
 
8225
- next = IS_RECORD ? iterable.next : iterator.next;
8226
- while (!(step = call$2(next, iterator)).done) {
8227
- try {
8228
- result = callFn(step.value);
8229
- } catch (error) {
8230
- iteratorClose$2(iterator, 'throw', error);
8207
+ // import LanguageDetector from 'i18next-browser-languagedetector';
8208
+ const LOCAL_STORAGE_I18N_STRING = 'I18N_SELECTION';
8209
+ const systemDefaultLang = 'en';
8210
+ const init = ({
8211
+ version,
8212
+ customPath
8213
+ }) => {
8214
+ const currentLng = localStorage.getItem(LOCAL_STORAGE_I18N_STRING) || systemDefaultLang;
8215
+ i18n.use(Backend) // load translation using http
8216
+ // .use(LanguageDetector) // detect user language
8217
+ .use(initReactI18next) // passes i18n down to react-i18next
8218
+ .init({
8219
+ lng: currentLng,
8220
+ fallbackLng: systemDefaultLang,
8221
+ ns: ['common', 'inbox'],
8222
+ // define your namespaces
8223
+ defaultNS: 'common',
8224
+ interpolation: {
8225
+ escapeValue: false
8226
+ },
8227
+ load: 'languageOnly',
8228
+ backend: {
8229
+ loadPath: customPath ? customPath : `/assets/locales/{{lng}}/{{ns}}.json?v=${version !== null && version !== void 0 ? version : ''}`
8231
8230
  }
8232
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
8233
- } return new Result(false);
8231
+ });
8234
8232
  };
8235
-
8236
- // `GetIteratorDirect(obj)` abstract operation
8237
- // https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
8238
- var getIteratorDirect$2 = function (obj) {
8239
- return {
8240
- iterator: obj,
8241
- next: obj.next,
8242
- done: false
8243
- };
8233
+ const changeLang = lang => {
8234
+ localStorage.setItem(LOCAL_STORAGE_I18N_STRING, lang);
8235
+ i18n.changeLanguage(lang);
8244
8236
  };
8237
+ const getLang = () => {
8238
+ var _a;
8239
+ return (_a = localStorage.getItem(LOCAL_STORAGE_I18N_STRING)) !== null && _a !== void 0 ? _a : systemDefaultLang;
8240
+ };
8241
+ const LangService = {
8242
+ init,
8243
+ changeLang,
8244
+ getLang
8245
+ };
8246
+ var Languages;
8247
+ (function (Languages) {
8248
+ Languages["EN"] = "en";
8249
+ Languages["AR"] = "ar";
8250
+ Languages["TR"] = "tr";
8251
+ })(Languages || (Languages = {}));
8245
8252
 
8246
- var $$7 = _export;
8247
- var iterate$2 = iterate$3;
8248
- var aCallable$1 = aCallable$6;
8249
- var anObject$1 = anObject$a;
8250
- var getIteratorDirect$1 = getIteratorDirect$2;
8251
-
8252
- // `Iterator.prototype.every` method
8253
- // https://github.com/tc39/proposal-iterator-helpers
8254
- $$7({ target: 'Iterator', proto: true, real: true }, {
8255
- every: function every(predicate) {
8256
- anObject$1(this);
8257
- aCallable$1(predicate);
8258
- var record = getIteratorDirect$1(this);
8259
- var counter = 0;
8260
- return !iterate$2(record, function (value, stop) {
8261
- if (!predicate(value, counter++)) return stop();
8262
- }, { IS_RECORD: true, INTERRUPTED: true }).stopped;
8253
+ class StringsUtils {
8254
+ static localCompareStrings(a, b) {
8255
+ const language = LangService.getLang();
8256
+ return a.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr').localeCompare(b.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr'), language !== null && language !== void 0 ? language : 'tr');
8263
8257
  }
8264
- });
8258
+ static localeIncludeString(a, b) {
8259
+ const language = LangService.getLang();
8260
+ return a.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr').includes(b.toLocaleLowerCase(language !== null && language !== void 0 ? language : 'tr'));
8261
+ }
8262
+ static isStringHasCharacters(text) {
8263
+ return text && text.length > 0;
8264
+ }
8265
+ }
8265
8266
 
8266
8267
  var uncurryThis$1 = functionUncurryThis;
8267
8268
 
@@ -8697,18 +8698,6 @@ const usePermissions = () => {
8697
8698
  };
8698
8699
  };
8699
8700
 
8700
- const useRoles = () => {
8701
- var _a;
8702
- const role = (_a = auth.getUserInfo()) === null || _a === void 0 ? void 0 : _a.role;
8703
- const has = checkRole => role === checkRole;
8704
- const hasAny = checkRoles => checkRoles.includes(role);
8705
- return {
8706
- role,
8707
- has,
8708
- hasAny
8709
- };
8710
- };
8711
-
8712
8701
  const PermissionGuard = _a => {
8713
8702
  var {
8714
8703
  component: Component,
@@ -8753,4 +8742,4 @@ const PermissionGuard = _a => {
8753
8742
  }));
8754
8743
  };
8755
8744
 
8756
- export { ArraysUtils, BCRoutes, BCRoutesGuard, LOCAL_STORAGE_I18N_STRING, LangService, Languages, Loading, LogoutRoute, Permission, PermissionGuard, Role, StringsUtils, allSynchronously, auth, propertyOf, usePermissions, useRoles };
8745
+ export { ArraysUtils, BCRoutes, BCRoutesGuard, LOCAL_STORAGE_I18N_STRING, LangService, Languages, Loading, LogoutRoute, Permission, PermissionGuard, Role, StringsUtils, allSynchronously, auth, propertyOf, usePermissions };