@infrab4a/connect-angular 3.7.6 → 3.7.8-beta.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.
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('rxjs/operators'), require('@angular/fire/auth'), require('@infrab4a/connect'), require('js-cookie'), require('ts-custom-error'), require('@angular/fire/firestore'), require('@angular/common/http'), require('@angular/fire')) :
3
3
  typeof define === 'function' && define.amd ? define('@infrab4a/connect-angular', ['exports', '@angular/core', 'rxjs', 'rxjs/operators', '@angular/fire/auth', '@infrab4a/connect', 'js-cookie', 'ts-custom-error', '@angular/fire/firestore', '@angular/common/http', '@angular/fire'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.infrab4a = global.infrab4a || {}, global.infrab4a["connect-angular"] = {}), global.ng.core, global.rxjs, global.rxjs.operators, global.ng.fire.auth, global["@infrab4a/connect"], global["js-cookie"], global["ts-custom-error"], global.ng.fire.firestore, global.ng.common.http, global.ng.fire));
5
- })(this, (function (exports, i0, rxjs, operators, i1, i1$1, cookie, tsCustomError, i1$2, i1$3, fire) { 'use strict';
5
+ })(this, (function (exports, i0, rxjs, operators, i1, i3, cookie, tsCustomError, i1$1, i1$2, fire) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
@@ -26,10 +26,10 @@
26
26
 
27
27
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
28
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
29
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
30
30
  var cookie__default = /*#__PURE__*/_interopDefaultLegacy(cookie);
31
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
31
32
  var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
32
- var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
33
33
 
34
34
  /*! *****************************************************************************
35
35
  Copyright (c) Microsoft Corporation.
@@ -429,7 +429,7 @@
429
429
  this.separateValidCoupons = function (coupons, userEmail) { return coupons
430
430
  .map(function (coupon) {
431
431
  try {
432
- if (!(coupon instanceof i1$1.Coupon))
432
+ if (!(coupon instanceof i3.Coupon))
433
433
  throw new InvalidCouponError('Cupom inválido.');
434
434
  if (_this.isValidCoupon(coupon, userEmail))
435
435
  return coupon;
@@ -438,7 +438,7 @@
438
438
  return error;
439
439
  }
440
440
  })
441
- .reduce(function (current, coupon) { return (Object.assign(Object.assign({}, current), (coupon instanceof i1$1.Coupon
441
+ .reduce(function (current, coupon) { return (Object.assign(Object.assign({}, current), (coupon instanceof i3.Coupon
442
442
  ? { valids: __spreadArray(__spreadArray([], __read(current.valids)), [coupon]) }
443
443
  : { invalids: __spreadArray(__spreadArray([], __read(current.invalids)), [coupon]) }))); }, {
444
444
  valids: [],
@@ -449,8 +449,8 @@
449
449
  var _this = this;
450
450
  return rxjs.from(this.couponRepository.find({
451
451
  filters: {
452
- nickname: { operator: i1$1.Where.EQUALS, value: nickname },
453
- active: { operator: i1$1.Where.EQUALS, value: true },
452
+ nickname: { operator: i3.Where.EQUALS, value: nickname },
453
+ active: { operator: i3.Where.EQUALS, value: true },
454
454
  },
455
455
  })).pipe(operators.concatMap(function (coupons) { return _this.checkCouponRules(coupons, checkoutType, plan, checkout, isSubscription); }), operators.concatMap(function (coupon) { return _this.checkCouponUseAndLimit(coupon, userEmail, checkout); }), operators.map(function (coupon) { return _this.isValidCoupon(coupon, userEmail); }), operators.map(function (coupon) { return coupon; }));
456
456
  };
@@ -462,17 +462,17 @@
462
462
  // Get Primeiro Cupom (o find do repository retorna um array)
463
463
  var coupon = coupons.data.shift();
464
464
  // Verifica se o cupom é aplicavel na loja
465
- var isInShop = coupon.shopAvailability === i1$1.Shops.ALL || coupon.shopAvailability === this.defaultShop;
465
+ var isInShop = coupon.shopAvailability === i3.Shops.ALL || coupon.shopAvailability === this.defaultShop;
466
466
  // Cupon não aplicavel a loja retorna erro
467
467
  if (!isInShop)
468
468
  return rxjs.throwError('Cupom inválido para loja.');
469
469
  // Verifica se o coupon é aplicado no checkout que está sendo realizado
470
- var isCheckoutType = coupon.checkoutType === i1$1.CheckoutTypes.ALL || coupon.checkoutType === checkoutType;
470
+ var isCheckoutType = coupon.checkoutType === i3.CheckoutTypes.ALL || coupon.checkoutType === checkoutType;
471
471
  // Cupon não aplicavel ao checkout retorna erro
472
472
  if (!isCheckoutType)
473
473
  return rxjs.throwError('Cupom inválido. Erro de checkout.');
474
474
  // Verifica se o cupom é ou pode ser aplicado para subscription
475
- if (checkoutType === i1$1.CheckoutTypes.ALL || checkoutType === i1$1.CheckoutTypes.SUBSCRIPTION) {
475
+ if (checkoutType === i3.CheckoutTypes.ALL || checkoutType === i3.CheckoutTypes.SUBSCRIPTION) {
476
476
  // Se o cupom tiver um plano associado, verifica se é o mesmo plano do checkout da assinatura
477
477
  if (coupon.plan && coupon.plan.toUpperCase() !== plan.toUpperCase())
478
478
  return rxjs.throwError('Cupom inválido para sua assinatura.');
@@ -531,9 +531,9 @@
531
531
  CouponService.prototype.calcDiscountSubscription = function (coupon, checkout) {
532
532
  //
533
533
  var discount = 0;
534
- if (coupon.type === i1$1.CouponTypes.ABSOLUTE)
534
+ if (coupon.type === i3.CouponTypes.ABSOLUTE)
535
535
  discount = coupon.discount;
536
- else if (coupon.type === i1$1.CouponTypes.PERCENTAGE)
536
+ else if (coupon.type === i3.CouponTypes.PERCENTAGE)
537
537
  discount = checkout.subscriptionPlan.recurrencePrice * (coupon.discount / 100);
538
538
  return rxjs.of(discount);
539
539
  };
@@ -546,8 +546,8 @@
546
546
  discount = 0;
547
547
  _d = coupon.type;
548
548
  switch (_d) {
549
- case i1$1.CouponTypes.ABSOLUTE: return [3 /*break*/, 1];
550
- case i1$1.CouponTypes.PERCENTAGE: return [3 /*break*/, 2];
549
+ case i3.CouponTypes.ABSOLUTE: return [3 /*break*/, 1];
550
+ case i3.CouponTypes.PERCENTAGE: return [3 /*break*/, 2];
551
551
  }
552
552
  return [3 /*break*/, 4];
553
553
  case 1:
@@ -642,22 +642,22 @@
642
642
  });
643
643
  };
644
644
  CouponService.prototype.userValidationAndSubscriptionStatus = function (coupon, user) {
645
- if (coupon.exclusivityType === i1$1.Exclusivities.ALL_USERS)
645
+ if (coupon.exclusivityType === i3.Exclusivities.ALL_USERS)
646
646
  return true;
647
647
  if (!user)
648
648
  return true;
649
649
  // Verifica se o email do usuário é coorporativo
650
- if (!this.emailIsFromCollaborator(user.email) && coupon.exclusivityType === i1$1.Exclusivities.COLLABORATORS)
650
+ if (!this.emailIsFromCollaborator(user.email) && coupon.exclusivityType === i3.Exclusivities.COLLABORATORS)
651
651
  throw new InvalidCouponError('Você não é colaborador.');
652
652
  // Verifica se o email do usuário é associado ao cupom de uso por usuario
653
- if (coupon.exclusivityType === i1$1.Exclusivities.SPECIFIC_USER && coupon.userExclusiveEmail !== user.email)
653
+ if (coupon.exclusivityType === i3.Exclusivities.SPECIFIC_USER && coupon.userExclusiveEmail !== user.email)
654
654
  throw new InvalidCouponError('Cupom não é válido para este usuário.');
655
655
  switch (coupon.exclusivityType) {
656
- case i1$1.Exclusivities.ACTIVE_SUBSCRIBER:
656
+ case i3.Exclusivities.ACTIVE_SUBSCRIBER:
657
657
  return user.isSubscriber ? true : false;
658
- case i1$1.Exclusivities.INACTIVE_SUBSCRIBER:
658
+ case i3.Exclusivities.INACTIVE_SUBSCRIBER:
659
659
  return user.isSubscriber ? false : true;
660
- case i1$1.Exclusivities.NON_SUBSCRIBER:
660
+ case i3.Exclusivities.NON_SUBSCRIBER:
661
661
  return user.isSubscriber ? false : true;
662
662
  }
663
663
  return true;
@@ -701,7 +701,7 @@
701
701
  return [{ type: undefined, decorators: [{
702
702
  type: i0.Inject,
703
703
  args: ['CouponRepository']
704
- }] }, { type: i1__namespace$1.Shops, decorators: [{
704
+ }] }, { type: i3__namespace.Shops, decorators: [{
705
705
  type: i0.Inject,
706
706
  args: [DEFAULT_SHOP]
707
707
  }] }, { type: undefined, decorators: [{
@@ -723,19 +723,19 @@
723
723
  }
724
724
  CheckoutService.prototype.getCheckout = function (checkoutData) {
725
725
  var checkoutId = cookie__default["default"].get('checkoutId');
726
- if (!i1$1.isNil(checkoutId))
726
+ if (!i3.isNil(checkoutId))
727
727
  return rxjs.from(this.checkoutRepository.get({ id: checkoutId }));
728
728
  return rxjs.from(this.createCheckout(checkoutData));
729
729
  };
730
730
  CheckoutService.prototype.getUserByCheckout = function (checkoutId) {
731
731
  var _this = this;
732
- return rxjs.from(this.checkoutRepository.get({ id: checkoutId })).pipe(operators.concatMap(function (checkout) { var _a; return ((_a = checkout === null || checkout === void 0 ? void 0 : checkout.user) === null || _a === void 0 ? void 0 : _a.id) ? rxjs.of(checkout.user) : rxjs.from(_this.userRepository.get({ id: checkout.user.id })); }), operators.concatMap(function (user) { return rxjs.of(user) || rxjs.throwError(function () { return new i1$1.NotFoundError('User is not found'); }); }));
732
+ return rxjs.from(this.checkoutRepository.get({ id: checkoutId })).pipe(operators.concatMap(function (checkout) { var _a; return ((_a = checkout === null || checkout === void 0 ? void 0 : checkout.user) === null || _a === void 0 ? void 0 : _a.id) ? rxjs.of(checkout.user) : rxjs.from(_this.userRepository.get({ id: checkout.user.id })); }), operators.concatMap(function (user) { return rxjs.of(user) || rxjs.throwError(function () { return new i3.NotFoundError('User is not found'); }); }));
733
733
  };
734
734
  CheckoutService.prototype.updateCheckoutLineItems = function (checkout) {
735
- return rxjs.from(this.checkoutRepository.update(i1$1.Checkout.toInstance({ id: checkout.id, lineItems: checkout.lineItems })));
735
+ return rxjs.from(this.checkoutRepository.update(i3.Checkout.toInstance({ id: checkout.id, lineItems: checkout.lineItems })));
736
736
  };
737
737
  CheckoutService.prototype.updateCheckoutUser = function (checkout) {
738
- return rxjs.from(this.checkoutRepository.update(i1$1.Checkout.toInstance({ id: checkout.id, user: checkout.user })));
738
+ return rxjs.from(this.checkoutRepository.update(i3.Checkout.toInstance({ id: checkout.id, user: checkout.user })));
739
739
  };
740
740
  CheckoutService.prototype.clearCheckoutFromSession = function () {
741
741
  cookie__default["default"].remove('checkoutId');
@@ -755,7 +755,7 @@
755
755
  return this.getCheckout().pipe(operators.concatMap(function (checkout) {
756
756
  var _a;
757
757
  return _this.couponService
758
- .checkCoupon(nickname, (_a = checkout.user) === null || _a === void 0 ? void 0 : _a.email, i1$1.CheckoutTypes.ECOMMERCE, checkout.user.subscriptionPlan, checkout, false)
758
+ .checkCoupon(nickname, (_a = checkout.user) === null || _a === void 0 ? void 0 : _a.email, i3.CheckoutTypes.ECOMMERCE, checkout.user.subscriptionPlan, checkout, false)
759
759
  .pipe();
760
760
  }));
761
761
  };
@@ -764,7 +764,7 @@
764
764
  var checkout;
765
765
  return __generator(this, function (_b) {
766
766
  switch (_b.label) {
767
- case 0: return [4 /*yield*/, this.checkoutRepository.create(Object.assign(Object.assign({ createdAt: new Date() }, i1$1.Checkout.toInstance(i1$1.pick(checkoutData, ['user', 'shop'])).toPlain()), { shop: (checkoutData === null || checkoutData === void 0 ? void 0 : checkoutData.shop) || this.defaultShop }))];
767
+ case 0: return [4 /*yield*/, this.checkoutRepository.create(Object.assign(Object.assign({ createdAt: new Date() }, i3.Checkout.toInstance(i3.pick(checkoutData, ['user', 'shop'])).toPlain()), { shop: (checkoutData === null || checkoutData === void 0 ? void 0 : checkoutData.shop) || this.defaultShop }))];
768
768
  case 1:
769
769
  checkout = _b.sent();
770
770
  cookie__default["default"].set('checkoutId', checkout.id);
@@ -789,25 +789,26 @@
789
789
  }] }, { type: undefined, decorators: [{
790
790
  type: i0.Inject,
791
791
  args: ['UserRepository']
792
- }] }, { type: i1__namespace$1.Shops, decorators: [{
792
+ }] }, { type: i3__namespace.Shops, decorators: [{
793
793
  type: i0.Inject,
794
794
  args: [DEFAULT_SHOP]
795
795
  }] }];
796
796
  } });
