@sellout/models 0.0.75 → 0.0.77

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 (84) hide show
  1. package/.dist/enums/OrderChannelEnum.d.ts +1 -1
  2. package/.dist/enums/OrderChannelEnum.js +1 -1
  3. package/.dist/enums/OrderChannelEnum.js.map +1 -1
  4. package/.dist/enums/PaymentMethodEnum.d.ts +5 -0
  5. package/.dist/enums/PaymentMethodEnum.js +10 -0
  6. package/.dist/enums/PaymentMethodEnum.js.map +1 -0
  7. package/.dist/graphql/fragments/order.fragment.js +2 -0
  8. package/.dist/graphql/fragments/order.fragment.js.map +1 -1
  9. package/.dist/graphql/mutations/{setUserOrgContextId.js → createStripeSetupIntent.js} +3 -5
  10. package/.dist/graphql/mutations/createStripeSetupIntent.js.map +1 -0
  11. package/.dist/graphql/mutations/listStripeTerminalReaders.mutation.js +21 -0
  12. package/.dist/graphql/mutations/listStripeTerminalReaders.mutation.js.map +1 -0
  13. package/.dist/graphql/mutations/listStripeTerminalReaders.query.d.ts +2 -0
  14. package/.dist/graphql/mutations/listStripeTerminalReaders.query.js +21 -0
  15. package/.dist/graphql/mutations/listStripeTerminalReaders.query.js.map +1 -0
  16. package/.dist/graphql/mutations/registerStripeTermainlReader.mutation.d.ts +2 -0
  17. package/.dist/graphql/mutations/registerStripeTermainlReader.mutation.js +13 -0
  18. package/.dist/graphql/mutations/registerStripeTermainlReader.mutation.js.map +1 -0
  19. package/.dist/graphql/mutations/registerStripeTerminalReader.d.ts +2 -0
  20. package/.dist/graphql/mutations/{resetPasswordInApp.mutation.js → registerStripeTerminalReader.js} +3 -3
  21. package/.dist/graphql/mutations/registerStripeTerminalReader.js.map +1 -0
  22. package/.dist/graphql/mutations/verifyPhoneAuthentication.mutation.js +15 -0
  23. package/.dist/graphql/mutations/verifyPhoneAuthentication.mutation.js.map +1 -0
  24. package/.dist/graphql/mutations/verifyUserPhoneAuthentication.js +15 -0
  25. package/.dist/graphql/mutations/verifyUserPhoneAuthentication.js.map +1 -0
  26. package/.dist/graphql/queries/metrics.query.js +29 -0
  27. package/.dist/graphql/queries/metrics.query.js.map +1 -0
  28. package/.dist/graphql/queries/metricsData.query.d.ts +2 -0
  29. package/.dist/graphql/queries/metricsData.query.js +29 -0
  30. package/.dist/graphql/queries/metricsData.query.js.map +1 -0
  31. package/.dist/graphql/queries/order.query.js +13 -0
  32. package/.dist/graphql/queries/order.query.js.map +1 -1
  33. package/.dist/graphql/queries/orders.query.js +13 -0
  34. package/.dist/graphql/queries/orders.query.js.map +1 -1
  35. package/.dist/interfaces/IMetricData.d.ts +57 -0
  36. package/.dist/interfaces/IMetricData.js +70 -0
  37. package/.dist/interfaces/IMetricData.js.map +1 -0
  38. package/.dist/interfaces/IOrder.d.ts +6 -0
  39. package/.dist/interfaces/IOrder.js +1 -0
  40. package/.dist/interfaces/IOrder.js.map +1 -1
  41. package/.dist/interfaces/IStripe.d.ts +9 -0
  42. package/.dist/interfaces/{ISecondaryEmail.js → IStripe.js} +1 -1
  43. package/.dist/interfaces/IStripe.js.map +1 -0
  44. package/.dist/interfaces/IStripeSource.d.ts +1 -1
  45. package/.dist/sellout-proto.js +31 -14
  46. package/.dist/utils/MetricsUtil.d.ts +7 -0
  47. package/.dist/utils/MetricsUtil.js +29 -0
  48. package/.dist/utils/MetricsUtil.js.map +1 -0
  49. package/.dist/utils/OrderUtil.d.ts +2 -2
  50. package/.dist/utils/OrderUtil.js +17 -80
  51. package/.dist/utils/OrderUtil.js.map +1 -1
  52. package/.dist/utils/PaymentUtil.d.ts +10 -3
  53. package/.dist/utils/PaymentUtil.js +55 -4
  54. package/.dist/utils/PaymentUtil.js.map +1 -1
  55. package/.dist/utils/fee-util-broken-but-why.d.ts +8 -0
  56. package/.dist/utils/fee-util-broken-but-why.js +38 -0
  57. package/.dist/utils/fee-util-broken-but-why.js.map +1 -0
  58. package/package.json +4 -4
  59. package/src/enums/OrderChannelEnum.ts +1 -1
  60. package/src/graphql/fragments/order.fragment.ts +2 -0
  61. package/src/graphql/queries/order.query.ts +13 -0
  62. package/src/graphql/queries/orders.query.ts +13 -0
  63. package/src/interfaces/IOrder.ts +8 -0
  64. package/src/proto/order.proto +1 -1
  65. package/src/utils/OrderUtil.ts +20 -84
  66. package/src/utils/PaymentUtil.ts +74 -4
  67. package/.dist/graphql/mutations/resetPasswordInApp.mutation.js.map +0 -1
  68. package/.dist/graphql/mutations/setUserOrgContextId.js.map +0 -1
  69. package/.dist/graphql/queries/customerProfile.js +0 -42
  70. package/.dist/graphql/queries/customerProfile.js.map +0 -1
  71. package/.dist/graphql/queries/organization.query.js +0 -49
  72. package/.dist/graphql/queries/organization.query.js.map +0 -1
  73. package/.dist/graphql/queries/organizations.js +0 -49
  74. package/.dist/graphql/queries/organizations.js.map +0 -1
  75. package/.dist/interfaces/ISecondaryEmail.d.ts +0 -4
  76. package/.dist/interfaces/ISecondaryEmail.js.map +0 -1
  77. package/.dist/schemas/SecondaryEmail.d.ts +0 -12
  78. package/.dist/schemas/SecondaryEmail.js +0 -14
  79. package/.dist/schemas/SecondaryEmail.js.map +0 -1
  80. /package/.dist/graphql/mutations/{resetPasswordInApp.mutation.d.ts → createStripeSetupIntent.d.ts} +0 -0
  81. /package/.dist/graphql/mutations/{setUserOrgContextId.d.ts → listStripeTerminalReaders.mutation.d.ts} +0 -0
  82. /package/.dist/graphql/{queries/customerProfile.d.ts → mutations/verifyPhoneAuthentication.mutation.d.ts} +0 -0
  83. /package/.dist/graphql/{queries/organization.query.d.ts → mutations/verifyUserPhoneAuthentication.d.ts} +0 -0
  84. /package/.dist/graphql/queries/{organizations.d.ts → metrics.query.d.ts} +0 -0
