@wix/auto_sdk_ecom_validations 1.0.7 → 1.0.9

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 (69) hide show
  1. package/build/cjs/index.d.ts +2 -0
  2. package/build/cjs/index.js +19 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +15 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +5 -0
  8. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js +9 -0
  9. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js.map +1 -0
  10. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +19 -0
  11. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js +50 -0
  12. package/build/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js.map +1 -0
  13. package/build/{index.d.mts → cjs/src/service-plugins-types.d.ts} +74 -94
  14. package/build/cjs/src/service-plugins-types.js +121 -0
  15. package/build/cjs/src/service-plugins-types.js.map +1 -0
  16. package/build/es/index.d.ts +2 -0
  17. package/build/es/index.js +3 -0
  18. package/build/es/index.js.map +1 -0
  19. package/build/es/index.typings.d.ts +15 -0
  20. package/build/es/index.typings.js +2 -0
  21. package/build/es/index.typings.js.map +1 -0
  22. package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +5 -0
  23. package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.js +6 -0
  24. package/build/es/src/interfaces-ecommerce-v1-validations-provider.context.js.map +1 -0
  25. package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +19 -0
  26. package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.js +47 -0
  27. package/build/es/src/interfaces-ecommerce-v1-validations-provider.public.js.map +1 -0
  28. package/build/{index.d.ts → es/src/service-plugins-types.d.ts} +74 -94
  29. package/build/es/src/service-plugins-types.js +118 -0
  30. package/build/es/src/service-plugins-types.js.map +1 -0
  31. package/build/internal/cjs/index.d.ts +2 -0
  32. package/build/internal/cjs/index.js +19 -0
  33. package/build/internal/cjs/index.js.map +1 -0
  34. package/build/internal/cjs/index.typings.d.ts +15 -0
  35. package/build/internal/cjs/index.typings.js +18 -0
  36. package/build/internal/cjs/index.typings.js.map +1 -0
  37. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +5 -0
  38. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js +9 -0
  39. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.context.js.map +1 -0
  40. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +19 -0
  41. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js +50 -0
  42. package/build/internal/cjs/src/interfaces-ecommerce-v1-validations-provider.public.js.map +1 -0
  43. package/build/internal/{index.d.ts → cjs/src/service-plugins-types.d.ts} +74 -94
  44. package/build/internal/cjs/src/service-plugins-types.js +121 -0
  45. package/build/internal/cjs/src/service-plugins-types.js.map +1 -0
  46. package/build/internal/es/index.d.ts +2 -0
  47. package/build/internal/es/index.js +3 -0
  48. package/build/internal/es/index.js.map +1 -0
  49. package/build/internal/es/index.typings.d.ts +15 -0
  50. package/build/internal/es/index.typings.js +2 -0
  51. package/build/internal/es/index.typings.js.map +1 -0
  52. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.d.ts +5 -0
  53. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.js +6 -0
  54. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.context.js.map +1 -0
  55. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.d.ts +19 -0
  56. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.js +47 -0
  57. package/build/internal/es/src/interfaces-ecommerce-v1-validations-provider.public.js.map +1 -0
  58. package/build/internal/{index.d.mts → es/src/service-plugins-types.d.ts} +74 -94
  59. package/build/internal/es/src/service-plugins-types.js +118 -0
  60. package/build/internal/es/src/service-plugins-types.js.map +1 -0
  61. package/package.json +11 -12
  62. package/build/index.js +0 -194
  63. package/build/index.js.map +0 -1
  64. package/build/index.mjs +0 -156
  65. package/build/index.mjs.map +0 -1
  66. package/build/internal/index.js +0 -194
  67. package/build/internal/index.js.map +0 -1
  68. package/build/internal/index.mjs +0 -156
  69. package/build/internal/index.mjs.map +0 -1
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IdentityType = exports.SuggestedFix = exports.NameInLineItem = exports.NameInOther = exports.Severity = exports.DiscountType = exports.VatType = exports.WeightUnit = exports.JurisdictionType = exports.SubscriptionFrequency = exports.ItemTypeItemType = exports.CheckoutStage = exports.Source = void 0;
4
+ var Source;
5
+ (function (Source) {
6
+ /** Context cannot be recognized */
7
+ Source["OTHER"] = "OTHER";
8
+ /** Called from Ecom's Cart service */
9
+ Source["CART"] = "CART";
10
+ /** Called from Ecom's Checkout service */
11
+ Source["CHECKOUT"] = "CHECKOUT";
12
+ })(Source || (exports.Source = Source = {}));
13
+ var CheckoutStage;
14
+ (function (CheckoutStage) {
15
+ /** Not implemented. */
16
+ CheckoutStage["UNKNOWN_CHECKOUT_STAGE"] = "UNKNOWN_CHECKOUT_STAGE";
17
+ /** Used during the initialization of the checkout (Create Checkout). */
18
+ CheckoutStage["INITIALIZATION"] = "INITIALIZATION";
19
+ /** Used during the checkout process, such as updating or retrieving the checkout. */
20
+ CheckoutStage["IN_PROGRESS"] = "IN_PROGRESS";
21
+ /** Used during the creation of an order from the checkout. */
22
+ CheckoutStage["ORDER_CREATION"] = "ORDER_CREATION";
23
+ })(CheckoutStage || (exports.CheckoutStage = CheckoutStage = {}));
24
+ var ItemTypeItemType;
25
+ (function (ItemTypeItemType) {
26
+ ItemTypeItemType["UNRECOGNISED"] = "UNRECOGNISED";
27
+ ItemTypeItemType["PHYSICAL"] = "PHYSICAL";
28
+ ItemTypeItemType["DIGITAL"] = "DIGITAL";
29
+ ItemTypeItemType["GIFT_CARD"] = "GIFT_CARD";
30
+ ItemTypeItemType["SERVICE"] = "SERVICE";
31
+ })(ItemTypeItemType || (exports.ItemTypeItemType = ItemTypeItemType = {}));
32
+ /** Frequency unit of recurring payment */
33
+ var SubscriptionFrequency;
34
+ (function (SubscriptionFrequency) {
35
+ SubscriptionFrequency["UNDEFINED"] = "UNDEFINED";
36
+ SubscriptionFrequency["DAY"] = "DAY";
37
+ SubscriptionFrequency["WEEK"] = "WEEK";
38
+ SubscriptionFrequency["MONTH"] = "MONTH";
39
+ SubscriptionFrequency["YEAR"] = "YEAR";
40
+ })(SubscriptionFrequency || (exports.SubscriptionFrequency = SubscriptionFrequency = {}));
41
+ /** JurisdictionType represents the type of the jurisdiction in which this tax detail applies (e.g. Country,State,County,City,Special). */
42
+ var JurisdictionType;
43
+ (function (JurisdictionType) {
44
+ /** Undefined jurisdiction type. */
45
+ JurisdictionType["UNDEFINED"] = "UNDEFINED";
46
+ /** Country jurisdiction. */
47
+ JurisdictionType["COUNTRY"] = "COUNTRY";
48
+ /** State jurisdiction. */
49
+ JurisdictionType["STATE"] = "STATE";
50
+ /** County jurisdiction. */
51
+ JurisdictionType["COUNTY"] = "COUNTY";
52
+ /** City jurisdiction. */
53
+ JurisdictionType["CITY"] = "CITY";
54
+ /** Special jurisdiction. */
55
+ JurisdictionType["SPECIAL"] = "SPECIAL";
56
+ })(JurisdictionType || (exports.JurisdictionType = JurisdictionType = {}));
57
+ var WeightUnit;
58
+ (function (WeightUnit) {
59
+ /** Weight unit can't be classified due to an error. */
60
+ WeightUnit["UNSPECIFIED_WEIGHT_UNIT"] = "UNSPECIFIED_WEIGHT_UNIT";
61
+ /** Kilograms. */
62
+ WeightUnit["KG"] = "KG";
63
+ /** Pounds. */
64
+ WeightUnit["LB"] = "LB";
65
+ })(WeightUnit || (exports.WeightUnit = WeightUnit = {}));
66
+ /** tax info types */
67
+ var VatType;
68
+ (function (VatType) {
69
+ VatType["UNSPECIFIED"] = "UNSPECIFIED";
70
+ /** CPF - for individual tax payers. */
71
+ VatType["CPF"] = "CPF";
72
+ /** CNPJ - for corporations */
73
+ VatType["CNPJ"] = "CNPJ";
74
+ })(VatType || (exports.VatType = VatType = {}));
75
+ var DiscountType;
76
+ (function (DiscountType) {
77
+ /** Global discount. */
78
+ DiscountType["GLOBAL"] = "GLOBAL";
79
+ /** Discount for specific items. */
80
+ DiscountType["SPECIFIC_ITEMS"] = "SPECIFIC_ITEMS";
81
+ /** Shipping discount. */
82
+ DiscountType["SHIPPING"] = "SHIPPING";
83
+ })(DiscountType || (exports.DiscountType = DiscountType = {}));
84
+ var Severity;
85
+ (function (Severity) {
86
+ /** The user is allowed to move forward in the flow. */
87
+ Severity["WARNING"] = "WARNING";
88
+ /**
89
+ * The user is blocked from moving forward in the flow.
90
+ * For example, if callerContext is CART - moving to checkout is blocked. if callerContext is CHECKOUT, placing an order is blocked.
91
+ */
92
+ Severity["ERROR"] = "ERROR";
93
+ })(Severity || (exports.Severity = Severity = {}));
94
+ /** Available locations on the webpage */
95
+ var NameInOther;
96
+ (function (NameInOther) {
97
+ /** Default location, in case no specific location is specified. */
98
+ NameInOther["OTHER_DEFAULT"] = "OTHER_DEFAULT";
99
+ })(NameInOther || (exports.NameInOther = NameInOther = {}));
100
+ /** Available locations on the line item */
101
+ var NameInLineItem;
102
+ (function (NameInLineItem) {
103
+ /** Default location, in case no specific location is specified. */
104
+ NameInLineItem["LINE_ITEM_DEFAULT"] = "LINE_ITEM_DEFAULT";
105
+ })(NameInLineItem || (exports.NameInLineItem = NameInLineItem = {}));
106
+ var SuggestedFix;
107
+ (function (SuggestedFix) {
108
+ /** No suggested fix is specified. The user should refer to the violation description to resolve the issue. */
109
+ SuggestedFix["UNKNOWN_SUGGESTED_FIX"] = "UNKNOWN_SUGGESTED_FIX";
110
+ /** The line item should be removed from the cart or checkout to resolve the violation. */
111
+ SuggestedFix["REMOVE_LINE_ITEM"] = "REMOVE_LINE_ITEM";
112
+ })(SuggestedFix || (exports.SuggestedFix = SuggestedFix = {}));
113
+ var IdentityType;
114
+ (function (IdentityType) {
115
+ IdentityType["UNKNOWN"] = "UNKNOWN";
116
+ IdentityType["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
117
+ IdentityType["MEMBER"] = "MEMBER";
118
+ IdentityType["WIX_USER"] = "WIX_USER";
119
+ IdentityType["APP"] = "APP";
120
+ })(IdentityType || (exports.IdentityType = IdentityType = {}));
121
+ //# sourceMappingURL=service-plugins-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-plugins-types.js","sourceRoot":"","sources":["../../../../src/service-plugins-types.ts"],"names":[],"mappings":";;;AAmBA,IAAY,MAOX;AAPD,WAAY,MAAM;IAChB,mCAAmC;IACnC,yBAAe,CAAA;IACf,sCAAsC;IACtC,uBAAa,CAAA;IACb,0CAA0C;IAC1C,+BAAqB,CAAA;AACvB,CAAC,EAPW,MAAM,sBAAN,MAAM,QAOjB;AAaD,IAAY,aASX;AATD,WAAY,aAAa;IACvB,uBAAuB;IACvB,kEAAiD,CAAA;IACjD,wEAAwE;IACxE,kDAAiC,CAAA;IACjC,qFAAqF;IACrF,4CAA2B,CAAA;IAC3B,8DAA8D;IAC9D,kDAAiC,CAAA;AACnC,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB;AAgMD,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,iDAA6B,CAAA;IAC7B,yCAAqB,CAAA;IACrB,uCAAmB,CAAA;IACnB,2CAAuB,CAAA;IACvB,uCAAmB,CAAA;AACrB,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B;AAgCD,0CAA0C;AAC1C,IAAY,qBAMX;AAND,WAAY,qBAAqB;IAC/B,gDAAuB,CAAA;IACvB,oCAAW,CAAA;IACX,sCAAa,CAAA;IACb,wCAAe,CAAA;IACf,sCAAa,CA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HD,WAAY,cAAc;IACxB,mEAAmE;IACnE,yDAAuC,CAAA;AACzC,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,8GAA8G;IAC9G,+DAA+C,CAAA;IAC/C,0FAA0F;IAC1F,qDAAqC,CAAA;AACvC,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AA2DD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,uDAAuC,CAAA;IACvC,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,2BAAW,CAAA;AACb,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB"}
@@ -0,0 +1,2 @@
1
+ export * from './src/service-plugins-types';
2
+ export * from './src/interfaces-ecommerce-v1-validations-provider.context';
@@ -0,0 +1,3 @@
1
+ export * from './src/service-plugins-types';
2
+ export * from './src/interfaces-ecommerce-v1-validations-provider.context';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4DAA4D,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { GetValidationViolationsResponse } from './src/service-plugins-types.js';
2
+ import { GetValidationViolationsEnvelope } from './src/interfaces-ecommerce-v1-validations-provider.public.js';
3
+ export * from './src/service-plugins-types';
4
+ export { GetValidationViolationsEnvelope };
5
+ /**
6
+ * This method retrieves validation violations from your app.
7
+ *
8
+ * Wix calls this method when certain actions are performed on a visitor's cart and checkout. For example, when an item is added to the cart, or when a coupon is added to a checkout.
9
+ * This method validates a visitor's cart and checkout, and returns any validation violations (using the structure provided by Wix eCommerce). Site visitors can see the validation violations in their cart and checkout pages. If there aren't any validation violations, the method returns an object containing an empty list.
10
+ *
11
+ * > __Notes:__
12
+ * > + Do not call the Estimate Cart Totals, Estimate Current Cart Totals or Get Checkout methods from your implementation code for Get Validation Violations. Doing so will result in an error.
13
+ * > + By default, this method only retrieves validation violations from a visitor's checkout. If you want to also retrieve validation violations from a visitor's cart, set the `validateInCart` parameter to `true` in the Ecom Validations Integration's config file.
14
+ */
15
+ export declare function getValidationViolations(payload: GetValidationViolationsEnvelope): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;
@@ -0,0 +1,2 @@
1
+ export * from './src/service-plugins-types';
2
+ //# sourceMappingURL=index.typings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../../index.typings.ts"],"names":[],"mappings":"AAGA,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,5 @@
1
+ import './interfaces-ecommerce-v1-validations-provider.public.js';
2
+ import { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';
3
+ import { provideHandlers as publicProvideHandlers } from './interfaces-ecommerce-v1-validations-provider.public.js';
4
+ export { publicProvideHandlers };
5
+ export declare const provideHandlers: ReturnType<typeof createServicePluginModule<typeof publicProvideHandlers>>;
@@ -0,0 +1,6 @@
1
+ import './interfaces-ecommerce-v1-validations-provider.public.js';
2
+ import { createServicePluginModule } from '@wix/sdk-runtime/service-plugin-modules';
3
+ import { provideHandlers as publicProvideHandlers } from './interfaces-ecommerce-v1-validations-provider.public.js';
4
+ export { publicProvideHandlers };
5
+ export const provideHandlers = createServicePluginModule(publicProvideHandlers);
6
+ //# sourceMappingURL=interfaces-ecommerce-v1-validations-provider.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces-ecommerce-v1-validations-provider.context.js","sourceRoot":"","sources":["../../../../src/interfaces-ecommerce-v1-validations-provider.context.ts"],"names":[],"mappings":"AAAA,OAAO,0DAA0D,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AAEpH,OAAO,EAAE,qBAAqB,EAAE,CAAC;AAEjC,MAAM,CAAC,MAAM,eAAe,GAExB,yBAAyB,CAAC,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { ServicePluginDefinition } from '@wix/sdk-types';
2
+ import { Context, GetValidationViolationsRequest, GetValidationViolationsResponse } from './service-plugins-types.js';
3
+ export interface GetValidationViolationsEnvelope {
4
+ request: GetValidationViolationsRequest;
5
+ metadata: Context;
6
+ }
7
+ export declare const provideHandlers: ServicePluginDefinition<{
8
+ /**
9
+ *
10
+ * This method retrieves validation violations from your app.
11
+ *
12
+ * Wix calls this method when certain actions are performed on a visitor's cart and checkout. For example, when an item is added to the cart, or when a coupon is added to a checkout.
13
+ * This method validates a visitor's cart and checkout, and returns any validation violations (using the structure provided by Wix eCommerce). Site visitors can see the validation violations in their cart and checkout pages. If there aren't any validation violations, the method returns an object containing an empty list.
14
+ *
15
+ * > __Notes:__
16
+ * > + Do not call the Estimate Cart Totals, Estimate Current Cart Totals or Get Checkout methods from your implementation code for Get Validation Violations. Doing so will result in an error.
17
+ * > + By default, this method only retrieves validation violations from a visitor's checkout. If you want to also retrieve validation violations from a visitor's cart, set the `validateInCart` parameter to `true` in the Ecom Validations Integration's config file. */
18
+ getValidationViolations(payload: GetValidationViolationsEnvelope): GetValidationViolationsResponse | Promise<GetValidationViolationsResponse>;
19
+ }>;
@@ -0,0 +1,47 @@
1
+ import { ServicePluginDefinition } from '@wix/sdk-types';
2
+ import { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';
3
+ import { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';
4
+ import { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';
5
+ import { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';
6
+ import { renameKeysFromSDKRequestToRESTRequest, renameKeysFromRESTResponseToSDKResponse, } from '@wix/sdk-runtime/rename-all-nested-keys';
7
+ export const provideHandlers = ServicePluginDefinition('ECOM_VALIDATIONS', [
8
+ {
9
+ name: 'getValidationViolations',
10
+ primaryHttpMappingPath: '/v1/get-violations',
11
+ transformations: {
12
+ toREST: (payload) => {
13
+ const toRestResponse = payload;
14
+ return renameKeysFromSDKRequestToRESTRequest(toRestResponse);
15
+ },
16
+ fromREST: (payload) => {
17
+ const fromRestRequest = transformPaths(payload, [
18
+ {
19
+ transformFn: transformRESTFloatToSDKFloat,
20
+ paths: [
21
+ {
22
+ path: 'request.validationInfo.lineItems.physicalProperties.weight',
23
+ },
24
+ ],
25
+ },
26
+ {
27
+ transformFn: transformRESTTimestampToSDKTimestamp,
28
+ paths: [
29
+ {
30
+ path: 'request.validationInfo.lineItems.subscriptionOptionInfo.subscriptionSettings.startDate',
31
+ },
32
+ ],
33
+ },
34
+ {
35
+ transformFn: transformRESTAddressToSDKAddress,
36
+ paths: [
37
+ { path: 'request.validationInfo.billingInfo.address' },
38
+ { path: 'request.validationInfo.shippingAddress.address' },
39
+ ],
40
+ },
41
+ ]);
42
+ return renameKeysFromRESTResponseToSDKResponse(fromRestRequest);
43
+ },
44
+ },
45
+ },
46
+ ]);
47
+ //# sourceMappingURL=interfaces-ecommerce-v1-validations-provider.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces-ecommerce-v1-validations-provider.public.js","sourceRoot":"","sources":["../../../../src/interfaces-ecommerce-v1-validations-provider.public.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAMzD,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,oCAAoC,EAAE,MAAM,4CAA4C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAAO,EACL,qCAAqC,EACrC,uCAAuC,GACxC,MAAM,yCAAyC,CAAC;AAOjD,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CAcnD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