@infrab4a/connect-angular 0.0.0-watch

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.
Files changed (55) hide show
  1. package/angular-connect.module.d.ts +18 -0
  2. package/angular-elastic-search.module.d.ts +9 -0
  3. package/angular-firebase-auth.module.d.ts +10 -0
  4. package/angular-firestore.module.d.ts +15 -0
  5. package/angular-hasura-graphql.module.d.ts +16 -0
  6. package/bundles/infrab4a-connect-angular.umd.js +1858 -0
  7. package/bundles/infrab4a-connect-angular.umd.js.map +1 -0
  8. package/consts/default-shop.const.d.ts +1 -0
  9. package/consts/es-config.const.d.ts +1 -0
  10. package/consts/hasura-options.const.d.ts +1 -0
  11. package/consts/index.d.ts +3 -0
  12. package/esm2015/angular-connect.module.js +49 -0
  13. package/esm2015/angular-elastic-search.module.js +38 -0
  14. package/esm2015/angular-firebase-auth.module.js +113 -0
  15. package/esm2015/angular-firestore.module.js +340 -0
  16. package/esm2015/angular-hasura-graphql.module.js +90 -0
  17. package/esm2015/consts/default-shop.const.js +2 -0
  18. package/esm2015/consts/es-config.const.js +2 -0
  19. package/esm2015/consts/hasura-options.const.js +2 -0
  20. package/esm2015/consts/index.js +4 -0
  21. package/esm2015/index.js +6 -0
  22. package/esm2015/infrab4a-connect-angular.js +5 -0
  23. package/esm2015/services/auth.service.js +42 -0
  24. package/esm2015/services/cart.service.js +153 -0
  25. package/esm2015/services/checkout-subscription.service.js +51 -0
  26. package/esm2015/services/checkout.service.js +75 -0
  27. package/esm2015/services/coupon.service.js +266 -0
  28. package/esm2015/services/errors/group-invalid-coupon.error.js +8 -0
  29. package/esm2015/services/errors/index.js +3 -0
  30. package/esm2015/services/errors/invalid-coupon.error.js +8 -0
  31. package/esm2015/services/home-shop.service.js +113 -0
  32. package/esm2015/services/index.js +8 -0
  33. package/esm2015/services/order.service.js +32 -0
  34. package/esm2015/services/types/index.js +3 -0
  35. package/esm2015/services/types/required-checkout-data.type.js +2 -0
  36. package/esm2015/services/types/required-checkout-subscription-data.type.js +2 -0
  37. package/fesm2015/infrab4a-connect-angular.js +1313 -0
  38. package/fesm2015/infrab4a-connect-angular.js.map +1 -0
  39. package/index.d.ts +5 -0
  40. package/infrab4a-connect-angular.d.ts +5 -0
  41. package/package.json +31 -0
  42. package/services/auth.service.d.ts +19 -0
  43. package/services/cart.service.d.ts +35 -0
  44. package/services/checkout-subscription.service.d.ts +18 -0
  45. package/services/checkout.service.d.ts +23 -0
  46. package/services/coupon.service.d.ts +26 -0
  47. package/services/errors/group-invalid-coupon.error.d.ts +6 -0
  48. package/services/errors/index.d.ts +2 -0
  49. package/services/errors/invalid-coupon.error.d.ts +5 -0
  50. package/services/home-shop.service.d.ts +25 -0
  51. package/services/index.d.ts +7 -0
  52. package/services/order.service.d.ts +13 -0
  53. package/services/types/index.d.ts +2 -0
  54. package/services/types/required-checkout-data.type.d.ts +2 -0
  55. package/services/types/required-checkout-subscription-data.type.d.ts +2 -0