@@ -90,7 +90,7 @@ message Payment {
90
90
  int32 amount = 2;
91
91
  int32 transferAmount = 3;
92
92
  int32 feeAmount = 4;
93
- string feeIds = 5;
93
+ repeated string feeIds = 5;
94
94
  int32 createdAt = 6;
95
95
  string createdBy = 7;
96
96
  string promotionCode = 8;
@@ -3,6 +3,9 @@ import IOrder from "../interfaces/IOrder";
3
3
  import { OrderTypeEnum } from "../interfaces/IOrderType";
4
4
  import IOrderCustomField from '../interfaces/IOrderCustomField';
5
5
  import ICreateOrderParams from '../interfaces/ICreateOrderParams';
6
+ import IPayment from '../interfaces/IPayment';
7
+ import PaymentUtil from './PaymentUtil';
8
+ // import IFee from '../interfaces/IFee';
6
9
 
7
10
  export default {
8
11
  isComp(order) {
@@ -16,83 +19,15 @@ export default {
16
19
  /*****************************************************************************************
17
20
  Order
18
21
  *****************************************************************************************/
19
- orderTotal(order, fees) {
20
- if (order.type === OrderTypeEnum.Complimentary) return 0;
21
- if (order.type === OrderTypeEnum.RSVP) fees = [];
22
-
23
- if (
24
- (!order.tickets || !order.tickets.length)
25
- && (!order.upgrades || !order.upgrades.length)
26
- ) return 0;
27
-
28
- if (!order.tickets) order.tickets = [];
29
- if (!order.upgrades) order.upgrades = [];
30
-
31
- const ticketFees = fees.filter(f => f.appliedTo === 'Ticket');
32
- const upgradeFees = fees.filter(f => f.appliedTo === 'Upgrade');
33
- let orderFees = fees.filter(f => f.appliedTo === 'Order');
34
-
35
- function applyTicketFee(ticket, fee) {
36
- if (fee.filters && fee.filters.includes('Seated') && !ticket.seat) return 0;
37
- const noMax = fee.maxAppliedToPrice === 0;
38
- if ((fee.minAppliedToPrice <= ticket.price && ticket.price <= fee.maxAppliedToPrice) || noMax) {
39
- if (fee.type === 'Flat') {
40
- return fee.value;
41
- } if (fee.type === 'Percent') {
42
- return (ticket.price * fee.value / 100);
43
- }
44
- } else {
45
- return 0;
46
- }
47
- }
48
-
49
- function applyUpgradeFee(upgrade, fee) {
50
- const noMax = fee.maxAppliedToPrice === 0;
51
- if ((fee.minAppliedToPrice <= upgrade.price && upgrade.price <= fee.minAppliedToPrice) || noMax) {
52
- if (fee.type === 'Flat') {
53
- return fee.value;
54
- } if (fee.type === 'Percent') {
55
- return (upgrade.price * fee.value / 100);
56
- }
57
- } else {
58
- return 0;
59
- }
60
- }
61
-
62
- function applyOrderFee(orderSubtotal, fee) {
63
- if (fee.type === 'Flat') {
64
- return orderSubtotal + fee.value;
65
- } if (fee.type === 'Percent') {
66
- return (orderSubtotal / (1 - fee.value / 100));
67
- }
68
- }
69
-
70
- const ticketTotal = order.tickets.reduce((cur, ticket) => cur + ticket.price, 0);
71
-
72
- const ticketFeeTotal = order.tickets.reduce((cur, ticket) => {
73
- return cur + ticketFees.reduce((cur, fee) => cur + applyTicketFee(ticket, fee), 0);
74
- }, 0);
75
-
76
- const upgradeTotal = order.upgrades.reduce((cur, upgrade) => cur + upgrade.price, 0);
77
-
78
- const upgradeFeeTotal = order.upgrades.reduce((cur, upgrade) => {
79
- return cur + upgradeFees.reduce((cur, fee) => cur + applyUpgradeFee(upgrade, fee), 0);
22
+ orderTotal(order: IOrder, fees: any[]): number {
23
+ return order.payments.reduce((cur: number, payment: IPayment): number => {
24
+ return cur + PaymentUtil.calculatePaymentTotal({
25
+ tickets: order.tickets.filter(ticket => ticket.paymentId === payment._id),
26
+ upgrades: order.upgrades.filter(upgrade => upgrade.paymentId === payment._id),
27
+ fees: fees,
28
+ paymentMethodType: payment.paymentMethodType,
29
+ })
80
30
  }, 0);
81
-
82
- const orderSubtotal = ticketTotal + ticketFeeTotal + upgradeTotal + upgradeFeeTotal;
83
-
84
- // Order matters here. Flat type fees must be
85
- // applied before Percent type fees
86
- orderFees = orderFees.sort(({ type }) => {
87
- if (type === 'Flat') return -1;
88
- return 1;
89
- });
90
-
91
- const orderTotal = orderFees.reduce((cur, fee) => {
92
- return applyOrderFee(cur, fee);
93
- }, orderSubtotal);
94
-
95
- return Math.round(orderTotal);
96
31
  },
97
32
  orderTotalWithRefund(order, fees) {
98
33
  return this.orderTotal(order, fees) - (order.refundedAmount || 0);
@@ -101,14 +36,15 @@ export default {
101
36
  const promoterFees = FeeUtil.promoterFees(fees);
102
37
  return this.orderTotalWithRefund(order, promoterFees);
103
38
  },
104
- orderSubtotal(order) {
105
- if (order.type === OrderTypeEnum.Complimentary) return 0;
106
- if (!order.tickets) order.tickets = [];
107
- if (!order.upgrades) order.upgrades = [];
108
-
109
- const ticketTotal = order.tickets.reduce((cur, ticket) => cur + ticket.price, 0);
110
- const upgradeTotal = order.upgrades.reduce((cur, upgrade) => cur + upgrade.price, 0);
111
- return ticketTotal + upgradeTotal;
39
+ orderSubtotal(order: IOrder): number {
40
+ return order.payments.reduce((cur: number, payment: IPayment): number => {
41
+ return cur + PaymentUtil.calculatePaymentSubtotal({
42
+ tickets: order.tickets.filter(ticket => ticket.paymentId === payment._id),
43
+ upgrades: order.upgrades.filter(upgrade => upgrade.paymentId === payment._id),
44
+ fees: [],
45
+ paymentMethodType: payment.paymentMethodType,
46
+ })
47
+ }, 0);
112
48
  },
113
49
  orderSubtotalWithRefund(order) {
114
50
  if (order.type === OrderTypeEnum.Complimentary) return 0;
@@ -1,6 +1,9 @@
1
+ import FeeUtil from './FeeUtil';
1
2
  import { ICreateOrderTicketParams, ICreateOrderUpgradeParams } from '../interfaces/ICreateOrderParams';
2
3
  import IFee, { FeeAppliedToEnum, FeeFiltersEnum, FeeTypeEnum } from '../interfaces/IFee';
3
4
  import { PaymentMethodTypeEnum } from '../enums/PaymentMethodTypeEnum';
5
+ // import IPayment from 'src/interfaces/IPayment';
6
+ // import IPayment from 'src/interfaces/IPayment';
4
7
  // import { OrderTypeEnum } from 'src/interfaces/IOrderType';
5
8
 
6
9
  interface IPaymentCalculatorParams {
@@ -15,7 +18,7 @@ interface IPaymentCalculatorParams {
15
18
  // upgrades: ICreateOrderUpgradeParams[];
16
19
  // }
17
20
 
18
- export default {
21
+ class PaymentUtil {
19
22
  // DOES NOT WORK! Work in Progress :)
20
23
  // calculateOrderItemPrices(params: IPaymentCalculatorParams): IOrderItems {
21
24
 
@@ -129,7 +132,7 @@ export default {
129
132
  // upgrades,
130
133
  // };
131
134
  // },
132
- calculateTotal(params: IPaymentCalculatorParams): number {
135
+ calculatePaymentTotal(params: IPaymentCalculatorParams): number {
133
136
  let {
134
137
  tickets = [],
135
138
  upgrades = [],
@@ -241,6 +244,73 @@ export default {
241
244
 
242
245
  // console.log(`Order Total`, orderTotal);
243
246
 
244
- return orderTotal;
247
+ return Math.round(orderTotal);
245
248
  }
246
- }
249
+ calculatePaymentSubtotal(params: IPaymentCalculatorParams): number {
250
+ let {
251
+ tickets = [],
252
+ upgrades = [],
253
+ paymentMethodType,
254
+ } = params;
255
+
256
+ if(paymentMethodType === PaymentMethodTypeEnum.None) return 0;
257
+ const ticketTotal = tickets.reduce((cur, ticket) => cur + ticket.price, 0);
258
+ const upgradeTotal = upgrades.reduce((cur, upgrade) => cur + upgrade.price, 0);
259
+ return ticketTotal + upgradeTotal;
260
+ }
261
+ calculateFee(params: IPaymentCalculatorParams): number {
262
+ const total = this.calculatePaymentTotal(params);
263
+ const subtotal = this.calculatePaymentSubtotal(params);
264
+ return Math.round(total - subtotal);
265
+ }
266
+ calculateOrganizationFee(params: IPaymentCalculatorParams): number {
267
+ let {
268
+ tickets = [],
269
+ upgrades = [],
270
+ fees = [],
271
+ paymentMethodType,
272
+ } = params;
273
+
274
+ fees = FeeUtil.promoterFees(fees);
275
+
276
+ return this.calculateFee({
277
+ tickets,
278
+ upgrades,
279
+ fees,
280
+ paymentMethodType,
281
+ });
282
+ }
283
+ calculatePlatformFee(params: IPaymentCalculatorParams): number {
284
+ let {
285
+ tickets = [],
286
+ upgrades = [],
287
+ fees = [],
288
+ paymentMethodType,
289
+ } = params;
290
+
291
+ fees = FeeUtil.selloutFees(fees);
292
+
293
+ return this.calculateFee({
294
+ tickets,
295
+ upgrades,
296
+ fees,
297
+ paymentMethodType,
298
+ });
299
+ }
300
+ calculateStripeFee(params: IPaymentCalculatorParams): number {
301
+ const total = this.calculatePaymentTotal(params);
302
+ const subtotal = this.calculatePaymentSubtotal(params);
303
+ const platformFees = this.calculatePlatformFee(params);
304
+ const organizationFee = this.calculateOrganizationFee(params);
305
+ return total - subtotal - platformFees - organizationFee;
306
+ }
307
+ calculateProcessingFee(params: IPaymentCalculatorParams): number {
308
+ const total = this.calculatePaymentTotal(params);
309
+ const subtotal = this.calculatePaymentSubtotal(params);
310
+ const organizationFee = this.calculateOrganizationFee(params);
311
+ return total - subtotal - organizationFee;
312
+ }
313
+
314
+ }
315
+
316
+ export default new PaymentUtil();
@@ -1 +0,0 @@
1
- {"version":3,"file":"resetPasswordInApp.mutation.js","sourceRoot":"","sources":["../../../src/graphql/mutations/resetPasswordInApp.mutation.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,QAAQ,GAAG,qBAAG,CAAA;;;;CAInB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"setUserOrgContextId.js","sourceRoot":"","sources":["../../../src/graphql/mutations/setUserOrgContextId.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,QAAQ,GAAG,qBAAG,CAAA;;;;;;CAMnB,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const graphql_tag_1 = __importDefault(require("graphql-tag"));
7
- const query = graphql_tag_1.default `
8
- query userProfiles($query: UserProfileQueryInput) {
9
- userProfiles(query: $query) {
10
- _id
11
- imageUrl
12
- user {
13
- _id
14
- email
15
- firstName
16
- lastName
17
- phoneNumber
18
- phoneNumberVerifiedAt
19
- }
20
- metrics {
21
- orgId
22
- yearToDateValue
23
- lifeTimeValue
24
- createdAt
25
- lifeTimeTicketsPurchased
26
- lifeTimeUpgradesPurchased
27
- }
28
- stripeCustomerId
29
- address {
30
- address1
31
- address2
32
- city
33
- state
34
- zip
35
- country
36
- phone
37
- }
38
- }
39
- }
40
- `;
41
- exports.default = query;
42
- //# sourceMappingURL=customerProfile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"customerProfile.js","sourceRoot":"","sources":["../../../src/graphql/queries/customerProfile.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiChB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
@@ -1,49 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const graphql_tag_1 = __importDefault(require("graphql-tag"));
7
- const query = graphql_tag_1.default `
8
- query organizations {
9
- organizations {
10
- _id
11
- orgName
12
- orgUrls
13
- orgLogoUrl
14
- createdAt
15
- address {
16
- address1
17
- address2
18
- city
19
- state
20
- zip
21
- country
22
- }
23
- user {
24
- email
25
- }
26
- seating {
27
- publicKey
28
- secretKey
29
- designerKey
30
- }
31
- webFlow {
32
- sites {
33
- name
34
- webFlowId
35
- enabled
36
- createdAt
37
- updatedAt
38
- previewUrl
39
- domains {
40
- lastPublishedAt
41
- name
42
- }
43
- }
44
- }
45
- }
46
- }
47
- `;
48
- exports.default = query;
49
- //# sourceMappingURL=organization.query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"organization.query.js","sourceRoot":"","sources":["../../../src/graphql/queries/organization.query.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwChB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
@@ -1,49 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const graphql_tag_1 = __importDefault(require("graphql-tag"));
7
- const query = graphql_tag_1.default `
8
- query organizations {
9
- organizations {
10
- _id
11
- orgName
12
- orgUrls
13
- orgLogoUrl
14
- createdAt
15
- address {
16
- address1
17
- address2
18
- city
19
- state
20
- zip
21
- country
22
- }
23
- user {
24
- email
25
- }
26
- seating {
27
- publicKey
28
- secretKey
29
- designerKey
30
- }
31
- webFlow {
32
- sites {
33
- name
34
- webFlowId
35
- enabled
36
- createdAt
37
- updatedAt
38
- previewUrl
39
- domains {
40
- lastPublishedAt
41
- name
42
- }
43
- }
44
- }
45
- }
46
- }
47
- `;
48
- exports.default = query;
49
- //# sourceMappingURL=organizations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../src/graphql/queries/organizations.ts"],"names":[],"mappings":";;;;;AAAA,8DAA8B;AAE9B,MAAM,KAAK,GAAG,qBAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwChB,CAAC;AAEF,kBAAe,KAAK,CAAC"}
@@ -1,4 +0,0 @@
1
- export default interface ISecondaryEmail {
2
- email: string;
3
- verifiedAt?: number;
4
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"ISecondaryEmail.js","sourceRoot":"","sources":["../../src/interfaces/ISecondaryEmail.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- declare const _default: {
2
- email: {
3
- type: StringConstructor;
4
- required: boolean;
5
- };
6
- verifiedAt: {
7
- type: NumberConstructor;
8
- required: boolean;
9
- default: number;
10
- };
11
- };
12
- export default _default;
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {
4
- email: {
5
- type: String,
6
- required: true,
7
- },
8
- verifiedAt: {
9
- type: Number,
10
- required: false,
11
- default: 0,
12
- },
13
- };
14
- //# sourceMappingURL=SecondaryEmail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SecondaryEmail.js","sourceRoot":"","sources":["../../src/schemas/SecondaryEmail.ts"],"names":[],"mappings":";;AAAA,kBAAe;IACb,KAAK,EAAE;QACL,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE;QACV,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,CAAC;KACX;CACF,CAAC"}