@infrab4a/connect 4.9.4 → 4.9.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
require('reflect-metadata');
|
|
6
|
-
var
|
|
6
|
+
var tslib = require('tslib');
|
|
7
7
|
var classTransformer = require('class-transformer');
|
|
8
8
|
var dateFns = require('date-fns');
|
|
9
9
|
var lodash = require('lodash');
|
|
@@ -17,25 +17,6 @@ var gqlQueryBuilder = require('gql-query-builder');
|
|
|
17
17
|
|
|
18
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
19
19
|
|
|
20
|
-
function _interopNamespace(e) {
|
|
21
|
-
if (e && e.__esModule) return e;
|
|
22
|
-
var n = Object.create(null);
|
|
23
|
-
if (e) {
|
|
24
|
-
Object.keys(e).forEach(function (k) {
|
|
25
|
-
if (k !== 'default') {
|
|
26
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
27
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () { return e[k]; }
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
n["default"] = e;
|
|
35
|
-
return Object.freeze(n);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
var tslib_1__namespace = /*#__PURE__*/_interopNamespace(tslib_1);
|
|
39
20
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
40
21
|
|
|
41
22
|
class BaseModel {
|
|
@@ -72,13 +53,13 @@ class CategoryBase extends BaseModel {
|
|
|
72
53
|
return ['id'];
|
|
73
54
|
}
|
|
74
55
|
}
|
|
75
|
-
|
|
56
|
+
tslib.__decorate([
|
|
76
57
|
classTransformer.Type(() => CategoryBase),
|
|
77
|
-
|
|
58
|
+
tslib.__metadata("design:type", CategoryBase)
|
|
78
59
|
], CategoryBase.prototype, "parent", void 0);
|
|
79
|
-
|
|
60
|
+
tslib.__decorate([
|
|
80
61
|
classTransformer.Type(() => Filter),
|
|
81
|
-
|
|
62
|
+
tslib.__metadata("design:type", Array)
|
|
82
63
|
], CategoryBase.prototype, "filters", void 0);
|
|
83
64
|
|
|
84
65
|
class CategoryForProduct extends CategoryBase {
|
|
@@ -116,9 +97,9 @@ class ProductForKit extends ProductBase {
|
|
|
116
97
|
return ['id'];
|
|
117
98
|
}
|
|
118
99
|
}
|
|
119
|
-
|
|
100
|
+
tslib.__decorate([
|
|
120
101
|
classTransformer.Type(() => CategoryForProduct),
|
|
121
|
-
|
|
102
|
+
tslib.__metadata("design:type", CategoryForProduct)
|
|
122
103
|
], ProductForKit.prototype, "category", void 0);
|
|
123
104
|
|
|
124
105
|
class KitProduct extends BaseModel {
|
|
@@ -126,13 +107,13 @@ class KitProduct extends BaseModel {
|
|
|
126
107
|
return ['productId', 'kitProductId'];
|
|
127
108
|
}
|
|
128
109
|
}
|
|
129
|
-
|
|
110
|
+
tslib.__decorate([
|
|
130
111
|
classTransformer.Type(() => ProductForKit),
|
|
131
|
-
|
|
112
|
+
tslib.__metadata("design:type", ProductForKit)
|
|
132
113
|
], KitProduct.prototype, "kit", void 0);
|
|
133
|
-
|
|
114
|
+
tslib.__decorate([
|
|
134
115
|
classTransformer.Type(() => ProductForKit),
|
|
135
|
-
|
|
116
|
+
tslib.__metadata("design:type", ProductForKit)
|
|
136
117
|
], KitProduct.prototype, "product", void 0);
|
|
137
118
|
|
|
138
119
|
class ProductForCategory extends ProductBase {
|
|
@@ -140,9 +121,9 @@ class ProductForCategory extends ProductBase {
|
|
|
140
121
|
return ['id'];
|
|
141
122
|
}
|
|
142
123
|
}
|
|
143
|
-
|
|
124
|
+
tslib.__decorate([
|
|
144
125
|
classTransformer.Type(() => KitProduct),
|
|
145
|
-
|
|
126
|
+
tslib.__metadata("design:type", Array)
|
|
146
127
|
], ProductForCategory.prototype, "kitProducts", void 0);
|
|
147
128
|
|
|
148
129
|
class Category extends CategoryBase {
|
|
@@ -150,9 +131,9 @@ class Category extends CategoryBase {
|
|
|
150
131
|
return ['id'];
|
|
151
132
|
}
|
|
152
133
|
}
|
|
153
|
-
|
|
134
|
+
tslib.__decorate([
|
|
154
135
|
classTransformer.Type(() => ProductForCategory),
|
|
155
|
-
|
|
136
|
+
tslib.__metadata("design:type", Array)
|
|
156
137
|
], Category.prototype, "childrenProducts", void 0);
|
|
157
138
|
|
|
158
139
|
class CategoryCollectionChildren extends BaseModel {
|
|
@@ -160,9 +141,9 @@ class CategoryCollectionChildren extends BaseModel {
|
|
|
160
141
|
return ['collectionId', 'categoryId'];
|
|
161
142
|
}
|
|
162
143
|
}
|
|
163
|
-
|
|
144
|
+
tslib.__decorate([
|
|
164
145
|
classTransformer.Type(() => CategoryCollectionChildren),
|
|
165
|
-
|
|
146
|
+
tslib.__metadata("design:type", CategoryCollectionChildren)
|
|
166
147
|
], CategoryCollectionChildren.prototype, "parent", void 0);
|
|
167
148
|
|
|
168
149
|
class CategoryFilter extends BaseModel {
|
|
@@ -170,13 +151,13 @@ class CategoryFilter extends BaseModel {
|
|
|
170
151
|
return ['id'];
|
|
171
152
|
}
|
|
172
153
|
}
|
|
173
|
-
|
|
154
|
+
tslib.__decorate([
|
|
174
155
|
classTransformer.Type(() => Filter),
|
|
175
|
-
|
|
156
|
+
tslib.__metadata("design:type", Filter)
|
|
176
157
|
], CategoryFilter.prototype, "filter", void 0);
|
|
177
|
-
|
|
158
|
+
tslib.__decorate([
|
|
178
159
|
classTransformer.Type(() => Category),
|
|
179
|
-
|
|
160
|
+
tslib.__metadata("design:type", Category)
|
|
180
161
|
], CategoryFilter.prototype, "category", void 0);
|
|
181
162
|
|
|
182
163
|
exports.GenderDestination = void 0;
|
|
@@ -205,13 +186,13 @@ class Product extends ProductBase {
|
|
|
205
186
|
return ['id'];
|
|
206
187
|
}
|
|
207
188
|
}
|
|
208
|
-
|
|
189
|
+
tslib.__decorate([
|
|
209
190
|
classTransformer.Type(() => CategoryForProduct),
|
|
210
|
-
|
|
191
|
+
tslib.__metadata("design:type", CategoryForProduct)
|
|
211
192
|
], Product.prototype, "category", void 0);
|
|
212
|
-
|
|
193
|
+
tslib.__decorate([
|
|
213
194
|
classTransformer.Type(() => KitProduct),
|
|
214
|
-
|
|
195
|
+
tslib.__metadata("design:type", Array)
|
|
215
196
|
], Product.prototype, "kitProducts", void 0);
|
|
216
197
|
|
|
217
198
|
class ProductReviews extends BaseModel {
|
|
@@ -243,9 +224,9 @@ class Buy2Win extends BaseModel {
|
|
|
243
224
|
return ['id'];
|
|
244
225
|
}
|
|
245
226
|
}
|
|
246
|
-
|
|
227
|
+
tslib.__decorate([
|
|
247
228
|
classTransformer.Type(() => Category),
|
|
248
|
-
|
|
229
|
+
tslib.__metadata("design:type", Array)
|
|
249
230
|
], Buy2Win.prototype, "categories", void 0);
|
|
250
231
|
|
|
251
232
|
exports.Where = void 0;
|
|
@@ -525,169 +506,169 @@ class Payment extends BaseModel {
|
|
|
525
506
|
return ['id'];
|
|
526
507
|
}
|
|
527
508
|
}
|
|
528
|
-
|
|
509
|
+
tslib.__decorate([
|
|
529
510
|
classTransformer.Expose({ name: 'refuse_reason' }),
|
|
530
|
-
|
|
511
|
+
tslib.__metadata("design:type", String)
|
|
531
512
|
], Payment.prototype, "refuseReason", void 0);
|
|
532
|
-
|
|
513
|
+
tslib.__decorate([
|
|
533
514
|
classTransformer.Expose({ name: 'status_reason' }),
|
|
534
|
-
|
|
515
|
+
tslib.__metadata("design:type", String)
|
|
535
516
|
], Payment.prototype, "statusReason", void 0);
|
|
536
|
-
|
|
517
|
+
tslib.__decorate([
|
|
537
518
|
classTransformer.Expose({ name: 'acquirer_response_code' }),
|
|
538
|
-
|
|
519
|
+
tslib.__metadata("design:type", String)
|
|
539
520
|
], Payment.prototype, "acquirerResponseCode", void 0);
|
|
540
|
-
|
|
521
|
+
tslib.__decorate([
|
|
541
522
|
classTransformer.Expose({ name: 'acquirer_name' }),
|
|
542
|
-
|
|
523
|
+
tslib.__metadata("design:type", String)
|
|
543
524
|
], Payment.prototype, "acquirerName", void 0);
|
|
544
|
-
|
|
525
|
+
tslib.__decorate([
|
|
545
526
|
classTransformer.Expose({ name: 'acquirer_id' }),
|
|
546
|
-
|
|
527
|
+
tslib.__metadata("design:type", String)
|
|
547
528
|
], Payment.prototype, "acquirerId", void 0);
|
|
548
|
-
|
|
529
|
+
tslib.__decorate([
|
|
549
530
|
classTransformer.Expose({ name: 'authorization_code' }),
|
|
550
|
-
|
|
531
|
+
tslib.__metadata("design:type", String)
|
|
551
532
|
], Payment.prototype, "authorizationCode", void 0);
|
|
552
|
-
|
|
533
|
+
tslib.__decorate([
|
|
553
534
|
classTransformer.Expose({ name: 'soft_descriptor' }),
|
|
554
|
-
|
|
535
|
+
tslib.__metadata("design:type", String)
|
|
555
536
|
], Payment.prototype, "softDescriptor", void 0);
|
|
556
|
-
|
|
537
|
+
tslib.__decorate([
|
|
557
538
|
classTransformer.Expose({ name: 'date_created' }),
|
|
558
|
-
|
|
539
|
+
tslib.__metadata("design:type", String)
|
|
559
540
|
], Payment.prototype, "dateCreated", void 0);
|
|
560
|
-
|
|
541
|
+
tslib.__decorate([
|
|
561
542
|
classTransformer.Expose({ name: 'date_updated' }),
|
|
562
|
-
|
|
543
|
+
tslib.__metadata("design:type", String)
|
|
563
544
|
], Payment.prototype, "dateUpdated", void 0);
|
|
564
|
-
|
|
545
|
+
tslib.__decorate([
|
|
565
546
|
classTransformer.Expose({ name: 'authorized_amount' }),
|
|
566
|
-
|
|
547
|
+
tslib.__metadata("design:type", Number)
|
|
567
548
|
], Payment.prototype, "authorizedAmount", void 0);
|
|
568
|
-
|
|
549
|
+
tslib.__decorate([
|
|
569
550
|
classTransformer.Expose({ name: 'paid_amount' }),
|
|
570
|
-
|
|
551
|
+
tslib.__metadata("design:type", Number)
|
|
571
552
|
], Payment.prototype, "paidAmount", void 0);
|
|
572
|
-
|
|
553
|
+
tslib.__decorate([
|
|
573
554
|
classTransformer.Expose({ name: 'paid_at' }),
|
|
574
|
-
|
|
555
|
+
tslib.__metadata("design:type", String)
|
|
575
556
|
], Payment.prototype, "paidAt", void 0);
|
|
576
|
-
|
|
557
|
+
tslib.__decorate([
|
|
577
558
|
classTransformer.Expose({ name: 'refunded_amount' }),
|
|
578
|
-
|
|
559
|
+
tslib.__metadata("design:type", Number)
|
|
579
560
|
], Payment.prototype, "refundedAmount", void 0);
|
|
580
|
-
|
|
561
|
+
tslib.__decorate([
|
|
581
562
|
classTransformer.Expose({ name: 'card_holder_name' }),
|
|
582
|
-
|
|
563
|
+
tslib.__metadata("design:type", String)
|
|
583
564
|
], Payment.prototype, "cardHolderName", void 0);
|
|
584
|
-
|
|
565
|
+
tslib.__decorate([
|
|
585
566
|
classTransformer.Expose({ name: 'card_last_digits' }),
|
|
586
|
-
|
|
567
|
+
tslib.__metadata("design:type", String)
|
|
587
568
|
], Payment.prototype, "cardLastDigits", void 0);
|
|
588
|
-
|
|
569
|
+
tslib.__decorate([
|
|
589
570
|
classTransformer.Expose({ name: 'card_first_digits' }),
|
|
590
|
-
|
|
571
|
+
tslib.__metadata("design:type", String)
|
|
591
572
|
], Payment.prototype, "cardFirstDigits", void 0);
|
|
592
|
-
|
|
573
|
+
tslib.__decorate([
|
|
593
574
|
classTransformer.Expose({ name: 'card_brand' }),
|
|
594
|
-
|
|
575
|
+
tslib.__metadata("design:type", String)
|
|
595
576
|
], Payment.prototype, "cardBrand", void 0);
|
|
596
|
-
|
|
577
|
+
tslib.__decorate([
|
|
597
578
|
classTransformer.Expose({ name: 'card_pin_mode' }),
|
|
598
|
-
|
|
579
|
+
tslib.__metadata("design:type", String)
|
|
599
580
|
], Payment.prototype, "cardPinMode", void 0);
|
|
600
|
-
|
|
581
|
+
tslib.__decorate([
|
|
601
582
|
classTransformer.Expose({ name: 'card_magstripe_fallback' }),
|
|
602
|
-
|
|
583
|
+
tslib.__metadata("design:type", Boolean)
|
|
603
584
|
], Payment.prototype, "cardMagstripeFallback", void 0);
|
|
604
|
-
|
|
585
|
+
tslib.__decorate([
|
|
605
586
|
classTransformer.Expose({ name: 'cvm_pin' }),
|
|
606
|
-
|
|
587
|
+
tslib.__metadata("design:type", Boolean)
|
|
607
588
|
], Payment.prototype, "cvmPin", void 0);
|
|
608
|
-
|
|
589
|
+
tslib.__decorate([
|
|
609
590
|
classTransformer.Expose({ name: 'postback_url' }),
|
|
610
|
-
|
|
591
|
+
tslib.__metadata("design:type", String)
|
|
611
592
|
], Payment.prototype, "postbackUrl", void 0);
|
|
612
|
-
|
|
593
|
+
tslib.__decorate([
|
|
613
594
|
classTransformer.Expose({ name: 'payment_method' }),
|
|
614
|
-
|
|
595
|
+
tslib.__metadata("design:type", String)
|
|
615
596
|
], Payment.prototype, "paymentMethod", void 0);
|
|
616
|
-
|
|
597
|
+
tslib.__decorate([
|
|
617
598
|
classTransformer.Expose({ name: 'capture_method' }),
|
|
618
|
-
|
|
599
|
+
tslib.__metadata("design:type", String)
|
|
619
600
|
], Payment.prototype, "captureMethod", void 0);
|
|
620
|
-
|
|
601
|
+
tslib.__decorate([
|
|
621
602
|
classTransformer.Expose({ name: 'antifraud_score' }),
|
|
622
|
-
|
|
603
|
+
tslib.__metadata("design:type", String)
|
|
623
604
|
], Payment.prototype, "antifraudScore", void 0);
|
|
624
|
-
|
|
605
|
+
tslib.__decorate([
|
|
625
606
|
classTransformer.Expose({ name: 'boleto_url' }),
|
|
626
|
-
|
|
607
|
+
tslib.__metadata("design:type", String)
|
|
627
608
|
], Payment.prototype, "boletoUrl", void 0);
|
|
628
|
-
|
|
609
|
+
tslib.__decorate([
|
|
629
610
|
classTransformer.Expose({ name: 'boleto_barcode' }),
|
|
630
|
-
|
|
611
|
+
tslib.__metadata("design:type", String)
|
|
631
612
|
], Payment.prototype, "boletoBarcode", void 0);
|
|
632
|
-
|
|
613
|
+
tslib.__decorate([
|
|
633
614
|
classTransformer.Expose({ name: 'boleto_expiration_date' }),
|
|
634
|
-
|
|
615
|
+
tslib.__metadata("design:type", String)
|
|
635
616
|
], Payment.prototype, "boletoExpirationDate", void 0);
|
|
636
|
-
|
|
617
|
+
tslib.__decorate([
|
|
637
618
|
classTransformer.Expose({ name: 'subscription_id' }),
|
|
638
|
-
|
|
619
|
+
tslib.__metadata("design:type", String)
|
|
639
620
|
], Payment.prototype, "subscriptionId", void 0);
|
|
640
|
-
|
|
621
|
+
tslib.__decorate([
|
|
641
622
|
classTransformer.Expose({ name: 'split_rules' }),
|
|
642
|
-
|
|
623
|
+
tslib.__metadata("design:type", String)
|
|
643
624
|
], Payment.prototype, "splitRules", void 0);
|
|
644
|
-
|
|
625
|
+
tslib.__decorate([
|
|
645
626
|
classTransformer.Expose({ name: 'antifraud_metadata' }),
|
|
646
|
-
|
|
627
|
+
tslib.__metadata("design:type", Object)
|
|
647
628
|
], Payment.prototype, "antifraudMetadata", void 0);
|
|
648
|
-
|
|
629
|
+
tslib.__decorate([
|
|
649
630
|
classTransformer.Expose({ name: 'reference_key' }),
|
|
650
|
-
|
|
631
|
+
tslib.__metadata("design:type", String)
|
|
651
632
|
], Payment.prototype, "referenceKey", void 0);
|
|
652
|
-
|
|
633
|
+
tslib.__decorate([
|
|
653
634
|
classTransformer.Expose({ name: 'local_transaction_id' }),
|
|
654
|
-
|
|
635
|
+
tslib.__metadata("design:type", String)
|
|
655
636
|
], Payment.prototype, "localTransactionId", void 0);
|
|
656
|
-
|
|
637
|
+
tslib.__decorate([
|
|
657
638
|
classTransformer.Expose({ name: 'local_time' }),
|
|
658
|
-
|
|
639
|
+
tslib.__metadata("design:type", String)
|
|
659
640
|
], Payment.prototype, "localTime", void 0);
|
|
660
|
-
|
|
641
|
+
tslib.__decorate([
|
|
661
642
|
classTransformer.Expose({ name: 'fraud_covered' }),
|
|
662
|
-
|
|
643
|
+
tslib.__metadata("design:type", Boolean)
|
|
663
644
|
], Payment.prototype, "fraudCovered", void 0);
|
|
664
|
-
|
|
645
|
+
tslib.__decorate([
|
|
665
646
|
classTransformer.Expose({ name: 'fraud_reimbursed' }),
|
|
666
|
-
|
|
647
|
+
tslib.__metadata("design:type", String)
|
|
667
648
|
], Payment.prototype, "fraudReimbursed", void 0);
|
|
668
|
-
|
|
649
|
+
tslib.__decorate([
|
|
669
650
|
classTransformer.Expose({ name: 'order_id' }),
|
|
670
|
-
|
|
651
|
+
tslib.__metadata("design:type", String)
|
|
671
652
|
], Payment.prototype, "orderId", void 0);
|
|
672
|
-
|
|
653
|
+
tslib.__decorate([
|
|
673
654
|
classTransformer.Expose({ name: 'risk_level' }),
|
|
674
|
-
|
|
655
|
+
tslib.__metadata("design:type", String)
|
|
675
656
|
], Payment.prototype, "riskLevel", void 0);
|
|
676
|
-
|
|
657
|
+
tslib.__decorate([
|
|
677
658
|
classTransformer.Expose({ name: 'receipt_url' }),
|
|
678
|
-
|
|
659
|
+
tslib.__metadata("design:type", String)
|
|
679
660
|
], Payment.prototype, "receiptUrl", void 0);
|
|
680
|
-
|
|
661
|
+
tslib.__decorate([
|
|
681
662
|
classTransformer.Expose({ name: 'private_label' }),
|
|
682
|
-
|
|
663
|
+
tslib.__metadata("design:type", String)
|
|
683
664
|
], Payment.prototype, "privateLabel", void 0);
|
|
684
|
-
|
|
665
|
+
tslib.__decorate([
|
|
685
666
|
classTransformer.Expose({ name: 'pix_qr_code' }),
|
|
686
|
-
|
|
667
|
+
tslib.__metadata("design:type", String)
|
|
687
668
|
], Payment.prototype, "pixQrCode", void 0);
|
|
688
|
-
|
|
669
|
+
tslib.__decorate([
|
|
689
670
|
classTransformer.Expose({ name: 'pix_expiration_date' }),
|
|
690
|
-
|
|
671
|
+
tslib.__metadata("design:type", String)
|
|
691
672
|
], Payment.prototype, "pixExpirationDate", void 0);
|
|
692
673
|
|
|
693
674
|
class SubscriptionPayment extends BaseModel {
|
|
@@ -695,483 +676,406 @@ class SubscriptionPayment extends BaseModel {
|
|
|
695
676
|
return ['id', 'subscriptionId'];
|
|
696
677
|
}
|
|
697
678
|
}
|
|
698
|
-
|
|
679
|
+
tslib.__decorate([
|
|
699
680
|
classTransformer.Type(() => Payment),
|
|
700
|
-
|
|
681
|
+
tslib.__metadata("design:type", Payment)
|
|
701
682
|
], SubscriptionPayment.prototype, "payment", void 0);
|
|
702
683
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
return typeof x === 'function';
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
|
709
|
-
var _enable_super_gross_mode_that_will_cause_bad_things = false;
|
|
710
|
-
var config = {
|
|
711
|
-
Promise: undefined,
|
|
712
|
-
set useDeprecatedSynchronousErrorHandling(value) {
|
|
713
|
-
if (value) {
|
|
714
|
-
var error = /*@__PURE__*/ new Error();
|
|
715
|
-
/*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n' + error.stack);
|
|
716
|
-
}
|
|
717
|
-
_enable_super_gross_mode_that_will_cause_bad_things = value;
|
|
718
|
-
},
|
|
719
|
-
get useDeprecatedSynchronousErrorHandling() {
|
|
720
|
-
return _enable_super_gross_mode_that_will_cause_bad_things;
|
|
721
|
-
},
|
|
722
|
-
};
|
|
723
|
-
|
|
724
|
-
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
|
725
|
-
function hostReportError(err) {
|
|
726
|
-
setTimeout(function () { throw err; }, 0);
|
|
684
|
+
function isFunction(value) {
|
|
685
|
+
return typeof value === 'function';
|
|
727
686
|
}
|
|
728
687
|
|
|
729
|
-
|
|
730
|
-
var
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
hostReportError(err);
|
|
739
|
-
}
|
|
740
|
-
},
|
|
741
|
-
complete: function () { }
|
|
742
|
-
};
|
|
743
|
-
|
|
744
|
-
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
|
745
|
-
var isArray = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();
|
|
746
|
-
|
|
747
|
-
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
|
748
|
-
function isObject(x) {
|
|
749
|
-
return x !== null && typeof x === 'object';
|
|
688
|
+
function createErrorClass(createImpl) {
|
|
689
|
+
var _super = function (instance) {
|
|
690
|
+
Error.call(instance);
|
|
691
|
+
instance.stack = new Error().stack;
|
|
692
|
+
};
|
|
693
|
+
var ctorFunc = createImpl(_super);
|
|
694
|
+
ctorFunc.prototype = Object.create(Error.prototype);
|
|
695
|
+
ctorFunc.prototype.constructor = ctorFunc;
|
|
696
|
+
return ctorFunc;
|
|
750
697
|
}
|
|
751
698
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
699
|
+
var UnsubscriptionError = createErrorClass(function (_super) {
|
|
700
|
+
return function UnsubscriptionErrorImpl(errors) {
|
|
701
|
+
_super(this);
|
|
702
|
+
this.message = errors
|
|
703
|
+
? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return i + 1 + ") " + err.toString(); }).join('\n ')
|
|
704
|
+
: '';
|
|
758
705
|
this.name = 'UnsubscriptionError';
|
|
759
706
|
this.errors = errors;
|
|
760
|
-
|
|
707
|
+
};
|
|
708
|
+
});
|
|
709
|
+
|
|
710
|
+
function arrRemove(arr, item) {
|
|
711
|
+
if (arr) {
|
|
712
|
+
var index = arr.indexOf(item);
|
|
713
|
+
0 <= index && arr.splice(index, 1);
|
|
761
714
|
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */
|
|
768
|
-
var Subscription$1 = /*@__PURE__*/ (function () {
|
|
769
|
-
function Subscription(unsubscribe) {
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
var Subscription$1 = (function () {
|
|
718
|
+
function Subscription(initialTeardown) {
|
|
719
|
+
this.initialTeardown = initialTeardown;
|
|
770
720
|
this.closed = false;
|
|
771
|
-
this.
|
|
772
|
-
this.
|
|
773
|
-
if (unsubscribe) {
|
|
774
|
-
this._ctorUnsubscribe = true;
|
|
775
|
-
this._unsubscribe = unsubscribe;
|
|
776
|
-
}
|
|
721
|
+
this._parentage = null;
|
|
722
|
+
this._finalizers = null;
|
|
777
723
|
}
|
|
778
724
|
Subscription.prototype.unsubscribe = function () {
|
|
725
|
+
var e_1, _a, e_2, _b;
|
|
779
726
|
var errors;
|
|
780
|
-
if (this.closed) {
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
this._subscriptions = null;
|
|
787
|
-
if (_parentOrParents instanceof Subscription) {
|
|
788
|
-
_parentOrParents.remove(this);
|
|
789
|
-
}
|
|
790
|
-
else if (_parentOrParents !== null) {
|
|
791
|
-
for (var index = 0; index < _parentOrParents.length; ++index) {
|
|
792
|
-
var parent_1 = _parentOrParents[index];
|
|
793
|
-
parent_1.remove(this);
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
if (isFunction(_unsubscribe)) {
|
|
797
|
-
if (_ctorUnsubscribe) {
|
|
798
|
-
this._unsubscribe = undefined;
|
|
799
|
-
}
|
|
800
|
-
try {
|
|
801
|
-
_unsubscribe.call(this);
|
|
802
|
-
}
|
|
803
|
-
catch (e) {
|
|
804
|
-
errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
if (isArray(_subscriptions)) {
|
|
808
|
-
var index = -1;
|
|
809
|
-
var len = _subscriptions.length;
|
|
810
|
-
while (++index < len) {
|
|
811
|
-
var sub = _subscriptions[index];
|
|
812
|
-
if (isObject(sub)) {
|
|
727
|
+
if (!this.closed) {
|
|
728
|
+
this.closed = true;
|
|
729
|
+
var _parentage = this._parentage;
|
|
730
|
+
if (_parentage) {
|
|
731
|
+
this._parentage = null;
|
|
732
|
+
if (Array.isArray(_parentage)) {
|
|
813
733
|
try {
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
errors = errors || [];
|
|
818
|
-
if (e instanceof UnsubscriptionError) {
|
|
819
|
-
errors = errors.concat(flattenUnsubscriptionErrors(e.errors));
|
|
734
|
+
for (var _parentage_1 = tslib.__values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
|
|
735
|
+
var parent_1 = _parentage_1_1.value;
|
|
736
|
+
parent_1.remove(this);
|
|
820
737
|
}
|
|
821
|
-
|
|
822
|
-
|
|
738
|
+
}
|
|
739
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
740
|
+
finally {
|
|
741
|
+
try {
|
|
742
|
+
if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
|
|
823
743
|
}
|
|
744
|
+
finally { if (e_1) throw e_1.error; }
|
|
824
745
|
}
|
|
825
746
|
}
|
|
747
|
+
else {
|
|
748
|
+
_parentage.remove(this);
|
|
749
|
+
}
|
|
826
750
|
}
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
};
|
|
832
|
-
Subscription.prototype.add = function (teardown) {
|
|
833
|
-
var subscription = teardown;
|
|
834
|
-
if (!teardown) {
|
|
835
|
-
return Subscription.EMPTY;
|
|
836
|
-
}
|
|
837
|
-
switch (typeof teardown) {
|
|
838
|
-
case 'function':
|
|
839
|
-
subscription = new Subscription(teardown);
|
|
840
|
-
case 'object':
|
|
841
|
-
if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {
|
|
842
|
-
return subscription;
|
|
751
|
+
var initialFinalizer = this.initialTeardown;
|
|
752
|
+
if (isFunction(initialFinalizer)) {
|
|
753
|
+
try {
|
|
754
|
+
initialFinalizer();
|
|
843
755
|
}
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
756
|
+
catch (e) {
|
|
757
|
+
errors = e instanceof UnsubscriptionError ? e.errors : [e];
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
var _finalizers = this._finalizers;
|
|
761
|
+
if (_finalizers) {
|
|
762
|
+
this._finalizers = null;
|
|
763
|
+
try {
|
|
764
|
+
for (var _finalizers_1 = tslib.__values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {
|
|
765
|
+
var finalizer = _finalizers_1_1.value;
|
|
766
|
+
try {
|
|
767
|
+
execFinalizer(finalizer);
|
|
768
|
+
}
|
|
769
|
+
catch (err) {
|
|
770
|
+
errors = errors !== null && errors !== void 0 ? errors : [];
|
|
771
|
+
if (err instanceof UnsubscriptionError) {
|
|
772
|
+
errors = tslib.__spreadArray(tslib.__spreadArray([], tslib.__read(errors)), tslib.__read(err.errors));
|
|
773
|
+
}
|
|
774
|
+
else {
|
|
775
|
+
errors.push(err);
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
}
|
|
847
779
|
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
780
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
781
|
+
finally {
|
|
782
|
+
try {
|
|
783
|
+
if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);
|
|
784
|
+
}
|
|
785
|
+
finally { if (e_2) throw e_2.error; }
|
|
852
786
|
}
|
|
853
|
-
break;
|
|
854
|
-
default: {
|
|
855
|
-
throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');
|
|
856
787
|
}
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
if (_parentOrParents === null) {
|
|
860
|
-
subscription._parentOrParents = this;
|
|
861
|
-
}
|
|
862
|
-
else if (_parentOrParents instanceof Subscription) {
|
|
863
|
-
if (_parentOrParents === this) {
|
|
864
|
-
return subscription;
|
|
788
|
+
if (errors) {
|
|
789
|
+
throw new UnsubscriptionError(errors);
|
|
865
790
|
}
|
|
866
|
-
subscription._parentOrParents = [_parentOrParents, this];
|
|
867
|
-
}
|
|
868
|
-
else if (_parentOrParents.indexOf(this) === -1) {
|
|
869
|
-
_parentOrParents.push(this);
|
|
870
791
|
}
|
|
871
|
-
|
|
872
|
-
|
|
792
|
+
};
|
|
793
|
+
Subscription.prototype.add = function (teardown) {
|
|
794
|
+
var _a;
|
|
795
|
+
if (teardown && teardown !== this) {
|
|
796
|
+
if (this.closed) {
|
|
797
|
+
execFinalizer(teardown);
|
|
798
|
+
}
|
|
799
|
+
else {
|
|
800
|
+
if (teardown instanceof Subscription) {
|
|
801
|
+
if (teardown.closed || teardown._hasParent(this)) {
|
|
802
|
+
return;
|
|
803
|
+
}
|
|
804
|
+
teardown._addParent(this);
|
|
805
|
+
}
|
|
806
|
+
(this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);
|
|
807
|
+
}
|
|
873
808
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
809
|
+
};
|
|
810
|
+
Subscription.prototype._hasParent = function (parent) {
|
|
811
|
+
var _parentage = this._parentage;
|
|
812
|
+
return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));
|
|
813
|
+
};
|
|
814
|
+
Subscription.prototype._addParent = function (parent) {
|
|
815
|
+
var _parentage = this._parentage;
|
|
816
|
+
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
|
|
817
|
+
};
|
|
818
|
+
Subscription.prototype._removeParent = function (parent) {
|
|
819
|
+
var _parentage = this._parentage;
|
|
820
|
+
if (_parentage === parent) {
|
|
821
|
+
this._parentage = null;
|
|
877
822
|
}
|
|
878
|
-
else {
|
|
879
|
-
|
|
823
|
+
else if (Array.isArray(_parentage)) {
|
|
824
|
+
arrRemove(_parentage, parent);
|
|
880
825
|
}
|
|
881
|
-
return subscription;
|
|
882
826
|
};
|
|
883
|
-
Subscription.prototype.remove = function (
|
|
884
|
-
var
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
subscriptions.splice(subscriptionIndex, 1);
|
|
889
|
-
}
|
|
827
|
+
Subscription.prototype.remove = function (teardown) {
|
|
828
|
+
var _finalizers = this._finalizers;
|
|
829
|
+
_finalizers && arrRemove(_finalizers, teardown);
|
|
830
|
+
if (teardown instanceof Subscription) {
|
|
831
|
+
teardown._removeParent(this);
|
|
890
832
|
}
|
|
891
833
|
};
|
|
892
|
-
Subscription.EMPTY = (function (
|
|
834
|
+
Subscription.EMPTY = (function () {
|
|
835
|
+
var empty = new Subscription();
|
|
893
836
|
empty.closed = true;
|
|
894
837
|
return empty;
|
|
895
|
-
}(
|
|
838
|
+
})();
|
|
896
839
|
return Subscription;
|
|
897
840
|
}());
|
|
898
|
-
|
|
899
|
-
|
|
841
|
+
var EMPTY_SUBSCRIPTION = Subscription$1.EMPTY;
|
|
842
|
+
function isSubscription(value) {
|
|
843
|
+
return (value instanceof Subscription$1 ||
|
|
844
|
+
(value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));
|
|
900
845
|
}
|
|
846
|
+
function execFinalizer(finalizer) {
|
|
847
|
+
if (isFunction(finalizer)) {
|
|
848
|
+
finalizer();
|
|
849
|
+
}
|
|
850
|
+
else {
|
|
851
|
+
finalizer.unsubscribe();
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
var config = {
|
|
856
|
+
onUnhandledError: null,
|
|
857
|
+
onStoppedNotification: null,
|
|
858
|
+
Promise: undefined,
|
|
859
|
+
useDeprecatedSynchronousErrorHandling: false,
|
|
860
|
+
useDeprecatedNextContext: false,
|
|
861
|
+
};
|
|
862
|
+
|
|
863
|
+
var timeoutProvider = {
|
|
864
|
+
setTimeout: function (handler, timeout) {
|
|
865
|
+
var args = [];
|
|
866
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
867
|
+
args[_i - 2] = arguments[_i];
|
|
868
|
+
}
|
|
869
|
+
var delegate = timeoutProvider.delegate;
|
|
870
|
+
if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
|
|
871
|
+
return delegate.setTimeout.apply(delegate, tslib.__spreadArray([handler, timeout], tslib.__read(args)));
|
|
872
|
+
}
|
|
873
|
+
return setTimeout.apply(void 0, tslib.__spreadArray([handler, timeout], tslib.__read(args)));
|
|
874
|
+
},
|
|
875
|
+
clearTimeout: function (handle) {
|
|
876
|
+
var delegate = timeoutProvider.delegate;
|
|
877
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
|
|
878
|
+
},
|
|
879
|
+
delegate: undefined,
|
|
880
|
+
};
|
|
901
881
|
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
})
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
882
|
+
function reportUnhandledError(err) {
|
|
883
|
+
timeoutProvider.setTimeout(function () {
|
|
884
|
+
{
|
|
885
|
+
throw err;
|
|
886
|
+
}
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
function noop() { }
|
|
891
|
+
|
|
892
|
+
var context = null;
|
|
893
|
+
function errorContext(cb) {
|
|
894
|
+
if (config.useDeprecatedSynchronousErrorHandling) {
|
|
895
|
+
var isRoot = !context;
|
|
896
|
+
if (isRoot) {
|
|
897
|
+
context = { errorThrown: false, error: null };
|
|
898
|
+
}
|
|
899
|
+
cb();
|
|
900
|
+
if (isRoot) {
|
|
901
|
+
var _a = context, errorThrown = _a.errorThrown, error = _a.error;
|
|
902
|
+
context = null;
|
|
903
|
+
if (errorThrown) {
|
|
904
|
+
throw error;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
else {
|
|
909
|
+
cb();
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
var Subscriber = (function (_super) {
|
|
914
|
+
tslib.__extends(Subscriber, _super);
|
|
915
|
+
function Subscriber(destination) {
|
|
913
916
|
var _this = _super.call(this) || this;
|
|
914
|
-
_this.syncErrorValue = null;
|
|
915
|
-
_this.syncErrorThrown = false;
|
|
916
|
-
_this.syncErrorThrowable = false;
|
|
917
917
|
_this.isStopped = false;
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
}
|
|
927
|
-
if (typeof destinationOrNext === 'object') {
|
|
928
|
-
if (destinationOrNext instanceof Subscriber) {
|
|
929
|
-
_this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;
|
|
930
|
-
_this.destination = destinationOrNext;
|
|
931
|
-
destinationOrNext.add(_this);
|
|
932
|
-
}
|
|
933
|
-
else {
|
|
934
|
-
_this.syncErrorThrowable = true;
|
|
935
|
-
_this.destination = new SafeSubscriber(_this, destinationOrNext);
|
|
936
|
-
}
|
|
937
|
-
break;
|
|
938
|
-
}
|
|
939
|
-
default:
|
|
940
|
-
_this.syncErrorThrowable = true;
|
|
941
|
-
_this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);
|
|
942
|
-
break;
|
|
918
|
+
if (destination) {
|
|
919
|
+
_this.destination = destination;
|
|
920
|
+
if (isSubscription(destination)) {
|
|
921
|
+
destination.add(_this);
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
else {
|
|
925
|
+
_this.destination = EMPTY_OBSERVER;
|
|
943
926
|
}
|
|
944
927
|
return _this;
|
|
945
928
|
}
|
|
946
|
-
Subscriber.prototype[rxSubscriber] = function () { return this; };
|
|
947
929
|
Subscriber.create = function (next, error, complete) {
|
|
948
|
-
|
|
949
|
-
subscriber.syncErrorThrowable = false;
|
|
950
|
-
return subscriber;
|
|
930
|
+
return new SafeSubscriber(next, error, complete);
|
|
951
931
|
};
|
|
952
932
|
Subscriber.prototype.next = function (value) {
|
|
953
|
-
if (
|
|
933
|
+
if (this.isStopped) ;
|
|
934
|
+
else {
|
|
954
935
|
this._next(value);
|
|
955
936
|
}
|
|
956
937
|
};
|
|
957
938
|
Subscriber.prototype.error = function (err) {
|
|
958
|
-
if (
|
|
939
|
+
if (this.isStopped) ;
|
|
940
|
+
else {
|
|
959
941
|
this.isStopped = true;
|
|
960
942
|
this._error(err);
|
|
961
943
|
}
|
|
962
944
|
};
|
|
963
945
|
Subscriber.prototype.complete = function () {
|
|
964
|
-
if (
|
|
946
|
+
if (this.isStopped) ;
|
|
947
|
+
else {
|
|
965
948
|
this.isStopped = true;
|
|
966
949
|
this._complete();
|
|
967
950
|
}
|
|
968
951
|
};
|
|
969
952
|
Subscriber.prototype.unsubscribe = function () {
|
|
970
|
-
if (this.closed) {
|
|
971
|
-
|
|
953
|
+
if (!this.closed) {
|
|
954
|
+
this.isStopped = true;
|
|
955
|
+
_super.prototype.unsubscribe.call(this);
|
|
956
|
+
this.destination = null;
|
|
972
957
|
}
|
|
973
|
-
this.isStopped = true;
|
|
974
|
-
_super.prototype.unsubscribe.call(this);
|
|
975
958
|
};
|
|
976
959
|
Subscriber.prototype._next = function (value) {
|
|
977
960
|
this.destination.next(value);
|
|
978
961
|
};
|
|
979
962
|
Subscriber.prototype._error = function (err) {
|
|
980
|
-
|
|
981
|
-
|
|
963
|
+
try {
|
|
964
|
+
this.destination.error(err);
|
|
965
|
+
}
|
|
966
|
+
finally {
|
|
967
|
+
this.unsubscribe();
|
|
968
|
+
}
|
|
982
969
|
};
|
|
983
970
|
Subscriber.prototype._complete = function () {
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
this.unsubscribe();
|
|
991
|
-
this.closed = false;
|
|
992
|
-
this.isStopped = false;
|
|
993
|
-
this._parentOrParents = _parentOrParents;
|
|
994
|
-
return this;
|
|
971
|
+
try {
|
|
972
|
+
this.destination.complete();
|
|
973
|
+
}
|
|
974
|
+
finally {
|
|
975
|
+
this.unsubscribe();
|
|
976
|
+
}
|
|
995
977
|
};
|
|
996
978
|
return Subscriber;
|
|
997
979
|
}(Subscription$1));
|
|
998
|
-
var
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
if (isFunction(observerOrNext)) {
|
|
1006
|
-
next = observerOrNext;
|
|
1007
|
-
}
|
|
1008
|
-
else if (observerOrNext) {
|
|
1009
|
-
next = observerOrNext.next;
|
|
1010
|
-
error = observerOrNext.error;
|
|
1011
|
-
complete = observerOrNext.complete;
|
|
1012
|
-
if (observerOrNext !== empty) {
|
|
1013
|
-
context = Object.create(observerOrNext);
|
|
1014
|
-
if (isFunction(context.unsubscribe)) {
|
|
1015
|
-
_this.add(context.unsubscribe.bind(context));
|
|
1016
|
-
}
|
|
1017
|
-
context.unsubscribe = _this.unsubscribe.bind(_this);
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
_this._context = context;
|
|
1021
|
-
_this._next = next;
|
|
1022
|
-
_this._error = error;
|
|
1023
|
-
_this._complete = complete;
|
|
1024
|
-
return _this;
|
|
980
|
+
var _bind = Function.prototype.bind;
|
|
981
|
+
function bind(fn, thisArg) {
|
|
982
|
+
return _bind.call(fn, thisArg);
|
|
983
|
+
}
|
|
984
|
+
var ConsumerObserver = (function () {
|
|
985
|
+
function ConsumerObserver(partialObserver) {
|
|
986
|
+
this.partialObserver = partialObserver;
|
|
1025
987
|
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
988
|
+
ConsumerObserver.prototype.next = function (value) {
|
|
989
|
+
var partialObserver = this.partialObserver;
|
|
990
|
+
if (partialObserver.next) {
|
|
991
|
+
try {
|
|
992
|
+
partialObserver.next(value);
|
|
1031
993
|
}
|
|
1032
|
-
|
|
1033
|
-
|
|
994
|
+
catch (error) {
|
|
995
|
+
handleUnhandledError(error);
|
|
1034
996
|
}
|
|
1035
997
|
}
|
|
1036
998
|
};
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
|
|
1043
|
-
this.__tryOrUnsub(this._error, err);
|
|
1044
|
-
this.unsubscribe();
|
|
1045
|
-
}
|
|
1046
|
-
else {
|
|
1047
|
-
this.__tryOrSetError(_parentSubscriber, this._error, err);
|
|
1048
|
-
this.unsubscribe();
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
else if (!_parentSubscriber.syncErrorThrowable) {
|
|
1052
|
-
this.unsubscribe();
|
|
1053
|
-
if (useDeprecatedSynchronousErrorHandling) {
|
|
1054
|
-
throw err;
|
|
1055
|
-
}
|
|
1056
|
-
hostReportError(err);
|
|
999
|
+
ConsumerObserver.prototype.error = function (err) {
|
|
1000
|
+
var partialObserver = this.partialObserver;
|
|
1001
|
+
if (partialObserver.error) {
|
|
1002
|
+
try {
|
|
1003
|
+
partialObserver.error(err);
|
|
1057
1004
|
}
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
_parentSubscriber.syncErrorValue = err;
|
|
1061
|
-
_parentSubscriber.syncErrorThrown = true;
|
|
1062
|
-
}
|
|
1063
|
-
else {
|
|
1064
|
-
hostReportError(err);
|
|
1065
|
-
}
|
|
1066
|
-
this.unsubscribe();
|
|
1005
|
+
catch (error) {
|
|
1006
|
+
handleUnhandledError(error);
|
|
1067
1007
|
}
|
|
1068
1008
|
}
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
var _this = this;
|
|
1072
|
-
if (!this.isStopped) {
|
|
1073
|
-
var _parentSubscriber = this._parentSubscriber;
|
|
1074
|
-
if (this._complete) {
|
|
1075
|
-
var wrappedComplete = function () { return _this._complete.call(_this._context); };
|
|
1076
|
-
if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {
|
|
1077
|
-
this.__tryOrUnsub(wrappedComplete);
|
|
1078
|
-
this.unsubscribe();
|
|
1079
|
-
}
|
|
1080
|
-
else {
|
|
1081
|
-
this.__tryOrSetError(_parentSubscriber, wrappedComplete);
|
|
1082
|
-
this.unsubscribe();
|
|
1083
|
-
}
|
|
1084
|
-
}
|
|
1085
|
-
else {
|
|
1086
|
-
this.unsubscribe();
|
|
1087
|
-
}
|
|
1009
|
+
else {
|
|
1010
|
+
handleUnhandledError(err);
|
|
1088
1011
|
}
|
|
1089
1012
|
};
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
this.unsubscribe();
|
|
1096
|
-
if (config.useDeprecatedSynchronousErrorHandling) {
|
|
1097
|
-
throw err;
|
|
1013
|
+
ConsumerObserver.prototype.complete = function () {
|
|
1014
|
+
var partialObserver = this.partialObserver;
|
|
1015
|
+
if (partialObserver.complete) {
|
|
1016
|
+
try {
|
|
1017
|
+
partialObserver.complete();
|
|
1098
1018
|
}
|
|
1099
|
-
|
|
1100
|
-
|
|
1019
|
+
catch (error) {
|
|
1020
|
+
handleUnhandledError(error);
|
|
1101
1021
|
}
|
|
1102
1022
|
}
|
|
1103
1023
|
};
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1024
|
+
return ConsumerObserver;
|
|
1025
|
+
}());
|
|
1026
|
+
var SafeSubscriber = (function (_super) {
|
|
1027
|
+
tslib.__extends(SafeSubscriber, _super);
|
|
1028
|
+
function SafeSubscriber(observerOrNext, error, complete) {
|
|
1029
|
+
var _this = _super.call(this) || this;
|
|
1030
|
+
var partialObserver;
|
|
1031
|
+
if (isFunction(observerOrNext) || !observerOrNext) {
|
|
1032
|
+
partialObserver = {
|
|
1033
|
+
next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),
|
|
1034
|
+
error: error !== null && error !== void 0 ? error : undefined,
|
|
1035
|
+
complete: complete !== null && complete !== void 0 ? complete : undefined,
|
|
1036
|
+
};
|
|
1110
1037
|
}
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
return
|
|
1038
|
+
else {
|
|
1039
|
+
var context_1;
|
|
1040
|
+
if (_this && config.useDeprecatedNextContext) {
|
|
1041
|
+
context_1 = Object.create(observerOrNext);
|
|
1042
|
+
context_1.unsubscribe = function () { return _this.unsubscribe(); };
|
|
1043
|
+
partialObserver = {
|
|
1044
|
+
next: observerOrNext.next && bind(observerOrNext.next, context_1),
|
|
1045
|
+
error: observerOrNext.error && bind(observerOrNext.error, context_1),
|
|
1046
|
+
complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),
|
|
1047
|
+
};
|
|
1116
1048
|
}
|
|
1117
1049
|
else {
|
|
1118
|
-
|
|
1119
|
-
return true;
|
|
1050
|
+
partialObserver = observerOrNext;
|
|
1120
1051
|
}
|
|
1121
1052
|
}
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
var _parentSubscriber = this._parentSubscriber;
|
|
1126
|
-
this._context = null;
|
|
1127
|
-
this._parentSubscriber = null;
|
|
1128
|
-
_parentSubscriber.unsubscribe();
|
|
1129
|
-
};
|
|
1053
|
+
_this.destination = new ConsumerObserver(partialObserver);
|
|
1054
|
+
return _this;
|
|
1055
|
+
}
|
|
1130
1056
|
return SafeSubscriber;
|
|
1131
1057
|
}(Subscriber));
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
while (observer) {
|
|
1136
|
-
var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;
|
|
1137
|
-
if (closed_1 || isStopped) {
|
|
1138
|
-
return false;
|
|
1139
|
-
}
|
|
1140
|
-
else if (destination && destination instanceof Subscriber) {
|
|
1141
|
-
observer = destination;
|
|
1142
|
-
}
|
|
1143
|
-
else {
|
|
1144
|
-
observer = null;
|
|
1145
|
-
}
|
|
1058
|
+
function handleUnhandledError(error) {
|
|
1059
|
+
{
|
|
1060
|
+
reportUnhandledError(error);
|
|
1146
1061
|
}
|
|
1147
|
-
return true;
|
|
1148
1062
|
}
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
function toSubscriber(nextOrObserver, error, complete) {
|
|
1152
|
-
if (nextOrObserver) {
|
|
1153
|
-
if (nextOrObserver instanceof Subscriber) {
|
|
1154
|
-
return nextOrObserver;
|
|
1155
|
-
}
|
|
1156
|
-
if (nextOrObserver[rxSubscriber]) {
|
|
1157
|
-
return nextOrObserver[rxSubscriber]();
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
if (!nextOrObserver && !error && !complete) {
|
|
1161
|
-
return new Subscriber(empty);
|
|
1162
|
-
}
|
|
1163
|
-
return new Subscriber(nextOrObserver, error, complete);
|
|
1063
|
+
function defaultErrorHandler(err) {
|
|
1064
|
+
throw err;
|
|
1164
1065
|
}
|
|
1066
|
+
var EMPTY_OBSERVER = {
|
|
1067
|
+
closed: true,
|
|
1068
|
+
next: noop,
|
|
1069
|
+
error: defaultErrorHandler,
|
|
1070
|
+
complete: noop,
|
|
1071
|
+
};
|
|
1165
1072
|
|
|
1166
|
-
|
|
1167
|
-
var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();
|
|
1073
|
+
var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();
|
|
1168
1074
|
|
|
1169
|
-
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
|
1170
1075
|
function identity(x) {
|
|
1171
1076
|
return x;
|
|
1172
1077
|
}
|
|
1173
1078
|
|
|
1174
|
-
/** PURE_IMPORTS_START _identity PURE_IMPORTS_END */
|
|
1175
1079
|
function pipeFromArray(fns) {
|
|
1176
1080
|
if (fns.length === 0) {
|
|
1177
1081
|
return identity;
|
|
@@ -1184,10 +1088,8 @@ function pipeFromArray(fns) {
|
|
|
1184
1088
|
};
|
|
1185
1089
|
}
|
|
1186
1090
|
|
|
1187
|
-
|
|
1188
|
-
var Observable = /*@__PURE__*/ (function () {
|
|
1091
|
+
var Observable = (function () {
|
|
1189
1092
|
function Observable(subscribe) {
|
|
1190
|
-
this._isScalar = false;
|
|
1191
1093
|
if (subscribe) {
|
|
1192
1094
|
this._subscribe = subscribe;
|
|
1193
1095
|
}
|
|
@@ -1199,64 +1101,52 @@ var Observable = /*@__PURE__*/ (function () {
|
|
|
1199
1101
|
return observable;
|
|
1200
1102
|
};
|
|
1201
1103
|
Observable.prototype.subscribe = function (observerOrNext, error, complete) {
|
|
1202
|
-
var
|
|
1203
|
-
var
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
throw sink.syncErrorValue;
|
|
1217
|
-
}
|
|
1218
|
-
}
|
|
1219
|
-
}
|
|
1220
|
-
return sink;
|
|
1104
|
+
var _this = this;
|
|
1105
|
+
var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
|
|
1106
|
+
errorContext(function () {
|
|
1107
|
+
var _a = _this, operator = _a.operator, source = _a.source;
|
|
1108
|
+
subscriber.add(operator
|
|
1109
|
+
?
|
|
1110
|
+
operator.call(subscriber, source)
|
|
1111
|
+
: source
|
|
1112
|
+
?
|
|
1113
|
+
_this._subscribe(subscriber)
|
|
1114
|
+
:
|
|
1115
|
+
_this._trySubscribe(subscriber));
|
|
1116
|
+
});
|
|
1117
|
+
return subscriber;
|
|
1221
1118
|
};
|
|
1222
1119
|
Observable.prototype._trySubscribe = function (sink) {
|
|
1223
1120
|
try {
|
|
1224
1121
|
return this._subscribe(sink);
|
|
1225
1122
|
}
|
|
1226
1123
|
catch (err) {
|
|
1227
|
-
|
|
1228
|
-
sink.syncErrorThrown = true;
|
|
1229
|
-
sink.syncErrorValue = err;
|
|
1230
|
-
}
|
|
1231
|
-
if (canReportError(sink)) {
|
|
1232
|
-
sink.error(err);
|
|
1233
|
-
}
|
|
1234
|
-
else {
|
|
1235
|
-
console.warn(err);
|
|
1236
|
-
}
|
|
1124
|
+
sink.error(err);
|
|
1237
1125
|
}
|
|
1238
1126
|
};
|
|
1239
1127
|
Observable.prototype.forEach = function (next, promiseCtor) {
|
|
1240
1128
|
var _this = this;
|
|
1241
1129
|
promiseCtor = getPromiseCtor(promiseCtor);
|
|
1242
1130
|
return new promiseCtor(function (resolve, reject) {
|
|
1243
|
-
var
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
}
|
|
1248
|
-
catch (err) {
|
|
1249
|
-
reject(err);
|
|
1250
|
-
if (subscription) {
|
|
1251
|
-
subscription.unsubscribe();
|
|
1131
|
+
var subscriber = new SafeSubscriber({
|
|
1132
|
+
next: function (value) {
|
|
1133
|
+
try {
|
|
1134
|
+
next(value);
|
|
1252
1135
|
}
|
|
1253
|
-
|
|
1254
|
-
|
|
1136
|
+
catch (err) {
|
|
1137
|
+
reject(err);
|
|
1138
|
+
subscriber.unsubscribe();
|
|
1139
|
+
}
|
|
1140
|
+
},
|
|
1141
|
+
error: reject,
|
|
1142
|
+
complete: resolve,
|
|
1143
|
+
});
|
|
1144
|
+
_this.subscribe(subscriber);
|
|
1255
1145
|
});
|
|
1256
1146
|
};
|
|
1257
1147
|
Observable.prototype._subscribe = function (subscriber) {
|
|
1258
|
-
var
|
|
1259
|
-
return source
|
|
1148
|
+
var _a;
|
|
1149
|
+
return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
|
|
1260
1150
|
};
|
|
1261
1151
|
Observable.prototype[observable] = function () {
|
|
1262
1152
|
return this;
|
|
@@ -1266,9 +1156,6 @@ var Observable = /*@__PURE__*/ (function () {
|
|
|
1266
1156
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1267
1157
|
operations[_i] = arguments[_i];
|
|
1268
1158
|
}
|
|
1269
|
-
if (operations.length === 0) {
|
|
1270
|
-
return this;
|
|
1271
|
-
}
|
|
1272
1159
|
return pipeFromArray(operations)(this);
|
|
1273
1160
|
};
|
|
1274
1161
|
Observable.prototype.toPromise = function (promiseCtor) {
|
|
@@ -1276,7 +1163,7 @@ var Observable = /*@__PURE__*/ (function () {
|
|
|
1276
1163
|
promiseCtor = getPromiseCtor(promiseCtor);
|
|
1277
1164
|
return new promiseCtor(function (resolve, reject) {
|
|
1278
1165
|
var value;
|
|
1279
|
-
_this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });
|
|
1166
|
+
_this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });
|
|
1280
1167
|
});
|
|
1281
1168
|
};
|
|
1282
1169
|
Observable.create = function (subscribe) {
|
|
@@ -1285,155 +1172,139 @@ var Observable = /*@__PURE__*/ (function () {
|
|
|
1285
1172
|
return Observable;
|
|
1286
1173
|
}());
|
|
1287
1174
|
function getPromiseCtor(promiseCtor) {
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1175
|
+
var _a;
|
|
1176
|
+
return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
|
|
1177
|
+
}
|
|
1178
|
+
function isObserver(value) {
|
|
1179
|
+
return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
|
|
1180
|
+
}
|
|
1181
|
+
function isSubscriber(value) {
|
|
1182
|
+
return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));
|
|
1295
1183
|
}
|
|
1296
1184
|
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
Error.call(this);
|
|
1301
|
-
this.message = 'object unsubscribed';
|
|
1185
|
+
var ObjectUnsubscribedError = createErrorClass(function (_super) {
|
|
1186
|
+
return function ObjectUnsubscribedErrorImpl() {
|
|
1187
|
+
_super(this);
|
|
1302
1188
|
this.name = 'ObjectUnsubscribedError';
|
|
1303
|
-
|
|
1304
|
-
}
|
|
1305
|
-
ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);
|
|
1306
|
-
return ObjectUnsubscribedErrorImpl;
|
|
1307
|
-
})();
|
|
1308
|
-
var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;
|
|
1309
|
-
|
|
1310
|
-
/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
|
|
1311
|
-
var SubjectSubscription = /*@__PURE__*/ (function (_super) {
|
|
1312
|
-
tslib_1__namespace.__extends(SubjectSubscription, _super);
|
|
1313
|
-
function SubjectSubscription(subject, subscriber) {
|
|
1314
|
-
var _this = _super.call(this) || this;
|
|
1315
|
-
_this.subject = subject;
|
|
1316
|
-
_this.subscriber = subscriber;
|
|
1317
|
-
_this.closed = false;
|
|
1318
|
-
return _this;
|
|
1319
|
-
}
|
|
1320
|
-
SubjectSubscription.prototype.unsubscribe = function () {
|
|
1321
|
-
if (this.closed) {
|
|
1322
|
-
return;
|
|
1323
|
-
}
|
|
1324
|
-
this.closed = true;
|
|
1325
|
-
var subject = this.subject;
|
|
1326
|
-
var observers = subject.observers;
|
|
1327
|
-
this.subject = null;
|
|
1328
|
-
if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
|
|
1329
|
-
return;
|
|
1330
|
-
}
|
|
1331
|
-
var subscriberIndex = observers.indexOf(this.subscriber);
|
|
1332
|
-
if (subscriberIndex !== -1) {
|
|
1333
|
-
observers.splice(subscriberIndex, 1);
|
|
1334
|
-
}
|
|
1189
|
+
this.message = 'object unsubscribed';
|
|
1335
1190
|
};
|
|
1336
|
-
|
|
1337
|
-
}(Subscription$1));
|
|
1191
|
+
});
|
|
1338
1192
|
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
tslib_1__namespace.__extends(SubjectSubscriber, _super);
|
|
1342
|
-
function SubjectSubscriber(destination) {
|
|
1343
|
-
var _this = _super.call(this, destination) || this;
|
|
1344
|
-
_this.destination = destination;
|
|
1345
|
-
return _this;
|
|
1346
|
-
}
|
|
1347
|
-
return SubjectSubscriber;
|
|
1348
|
-
}(Subscriber));
|
|
1349
|
-
var Subject = /*@__PURE__*/ (function (_super) {
|
|
1350
|
-
tslib_1__namespace.__extends(Subject, _super);
|
|
1193
|
+
var Subject = (function (_super) {
|
|
1194
|
+
tslib.__extends(Subject, _super);
|
|
1351
1195
|
function Subject() {
|
|
1352
1196
|
var _this = _super.call(this) || this;
|
|
1353
|
-
_this.observers = [];
|
|
1354
1197
|
_this.closed = false;
|
|
1198
|
+
_this.currentObservers = null;
|
|
1199
|
+
_this.observers = [];
|
|
1355
1200
|
_this.isStopped = false;
|
|
1356
1201
|
_this.hasError = false;
|
|
1357
1202
|
_this.thrownError = null;
|
|
1358
1203
|
return _this;
|
|
1359
1204
|
}
|
|
1360
|
-
Subject.prototype[rxSubscriber] = function () {
|
|
1361
|
-
return new SubjectSubscriber(this);
|
|
1362
|
-
};
|
|
1363
1205
|
Subject.prototype.lift = function (operator) {
|
|
1364
1206
|
var subject = new AnonymousSubject(this, this);
|
|
1365
1207
|
subject.operator = operator;
|
|
1366
1208
|
return subject;
|
|
1367
1209
|
};
|
|
1368
|
-
Subject.prototype.
|
|
1210
|
+
Subject.prototype._throwIfClosed = function () {
|
|
1369
1211
|
if (this.closed) {
|
|
1370
1212
|
throw new ObjectUnsubscribedError();
|
|
1371
1213
|
}
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1214
|
+
};
|
|
1215
|
+
Subject.prototype.next = function (value) {
|
|
1216
|
+
var _this = this;
|
|
1217
|
+
errorContext(function () {
|
|
1218
|
+
var e_1, _a;
|
|
1219
|
+
_this._throwIfClosed();
|
|
1220
|
+
if (!_this.isStopped) {
|
|
1221
|
+
if (!_this.currentObservers) {
|
|
1222
|
+
_this.currentObservers = Array.from(_this.observers);
|
|
1223
|
+
}
|
|
1224
|
+
try {
|
|
1225
|
+
for (var _b = tslib.__values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1226
|
+
var observer = _c.value;
|
|
1227
|
+
observer.next(value);
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1231
|
+
finally {
|
|
1232
|
+
try {
|
|
1233
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1234
|
+
}
|
|
1235
|
+
finally { if (e_1) throw e_1.error; }
|
|
1236
|
+
}
|
|
1378
1237
|
}
|
|
1379
|
-
}
|
|
1238
|
+
});
|
|
1380
1239
|
};
|
|
1381
1240
|
Subject.prototype.error = function (err) {
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
}
|
|
1394
|
-
this.observers.length = 0;
|
|
1241
|
+
var _this = this;
|
|
1242
|
+
errorContext(function () {
|
|
1243
|
+
_this._throwIfClosed();
|
|
1244
|
+
if (!_this.isStopped) {
|
|
1245
|
+
_this.hasError = _this.isStopped = true;
|
|
1246
|
+
_this.thrownError = err;
|
|
1247
|
+
var observers = _this.observers;
|
|
1248
|
+
while (observers.length) {
|
|
1249
|
+
observers.shift().error(err);
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
});
|
|
1395
1253
|
};
|
|
1396
1254
|
Subject.prototype.complete = function () {
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1255
|
+
var _this = this;
|
|
1256
|
+
errorContext(function () {
|
|
1257
|
+
_this._throwIfClosed();
|
|
1258
|
+
if (!_this.isStopped) {
|
|
1259
|
+
_this.isStopped = true;
|
|
1260
|
+
var observers = _this.observers;
|
|
1261
|
+
while (observers.length) {
|
|
1262
|
+
observers.shift().complete();
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
});
|
|
1408
1266
|
};
|
|
1409
1267
|
Subject.prototype.unsubscribe = function () {
|
|
1410
|
-
this.isStopped = true;
|
|
1411
|
-
this.
|
|
1412
|
-
this.observers = null;
|
|
1268
|
+
this.isStopped = this.closed = true;
|
|
1269
|
+
this.observers = this.currentObservers = null;
|
|
1413
1270
|
};
|
|
1271
|
+
Object.defineProperty(Subject.prototype, "observed", {
|
|
1272
|
+
get: function () {
|
|
1273
|
+
var _a;
|
|
1274
|
+
return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
1275
|
+
},
|
|
1276
|
+
enumerable: false,
|
|
1277
|
+
configurable: true
|
|
1278
|
+
});
|
|
1414
1279
|
Subject.prototype._trySubscribe = function (subscriber) {
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
}
|
|
1418
|
-
else {
|
|
1419
|
-
return _super.prototype._trySubscribe.call(this, subscriber);
|
|
1420
|
-
}
|
|
1280
|
+
this._throwIfClosed();
|
|
1281
|
+
return _super.prototype._trySubscribe.call(this, subscriber);
|
|
1421
1282
|
};
|
|
1422
1283
|
Subject.prototype._subscribe = function (subscriber) {
|
|
1423
|
-
|
|
1424
|
-
|
|
1284
|
+
this._throwIfClosed();
|
|
1285
|
+
this._checkFinalizedStatuses(subscriber);
|
|
1286
|
+
return this._innerSubscribe(subscriber);
|
|
1287
|
+
};
|
|
1288
|
+
Subject.prototype._innerSubscribe = function (subscriber) {
|
|
1289
|
+
var _this = this;
|
|
1290
|
+
var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;
|
|
1291
|
+
if (hasError || isStopped) {
|
|
1292
|
+
return EMPTY_SUBSCRIPTION;
|
|
1425
1293
|
}
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1294
|
+
this.currentObservers = null;
|
|
1295
|
+
observers.push(subscriber);
|
|
1296
|
+
return new Subscription$1(function () {
|
|
1297
|
+
_this.currentObservers = null;
|
|
1298
|
+
arrRemove(observers, subscriber);
|
|
1299
|
+
});
|
|
1300
|
+
};
|
|
1301
|
+
Subject.prototype._checkFinalizedStatuses = function (subscriber) {
|
|
1302
|
+
var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;
|
|
1303
|
+
if (hasError) {
|
|
1304
|
+
subscriber.error(thrownError);
|
|
1429
1305
|
}
|
|
1430
|
-
else if (
|
|
1306
|
+
else if (isStopped) {
|
|
1431
1307
|
subscriber.complete();
|
|
1432
|
-
return Subscription$1.EMPTY;
|
|
1433
|
-
}
|
|
1434
|
-
else {
|
|
1435
|
-
this.observers.push(subscriber);
|
|
1436
|
-
return new SubjectSubscription(this, subscriber);
|
|
1437
1308
|
}
|
|
1438
1309
|
};
|
|
1439
1310
|
Subject.prototype.asObservable = function () {
|
|
@@ -1446,8 +1317,8 @@ var Subject = /*@__PURE__*/ (function (_super) {
|
|
|
1446
1317
|
};
|
|
1447
1318
|
return Subject;
|
|
1448
1319
|
}(Observable));
|
|
1449
|
-
var AnonymousSubject =
|
|
1450
|
-
|
|
1320
|
+
var AnonymousSubject = (function (_super) {
|
|
1321
|
+
tslib.__extends(AnonymousSubject, _super);
|
|
1451
1322
|
function AnonymousSubject(destination, source) {
|
|
1452
1323
|
var _this = _super.call(this) || this;
|
|
1453
1324
|
_this.destination = destination;
|
|
@@ -1455,31 +1326,20 @@ var AnonymousSubject = /*@__PURE__*/ (function (_super) {
|
|
|
1455
1326
|
return _this;
|
|
1456
1327
|
}
|
|
1457
1328
|
AnonymousSubject.prototype.next = function (value) {
|
|
1458
|
-
var
|
|
1459
|
-
|
|
1460
|
-
destination.next(value);
|
|
1461
|
-
}
|
|
1329
|
+
var _a, _b;
|
|
1330
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
1462
1331
|
};
|
|
1463
1332
|
AnonymousSubject.prototype.error = function (err) {
|
|
1464
|
-
var
|
|
1465
|
-
|
|
1466
|
-
this.destination.error(err);
|
|
1467
|
-
}
|
|
1333
|
+
var _a, _b;
|
|
1334
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);
|
|
1468
1335
|
};
|
|
1469
1336
|
AnonymousSubject.prototype.complete = function () {
|
|
1470
|
-
var
|
|
1471
|
-
|
|
1472
|
-
this.destination.complete();
|
|
1473
|
-
}
|
|
1337
|
+
var _a, _b;
|
|
1338
|
+
(_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
1474
1339
|
};
|
|
1475
1340
|
AnonymousSubject.prototype._subscribe = function (subscriber) {
|
|
1476
|
-
var
|
|
1477
|
-
|
|
1478
|
-
return this.source.subscribe(subscriber);
|
|
1479
|
-
}
|
|
1480
|
-
else {
|
|
1481
|
-
return Subscription$1.EMPTY;
|
|
1482
|
-
}
|
|
1341
|
+
var _a, _b;
|
|
1342
|
+
return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;
|
|
1483
1343
|
};
|
|
1484
1344
|
return AnonymousSubject;
|
|
1485
1345
|
}(Subject));
|
|
@@ -2028,9 +1888,9 @@ class User extends BaseModel {
|
|
|
2028
1888
|
return ['id'];
|
|
2029
1889
|
}
|
|
2030
1890
|
}
|
|
2031
|
-
|
|
1891
|
+
tslib.__decorate([
|
|
2032
1892
|
classTransformer.Type(() => BeautyProfile),
|
|
2033
|
-
|
|
1893
|
+
tslib.__metadata("design:type", BeautyProfile)
|
|
2034
1894
|
], User.prototype, "beautyProfile", void 0);
|
|
2035
1895
|
|
|
2036
1896
|
class Address extends BaseModel {
|
|
@@ -2050,33 +1910,33 @@ class Subscription extends BaseModel {
|
|
|
2050
1910
|
return ['id'];
|
|
2051
1911
|
}
|
|
2052
1912
|
}
|
|
2053
|
-
|
|
1913
|
+
tslib.__decorate([
|
|
2054
1914
|
classTransformer.Type(() => User),
|
|
2055
|
-
|
|
1915
|
+
tslib.__metadata("design:type", User)
|
|
2056
1916
|
], Subscription.prototype, "user", void 0);
|
|
2057
|
-
|
|
1917
|
+
tslib.__decorate([
|
|
2058
1918
|
classTransformer.Type(() => SubscriptionPlan),
|
|
2059
|
-
|
|
1919
|
+
tslib.__metadata("design:type", SubscriptionPlan)
|
|
2060
1920
|
], Subscription.prototype, "subscriptionPlan", void 0);
|
|
2061
|
-
|
|
1921
|
+
tslib.__decorate([
|
|
2062
1922
|
classTransformer.Type(() => UserAddress),
|
|
2063
|
-
|
|
1923
|
+
tslib.__metadata("design:type", UserAddress)
|
|
2064
1924
|
], Subscription.prototype, "shippingAddress", void 0);
|
|
2065
|
-
|
|
1925
|
+
tslib.__decorate([
|
|
2066
1926
|
classTransformer.Type(() => UserAddress),
|
|
2067
|
-
|
|
1927
|
+
tslib.__metadata("design:type", UserAddress)
|
|
2068
1928
|
], Subscription.prototype, "billingAddress", void 0);
|
|
2069
|
-
|
|
1929
|
+
tslib.__decorate([
|
|
2070
1930
|
classTransformer.Type(() => Coupon),
|
|
2071
|
-
|
|
1931
|
+
tslib.__metadata("design:type", Coupon)
|
|
2072
1932
|
], Subscription.prototype, "coupon", void 0);
|
|
2073
|
-
|
|
1933
|
+
tslib.__decorate([
|
|
2074
1934
|
classTransformer.Type(() => Edition),
|
|
2075
|
-
|
|
1935
|
+
tslib.__metadata("design:type", Array)
|
|
2076
1936
|
], Subscription.prototype, "editions", void 0);
|
|
2077
|
-
|
|
1937
|
+
tslib.__decorate([
|
|
2078
1938
|
classTransformer.Type(() => SubscriptionPayment),
|
|
2079
|
-
|
|
1939
|
+
tslib.__metadata("design:type", Array)
|
|
2080
1940
|
], Subscription.prototype, "payment", void 0);
|
|
2081
1941
|
|
|
2082
1942
|
class SubscriptionMaterialization extends BaseModel {
|
|
@@ -2084,33 +1944,33 @@ class SubscriptionMaterialization extends BaseModel {
|
|
|
2084
1944
|
return ['id'];
|
|
2085
1945
|
}
|
|
2086
1946
|
}
|
|
2087
|
-
|
|
1947
|
+
tslib.__decorate([
|
|
2088
1948
|
classTransformer.Type(() => User),
|
|
2089
|
-
|
|
1949
|
+
tslib.__metadata("design:type", User)
|
|
2090
1950
|
], SubscriptionMaterialization.prototype, "user", void 0);
|
|
2091
|
-
|
|
1951
|
+
tslib.__decorate([
|
|
2092
1952
|
classTransformer.Type(() => SubscriptionPlan),
|
|
2093
|
-
|
|
1953
|
+
tslib.__metadata("design:type", SubscriptionPlan)
|
|
2094
1954
|
], SubscriptionMaterialization.prototype, "subscriptionPlan", void 0);
|
|
2095
|
-
|
|
1955
|
+
tslib.__decorate([
|
|
2096
1956
|
classTransformer.Type(() => UserAddress),
|
|
2097
|
-
|
|
1957
|
+
tslib.__metadata("design:type", UserAddress)
|
|
2098
1958
|
], SubscriptionMaterialization.prototype, "shippingAddress", void 0);
|
|
2099
|
-
|
|
1959
|
+
tslib.__decorate([
|
|
2100
1960
|
classTransformer.Type(() => UserAddress),
|
|
2101
|
-
|
|
1961
|
+
tslib.__metadata("design:type", UserAddress)
|
|
2102
1962
|
], SubscriptionMaterialization.prototype, "billingAddress", void 0);
|
|
2103
|
-
|
|
1963
|
+
tslib.__decorate([
|
|
2104
1964
|
classTransformer.Type(() => Coupon),
|
|
2105
|
-
|
|
1965
|
+
tslib.__metadata("design:type", Coupon)
|
|
2106
1966
|
], SubscriptionMaterialization.prototype, "coupon", void 0);
|
|
2107
|
-
|
|
1967
|
+
tslib.__decorate([
|
|
2108
1968
|
classTransformer.Type(() => Edition),
|
|
2109
|
-
|
|
1969
|
+
tslib.__metadata("design:type", Array)
|
|
2110
1970
|
], SubscriptionMaterialization.prototype, "editions", void 0);
|
|
2111
|
-
|
|
1971
|
+
tslib.__decorate([
|
|
2112
1972
|
classTransformer.Type(() => SubscriptionPayment),
|
|
2113
|
-
|
|
1973
|
+
tslib.__metadata("design:type", SubscriptionPayment)
|
|
2114
1974
|
], SubscriptionMaterialization.prototype, "payment", void 0);
|
|
2115
1975
|
|
|
2116
1976
|
class SubscriptionSummary extends BaseModel {
|
|
@@ -2259,29 +2119,29 @@ class Checkout extends BaseModel {
|
|
|
2259
2119
|
return ['id'];
|
|
2260
2120
|
}
|
|
2261
2121
|
}
|
|
2262
|
-
|
|
2122
|
+
tslib.__decorate([
|
|
2263
2123
|
classTransformer.Type(() => LineItem),
|
|
2264
|
-
|
|
2124
|
+
tslib.__metadata("design:type", Array)
|
|
2265
2125
|
], Checkout.prototype, "lineItems", void 0);
|
|
2266
|
-
|
|
2126
|
+
tslib.__decorate([
|
|
2267
2127
|
classTransformer.Type(() => User),
|
|
2268
|
-
|
|
2128
|
+
tslib.__metadata("design:type", User)
|
|
2269
2129
|
], Checkout.prototype, "user", void 0);
|
|
2270
|
-
|
|
2130
|
+
tslib.__decorate([
|
|
2271
2131
|
classTransformer.Type(() => UserAddress),
|
|
2272
|
-
|
|
2132
|
+
tslib.__metadata("design:type", UserAddress)
|
|
2273
2133
|
], Checkout.prototype, "shippingAddress", void 0);
|
|
2274
|
-
|
|
2134
|
+
tslib.__decorate([
|
|
2275
2135
|
classTransformer.Type(() => UserAddress),
|
|
2276
|
-
|
|
2136
|
+
tslib.__metadata("design:type", UserAddress)
|
|
2277
2137
|
], Checkout.prototype, "billingAddress", void 0);
|
|
2278
|
-
|
|
2138
|
+
tslib.__decorate([
|
|
2279
2139
|
classTransformer.Type(() => ShippingMethod),
|
|
2280
|
-
|
|
2140
|
+
tslib.__metadata("design:type", ShippingMethod)
|
|
2281
2141
|
], Checkout.prototype, "shipping", void 0);
|
|
2282
|
-
|
|
2142
|
+
tslib.__decorate([
|
|
2283
2143
|
classTransformer.Type(() => Coupon),
|
|
2284
|
-
|
|
2144
|
+
tslib.__metadata("design:type", Coupon)
|
|
2285
2145
|
], Checkout.prototype, "coupon", void 0);
|
|
2286
2146
|
|
|
2287
2147
|
exports.OrderStatus = void 0;
|
|
@@ -2298,9 +2158,9 @@ exports.OrderStatus = void 0;
|
|
|
2298
2158
|
|
|
2299
2159
|
class Order extends Checkout {
|
|
2300
2160
|
}
|
|
2301
|
-
|
|
2161
|
+
tslib.__decorate([
|
|
2302
2162
|
classTransformer.Type(() => Payment),
|
|
2303
|
-
|
|
2163
|
+
tslib.__metadata("design:type", Payment)
|
|
2304
2164
|
], Order.prototype, "payment", void 0);
|
|
2305
2165
|
|
|
2306
2166
|
class CheckoutSubscription extends BaseModel {
|
|
@@ -2308,21 +2168,21 @@ class CheckoutSubscription extends BaseModel {
|
|
|
2308
2168
|
return ['id'];
|
|
2309
2169
|
}
|
|
2310
2170
|
}
|
|
2311
|
-
|
|
2171
|
+
tslib.__decorate([
|
|
2312
2172
|
classTransformer.Type(() => UserAddress),
|
|
2313
|
-
|
|
2173
|
+
tslib.__metadata("design:type", UserAddress)
|
|
2314
2174
|
], CheckoutSubscription.prototype, "shippingAddress", void 0);
|
|
2315
|
-
|
|
2175
|
+
tslib.__decorate([
|
|
2316
2176
|
classTransformer.Type(() => UserAddress),
|
|
2317
|
-
|
|
2177
|
+
tslib.__metadata("design:type", UserAddress)
|
|
2318
2178
|
], CheckoutSubscription.prototype, "billingAddress", void 0);
|
|
2319
|
-
|
|
2179
|
+
tslib.__decorate([
|
|
2320
2180
|
classTransformer.Type(() => SubscriptionPlan),
|
|
2321
|
-
|
|
2181
|
+
tslib.__metadata("design:type", SubscriptionPlan)
|
|
2322
2182
|
], CheckoutSubscription.prototype, "subscriptionPlan", void 0);
|
|
2323
|
-
|
|
2183
|
+
tslib.__decorate([
|
|
2324
2184
|
classTransformer.Type(() => Coupon),
|
|
2325
|
-
|
|
2185
|
+
tslib.__metadata("design:type", Coupon)
|
|
2326
2186
|
], CheckoutSubscription.prototype, "coupon", void 0);
|
|
2327
2187
|
|
|
2328
2188
|
class RoundProductPricesHelper {
|
|
@@ -2698,7 +2558,7 @@ class ProductsIndex {
|
|
|
2698
2558
|
}
|
|
2699
2559
|
async save(product) {
|
|
2700
2560
|
try {
|
|
2701
|
-
const _a = product.toPlain(), { createdAt, updatedAt, kitProducts } = _a, data =
|
|
2561
|
+
const _a = product.toPlain(), { createdAt, updatedAt, kitProducts } = _a, data = tslib.__rest(_a, ["createdAt", "updatedAt", "kitProducts"]);
|
|
2702
2562
|
const newProduct = Product.toInstance(data);
|
|
2703
2563
|
this.adapter.save(this.index, newProduct);
|
|
2704
2564
|
}
|
|
@@ -3351,17 +3211,17 @@ class UserFirestoreRepository extends withCrudFirestore(withHelpers(withFirestor
|
|
|
3351
3211
|
};
|
|
3352
3212
|
}
|
|
3353
3213
|
}
|
|
3354
|
-
|
|
3214
|
+
tslib.__decorate([
|
|
3355
3215
|
Log(),
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3216
|
+
tslib.__metadata("design:type", Function),
|
|
3217
|
+
tslib.__metadata("design:paramtypes", [Object]),
|
|
3218
|
+
tslib.__metadata("design:returntype", Promise)
|
|
3359
3219
|
], UserFirestoreRepository.prototype, "get", null);
|
|
3360
|
-
|
|
3220
|
+
tslib.__decorate([
|
|
3361
3221
|
Log(),
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3222
|
+
tslib.__metadata("design:type", Function),
|
|
3223
|
+
tslib.__metadata("design:paramtypes", [String, String]),
|
|
3224
|
+
tslib.__metadata("design:returntype", Promise)
|
|
3365
3225
|
], UserFirestoreRepository.prototype, "checkIfExistsByField", null);
|
|
3366
3226
|
|
|
3367
3227
|
class UserPaymentMethodFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base)))) {
|
|
@@ -3447,23 +3307,23 @@ class CategoryFirestoreRepository extends withCrudFirestore(withHelpers(withFire
|
|
|
3447
3307
|
return;
|
|
3448
3308
|
}
|
|
3449
3309
|
}
|
|
3450
|
-
|
|
3310
|
+
tslib.__decorate([
|
|
3451
3311
|
Log(),
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3312
|
+
tslib.__metadata("design:type", Function),
|
|
3313
|
+
tslib.__metadata("design:paramtypes", [String, String]),
|
|
3314
|
+
tslib.__metadata("design:returntype", Promise)
|
|
3455
3315
|
], CategoryFirestoreRepository.prototype, "getCategoryBySlug", null);
|
|
3456
|
-
|
|
3316
|
+
tslib.__decorate([
|
|
3457
3317
|
Log(),
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3318
|
+
tslib.__metadata("design:type", Function),
|
|
3319
|
+
tslib.__metadata("design:paramtypes", [Array, Object, String]),
|
|
3320
|
+
tslib.__metadata("design:returntype", Promise)
|
|
3461
3321
|
], CategoryFirestoreRepository.prototype, "getCategoriesForHome", null);
|
|
3462
|
-
|
|
3322
|
+
tslib.__decorate([
|
|
3463
3323
|
Log(),
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3324
|
+
tslib.__metadata("design:type", Function),
|
|
3325
|
+
tslib.__metadata("design:paramtypes", [Category, Object]),
|
|
3326
|
+
tslib.__metadata("design:returntype", Promise)
|
|
3467
3327
|
], CategoryFirestoreRepository.prototype, "mountCategory", null);
|
|
3468
3328
|
|
|
3469
3329
|
class ProductFirestoreRepository extends withCrudFirestore(withHelpers(withFirestore(Base))) {
|
|
@@ -3524,17 +3384,17 @@ class ProductFirestoreRepository extends withCrudFirestore(withHelpers(withFires
|
|
|
3524
3384
|
return Promise.resolve([]);
|
|
3525
3385
|
}
|
|
3526
3386
|
}
|
|
3527
|
-
|
|
3387
|
+
tslib.__decorate([
|
|
3528
3388
|
Log(),
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3389
|
+
tslib.__metadata("design:type", Function),
|
|
3390
|
+
tslib.__metadata("design:paramtypes", [String]),
|
|
3391
|
+
tslib.__metadata("design:returntype", Promise)
|
|
3532
3392
|
], ProductFirestoreRepository.prototype, "getBySlug", null);
|
|
3533
|
-
|
|
3393
|
+
tslib.__decorate([
|
|
3534
3394
|
Log(),
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3395
|
+
tslib.__metadata("design:type", Function),
|
|
3396
|
+
tslib.__metadata("design:paramtypes", [String]),
|
|
3397
|
+
tslib.__metadata("design:returntype", Promise)
|
|
3538
3398
|
], ProductFirestoreRepository.prototype, "fetchReviews", null);
|
|
3539
3399
|
|
|
3540
3400
|
class ProductVariantFirestoreRepository extends withSubCollection(withCrudFirestore(withHelpers(withFirestore(Base)))) {
|
|
@@ -4632,20 +4492,20 @@ class CategoryHasuraGraphQL extends Category {
|
|
|
4632
4492
|
|
|
4633
4493
|
class ProductHasuraGraphQL extends Product {
|
|
4634
4494
|
}
|
|
4635
|
-
|
|
4495
|
+
tslib.__decorate([
|
|
4636
4496
|
classTransformer.Type(() => KitProductHasuraGraphQL),
|
|
4637
|
-
|
|
4497
|
+
tslib.__metadata("design:type", Array)
|
|
4638
4498
|
], ProductHasuraGraphQL.prototype, "kitProducts", void 0);
|
|
4639
4499
|
|
|
4640
4500
|
class KitProductHasuraGraphQL extends KitProduct {
|
|
4641
4501
|
}
|
|
4642
|
-
|
|
4502
|
+
tslib.__decorate([
|
|
4643
4503
|
classTransformer.Type(() => ProductHasuraGraphQL),
|
|
4644
|
-
|
|
4504
|
+
tslib.__metadata("design:type", ProductHasuraGraphQL)
|
|
4645
4505
|
], KitProductHasuraGraphQL.prototype, "kit", void 0);
|
|
4646
|
-
|
|
4506
|
+
tslib.__decorate([
|
|
4647
4507
|
classTransformer.Type(() => ProductHasuraGraphQL),
|
|
4648
|
-
|
|
4508
|
+
tslib.__metadata("design:type", ProductHasuraGraphQL)
|
|
4649
4509
|
], KitProductHasuraGraphQL.prototype, "product", void 0);
|
|
4650
4510
|
|
|
4651
4511
|
class VariantHasuraGraphQL extends Variant {
|
|
@@ -4795,17 +4655,17 @@ class CategoryFilterHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHa
|
|
|
4795
4655
|
});
|
|
4796
4656
|
}
|
|
4797
4657
|
}
|
|
4798
|
-
|
|
4658
|
+
tslib.__decorate([
|
|
4799
4659
|
Log(),
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4660
|
+
tslib.__metadata("design:type", Function),
|
|
4661
|
+
tslib.__metadata("design:paramtypes", [Number]),
|
|
4662
|
+
tslib.__metadata("design:returntype", Promise)
|
|
4803
4663
|
], CategoryFilterHasuraGraphQLRepository.prototype, "deleteByCategory", null);
|
|
4804
|
-
|
|
4664
|
+
tslib.__decorate([
|
|
4805
4665
|
Log(),
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4666
|
+
tslib.__metadata("design:type", Function),
|
|
4667
|
+
tslib.__metadata("design:paramtypes", [Number, Number]),
|
|
4668
|
+
tslib.__metadata("design:returntype", Promise)
|
|
4809
4669
|
], CategoryFilterHasuraGraphQLRepository.prototype, "deleteByCategoryAndFilter", null);
|
|
4810
4670
|
|
|
4811
4671
|
class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
@@ -4903,7 +4763,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
4903
4763
|
this.categoryFilterRepository = categoryFilterRepository;
|
|
4904
4764
|
}
|
|
4905
4765
|
async create(params) {
|
|
4906
|
-
const { metadata } = params, data =
|
|
4766
|
+
const { metadata } = params, data = tslib.__rest(params, ["metadata"]);
|
|
4907
4767
|
return super.create(Object.assign(Object.assign({}, data), { isWishlist: false, metadata: metadata || { description: null, title: null } }));
|
|
4908
4768
|
}
|
|
4909
4769
|
async get(identifiers) {
|
|
@@ -4913,7 +4773,7 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
4913
4773
|
: super.get(identifiers);
|
|
4914
4774
|
}
|
|
4915
4775
|
async update(params) {
|
|
4916
|
-
const { products, id: checkId, metadata, filters } = params, data =
|
|
4776
|
+
const { products, id: checkId, metadata, filters } = params, data = tslib.__rest(params, ["products", "id", "metadata", "filters"]);
|
|
4917
4777
|
const plainData = this.paramsToPlain({ id: checkId });
|
|
4918
4778
|
const id = await this.getId(plainData.id);
|
|
4919
4779
|
const category = await super.update(Object.assign(Object.assign({ id }, data), { isWishlist: false }));
|
|
@@ -5157,41 +5017,41 @@ class CategoryHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
5157
5017
|
}
|
|
5158
5018
|
}
|
|
5159
5019
|
}
|
|
5160
|
-
|
|
5020
|
+
tslib.__decorate([
|
|
5161
5021
|
Log(),
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5022
|
+
tslib.__metadata("design:type", Function),
|
|
5023
|
+
tslib.__metadata("design:paramtypes", [String, String]),
|
|
5024
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5165
5025
|
], CategoryHasuraGraphQLRepository.prototype, "getCategoryBySlug", null);
|
|
5166
|
-
|
|
5026
|
+
tslib.__decorate([
|
|
5167
5027
|
Log(),
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5028
|
+
tslib.__metadata("design:type", Function),
|
|
5029
|
+
tslib.__metadata("design:paramtypes", [String]),
|
|
5030
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5171
5031
|
], CategoryHasuraGraphQLRepository.prototype, "getCategoryByShop", null);
|
|
5172
|
-
|
|
5032
|
+
tslib.__decorate([
|
|
5173
5033
|
Log(),
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5034
|
+
tslib.__metadata("design:type", Function),
|
|
5035
|
+
tslib.__metadata("design:paramtypes", [Array, Object, String]),
|
|
5036
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5177
5037
|
], CategoryHasuraGraphQLRepository.prototype, "getCategoriesForHome", null);
|
|
5178
|
-
|
|
5038
|
+
tslib.__decorate([
|
|
5179
5039
|
Log(),
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5040
|
+
tslib.__metadata("design:type", Function),
|
|
5041
|
+
tslib.__metadata("design:paramtypes", [Category, Object]),
|
|
5042
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5183
5043
|
], CategoryHasuraGraphQLRepository.prototype, "mountCategory", null);
|
|
5184
|
-
|
|
5044
|
+
tslib.__decorate([
|
|
5185
5045
|
Log(),
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5046
|
+
tslib.__metadata("design:type", Function),
|
|
5047
|
+
tslib.__metadata("design:paramtypes", [Number]),
|
|
5048
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5189
5049
|
], CategoryHasuraGraphQLRepository.prototype, "getChildren", null);
|
|
5190
|
-
|
|
5050
|
+
tslib.__decorate([
|
|
5191
5051
|
Log(),
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5052
|
+
tslib.__metadata("design:type", Function),
|
|
5053
|
+
tslib.__metadata("design:paramtypes", [Number, Number]),
|
|
5054
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5195
5055
|
], CategoryHasuraGraphQLRepository.prototype, "isChild", null);
|
|
5196
5056
|
|
|
5197
5057
|
class FilterHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
@@ -5228,7 +5088,7 @@ class FilterHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGrap
|
|
|
5228
5088
|
this.categoryFilterRepository = categoryFilterRepository;
|
|
5229
5089
|
}
|
|
5230
5090
|
async update(params) {
|
|
5231
|
-
const { options } = params, data =
|
|
5091
|
+
const { options } = params, data = tslib.__rest(params, ["options"]);
|
|
5232
5092
|
const filter = await super.update(data);
|
|
5233
5093
|
filter.options = await this.updateOptions(+data.id, { options });
|
|
5234
5094
|
return filter;
|
|
@@ -5295,17 +5155,17 @@ class FilterHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGrap
|
|
|
5295
5155
|
});
|
|
5296
5156
|
}
|
|
5297
5157
|
}
|
|
5298
|
-
|
|
5158
|
+
tslib.__decorate([
|
|
5299
5159
|
Log(),
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5160
|
+
tslib.__metadata("design:type", Function),
|
|
5161
|
+
tslib.__metadata("design:paramtypes", [Number, Object]),
|
|
5162
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5303
5163
|
], FilterHasuraGraphQLRepository.prototype, "updateOptions", null);
|
|
5304
|
-
|
|
5164
|
+
tslib.__decorate([
|
|
5305
5165
|
Log(),
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5166
|
+
tslib.__metadata("design:type", Function),
|
|
5167
|
+
tslib.__metadata("design:paramtypes", [Number]),
|
|
5168
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5309
5169
|
], FilterHasuraGraphQLRepository.prototype, "deleteOptions", null);
|
|
5310
5170
|
|
|
5311
5171
|
class FilterOptionHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
@@ -5524,7 +5384,7 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
5524
5384
|
];
|
|
5525
5385
|
}
|
|
5526
5386
|
async create(params) {
|
|
5527
|
-
const { metadata } = params, data =
|
|
5387
|
+
const { metadata } = params, data = tslib.__rest(params, ["metadata"]);
|
|
5528
5388
|
const product = await super.create(lodash.omit(Object.assign(Object.assign({}, data), { metadata: metadata || { description: null, title: null } }), ['reviews']));
|
|
5529
5389
|
try {
|
|
5530
5390
|
product.reviews = data.reviews && (await this.updateReviews(+product.id, data));
|
|
@@ -5547,7 +5407,7 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
5547
5407
|
}
|
|
5548
5408
|
async find(params) {
|
|
5549
5409
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
5550
|
-
const _o = params || {}, { filters, fields } = _o, options =
|
|
5410
|
+
const _o = params || {}, { filters, fields } = _o, options = tslib.__rest(_o, ["filters", "fields"]);
|
|
5551
5411
|
const bindFields = fields ||
|
|
5552
5412
|
this.fields
|
|
5553
5413
|
.map((field) => (typeof field === 'string' ? field : Object.keys(field).shift()))
|
|
@@ -5585,7 +5445,7 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
5585
5445
|
return product;
|
|
5586
5446
|
}
|
|
5587
5447
|
async update(params) {
|
|
5588
|
-
const { categories, kitProducts, reviews, id: checkId, rate, metadata } = params, data =
|
|
5448
|
+
const { categories, kitProducts, reviews, id: checkId, rate, metadata } = params, data = tslib.__rest(params, ["categories", "kitProducts", "reviews", "id", "rate", "metadata"]);
|
|
5589
5449
|
const plainData = this.paramsToPlain({ id: checkId });
|
|
5590
5450
|
const id = await this.getId(plainData.id);
|
|
5591
5451
|
const product = await super.update(Object.assign({ id }, data));
|
|
@@ -5821,35 +5681,35 @@ class ProductHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
5821
5681
|
return data && data[0] && this.bindReviewToModel(data[0]);
|
|
5822
5682
|
}
|
|
5823
5683
|
}
|
|
5824
|
-
|
|
5684
|
+
tslib.__decorate([
|
|
5825
5685
|
Log(),
|
|
5826
|
-
|
|
5827
|
-
|
|
5828
|
-
|
|
5686
|
+
tslib.__metadata("design:type", Function),
|
|
5687
|
+
tslib.__metadata("design:paramtypes", [String]),
|
|
5688
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5829
5689
|
], ProductHasuraGraphQLRepository.prototype, "getBySlug", null);
|
|
5830
|
-
|
|
5690
|
+
tslib.__decorate([
|
|
5831
5691
|
Log(),
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5692
|
+
tslib.__metadata("design:type", Function),
|
|
5693
|
+
tslib.__metadata("design:paramtypes", []),
|
|
5694
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5835
5695
|
], ProductHasuraGraphQLRepository.prototype, "fetchProductReviews", null);
|
|
5836
|
-
|
|
5696
|
+
tslib.__decorate([
|
|
5837
5697
|
Log(),
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5698
|
+
tslib.__metadata("design:type", Function),
|
|
5699
|
+
tslib.__metadata("design:paramtypes", [String]),
|
|
5700
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5841
5701
|
], ProductHasuraGraphQLRepository.prototype, "fetchReviews", null);
|
|
5842
|
-
|
|
5702
|
+
tslib.__decorate([
|
|
5843
5703
|
Log(),
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5704
|
+
tslib.__metadata("design:type", Function),
|
|
5705
|
+
tslib.__metadata("design:paramtypes", [Object, Object]),
|
|
5706
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5847
5707
|
], ProductHasuraGraphQLRepository.prototype, "findCatalog", null);
|
|
5848
|
-
|
|
5708
|
+
tslib.__decorate([
|
|
5849
5709
|
Log(),
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5710
|
+
tslib.__metadata("design:type", Function),
|
|
5711
|
+
tslib.__metadata("design:paramtypes", [Array]),
|
|
5712
|
+
tslib.__metadata("design:returntype", Promise)
|
|
5853
5713
|
], ProductHasuraGraphQLRepository.prototype, "cleanShoppingCountFromIds", null);
|
|
5854
5714
|
|
|
5855
5715
|
class ProductReviewsHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
@@ -5886,17 +5746,17 @@ class ProductReviewsHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHa
|
|
|
5886
5746
|
return this.update({ id, status: false });
|
|
5887
5747
|
}
|
|
5888
5748
|
}
|
|
5889
|
-
|
|
5749
|
+
tslib.__decorate([
|
|
5890
5750
|
Log(),
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5751
|
+
tslib.__metadata("design:type", Function),
|
|
5752
|
+
tslib.__metadata("design:paramtypes", [Number]),
|
|
5753
|
+
tslib.__metadata("design:returntype", void 0)
|
|
5894
5754
|
], ProductReviewsHasuraGraphQLRepository.prototype, "aproveReview", null);
|
|
5895
|
-
|
|
5755
|
+
tslib.__decorate([
|
|
5896
5756
|
Log(),
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5757
|
+
tslib.__metadata("design:type", Function),
|
|
5758
|
+
tslib.__metadata("design:paramtypes", [Number]),
|
|
5759
|
+
tslib.__metadata("design:returntype", void 0)
|
|
5900
5760
|
], ProductReviewsHasuraGraphQLRepository.prototype, "disaproveReview", null);
|
|
5901
5761
|
|
|
5902
5762
|
class ProductStockNotificationHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGraphQL(Base)) {
|
|
@@ -6013,11 +5873,11 @@ class VariantHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGra
|
|
|
6013
5873
|
return variant;
|
|
6014
5874
|
}
|
|
6015
5875
|
async find(params) {
|
|
6016
|
-
const _a = params || {}, { filters } = _a, options =
|
|
5876
|
+
const _a = params || {}, { filters } = _a, options = tslib.__rest(_a, ["filters"]);
|
|
6017
5877
|
return super.find(Object.assign(Object.assign({}, options), { filters: Object.assign({ productId: { operator: exports.Where.ISNOTNULL } }, filters) }));
|
|
6018
5878
|
}
|
|
6019
5879
|
async update(params) {
|
|
6020
|
-
const { productId, id: checkId } = params, data =
|
|
5880
|
+
const { productId, id: checkId } = params, data = tslib.__rest(params, ["productId", "id"]);
|
|
6021
5881
|
const dataWithProductId = this.paramsToPlain({ id: checkId, productId });
|
|
6022
5882
|
const id = await this.getId(dataWithProductId.id);
|
|
6023
5883
|
const product = await super.update(Object.assign({ id }, data));
|
|
@@ -6127,7 +5987,7 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
6127
5987
|
this.categoryFilterRepository = categoryFilterRepository;
|
|
6128
5988
|
}
|
|
6129
5989
|
async create(params) {
|
|
6130
|
-
const { metadata } = params, data =
|
|
5990
|
+
const { metadata } = params, data = tslib.__rest(params, ["metadata"]);
|
|
6131
5991
|
return super.create(Object.assign(Object.assign({}, data), { isWishlist: true, isCollection: true, brandCategory: false, metadata: metadata || { description: data.description, title: data.name } }));
|
|
6132
5992
|
}
|
|
6133
5993
|
async get(identifiers) {
|
|
@@ -6137,11 +5997,11 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
6137
5997
|
return data;
|
|
6138
5998
|
}
|
|
6139
5999
|
async find(params) {
|
|
6140
|
-
const { filters } = params, rest =
|
|
6000
|
+
const { filters } = params, rest = tslib.__rest(params, ["filters"]);
|
|
6141
6001
|
return await super.find(Object.assign(Object.assign({}, rest), { filters: Object.assign(Object.assign({}, filters), { isWishlist: { operator: exports.Where.EQUALS, value: true } }) }));
|
|
6142
6002
|
}
|
|
6143
6003
|
async update(params) {
|
|
6144
|
-
const { products, id: checkId, metadata, filters } = params, data =
|
|
6004
|
+
const { products, id: checkId, metadata, filters } = params, data = tslib.__rest(params, ["products", "id", "metadata", "filters"]);
|
|
6145
6005
|
const plainData = this.paramsToPlain({ id: checkId });
|
|
6146
6006
|
const id = plainData.id;
|
|
6147
6007
|
const category = await super.update(Object.assign(Object.assign({ id }, data), { isWishlist: true, isCollection: true, brandCategory: false }));
|
|
@@ -6270,23 +6130,23 @@ class WishlistHasuraGraphQLRepository extends withCrudHasuraGraphQL(withHasuraGr
|
|
|
6270
6130
|
return plainData.metadata;
|
|
6271
6131
|
}
|
|
6272
6132
|
}
|
|
6273
|
-
|
|
6133
|
+
tslib.__decorate([
|
|
6274
6134
|
Log(),
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6135
|
+
tslib.__metadata("design:type", Function),
|
|
6136
|
+
tslib.__metadata("design:paramtypes", [String]),
|
|
6137
|
+
tslib.__metadata("design:returntype", Promise)
|
|
6278
6138
|
], WishlistHasuraGraphQLRepository.prototype, "getWishlistBySlug", null);
|
|
6279
|
-
|
|
6139
|
+
tslib.__decorate([
|
|
6280
6140
|
Log(),
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6141
|
+
tslib.__metadata("design:type", Function),
|
|
6142
|
+
tslib.__metadata("design:paramtypes", [String]),
|
|
6143
|
+
tslib.__metadata("design:returntype", Promise)
|
|
6284
6144
|
], WishlistHasuraGraphQLRepository.prototype, "getWishlistByPerson", null);
|
|
6285
|
-
|
|
6145
|
+
tslib.__decorate([
|
|
6286
6146
|
Log(),
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6147
|
+
tslib.__metadata("design:type", Function),
|
|
6148
|
+
tslib.__metadata("design:paramtypes", [String]),
|
|
6149
|
+
tslib.__metadata("design:returntype", Promise)
|
|
6290
6150
|
], WishlistHasuraGraphQLRepository.prototype, "getCategoryByShop", null);
|
|
6291
6151
|
|
|
6292
6152
|
Object.defineProperty(exports, 'add', {
|