797
797
 
798
798
  var CartService = /** @class */ (function () {
799
- function CartService(authService, checkoutService, defaultShop, productRepository, variantRepository) {
799
+ function CartService(authService, checkoutService, defaultShop, productRepository, variantRepository, buy2WinRepository) {
800
800
  var _this = this;
801
801
  this.authService = authService;
802
802
  this.checkoutService = checkoutService;
803
803
  this.defaultShop = defaultShop;
804
804
  this.productRepository = productRepository;
805
805
  this.variantRepository = variantRepository;
806
+ this.buy2WinRepository = buy2WinRepository;
806
807
  this.cartSubject = new rxjs.Subject();
807
- this.updateLineItemInCart = function (lineItem, quantity, checkout) { return (i1$1.isNil(checkout) ? _this.checkoutService.getCheckout() : rxjs.of(checkout)).pipe(operators.concatMap(function (checkoutLoaded) {
808
+ this.updateLineItemInCart = function (lineItem, quantity, checkout) { return (i3.isNil(checkout) ? _this.checkoutService.getCheckout() : rxjs.of(checkout)).pipe(operators.concatMap(function (checkoutLoaded) {
808
809
  var _a;
809
810
  var items = [];
810
- var index = (_a = checkoutLoaded.lineItems) === null || _a === void 0 ? void 0 : _a.map(function (checkoutItem) { return checkoutItem.sku; }).indexOf(lineItem.sku);
811
+ var index = (_a = checkoutLoaded.lineItems) === null || _a === void 0 ? void 0 : _a.map(function (checkoutItem) { return checkoutItem.id; }).indexOf(lineItem.id);
811
812
  if (index > -1) {
812
813
  checkoutLoaded.lineItems[index].quantity += quantity;
813
814
  checkoutLoaded.lineItems[index].pricePaid = lineItem.pricePaid;
@@ -822,7 +823,7 @@
822
823
  var cart = {};
823
824
  items === null || items === void 0 ? void 0 : items.forEach(function (item) {
824
825
  var _a;
825
- return (cart[item.sku] = i1$1.LineItem.toInstance(Object.assign(Object.assign({}, (cart[item.sku] || item)), { quantity: (((_a = cart[item.sku]) === null || _a === void 0 ? void 0 : _a.quantity) || 0) + (item.quantity ? item.quantity : 1) })));
826
+ return (cart[item.sku] = i3.LineItem.toInstance(Object.assign(Object.assign({}, (cart[item.sku] || item)), { quantity: (((_a = cart[item.sku]) === null || _a === void 0 ? void 0 : _a.quantity) || 0) + (item.quantity ? item.quantity : 1) })));
826
827
  });
827
828
  return cart;
828
829
  };
@@ -848,7 +849,7 @@
848
849
  });
849
850
  return [2 /*return*/, {
850
851
  checkout: checkout,
851
- lineItem: i1$1.LineItem.toInstance({
852
+ lineItem: i3.LineItem.toInstance({
852
853
  id: id,
853
854
  name: name !== null && name !== void 0 ? name : product.name,
854
855
  EAN: EAN !== null && EAN !== void 0 ? EAN : product.EAN,
@@ -903,7 +904,7 @@
903
904
  return this.checkoutService.getCheckout().pipe(operators.map(function (checkout) {
904
905
  var _a;
905
906
  var checkoutItem = (_a = checkout.lineItems) === null || _a === void 0 ? void 0 : _a.find(function (lineItem) { return lineItem.sku === item.sku; });
906
- if (!i1$1.isNil(checkoutItem))
907
+ if (!i3.isNil(checkoutItem))
907
908
  checkoutItem.quantity -= checkoutItem.quantity > 1 ? 1 : 0;
908
909
  return checkout;
909
910
  }), operators.concatMap(function (checkout) { return _this.checkoutService.updateCheckoutLineItems(checkout); }), operators.map(function (checkout) { return _this.generateCartObject(checkout.lineItems); }), operators.tap(function (cart) { return _this.cartSubject.next(cart); }));
@@ -930,7 +931,7 @@
930
931
  };
931
932
  CartService.prototype.updateUserCart = function (user) {
932
933
  var _this = this;
933
- return this.checkoutService.getCheckout().pipe(operators.concatMap(function (checkout) { return _this.checkoutService.updateCheckoutUser(i1$1.Checkout.toInstance(Object.assign(Object.assign({}, checkout.toPlain()), { user: user }))); }), operators.concatMap(function (checkout) { return __awaiter(_this, void 0, void 0, function () {
934
+ return this.checkoutService.getCheckout().pipe(operators.concatMap(function (checkout) { return _this.checkoutService.updateCheckoutUser(i3.Checkout.toInstance(Object.assign(Object.assign({}, checkout.toPlain()), { user: user }))); }), operators.concatMap(function (checkout) { return __awaiter(_this, void 0, void 0, function () {
934
935
  var _a, _b, _h, _j, _k, _l, _m, _o, _p, _q, _r;
935
936
  var _this = this;
936
937
  return __generator(this, function (_s) {
@@ -938,7 +939,7 @@
938
939
  case 0:
939
940
  _j = (_h = this.checkoutService)
940
941
  .updateCheckoutLineItems;
941
- _l = (_k = i1$1.Checkout).toInstance;
942
+ _l = (_k = i3.Checkout).toInstance;
942
943
  _o = (_m = Object).assign;
943
944
  _p = [Object.assign({}, checkout.toPlain())];
944
945
  _q = {};
@@ -985,7 +986,7 @@
985
986
  return [3 /*break*/, 5];
986
987
  case 2:
987
988
  error_1 = _h.sent();
988
- if (!(error_1 instanceof i1$1.NotFoundError))
989
+ if (!(error_1 instanceof i3.NotFoundError))
989
990
  throw error_1;
990
991
  return [4 /*yield*/, this.variantRepository.get({ id: productId })];
991
992
  case 3:
@@ -999,14 +1000,164 @@
999
1000
  });
1000
1001
  });
1001
1002
  };
1003
+ CartService.prototype.getGifts = function () {
1004
+ var _this = this;
1005
+ return this.checkoutService.getCheckout().pipe(operators.mergeMap(function (checkout) { return __awaiter(_this, void 0, void 0, function () {
1006
+ var campaigns, notGiftItems, cartTotal, elegibleCampaigns, _loop_1, campaigns_1, campaigns_1_1, campaign, campaingnProducts, elegibleCampaigns_1, elegibleCampaigns_1_1, campaign, elegibleProducts, _h, _j, product, productData, e_1_1, e_2_1, gifts;
1007
+ var e_3, _k, e_2, _l, e_1, _m;
1008
+ return __generator(this, function (_o) {
1009
+ switch (_o.label) {
1010
+ case 0: return [4 /*yield*/, this.buy2WinRepository
1011
+ .find({
1012
+ filters: {
1013
+ active: { operator: i3.Where.EQUALS, value: true },
1014
+ shop: { operator: i3.Where.EQUALS, value: this.defaultShop },
1015
+ },
1016
+ })
1017
+ .then(function (data) { return data.data; })];
1018
+ case 1:
1019
+ campaigns = _o.sent();
1020
+ notGiftItems = checkout.lineItems.filter(function (item) { return !item.isGift; });
1021
+ if (!campaigns.length)
1022
+ return [2 /*return*/, Object.assign(Object.assign({}, checkout), { lineItems: notGiftItems })];
1023
+ cartTotal = notGiftItems.reduce(function (a, b) { return a + b.pricePaid * b.quantity; }, 0);
1024
+ elegibleCampaigns = [];
1025
+ _loop_1 = function (campaign) {
1026
+ var today = new Date();
1027
+ if (!(campaign.startDate <= today) && !(campaign.endDate >= today))
1028
+ return "continue";
1029
+ if (campaign.activeCategory) {
1030
+ var categoriesCampaing_1 = campaign.categories.map(function (c) { return c.id; });
1031
+ var filterProductsCategories = checkout.lineItems.filter(function (l) {
1032
+ var _a;
1033
+ if (!l.categories || !((_a = l.categories) === null || _a === void 0 ? void 0 : _a.length))
1034
+ return true;
1035
+ return l.categories.some(function (c) { return categoriesCampaing_1.some(function (cat) { return cat == c; }); });
1036
+ });
1037
+ if (filterProductsCategories.length) {
1038
+ var cartTotalCategories = filterProductsCategories.reduce(function (a, b) { return a + b.pricePaid * b.quantity; }, 0);
1039
+ if (cartTotalCategories >= campaign.cartValueMin)
1040
+ elegibleCampaigns.push(campaign);
1041
+ }
1042
+ }
1043
+ else {
1044
+ if (campaign.cartValue && campaign.cartValue > 0) {
1045
+ if (campaign.cartValue <= cartTotal)
1046
+ elegibleCampaigns.push(campaign);
1047
+ }
1048
+ }
1049
+ };
1050
+ try {
1051
+ for (campaigns_1 = __values(campaigns), campaigns_1_1 = campaigns_1.next(); !campaigns_1_1.done; campaigns_1_1 = campaigns_1.next()) {
1052
+ campaign = campaigns_1_1.value;
1053
+ _loop_1(campaign);
1054
+ }
1055
+ }
1056
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
1057
+ finally {
1058
+ try {
1059
+ if (campaigns_1_1 && !campaigns_1_1.done && (_k = campaigns_1.return)) _k.call(campaigns_1);
1060
+ }
1061
+ finally { if (e_3) throw e_3.error; }
1062
+ }
1063
+ if (!elegibleCampaigns.length)
1064
+ return [2 /*return*/, Object.assign(Object.assign({}, checkout), { lineItems: notGiftItems })];
1065
+ campaingnProducts = [];
1066
+ _o.label = 2;
1067
+ case 2:
1068
+ _o.trys.push([2, 14, 15, 16]);
1069
+ elegibleCampaigns_1 = __values(elegibleCampaigns), elegibleCampaigns_1_1 = elegibleCampaigns_1.next();
1070
+ _o.label = 3;
1071
+ case 3:
1072
+ if (!!elegibleCampaigns_1_1.done) return [3 /*break*/, 13];
1073
+ campaign = elegibleCampaigns_1_1.value;
1074
+ elegibleProducts = [];
1075
+ _o.label = 4;
1076
+ case 4:
1077
+ _o.trys.push([4, 9, 10, 11]);
1078
+ _h = (e_1 = void 0, __values(campaign.products)), _j = _h.next();
1079
+ _o.label = 5;
1080
+ case 5:
1081
+ if (!!_j.done) return [3 /*break*/, 8];
1082
+ product = _j.value;
1083
+ return [4 /*yield*/, this.productRepository.get({ sku: product })];
1084
+ case 6:
1085
+ productData = _o.sent();
1086
+ if (!productData)
1087
+ return [3 /*break*/, 7];
1088
+ elegibleProducts.push(productData);
1089
+ _o.label = 7;
1090
+ case 7:
1091
+ _j = _h.next();
1092
+ return [3 /*break*/, 5];
1093
+ case 8: return [3 /*break*/, 11];
1094
+ case 9:
1095
+ e_1_1 = _o.sent();
1096
+ e_1 = { error: e_1_1 };
1097
+ return [3 /*break*/, 11];
1098
+ case 10:
1099
+ try {
1100
+ if (_j && !_j.done && (_m = _h.return)) _m.call(_h);
1101
+ }
1102
+ finally { if (e_1) throw e_1.error; }
1103
+ return [7 /*endfinally*/];
1104
+ case 11:
1105
+ campaingnProducts.push(elegibleProducts);
1106
+ _o.label = 12;
1107
+ case 12:
1108
+ elegibleCampaigns_1_1 = elegibleCampaigns_1.next();
1109
+ return [3 /*break*/, 3];
1110
+ case 13: return [3 /*break*/, 16];
1111
+ case 14:
1112
+ e_2_1 = _o.sent();
1113
+ e_2 = { error: e_2_1 };
1114
+ return [3 /*break*/, 16];
1115
+ case 15:
1116
+ try {
1117
+ if (elegibleCampaigns_1_1 && !elegibleCampaigns_1_1.done && (_l = elegibleCampaigns_1.return)) _l.call(elegibleCampaigns_1);
1118
+ }
1119
+ finally { if (e_2) throw e_2.error; }
1120
+ return [7 /*endfinally*/];
1121
+ case 16:
1122
+ if (!campaingnProducts.length)
1123
+ return [2 /*return*/, Object.assign(Object.assign({}, checkout), { lineItems: notGiftItems })];
1124
+ gifts = this.giftToLineItems([].concat.apply([], __spreadArray([], __read(campaingnProducts))));
1125
+ return [2 /*return*/, Object.assign(Object.assign({}, checkout), { lineItems: notGiftItems.concat(gifts) })];
1126
+ }
1127
+ });
1128
+ }); }), operators.concatMap(function (checkout) { return _this.checkoutService.updateCheckoutLineItems(checkout); }), operators.map(function (checkout) { return _this.generateCartObject(checkout.lineItems); }), operators.tap(function (cart) { return _this.cartSubject.next(cart); }));
1129
+ };
1130
+ CartService.prototype.giftToLineItems = function (items) {
1131
+ return items.map(function (item) {
1132
+ var _a;
1133
+ var brand = item.brand, categories = item.categories, id = item.id, name = item.name, price = item.price, sku = item.sku, slug = item.slug, stock = item.stock, weight = item.weight, EAN = item.EAN;
1134
+ var image = ((_a = item === null || item === void 0 ? void 0 : item.miniatures) === null || _a === void 0 ? void 0 : _a.length) ? item.miniatures[0] : item.images[0];
1135
+ return i3.LineItem.toInstance({
1136
+ brand: brand,
1137
+ categories: categories,
1138
+ id: id.toString(),
1139
+ name: name,
1140
+ price: price,
1141
+ sku: sku,
1142
+ slug: slug,
1143
+ stock: stock,
1144
+ weight: weight,
1145
+ EAN: EAN,
1146
+ image: image,
1147
+ pricePaid: 0,
1148
+ quantity: 1,
1149
+ isGift: true,
1150
+ });
1151
+ });
1152
+ };
1002
1153
  return CartService;
1003
1154
  }());
1004
- CartService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: CartService, deps: [{ token: AuthService }, { token: CheckoutService }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'VariantRepository' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1155
+ CartService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: CartService, deps: [{ token: AuthService }, { token: CheckoutService }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }, { token: 'VariantRepository' }, { token: 'Buy2WinRepository' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1005
1156
  CartService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: CartService });
1006
1157
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: CartService, decorators: [{
1007
1158
  type: i0.Injectable
1008
1159
  }], ctorParameters: function () {
1009
- return [{ type: AuthService }, { type: CheckoutService }, { type: i1__namespace$1.Shops, decorators: [{
1160
+ return [{ type: AuthService }, { type: CheckoutService }, { type: i3__namespace.Shops, decorators: [{
1010
1161
  type: i0.Inject,
1011
1162
  args: [DEFAULT_SHOP]
1012
1163
  }] }, { type: undefined, decorators: [{
@@ -1015,6 +1166,9 @@
1015
1166
  }] }, { type: undefined, decorators: [{
1016
1167
  type: i0.Inject,
1017
1168
  args: ['VariantRepository']
1169
+ }] }, { type: i3__namespace.Buy2WinFirestoreRepository, decorators: [{
1170
+ type: i0.Inject,
1171
+ args: ['Buy2WinRepository']
1018
1172
  }] }];
1019
1173
  } });
1020
1174
 
@@ -1026,7 +1180,7 @@
1026
1180
  }
1027
1181
  CheckoutSubscriptionService.prototype.getCheckoutSubscription = function (checkoutData) {
1028
1182
  var checkoutId = cookie__default["default"].get('checkoutSubscriptionId');
1029
- if (!i1$1.isNil(checkoutId))
1183
+ if (!i3.isNil(checkoutId))
1030
1184
  return rxjs.from(this.checkoutSubscriptionRepository.get({ id: checkoutId }));
1031
1185
  return rxjs.from(this.createCheckoutSubscription(checkoutData));
1032
1186
  };
@@ -1035,7 +1189,7 @@
1035
1189
  var checkout;
1036
1190
  return __generator(this, function (_a) {
1037
1191
  switch (_a.label) {
1038
- case 0: return [4 /*yield*/, this.checkoutSubscriptionRepository.create(Object.assign({ createdAt: new Date() }, i1$1.CheckoutSubscription.toInstance(i1$1.pick(checkoutData, ['user', 'shop'])).toPlain()))];
1192
+ case 0: return [4 /*yield*/, this.checkoutSubscriptionRepository.create(Object.assign({ createdAt: new Date() }, i3.CheckoutSubscription.toInstance(i3.pick(checkoutData, ['user', 'shop'])).toPlain()))];
1039
1193
  case 1:
1040
1194
  checkout = _a.sent();
1041
1195
  cookie__default["default"].set('checkoutSubscriptionId', checkout.id);
@@ -1051,7 +1205,7 @@
1051
1205
  CheckoutSubscriptionService.prototype.checkCoupon = function (nickname, userEmail) {
1052
1206
  var _this = this;
1053
1207
  return this.getCheckoutSubscription().pipe(operators.concatMap(function (checkout) { return _this.couponService
1054
- .checkCoupon(nickname, userEmail, i1$1.CheckoutTypes.SUBSCRIPTION, checkout.subscriptionPlan.name, checkout, true)
1208
+ .checkCoupon(nickname, userEmail, i3.CheckoutTypes.SUBSCRIPTION, checkout.subscriptionPlan.name, checkout, true)
1055
1209
  .pipe(); }));
1056
1210
  };
1057
1211
  CheckoutSubscriptionService.prototype.calcDiscountSubscription = function (coupon) {
@@ -1083,8 +1237,8 @@
1083
1237
  this.buildCategoryGroupWithRequiredData = function (group) {
1084
1238
  var _a, _b;
1085
1239
  return ({
1086
- category: i1$1.Category.toInstance(i1$1.pick(((_a = group === null || group === void 0 ? void 0 : group.category) === null || _a === void 0 ? void 0 : _a.toPlain()) || {}, ['id', 'name', 'slug', 'conditions'])),
1087
- products: ((_b = group === null || group === void 0 ? void 0 : group.products) === null || _b === void 0 ? void 0 : _b.map(function (product) { return i1$1.Product.toInstance(i1$1.pick((product === null || product === void 0 ? void 0 : product.toPlain()) || {}, [
1240
+ category: i3.Category.toInstance(i3.pick(((_a = group === null || group === void 0 ? void 0 : group.category) === null || _a === void 0 ? void 0 : _a.toPlain()) || {}, ['id', 'name', 'slug', 'conditions'])),
1241
+ products: ((_b = group === null || group === void 0 ? void 0 : group.products) === null || _b === void 0 ? void 0 : _b.map(function (product) { return i3.Product.toInstance(i3.pick((product === null || product === void 0 ? void 0 : product.toPlain()) || {}, [
1088
1242
  'id',
1089
1243
  'price',
1090
1244
  'reviews',
@@ -1105,9 +1259,9 @@
1105
1259
  }
1106
1260
  Object.defineProperty(HomeShopService.prototype, "homeId", {
1107
1261
  get: function () {
1108
- if (this.defaultShop === i1$1.Shops.GLAMSHOP)
1262
+ if (this.defaultShop === i3.Shops.GLAMSHOP)
1109
1263
  return 'glamshop';
1110
- if (this.defaultShop === i1$1.Shops.MENSMARKET)
1264
+ if (this.defaultShop === i3.Shops.MENSMARKET)
1111
1265
  return 'mens_market';
1112
1266
  return null;
1113
1267
  },
@@ -1153,7 +1307,7 @@
1153
1307
  HomeShopService.prototype.getVerticalProducts = function () {
1154
1308
  var _this = this;
1155
1309
  return this.getHomeConfiguration().pipe(operators.concatMap(function (home) { return rxjs.forkJoin(home.verticalCarousels.filter(Boolean).map(function (id) { return rxjs.from(_this.categoryRepository.get({ id: id })).pipe(operators.concatMap(function (category) { return rxjs.from(_this.productRepository.find({
1156
- filters: { categories: { operator: i1$1.Where.IN, value: [category.id] } },
1310
+ filters: { categories: { operator: i3.Where.IN, value: [category.id] } },
1157
1311
  limits: { limit: 12 },
1158
1312
  })).pipe(operators.map(function (products) { return ({ category: category, products: products }); })); }), operators.map(function (_c) {
1159
1313
  var category = _c.category, products = _c.products;
@@ -1165,14 +1319,14 @@
1165
1319
  return rxjs.of(this.homeConfiguration).pipe(operators.concatMap(function (home) { return home
1166
1320
  ? rxjs.of(home)
1167
1321
  : !_this.homeId
1168
- ? rxjs.throwError(new i1$1.RequiredArgumentError(['homeId']))
1322
+ ? rxjs.throwError(new i3.RequiredArgumentError(['homeId']))
1169
1323
  : rxjs.from(_this.homeRepository.get({ id: _this.homeId })).pipe(operators.tap(function (homeLoaded) { return (_this.homeConfiguration = homeLoaded); })); }));
1170
1324
  };
1171
1325
  HomeShopService.prototype.saveHomeData = function (homeData) {
1172
1326
  var _this = this;
1173
1327
  var data = {
1174
1328
  createdAt: new Date(),
1175
- expiresAt: i1$1.add(new Date(), { hours: 1 }),
1329
+ expiresAt: i3.add(new Date(), { hours: 1 }),
1176
1330
  data: homeData,
1177
1331
  };
1178
1332
  return rxjs.from(this.homeRepository.update({
@@ -1196,7 +1350,7 @@
1196
1350
  }] }, { type: undefined, decorators: [{
1197
1351
  type: i0.Inject,
1198
1352
  args: ['ProductRepository']
1199
- }] }, { type: i1__namespace$1.Shops, decorators: [{
1353
+ }] }, { type: i3__namespace.Shops, decorators: [{
1200
1354
  type: i0.Inject,
1201
1355
  args: [DEFAULT_SHOP]
1202
1356
  }] }];
@@ -1213,18 +1367,18 @@
1213
1367
  this.angularFirestore
1214
1368
  .doc(this.orderRepository.collectionName + "/" + id)
1215
1369
  .valueChanges()
1216
- .pipe(operators.map(function (doc) { return i1$1.Order.toInstance(doc); }))
1370
+ .pipe(operators.map(function (doc) { return i3.Order.toInstance(doc); }))
1217
1371
  .subscribe(function (doc) { return _this.orderSubject.next(doc); });
1218
1372
  return this.orderSubject;
1219
1373
  };
1220
1374
  return OrderService;
1221
1375
  }());
1222
- OrderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: OrderService, deps: [{ token: i1__namespace$2.AngularFirestore }, { token: 'OrderRepository' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1376
+ OrderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: OrderService, deps: [{ token: i1__namespace$1.AngularFirestore }, { token: 'OrderRepository' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1223
1377
  OrderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: OrderService });
1224
1378
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: OrderService, decorators: [{
1225
1379
  type: i0.Injectable
1226
1380
  }], ctorParameters: function () {
1227
- return [{ type: i1__namespace$2.AngularFirestore }, { type: i1__namespace$1.OrderFirestoreRepository, decorators: [{
1381
+ return [{ type: i1__namespace$1.AngularFirestore }, { type: i3__namespace.OrderFirestoreRepository, decorators: [{
1228
1382
  type: i0.Inject,
1229
1383
  args: ['OrderRepository']
1230
1384
  }] }];
@@ -1264,7 +1418,7 @@
1264
1418
  return s;
1265
1419
  });
1266
1420
  }
1267
- if (shop == i1$1.Shops.GLAMSHOP)
1421
+ if (shop == i3.Shops.GLAMSHOP)
1268
1422
  return shippingMethods;
1269
1423
  if (_this.isFreeShippingBySubscription(shop, subscriptionPlan)) {
1270
1424
  shippingMethods = shippingMethods.map(function (s) {
@@ -1285,7 +1439,7 @@
1285
1439
  ShippingService.prototype.isFreeShippingBySubscription = function (shop, subscriptionPlan) {
1286
1440
  if (!subscriptionPlan)
1287
1441
  return false;
1288
- if (shop == i1$1.Shops.MENSMARKET && subscriptionPlan == 'SELECT') {
1442
+ if (shop == i3.Shops.MENSMARKET && subscriptionPlan == 'SELECT') {
1289
1443
  return true;
1290
1444
  }
1291
1445
  return false;
@@ -1293,7 +1447,7 @@
1293
1447
  ShippingService.prototype.isHalfShippingBySubscription = function (shop, subscriptionPlan) {
1294
1448
  if (!subscriptionPlan)
1295
1449
  return false;
1296
- if (shop == i1$1.Shops.MENSMARKET && subscriptionPlan == 'PRIME') {
1450
+ if (shop == i3.Shops.MENSMARKET && subscriptionPlan == 'PRIME') {
1297
1451
  return true;
1298
1452
  }
1299
1453
  return false;
@@ -1312,12 +1466,12 @@
1312
1466
  };
1313
1467
  return ShippingService;
1314
1468
  }());
1315
- ShippingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ShippingService, deps: [{ token: i1__namespace$3.HttpClient }, { token: BACKEND_URL }, { token: HomeShopService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1469
+ ShippingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ShippingService, deps: [{ token: i1__namespace$2.HttpClient }, { token: BACKEND_URL }, { token: HomeShopService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1316
1470
  ShippingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ShippingService });
1317
1471
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: ShippingService, decorators: [{
1318
1472
  type: i0.Injectable
1319
1473
  }], ctorParameters: function () {
1320
- return [{ type: i1__namespace$3.HttpClient }, { type: undefined, decorators: [{
1474
+ return [{ type: i1__namespace$2.HttpClient }, { type: undefined, decorators: [{
1321
1475
  type: i0.Inject,
1322
1476
  args: [BACKEND_URL]
1323
1477
  }] }, { type: HomeShopService }];
@@ -1343,42 +1497,42 @@
1343
1497
  {
1344
1498
  provide: 'Authentication',
1345
1499
  useFactory: function (authenticationService, userRepository) {
1346
- return new i1$1.Authentication(authenticationService, userRepository);
1500
+ return new i3.Authentication(authenticationService, userRepository);
1347
1501
  },
1348
1502
  deps: ['AuthenticationService', 'UserRepository'],
1349
1503
  },
1350
1504
  {
1351
1505
  provide: 'AuthenticationService',
1352
1506
  useFactory: function (angularFireAuth) {
1353
- return new i1$1.AuthenticationFirebaseAuthService(angularFireAuth);
1507
+ return new i3.AuthenticationFirebaseAuthService(angularFireAuth);
1354
1508
  },
1355
1509
  deps: [i1.AngularFireAuth],
1356
1510
  },
1357
1511
  {
1358
1512
  provide: 'Register',
1359
1513
  useFactory: function (registerService, userRepository) {
1360
- return new i1$1.Register(registerService, userRepository);
1514
+ return new i3.Register(registerService, userRepository);
1361
1515
  },
1362
1516
  deps: ['RegisterService', 'UserRepository'],
1363
1517
  },
1364
1518
  {
1365
1519
  provide: 'RegisterService',
1366
1520
  useFactory: function (angularFireAuth) {
1367
- return new i1$1.RegisterFirebaseAuthService(angularFireAuth);
1521
+ return new i3.RegisterFirebaseAuthService(angularFireAuth);
1368
1522
  },
1369
1523
  deps: [i1.AngularFireAuth],
1370
1524
  },
1371
1525
  {
1372
1526
  provide: 'SignOut',
1373
1527
  useFactory: function (authenticationService) {
1374
- return new i1$1.SignOut(authenticationService);
1528
+ return new i3.SignOut(authenticationService);
1375
1529
  },
1376
1530
  deps: ['AuthenticationService'],
1377
1531
  },
1378
1532
  {
1379
1533
  provide: 'RecoveryPassword',
1380
1534
  useFactory: function (authenticationService) {
1381
- return new i1$1.RecoveryPassword(authenticationService);
1535
+ return new i3.RecoveryPassword(authenticationService);
1382
1536
  },
1383
1537
  deps: ['AuthenticationService'],
1384
1538
  },
@@ -1391,42 +1545,42 @@
1391
1545
  {
1392
1546
  provide: 'Authentication',
1393
1547
  useFactory: function (authenticationService, userRepository) {
1394
- return new i1$1.Authentication(authenticationService, userRepository);
1548
+ return new i3.Authentication(authenticationService, userRepository);
1395
1549
  },
1396
1550
  deps: ['AuthenticationService', 'UserRepository'],
1397
1551
  },
1398
1552
  {
1399
1553
  provide: 'AuthenticationService',
1400
1554
  useFactory: function (angularFireAuth) {
1401
- return new i1$1.AuthenticationFirebaseAuthService(angularFireAuth);
1555
+ return new i3.AuthenticationFirebaseAuthService(angularFireAuth);
1402
1556
  },
1403
1557
  deps: [i1.AngularFireAuth],
1404
1558
  },
1405
1559
  {
1406
1560
  provide: 'Register',
1407
1561
  useFactory: function (registerService, userRepository) {
1408
- return new i1$1.Register(registerService, userRepository);
1562
+ return new i3.Register(registerService, userRepository);
1409
1563
  },
1410
1564
  deps: ['RegisterService', 'UserRepository'],
1411
1565
  },
1412
1566
  {
1413
1567
  provide: 'RegisterService',
1414
1568
  useFactory: function (angularFireAuth) {
1415
- return new i1$1.RegisterFirebaseAuthService(angularFireAuth);
1569
+ return new i3.RegisterFirebaseAuthService(angularFireAuth);
1416
1570
  },
1417
1571
  deps: [i1.AngularFireAuth],
1418
1572
  },
1419
1573
  {
1420
1574
  provide: 'SignOut',
1421
1575
  useFactory: function (authenticationService) {
1422
- return new i1$1.SignOut(authenticationService);
1576
+ return new i3.SignOut(authenticationService);
1423
1577
  },
1424
1578
  deps: ['AuthenticationService'],
1425
1579
  },
1426
1580
  {
1427
1581
  provide: 'RecoveryPassword',
1428
1582
  useFactory: function (authenticationService) {
1429
- return new i1$1.RecoveryPassword(authenticationService);
1583
+ return new i3.RecoveryPassword(authenticationService);
1430
1584
  },
1431
1585
  deps: ['AuthenticationService'],
1432
1586
  },
@@ -1449,9 +1603,9 @@
1449
1603
  AngularElasticSeachModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularElasticSeachModule });
1450
1604
  AngularElasticSeachModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularElasticSeachModule, providers: [
1451
1605
  {
1452
- provide: i1$1.ProductsIndex,
1606
+ provide: i3.ProductsIndex,
1453
1607
  useFactory: function (configuration) {
1454
- return new i1$1.ProductsIndex(new i1$1.AxiosAdapter(configuration));
1608
+ return new i3.ProductsIndex(new i3.AxiosAdapter(configuration));
1455
1609
  },
1456
1610
  deps: [ES_CONFIG],
1457
1611
  },
@@ -1461,9 +1615,9 @@
1461
1615
  args: [{
1462
1616
  providers: [
1463
1617
  {
1464
- provide: i1$1.ProductsIndex,
1618
+ provide: i3.ProductsIndex,
1465
1619
  useFactory: function (configuration) {
1466
- return new i1$1.ProductsIndex(new i1$1.AxiosAdapter(configuration));
1620
+ return new i3.ProductsIndex(new i3.AxiosAdapter(configuration));
1467
1621
  },
1468
1622
  deps: [ES_CONFIG],
1469
1623
  },
@@ -1492,182 +1646,182 @@
1492
1646
  {
1493
1647
  provide: 'BeautyProfileRepository',
1494
1648
  useFactory: function (firestore, userRepository) {
1495
- return new i1$1.UserBeautyProfileFirestoreRepository(firestore.firestore, userRepository);
1649
+ return new i3.UserBeautyProfileFirestoreRepository(firestore.firestore, userRepository);
1496
1650
  },
1497
- deps: [i1$2.AngularFirestore, 'UserRepository'],
1651
+ deps: [i1$1.AngularFirestore, 'UserRepository'],
1498
1652
  },
1499
1653
  {
1500
1654
  provide: 'Buy2WinRepository',
1501
1655
  useFactory: function (firestore) {
1502
- return new i1$1.Buy2WinFirestoreRepository(firestore.firestore);
1656
+ return new i3.Buy2WinFirestoreRepository(firestore.firestore);
1503
1657
  },
1504
- deps: [i1$2.AngularFirestore],
1658
+ deps: [i1$1.AngularFirestore],
1505
1659
  },
1506
1660
  {
1507
- provide: i1$1.CategoryFirestoreRepository,
1661
+ provide: i3.CategoryFirestoreRepository,
1508
1662
  useFactory: function (firestore) {
1509
- return new i1$1.CategoryFirestoreRepository(firestore.firestore);
1663
+ return new i3.CategoryFirestoreRepository(firestore.firestore);
1510
1664
  },
1511
- deps: [i1$2.AngularFirestore],
1665
+ deps: [i1$1.AngularFirestore],
1512
1666
  },
1513
1667
  {
1514
1668
  provide: 'CheckoutRepository',
1515
1669
  useFactory: function (firestore) {
1516
- return new i1$1.CheckoutFirestoreRepository(firestore.firestore);
1670
+ return new i3.CheckoutFirestoreRepository(firestore.firestore);
1517
1671
  },
1518
- deps: [i1$2.AngularFirestore],
1672
+ deps: [i1$1.AngularFirestore],
1519
1673
  },
1520
1674
  {
1521
1675
  provide: 'CheckoutSubscriptionRepository',
1522
1676
  useFactory: function (firestore) {
1523
- return new i1$1.CheckoutSubscriptionFirestoreRepository(firestore.firestore);
1677
+ return new i3.CheckoutSubscriptionFirestoreRepository(firestore.firestore);
1524
1678
  },
1525
- deps: [i1$2.AngularFirestore],
1679
+ deps: [i1$1.AngularFirestore],
1526
1680
  },
1527
1681
  {
1528
1682
  provide: 'CouponRepository',
1529
1683
  useFactory: function (firestore) {
1530
- return new i1$1.CouponFirestoreRepository(firestore.firestore);
1684
+ return new i3.CouponFirestoreRepository(firestore.firestore);
1531
1685
  },
1532
- deps: [i1$2.AngularFirestore],
1686
+ deps: [i1$1.AngularFirestore],
1533
1687
  },
1534
1688
  {
1535
1689
  provide: 'CampaignHashtagRepository',
1536
1690
  useFactory: function (firestore) {
1537
- return new i1$1.CampaignHashtagFirestoreRepository(firestore.firestore);
1691
+ return new i3.CampaignHashtagFirestoreRepository(firestore.firestore);
1538
1692
  },
1539
- deps: [i1$2.AngularFirestore],
1693
+ deps: [i1$1.AngularFirestore],
1540
1694
  },
1541
1695
  {
1542
1696
  provide: 'CampaignDashboardRepository',
1543
1697
  useFactory: function (firestore) {
1544
- return new i1$1.CampaignDashboardFirestoreRepository(firestore.firestore);
1698
+ return new i3.CampaignDashboardFirestoreRepository(firestore.firestore);
1545
1699
  },
1546
- deps: [i1$2.AngularFirestore],
1700
+ deps: [i1$1.AngularFirestore],
1547
1701
  },
1548
1702
  {
1549
1703
  provide: 'EditionRepository',
1550
1704
  useFactory: function (firestore, subscriptionRepository) {
1551
- return new i1$1.SubscriptionEditionFirestoreRepository(firestore.firestore, subscriptionRepository);
1705
+ return new i3.SubscriptionEditionFirestoreRepository(firestore.firestore, subscriptionRepository);
1552
1706
  },
1553
- deps: [i1$2.AngularFirestore, 'SubscriptionRepository'],
1707
+ deps: [i1$1.AngularFirestore, 'SubscriptionRepository'],
1554
1708
  },
1555
1709
  {
1556
1710
  provide: 'HomeRepository',
1557
1711
  useFactory: function (firestore) {
1558
- return new i1$1.HomeFirestoreRepository(firestore.firestore);
1712
+ return new i3.HomeFirestoreRepository(firestore.firestore);
1559
1713
  },
1560
- deps: [i1$2.AngularFirestore],
1714
+ deps: [i1$1.AngularFirestore],
1561
1715
  },
1562
1716
  {
1563
1717
  provide: 'LeadRepository',
1564
1718
  useFactory: function (firestore) {
1565
- return new i1$1.LeadFirestoreRepository(firestore.firestore);
1719
+ return new i3.LeadFirestoreRepository(firestore.firestore);
1566
1720
  },
1567
- deps: [i1$2.AngularFirestore],
1721
+ deps: [i1$1.AngularFirestore],
1568
1722
  },
1569
1723
  {
1570
1724
  provide: 'LegacyOrderRepository',
1571
1725
  useFactory: function (firestore) {
1572
- return new i1$1.LegacyOrderFirestoreRepository(firestore.firestore);
1726
+ return new i3.LegacyOrderFirestoreRepository(firestore.firestore);
1573
1727
  },
1574
- deps: [i1$2.AngularFirestore],
1728
+ deps: [i1$1.AngularFirestore],
1575
1729
  },
1576
1730
  {
1577
1731
  provide: 'ShopMenuRepository',
1578
1732
  useFactory: function (firestore) {
1579
- return new i1$1.ShopMenuFirestoreRepository(firestore.firestore);
1733
+ return new i3.ShopMenuFirestoreRepository(firestore.firestore);
1580
1734
  },
1581
- deps: [i1$2.AngularFirestore],
1735
+ deps: [i1$1.AngularFirestore],
1582
1736
  },
1583
1737
  {
1584
1738
  provide: 'OrderRepository',
1585
1739
  useFactory: function (firestore) {
1586
- return new i1$1.OrderFirestoreRepository(firestore.firestore);
1740
+ return new i3.OrderFirestoreRepository(firestore.firestore);
1587
1741
  },
1588
- deps: [i1$2.AngularFirestore],
1742
+ deps: [i1$1.AngularFirestore],
1589
1743
  },
1590
1744
  {
1591
1745
  provide: 'PaymentRepository',
1592
1746
  useFactory: function (firestore) {
1593
- return new i1$1.PaymentFirestoreRepository(firestore.firestore);
1747
+ return new i3.PaymentFirestoreRepository(firestore.firestore);
1594
1748
  },
1595
- deps: [i1$2.AngularFirestore],
1749
+ deps: [i1$1.AngularFirestore],
1596
1750
  },
1597
1751
  {
1598
- provide: i1$1.ProductFirestoreRepository,
1752
+ provide: i3.ProductFirestoreRepository,
1599
1753
  useFactory: function (firestore) {
1600
- return new i1$1.ProductFirestoreRepository(firestore.firestore);
1754
+ return new i3.ProductFirestoreRepository(firestore.firestore);
1601
1755
  },
1602
- deps: [i1$2.AngularFirestore],
1756
+ deps: [i1$1.AngularFirestore],
1603
1757
  },
1604
1758
  {
1605
1759
  provide: 'ShopSettingsRepository',
1606
1760
  useFactory: function (firestore) {
1607
- return new i1$1.ShopSettingsFirestoreRepository(firestore.firestore);
1761
+ return new i3.ShopSettingsFirestoreRepository(firestore.firestore);
1608
1762
  },
1609
- deps: [i1$2.AngularFirestore],
1763
+ deps: [i1$1.AngularFirestore],
1610
1764
  },
1611
1765
  {
1612
1766
  provide: 'SubscriptionPaymentRepository',
1613
1767
  useFactory: function (firestore, subscriptionRepository) {
1614
- return new i1$1.SubscriptionPaymentFirestoreRepository(firestore.firestore, subscriptionRepository);
1768
+ return new i3.SubscriptionPaymentFirestoreRepository(firestore.firestore, subscriptionRepository);
1615
1769
  },
1616
- deps: [i1$2.AngularFirestore, 'SubscriptionRepository'],
1770
+ deps: [i1$1.AngularFirestore, 'SubscriptionRepository'],
1617
1771
  },
1618
1772
  {
1619
1773
  provide: 'SubscriptionPlanRepository',
1620
1774
  useFactory: function (firestore) {
1621
- return new i1$1.SubscriptionPlanFirestoreRepository(firestore.firestore);
1775
+ return new i3.SubscriptionPlanFirestoreRepository(firestore.firestore);
1622
1776
  },
1623
- deps: [i1$2.AngularFirestore],
1777
+ deps: [i1$1.AngularFirestore],
1624
1778
  },
1625
1779
  {
1626
1780
  provide: 'SubscriptionProductRepository',
1627
1781
  useFactory: function (firestore) {
1628
- return new i1$1.SubscriptionProductFirestoreRepository(firestore.firestore);
1782
+ return new i3.SubscriptionProductFirestoreRepository(firestore.firestore);
1629
1783
  },
1630
- deps: [i1$2.AngularFirestore],
1784
+ deps: [i1$1.AngularFirestore],
1631
1785
  },
1632
1786
  {
1633
1787
  provide: 'SubscriptionRepository',
1634
1788
  useFactory: function (firestore) {
1635
- return new i1$1.SubscriptionFirestoreRepository(firestore.firestore);
1789
+ return new i3.SubscriptionFirestoreRepository(firestore.firestore);
1636
1790
  },
1637
- deps: [i1$2.AngularFirestore],
1791
+ deps: [i1$1.AngularFirestore],
1638
1792
  },
1639
1793
  {
1640
1794
  provide: 'UserRepository',
1641
1795
  useFactory: function (firestore) {
1642
- return new i1$1.UserFirestoreRepository(firestore.firestore);
1796
+ return new i3.UserFirestoreRepository(firestore.firestore);
1643
1797
  },
1644
- deps: [i1$2.AngularFirestore],
1798
+ deps: [i1$1.AngularFirestore],
1645
1799
  },
1646
1800
  {
1647
1801
  provide: 'UserAddressRepository',
1648
1802
  useFactory: function (firestore, userRepository) {
1649
- return new i1$1.UserAddressFirestoreRepository(firestore.firestore, userRepository);
1803
+ return new i3.UserAddressFirestoreRepository(firestore.firestore, userRepository);
1650
1804
  },
1651
- deps: [i1$2.AngularFirestore, 'UserRepository'],
1805
+ deps: [i1$1.AngularFirestore, 'UserRepository'],
1652
1806
  },
1653
1807
  {
1654
1808
  provide: 'UserPaymentMethodRepository',
1655
1809
  useFactory: function (firestore, userRepository) {
1656
- return new i1$1.UserPaymentMethodFirestoreRepository(firestore.firestore, userRepository);
1810
+ return new i3.UserPaymentMethodFirestoreRepository(firestore.firestore, userRepository);
1657
1811
  },
1658
- deps: [i1$2.AngularFirestore, 'UserRepository'],
1812
+ deps: [i1$1.AngularFirestore, 'UserRepository'],
1659
1813
  },
1660
1814
  {
1661
- provide: i1$1.ProductVariantFirestoreRepository,
1815
+ provide: i3.ProductVariantFirestoreRepository,
1662
1816
  useFactory: function (firestore, productRepository) {
1663
- return new i1$1.ProductVariantFirestoreRepository(firestore.firestore, productRepository);
1817
+ return new i3.ProductVariantFirestoreRepository(firestore.firestore, productRepository);
1664
1818
  },
1665
- deps: [i1$2.AngularFirestore, i1$1.ProductFirestoreRepository],
1819
+ deps: [i1$1.AngularFirestore, i3.ProductFirestoreRepository],
1666
1820
  },
1667
1821
  {
1668
1822
  provide: i0.APP_INITIALIZER,
1669
1823
  useFactory: function (firestore) { return function () { return firestore.firestore.settings({ ignoreUndefinedProperties: true }); }; },
1670
- deps: [i1$2.AngularFirestore],
1824
+ deps: [i1$1.AngularFirestore],
1671
1825
  multi: true,
1672
1826
  },
1673
1827
  ], imports: [[fire.AngularFireModule, AngularElasticSeachModule]] });
@@ -1679,182 +1833,182 @@
1679
1833
  {
1680
1834
  provide: 'BeautyProfileRepository',
1681
1835
  useFactory: function (firestore, userRepository) {
1682
- return new i1$1.UserBeautyProfileFirestoreRepository(firestore.firestore, userRepository);
1836
+ return new i3.UserBeautyProfileFirestoreRepository(firestore.firestore, userRepository);
1683
1837
  },
1684
- deps: [i1$2.AngularFirestore, 'UserRepository'],
1838
+ deps: [i1$1.AngularFirestore, 'UserRepository'],
1685
1839
  },
1686
1840
  {
1687
1841
  provide: 'Buy2WinRepository',
1688
1842
  useFactory: function (firestore) {
1689
- return new i1$1.Buy2WinFirestoreRepository(firestore.firestore);
1843
+ return new i3.Buy2WinFirestoreRepository(firestore.firestore);
1690
1844
  },
1691
- deps: [i1$2.AngularFirestore],
1845
+ deps: [i1$1.AngularFirestore],
1692
1846
  },
1693
1847
  {
1694
- provide: i1$1.CategoryFirestoreRepository,
1848
+ provide: i3.CategoryFirestoreRepository,
1695
1849
  useFactory: function (firestore) {
1696
- return new i1$1.CategoryFirestoreRepository(firestore.firestore);
1850
+ return new i3.CategoryFirestoreRepository(firestore.firestore);
1697
1851
  },
1698
- deps: [i1$2.AngularFirestore],
1852
+ deps: [i1$1.AngularFirestore],
1699
1853
  },
1700
1854
  {
1701
1855
  provide: 'CheckoutRepository',
1702
1856
  useFactory: function (firestore) {
1703
- return new i1$1.CheckoutFirestoreRepository(firestore.firestore);
1857
+ return new i3.CheckoutFirestoreRepository(firestore.firestore);
1704
1858
  },
1705
- deps: [i1$2.AngularFirestore],
1859
+ deps: [i1$1.AngularFirestore],
1706
1860
  },
1707
1861
  {
1708
1862
  provide: 'CheckoutSubscriptionRepository',
1709
1863
  useFactory: function (firestore) {
1710
- return new i1$1.CheckoutSubscriptionFirestoreRepository(firestore.firestore);
1864
+ return new i3.CheckoutSubscriptionFirestoreRepository(firestore.firestore);
1711
1865
  },
1712
- deps: [i1$2.AngularFirestore],
1866
+ deps: [i1$1.AngularFirestore],
1713
1867
  },
1714
1868
  {
1715
1869
  provide: 'CouponRepository',
1716
1870
  useFactory: function (firestore) {
1717
- return new i1$1.CouponFirestoreRepository(firestore.firestore);
1871
+ return new i3.CouponFirestoreRepository(firestore.firestore);
1718
1872
  },
1719
- deps: [i1$2.AngularFirestore],
1873
+ deps: [i1$1.AngularFirestore],
1720
1874
  },
1721
1875
  {
1722
1876
  provide: 'CampaignHashtagRepository',
1723
1877
  useFactory: function (firestore) {
1724
- return new i1$1.CampaignHashtagFirestoreRepository(firestore.firestore);
1878
+ return new i3.CampaignHashtagFirestoreRepository(firestore.firestore);
1725
1879
  },
1726
- deps: [i1$2.AngularFirestore],
1880
+ deps: [i1$1.AngularFirestore],
1727
1881
  },
1728
1882
  {
1729
1883
  provide: 'CampaignDashboardRepository',
1730
1884
  useFactory: function (firestore) {
1731
- return new i1$1.CampaignDashboardFirestoreRepository(firestore.firestore);
1885
+ return new i3.CampaignDashboardFirestoreRepository(firestore.firestore);
1732
1886
  },
1733
- deps: [i1$2.AngularFirestore],
1887
+ deps: [i1$1.AngularFirestore],
1734
1888
  },
1735
1889
  {
1736
1890
  provide: 'EditionRepository',
1737
1891
  useFactory: function (firestore, subscriptionRepository) {
1738
- return new i1$1.SubscriptionEditionFirestoreRepository(firestore.firestore, subscriptionRepository);
1892
+ return new i3.SubscriptionEditionFirestoreRepository(firestore.firestore, subscriptionRepository);
1739
1893
  },
1740
- deps: [i1$2.AngularFirestore, 'SubscriptionRepository'],
1894
+ deps: [i1$1.AngularFirestore, 'SubscriptionRepository'],
1741
1895
  },
1742
1896
  {
1743
1897
  provide: 'HomeRepository',
1744
1898
  useFactory: function (firestore) {
1745
- return new i1$1.HomeFirestoreRepository(firestore.firestore);
1899
+ return new i3.HomeFirestoreRepository(firestore.firestore);
1746
1900
  },
1747
- deps: [i1$2.AngularFirestore],
1901
+ deps: [i1$1.AngularFirestore],
1748
1902
  },
1749
1903
  {
1750
1904
  provide: 'LeadRepository',
1751
1905
  useFactory: function (firestore) {
1752
- return new i1$1.LeadFirestoreRepository(firestore.firestore);
1906
+ return new i3.LeadFirestoreRepository(firestore.firestore);
1753
1907
  },
1754
- deps: [i1$2.AngularFirestore],
1908
+ deps: [i1$1.AngularFirestore],
1755
1909
  },
1756
1910
  {
1757
1911
  provide: 'LegacyOrderRepository',
1758
1912
  useFactory: function (firestore) {
1759
- return new i1$1.LegacyOrderFirestoreRepository(firestore.firestore);
1913
+ return new i3.LegacyOrderFirestoreRepository(firestore.firestore);
1760
1914
  },
1761
- deps: [i1$2.AngularFirestore],
1915
+ deps: [i1$1.AngularFirestore],
1762
1916
  },
1763
1917
  {
1764
1918
  provide: 'ShopMenuRepository',
1765
1919
  useFactory: function (firestore) {
1766
- return new i1$1.ShopMenuFirestoreRepository(firestore.firestore);
1920
+ return new i3.ShopMenuFirestoreRepository(firestore.firestore);
1767
1921
  },
1768
- deps: [i1$2.AngularFirestore],
1922
+ deps: [i1$1.AngularFirestore],
1769
1923
  },
1770
1924
  {
1771
1925
  provide: 'OrderRepository',
1772
1926
  useFactory: function (firestore) {
1773
- return new i1$1.OrderFirestoreRepository(firestore.firestore);
1927
+ return new i3.OrderFirestoreRepository(firestore.firestore);
1774
1928
  },
1775
- deps: [i1$2.AngularFirestore],
1929
+ deps: [i1$1.AngularFirestore],
1776
1930
  },
1777
1931
  {
1778
1932
  provide: 'PaymentRepository',
1779
1933
  useFactory: function (firestore) {
1780
- return new i1$1.PaymentFirestoreRepository(firestore.firestore);
1934
+ return new i3.PaymentFirestoreRepository(firestore.firestore);
1781
1935
  },
1782
- deps: [i1$2.AngularFirestore],
1936
+ deps: [i1$1.AngularFirestore],
1783
1937
  },
1784
1938
  {
1785
- provide: i1$1.ProductFirestoreRepository,
1939
+ provide: i3.ProductFirestoreRepository,
1786
1940
  useFactory: function (firestore) {
1787
- return new i1$1.ProductFirestoreRepository(firestore.firestore);
1941
+ return new i3.ProductFirestoreRepository(firestore.firestore);
1788
1942
  },
1789
- deps: [i1$2.AngularFirestore],
1943
+ deps: [i1$1.AngularFirestore],
1790
1944
  },
1791
1945
  {
1792
1946
  provide: 'ShopSettingsRepository',
1793
1947
  useFactory: function (firestore) {
1794
- return new i1$1.ShopSettingsFirestoreRepository(firestore.firestore);
1948
+ return new i3.ShopSettingsFirestoreRepository(firestore.firestore);
1795
1949
  },
1796
- deps: [i1$2.AngularFirestore],
1950
+ deps: [i1$1.AngularFirestore],
1797
1951
  },
1798
1952
  {
1799
1953
  provide: 'SubscriptionPaymentRepository',
1800
1954
  useFactory: function (firestore, subscriptionRepository) {
1801
- return new i1$1.SubscriptionPaymentFirestoreRepository(firestore.firestore, subscriptionRepository);
1955
+ return new i3.SubscriptionPaymentFirestoreRepository(firestore.firestore, subscriptionRepository);
1802
1956
  },
1803
- deps: [i1$2.AngularFirestore, 'SubscriptionRepository'],
1957
+ deps: [i1$1.AngularFirestore, 'SubscriptionRepository'],
1804
1958
  },
1805
1959
  {
1806
1960
  provide: 'SubscriptionPlanRepository',
1807
1961
  useFactory: function (firestore) {
1808
- return new i1$1.SubscriptionPlanFirestoreRepository(firestore.firestore);
1962
+ return new i3.SubscriptionPlanFirestoreRepository(firestore.firestore);
1809
1963
  },
1810
- deps: [i1$2.AngularFirestore],
1964
+ deps: [i1$1.AngularFirestore],
1811
1965
  },
1812
1966
  {
1813
1967
  provide: 'SubscriptionProductRepository',
1814
1968
  useFactory: function (firestore) {
1815
- return new i1$1.SubscriptionProductFirestoreRepository(firestore.firestore);
1969
+ return new i3.SubscriptionProductFirestoreRepository(firestore.firestore);
1816
1970
  },
1817
- deps: [i1$2.AngularFirestore],
1971
+ deps: [i1$1.AngularFirestore],
1818
1972
  },
1819
1973
  {
1820
1974
  provide: 'SubscriptionRepository',
1821
1975
  useFactory: function (firestore) {
1822
- return new i1$1.SubscriptionFirestoreRepository(firestore.firestore);
1976
+ return new i3.SubscriptionFirestoreRepository(firestore.firestore);
1823
1977
  },
1824
- deps: [i1$2.AngularFirestore],
1978
+ deps: [i1$1.AngularFirestore],
1825
1979
  },
1826
1980
  {
1827
1981
  provide: 'UserRepository',
1828
1982
  useFactory: function (firestore) {
1829
- return new i1$1.UserFirestoreRepository(firestore.firestore);
1983
+ return new i3.UserFirestoreRepository(firestore.firestore);
1830
1984
  },
1831
- deps: [i1$2.AngularFirestore],
1985
+ deps: [i1$1.AngularFirestore],
1832
1986
  },
1833
1987
  {
1834
1988
  provide: 'UserAddressRepository',
1835
1989
  useFactory: function (firestore, userRepository) {
1836
- return new i1$1.UserAddressFirestoreRepository(firestore.firestore, userRepository);
1990
+ return new i3.UserAddressFirestoreRepository(firestore.firestore, userRepository);
1837
1991
  },
1838
- deps: [i1$2.AngularFirestore, 'UserRepository'],
1992
+ deps: [i1$1.AngularFirestore, 'UserRepository'],
1839
1993
  },
1840
1994
  {
1841
1995
  provide: 'UserPaymentMethodRepository',
1842
1996
  useFactory: function (firestore, userRepository) {
1843
- return new i1$1.UserPaymentMethodFirestoreRepository(firestore.firestore, userRepository);
1997
+ return new i3.UserPaymentMethodFirestoreRepository(firestore.firestore, userRepository);
1844
1998
  },
1845
- deps: [i1$2.AngularFirestore, 'UserRepository'],
1999
+ deps: [i1$1.AngularFirestore, 'UserRepository'],
1846
2000
  },
1847
2001
  {
1848
- provide: i1$1.ProductVariantFirestoreRepository,
2002
+ provide: i3.ProductVariantFirestoreRepository,
1849
2003
  useFactory: function (firestore, productRepository) {
1850
- return new i1$1.ProductVariantFirestoreRepository(firestore.firestore, productRepository);
2004
+ return new i3.ProductVariantFirestoreRepository(firestore.firestore, productRepository);
1851
2005
  },
1852
- deps: [i1$2.AngularFirestore, i1$1.ProductFirestoreRepository],
2006
+ deps: [i1$1.AngularFirestore, i3.ProductFirestoreRepository],
1853
2007
  },
1854
2008
  {
1855
2009
  provide: i0.APP_INITIALIZER,
1856
2010
  useFactory: function (firestore) { return function () { return firestore.firestore.settings({ ignoreUndefinedProperties: true }); }; },
1857
- deps: [i1$2.AngularFirestore],
2011
+ deps: [i1$1.AngularFirestore],
1858
2012
  multi: true,
1859
2013
  },
1860
2014
  ],
@@ -1877,69 +2031,69 @@
1877
2031
  AngularHasuraGraphQLModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularHasuraGraphQLModule, providers: [
1878
2032
  {
1879
2033
  provide: 'CategoryRepository',
1880
- useExisting: i1$1.CategoryHasuraGraphQLRepository,
2034
+ useExisting: i3.CategoryHasuraGraphQLRepository,
1881
2035
  },
1882
2036
  {
1883
- provide: i1$1.CategoryHasuraGraphQLRepository,
2037
+ provide: i3.CategoryHasuraGraphQLRepository,
1884
2038
  useFactory: function (options, productRepository, categoryFilterRepository) {
1885
- return new i1$1.CategoryHasuraGraphQLRepository(options.endpoint, options.credentials, productRepository, categoryFilterRepository);
2039
+ return new i3.CategoryHasuraGraphQLRepository(options.endpoint, options.credentials, productRepository, categoryFilterRepository);
1886
2040
  },
1887
- deps: [HASURA_OPTIONS, i1$1.ProductHasuraGraphQLRepository, i1$1.CategoryFilterHasuraGraphQLRepository],
2041
+ deps: [HASURA_OPTIONS, i3.ProductHasuraGraphQLRepository, i3.CategoryFilterHasuraGraphQLRepository],
1888
2042
  },
1889
2043
  {
1890
2044
  provide: 'ProductRepository',
1891
- useExisting: i1$1.ProductHasuraGraphQLRepository,
2045
+ useExisting: i3.ProductHasuraGraphQLRepository,
1892
2046
  },
1893
2047
  {
1894
- provide: i1$1.ProductHasuraGraphQLRepository,
2048
+ provide: i3.ProductHasuraGraphQLRepository,
1895
2049
  useFactory: function (options) {
1896
- return new i1$1.ProductHasuraGraphQLRepository(options.endpoint, options.credentials);
2050
+ return new i3.ProductHasuraGraphQLRepository(options.endpoint, options.credentials);
1897
2051
  },
1898
2052
  deps: [HASURA_OPTIONS],
1899
2053
  },
1900
2054
  {
1901
2055
  provide: 'VariantRepository',
1902
- useExisting: i1$1.VariantHasuraGraphQLRepository,
2056
+ useExisting: i3.VariantHasuraGraphQLRepository,
1903
2057
  },
1904
2058
  {
1905
- provide: i1$1.VariantHasuraGraphQLRepository,
2059
+ provide: i3.VariantHasuraGraphQLRepository,
1906
2060
  useFactory: function (options) {
1907
- return new i1$1.VariantHasuraGraphQLRepository(options.endpoint, options.credentials);
2061
+ return new i3.VariantHasuraGraphQLRepository(options.endpoint, options.credentials);
1908
2062
  },
1909
2063
  deps: [HASURA_OPTIONS],
1910
2064
  },
1911
2065
  {
1912
2066
  provide: 'CategoryFilterRepository',
1913
- useExisting: i1$1.CategoryFilterHasuraGraphQLRepository,
2067
+ useExisting: i3.CategoryFilterHasuraGraphQLRepository,
1914
2068
  },
1915
2069
  {
1916
- provide: i1$1.CategoryFilterHasuraGraphQLRepository,
2070
+ provide: i3.CategoryFilterHasuraGraphQLRepository,
1917
2071
  useFactory: function (options) {
1918
- return new i1$1.CategoryFilterHasuraGraphQLRepository(options.endpoint, options.credentials);
2072
+ return new i3.CategoryFilterHasuraGraphQLRepository(options.endpoint, options.credentials);
1919
2073
  },
1920
2074
  deps: [HASURA_OPTIONS],
1921
2075
  },
1922
2076
  {
1923
2077
  provide: 'FilterOptionRepository',
1924
- useExisting: i1$1.FilterOptionHasuraGraphQLRepository,
2078
+ useExisting: i3.FilterOptionHasuraGraphQLRepository,
1925
2079
  },
1926
2080
  {
1927
- provide: i1$1.FilterOptionHasuraGraphQLRepository,
2081
+ provide: i3.FilterOptionHasuraGraphQLRepository,
1928
2082
  useFactory: function (options) {
1929
- return new i1$1.FilterOptionHasuraGraphQLRepository(options.endpoint, options.credentials);
2083
+ return new i3.FilterOptionHasuraGraphQLRepository(options.endpoint, options.credentials);
1930
2084
  },
1931
2085
  deps: [HASURA_OPTIONS],
1932
2086
  },
1933
2087
  {
1934
2088
  provide: 'FilterRepository',
1935
- useExisting: i1$1.FilterHasuraGraphQLRepository,
2089
+ useExisting: i3.FilterHasuraGraphQLRepository,
1936
2090
  },
1937
2091
  {
1938
- provide: i1$1.FilterHasuraGraphQLRepository,
2092
+ provide: i3.FilterHasuraGraphQLRepository,
1939
2093
  useFactory: function (options, filterOptionRepository, categoryFilterRepository) {
1940
- return new i1$1.FilterHasuraGraphQLRepository(options.endpoint, options.credentials, filterOptionRepository, categoryFilterRepository);
2094
+ return new i3.FilterHasuraGraphQLRepository(options.endpoint, options.credentials, filterOptionRepository, categoryFilterRepository);
1941
2095
  },
1942
- deps: [HASURA_OPTIONS, i1$1.FilterOptionHasuraGraphQLRepository, i1$1.CategoryFilterHasuraGraphQLRepository],
2096
+ deps: [HASURA_OPTIONS, i3.FilterOptionHasuraGraphQLRepository, i3.CategoryFilterHasuraGraphQLRepository],
1943
2097
  },
1944
2098
  ] });
1945
2099
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0__namespace, type: AngularHasuraGraphQLModule, decorators: [{
@@ -1948,69 +2102,69 @@
1948
2102
  providers: [
1949
2103
  {
1950
2104
  provide: 'CategoryRepository',
1951
- useExisting: i1$1.CategoryHasuraGraphQLRepository,
2105
+ useExisting: i3.CategoryHasuraGraphQLRepository,
1952
2106
  },
1953
2107
  {
1954
- provide: i1$1.CategoryHasuraGraphQLRepository,
2108
+ provide: i3.CategoryHasuraGraphQLRepository,
1955
2109
  useFactory: function (options, productRepository, categoryFilterRepository) {
1956
- return new i1$1.CategoryHasuraGraphQLRepository(options.endpoint, options.credentials, productRepository, categoryFilterRepository);
2110
+ return new i3.CategoryHasuraGraphQLRepository(options.endpoint, options.credentials, productRepository, categoryFilterRepository);
1957
2111
  },
1958
- deps: [HASURA_OPTIONS, i1$1.ProductHasuraGraphQLRepository, i1$1.CategoryFilterHasuraGraphQLRepository],
2112
+ deps: [HASURA_OPTIONS, i3.ProductHasuraGraphQLRepository, i3.CategoryFilterHasuraGraphQLRepository],
1959
2113
  },
1960
2114
  {
1961
2115
  provide: 'ProductRepository',
1962
- useExisting: i1$1.ProductHasuraGraphQLRepository,
2116
+ useExisting: i3.ProductHasuraGraphQLRepository,
1963
2117
  },
1964
2118
  {
1965
- provide: i1$1.ProductHasuraGraphQLRepository,
2119
+ provide: i3.ProductHasuraGraphQLRepository,
1966
2120
  useFactory: function (options) {
1967
- return new i1$1.ProductHasuraGraphQLRepository(options.endpoint, options.credentials);
2121
+ return new i3.ProductHasuraGraphQLRepository(options.endpoint, options.credentials);
1968
2122
  },
1969
2123
  deps: [HASURA_OPTIONS],
1970
2124
  },
1971
2125
  {
1972
2126
  provide: 'VariantRepository',
1973
- useExisting: i1$1.VariantHasuraGraphQLRepository,
2127
+ useExisting: i3.VariantHasuraGraphQLRepository,
1974
2128
  },
1975
2129
  {
1976
- provide: i1$1.VariantHasuraGraphQLRepository,
2130
+ provide: i3.VariantHasuraGraphQLRepository,
1977
2131
  useFactory: function (options) {
1978
- return new i1$1.VariantHasuraGraphQLRepository(options.endpoint, options.credentials);
2132
+ return new i3.VariantHasuraGraphQLRepository(options.endpoint, options.credentials);
1979
2133
  },
1980
2134
  deps: [HASURA_OPTIONS],
1981
2135
  },
1982
2136
  {
1983
2137
  provide: 'CategoryFilterRepository',
1984
- useExisting: i1$1.CategoryFilterHasuraGraphQLRepository,
2138
+ useExisting: i3.CategoryFilterHasuraGraphQLRepository,
1985
2139
  },
1986
2140
  {
1987
- provide: i1$1.CategoryFilterHasuraGraphQLRepository,
2141
+ provide: i3.CategoryFilterHasuraGraphQLRepository,
1988
2142
  useFactory: function (options) {
1989
- return new i1$1.CategoryFilterHasuraGraphQLRepository(options.endpoint, options.credentials);
2143
+ return new i3.CategoryFilterHasuraGraphQLRepository(options.endpoint, options.credentials);
1990
2144
  },
1991
2145
  deps: [HASURA_OPTIONS],
1992
2146
  },
1993
2147
  {
1994
2148
  provide: 'FilterOptionRepository',
1995
- useExisting: i1$1.FilterOptionHasuraGraphQLRepository,
2149
+ useExisting: i3.FilterOptionHasuraGraphQLRepository,
1996
2150
  },
1997
2151
  {
1998
- provide: i1$1.FilterOptionHasuraGraphQLRepository,
2152
+ provide: i3.FilterOptionHasuraGraphQLRepository,
1999
2153
  useFactory: function (options) {
2000
- return new i1$1.FilterOptionHasuraGraphQLRepository(options.endpoint, options.credentials);
2154
+ return new i3.FilterOptionHasuraGraphQLRepository(options.endpoint, options.credentials);
2001
2155
  },
2002
2156
  deps: [HASURA_OPTIONS],
2003
2157
  },
2004
2158
  {
2005
2159
  provide: 'FilterRepository',
2006
- useExisting: i1$1.FilterHasuraGraphQLRepository,
2160
+ useExisting: i3.FilterHasuraGraphQLRepository,
2007
2161
  },
2008
2162
  {
2009
- provide: i1$1.FilterHasuraGraphQLRepository,
2163
+ provide: i3.FilterHasuraGraphQLRepository,
2010
2164
  useFactory: function (options, filterOptionRepository, categoryFilterRepository) {
2011
- return new i1$1.FilterHasuraGraphQLRepository(options.endpoint, options.credentials, filterOptionRepository, categoryFilterRepository);
2165
+ return new i3.FilterHasuraGraphQLRepository(options.endpoint, options.credentials, filterOptionRepository, categoryFilterRepository);
2012
2166
  },
2013
- deps: [HASURA_OPTIONS, i1$1.FilterOptionHasuraGraphQLRepository, i1$1.CategoryFilterHasuraGraphQLRepository],
2167
+ deps: [HASURA_OPTIONS, i3.FilterOptionHasuraGraphQLRepository, i3.CategoryFilterHasuraGraphQLRepository],
2014
2168
  },
2015
2169
  ],
2016
2170
  }]
@@ -2022,7 +2176,7 @@
2022
2176
  AngularConnectModule.initializeApp = function (defaultShop, options, nameOrConfig) {
2023
2177
  return {
2024
2178
  ngModule: AngularConnectModule,
2025
- providers: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((i1$1.isNil(defaultShop) ? [] : [{ provide: DEFAULT_SHOP, useValue: defaultShop }]))), __read((i1$1.isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: fire.FIREBASE_OPTIONS, useValue: options === null || options === void 0 ? void 0 : options.firebase }]))), __read((i1$1.isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: fire.FIREBASE_APP_NAME, useValue: nameOrConfig }]))), __read((i1$1.isNil(options === null || options === void 0 ? void 0 : options.elasticSearch) ? [] : [{ provide: ES_CONFIG, useValue: options.elasticSearch }]))), __read((i1$1.isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]))), __read((i1$1.isNil(options === null || options === void 0 ? void 0 : options.backendUrl) ? [] : [{ provide: BACKEND_URL, useValue: options.backendUrl }]))),
2179
+ providers: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((i3.isNil(defaultShop) ? [] : [{ provide: DEFAULT_SHOP, useValue: defaultShop }]))), __read((i3.isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: fire.FIREBASE_OPTIONS, useValue: options === null || options === void 0 ? void 0 : options.firebase }]))), __read((i3.isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: fire.FIREBASE_APP_NAME, useValue: nameOrConfig }]))), __read((i3.isNil(options === null || options === void 0 ? void 0 : options.elasticSearch) ? [] : [{ provide: ES_CONFIG, useValue: options.elasticSearch }]))), __read((i3.isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]))), __read((i3.isNil(options === null || options === void 0 ? void 0 : options.backendUrl) ? [] : [{ provide: BACKEND_URL, useValue: options.backendUrl }]))),
2026
2180
  };
2027
2181
  };
2028
2182
  return AngularConnectModule;