@@ -0,0 +1,1313 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Inject, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/fire/auth';
4
+ import { AngularFireAuth } from '@angular/fire/auth';
5
+ import { of, combineLatest, from, throwError, Subject, iif, forkJoin } from 'rxjs';
6
+ import { catchError, map, mergeMap, concatMap, tap } from 'rxjs/operators';
7
+ import { __awaiter } from 'tslib';
8
+ import * as i2 from '@infrab4a/connect';
9
+ import { Coupon, Where, Shops, CheckoutTypes, CouponTypes, Exclusivities, Status, isNil, NotFoundError, Checkout, pick, LineItem, CheckoutSubscription, Order, Category, Product, RequiredArgumentError, add, Authentication, AuthenticationFirebaseAuthService, Register, RegisterFirebaseAuthService, SignOut, RecoveryPassword, ProductsIndex, AxiosAdapter, UserBeautyProfileFirestoreRepository, Buy2WinFirestoreRepository, CategoryFirestoreRepository, CheckoutFirestoreRepository, CheckoutSubscriptionFirestoreRepository, CouponFirestoreRepository, SubscriptionEditionFirestoreRepository, HomeFirestoreRepository, LeadFirestoreRepository, LegacyOrderFirestoreRepository, ShopMenuFirestoreRepository, OrderFirestoreRepository, PaymentFirestoreRepository, ProductFirestoreRepository, SubscriptionPaymentFirestoreRepository, SubscriptionPlanFirestoreRepository, SubscriptionProductFirestoreRepository, SubscriptionFirestoreRepository, UserFirestoreRepository, UserAddressFirestoreRepository, UserPaymentMethodFirestoreRepository, ProductVariantFirestoreRepository, CategoryHasuraGraphQLRepository, ProductHasuraGraphQLRepository, VariantHasuraGraphQLRepository } from '@infrab4a/connect';
10
+ import cookie from 'js-cookie';
11
+ import { CustomError } from 'ts-custom-error';
12
+ import * as i1$1 from '@angular/fire/firestore';
13
+ import { AngularFirestore } from '@angular/fire/firestore';
14
+ import { FIREBASE_OPTIONS, FIREBASE_APP_NAME, AngularFireModule } from '@angular/fire';
15
+
16
+ class AuthService {
17
+ constructor(angularFireAuth, userRepository) {
18
+ this.angularFireAuth = angularFireAuth;
19
+ this.userRepository = userRepository;
20
+ }
21
+ getAuthstate() {
22
+ const observables = [
23
+ this.angularFireAuth.authState.pipe(catchError(() => of(null))),
24
+ this.getUser().pipe(catchError(() => of(null))),
25
+ ];
26
+ return combineLatest(observables).pipe(map(([fireUser, user]) => {
27
+ return {
28
+ user,
29
+ isAnonymous: fireUser === null || fireUser === void 0 ? void 0 : fireUser.isAnonymous,
30
+ };
31
+ }));
32
+ }
33
+ getUser() {
34
+ return this.getFireUser().pipe(map((user) => user === null || user === void 0 ? void 0 : user.uid), mergeMap((id) => (id ? this.userRepository.get({ id }) : of(null))));
35
+ }
36
+ getTokenId() {
37
+ return this.angularFireAuth.idToken;
38
+ }
39
+ getFireUser() {
40
+ return this.angularFireAuth.user.pipe(catchError(() => of(null)));
41
+ }
42
+ }
43
+ AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AuthService, deps: [{ token: i1.AngularFireAuth }, { token: 'UserRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
44
+ AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AuthService });
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AuthService, decorators: [{
46
+ type: Injectable
47
+ }], ctorParameters: function () { return [{ type: i1.AngularFireAuth }, { type: undefined, decorators: [{
48
+ type: Inject,
49
+ args: ['UserRepository']
50
+ }] }]; } });
51
+
52
+ const DEFAULT_SHOP = 'DEFAULT_SHOP';
53
+
54
+ const ES_CONFIG = 'ES_CONFIG';
55
+
56
+ const HASURA_OPTIONS = 'HASURA_OPTIONS';
57
+
58
+ class InvalidCouponError extends CustomError {
59
+ constructor(message) {
60
+ super(message);
61
+ this.message = message;
62
+ }
63
+ }
64
+
65
+ class GroupInvalidCouponError extends CustomError {
66
+ constructor(errors) {
67
+ super('Many coupon errors throw');
68
+ this.errors = errors;
69
+ }
70
+ }
71
+
72
+ class CouponService {
73
+ constructor(couponRepository, defaultShop, orderRepository, subscriptionRepository, categoryRepository) {
74
+ this.couponRepository = couponRepository;
75
+ this.defaultShop = defaultShop;
76
+ this.orderRepository = orderRepository;
77
+ this.subscriptionRepository = subscriptionRepository;
78
+ this.categoryRepository = categoryRepository;
79
+ this.emailIsFromCollaborator = (userEmail) => !!(userEmail === null || userEmail === void 0 ? void 0 : userEmail.match(/@b4a.com.br/g));
80
+ this.separateValidCoupons = (coupons, userEmail) => coupons
81
+ .map((coupon) => {
82
+ try {
83
+ if (!(coupon instanceof Coupon))
84
+ throw new InvalidCouponError('Cupom inválido.');
85
+ if (this.isValidCoupon(coupon, userEmail))
86
+ return coupon;
87
+ }
88
+ catch (error) {
89
+ return error;
90
+ }
91
+ })
92
+ .reduce((current, coupon) => (Object.assign(Object.assign({}, current), (coupon instanceof Coupon
93
+ ? { valids: [...current.valids, coupon] }
94
+ : { invalids: [...current.invalids, coupon] }))), {
95
+ valids: [],
96
+ invalids: [],
97
+ });
98
+ }
99
+ checkCoupon(nickname, userEmail, checkoutType, plan, checkout, isSubscription) {
100
+ return from(this.couponRepository.find({
101
+ filters: {
102
+ nickname: { operator: Where.EQUALS, value: nickname },
103
+ active: { operator: Where.EQUALS, value: true },
104
+ },
105
+ })).pipe(concatMap((coupons) => this.checkCouponRules(coupons, checkoutType, plan, checkout, isSubscription)), concatMap((coupon) => this.checkCouponUseAndLimit(coupon, userEmail, checkout)), map((coupon) => this.isValidCoupon(coupon, userEmail)), map((coupon) => coupon));
106
+ }
107
+ checkCouponRules(coupons, checkoutType, plan, checkout, isSubscription) {
108
+ // Caso não ache nenhum cupom, retorna erro
109
+ if (coupons.count < 1) {
110
+ return throwError('Cupom inválido.');
111
+ }
112
+ // Get Primeiro Cupom (o find do repository retorna um array)
113
+ const coupon = coupons.data.shift();
114
+ // Verifica se o cupom é aplicavel na loja
115
+ const isInShop = coupon.shopAvailability === Shops.ALL || coupon.shopAvailability === this.defaultShop;
116
+ // Cupon não aplicavel a loja retorna erro
117
+ if (!isInShop)
118
+ return throwError('Cupom inválido para loja.');
119
+ // Verifica se o coupon é aplicado no checkout que está sendo realizado
120
+ const isCheckoutType = coupon.checkoutType === CheckoutTypes.ALL || coupon.checkoutType === checkoutType;
121
+ // Cupon não aplicavel ao checkout retorna erro
122
+ if (!isCheckoutType)
123
+ return throwError('Cupom inválido. Erro de checkout.');
124
+ // Verifica se o cupom é ou pode ser aplicado para subscription
125
+ if (checkoutType === CheckoutTypes.ALL || checkoutType === CheckoutTypes.SUBSCRIPTION) {
126
+ // Se o cupom tiver um plano associado, verifica se é o mesmo plano do checkout da assinatura
127
+ if (coupon.plan && coupon.plan.toUpperCase() !== plan.toUpperCase())
128
+ return throwError('Cupom inválido para sua assinatura.');
129
+ }
130
+ if (isSubscription)
131
+ return of(coupon);
132
+ // Verifica se possui o valor minimo de compra para utilização do cupom
133
+ const hasMinSubTotal = this.hasMinSubTotal(coupon, checkout);
134
+ // Se não tem valor mínimo atingido, retorna erro
135
+ if (!hasMinSubTotal)
136
+ return throwError('Valor mínimo não atingido');
137
+ return of(coupon);
138
+ }
139
+ isValidCoupon(coupon, userEmail) {
140
+ // Verifica a data de inicio de validade do cupom
141
+ if ((coupon === null || coupon === void 0 ? void 0 : coupon.beginAt) > new Date())
142
+ throw new InvalidCouponError('Cupom ainda não liberado.');
143
+ // Verifica a data de validade do cupom
144
+ if ((coupon === null || coupon === void 0 ? void 0 : coupon.expiresIn) < new Date())
145
+ throw new InvalidCouponError('Cupom expirado.');
146
+ return coupon;
147
+ }
148
+ checkCouponUseAndLimit(coupon, userEmail, checkout) {
149
+ return __awaiter(this, void 0, void 0, function* () {
150
+ const orders = yield this.orderRepository.find({
151
+ filters: {
152
+ coupon: { id: coupon.id },
153
+ payment: { status: 'paid' },
154
+ },
155
+ });
156
+ // orders que usuario ja fez com o cupom
157
+ const ordersUserCoupon = orders.data.filter((o) => o.user.email == userEmail);
158
+ // Verifica o limite de uso de cupom por usuario
159
+ if (coupon.useLimitPerUser && ordersUserCoupon.length)
160
+ throw new InvalidCouponError('Limite de uso por usuário atingido.');
161
+ // Verifica o limite de uso geral por usuario
162
+ if (coupon.useLimit && orders.data.length >= coupon.useLimit)
163
+ throw new InvalidCouponError('Limite de uso atingido.');
164
+ const validUser = yield this.userValidationAndSubscriptionStatus(coupon, userEmail);
165
+ if (!validUser)
166
+ throw new InvalidCouponError('Usuário não elegível.');
167
+ const hasProductCategories = yield this.hasProductCategories(coupon, checkout);
168
+ if (!hasProductCategories)
169
+ throw 'Seu carrinho não possui produtos elegíveis para desconto.';
170
+ return coupon;
171
+ });
172
+ }
173
+ calcDiscountSubscription(coupon, checkout) {
174
+ //
175
+ let discount = 0;
176
+ if (coupon.type === CouponTypes.ABSOLUTE)
177
+ discount = coupon.discount;
178
+ else if (coupon.type === CouponTypes.PERCENTAGE)
179
+ discount = checkout.subscriptionPlan.recurrencePrice * (coupon.discount / 100);
180
+ return of(discount);
181
+ }
182
+ calcDiscountShopping(coupon, checkout) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ let discount = 0;
185
+ switch (coupon.type) {
186
+ case CouponTypes.ABSOLUTE: {
187
+ discount = coupon.discount;
188
+ break;
189
+ }
190
+ case CouponTypes.PERCENTAGE: {
191
+ discount = yield this.calcShoppingPercentageDiscount(coupon, checkout);
192
+ break;
193
+ }
194
+ }
195
+ return discount;
196
+ });
197
+ }
198
+ calcShoppingPercentageDiscount(coupon, checkout) {
199
+ var _a;
200
+ return __awaiter(this, void 0, void 0, function* () {
201
+ let discount = 0;
202
+ const shop = checkout.shop;
203
+ let lineItensDiscount = [];
204
+ const couponCategories = yield this.getCouponCategoriesId(coupon);
205
+ if (coupon.productsCategories && coupon.productsCategories.length) {
206
+ lineItensDiscount = (_a = checkout.lineItems) === null || _a === void 0 ? void 0 : _a.filter((i) => {
207
+ var _a;
208
+ if ((_a = i.categories) === null || _a === void 0 ? void 0 : _a.length) {
209
+ return i.categories.some((c) => couponCategories.some(cat => (cat.id == c || cat.firestoreId == c)));
210
+ }
211
+ return true;
212
+ });
213
+ }
214
+ else {
215
+ lineItensDiscount = checkout.lineItems;
216
+ }
217
+ const subTotal = lineItensDiscount.reduce((acc, curr) => {
218
+ var _a, _b, _c;
219
+ return ((_a = checkout.user) === null || _a === void 0 ? void 0 : _a.isSubscriber) && ((_b = curr.price[shop]) === null || _b === void 0 ? void 0 : _b.subscriberPrice)
220
+ ? acc + ((_c = curr.price[shop]) === null || _c === void 0 ? void 0 : _c.subscriberPrice) * curr.quantity
221
+ : acc + curr.pricePaid * curr.quantity;
222
+ }, 0) || 0;
223
+ discount = subTotal * (coupon.discount / 100);
224
+ return discount;
225
+ });
226
+ }
227
+ hasMinSubTotal(coupon, checkout) {
228
+ var _a;
229
+ if (!coupon.minSubTotalValue)
230
+ return true;
231
+ const shop = checkout.shop;
232
+ let subTotal = ((_a = checkout.lineItems) === null || _a === void 0 ? void 0 : _a.reduce((acc, curr) => {
233
+ var _a, _b, _c;
234
+ return ((_a = checkout.user) === null || _a === void 0 ? void 0 : _a.isSubscriber) && ((_b = curr.price[shop]) === null || _b === void 0 ? void 0 : _b.subscriberPrice)
235
+ ? acc + ((_c = curr.price[shop]) === null || _c === void 0 ? void 0 : _c.subscriberPrice) * curr.quantity
236
+ : acc + curr.pricePaid * curr.quantity;
237
+ }, 0)) || 0;
238
+ if (coupon.minSubTotalValue <= subTotal)
239
+ return true;
240
+ return false;
241
+ }
242
+ hasProductCategories(coupon, checkout) {
243
+ var _a;
244
+ return __awaiter(this, void 0, void 0, function* () {
245
+ if (!coupon.productsCategories || !coupon.productsCategories.length) {
246
+ return true;
247
+ }
248
+ const couponCategories = yield this.getCouponCategoriesId(coupon);
249
+ const hasCategories = (_a = checkout.lineItems) === null || _a === void 0 ? void 0 : _a.filter(i => {
250
+ var _a;
251
+ if (!i.categories || !((_a = i.categories) === null || _a === void 0 ? void 0 : _a.length))
252
+ return true;
253
+ return i.categories.some((c) => couponCategories.some(cat => (cat.id == c || cat.firestoreId == c)));
254
+ });
255
+ return hasCategories.length ? true : false;
256
+ });
257
+ }
258
+ userValidationAndSubscriptionStatus(coupon, userEmail) {
259
+ return __awaiter(this, void 0, void 0, function* () {
260
+ // Verifica se o email do usuário é coorporativo
261
+ if (!this.emailIsFromCollaborator(userEmail) && coupon.exclusivityType === Exclusivities.COLLABORATORS)
262
+ throw new InvalidCouponError('Você não é colaborador.');
263
+ // Verifica se o email do usuário é associado ao cupom de uso por usuario
264
+ if (coupon.exclusivityType === Exclusivities.SPECIFIC_USER && coupon.userExclusiveEmail !== userEmail)
265
+ throw new InvalidCouponError('Cupom não é válido para este usuário.');
266
+ const couponRuleSubscription = coupon.exclusivityType === Exclusivities.ACTIVE_SUBSCRIBER ||
267
+ coupon.exclusivityType === Exclusivities.INACTIVE_SUBSCRIBER ||
268
+ coupon.exclusivityType === Exclusivities.NON_SUBSCRIBER;
269
+ if (couponRuleSubscription && userEmail) {
270
+ const sub = yield this.subscriptionRepository
271
+ .find({
272
+ filters: {
273
+ user: {
274
+ email: { operator: Where.EQUALS, value: userEmail },
275
+ },
276
+ },
277
+ })
278
+ .then((sub) => sub.data);
279
+ const activeSubs = sub === null || sub === void 0 ? void 0 : sub.filter((s) => s.status === Status.ACTIVE);
280
+ switch (coupon.exclusivityType) {
281
+ case Exclusivities.ACTIVE_SUBSCRIBER:
282
+ return activeSubs.length > 0;
283
+ case Exclusivities.INACTIVE_SUBSCRIBER:
284
+ return activeSubs.length === 0;
285
+ case Exclusivities.NON_SUBSCRIBER:
286
+ return sub.length === 0;
287
+ default:
288
+ return false;
289
+ }
290
+ }
291
+ return true;
292
+ });
293
+ }
294
+ getCouponCategoriesId(coupon) {
295
+ return __awaiter(this, void 0, void 0, function* () {
296
+ let couponCategories = [];
297
+ for (let index = 0; index < coupon.productsCategories.length; index++) {
298
+ let c = yield this.categoryRepository.get({ id: coupon.productsCategories[index] });
299
+ couponCategories.push({ id: c.id, firestoreId: c.firestoreId });
300
+ }
301
+ return couponCategories;
302
+ });
303
+ }
304
+ }
305
+ CouponService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CouponService, deps: [{ token: 'CouponRepository' }, { token: DEFAULT_SHOP }, { token: 'OrderRepository' }, { token: 'SubscriptionRepository' }, { token: 'CategoryRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
306
+ CouponService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CouponService, providedIn: 'root' });
307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CouponService, decorators: [{
308
+ type: Injectable,
309
+ args: [{
310
+ providedIn: 'root',
311
+ }]
312
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
313
+ type: Inject,
314
+ args: ['CouponRepository']
315
+ }] }, { type: i2.Shops, decorators: [{
316
+ type: Inject,
317
+ args: [DEFAULT_SHOP]
318
+ }] }, { type: undefined, decorators: [{
319
+ type: Inject,
320
+ args: ['OrderRepository']
321
+ }] }, { type: undefined, decorators: [{
322
+ type: Inject,
323
+ args: ['SubscriptionRepository']
324
+ }] }, { type: undefined, decorators: [{
325
+ type: Inject,
326
+ args: ['CategoryRepository']
327
+ }] }]; } });
328
+
329
+ class CheckoutService {
330
+ constructor(couponService, checkoutRepository, orderRepository, userRepository, defaultShop) {
331
+ this.couponService = couponService;
332
+ this.checkoutRepository = checkoutRepository;
333
+ this.orderRepository = orderRepository;
334
+ this.userRepository = userRepository;
335
+ this.defaultShop = defaultShop;
336
+ }
337
+ getCheckout(checkoutData) {
338
+ const checkoutId = cookie.get('checkoutId');
339
+ if (!isNil(checkoutId))
340
+ return from(this.checkoutRepository.get({ id: checkoutId }));
341
+ return from(this.createCheckout(checkoutData));
342
+ }
343
+ getUserByCheckout(checkoutId) {
344
+ return from(this.checkoutRepository.get({ id: checkoutId })).pipe(concatMap((checkout) => { var _a; return ((_a = checkout === null || checkout === void 0 ? void 0 : checkout.user) === null || _a === void 0 ? void 0 : _a.id) ? of(checkout.user) : from(this.userRepository.get({ id: checkout.user.id })); }), concatMap((user) => of(user) || throwError(() => new NotFoundError('User is not found'))));
345
+ }
346
+ updateCheckoutLineItems(checkout) {
347
+ return from(this.checkoutRepository.update(Checkout.toInstance({ id: checkout.id, lineItems: checkout.lineItems })));
348
+ }
349
+ updateCheckoutUser(checkout) {
350
+ return from(this.checkoutRepository.update(Checkout.toInstance({ id: checkout.id, user: checkout.user })));
351
+ }
352
+ clearCheckoutFromSession() {
353
+ cookie.remove('checkoutId');
354
+ return of();
355
+ }
356
+ calcDiscount(coupon) {
357
+ return this.getCheckout().pipe(concatMap((checkout) => __awaiter(this, void 0, void 0, function* () { return yield this.couponService.calcDiscountShopping(coupon, checkout); })));
358
+ }
359
+ checkCoupon(nickname, checkoutType) {
360
+ return this.getCheckout().pipe(concatMap((checkout) => {
361
+ var _a;
362
+ return this.couponService
363
+ .checkCoupon(nickname, (_a = checkout.user) === null || _a === void 0 ? void 0 : _a.email, CheckoutTypes.ECOMMERCE, checkout.user.subscriptionPlan, checkout, false)
364
+ .pipe();
365
+ }));
366
+ }
367
+ createCheckout(checkoutData) {
368
+ return __awaiter(this, void 0, void 0, function* () {
369
+ const checkout = yield this.checkoutRepository.create(Object.assign(Object.assign({ createdAt: new Date() }, Checkout.toInstance(pick(checkoutData, ['user', 'shop'])).toPlain()), { shop: (checkoutData === null || checkoutData === void 0 ? void 0 : checkoutData.shop) || this.defaultShop }));
370
+ cookie.set('checkoutId', checkout.id);
371
+ return checkout;
372
+ });
373
+ }
374
+ }
375
+ CheckoutService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CheckoutService, deps: [{ token: CouponService }, { token: 'CheckoutRepository' }, { token: 'OrderRepository' }, { token: 'UserRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable });
376
+ CheckoutService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CheckoutService });
377
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CheckoutService, decorators: [{
378
+ type: Injectable
379
+ }], ctorParameters: function () { return [{ type: CouponService }, { type: undefined, decorators: [{
380
+ type: Inject,
381
+ args: ['CheckoutRepository']
382
+ }] }, { type: undefined, decorators: [{
383
+ type: Inject,
384
+ args: ['OrderRepository']
385
+ }] }, { type: undefined, decorators: [{
386
+ type: Inject,
387
+ args: ['UserRepository']
388
+ }] }, { type: i2.Shops, decorators: [{
389
+ type: Inject,
390
+ args: [DEFAULT_SHOP]
391
+ }] }]; } });
392
+
393
+ class CartService {
394
+ constructor(authService, checkoutService, defaultShop, productRepository) {
395
+ this.authService = authService;
396
+ this.checkoutService = checkoutService;
397
+ this.defaultShop = defaultShop;
398
+ this.productRepository = productRepository;
399
+ this.cartSubject = new Subject();
400
+ this.updateLineItemInCart = (lineItem, quantity, checkout) => (isNil(checkout) ? this.checkoutService.getCheckout() : of(checkout)).pipe(concatMap((checkoutLoaded) => {
401
+ var _a;
402
+ const items = [];
403
+ const index = (_a = checkoutLoaded.lineItems) === null || _a === void 0 ? void 0 : _a.map((checkoutItem) => checkoutItem.sku).indexOf(lineItem.sku);
404
+ if (index > -1) {
405
+ checkoutLoaded.lineItems[index].quantity += quantity;
406
+ checkoutLoaded.lineItems[index].pricePaid = lineItem.pricePaid;
407
+ }
408
+ else
409
+ checkoutLoaded.lineItems = items.concat(checkoutLoaded.lineItems ? checkoutLoaded.lineItems.concat([lineItem]) : [lineItem]);
410
+ return this.checkoutService
411
+ .updateCheckoutLineItems(checkoutLoaded)
412
+ .pipe(map((updatedCheckout) => this.generateCartObject(updatedCheckout.lineItems)));
413
+ }));
414
+ this.generateCartObject = (items) => {
415
+ const cart = {};
416
+ items === null || items === void 0 ? void 0 : items.forEach((item) => {
417
+ var _a;
418
+ return (cart[item.sku] = 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) })));
419
+ });
420
+ return cart;
421
+ };
422
+ this.buildLineItem = ({ checkout, item, quantity, }) => __awaiter(this, void 0, void 0, function* () {
423
+ var _a, _b, _c, _d, _e, _f, _g;
424
+ const product = yield this.productRepository.get({ id: item.id });
425
+ item.quantity = (item === null || item === void 0 ? void 0 : item.quantity) || ((_b = (_a = checkout === null || checkout === void 0 ? void 0 : checkout.lineItems) === null || _a === void 0 ? void 0 : _a.find((lineItem) => lineItem.sku === item.sku)) === null || _b === void 0 ? void 0 : _b.quantity) || 0;
426
+ if (this.checkMaxStock(item, quantity || 0))
427
+ throw new Error('Desculpe! Temos apenas ' + ((_c = item.stock) === null || _c === void 0 ? void 0 : _c.quantity) + ' em estoque.');
428
+ const image = item.image || ((_d = item.images) === null || _d === void 0 ? void 0 : _d.shift());
429
+ const { id, name, EAN, brand, slug, stock, price, weight, categories, sku, type } = item;
430
+ const isGift = item.isGift || null;
431
+ const pricePaid = this.getProductPrice({
432
+ product: item,
433
+ shop: checkout.shop || this.defaultShop,
434
+ isSubscriber: (_e = checkout.user) === null || _e === void 0 ? void 0 : _e.isSubscriber,
435
+ });
436
+ console.log('teste', pricePaid);
437
+ return {
438
+ checkout,
439
+ lineItem: LineItem.toInstance({
440
+ id,
441
+ name: name !== null && name !== void 0 ? name : product.name,
442
+ EAN: EAN !== null && EAN !== void 0 ? EAN : product.EAN,
443
+ brand: product.brand,
444
+ slug: slug !== null && slug !== void 0 ? slug : product.slug,
445
+ sku: sku !== null && sku !== void 0 ? sku : product.sku,
446
+ stock,
447
+ price,
448
+ image,
449
+ weight: weight !== null && weight !== void 0 ? weight : product.weight,
450
+ quantity: (item.quantity || 0) + (quantity || 0),
451
+ pricePaid,
452
+ categories: (_f = product.categories) !== null && _f !== void 0 ? _f : [],
453
+ isGift: isGift !== null && isGift !== void 0 ? isGift : null,
454
+ costPrice: (_g = product.costPrice) !== null && _g !== void 0 ? _g : 0,
455
+ type,
456
+ }),
457
+ };
458
+ });
459
+ this.getProductPrice = ({ product, isSubscriber, }) => {
460
+ const info = product.price;
461
+ if (product.isGift)
462
+ return 0;
463
+ return isSubscriber && info.subscriberPrice > 0 ? info.subscriberPrice : info.price;
464
+ };
465
+ this.checkMaxStock = (item, quantity) => {
466
+ var _a;
467
+ const maxStock = ((_a = item.stock) === null || _a === void 0 ? void 0 : _a.quantity) || 0;
468
+ const currentItemAmount = item.quantity || 0;
469
+ return currentItemAmount + quantity > maxStock;
470
+ };
471
+ }
472
+ addItem(item, quantity = 1) {
473
+ return from(this.checkoutService.getCheckout()).pipe(concatMap((checkout) => __awaiter(this, void 0, void 0, function* () { return yield this.buildLineItem({ checkout, item, quantity: quantity || 1 }); })), mergeMap(({ checkout, lineItem }) => this.updateLineItemInCart(lineItem, quantity || 1, checkout)), tap((cart) => this.cartSubject.next(cart)));
474
+ }
475
+ decreaseItem(item) {
476
+ return this.checkoutService.getCheckout().pipe(map((checkout) => {
477
+ var _a;
478
+ const checkoutItem = (_a = checkout.lineItems) === null || _a === void 0 ? void 0 : _a.find((lineItem) => lineItem.sku === item.sku);
479
+ if (!isNil(checkoutItem))
480
+ checkoutItem.quantity -= checkoutItem.quantity > 1 ? 1 : 0;
481
+ return checkout;
482
+ }), concatMap((checkout) => this.checkoutService.updateCheckoutLineItems(checkout)), map((checkout) => this.generateCartObject(checkout.lineItems)), tap((cart) => this.cartSubject.next(cart)));
483
+ }
484
+ getCart(checkout) {
485
+ this.buildCartFromCheckout(checkout).subscribe((cart) => this.cartSubject.next(cart));
486
+ return this.cartSubject;
487
+ }
488
+ /**
489
+ * @deprecated The method should not be used
490
+ */
491
+ getVariantPriceDiscount(item) {
492
+ return this.authService.getUser().pipe(concatMap((user) => iif(() => user.isSubscriber && !!item.price.subscriberPrice, of(item.price.subscriberPrice), of(item.price.price))), catchError(() => of(item.price.price)));
493
+ }
494
+ removeItem(item) {
495
+ return this.checkoutService.getCheckout().pipe(map((checkout) => {
496
+ const index = checkout.lineItems.findIndex((lineItem) => lineItem.sku === item.sku);
497
+ if (index >= 0)
498
+ checkout.lineItems.splice(index, 1);
499
+ return checkout;
500
+ }), concatMap((checkout) => this.checkoutService.updateCheckoutLineItems(checkout)), map((checkout) => this.generateCartObject(checkout.lineItems)), tap((cart) => this.cartSubject.next(cart)));
501
+ }
502
+ updateUserCart(user) {
503
+ return this.checkoutService.getCheckout().pipe(concatMap((checkout) => this.checkoutService.updateCheckoutUser(Checkout.toInstance(Object.assign(Object.assign({}, checkout.toPlain()), { user })))), concatMap((checkout) => __awaiter(this, void 0, void 0, function* () {
504
+ var _a, _b;
505
+ return this.checkoutService
506
+ .updateCheckoutLineItems(Checkout.toInstance(Object.assign(Object.assign({}, checkout.toPlain()), { lineItems: ((_a = checkout.lineItems) === null || _a === void 0 ? void 0 : _a.length)
507
+ ? yield Promise.all((_b = checkout.lineItems) === null || _b === void 0 ? void 0 : _b.map((item) => __awaiter(this, void 0, void 0, function* () { return (yield this.buildLineItem({ checkout, item })).lineItem; })))
508
+ : [] })))
509
+ .toPromise();
510
+ })), map((checkout) => this.generateCartObject(checkout.lineItems)), tap((cart) => this.cartSubject.next(cart)));
511
+ }
512
+ clearCart() {
513
+ return this.checkoutService.getCheckout().pipe(map((checkout) => {
514
+ this.checkoutService.clearCheckoutFromSession();
515
+ return checkout;
516
+ }), concatMap((oldCheckout) => this.buildCartFromCheckout(oldCheckout)), tap((cart) => this.cartSubject.next(cart)));
517
+ }
518
+ buildCartFromCheckout(checkoutData) {
519
+ return this.checkoutService.getCheckout(checkoutData).pipe(map((checkout) => checkout.lineItems), concatMap((lineItems) => of(this.generateCartObject(lineItems))));
520
+ }
521
+ }
522
+ CartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CartService, deps: [{ token: AuthService }, { token: CheckoutService }, { token: DEFAULT_SHOP }, { token: 'ProductRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
523
+ CartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CartService });
524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CartService, decorators: [{
525
+ type: Injectable
526
+ }], ctorParameters: function () { return [{ type: AuthService }, { type: CheckoutService }, { type: i2.Shops, decorators: [{
527
+ type: Inject,
528
+ args: [DEFAULT_SHOP]
529
+ }] }, { type: undefined, decorators: [{
530
+ type: Inject,
531
+ args: ['ProductRepository']
532
+ }] }]; } });
533
+
534
+ class CheckoutSubscriptionService {
535
+ constructor(checkoutSubscriptionRepository, subscriptionRepository, couponService) {
536
+ this.checkoutSubscriptionRepository = checkoutSubscriptionRepository;
537
+ this.subscriptionRepository = subscriptionRepository;
538
+ this.couponService = couponService;
539
+ }
540
+ getCheckoutSubscription(checkoutData) {
541
+ const checkoutId = cookie.get('checkoutSubscriptionId');
542
+ if (!isNil(checkoutId))
543
+ return from(this.checkoutSubscriptionRepository.get({ id: checkoutId }));
544
+ return from(this.createCheckoutSubscription(checkoutData));
545
+ }
546
+ createCheckoutSubscription(checkoutData) {
547
+ return __awaiter(this, void 0, void 0, function* () {
548
+ const checkout = yield this.checkoutSubscriptionRepository.create(Object.assign({ createdAt: new Date() }, CheckoutSubscription.toInstance(pick(checkoutData, ['user', 'shop'])).toPlain()));
549
+ cookie.set('checkoutSubscriptionId', checkout.id);
550
+ return checkout;
551
+ });
552
+ }
553
+ clearCheckoutSubscriptionFromSession() {
554
+ cookie.remove('checkoutSubscriptionId');
555
+ return of();
556
+ }
557
+ checkCoupon(nickname, userEmail) {
558
+ return this.getCheckoutSubscription().pipe(concatMap((checkout) => this.couponService.checkCoupon(nickname, userEmail, CheckoutTypes.SUBSCRIPTION, checkout.subscriptionPlan.name, null, true).pipe()));
559
+ }
560
+ calcDiscountSubscription(coupon) {
561
+ return this.getCheckoutSubscription().pipe(concatMap((checkout) => this.couponService.calcDiscountSubscription(coupon, checkout).pipe()));
562
+ }
563
+ }
564
+ CheckoutSubscriptionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CheckoutSubscriptionService, deps: [{ token: 'CheckoutSubscriptionRepository' }, { token: 'SubscriptionRepository' }, { token: CouponService }], target: i0.ɵɵFactoryTarget.Injectable });
565
+ CheckoutSubscriptionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CheckoutSubscriptionService });
566
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: CheckoutSubscriptionService, decorators: [{
567
+ type: Injectable
568
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
569
+ type: Inject,
570
+ args: ['CheckoutSubscriptionRepository']
571
+ }] }, { type: undefined, decorators: [{
572
+ type: Inject,
573
+ args: ['SubscriptionRepository']
574
+ }] }, { type: CouponService }]; } });
575
+
576
+ class OrderService {
577
+ constructor(angularFirestore, orderRepository) {
578
+ this.angularFirestore = angularFirestore;
579
+ this.orderRepository = orderRepository;
580
+ this.orderSubject = new Subject();
581
+ }
582
+ getOrder(id) {
583
+ this.angularFirestore
584
+ .doc(`${this.orderRepository.collectionName}/${id}`)
585
+ .valueChanges()
586
+ .pipe(map((doc) => Order.toInstance(doc)))
587
+ .subscribe((doc) => this.orderSubject.next(doc));
588
+ return this.orderSubject;
589
+ }
590
+ }
591
+ OrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: OrderService, deps: [{ token: i1$1.AngularFirestore }, { token: 'OrderRepository' }], target: i0.ɵɵFactoryTarget.Injectable });
592
+ OrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: OrderService });
593
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: OrderService, decorators: [{
594
+ type: Injectable
595
+ }], ctorParameters: function () { return [{ type: i1$1.AngularFirestore }, { type: i2.OrderFirestoreRepository, decorators: [{
596
+ type: Inject,
597
+ args: ['OrderRepository']
598
+ }] }]; } });
599
+
600
+ class HomeShopService {
601
+ constructor(categoryRepository, homeRepository, productRepository, defaultShop) {
602
+ this.categoryRepository = categoryRepository;
603
+ this.homeRepository = homeRepository;
604
+ this.productRepository = productRepository;
605
+ this.defaultShop = defaultShop;
606
+ this.buildCategoryGroupWithRequiredData = (group) => ({
607
+ category: Category.toInstance(pick(group.category.toPlain(), ['id', 'name', 'slug', 'conditions'])),
608
+ products: group.products.map((product) => Product.toInstance(pick(product.toPlain(), [
609
+ 'id',
610
+ 'price',
611
+ 'reviews',
612
+ 'hasVariants',
613
+ 'slug',
614
+ 'sku',
615
+ 'stock',
616
+ 'costPrice',
617
+ 'images',
618
+ 'miniatures',
619
+ 'name',
620
+ 'weight',
621
+ 'rate',
622
+ 'type'
623
+ ]))),
624
+ });
625
+ }
626
+ get homeId() {
627
+ if (this.defaultShop === Shops.GLAMSHOP)
628
+ return 'glamshop';
629
+ if (this.defaultShop === Shops.MENSMARKET)
630
+ return 'mens_market';
631
+ return null;
632
+ }
633
+ getHomeData() {
634
+ return this.getHomeConfiguration().pipe(map((home) => { var _a; return (((_a = home === null || home === void 0 ? void 0 : home.data) === null || _a === void 0 ? void 0 : _a.expiresAt) > new Date() ? home : null); }), concatMap((home) => home
635
+ ? of(home)
636
+ : forkJoin([this.getDiscoverProducts(), this.getFeaturedProducts(), this.getVerticalProducts()]).pipe(map(([discoverProducts, featuredProducts, verticalProducts]) => ({
637
+ discoverProducts,
638
+ featuredProducts,
639
+ verticalProducts,
640
+ })), concatMap((data) => this.saveHomeData(data)))));
641
+ }
642
+ getBanners(type) {
643
+ return this.getHomeConfiguration().pipe(map((home) => {
644
+ if (type === 'brand')
645
+ return home.brandsCarousel;
646
+ if (type === 'buyToWin')
647
+ return [home.buyToWinBanner];
648
+ if (type === 'block')
649
+ return home.blockBanners;
650
+ if (type === 'blog')
651
+ return [home.blogBanner];
652
+ }));
653
+ }
654
+ getMinValueForFreeShipping() {
655
+ return this.getHomeConfiguration().pipe(map(home => home.minValueForFreeShipping));
656
+ }
657
+ getDiscoverProducts() {
658
+ return this.getHomeConfiguration().pipe(concatMap((home) => from(this.categoryRepository.getCategoriesForHome(home.discoverCategories)).pipe(map((groups) => groups.map(this.buildCategoryGroupWithRequiredData)))));
659
+ }
660
+ getFeaturedProducts() {
661
+ return this.getHomeConfiguration().pipe(concatMap((home) => from(this.categoryRepository.getCategoriesForHome(home.featuredCategories)).pipe(map((groups) => groups.map(this.buildCategoryGroupWithRequiredData)))));
662
+ }
663
+ getVerticalProducts() {
664
+ return this.getHomeConfiguration().pipe(concatMap((home) => forkJoin(home.verticalCarousels.filter(Boolean).map((id) => from(this.categoryRepository.get({ id })).pipe(concatMap((category) => from(this.productRepository.find({
665
+ filters: { categories: { operator: Where.IN, value: [category.id] } },
666
+ limits: { limit: 12 },
667
+ })).pipe(map((products) => ({ category, products })))), map(({ category, products }) => ({ category, products: products.data })), map(this.buildCategoryGroupWithRequiredData))))));
668
+ }
669
+ getHomeConfiguration() {
670
+ return of(this.homeConfiguration).pipe(concatMap((home) => home
671
+ ? of(home)
672
+ : !this.homeId
673
+ ? throwError(new RequiredArgumentError(['homeId']))
674
+ : from(this.homeRepository.get({ id: this.homeId })).pipe(tap((homeLoaded) => (this.homeConfiguration = homeLoaded)))));
675
+ }
676
+ saveHomeData(homeData) {
677
+ const data = {
678
+ createdAt: new Date(),
679
+ expiresAt: add(new Date(), { hours: 1 }),
680
+ data: homeData,
681
+ };
682
+ return from(this.homeRepository.update({
683
+ id: this.homeId,
684
+ data,
685
+ })).pipe(tap(() => (this.homeConfiguration.data = data)), map(() => this.homeConfiguration));
686
+ }
687
+ }
688
+ HomeShopService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: HomeShopService, deps: [{ token: 'CategoryRepository' }, { token: 'HomeRepository' }, { token: 'ProductRepository' }, { token: DEFAULT_SHOP }], target: i0.ɵɵFactoryTarget.Injectable });
689
+ HomeShopService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: HomeShopService });
690
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: HomeShopService, decorators: [{
691
+ type: Injectable
692
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
693
+ type: Inject,
694
+ args: ['CategoryRepository']
695
+ }] }, { type: undefined, decorators: [{
696
+ type: Inject,
697
+ args: ['HomeRepository']
698
+ }] }, { type: undefined, decorators: [{
699
+ type: Inject,
700
+ args: ['ProductRepository']
701
+ }] }, { type: i2.Shops, decorators: [{
702
+ type: Inject,
703
+ args: [DEFAULT_SHOP]
704
+ }] }]; } });
705
+
706
+ class AngularFirebaseAuthModule {
707
+ static initializeApp(options, nameOrConfig) {
708
+ return {
709
+ ngModule: AngularFirebaseAuthModule,
710
+ providers: [
711
+ { provide: FIREBASE_OPTIONS, useValue: options },
712
+ { provide: FIREBASE_APP_NAME, useValue: nameOrConfig },
713
+ ],
714
+ };
715
+ }
716
+ }
717
+ AngularFirebaseAuthModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularFirebaseAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
718
+ AngularFirebaseAuthModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularFirebaseAuthModule, imports: [AngularFireModule] });
719
+ AngularFirebaseAuthModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularFirebaseAuthModule, providers: [
720
+ {
721
+ provide: 'Authentication',
722
+ useFactory: (authenticationService, userRepository) => {
723
+ return new Authentication(authenticationService, userRepository);
724
+ },
725
+ deps: ['AuthenticationService', 'UserRepository'],
726
+ },
727
+ {
728
+ provide: 'AuthenticationService',
729
+ useFactory: (angularFireAuth) => {
730
+ return new AuthenticationFirebaseAuthService(angularFireAuth);
731
+ },
732
+ deps: [AngularFireAuth],
733
+ },
734
+ {
735
+ provide: 'Register',
736
+ useFactory: (registerService, userRepository) => {
737
+ return new Register(registerService, userRepository);
738
+ },
739
+ deps: ['RegisterService', 'UserRepository'],
740
+ },
741
+ {
742
+ provide: 'RegisterService',
743
+ useFactory: (angularFireAuth) => {
744
+ return new RegisterFirebaseAuthService(angularFireAuth);
745
+ },
746
+ deps: [AngularFireAuth],
747
+ },
748
+ {
749
+ provide: 'SignOut',
750
+ useFactory: (authenticationService) => {
751
+ return new SignOut(authenticationService);
752
+ },
753
+ deps: ['AuthenticationService'],
754
+ },
755
+ {
756
+ provide: 'RecoveryPassword',
757
+ useFactory: (authenticationService) => {
758
+ return new RecoveryPassword(authenticationService);
759
+ },
760
+ deps: ['AuthenticationService'],
761
+ },
762
+ ], imports: [[AngularFireModule]] });
763
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularFirebaseAuthModule, decorators: [{
764
+ type: NgModule,
765
+ args: [{
766
+ imports: [AngularFireModule],
767
+ providers: [
768
+ {
769
+ provide: 'Authentication',
770
+ useFactory: (authenticationService, userRepository) => {
771
+ return new Authentication(authenticationService, userRepository);
772
+ },
773
+ deps: ['AuthenticationService', 'UserRepository'],
774
+ },
775
+ {
776
+ provide: 'AuthenticationService',
777
+ useFactory: (angularFireAuth) => {
778
+ return new AuthenticationFirebaseAuthService(angularFireAuth);
779
+ },
780
+ deps: [AngularFireAuth],
781
+ },
782
+ {
783
+ provide: 'Register',
784
+ useFactory: (registerService, userRepository) => {
785
+ return new Register(registerService, userRepository);
786
+ },
787
+ deps: ['RegisterService', 'UserRepository'],
788
+ },
789
+ {
790
+ provide: 'RegisterService',
791
+ useFactory: (angularFireAuth) => {
792
+ return new RegisterFirebaseAuthService(angularFireAuth);
793
+ },
794
+ deps: [AngularFireAuth],
795
+ },
796
+ {
797
+ provide: 'SignOut',
798
+ useFactory: (authenticationService) => {
799
+ return new SignOut(authenticationService);
800
+ },
801
+ deps: ['AuthenticationService'],
802
+ },
803
+ {
804
+ provide: 'RecoveryPassword',
805
+ useFactory: (authenticationService) => {
806
+ return new RecoveryPassword(authenticationService);
807
+ },
808
+ deps: ['AuthenticationService'],
809
+ },
810
+ ],
811
+ }]
812
+ }] });
813
+
814
+ class AngularElasticSeachModule {
815
+ static initializeApp(options) {
816
+ return {
817
+ ngModule: AngularElasticSeachModule,
818
+ providers: [{ provide: ES_CONFIG, useValue: options }],
819
+ };
820
+ }
821
+ }
822
+ AngularElasticSeachModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularElasticSeachModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
823
+ AngularElasticSeachModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularElasticSeachModule });
824
+ AngularElasticSeachModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularElasticSeachModule, providers: [
825
+ {
826
+ provide: ProductsIndex,
827
+ useFactory: (configuration) => {
828
+ return new ProductsIndex(new AxiosAdapter(configuration));
829
+ },
830
+ deps: [ES_CONFIG],
831
+ },
832
+ ] });
833
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularElasticSeachModule, decorators: [{
834
+ type: NgModule,
835
+ args: [{
836
+ providers: [
837
+ {
838
+ provide: ProductsIndex,
839
+ useFactory: (configuration) => {
840
+ return new ProductsIndex(new AxiosAdapter(configuration));
841
+ },
842
+ deps: [ES_CONFIG],
843
+ },
844
+ ],
845
+ }]
846
+ }] });
847
+
848
+ class AngularFirestoreModule {
849
+ static initializeApp(options, nameOrConfig) {
850
+ return {
851
+ ngModule: AngularFirestoreModule,
852
+ providers: [
853
+ { provide: FIREBASE_OPTIONS, useValue: options.firebase },
854
+ { provide: FIREBASE_APP_NAME, useValue: nameOrConfig },
855
+ { provide: ES_CONFIG, useValue: options.elasticSearch },
856
+ ],
857
+ };
858
+ }
859
+ }
860
+ AngularFirestoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularFirestoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
861
+ AngularFirestoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularFirestoreModule, imports: [AngularFireModule, AngularElasticSeachModule] });
862
+ AngularFirestoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularFirestoreModule, providers: [
863
+ {
864
+ provide: 'BeautyProfileRepository',
865
+ useFactory: (firestore, userRepository) => {
866
+ return new UserBeautyProfileFirestoreRepository(firestore.firestore, userRepository);
867
+ },
868
+ deps: [AngularFirestore, 'UserRepository'],
869
+ },
870
+ {
871
+ provide: 'Buy2WinRepository',
872
+ useFactory: (firestore) => {
873
+ return new Buy2WinFirestoreRepository(firestore.firestore);
874
+ },
875
+ deps: [AngularFirestore],
876
+ },
877
+ {
878
+ provide: CategoryFirestoreRepository,
879
+ useFactory: (firestore) => {
880
+ return new CategoryFirestoreRepository(firestore.firestore);
881
+ },
882
+ deps: [AngularFirestore],
883
+ },
884
+ {
885
+ provide: 'CheckoutRepository',
886
+ useFactory: (firestore) => {
887
+ return new CheckoutFirestoreRepository(firestore.firestore);
888
+ },
889
+ deps: [AngularFirestore],
890
+ },
891
+ {
892
+ provide: 'CheckoutSubscriptionRepository',
893
+ useFactory: (firestore) => {
894
+ return new CheckoutSubscriptionFirestoreRepository(firestore.firestore);
895
+ },
896
+ deps: [AngularFirestore],
897
+ },
898
+ {
899
+ provide: 'CouponRepository',
900
+ useFactory: (firestore) => {
901
+ return new CouponFirestoreRepository(firestore.firestore);
902
+ },
903
+ deps: [AngularFirestore],
904
+ },
905
+ {
906
+ provide: 'EditionRepository',
907
+ useFactory: (firestore, subscriptionRepository) => {
908
+ return new SubscriptionEditionFirestoreRepository(firestore.firestore, subscriptionRepository);
909
+ },
910
+ deps: [AngularFirestore, 'SubscriptionRepository'],
911
+ },
912
+ {
913
+ provide: 'HomeRepository',
914
+ useFactory: (firestore) => {
915
+ return new HomeFirestoreRepository(firestore.firestore);
916
+ },
917
+ deps: [AngularFirestore],
918
+ },
919
+ {
920
+ provide: 'LeadRepository',
921
+ useFactory: (firestore) => {
922
+ return new LeadFirestoreRepository(firestore.firestore);
923
+ },
924
+ deps: [AngularFirestore],
925
+ },
926
+ {
927
+ provide: 'LegacyOrderRepository',
928
+ useFactory: (firestore) => {
929
+ return new LegacyOrderFirestoreRepository(firestore.firestore);
930
+ },
931
+ deps: [AngularFirestore],
932
+ },
933
+ {
934
+ provide: 'ShopMenuRepository',
935
+ useFactory: (firestore) => {
936
+ return new ShopMenuFirestoreRepository(firestore.firestore);
937
+ },
938
+ deps: [AngularFirestore],
939
+ },
940
+ {
941
+ provide: 'OrderRepository',
942
+ useFactory: (firestore) => {
943
+ return new OrderFirestoreRepository(firestore.firestore);
944
+ },
945
+ deps: [AngularFirestore],
946
+ },
947
+ {
948
+ provide: 'PaymentRepository',
949
+ useFactory: (firestore) => {
950
+ return new PaymentFirestoreRepository(firestore.firestore);
951
+ },
952
+ deps: [AngularFirestore],
953
+ },
954
+ {
955
+ provide: ProductFirestoreRepository,
956
+ useFactory: (firestore) => {
957
+ return new ProductFirestoreRepository(firestore.firestore);
958
+ },
959
+ deps: [AngularFirestore],
960
+ },
961
+ {
962
+ provide: 'SubscriptionPaymentRepository',
963
+ useFactory: (firestore, subscriptionRepository) => {
964
+ return new SubscriptionPaymentFirestoreRepository(firestore.firestore, subscriptionRepository);
965
+ },
966
+ deps: [AngularFirestore, 'SubscriptionRepository'],
967
+ },
968
+ {
969
+ provide: 'SubscriptionPlanRepository',
970
+ useFactory: (firestore) => {
971
+ return new SubscriptionPlanFirestoreRepository(firestore.firestore);
972
+ },
973
+ deps: [AngularFirestore],
974
+ },
975
+ {
976
+ provide: 'SubscriptionProductRepository',
977
+ useFactory: (firestore) => {
978
+ return new SubscriptionProductFirestoreRepository(firestore.firestore);
979
+ },
980
+ deps: [AngularFirestore],
981
+ },
982
+ {
983
+ provide: 'SubscriptionRepository',
984
+ useFactory: (firestore) => {
985
+ return new SubscriptionFirestoreRepository(firestore.firestore);
986
+ },
987
+ deps: [AngularFirestore],
988
+ },
989
+ {
990
+ provide: 'UserRepository',
991
+ useFactory: (firestore) => {
992
+ return new UserFirestoreRepository(firestore.firestore);
993
+ },
994
+ deps: [AngularFirestore],
995
+ },
996
+ {
997
+ provide: 'UserAddressRepository',
998
+ useFactory: (firestore, userRepository) => {
999
+ return new UserAddressFirestoreRepository(firestore.firestore, userRepository);
1000
+ },
1001
+ deps: [AngularFirestore, 'UserRepository'],
1002
+ },
1003
+ {
1004
+ provide: 'UserPaymentMethodRepository',
1005
+ useFactory: (firestore, userRepository) => {
1006
+ return new UserPaymentMethodFirestoreRepository(firestore.firestore, userRepository);
1007
+ },
1008
+ deps: [AngularFirestore, 'UserRepository'],
1009
+ },
1010
+ {
1011
+ provide: ProductVariantFirestoreRepository,
1012
+ useFactory: (firestore, productRepository) => {
1013
+ return new ProductVariantFirestoreRepository(firestore.firestore, productRepository);
1014
+ },
1015
+ deps: [AngularFirestore, ProductFirestoreRepository],
1016
+ },
1017
+ ], imports: [[AngularFireModule, AngularElasticSeachModule]] });
1018
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularFirestoreModule, decorators: [{
1019
+ type: NgModule,
1020
+ args: [{
1021
+ imports: [AngularFireModule, AngularElasticSeachModule],
1022
+ providers: [
1023
+ {
1024
+ provide: 'BeautyProfileRepository',
1025
+ useFactory: (firestore, userRepository) => {
1026
+ return new UserBeautyProfileFirestoreRepository(firestore.firestore, userRepository);
1027
+ },
1028
+ deps: [AngularFirestore, 'UserRepository'],
1029
+ },
1030
+ {
1031
+ provide: 'Buy2WinRepository',
1032
+ useFactory: (firestore) => {
1033
+ return new Buy2WinFirestoreRepository(firestore.firestore);
1034
+ },
1035
+ deps: [AngularFirestore],
1036
+ },
1037
+ {
1038
+ provide: CategoryFirestoreRepository,
1039
+ useFactory: (firestore) => {
1040
+ return new CategoryFirestoreRepository(firestore.firestore);
1041
+ },
1042
+ deps: [AngularFirestore],
1043
+ },
1044
+ {
1045
+ provide: 'CheckoutRepository',
1046
+ useFactory: (firestore) => {
1047
+ return new CheckoutFirestoreRepository(firestore.firestore);
1048
+ },
1049
+ deps: [AngularFirestore],
1050
+ },
1051
+ {
1052
+ provide: 'CheckoutSubscriptionRepository',
1053
+ useFactory: (firestore) => {
1054
+ return new CheckoutSubscriptionFirestoreRepository(firestore.firestore);
1055
+ },
1056
+ deps: [AngularFirestore],
1057
+ },
1058
+ {
1059
+ provide: 'CouponRepository',
1060
+ useFactory: (firestore) => {
1061
+ return new CouponFirestoreRepository(firestore.firestore);
1062
+ },
1063
+ deps: [AngularFirestore],
1064
+ },
1065
+ {
1066
+ provide: 'EditionRepository',
1067
+ useFactory: (firestore, subscriptionRepository) => {
1068
+ return new SubscriptionEditionFirestoreRepository(firestore.firestore, subscriptionRepository);
1069
+ },
1070
+ deps: [AngularFirestore, 'SubscriptionRepository'],
1071
+ },
1072
+ {
1073
+ provide: 'HomeRepository',
1074
+ useFactory: (firestore) => {
1075
+ return new HomeFirestoreRepository(firestore.firestore);
1076
+ },
1077
+ deps: [AngularFirestore],
1078
+ },
1079
+ {
1080
+ provide: 'LeadRepository',
1081
+ useFactory: (firestore) => {
1082
+ return new LeadFirestoreRepository(firestore.firestore);
1083
+ },
1084
+ deps: [AngularFirestore],
1085
+ },
1086
+ {
1087
+ provide: 'LegacyOrderRepository',
1088
+ useFactory: (firestore) => {
1089
+ return new LegacyOrderFirestoreRepository(firestore.firestore);
1090
+ },
1091
+ deps: [AngularFirestore],
1092
+ },
1093
+ {
1094
+ provide: 'ShopMenuRepository',
1095
+ useFactory: (firestore) => {
1096
+ return new ShopMenuFirestoreRepository(firestore.firestore);
1097
+ },
1098
+ deps: [AngularFirestore],
1099
+ },
1100
+ {
1101
+ provide: 'OrderRepository',
1102
+ useFactory: (firestore) => {
1103
+ return new OrderFirestoreRepository(firestore.firestore);
1104
+ },
1105
+ deps: [AngularFirestore],
1106
+ },
1107
+ {
1108
+ provide: 'PaymentRepository',
1109
+ useFactory: (firestore) => {
1110
+ return new PaymentFirestoreRepository(firestore.firestore);
1111
+ },
1112
+ deps: [AngularFirestore],
1113
+ },
1114
+ {
1115
+ provide: ProductFirestoreRepository,
1116
+ useFactory: (firestore) => {
1117
+ return new ProductFirestoreRepository(firestore.firestore);
1118
+ },
1119
+ deps: [AngularFirestore],
1120
+ },
1121
+ {
1122
+ provide: 'SubscriptionPaymentRepository',
1123
+ useFactory: (firestore, subscriptionRepository) => {
1124
+ return new SubscriptionPaymentFirestoreRepository(firestore.firestore, subscriptionRepository);
1125
+ },
1126
+ deps: [AngularFirestore, 'SubscriptionRepository'],
1127
+ },
1128
+ {
1129
+ provide: 'SubscriptionPlanRepository',
1130
+ useFactory: (firestore) => {
1131
+ return new SubscriptionPlanFirestoreRepository(firestore.firestore);
1132
+ },
1133
+ deps: [AngularFirestore],
1134
+ },
1135
+ {
1136
+ provide: 'SubscriptionProductRepository',
1137
+ useFactory: (firestore) => {
1138
+ return new SubscriptionProductFirestoreRepository(firestore.firestore);
1139
+ },
1140
+ deps: [AngularFirestore],
1141
+ },
1142
+ {
1143
+ provide: 'SubscriptionRepository',
1144
+ useFactory: (firestore) => {
1145
+ return new SubscriptionFirestoreRepository(firestore.firestore);
1146
+ },
1147
+ deps: [AngularFirestore],
1148
+ },
1149
+ {
1150
+ provide: 'UserRepository',
1151
+ useFactory: (firestore) => {
1152
+ return new UserFirestoreRepository(firestore.firestore);
1153
+ },
1154
+ deps: [AngularFirestore],
1155
+ },
1156
+ {
1157
+ provide: 'UserAddressRepository',
1158
+ useFactory: (firestore, userRepository) => {
1159
+ return new UserAddressFirestoreRepository(firestore.firestore, userRepository);
1160
+ },
1161
+ deps: [AngularFirestore, 'UserRepository'],
1162
+ },
1163
+ {
1164
+ provide: 'UserPaymentMethodRepository',
1165
+ useFactory: (firestore, userRepository) => {
1166
+ return new UserPaymentMethodFirestoreRepository(firestore.firestore, userRepository);
1167
+ },
1168
+ deps: [AngularFirestore, 'UserRepository'],
1169
+ },
1170
+ {
1171
+ provide: ProductVariantFirestoreRepository,
1172
+ useFactory: (firestore, productRepository) => {
1173
+ return new ProductVariantFirestoreRepository(firestore.firestore, productRepository);
1174
+ },
1175
+ deps: [AngularFirestore, ProductFirestoreRepository],
1176
+ },
1177
+ ],
1178
+ }]
1179
+ }] });
1180
+
1181
+ class AngularHasuraGraphQLModule {
1182
+ static initializeApp(options) {
1183
+ return {
1184
+ ngModule: AngularHasuraGraphQLModule,
1185
+ providers: [{ provide: HASURA_OPTIONS, useValue: options }],
1186
+ };
1187
+ }
1188
+ }
1189
+ AngularHasuraGraphQLModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularHasuraGraphQLModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1190
+ AngularHasuraGraphQLModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularHasuraGraphQLModule });
1191
+ AngularHasuraGraphQLModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularHasuraGraphQLModule, providers: [
1192
+ {
1193
+ provide: 'CategoryRepository',
1194
+ useExisting: CategoryHasuraGraphQLRepository,
1195
+ },
1196
+ {
1197
+ provide: CategoryHasuraGraphQLRepository,
1198
+ useFactory: (options, productRepository) => {
1199
+ return new CategoryHasuraGraphQLRepository(options.endpoint, options.credentials, productRepository);
1200
+ },
1201
+ deps: [HASURA_OPTIONS, ProductHasuraGraphQLRepository],
1202
+ },
1203
+ {
1204
+ provide: 'ProductRepository',
1205
+ useExisting: ProductHasuraGraphQLRepository,
1206
+ },
1207
+ {
1208
+ provide: ProductHasuraGraphQLRepository,
1209
+ useFactory: (options) => {
1210
+ return new ProductHasuraGraphQLRepository(options.endpoint, options.credentials);
1211
+ },
1212
+ deps: [HASURA_OPTIONS],
1213
+ },
1214
+ {
1215
+ provide: 'VariantRepository',
1216
+ useExisting: VariantHasuraGraphQLRepository,
1217
+ },
1218
+ {
1219
+ provide: VariantHasuraGraphQLRepository,
1220
+ useFactory: (options) => {
1221
+ return new VariantHasuraGraphQLRepository(options.endpoint, options.credentials);
1222
+ },
1223
+ deps: [HASURA_OPTIONS],
1224
+ },
1225
+ ] });
1226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularHasuraGraphQLModule, decorators: [{
1227
+ type: NgModule,
1228
+ args: [{
1229
+ providers: [
1230
+ {
1231
+ provide: 'CategoryRepository',
1232
+ useExisting: CategoryHasuraGraphQLRepository,
1233
+ },
1234
+ {
1235
+ provide: CategoryHasuraGraphQLRepository,
1236
+ useFactory: (options, productRepository) => {
1237
+ return new CategoryHasuraGraphQLRepository(options.endpoint, options.credentials, productRepository);
1238
+ },
1239
+ deps: [HASURA_OPTIONS, ProductHasuraGraphQLRepository],
1240
+ },
1241
+ {
1242
+ provide: 'ProductRepository',
1243
+ useExisting: ProductHasuraGraphQLRepository,
1244
+ },
1245
+ {
1246
+ provide: ProductHasuraGraphQLRepository,
1247
+ useFactory: (options) => {
1248
+ return new ProductHasuraGraphQLRepository(options.endpoint, options.credentials);
1249
+ },
1250
+ deps: [HASURA_OPTIONS],
1251
+ },
1252
+ {
1253
+ provide: 'VariantRepository',
1254
+ useExisting: VariantHasuraGraphQLRepository,
1255
+ },
1256
+ {
1257
+ provide: VariantHasuraGraphQLRepository,
1258
+ useFactory: (options) => {
1259
+ return new VariantHasuraGraphQLRepository(options.endpoint, options.credentials);
1260
+ },
1261
+ deps: [HASURA_OPTIONS],
1262
+ },
1263
+ ],
1264
+ }]
1265
+ }] });
1266
+
1267
+ class AngularConnectModule {
1268
+ static initializeApp(defaultShop, options, nameOrConfig) {
1269
+ return {
1270
+ ngModule: AngularConnectModule,
1271
+ providers: [
1272
+ ...(isNil(defaultShop) ? [] : [{ provide: DEFAULT_SHOP, useValue: defaultShop }]),
1273
+ ...(isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: FIREBASE_OPTIONS, useValue: options === null || options === void 0 ? void 0 : options.firebase }]),
1274
+ ...(isNil(options === null || options === void 0 ? void 0 : options.firebase) ? [] : [{ provide: FIREBASE_APP_NAME, useValue: nameOrConfig }]),
1275
+ ...(isNil(options === null || options === void 0 ? void 0 : options.elasticSearch) ? [] : [{ provide: ES_CONFIG, useValue: options.elasticSearch }]),
1276
+ ...(isNil(options === null || options === void 0 ? void 0 : options.hasura) ? [] : [{ provide: HASURA_OPTIONS, useValue: options.hasura }]),
1277
+ ],
1278
+ };
1279
+ }
1280
+ }
1281
+ AngularConnectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularConnectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1282
+ AngularConnectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularConnectModule, imports: [AngularFireModule, AngularFirestoreModule, AngularHasuraGraphQLModule] });
1283
+ AngularConnectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularConnectModule, providers: [
1284
+ AuthService,
1285
+ CartService,
1286
+ CheckoutService,
1287
+ CheckoutSubscriptionService,
1288
+ CouponService,
1289
+ HomeShopService,
1290
+ OrderService,
1291
+ ], imports: [[AngularFireModule, AngularFirestoreModule, AngularHasuraGraphQLModule]] });
1292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.12", ngImport: i0, type: AngularConnectModule, decorators: [{
1293
+ type: NgModule,
1294
+ args: [{
1295
+ imports: [AngularFireModule, AngularFirestoreModule, AngularHasuraGraphQLModule],
1296
+ providers: [
1297
+ AuthService,
1298
+ CartService,
1299
+ CheckoutService,
1300
+ CheckoutSubscriptionService,
1301
+ CouponService,
1302
+ HomeShopService,
1303
+ OrderService,
1304
+ ],
1305
+ }]
1306
+ }] });
1307
+
1308
+ /**
1309
+ * Generated bundle index. Do not edit.
1310
+ */
1311
+
1312
+ export { AngularConnectModule, AngularFirebaseAuthModule, AngularFirestoreModule, AngularHasuraGraphQLModule, AuthService, CartService, CheckoutService, CheckoutSubscriptionService, CouponService, HomeShopService, OrderService };
1313
+ //# sourceMappingURL=infrab4a-connect-angular.js.map